wcs-core 2.5.2 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/README.md +17 -1
- package/dist/cjs/component-fc28ed16.js +1074 -0
- package/dist/cjs/helpers-6abce594.js +86 -0
- package/dist/cjs/{index-e05c3e1f.js → index-3cb9d725.js} +165 -87
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/{esm/wcs-action-bar_47.entry.js → cjs/lodash-776d6f03.js} +12499 -22628
- package/dist/cjs/popper-6a290c40.js +1731 -0
- package/dist/cjs/select-arrow-76ccf86d.js +36 -0
- package/dist/cjs/wcs-action-bar.cjs.entry.js +24 -0
- package/dist/cjs/wcs-app.cjs.entry.js +2 -2
- package/dist/cjs/wcs-badge.cjs.entry.js +27 -0
- package/dist/cjs/wcs-button.cjs.entry.js +86 -0
- package/dist/cjs/wcs-card-body.cjs.entry.js +19 -0
- package/dist/cjs/wcs-card.cjs.entry.js +20 -0
- package/dist/cjs/wcs-checkbox.cjs.entry.js +47 -0
- package/dist/cjs/wcs-com-nav-category.cjs.entry.js +63 -0
- package/dist/cjs/wcs-com-nav-submenu.cjs.entry.js +69 -0
- package/dist/cjs/wcs-com-nav.cjs.entry.js +19 -0
- package/dist/cjs/wcs-divider.cjs.entry.js +19 -0
- package/dist/cjs/wcs-dropdown-divider.cjs.entry.js +19 -0
- package/dist/cjs/wcs-dropdown-header.cjs.entry.js +19 -0
- package/dist/cjs/wcs-dropdown-item.cjs.entry.js +23 -0
- package/dist/cjs/wcs-dropdown.cjs.entry.js +90 -0
- package/dist/cjs/wcs-editable-field.cjs.entry.js +225 -0
- package/dist/cjs/wcs-error_2.cjs.entry.js +137 -0
- package/dist/cjs/wcs-field-content.cjs.entry.js +16 -0
- package/dist/cjs/wcs-field-label.cjs.entry.js +16 -0
- package/dist/cjs/wcs-field.cjs.entry.js +19 -0
- package/dist/cjs/wcs-footer.cjs.entry.js +19 -0
- package/dist/cjs/wcs-galactic-menu.cjs.entry.js +58 -0
- package/dist/cjs/wcs-galactic.cjs.entry.js +41 -0
- package/dist/cjs/wcs-grid-column.cjs.entry.js +77 -0
- package/dist/cjs/wcs-grid-custom-cell.cjs.entry.js +16 -0
- package/dist/cjs/wcs-grid-pagination.cjs.entry.js +4 -4
- package/dist/cjs/wcs-grid.cjs.entry.js +332 -0
- package/dist/cjs/wcs-header.cjs.entry.js +25 -0
- package/dist/cjs/wcs-hint.cjs.entry.js +20 -0
- package/dist/cjs/wcs-horizontal-stepper.cjs.entry.js +114 -0
- package/dist/cjs/wcs-icon.cjs.entry.js +2 -2
- package/dist/cjs/wcs-input.cjs.entry.js +228 -0
- package/dist/cjs/wcs-label.cjs.entry.js +20 -0
- package/dist/cjs/wcs-list-item-properties.cjs.entry.js +19 -0
- package/dist/cjs/wcs-list-item-property.cjs.entry.js +19 -0
- package/dist/cjs/wcs-list-item.cjs.entry.js +23 -0
- package/dist/cjs/wcs-mat-icon.cjs.entry.js +73 -0
- package/dist/cjs/wcs-modal.cjs.entry.js +45 -0
- package/dist/cjs/wcs-nav-item.cjs.entry.js +23 -0
- package/dist/cjs/wcs-nav.cjs.entry.js +19 -0
- package/dist/cjs/wcs-progress-bar.cjs.entry.js +47 -0
- package/dist/cjs/wcs-progress-radial.cjs.entry.js +30 -0
- package/dist/cjs/wcs-radio-group.cjs.entry.js +65 -0
- package/dist/cjs/wcs-radio.cjs.entry.js +49 -0
- package/dist/cjs/wcs-select_2.cjs.entry.js +4916 -0
- package/dist/cjs/wcs-spinner.cjs.entry.js +21 -0
- package/dist/cjs/wcs-switch.cjs.entry.js +42 -0
- package/dist/cjs/wcs-tab.cjs.entry.js +20 -0
- package/dist/cjs/wcs-tabs.cjs.entry.js +159 -0
- package/dist/cjs/wcs-textarea.cjs.entry.js +224 -0
- package/dist/cjs/wcs-tooltip.cjs.entry.js +129 -0
- package/dist/cjs/wcs.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +5 -2
- package/dist/collection/components/button/button.css +79 -75
- package/dist/collection/components/button/button.js +23 -11
- package/dist/collection/components/checkbox/checkbox.css +18 -7
- package/dist/collection/components/checkbox/checkbox.js +24 -2
- package/dist/collection/components/com-nav/com-nav.css +1 -2
- package/dist/collection/components/com-nav-category/com-nav-category.css +5 -6
- package/dist/collection/components/com-nav-category/com-nav-category.js +31 -1
- package/dist/collection/components/com-nav-submenu/com-nav-submenu.css +1 -2
- package/dist/collection/components/com-nav-submenu/com-nav-submenu.js +21 -1
- package/dist/collection/components/dropdown/dropdown-interface.js +1 -0
- package/dist/collection/components/dropdown/dropdown.css +46 -38
- package/dist/collection/components/dropdown/dropdown.js +90 -29
- package/dist/collection/components/dropdown-divider/dropdown-divider.css +7 -0
- package/dist/collection/components/dropdown-divider/dropdown-divider.js +14 -0
- package/dist/collection/components/dropdown-header/dropdown-header.css +8 -0
- package/dist/collection/components/dropdown-header/dropdown-header.js +15 -0
- package/dist/collection/components/footer/footer.css +1 -1
- package/dist/collection/components/form-field/form-field.css +1 -1
- package/dist/collection/components/grid/grid.js +75 -13
- package/dist/collection/components/grid-column/grid-column.css +5 -0
- package/dist/collection/components/grid-column/grid-column.js +69 -3
- package/dist/collection/components/grid-custom-cell/grid-custom-cell.js +45 -0
- package/dist/collection/components/grid-pagination/grid-pagination.js +4 -4
- package/dist/collection/components/header/header.css +1 -1
- package/dist/collection/components/input/input.css +48 -0
- package/dist/collection/components/input/input.js +40 -4
- package/dist/collection/components/radio/radio.component.js +1 -1
- package/dist/collection/components/radio/radio.css +18 -4
- package/dist/collection/components/radio-group/radio-group.js +7 -2
- package/dist/collection/components/select/select.css +81 -77
- package/dist/collection/components/select/select.js +2 -2
- package/dist/collection/components/select-option/select-option.css +79 -75
- package/dist/collection/components/select-option/select-option.js +6 -7
- package/dist/collection/components/switch/switch.css +53 -16
- package/dist/collection/components/switch/switch.js +55 -6
- package/dist/collection/components/tab/tab.js +4 -4
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/textarea/textarea.css +4 -0
- package/dist/collection/components/textarea/textarea.js +2 -2
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/collection/utils/helpers.js +4 -0
- package/dist/esm/component-6b4d470f.js +1072 -0
- package/dist/esm/helpers-e2993152.js +77 -0
- package/dist/esm/{index-c619b1fa.js → index-b982604a.js} +165 -88
- package/dist/esm/loader.js +3 -3
- package/dist/{cjs/wcs-action-bar_47.cjs.entry.js → esm/lodash-d6d9d079.js} +12610 -22791
- package/dist/esm/popper-e5fdfb6a.js +1729 -0
- package/dist/esm/select-arrow-73ac4016.js +34 -0
- package/dist/esm/wcs-action-bar.entry.js +20 -0
- package/dist/esm/wcs-app.entry.js +2 -2
- package/dist/esm/wcs-badge.entry.js +23 -0
- package/dist/esm/wcs-button.entry.js +82 -0
- package/dist/esm/wcs-card-body.entry.js +15 -0
- package/dist/esm/wcs-card.entry.js +16 -0
- package/dist/esm/wcs-checkbox.entry.js +43 -0
- package/dist/esm/wcs-com-nav-category.entry.js +59 -0
- package/dist/esm/wcs-com-nav-submenu.entry.js +65 -0
- package/dist/esm/wcs-com-nav.entry.js +15 -0
- package/dist/esm/wcs-divider.entry.js +15 -0
- package/dist/esm/wcs-dropdown-divider.entry.js +15 -0
- package/dist/esm/wcs-dropdown-header.entry.js +15 -0
- package/dist/esm/wcs-dropdown-item.entry.js +19 -0
- package/dist/esm/wcs-dropdown.entry.js +86 -0
- package/dist/esm/wcs-editable-field.entry.js +221 -0
- package/dist/esm/wcs-error_2.entry.js +132 -0
- package/dist/esm/wcs-field-content.entry.js +12 -0
- package/dist/esm/wcs-field-label.entry.js +12 -0
- package/dist/esm/wcs-field.entry.js +15 -0
- package/dist/esm/wcs-footer.entry.js +15 -0
- package/dist/esm/wcs-galactic-menu.entry.js +54 -0
- package/dist/esm/wcs-galactic.entry.js +37 -0
- package/dist/esm/wcs-grid-column.entry.js +73 -0
- package/dist/esm/wcs-grid-custom-cell.entry.js +12 -0
- package/dist/esm/wcs-grid-pagination.entry.js +4 -4
- package/dist/esm/wcs-grid.entry.js +328 -0
- package/dist/esm/wcs-header.entry.js +21 -0
- package/dist/esm/wcs-hint.entry.js +16 -0
- package/dist/esm/wcs-horizontal-stepper.entry.js +110 -0
- package/dist/esm/wcs-icon.entry.js +2 -2
- package/dist/esm/wcs-input.entry.js +224 -0
- package/dist/esm/wcs-label.entry.js +16 -0
- package/dist/esm/wcs-list-item-properties.entry.js +15 -0
- package/dist/esm/wcs-list-item-property.entry.js +15 -0
- package/dist/esm/wcs-list-item.entry.js +19 -0
- package/dist/esm/wcs-mat-icon.entry.js +69 -0
- package/dist/esm/wcs-modal.entry.js +41 -0
- package/dist/esm/wcs-nav-item.entry.js +19 -0
- package/dist/esm/wcs-nav.entry.js +15 -0
- package/dist/esm/wcs-progress-bar.entry.js +43 -0
- package/dist/esm/wcs-progress-radial.entry.js +26 -0
- package/dist/esm/wcs-radio-group.entry.js +61 -0
- package/dist/esm/wcs-radio.entry.js +45 -0
- package/dist/esm/wcs-select_2.entry.js +4911 -0
- package/dist/esm/wcs-spinner.entry.js +17 -0
- package/dist/esm/wcs-switch.entry.js +38 -0
- package/dist/esm/wcs-tab.entry.js +16 -0
- package/dist/esm/wcs-tabs.entry.js +155 -0
- package/dist/esm/wcs-textarea.entry.js +220 -0
- package/dist/esm/wcs-tooltip.entry.js +125 -0
- package/dist/esm/wcs.js +3 -3
- package/dist/types/components/button/button.d.ts +7 -3
- package/dist/types/components/checkbox/checkbox.d.ts +4 -0
- package/dist/types/components/com-nav-category/com-nav-category.d.ts +7 -0
- package/dist/types/components/com-nav-submenu/com-nav-submenu.d.ts +7 -0
- package/dist/types/components/dropdown/dropdown-interface.d.ts +1 -0
- package/dist/types/components/dropdown/dropdown.d.ts +13 -16
- package/dist/types/components/dropdown-divider/dropdown-divider.d.ts +3 -0
- package/dist/types/components/dropdown-header/dropdown-header.d.ts +3 -0
- package/dist/types/components/grid/grid.d.ts +18 -0
- package/dist/types/components/grid-column/grid-column.d.ts +5 -0
- package/dist/types/components/grid-custom-cell/grid-custom-cell.d.ts +12 -0
- package/dist/types/components/input/input.d.ts +8 -0
- package/dist/types/components/radio-group/radio-group-interface.d.ts +1 -0
- package/dist/types/components/radio-group/radio-group.d.ts +2 -2
- package/dist/types/components/select-option/select-option.d.ts +2 -0
- package/dist/types/components/switch/switch-interface.d.ts +1 -0
- package/dist/types/components/switch/switch.d.ts +10 -2
- package/dist/types/components.d.ts +148 -4
- package/dist/types/stencil-public-runtime.d.ts +183 -182
- package/dist/types/utils/helpers.d.ts +1 -0
- package/dist/wcs/p-03b2e238.entry.js +1 -0
- package/dist/wcs/p-15008e35.entry.js +1 -0
- package/dist/wcs/p-16dfbae8.js +127 -0
- package/dist/wcs/p-17c6db7f.entry.js +1 -0
- package/dist/wcs/p-1dce7e63.entry.js +1 -0
- package/dist/wcs/p-1f5aed36.entry.js +1 -0
- package/dist/wcs/p-214236db.entry.js +1 -0
- package/dist/wcs/p-26b5c0a3.entry.js +1 -0
- package/dist/wcs/p-2e6265dc.entry.js +1 -0
- package/dist/wcs/p-384068f7.entry.js +1 -0
- package/dist/wcs/p-41037455.entry.js +1 -0
- package/dist/wcs/p-474d6601.entry.js +1 -0
- package/dist/wcs/p-55fdc284.entry.js +1 -0
- package/dist/wcs/p-57247184.entry.js +1 -0
- package/dist/wcs/p-5b35b232.entry.js +1 -0
- package/dist/wcs/p-600a9cc0.entry.js +1 -0
- package/dist/wcs/p-60b51967.entry.js +1 -0
- package/dist/wcs/p-64523291.entry.js +1 -0
- package/dist/wcs/p-65c5ccc5.entry.js +1 -0
- package/dist/wcs/p-688fea65.entry.js +1 -0
- package/dist/wcs/p-716d5921.entry.js +1 -0
- package/dist/wcs/p-7206e492.entry.js +1 -0
- package/dist/wcs/p-7219c04b.js +1 -0
- package/dist/wcs/p-8137f075.entry.js +1 -0
- package/dist/wcs/p-8864a491.entry.js +1 -0
- package/dist/wcs/p-8c8740e3.entry.js +1 -0
- package/dist/wcs/p-91a2de07.entry.js +1 -0
- package/dist/wcs/p-94a31f64.entry.js +1 -0
- package/dist/wcs/p-979dfd78.entry.js +1 -0
- package/dist/wcs/p-9ba52bc4.entry.js +1 -0
- package/dist/wcs/p-a1ee1551.entry.js +1 -0
- package/dist/wcs/p-a92d369e.entry.js +1 -0
- package/dist/wcs/p-a978c1e3.entry.js +1 -0
- package/dist/wcs/p-adef7aaf.js +1 -0
- package/dist/wcs/p-b5138986.js +1 -0
- package/dist/wcs/p-b7184d59.entry.js +1 -0
- package/dist/wcs/p-bbf1ef42.entry.js +1 -0
- package/dist/wcs/p-c7d6d3e1.entry.js +15 -0
- package/dist/wcs/p-cf4d7a83.js +1 -0
- package/dist/wcs/p-d7dec082.entry.js +1 -0
- package/dist/wcs/p-db68379f.entry.js +1 -0
- package/dist/wcs/p-dbbc3f58.entry.js +1 -0
- package/dist/wcs/p-dc817204.entry.js +1 -0
- package/dist/wcs/p-e0163de8.entry.js +1 -0
- package/dist/wcs/p-e4236d32.entry.js +1 -0
- package/dist/wcs/p-e43358e4.entry.js +1 -0
- package/dist/wcs/p-e65d1c27.entry.js +1 -0
- package/dist/wcs/p-e9ce507c.entry.js +1 -0
- package/dist/wcs/p-ea3e93e9.entry.js +1 -0
- package/dist/wcs/p-ed6e8541.entry.js +1 -0
- package/dist/wcs/p-f46e6c3c.js +1 -0
- package/dist/wcs/p-f9944bde.entry.js +1 -0
- package/dist/wcs/p-fa173947.entry.js +1 -0
- package/dist/wcs/p-fb1577b5.entry.js +1 -0
- package/dist/wcs/p-fbaf299d.entry.js +1 -0
- package/dist/wcs/p-febe9ccc.entry.js +1 -0
- package/dist/wcs/p-ff6d0dfd.entry.js +1 -0
- package/dist/wcs/wcs.esm.js +1 -1
- package/loader/index.d.ts +0 -1
- package/package.json +22 -21
- package/dist/wcs/p-16dca526.entry.js +0 -1
- package/dist/wcs/p-4f228fcb.entry.js +0 -134
- package/dist/wcs/p-66520e5a.entry.js +0 -1
- package/dist/wcs/p-d31287c6.entry.js +0 -1
- package/dist/wcs/p-f73f235b.js +0 -1
- package/schematics/.gitignore +0 -18
- package/schematics/.npmignore +0 -4
- package/schematics/collection.json +0 -9
- package/schematics/src/ng-add/files/fonts/avenir-black.woff +0 -0
- package/schematics/src/ng-add/files/fonts/avenir-book.woff +0 -0
- package/schematics/src/ng-add/files/fonts/avenir-lighter.woff +0 -0
- package/schematics/src/ng-add/files/fonts/avenir-medium.woff +0 -0
- package/schematics/src/ng-add/files/sncf-logo.png +0 -0
- package/schematics/src/ng-add/index.d.ts +0 -3
- package/schematics/src/ng-add/index.js +0 -119
- package/schematics/src/ng-add/index.js.map +0 -1
- package/schematics/src/ng-add/schema.json +0 -5
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function isElement(element) {
|
|
4
|
+
return 'clientWidth' in element
|
|
5
|
+
&& 'clientHeight' in element;
|
|
6
|
+
}
|
|
7
|
+
function hasShadowDom(el) {
|
|
8
|
+
return !!el.shadowRoot && !!el.attachShadow;
|
|
9
|
+
}
|
|
10
|
+
const debounceEvent = (event, wait) => {
|
|
11
|
+
const original = event._original || event;
|
|
12
|
+
return {
|
|
13
|
+
_original: event,
|
|
14
|
+
emit: debounce(original.emit.bind(original), wait)
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
const debounce = (func, wait = 0) => {
|
|
18
|
+
let timer;
|
|
19
|
+
return (...args) => {
|
|
20
|
+
clearTimeout(timer);
|
|
21
|
+
timer = setTimeout(func, wait, ...args);
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Elements inside of web components sometimes need to inherit global attributes
|
|
26
|
+
* set on the host. For example, the inner input in `wcs-input` should inherit
|
|
27
|
+
* the `title` attribute that developers set directly on `ion-input`. This
|
|
28
|
+
* helper function should be called in componentWillLoad and assigned to a variable
|
|
29
|
+
* that is later used in the render function.
|
|
30
|
+
*
|
|
31
|
+
* This does not need to be reactive as changing attributes on the host element
|
|
32
|
+
* does not trigger a re-render.
|
|
33
|
+
*/
|
|
34
|
+
const inheritAttributes = (el, attributes = []) => {
|
|
35
|
+
const attributeObject = {};
|
|
36
|
+
attributes.forEach(attr => {
|
|
37
|
+
if (el.hasAttribute(attr)) {
|
|
38
|
+
const value = el.getAttribute(attr);
|
|
39
|
+
if (value !== null) {
|
|
40
|
+
attributeObject[attr] = el.getAttribute(attr);
|
|
41
|
+
}
|
|
42
|
+
el.removeAttribute(attr);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return attributeObject;
|
|
46
|
+
};
|
|
47
|
+
const findItemLabel = (componentEl) => {
|
|
48
|
+
const itemEl = componentEl.closest('wcs-form-field');
|
|
49
|
+
if (itemEl) {
|
|
50
|
+
return itemEl.querySelector('wcs-label');
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Patched version of requestAnimationFrame that avoids ngzone
|
|
56
|
+
* Use only when you know ngzone should not run
|
|
57
|
+
*/
|
|
58
|
+
const raf = (h) => {
|
|
59
|
+
if (typeof __zone_symbol__requestAnimationFrame === 'function') {
|
|
60
|
+
return __zone_symbol__requestAnimationFrame(h);
|
|
61
|
+
}
|
|
62
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
63
|
+
return requestAnimationFrame(h);
|
|
64
|
+
}
|
|
65
|
+
return setTimeout(h);
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Return true if the mouseEvent click is inside the given HTML element
|
|
69
|
+
*/
|
|
70
|
+
const clickInsideElement = (event, element) => {
|
|
71
|
+
return event.x >= element.getBoundingClientRect().x && event.x <= element.getBoundingClientRect().x + element.getBoundingClientRect().width
|
|
72
|
+
&& event.y >= element.getBoundingClientRect().y && event.y <= element.getBoundingClientRect().y + element.getBoundingClientRect().height;
|
|
73
|
+
};
|
|
74
|
+
const clickTargetIsElementOrChildren = (mouseEvent, element) => {
|
|
75
|
+
return mouseEvent.target instanceof Node
|
|
76
|
+
&& element.contains(mouseEvent.target);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
exports.clickInsideElement = clickInsideElement;
|
|
80
|
+
exports.clickTargetIsElementOrChildren = clickTargetIsElementOrChildren;
|
|
81
|
+
exports.debounceEvent = debounceEvent;
|
|
82
|
+
exports.findItemLabel = findItemLabel;
|
|
83
|
+
exports.hasShadowDom = hasShadowDom;
|
|
84
|
+
exports.inheritAttributes = inheritAttributes;
|
|
85
|
+
exports.isElement = isElement;
|
|
86
|
+
exports.raf = raf;
|
|
@@ -35,8 +35,8 @@ const doc = win.document || { head: {} };
|
|
|
35
35
|
const plt = {
|
|
36
36
|
$flags$: 0,
|
|
37
37
|
$resourcesUrl$: '',
|
|
38
|
-
jmp: h => h(),
|
|
39
|
-
raf: h => requestAnimationFrame(h),
|
|
38
|
+
jmp: (h) => h(),
|
|
39
|
+
raf: (h) => requestAnimationFrame(h),
|
|
40
40
|
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
41
41
|
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
42
42
|
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
@@ -45,7 +45,7 @@ const promiseResolve = (v) => Promise.resolve(v);
|
|
|
45
45
|
const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
46
46
|
try {
|
|
47
47
|
new CSSStyleSheet();
|
|
48
|
-
return typeof
|
|
48
|
+
return typeof new CSSStyleSheet().replace === 'function';
|
|
49
49
|
}
|
|
50
50
|
catch (e) { }
|
|
51
51
|
return false;
|
|
@@ -243,7 +243,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
243
243
|
typeof classData !== 'object'
|
|
244
244
|
? classData
|
|
245
245
|
: Object.keys(classData)
|
|
246
|
-
.filter(k => classData[k])
|
|
246
|
+
.filter((k) => classData[k])
|
|
247
247
|
.join(' ');
|
|
248
248
|
}
|
|
249
249
|
}
|
|
@@ -332,8 +332,8 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
332
332
|
const classList = elm.classList;
|
|
333
333
|
const oldClasses = parseClassList(oldValue);
|
|
334
334
|
const newClasses = parseClassList(newValue);
|
|
335
|
-
classList.remove(...oldClasses.filter(c => c && !newClasses.includes(c)));
|
|
336
|
-
classList.add(...newClasses.filter(c => c && !oldClasses.includes(c)));
|
|
335
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
336
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
337
337
|
}
|
|
338
338
|
else if (memberName === 'style') {
|
|
339
339
|
// update style attribute, css properties and values
|
|
@@ -368,7 +368,9 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
368
368
|
newValue(elm);
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
else if ((!isProp ) &&
|
|
371
|
+
else if ((!isProp ) &&
|
|
372
|
+
memberName[0] === 'o' &&
|
|
373
|
+
memberName[1] === 'n') {
|
|
372
374
|
// Event Handlers
|
|
373
375
|
// so if the member name starts with "on" and the 3rd characters is
|
|
374
376
|
// a capital letter, and it's not already a member on the element,
|
|
@@ -415,7 +417,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
415
417
|
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
416
418
|
if (memberName === 'list') {
|
|
417
419
|
isProp = false;
|
|
418
|
-
// tslint:disable-next-line: triple-equals
|
|
419
420
|
}
|
|
420
421
|
else if (oldValue == null || elm[memberName] != n) {
|
|
421
422
|
elm[memberName] = n;
|
|
@@ -469,7 +470,9 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
469
470
|
// if the element passed in is a shadow root, which is a document fragment
|
|
470
471
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
471
472
|
// if it's not a shadow root, then we add attrs/props to the same element
|
|
472
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
473
|
+
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
474
|
+
? newVnode.$elm$.host
|
|
475
|
+
: newVnode.$elm$;
|
|
473
476
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
474
477
|
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
475
478
|
{
|
|
@@ -513,14 +516,17 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
513
516
|
}
|
|
514
517
|
else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
515
518
|
// create a slot reference node
|
|
516
|
-
elm = newVNode.$elm$ =
|
|
519
|
+
elm = newVNode.$elm$ =
|
|
520
|
+
doc.createTextNode('');
|
|
517
521
|
}
|
|
518
522
|
else {
|
|
519
523
|
if (!isSvgMode) {
|
|
520
524
|
isSvgMode = newVNode.$tag$ === 'svg';
|
|
521
525
|
}
|
|
522
526
|
// create element
|
|
523
|
-
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */
|
|
527
|
+
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */
|
|
528
|
+
? 'slot-fb'
|
|
529
|
+
: newVNode.$tag$)
|
|
524
530
|
);
|
|
525
531
|
if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
|
|
526
532
|
isSvgMode = false;
|
|
@@ -887,7 +893,7 @@ const relocateSlotContent = (elm) => {
|
|
|
887
893
|
// that is suppose to always represent the original content location
|
|
888
894
|
if (isNodeLocatedInSlot(node, slotNameAttr)) {
|
|
889
895
|
// it's possible we've already decided to relocate this node
|
|
890
|
-
relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);
|
|
896
|
+
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
891
897
|
// made some changes to slots
|
|
892
898
|
// let's make sure we also double check
|
|
893
899
|
// fallbacks are correctly hidden or shown
|
|
@@ -906,9 +912,9 @@ const relocateSlotContent = (elm) => {
|
|
|
906
912
|
});
|
|
907
913
|
}
|
|
908
914
|
if (node['s-sr']) {
|
|
909
|
-
relocateNodes.map(relocateNode => {
|
|
915
|
+
relocateNodes.map((relocateNode) => {
|
|
910
916
|
if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
|
|
911
|
-
relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);
|
|
917
|
+
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
912
918
|
if (relocateNodeData && !relocateNode.$slotRefNode$) {
|
|
913
919
|
relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
|
|
914
920
|
}
|
|
@@ -916,7 +922,7 @@ const relocateSlotContent = (elm) => {
|
|
|
916
922
|
});
|
|
917
923
|
}
|
|
918
924
|
}
|
|
919
|
-
else if (!relocateNodes.some(r => r.$nodeToRelocate$ === node)) {
|
|
925
|
+
else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
|
|
920
926
|
// so far this element does not have a slot home, not setting slotRefNode on purpose
|
|
921
927
|
// if we never find a home for this element then we'll need to hide it
|
|
922
928
|
relocateNodes.push({
|
|
@@ -996,7 +1002,8 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
996
1002
|
if (!nodeToRelocate['s-ol']) {
|
|
997
1003
|
// add a reference node marking this node's original location
|
|
998
1004
|
// keep a reference to this node for later lookups
|
|
999
|
-
orgLocationNode =
|
|
1005
|
+
orgLocationNode =
|
|
1006
|
+
doc.createTextNode('');
|
|
1000
1007
|
orgLocationNode['s-nr'] = nodeToRelocate;
|
|
1001
1008
|
nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
|
|
1002
1009
|
}
|
|
@@ -1020,7 +1027,8 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1020
1027
|
}
|
|
1021
1028
|
}
|
|
1022
1029
|
}
|
|
1023
|
-
if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
|
|
1030
|
+
if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
|
|
1031
|
+
nodeToRelocate.nextSibling !== insertBeforeNode) {
|
|
1024
1032
|
// we've checked that it's worth while to relocate
|
|
1025
1033
|
// since that the node to relocate
|
|
1026
1034
|
// has a different next sibling or parent relocated
|
|
@@ -1066,6 +1074,13 @@ const createEvent = (ref, name, flags) => {
|
|
|
1066
1074
|
},
|
|
1067
1075
|
};
|
|
1068
1076
|
};
|
|
1077
|
+
/**
|
|
1078
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
1079
|
+
* @param elm the target of the Event
|
|
1080
|
+
* @param name the name to give the custom Event
|
|
1081
|
+
* @param opts options for configuring a custom Event
|
|
1082
|
+
* @returns the custom Event
|
|
1083
|
+
*/
|
|
1069
1084
|
const emitEvent = (elm, name, opts) => {
|
|
1070
1085
|
const ev = plt.ce(name, opts);
|
|
1071
1086
|
elm.dispatchEvent(ev);
|
|
@@ -1073,7 +1088,7 @@ const emitEvent = (elm, name, opts) => {
|
|
|
1073
1088
|
};
|
|
1074
1089
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1075
1090
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
1076
|
-
ancestorComponent['s-p'].push(new Promise(r => (hostRef.$onRenderResolve$ = r)));
|
|
1091
|
+
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
1077
1092
|
}
|
|
1078
1093
|
};
|
|
1079
1094
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1132,7 +1147,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1132
1147
|
// ok, so turns out there are some child host elements
|
|
1133
1148
|
// waiting on this parent element to load
|
|
1134
1149
|
// let's fire off all update callbacks waiting
|
|
1135
|
-
rc.map(cb => cb());
|
|
1150
|
+
rc.map((cb) => cb());
|
|
1136
1151
|
elm['s-rc'] = undefined;
|
|
1137
1152
|
}
|
|
1138
1153
|
endRender();
|
|
@@ -1223,6 +1238,18 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1223
1238
|
// ( •_•)>⌐■-■
|
|
1224
1239
|
// (⌐■_■)
|
|
1225
1240
|
};
|
|
1241
|
+
const forceUpdate = (ref) => {
|
|
1242
|
+
{
|
|
1243
|
+
const hostRef = getHostRef(ref);
|
|
1244
|
+
const isConnected = hostRef.$hostElement$.isConnected;
|
|
1245
|
+
if (isConnected &&
|
|
1246
|
+
(hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1247
|
+
scheduleUpdate(hostRef, false);
|
|
1248
|
+
}
|
|
1249
|
+
// Returns "true" when the forced update was successfully scheduled
|
|
1250
|
+
return isConnected;
|
|
1251
|
+
}
|
|
1252
|
+
};
|
|
1226
1253
|
const appDidLoad = (who) => {
|
|
1227
1254
|
// on appload
|
|
1228
1255
|
// we have finish the first big initial render
|
|
@@ -1245,7 +1272,8 @@ const safeCall = (instance, method, arg) => {
|
|
|
1245
1272
|
const then = (promise, thenFn) => {
|
|
1246
1273
|
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
|
1247
1274
|
};
|
|
1248
|
-
const addHydratedFlag = (elm) =>
|
|
1275
|
+
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1276
|
+
;
|
|
1249
1277
|
const parsePropertyValue = (propValue, propType) => {
|
|
1250
1278
|
// ensure this value is of the correct prop type
|
|
1251
1279
|
if (propValue != null && !isComplexType(propValue)) {
|
|
@@ -1289,7 +1317,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1289
1317
|
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1290
1318
|
if (watchMethods) {
|
|
1291
1319
|
// this instance is watching for when this property changed
|
|
1292
|
-
watchMethods.map(watchMethodName => {
|
|
1320
|
+
watchMethods.map((watchMethodName) => {
|
|
1293
1321
|
try {
|
|
1294
1322
|
// fire off each of the watch methods that are watching this property
|
|
1295
1323
|
instance[watchMethodName](newVal, oldVal, propName);
|
|
@@ -1319,7 +1347,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1319
1347
|
const members = Object.entries(cmpMeta.$members$);
|
|
1320
1348
|
const prototype = Cstr.prototype;
|
|
1321
1349
|
members.map(([memberName, [memberFlags]]) => {
|
|
1322
|
-
if ((memberFlags & 31 /* Prop */ ||
|
|
1350
|
+
if ((memberFlags & 31 /* Prop */ ||
|
|
1351
|
+
((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
|
|
1323
1352
|
// proxyComponent - prop
|
|
1324
1353
|
Object.defineProperty(prototype, memberName, {
|
|
1325
1354
|
get() {
|
|
@@ -1334,7 +1363,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1334
1363
|
enumerable: true,
|
|
1335
1364
|
});
|
|
1336
1365
|
}
|
|
1337
|
-
else if (flags & 1 /* isElementConstructor */ &&
|
|
1366
|
+
else if (flags & 1 /* isElementConstructor */ &&
|
|
1367
|
+
memberFlags & 64 /* Method */) {
|
|
1338
1368
|
// proxyComponent - method
|
|
1339
1369
|
Object.defineProperty(prototype, memberName, {
|
|
1340
1370
|
value(...args) {
|
|
@@ -1349,6 +1379,51 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1349
1379
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
1350
1380
|
plt.jmp(() => {
|
|
1351
1381
|
const propName = attrNameToPropName.get(attrName);
|
|
1382
|
+
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
1383
|
+
// in the case where an attribute was set inline.
|
|
1384
|
+
// ```html
|
|
1385
|
+
// <my-component some-attribute="some-value"></my-component>
|
|
1386
|
+
// ```
|
|
1387
|
+
//
|
|
1388
|
+
// There is an edge case where a developer sets the attribute inline on a custom element and then
|
|
1389
|
+
// programmatically changes it before it has been upgraded as shown below:
|
|
1390
|
+
//
|
|
1391
|
+
// ```html
|
|
1392
|
+
// <!-- this component has _not_ been upgraded yet -->
|
|
1393
|
+
// <my-component id="test" some-attribute="some-value"></my-component>
|
|
1394
|
+
// <script>
|
|
1395
|
+
// // grab non-upgraded component
|
|
1396
|
+
// el = document.querySelector("#test");
|
|
1397
|
+
// el.someAttribute = "another-value";
|
|
1398
|
+
// // upgrade component
|
|
1399
|
+
// customElements.define('my-component', MyComponent);
|
|
1400
|
+
// </script>
|
|
1401
|
+
// ```
|
|
1402
|
+
// In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
|
|
1403
|
+
// will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
|
|
1404
|
+
// to the value that was set inline i.e. "some-value" from above example. When
|
|
1405
|
+
// the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
|
|
1406
|
+
//
|
|
1407
|
+
// The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
|
|
1408
|
+
// by connectedCallback as this attributeChangedCallback will not fire.
|
|
1409
|
+
//
|
|
1410
|
+
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
1411
|
+
//
|
|
1412
|
+
// TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
|
|
1413
|
+
// properties here given that this goes against best practices outlined here
|
|
1414
|
+
// https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
|
|
1415
|
+
if (this.hasOwnProperty(propName)) {
|
|
1416
|
+
newValue = this[propName];
|
|
1417
|
+
delete this[propName];
|
|
1418
|
+
}
|
|
1419
|
+
else if (prototype.hasOwnProperty(propName) &&
|
|
1420
|
+
typeof this[propName] === 'number' &&
|
|
1421
|
+
this[propName] == newValue) {
|
|
1422
|
+
// if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
|
|
1423
|
+
// APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
|
|
1424
|
+
// `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
|
|
1425
|
+
return;
|
|
1426
|
+
}
|
|
1352
1427
|
this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
|
|
1353
1428
|
});
|
|
1354
1429
|
};
|
|
@@ -1385,7 +1460,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1385
1460
|
endLoad();
|
|
1386
1461
|
}
|
|
1387
1462
|
if (!Cstr.isProxied) {
|
|
1388
|
-
// we'
|
|
1463
|
+
// we've never proxied this Constructor before
|
|
1389
1464
|
// let's add the getters/setters to its prototype before
|
|
1390
1465
|
// the first time we create an instance of the implementation
|
|
1391
1466
|
{
|
|
@@ -1435,7 +1510,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1435
1510
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1436
1511
|
const schedule = () => scheduleUpdate(hostRef, true);
|
|
1437
1512
|
if (ancestorComponent && ancestorComponent['s-rc']) {
|
|
1438
|
-
// this is the
|
|
1513
|
+
// this is the initial load and this component it has an ancestor component
|
|
1439
1514
|
// but the ancestor component has NOT fired its will update lifecycle yet
|
|
1440
1515
|
// so let's just cool our jets and wait for the ancestor to continue first
|
|
1441
1516
|
// this will get fired off when the ancestor component
|
|
@@ -1527,7 +1602,7 @@ const disconnectedCallback = (elm) => {
|
|
|
1527
1602
|
const instance = hostRef.$lazyInstance$ ;
|
|
1528
1603
|
{
|
|
1529
1604
|
if (hostRef.$rmListeners$) {
|
|
1530
|
-
hostRef.$rmListeners$.map(rmListener => rmListener());
|
|
1605
|
+
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1531
1606
|
hostRef.$rmListeners$ = undefined;
|
|
1532
1607
|
}
|
|
1533
1608
|
}
|
|
@@ -1549,71 +1624,73 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1549
1624
|
let isBootstrapping = true;
|
|
1550
1625
|
Object.assign(plt, options);
|
|
1551
1626
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
1552
|
-
lazyBundles.map(lazyBundle =>
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1627
|
+
lazyBundles.map((lazyBundle) => {
|
|
1628
|
+
lazyBundle[1].map((compactMeta) => {
|
|
1629
|
+
const cmpMeta = {
|
|
1630
|
+
$flags$: compactMeta[0],
|
|
1631
|
+
$tagName$: compactMeta[1],
|
|
1632
|
+
$members$: compactMeta[2],
|
|
1633
|
+
$listeners$: compactMeta[3],
|
|
1634
|
+
};
|
|
1635
|
+
{
|
|
1636
|
+
cmpMeta.$members$ = compactMeta[2];
|
|
1637
|
+
}
|
|
1638
|
+
{
|
|
1639
|
+
cmpMeta.$listeners$ = compactMeta[3];
|
|
1640
|
+
}
|
|
1641
|
+
{
|
|
1642
|
+
cmpMeta.$attrsToReflect$ = [];
|
|
1643
|
+
}
|
|
1644
|
+
{
|
|
1645
|
+
cmpMeta.$watchers$ = {};
|
|
1646
|
+
}
|
|
1647
|
+
const tagName = cmpMeta.$tagName$;
|
|
1648
|
+
const HostElement = class extends HTMLElement {
|
|
1649
|
+
// StencilLazyHost
|
|
1650
|
+
constructor(self) {
|
|
1651
|
+
// @ts-ignore
|
|
1652
|
+
super(self);
|
|
1653
|
+
self = this;
|
|
1654
|
+
registerHost(self, cmpMeta);
|
|
1655
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1656
|
+
// this component is using shadow dom
|
|
1657
|
+
// and this browser supports shadow dom
|
|
1658
|
+
// add the read-only property "shadowRoot" to the host element
|
|
1659
|
+
// adding the shadow root build conditionals to minimize runtime
|
|
1585
1660
|
{
|
|
1586
|
-
|
|
1661
|
+
{
|
|
1662
|
+
self.attachShadow({ mode: 'open' });
|
|
1663
|
+
}
|
|
1587
1664
|
}
|
|
1588
1665
|
}
|
|
1589
1666
|
}
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1667
|
+
connectedCallback() {
|
|
1668
|
+
if (appLoadFallback) {
|
|
1669
|
+
clearTimeout(appLoadFallback);
|
|
1670
|
+
appLoadFallback = null;
|
|
1671
|
+
}
|
|
1672
|
+
if (isBootstrapping) {
|
|
1673
|
+
// connectedCallback will be processed once all components have been registered
|
|
1674
|
+
deferredConnectedCallbacks.push(this);
|
|
1675
|
+
}
|
|
1676
|
+
else {
|
|
1677
|
+
plt.jmp(() => connectedCallback(this));
|
|
1678
|
+
}
|
|
1595
1679
|
}
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
deferredConnectedCallbacks.push(this);
|
|
1680
|
+
disconnectedCallback() {
|
|
1681
|
+
plt.jmp(() => disconnectedCallback(this));
|
|
1599
1682
|
}
|
|
1600
|
-
|
|
1601
|
-
|
|
1683
|
+
componentOnReady() {
|
|
1684
|
+
return getHostRef(this).$onReadyPromise$;
|
|
1602
1685
|
}
|
|
1686
|
+
};
|
|
1687
|
+
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1688
|
+
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1689
|
+
cmpTags.push(tagName);
|
|
1690
|
+
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
1603
1691
|
}
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
}
|
|
1607
|
-
componentOnReady() {
|
|
1608
|
-
return getHostRef(this).$onReadyPromise$;
|
|
1609
|
-
}
|
|
1610
|
-
};
|
|
1611
|
-
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1612
|
-
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1613
|
-
cmpTags.push(tagName);
|
|
1614
|
-
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
1615
|
-
}
|
|
1616
|
-
}));
|
|
1692
|
+
});
|
|
1693
|
+
});
|
|
1617
1694
|
{
|
|
1618
1695
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1619
1696
|
visibilityStyle.setAttribute('data-styles', '');
|
|
@@ -1622,7 +1699,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1622
1699
|
// Process deferred connectedCallbacks now all components have been registered
|
|
1623
1700
|
isBootstrapping = false;
|
|
1624
1701
|
if (deferredConnectedCallbacks.length) {
|
|
1625
|
-
deferredConnectedCallbacks.map(host => host.connectedCallback());
|
|
1702
|
+
deferredConnectedCallbacks.map((host) => host.connectedCallback());
|
|
1626
1703
|
}
|
|
1627
1704
|
else {
|
|
1628
1705
|
{
|
|
@@ -1643,10 +1720,10 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
1643
1720
|
$instanceValues$: new Map(),
|
|
1644
1721
|
};
|
|
1645
1722
|
{
|
|
1646
|
-
hostRef.$onInstancePromise$ = new Promise(r => (hostRef.$onInstanceResolve$ = r));
|
|
1723
|
+
hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
|
|
1647
1724
|
}
|
|
1648
1725
|
{
|
|
1649
|
-
hostRef.$onReadyPromise$ = new Promise(r => (hostRef.$onReadyResolve$ = r));
|
|
1726
|
+
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
|
1650
1727
|
elm['s-p'] = [];
|
|
1651
1728
|
elm['s-rc'] = [];
|
|
1652
1729
|
}
|
|
@@ -1668,7 +1745,7 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1668
1745
|
/* webpackInclude: /\.entry\.js$/ */
|
|
1669
1746
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
1670
1747
|
/* webpackMode: "lazy" */
|
|
1671
|
-
`./${bundleId}.entry.js${''}`)); }).then(importedModule => {
|
|
1748
|
+
`./${bundleId}.entry.js${''}`)); }).then((importedModule) => {
|
|
1672
1749
|
{
|
|
1673
1750
|
cmpModules.set(bundleId, importedModule);
|
|
1674
1751
|
}
|
|
@@ -1723,6 +1800,7 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
|
1723
1800
|
exports.Host = Host;
|
|
1724
1801
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1725
1802
|
exports.createEvent = createEvent;
|
|
1803
|
+
exports.forceUpdate = forceUpdate;
|
|
1726
1804
|
exports.getElement = getElement;
|
|
1727
1805
|
exports.h = h;
|
|
1728
1806
|
exports.promiseResolve = promiseResolve;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-3cb9d725.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.
|
|
8
|
+
Stencil Client Patch Esm v2.10.0 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["wcs-
|
|
17
|
+
return index.bootstrapLazy([["wcs-editable-field.cjs",[[1,"wcs-editable-field",{"type":[1],"label":[1],"readonly":[4],"value":[1032],"validateFn":[16],"formatFn":[16],"errorMsg":[1,"error-msg"],"currentState":[32],"isError":[32]},[[8,"click","onWindowClickEvent"]]]]],["wcs-grid.cjs",[[1,"wcs-grid",{"serverMode":[4,"server-mode"],"data":[16],"loading":[4],"selectionConfig":[1,"selection-config"],"selectedItems":[8,"selected-items"],"wcsGridPaginationId":[1,"wcs-grid-pagination-id"],"rowIdPath":[1,"row-id-path"],"columns":[32],"paginationEl":[32],"rows":[32]},[[0,"wcsHiddenChange","onHiddenColumnChange"],[0,"wcsSortChange","sortChangeEventHandler"],[0,"wcsGridPaginationChange","paginationChangeEventHandler"],[8,"wcsGridPaginationChange","paginationChangeEventHandlerOutside"]]]]],["wcs-grid-pagination.cjs",[[1,"wcs-grid-pagination",{"availablePageSizes":[16],"currentPage":[2,"current-page"],"pageSize":[2,"page-size"],"itemsCount":[2,"items-count"],"pageCount":[2,"page-count"]}]]],["wcs-horizontal-stepper.cjs",[[1,"wcs-horizontal-stepper",{"currentStep":[1026,"current-step"],"steps":[16],"mode":[1],"checkOnComplete":[4,"check-on-complete"],"buttonMode":[32],"internalCurrentStep":[32],"previous":[64],"next":[64]}]]],["wcs-dropdown.cjs",[[1,"wcs-dropdown",{"noArrow":[4,"no-arrow"],"mode":[1],"shape":[1],"disabled":[4],"placement":[1],"expanded":[32]},[[8,"click","onWindowClickEvent"],[0,"wcsDropdownItemClick","dropdownItemClick"]]]]],["wcs-galactic-menu.cjs",[[1,"wcs-galactic-menu",{"text":[1],"showPopoverMenu":[32]},[[8,"click","onWindowClickEvent"]]]]],["wcs-input.cjs",[[1,"wcs-input",{"fireFocusEvents":[4,"fire-focus-events"],"accept":[1],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"prefixLabel":[1,"prefix-label"],"suffixLabel":[1,"suffix-label"],"disabled":[4],"enterkeyhint":[1],"icon":[1],"inputmode":[1],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"state":[513],"step":[1],"size":[2],"type":[1],"value":[1032],"hasFocus":[32],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["wcs-modal.cjs",[[4,"wcs-modal",{"backdrop":[516],"show":[1540],"showCloseButton":[516,"show-close-button"]},[[4,"keydown","onKeyDown"]]]]],["wcs-textarea.cjs",[[1,"wcs-textarea",{"fireFocusEvents":[4,"fire-focus-events"],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[1028,"clear-on-edit"],"debounce":[2],"disabled":[4],"icon":[1],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"state":[513],"cols":[2],"rows":[2],"wrap":[1],"autoGrow":[4,"auto-grow"],"value":[1025],"hasFocus":[32],"fitContent":[64],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["wcs-action-bar.cjs",[[1,"wcs-action-bar",{"gutter":[4],"hasTabs":[32]}]]],["wcs-app.cjs",[[1,"wcs-app"]]],["wcs-badge.cjs",[[1,"wcs-badge",{"shape":[1],"color":[1]}]]],["wcs-card.cjs",[[1,"wcs-card",{"mode":[1537]}]]],["wcs-card-body.cjs",[[1,"wcs-card-body"]]],["wcs-com-nav.cjs",[[1,"wcs-com-nav",{"appName":[1,"app-name"]}]]],["wcs-com-nav-category.cjs",[[1,"wcs-com-nav-category",{"label":[1],"categoryOpen":[32],"close":[64],"open":[64]},[[8,"click","onWindowClickEvent"],[8,"wcsCategoryOpened","onSubmenuOpened"]]]]],["wcs-com-nav-submenu.cjs",[[1,"wcs-com-nav-submenu",{"label":[1],"panelTitle":[1,"panel-title"],"panelDescription":[1,"panel-description"],"menuOpen":[32],"close":[64],"open":[64]},[[8,"click","onWindowClickEvent"],[8,"wcsSubmenuOpened","onSubmenuOpened"],[0,"wcsCategoryItemClicked","wcsCategoryItemClickedHandler"]]]]],["wcs-divider.cjs",[[1,"wcs-divider"]]],["wcs-dropdown-divider.cjs",[[1,"wcs-dropdown-divider"]]],["wcs-dropdown-header.cjs",[[1,"wcs-dropdown-header"]]],["wcs-dropdown-item.cjs",[[4,"wcs-dropdown-item",null,[[1,"mousedown","onMouseDown"]]]]],["wcs-field.cjs",[[1,"wcs-field"]]],["wcs-field-content.cjs",[[1,"wcs-field-content"]]],["wcs-field-label.cjs",[[1,"wcs-field-label"]]],["wcs-footer.cjs",[[1,"wcs-footer"]]],["wcs-galactic.cjs",[[1,"wcs-galactic",{"text":[1],"show":[32]}]]],["wcs-grid-column.cjs",[[1,"wcs-grid-column",{"path":[1],"name":[1],"sort":[4],"sortFn":[16],"formatter":[16],"sortOrder":[1025,"sort-order"],"width":[1],"customCells":[4,"custom-cells"],"hidden":[4]}]]],["wcs-grid-custom-cell.cjs",[[1,"wcs-grid-custom-cell",{"columnId":[1,"column-id"],"rowId":[8,"row-id"]}]]],["wcs-header.cjs",[[1,"wcs-header"]]],["wcs-hint.cjs",[[1,"wcs-hint",{"small":[1540]}]]],["wcs-icon.cjs",[[0,"wcs-icon",{"icon":[1],"size":[1]}]]],["wcs-label.cjs",[[1,"wcs-label",{"required":[516]}]]],["wcs-list-item.cjs",[[1,"wcs-list-item",{"activated":[1028]}]]],["wcs-list-item-properties.cjs",[[1,"wcs-list-item-properties"]]],["wcs-list-item-property.cjs",[[1,"wcs-list-item-property"]]],["wcs-nav.cjs",[[1,"wcs-nav"]]],["wcs-nav-item.cjs",[[4,"wcs-nav-item",{"text":[513],"href":[1537]}]]],["wcs-progress-radial.cjs",[[1,"wcs-progress-radial",{"size":[2],"showLabel":[4,"show-label"],"value":[2]}]]],["wcs-radio-group.cjs",[[1,"wcs-radio-group",{"value":[8],"name":[520],"mode":[513]},[[0,"wcsRadioClick","selectedOptionChanged"]]]]],["wcs-switch.cjs",[[1,"wcs-switch",{"name":[1],"checked":[516],"labelAlignment":[513,"label-alignment"],"disabled":[4]}]]],["wcs-tab.cjs",[[1,"wcs-tab",{"header":[1537],"itemKey":[8,"item-key"]}]]],["wcs-tabs.cjs",[[1,"wcs-tabs",{"align":[1537],"selectedIndex":[2,"selected-index"],"selectedKey":[8,"selected-key"],"headersOnly":[4,"headers-only"],"gutter":[4],"headers":[32],"currentActiveTabIndex":[32]},[[0,"tabLoaded","onTabLoaded"]]]]],["wcs-tooltip.cjs",[[1,"wcs-tooltip",{"for":[513],"position":[513]}]]],["wcs-progress-bar.cjs",[[1,"wcs-progress-bar",{"small":[1028],"showLabel":[1028,"show-label"],"value":[1026]}]]],["wcs-radio.cjs",[[1,"wcs-radio",{"mode":[513],"value":[1544],"label":[1537],"checked":[1540],"disabled":[1028]}]]],["wcs-select_2.cjs",[[4,"wcs-select-option",{"disabled":[1540],"selected":[1540],"value":[8],"chipColor":[1,"chip-color"],"chipBackgroundColor":[1,"chip-background-color"],"multiple":[1540]},[[1,"mousedown","onMouseDown"]]],[1,"wcs-select",{"value":[1032],"placeholder":[1537],"disabled":[1028],"multiple":[516],"chips":[516],"name":[1],"compareWith":[16],"expanded":[32],"hasLoaded":[32],"displayText":[32],"focused":[32],"overlayDirection":[32],"open":[64],"close":[64]},[[1,"mousedown","onMouseDown"],[8,"click","onWindowClickEvent"],[0,"wcsSelectOptionClick","selectedOptionChanged"]]]]],["wcs-error_2.cjs",[[1,"wcs-error"],[1,"wcs-form-field",{"isError":[1540,"is-error"],"icon":[8],"hasPrefix":[32],"hasSuffix":[32],"spiedElement":[32]}]]],["wcs-spinner.cjs",[[1,"wcs-spinner",{"mode":[1537]}]]],["wcs-button.cjs",[[1,"wcs-button",{"type":[1025],"href":[1],"disabled":[516],"ripple":[4],"shape":[513],"mode":[513]},[[0,"click","onClick"]]]]],["wcs-checkbox.cjs",[[1,"wcs-checkbox",{"name":[1],"indeterminate":[1540],"checked":[1540],"labelAlignment":[1537,"label-alignment"],"disabled":[4]}]]],["wcs-mat-icon.cjs",[[1,"wcs-mat-icon",{"icon":[1],"size":[1],"family":[1],"familyFile":[32],"familyClass":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|