@everymatrix/casino-engagement-suite-modal 1.54.11 → 1.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/casino-engagement-suite-modal/casino-engagement-suite-modal.esm.js +1 -1
- package/dist/casino-engagement-suite-modal/p-5790ada5.js +2 -0
- package/dist/casino-engagement-suite-modal/p-d9bda8ef.entry.js +1 -0
- package/dist/cjs/casino-engagement-suite-modal.cjs.entry.js +11 -15
- package/dist/cjs/casino-engagement-suite-modal.cjs.js +2 -2
- package/dist/cjs/{index-f0bdc19e.js → index-d9714a37.js} +65 -166
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/casino-engagement-suite-modal/casino-engagement-suite-modal.js +10 -32
- package/dist/esm/casino-engagement-suite-modal.entry.js +11 -15
- package/dist/esm/casino-engagement-suite-modal.js +3 -3
- package/dist/esm/{index-118cee90.js → index-9117fdce.js} +65 -166
- package/dist/esm/loader.js +2 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-engagement-suite-modal/.stencil/packages/stencil/casino-engagement-suite-modal/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-engagement-suite-modal/.stencil/packages/stencil/casino-engagement-suite-modal/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/casino-engagement-suite-modal/p-6b988108.js +0 -2
- package/dist/casino-engagement-suite-modal/p-c66da26c.entry.js +0 -1
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-engagement-suite-modal/.stencil/packages/stencil/casino-engagement-suite-modal/stencil.config.d.ts +0 -2
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-engagement-suite-modal/.stencil/packages/stencil/casino-engagement-suite-modal/stencil.config.dev.d.ts +0 -2
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-engagement-suite-modal/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-engagement-suite-modal/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-engagement-suite-modal/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-engagement-suite-modal/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
package/dist/collection/components/casino-engagement-suite-modal/casino-engagement-suite-modal.js
CHANGED
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export class CasinoEngagementSuiteModal {
|
|
3
3
|
constructor() {
|
|
4
|
-
/**
|
|
5
|
-
* Client custom styling via string
|
|
6
|
-
*/
|
|
7
|
-
this.clientStyling = '';
|
|
8
|
-
/**
|
|
9
|
-
* Client custom styling via url
|
|
10
|
-
*/
|
|
11
|
-
this.clientStylingUrl = '';
|
|
12
|
-
this.device = 'Mobile';
|
|
13
|
-
/**
|
|
14
|
-
* Show win animation
|
|
15
|
-
*/
|
|
16
|
-
this.showAnimation = false;
|
|
17
|
-
this.limitStylingAppends = false;
|
|
18
4
|
this.handleCloseClick = () => {
|
|
19
5
|
if (this.isLoading)
|
|
20
6
|
return;
|
|
@@ -38,6 +24,16 @@ export class CasinoEngagementSuiteModal {
|
|
|
38
24
|
console.log('Error ', err);
|
|
39
25
|
});
|
|
40
26
|
};
|
|
27
|
+
this.clientStyling = '';
|
|
28
|
+
this.clientStylingUrl = '';
|
|
29
|
+
this.isOpen = undefined;
|
|
30
|
+
this.isLoading = undefined;
|
|
31
|
+
this.header = undefined;
|
|
32
|
+
this.contentIcon = undefined;
|
|
33
|
+
this.modalType = undefined;
|
|
34
|
+
this.device = 'Mobile';
|
|
35
|
+
this.showAnimation = false;
|
|
36
|
+
this.limitStylingAppends = false;
|
|
41
37
|
}
|
|
42
38
|
componentDidRender() {
|
|
43
39
|
if (!this.limitStylingAppends && this.host) {
|
|
@@ -81,8 +77,6 @@ export class CasinoEngagementSuiteModal {
|
|
|
81
77
|
"tags": [],
|
|
82
78
|
"text": "Client custom styling via string"
|
|
83
79
|
},
|
|
84
|
-
"getter": false,
|
|
85
|
-
"setter": false,
|
|
86
80
|
"attribute": "client-styling",
|
|
87
81
|
"reflect": true,
|
|
88
82
|
"defaultValue": "''"
|
|
@@ -101,8 +95,6 @@ export class CasinoEngagementSuiteModal {
|
|
|
101
95
|
"tags": [],
|
|
102
96
|
"text": "Client custom styling via url"
|
|
103
97
|
},
|
|
104
|
-
"getter": false,
|
|
105
|
-
"setter": false,
|
|
106
98
|
"attribute": "client-styling-url",
|
|
107
99
|
"reflect": true,
|
|
108
100
|
"defaultValue": "''"
|
|
@@ -121,8 +113,6 @@ export class CasinoEngagementSuiteModal {
|
|
|
121
113
|
"tags": [],
|
|
122
114
|
"text": ""
|
|
123
115
|
},
|
|
124
|
-
"getter": false,
|
|
125
|
-
"setter": false,
|
|
126
116
|
"attribute": "is-open",
|
|
127
117
|
"reflect": false
|
|
128
118
|
},
|
|
@@ -140,8 +130,6 @@ export class CasinoEngagementSuiteModal {
|
|
|
140
130
|
"tags": [],
|
|
141
131
|
"text": ""
|
|
142
132
|
},
|
|
143
|
-
"getter": false,
|
|
144
|
-
"setter": false,
|
|
145
133
|
"attribute": "is-loading",
|
|
146
134
|
"reflect": false
|
|
147
135
|
},
|
|
@@ -159,8 +147,6 @@ export class CasinoEngagementSuiteModal {
|
|
|
159
147
|
"tags": [],
|
|
160
148
|
"text": ""
|
|
161
149
|
},
|
|
162
|
-
"getter": false,
|
|
163
|
-
"setter": false,
|
|
164
150
|
"attribute": "header",
|
|
165
151
|
"reflect": false
|
|
166
152
|
},
|
|
@@ -178,8 +164,6 @@ export class CasinoEngagementSuiteModal {
|
|
|
178
164
|
"tags": [],
|
|
179
165
|
"text": ""
|
|
180
166
|
},
|
|
181
|
-
"getter": false,
|
|
182
|
-
"setter": false,
|
|
183
167
|
"attribute": "content-icon",
|
|
184
168
|
"reflect": false
|
|
185
169
|
},
|
|
@@ -197,8 +181,6 @@ export class CasinoEngagementSuiteModal {
|
|
|
197
181
|
"tags": [],
|
|
198
182
|
"text": ""
|
|
199
183
|
},
|
|
200
|
-
"getter": false,
|
|
201
|
-
"setter": false,
|
|
202
184
|
"attribute": "modal-type",
|
|
203
185
|
"reflect": false
|
|
204
186
|
},
|
|
@@ -216,8 +198,6 @@ export class CasinoEngagementSuiteModal {
|
|
|
216
198
|
"tags": [],
|
|
217
199
|
"text": ""
|
|
218
200
|
},
|
|
219
|
-
"getter": false,
|
|
220
|
-
"setter": false,
|
|
221
201
|
"attribute": "device",
|
|
222
202
|
"reflect": false,
|
|
223
203
|
"defaultValue": "'Mobile' as 'Mobile' | 'Tablet' | 'Desktop'"
|
|
@@ -236,8 +216,6 @@ export class CasinoEngagementSuiteModal {
|
|
|
236
216
|
"tags": [],
|
|
237
217
|
"text": "Show win animation"
|
|
238
218
|
},
|
|
239
|
-
"getter": false,
|
|
240
|
-
"setter": false,
|
|
241
219
|
"attribute": "show-animation",
|
|
242
220
|
"reflect": false,
|
|
243
221
|
"defaultValue": "false"
|
|
@@ -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-9117fdce.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) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-9117fdce.js';
|
|
2
|
+
export { s as setNonce } from './index-9117fdce.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v4.
|
|
6
|
+
Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
var patchBrowser = () => {
|
|
9
9
|
const importMeta = import.meta.url;
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
const NAMESPACE = 'casino-engagement-suite-modal';
|
|
2
|
-
const BUILD = /* casino-engagement-suite-modal */ { 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: 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 = /* casino-engagement-suite-modal */ { 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: 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: 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.22.3 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __export = (target, all) => {
|
|
9
9
|
for (var name in all)
|
|
10
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
// src/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,7 +334,7 @@ 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) {
|
|
@@ -349,10 +344,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
349
344
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
350
345
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
351
346
|
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
|
-
);
|
|
347
|
+
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
356
348
|
} else if ("host" in styleContainerNode) {
|
|
357
349
|
if (supportsConstructableStylesheets) {
|
|
358
350
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -370,7 +362,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
370
362
|
styleContainerNode.append(styleElm);
|
|
371
363
|
}
|
|
372
364
|
}
|
|
373
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
365
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
374
366
|
styleContainerNode.insertBefore(styleElm, null);
|
|
375
367
|
}
|
|
376
368
|
}
|
|
@@ -395,25 +387,23 @@ var attachStyles = (hostRef) => {
|
|
|
395
387
|
const scopeId2 = addStyle(
|
|
396
388
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
397
389
|
cmpMeta);
|
|
398
|
-
if (
|
|
390
|
+
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
399
391
|
elm["s-sc"] = scopeId2;
|
|
400
392
|
elm.classList.add(scopeId2 + "-h");
|
|
401
393
|
}
|
|
402
394
|
endAttachStyles();
|
|
403
395
|
};
|
|
404
396
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
405
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
397
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
406
398
|
if (oldValue !== newValue) {
|
|
407
399
|
let isProp = isMemberInElement(elm, memberName);
|
|
408
400
|
let ln = memberName.toLowerCase();
|
|
409
401
|
if (memberName === "class") {
|
|
410
402
|
const classList = elm.classList;
|
|
411
403
|
const oldClasses = parseClassList(oldValue);
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
416
|
-
}
|
|
404
|
+
const newClasses = parseClassList(newValue);
|
|
405
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
406
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
417
407
|
} else if (memberName === "style") {
|
|
418
408
|
{
|
|
419
409
|
for (const prop in oldValue) {
|
|
@@ -468,7 +458,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
468
458
|
elm.setAttribute(memberName, n);
|
|
469
459
|
}
|
|
470
460
|
}
|
|
471
|
-
} else
|
|
461
|
+
} else {
|
|
472
462
|
elm[memberName] = newValue;
|
|
473
463
|
}
|
|
474
464
|
} catch (e) {
|
|
@@ -490,44 +480,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
490
480
|
}
|
|
491
481
|
};
|
|
492
482
|
var parseClassListRegex = /\s/;
|
|
493
|
-
var parseClassList = (value) =>
|
|
494
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
495
|
-
value = value.baseVal;
|
|
496
|
-
}
|
|
497
|
-
if (!value || typeof value !== "string") {
|
|
498
|
-
return [];
|
|
499
|
-
}
|
|
500
|
-
return value.split(parseClassListRegex);
|
|
501
|
-
};
|
|
483
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
502
484
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
503
485
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
504
486
|
|
|
505
487
|
// src/runtime/vdom/update-element.ts
|
|
506
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
488
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
507
489
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
508
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
509
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
490
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
491
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
510
492
|
{
|
|
511
493
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
512
494
|
if (!(memberName in newVnodeAttrs)) {
|
|
513
|
-
setAccessor(
|
|
514
|
-
elm,
|
|
515
|
-
memberName,
|
|
516
|
-
oldVnodeAttrs[memberName],
|
|
517
|
-
void 0,
|
|
518
|
-
isSvgMode2,
|
|
519
|
-
newVnode.$flags$);
|
|
495
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
520
496
|
}
|
|
521
497
|
}
|
|
522
498
|
}
|
|
523
499
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
524
|
-
setAccessor(
|
|
525
|
-
elm,
|
|
526
|
-
memberName,
|
|
527
|
-
oldVnodeAttrs[memberName],
|
|
528
|
-
newVnodeAttrs[memberName],
|
|
529
|
-
isSvgMode2,
|
|
530
|
-
newVnode.$flags$);
|
|
500
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
531
501
|
}
|
|
532
502
|
};
|
|
533
503
|
function sortedAttrNames(attrNames) {
|
|
@@ -539,10 +509,13 @@ function sortedAttrNames(attrNames) {
|
|
|
539
509
|
attrNames
|
|
540
510
|
);
|
|
541
511
|
}
|
|
512
|
+
|
|
513
|
+
// src/runtime/vdom/vdom-render.ts
|
|
514
|
+
var scopeId;
|
|
542
515
|
var hostTagName;
|
|
543
516
|
var useNativeShadowDom = false;
|
|
544
517
|
var isSvgMode = false;
|
|
545
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
518
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
546
519
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
547
520
|
let i2 = 0;
|
|
548
521
|
let elm;
|
|
@@ -556,6 +529,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
556
529
|
{
|
|
557
530
|
updateElement(null, newVNode2, isSvgMode);
|
|
558
531
|
}
|
|
532
|
+
const rootNode = elm.getRootNode();
|
|
533
|
+
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
534
|
+
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
535
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
536
|
+
}
|
|
559
537
|
if (newVNode2.$children$) {
|
|
560
538
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
561
539
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -684,9 +662,6 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
684
662
|
if (!isInitialRender) {
|
|
685
663
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
686
664
|
}
|
|
687
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
688
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
689
|
-
}
|
|
690
665
|
return true;
|
|
691
666
|
}
|
|
692
667
|
return false;
|
|
@@ -721,9 +696,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
721
696
|
}
|
|
722
697
|
};
|
|
723
698
|
var insertBefore = (parent, newNode, reference) => {
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
}
|
|
699
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
700
|
+
return inserted;
|
|
727
701
|
};
|
|
728
702
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
729
703
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -748,21 +722,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
748
722
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
749
723
|
hostRef.$vnode$ = rootVnode;
|
|
750
724
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
751
|
-
|
|
725
|
+
{
|
|
726
|
+
scopeId = hostElm["s-sc"];
|
|
727
|
+
}
|
|
728
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
752
729
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
753
730
|
};
|
|
754
731
|
|
|
755
732
|
// src/runtime/update-component.ts
|
|
756
733
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
757
734
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
758
|
-
|
|
759
|
-
new Promise(
|
|
760
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
761
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
762
|
-
r();
|
|
763
|
-
}
|
|
764
|
-
)
|
|
765
|
-
);
|
|
735
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
766
736
|
}
|
|
767
737
|
};
|
|
768
738
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -853,7 +823,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
853
823
|
const instance = hostRef.$lazyInstance$ ;
|
|
854
824
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
855
825
|
{
|
|
856
|
-
safeCall(instance, "componentDidRender"
|
|
826
|
+
safeCall(instance, "componentDidRender");
|
|
857
827
|
}
|
|
858
828
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
859
829
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -882,14 +852,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
882
852
|
}
|
|
883
853
|
};
|
|
884
854
|
var appDidLoad = (who) => {
|
|
855
|
+
{
|
|
856
|
+
addHydratedFlag(doc.documentElement);
|
|
857
|
+
}
|
|
885
858
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
886
859
|
};
|
|
887
|
-
var safeCall = (instance, method, arg
|
|
860
|
+
var safeCall = (instance, method, arg) => {
|
|
888
861
|
if (instance && instance[method]) {
|
|
889
862
|
try {
|
|
890
863
|
return instance[method](arg);
|
|
891
864
|
} catch (e) {
|
|
892
|
-
consoleError(e
|
|
865
|
+
consoleError(e);
|
|
893
866
|
}
|
|
894
867
|
}
|
|
895
868
|
return void 0;
|
|
@@ -932,68 +905,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
932
905
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
933
906
|
members.map(([memberName, [memberFlags]]) => {
|
|
934
907
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
935
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
936
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
937
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
938
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
939
|
-
Object.defineProperty(prototype, memberName, {
|
|
940
|
-
get() {
|
|
941
|
-
{
|
|
942
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
943
|
-
return getValue(this, memberName);
|
|
944
|
-
}
|
|
945
|
-
const ref = getHostRef(this);
|
|
946
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
947
|
-
if (!instance) return;
|
|
948
|
-
return instance[memberName];
|
|
949
|
-
}
|
|
950
|
-
},
|
|
951
|
-
configurable: true,
|
|
952
|
-
enumerable: true
|
|
953
|
-
});
|
|
954
|
-
}
|
|
955
908
|
Object.defineProperty(prototype, memberName, {
|
|
909
|
+
get() {
|
|
910
|
+
return getValue(this, memberName);
|
|
911
|
+
},
|
|
956
912
|
set(newValue) {
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
962
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
963
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
964
|
-
}
|
|
965
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
966
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
967
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
968
|
-
return;
|
|
969
|
-
}
|
|
970
|
-
{
|
|
971
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
972
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
973
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
974
|
-
ref.$onReadyPromise$.then(() => {
|
|
975
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
976
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
977
|
-
}
|
|
978
|
-
});
|
|
979
|
-
}
|
|
980
|
-
return;
|
|
981
|
-
}
|
|
982
|
-
const setterSetVal = () => {
|
|
983
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
984
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
985
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
986
|
-
}
|
|
987
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
988
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
989
|
-
};
|
|
990
|
-
if (ref.$lazyInstance$) {
|
|
991
|
-
setterSetVal();
|
|
992
|
-
} else {
|
|
993
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
}
|
|
913
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
914
|
+
},
|
|
915
|
+
configurable: true,
|
|
916
|
+
enumerable: true
|
|
997
917
|
});
|
|
998
918
|
}
|
|
999
919
|
});
|
|
@@ -1003,7 +923,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1003
923
|
plt.jmp(() => {
|
|
1004
924
|
var _a2;
|
|
1005
925
|
const propName = attrNameToPropName.get(attrName);
|
|
1006
|
-
if (this.hasOwnProperty(propName)
|
|
926
|
+
if (this.hasOwnProperty(propName)) {
|
|
1007
927
|
newValue = this[propName];
|
|
1008
928
|
delete this[propName];
|
|
1009
929
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1023,11 +943,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1023
943
|
}
|
|
1024
944
|
return;
|
|
1025
945
|
}
|
|
1026
|
-
|
|
1027
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1028
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1029
|
-
this[propName] = newValue;
|
|
1030
|
-
}
|
|
946
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1031
947
|
});
|
|
1032
948
|
};
|
|
1033
949
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1056,7 +972,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1056
972
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1057
973
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1058
974
|
if (bundleId) {
|
|
1059
|
-
const CstrImport = loadModule(cmpMeta
|
|
975
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1060
976
|
if (CstrImport && "then" in CstrImport) {
|
|
1061
977
|
const endLoad = uniqueTime();
|
|
1062
978
|
Cstr = await CstrImport;
|
|
@@ -1078,7 +994,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1078
994
|
try {
|
|
1079
995
|
new Cstr(hostRef);
|
|
1080
996
|
} catch (e) {
|
|
1081
|
-
consoleError(e
|
|
997
|
+
consoleError(e);
|
|
1082
998
|
}
|
|
1083
999
|
{
|
|
1084
1000
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1110,7 +1026,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1110
1026
|
schedule();
|
|
1111
1027
|
}
|
|
1112
1028
|
};
|
|
1113
|
-
var fireConnectedCallback = (instance
|
|
1029
|
+
var fireConnectedCallback = (instance) => {
|
|
1114
1030
|
};
|
|
1115
1031
|
|
|
1116
1032
|
// src/runtime/connected-callback.ts
|
|
@@ -1150,7 +1066,7 @@ var connectedCallback = (elm) => {
|
|
|
1150
1066
|
endConnected();
|
|
1151
1067
|
}
|
|
1152
1068
|
};
|
|
1153
|
-
var disconnectInstance = (instance
|
|
1069
|
+
var disconnectInstance = (instance) => {
|
|
1154
1070
|
};
|
|
1155
1071
|
var disconnectedCallback = async (elm) => {
|
|
1156
1072
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1159,12 +1075,6 @@ var disconnectedCallback = async (elm) => {
|
|
|
1159
1075
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1160
1076
|
}
|
|
1161
1077
|
}
|
|
1162
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1163
|
-
rootAppliedStyles.delete(elm);
|
|
1164
|
-
}
|
|
1165
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1166
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1167
|
-
}
|
|
1168
1078
|
};
|
|
1169
1079
|
|
|
1170
1080
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1241,17 +1151,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1241
1151
|
}
|
|
1242
1152
|
disconnectedCallback() {
|
|
1243
1153
|
plt.jmp(() => disconnectedCallback(this));
|
|
1244
|
-
plt.raf(() => {
|
|
1245
|
-
var _a3;
|
|
1246
|
-
const hostRef = getHostRef(this);
|
|
1247
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1248
|
-
if (i2 > -1) {
|
|
1249
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
1250
|
-
}
|
|
1251
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1252
|
-
delete hostRef.$vnode$.$elm$;
|
|
1253
|
-
}
|
|
1254
|
-
});
|
|
1255
1154
|
}
|
|
1256
1155
|
componentOnReady() {
|
|
1257
1156
|
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-9117fdce.js';
|
|
2
|
+
export { s as setNonce } from './index-9117fdce.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|