@everymatrix/user-action-controller 1.55.0 → 1.56.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-316ef19a.js → index-acdc077f.js} +176 -73
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/player-user-consents_2.cjs.entry.js +72 -22
- package/dist/cjs/user-action-controller.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/user-action-controller/user-action-controller.js +64 -17
- package/dist/esm/{index-48848b35.js → index-82e2d554.js} +176 -73
- package/dist/esm/loader.js +3 -3
- package/dist/esm/player-user-consents_2.entry.js +72 -22
- package/dist/esm/user-action-controller.js +4 -4
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/user-action-controller/.stencil/packages/stencil/user-action-controller/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/user-action-controller/.stencil/packages/stencil/user-action-controller/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/user-action-controller/user-action-controller.d.ts +2 -1
- package/dist/user-action-controller/p-839810ba.entry.js +1 -0
- package/dist/user-action-controller/p-e2754eb5.js +2 -0
- package/dist/user-action-controller/user-action-controller.esm.js +1 -1
- package/package.json +1 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/user-action-controller/.stencil/packages/stencil/user-action-controller/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/user-action-controller/.stencil/packages/stencil/user-action-controller/stencil.config.dev.d.ts +0 -2
- package/dist/user-action-controller/p-5a10e23d.js +0 -2
- package/dist/user-action-controller/p-ef35142f.entry.js +0 -1
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/user-action-controller/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/user-action-controller/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/user-action-controller/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/user-action-controller/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
const NAMESPACE = 'user-action-controller';
|
|
2
|
-
const BUILD = /* user-action-controller */ { 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: true, 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: true, 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 };
|
|
2
|
+
const BUILD = /* user-action-controller */ { 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: true, 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: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, 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.26.0 | 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
|
|
12
18
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
13
19
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
14
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
20
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
21
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
22
|
+
};
|
|
15
23
|
var registerHost = (hostElement, cmpMeta) => {
|
|
16
24
|
const hostRef = {
|
|
17
25
|
$flags$: 0,
|
|
@@ -24,7 +32,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
24
32
|
hostElement["s-p"] = [];
|
|
25
33
|
hostElement["s-rc"] = [];
|
|
26
34
|
}
|
|
27
|
-
|
|
35
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
36
|
+
return ref;
|
|
28
37
|
};
|
|
29
38
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
30
39
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -61,16 +70,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
61
70
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
62
71
|
/* webpackMode: "lazy" */
|
|
63
72
|
`./${bundleId}.entry.js${""}`
|
|
64
|
-
).then(
|
|
65
|
-
{
|
|
66
|
-
|
|
73
|
+
).then(
|
|
74
|
+
(importedModule) => {
|
|
75
|
+
{
|
|
76
|
+
cmpModules.set(bundleId, importedModule);
|
|
77
|
+
}
|
|
78
|
+
return importedModule[exportName];
|
|
79
|
+
},
|
|
80
|
+
(e) => {
|
|
81
|
+
consoleError(e, hostRef.$hostElement$);
|
|
67
82
|
}
|
|
68
|
-
|
|
69
|
-
}, consoleError);
|
|
83
|
+
);
|
|
70
84
|
};
|
|
71
85
|
|
|
72
86
|
// src/client/client-style.ts
|
|
73
87
|
var styles = /* @__PURE__ */ new Map();
|
|
88
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
74
89
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
75
90
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
76
91
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -144,14 +159,6 @@ var flush = () => {
|
|
|
144
159
|
};
|
|
145
160
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
146
161
|
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;
|
|
155
162
|
var isComplexType = (o) => {
|
|
156
163
|
o = typeof o;
|
|
157
164
|
return o === "object" || o === "function";
|
|
@@ -352,7 +359,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
352
359
|
}
|
|
353
360
|
if (!appliedStyles.has(scopeId2)) {
|
|
354
361
|
{
|
|
355
|
-
styleElm = doc.createElement("style");
|
|
362
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
356
363
|
styleElm.innerHTML = style;
|
|
357
364
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
358
365
|
if (nonce != null) {
|
|
@@ -362,7 +369,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
362
369
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
363
370
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
364
371
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
365
|
-
styleContainerNode.insertBefore(
|
|
372
|
+
styleContainerNode.insertBefore(
|
|
373
|
+
styleElm,
|
|
374
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
375
|
+
);
|
|
366
376
|
} else if ("host" in styleContainerNode) {
|
|
367
377
|
if (supportsConstructableStylesheets) {
|
|
368
378
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -380,7 +390,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
380
390
|
styleContainerNode.append(styleElm);
|
|
381
391
|
}
|
|
382
392
|
}
|
|
383
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */
|
|
393
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
384
394
|
styleContainerNode.insertBefore(styleElm, null);
|
|
385
395
|
}
|
|
386
396
|
}
|
|
@@ -405,23 +415,25 @@ var attachStyles = (hostRef) => {
|
|
|
405
415
|
const scopeId2 = addStyle(
|
|
406
416
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
407
417
|
cmpMeta);
|
|
408
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
418
|
+
if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
|
|
409
419
|
elm["s-sc"] = scopeId2;
|
|
410
420
|
elm.classList.add(scopeId2 + "-h");
|
|
411
421
|
}
|
|
412
422
|
endAttachStyles();
|
|
413
423
|
};
|
|
414
424
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
415
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
425
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
416
426
|
if (oldValue !== newValue) {
|
|
417
427
|
let isProp = isMemberInElement(elm, memberName);
|
|
418
428
|
let ln = memberName.toLowerCase();
|
|
419
429
|
if (memberName === "class") {
|
|
420
430
|
const classList = elm.classList;
|
|
421
431
|
const oldClasses = parseClassList(oldValue);
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
432
|
+
let newClasses = parseClassList(newValue);
|
|
433
|
+
{
|
|
434
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
435
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
436
|
+
}
|
|
425
437
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
426
438
|
if (newValue) {
|
|
427
439
|
newValue(elm);
|
|
@@ -459,7 +471,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
459
471
|
elm.setAttribute(memberName, n);
|
|
460
472
|
}
|
|
461
473
|
}
|
|
462
|
-
} else {
|
|
474
|
+
} else if (elm[memberName] !== newValue) {
|
|
463
475
|
elm[memberName] = newValue;
|
|
464
476
|
}
|
|
465
477
|
} catch (e) {
|
|
@@ -481,24 +493,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
481
493
|
}
|
|
482
494
|
};
|
|
483
495
|
var parseClassListRegex = /\s/;
|
|
484
|
-
var parseClassList = (value) =>
|
|
496
|
+
var parseClassList = (value) => {
|
|
497
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
498
|
+
value = value.baseVal;
|
|
499
|
+
}
|
|
500
|
+
if (!value || typeof value !== "string") {
|
|
501
|
+
return [];
|
|
502
|
+
}
|
|
503
|
+
return value.split(parseClassListRegex);
|
|
504
|
+
};
|
|
485
505
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
486
506
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
487
507
|
|
|
488
508
|
// src/runtime/vdom/update-element.ts
|
|
489
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
509
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
490
510
|
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$ ||
|
|
511
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
512
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
493
513
|
{
|
|
494
514
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
495
515
|
if (!(memberName in newVnodeAttrs)) {
|
|
496
|
-
setAccessor(
|
|
516
|
+
setAccessor(
|
|
517
|
+
elm,
|
|
518
|
+
memberName,
|
|
519
|
+
oldVnodeAttrs[memberName],
|
|
520
|
+
void 0,
|
|
521
|
+
isSvgMode2,
|
|
522
|
+
newVnode.$flags$);
|
|
497
523
|
}
|
|
498
524
|
}
|
|
499
525
|
}
|
|
500
526
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
501
|
-
setAccessor(
|
|
527
|
+
setAccessor(
|
|
528
|
+
elm,
|
|
529
|
+
memberName,
|
|
530
|
+
oldVnodeAttrs[memberName],
|
|
531
|
+
newVnodeAttrs[memberName],
|
|
532
|
+
isSvgMode2,
|
|
533
|
+
newVnode.$flags$);
|
|
502
534
|
}
|
|
503
535
|
};
|
|
504
536
|
function sortedAttrNames(attrNames) {
|
|
@@ -510,13 +542,10 @@ function sortedAttrNames(attrNames) {
|
|
|
510
542
|
attrNames
|
|
511
543
|
);
|
|
512
544
|
}
|
|
513
|
-
|
|
514
|
-
// src/runtime/vdom/vdom-render.ts
|
|
515
|
-
var scopeId;
|
|
516
545
|
var hostTagName;
|
|
517
546
|
var useNativeShadowDom = false;
|
|
518
547
|
var isSvgMode = false;
|
|
519
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
548
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
520
549
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
521
550
|
let i2 = 0;
|
|
522
551
|
let elm;
|
|
@@ -537,11 +566,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
537
566
|
{
|
|
538
567
|
updateElement(null, newVNode2, isSvgMode);
|
|
539
568
|
}
|
|
540
|
-
const rootNode = elm.getRootNode();
|
|
541
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
542
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
543
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
544
|
-
}
|
|
545
569
|
if (newVNode2.$children$) {
|
|
546
570
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
547
571
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -678,6 +702,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
678
702
|
if (!isInitialRender) {
|
|
679
703
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
680
704
|
}
|
|
705
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
706
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
707
|
+
}
|
|
681
708
|
return true;
|
|
682
709
|
}
|
|
683
710
|
return false;
|
|
@@ -724,8 +751,9 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
724
751
|
}
|
|
725
752
|
};
|
|
726
753
|
var insertBefore = (parent, newNode, reference) => {
|
|
727
|
-
|
|
728
|
-
|
|
754
|
+
{
|
|
755
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
756
|
+
}
|
|
729
757
|
};
|
|
730
758
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
731
759
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -750,17 +778,21 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
750
778
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
751
779
|
hostRef.$vnode$ = rootVnode;
|
|
752
780
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
753
|
-
|
|
754
|
-
scopeId = hostElm["s-sc"];
|
|
755
|
-
}
|
|
756
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
781
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
757
782
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
758
783
|
};
|
|
759
784
|
|
|
760
785
|
// src/runtime/update-component.ts
|
|
761
786
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
762
787
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
763
|
-
ancestorComponent["s-p"].push(
|
|
788
|
+
const index = ancestorComponent["s-p"].push(
|
|
789
|
+
new Promise(
|
|
790
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
791
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
792
|
+
r();
|
|
793
|
+
}
|
|
794
|
+
)
|
|
795
|
+
);
|
|
764
796
|
}
|
|
765
797
|
};
|
|
766
798
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -789,12 +821,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
789
821
|
{
|
|
790
822
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
791
823
|
if (hostRef.$queuedListeners$) {
|
|
792
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
824
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
793
825
|
hostRef.$queuedListeners$ = void 0;
|
|
794
826
|
}
|
|
795
827
|
}
|
|
796
828
|
{
|
|
797
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
829
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
798
830
|
}
|
|
799
831
|
}
|
|
800
832
|
endSchedule();
|
|
@@ -868,7 +900,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
868
900
|
addHydratedFlag(elm);
|
|
869
901
|
}
|
|
870
902
|
{
|
|
871
|
-
safeCall(instance, "componentDidLoad");
|
|
903
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
872
904
|
}
|
|
873
905
|
endPostUpdate();
|
|
874
906
|
{
|
|
@@ -892,17 +924,14 @@ var postUpdateComponent = (hostRef) => {
|
|
|
892
924
|
}
|
|
893
925
|
};
|
|
894
926
|
var appDidLoad = (who) => {
|
|
895
|
-
{
|
|
896
|
-
addHydratedFlag(doc.documentElement);
|
|
897
|
-
}
|
|
898
927
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
899
928
|
};
|
|
900
|
-
var safeCall = (instance, method, arg) => {
|
|
929
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
901
930
|
if (instance && instance[method]) {
|
|
902
931
|
try {
|
|
903
932
|
return instance[method](arg);
|
|
904
933
|
} catch (e) {
|
|
905
|
-
consoleError(e);
|
|
934
|
+
consoleError(e, elm);
|
|
906
935
|
}
|
|
907
936
|
}
|
|
908
937
|
return void 0;
|
|
@@ -961,15 +990,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
961
990
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
962
991
|
members.map(([memberName, [memberFlags]]) => {
|
|
963
992
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
993
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
994
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
995
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
996
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
997
|
+
Object.defineProperty(prototype, memberName, {
|
|
998
|
+
get() {
|
|
999
|
+
{
|
|
1000
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1001
|
+
return getValue(this, memberName);
|
|
1002
|
+
}
|
|
1003
|
+
const ref = getHostRef(this);
|
|
1004
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1005
|
+
if (!instance) return;
|
|
1006
|
+
return instance[memberName];
|
|
1007
|
+
}
|
|
1008
|
+
},
|
|
1009
|
+
configurable: true,
|
|
1010
|
+
enumerable: true
|
|
1011
|
+
});
|
|
1012
|
+
}
|
|
964
1013
|
Object.defineProperty(prototype, memberName, {
|
|
965
|
-
get() {
|
|
966
|
-
return getValue(this, memberName);
|
|
967
|
-
},
|
|
968
1014
|
set(newValue) {
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
1015
|
+
const ref = getHostRef(this);
|
|
1016
|
+
if (origSetter) {
|
|
1017
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1018
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1019
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1020
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1021
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1022
|
+
}
|
|
1023
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1024
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1025
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1026
|
+
return;
|
|
1027
|
+
}
|
|
1028
|
+
{
|
|
1029
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1030
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1031
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1032
|
+
ref.$onReadyPromise$.then(() => {
|
|
1033
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1034
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1035
|
+
}
|
|
1036
|
+
});
|
|
1037
|
+
}
|
|
1038
|
+
return;
|
|
1039
|
+
}
|
|
1040
|
+
const setterSetVal = () => {
|
|
1041
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1042
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1043
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1044
|
+
}
|
|
1045
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1046
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1047
|
+
};
|
|
1048
|
+
if (ref.$lazyInstance$) {
|
|
1049
|
+
setterSetVal();
|
|
1050
|
+
} else {
|
|
1051
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
973
1055
|
});
|
|
974
1056
|
}
|
|
975
1057
|
});
|
|
@@ -979,7 +1061,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
979
1061
|
plt.jmp(() => {
|
|
980
1062
|
var _a2;
|
|
981
1063
|
const propName = attrNameToPropName.get(attrName);
|
|
982
|
-
if (this.hasOwnProperty(propName)) {
|
|
1064
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
983
1065
|
newValue = this[propName];
|
|
984
1066
|
delete this[propName];
|
|
985
1067
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -999,7 +1081,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
999
1081
|
}
|
|
1000
1082
|
return;
|
|
1001
1083
|
}
|
|
1002
|
-
|
|
1084
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1085
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1086
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1087
|
+
this[propName] = newValue;
|
|
1088
|
+
}
|
|
1003
1089
|
});
|
|
1004
1090
|
};
|
|
1005
1091
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1028,7 +1114,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1028
1114
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1029
1115
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1030
1116
|
if (bundleId) {
|
|
1031
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1117
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1032
1118
|
if (CstrImport && "then" in CstrImport) {
|
|
1033
1119
|
const endLoad = uniqueTime();
|
|
1034
1120
|
Cstr = await CstrImport;
|
|
@@ -1053,7 +1139,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1053
1139
|
try {
|
|
1054
1140
|
new Cstr(hostRef);
|
|
1055
1141
|
} catch (e) {
|
|
1056
|
-
consoleError(e);
|
|
1142
|
+
consoleError(e, elm);
|
|
1057
1143
|
}
|
|
1058
1144
|
{
|
|
1059
1145
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1088,7 +1174,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1088
1174
|
schedule();
|
|
1089
1175
|
}
|
|
1090
1176
|
};
|
|
1091
|
-
var fireConnectedCallback = (instance) => {
|
|
1177
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1092
1178
|
};
|
|
1093
1179
|
|
|
1094
1180
|
// src/runtime/connected-callback.ts
|
|
@@ -1129,9 +1215,9 @@ var connectedCallback = (elm) => {
|
|
|
1129
1215
|
endConnected();
|
|
1130
1216
|
}
|
|
1131
1217
|
};
|
|
1132
|
-
var disconnectInstance = (instance) => {
|
|
1218
|
+
var disconnectInstance = (instance, elm) => {
|
|
1133
1219
|
{
|
|
1134
|
-
safeCall(instance, "disconnectedCallback");
|
|
1220
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1135
1221
|
}
|
|
1136
1222
|
};
|
|
1137
1223
|
var disconnectedCallback = async (elm) => {
|
|
@@ -1144,11 +1230,17 @@ var disconnectedCallback = async (elm) => {
|
|
|
1144
1230
|
}
|
|
1145
1231
|
}
|
|
1146
1232
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1147
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1233
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1148
1234
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1149
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1235
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1150
1236
|
}
|
|
1151
1237
|
}
|
|
1238
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1239
|
+
rootAppliedStyles.delete(elm);
|
|
1240
|
+
}
|
|
1241
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1242
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1243
|
+
}
|
|
1152
1244
|
};
|
|
1153
1245
|
|
|
1154
1246
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1233,6 +1325,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1233
1325
|
}
|
|
1234
1326
|
disconnectedCallback() {
|
|
1235
1327
|
plt.jmp(() => disconnectedCallback(this));
|
|
1328
|
+
plt.raf(() => {
|
|
1329
|
+
var _a3;
|
|
1330
|
+
const hostRef = getHostRef(this);
|
|
1331
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1332
|
+
if (i2 > -1) {
|
|
1333
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
1334
|
+
}
|
|
1335
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1336
|
+
delete hostRef.$vnode$.$elm$;
|
|
1337
|
+
}
|
|
1338
|
+
});
|
|
1236
1339
|
}
|
|
1237
1340
|
componentOnReady() {
|
|
1238
1341
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1296,7 +1399,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1296
1399
|
}
|
|
1297
1400
|
}
|
|
1298
1401
|
} catch (e) {
|
|
1299
|
-
consoleError(e);
|
|
1402
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1300
1403
|
}
|
|
1301
1404
|
};
|
|
1302
1405
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-82e2d554.js';
|
|
2
|
+
export { s as setNonce } from './index-82e2d554.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["player-user-consents_2",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"gmVersion":[1,"gm-version"],"translationUrl":[513,"translation-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"queryFired":[32],"readyActionsCount":[32],"activeUserActions":[32],"userActionsValidated":[32],"receivedQueryResponses":[32],"
|
|
8
|
+
return bootstrapLazy([["player-user-consents_2",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"gmVersion":[1,"gm-version"],"translationUrl":[513,"translation-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"queryFired":[32],"readyActionsCount":[32],"activeUserActions":[32],"userActionsValidated":[32],"receivedQueryResponses":[32],"isLoading":[32],"mandatoryActionsChecked":[32],"mandatoryItems":[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]],{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"receivedQueryResponses":["handleQueryResponse"]}],[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"mbSource":[513,"mb-source"],"textContent":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|