@everymatrix/helper-accordion 0.1.6 → 0.1.20
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-accordion.cjs.entry.js +35 -3
- package/dist/cjs/helper-accordion.cjs.js +2 -2
- package/dist/cjs/{index-00d811c5.js → index-14140980.js} +17 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/helper-accordion/helper-accordion.css +3 -1
- package/dist/collection/components/helper-accordion/helper-accordion.js +72 -3
- package/dist/components/helper-accordion.js +38 -4
- package/dist/esm/helper-accordion.entry.js +35 -3
- package/dist/esm/helper-accordion.js +2 -2
- package/dist/esm/{index-7111dcde.js → index-19830116.js} +17 -0
- package/dist/esm/loader.js +2 -2
- package/dist/helper-accordion/helper-accordion.esm.js +1 -1
- package/dist/helper-accordion/p-3c894e85.entry.js +1 -0
- package/dist/helper-accordion/p-ba8015b8.js +1 -0
- package/dist/stencil.config.js +0 -2
- package/dist/types/components/helper-accordion/helper-accordion.d.ts +13 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +2 -2
- package/dist/helper-accordion/p-b6a654d9.entry.js +0 -1
- package/dist/helper-accordion/p-e6ddfc6c.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-14140980.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
8
|
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
@@ -19,7 +19,7 @@ const translate = (key, customLang) => {
|
|
|
19
19
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:
|
|
22
|
+
const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:5px;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:1px}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff;text-transform:capitalize}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}";
|
|
23
23
|
|
|
24
24
|
const Accordion = class {
|
|
25
25
|
constructor(hostRef) {
|
|
@@ -65,11 +65,43 @@ const Accordion = class {
|
|
|
65
65
|
* Language
|
|
66
66
|
*/
|
|
67
67
|
this.language = 'en';
|
|
68
|
+
/**
|
|
69
|
+
* Client custom styling via string
|
|
70
|
+
*/
|
|
71
|
+
this.clientStyling = '';
|
|
72
|
+
/**
|
|
73
|
+
* Client custom styling via url content
|
|
74
|
+
*/
|
|
75
|
+
this.clientStylingUrlContent = '';
|
|
76
|
+
this.limitStylingAppends = false;
|
|
77
|
+
this.setClientStyling = () => {
|
|
78
|
+
let sheet = document.createElement('style');
|
|
79
|
+
sheet.innerHTML = this.clientStyling;
|
|
80
|
+
this.stylingContainer.prepend(sheet);
|
|
81
|
+
};
|
|
82
|
+
this.setClientStylingURL = () => {
|
|
83
|
+
let cssFile = document.createElement('style');
|
|
84
|
+
setTimeout(() => {
|
|
85
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
86
|
+
this.stylingContainer.prepend(cssFile);
|
|
87
|
+
}, 1);
|
|
88
|
+
};
|
|
68
89
|
}
|
|
69
90
|
// @TODO fix the `any` type :)
|
|
70
91
|
connectedCallback() {
|
|
71
92
|
this.showContent = !this.collapsed;
|
|
72
93
|
}
|
|
94
|
+
componentDidRender() {
|
|
95
|
+
// start custom styling area
|
|
96
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
97
|
+
if (this.clientStyling)
|
|
98
|
+
this.setClientStyling();
|
|
99
|
+
if (this.clientStylingUrlContent)
|
|
100
|
+
this.setClientStylingURL();
|
|
101
|
+
this.limitStylingAppends = true;
|
|
102
|
+
}
|
|
103
|
+
// end custom styling area
|
|
104
|
+
}
|
|
73
105
|
toggleContent() {
|
|
74
106
|
this.showContent = !this.showContent;
|
|
75
107
|
}
|
|
@@ -81,7 +113,7 @@ const Accordion = class {
|
|
|
81
113
|
this.accordionEvent.emit();
|
|
82
114
|
}
|
|
83
115
|
render() {
|
|
84
|
-
return (index.h("div", { class: "Wrapper" }, index.h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, index.h("p", { class: "Title" }, this.headerTitle), index.h("p", { class: "Subtitle" }, this.headerSubtitle), index.h("p", { class: "Subtitle" }, this.description), index.h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
|
|
116
|
+
return (index.h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, index.h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, index.h("p", { class: "Title" }, this.headerTitle), index.h("p", { class: "Subtitle" }, this.headerSubtitle), index.h("p", { class: "Subtitle Description" }, this.description), index.h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
|
|
85
117
|
index.h("div", null, index.h("div", { class: "Content" }, index.h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
|
|
86
118
|
index.h("div", null, this.deleteTab &&
|
|
87
119
|
index.h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-14140980.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["helper-accordion.cjs",[[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"showContent":[32]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["helper-accordion.cjs",[[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -234,6 +234,12 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
234
234
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
235
235
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
236
236
|
}
|
|
237
|
+
else if (memberName === 'ref') {
|
|
238
|
+
// minifier will clean this up
|
|
239
|
+
if (newValue) {
|
|
240
|
+
newValue(elm);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
237
243
|
else if ((!isProp ) &&
|
|
238
244
|
memberName[0] === 'o' &&
|
|
239
245
|
memberName[1] === 'n') {
|
|
@@ -390,6 +396,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
390
396
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
391
397
|
if ((vnode = vnodes[startIdx])) {
|
|
392
398
|
elm = vnode.$elm$;
|
|
399
|
+
callNodeRefs(vnode);
|
|
393
400
|
// remove the vnode's element from the dom
|
|
394
401
|
elm.remove();
|
|
395
402
|
}
|
|
@@ -511,6 +518,12 @@ const patch = (oldVNode, newVNode) => {
|
|
|
511
518
|
elm.data = text;
|
|
512
519
|
}
|
|
513
520
|
};
|
|
521
|
+
const callNodeRefs = (vNode) => {
|
|
522
|
+
{
|
|
523
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
524
|
+
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
525
|
+
}
|
|
526
|
+
};
|
|
514
527
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
515
528
|
const hostElm = hostRef.$hostElement$;
|
|
516
529
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -643,7 +656,11 @@ const postUpdateComponent = (hostRef) => {
|
|
|
643
656
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
644
657
|
const elm = hostRef.$hostElement$;
|
|
645
658
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
659
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
646
660
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
661
|
+
{
|
|
662
|
+
safeCall(instance, 'componentDidRender');
|
|
663
|
+
}
|
|
647
664
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
648
665
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
649
666
|
{
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -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-14140980.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["helper-accordion.cjs",[[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"showContent":[32]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["helper-accordion.cjs",[[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.Header {
|
|
8
|
-
border-radius:
|
|
8
|
+
border-radius: 5px;
|
|
9
9
|
background: #009993;
|
|
10
10
|
display: flex;
|
|
11
11
|
gap: 30px;
|
|
12
12
|
border: 1px solid #009993;
|
|
13
13
|
padding: 8px 10px;
|
|
14
14
|
user-select: none;
|
|
15
|
+
margin-bottom: 1px;
|
|
15
16
|
}
|
|
16
17
|
.Header:hover {
|
|
17
18
|
background: #00ABA4;
|
|
@@ -22,6 +23,7 @@
|
|
|
22
23
|
margin: 0;
|
|
23
24
|
font-size: 14px;
|
|
24
25
|
color: #fff;
|
|
26
|
+
text-transform: capitalize;
|
|
25
27
|
}
|
|
26
28
|
.Header .Expand {
|
|
27
29
|
margin-left: auto;
|
|
@@ -42,11 +42,43 @@ export class Accordion {
|
|
|
42
42
|
* Language
|
|
43
43
|
*/
|
|
44
44
|
this.language = 'en';
|
|
45
|
+
/**
|
|
46
|
+
* Client custom styling via string
|
|
47
|
+
*/
|
|
48
|
+
this.clientStyling = '';
|
|
49
|
+
/**
|
|
50
|
+
* Client custom styling via url content
|
|
51
|
+
*/
|
|
52
|
+
this.clientStylingUrlContent = '';
|
|
53
|
+
this.limitStylingAppends = false;
|
|
54
|
+
this.setClientStyling = () => {
|
|
55
|
+
let sheet = document.createElement('style');
|
|
56
|
+
sheet.innerHTML = this.clientStyling;
|
|
57
|
+
this.stylingContainer.prepend(sheet);
|
|
58
|
+
};
|
|
59
|
+
this.setClientStylingURL = () => {
|
|
60
|
+
let cssFile = document.createElement('style');
|
|
61
|
+
setTimeout(() => {
|
|
62
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
63
|
+
this.stylingContainer.prepend(cssFile);
|
|
64
|
+
}, 1);
|
|
65
|
+
};
|
|
45
66
|
}
|
|
46
67
|
// @TODO fix the `any` type :)
|
|
47
68
|
connectedCallback() {
|
|
48
69
|
this.showContent = !this.collapsed;
|
|
49
70
|
}
|
|
71
|
+
componentDidRender() {
|
|
72
|
+
// start custom styling area
|
|
73
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
74
|
+
if (this.clientStyling)
|
|
75
|
+
this.setClientStyling();
|
|
76
|
+
if (this.clientStylingUrlContent)
|
|
77
|
+
this.setClientStylingURL();
|
|
78
|
+
this.limitStylingAppends = true;
|
|
79
|
+
}
|
|
80
|
+
// end custom styling area
|
|
81
|
+
}
|
|
50
82
|
toggleContent() {
|
|
51
83
|
this.showContent = !this.showContent;
|
|
52
84
|
}
|
|
@@ -58,11 +90,11 @@ export class Accordion {
|
|
|
58
90
|
this.accordionEvent.emit();
|
|
59
91
|
}
|
|
60
92
|
render() {
|
|
61
|
-
return (h("div", { class: "Wrapper" },
|
|
93
|
+
return (h("div", { class: "Wrapper", ref: el => this.stylingContainer = el },
|
|
62
94
|
h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' },
|
|
63
95
|
h("p", { class: "Title" }, this.headerTitle),
|
|
64
96
|
h("p", { class: "Subtitle" }, this.headerSubtitle),
|
|
65
|
-
h("p", { class: "Subtitle" }, this.description),
|
|
97
|
+
h("p", { class: "Subtitle Description" }, this.description),
|
|
66
98
|
h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')),
|
|
67
99
|
this.showContent &&
|
|
68
100
|
h("div", null,
|
|
@@ -260,10 +292,47 @@ export class Accordion {
|
|
|
260
292
|
"attribute": "language",
|
|
261
293
|
"reflect": false,
|
|
262
294
|
"defaultValue": "'en'"
|
|
295
|
+
},
|
|
296
|
+
"clientStyling": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"mutable": false,
|
|
299
|
+
"complexType": {
|
|
300
|
+
"original": "string",
|
|
301
|
+
"resolved": "string",
|
|
302
|
+
"references": {}
|
|
303
|
+
},
|
|
304
|
+
"required": false,
|
|
305
|
+
"optional": false,
|
|
306
|
+
"docs": {
|
|
307
|
+
"tags": [],
|
|
308
|
+
"text": "Client custom styling via string"
|
|
309
|
+
},
|
|
310
|
+
"attribute": "client-styling",
|
|
311
|
+
"reflect": false,
|
|
312
|
+
"defaultValue": "''"
|
|
313
|
+
},
|
|
314
|
+
"clientStylingUrlContent": {
|
|
315
|
+
"type": "string",
|
|
316
|
+
"mutable": false,
|
|
317
|
+
"complexType": {
|
|
318
|
+
"original": "string",
|
|
319
|
+
"resolved": "string",
|
|
320
|
+
"references": {}
|
|
321
|
+
},
|
|
322
|
+
"required": false,
|
|
323
|
+
"optional": false,
|
|
324
|
+
"docs": {
|
|
325
|
+
"tags": [],
|
|
326
|
+
"text": "Client custom styling via url content"
|
|
327
|
+
},
|
|
328
|
+
"attribute": "client-styling-url-content",
|
|
329
|
+
"reflect": false,
|
|
330
|
+
"defaultValue": "''"
|
|
263
331
|
}
|
|
264
332
|
}; }
|
|
265
333
|
static get states() { return {
|
|
266
|
-
"showContent": {}
|
|
334
|
+
"showContent": {},
|
|
335
|
+
"limitStylingAppends": {}
|
|
267
336
|
}; }
|
|
268
337
|
static get events() { return [{
|
|
269
338
|
"method": "accordionEvent",
|
|
@@ -15,7 +15,7 @@ const translate = (key, customLang) => {
|
|
|
15
15
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:
|
|
18
|
+
const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:5px;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:1px}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff;text-transform:capitalize}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}";
|
|
19
19
|
|
|
20
20
|
const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
21
21
|
constructor() {
|
|
@@ -63,11 +63,43 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
63
63
|
* Language
|
|
64
64
|
*/
|
|
65
65
|
this.language = 'en';
|
|
66
|
+
/**
|
|
67
|
+
* Client custom styling via string
|
|
68
|
+
*/
|
|
69
|
+
this.clientStyling = '';
|
|
70
|
+
/**
|
|
71
|
+
* Client custom styling via url content
|
|
72
|
+
*/
|
|
73
|
+
this.clientStylingUrlContent = '';
|
|
74
|
+
this.limitStylingAppends = false;
|
|
75
|
+
this.setClientStyling = () => {
|
|
76
|
+
let sheet = document.createElement('style');
|
|
77
|
+
sheet.innerHTML = this.clientStyling;
|
|
78
|
+
this.stylingContainer.prepend(sheet);
|
|
79
|
+
};
|
|
80
|
+
this.setClientStylingURL = () => {
|
|
81
|
+
let cssFile = document.createElement('style');
|
|
82
|
+
setTimeout(() => {
|
|
83
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
84
|
+
this.stylingContainer.prepend(cssFile);
|
|
85
|
+
}, 1);
|
|
86
|
+
};
|
|
66
87
|
}
|
|
67
88
|
// @TODO fix the `any` type :)
|
|
68
89
|
connectedCallback() {
|
|
69
90
|
this.showContent = !this.collapsed;
|
|
70
91
|
}
|
|
92
|
+
componentDidRender() {
|
|
93
|
+
// start custom styling area
|
|
94
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
95
|
+
if (this.clientStyling)
|
|
96
|
+
this.setClientStyling();
|
|
97
|
+
if (this.clientStylingUrlContent)
|
|
98
|
+
this.setClientStylingURL();
|
|
99
|
+
this.limitStylingAppends = true;
|
|
100
|
+
}
|
|
101
|
+
// end custom styling area
|
|
102
|
+
}
|
|
71
103
|
toggleContent() {
|
|
72
104
|
this.showContent = !this.showContent;
|
|
73
105
|
}
|
|
@@ -79,7 +111,7 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
79
111
|
this.accordionEvent.emit();
|
|
80
112
|
}
|
|
81
113
|
render() {
|
|
82
|
-
return (h("div", { class: "Wrapper" }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle" }, this.description), h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
|
|
114
|
+
return (h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle Description" }, this.description), h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
|
|
83
115
|
h("div", null, h("div", { class: "Content" }, h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
|
|
84
116
|
h("div", null, this.deleteTab &&
|
|
85
117
|
h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
|
|
@@ -96,7 +128,10 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
96
128
|
"eventName": [1, "event-name"],
|
|
97
129
|
"collapsed": [4],
|
|
98
130
|
"language": [1],
|
|
99
|
-
"
|
|
131
|
+
"clientStyling": [1, "client-styling"],
|
|
132
|
+
"clientStylingUrlContent": [1, "client-styling-url-content"],
|
|
133
|
+
"showContent": [32],
|
|
134
|
+
"limitStylingAppends": [32]
|
|
100
135
|
}]);
|
|
101
136
|
function defineCustomElement$1() {
|
|
102
137
|
if (typeof customElements === "undefined") {
|
|
@@ -111,7 +146,6 @@ function defineCustomElement$1() {
|
|
|
111
146
|
break;
|
|
112
147
|
} });
|
|
113
148
|
}
|
|
114
|
-
defineCustomElement$1();
|
|
115
149
|
|
|
116
150
|
const HelperAccordion = Accordion;
|
|
117
151
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-19830116.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
4
|
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
@@ -15,7 +15,7 @@ const translate = (key, customLang) => {
|
|
|
15
15
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:
|
|
18
|
+
const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:5px;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:1px}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff;text-transform:capitalize}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}";
|
|
19
19
|
|
|
20
20
|
const Accordion = class {
|
|
21
21
|
constructor(hostRef) {
|
|
@@ -61,11 +61,43 @@ const Accordion = class {
|
|
|
61
61
|
* Language
|
|
62
62
|
*/
|
|
63
63
|
this.language = 'en';
|
|
64
|
+
/**
|
|
65
|
+
* Client custom styling via string
|
|
66
|
+
*/
|
|
67
|
+
this.clientStyling = '';
|
|
68
|
+
/**
|
|
69
|
+
* Client custom styling via url content
|
|
70
|
+
*/
|
|
71
|
+
this.clientStylingUrlContent = '';
|
|
72
|
+
this.limitStylingAppends = false;
|
|
73
|
+
this.setClientStyling = () => {
|
|
74
|
+
let sheet = document.createElement('style');
|
|
75
|
+
sheet.innerHTML = this.clientStyling;
|
|
76
|
+
this.stylingContainer.prepend(sheet);
|
|
77
|
+
};
|
|
78
|
+
this.setClientStylingURL = () => {
|
|
79
|
+
let cssFile = document.createElement('style');
|
|
80
|
+
setTimeout(() => {
|
|
81
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
82
|
+
this.stylingContainer.prepend(cssFile);
|
|
83
|
+
}, 1);
|
|
84
|
+
};
|
|
64
85
|
}
|
|
65
86
|
// @TODO fix the `any` type :)
|
|
66
87
|
connectedCallback() {
|
|
67
88
|
this.showContent = !this.collapsed;
|
|
68
89
|
}
|
|
90
|
+
componentDidRender() {
|
|
91
|
+
// start custom styling area
|
|
92
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
93
|
+
if (this.clientStyling)
|
|
94
|
+
this.setClientStyling();
|
|
95
|
+
if (this.clientStylingUrlContent)
|
|
96
|
+
this.setClientStylingURL();
|
|
97
|
+
this.limitStylingAppends = true;
|
|
98
|
+
}
|
|
99
|
+
// end custom styling area
|
|
100
|
+
}
|
|
69
101
|
toggleContent() {
|
|
70
102
|
this.showContent = !this.showContent;
|
|
71
103
|
}
|
|
@@ -77,7 +109,7 @@ const Accordion = class {
|
|
|
77
109
|
this.accordionEvent.emit();
|
|
78
110
|
}
|
|
79
111
|
render() {
|
|
80
|
-
return (h("div", { class: "Wrapper" }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle" }, this.description), h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
|
|
112
|
+
return (h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle Description" }, this.description), h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
|
|
81
113
|
h("div", null, h("div", { class: "Content" }, h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
|
|
82
114
|
h("div", null, this.deleteTab &&
|
|
83
115
|
h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-19830116.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["helper-accordion",[[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"showContent":[32]}]]]], options);
|
|
16
|
+
return bootstrapLazy([["helper-accordion",[[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -212,6 +212,12 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
212
212
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
213
213
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
214
214
|
}
|
|
215
|
+
else if (memberName === 'ref') {
|
|
216
|
+
// minifier will clean this up
|
|
217
|
+
if (newValue) {
|
|
218
|
+
newValue(elm);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
215
221
|
else if ((!isProp ) &&
|
|
216
222
|
memberName[0] === 'o' &&
|
|
217
223
|
memberName[1] === 'n') {
|
|
@@ -368,6 +374,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
368
374
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
369
375
|
if ((vnode = vnodes[startIdx])) {
|
|
370
376
|
elm = vnode.$elm$;
|
|
377
|
+
callNodeRefs(vnode);
|
|
371
378
|
// remove the vnode's element from the dom
|
|
372
379
|
elm.remove();
|
|
373
380
|
}
|
|
@@ -489,6 +496,12 @@ const patch = (oldVNode, newVNode) => {
|
|
|
489
496
|
elm.data = text;
|
|
490
497
|
}
|
|
491
498
|
};
|
|
499
|
+
const callNodeRefs = (vNode) => {
|
|
500
|
+
{
|
|
501
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
502
|
+
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
503
|
+
}
|
|
504
|
+
};
|
|
492
505
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
493
506
|
const hostElm = hostRef.$hostElement$;
|
|
494
507
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -621,7 +634,11 @@ const postUpdateComponent = (hostRef) => {
|
|
|
621
634
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
622
635
|
const elm = hostRef.$hostElement$;
|
|
623
636
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
637
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
624
638
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
639
|
+
{
|
|
640
|
+
safeCall(instance, 'componentDidRender');
|
|
641
|
+
}
|
|
625
642
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
626
643
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
627
644
|
{
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-19830116.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["helper-accordion",[[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"showContent":[32]}]]]], options);
|
|
13
|
+
return bootstrapLazy([["helper-accordion",[[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-
|
|
1
|
+
import{p as e,b as t}from"./p-ba8015b8.js";(()=>{const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((e=>t([["p-3c894e85",[[1,"helper-accordion",{ticketHistoryFlag:[4,"ticket-history-flag"],headerTitle:[1,"header-title"],headerSubtitle:[1,"header-subtitle"],description:[1],footer:[4],deleteTab:[4,"delete-tab"],postMessage:[4,"post-message"],eventName:[1,"event-name"],collapsed:[4],language:[1],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],showContent:[32],limitStylingAppends:[32]}]]]],e)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i}from"./p-ba8015b8.js";const s=["ro","en"],o={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"}},r=class{constructor(i){t(this,i),this.accordionEvent=e(this,"helperAccordionAction",7),this.ticketHistoryFlag=!1,this.headerTitle="",this.headerSubtitle="",this.description="",this.footer=!1,this.deleteTab=!1,this.postMessage=!1,this.eventName="helperAccordionAction",this.collapsed=!0,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}connectedCallback(){this.showContent=!this.collapsed}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return i("div",{class:"Wrapper",ref:t=>this.stylingContainer=t},i("div",{class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header"},i("p",{class:"Title"},this.headerTitle),i("p",{class:"Subtitle"},this.headerSubtitle),i("p",{class:"Subtitle Description"},this.description),i("span",{class:"Expand",onClick:()=>this.toggleContent()},this.showContent?"<":">")),this.showContent&&i("div",null,i("div",{class:"Content"},i("slot",{name:"accordionContent"}),this.footer&&this.showContent&&i("div",null,this.deleteTab&&i("span",{class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return o[void 0!==t&&s.includes(t)?t:"en"].deleteTicket})())))))}};r.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:5px;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:1px}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff;text-transform:capitalize}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}';export{r as helper_accordion}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),i=new WeakMap,u=e=>"sc-"+e.o,a={},f=e=>"object"==(e=typeof e)||"function"===e,d=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!f(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?$(null,l):l),o=s)};if(c(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const i=$(e,null);return i.u=t,r.length>0&&(i.$=r),i},$=(e,t)=>({t:0,h:e,i:t,m:null,$:null,u:null}),h={},m=(e,t,n,s,r,c)=>{if(n!==s){let i=z(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,l=y(n),o=y(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if("ref"===t)s&&s(e);else if(i||"o"!==t[0]||"n"!==t[1]){const l=f(s);if((i||l&&null!==s)&&!r)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?i=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&c||r)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):z(l,u)?u.slice(2):u[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},p=/\s/,y=e=>e?e.split(p):[],b=(e,t,n,l)=>{const s=11===t.m.nodeType&&t.m.host?t.m.host:t.m,o=e&&e.u||a,r=t.u||a;for(l in o)l in r||m(s,l,o[l],void 0,n,t.t);for(l in r)m(s,l,o[l],r[l],n,t.t)},w=(t,n,l)=>{let o,r,c=n.$[l],i=0;if(null!==c.i)o=c.m=s.createTextNode(c.i);else if(o=c.m=s.createElement(c.h),b(null,c,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),c.$)for(i=0;i<c.$.length;++i)r=w(t,c,i),r&&o.appendChild(r);return o},S=(e,n,l,s,o,r)=>{let c,i=e;for(i.shadowRoot&&i.tagName===t&&(i=i.shadowRoot);o<=r;++o)s[o]&&(c=w(null,l,o),c&&(s[o].m=c,i.insertBefore(c,n)))},g=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.m,M(l),s.remove())},j=(e,t)=>e.h===t.h,v=(e,t)=>{const n=t.m=e.m,l=e.$,s=t.$,o=t.i;null===o?("slot"===t.h||b(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,r=0,c=t.length-1,i=t[0],u=t[c],a=l.length-1,f=l[0],d=l[a];for(;o<=c&&r<=a;)null==i?i=t[++o]:null==u?u=t[--c]:null==f?f=l[++r]:null==d?d=l[--a]:j(i,f)?(v(i,f),i=t[++o],f=l[++r]):j(u,d)?(v(u,d),u=t[--c],d=l[--a]):j(i,d)?(v(i,d),e.insertBefore(i.m,u.m.nextSibling),i=t[++o],d=l[--a]):j(u,f)?(v(u,f),e.insertBefore(u.m,i.m),u=t[--c],f=l[++r]):(s=w(t&&t[r],n,r),f=l[++r],s&&i.m.parentNode.insertBefore(s,i.m));o>c?S(e,null==l[a+1]?null:l[a+1].m,n,l,r,a):r>a&&g(t,o,c)})(n,l,t,s):null!==s?(null!==e.i&&(n.textContent=""),S(n,null,t,s,0,s.length-1)):null!==l&&g(l,0,l.length-1)):e.i!==o&&(n.data=o)},M=e=>{e.u&&e.u.ref&&e.u.ref(null),e.$&&e.$.map(M)},k=(e,t,n)=>{const l=(e=>H(e).p)(e);return{emit:e=>C(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},C=(e,t,n)=>{const l=o.ce(t,n);return e.dispatchEvent(l),l},O=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},P=(e,t)=>{if(e.t|=16,!(4&e.t))return O(e,e.g),te((()=>x(e,t)));e.t|=512},x=(e,t)=>{const n=e.j;return L(void 0,(()=>E(e,n,t)))},E=async(e,t,n)=>{const l=e.p,o=l["s-rc"];n&&(e=>{const t=e.v,n=e.p,l=t.t,o=((e,t)=>{let n=u(t),l=J.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=i.get(e=e.head||e);o||i.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);N(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>R(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},N=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.p,o=n.M||$(null,null),r=(e=>e&&e.h===h)(l)?l:d(null,null,l);t=s.tagName,r.h=null,r.t|=4,n.M=r,r.m=o.m=s.shadowRoot||s,e=s["s-sc"],v(o,r)})(n,l)}catch(e){B(e,n.p)}return null},R=e=>{const t=e.p,n=e.g;A(e.j,"componentDidRender"),64&e.t||(e.t|=64,U(t),e.k(t),n||T()),e.S&&(e.S(),e.S=void 0),512&e.t&&ee((()=>P(e,!1))),e.t&=-517},T=()=>{U(s.documentElement),ee((()=>C(l,"appload",{detail:{namespace:"helper-accordion"}})))},A=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){B(e)}},L=(e,t)=>e&&e.then?e.then(t):t(),U=e=>e.classList.add("hydrated"),W=(e,t,n)=>{if(t.C){const l=Object.entries(t.C),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>H(this).O.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=H(e),o=s.O.get(t),r=s.t,c=s.j;n=((e,t)=>null==e||f(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(n,l.C[t][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.O.set(t,n),c&&2==(18&r)&&P(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;s.attributeChangedCallback=function(e,n,l){o.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},q=e=>{A(e,"connectedCallback")},D=(e,t={})=>{const n=[],r=t.exclude||[],i=l.customElements,a=s.head,f=a.querySelector("meta[charset]"),d=s.createElement("style"),$=[];let h,m=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],o:t[1],C:t[2],P:t[3]};l.C=t[2];const s=l.o,a=class extends HTMLElement{constructor(e){super(e),_(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),m?$.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=H(e),n=t.v,l=()=>{};if(1&t.t)q(t.j);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){O(t,t.g=n);break}}n.C&&Object.entries(n.C).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=I(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(W(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){B(e)}t.t&=-9,e(),q(t.j)}if(s.style){let e=s.style;const t=u(n);if(!J.has(t)){const l=()=>{};((e,t,n)=>{let l=J.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,J.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.g,r=()=>P(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>{}))}componentOnReady(){return H(this).N}};l.R=e[0],r.includes(s)||i.get(s)||(n.push(s),i.define(s,W(a,l,1)))}))})),d.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),a.insertBefore(d,f?f.nextSibling:a.firstChild),m=!1,$.length?$.map((e=>e.connectedCallback())):o.jmp((()=>h=setTimeout(T,30)))},F=new WeakMap,H=e=>F.get(e),V=(e,t)=>F.set(t.j=e,t),_=(e,t)=>{const n={t:0,p:e,v:t,O:new Map};return n.N=new Promise((e=>n.k=e)),e["s-p"]=[],e["s-rc"]=[],F.set(e,n)},z=(e,t)=>t in e,B=(e,t)=>(0,console.error)(e,t),G=new Map,I=e=>{const t=e.o.replace(/-/g,"_"),n=e.R,l=G.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(G.set(n,e),e[t])),B)},J=new Map,K=[],Q=[],X=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?ee(Z):o.raf(Z))},Y=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){B(e)}e.length=0},Z=()=>{Y(K),Y(Q),(n=K.length>0)&&o.raf(Z)},ee=e=>r().then(e),te=X(Q,!0);export{D as b,k as c,d as h,r as p,V as r}
|
package/dist/stencil.config.js
CHANGED
|
@@ -40,13 +40,26 @@ export declare class Accordion {
|
|
|
40
40
|
* Language
|
|
41
41
|
*/
|
|
42
42
|
language: string;
|
|
43
|
+
/**
|
|
44
|
+
* Client custom styling via string
|
|
45
|
+
*/
|
|
46
|
+
clientStyling: string;
|
|
47
|
+
/**
|
|
48
|
+
* Client custom styling via url content
|
|
49
|
+
*/
|
|
50
|
+
clientStylingUrlContent: string;
|
|
43
51
|
showContent: boolean;
|
|
52
|
+
private limitStylingAppends;
|
|
53
|
+
private stylingContainer;
|
|
44
54
|
/**
|
|
45
55
|
* Action event
|
|
46
56
|
*/
|
|
47
57
|
accordionEvent: EventEmitter<any>;
|
|
48
58
|
connectedCallback(): void;
|
|
59
|
+
componentDidRender(): void;
|
|
49
60
|
toggleContent(): void;
|
|
50
61
|
deleteAction(): void;
|
|
62
|
+
setClientStyling: () => void;
|
|
63
|
+
setClientStylingURL: () => void;
|
|
51
64
|
render(): void;
|
|
52
65
|
}
|
|
@@ -7,6 +7,14 @@
|
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
export namespace Components {
|
|
9
9
|
interface HelperAccordion {
|
|
10
|
+
/**
|
|
11
|
+
* Client custom styling via string
|
|
12
|
+
*/
|
|
13
|
+
"clientStyling": string;
|
|
14
|
+
/**
|
|
15
|
+
* Client custom styling via url content
|
|
16
|
+
*/
|
|
17
|
+
"clientStylingUrlContent": string;
|
|
10
18
|
/**
|
|
11
19
|
* Collapsed
|
|
12
20
|
*/
|
|
@@ -62,6 +70,14 @@ declare global {
|
|
|
62
70
|
}
|
|
63
71
|
declare namespace LocalJSX {
|
|
64
72
|
interface HelperAccordion {
|
|
73
|
+
/**
|
|
74
|
+
* Client custom styling via string
|
|
75
|
+
*/
|
|
76
|
+
"clientStyling"?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Client custom styling via url content
|
|
79
|
+
*/
|
|
80
|
+
"clientStylingUrlContent"?: string;
|
|
65
81
|
/**
|
|
66
82
|
* Collapsed
|
|
67
83
|
*/
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/helper-accordion",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"main": "./dist/index.cjs.js",
|
|
5
|
-
"module": "./dist/
|
|
5
|
+
"module": "./dist/index.js",
|
|
6
6
|
"es2015": "./dist/esm/index.mjs",
|
|
7
7
|
"es2017": "./dist/esm/index.mjs",
|
|
8
8
|
"types": "./dist/types/index.d.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i}from"./p-e6ddfc6c.js";const o=["ro","en"],r={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"}},s=class{constructor(i){t(this,i),this.accordionEvent=e(this,"helperAccordionAction",7),this.ticketHistoryFlag=!1,this.headerTitle="",this.headerSubtitle="",this.description="",this.footer=!1,this.deleteTab=!1,this.postMessage=!1,this.eventName="helperAccordionAction",this.collapsed=!0,this.language="en"}connectedCallback(){this.showContent=!this.collapsed}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return i("div",{class:"Wrapper"},i("div",{class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header"},i("p",{class:"Title"},this.headerTitle),i("p",{class:"Subtitle"},this.headerSubtitle),i("p",{class:"Subtitle"},this.description),i("span",{class:"Expand",onClick:()=>this.toggleContent()},this.showContent?"<":">")),this.showContent&&i("div",null,i("div",{class:"Content"},i("slot",{name:"accordionContent"}),this.footer&&this.showContent&&i("div",null,this.deleteTab&&i("span",{class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return r[void 0!==t&&o.includes(t)?t:"en"].deleteTicket})())))))}};s.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:4px 4px 0 0;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}';export{s as helper_accordion}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},c=e=>Promise.resolve(e),r=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),i=new WeakMap,u=e=>"sc-"+e.o,a={},f=e=>"object"==(e=typeof e)||"function"===e,d=(e,t,...n)=>{let l=null,s=!1,o=!1,c=[];const r=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?r(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!f(l))&&(l+=""),s&&o?c[c.length-1].i+=l:c.push(s?$(null,l):l),o=s)};if(r(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const i=$(e,null);return i.u=t,c.length>0&&(i.$=c),i},$=(e,t)=>({t:0,h:e,i:t,m:null,$:null,u:null}),h={},y=(e,t,n,s,c,r)=>{if(n!==s){let i=_(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,l=p(n),o=p(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if(i||"o"!==t[0]||"n"!==t[1]){const l=f(s);if((i||l&&null!==s)&&!c)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?i=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||c)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):_(l,u)?u.slice(2):u[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},m=/\s/,p=e=>e?e.split(m):[],b=(e,t,n,l)=>{const s=11===t.m.nodeType&&t.m.host?t.m.host:t.m,o=e&&e.u||a,c=t.u||a;for(l in o)l in c||y(s,l,o[l],void 0,n,t.t);for(l in c)y(s,l,o[l],c[l],n,t.t)},w=(t,n,l)=>{let o,c,r=n.$[l],i=0;if(null!==r.i)o=r.m=s.createTextNode(r.i);else if(o=r.m=s.createElement(r.h),b(null,r,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),r.$)for(i=0;i<r.$.length;++i)c=w(t,r,i),c&&o.appendChild(c);return o},S=(e,n,l,s,o,c)=>{let r,i=e;for(i.shadowRoot&&i.tagName===t&&(i=i.shadowRoot);o<=c;++o)s[o]&&(r=w(null,l,o),r&&(s[o].m=r,i.insertBefore(r,n)))},g=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.m.remove()},j=(e,t)=>e.h===t.h,v=(e,t)=>{const n=t.m=e.m,l=e.$,s=t.$,o=t.i;null===o?("slot"===t.h||b(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,c=0,r=t.length-1,i=t[0],u=t[r],a=l.length-1,f=l[0],d=l[a];for(;o<=r&&c<=a;)null==i?i=t[++o]:null==u?u=t[--r]:null==f?f=l[++c]:null==d?d=l[--a]:j(i,f)?(v(i,f),i=t[++o],f=l[++c]):j(u,d)?(v(u,d),u=t[--r],d=l[--a]):j(i,d)?(v(i,d),e.insertBefore(i.m,u.m.nextSibling),i=t[++o],d=l[--a]):j(u,f)?(v(u,f),e.insertBefore(u.m,i.m),u=t[--r],f=l[++c]):(s=w(t&&t[c],n,c),f=l[++c],s&&i.m.parentNode.insertBefore(s,i.m));o>r?S(e,null==l[a+1]?null:l[a+1].m,n,l,c,a):c>a&&g(t,o,r)})(n,l,t,s):null!==s?(null!==e.i&&(n.textContent=""),S(n,null,t,s,0,s.length-1)):null!==l&&g(l,0,l.length-1)):e.i!==o&&(n.data=o)},M=(e,t,n)=>{const l=(e=>F(e).p)(e);return{emit:e=>k(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},k=(e,t,n)=>{const l=o.ce(t,n);return e.dispatchEvent(l),l},C=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},O=(e,t)=>{if(e.t|=16,!(4&e.t))return C(e,e.g),Z((()=>P(e,t)));e.t|=512},P=(e,t)=>{const n=e.j;return A(void 0,(()=>x(e,n,t)))},x=async(e,t,n)=>{const l=e.p,o=l["s-rc"];n&&(e=>{const t=e.v,n=e.p,l=t.t,o=((e,t)=>{let n=u(t),l=G.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=i.get(e=e.head||e);o||i.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);E(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>N(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},E=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.p,o=n.M||$(null,null),c=(e=>e&&e.h===h)(l)?l:d(null,null,l);t=s.tagName,c.h=null,c.t|=4,n.M=c,c.m=o.m=s.shadowRoot||s,e=s["s-sc"],v(o,c)})(n,l)}catch(e){z(e,n.p)}return null},N=e=>{const t=e.p,n=e.g;64&e.t||(e.t|=64,L(t),e.k(t),n||T()),e.S&&(e.S(),e.S=void 0),512&e.t&&Y((()=>O(e,!1))),e.t&=-517},T=()=>{L(s.documentElement),Y((()=>k(l,"appload",{detail:{namespace:"helper-accordion"}})))},A=(e,t)=>e&&e.then?e.then(t):t(),L=e=>e.classList.add("hydrated"),R=(e,t,n)=>{if(t.C){const l=Object.entries(t.C),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>F(this).O.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=F(e),o=s.O.get(t),c=s.t,r=s.j;n=((e,t)=>null==e||f(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(n,l.C[t][0]),8&c&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.O.set(t,n),r&&2==(18&c)&&O(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;s.attributeChangedCallback=function(e,n,l){o.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},U=e=>{((e,t)=>{if(e&&e[t])try{e[t](void 0)}catch(e){z(e)}})(e,"connectedCallback")},W=(e,t={})=>{const n=[],c=t.exclude||[],i=l.customElements,a=s.head,f=a.querySelector("meta[charset]"),d=s.createElement("style"),$=[];let h,y=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],o:t[1],C:t[2],P:t[3]};l.C=t[2];const s=l.o,a=class extends HTMLElement{constructor(e){super(e),V(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),y?$.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=F(e),n=t.v,l=()=>{};if(1&t.t)U(t.j);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){C(t,t.g=n);break}}n.C&&Object.entries(n.C).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=D(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(R(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){z(e)}t.t&=-9,e(),U(t.j)}if(s.style){let e=s.style;const t=u(n);if(!G.has(t)){const l=()=>{};((e,t,n)=>{let l=G.get(e);r&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,G.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.g,c=()=>O(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>{}))}componentOnReady(){return F(this).N}};l.T=e[0],c.includes(s)||i.get(s)||(n.push(s),i.define(s,R(a,l,1)))}))})),d.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),a.insertBefore(d,f?f.nextSibling:a.firstChild),y=!1,$.length?$.map((e=>e.connectedCallback())):o.jmp((()=>h=setTimeout(T,30)))},q=new WeakMap,F=e=>q.get(e),H=(e,t)=>q.set(t.j=e,t),V=(e,t)=>{const n={t:0,p:e,v:t,O:new Map};return n.N=new Promise((e=>n.k=e)),e["s-p"]=[],e["s-rc"]=[],q.set(e,n)},_=(e,t)=>t in e,z=(e,t)=>(0,console.error)(e,t),B=new Map,D=e=>{const t=e.o.replace(/-/g,"_"),n=e.T,l=B.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(B.set(n,e),e[t])),z)},G=new Map,I=[],J=[],K=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?Y(X):o.raf(X))},Q=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){z(e)}e.length=0},X=()=>{Q(I),Q(J),(n=I.length>0)&&o.raf(X)},Y=e=>c().then(e),Z=K(J,!0);export{W as b,M as c,d as h,c as p,H as r}
|