Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

Commit 4634b7b

Browse files
author
Francois-Xavier Gentilhomme
committed
[DEV] Refactor build configuration
1 parent 59fec5d commit 4634b7b

File tree

150 files changed

+7717
-1424
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+7717
-1424
lines changed

docs/components/iron-overlay-behavior/.bower.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iron-overlay-behavior",
3-
"version": "1.10.2",
3+
"version": "1.10.3",
44
"license": "http://polymer.github.io/LICENSE.txt",
55
"description": "Provides a behavior for making an element an overlay",
66
"private": true,
@@ -35,11 +35,11 @@
3535
},
3636
"ignore": [],
3737
"homepage": "https://github.com/PolymerElements/iron-overlay-behavior",
38-
"_release": "1.10.2",
38+
"_release": "1.10.3",
3939
"_resolution": {
4040
"type": "version",
41-
"tag": "v1.10.2",
42-
"commit": "27558b9ceeba7c670999818fc50eebe7e044ed5c"
41+
"tag": "v1.10.3",
42+
"commit": "3aee4eea429e6a0e0e4700d5508b35f71d985548"
4343
},
4444
"_source": "https://github.com/PolymerElements/iron-overlay-behavior.git",
4545
"_target": "^1.0.9",

docs/components/iron-overlay-behavior/bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iron-overlay-behavior",
3-
"version": "1.10.2",
3+
"version": "1.10.3",
44
"license": "http://polymer.github.io/LICENSE.txt",
55
"description": "Provides a behavior for making an element an overlay",
66
"private": true,

docs/components/iron-overlay-behavior/iron-overlay-manager.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@
4040
this._backdropElement = null;
4141

4242
// Enable document-wide tap recognizer.
43-
Polymer.Gestures.add(document, 'tap', this._onCaptureClick.bind(this));
44-
43+
// NOTE: Use useCapture=true to avoid accidentally prevention of the closing
44+
// of an overlay via event.stopPropagation(). The only way to prevent
45+
// closing of an overlay should be through its APIs.
46+
Polymer.Gestures.add(document, 'tap', null);
47+
document.addEventListener('tap', this._onCaptureClick.bind(this), true);
4548
document.addEventListener('focus', this._onCaptureFocus.bind(this), true);
4649
document.addEventListener('keydown', this._onCaptureKeyDown.bind(this), true);
4750
};

docs/components/iron-overlay-behavior/test/iron-overlay-behavior.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,38 @@ <h2>Focusables (with tabindex)</h2>
428428
});
429429
});
430430

431+
suite('tap event listener', function() {
432+
var overlay;
433+
434+
var preventTap = function(event) {
435+
event.preventDefault();
436+
event.stopPropagation();
437+
};
438+
439+
suiteSetup(function() {
440+
// Worst case scenario: listener with useCapture = true that prevents & stops propagation
441+
// added before the overlay is initialized.
442+
document.body.addEventListener('tap', preventTap, true);
443+
});
444+
445+
setup(function() {
446+
overlay = fixture('basic');
447+
});
448+
449+
suiteTeardown(function() {
450+
document.body.removeEventListener('tap', preventTap, true);
451+
});
452+
453+
test('cancel an overlay with tap outside even if event is prevented by other listeners', function(done) {
454+
runAfterOpen(overlay, function() {
455+
overlay.addEventListener('iron-overlay-canceled', function(event) {
456+
done();
457+
});
458+
MockInteractions.tap(document.body);
459+
});
460+
});
461+
});
462+
431463
suite('opened overlay', function() {
432464
var overlay;
433465

docs/components/iron-overlay-behavior/test/test-buttons-wrapper.html

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,15 @@
1212
<link rel="import" href="test-buttons.html">
1313

1414
<dom-module id="test-buttons-wrapper">
15-
16-
<style>
17-
:host {
18-
display: block;
19-
border: 1px solid gray;
20-
padding: 10px;
21-
}
22-
</style>
23-
2415
<template>
16+
<style>
17+
:host {
18+
display: block;
19+
border: 1px solid gray;
20+
padding: 10px;
21+
}
22+
</style>
23+
2524
<select id="select">
2625
<option>1</option>
2726
</select>

docs/components/myscript-common-element/.bower.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,20 @@
2525
"iron-icons": "PolymerElements/iron-icons#1.2.x",
2626
"paper-fab": "PolymerElements/paper-fab#1.2.x",
2727
"paper-toast": "PolymerElements/paper-toast#1.3.x",
28-
"myscript": "https://scm.corp.myscript.com/scm/ws/myscriptjs.git#2.0.0-alpha1"
28+
"myscript": "https://scm.corp.myscript.com/scm/ws/myscriptjs.git#2.0.0-alpha1",
29+
"pepjs": "^0.4.2"
2930
},
3031
"devDependencies": {
3132
"iron-component-page": "PolymerElements/iron-component-page#1.1.x"
3233
},
3334
"resolutions": {
3435
"polymer": "1.8.x"
3536
},
36-
"_release": "46c0ab5bd9",
37+
"_release": "8acb460a4d",
3738
"_resolution": {
3839
"type": "branch",
3940
"branch": "2.0.0-alpha1",
40-
"commit": "46c0ab5bd9162ece39420c22c27a53c4eee6cc55"
41+
"commit": "8acb460a4d27397c771e64e325e3b468930635c4"
4142
},
4243
"_source": "https://scm.corp.myscript.com/scm/ws/webcomponents-myscript-common-element.git",
4344
"_target": "2.0.0-alpha1",

docs/components/myscript-common-element/CHANGELOG.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
- Removal of all deprecated attributes and methods
77
- User can no longer write when an unrecoverable error is detected forcing him to relaod the page. See demo/init-error.html to discover this new feature.
88
- --myscript-common-element-button-background, --myscript-common-element-button-focus-background, --myscript-common-element-button-disabled-background css variables helps you styling the buttons. See demo/customstyle.html for a working example.
9-
- options attributes allow you to set programmaticly all options of MyScriptJS (see [MyScriptJS documentation]() for a complete spec ). Options are overide by other attributes when they are set.
10-
- inkpaper aread only attributes allow you to access to the underlying inkPaper object create when myscipt-common-element custom element is attached to the DOM (see [MyScriptJS documentation]() for more details )
11-
- unloaded attribute ease the integration with other front-end frameworks or when you want to programmaticly set options and other attributs. Add the unloaded attribut into your markup and remove it in your JS logic when all attributes are set
9+
- configuration attributes allow you to set programmaticly all configuration of MyScriptJS (see [MyScriptJS documentation]() for a complete spec ). Options are overide by other attributes when they are set.
10+
- editor read only attributes allow you to access to the underlying editor object create when myscipt-common-element custom element is attached to the DOM (see [MyScriptJS documentation]() for more details )
11+
- unloaded attribute ease the integration with other front-end frameworks or when you want to programmaticly set configuration and other attributs. Add the unloaded attribut into your markup and remove it in your JS logic when all attributes are set
1212
### Breaking changes :
1313
- tiemout property has be renammed to recognitiontriggerdelay
1414
- existing events have been removed. See custom elment docs to discover new behavior.
15-
- resulttypes, language, typeset, textparameters, mathparameters, shapeparameters, musicparameters, analyzerparameters is not longuer expose. Use options to
15+
- resulttypes, language, typeset, textparameters, mathparameters, shapeparameters, musicparameters, analyzerparameters is not longuer expose. Use configuration to
1616
- ssl attributes have been removed. Use sheme attribute instead.
1717
- _disableUndoRedo, _disableClear, _disableRecognize have been renamed to disableundoredo, disableclear, disablerecognize
1818
- delete() have been renamed to clear() to be consistent accross APIs
1919
- getAvailableLanguages() have been removed. You can use the non graphical element to access the language list accessible for your account.
20-
- Once myscript-common-element is attached to the DOM or when unloaded attribut is remove, you can only change strokecolor and strokewidth attributes. If you change any athor attribute you will have to set the unloaded attribut then removed it. This will clear the underlying inkpaper and all currents strokes and recognition results will be lost.
20+
- Once myscript-common-element is attached to the DOM or when unloaded attribut is remove, you can only change strokecolor and strokewidth attributes. If you change any athor attribute you will have to set the unloaded attribut then removed it. This will clear the underlying editor and all currents strokes and recognition results will be lost.
2121

2222
### Limits
2323
- myscript-common-element does not support pure shadow DOM. Still some issues to import myscriptjs css.
@@ -64,7 +64,7 @@
6464

6565

6666
### Bugs
67-
- Unused `options` attribute removed
67+
- Unused `configuration` attribute removed
6868
- Fixes issue when setting `host` from javascript (@see mutable `host` feature)
6969
- Fixes issue when setting `host` in WebSocket recognition (@see mutable `host` feature)
7070
- Fixes issue when setting `protocol` from javascript (@see mutable `protocol` feature)

docs/components/myscript-common-element/THIRD_PARTY_SOFTWARE_AND_LICENCES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Third Party Software and Licenses.
22

3-
Myscript-ink-paper web component is using the following third party software:
3+
myscript-common-element web component is using the following third party software:
44

55
- MyScript JS
66

docs/components/myscript-common-element/bower.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"iron-icons": "PolymerElements/iron-icons#1.2.x",
2626
"paper-fab": "PolymerElements/paper-fab#1.2.x",
2727
"paper-toast": "PolymerElements/paper-toast#1.3.x",
28-
"myscript": "https://scm.corp.myscript.com/scm/ws/myscriptjs.git#2.0.0-alpha1"
28+
"myscript": "https://scm.corp.myscript.com/scm/ws/myscriptjs.git#2.0.0-alpha1",
29+
"pepjs": "^0.4.2"
2930
},
3031
"devDependencies": {
3132
"iron-component-page": "PolymerElements/iron-component-page#1.1.x"

docs/components/myscript-common-element/demo/change-non-mutable-attribute.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,16 @@
2929
var myscriptCommonElement = document.querySelector('myscript-common-element');
3030
myscriptCommonElement.unloaded = true;
3131
console.log("myscript-common-element should not be displayed");
32-
myscriptCommonElement.options = {
32+
myscriptCommonElement.configuration = {
3333
recognitionParams: {
34-
timestampFloatPrecision: 2
34+
v3: {
35+
mathParameter: {
36+
resultTypes: ['OFFICEOPENXMLMATH']
37+
}
38+
}
3539
}
3640
};
3741
myscriptCommonElement.unloaded = false;
38-
//myscriptCommonElement.unloaded = false;
3942
console.log("myscript-common-element should be displayed with a new precision of stroke capure.");
4043

4144
}, 3000);

0 commit comments

Comments
 (0)