@searchcraft/javascript-sdk 0.6.0 → 0.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/README.md +53 -55
- package/dist/cjs/{index-b3b77ea2.js → index-d4b4a45e.js} +233 -130
- package/dist/cjs/index-d4b4a45e.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/searchcraft-base-search-result.cjs.entry.js +14 -18
- package/dist/cjs/searchcraft-base-search-result.cjs.entry.js.map +1 -1
- package/dist/cjs/searchcraft-base-search-results.cjs.entry.js +20 -7
- package/dist/cjs/searchcraft-base-search-results.cjs.entry.js.map +1 -1
- package/dist/cjs/searchcraft-button_3.cjs.entry.js +16 -7
- package/dist/cjs/searchcraft-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/searchcraft-facet-list_3.cjs.entry.js +26 -24
- package/dist/cjs/searchcraft-facet-list_3.cjs.entry.js.map +1 -1
- package/dist/cjs/searchcraft-filter-panel.cjs.entry.js +6 -5
- package/dist/cjs/searchcraft-filter-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/searchcraft-input-form_2.cjs.entry.js +28 -17
- package/dist/cjs/searchcraft-input-form_2.cjs.entry.js.map +1 -1
- package/dist/cjs/searchcraft-javascript-sdk.cjs.js +2 -2
- package/dist/cjs/searchcraft-javascript-sdk.cjs.js.map +1 -1
- package/dist/cjs/searchcraft-popover-button.cjs.entry.js +2 -2
- package/dist/cjs/searchcraft-popover-form.cjs.entry.js +23 -16
- package/dist/cjs/searchcraft-popover-form.cjs.entry.js.map +1 -1
- package/dist/cjs/searchcraft-popover-list-item.cjs.entry.js +1 -7
- package/dist/cjs/searchcraft-popover-list-item.cjs.entry.js.map +1 -1
- package/dist/cjs/searchcraft-results-info.cjs.entry.js +2 -2
- package/dist/cjs/searchcraft-results-info.cjs.entry.js.map +1 -1
- package/dist/cjs/{store-d7ebcf7a.js → store-abe47006.js} +608 -98
- package/dist/cjs/store-abe47006.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js +44 -16
- package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js.map +1 -1
- package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js +41 -6
- package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js.map +1 -1
- package/dist/collection/components/searchcraft-button/searchcraft-button.js +21 -5
- package/dist/collection/components/searchcraft-button/searchcraft-button.js.map +1 -1
- package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.js +2 -3
- package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.js.map +1 -1
- package/dist/collection/components/searchcraft-facet-list/searchcraft-facet-list.js +4 -10
- package/dist/collection/components/searchcraft-facet-list/searchcraft-facet-list.js.map +1 -1
- package/dist/collection/components/searchcraft-filter-panel/searchcraft-filter-panel.js +6 -3
- package/dist/collection/components/searchcraft-filter-panel/searchcraft-filter-panel.js.map +1 -1
- package/dist/collection/components/searchcraft-input-form/searchcraft-input-form.js +40 -12
- package/dist/collection/components/searchcraft-input-form/searchcraft-input-form.js.map +1 -1
- package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.js +7 -1
- package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.js.map +1 -1
- package/dist/collection/components/searchcraft-popover-form/searchcraft-popover-form.js +33 -16
- package/dist/collection/components/searchcraft-popover-form/searchcraft-popover-form.js.map +1 -1
- package/dist/collection/components/searchcraft-popover-list-item/searchcraft-popover-list-item.js +12 -8
- package/dist/collection/components/searchcraft-popover-list-item/searchcraft-popover-list-item.js.map +1 -1
- package/dist/collection/components/searchcraft-popover-list-view/searchcraft-popover-list-view.js +6 -6
- package/dist/collection/components/searchcraft-popover-list-view/searchcraft-popover-list-view.js.map +1 -1
- package/dist/collection/components/searchcraft-results-info/searchcraft-results-info.js.map +1 -1
- package/dist/collection/components/searchcraft-slider/searchcraft-slider.js +25 -7
- package/dist/collection/components/searchcraft-slider/searchcraft-slider.js.map +1 -1
- package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.js +9 -5
- package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.js.map +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/{p-d6a88eed.js → p-01dc5b3b.js} +608 -98
- package/dist/components/p-01dc5b3b.js.map +1 -0
- package/dist/components/{p-cf4ced92.js → p-1ae87308.js} +2 -8
- package/dist/components/p-1ae87308.js.map +1 -0
- package/dist/components/{p-a248ad69.js → p-649654b5.js} +5 -13
- package/dist/components/p-649654b5.js.map +1 -0
- package/dist/components/{p-4c45ef80.js → p-662cb490.js} +8 -8
- package/dist/components/p-662cb490.js.map +1 -0
- package/dist/components/{p-e4846fa2.js → p-6cafd48d.js} +189 -112
- package/dist/components/p-6cafd48d.js.map +1 -0
- package/dist/components/{p-04c46179.js → p-87d1611b.js} +15 -19
- package/dist/components/p-87d1611b.js.map +1 -0
- package/dist/components/{p-a9bd1872.js → p-c273e43d.js} +5 -3
- package/dist/components/p-c273e43d.js.map +1 -0
- package/dist/components/{p-0e38a723.js → p-cc9f8c61.js} +19 -9
- package/dist/components/p-cc9f8c61.js.map +1 -0
- package/dist/components/{p-f9d778b3.js → p-cf096782.js} +14 -6
- package/dist/components/p-cf096782.js.map +1 -0
- package/dist/components/{p-02a16e53.js → p-da5b92ef.js} +32 -19
- package/dist/components/p-da5b92ef.js.map +1 -0
- package/dist/components/{p-85765b81.js → p-e1cf5f9d.js} +3 -5
- package/dist/components/p-e1cf5f9d.js.map +1 -0
- package/dist/components/{p-953f4238.js → p-f5a06210.js} +2 -3
- package/dist/components/p-f5a06210.js.map +1 -0
- package/dist/components/searchcraft-base-search-result.js +1 -1
- package/dist/components/searchcraft-base-search-results.js +22 -9
- package/dist/components/searchcraft-base-search-results.js.map +1 -1
- package/dist/components/searchcraft-button.js +1 -1
- package/dist/components/searchcraft-error-message.js +1 -1
- package/dist/components/searchcraft-facet-list.js +1 -1
- package/dist/components/searchcraft-filter-panel.js +9 -8
- package/dist/components/searchcraft-filter-panel.js.map +1 -1
- package/dist/components/searchcraft-input-form.js +1 -1
- package/dist/components/searchcraft-input-label.js +1 -1
- package/dist/components/searchcraft-popover-button.js +2 -2
- package/dist/components/searchcraft-popover-form.js +29 -22
- package/dist/components/searchcraft-popover-form.js.map +1 -1
- package/dist/components/searchcraft-popover-list-item.js +1 -1
- package/dist/components/searchcraft-popover-list-view.js +1 -1
- package/dist/components/searchcraft-results-info.js +2 -2
- package/dist/components/searchcraft-results-info.js.map +1 -1
- package/dist/components/searchcraft-slider.js +1 -1
- package/dist/components/searchcraft-toggle-button.js +1 -1
- package/dist/esm/{index-11551663.js → index-56b713de.js} +233 -130
- package/dist/esm/index-56b713de.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/searchcraft-base-search-result.entry.js +14 -18
- package/dist/esm/searchcraft-base-search-result.entry.js.map +1 -1
- package/dist/esm/searchcraft-base-search-results.entry.js +20 -7
- package/dist/esm/searchcraft-base-search-results.entry.js.map +1 -1
- package/dist/esm/searchcraft-button_3.entry.js +16 -7
- package/dist/esm/searchcraft-button_3.entry.js.map +1 -1
- package/dist/esm/searchcraft-facet-list_3.entry.js +26 -24
- package/dist/esm/searchcraft-facet-list_3.entry.js.map +1 -1
- package/dist/esm/searchcraft-filter-panel.entry.js +6 -5
- package/dist/esm/searchcraft-filter-panel.entry.js.map +1 -1
- package/dist/esm/searchcraft-input-form_2.entry.js +28 -17
- package/dist/esm/searchcraft-input-form_2.entry.js.map +1 -1
- package/dist/esm/searchcraft-javascript-sdk.js +3 -3
- package/dist/esm/searchcraft-javascript-sdk.js.map +1 -1
- package/dist/esm/searchcraft-popover-button.entry.js +2 -2
- package/dist/esm/searchcraft-popover-form.entry.js +23 -16
- package/dist/esm/searchcraft-popover-form.entry.js.map +1 -1
- package/dist/esm/searchcraft-popover-list-item.entry.js +1 -7
- package/dist/esm/searchcraft-popover-list-item.entry.js.map +1 -1
- package/dist/esm/searchcraft-results-info.entry.js +2 -2
- package/dist/esm/searchcraft-results-info.entry.js.map +1 -1
- package/dist/esm/{store-1058f7b0.js → store-712f0586.js} +608 -98
- package/dist/esm/store-712f0586.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/index.esm.js +1 -1
- package/dist/searchcraft-javascript-sdk/p-01dc5b3b.js +11 -0
- package/dist/searchcraft-javascript-sdk/p-01dc5b3b.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-117fcdd3.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-117fcdd3.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-129e6f2c.js +3 -0
- package/dist/searchcraft-javascript-sdk/p-129e6f2c.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/{p-8e539d62.entry.js → p-27cb401c.entry.js} +2 -2
- package/dist/searchcraft-javascript-sdk/p-27cb401c.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-4df4a29e.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-4df4a29e.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/{p-98640a6a.entry.js → p-54248dd8.entry.js} +2 -2
- package/dist/searchcraft-javascript-sdk/{p-98640a6a.entry.js.map → p-54248dd8.entry.js.map} +1 -1
- package/dist/searchcraft-javascript-sdk/{p-cd852b84.entry.js → p-69430dbf.entry.js} +2 -2
- package/dist/searchcraft-javascript-sdk/p-69430dbf.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/{p-e042deb9.entry.js → p-a460755d.entry.js} +2 -2
- package/dist/searchcraft-javascript-sdk/p-a460755d.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/{p-7049b93d.entry.js → p-bc2c4259.entry.js} +2 -2
- package/dist/searchcraft-javascript-sdk/p-bc2c4259.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-caecdcda.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-caecdcda.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/{p-c27a3673.entry.js → p-f8129731.entry.js} +2 -2
- package/dist/searchcraft-javascript-sdk/p-f8129731.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/{p-b8bd53ce.entry.js → p-f839b682.entry.js} +2 -2
- package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js +1 -1
- package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js.map +1 -1
- package/package.json +4 -3
- package/dist/cjs/index-b3b77ea2.js.map +0 -1
- package/dist/cjs/store-d7ebcf7a.js.map +0 -1
- package/dist/components/p-02a16e53.js.map +0 -1
- package/dist/components/p-04c46179.js.map +0 -1
- package/dist/components/p-0e38a723.js.map +0 -1
- package/dist/components/p-4c45ef80.js.map +0 -1
- package/dist/components/p-85765b81.js.map +0 -1
- package/dist/components/p-953f4238.js.map +0 -1
- package/dist/components/p-a248ad69.js.map +0 -1
- package/dist/components/p-a9bd1872.js.map +0 -1
- package/dist/components/p-cf4ced92.js.map +0 -1
- package/dist/components/p-d6a88eed.js.map +0 -1
- package/dist/components/p-e4846fa2.js.map +0 -1
- package/dist/components/p-f9d778b3.js.map +0 -1
- package/dist/esm/index-11551663.js.map +0 -1
- package/dist/esm/store-1058f7b0.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-4580e8a4.entry.js +0 -2
- package/dist/searchcraft-javascript-sdk/p-4580e8a4.entry.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-7049b93d.entry.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-8e539d62.entry.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-9d0f5c89.entry.js +0 -2
- package/dist/searchcraft-javascript-sdk/p-9d0f5c89.entry.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-c27a3673.entry.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-cd852b84.entry.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-d6a88eed.js +0 -11
- package/dist/searchcraft-javascript-sdk/p-d6a88eed.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-e042deb9.entry.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-e0be53df.js +0 -3
- package/dist/searchcraft-javascript-sdk/p-e0be53df.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-efab9f3c.entry.js +0 -2
- package/dist/searchcraft-javascript-sdk/p-efab9f3c.entry.js.map +0 -1
- /package/dist/searchcraft-javascript-sdk/{p-b8bd53ce.entry.js.map → p-f839b682.entry.js.map} +0 -0
|
@@ -21,19 +21,27 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'searchcraft-javascript-sdk';
|
|
24
|
-
const BUILD = /* searchcraft-javascript-sdk */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
24
|
+
const BUILD = /* searchcraft-javascript-sdk */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.25.0 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
31
31
|
for (var name in all)
|
|
32
32
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
33
|
};
|
|
34
|
+
|
|
35
|
+
// src/utils/constants.ts
|
|
36
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
37
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
38
|
+
|
|
39
|
+
// src/client/client-host-ref.ts
|
|
34
40
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
35
41
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
36
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
42
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
43
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
44
|
+
};
|
|
37
45
|
var registerHost = (hostElement, cmpMeta) => {
|
|
38
46
|
const hostRef = {
|
|
39
47
|
$flags$: 0,
|
|
@@ -46,7 +54,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
46
54
|
hostElement["s-p"] = [];
|
|
47
55
|
hostElement["s-rc"] = [];
|
|
48
56
|
}
|
|
49
|
-
|
|
57
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
58
|
+
return ref;
|
|
50
59
|
};
|
|
51
60
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
52
61
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -70,16 +79,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
70
79
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
71
80
|
/* webpackMode: "lazy" */
|
|
72
81
|
`./${bundleId}.entry.js${""}`
|
|
73
|
-
)); }).then(
|
|
74
|
-
{
|
|
75
|
-
|
|
82
|
+
)); }).then(
|
|
83
|
+
(importedModule) => {
|
|
84
|
+
{
|
|
85
|
+
cmpModules.set(bundleId, importedModule);
|
|
86
|
+
}
|
|
87
|
+
return importedModule[exportName];
|
|
88
|
+
},
|
|
89
|
+
(e) => {
|
|
90
|
+
consoleError(e, hostRef.$hostElement$);
|
|
76
91
|
}
|
|
77
|
-
|
|
78
|
-
}, consoleError);
|
|
92
|
+
);
|
|
79
93
|
};
|
|
80
94
|
|
|
81
95
|
// src/client/client-style.ts
|
|
82
96
|
var styles = /* @__PURE__ */ new Map();
|
|
97
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
83
98
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
84
99
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
85
100
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -138,14 +153,6 @@ var flush = () => {
|
|
|
138
153
|
};
|
|
139
154
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
140
155
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
141
|
-
|
|
142
|
-
// src/utils/constants.ts
|
|
143
|
-
var EMPTY_OBJ = {};
|
|
144
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
145
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
146
|
-
|
|
147
|
-
// src/utils/helpers.ts
|
|
148
|
-
var isDef = (v) => v != null;
|
|
149
156
|
var isComplexType = (o) => {
|
|
150
157
|
o = typeof o;
|
|
151
158
|
return o === "object" || o === "function";
|
|
@@ -205,6 +212,63 @@ var unwrapErr = (result) => {
|
|
|
205
212
|
throw result.value;
|
|
206
213
|
}
|
|
207
214
|
};
|
|
215
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
216
|
+
const childNodes = elm.__childNodes || elm.childNodes;
|
|
217
|
+
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
218
|
+
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
219
|
+
var _a;
|
|
220
|
+
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
221
|
+
if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
|
|
222
|
+
slotNode.hidden = true;
|
|
223
|
+
} else {
|
|
224
|
+
slotNode.hidden = false;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
for (const childNode of childNodes) {
|
|
230
|
+
if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
|
|
231
|
+
updateFallbackSlotVisibility(childNode);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
236
|
+
let i2 = 0;
|
|
237
|
+
let slottedNodes = [];
|
|
238
|
+
let childNode;
|
|
239
|
+
for (; i2 < childNodes.length; i2++) {
|
|
240
|
+
childNode = childNodes[i2];
|
|
241
|
+
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
|
|
242
|
+
slottedNodes.push(childNode);
|
|
243
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
244
|
+
}
|
|
245
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
246
|
+
}
|
|
247
|
+
return slottedNodes;
|
|
248
|
+
}
|
|
249
|
+
var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
|
|
250
|
+
const childNodes = [];
|
|
251
|
+
if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
|
|
252
|
+
while ((node = node.nextSibling) && node["s-sn"] === slotName) {
|
|
253
|
+
childNodes.push(node);
|
|
254
|
+
}
|
|
255
|
+
return childNodes;
|
|
256
|
+
};
|
|
257
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
258
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
259
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
260
|
+
return true;
|
|
261
|
+
}
|
|
262
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
263
|
+
return true;
|
|
264
|
+
}
|
|
265
|
+
return false;
|
|
266
|
+
}
|
|
267
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
268
|
+
return true;
|
|
269
|
+
}
|
|
270
|
+
return slotName === "";
|
|
271
|
+
};
|
|
208
272
|
var createTime = (fnName, tagName = "") => {
|
|
209
273
|
{
|
|
210
274
|
return () => {
|
|
@@ -396,7 +460,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
396
460
|
}
|
|
397
461
|
if (!appliedStyles.has(scopeId2)) {
|
|
398
462
|
{
|
|
399
|
-
styleElm = doc.createElement("style");
|
|
463
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
400
464
|
styleElm.innerHTML = style;
|
|
401
465
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
402
466
|
if (nonce != null) {
|
|
@@ -458,9 +522,19 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
458
522
|
if (memberName === "class") {
|
|
459
523
|
const classList = elm.classList;
|
|
460
524
|
const oldClasses = parseClassList(oldValue);
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
525
|
+
let newClasses = parseClassList(newValue);
|
|
526
|
+
if (elm["s-si"]) {
|
|
527
|
+
newClasses.push(elm["s-si"]);
|
|
528
|
+
oldClasses.forEach((c) => {
|
|
529
|
+
if (c.startsWith(elm["s-si"])) newClasses.push(c);
|
|
530
|
+
});
|
|
531
|
+
newClasses = [...new Set(newClasses)];
|
|
532
|
+
classList.add(...newClasses);
|
|
533
|
+
delete elm["s-si"];
|
|
534
|
+
} else {
|
|
535
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
536
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
537
|
+
}
|
|
464
538
|
} else if (memberName === "style") {
|
|
465
539
|
{
|
|
466
540
|
for (const prop in oldValue) {
|
|
@@ -515,7 +589,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
515
589
|
elm.setAttribute(memberName, n);
|
|
516
590
|
}
|
|
517
591
|
}
|
|
518
|
-
} else {
|
|
592
|
+
} else if (elm[memberName] !== newValue) {
|
|
519
593
|
elm[memberName] = newValue;
|
|
520
594
|
}
|
|
521
595
|
} catch (e) {
|
|
@@ -537,15 +611,23 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
537
611
|
}
|
|
538
612
|
};
|
|
539
613
|
var parseClassListRegex = /\s/;
|
|
540
|
-
var parseClassList = (value) =>
|
|
614
|
+
var parseClassList = (value) => {
|
|
615
|
+
if (typeof value === "object" && "baseVal" in value) {
|
|
616
|
+
value = value.baseVal;
|
|
617
|
+
}
|
|
618
|
+
if (!value) {
|
|
619
|
+
return [];
|
|
620
|
+
}
|
|
621
|
+
return value.split(parseClassListRegex);
|
|
622
|
+
};
|
|
541
623
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
542
624
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
543
625
|
|
|
544
626
|
// src/runtime/vdom/update-element.ts
|
|
545
627
|
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
546
628
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
547
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
548
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
629
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
630
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
549
631
|
{
|
|
550
632
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
551
633
|
if (!(memberName in newVnodeAttrs)) {
|
|
@@ -566,16 +648,13 @@ function sortedAttrNames(attrNames) {
|
|
|
566
648
|
attrNames
|
|
567
649
|
);
|
|
568
650
|
}
|
|
569
|
-
|
|
570
|
-
// src/runtime/vdom/vdom-render.ts
|
|
571
|
-
var scopeId;
|
|
572
651
|
var contentRef;
|
|
573
652
|
var hostTagName;
|
|
574
653
|
var useNativeShadowDom = false;
|
|
575
654
|
var checkSlotFallbackVisibility = false;
|
|
576
655
|
var checkSlotRelocate = false;
|
|
577
656
|
var isSvgMode = false;
|
|
578
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
657
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
579
658
|
var _a;
|
|
580
659
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
581
660
|
let i2 = 0;
|
|
@@ -615,11 +694,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
615
694
|
{
|
|
616
695
|
updateElement(null, newVNode2, isSvgMode);
|
|
617
696
|
}
|
|
618
|
-
const rootNode = elm.getRootNode();
|
|
619
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
620
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
621
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
622
|
-
}
|
|
623
697
|
if (newVNode2.$children$) {
|
|
624
698
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
625
699
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -655,7 +729,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
655
729
|
};
|
|
656
730
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
657
731
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
658
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
732
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
659
733
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
660
734
|
let node = parentElm;
|
|
661
735
|
while (node = node.nextSibling) {
|
|
@@ -667,7 +741,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
667
741
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
668
742
|
const childNode = oldSlotChildNodes[i2];
|
|
669
743
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
670
|
-
insertBefore(
|
|
744
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
671
745
|
childNode["s-ol"].remove();
|
|
672
746
|
childNode["s-ol"] = void 0;
|
|
673
747
|
childNode["s-sh"] = void 0;
|
|
@@ -783,7 +857,11 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
783
857
|
}
|
|
784
858
|
if (node) {
|
|
785
859
|
{
|
|
786
|
-
insertBefore(
|
|
860
|
+
insertBefore(
|
|
861
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
862
|
+
node,
|
|
863
|
+
referenceNode(oldStartVnode.$elm$)
|
|
864
|
+
);
|
|
787
865
|
}
|
|
788
866
|
}
|
|
789
867
|
}
|
|
@@ -804,28 +882,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
804
882
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
805
883
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
806
884
|
if (leftVNode.$tag$ === "slot") {
|
|
807
|
-
if (
|
|
808
|
-
// The component gets hydrated and no VDOM has been initialized.
|
|
809
|
-
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
810
|
-
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
|
811
|
-
// hydration comments to be removed
|
|
812
|
-
leftVNode.$elm$.nodeType !== 8
|
|
813
|
-
) {
|
|
814
|
-
return false;
|
|
815
|
-
}
|
|
816
885
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
817
886
|
}
|
|
818
887
|
if (!isInitialRender) {
|
|
819
888
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
820
889
|
}
|
|
890
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
891
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
892
|
+
}
|
|
821
893
|
return true;
|
|
822
894
|
}
|
|
823
895
|
return false;
|
|
824
896
|
};
|
|
825
|
-
var referenceNode = (node) =>
|
|
826
|
-
return node && node["s-ol"] || node;
|
|
827
|
-
};
|
|
828
|
-
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
897
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
829
898
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
830
899
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
831
900
|
const oldChildren = oldVNode.$children$;
|
|
@@ -864,41 +933,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
864
933
|
elm.data = text;
|
|
865
934
|
}
|
|
866
935
|
};
|
|
867
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
868
|
-
const childNodes = elm.childNodes;
|
|
869
|
-
for (const childNode of childNodes) {
|
|
870
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
871
|
-
if (childNode["s-sr"]) {
|
|
872
|
-
const slotName = childNode["s-sn"];
|
|
873
|
-
childNode.hidden = false;
|
|
874
|
-
for (const siblingNode of childNodes) {
|
|
875
|
-
if (siblingNode !== childNode) {
|
|
876
|
-
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
877
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
878
|
-
childNode.hidden = true;
|
|
879
|
-
break;
|
|
880
|
-
}
|
|
881
|
-
} else {
|
|
882
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
883
|
-
childNode.hidden = true;
|
|
884
|
-
break;
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
updateFallbackSlotVisibility(childNode);
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
};
|
|
894
936
|
var relocateNodes = [];
|
|
895
937
|
var markSlotContentForRelocation = (elm) => {
|
|
896
938
|
let node;
|
|
897
939
|
let hostContentNodes;
|
|
898
940
|
let j;
|
|
899
|
-
|
|
941
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
942
|
+
for (const childNode of children) {
|
|
900
943
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
901
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
944
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
902
945
|
const slotName = childNode["s-sn"];
|
|
903
946
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
904
947
|
node = hostContentNodes[j];
|
|
@@ -940,24 +983,10 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
940
983
|
}
|
|
941
984
|
}
|
|
942
985
|
};
|
|
943
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
944
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
945
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
946
|
-
return true;
|
|
947
|
-
}
|
|
948
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
949
|
-
return true;
|
|
950
|
-
}
|
|
951
|
-
return false;
|
|
952
|
-
}
|
|
953
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
954
|
-
return true;
|
|
955
|
-
}
|
|
956
|
-
return slotName === "";
|
|
957
|
-
};
|
|
958
986
|
var insertBefore = (parent, newNode, reference) => {
|
|
959
|
-
|
|
960
|
-
|
|
987
|
+
{
|
|
988
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
989
|
+
}
|
|
961
990
|
};
|
|
962
991
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
963
992
|
var _a, _b, _c, _d;
|
|
@@ -1004,7 +1033,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1004
1033
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1005
1034
|
while (orgLocationNode) {
|
|
1006
1035
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1007
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1036
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1008
1037
|
refNode = refNode.nextSibling;
|
|
1009
1038
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1010
1039
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1017,13 +1046,15 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1017
1046
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1018
1047
|
}
|
|
1019
1048
|
}
|
|
1020
|
-
|
|
1049
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1050
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1051
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1021
1052
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1022
1053
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1023
1054
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1024
1055
|
}
|
|
1025
1056
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1026
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1057
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1027
1058
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1028
1059
|
}
|
|
1029
1060
|
}
|
|
@@ -1051,7 +1082,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1051
1082
|
// src/runtime/update-component.ts
|
|
1052
1083
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1053
1084
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1054
|
-
ancestorComponent["s-p"].push(
|
|
1085
|
+
const index = ancestorComponent["s-p"].push(
|
|
1086
|
+
new Promise(
|
|
1087
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1088
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1089
|
+
r();
|
|
1090
|
+
}
|
|
1091
|
+
)
|
|
1092
|
+
);
|
|
1055
1093
|
}
|
|
1056
1094
|
};
|
|
1057
1095
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1147,7 +1185,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1147
1185
|
addHydratedFlag(elm);
|
|
1148
1186
|
}
|
|
1149
1187
|
{
|
|
1150
|
-
safeCall(instance, "componentDidLoad");
|
|
1188
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
1151
1189
|
}
|
|
1152
1190
|
endPostUpdate();
|
|
1153
1191
|
{
|
|
@@ -1176,12 +1214,12 @@ var appDidLoad = (who) => {
|
|
|
1176
1214
|
}
|
|
1177
1215
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1178
1216
|
};
|
|
1179
|
-
var safeCall = (instance, method, arg) => {
|
|
1217
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1180
1218
|
if (instance && instance[method]) {
|
|
1181
1219
|
try {
|
|
1182
1220
|
return instance[method](arg);
|
|
1183
1221
|
} catch (e) {
|
|
1184
|
-
consoleError(e);
|
|
1222
|
+
consoleError(e, elm);
|
|
1185
1223
|
}
|
|
1186
1224
|
}
|
|
1187
1225
|
return void 0;
|
|
@@ -1240,15 +1278,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1240
1278
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1241
1279
|
members.map(([memberName, [memberFlags]]) => {
|
|
1242
1280
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1281
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1282
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1283
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1284
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1285
|
+
Object.defineProperty(prototype, memberName, {
|
|
1286
|
+
get() {
|
|
1287
|
+
{
|
|
1288
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1289
|
+
return getValue(this, memberName);
|
|
1290
|
+
}
|
|
1291
|
+
const ref = getHostRef(this);
|
|
1292
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1293
|
+
if (!instance) return;
|
|
1294
|
+
return instance[memberName];
|
|
1295
|
+
}
|
|
1296
|
+
},
|
|
1297
|
+
configurable: true,
|
|
1298
|
+
enumerable: true
|
|
1299
|
+
});
|
|
1300
|
+
}
|
|
1243
1301
|
Object.defineProperty(prototype, memberName, {
|
|
1244
|
-
get() {
|
|
1245
|
-
return getValue(this, memberName);
|
|
1246
|
-
},
|
|
1247
1302
|
set(newValue) {
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1303
|
+
const ref = getHostRef(this);
|
|
1304
|
+
if (origSetter) {
|
|
1305
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1306
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1307
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1308
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1309
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1310
|
+
}
|
|
1311
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1312
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1313
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1314
|
+
return;
|
|
1315
|
+
}
|
|
1316
|
+
{
|
|
1317
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1318
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1319
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1320
|
+
ref.$onReadyPromise$.then(() => {
|
|
1321
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1322
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1323
|
+
}
|
|
1324
|
+
});
|
|
1325
|
+
}
|
|
1326
|
+
return;
|
|
1327
|
+
}
|
|
1328
|
+
const setterSetVal = () => {
|
|
1329
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1330
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1331
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1332
|
+
}
|
|
1333
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1334
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1335
|
+
};
|
|
1336
|
+
if (ref.$lazyInstance$) {
|
|
1337
|
+
setterSetVal();
|
|
1338
|
+
} else {
|
|
1339
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1252
1343
|
});
|
|
1253
1344
|
}
|
|
1254
1345
|
});
|
|
@@ -1258,7 +1349,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1258
1349
|
plt.jmp(() => {
|
|
1259
1350
|
var _a2;
|
|
1260
1351
|
const propName = attrNameToPropName.get(attrName);
|
|
1261
|
-
if (this.hasOwnProperty(propName)) {
|
|
1352
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1262
1353
|
newValue = this[propName];
|
|
1263
1354
|
delete this[propName];
|
|
1264
1355
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1278,7 +1369,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1278
1369
|
}
|
|
1279
1370
|
return;
|
|
1280
1371
|
}
|
|
1281
|
-
|
|
1372
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1373
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1374
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1375
|
+
this[propName] = newValue;
|
|
1376
|
+
}
|
|
1282
1377
|
});
|
|
1283
1378
|
};
|
|
1284
1379
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1301,9 +1396,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1301
1396
|
let Cstr;
|
|
1302
1397
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1303
1398
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1399
|
+
{
|
|
1400
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1307
1401
|
if (CstrImport && "then" in CstrImport) {
|
|
1308
1402
|
const endLoad = uniqueTime();
|
|
1309
1403
|
Cstr = await CstrImport;
|
|
@@ -1328,7 +1422,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1328
1422
|
try {
|
|
1329
1423
|
new Cstr(hostRef);
|
|
1330
1424
|
} catch (e) {
|
|
1331
|
-
consoleError(e);
|
|
1425
|
+
consoleError(e, elm);
|
|
1332
1426
|
}
|
|
1333
1427
|
{
|
|
1334
1428
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1337,11 +1431,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1337
1431
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1338
1432
|
}
|
|
1339
1433
|
endNewInstance();
|
|
1340
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1341
|
-
} else {
|
|
1342
|
-
Cstr = elm.constructor;
|
|
1343
|
-
const cmpTag = elm.localName;
|
|
1344
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1434
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1345
1435
|
}
|
|
1346
1436
|
if (Cstr && Cstr.style) {
|
|
1347
1437
|
let style;
|
|
@@ -1364,9 +1454,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1364
1454
|
schedule();
|
|
1365
1455
|
}
|
|
1366
1456
|
};
|
|
1367
|
-
var fireConnectedCallback = (instance) => {
|
|
1457
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1368
1458
|
{
|
|
1369
|
-
safeCall(instance, "connectedCallback");
|
|
1459
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1370
1460
|
}
|
|
1371
1461
|
};
|
|
1372
1462
|
|
|
@@ -1407,9 +1497,9 @@ var connectedCallback = (elm) => {
|
|
|
1407
1497
|
}
|
|
1408
1498
|
} else {
|
|
1409
1499
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1410
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1500
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1411
1501
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1412
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
1502
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1413
1503
|
}
|
|
1414
1504
|
}
|
|
1415
1505
|
endConnected();
|
|
@@ -1422,20 +1512,26 @@ var setContentReference = (elm) => {
|
|
|
1422
1512
|
contentRefElm["s-cn"] = true;
|
|
1423
1513
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1424
1514
|
};
|
|
1425
|
-
var disconnectInstance = (instance) => {
|
|
1515
|
+
var disconnectInstance = (instance, elm) => {
|
|
1426
1516
|
{
|
|
1427
|
-
safeCall(instance, "disconnectedCallback");
|
|
1517
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1428
1518
|
}
|
|
1429
1519
|
};
|
|
1430
1520
|
var disconnectedCallback = async (elm) => {
|
|
1431
1521
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1432
1522
|
const hostRef = getHostRef(elm);
|
|
1433
1523
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1434
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1524
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1435
1525
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1436
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1526
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1437
1527
|
}
|
|
1438
1528
|
}
|
|
1529
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1530
|
+
rootAppliedStyles.delete(elm);
|
|
1531
|
+
}
|
|
1532
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1533
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1534
|
+
}
|
|
1439
1535
|
};
|
|
1440
1536
|
|
|
1441
1537
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1498,6 +1594,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1498
1594
|
}
|
|
1499
1595
|
disconnectedCallback() {
|
|
1500
1596
|
plt.jmp(() => disconnectedCallback(this));
|
|
1597
|
+
plt.raf(() => {
|
|
1598
|
+
var _a3;
|
|
1599
|
+
const hostRef = getHostRef(this);
|
|
1600
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1601
|
+
delete hostRef.$vnode$.$elm$;
|
|
1602
|
+
}
|
|
1603
|
+
});
|
|
1501
1604
|
}
|
|
1502
1605
|
componentOnReady() {
|
|
1503
1606
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1555,4 +1658,4 @@ exports.promiseResolve = promiseResolve;
|
|
|
1555
1658
|
exports.registerInstance = registerInstance;
|
|
1556
1659
|
exports.setNonce = setNonce;
|
|
1557
1660
|
|
|
1558
|
-
//# sourceMappingURL=index-
|
|
1661
|
+
//# sourceMappingURL=index-d4b4a45e.js.map
|