@everymatrix/player-user-consents 1.56.0 → 1.56.2
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-2b0d6186.js → index-d9b72068.js} +69 -204
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/player-user-consents.cjs.entry.js +4 -30
- package/dist/cjs/player-user-consents.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/player-user-consents/player-user-consents.js +3 -49
- package/dist/esm/{index-ddeaee0b.js → index-bc209863.js} +69 -204
- package/dist/esm/loader.js +2 -2
- package/dist/esm/player-user-consents.entry.js +4 -30
- package/dist/esm/player-user-consents.js +3 -3
- package/dist/player-user-consents/p-8a55ff12.js +2 -0
- package/dist/player-user-consents/{p-2ea10158.entry.js → p-ca02b215.entry.js} +1 -1
- package/dist/player-user-consents/player-user-consents.esm.js +1 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/player-user-consents/.stencil/packages/stencil/player-user-consents/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/player-user-consents/.stencil/packages/stencil/player-user-consents/stencil.config.dev.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +0 -6
- package/package.json +1 -1
- package/dist/player-user-consents/p-97e255e9.js +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-user-consents/.stencil/packages/stencil/player-user-consents/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-user-consents/.stencil/packages/stencil/player-user-consents/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/player-user-consents/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/player-user-consents/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/player-user-consents/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/player-user-consents/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -3,45 +3,19 @@ import { getTranslations, translate } from "../../utils/locale.utils";
|
|
|
3
3
|
import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
|
|
4
4
|
export class PlayerUserConsents {
|
|
5
5
|
constructor() {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
6
|
+
this.goToTermsAndConditions = () => window.postMessage({ type: 'GoToTermsAndConditions' });
|
|
7
|
+
this.goToPrivacyPolicy = () => window.postMessage({ type: 'GoToPrivacyPolicy' });
|
|
9
8
|
this.lang = 'en';
|
|
10
|
-
/**
|
|
11
|
-
* 'true' when parent expects component to emit it's current value
|
|
12
|
-
*/
|
|
13
9
|
this.queried = false;
|
|
14
|
-
/**
|
|
15
|
-
* the type of the consent, used to determine render details
|
|
16
|
-
*/
|
|
17
10
|
this.consentType = '';
|
|
18
|
-
/**
|
|
19
|
-
* wether or not this consent is mandatory. Used for render details
|
|
20
|
-
*/
|
|
21
11
|
this.mandatory = false;
|
|
22
|
-
/**
|
|
23
|
-
* Select GM version
|
|
24
|
-
*/
|
|
25
12
|
this.gmVersion = '';
|
|
26
|
-
/**
|
|
27
|
-
* the title of the consent to be displayed
|
|
28
|
-
*/
|
|
29
13
|
this.consentTitle = '';
|
|
30
|
-
/**
|
|
31
|
-
* Client custom styling via inline style
|
|
32
|
-
*/
|
|
33
14
|
this.clientStyling = '';
|
|
34
|
-
/**
|
|
35
|
-
* Client custom styling via url
|
|
36
|
-
*/
|
|
37
15
|
this.clientStylingUrl = '';
|
|
38
|
-
/**
|
|
39
|
-
* Translation url
|
|
40
|
-
*/
|
|
41
16
|
this.translationUrl = '';
|
|
17
|
+
this.mbSource = undefined;
|
|
42
18
|
this.textContent = '';
|
|
43
|
-
this.goToTermsAndConditions = () => window.postMessage({ type: 'GoToTermsAndConditions' });
|
|
44
|
-
this.goToPrivacyPolicy = () => window.postMessage({ type: 'GoToPrivacyPolicy' });
|
|
45
19
|
}
|
|
46
20
|
handleNewTranslations() {
|
|
47
21
|
getTranslations(this.translationUrl);
|
|
@@ -128,8 +102,6 @@ export class PlayerUserConsents {
|
|
|
128
102
|
"tags": [],
|
|
129
103
|
"text": "Language"
|
|
130
104
|
},
|
|
131
|
-
"getter": false,
|
|
132
|
-
"setter": false,
|
|
133
105
|
"attribute": "lang",
|
|
134
106
|
"reflect": true,
|
|
135
107
|
"defaultValue": "'en'"
|
|
@@ -148,8 +120,6 @@ export class PlayerUserConsents {
|
|
|
148
120
|
"tags": [],
|
|
149
121
|
"text": "'true' when parent expects component to emit it's current value"
|
|
150
122
|
},
|
|
151
|
-
"getter": false,
|
|
152
|
-
"setter": false,
|
|
153
123
|
"attribute": "queried",
|
|
154
124
|
"reflect": true,
|
|
155
125
|
"defaultValue": "false"
|
|
@@ -168,8 +138,6 @@ export class PlayerUserConsents {
|
|
|
168
138
|
"tags": [],
|
|
169
139
|
"text": "the type of the consent, used to determine render details"
|
|
170
140
|
},
|
|
171
|
-
"getter": false,
|
|
172
|
-
"setter": false,
|
|
173
141
|
"attribute": "consent-type",
|
|
174
142
|
"reflect": true,
|
|
175
143
|
"defaultValue": "''"
|
|
@@ -188,8 +156,6 @@ export class PlayerUserConsents {
|
|
|
188
156
|
"tags": [],
|
|
189
157
|
"text": "wether or not this consent is mandatory. Used for render details"
|
|
190
158
|
},
|
|
191
|
-
"getter": false,
|
|
192
|
-
"setter": false,
|
|
193
159
|
"attribute": "mandatory",
|
|
194
160
|
"reflect": true,
|
|
195
161
|
"defaultValue": "false"
|
|
@@ -208,8 +174,6 @@ export class PlayerUserConsents {
|
|
|
208
174
|
"tags": [],
|
|
209
175
|
"text": "Select GM version"
|
|
210
176
|
},
|
|
211
|
-
"getter": false,
|
|
212
|
-
"setter": false,
|
|
213
177
|
"attribute": "gm-version",
|
|
214
178
|
"reflect": false,
|
|
215
179
|
"defaultValue": "''"
|
|
@@ -228,8 +192,6 @@ export class PlayerUserConsents {
|
|
|
228
192
|
"tags": [],
|
|
229
193
|
"text": "the title of the consent to be displayed"
|
|
230
194
|
},
|
|
231
|
-
"getter": false,
|
|
232
|
-
"setter": false,
|
|
233
195
|
"attribute": "consent-title",
|
|
234
196
|
"reflect": true,
|
|
235
197
|
"defaultValue": "''"
|
|
@@ -248,8 +210,6 @@ export class PlayerUserConsents {
|
|
|
248
210
|
"tags": [],
|
|
249
211
|
"text": "Client custom styling via inline style"
|
|
250
212
|
},
|
|
251
|
-
"getter": false,
|
|
252
|
-
"setter": false,
|
|
253
213
|
"attribute": "client-styling",
|
|
254
214
|
"reflect": false,
|
|
255
215
|
"defaultValue": "''"
|
|
@@ -268,8 +228,6 @@ export class PlayerUserConsents {
|
|
|
268
228
|
"tags": [],
|
|
269
229
|
"text": "Client custom styling via url"
|
|
270
230
|
},
|
|
271
|
-
"getter": false,
|
|
272
|
-
"setter": false,
|
|
273
231
|
"attribute": "client-styling-url",
|
|
274
232
|
"reflect": true,
|
|
275
233
|
"defaultValue": "''"
|
|
@@ -288,8 +246,6 @@ export class PlayerUserConsents {
|
|
|
288
246
|
"tags": [],
|
|
289
247
|
"text": "Translation url"
|
|
290
248
|
},
|
|
291
|
-
"getter": false,
|
|
292
|
-
"setter": false,
|
|
293
249
|
"attribute": "translation-url",
|
|
294
250
|
"reflect": true,
|
|
295
251
|
"defaultValue": "''"
|
|
@@ -308,8 +264,6 @@ export class PlayerUserConsents {
|
|
|
308
264
|
"tags": [],
|
|
309
265
|
"text": "the text content to be rendered by the component. Determined at runtime"
|
|
310
266
|
},
|
|
311
|
-
"getter": false,
|
|
312
|
-
"setter": false,
|
|
313
267
|
"attribute": "mb-source",
|
|
314
268
|
"reflect": true
|
|
315
269
|
}
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
const NAMESPACE = 'player-user-consents';
|
|
2
|
-
const BUILD = /* player-user-consents */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, 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,
|
|
2
|
+
const BUILD = /* player-user-consents */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, 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: true, propNumber: false, 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: false, 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.19.2 | 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/client/client-host-ref.ts
|
|
14
12
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
15
13
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
16
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
17
|
-
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
18
|
-
};
|
|
14
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
19
15
|
var registerHost = (hostElement, cmpMeta) => {
|
|
20
16
|
const hostRef = {
|
|
21
17
|
$flags$: 0,
|
|
@@ -28,8 +24,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
28
24
|
hostElement["s-p"] = [];
|
|
29
25
|
hostElement["s-rc"] = [];
|
|
30
26
|
}
|
|
31
|
-
|
|
32
|
-
return ref;
|
|
27
|
+
return hostRefs.set(hostElement, hostRef);
|
|
33
28
|
};
|
|
34
29
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
35
30
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -66,22 +61,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
66
61
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
67
62
|
/* webpackMode: "lazy" */
|
|
68
63
|
`./${bundleId}.entry.js${""}`
|
|
69
|
-
).then(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
cmpModules.set(bundleId, importedModule);
|
|
73
|
-
}
|
|
74
|
-
return importedModule[exportName];
|
|
75
|
-
},
|
|
76
|
-
(e) => {
|
|
77
|
-
consoleError(e, hostRef.$hostElement$);
|
|
64
|
+
).then((importedModule) => {
|
|
65
|
+
{
|
|
66
|
+
cmpModules.set(bundleId, importedModule);
|
|
78
67
|
}
|
|
79
|
-
|
|
68
|
+
return importedModule[exportName];
|
|
69
|
+
}, consoleError);
|
|
80
70
|
};
|
|
81
71
|
|
|
82
72
|
// src/client/client-style.ts
|
|
83
73
|
var styles = /* @__PURE__ */ new Map();
|
|
84
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
85
74
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
86
75
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
87
76
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -139,6 +128,12 @@ var flush = () => {
|
|
|
139
128
|
};
|
|
140
129
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
141
130
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
131
|
+
|
|
132
|
+
// src/utils/constants.ts
|
|
133
|
+
var EMPTY_OBJ = {};
|
|
134
|
+
|
|
135
|
+
// src/utils/helpers.ts
|
|
136
|
+
var isDef = (v) => v != null;
|
|
142
137
|
var isComplexType = (o) => {
|
|
143
138
|
o = typeof o;
|
|
144
139
|
return o === "object" || o === "function";
|
|
@@ -339,40 +334,13 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
339
334
|
}
|
|
340
335
|
if (!appliedStyles.has(scopeId2)) {
|
|
341
336
|
{
|
|
342
|
-
styleElm =
|
|
337
|
+
styleElm = doc.createElement("style");
|
|
343
338
|
styleElm.innerHTML = style;
|
|
344
339
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
345
340
|
if (nonce != null) {
|
|
346
341
|
styleElm.setAttribute("nonce", nonce);
|
|
347
342
|
}
|
|
348
|
-
|
|
349
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
350
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
351
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
352
|
-
styleContainerNode.insertBefore(
|
|
353
|
-
styleElm,
|
|
354
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
355
|
-
);
|
|
356
|
-
} else if ("host" in styleContainerNode) {
|
|
357
|
-
if (supportsConstructableStylesheets) {
|
|
358
|
-
const stylesheet = new CSSStyleSheet();
|
|
359
|
-
stylesheet.replaceSync(style);
|
|
360
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
361
|
-
} else {
|
|
362
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
363
|
-
if (existingStyleContainer) {
|
|
364
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
365
|
-
} else {
|
|
366
|
-
styleContainerNode.prepend(styleElm);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
} else {
|
|
370
|
-
styleContainerNode.append(styleElm);
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
374
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
375
|
-
}
|
|
343
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
|
|
376
344
|
}
|
|
377
345
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
378
346
|
styleElm.innerHTML += SLOT_FB_CSS;
|
|
@@ -395,25 +363,23 @@ var attachStyles = (hostRef) => {
|
|
|
395
363
|
const scopeId2 = addStyle(
|
|
396
364
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
397
365
|
cmpMeta);
|
|
398
|
-
if (
|
|
366
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
399
367
|
elm["s-sc"] = scopeId2;
|
|
400
368
|
elm.classList.add(scopeId2 + "-h");
|
|
401
369
|
}
|
|
402
370
|
endAttachStyles();
|
|
403
371
|
};
|
|
404
372
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
405
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
373
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
406
374
|
if (oldValue !== newValue) {
|
|
407
375
|
let isProp = isMemberInElement(elm, memberName);
|
|
408
376
|
let ln = memberName.toLowerCase();
|
|
409
377
|
if (memberName === "class") {
|
|
410
378
|
const classList = elm.classList;
|
|
411
379
|
const oldClasses = parseClassList(oldValue);
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
416
|
-
}
|
|
380
|
+
const newClasses = parseClassList(newValue);
|
|
381
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
382
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
417
383
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
418
384
|
if (newValue) {
|
|
419
385
|
newValue(elm);
|
|
@@ -445,13 +411,9 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
445
411
|
if (memberName === "list") {
|
|
446
412
|
isProp = false;
|
|
447
413
|
} else if (oldValue == null || elm[memberName] != n) {
|
|
448
|
-
|
|
449
|
-
elm[memberName] = n;
|
|
450
|
-
} else {
|
|
451
|
-
elm.setAttribute(memberName, n);
|
|
452
|
-
}
|
|
414
|
+
elm[memberName] = n;
|
|
453
415
|
}
|
|
454
|
-
} else
|
|
416
|
+
} else {
|
|
455
417
|
elm[memberName] = newValue;
|
|
456
418
|
}
|
|
457
419
|
} catch (e) {
|
|
@@ -473,44 +435,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
473
435
|
}
|
|
474
436
|
};
|
|
475
437
|
var parseClassListRegex = /\s/;
|
|
476
|
-
var parseClassList = (value) =>
|
|
477
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
478
|
-
value = value.baseVal;
|
|
479
|
-
}
|
|
480
|
-
if (!value || typeof value !== "string") {
|
|
481
|
-
return [];
|
|
482
|
-
}
|
|
483
|
-
return value.split(parseClassListRegex);
|
|
484
|
-
};
|
|
438
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
485
439
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
486
440
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
487
441
|
|
|
488
442
|
// src/runtime/vdom/update-element.ts
|
|
489
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
443
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
490
444
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
491
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
492
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
445
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
446
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
493
447
|
{
|
|
494
448
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
495
449
|
if (!(memberName in newVnodeAttrs)) {
|
|
496
|
-
setAccessor(
|
|
497
|
-
elm,
|
|
498
|
-
memberName,
|
|
499
|
-
oldVnodeAttrs[memberName],
|
|
500
|
-
void 0,
|
|
501
|
-
isSvgMode2,
|
|
502
|
-
newVnode.$flags$);
|
|
450
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
503
451
|
}
|
|
504
452
|
}
|
|
505
453
|
}
|
|
506
454
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
507
|
-
setAccessor(
|
|
508
|
-
elm,
|
|
509
|
-
memberName,
|
|
510
|
-
oldVnodeAttrs[memberName],
|
|
511
|
-
newVnodeAttrs[memberName],
|
|
512
|
-
isSvgMode2,
|
|
513
|
-
newVnode.$flags$);
|
|
455
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
514
456
|
}
|
|
515
457
|
};
|
|
516
458
|
function sortedAttrNames(attrNames) {
|
|
@@ -522,10 +464,13 @@ function sortedAttrNames(attrNames) {
|
|
|
522
464
|
attrNames
|
|
523
465
|
);
|
|
524
466
|
}
|
|
467
|
+
|
|
468
|
+
// src/runtime/vdom/vdom-render.ts
|
|
469
|
+
var scopeId;
|
|
525
470
|
var hostTagName;
|
|
526
471
|
var useNativeShadowDom = false;
|
|
527
472
|
var isSvgMode = false;
|
|
528
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
473
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
529
474
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
530
475
|
let i2 = 0;
|
|
531
476
|
let elm;
|
|
@@ -539,6 +484,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
539
484
|
{
|
|
540
485
|
updateElement(null, newVNode2, isSvgMode);
|
|
541
486
|
}
|
|
487
|
+
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
488
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
489
|
+
}
|
|
542
490
|
if (newVNode2.$children$) {
|
|
543
491
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
544
492
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -668,9 +616,6 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
668
616
|
if (!isInitialRender) {
|
|
669
617
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
670
618
|
}
|
|
671
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
672
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
673
|
-
}
|
|
674
619
|
return true;
|
|
675
620
|
}
|
|
676
621
|
return false;
|
|
@@ -693,10 +638,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
693
638
|
elm.textContent = "";
|
|
694
639
|
}
|
|
695
640
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
696
|
-
} else if (
|
|
697
|
-
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
698
|
-
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
699
|
-
) {
|
|
641
|
+
} else if (oldChildren !== null) {
|
|
700
642
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
701
643
|
}
|
|
702
644
|
} else if (oldVNode.$text$ !== text) {
|
|
@@ -710,9 +652,8 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
710
652
|
}
|
|
711
653
|
};
|
|
712
654
|
var insertBefore = (parent, newNode, reference) => {
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
}
|
|
655
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
656
|
+
return inserted;
|
|
716
657
|
};
|
|
717
658
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
718
659
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -737,21 +678,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
737
678
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
738
679
|
hostRef.$vnode$ = rootVnode;
|
|
739
680
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
740
|
-
|
|
681
|
+
{
|
|
682
|
+
scopeId = hostElm["s-sc"];
|
|
683
|
+
}
|
|
684
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
741
685
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
742
686
|
};
|
|
743
687
|
|
|
744
688
|
// src/runtime/update-component.ts
|
|
745
689
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
746
690
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
747
|
-
|
|
748
|
-
new Promise(
|
|
749
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
750
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
751
|
-
r();
|
|
752
|
-
}
|
|
753
|
-
)
|
|
754
|
-
);
|
|
691
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
755
692
|
}
|
|
756
693
|
};
|
|
757
694
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -778,7 +715,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
778
715
|
let maybePromise;
|
|
779
716
|
if (isInitialLoad) {
|
|
780
717
|
{
|
|
781
|
-
maybePromise = safeCall(instance, "componentWillLoad"
|
|
718
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
|
782
719
|
}
|
|
783
720
|
}
|
|
784
721
|
endSchedule();
|
|
@@ -852,7 +789,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
852
789
|
addHydratedFlag(elm);
|
|
853
790
|
}
|
|
854
791
|
{
|
|
855
|
-
safeCall(instance, "componentDidLoad"
|
|
792
|
+
safeCall(instance, "componentDidLoad");
|
|
856
793
|
}
|
|
857
794
|
endPostUpdate();
|
|
858
795
|
{
|
|
@@ -876,14 +813,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
876
813
|
}
|
|
877
814
|
};
|
|
878
815
|
var appDidLoad = (who) => {
|
|
816
|
+
{
|
|
817
|
+
addHydratedFlag(doc.documentElement);
|
|
818
|
+
}
|
|
879
819
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
880
820
|
};
|
|
881
|
-
var safeCall = (instance, method, arg
|
|
821
|
+
var safeCall = (instance, method, arg) => {
|
|
882
822
|
if (instance && instance[method]) {
|
|
883
823
|
try {
|
|
884
824
|
return instance[method](arg);
|
|
885
825
|
} catch (e) {
|
|
886
|
-
consoleError(e
|
|
826
|
+
consoleError(e);
|
|
887
827
|
}
|
|
888
828
|
}
|
|
889
829
|
return void 0;
|
|
@@ -942,68 +882,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
942
882
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
943
883
|
members.map(([memberName, [memberFlags]]) => {
|
|
944
884
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
945
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
946
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
947
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
948
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
949
|
-
Object.defineProperty(prototype, memberName, {
|
|
950
|
-
get() {
|
|
951
|
-
{
|
|
952
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
953
|
-
return getValue(this, memberName);
|
|
954
|
-
}
|
|
955
|
-
const ref = getHostRef(this);
|
|
956
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
957
|
-
if (!instance) return;
|
|
958
|
-
return instance[memberName];
|
|
959
|
-
}
|
|
960
|
-
},
|
|
961
|
-
configurable: true,
|
|
962
|
-
enumerable: true
|
|
963
|
-
});
|
|
964
|
-
}
|
|
965
885
|
Object.defineProperty(prototype, memberName, {
|
|
886
|
+
get() {
|
|
887
|
+
return getValue(this, memberName);
|
|
888
|
+
},
|
|
966
889
|
set(newValue) {
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
972
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
973
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
974
|
-
}
|
|
975
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
976
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
977
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
978
|
-
return;
|
|
979
|
-
}
|
|
980
|
-
{
|
|
981
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
982
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
983
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
984
|
-
ref.$onReadyPromise$.then(() => {
|
|
985
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
986
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
987
|
-
}
|
|
988
|
-
});
|
|
989
|
-
}
|
|
990
|
-
return;
|
|
991
|
-
}
|
|
992
|
-
const setterSetVal = () => {
|
|
993
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
994
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
995
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
996
|
-
}
|
|
997
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
998
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
999
|
-
};
|
|
1000
|
-
if (ref.$lazyInstance$) {
|
|
1001
|
-
setterSetVal();
|
|
1002
|
-
} else {
|
|
1003
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
890
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
891
|
+
},
|
|
892
|
+
configurable: true,
|
|
893
|
+
enumerable: true
|
|
1007
894
|
});
|
|
1008
895
|
}
|
|
1009
896
|
});
|
|
@@ -1013,11 +900,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1013
900
|
plt.jmp(() => {
|
|
1014
901
|
var _a2;
|
|
1015
902
|
const propName = attrNameToPropName.get(attrName);
|
|
1016
|
-
if (this.hasOwnProperty(propName)
|
|
903
|
+
if (this.hasOwnProperty(propName)) {
|
|
1017
904
|
newValue = this[propName];
|
|
1018
905
|
delete this[propName];
|
|
1019
|
-
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" &&
|
|
1020
|
-
this[propName] == newValue) {
|
|
906
|
+
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
|
|
1021
907
|
return;
|
|
1022
908
|
} else if (propName == null) {
|
|
1023
909
|
const hostRef = getHostRef(this);
|
|
@@ -1033,11 +919,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1033
919
|
}
|
|
1034
920
|
return;
|
|
1035
921
|
}
|
|
1036
|
-
|
|
1037
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1038
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1039
|
-
this[propName] = newValue;
|
|
1040
|
-
}
|
|
922
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1041
923
|
});
|
|
1042
924
|
};
|
|
1043
925
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1066,7 +948,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1066
948
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1067
949
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1068
950
|
if (bundleId) {
|
|
1069
|
-
const CstrImport = loadModule(cmpMeta
|
|
951
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1070
952
|
if (CstrImport && "then" in CstrImport) {
|
|
1071
953
|
const endLoad = uniqueTime();
|
|
1072
954
|
Cstr = await CstrImport;
|
|
@@ -1091,7 +973,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1091
973
|
try {
|
|
1092
974
|
new Cstr(hostRef);
|
|
1093
975
|
} catch (e) {
|
|
1094
|
-
consoleError(e
|
|
976
|
+
consoleError(e);
|
|
1095
977
|
}
|
|
1096
978
|
{
|
|
1097
979
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1126,7 +1008,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1126
1008
|
schedule();
|
|
1127
1009
|
}
|
|
1128
1010
|
};
|
|
1129
|
-
var fireConnectedCallback = (instance
|
|
1011
|
+
var fireConnectedCallback = (instance) => {
|
|
1130
1012
|
};
|
|
1131
1013
|
|
|
1132
1014
|
// src/runtime/connected-callback.ts
|
|
@@ -1166,26 +1048,20 @@ var connectedCallback = (elm) => {
|
|
|
1166
1048
|
endConnected();
|
|
1167
1049
|
}
|
|
1168
1050
|
};
|
|
1169
|
-
var disconnectInstance = (instance
|
|
1051
|
+
var disconnectInstance = (instance) => {
|
|
1170
1052
|
{
|
|
1171
|
-
safeCall(instance, "disconnectedCallback"
|
|
1053
|
+
safeCall(instance, "disconnectedCallback");
|
|
1172
1054
|
}
|
|
1173
1055
|
};
|
|
1174
1056
|
var disconnectedCallback = async (elm) => {
|
|
1175
1057
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1176
1058
|
const hostRef = getHostRef(elm);
|
|
1177
1059
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1178
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1060
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
|
1179
1061
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1180
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1062
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
|
1181
1063
|
}
|
|
1182
1064
|
}
|
|
1183
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1184
|
-
rootAppliedStyles.delete(elm);
|
|
1185
|
-
}
|
|
1186
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1187
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1188
|
-
}
|
|
1189
1065
|
};
|
|
1190
1066
|
|
|
1191
1067
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1266,17 +1142,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1266
1142
|
}
|
|
1267
1143
|
disconnectedCallback() {
|
|
1268
1144
|
plt.jmp(() => disconnectedCallback(this));
|
|
1269
|
-
plt.raf(() => {
|
|
1270
|
-
var _a3;
|
|
1271
|
-
const hostRef = getHostRef(this);
|
|
1272
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1273
|
-
if (i2 > -1) {
|
|
1274
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
1275
|
-
}
|
|
1276
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1277
|
-
delete hostRef.$vnode$.$elm$;
|
|
1278
|
-
}
|
|
1279
|
-
});
|
|
1280
1145
|
}
|
|
1281
1146
|
componentOnReady() {
|
|
1282
1147
|
return getHostRef(this).$onReadyPromise$;
|
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-bc209863.js';
|
|
2
|
+
export { s as setNonce } from './index-bc209863.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|