@everymatrix/helper-accordion 1.43.4 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/helper-accordion.cjs.entry.js +81 -115
- package/dist/cjs/helper-accordion.cjs.js +16 -10
- package/dist/cjs/index-a21d4625.js +1205 -0
- package/dist/cjs/loader.cjs.js +6 -12
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/helper-accordion/helper-accordion.js +315 -349
- package/dist/collection/components/helper-accordion/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +17 -17
- package/dist/collection/utils/utils.js +1 -1
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/helper-accordion.entry.js +81 -115
- package/dist/esm/helper-accordion.js +13 -10
- package/dist/esm/index-3a075c05.js +1178 -0
- package/dist/esm/loader.js +6 -12
- package/dist/helper-accordion/helper-accordion.esm.js +1 -1
- package/dist/helper-accordion/p-0ea524aa.js +2 -0
- package/dist/helper-accordion/p-9f0e8fda.entry.js +1 -0
- package/dist/helper-accordion/p-e1255160.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/helper-accordion/.stencil/packages/stencil/helper-accordion/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/helper-accordion/.stencil/packages/stencil/helper-accordion/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/helper-accordion/helper-accordion.d.ts +62 -62
- package/dist/types/components/helper-accordion/index.d.ts +1 -0
- package/dist/types/components.d.ts +16 -1
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +8 -1
- package/dist/cjs/index-ed89de9c.js +0 -1191
- package/dist/components/helper-accordion.d.ts +0 -11
- package/dist/components/helper-accordion.js +0 -161
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-a87a3869.js +0 -1165
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/helper-accordion/p-7391c647.entry.js +0 -1
- package/dist/helper-accordion/p-a8ce3eea.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/helper-accordion/.stencil/packages/helper-accordion/stencil.config.d.ts +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { HelperAccordion } from './helper-accordion';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
const DEFAULT_LANGUAGE = 'en';
|
|
2
2
|
const TRANSLATIONS = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
en: {
|
|
4
|
+
deleteTicket: 'Delete ticket'
|
|
5
|
+
},
|
|
6
|
+
ro: {
|
|
7
|
+
deleteTicket: 'Sterge biletul'
|
|
8
|
+
},
|
|
9
|
+
fr: {
|
|
10
|
+
deleteTicket: 'Supprimer le billet'
|
|
11
|
+
},
|
|
12
|
+
ar: {
|
|
13
|
+
deleteTicket: 'حذف التذكرة'
|
|
14
|
+
},
|
|
15
|
+
hr: {
|
|
16
|
+
deleteTicket: 'Izbriši listić'
|
|
17
|
+
}
|
|
18
18
|
};
|
|
19
19
|
export const translate = (key, customLang) => {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
const lang = customLang;
|
|
21
|
+
return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
|
|
22
22
|
};
|
|
@@ -1,128 +1,94 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-3a075c05.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
4
|
const TRANSLATIONS = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
en: {
|
|
6
|
+
deleteTicket: 'Delete ticket'
|
|
7
|
+
},
|
|
8
|
+
ro: {
|
|
9
|
+
deleteTicket: 'Sterge biletul'
|
|
10
|
+
},
|
|
11
|
+
fr: {
|
|
12
|
+
deleteTicket: 'Supprimer le billet'
|
|
13
|
+
},
|
|
14
|
+
ar: {
|
|
15
|
+
deleteTicket: 'حذف التذكرة'
|
|
16
|
+
},
|
|
17
|
+
hr: {
|
|
18
|
+
deleteTicket: 'Izbriši listić'
|
|
19
|
+
}
|
|
20
20
|
};
|
|
21
21
|
const translate = (key, customLang) => {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const lang = customLang;
|
|
23
|
+
return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
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;cursor:pointer}.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;cursor:pointer}.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}";
|
|
27
|
+
const HelperAccordionStyle0 = helperAccordionCss;
|
|
27
28
|
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
sheet.innerHTML = this.clientStyling;
|
|
84
|
-
this.stylingContainer.prepend(sheet);
|
|
85
|
-
};
|
|
86
|
-
this.setClientStylingURL = () => {
|
|
87
|
-
let cssFile = document.createElement('style');
|
|
88
|
-
setTimeout(() => {
|
|
89
|
-
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
90
|
-
this.stylingContainer.prepend(cssFile);
|
|
91
|
-
}, 1);
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
// @TODO fix the `any` type :)
|
|
95
|
-
connectedCallback() {
|
|
96
|
-
this.showContent = !this.collapsed;
|
|
97
|
-
}
|
|
98
|
-
componentDidRender() {
|
|
99
|
-
// start custom styling area
|
|
100
|
-
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
101
|
-
if (this.clientStyling)
|
|
102
|
-
this.setClientStyling();
|
|
103
|
-
if (this.clientStylingUrlContent)
|
|
104
|
-
this.setClientStylingURL();
|
|
105
|
-
this.limitStylingAppends = true;
|
|
29
|
+
const HelperAccordion = class {
|
|
30
|
+
constructor(hostRef) {
|
|
31
|
+
registerInstance(this, hostRef);
|
|
32
|
+
this.accordionEvent = createEvent(this, "helperAccordionAction", 7);
|
|
33
|
+
this.setClientStyling = () => {
|
|
34
|
+
let sheet = document.createElement('style');
|
|
35
|
+
sheet.innerHTML = this.clientStyling;
|
|
36
|
+
this.stylingContainer.prepend(sheet);
|
|
37
|
+
};
|
|
38
|
+
this.setClientStylingURL = () => {
|
|
39
|
+
let cssFile = document.createElement('style');
|
|
40
|
+
setTimeout(() => {
|
|
41
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
42
|
+
this.stylingContainer.prepend(cssFile);
|
|
43
|
+
}, 1);
|
|
44
|
+
};
|
|
45
|
+
this.ticketHistoryFlag = false;
|
|
46
|
+
this.headerTitle = '';
|
|
47
|
+
this.headerSubtitle = '';
|
|
48
|
+
this.description = '';
|
|
49
|
+
this.footer = false;
|
|
50
|
+
this.deleteTab = false;
|
|
51
|
+
this.postMessage = false;
|
|
52
|
+
this.eventName = 'helperAccordionAction';
|
|
53
|
+
this.collapsed = true;
|
|
54
|
+
this.language = 'en';
|
|
55
|
+
this.clientStyling = '';
|
|
56
|
+
this.clientStylingUrlContent = '';
|
|
57
|
+
this.showContent = undefined;
|
|
58
|
+
this.limitStylingAppends = false;
|
|
59
|
+
}
|
|
60
|
+
// @TODO fix the `any` type :)
|
|
61
|
+
connectedCallback() {
|
|
62
|
+
this.showContent = !this.collapsed;
|
|
63
|
+
}
|
|
64
|
+
componentDidRender() {
|
|
65
|
+
// start custom styling area
|
|
66
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
67
|
+
if (this.clientStyling)
|
|
68
|
+
this.setClientStyling();
|
|
69
|
+
if (this.clientStylingUrlContent)
|
|
70
|
+
this.setClientStylingURL();
|
|
71
|
+
this.limitStylingAppends = true;
|
|
72
|
+
}
|
|
73
|
+
// end custom styling area
|
|
74
|
+
}
|
|
75
|
+
toggleContent() {
|
|
76
|
+
this.showContent = !this.showContent;
|
|
77
|
+
}
|
|
78
|
+
deleteAction() {
|
|
79
|
+
if (this.postMessage) {
|
|
80
|
+
// @TODO maybe change the name type, this one sucks
|
|
81
|
+
window.postMessage({ type: this.eventName }, window.location.href);
|
|
82
|
+
}
|
|
83
|
+
this.accordionEvent.emit();
|
|
106
84
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
deleteAction() {
|
|
113
|
-
if (this.postMessage) {
|
|
114
|
-
// @TODO maybe change the name type, this one sucks
|
|
115
|
-
window.postMessage({ type: this.eventName }, window.location.href);
|
|
85
|
+
render() {
|
|
86
|
+
return (h("div", { key: 'ad26faefd6e3dd089171c7e2bff13faa5a26d972', class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { key: 'bb7045653ec12a2526029589744f7ef014ec6a6a', class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() }, h("p", { key: 'ae30943582063e368e942124d8d5acadc1732629', class: "Title" }, this.headerTitle), h("p", { key: '7c35076cb768de784177988900c61fe40a71594c', class: "Subtitle" }, this.headerSubtitle), h("p", { key: 'daff2b456a427f45b00efc32ba33a68cdc2228f0', class: "Subtitle Description" }, this.description), h("span", { key: '0c4f942642da6e8b1ac3d2aeac46034963965d8f', class: "Expand" }, this.showContent ? '<' : '>')), this.showContent &&
|
|
87
|
+
h("div", { key: 'c688ab7cc629a3974b905a2fdc43063e996a3b90' }, h("div", { key: 'aaa3ad7d9f1503b8e1baaa2c756376a580ffe261', class: "Content" }, h("slot", { key: '8c5c8ff70857da9414c7284b052a3fbc5f503f4a', name: 'accordionContent' }), this.footer && this.showContent &&
|
|
88
|
+
h("div", { key: '917191f55a45647d708a5e3ff5e188c7e565a0c0' }, this.deleteTab &&
|
|
89
|
+
h("span", { key: 'e7fdd5b4f18cacaceda206b36ce9576cc3fc1472', class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
|
|
116
90
|
}
|
|
117
|
-
this.accordionEvent.emit();
|
|
118
|
-
}
|
|
119
|
-
render() {
|
|
120
|
-
return (h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle Description" }, this.description), h("span", { class: "Expand" }, this.showContent ? '<' : '>')), this.showContent &&
|
|
121
|
-
h("div", null, h("div", { class: "Content" }, h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
|
|
122
|
-
h("div", null, this.deleteTab &&
|
|
123
|
-
h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
|
|
124
|
-
}
|
|
125
91
|
};
|
|
126
|
-
|
|
92
|
+
HelperAccordion.style = HelperAccordionStyle0;
|
|
127
93
|
|
|
128
|
-
export {
|
|
94
|
+
export { HelperAccordion as helper_accordion };
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-3a075c05.js';
|
|
2
|
+
export { s as setNonce } from './index-3a075c05.js';
|
|
3
|
+
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
2
4
|
|
|
3
5
|
/*
|
|
4
|
-
Stencil Client Patch Browser
|
|
6
|
+
Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
|
|
5
7
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
var patchBrowser = () => {
|
|
9
|
+
const importMeta = import.meta.url;
|
|
10
|
+
const opts = {};
|
|
11
|
+
if (importMeta !== "") {
|
|
12
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
13
|
+
}
|
|
14
|
+
return promiseResolve(opts);
|
|
13
15
|
};
|
|
14
16
|
|
|
15
|
-
patchBrowser().then(options => {
|
|
17
|
+
patchBrowser().then(async (options) => {
|
|
18
|
+
await globalScripts();
|
|
16
19
|
return bootstrapLazy([["helper-accordion",[[1,"helper-accordion",{"ticketHistoryFlag":[516,"ticket-history-flag"],"headerTitle":[513,"header-title"],"headerSubtitle":[513,"header-subtitle"],"description":[513],"footer":[516],"deleteTab":[516,"delete-tab"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}]]]], options);
|
|
17
20
|
});
|