@everymatrix/nuts-inbox-widget 1.54.11 → 1.55.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/dist/cjs/{index-5e13b80a.js → index-43ce2388.js} +74 -177
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/nuts-inbox-widget.cjs.js +2 -2
- package/dist/cjs/nuts-inbox-widget_3.cjs.entry.js +59 -51
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/nuts-inbox-widget/nuts-inbox-widget.js +19 -57
- package/dist/collection/components/nuts-notification/nuts-notification.js +24 -50
- package/dist/collection/components/nuts-popover/nuts-popover.js +15 -33
- package/dist/esm/{index-e14bfa46.js → index-90fc4db5.js} +74 -177
- package/dist/esm/loader.js +2 -2
- package/dist/esm/nuts-inbox-widget.js +3 -3
- package/dist/esm/nuts-inbox-widget_3.entry.js +59 -51
- package/dist/nuts-inbox-widget/nuts-inbox-widget.esm.js +1 -1
- package/dist/nuts-inbox-widget/p-3a5589e2.entry.js +1 -0
- package/dist/nuts-inbox-widget/p-6148a470.js +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/nuts-inbox-widget/p-af9bcff0.js +0 -2
- package/dist/nuts-inbox-widget/p-fc6b9468.entry.js +0 -1
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/stencil.config.d.ts +0 -2
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/stencil.config.dev.d.ts +0 -2
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -3,17 +3,6 @@ import { translate, getTranslations } from "../../utils/locale.utils";
|
|
|
3
3
|
import { getNotifications, markAllAsRead } from "../../api/methods";
|
|
4
4
|
export class NutsPopover {
|
|
5
5
|
constructor() {
|
|
6
|
-
/**
|
|
7
|
-
* Custom styling string
|
|
8
|
-
*/
|
|
9
|
-
this.clientStyling = '';
|
|
10
|
-
/**
|
|
11
|
-
* Translations via URL
|
|
12
|
-
*/
|
|
13
|
-
this.translationUrl = '';
|
|
14
|
-
this.isLoading = true;
|
|
15
|
-
this.showMarkAll = false;
|
|
16
|
-
this.limitStylingAppends = false;
|
|
17
6
|
this.currentPage = 0;
|
|
18
7
|
this.updateNotificationsDataAfterPageChange = (getNotificationsData) => {
|
|
19
8
|
this.isLoading = getNotificationsData.isLoading;
|
|
@@ -69,6 +58,21 @@ export class NutsPopover {
|
|
|
69
58
|
this.assignRefToStylingContainer = (ref) => {
|
|
70
59
|
this.stylingContainer = ref;
|
|
71
60
|
};
|
|
61
|
+
this.language = undefined;
|
|
62
|
+
this.userId = undefined;
|
|
63
|
+
this.operatorId = undefined;
|
|
64
|
+
this.token = undefined;
|
|
65
|
+
this.sessionId = undefined;
|
|
66
|
+
this.backendUrl = undefined;
|
|
67
|
+
this.unseenCount = undefined;
|
|
68
|
+
this.clientStylingUrl = undefined;
|
|
69
|
+
this.notificationAction = undefined;
|
|
70
|
+
this.clientStyling = '';
|
|
71
|
+
this.translationUrl = '';
|
|
72
|
+
this.notifications = undefined;
|
|
73
|
+
this.isLoading = true;
|
|
74
|
+
this.showMarkAll = false;
|
|
75
|
+
this.limitStylingAppends = false;
|
|
72
76
|
}
|
|
73
77
|
messageDeteledHandler(event) {
|
|
74
78
|
this.notifications = this.notifications.filter((item) => {
|
|
@@ -171,8 +175,6 @@ export class NutsPopover {
|
|
|
171
175
|
"tags": [],
|
|
172
176
|
"text": "Language code of the content"
|
|
173
177
|
},
|
|
174
|
-
"getter": false,
|
|
175
|
-
"setter": false,
|
|
176
178
|
"attribute": "language",
|
|
177
179
|
"reflect": true
|
|
178
180
|
},
|
|
@@ -190,8 +192,6 @@ export class NutsPopover {
|
|
|
190
192
|
"tags": [],
|
|
191
193
|
"text": "Unique ID of the user receiving notifications"
|
|
192
194
|
},
|
|
193
|
-
"getter": false,
|
|
194
|
-
"setter": false,
|
|
195
195
|
"attribute": "user-id",
|
|
196
196
|
"reflect": true
|
|
197
197
|
},
|
|
@@ -209,8 +209,6 @@ export class NutsPopover {
|
|
|
209
209
|
"tags": [],
|
|
210
210
|
"text": "Unique ID of the operator domain"
|
|
211
211
|
},
|
|
212
|
-
"getter": false,
|
|
213
|
-
"setter": false,
|
|
214
212
|
"attribute": "operator-id",
|
|
215
213
|
"reflect": true
|
|
216
214
|
},
|
|
@@ -228,8 +226,6 @@ export class NutsPopover {
|
|
|
228
226
|
"tags": [],
|
|
229
227
|
"text": "Token used to authenticate notification transactions"
|
|
230
228
|
},
|
|
231
|
-
"getter": false,
|
|
232
|
-
"setter": false,
|
|
233
229
|
"attribute": "token",
|
|
234
230
|
"reflect": true
|
|
235
231
|
},
|
|
@@ -247,8 +243,6 @@ export class NutsPopover {
|
|
|
247
243
|
"tags": [],
|
|
248
244
|
"text": "The sessionID of the user"
|
|
249
245
|
},
|
|
250
|
-
"getter": false,
|
|
251
|
-
"setter": false,
|
|
252
246
|
"attribute": "session-id",
|
|
253
247
|
"reflect": true
|
|
254
248
|
},
|
|
@@ -266,8 +260,6 @@ export class NutsPopover {
|
|
|
266
260
|
"tags": [],
|
|
267
261
|
"text": "Endpoint used for notification transactions"
|
|
268
262
|
},
|
|
269
|
-
"getter": false,
|
|
270
|
-
"setter": false,
|
|
271
263
|
"attribute": "backend-url",
|
|
272
264
|
"reflect": true
|
|
273
265
|
},
|
|
@@ -285,8 +277,6 @@ export class NutsPopover {
|
|
|
285
277
|
"tags": [],
|
|
286
278
|
"text": "The count of unseen notifications"
|
|
287
279
|
},
|
|
288
|
-
"getter": false,
|
|
289
|
-
"setter": false,
|
|
290
280
|
"attribute": "unseen-count",
|
|
291
281
|
"reflect": true
|
|
292
282
|
},
|
|
@@ -304,8 +294,6 @@ export class NutsPopover {
|
|
|
304
294
|
"tags": [],
|
|
305
295
|
"text": "Custom styling URL"
|
|
306
296
|
},
|
|
307
|
-
"getter": false,
|
|
308
|
-
"setter": false,
|
|
309
297
|
"attribute": "client-styling-url",
|
|
310
298
|
"reflect": true
|
|
311
299
|
},
|
|
@@ -323,8 +311,6 @@ export class NutsPopover {
|
|
|
323
311
|
"tags": [],
|
|
324
312
|
"text": "Decides the behaviour of the notification onClick"
|
|
325
313
|
},
|
|
326
|
-
"getter": false,
|
|
327
|
-
"setter": false,
|
|
328
314
|
"attribute": "notification-action",
|
|
329
315
|
"reflect": true
|
|
330
316
|
},
|
|
@@ -342,8 +328,6 @@ export class NutsPopover {
|
|
|
342
328
|
"tags": [],
|
|
343
329
|
"text": "Custom styling string"
|
|
344
330
|
},
|
|
345
|
-
"getter": false,
|
|
346
|
-
"setter": false,
|
|
347
331
|
"attribute": "client-styling",
|
|
348
332
|
"reflect": true,
|
|
349
333
|
"defaultValue": "''"
|
|
@@ -362,8 +346,6 @@ export class NutsPopover {
|
|
|
362
346
|
"tags": [],
|
|
363
347
|
"text": "Translations via URL"
|
|
364
348
|
},
|
|
365
|
-
"getter": false,
|
|
366
|
-
"setter": false,
|
|
367
349
|
"attribute": "translation-url",
|
|
368
350
|
"reflect": true,
|
|
369
351
|
"defaultValue": "''"
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
const NAMESPACE = 'nuts-inbox-widget';
|
|
2
|
-
const BUILD = /* nuts-inbox-widget */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, 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,
|
|
2
|
+
const BUILD = /* nuts-inbox-widget */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, 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: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __export = (target, all) => {
|
|
9
9
|
for (var name in all)
|
|
10
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
// src/utils/constants.ts
|
|
14
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
15
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
16
|
-
|
|
17
|
-
// src/client/client-host-ref.ts
|
|
18
12
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
19
13
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
20
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
21
|
-
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
22
|
-
};
|
|
14
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
23
15
|
var registerHost = (hostElement, cmpMeta) => {
|
|
24
16
|
const hostRef = {
|
|
25
17
|
$flags$: 0,
|
|
@@ -32,8 +24,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
32
24
|
hostElement["s-p"] = [];
|
|
33
25
|
hostElement["s-rc"] = [];
|
|
34
26
|
}
|
|
35
|
-
|
|
36
|
-
return ref;
|
|
27
|
+
return hostRefs.set(hostElement, hostRef);
|
|
37
28
|
};
|
|
38
29
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
39
30
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -70,22 +61,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
70
61
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
71
62
|
/* webpackMode: "lazy" */
|
|
72
63
|
`./${bundleId}.entry.js${""}`
|
|
73
|
-
).then(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
cmpModules.set(bundleId, importedModule);
|
|
77
|
-
}
|
|
78
|
-
return importedModule[exportName];
|
|
79
|
-
},
|
|
80
|
-
(e) => {
|
|
81
|
-
consoleError(e, hostRef.$hostElement$);
|
|
64
|
+
).then((importedModule) => {
|
|
65
|
+
{
|
|
66
|
+
cmpModules.set(bundleId, importedModule);
|
|
82
67
|
}
|
|
83
|
-
|
|
68
|
+
return importedModule[exportName];
|
|
69
|
+
}, consoleError);
|
|
84
70
|
};
|
|
85
71
|
|
|
86
72
|
// src/client/client-style.ts
|
|
87
73
|
var styles = /* @__PURE__ */ new Map();
|
|
88
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
89
74
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
90
75
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
91
76
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -159,6 +144,14 @@ var flush = () => {
|
|
|
159
144
|
};
|
|
160
145
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
161
146
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
147
|
+
|
|
148
|
+
// src/utils/constants.ts
|
|
149
|
+
var EMPTY_OBJ = {};
|
|
150
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
151
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
152
|
+
|
|
153
|
+
// src/utils/helpers.ts
|
|
154
|
+
var isDef = (v) => v != null;
|
|
162
155
|
var isComplexType = (o) => {
|
|
163
156
|
o = typeof o;
|
|
164
157
|
return o === "object" || o === "function";
|
|
@@ -362,7 +355,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
362
355
|
}
|
|
363
356
|
if (!appliedStyles.has(scopeId2)) {
|
|
364
357
|
{
|
|
365
|
-
styleElm =
|
|
358
|
+
styleElm = doc.createElement("style");
|
|
366
359
|
styleElm.innerHTML = style;
|
|
367
360
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
368
361
|
if (nonce != null) {
|
|
@@ -372,10 +365,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
372
365
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
373
366
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
374
367
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
375
|
-
styleContainerNode.insertBefore(
|
|
376
|
-
styleElm,
|
|
377
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
378
|
-
);
|
|
368
|
+
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
379
369
|
} else if ("host" in styleContainerNode) {
|
|
380
370
|
if (supportsConstructableStylesheets) {
|
|
381
371
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -393,7 +383,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
393
383
|
styleContainerNode.append(styleElm);
|
|
394
384
|
}
|
|
395
385
|
}
|
|
396
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
386
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
397
387
|
styleContainerNode.insertBefore(styleElm, null);
|
|
398
388
|
}
|
|
399
389
|
}
|
|
@@ -418,25 +408,23 @@ var attachStyles = (hostRef) => {
|
|
|
418
408
|
const scopeId2 = addStyle(
|
|
419
409
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
420
410
|
cmpMeta);
|
|
421
|
-
if (
|
|
411
|
+
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
422
412
|
elm["s-sc"] = scopeId2;
|
|
423
413
|
elm.classList.add(scopeId2 + "-h");
|
|
424
414
|
}
|
|
425
415
|
endAttachStyles();
|
|
426
416
|
};
|
|
427
417
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
428
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
418
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
429
419
|
if (oldValue !== newValue) {
|
|
430
420
|
let isProp = isMemberInElement(elm, memberName);
|
|
431
421
|
let ln = memberName.toLowerCase();
|
|
432
422
|
if (memberName === "class") {
|
|
433
423
|
const classList = elm.classList;
|
|
434
424
|
const oldClasses = parseClassList(oldValue);
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
439
|
-
}
|
|
425
|
+
const newClasses = parseClassList(newValue);
|
|
426
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
427
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
440
428
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
441
429
|
if (newValue) {
|
|
442
430
|
newValue(elm);
|
|
@@ -474,7 +462,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
474
462
|
elm.setAttribute(memberName, n);
|
|
475
463
|
}
|
|
476
464
|
}
|
|
477
|
-
} else
|
|
465
|
+
} else {
|
|
478
466
|
elm[memberName] = newValue;
|
|
479
467
|
}
|
|
480
468
|
} catch (e) {
|
|
@@ -496,44 +484,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
496
484
|
}
|
|
497
485
|
};
|
|
498
486
|
var parseClassListRegex = /\s/;
|
|
499
|
-
var parseClassList = (value) =>
|
|
500
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
501
|
-
value = value.baseVal;
|
|
502
|
-
}
|
|
503
|
-
if (!value || typeof value !== "string") {
|
|
504
|
-
return [];
|
|
505
|
-
}
|
|
506
|
-
return value.split(parseClassListRegex);
|
|
507
|
-
};
|
|
487
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
508
488
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
509
489
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
510
490
|
|
|
511
491
|
// src/runtime/vdom/update-element.ts
|
|
512
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
492
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
513
493
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
514
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
515
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
494
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
495
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
516
496
|
{
|
|
517
497
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
518
498
|
if (!(memberName in newVnodeAttrs)) {
|
|
519
|
-
setAccessor(
|
|
520
|
-
elm,
|
|
521
|
-
memberName,
|
|
522
|
-
oldVnodeAttrs[memberName],
|
|
523
|
-
void 0,
|
|
524
|
-
isSvgMode2,
|
|
525
|
-
newVnode.$flags$);
|
|
499
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
526
500
|
}
|
|
527
501
|
}
|
|
528
502
|
}
|
|
529
503
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
530
|
-
setAccessor(
|
|
531
|
-
elm,
|
|
532
|
-
memberName,
|
|
533
|
-
oldVnodeAttrs[memberName],
|
|
534
|
-
newVnodeAttrs[memberName],
|
|
535
|
-
isSvgMode2,
|
|
536
|
-
newVnode.$flags$);
|
|
504
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
537
505
|
}
|
|
538
506
|
};
|
|
539
507
|
function sortedAttrNames(attrNames) {
|
|
@@ -545,10 +513,13 @@ function sortedAttrNames(attrNames) {
|
|
|
545
513
|
attrNames
|
|
546
514
|
);
|
|
547
515
|
}
|
|
516
|
+
|
|
517
|
+
// src/runtime/vdom/vdom-render.ts
|
|
518
|
+
var scopeId;
|
|
548
519
|
var hostTagName;
|
|
549
520
|
var useNativeShadowDom = false;
|
|
550
521
|
var isSvgMode = false;
|
|
551
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
522
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
552
523
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
553
524
|
let i2 = 0;
|
|
554
525
|
let elm;
|
|
@@ -569,6 +540,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
569
540
|
{
|
|
570
541
|
updateElement(null, newVNode2, isSvgMode);
|
|
571
542
|
}
|
|
543
|
+
const rootNode = elm.getRootNode();
|
|
544
|
+
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
545
|
+
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
546
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
547
|
+
}
|
|
572
548
|
if (newVNode2.$children$) {
|
|
573
549
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
574
550
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -705,9 +681,6 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
705
681
|
if (!isInitialRender) {
|
|
706
682
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
707
683
|
}
|
|
708
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
709
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
710
|
-
}
|
|
711
684
|
return true;
|
|
712
685
|
}
|
|
713
686
|
return false;
|
|
@@ -754,9 +727,8 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
754
727
|
}
|
|
755
728
|
};
|
|
756
729
|
var insertBefore = (parent, newNode, reference) => {
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
}
|
|
730
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
731
|
+
return inserted;
|
|
760
732
|
};
|
|
761
733
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
762
734
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -781,21 +753,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
781
753
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
782
754
|
hostRef.$vnode$ = rootVnode;
|
|
783
755
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
784
|
-
|
|
756
|
+
{
|
|
757
|
+
scopeId = hostElm["s-sc"];
|
|
758
|
+
}
|
|
759
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
785
760
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
786
761
|
};
|
|
787
762
|
|
|
788
763
|
// src/runtime/update-component.ts
|
|
789
764
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
790
765
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
791
|
-
|
|
792
|
-
new Promise(
|
|
793
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
794
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
795
|
-
r();
|
|
796
|
-
}
|
|
797
|
-
)
|
|
798
|
-
);
|
|
766
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
799
767
|
}
|
|
800
768
|
};
|
|
801
769
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -824,12 +792,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
824
792
|
{
|
|
825
793
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
826
794
|
if (hostRef.$queuedListeners$) {
|
|
827
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event
|
|
795
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
828
796
|
hostRef.$queuedListeners$ = void 0;
|
|
829
797
|
}
|
|
830
798
|
}
|
|
831
799
|
{
|
|
832
|
-
maybePromise = safeCall(instance, "componentWillLoad"
|
|
800
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
|
833
801
|
}
|
|
834
802
|
}
|
|
835
803
|
endSchedule();
|
|
@@ -898,7 +866,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
898
866
|
const instance = hostRef.$lazyInstance$ ;
|
|
899
867
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
900
868
|
{
|
|
901
|
-
safeCall(instance, "componentDidRender"
|
|
869
|
+
safeCall(instance, "componentDidRender");
|
|
902
870
|
}
|
|
903
871
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
904
872
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -927,14 +895,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
927
895
|
}
|
|
928
896
|
};
|
|
929
897
|
var appDidLoad = (who) => {
|
|
898
|
+
{
|
|
899
|
+
addHydratedFlag(doc.documentElement);
|
|
900
|
+
}
|
|
930
901
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
931
902
|
};
|
|
932
|
-
var safeCall = (instance, method, arg
|
|
903
|
+
var safeCall = (instance, method, arg) => {
|
|
933
904
|
if (instance && instance[method]) {
|
|
934
905
|
try {
|
|
935
906
|
return instance[method](arg);
|
|
936
907
|
} catch (e) {
|
|
937
|
-
consoleError(e
|
|
908
|
+
consoleError(e);
|
|
938
909
|
}
|
|
939
910
|
}
|
|
940
911
|
return void 0;
|
|
@@ -993,68 +964,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
993
964
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
994
965
|
members.map(([memberName, [memberFlags]]) => {
|
|
995
966
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
996
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
997
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
998
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
999
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1000
|
-
Object.defineProperty(prototype, memberName, {
|
|
1001
|
-
get() {
|
|
1002
|
-
{
|
|
1003
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1004
|
-
return getValue(this, memberName);
|
|
1005
|
-
}
|
|
1006
|
-
const ref = getHostRef(this);
|
|
1007
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1008
|
-
if (!instance) return;
|
|
1009
|
-
return instance[memberName];
|
|
1010
|
-
}
|
|
1011
|
-
},
|
|
1012
|
-
configurable: true,
|
|
1013
|
-
enumerable: true
|
|
1014
|
-
});
|
|
1015
|
-
}
|
|
1016
967
|
Object.defineProperty(prototype, memberName, {
|
|
968
|
+
get() {
|
|
969
|
+
return getValue(this, memberName);
|
|
970
|
+
},
|
|
1017
971
|
set(newValue) {
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
1023
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1024
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1025
|
-
}
|
|
1026
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1027
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1028
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1029
|
-
return;
|
|
1030
|
-
}
|
|
1031
|
-
{
|
|
1032
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1033
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1034
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1035
|
-
ref.$onReadyPromise$.then(() => {
|
|
1036
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1037
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
1038
|
-
}
|
|
1039
|
-
});
|
|
1040
|
-
}
|
|
1041
|
-
return;
|
|
1042
|
-
}
|
|
1043
|
-
const setterSetVal = () => {
|
|
1044
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
1045
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1046
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1047
|
-
}
|
|
1048
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1049
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1050
|
-
};
|
|
1051
|
-
if (ref.$lazyInstance$) {
|
|
1052
|
-
setterSetVal();
|
|
1053
|
-
} else {
|
|
1054
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
|
-
}
|
|
972
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
973
|
+
},
|
|
974
|
+
configurable: true,
|
|
975
|
+
enumerable: true
|
|
1058
976
|
});
|
|
1059
977
|
}
|
|
1060
978
|
});
|
|
@@ -1064,7 +982,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1064
982
|
plt.jmp(() => {
|
|
1065
983
|
var _a2;
|
|
1066
984
|
const propName = attrNameToPropName.get(attrName);
|
|
1067
|
-
if (this.hasOwnProperty(propName)
|
|
985
|
+
if (this.hasOwnProperty(propName)) {
|
|
1068
986
|
newValue = this[propName];
|
|
1069
987
|
delete this[propName];
|
|
1070
988
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1084,11 +1002,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1084
1002
|
}
|
|
1085
1003
|
return;
|
|
1086
1004
|
}
|
|
1087
|
-
|
|
1088
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1089
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1090
|
-
this[propName] = newValue;
|
|
1091
|
-
}
|
|
1005
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1092
1006
|
});
|
|
1093
1007
|
};
|
|
1094
1008
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1117,7 +1031,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1117
1031
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1118
1032
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1119
1033
|
if (bundleId) {
|
|
1120
|
-
const CstrImport = loadModule(cmpMeta
|
|
1034
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1121
1035
|
if (CstrImport && "then" in CstrImport) {
|
|
1122
1036
|
const endLoad = uniqueTime();
|
|
1123
1037
|
Cstr = await CstrImport;
|
|
@@ -1142,7 +1056,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1142
1056
|
try {
|
|
1143
1057
|
new Cstr(hostRef);
|
|
1144
1058
|
} catch (e) {
|
|
1145
|
-
consoleError(e
|
|
1059
|
+
consoleError(e);
|
|
1146
1060
|
}
|
|
1147
1061
|
{
|
|
1148
1062
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1151,7 +1065,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1151
1065
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1152
1066
|
}
|
|
1153
1067
|
endNewInstance();
|
|
1154
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1068
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1155
1069
|
} else {
|
|
1156
1070
|
Cstr = elm.constructor;
|
|
1157
1071
|
const cmpTag = elm.localName;
|
|
@@ -1178,9 +1092,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1178
1092
|
schedule();
|
|
1179
1093
|
}
|
|
1180
1094
|
};
|
|
1181
|
-
var fireConnectedCallback = (instance
|
|
1095
|
+
var fireConnectedCallback = (instance) => {
|
|
1182
1096
|
{
|
|
1183
|
-
safeCall(instance, "connectedCallback"
|
|
1097
|
+
safeCall(instance, "connectedCallback");
|
|
1184
1098
|
}
|
|
1185
1099
|
};
|
|
1186
1100
|
|
|
@@ -1216,15 +1130,15 @@ var connectedCallback = (elm) => {
|
|
|
1216
1130
|
} else {
|
|
1217
1131
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1218
1132
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1219
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1133
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1220
1134
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1221
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
1135
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
|
|
1222
1136
|
}
|
|
1223
1137
|
}
|
|
1224
1138
|
endConnected();
|
|
1225
1139
|
}
|
|
1226
1140
|
};
|
|
1227
|
-
var disconnectInstance = (instance
|
|
1141
|
+
var disconnectInstance = (instance) => {
|
|
1228
1142
|
};
|
|
1229
1143
|
var disconnectedCallback = async (elm) => {
|
|
1230
1144
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1239,12 +1153,6 @@ var disconnectedCallback = async (elm) => {
|
|
|
1239
1153
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1240
1154
|
}
|
|
1241
1155
|
}
|
|
1242
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1243
|
-
rootAppliedStyles.delete(elm);
|
|
1244
|
-
}
|
|
1245
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1246
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1247
|
-
}
|
|
1248
1156
|
};
|
|
1249
1157
|
|
|
1250
1158
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1329,17 +1237,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1329
1237
|
}
|
|
1330
1238
|
disconnectedCallback() {
|
|
1331
1239
|
plt.jmp(() => disconnectedCallback(this));
|
|
1332
|
-
plt.raf(() => {
|
|
1333
|
-
var _a3;
|
|
1334
|
-
const hostRef = getHostRef(this);
|
|
1335
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1336
|
-
if (i2 > -1) {
|
|
1337
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
1338
|
-
}
|
|
1339
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1340
|
-
delete hostRef.$vnode$.$elm$;
|
|
1341
|
-
}
|
|
1342
|
-
});
|
|
1343
1240
|
}
|
|
1344
1241
|
componentOnReady() {
|
|
1345
1242
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1403,7 +1300,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1403
1300
|
}
|
|
1404
1301
|
}
|
|
1405
1302
|
} catch (e) {
|
|
1406
|
-
consoleError(e
|
|
1303
|
+
consoleError(e);
|
|
1407
1304
|
}
|
|
1408
1305
|
};
|
|
1409
1306
|
var getHostListenerTarget = (elm, flags) => {
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-90fc4db5.js';
|
|
2
|
+
export { s as setNonce } from './index-90fc4db5.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-90fc4db5.js';
|
|
2
|
+
export { s as setNonce } from './index-90fc4db5.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v4.
|
|
6
|
+
Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
var patchBrowser = () => {
|
|
9
9
|
const importMeta = import.meta.url;
|