@everymatrix/casino-engagement-suite-modal-container 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/casino-engagement-suite-modal-container/casino-engagement-suite-modal-container.esm.js +1 -1
- package/dist/casino-engagement-suite-modal-container/p-6f4afe31.entry.js +1 -0
- package/dist/casino-engagement-suite-modal-container/p-bfb6dae8.js +2 -0
- package/dist/cjs/casino-engagement-suite-modal-container.cjs.js +2 -2
- package/dist/cjs/casino-engagement-suite-modal_2.cjs.entry.js +22 -34
- package/dist/cjs/{index-146a156e.js → index-38c612e5.js} +67 -202
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/casino-engagement-suite-modal-container/casino-engagement-suite-modal-container.js +11 -29
- package/dist/esm/casino-engagement-suite-modal-container.js +3 -3
- package/dist/esm/casino-engagement-suite-modal_2.entry.js +22 -34
- package/dist/esm/{index-114dbf36.js → index-6912ff15.js} +67 -202
- package/dist/esm/loader.js +2 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-engagement-suite-modal-container/.stencil/packages/stencil/casino-engagement-suite-modal-container/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-engagement-suite-modal-container/.stencil/packages/stencil/casino-engagement-suite-modal-container/stencil.config.dev.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +0 -6
- package/package.json +1 -1
- package/dist/casino-engagement-suite-modal-container/p-4866ec93.entry.js +0 -1
- package/dist/casino-engagement-suite-modal-container/p-829cf9c9.js +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-modal-container/.stencil/packages/stencil/casino-engagement-suite-modal-container/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-modal-container/.stencil/packages/stencil/casino-engagement-suite-modal-container/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-engagement-suite-modal-container/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-engagement-suite-modal-container/.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/casino-engagement-suite-modal-container/.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/casino-engagement-suite-modal-container/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-6912ff15.js';
|
|
2
2
|
|
|
3
3
|
const casinoEngagementSuiteModalCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.EngagementSuiteIconButton{width:24px;height:24px}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center;z-index:1}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.ModalBodyWrapper{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.ModalBodyWrapper::-webkit-scrollbar{width:3px;background:none}.ModalBodyWrapper::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background-color:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:24px;border-radius:var(--emw--border-radius-large, 8px);width:450px;max-width:100%;text-align:center;max-height:90dvh}.GradientBorder::before{content:\"\";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:var(--emw--border-radius-large, 9px);background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader h1{font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large-plus, 24px);padding:0 16px;margin-bottom:16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;margin:12px 0}.ModalBody{font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-secondary, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}@keyframes rotate{100%{transform:rotate(1turn)}}.ModalOverlay .ModalWinAnimation{display:none}.ModalOverlay.ShowAnimation .ModalWinAnimation{display:block;position:absolute;width:100%;height:100%;inset:0;background:center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/light.svg) no-repeat, center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/win.svg) no-repeat;animation:6s rotate linear infinite}.ModalOverlay.Mobile .EngagementSuiteIconButton{width:16px;height:16px}.ModalOverlay.Mobile .ModalBody{font-size:var(--emw--font-size-small, 14px)}.ModalOverlay.Mobile .ModalContent{width:318px;padding:12px}.ModalOverlay.Mobile .ModalHeader h1{font-size:var(--emw--font-size-large, 20px);padding:0 60px}.ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation{background-size:400px}";
|
|
4
4
|
const CasinoEngagementSuiteModalStyle0 = casinoEngagementSuiteModalCss;
|
|
@@ -7,20 +7,6 @@ const CasinoEngagementSuiteModal = class {
|
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.closeModal = createEvent(this, "closeModal", 7);
|
|
10
|
-
/**
|
|
11
|
-
* Client custom styling via string
|
|
12
|
-
*/
|
|
13
|
-
this.clientStyling = '';
|
|
14
|
-
/**
|
|
15
|
-
* Client custom styling via url
|
|
16
|
-
*/
|
|
17
|
-
this.clientStylingUrl = '';
|
|
18
|
-
this.device = 'Mobile';
|
|
19
|
-
/**
|
|
20
|
-
* Show win animation
|
|
21
|
-
*/
|
|
22
|
-
this.showAnimation = false;
|
|
23
|
-
this.limitStylingAppends = false;
|
|
24
10
|
this.handleCloseClick = () => {
|
|
25
11
|
if (this.isLoading)
|
|
26
12
|
return;
|
|
@@ -44,6 +30,16 @@ const CasinoEngagementSuiteModal = class {
|
|
|
44
30
|
console.log('Error ', err);
|
|
45
31
|
});
|
|
46
32
|
};
|
|
33
|
+
this.clientStyling = '';
|
|
34
|
+
this.clientStylingUrl = '';
|
|
35
|
+
this.isOpen = undefined;
|
|
36
|
+
this.isLoading = undefined;
|
|
37
|
+
this.header = undefined;
|
|
38
|
+
this.contentIcon = undefined;
|
|
39
|
+
this.modalType = undefined;
|
|
40
|
+
this.device = 'Mobile';
|
|
41
|
+
this.showAnimation = false;
|
|
42
|
+
this.limitStylingAppends = false;
|
|
47
43
|
}
|
|
48
44
|
componentDidRender() {
|
|
49
45
|
if (!this.limitStylingAppends && this.host) {
|
|
@@ -110,25 +106,6 @@ const CasinoEngagementSuiteModalContainer = class {
|
|
|
110
106
|
constructor(hostRef) {
|
|
111
107
|
registerInstance(this, hostRef);
|
|
112
108
|
this.closeModal = createEvent(this, "closeModal", 7);
|
|
113
|
-
/**
|
|
114
|
-
* Client custom styling via string
|
|
115
|
-
*/
|
|
116
|
-
this.clientStyling = '';
|
|
117
|
-
/**
|
|
118
|
-
* Client custom styling via url
|
|
119
|
-
*/
|
|
120
|
-
this.clientStylingUrl = '';
|
|
121
|
-
/**
|
|
122
|
-
* Language of the widget
|
|
123
|
-
*/
|
|
124
|
-
this.language = 'en';
|
|
125
|
-
this.device = 'Mobile';
|
|
126
|
-
this.limitStylingAppends = false;
|
|
127
|
-
this.openModals = [];
|
|
128
|
-
this.rewardMessage = '';
|
|
129
|
-
this.hasError = false;
|
|
130
|
-
this.confirmationData = null;
|
|
131
|
-
this.winAmount = { amount: 0, currency: '' };
|
|
132
109
|
this.handleCloseClick = (e) => {
|
|
133
110
|
const type = e.currentTarget.getAttribute('data-type');
|
|
134
111
|
this.closeModal.emit(type);
|
|
@@ -160,6 +137,17 @@ const CasinoEngagementSuiteModalContainer = class {
|
|
|
160
137
|
this.isModalOpen = (type) => {
|
|
161
138
|
return Boolean(this.openModals.find(el => el === type));
|
|
162
139
|
};
|
|
140
|
+
this.clientStyling = '';
|
|
141
|
+
this.clientStylingUrl = '';
|
|
142
|
+
this.language = 'en';
|
|
143
|
+
this.isJoiningToChallenge = undefined;
|
|
144
|
+
this.device = 'Mobile';
|
|
145
|
+
this.limitStylingAppends = false;
|
|
146
|
+
this.openModals = [];
|
|
147
|
+
this.rewardMessage = '';
|
|
148
|
+
this.hasError = false;
|
|
149
|
+
this.confirmationData = null;
|
|
150
|
+
this.winAmount = { amount: 0, currency: '' };
|
|
163
151
|
}
|
|
164
152
|
openModalHandler(event) {
|
|
165
153
|
const { modalType, rewardMessage, hasError, confirmationData, winAmount } = event.detail;
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
const NAMESPACE = 'casino-engagement-suite-modal-container';
|
|
2
|
-
const BUILD = /* casino-engagement-suite-modal-container */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, 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: true, 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 = /* casino-engagement-suite-modal-container */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, 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: true, 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: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: false };
|
|
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 : {};
|
|
@@ -155,6 +144,12 @@ var flush = () => {
|
|
|
155
144
|
};
|
|
156
145
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
157
146
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
147
|
+
|
|
148
|
+
// src/utils/constants.ts
|
|
149
|
+
var EMPTY_OBJ = {};
|
|
150
|
+
|
|
151
|
+
// src/utils/helpers.ts
|
|
152
|
+
var isDef = (v) => v != null;
|
|
158
153
|
var isComplexType = (o) => {
|
|
159
154
|
o = typeof o;
|
|
160
155
|
return o === "object" || o === "function";
|
|
@@ -355,40 +350,13 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
355
350
|
}
|
|
356
351
|
if (!appliedStyles.has(scopeId2)) {
|
|
357
352
|
{
|
|
358
|
-
styleElm =
|
|
353
|
+
styleElm = doc.createElement("style");
|
|
359
354
|
styleElm.innerHTML = style;
|
|
360
355
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
361
356
|
if (nonce != null) {
|
|
362
357
|
styleElm.setAttribute("nonce", nonce);
|
|
363
358
|
}
|
|
364
|
-
|
|
365
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
366
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
367
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
368
|
-
styleContainerNode.insertBefore(
|
|
369
|
-
styleElm,
|
|
370
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
371
|
-
);
|
|
372
|
-
} else if ("host" in styleContainerNode) {
|
|
373
|
-
if (supportsConstructableStylesheets) {
|
|
374
|
-
const stylesheet = new CSSStyleSheet();
|
|
375
|
-
stylesheet.replaceSync(style);
|
|
376
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
377
|
-
} else {
|
|
378
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
379
|
-
if (existingStyleContainer) {
|
|
380
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
381
|
-
} else {
|
|
382
|
-
styleContainerNode.prepend(styleElm);
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
} else {
|
|
386
|
-
styleContainerNode.append(styleElm);
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
390
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
391
|
-
}
|
|
359
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
|
|
392
360
|
}
|
|
393
361
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
394
362
|
styleElm.innerHTML += SLOT_FB_CSS;
|
|
@@ -411,25 +379,23 @@ var attachStyles = (hostRef) => {
|
|
|
411
379
|
const scopeId2 = addStyle(
|
|
412
380
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
413
381
|
cmpMeta);
|
|
414
|
-
if (
|
|
382
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
415
383
|
elm["s-sc"] = scopeId2;
|
|
416
384
|
elm.classList.add(scopeId2 + "-h");
|
|
417
385
|
}
|
|
418
386
|
endAttachStyles();
|
|
419
387
|
};
|
|
420
388
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
421
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
389
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
422
390
|
if (oldValue !== newValue) {
|
|
423
391
|
let isProp = isMemberInElement(elm, memberName);
|
|
424
392
|
let ln = memberName.toLowerCase();
|
|
425
393
|
if (memberName === "class") {
|
|
426
394
|
const classList = elm.classList;
|
|
427
395
|
const oldClasses = parseClassList(oldValue);
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
432
|
-
}
|
|
396
|
+
const newClasses = parseClassList(newValue);
|
|
397
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
398
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
433
399
|
} else if (memberName === "style") {
|
|
434
400
|
{
|
|
435
401
|
for (const prop in oldValue) {
|
|
@@ -478,13 +444,9 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
478
444
|
if (memberName === "list") {
|
|
479
445
|
isProp = false;
|
|
480
446
|
} else if (oldValue == null || elm[memberName] != n) {
|
|
481
|
-
|
|
482
|
-
elm[memberName] = n;
|
|
483
|
-
} else {
|
|
484
|
-
elm.setAttribute(memberName, n);
|
|
485
|
-
}
|
|
447
|
+
elm[memberName] = n;
|
|
486
448
|
}
|
|
487
|
-
} else
|
|
449
|
+
} else {
|
|
488
450
|
elm[memberName] = newValue;
|
|
489
451
|
}
|
|
490
452
|
} catch (e) {
|
|
@@ -506,44 +468,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
506
468
|
}
|
|
507
469
|
};
|
|
508
470
|
var parseClassListRegex = /\s/;
|
|
509
|
-
var parseClassList = (value) =>
|
|
510
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
511
|
-
value = value.baseVal;
|
|
512
|
-
}
|
|
513
|
-
if (!value || typeof value !== "string") {
|
|
514
|
-
return [];
|
|
515
|
-
}
|
|
516
|
-
return value.split(parseClassListRegex);
|
|
517
|
-
};
|
|
471
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
518
472
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
519
473
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
520
474
|
|
|
521
475
|
// src/runtime/vdom/update-element.ts
|
|
522
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
476
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
523
477
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
524
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
525
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
478
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
479
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
526
480
|
{
|
|
527
481
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
528
482
|
if (!(memberName in newVnodeAttrs)) {
|
|
529
|
-
setAccessor(
|
|
530
|
-
elm,
|
|
531
|
-
memberName,
|
|
532
|
-
oldVnodeAttrs[memberName],
|
|
533
|
-
void 0,
|
|
534
|
-
isSvgMode2,
|
|
535
|
-
newVnode.$flags$);
|
|
483
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
536
484
|
}
|
|
537
485
|
}
|
|
538
486
|
}
|
|
539
487
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
540
|
-
setAccessor(
|
|
541
|
-
elm,
|
|
542
|
-
memberName,
|
|
543
|
-
oldVnodeAttrs[memberName],
|
|
544
|
-
newVnodeAttrs[memberName],
|
|
545
|
-
isSvgMode2,
|
|
546
|
-
newVnode.$flags$);
|
|
488
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
547
489
|
}
|
|
548
490
|
};
|
|
549
491
|
function sortedAttrNames(attrNames) {
|
|
@@ -555,10 +497,13 @@ function sortedAttrNames(attrNames) {
|
|
|
555
497
|
attrNames
|
|
556
498
|
);
|
|
557
499
|
}
|
|
500
|
+
|
|
501
|
+
// src/runtime/vdom/vdom-render.ts
|
|
502
|
+
var scopeId;
|
|
558
503
|
var hostTagName;
|
|
559
504
|
var useNativeShadowDom = false;
|
|
560
505
|
var isSvgMode = false;
|
|
561
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
506
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
562
507
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
563
508
|
let i2 = 0;
|
|
564
509
|
let elm;
|
|
@@ -572,6 +517,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
572
517
|
{
|
|
573
518
|
updateElement(null, newVNode2, isSvgMode);
|
|
574
519
|
}
|
|
520
|
+
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
521
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
522
|
+
}
|
|
575
523
|
if (newVNode2.$children$) {
|
|
576
524
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
577
525
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -700,9 +648,6 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
700
648
|
if (!isInitialRender) {
|
|
701
649
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
702
650
|
}
|
|
703
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
704
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
705
|
-
}
|
|
706
651
|
return true;
|
|
707
652
|
}
|
|
708
653
|
return false;
|
|
@@ -726,10 +671,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
726
671
|
elm.textContent = "";
|
|
727
672
|
}
|
|
728
673
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
729
|
-
} else if (
|
|
730
|
-
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
731
|
-
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
732
|
-
) {
|
|
674
|
+
} else if (oldChildren !== null) {
|
|
733
675
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
734
676
|
}
|
|
735
677
|
} else if (oldVNode.$text$ !== text) {
|
|
@@ -737,9 +679,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
737
679
|
}
|
|
738
680
|
};
|
|
739
681
|
var insertBefore = (parent, newNode, reference) => {
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
}
|
|
682
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
683
|
+
return inserted;
|
|
743
684
|
};
|
|
744
685
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
745
686
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -764,21 +705,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
764
705
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
765
706
|
hostRef.$vnode$ = rootVnode;
|
|
766
707
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
767
|
-
|
|
708
|
+
{
|
|
709
|
+
scopeId = hostElm["s-sc"];
|
|
710
|
+
}
|
|
711
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
768
712
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
769
713
|
};
|
|
770
714
|
|
|
771
715
|
// src/runtime/update-component.ts
|
|
772
716
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
773
717
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
774
|
-
|
|
775
|
-
new Promise(
|
|
776
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
777
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
778
|
-
r();
|
|
779
|
-
}
|
|
780
|
-
)
|
|
781
|
-
);
|
|
718
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
782
719
|
}
|
|
783
720
|
};
|
|
784
721
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -807,7 +744,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
807
744
|
{
|
|
808
745
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
809
746
|
if (hostRef.$queuedListeners$) {
|
|
810
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event
|
|
747
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
811
748
|
hostRef.$queuedListeners$ = void 0;
|
|
812
749
|
}
|
|
813
750
|
}
|
|
@@ -878,7 +815,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
878
815
|
const instance = hostRef.$lazyInstance$ ;
|
|
879
816
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
880
817
|
{
|
|
881
|
-
safeCall(instance, "componentDidRender"
|
|
818
|
+
safeCall(instance, "componentDidRender");
|
|
882
819
|
}
|
|
883
820
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
884
821
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -907,14 +844,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
907
844
|
}
|
|
908
845
|
};
|
|
909
846
|
var appDidLoad = (who) => {
|
|
847
|
+
{
|
|
848
|
+
addHydratedFlag(doc.documentElement);
|
|
849
|
+
}
|
|
910
850
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
911
851
|
};
|
|
912
|
-
var safeCall = (instance, method, arg
|
|
852
|
+
var safeCall = (instance, method, arg) => {
|
|
913
853
|
if (instance && instance[method]) {
|
|
914
854
|
try {
|
|
915
855
|
return instance[method](arg);
|
|
916
856
|
} catch (e) {
|
|
917
|
-
consoleError(e
|
|
857
|
+
consoleError(e);
|
|
918
858
|
}
|
|
919
859
|
}
|
|
920
860
|
return void 0;
|
|
@@ -957,68 +897,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
957
897
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
958
898
|
members.map(([memberName, [memberFlags]]) => {
|
|
959
899
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
960
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
961
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
962
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
963
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
964
|
-
Object.defineProperty(prototype, memberName, {
|
|
965
|
-
get() {
|
|
966
|
-
{
|
|
967
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
968
|
-
return getValue(this, memberName);
|
|
969
|
-
}
|
|
970
|
-
const ref = getHostRef(this);
|
|
971
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
972
|
-
if (!instance) return;
|
|
973
|
-
return instance[memberName];
|
|
974
|
-
}
|
|
975
|
-
},
|
|
976
|
-
configurable: true,
|
|
977
|
-
enumerable: true
|
|
978
|
-
});
|
|
979
|
-
}
|
|
980
900
|
Object.defineProperty(prototype, memberName, {
|
|
901
|
+
get() {
|
|
902
|
+
return getValue(this, memberName);
|
|
903
|
+
},
|
|
981
904
|
set(newValue) {
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
987
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
988
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
989
|
-
}
|
|
990
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
991
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
992
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
993
|
-
return;
|
|
994
|
-
}
|
|
995
|
-
{
|
|
996
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
997
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
998
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
999
|
-
ref.$onReadyPromise$.then(() => {
|
|
1000
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1001
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
1002
|
-
}
|
|
1003
|
-
});
|
|
1004
|
-
}
|
|
1005
|
-
return;
|
|
1006
|
-
}
|
|
1007
|
-
const setterSetVal = () => {
|
|
1008
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
1009
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1010
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1011
|
-
}
|
|
1012
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1013
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1014
|
-
};
|
|
1015
|
-
if (ref.$lazyInstance$) {
|
|
1016
|
-
setterSetVal();
|
|
1017
|
-
} else {
|
|
1018
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
905
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
906
|
+
},
|
|
907
|
+
configurable: true,
|
|
908
|
+
enumerable: true
|
|
1022
909
|
});
|
|
1023
910
|
}
|
|
1024
911
|
});
|
|
@@ -1028,11 +915,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1028
915
|
plt.jmp(() => {
|
|
1029
916
|
var _a2;
|
|
1030
917
|
const propName = attrNameToPropName.get(attrName);
|
|
1031
|
-
if (this.hasOwnProperty(propName)
|
|
918
|
+
if (this.hasOwnProperty(propName)) {
|
|
1032
919
|
newValue = this[propName];
|
|
1033
920
|
delete this[propName];
|
|
1034
|
-
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" &&
|
|
1035
|
-
this[propName] == newValue) {
|
|
921
|
+
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
|
|
1036
922
|
return;
|
|
1037
923
|
} else if (propName == null) {
|
|
1038
924
|
const hostRef = getHostRef(this);
|
|
@@ -1048,11 +934,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1048
934
|
}
|
|
1049
935
|
return;
|
|
1050
936
|
}
|
|
1051
|
-
|
|
1052
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1053
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1054
|
-
this[propName] = newValue;
|
|
1055
|
-
}
|
|
937
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1056
938
|
});
|
|
1057
939
|
};
|
|
1058
940
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1081,7 +963,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1081
963
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1082
964
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1083
965
|
if (bundleId) {
|
|
1084
|
-
const CstrImport = loadModule(cmpMeta
|
|
966
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1085
967
|
if (CstrImport && "then" in CstrImport) {
|
|
1086
968
|
const endLoad = uniqueTime();
|
|
1087
969
|
Cstr = await CstrImport;
|
|
@@ -1103,7 +985,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1103
985
|
try {
|
|
1104
986
|
new Cstr(hostRef);
|
|
1105
987
|
} catch (e) {
|
|
1106
|
-
consoleError(e
|
|
988
|
+
consoleError(e);
|
|
1107
989
|
}
|
|
1108
990
|
{
|
|
1109
991
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1135,7 +1017,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1135
1017
|
schedule();
|
|
1136
1018
|
}
|
|
1137
1019
|
};
|
|
1138
|
-
var fireConnectedCallback = (instance
|
|
1020
|
+
var fireConnectedCallback = (instance) => {
|
|
1139
1021
|
};
|
|
1140
1022
|
|
|
1141
1023
|
// src/runtime/connected-callback.ts
|
|
@@ -1176,7 +1058,7 @@ var connectedCallback = (elm) => {
|
|
|
1176
1058
|
endConnected();
|
|
1177
1059
|
}
|
|
1178
1060
|
};
|
|
1179
|
-
var disconnectInstance = (instance
|
|
1061
|
+
var disconnectInstance = (instance) => {
|
|
1180
1062
|
};
|
|
1181
1063
|
var disconnectedCallback = async (elm) => {
|
|
1182
1064
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1191,12 +1073,6 @@ var disconnectedCallback = async (elm) => {
|
|
|
1191
1073
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1192
1074
|
}
|
|
1193
1075
|
}
|
|
1194
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1195
|
-
rootAppliedStyles.delete(elm);
|
|
1196
|
-
}
|
|
1197
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1198
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1199
|
-
}
|
|
1200
1076
|
};
|
|
1201
1077
|
|
|
1202
1078
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1277,17 +1153,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1277
1153
|
}
|
|
1278
1154
|
disconnectedCallback() {
|
|
1279
1155
|
plt.jmp(() => disconnectedCallback(this));
|
|
1280
|
-
plt.raf(() => {
|
|
1281
|
-
var _a3;
|
|
1282
|
-
const hostRef = getHostRef(this);
|
|
1283
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1284
|
-
if (i2 > -1) {
|
|
1285
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
1286
|
-
}
|
|
1287
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1288
|
-
delete hostRef.$vnode$.$elm$;
|
|
1289
|
-
}
|
|
1290
|
-
});
|
|
1291
1156
|
}
|
|
1292
1157
|
componentOnReady() {
|
|
1293
1158
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1351,7 +1216,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1351
1216
|
}
|
|
1352
1217
|
}
|
|
1353
1218
|
} catch (e) {
|
|
1354
|
-
consoleError(e
|
|
1219
|
+
consoleError(e);
|
|
1355
1220
|
}
|
|
1356
1221
|
};
|
|
1357
1222
|
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-6912ff15.js';
|
|
2
|
+
export { s as setNonce } from './index-6912ff15.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
@@ -1015,8 +1015,6 @@ export declare namespace JSXBase {
|
|
|
1015
1015
|
autoPlay?: boolean;
|
|
1016
1016
|
autoplay?: boolean | string;
|
|
1017
1017
|
controls?: boolean;
|
|
1018
|
-
controlslist?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
|
|
1019
|
-
controlsList?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
|
|
1020
1018
|
crossOrigin?: string;
|
|
1021
1019
|
crossorigin?: string;
|
|
1022
1020
|
loop?: boolean;
|
|
@@ -1566,10 +1564,6 @@ export declare namespace JSXBase {
|
|
|
1566
1564
|
onSubmitCapture?: (event: Event) => void;
|
|
1567
1565
|
onInvalid?: (event: Event) => void;
|
|
1568
1566
|
onInvalidCapture?: (event: Event) => void;
|
|
1569
|
-
onBeforeToggle?: (event: Event) => void;
|
|
1570
|
-
onBeforeToggleCapture?: (event: Event) => void;
|
|
1571
|
-
onToggle?: (event: Event) => void;
|
|
1572
|
-
onToggleCapture?: (event: Event) => void;
|
|
1573
1567
|
onLoad?: (event: Event) => void;
|
|
1574
1568
|
onLoadCapture?: (event: Event) => void;
|
|
1575
1569
|
onError?: (event: Event) => void;
|