@everymatrix/lottery-game-page 1.42.0 → 1.43.1

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.
@@ -1,7 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-d1baacd4.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
- const SUPPORTED_LANGUAGES = ['ro', 'en', 'hr'];
5
4
  const TRANSLATIONS = {
6
5
  en: {
7
6
  deleteTicket: 'Delete ticket'
@@ -21,7 +20,7 @@ const TRANSLATIONS = {
21
20
  };
22
21
  const translate = (key, customLang) => {
23
22
  const lang = customLang;
24
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
23
+ return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
25
24
  };
26
25
 
27
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}";
@@ -1 +1 @@
1
- {"file":"helper-accordion.entry.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,IAAI,CAAC,cAAc,GAAG,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AAK,EAAE,SAAS,EAAE,EAC3B,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,EACvC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW;QAC7B,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS;UAC3B,CAAC,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":[],"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}
1
+ {"file":"helper-accordion.entry.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,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;AAC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,GAAG,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,IAAI,CAAC,cAAc,CAAC,EAClD,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,sBAAsB,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,EAC3D,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC,WAAW,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,EAC/D,IAAI,CAAC,WAAW;MACd,CAAC,CAAC,KAAK,EAAE,IAAI,EACX,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAC3B,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,EACvC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW;QAC7B,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS;UAC3B,CAAC,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":[],"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 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) && (lang in TRANSLATIONS) ? 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}
@@ -14,7 +14,6 @@ const isMobile = (userAgent) => {
14
14
  };
15
15
 
16
16
  const DEFAULT_LANGUAGE = 'en';
17
- const SUPPORTED_LANGUAGES = ['ro', 'en', 'hu', 'hr'];
18
17
  const TRANSLATIONS = {
19
18
  en: {
20
19
  firstPage: 'First',
@@ -55,7 +54,7 @@ const TRANSLATIONS = {
55
54
  };
56
55
  const translate = (key, customLang) => {
57
56
  const lang = customLang;
58
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
57
+ return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
59
58
  };
60
59
 
61
60
  const helperPaginationCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:#009993;border-color:#009993}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}button{width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:#004D4A;border-color:#004D4A}button:disabled{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:14px}}@media screen and (max-width: 480px){button{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover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-pagination/dist/collection/utils/utils.js","../helper-pagination/dist/collection/utils/locale.utils.js","../helper-pagination/dist/collection/components/helper-pagination/helper-pagination.css?tag=helper-pagination&encapsulation=shadow","../helper-pagination/dist/collection/components/helper-pagination/helper-pagination.js"],"sourcesContent":["export function format(first, middle, last) {\n return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));\n}\n/**\n * @name isMobile\n * @description A method that returns if the browser used to access the app is from a mobile device or not\n * @param {String} userAgent window.navigator.userAgent\n * @returns {Boolean} true or false\n */\nexport const isMobile = (userAgent) => {\n return !!(userAgent.toLowerCase().match(/android/i) ||\n userAgent.toLowerCase().match(/blackberry|bb/i) ||\n userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||\n userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));\n};\n","const DEFAULT_LANGUAGE = 'en';\nconst SUPPORTED_LANGUAGES = ['ro', 'en', 'hu', 'hr'];\nconst TRANSLATIONS = {\n en: {\n firstPage: 'First',\n previousPage: 'Previous',\n nextPage: 'Next',\n lastPage: 'Last'\n },\n ro: {\n firstPage: 'Prima',\n previousPage: 'Anterior',\n nextPage: 'Urmatoarea',\n lastPage: 'Ultima'\n },\n fr: {\n firstPage: 'First',\n previousPage: 'Previous',\n nextPage: 'Next',\n lastPage: 'Last'\n },\n ar: {\n firstPage: 'First',\n previousPage: 'Previous',\n nextPage: 'Next',\n lastPage: 'Last'\n },\n hu: {\n firstPage: 'First',\n previousPage: 'Previous',\n nextPage: 'Következő',\n lastPage: 'Last'\n },\n hr: {\n firstPage: 'Prva',\n previousPage: 'Prethodna',\n nextPage: 'Slijedeća',\n lastPage: 'Zadnja'\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#PaginationContainer {\n width: 100%;\n margin: 20px 0;\n display: inline-flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.LeftItems button:not(:first-child), .RightItems button:not(:last-child) {\n margin: 0 10px;\n}\n\n.LeftItems button, .RightItems button {\n padding: 0;\n background-color: #009993;\n border-color: #009993;\n}\n\n.PaginationArea {\n display: inline-flex;\n gap: 10px;\n list-style: none;\n}\n\n.PaginationArea li {\n margin: 0;\n padding: 0;\n}\n\n.PaginationArea li button {\n width: 24px;\n height: 24px;\n display: flex;\n border: 0;\n padding: 0;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n color: #000;\n cursor: pointer;\n pointer-events: all;\n}\n\n.PaginationItem.ActiveItem button {\n background: #009993;\n border-color: #009993;\n color: #fff;\n}\n\n.PaginationItem.ActiveItem button:disabled {\n pointer-events: none;\n cursor: not-allowed;\n}\n\n.PaginationItem button:hover,\n.PaginationItem button:active {\n background: #009993;\n border-color: #009993;\n color: #fff;\n opacity: 0.8;\n}\n\nbutton {\n width: 100px;\n height: 32px;\n border: 1px solid #524e52;\n border-radius: 5px;\n background: #524e52;\n color: #fff;\n font-size: 14px;\n font: inherit;\n cursor: pointer;\n transition: all 0.1s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n}\n\nbutton:hover,\nbutton:active {\n background: #004D4A;\n border-color: #004D4A;\n}\n\nbutton:disabled {\n background-color: #ccc;\n border-color: #ccc;\n color: #fff;\n cursor: not-allowed;\n}\n\n@media screen and (max-width: 720px) {\n button {\n width: 90px;\n font-size: 14px;\n }\n}\n@media screen and (max-width: 480px) {\n button {\n width: 70px;\n font-size: 14px;\n }\n\n .paginationArea {\n padding: 5px;\n }\n}\n@media screen and (max-width: 320px) {\n button {\n width: 58px;\n font-size: 12px;\n }\n\n .paginationArea {\n padding: 5px;\n gap: 5px;\n }\n}\n/* fix for issue on hover/visited for mobile devices */\n@media (hover: none) {\n .paginationItem button:hover {\n background: inherit;\n border-color: inherit;\n color: inherit;\n opacity: 1;\n }\n\n .paginationItem.activeItem button:hover {\n background: #009993;\n border-color: #009993;\n color: #fff;\n }\n}","import { Component, h, Event, Prop, State } from '@stencil/core';\nimport { isMobile } from \"../../utils/utils\";\nimport { translate } from '../../utils/locale.utils';\nexport class HelperPagination {\n constructor() {\n /**\n * Next page string value - determines if the next page is disabled or active\n */\n this.nextPage = '';\n /**\n * Previous page string value - determines if the previous page is disabled or active\n */\n this.prevPage = '';\n /**\n * The received offset\n */\n this.offset = 0;\n /**\n * The received limit for the number of pages\n */\n this.limit = 1;\n /**\n * The received total number of pages\n */\n this.total = 1;\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 /**\n * Component working variable for last page\n */\n this.lastPage = false;\n /**\n * Component working variable for prvious page\n */\n this.previousPage = false;\n /**\n * In component working variable for the array of pages\n */\n this.pagesArray = [];\n /**\n * In component working variable for last page\n */\n this.endInt = 0;\n this.userAgent = window.navigator.userAgent;\n this.currentPage = 1;\n this.limitStylingAppends = false;\n /**\n * Navigation logic\n */\n this.navigateTo = (navigationPage) => {\n switch (navigationPage) {\n case 'firstPage':\n this.offsetInt = 0;\n break;\n case 'lastPage':\n this.offsetInt = this.endInt * this.limitInt;\n break;\n case 'previousPage':\n this.offsetInt -= this.limitInt;\n break;\n case 'nextPage':\n this.offsetInt += this.limitInt;\n break;\n case 'fivePagesBack':\n this.offsetInt -= this.limitInt * 5;\n this.offsetInt = this.offsetInt <= 0 ? 0 : this.offsetInt;\n break;\n case 'fivePagesForward':\n this.offsetInt += this.limitInt * 5;\n this.offsetInt = this.offsetInt / this.limitInt >= this.endInt ? this.endInt * this.limitInt : this.offsetInt;\n break;\n }\n this.previousPage = !this.offsetInt ? false : true;\n this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });\n };\n /**\n * Handle navigation from here\n */\n this.paginationNavigation = (pageNumber, index) => {\n this.previousPage = true;\n if (!isNaN(pageNumber)) {\n if (pageNumber === 1) {\n this.offsetInt = pageNumber - 1;\n this.previousPage = false;\n }\n else {\n this.offsetInt = (pageNumber - 1) * this.limitInt;\n }\n }\n else {\n if (index === 0 && this.currentPage <= 4) {\n this.navigateTo('firstPage');\n }\n else if (index === 0 && this.currentPage > 4) {\n this.navigateTo('fivePagesBack');\n }\n else if (index === 4 && this.endInt - this.currentPage >= 2) {\n this.navigateTo('fivePagesForward');\n }\n }\n this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });\n };\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 componentWillRender() {\n this.offsetInt = this.offset;\n this.limitInt = this.limit;\n this.currentPage = (this.offsetInt / this.limitInt) + 1;\n this.limitInt = this.limit;\n this.totalInt = this.total;\n this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);\n this.lastPage = (this.offsetInt >= this.endInt * this.limitInt) ? false : true;\n /**\n * Construct numbered navigation area based on current page position\n */\n if (this.currentPage == 1 || this.currentPage == 2) {\n this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);\n this.pagesArray.push('...');\n }\n else if (this.currentPage >= 3 && ((this.endInt - this.currentPage) >= 2)) {\n this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);\n this.pagesArray.push('...');\n this.pagesArray.unshift('...');\n }\n else if ((this.endInt - this.currentPage) < 3) {\n this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endInt - 2 + i);\n this.pagesArray.unshift('...');\n }\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 render() {\n /**\n * Center navigation area\n */\n let navigationArea = h(\"ul\", { class: \"PaginationArea\" }, this.pagesArray.map((item, index) => {\n return (h(\"li\", { class: 'PaginationItem' + (item === this.currentPage ? ' ActiveItem' : ' ') + ' ' + (isMobile(this.userAgent) ? 'MobileButtons' : '') },\n h(\"button\", { disabled: item === this.currentPage ? true : false, onClick: this.paginationNavigation.bind(this, item, index) },\n h(\"span\", null, item))));\n }));\n /**\n * Left navigation area\n */\n let buttonSecondaryLeftSide = h(\"button\", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'firstPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('firstPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" }));\n let buttonsLeftSide = h(\"div\", { class: \"LeftItems\" },\n this.secondaryArrowsActive && buttonSecondaryLeftSide,\n h(\"button\", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'previousPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('previousPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" })));\n if (isMobile(this.userAgent)) {\n buttonsLeftSide =\n h(\"div\", { class: \"LeftItems\" },\n h(\"button\", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'previousPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('previousPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" })));\n }\n /**\n * Right navigation area\n */\n let buttonSecondaryRightSide = h(\"button\", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'lastPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('lastPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" }));\n let buttonsRightSide = h(\"div\", { class: \"RightItems\" },\n h(\"button\", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'nextPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('nextPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" })),\n this.secondaryArrowsActive && buttonSecondaryRightSide);\n if (isMobile(this.userAgent)) {\n buttonsRightSide =\n h(\"div\", { class: \"RightItems\" },\n h(\"button\", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'nextPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('nextPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" })));\n }\n return (h(\"div\", { id: \"PaginationContainer\", ref: el => this.stylingContainer = el },\n this.arrowsActive && buttonsLeftSide,\n this.numberedNavActive && navigationArea,\n this.arrowsActive && buttonsRightSide));\n }\n static get is() { return \"helper-pagination\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-pagination.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-pagination.css\"]\n }; }\n static get properties() { return {\n \"nextPage\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Next page string value - determines if the next page is disabled or active\"\n },\n \"attribute\": \"next-page\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"prevPage\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Previous page string value - determines if the previous page is disabled or active\"\n },\n \"attribute\": \"prev-page\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"offset\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The received offset\"\n },\n \"attribute\": \"offset\",\n \"reflect\": true,\n \"defaultValue\": \"0\"\n },\n \"limit\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The received limit for the number of pages\"\n },\n \"attribute\": \"limit\",\n \"reflect\": true,\n \"defaultValue\": \"1\"\n },\n \"total\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The received total number of pages\"\n },\n \"attribute\": \"total\",\n \"reflect\": true,\n \"defaultValue\": \"1\"\n },\n \"language\": {\n \"type\": \"string\",\n \"mutable\": true,\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\": true,\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\": true,\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 \"arrowsActive\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Customize pagination: Activate pagination arrows\"\n },\n \"attribute\": \"arrows-active\",\n \"reflect\": true\n },\n \"secondaryArrowsActive\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Customize pagination: Activate pagination secondary arrows\"\n },\n \"attribute\": \"secondary-arrows-active\",\n \"reflect\": true\n },\n \"numberedNavActive\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Customize pagination: Activate pagination numbered navigation\"\n },\n \"attribute\": \"numbered-nav-active\",\n \"reflect\": true\n }\n }; }\n static get states() { return {\n \"offsetInt\": {},\n \"lastPage\": {},\n \"previousPage\": {},\n \"limitInt\": {},\n \"totalInt\": {},\n \"pagesArray\": {},\n \"endInt\": {},\n \"limitStylingAppends\": {}\n }; }\n static get events() { return [{\n \"method\": \"hpPageChange\",\n \"name\": \"hpPageChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Event that handles the navigation, updating the offset, limit and total values\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }]; }\n}\n"],"version":3}
1
+ {"file":"helper-pagination.entry.js","mappings":";;AAGA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,QAAQ,GAAG,CAAC,SAAS,KAAK;AACvC,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC;AACrD,IAAI,SAAS,CAAC,WAAW,EAA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AC,EACzC,IAAI,CAAC,qBAAqB,IAAI,wBAAwB,CAAC,CAAC;IAC1D,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;MAC5B,gBAAgB;QACd,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,EAC9B,CAAC,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAG,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,EACrG,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,EAC9E,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,CAAC;KAChD;IACD,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,qBAAqB,EAAE,GAAG,EAAE,EAAE,IAAI,IAAI,CAAC,gBAAgB,GAAG,EAAE,EAAE,EACnF,IAAI,CAAC,YAAY,IAAI,eAAe,EACpC,IAAI,CAAC,iBAAiB,IAAI,cAAc,EACxC,IAAI,CAAC,YAAY,IAAI,gBAAgB,CAAC,EAAE;GAC3C;;;;;;","names":[],"sources":["../helper-pagination/dist/collection/utils/utils.js","../helper-pagination/dist/collection/utils/locale.utils.js","../helper-pagination/dist/collection/components/helper-pagination/helper-pagination.css?tag=helper-pagination&encapsulation=shadow","../helper-pagination/dist/collection/components/helper-pagination/helper-pagination.js"],"sourcesContent":["export function format(first, middle, last) {\n return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));\n}\n/**\n * @name isMobile\n * @description A method that returns if the browser used to access the app is from a mobile device or not\n * @param {String} userAgent window.navigator.userAgent\n * @returns {Boolean} true or false\n */\nexport const isMobile = (userAgent) => {\n return !!(userAgent.toLowerCase().match(/android/i) ||\n userAgent.toLowerCase().match(/blackberry|bb/i) ||\n userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||\n userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));\n};\n","const DEFAULT_LANGUAGE = 'en';\nconst TRANSLATIONS = {\n en: {\n firstPage: 'First',\n previousPage: 'Previous',\n nextPage: 'Next',\n lastPage: 'Last'\n },\n ro: {\n firstPage: 'Prima',\n previousPage: 'Anterior',\n nextPage: 'Urmatoarea',\n lastPage: 'Ultima'\n },\n fr: {\n firstPage: 'First',\n previousPage: 'Previous',\n nextPage: 'Next',\n lastPage: 'Last'\n },\n ar: {\n firstPage: 'First',\n previousPage: 'Previous',\n nextPage: 'Next',\n lastPage: 'Last'\n },\n hu: {\n firstPage: 'First',\n previousPage: 'Previous',\n nextPage: 'Következő',\n lastPage: 'Last'\n },\n hr: {\n firstPage: 'Prva',\n previousPage: 'Prethodna',\n nextPage: 'Slijedeća',\n lastPage: 'Zadnja'\n }\n};\nexport const translate = (key, customLang) => {\n const lang = customLang;\n return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? 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#PaginationContainer {\n width: 100%;\n margin: 20px 0;\n display: inline-flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.LeftItems button:not(:first-child), .RightItems button:not(:last-child) {\n margin: 0 10px;\n}\n\n.LeftItems button, .RightItems button {\n padding: 0;\n background-color: #009993;\n border-color: #009993;\n}\n\n.PaginationArea {\n display: inline-flex;\n gap: 10px;\n list-style: none;\n}\n\n.PaginationArea li {\n margin: 0;\n padding: 0;\n}\n\n.PaginationArea li button {\n width: 24px;\n height: 24px;\n display: flex;\n border: 0;\n padding: 0;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n color: #000;\n cursor: pointer;\n pointer-events: all;\n}\n\n.PaginationItem.ActiveItem button {\n background: #009993;\n border-color: #009993;\n color: #fff;\n}\n\n.PaginationItem.ActiveItem button:disabled {\n pointer-events: none;\n cursor: not-allowed;\n}\n\n.PaginationItem button:hover,\n.PaginationItem button:active {\n background: #009993;\n border-color: #009993;\n color: #fff;\n opacity: 0.8;\n}\n\nbutton {\n width: 100px;\n height: 32px;\n border: 1px solid #524e52;\n border-radius: 5px;\n background: #524e52;\n color: #fff;\n font-size: 14px;\n font: inherit;\n cursor: pointer;\n transition: all 0.1s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n}\n\nbutton:hover,\nbutton:active {\n background: #004D4A;\n border-color: #004D4A;\n}\n\nbutton:disabled {\n background-color: #ccc;\n border-color: #ccc;\n color: #fff;\n cursor: not-allowed;\n}\n\n@media screen and (max-width: 720px) {\n button {\n width: 90px;\n font-size: 14px;\n }\n}\n@media screen and (max-width: 480px) {\n button {\n width: 70px;\n font-size: 14px;\n }\n\n .paginationArea {\n padding: 5px;\n }\n}\n@media screen and (max-width: 320px) {\n button {\n width: 58px;\n font-size: 12px;\n }\n\n .paginationArea {\n padding: 5px;\n gap: 5px;\n }\n}\n/* fix for issue on hover/visited for mobile devices */\n@media (hover: none) {\n .paginationItem button:hover {\n background: inherit;\n border-color: inherit;\n color: inherit;\n opacity: 1;\n }\n\n .paginationItem.activeItem button:hover {\n background: #009993;\n border-color: #009993;\n color: #fff;\n }\n}","import { Component, h, Event, Prop, State } from '@stencil/core';\nimport { isMobile } from \"../../utils/utils\";\nimport { translate } from '../../utils/locale.utils';\nexport class HelperPagination {\n constructor() {\n /**\n * Next page string value - determines if the next page is disabled or active\n */\n this.nextPage = '';\n /**\n * Previous page string value - determines if the previous page is disabled or active\n */\n this.prevPage = '';\n /**\n * The received offset\n */\n this.offset = 0;\n /**\n * The received limit for the number of pages\n */\n this.limit = 1;\n /**\n * The received total number of pages\n */\n this.total = 1;\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 /**\n * Component working variable for last page\n */\n this.lastPage = false;\n /**\n * Component working variable for prvious page\n */\n this.previousPage = false;\n /**\n * In component working variable for the array of pages\n */\n this.pagesArray = [];\n /**\n * In component working variable for last page\n */\n this.endInt = 0;\n this.userAgent = window.navigator.userAgent;\n this.currentPage = 1;\n this.limitStylingAppends = false;\n /**\n * Navigation logic\n */\n this.navigateTo = (navigationPage) => {\n switch (navigationPage) {\n case 'firstPage':\n this.offsetInt = 0;\n break;\n case 'lastPage':\n this.offsetInt = this.endInt * this.limitInt;\n break;\n case 'previousPage':\n this.offsetInt -= this.limitInt;\n break;\n case 'nextPage':\n this.offsetInt += this.limitInt;\n break;\n case 'fivePagesBack':\n this.offsetInt -= this.limitInt * 5;\n this.offsetInt = this.offsetInt <= 0 ? 0 : this.offsetInt;\n break;\n case 'fivePagesForward':\n this.offsetInt += this.limitInt * 5;\n this.offsetInt = this.offsetInt / this.limitInt >= this.endInt ? this.endInt * this.limitInt : this.offsetInt;\n break;\n }\n this.previousPage = !this.offsetInt ? false : true;\n this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });\n };\n /**\n * Handle navigation from here\n */\n this.paginationNavigation = (pageNumber, index) => {\n this.previousPage = true;\n if (!isNaN(pageNumber)) {\n if (pageNumber === 1) {\n this.offsetInt = pageNumber - 1;\n this.previousPage = false;\n }\n else {\n this.offsetInt = (pageNumber - 1) * this.limitInt;\n }\n }\n else {\n if (index === 0 && this.currentPage <= 4) {\n this.navigateTo('firstPage');\n }\n else if (index === 0 && this.currentPage > 4) {\n this.navigateTo('fivePagesBack');\n }\n else if (index === 4 && this.endInt - this.currentPage >= 2) {\n this.navigateTo('fivePagesForward');\n }\n }\n this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });\n };\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 componentWillRender() {\n this.offsetInt = this.offset;\n this.limitInt = this.limit;\n this.currentPage = (this.offsetInt / this.limitInt) + 1;\n this.limitInt = this.limit;\n this.totalInt = this.total;\n this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);\n this.lastPage = (this.offsetInt >= this.endInt * this.limitInt) ? false : true;\n /**\n * Construct numbered navigation area based on current page position\n */\n if (this.currentPage == 1 || this.currentPage == 2) {\n this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);\n this.pagesArray.push('...');\n }\n else if (this.currentPage >= 3 && ((this.endInt - this.currentPage) >= 2)) {\n this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);\n this.pagesArray.push('...');\n this.pagesArray.unshift('...');\n }\n else if ((this.endInt - this.currentPage) < 3) {\n this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endInt - 2 + i);\n this.pagesArray.unshift('...');\n }\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 render() {\n /**\n * Center navigation area\n */\n let navigationArea = h(\"ul\", { class: \"PaginationArea\" }, this.pagesArray.map((item, index) => {\n return (h(\"li\", { class: 'PaginationItem' + (item === this.currentPage ? ' ActiveItem' : ' ') + ' ' + (isMobile(this.userAgent) ? 'MobileButtons' : '') },\n h(\"button\", { disabled: item === this.currentPage ? true : false, onClick: this.paginationNavigation.bind(this, item, index) },\n h(\"span\", null, item))));\n }));\n /**\n * Left navigation area\n */\n let buttonSecondaryLeftSide = h(\"button\", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'firstPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('firstPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" }));\n let buttonsLeftSide = h(\"div\", { class: \"LeftItems\" },\n this.secondaryArrowsActive && buttonSecondaryLeftSide,\n h(\"button\", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'previousPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('previousPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" })));\n if (isMobile(this.userAgent)) {\n buttonsLeftSide =\n h(\"div\", { class: \"LeftItems\" },\n h(\"button\", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'previousPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('previousPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" })));\n }\n /**\n * Right navigation area\n */\n let buttonSecondaryRightSide = h(\"button\", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'lastPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('lastPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" }));\n let buttonsRightSide = h(\"div\", { class: \"RightItems\" },\n h(\"button\", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'nextPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('nextPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" })),\n this.secondaryArrowsActive && buttonSecondaryRightSide);\n if (isMobile(this.userAgent)) {\n buttonsRightSide =\n h(\"div\", { class: \"RightItems\" },\n h(\"button\", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'nextPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('nextPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" })));\n }\n return (h(\"div\", { id: \"PaginationContainer\", ref: el => this.stylingContainer = el },\n this.arrowsActive && buttonsLeftSide,\n this.numberedNavActive && navigationArea,\n this.arrowsActive && buttonsRightSide));\n }\n static get is() { return \"helper-pagination\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-pagination.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-pagination.css\"]\n }; }\n static get properties() { return {\n \"nextPage\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Next page string value - determines if the next page is disabled or active\"\n },\n \"attribute\": \"next-page\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"prevPage\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Previous page string value - determines if the previous page is disabled or active\"\n },\n \"attribute\": \"prev-page\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"offset\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The received offset\"\n },\n \"attribute\": \"offset\",\n \"reflect\": true,\n \"defaultValue\": \"0\"\n },\n \"limit\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The received limit for the number of pages\"\n },\n \"attribute\": \"limit\",\n \"reflect\": true,\n \"defaultValue\": \"1\"\n },\n \"total\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The received total number of pages\"\n },\n \"attribute\": \"total\",\n \"reflect\": true,\n \"defaultValue\": \"1\"\n },\n \"language\": {\n \"type\": \"string\",\n \"mutable\": true,\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\": true,\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\": true,\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 \"arrowsActive\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Customize pagination: Activate pagination arrows\"\n },\n \"attribute\": \"arrows-active\",\n \"reflect\": true\n },\n \"secondaryArrowsActive\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Customize pagination: Activate pagination secondary arrows\"\n },\n \"attribute\": \"secondary-arrows-active\",\n \"reflect\": true\n },\n \"numberedNavActive\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Customize pagination: Activate pagination numbered navigation\"\n },\n \"attribute\": \"numbered-nav-active\",\n \"reflect\": true\n }\n }; }\n static get states() { return {\n \"offsetInt\": {},\n \"lastPage\": {},\n \"previousPage\": {},\n \"limitInt\": {},\n \"totalInt\": {},\n \"pagesArray\": {},\n \"endInt\": {},\n \"limitStylingAppends\": {}\n }; }\n static get events() { return [{\n \"method\": \"hpPageChange\",\n \"name\": \"hpPageChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Event that handles the navigation, updating the offset, limit and total values\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }]; }\n}\n"],"version":3}
@@ -1,2 +1,2 @@
1
- import{p as t,b as e}from"./p-e765c7d9.js";const i=()=>{const e=import.meta.url;const i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return t(i)};i().then((t=>e([["p-f399eef1",[[1,"lottery-game-page",{endpoint:[513],gameId:[513,"game-id"],playerId:[514,"player-id"],sessionId:[513,"session-id"],language:[513],backgroundUrl:[513,"background-url"],autoPick:[516,"auto-pick"],resetButton:[516,"reset-button"],clientStyling:[513,"client-styling"],clientStylingurl:[513,"client-stylingurl"],clientStylingUrlContent:[32],tickets:[32],tabIndex:[32],hasErrors:[32],totalAmount:[32],successVisible:[32],deleteVisible:[32],deleteEventData:[32],daysRemaining:[32],hoursRemaining:[32],minutesRemaining:[32],secondsRemaining:[32],latestDraw:[32],totalWinningsAmount:[32],nextDate:[32],isLoggedIn:[32],loginModalVisible:[32],limitStylingAppends:[32]},[[0,"ticketCompleted","gridFilledHandler"],[0,"gridDirty","gridDirtyHandler"],[0,"deleteTicket","deleteTicketHandler"],[0,"modalCloseEvent","modalCloseEvent"],[0,"stakeChange","stakeChangeHandler"],[0,"multiplierChange","multiplierChangeHandler"]]]]],["p-cba19473",[[1,"helper-pagination",{nextPage:[1537,"next-page"],prevPage:[1537,"prev-page"],offset:[1538],limit:[1538],total:[1538],language:[1537],clientStyling:[1537,"client-styling"],clientStylingUrlContent:[1537,"client-styling-url-content"],arrowsActive:[1540,"arrows-active"],secondaryArrowsActive:[1540,"secondary-arrows-active"],numberedNavActive:[1540,"numbered-nav-active"],offsetInt:[32],lastPage:[32],previousPage:[32],limitInt:[32],totalInt:[32],pagesArray:[32],endInt:[32],limitStylingAppends:[32]}]]],["p-167c9dbe",[[1,"lottery-grid",{ticketId:[514,"ticket-id"],totalNumbers:[514,"total-numbers"],gameId:[513,"game-id"],maximumAllowed:[514,"maximum-allowed"],minimumAllowed:[514,"minimum-allowed"],selectable:[516],selectedNumbers:[513,"selected-numbers"],displaySelected:[516,"display-selected"],language:[513],gridIndex:[514,"grid-index"],gridType:[513,"grid-type"],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],numbers:[32],limitStylingAppends:[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{value:[513],selectable:[516],isSelected:[516,"is-selected"],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],limitStylingAppends:[32]}]]],["p-12340c50",[[1,"lottery-draw-results",{endpoint:[513],gameId:[513,"game-id"],language:[513],playerId:[513,"player-id"],drawMode:[516,"draw-mode"],drawId:[513,"draw-id"],gameName:[513,"game-name"],ticketDate:[513,"ticket-date"],ticketStatus:[513,"ticket-status"],ticketId:[513,"ticket-id"],ticketAmount:[513,"ticket-amount"],ticketMultiplier:[516,"ticket-multiplier"],ticketDrawCount:[514,"ticket-draw-count"],ticketNumbers:[513,"ticket-numbers"],sessionId:[513,"session-id"],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],ticketDrawData:[513,"ticket-draw-data"],multiplier:[32],isLoading:[32],hasErrors:[32],errorText:[32],ticketData:[32],ticketDataLoaded:[32],ticketDraws:[32],toggleDrawer:[32],limitStylingAppends:[32],drawData:[32]}],[1,"helper-filters",{showFilterId:[516,"show-filter-id"],activateTicketSearch:[516,"activate-ticket-search"],gameId:[513,"game-id"],playerId:[513,"player-id"],session:[513],postMessage:[516,"post-message"],language:[513],quickFiltersActive:[516,"quick-filters-active"],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],showFilterModal:[32],showClearButton:[32],filterData:[32],filterDataReset:[32],limitStylingAppends:[32]},[[0,"modalCloseEvent","modalCloseEvent"]]]]],["p-e86e2389",[[1,"lottery-draw-results-history",{endpoint:[513],gameId:[513,"game-id"],numberOfResults:[514,"number-of-results"],language:[513],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],drawData:[32],winningDataSetsData:[32],displayAllDrawsResults:[32],showQuickFilters:[32],dateFiltersFrom:[32],dateFiltersTo:[32],isLoading:[32],noResults:[32],limitStylingAppends:[32]},[[0,"filterSelection","filtersHandler"],[0,"filterSelectionReset","clearFiltersHandler"]]]]],["p-20e0c81c",[[1,"lottery-ticket",{endpoint:[513],gameId:[513,"game-id"],numberOfGrids:[514,"number-of-grids"],multipleDraws:[516,"multiple-draws"],ticketId:[514,"ticket-id"],resetButton:[516,"reset-button"],autoPick:[516,"auto-pick"],language:[513],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],multiplier:[32],numberOfDraws:[32],isLoading:[32],hasErrors:[32],ticketDone:[32],isCustomSelect:[32],amountInfo:[32],limitStylingAppends:[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"]]]]],["p-cd4aa6a4",[[1,"lottery-ticket-controller",{endpoint:[513],ticketId:[514,"ticket-id"],ticketDescription:[513,"ticket-description"],gameId:[513,"game-id"],postMessage:[516,"post-message"],eventName:[513,"event-name"],collapsed:[516],numberOfGrids:[514,"number-of-grids"],last:[516],language:[513],autoPick:[516,"auto-pick"],resetButton:[516,"reset-button"],totalControllers:[514,"total-controllers"],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],limitStylingAppends:[32]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]]]],["p-662d9dac",[[1,"helper-tabs",{disabled:[516],label:[513],selected:[516],cmsEndpoint:[513,"cms-endpoint"],selectedIndex:[1538,"selected-index"],tabs:[16],clientStyling:[513,"client-styling"],clientStylingurl:[513,"client-stylingurl"],clientStylingUrlContent:[513,"client-styling-url-content"],limitStylingAppends:[32]}]]],["p-b19ff22c",[[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]}]]],["p-76c280ec",[[1,"helper-tab",{selectedIndex:[514,"selected-index"],cmsEndpoint:[513,"cms-endpoint"],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],tabContent:[32],limitStylingAppends:[32]}]]],["p-66729e9c",[[1,"lottery-game-details",{clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],limitStylingAppends:[32]}]]],["p-15309f9a",[[1,"helper-modal",{titleModal:[513,"title-modal"],visible:[1540],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],limitStylingAppends:[32]}]]]],t)));
1
+ import{p as t,b as e}from"./p-e765c7d9.js";const i=()=>{const e=import.meta.url;const i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return t(i)};i().then((t=>e([["p-f399eef1",[[1,"lottery-game-page",{endpoint:[513],gameId:[513,"game-id"],playerId:[514,"player-id"],sessionId:[513,"session-id"],language:[513],backgroundUrl:[513,"background-url"],autoPick:[516,"auto-pick"],resetButton:[516,"reset-button"],clientStyling:[513,"client-styling"],clientStylingurl:[513,"client-stylingurl"],clientStylingUrlContent:[32],tickets:[32],tabIndex:[32],hasErrors:[32],totalAmount:[32],successVisible:[32],deleteVisible:[32],deleteEventData:[32],daysRemaining:[32],hoursRemaining:[32],minutesRemaining:[32],secondsRemaining:[32],latestDraw:[32],totalWinningsAmount:[32],nextDate:[32],isLoggedIn:[32],loginModalVisible:[32],limitStylingAppends:[32]},[[0,"ticketCompleted","gridFilledHandler"],[0,"gridDirty","gridDirtyHandler"],[0,"deleteTicket","deleteTicketHandler"],[0,"modalCloseEvent","modalCloseEvent"],[0,"stakeChange","stakeChangeHandler"],[0,"multiplierChange","multiplierChangeHandler"]]]]],["p-721345a7",[[1,"helper-pagination",{nextPage:[1537,"next-page"],prevPage:[1537,"prev-page"],offset:[1538],limit:[1538],total:[1538],language:[1537],clientStyling:[1537,"client-styling"],clientStylingUrlContent:[1537,"client-styling-url-content"],arrowsActive:[1540,"arrows-active"],secondaryArrowsActive:[1540,"secondary-arrows-active"],numberedNavActive:[1540,"numbered-nav-active"],offsetInt:[32],lastPage:[32],previousPage:[32],limitInt:[32],totalInt:[32],pagesArray:[32],endInt:[32],limitStylingAppends:[32]}]]],["p-167c9dbe",[[1,"lottery-grid",{ticketId:[514,"ticket-id"],totalNumbers:[514,"total-numbers"],gameId:[513,"game-id"],maximumAllowed:[514,"maximum-allowed"],minimumAllowed:[514,"minimum-allowed"],selectable:[516],selectedNumbers:[513,"selected-numbers"],displaySelected:[516,"display-selected"],language:[513],gridIndex:[514,"grid-index"],gridType:[513,"grid-type"],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],numbers:[32],limitStylingAppends:[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{value:[513],selectable:[516],isSelected:[516,"is-selected"],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],limitStylingAppends:[32]}]]],["p-12340c50",[[1,"lottery-draw-results",{endpoint:[513],gameId:[513,"game-id"],language:[513],playerId:[513,"player-id"],drawMode:[516,"draw-mode"],drawId:[513,"draw-id"],gameName:[513,"game-name"],ticketDate:[513,"ticket-date"],ticketStatus:[513,"ticket-status"],ticketId:[513,"ticket-id"],ticketAmount:[513,"ticket-amount"],ticketMultiplier:[516,"ticket-multiplier"],ticketDrawCount:[514,"ticket-draw-count"],ticketNumbers:[513,"ticket-numbers"],sessionId:[513,"session-id"],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],ticketDrawData:[513,"ticket-draw-data"],multiplier:[32],isLoading:[32],hasErrors:[32],errorText:[32],ticketData:[32],ticketDataLoaded:[32],ticketDraws:[32],toggleDrawer:[32],limitStylingAppends:[32],drawData:[32]}],[1,"helper-filters",{showFilterId:[516,"show-filter-id"],activateTicketSearch:[516,"activate-ticket-search"],gameId:[513,"game-id"],playerId:[513,"player-id"],session:[513],postMessage:[516,"post-message"],language:[513],quickFiltersActive:[516,"quick-filters-active"],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],showFilterModal:[32],showClearButton:[32],filterData:[32],filterDataReset:[32],limitStylingAppends:[32]},[[0,"modalCloseEvent","modalCloseEvent"]]]]],["p-e86e2389",[[1,"lottery-draw-results-history",{endpoint:[513],gameId:[513,"game-id"],numberOfResults:[514,"number-of-results"],language:[513],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],drawData:[32],winningDataSetsData:[32],displayAllDrawsResults:[32],showQuickFilters:[32],dateFiltersFrom:[32],dateFiltersTo:[32],isLoading:[32],noResults:[32],limitStylingAppends:[32]},[[0,"filterSelection","filtersHandler"],[0,"filterSelectionReset","clearFiltersHandler"]]]]],["p-20e0c81c",[[1,"lottery-ticket",{endpoint:[513],gameId:[513,"game-id"],numberOfGrids:[514,"number-of-grids"],multipleDraws:[516,"multiple-draws"],ticketId:[514,"ticket-id"],resetButton:[516,"reset-button"],autoPick:[516,"auto-pick"],language:[513],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],multiplier:[32],numberOfDraws:[32],isLoading:[32],hasErrors:[32],ticketDone:[32],isCustomSelect:[32],amountInfo:[32],limitStylingAppends:[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"]]]]],["p-cd4aa6a4",[[1,"lottery-ticket-controller",{endpoint:[513],ticketId:[514,"ticket-id"],ticketDescription:[513,"ticket-description"],gameId:[513,"game-id"],postMessage:[516,"post-message"],eventName:[513,"event-name"],collapsed:[516],numberOfGrids:[514,"number-of-grids"],last:[516],language:[513],autoPick:[516,"auto-pick"],resetButton:[516,"reset-button"],totalControllers:[514,"total-controllers"],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],limitStylingAppends:[32]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]]]],["p-662d9dac",[[1,"helper-tabs",{disabled:[516],label:[513],selected:[516],cmsEndpoint:[513,"cms-endpoint"],selectedIndex:[1538,"selected-index"],tabs:[16],clientStyling:[513,"client-styling"],clientStylingurl:[513,"client-stylingurl"],clientStylingUrlContent:[513,"client-styling-url-content"],limitStylingAppends:[32]}]]],["p-59a96854",[[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]}]]],["p-76c280ec",[[1,"helper-tab",{selectedIndex:[514,"selected-index"],cmsEndpoint:[513,"cms-endpoint"],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],tabContent:[32],limitStylingAppends:[32]}]]],["p-66729e9c",[[1,"lottery-game-details",{clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],limitStylingAppends:[32]}]]],["p-15309f9a",[[1,"helper-modal",{titleModal:[513,"title-modal"],visible:[1540],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],limitStylingAppends:[32]}]]]],t)));
2
2
  //# sourceMappingURL=lottery-game-page.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,h as i}from"./p-e765c7d9.js";const s="en";const r={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"},hr:{deleteTicket:"Izbriši listić"}};const o=(t,e)=>{const i=e;return r[i!==undefined&&i in r?i:s][t]};const n='@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}';const a=class{constructor(i){t(this,i);this.accordionEvent=e(this,"helperAccordionAction",7);this.ticketHistoryFlag=false;this.headerTitle="";this.headerSubtitle="";this.description="";this.footer=false;this.deleteTab=false;this.postMessage=false;this.eventName="helperAccordionAction";this.collapsed=true;this.language="en";this.clientStyling="";this.clientStylingUrlContent="";this.limitStylingAppends=false;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(){if(!this.limitStylingAppends&&this.stylingContainer){if(this.clientStyling)this.setClientStyling();if(this.clientStylingUrlContent)this.setClientStylingURL();this.limitStylingAppends=true}}toggleContent(){this.showContent=!this.showContent}deleteAction(){if(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:this.ticketHistoryFlag===true?"HeaderTicketHistory":"Header",onClick:()=>this.toggleContent()},i("p",{class:"Title"},this.headerTitle),i("p",{class:"Subtitle"},this.headerSubtitle),i("p",{class:"Subtitle Description"},this.description),i("span",{class:"Expand"},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()},o("deleteTicket",this.language))))))}};a.style=n;export{a as helper_accordion};
2
+ //# sourceMappingURL=p-59a96854.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"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"],"names":["DEFAULT_LANGUAGE","TRANSLATIONS","en","deleteTicket","ro","fr","ar","hr","translate","key","customLang","lang","undefined","helperAccordionCss","Accordion","[object Object]","hostRef","this","ticketHistoryFlag","headerTitle","headerSubtitle","description","footer","deleteTab","postMessage","eventName","collapsed","language","clientStyling","clientStylingUrlContent","limitStylingAppends","setClientStyling","sheet","document","createElement","innerHTML","stylingContainer","prepend","setClientStylingURL","cssFile","setTimeout","showContent","window","type","location","href","accordionEvent","emit","h","class","ref","el","onClick","toggleContent","name","deleteAction"],"mappings":"kDAAA,MAAMA,EAAmB,KACzB,MAAMC,EAAe,CACnBC,GAAI,CACFC,aAAc,iBAEhBC,GAAI,CACFD,aAAc,kBAEhBE,GAAI,CACFF,aAAc,uBAEhBG,GAAI,CACFH,aAAc,eAEhBI,GAAI,CACFJ,aAAc,mBAGX,MAAMK,EAAY,CAACC,EAAKC,KAC7B,MAAMC,EAAOD,EACb,OAAOT,EAAcU,IAASC,WAAeD,KAAQV,EAAgBU,EAAOX,GAAkBS,ICpBhG,MAAMI,EAAqB,0hDCEdC,EAAS,MACpBC,YAAAC,mEAIEC,KAAKC,kBAAoB,MAIzBD,KAAKE,YAAc,GAInBF,KAAKG,eAAiB,GAItBH,KAAKI,YAAc,GAInBJ,KAAKK,OAAS,MAIdL,KAAKM,UAAY,MAIjBN,KAAKO,YAAc,MAInBP,KAAKQ,UAAY,wBAIjBR,KAAKS,UAAY,KAIjBT,KAAKU,SAAW,KAIhBV,KAAKW,cAAgB,GAIrBX,KAAKY,wBAA0B,GAC/BZ,KAAKa,oBAAsB,MAC3Bb,KAAKc,iBAAmB,KACtB,IAAIC,EAAQC,SAASC,cAAc,SACnCF,EAAMG,UAAYlB,KAAKW,cACvBX,KAAKmB,iBAAiBC,QAAQL,IAEhCf,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'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) && (lang in TRANSLATIONS) ? 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"]}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as i,h as s}from"./p-e765c7d9.js";const e=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));const a="en";const o={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Következő",lastPage:"Last"},hr:{firstPage:"Prva",previousPage:"Prethodna",nextPage:"Slijedeća",lastPage:"Zadnja"}};const n=(t,i)=>{const s=i;return o[s!==undefined&&s in o?s:a][t]};const h='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:#009993;border-color:#009993}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}button{width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:#004D4A;border-color:#004D4A}button:disabled{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:14px}}@media screen and (max-width: 480px){button{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:#009993;border-color:#009993;color:#fff}}';const r=class{constructor(s){t(this,s);this.hpPageChange=i(this,"hpPageChange",7);this.nextPage="";this.prevPage="";this.offset=0;this.limit=1;this.total=1;this.language="en";this.clientStyling="";this.clientStylingUrlContent="";this.lastPage=false;this.previousPage=false;this.pagesArray=[];this.endInt=0;this.userAgent=window.navigator.userAgent;this.currentPage=1;this.limitStylingAppends=false;this.navigateTo=t=>{switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt;break;case"nextPage":this.offsetInt+=this.limitInt;break;case"fivePagesBack":this.offsetInt-=this.limitInt*5;this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=this.limitInt*5;this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt;break}this.previousPage=!this.offsetInt?false:true;this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})};this.paginationNavigation=(t,i)=>{this.previousPage=true;if(!isNaN(t)){if(t===1){this.offsetInt=t-1;this.previousPage=false}else{this.offsetInt=(t-1)*this.limitInt}}else{if(i===0&&this.currentPage<=4){this.navigateTo("firstPage")}else if(i===0&&this.currentPage>4){this.navigateTo("fivePagesBack")}else if(i===4&&this.endInt-this.currentPage>=2){this.navigateTo("fivePagesForward")}}this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})};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)}}componentWillRender(){this.offsetInt=this.offset;this.limitInt=this.limit;this.currentPage=this.offsetInt/this.limitInt+1;this.limitInt=this.limit;this.totalInt=this.total;this.endInt=Math.ceil(this.totalInt/this.limitInt)-1;this.lastPage=this.offsetInt>=this.endInt*this.limitInt?false:true;if(this.currentPage==1||this.currentPage==2){this.pagesArray=Array.from({length:4},((t,i)=>i+1));this.pagesArray.push("...")}else if(this.currentPage>=3&&this.endInt-this.currentPage>=2){this.pagesArray=Array.from({length:3},((t,i)=>this.currentPage+i-1));this.pagesArray.push("...");this.pagesArray.unshift("...")}else if(this.endInt-this.currentPage<3){this.pagesArray=Array.from({length:4},((t,i)=>this.endInt-2+i));this.pagesArray.unshift("...")}}componentDidRender(){if(!this.limitStylingAppends&&this.stylingContainer){if(this.clientStyling)this.setClientStyling();if(this.clientStylingUrlContent)this.setClientStylingURL();this.limitStylingAppends=true}}render(){let t=s("ul",{class:"PaginationArea"},this.pagesArray.map(((t,i)=>s("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(e(this.userAgent)?"MobileButtons":"")},s("button",{disabled:t===this.currentPage?true:false,onClick:this.paginationNavigation.bind(this,t,i)},s("span",null,t))))));let i=s("button",{disabled:this.prevPage?false:true,onClick:this.navigateTo.bind(this,"firstPage")},s("span",{class:"NavigationButton"},n("firstPage",this.language)),s("span",{class:"NavigationIcon"}));let a=s("div",{class:"LeftItems"},this.secondaryArrowsActive&&i,s("button",{disabled:this.prevPage?false:true,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},n("previousPage",this.language)),s("span",{class:"NavigationIcon"})));if(e(this.userAgent)){a=s("div",{class:"LeftItems"},s("button",{disabled:this.prevPage?false:true,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},n("previousPage",this.language)),s("span",{class:"NavigationIcon"})))}let o=s("button",{disabled:this.nextPage?false:true,onClick:this.navigateTo.bind(this,"lastPage")},s("span",{class:"NavigationButton"},n("lastPage",this.language)),s("span",{class:"NavigationIcon"}));let h=s("div",{class:"RightItems"},s("button",{disabled:this.nextPage?false:true,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},n("nextPage",this.language)),s("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&o);if(e(this.userAgent)){h=s("div",{class:"RightItems"},s("button",{disabled:this.nextPage?false:true,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},n("nextPage",this.language)),s("span",{class:"NavigationIcon"})))}return s("div",{id:"PaginationContainer",ref:t=>this.stylingContainer=t},this.arrowsActive&&a,this.numberedNavActive&&t,this.arrowsActive&&h)}};r.style=h;export{r as helper_pagination};
2
+ //# sourceMappingURL=p-721345a7.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../helper-pagination/dist/collection/utils/utils.js","../helper-pagination/dist/collection/utils/locale.utils.js","../helper-pagination/dist/collection/components/helper-pagination/helper-pagination.css?tag=helper-pagination&encapsulation=shadow","../helper-pagination/dist/collection/components/helper-pagination/helper-pagination.js"],"names":["isMobile","userAgent","toLowerCase","match","DEFAULT_LANGUAGE","TRANSLATIONS","en","firstPage","previousPage","nextPage","lastPage","ro","fr","ar","hu","hr","translate","key","customLang","lang","undefined","helperPaginationCss","HelperPagination","[object Object]","hostRef","this","prevPage","offset","limit","total","language","clientStyling","clientStylingUrlContent","pagesArray","endInt","window","navigator","currentPage","limitStylingAppends","navigateTo","navigationPage","offsetInt","limitInt","hpPageChange","emit","totalInt","paginationNavigation","pageNumber","index","isNaN","setClientStyling","sheet","document","createElement","innerHTML","stylingContainer","prepend","setClientStylingURL","cssFile","setTimeout","Math","ceil","Array","from","length","_","i","push","unshift","navigationArea","h","class","map","item","disabled","onClick","bind","buttonSecondaryLeftSide","buttonsLeftSide","secondaryArrowsActive","buttonSecondaryRightSide","buttonsRightSide","id","ref","el","arrowsActive","numberedNavActive"],"mappings":"kDASO,MAAMA,EAAYC,MACbA,EAAUC,cAAcC,MAAM,aACtCF,EAAUC,cAAcC,MAAM,mBAC9BF,EAAUC,cAAcC,MAAM,sBAC9BF,EAAUC,cAAcC,MAAM,qDCblC,MAAMC,EAAmB,KACzB,MAAMC,EAAe,CACnBC,GAAI,CACFC,UAAW,QACXC,aAAc,WACdC,SAAU,OACVC,SAAU,QAEZC,GAAI,CACFJ,UAAW,QACXC,aAAc,WACdC,SAAU,aACVC,SAAU,UAEZE,GAAI,CACFL,UAAW,QACXC,aAAc,WACdC,SAAU,OACVC,SAAU,QAEZG,GAAI,CACFN,UAAW,QACXC,aAAc,WACdC,SAAU,OACVC,SAAU,QAEZI,GAAI,CACFP,UAAW,QACXC,aAAc,WACdC,SAAU,YACVC,SAAU,QAEZK,GAAI,CACFR,UAAW,OACXC,aAAc,YACdC,SAAU,YACVC,SAAU,WAGP,MAAMM,EAAY,CAACC,EAAKC,KAC7B,MAAMC,EAAOD,EACb,OAAOb,EAAcc,IAASC,WAAeD,KAAQd,EAAgBc,EAAOf,GAAkBa,ICzChG,MAAMI,EAAsB,w2DCGfC,EAAgB,MAC3BC,YAAAC,wDAIEC,KAAKhB,SAAW,GAIhBgB,KAAKC,SAAW,GAIhBD,KAAKE,OAAS,EAIdF,KAAKG,MAAQ,EAIbH,KAAKI,MAAQ,EAIbJ,KAAKK,SAAW,KAIhBL,KAAKM,cAAgB,GAIrBN,KAAKO,wBAA0B,GAI/BP,KAAKf,SAAW,MAIhBe,KAAKjB,aAAe,MAIpBiB,KAAKQ,WAAa,GAIlBR,KAAKS,OAAS,EACdT,KAAKxB,UAAYkC,OAAOC,UAAUnC,UAClCwB,KAAKY,YAAc,EACnBZ,KAAKa,oBAAsB,MAI3Bb,KAAKc,WAAcC,IACjB,OAAQA,G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S,EAA2BV,EAAE,SAAU,CAAEI,SAAUjD,KAAKhB,SAAW,MAAQ,KAAMkE,QAASlD,KAAKc,WAAWqC,KAAKnD,KAAM,aACvH6C,EAAE,OAAQ,CAAEC,MAAO,oBAAsBvD,EAAU,WAAYS,KAAKK,WACpEwC,EAAE,OAAQ,CAAEC,MAAO,oBACrB,IAAIU,EAAmBX,EAAE,MAAO,CAAEC,MAAO,cACvCD,EAAE,SAAU,CAAEI,SAAUjD,KAAKhB,SAAW,MAAQ,KAAMkE,QAASlD,KAAKc,WAAWqC,KAAKnD,KAAM,aACxF6C,EAAE,OAAQ,CAAEC,MAAO,oBAAsBvD,EAAU,WAAYS,KAAKK,WACpEwC,EAAE,OAAQ,CAAEC,MAAO,oBACrB9C,KAAKsD,uBAAyBC,GAChC,GAAIhF,EAASyB,KAAKxB,WAAY,CAC5BgF,EACEX,EAAE,MAAO,CAAEC,MAAO,cAChBD,EAAE,SAAU,CAAEI,SAAUjD,KAAKhB,SAAW,MAAQ,KAAMkE,QAASlD,KAAKc,WAAWqC,KAAKnD,KAAM,aACxF6C,EAAE,OAAQ,CAAEC,MAAO,oBAAsBvD,EAAU,WAAYS,KAAKK,WACpEwC,EAAE,OAAQ,CAAEC,MAAO,qBAE3B,OAAQD,EAAE,MAAO,CAAEY,GAAI,sBAAuBC,IAAKC,GAAM3D,KAAK8B,iBAAmB6B,GAC/E3D,KAAK4D,cAAgBP,EACrBrD,KAAK6D,mBAAqBjB,EAC1B5C,KAAK4D,cAAgBJ","sourcesContent":["export function format(first, middle, last) {\n return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));\n}\n/**\n * @name isMobile\n * @description A method that returns if the browser used to access the app is from a mobile device or not\n * @param {String} userAgent window.navigator.userAgent\n * @returns {Boolean} true or false\n */\nexport const isMobile = (userAgent) => {\n return !!(userAgent.toLowerCase().match(/android/i) ||\n userAgent.toLowerCase().match(/blackberry|bb/i) ||\n userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||\n userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));\n};\n","const DEFAULT_LANGUAGE = 'en';\nconst TRANSLATIONS = {\n en: {\n firstPage: 'First',\n previousPage: 'Previous',\n nextPage: 'Next',\n lastPage: 'Last'\n },\n ro: {\n firstPage: 'Prima',\n previousPage: 'Anterior',\n nextPage: 'Urmatoarea',\n lastPage: 'Ultima'\n },\n fr: {\n firstPage: 'First',\n previousPage: 'Previous',\n nextPage: 'Next',\n lastPage: 'Last'\n },\n ar: {\n firstPage: 'First',\n previousPage: 'Previous',\n nextPage: 'Next',\n lastPage: 'Last'\n },\n hu: {\n firstPage: 'First',\n previousPage: 'Previous',\n nextPage: 'Következő',\n lastPage: 'Last'\n },\n hr: {\n firstPage: 'Prva',\n previousPage: 'Prethodna',\n nextPage: 'Slijedeća',\n lastPage: 'Zadnja'\n }\n};\nexport const translate = (key, customLang) => {\n const lang = customLang;\n return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? 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#PaginationContainer {\n width: 100%;\n margin: 20px 0;\n display: inline-flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.LeftItems button:not(:first-child), .RightItems button:not(:last-child) {\n margin: 0 10px;\n}\n\n.LeftItems button, .RightItems button {\n padding: 0;\n background-color: #009993;\n border-color: #009993;\n}\n\n.PaginationArea {\n display: inline-flex;\n gap: 10px;\n list-style: none;\n}\n\n.PaginationArea li {\n margin: 0;\n padding: 0;\n}\n\n.PaginationArea li button {\n width: 24px;\n height: 24px;\n display: flex;\n border: 0;\n padding: 0;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n color: #000;\n cursor: pointer;\n pointer-events: all;\n}\n\n.PaginationItem.ActiveItem button {\n background: #009993;\n border-color: #009993;\n color: #fff;\n}\n\n.PaginationItem.ActiveItem button:disabled {\n pointer-events: none;\n cursor: not-allowed;\n}\n\n.PaginationItem button:hover,\n.PaginationItem button:active {\n background: #009993;\n border-color: #009993;\n color: #fff;\n opacity: 0.8;\n}\n\nbutton {\n width: 100px;\n height: 32px;\n border: 1px solid #524e52;\n border-radius: 5px;\n background: #524e52;\n color: #fff;\n font-size: 14px;\n font: inherit;\n cursor: pointer;\n transition: all 0.1s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n}\n\nbutton:hover,\nbutton:active {\n background: #004D4A;\n border-color: #004D4A;\n}\n\nbutton:disabled {\n background-color: #ccc;\n border-color: #ccc;\n color: #fff;\n cursor: not-allowed;\n}\n\n@media screen and (max-width: 720px) {\n button {\n width: 90px;\n font-size: 14px;\n }\n}\n@media screen and (max-width: 480px) {\n button {\n width: 70px;\n font-size: 14px;\n }\n\n .paginationArea {\n padding: 5px;\n }\n}\n@media screen and (max-width: 320px) {\n button {\n width: 58px;\n font-size: 12px;\n }\n\n .paginationArea {\n padding: 5px;\n gap: 5px;\n }\n}\n/* fix for issue on hover/visited for mobile devices */\n@media (hover: none) {\n .paginationItem button:hover {\n background: inherit;\n border-color: inherit;\n color: inherit;\n opacity: 1;\n }\n\n .paginationItem.activeItem button:hover {\n background: #009993;\n border-color: #009993;\n color: #fff;\n }\n}","import { Component, h, Event, Prop, State } from '@stencil/core';\nimport { isMobile } from \"../../utils/utils\";\nimport { translate } from '../../utils/locale.utils';\nexport class HelperPagination {\n constructor() {\n /**\n * Next page string value - determines if the next page is disabled or active\n */\n this.nextPage = '';\n /**\n * Previous page string value - determines if the previous page is disabled or active\n */\n this.prevPage = '';\n /**\n * The received offset\n */\n this.offset = 0;\n /**\n * The received limit for the number of pages\n */\n this.limit = 1;\n /**\n * The received total number of pages\n */\n this.total = 1;\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 /**\n * Component working variable for last page\n */\n this.lastPage = false;\n /**\n * Component working variable for prvious page\n */\n this.previousPage = false;\n /**\n * In component working variable for the array of pages\n */\n this.pagesArray = [];\n /**\n * In component working variable for last page\n */\n this.endInt = 0;\n this.userAgent = window.navigator.userAgent;\n this.currentPage = 1;\n this.limitStylingAppends = false;\n /**\n * Navigation logic\n */\n this.navigateTo = (navigationPage) => {\n switch (navigationPage) {\n case 'firstPage':\n this.offsetInt = 0;\n break;\n case 'lastPage':\n this.offsetInt = this.endInt * this.limitInt;\n break;\n case 'previousPage':\n this.offsetInt -= this.limitInt;\n break;\n case 'nextPage':\n this.offsetInt += this.limitInt;\n break;\n case 'fivePagesBack':\n this.offsetInt -= this.limitInt * 5;\n this.offsetInt = this.offsetInt <= 0 ? 0 : this.offsetInt;\n break;\n case 'fivePagesForward':\n this.offsetInt += this.limitInt * 5;\n this.offsetInt = this.offsetInt / this.limitInt >= this.endInt ? this.endInt * this.limitInt : this.offsetInt;\n break;\n }\n this.previousPage = !this.offsetInt ? false : true;\n this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });\n };\n /**\n * Handle navigation from here\n */\n this.paginationNavigation = (pageNumber, index) => {\n this.previousPage = true;\n if (!isNaN(pageNumber)) {\n if (pageNumber === 1) {\n this.offsetInt = pageNumber - 1;\n this.previousPage = false;\n }\n else {\n this.offsetInt = (pageNumber - 1) * this.limitInt;\n }\n }\n else {\n if (index === 0 && this.currentPage <= 4) {\n this.navigateTo('firstPage');\n }\n else if (index === 0 && this.currentPage > 4) {\n this.navigateTo('fivePagesBack');\n }\n else if (index === 4 && this.endInt - this.currentPage >= 2) {\n this.navigateTo('fivePagesForward');\n }\n }\n this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });\n };\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 componentWillRender() {\n this.offsetInt = this.offset;\n this.limitInt = this.limit;\n this.currentPage = (this.offsetInt / this.limitInt) + 1;\n this.limitInt = this.limit;\n this.totalInt = this.total;\n this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);\n this.lastPage = (this.offsetInt >= this.endInt * this.limitInt) ? false : true;\n /**\n * Construct numbered navigation area based on current page position\n */\n if (this.currentPage == 1 || this.currentPage == 2) {\n this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);\n this.pagesArray.push('...');\n }\n else if (this.currentPage >= 3 && ((this.endInt - this.currentPage) >= 2)) {\n this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);\n this.pagesArray.push('...');\n this.pagesArray.unshift('...');\n }\n else if ((this.endInt - this.currentPage) < 3) {\n this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endInt - 2 + i);\n this.pagesArray.unshift('...');\n }\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 render() {\n /**\n * Center navigation area\n */\n let navigationArea = h(\"ul\", { class: \"PaginationArea\" }, this.pagesArray.map((item, index) => {\n return (h(\"li\", { class: 'PaginationItem' + (item === this.currentPage ? ' ActiveItem' : ' ') + ' ' + (isMobile(this.userAgent) ? 'MobileButtons' : '') },\n h(\"button\", { disabled: item === this.currentPage ? true : false, onClick: this.paginationNavigation.bind(this, item, index) },\n h(\"span\", null, item))));\n }));\n /**\n * Left navigation area\n */\n let buttonSecondaryLeftSide = h(\"button\", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'firstPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('firstPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" }));\n let buttonsLeftSide = h(\"div\", { class: \"LeftItems\" },\n this.secondaryArrowsActive && buttonSecondaryLeftSide,\n h(\"button\", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'previousPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('previousPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" })));\n if (isMobile(this.userAgent)) {\n buttonsLeftSide =\n h(\"div\", { class: \"LeftItems\" },\n h(\"button\", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'previousPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('previousPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" })));\n }\n /**\n * Right navigation area\n */\n let buttonSecondaryRightSide = h(\"button\", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'lastPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('lastPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" }));\n let buttonsRightSide = h(\"div\", { class: \"RightItems\" },\n h(\"button\", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'nextPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('nextPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" })),\n this.secondaryArrowsActive && buttonSecondaryRightSide);\n if (isMobile(this.userAgent)) {\n buttonsRightSide =\n h(\"div\", { class: \"RightItems\" },\n h(\"button\", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'nextPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('nextPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" })));\n }\n return (h(\"div\", { id: \"PaginationContainer\", ref: el => this.stylingContainer = el },\n this.arrowsActive && buttonsLeftSide,\n this.numberedNavActive && navigationArea,\n this.arrowsActive && buttonsRightSide));\n }\n static get is() { return \"helper-pagination\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-pagination.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-pagination.css\"]\n }; }\n static get properties() { return {\n \"nextPage\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Next page string value - determines if the next page is disabled or active\"\n },\n \"attribute\": \"next-page\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"prevPage\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Previous page string value - determines if the previous page is disabled or active\"\n },\n \"attribute\": \"prev-page\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"offset\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The received offset\"\n },\n \"attribute\": \"offset\",\n \"reflect\": true,\n \"defaultValue\": \"0\"\n },\n \"limit\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The received limit for the number of pages\"\n },\n \"attribute\": \"limit\",\n \"reflect\": true,\n \"defaultValue\": \"1\"\n },\n \"total\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The received total number of pages\"\n },\n \"attribute\": \"total\",\n \"reflect\": true,\n \"defaultValue\": \"1\"\n },\n \"language\": {\n \"type\": \"string\",\n \"mutable\": true,\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\": true,\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\": true,\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 \"arrowsActive\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Customize pagination: Activate pagination arrows\"\n },\n \"attribute\": \"arrows-active\",\n \"reflect\": true\n },\n \"secondaryArrowsActive\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Customize pagination: Activate pagination secondary arrows\"\n },\n \"attribute\": \"secondary-arrows-active\",\n \"reflect\": true\n },\n \"numberedNavActive\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Customize pagination: Activate pagination numbered navigation\"\n },\n \"attribute\": \"numbered-nav-active\",\n \"reflect\": true\n }\n }; }\n static get states() { return {\n \"offsetInt\": {},\n \"lastPage\": {},\n \"previousPage\": {},\n \"limitInt\": {},\n \"totalInt\": {},\n \"pagesArray\": {},\n \"endInt\": {},\n \"limitStylingAppends\": {}\n }; }\n static get events() { return [{\n \"method\": \"hpPageChange\",\n \"name\": \"hpPageChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Event that handles the navigation, updating the offset, limit and total values\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }]; }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-game-page",
3
- "version": "1.42.0",
3
+ "version": "1.43.1",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1,2 +0,0 @@
1
- import{r as t,c as e,h as i}from"./p-e765c7d9.js";const s="en";const r=["ro","en","hr"];const o={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"},hr:{deleteTicket:"Izbriši listić"}};const n=(t,e)=>{const i=e;return o[i!==undefined&&r.includes(i)?i:s][t]};const a='@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}';const c=class{constructor(i){t(this,i);this.accordionEvent=e(this,"helperAccordionAction",7);this.ticketHistoryFlag=false;this.headerTitle="";this.headerSubtitle="";this.description="";this.footer=false;this.deleteTab=false;this.postMessage=false;this.eventName="helperAccordionAction";this.collapsed=true;this.language="en";this.clientStyling="";this.clientStylingUrlContent="";this.limitStylingAppends=false;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(){if(!this.limitStylingAppends&&this.stylingContainer){if(this.clientStyling)this.setClientStyling();if(this.clientStylingUrlContent)this.setClientStylingURL();this.limitStylingAppends=true}}toggleContent(){this.showContent=!this.showContent}deleteAction(){if(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:this.ticketHistoryFlag===true?"HeaderTicketHistory":"Header",onClick:()=>this.toggleContent()},i("p",{class:"Title"},this.headerTitle),i("p",{class:"Subtitle"},this.headerSubtitle),i("p",{class:"Subtitle Description"},this.description),i("span",{class:"Expand"},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()},n("deleteTicket",this.language))))))}};c.style=a;export{c as helper_accordion};
2
- //# sourceMappingURL=p-b19ff22c.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"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"],"names":["DEFAULT_LANGUAGE","SUPPORTED_LANGUAGES","TRANSLATIONS","en","deleteTicket","ro","fr","ar","hr","translate","key","customLang","lang","undefined","includes","helperAccordionCss","Accordion","[object Object]","hostRef","this","ticketHistoryFlag","headerTitle","headerSubtitle","description","footer","deleteTab","postMessage","eventName","collapsed","language","clientStyling","clientStylingUrlContent","limitStylingAppends","setClientStyling","sheet","document","createElement","innerHTML","stylingContainer","prepend","setClientStylingURL","cssFile","setTimeout","showContent","window","type","location","href","accordionEvent","emit","h","class","ref","el","onClick","toggleContent","name","deleteAction"],"mappings":"kDAAA,MAAMA,EAAmB,KACzB,MAAMC,EAAsB,CAAC,KAAM,KAAM,MACzC,MAAMC,EAAe,CACnBC,GAAI,CACFC,aAAc,iBAEhBC,GAAI,CACFD,aAAc,kBAEhBE,GAAI,CACFF,aAAc,uBAEhBG,GAAI,CACFH,aAAc,eAEhBI,GAAI,CACFJ,aAAc,mBAGX,MAAMK,EAAY,CAACC,EAAKC,KAC7B,MAAMC,EAAOD,EACb,OAAOT,EAAaU,IAASC,WAAaZ,EAAoBa,SAASF,GAAQA,EAAOZ,GAAkBU,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AO,YAAchC,KAAKG,gBACnC4B,EAAE,IAAK,CAAEC,MAAO,wBAA0BhC,KAAKI,aAC/C2B,EAAE,OAAQ,CAAEC,MAAO,UAAYhC,KAAKwB,YAAc,IAAM,MAC1DxB,KAAKwB,aACHO,EAAE,MAAO,KACPA,EAAE,MAAO,CAAEC,MAAO,WAChBD,EAAE,OAAQ,CAAEM,KAAM,qBAClBrC,KAAKK,QAAUL,KAAKwB,aAClBO,EAAE,MAAO,KAAM/B,KAAKM,WAClByB,EAAE,OAAQ,CAAEC,MAAO,eAAgBG,QAAS,IAAMnC,KAAKsC,gBAAkBhD,EAAU,eAAgBU,KAAKU","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"]}
@@ -1,2 +0,0 @@
1
- import{r as t,c as i,h as s}from"./p-e765c7d9.js";const e=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));const a="en";const o=["ro","en","hu","hr"];const n={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Következő",lastPage:"Last"},hr:{firstPage:"Prva",previousPage:"Prethodna",nextPage:"Slijedeća",lastPage:"Zadnja"}};const h=(t,i)=>{const s=i;return n[s!==undefined&&o.includes(s)?s:a][t]};const r='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:#009993;border-color:#009993}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}button{width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:#004D4A;border-color:#004D4A}button:disabled{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:14px}}@media screen and (max-width: 480px){button{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:#009993;border-color:#009993;color:#fff}}';const l=class{constructor(s){t(this,s);this.hpPageChange=i(this,"hpPageChange",7);this.nextPage="";this.prevPage="";this.offset=0;this.limit=1;this.total=1;this.language="en";this.clientStyling="";this.clientStylingUrlContent="";this.lastPage=false;this.previousPage=false;this.pagesArray=[];this.endInt=0;this.userAgent=window.navigator.userAgent;this.currentPage=1;this.limitStylingAppends=false;this.navigateTo=t=>{switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt;break;case"nextPage":this.offsetInt+=this.limitInt;break;case"fivePagesBack":this.offsetInt-=this.limitInt*5;this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=this.limitInt*5;this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt;break}this.previousPage=!this.offsetInt?false:true;this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})};this.paginationNavigation=(t,i)=>{this.previousPage=true;if(!isNaN(t)){if(t===1){this.offsetInt=t-1;this.previousPage=false}else{this.offsetInt=(t-1)*this.limitInt}}else{if(i===0&&this.currentPage<=4){this.navigateTo("firstPage")}else if(i===0&&this.currentPage>4){this.navigateTo("fivePagesBack")}else if(i===4&&this.endInt-this.currentPage>=2){this.navigateTo("fivePagesForward")}}this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})};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)}}componentWillRender(){this.offsetInt=this.offset;this.limitInt=this.limit;this.currentPage=this.offsetInt/this.limitInt+1;this.limitInt=this.limit;this.totalInt=this.total;this.endInt=Math.ceil(this.totalInt/this.limitInt)-1;this.lastPage=this.offsetInt>=this.endInt*this.limitInt?false:true;if(this.currentPage==1||this.currentPage==2){this.pagesArray=Array.from({length:4},((t,i)=>i+1));this.pagesArray.push("...")}else if(this.currentPage>=3&&this.endInt-this.currentPage>=2){this.pagesArray=Array.from({length:3},((t,i)=>this.currentPage+i-1));this.pagesArray.push("...");this.pagesArray.unshift("...")}else if(this.endInt-this.currentPage<3){this.pagesArray=Array.from({length:4},((t,i)=>this.endInt-2+i));this.pagesArray.unshift("...")}}componentDidRender(){if(!this.limitStylingAppends&&this.stylingContainer){if(this.clientStyling)this.setClientStyling();if(this.clientStylingUrlContent)this.setClientStylingURL();this.limitStylingAppends=true}}render(){let t=s("ul",{class:"PaginationArea"},this.pagesArray.map(((t,i)=>s("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(e(this.userAgent)?"MobileButtons":"")},s("button",{disabled:t===this.currentPage?true:false,onClick:this.paginationNavigation.bind(this,t,i)},s("span",null,t))))));let i=s("button",{disabled:this.prevPage?false:true,onClick:this.navigateTo.bind(this,"firstPage")},s("span",{class:"NavigationButton"},h("firstPage",this.language)),s("span",{class:"NavigationIcon"}));let a=s("div",{class:"LeftItems"},this.secondaryArrowsActive&&i,s("button",{disabled:this.prevPage?false:true,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},h("previousPage",this.language)),s("span",{class:"NavigationIcon"})));if(e(this.userAgent)){a=s("div",{class:"LeftItems"},s("button",{disabled:this.prevPage?false:true,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},h("previousPage",this.language)),s("span",{class:"NavigationIcon"})))}let o=s("button",{disabled:this.nextPage?false:true,onClick:this.navigateTo.bind(this,"lastPage")},s("span",{class:"NavigationButton"},h("lastPage",this.language)),s("span",{class:"NavigationIcon"}));let n=s("div",{class:"RightItems"},s("button",{disabled:this.nextPage?false:true,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},h("nextPage",this.language)),s("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&o);if(e(this.userAgent)){n=s("div",{class:"RightItems"},s("button",{disabled:this.nextPage?false:true,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},h("nextPage",this.language)),s("span",{class:"NavigationIcon"})))}return s("div",{id:"PaginationContainer",ref:t=>this.stylingContainer=t},this.arrowsActive&&a,this.numberedNavActive&&t,this.arrowsActive&&n)}};l.style=r;export{l as helper_pagination};
2
- //# sourceMappingURL=p-cba19473.entry.js.map