@everymatrix/lottery-game-page 1.24.7 → 1.26.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/helper-accordion.cjs.entry.js +4 -1
- package/dist/cjs/helper-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/helper-filters_2.cjs.entry.js +10069 -9613
- package/dist/cjs/helper-filters_2.cjs.entry.js.map +1 -1
- package/dist/cjs/helper-pagination.cjs.entry.js +7 -1
- package/dist/cjs/helper-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js +15 -2
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js.map +1 -1
- package/dist/cjs/lottery-game-page.cjs.entry.js +24 -1
- package/dist/cjs/lottery-game-page.cjs.entry.js.map +1 -1
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js +4 -1
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js.map +1 -1
- package/dist/cjs/lottery-ticket.cjs.entry.js +11 -1
- package/dist/cjs/lottery-ticket.cjs.entry.js.map +1 -1
- package/dist/collection/utils/locale.utils.js +24 -1
- package/dist/collection/utils/locale.utils.js.map +1 -1
- package/dist/components/helper-accordion2.js +4 -1
- package/dist/components/helper-accordion2.js.map +1 -1
- package/dist/components/helper-filters2.js +10012 -9573
- package/dist/components/helper-filters2.js.map +1 -1
- package/dist/components/helper-pagination.js +7 -1
- package/dist/components/helper-pagination.js.map +1 -1
- package/dist/components/lottery-draw-results-history2.js +15 -2
- package/dist/components/lottery-draw-results-history2.js.map +1 -1
- package/dist/components/lottery-draw-results2.js +19 -2
- package/dist/components/lottery-draw-results2.js.map +1 -1
- package/dist/components/lottery-game-page.js +24 -1
- package/dist/components/lottery-game-page.js.map +1 -1
- package/dist/components/lottery-ticket-controller2.js +4 -1
- package/dist/components/lottery-ticket-controller2.js.map +1 -1
- package/dist/components/lottery-ticket2.js +11 -1
- package/dist/components/lottery-ticket2.js.map +1 -1
- package/dist/esm/helper-accordion.entry.js +4 -1
- package/dist/esm/helper-accordion.entry.js.map +1 -1
- package/dist/esm/helper-filters_2.entry.js +10069 -9613
- package/dist/esm/helper-filters_2.entry.js.map +1 -1
- package/dist/esm/helper-pagination.entry.js +7 -1
- package/dist/esm/helper-pagination.entry.js.map +1 -1
- package/dist/esm/lottery-draw-results-history.entry.js +15 -2
- package/dist/esm/lottery-draw-results-history.entry.js.map +1 -1
- package/dist/esm/lottery-game-page.entry.js +24 -1
- package/dist/esm/lottery-game-page.entry.js.map +1 -1
- package/dist/esm/lottery-ticket-controller.entry.js +4 -1
- package/dist/esm/lottery-ticket-controller.entry.js.map +1 -1
- package/dist/esm/lottery-ticket.entry.js +11 -1
- package/dist/esm/lottery-ticket.entry.js.map +1 -1
- package/dist/lottery-game-page/lottery-game-page.esm.js +1 -1
- package/dist/lottery-game-page/p-12340c50.entry.js +2921 -0
- package/dist/lottery-game-page/p-12340c50.entry.js.map +1 -0
- package/dist/lottery-game-page/p-20e0c81c.entry.js +2 -0
- package/dist/lottery-game-page/p-20e0c81c.entry.js.map +1 -0
- package/dist/lottery-game-page/p-b19ff22c.entry.js +2 -0
- package/dist/lottery-game-page/p-b19ff22c.entry.js.map +1 -0
- package/dist/lottery-game-page/p-cba19473.entry.js +2 -0
- package/dist/lottery-game-page/p-cba19473.entry.js.map +1 -0
- package/dist/lottery-game-page/p-cd4aa6a4.entry.js +2 -0
- package/dist/lottery-game-page/p-cd4aa6a4.entry.js.map +1 -0
- package/dist/lottery-game-page/p-e86e2389.entry.js +2 -0
- package/dist/lottery-game-page/p-e86e2389.entry.js.map +1 -0
- package/dist/lottery-game-page/p-f399eef1.entry.js +2 -0
- package/dist/lottery-game-page/p-f399eef1.entry.js.map +1 -0
- package/package.json +1 -1
- package/dist/lottery-game-page/p-042065c6.entry.js +0 -2
- package/dist/lottery-game-page/p-042065c6.entry.js.map +0 -1
- package/dist/lottery-game-page/p-5b49ab69.entry.js +0 -2
- package/dist/lottery-game-page/p-5b49ab69.entry.js.map +0 -1
- package/dist/lottery-game-page/p-606c0b0f.entry.js +0 -2
- package/dist/lottery-game-page/p-606c0b0f.entry.js.map +0 -1
- package/dist/lottery-game-page/p-96f06e2d.entry.js +0 -2
- package/dist/lottery-game-page/p-96f06e2d.entry.js.map +0 -1
- package/dist/lottery-game-page/p-a9ef5b8c.entry.js +0 -2
- package/dist/lottery-game-page/p-a9ef5b8c.entry.js.map +0 -1
- package/dist/lottery-game-page/p-b8e683f6.entry.js +0 -2
- package/dist/lottery-game-page/p-b8e683f6.entry.js.map +0 -1
- package/dist/lottery-game-page/p-f8578814.entry.js +0 -2899
- package/dist/lottery-game-page/p-f8578814.entry.js.map +0 -1
- /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +0 -0
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-cd44e726.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
8
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'hr'];
|
|
9
9
|
const TRANSLATIONS = {
|
|
10
10
|
en: {
|
|
11
11
|
deleteTicket: 'Delete ticket'
|
|
@@ -18,6 +18,9 @@ const TRANSLATIONS = {
|
|
|
18
18
|
},
|
|
19
19
|
ar: {
|
|
20
20
|
deleteTicket: 'حذف التذكرة'
|
|
21
|
+
},
|
|
22
|
+
hr: {
|
|
23
|
+
deleteTicket: 'Izbriši listić'
|
|
21
24
|
}
|
|
22
25
|
};
|
|
23
26
|
const translate = (key, customLang) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"helper-accordion.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,mBAAmB,GAA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ources":["../helper-accordion/dist/collection/utils/locale.utils.js","../helper-accordion/dist/collection/components/helper-accordion/helper-accordion.css?tag=helper-accordion&encapsulation=shadow","../helper-accordion/dist/collection/components/helper-accordion/helper-accordion.js"],"sourcesContent":["const DEFAULT_LANGUAGE = 'en';\nconst SUPPORTED_LANGUAGES = ['ro', 'en'];\nconst TRANSLATIONS = {\n en: {\n deleteTicket: 'Delete ticket'\n },\n ro: {\n deleteTicket: 'Sterge biletul'\n },\n fr: {\n deleteTicket: 'Supprimer le billet'\n },\n ar: {\n deleteTicket: 'حذف التذكرة'\n }\n};\nexport const translate = (key, customLang) => {\n const lang = customLang;\n return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];\n};\n","@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n display: block;\n font-family: \"Roboto\", sans-serif;\n}\n\n.Header {\n border-radius: 5px;\n background: #009993;\n display: flex;\n gap: 30px;\n border: 1px solid #009993;\n padding: 8px 10px;\n user-select: none;\n margin-bottom: 1px;\n cursor: pointer;\n}\n.Header:hover {\n background: #00ABA4;\n}\n.Header .Title,\n.Header .Subtitle,\n.Header .Description {\n margin: 0;\n font-size: 14px;\n color: #fff;\n text-transform: capitalize;\n}\n.Header .Expand {\n margin-left: auto;\n color: #FFF;\n width: 17px;\n height: 17px;\n cursor: pointer;\n text-align: center;\n transform: rotate(90deg);\n font-size: 20px;\n user-select: none;\n}\n\n.HeaderTicketHistory {\n border-radius: 4px;\n background: #F1F1F1;\n display: flex;\n gap: 30px;\n border: 1px solid #009993;\n padding: 8px 10px;\n user-select: none;\n margin-bottom: 5px;\n cursor: pointer;\n}\n.HeaderTicketHistory:hover {\n background: #00ABA4;\n}\n.HeaderTicketHistory .Title,\n.HeaderTicketHistory .Subtitle,\n.HeaderTicketHistory .Description {\n margin: 0;\n font-size: 14px;\n color: #000;\n}\n.HeaderTicketHistory .Expand {\n margin-left: auto;\n color: #FFF;\n width: 17px;\n height: 17px;\n cursor: pointer;\n text-align: center;\n transform: rotate(90deg);\n font-size: 20px;\n user-select: none;\n}\n\n.Content {\n border-radius: 0 0 4px 4px;\n background: #fff;\n border: 1px solid #009993;\n padding: 10px 15px;\n user-select: none;\n color: #000;\n margin-bottom: 10px;\n}\n\n.ActionButton {\n cursor: pointer;\n display: inline-block;\n border-radius: 4px;\n margin: 20px 0 10px;\n text-transform: uppercase;\n font-size: 12px;\n text-align: center;\n padding: 8px 20px;\n min-width: 80px;\n background: #FF3D00;\n border: 1px solid #FF3D00;\n color: #FFF;\n}\n.ActionButton:hover {\n background: #FF6536;\n border: 1px solid #FF3D00;\n}","import { Component, Prop, h, State, Event } from '@stencil/core';\nimport { translate } from '../../utils/locale.utils';\nexport class Accordion {\n constructor() {\n /**\n * Flag for ticket history\n */\n this.ticketHistoryFlag = false;\n /**\n * Title (top header)\n */\n this.headerTitle = '';\n /**\n * SubTitle (top header)\n */\n this.headerSubtitle = '';\n /**\n * Description\n */\n this.description = '';\n /**\n * Enables footer content\n */\n this.footer = false;\n /**\n * Enables footer button for tab deletion\n */\n this.deleteTab = false;\n /**\n * Activates postMessages as events for actions from the widget\n */\n this.postMessage = false;\n /**\n * Name of the event emitter by the action button\n */\n this.eventName = 'helperAccordionAction';\n /**\n * Collapsed\n */\n this.collapsed = true;\n /**\n * Language\n */\n this.language = 'en';\n /**\n * Client custom styling via string\n */\n this.clientStyling = '';\n /**\n * Client custom styling via url content\n */\n this.clientStylingUrlContent = '';\n this.limitStylingAppends = false;\n this.setClientStyling = () => {\n let sheet = document.createElement('style');\n sheet.innerHTML = this.clientStyling;\n this.stylingContainer.prepend(sheet);\n };\n this.setClientStylingURL = () => {\n let cssFile = document.createElement('style');\n setTimeout(() => {\n cssFile.innerHTML = this.clientStylingUrlContent;\n this.stylingContainer.prepend(cssFile);\n }, 1);\n };\n }\n // @TODO fix the `any` type :)\n connectedCallback() {\n this.showContent = !this.collapsed;\n }\n componentDidRender() {\n // start custom styling area\n if (!this.limitStylingAppends && this.stylingContainer) {\n if (this.clientStyling)\n this.setClientStyling();\n if (this.clientStylingUrlContent)\n this.setClientStylingURL();\n this.limitStylingAppends = true;\n }\n // end custom styling area\n }\n toggleContent() {\n this.showContent = !this.showContent;\n }\n deleteAction() {\n if (this.postMessage) {\n // @TODO maybe change the name type, this one sucks\n window.postMessage({ type: this.eventName }, window.location.href);\n }\n this.accordionEvent.emit();\n }\n render() {\n return (h(\"div\", { class: \"Wrapper\", ref: el => this.stylingContainer = el },\n h(\"div\", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() },\n h(\"p\", { class: \"Title\" }, this.headerTitle),\n h(\"p\", { class: \"Subtitle\" }, this.headerSubtitle),\n h(\"p\", { class: \"Subtitle Description\" }, this.description),\n h(\"span\", { class: \"Expand\" }, this.showContent ? '<' : '>')),\n this.showContent &&\n h(\"div\", null,\n h(\"div\", { class: \"Content\" },\n h(\"slot\", { name: 'accordionContent' }),\n this.footer && this.showContent &&\n h(\"div\", null, this.deleteTab &&\n h(\"span\", { class: \"ActionButton\", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));\n }\n static get is() { return \"helper-accordion\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-accordion.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-accordion.css\"]\n }; }\n static get properties() { return {\n \"ticketHistoryFlag\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Flag for ticket history\"\n },\n \"attribute\": \"ticket-history-flag\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"headerTitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Title (top header)\"\n },\n \"attribute\": \"header-title\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"headerSubtitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"SubTitle (top header)\"\n },\n \"attribute\": \"header-subtitle\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"description\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Description\"\n },\n \"attribute\": \"description\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"footer\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Enables footer content\"\n },\n \"attribute\": \"footer\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"deleteTab\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Enables footer button for tab deletion\"\n },\n \"attribute\": \"delete-tab\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"postMessage\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Activates postMessages as events for actions from the widget\"\n },\n \"attribute\": \"post-message\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"eventName\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Name of the event emitter by the action button\"\n },\n \"attribute\": \"event-name\",\n \"reflect\": true,\n \"defaultValue\": \"'helperAccordionAction'\"\n },\n \"collapsed\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Collapsed\"\n },\n \"attribute\": \"collapsed\",\n \"reflect\": true,\n \"defaultValue\": \"true\"\n },\n \"language\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Language\"\n },\n \"attribute\": \"language\",\n \"reflect\": true,\n \"defaultValue\": \"'en'\"\n },\n \"clientStyling\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via string\"\n },\n \"attribute\": \"client-styling\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"showContent\": {},\n \"limitStylingAppends\": {}\n }; }\n static get events() { return [{\n \"method\": \"accordionEvent\",\n \"name\": \"helperAccordionAction\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Action event\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }]; }\n}\n"],"version":3}
|
|
1
|
+
{"file":"helper-accordion.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAC/C,MAAM,YAAY,GAAG;AACrB,EAAE,EAAE,EAAE;AACN,IAAI,YAAY,EAAE,eAAe;AACjC,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,YAAY,EAAE,gBAAgB;AAClC,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,YAAY,EAAE,qBAAqB;AACvC,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,YAAY,EAAE,aAAa;AAC/B,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,YAAY,EAAE,gBAAgB;AAClC,GAAG;AACH,CAAC,CAAC;AACK,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,UAAU,KAAK;AAC9C,EAAE,MAAM,IAAI,GAAG,UAAU,CAAC;AAC1B,EAAE,OAAO,YAAY,CAAC,IAAI,KAAK,SAAS,IAAI,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC;AAC/G,CAAC;;ACtBD,MAAM,kBAAkB,GAAG,uhDAAuhD;;MCEriD,SAAS;EACpB;;;;;;IAIE,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;;;;IAI/B,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;;;;IAItB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A,OAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAC3BA,OAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,EACvC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW;QAC7BA,OAAC,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS;UAC3BA,OAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAE,EAAE,SAAS,CAAC,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;GACrI;;;;;;","names":["h"],"sources":["../helper-accordion/dist/collection/utils/locale.utils.js","../helper-accordion/dist/collection/components/helper-accordion/helper-accordion.css?tag=helper-accordion&encapsulation=shadow","../helper-accordion/dist/collection/components/helper-accordion/helper-accordion.js"],"sourcesContent":["const DEFAULT_LANGUAGE = 'en';\nconst SUPPORTED_LANGUAGES = ['ro', 'en', 'hr'];\nconst TRANSLATIONS = {\n en: {\n deleteTicket: 'Delete ticket'\n },\n ro: {\n deleteTicket: 'Sterge biletul'\n },\n fr: {\n deleteTicket: 'Supprimer le billet'\n },\n ar: {\n deleteTicket: 'حذف التذكرة'\n },\n hr: {\n deleteTicket: 'Izbriši listić'\n }\n};\nexport const translate = (key, customLang) => {\n const lang = customLang;\n return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];\n};\n","@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n display: block;\n font-family: \"Roboto\", sans-serif;\n}\n\n.Header {\n border-radius: 5px;\n background: #009993;\n display: flex;\n gap: 30px;\n border: 1px solid #009993;\n padding: 8px 10px;\n user-select: none;\n margin-bottom: 1px;\n cursor: pointer;\n}\n.Header:hover {\n background: #00ABA4;\n}\n.Header .Title,\n.Header .Subtitle,\n.Header .Description {\n margin: 0;\n font-size: 14px;\n color: #fff;\n text-transform: capitalize;\n}\n.Header .Expand {\n margin-left: auto;\n color: #FFF;\n width: 17px;\n height: 17px;\n cursor: pointer;\n text-align: center;\n transform: rotate(90deg);\n font-size: 20px;\n user-select: none;\n}\n\n.HeaderTicketHistory {\n border-radius: 4px;\n background: #F1F1F1;\n display: flex;\n gap: 30px;\n border: 1px solid #009993;\n padding: 8px 10px;\n user-select: none;\n margin-bottom: 5px;\n cursor: pointer;\n}\n.HeaderTicketHistory:hover {\n background: #00ABA4;\n}\n.HeaderTicketHistory .Title,\n.HeaderTicketHistory .Subtitle,\n.HeaderTicketHistory .Description {\n margin: 0;\n font-size: 14px;\n color: #000;\n}\n.HeaderTicketHistory .Expand {\n margin-left: auto;\n color: #FFF;\n width: 17px;\n height: 17px;\n cursor: pointer;\n text-align: center;\n transform: rotate(90deg);\n font-size: 20px;\n user-select: none;\n}\n\n.Content {\n border-radius: 0 0 4px 4px;\n background: #fff;\n border: 1px solid #009993;\n padding: 10px 15px;\n user-select: none;\n color: #000;\n margin-bottom: 10px;\n}\n\n.ActionButton {\n cursor: pointer;\n display: inline-block;\n border-radius: 4px;\n margin: 20px 0 10px;\n text-transform: uppercase;\n font-size: 12px;\n text-align: center;\n padding: 8px 20px;\n min-width: 80px;\n background: #FF3D00;\n border: 1px solid #FF3D00;\n color: #FFF;\n}\n.ActionButton:hover {\n background: #FF6536;\n border: 1px solid #FF3D00;\n}","import { Component, Prop, h, State, Event } from '@stencil/core';\nimport { translate } from '../../utils/locale.utils';\nexport class Accordion {\n constructor() {\n /**\n * Flag for ticket history\n */\n this.ticketHistoryFlag = false;\n /**\n * Title (top header)\n */\n this.headerTitle = '';\n /**\n * SubTitle (top header)\n */\n this.headerSubtitle = '';\n /**\n * Description\n */\n this.description = '';\n /**\n * Enables footer content\n */\n this.footer = false;\n /**\n * Enables footer button for tab deletion\n */\n this.deleteTab = false;\n /**\n * Activates postMessages as events for actions from the widget\n */\n this.postMessage = false;\n /**\n * Name of the event emitter by the action button\n */\n this.eventName = 'helperAccordionAction';\n /**\n * Collapsed\n */\n this.collapsed = true;\n /**\n * Language\n */\n this.language = 'en';\n /**\n * Client custom styling via string\n */\n this.clientStyling = '';\n /**\n * Client custom styling via url content\n */\n this.clientStylingUrlContent = '';\n this.limitStylingAppends = false;\n this.setClientStyling = () => {\n let sheet = document.createElement('style');\n sheet.innerHTML = this.clientStyling;\n this.stylingContainer.prepend(sheet);\n };\n this.setClientStylingURL = () => {\n let cssFile = document.createElement('style');\n setTimeout(() => {\n cssFile.innerHTML = this.clientStylingUrlContent;\n this.stylingContainer.prepend(cssFile);\n }, 1);\n };\n }\n // @TODO fix the `any` type :)\n connectedCallback() {\n this.showContent = !this.collapsed;\n }\n componentDidRender() {\n // start custom styling area\n if (!this.limitStylingAppends && this.stylingContainer) {\n if (this.clientStyling)\n this.setClientStyling();\n if (this.clientStylingUrlContent)\n this.setClientStylingURL();\n this.limitStylingAppends = true;\n }\n // end custom styling area\n }\n toggleContent() {\n this.showContent = !this.showContent;\n }\n deleteAction() {\n if (this.postMessage) {\n // @TODO maybe change the name type, this one sucks\n window.postMessage({ type: this.eventName }, window.location.href);\n }\n this.accordionEvent.emit();\n }\n render() {\n return (h(\"div\", { class: \"Wrapper\", ref: el => this.stylingContainer = el },\n h(\"div\", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() },\n h(\"p\", { class: \"Title\" }, this.headerTitle),\n h(\"p\", { class: \"Subtitle\" }, this.headerSubtitle),\n h(\"p\", { class: \"Subtitle Description\" }, this.description),\n h(\"span\", { class: \"Expand\" }, this.showContent ? '<' : '>')),\n this.showContent &&\n h(\"div\", null,\n h(\"div\", { class: \"Content\" },\n h(\"slot\", { name: 'accordionContent' }),\n this.footer && this.showContent &&\n h(\"div\", null, this.deleteTab &&\n h(\"span\", { class: \"ActionButton\", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));\n }\n static get is() { return \"helper-accordion\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-accordion.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-accordion.css\"]\n }; }\n static get properties() { return {\n \"ticketHistoryFlag\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Flag for ticket history\"\n },\n \"attribute\": \"ticket-history-flag\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"headerTitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Title (top header)\"\n },\n \"attribute\": \"header-title\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"headerSubtitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"SubTitle (top header)\"\n },\n \"attribute\": \"header-subtitle\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"description\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Description\"\n },\n \"attribute\": \"description\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"footer\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Enables footer content\"\n },\n \"attribute\": \"footer\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"deleteTab\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Enables footer button for tab deletion\"\n },\n \"attribute\": \"delete-tab\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"postMessage\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Activates postMessages as events for actions from the widget\"\n },\n \"attribute\": \"post-message\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"eventName\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Name of the event emitter by the action button\"\n },\n \"attribute\": \"event-name\",\n \"reflect\": true,\n \"defaultValue\": \"'helperAccordionAction'\"\n },\n \"collapsed\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Collapsed\"\n },\n \"attribute\": \"collapsed\",\n \"reflect\": true,\n \"defaultValue\": \"true\"\n },\n \"language\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Language\"\n },\n \"attribute\": \"language\",\n \"reflect\": true,\n \"defaultValue\": \"'en'\"\n },\n \"clientStyling\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via string\"\n },\n \"attribute\": \"client-styling\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"showContent\": {},\n \"limitStylingAppends\": {}\n }; }\n static get events() { return [{\n \"method\": \"accordionEvent\",\n \"name\": \"helperAccordionAction\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Action event\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }]; }\n}\n"],"version":3}
|