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,77 @@
|
|
|
1
|
+
function isElement(element) {
|
|
2
|
+
return 'clientWidth' in element
|
|
3
|
+
&& 'clientHeight' in element;
|
|
4
|
+
}
|
|
5
|
+
function hasShadowDom(el) {
|
|
6
|
+
return !!el.shadowRoot && !!el.attachShadow;
|
|
7
|
+
}
|
|
8
|
+
const debounceEvent = (event, wait) => {
|
|
9
|
+
const original = event._original || event;
|
|
10
|
+
return {
|
|
11
|
+
_original: event,
|
|
12
|
+
emit: debounce(original.emit.bind(original), wait)
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
const debounce = (func, wait = 0) => {
|
|
16
|
+
let timer;
|
|
17
|
+
return (...args) => {
|
|
18
|
+
clearTimeout(timer);
|
|
19
|
+
timer = setTimeout(func, wait, ...args);
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Elements inside of web components sometimes need to inherit global attributes
|
|
24
|
+
* set on the host. For example, the inner input in `wcs-input` should inherit
|
|
25
|
+
* the `title` attribute that developers set directly on `ion-input`. This
|
|
26
|
+
* helper function should be called in componentWillLoad and assigned to a variable
|
|
27
|
+
* that is later used in the render function.
|
|
28
|
+
*
|
|
29
|
+
* This does not need to be reactive as changing attributes on the host element
|
|
30
|
+
* does not trigger a re-render.
|
|
31
|
+
*/
|
|
32
|
+
const inheritAttributes = (el, attributes = []) => {
|
|
33
|
+
const attributeObject = {};
|
|
34
|
+
attributes.forEach(attr => {
|
|
35
|
+
if (el.hasAttribute(attr)) {
|
|
36
|
+
const value = el.getAttribute(attr);
|
|
37
|
+
if (value !== null) {
|
|
38
|
+
attributeObject[attr] = el.getAttribute(attr);
|
|
39
|
+
}
|
|
40
|
+
el.removeAttribute(attr);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
return attributeObject;
|
|
44
|
+
};
|
|
45
|
+
const findItemLabel = (componentEl) => {
|
|
46
|
+
const itemEl = componentEl.closest('wcs-form-field');
|
|
47
|
+
if (itemEl) {
|
|
48
|
+
return itemEl.querySelector('wcs-label');
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Patched version of requestAnimationFrame that avoids ngzone
|
|
54
|
+
* Use only when you know ngzone should not run
|
|
55
|
+
*/
|
|
56
|
+
const raf = (h) => {
|
|
57
|
+
if (typeof __zone_symbol__requestAnimationFrame === 'function') {
|
|
58
|
+
return __zone_symbol__requestAnimationFrame(h);
|
|
59
|
+
}
|
|
60
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
61
|
+
return requestAnimationFrame(h);
|
|
62
|
+
}
|
|
63
|
+
return setTimeout(h);
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Return true if the mouseEvent click is inside the given HTML element
|
|
67
|
+
*/
|
|
68
|
+
const clickInsideElement = (event, element) => {
|
|
69
|
+
return event.x >= element.getBoundingClientRect().x && event.x <= element.getBoundingClientRect().x + element.getBoundingClientRect().width
|
|
70
|
+
&& event.y >= element.getBoundingClientRect().y && event.y <= element.getBoundingClientRect().y + element.getBoundingClientRect().height;
|
|
71
|
+
};
|
|
72
|
+
const clickTargetIsElementOrChildren = (mouseEvent, element) => {
|
|
73
|
+
return mouseEvent.target instanceof Node
|
|
74
|
+
&& element.contains(mouseEvent.target);
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export { clickInsideElement as a, isElement as b, clickTargetIsElementOrChildren as c, debounceEvent as d, findItemLabel as f, hasShadowDom as h, inheritAttributes as i, raf as r };
|
|
@@ -13,8 +13,8 @@ const doc = win.document || { head: {} };
|
|
|
13
13
|
const plt = {
|
|
14
14
|
$flags$: 0,
|
|
15
15
|
$resourcesUrl$: '',
|
|
16
|
-
jmp: h => h(),
|
|
17
|
-
raf: h => requestAnimationFrame(h),
|
|
16
|
+
jmp: (h) => h(),
|
|
17
|
+
raf: (h) => requestAnimationFrame(h),
|
|
18
18
|
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
19
19
|
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
20
20
|
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
@@ -23,7 +23,7 @@ const promiseResolve = (v) => Promise.resolve(v);
|
|
|
23
23
|
const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
24
24
|
try {
|
|
25
25
|
new CSSStyleSheet();
|
|
26
|
-
return typeof
|
|
26
|
+
return typeof new CSSStyleSheet().replace === 'function';
|
|
27
27
|
}
|
|
28
28
|
catch (e) { }
|
|
29
29
|
return false;
|
|
@@ -221,7 +221,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
221
221
|
typeof classData !== 'object'
|
|
222
222
|
? classData
|
|
223
223
|
: Object.keys(classData)
|
|
224
|
-
.filter(k => classData[k])
|
|
224
|
+
.filter((k) => classData[k])
|
|
225
225
|
.join(' ');
|
|
226
226
|
}
|
|
227
227
|
}
|
|
@@ -310,8 +310,8 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
310
310
|
const classList = elm.classList;
|
|
311
311
|
const oldClasses = parseClassList(oldValue);
|
|
312
312
|
const newClasses = parseClassList(newValue);
|
|
313
|
-
classList.remove(...oldClasses.filter(c => c && !newClasses.includes(c)));
|
|
314
|
-
classList.add(...newClasses.filter(c => c && !oldClasses.includes(c)));
|
|
313
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
314
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
315
315
|
}
|
|
316
316
|
else if (memberName === 'style') {
|
|
317
317
|
// update style attribute, css properties and values
|
|
@@ -346,7 +346,9 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
346
346
|
newValue(elm);
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
|
-
else if ((!isProp ) &&
|
|
349
|
+
else if ((!isProp ) &&
|
|
350
|
+
memberName[0] === 'o' &&
|
|
351
|
+
memberName[1] === 'n') {
|
|
350
352
|
// Event Handlers
|
|
351
353
|
// so if the member name starts with "on" and the 3rd characters is
|
|
352
354
|
// a capital letter, and it's not already a member on the element,
|
|
@@ -393,7 +395,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
393
395
|
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
394
396
|
if (memberName === 'list') {
|
|
395
397
|
isProp = false;
|
|
396
|
-
// tslint:disable-next-line: triple-equals
|
|
397
398
|
}
|
|
398
399
|
else if (oldValue == null || elm[memberName] != n) {
|
|
399
400
|
elm[memberName] = n;
|
|
@@ -447,7 +448,9 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
447
448
|
// if the element passed in is a shadow root, which is a document fragment
|
|
448
449
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
449
450
|
// if it's not a shadow root, then we add attrs/props to the same element
|
|
450
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
451
|
+
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
452
|
+
? newVnode.$elm$.host
|
|
453
|
+
: newVnode.$elm$;
|
|
451
454
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
452
455
|
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
453
456
|
{
|
|
@@ -491,14 +494,17 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
491
494
|
}
|
|
492
495
|
else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
493
496
|
// create a slot reference node
|
|
494
|
-
elm = newVNode.$elm$ =
|
|
497
|
+
elm = newVNode.$elm$ =
|
|
498
|
+
doc.createTextNode('');
|
|
495
499
|
}
|
|
496
500
|
else {
|
|
497
501
|
if (!isSvgMode) {
|
|
498
502
|
isSvgMode = newVNode.$tag$ === 'svg';
|
|
499
503
|
}
|
|
500
504
|
// create element
|
|
501
|
-
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */
|
|
505
|
+
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */
|
|
506
|
+
? 'slot-fb'
|
|
507
|
+
: newVNode.$tag$)
|
|
502
508
|
);
|
|
503
509
|
if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
|
|
504
510
|
isSvgMode = false;
|
|
@@ -865,7 +871,7 @@ const relocateSlotContent = (elm) => {
|
|
|
865
871
|
// that is suppose to always represent the original content location
|
|
866
872
|
if (isNodeLocatedInSlot(node, slotNameAttr)) {
|
|
867
873
|
// it's possible we've already decided to relocate this node
|
|
868
|
-
relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);
|
|
874
|
+
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
869
875
|
// made some changes to slots
|
|
870
876
|
// let's make sure we also double check
|
|
871
877
|
// fallbacks are correctly hidden or shown
|
|
@@ -884,9 +890,9 @@ const relocateSlotContent = (elm) => {
|
|
|
884
890
|
});
|
|
885
891
|
}
|
|
886
892
|
if (node['s-sr']) {
|
|
887
|
-
relocateNodes.map(relocateNode => {
|
|
893
|
+
relocateNodes.map((relocateNode) => {
|
|
888
894
|
if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
|
|
889
|
-
relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);
|
|
895
|
+
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
890
896
|
if (relocateNodeData && !relocateNode.$slotRefNode$) {
|
|
891
897
|
relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
|
|
892
898
|
}
|
|
@@ -894,7 +900,7 @@ const relocateSlotContent = (elm) => {
|
|
|
894
900
|
});
|
|
895
901
|
}
|
|
896
902
|
}
|
|
897
|
-
else if (!relocateNodes.some(r => r.$nodeToRelocate$ === node)) {
|
|
903
|
+
else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
|
|
898
904
|
// so far this element does not have a slot home, not setting slotRefNode on purpose
|
|
899
905
|
// if we never find a home for this element then we'll need to hide it
|
|
900
906
|
relocateNodes.push({
|
|
@@ -974,7 +980,8 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
974
980
|
if (!nodeToRelocate['s-ol']) {
|
|
975
981
|
// add a reference node marking this node's original location
|
|
976
982
|
// keep a reference to this node for later lookups
|
|
977
|
-
orgLocationNode =
|
|
983
|
+
orgLocationNode =
|
|
984
|
+
doc.createTextNode('');
|
|
978
985
|
orgLocationNode['s-nr'] = nodeToRelocate;
|
|
979
986
|
nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
|
|
980
987
|
}
|
|
@@ -998,7 +1005,8 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
998
1005
|
}
|
|
999
1006
|
}
|
|
1000
1007
|
}
|
|
1001
|
-
if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
|
|
1008
|
+
if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
|
|
1009
|
+
nodeToRelocate.nextSibling !== insertBeforeNode) {
|
|
1002
1010
|
// we've checked that it's worth while to relocate
|
|
1003
1011
|
// since that the node to relocate
|
|
1004
1012
|
// has a different next sibling or parent relocated
|
|
@@ -1044,6 +1052,13 @@ const createEvent = (ref, name, flags) => {
|
|
|
1044
1052
|
},
|
|
1045
1053
|
};
|
|
1046
1054
|
};
|
|
1055
|
+
/**
|
|
1056
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
1057
|
+
* @param elm the target of the Event
|
|
1058
|
+
* @param name the name to give the custom Event
|
|
1059
|
+
* @param opts options for configuring a custom Event
|
|
1060
|
+
* @returns the custom Event
|
|
1061
|
+
*/
|
|
1047
1062
|
const emitEvent = (elm, name, opts) => {
|
|
1048
1063
|
const ev = plt.ce(name, opts);
|
|
1049
1064
|
elm.dispatchEvent(ev);
|
|
@@ -1051,7 +1066,7 @@ const emitEvent = (elm, name, opts) => {
|
|
|
1051
1066
|
};
|
|
1052
1067
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1053
1068
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
1054
|
-
ancestorComponent['s-p'].push(new Promise(r => (hostRef.$onRenderResolve$ = r)));
|
|
1069
|
+
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
1055
1070
|
}
|
|
1056
1071
|
};
|
|
1057
1072
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1110,7 +1125,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1110
1125
|
// ok, so turns out there are some child host elements
|
|
1111
1126
|
// waiting on this parent element to load
|
|
1112
1127
|
// let's fire off all update callbacks waiting
|
|
1113
|
-
rc.map(cb => cb());
|
|
1128
|
+
rc.map((cb) => cb());
|
|
1114
1129
|
elm['s-rc'] = undefined;
|
|
1115
1130
|
}
|
|
1116
1131
|
endRender();
|
|
@@ -1201,6 +1216,18 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1201
1216
|
// ( •_•)>⌐■-■
|
|
1202
1217
|
// (⌐■_■)
|
|
1203
1218
|
};
|
|
1219
|
+
const forceUpdate = (ref) => {
|
|
1220
|
+
{
|
|
1221
|
+
const hostRef = getHostRef(ref);
|
|
1222
|
+
const isConnected = hostRef.$hostElement$.isConnected;
|
|
1223
|
+
if (isConnected &&
|
|
1224
|
+
(hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1225
|
+
scheduleUpdate(hostRef, false);
|
|
1226
|
+
}
|
|
1227
|
+
// Returns "true" when the forced update was successfully scheduled
|
|
1228
|
+
return isConnected;
|
|
1229
|
+
}
|
|
1230
|
+
};
|
|
1204
1231
|
const appDidLoad = (who) => {
|
|
1205
1232
|
// on appload
|
|
1206
1233
|
// we have finish the first big initial render
|
|
@@ -1223,7 +1250,8 @@ const safeCall = (instance, method, arg) => {
|
|
|
1223
1250
|
const then = (promise, thenFn) => {
|
|
1224
1251
|
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
|
1225
1252
|
};
|
|
1226
|
-
const addHydratedFlag = (elm) =>
|
|
1253
|
+
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1254
|
+
;
|
|
1227
1255
|
const parsePropertyValue = (propValue, propType) => {
|
|
1228
1256
|
// ensure this value is of the correct prop type
|
|
1229
1257
|
if (propValue != null && !isComplexType(propValue)) {
|
|
@@ -1267,7 +1295,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1267
1295
|
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1268
1296
|
if (watchMethods) {
|
|
1269
1297
|
// this instance is watching for when this property changed
|
|
1270
|
-
watchMethods.map(watchMethodName => {
|
|
1298
|
+
watchMethods.map((watchMethodName) => {
|
|
1271
1299
|
try {
|
|
1272
1300
|
// fire off each of the watch methods that are watching this property
|
|
1273
1301
|
instance[watchMethodName](newVal, oldVal, propName);
|
|
@@ -1297,7 +1325,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1297
1325
|
const members = Object.entries(cmpMeta.$members$);
|
|
1298
1326
|
const prototype = Cstr.prototype;
|
|
1299
1327
|
members.map(([memberName, [memberFlags]]) => {
|
|
1300
|
-
if ((memberFlags & 31 /* Prop */ ||
|
|
1328
|
+
if ((memberFlags & 31 /* Prop */ ||
|
|
1329
|
+
((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
|
|
1301
1330
|
// proxyComponent - prop
|
|
1302
1331
|
Object.defineProperty(prototype, memberName, {
|
|
1303
1332
|
get() {
|
|
@@ -1312,7 +1341,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1312
1341
|
enumerable: true,
|
|
1313
1342
|
});
|
|
1314
1343
|
}
|
|
1315
|
-
else if (flags & 1 /* isElementConstructor */ &&
|
|
1344
|
+
else if (flags & 1 /* isElementConstructor */ &&
|
|
1345
|
+
memberFlags & 64 /* Method */) {
|
|
1316
1346
|
// proxyComponent - method
|
|
1317
1347
|
Object.defineProperty(prototype, memberName, {
|
|
1318
1348
|
value(...args) {
|
|
@@ -1327,6 +1357,51 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1327
1357
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
1328
1358
|
plt.jmp(() => {
|
|
1329
1359
|
const propName = attrNameToPropName.get(attrName);
|
|
1360
|
+
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
1361
|
+
// in the case where an attribute was set inline.
|
|
1362
|
+
// ```html
|
|
1363
|
+
// <my-component some-attribute="some-value"></my-component>
|
|
1364
|
+
// ```
|
|
1365
|
+
//
|
|
1366
|
+
// There is an edge case where a developer sets the attribute inline on a custom element and then
|
|
1367
|
+
// programmatically changes it before it has been upgraded as shown below:
|
|
1368
|
+
//
|
|
1369
|
+
// ```html
|
|
1370
|
+
// <!-- this component has _not_ been upgraded yet -->
|
|
1371
|
+
// <my-component id="test" some-attribute="some-value"></my-component>
|
|
1372
|
+
// <script>
|
|
1373
|
+
// // grab non-upgraded component
|
|
1374
|
+
// el = document.querySelector("#test");
|
|
1375
|
+
// el.someAttribute = "another-value";
|
|
1376
|
+
// // upgrade component
|
|
1377
|
+
// customElements.define('my-component', MyComponent);
|
|
1378
|
+
// </script>
|
|
1379
|
+
// ```
|
|
1380
|
+
// In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
|
|
1381
|
+
// will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
|
|
1382
|
+
// to the value that was set inline i.e. "some-value" from above example. When
|
|
1383
|
+
// the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
|
|
1384
|
+
//
|
|
1385
|
+
// The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
|
|
1386
|
+
// by connectedCallback as this attributeChangedCallback will not fire.
|
|
1387
|
+
//
|
|
1388
|
+
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
1389
|
+
//
|
|
1390
|
+
// TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
|
|
1391
|
+
// properties here given that this goes against best practices outlined here
|
|
1392
|
+
// https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
|
|
1393
|
+
if (this.hasOwnProperty(propName)) {
|
|
1394
|
+
newValue = this[propName];
|
|
1395
|
+
delete this[propName];
|
|
1396
|
+
}
|
|
1397
|
+
else if (prototype.hasOwnProperty(propName) &&
|
|
1398
|
+
typeof this[propName] === 'number' &&
|
|
1399
|
+
this[propName] == newValue) {
|
|
1400
|
+
// if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
|
|
1401
|
+
// APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
|
|
1402
|
+
// `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
|
|
1403
|
+
return;
|
|
1404
|
+
}
|
|
1330
1405
|
this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
|
|
1331
1406
|
});
|
|
1332
1407
|
};
|
|
@@ -1363,7 +1438,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1363
1438
|
endLoad();
|
|
1364
1439
|
}
|
|
1365
1440
|
if (!Cstr.isProxied) {
|
|
1366
|
-
// we'
|
|
1441
|
+
// we've never proxied this Constructor before
|
|
1367
1442
|
// let's add the getters/setters to its prototype before
|
|
1368
1443
|
// the first time we create an instance of the implementation
|
|
1369
1444
|
{
|
|
@@ -1413,7 +1488,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1413
1488
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1414
1489
|
const schedule = () => scheduleUpdate(hostRef, true);
|
|
1415
1490
|
if (ancestorComponent && ancestorComponent['s-rc']) {
|
|
1416
|
-
// this is the
|
|
1491
|
+
// this is the initial load and this component it has an ancestor component
|
|
1417
1492
|
// but the ancestor component has NOT fired its will update lifecycle yet
|
|
1418
1493
|
// so let's just cool our jets and wait for the ancestor to continue first
|
|
1419
1494
|
// this will get fired off when the ancestor component
|
|
@@ -1505,7 +1580,7 @@ const disconnectedCallback = (elm) => {
|
|
|
1505
1580
|
const instance = hostRef.$lazyInstance$ ;
|
|
1506
1581
|
{
|
|
1507
1582
|
if (hostRef.$rmListeners$) {
|
|
1508
|
-
hostRef.$rmListeners$.map(rmListener => rmListener());
|
|
1583
|
+
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1509
1584
|
hostRef.$rmListeners$ = undefined;
|
|
1510
1585
|
}
|
|
1511
1586
|
}
|
|
@@ -1527,71 +1602,73 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1527
1602
|
let isBootstrapping = true;
|
|
1528
1603
|
Object.assign(plt, options);
|
|
1529
1604
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
1530
|
-
lazyBundles.map(lazyBundle =>
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1605
|
+
lazyBundles.map((lazyBundle) => {
|
|
1606
|
+
lazyBundle[1].map((compactMeta) => {
|
|
1607
|
+
const cmpMeta = {
|
|
1608
|
+
$flags$: compactMeta[0],
|
|
1609
|
+
$tagName$: compactMeta[1],
|
|
1610
|
+
$members$: compactMeta[2],
|
|
1611
|
+
$listeners$: compactMeta[3],
|
|
1612
|
+
};
|
|
1613
|
+
{
|
|
1614
|
+
cmpMeta.$members$ = compactMeta[2];
|
|
1615
|
+
}
|
|
1616
|
+
{
|
|
1617
|
+
cmpMeta.$listeners$ = compactMeta[3];
|
|
1618
|
+
}
|
|
1619
|
+
{
|
|
1620
|
+
cmpMeta.$attrsToReflect$ = [];
|
|
1621
|
+
}
|
|
1622
|
+
{
|
|
1623
|
+
cmpMeta.$watchers$ = {};
|
|
1624
|
+
}
|
|
1625
|
+
const tagName = cmpMeta.$tagName$;
|
|
1626
|
+
const HostElement = class extends HTMLElement {
|
|
1627
|
+
// StencilLazyHost
|
|
1628
|
+
constructor(self) {
|
|
1629
|
+
// @ts-ignore
|
|
1630
|
+
super(self);
|
|
1631
|
+
self = this;
|
|
1632
|
+
registerHost(self, cmpMeta);
|
|
1633
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1634
|
+
// this component is using shadow dom
|
|
1635
|
+
// and this browser supports shadow dom
|
|
1636
|
+
// add the read-only property "shadowRoot" to the host element
|
|
1637
|
+
// adding the shadow root build conditionals to minimize runtime
|
|
1563
1638
|
{
|
|
1564
|
-
|
|
1639
|
+
{
|
|
1640
|
+
self.attachShadow({ mode: 'open' });
|
|
1641
|
+
}
|
|
1565
1642
|
}
|
|
1566
1643
|
}
|
|
1567
1644
|
}
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1645
|
+
connectedCallback() {
|
|
1646
|
+
if (appLoadFallback) {
|
|
1647
|
+
clearTimeout(appLoadFallback);
|
|
1648
|
+
appLoadFallback = null;
|
|
1649
|
+
}
|
|
1650
|
+
if (isBootstrapping) {
|
|
1651
|
+
// connectedCallback will be processed once all components have been registered
|
|
1652
|
+
deferredConnectedCallbacks.push(this);
|
|
1653
|
+
}
|
|
1654
|
+
else {
|
|
1655
|
+
plt.jmp(() => connectedCallback(this));
|
|
1656
|
+
}
|
|
1573
1657
|
}
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
deferredConnectedCallbacks.push(this);
|
|
1658
|
+
disconnectedCallback() {
|
|
1659
|
+
plt.jmp(() => disconnectedCallback(this));
|
|
1577
1660
|
}
|
|
1578
|
-
|
|
1579
|
-
|
|
1661
|
+
componentOnReady() {
|
|
1662
|
+
return getHostRef(this).$onReadyPromise$;
|
|
1580
1663
|
}
|
|
1664
|
+
};
|
|
1665
|
+
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1666
|
+
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1667
|
+
cmpTags.push(tagName);
|
|
1668
|
+
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
1581
1669
|
}
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
}
|
|
1585
|
-
componentOnReady() {
|
|
1586
|
-
return getHostRef(this).$onReadyPromise$;
|
|
1587
|
-
}
|
|
1588
|
-
};
|
|
1589
|
-
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1590
|
-
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1591
|
-
cmpTags.push(tagName);
|
|
1592
|
-
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
1593
|
-
}
|
|
1594
|
-
}));
|
|
1670
|
+
});
|
|
1671
|
+
});
|
|
1595
1672
|
{
|
|
1596
1673
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1597
1674
|
visibilityStyle.setAttribute('data-styles', '');
|
|
@@ -1600,7 +1677,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1600
1677
|
// Process deferred connectedCallbacks now all components have been registered
|
|
1601
1678
|
isBootstrapping = false;
|
|
1602
1679
|
if (deferredConnectedCallbacks.length) {
|
|
1603
|
-
deferredConnectedCallbacks.map(host => host.connectedCallback());
|
|
1680
|
+
deferredConnectedCallbacks.map((host) => host.connectedCallback());
|
|
1604
1681
|
}
|
|
1605
1682
|
else {
|
|
1606
1683
|
{
|
|
@@ -1621,10 +1698,10 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
1621
1698
|
$instanceValues$: new Map(),
|
|
1622
1699
|
};
|
|
1623
1700
|
{
|
|
1624
|
-
hostRef.$onInstancePromise$ = new Promise(r => (hostRef.$onInstanceResolve$ = r));
|
|
1701
|
+
hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
|
|
1625
1702
|
}
|
|
1626
1703
|
{
|
|
1627
|
-
hostRef.$onReadyPromise$ = new Promise(r => (hostRef.$onReadyResolve$ = r));
|
|
1704
|
+
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
|
1628
1705
|
elm['s-p'] = [];
|
|
1629
1706
|
elm['s-rc'] = [];
|
|
1630
1707
|
}
|
|
@@ -1646,7 +1723,7 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1646
1723
|
/* webpackInclude: /\.entry\.js$/ */
|
|
1647
1724
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
1648
1725
|
/* webpackMode: "lazy" */
|
|
1649
|
-
`./${bundleId}.entry.js${''}`).then(importedModule => {
|
|
1726
|
+
`./${bundleId}.entry.js${''}`).then((importedModule) => {
|
|
1650
1727
|
{
|
|
1651
1728
|
cmpModules.set(bundleId, importedModule);
|
|
1652
1729
|
}
|
|
@@ -1698,4 +1775,4 @@ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
|
1698
1775
|
const readTask = /*@__PURE__*/ queueTask(queueDomReads, false);
|
|
1699
1776
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1700
1777
|
|
|
1701
|
-
export { Host as H, readTask as a, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r };
|
|
1778
|
+
export { Host as H, readTask as a, bootstrapLazy as b, createEvent as c, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r };
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-b982604a.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
Stencil Client Patch Esm v2.
|
|
4
|
+
Stencil Client Patch Esm v2.10.0 | MIT Licensed | https://stenciljs.com
|
|
5
5
|
*/
|
|
6
6
|
const patchEsm = () => {
|
|
7
7
|
return promiseResolve();
|
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["wcs-
|
|
13
|
+
return bootstrapLazy([["wcs-editable-field",[[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",[[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",[[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",[[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",[[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",[[1,"wcs-galactic-menu",{"text":[1],"showPopoverMenu":[32]},[[8,"click","onWindowClickEvent"]]]]],["wcs-input",[[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",[[4,"wcs-modal",{"backdrop":[516],"show":[1540],"showCloseButton":[516,"show-close-button"]},[[4,"keydown","onKeyDown"]]]]],["wcs-textarea",[[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",[[1,"wcs-action-bar",{"gutter":[4],"hasTabs":[32]}]]],["wcs-app",[[1,"wcs-app"]]],["wcs-badge",[[1,"wcs-badge",{"shape":[1],"color":[1]}]]],["wcs-card",[[1,"wcs-card",{"mode":[1537]}]]],["wcs-card-body",[[1,"wcs-card-body"]]],["wcs-com-nav",[[1,"wcs-com-nav",{"appName":[1,"app-name"]}]]],["wcs-com-nav-category",[[1,"wcs-com-nav-category",{"label":[1],"categoryOpen":[32],"close":[64],"open":[64]},[[8,"click","onWindowClickEvent"],[8,"wcsCategoryOpened","onSubmenuOpened"]]]]],["wcs-com-nav-submenu",[[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",[[1,"wcs-divider"]]],["wcs-dropdown-divider",[[1,"wcs-dropdown-divider"]]],["wcs-dropdown-header",[[1,"wcs-dropdown-header"]]],["wcs-dropdown-item",[[4,"wcs-dropdown-item",null,[[1,"mousedown","onMouseDown"]]]]],["wcs-field",[[1,"wcs-field"]]],["wcs-field-content",[[1,"wcs-field-content"]]],["wcs-field-label",[[1,"wcs-field-label"]]],["wcs-footer",[[1,"wcs-footer"]]],["wcs-galactic",[[1,"wcs-galactic",{"text":[1],"show":[32]}]]],["wcs-grid-column",[[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",[[1,"wcs-grid-custom-cell",{"columnId":[1,"column-id"],"rowId":[8,"row-id"]}]]],["wcs-header",[[1,"wcs-header"]]],["wcs-hint",[[1,"wcs-hint",{"small":[1540]}]]],["wcs-icon",[[0,"wcs-icon",{"icon":[1],"size":[1]}]]],["wcs-label",[[1,"wcs-label",{"required":[516]}]]],["wcs-list-item",[[1,"wcs-list-item",{"activated":[1028]}]]],["wcs-list-item-properties",[[1,"wcs-list-item-properties"]]],["wcs-list-item-property",[[1,"wcs-list-item-property"]]],["wcs-nav",[[1,"wcs-nav"]]],["wcs-nav-item",[[4,"wcs-nav-item",{"text":[513],"href":[1537]}]]],["wcs-progress-radial",[[1,"wcs-progress-radial",{"size":[2],"showLabel":[4,"show-label"],"value":[2]}]]],["wcs-radio-group",[[1,"wcs-radio-group",{"value":[8],"name":[520],"mode":[513]},[[0,"wcsRadioClick","selectedOptionChanged"]]]]],["wcs-switch",[[1,"wcs-switch",{"name":[1],"checked":[516],"labelAlignment":[513,"label-alignment"],"disabled":[4]}]]],["wcs-tab",[[1,"wcs-tab",{"header":[1537],"itemKey":[8,"item-key"]}]]],["wcs-tabs",[[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",[[1,"wcs-tooltip",{"for":[513],"position":[513]}]]],["wcs-progress-bar",[[1,"wcs-progress-bar",{"small":[1028],"showLabel":[1028,"show-label"],"value":[1026]}]]],["wcs-radio",[[1,"wcs-radio",{"mode":[513],"value":[1544],"label":[1537],"checked":[1540],"disabled":[1028]}]]],["wcs-select_2",[[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",[[1,"wcs-error"],[1,"wcs-form-field",{"isError":[1540,"is-error"],"icon":[8],"hasPrefix":[32],"hasSuffix":[32],"spiedElement":[32]}]]],["wcs-spinner",[[1,"wcs-spinner",{"mode":[1537]}]]],["wcs-button",[[1,"wcs-button",{"type":[1025],"href":[1],"disabled":[516],"ripple":[4],"shape":[513],"mode":[513]},[[0,"click","onClick"]]]]],["wcs-checkbox",[[1,"wcs-checkbox",{"name":[1],"indeterminate":[1540],"checked":[1540],"labelAlignment":[1537,"label-alignment"],"disabled":[4]}]]],["wcs-mat-icon",[[1,"wcs-mat-icon",{"icon":[1],"size":[1],"family":[1],"familyFile":[32],"familyClass":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|