@everymatrix/helper-tabs 1.55.0 → 1.56.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/helper-tab_2.cjs.entry.js +125 -52
- package/dist/cjs/helper-tabs.cjs.js +3 -3
- package/dist/cjs/{index-d8f4ee8c.js → index-d010e014.js} +45 -48
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/helper-tab/helper-tab.js +62 -32
- package/dist/collection/components/helper-tabs/helper-tabs.js +56 -30
- package/dist/esm/helper-tab_2.entry.js +125 -52
- package/dist/esm/helper-tabs.js +4 -4
- package/dist/esm/{index-55376e55.js → index-3174302b.js} +45 -48
- package/dist/esm/loader.js +3 -3
- package/dist/helper-tabs/helper-tabs.esm.js +1 -1
- package/dist/helper-tabs/p-88d4a539.entry.js +1 -0
- package/dist/helper-tabs/p-a0103339.js +2 -0
- package/dist/types/components/helper-tab/helper-tab.d.ts +10 -5
- package/dist/types/components/helper-tabs/helper-tabs.d.ts +10 -5
- package/dist/types/components.d.ts +20 -4
- package/dist/types/stencil-public-runtime.d.ts +0 -6
- package/package.json +1 -1
- package/dist/helper-tabs/p-47fcd693.js +0 -2
- package/dist/helper-tabs/p-7f43459b.entry.js +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-d010e014.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
8
|
const SUPPORTED_LANGUAGES = ['en'];
|
|
@@ -76,28 +76,74 @@ const getTranslations = (data) => {
|
|
|
76
76
|
});
|
|
77
77
|
};
|
|
78
78
|
|
|
79
|
+
/**
|
|
80
|
+
* @name setClientStyling
|
|
81
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content received
|
|
82
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
83
|
+
* @param {string} clientStyling The style content
|
|
84
|
+
*/
|
|
85
|
+
function setClientStyling(stylingContainer, clientStyling) {
|
|
86
|
+
if (stylingContainer) {
|
|
87
|
+
const sheet = document.createElement('style');
|
|
88
|
+
sheet.innerHTML = clientStyling;
|
|
89
|
+
stylingContainer.appendChild(sheet);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @name setClientStylingURL
|
|
95
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
|
|
96
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
97
|
+
* @param {string} clientStylingUrl The URL of the style content
|
|
98
|
+
*/
|
|
99
|
+
function setClientStylingURL(stylingContainer, clientStylingUrl) {
|
|
100
|
+
const url = new URL(clientStylingUrl);
|
|
101
|
+
|
|
102
|
+
fetch(url.href)
|
|
103
|
+
.then((res) => res.text())
|
|
104
|
+
.then((data) => {
|
|
105
|
+
const cssFile = document.createElement('style');
|
|
106
|
+
cssFile.innerHTML = data;
|
|
107
|
+
if (stylingContainer) {
|
|
108
|
+
stylingContainer.appendChild(cssFile);
|
|
109
|
+
}
|
|
110
|
+
})
|
|
111
|
+
.catch((err) => {
|
|
112
|
+
console.error('There was an error while trying to load client styling from URL', err);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @name setStreamLibrary
|
|
118
|
+
* @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
|
|
119
|
+
* @param {HTMLElement} stylingContainer The highest element of the widget
|
|
120
|
+
* @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
|
|
121
|
+
* @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
|
|
122
|
+
*/
|
|
123
|
+
function setStreamStyling(stylingContainer, domain, subscription) {
|
|
124
|
+
if (window.emMessageBus) {
|
|
125
|
+
const sheet = document.createElement('style');
|
|
126
|
+
|
|
127
|
+
window.emMessageBus.subscribe(domain, (data) => {
|
|
128
|
+
sheet.innerHTML = data;
|
|
129
|
+
if (stylingContainer) {
|
|
130
|
+
stylingContainer.appendChild(sheet);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
79
136
|
const helperTabCss = ":host{display:block}.TabContent{font-size:14px;color:var(--emw--button-text-color, #000);font-weight:normal}";
|
|
80
137
|
const HelperTabStyle0 = helperTabCss;
|
|
81
138
|
|
|
82
139
|
const HelperTab = class {
|
|
83
140
|
constructor(hostRef) {
|
|
84
141
|
index.registerInstance(this, hostRef);
|
|
85
|
-
this.setClientStyling = () => {
|
|
86
|
-
let sheet = document.createElement('style');
|
|
87
|
-
sheet.innerHTML = this.clientStyling;
|
|
88
|
-
this.stylingContainer.prepend(sheet);
|
|
89
|
-
};
|
|
90
|
-
this.setClientStylingURL = () => {
|
|
91
|
-
let cssFile = document.createElement('style');
|
|
92
|
-
setTimeout(() => {
|
|
93
|
-
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
94
|
-
this.stylingContainer.prepend(cssFile);
|
|
95
|
-
}, 1);
|
|
96
|
-
};
|
|
97
142
|
this.selectedIndex = 0;
|
|
98
143
|
this.cmsEndpoint = undefined;
|
|
144
|
+
this.mbSource = undefined;
|
|
99
145
|
this.clientStyling = '';
|
|
100
|
-
this.
|
|
146
|
+
this.clientStylingUrl = '';
|
|
101
147
|
this.lowNumber = undefined;
|
|
102
148
|
this.highNumber = undefined;
|
|
103
149
|
this.minimumAllowed = undefined;
|
|
@@ -105,24 +151,39 @@ const HelperTab = class {
|
|
|
105
151
|
this.language = 'en';
|
|
106
152
|
this.translationUrl = undefined;
|
|
107
153
|
this.tabContent = '';
|
|
108
|
-
|
|
154
|
+
}
|
|
155
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
156
|
+
if (newValue != oldValue) {
|
|
157
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
handleClientStylingChangeURL(newValue, oldValue) {
|
|
161
|
+
if (newValue != oldValue) {
|
|
162
|
+
if (this.clientStylingUrl)
|
|
163
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
componentDidLoad() {
|
|
167
|
+
if (this.stylingContainer) {
|
|
168
|
+
if (window.emMessageBus != undefined) {
|
|
169
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
if (this.clientStyling)
|
|
173
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
174
|
+
if (this.clientStylingUrl)
|
|
175
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
disconnectedCallback() {
|
|
180
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
109
181
|
}
|
|
110
182
|
componentWillLoad() {
|
|
111
183
|
if (this.translationUrl) {
|
|
112
184
|
getTranslations(JSON.parse(this.translationUrl));
|
|
113
185
|
}
|
|
114
186
|
}
|
|
115
|
-
componentDidRender() {
|
|
116
|
-
// start custom styling area
|
|
117
|
-
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
118
|
-
if (this.clientStyling)
|
|
119
|
-
this.setClientStyling();
|
|
120
|
-
if (this.clientStylingUrlContent)
|
|
121
|
-
this.setClientStylingURL();
|
|
122
|
-
this.limitStylingAppends = true;
|
|
123
|
-
}
|
|
124
|
-
// end custom styling area
|
|
125
|
-
}
|
|
126
187
|
getHowToPlay() {
|
|
127
188
|
if (this.lowNumber && this.highNumber && this.maxinumAllowed && this.minimumAllowed) {
|
|
128
189
|
return translateWithParams('howToPlay', {
|
|
@@ -136,15 +197,19 @@ const HelperTab = class {
|
|
|
136
197
|
return '';
|
|
137
198
|
}
|
|
138
199
|
render() {
|
|
139
|
-
this.tabContent = index.h("div", { key: '
|
|
200
|
+
this.tabContent = index.h("div", { key: '92877a17361066f68fce6299cb8f65901f6abc60', class: "TabContent", ref: el => this.stylingContainer = el }, this.getHowToPlay());
|
|
140
201
|
if (this.selectedIndex + 1 == 2) {
|
|
141
|
-
this.tabContent = index.h("div", { key: '
|
|
202
|
+
this.tabContent = index.h("div", { key: '9876b9250371034ef40dab0f5fc3fe1a5631a370', class: "TabContent", ref: el => this.stylingContainer = el }, index.h("ol", { key: 'ef2097eb54aeb640f06871277d8cafd2f4455109' }, index.h("li", { key: 'e9a0237e1fdead445abcd9240174276ffef81a67' }, translate('register', this.language)), index.h("li", { key: '2bdfaffdc9f1a7ae021913cb0ba346132140dcfd' }, translate('butTickets', this.language)), index.h("li", { key: 'bff38eaeabeaece83dc8ed1697e5b052802753f6' }, translate('reviewPurchase', this.language))));
|
|
142
203
|
}
|
|
143
204
|
else if (this.selectedIndex + 1 == 3) {
|
|
144
|
-
this.tabContent = index.h("div", { key: '
|
|
205
|
+
this.tabContent = index.h("div", { key: '49a7fb3435fb50b54572ec38d1e632e2eacf56fb', class: "TabContent", ref: el => this.stylingContainer = el }, index.h("ul", { key: '7f642625f35a1ed1eae7655144c0b8b1bfe25f55' }, index.h("li", { key: '037a5913be57dd1e2dcde5a061e9c64e70365e8d' }, translate('odds', this.language)), index.h("li", { key: '8775a1b2e8eda285e2c248b8d7235f06ac593fc6' }, translate('winGame', this.language)), index.h("li", { key: '5297fc5e757c29a1349049f1fe294e926255d518' }, translate('claimPrize', this.language))));
|
|
145
206
|
}
|
|
146
207
|
return (this.tabContent);
|
|
147
208
|
}
|
|
209
|
+
static get watchers() { return {
|
|
210
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
211
|
+
"clientStylingUrl": ["handleClientStylingChangeURL"]
|
|
212
|
+
}; }
|
|
148
213
|
};
|
|
149
214
|
HelperTab.style = HelperTabStyle0;
|
|
150
215
|
|
|
@@ -154,18 +219,6 @@ const HelperTabsStyle0 = helperTabsCss;
|
|
|
154
219
|
const HelperTabs = class {
|
|
155
220
|
constructor(hostRef) {
|
|
156
221
|
index.registerInstance(this, hostRef);
|
|
157
|
-
this.setClientStyling = () => {
|
|
158
|
-
let sheet = document.createElement('style');
|
|
159
|
-
sheet.innerHTML = this.clientStyling;
|
|
160
|
-
this.stylingContainer.prepend(sheet);
|
|
161
|
-
};
|
|
162
|
-
this.setClientStylingURL = () => {
|
|
163
|
-
let cssFile = document.createElement('style');
|
|
164
|
-
setTimeout(() => {
|
|
165
|
-
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
166
|
-
this.stylingContainer.prepend(cssFile);
|
|
167
|
-
}, 1);
|
|
168
|
-
};
|
|
169
222
|
this.disabled = false;
|
|
170
223
|
this.label = undefined;
|
|
171
224
|
this.selected = false;
|
|
@@ -173,33 +226,53 @@ const HelperTabs = class {
|
|
|
173
226
|
this.selectedIndex = 0;
|
|
174
227
|
this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
|
|
175
228
|
this.clientStyling = '';
|
|
229
|
+
this.mbSource = undefined;
|
|
176
230
|
this.clientStylingurl = '';
|
|
177
|
-
this.
|
|
231
|
+
this.clientStylingUrl = '';
|
|
178
232
|
this.lowNumber = undefined;
|
|
179
233
|
this.highNumber = undefined;
|
|
180
234
|
this.minimumAllowed = undefined;
|
|
181
235
|
this.maxinumAllowed = undefined;
|
|
182
236
|
this.language = 'en';
|
|
183
237
|
this.translationUrl = undefined;
|
|
184
|
-
this.limitStylingAppends = false;
|
|
185
238
|
}
|
|
186
239
|
connectedCallback() {
|
|
187
240
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
241
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
242
|
+
if (newValue != oldValue) {
|
|
243
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
handleClientStylingChangeURL(newValue, oldValue) {
|
|
247
|
+
if (newValue != oldValue) {
|
|
248
|
+
if (this.clientStylingUrl)
|
|
249
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
componentDidLoad() {
|
|
253
|
+
if (this.stylingContainer) {
|
|
254
|
+
if (window.emMessageBus != undefined) {
|
|
255
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
if (this.clientStyling)
|
|
259
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
260
|
+
if (this.clientStylingUrl)
|
|
261
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
194
262
|
}
|
|
195
|
-
this.limitStylingAppends = true;
|
|
196
263
|
}
|
|
197
|
-
|
|
264
|
+
}
|
|
265
|
+
disconnectedCallback() {
|
|
266
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
198
267
|
}
|
|
199
268
|
render() {
|
|
200
|
-
return (index.h("div", { key: '
|
|
269
|
+
return (index.h("div", { key: '173c4774748482dc56fcffb4bac4e1666fa9170f', ref: el => this.stylingContainer = el }, index.h("div", { key: '680b65218e4b00f134b354f593c0c20fb5882dca', class: "Tabs" }, this.tabs.map((tab, index$1) => index.h("button", { class: 'TabButton' + (this.selectedIndex == index$1 ? ' Active' : ''), onClick: () => this.selectedIndex = index$1 }, tab.label))), index.h("div", { key: '67aa26c92fb416c5d0934988fb071481f805685b' }, index.h("helper-tab", { key: '63c8dfc253d4fc12b0310a2585a44b90807e1a9f', "low-number": this.lowNumber, "high-number": this.highNumber, "minimum-allowed": this.minimumAllowed, "maxinum-allowed": this.maxinumAllowed, selectedIndex: this.selectedIndex, "client-styling": this.clientStyling, language: this.language, "translation-url": this.translationUrl, "client-stylingurl": this.clientStylingurl, "client-styling-url-content": this.clientStylingUrl, "mb-source": this.mbSource }))));
|
|
201
270
|
}
|
|
202
271
|
get host() { return index.getElement(this); }
|
|
272
|
+
static get watchers() { return {
|
|
273
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
274
|
+
"clientStylingUrl": ["handleClientStylingChangeURL"]
|
|
275
|
+
}; }
|
|
203
276
|
};
|
|
204
277
|
HelperTabs.style = HelperTabsStyle0;
|
|
205
278
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-d010e014.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
|
-
Stencil Client Patch Browser v4.
|
|
9
|
+
Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
10
10
|
*/
|
|
11
11
|
var patchBrowser = () => {
|
|
12
12
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('helper-tabs.cjs.js', document.baseURI).href));
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["helper-tab_2.cjs",[[1,"helper-tabs",{"disabled":[516],"label":[513],"selected":[516],"cmsEndpoint":[513,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[513,"client-styling"],"clientStylingurl":[513,"client-stylingurl"],"
|
|
22
|
+
return index.bootstrapLazy([["helper-tab_2.cjs",[[1,"helper-tabs",{"disabled":[516],"label":[513],"selected":[516],"cmsEndpoint":[513,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[513,"client-styling"],"mbSource":[1,"mb-source"],"clientStylingurl":[513,"client-stylingurl"],"clientStylingUrl":[513,"client-styling-url"],"lowNumber":[514,"low-number"],"highNumber":[514,"high-number"],"minimumAllowed":[514,"minimum-allowed"],"maxinumAllowed":[514,"maxinum-allowed"],"language":[513],"translationUrl":[520,"translation-url"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}],[1,"helper-tab",{"selectedIndex":[514,"selected-index"],"cmsEndpoint":[513,"cms-endpoint"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"lowNumber":[514,"low-number"],"highNumber":[514,"high-number"],"minimumAllowed":[514,"minimum-allowed"],"maxinumAllowed":[514,"maxinum-allowed"],"language":[513],"translationUrl":[520,"translation-url"],"tabContent":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -21,10 +21,10 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'helper-tabs';
|
|
24
|
-
const BUILD = /* helper-tabs */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad:
|
|
24
|
+
const BUILD = /* helper-tabs */ { 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: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, 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: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
@@ -350,31 +350,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
350
350
|
if (nonce != null) {
|
|
351
351
|
styleElm.setAttribute("nonce", nonce);
|
|
352
352
|
}
|
|
353
|
-
|
|
354
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
355
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
356
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
357
|
-
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
358
|
-
} else if ("host" in styleContainerNode) {
|
|
359
|
-
if (supportsConstructableStylesheets) {
|
|
360
|
-
const stylesheet = new CSSStyleSheet();
|
|
361
|
-
stylesheet.replaceSync(style);
|
|
362
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
363
|
-
} else {
|
|
364
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
365
|
-
if (existingStyleContainer) {
|
|
366
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
367
|
-
} else {
|
|
368
|
-
styleContainerNode.prepend(styleElm);
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
} else {
|
|
372
|
-
styleContainerNode.append(styleElm);
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
376
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
377
|
-
}
|
|
353
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
|
|
378
354
|
}
|
|
379
355
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
380
356
|
styleElm.innerHTML += SLOT_FB_CSS;
|
|
@@ -397,7 +373,7 @@ var attachStyles = (hostRef) => {
|
|
|
397
373
|
const scopeId2 = addStyle(
|
|
398
374
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
399
375
|
cmpMeta);
|
|
400
|
-
if (flags & 10 /* needsScopedEncapsulation */
|
|
376
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
401
377
|
elm["s-sc"] = scopeId2;
|
|
402
378
|
elm.classList.add(scopeId2 + "-h");
|
|
403
379
|
}
|
|
@@ -445,11 +421,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
445
421
|
if (memberName === "list") {
|
|
446
422
|
isProp = false;
|
|
447
423
|
} else if (oldValue == null || elm[memberName] != n) {
|
|
448
|
-
|
|
449
|
-
elm[memberName] = n;
|
|
450
|
-
} else {
|
|
451
|
-
elm.setAttribute(memberName, n);
|
|
452
|
-
}
|
|
424
|
+
elm[memberName] = n;
|
|
453
425
|
}
|
|
454
426
|
} else {
|
|
455
427
|
elm[memberName] = newValue;
|
|
@@ -522,9 +494,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
522
494
|
{
|
|
523
495
|
updateElement(null, newVNode2, isSvgMode);
|
|
524
496
|
}
|
|
525
|
-
|
|
526
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
527
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
497
|
+
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
528
498
|
elm.classList.add(elm["s-si"] = scopeId);
|
|
529
499
|
}
|
|
530
500
|
if (newVNode2.$children$) {
|
|
@@ -678,10 +648,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
678
648
|
elm.textContent = "";
|
|
679
649
|
}
|
|
680
650
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
681
|
-
} else if (
|
|
682
|
-
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
683
|
-
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
684
|
-
) {
|
|
651
|
+
} else if (oldChildren !== null) {
|
|
685
652
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
686
653
|
}
|
|
687
654
|
} else if (oldVNode.$text$ !== text) {
|
|
@@ -826,14 +793,14 @@ var postUpdateComponent = (hostRef) => {
|
|
|
826
793
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
827
794
|
const instance = hostRef.$lazyInstance$ ;
|
|
828
795
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
829
|
-
{
|
|
830
|
-
safeCall(instance, "componentDidRender");
|
|
831
|
-
}
|
|
832
796
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
833
797
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
834
798
|
{
|
|
835
799
|
addHydratedFlag(elm);
|
|
836
800
|
}
|
|
801
|
+
{
|
|
802
|
+
safeCall(instance, "componentDidLoad");
|
|
803
|
+
}
|
|
837
804
|
endPostUpdate();
|
|
838
805
|
{
|
|
839
806
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -885,6 +852,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
885
852
|
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
|
|
886
853
|
);
|
|
887
854
|
}
|
|
855
|
+
const elm = hostRef.$hostElement$ ;
|
|
888
856
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
889
857
|
const flags = hostRef.$flags$;
|
|
890
858
|
const instance = hostRef.$lazyInstance$ ;
|
|
@@ -894,6 +862,18 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
894
862
|
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
895
863
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
896
864
|
if (instance) {
|
|
865
|
+
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
866
|
+
const watchMethods = cmpMeta.$watchers$[propName];
|
|
867
|
+
if (watchMethods) {
|
|
868
|
+
watchMethods.map((watchMethodName) => {
|
|
869
|
+
try {
|
|
870
|
+
instance[watchMethodName](newVal, oldVal, propName);
|
|
871
|
+
} catch (e) {
|
|
872
|
+
consoleError(e, elm);
|
|
873
|
+
}
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
}
|
|
897
877
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
898
878
|
scheduleUpdate(hostRef, false);
|
|
899
879
|
}
|
|
@@ -905,7 +885,10 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
905
885
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
906
886
|
var _a, _b;
|
|
907
887
|
const prototype = Cstr.prototype;
|
|
908
|
-
if (cmpMeta.$members$ ||
|
|
888
|
+
if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
|
|
889
|
+
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
890
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
891
|
+
}
|
|
909
892
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
910
893
|
members.map(([memberName, [memberFlags]]) => {
|
|
911
894
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
@@ -930,8 +913,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
930
913
|
if (this.hasOwnProperty(propName)) {
|
|
931
914
|
newValue = this[propName];
|
|
932
915
|
delete this[propName];
|
|
933
|
-
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" &&
|
|
934
|
-
this[propName] == newValue) {
|
|
916
|
+
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
|
|
935
917
|
return;
|
|
936
918
|
} else if (propName == null) {
|
|
937
919
|
const hostRef = getHostRef(this);
|
|
@@ -988,6 +970,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
988
970
|
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
989
971
|
}
|
|
990
972
|
if (!Cstr.isProxied) {
|
|
973
|
+
{
|
|
974
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
975
|
+
}
|
|
991
976
|
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
992
977
|
Cstr.isProxied = true;
|
|
993
978
|
}
|
|
@@ -1003,6 +988,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1003
988
|
{
|
|
1004
989
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1005
990
|
}
|
|
991
|
+
{
|
|
992
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
993
|
+
}
|
|
1006
994
|
endNewInstance();
|
|
1007
995
|
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1008
996
|
} else {
|
|
@@ -1077,12 +1065,17 @@ var connectedCallback = (elm) => {
|
|
|
1077
1065
|
}
|
|
1078
1066
|
};
|
|
1079
1067
|
var disconnectInstance = (instance) => {
|
|
1068
|
+
{
|
|
1069
|
+
safeCall(instance, "disconnectedCallback");
|
|
1070
|
+
}
|
|
1080
1071
|
};
|
|
1081
1072
|
var disconnectedCallback = async (elm) => {
|
|
1082
1073
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1083
1074
|
const hostRef = getHostRef(elm);
|
|
1084
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1085
|
-
hostRef.$
|
|
1075
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1076
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
|
1077
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1078
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
|
1086
1079
|
}
|
|
1087
1080
|
}
|
|
1088
1081
|
};
|
|
@@ -1105,6 +1098,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1105
1098
|
let hasSlotRelocation = false;
|
|
1106
1099
|
lazyBundles.map((lazyBundle) => {
|
|
1107
1100
|
lazyBundle[1].map((compactMeta) => {
|
|
1101
|
+
var _a2;
|
|
1108
1102
|
const cmpMeta = {
|
|
1109
1103
|
$flags$: compactMeta[0],
|
|
1110
1104
|
$tagName$: compactMeta[1],
|
|
@@ -1120,6 +1114,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1120
1114
|
{
|
|
1121
1115
|
cmpMeta.$attrsToReflect$ = [];
|
|
1122
1116
|
}
|
|
1117
|
+
{
|
|
1118
|
+
cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
|
|
1119
|
+
}
|
|
1123
1120
|
const tagName = cmpMeta.$tagName$;
|
|
1124
1121
|
const HostElement = class extends HTMLElement {
|
|
1125
1122
|
// StencilLazyHost
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-d010e014.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["helper-tab_2.cjs",[[1,"helper-tabs",{"disabled":[516],"label":[513],"selected":[516],"cmsEndpoint":[513,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[513,"client-styling"],"clientStylingurl":[513,"client-stylingurl"],"
|
|
11
|
+
return index.bootstrapLazy([["helper-tab_2.cjs",[[1,"helper-tabs",{"disabled":[516],"label":[513],"selected":[516],"cmsEndpoint":[513,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[513,"client-styling"],"mbSource":[1,"mb-source"],"clientStylingurl":[513,"client-stylingurl"],"clientStylingUrl":[513,"client-styling-url"],"lowNumber":[514,"low-number"],"highNumber":[514,"high-number"],"minimumAllowed":[514,"minimum-allowed"],"maxinumAllowed":[514,"maxinum-allowed"],"language":[513],"translationUrl":[520,"translation-url"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}],[1,"helper-tab",{"selectedIndex":[514,"selected-index"],"cmsEndpoint":[513,"cms-endpoint"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"lowNumber":[514,"low-number"],"highNumber":[514,"high-number"],"minimumAllowed":[514,"minimum-allowed"],"maxinumAllowed":[514,"maxinum-allowed"],"language":[513],"translationUrl":[520,"translation-url"],"tabContent":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|