@everymatrix/helper-filters 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/helper-filters.cjs.js +2 -2
- package/dist/cjs/{helper-filters.cjs.entry.js → helper-filters_2.cjs.entry.js} +55 -28
- package/dist/cjs/{index-0c5bb1ff.js → index-979fa60b.js} +15 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +8 -1
- package/dist/collection/components/helper-filters/helper-filters.css +0 -5
- package/dist/collection/components/helper-filters/helper-filters.js +13 -41
- package/dist/collection/utils/locale.utils.js +2 -4
- package/dist/components/helper-filters.js +23 -28
- package/dist/components/helper-modal.js +6 -0
- package/dist/components/helper-modal2.js +58 -0
- package/dist/esm/helper-filters.js +2 -2
- package/dist/esm/{helper-filters.entry.js → helper-filters_2.entry.js} +55 -29
- package/dist/esm/{index-f5eea413.js → index-af82b143.js} +15 -5
- package/dist/esm/loader.js +2 -2
- package/dist/helper-filters/helper-filters.esm.js +1 -1
- package/dist/helper-filters/{p-011c5248.entry.js → p-3d3f7fda.entry.js} +51 -51
- package/dist/helper-filters/p-55654a54.js +1 -0
- package/dist/types/components/helper-filters/helper-filters.d.ts +1 -3
- package/dist/types/components.d.ts +0 -1
- package/package.json +1 -4
- package/dist/helper-filters/p-645ae858.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-979fa60b.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["helper-
|
|
18
|
+
return index.bootstrapLazy([["helper-filters_2.cjs",[[1,"helper-filters",{"showFilterId":[4,"show-filter-id"],"activateTicketSearch":[4,"activate-ticket-search"],"gameId":[1,"game-id"],"playerId":[1,"player-id"],"session":[1],"postMessage":[4,"post-message"],"language":[1],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]],[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540]}]]]], options);
|
|
19
19
|
});
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
require('@everymatrix/helper-modal');
|
|
5
|
+
const index = require('./index-979fa60b.js');
|
|
7
6
|
|
|
8
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
9
8
|
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
@@ -18,8 +17,7 @@ const TRANSLATIONS = {
|
|
|
18
17
|
filterDateRangePlaceholder: 'Date Range',
|
|
19
18
|
filterModalButton: 'Search',
|
|
20
19
|
filterFromCalendar: 'From',
|
|
21
|
-
filterToCalendar: 'To'
|
|
22
|
-
filterOrDate: 'or search by date'
|
|
20
|
+
filterToCalendar: 'To'
|
|
23
21
|
},
|
|
24
22
|
ro: {
|
|
25
23
|
filterOpen: 'Filtrare',
|
|
@@ -29,8 +27,7 @@ const TRANSLATIONS = {
|
|
|
29
27
|
filterTicketPlaceholder: 'Cauta ID bilet',
|
|
30
28
|
filterDrawPlaceholder: 'Cauta ID draw',
|
|
31
29
|
filterDateRangePlaceholder: 'Perioada',
|
|
32
|
-
filterModalButton: 'Cauta'
|
|
33
|
-
filterOrDate: 'sau cauta dupa data'
|
|
30
|
+
filterModalButton: 'Cauta'
|
|
34
31
|
},
|
|
35
32
|
};
|
|
36
33
|
const translate$1 = (key, customLang) => {
|
|
@@ -22230,12 +22227,11 @@ class DatePicker extends DatePickerMixin(InputControlMixin(ThemableMixin(Element
|
|
|
22230
22227
|
|
|
22231
22228
|
customElements.define(DatePicker.is, DatePicker);
|
|
22232
22229
|
|
|
22233
|
-
const helperFiltersCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:#00958f;color:#FFF}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:#00958f;color:#FFF}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:#009993;text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:4px;background:#e8ebef;color:#263445;width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:#009993}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:#00958f;color:#FFF}
|
|
22230
|
+
const helperFiltersCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:#00958f;color:#FFF}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:#00958f;color:#FFF}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:#009993;text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:4px;background:#e8ebef;color:#263445;width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:#009993}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:#00958f;color:#FFF}";
|
|
22234
22231
|
|
|
22235
22232
|
const HelperFilters = class {
|
|
22236
22233
|
constructor(hostRef) {
|
|
22237
22234
|
index.registerInstance(this, hostRef);
|
|
22238
|
-
this.filterDraw = index.createEvent(this, "filterDraw", 7);
|
|
22239
22235
|
this.filterSelection = index.createEvent(this, "filterSelection", 7);
|
|
22240
22236
|
this.filterSelectionReset = index.createEvent(this, "filterSelectionReset", 7);
|
|
22241
22237
|
/**
|
|
@@ -22269,29 +22265,23 @@ const HelperFilters = class {
|
|
|
22269
22265
|
this.showFilterModal = false;
|
|
22270
22266
|
this.showClearButton = false;
|
|
22271
22267
|
this.filterData = {};
|
|
22272
|
-
this.filterDataReset = {
|
|
22273
|
-
}
|
|
22274
|
-
// reset field values each time the filter modal opens
|
|
22275
|
-
componentDidRender() {
|
|
22276
|
-
this.filterData.ticketDrawId = null;
|
|
22277
|
-
this.filterData.filterFromCalendar = null;
|
|
22278
|
-
this.filterData.filterToCalendar = null;
|
|
22279
|
-
// @TODO: to way binding?
|
|
22280
|
-
if (document.getElementById('#FilterById'))
|
|
22281
|
-
document.getElementById('#FilterById').value = '';
|
|
22268
|
+
this.filterDataReset = { drawTicketId: '', filterFromCalendar: '', filterToCalendar: '' };
|
|
22282
22269
|
}
|
|
22283
22270
|
filterSelectionHandler(event) {
|
|
22284
|
-
if (this.postMessage)
|
|
22271
|
+
if (this.postMessage) {
|
|
22285
22272
|
window.postMessage({ type: 'filterSelection', event }, window.location.href);
|
|
22286
|
-
|
|
22287
|
-
|
|
22288
|
-
if (this.filterData.filterFromCalendar || this.filterData.filterToCalendar)
|
|
22273
|
+
}
|
|
22274
|
+
else {
|
|
22289
22275
|
this.filterSelection.emit(event);
|
|
22276
|
+
}
|
|
22290
22277
|
}
|
|
22291
22278
|
filterSelectionResetHandler(event) {
|
|
22292
|
-
if (this.postMessage)
|
|
22279
|
+
if (this.postMessage) {
|
|
22293
22280
|
window.postMessage({ type: 'filterSelectionReset', event }, window.location.href);
|
|
22294
|
-
|
|
22281
|
+
}
|
|
22282
|
+
else {
|
|
22283
|
+
this.filterSelectionReset.emit(event);
|
|
22284
|
+
}
|
|
22295
22285
|
}
|
|
22296
22286
|
modalCloseEvent() {
|
|
22297
22287
|
this.showFilterModal = false;
|
|
@@ -22309,10 +22299,9 @@ const HelperFilters = class {
|
|
|
22309
22299
|
resetSearch() {
|
|
22310
22300
|
this.showClearButton = false;
|
|
22311
22301
|
this.filterSelectionResetHandler(this.filterDataReset);
|
|
22312
|
-
this.filterData = {};
|
|
22313
22302
|
}
|
|
22314
|
-
|
|
22315
|
-
this.filterData.
|
|
22303
|
+
handleDrawTicketId(event) {
|
|
22304
|
+
this.filterData.drawTicketId = event.target.value;
|
|
22316
22305
|
}
|
|
22317
22306
|
handleFilterFrom(event) {
|
|
22318
22307
|
this.filterData.filterFromCalendar = new Date(event.target.value).toISOString();
|
|
@@ -22321,9 +22310,47 @@ const HelperFilters = class {
|
|
|
22321
22310
|
this.filterData.filterToCalendar = new Date(event.target.value).toISOString();
|
|
22322
22311
|
}
|
|
22323
22312
|
render() {
|
|
22324
|
-
return (index.h("div", { class: "HelperFilters" }, index.h("div", { class: "FilterButtonsWrapper" }, index.h("button", { class: "FilterOpen", onClick: () => this.toggleFilterModal() }, translate$1('filterOpen', this.language)), this.showClearButton ? index.h("button", { class: "FilterClear", onClick: () => this.resetSearch() }, translate$1('filterClear', this.language)) : null), index.h("helper-modal", { "title-modal": "Filter Modal", visible: this.showFilterModal }, index.h("div", { class: "FilterModalHeader" }, index.h("h3", { class: "FilterModalTitle" }, this.activateTicketSearch ? translate$1('filterModalTicketTitle', this.language) : translate$1('filterModalDrawTitle', this.language))), index.h("div", { class: "FilterModalBody" }, index.h("input", {
|
|
22313
|
+
return (index.h("div", { class: "HelperFilters" }, index.h("div", { class: "FilterButtonsWrapper" }, index.h("button", { class: "FilterOpen", onClick: () => this.toggleFilterModal() }, translate$1('filterOpen', this.language)), this.showClearButton ? index.h("button", { class: "FilterClear", onClick: () => this.resetSearch() }, translate$1('filterClear', this.language)) : null), index.h("helper-modal", { "title-modal": "Filter Modal", visible: this.showFilterModal }, index.h("div", { class: "FilterModalHeader" }, index.h("h3", { class: "FilterModalTitle" }, this.activateTicketSearch ? translate$1('filterModalTicketTitle', this.language) : translate$1('filterModalDrawTitle', this.language))), index.h("div", { class: "FilterModalBody" }, index.h("input", { type: "text", value: this.filterData.drawTicketId, onInput: (event) => this.handleDrawTicketId(event), class: "FilterModalSearch", placeholder: this.activateTicketSearch ? translate$1('filterTicketPlaceholder', this.language) : translate$1('filterDrawPlaceholder', this.language) }), index.h("div", { class: "FilterCalendarWrapper" }, index.h("vaadin-date-picker", { value: this.filterData.filterFromCalendar, onChange: (event) => this.handleFilterFrom(event), placeholder: translate$1('filterFromCalendar', this.language), class: "VaadinDatePicker" }), index.h("vaadin-date-picker", { value: this.filterData.filterToCalendar, onChange: (event) => this.handleFilterTo(event), placeholder: translate$1('filterToCalendar', this.language), class: "VaadinDatePicker" }))), index.h("div", { class: "FilterModalFooter" }, index.h("button", { class: "FilterModalButton", onClick: () => this.filterSearch() }, translate$1('filterModalButton', this.language))))));
|
|
22325
22314
|
}
|
|
22326
22315
|
};
|
|
22327
22316
|
HelperFilters.style = helperFiltersCss;
|
|
22328
22317
|
|
|
22318
|
+
/**
|
|
22319
|
+
* @name isMobile
|
|
22320
|
+
* @description A method that returns if the browser used to access the app is from a mobile device or not
|
|
22321
|
+
* @param {String} userAgent window.navigator.userAgent
|
|
22322
|
+
* @returns {Boolean} true or false
|
|
22323
|
+
*/
|
|
22324
|
+
const isMobile = (userAgent) => {
|
|
22325
|
+
return !!(userAgent.toLowerCase().match(/android/i) ||
|
|
22326
|
+
userAgent.toLowerCase().match(/blackberry|bb/i) ||
|
|
22327
|
+
userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
|
|
22328
|
+
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
22329
|
+
};
|
|
22330
|
+
|
|
22331
|
+
const helperModalCss = ":host{display:block}.HelperModalWrapper{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);opacity:0;visibility:hidden;transform:scale(1.1);transition:visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;z-index:1}.HelperModalVisible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.HelperModalContent{position:relative;border:solid 1px #848e97;box-shadow:2px 2px 2px rgba(0, 0, 0, 0.007);font-size:14px;padding:10px 10px 5px 10px;background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:600px;max-height:600px;overflow-y:scroll}.HelperModalMobileContent{background:#FFF;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:80%;max-height:350px}.HelperModalClose{cursor:pointer;position:absolute;top:15px;right:15px;font-size:20px;color:#000}.HelperModalMobileClose{position:absolute;top:15px;right:15px;font-size:20px;color:#000}";
|
|
22332
|
+
|
|
22333
|
+
const HelperModal = class {
|
|
22334
|
+
constructor(hostRef) {
|
|
22335
|
+
index.registerInstance(this, hostRef);
|
|
22336
|
+
this.cancel = index.createEvent(this, "modalCloseEvent", 7);
|
|
22337
|
+
/**
|
|
22338
|
+
* Toggles if the helper is visible or not
|
|
22339
|
+
*/
|
|
22340
|
+
this.visible = true;
|
|
22341
|
+
this.userAgent = window.navigator.userAgent;
|
|
22342
|
+
}
|
|
22343
|
+
handleHelperModalClose() {
|
|
22344
|
+
this.visible = false;
|
|
22345
|
+
this.cancel.emit();
|
|
22346
|
+
}
|
|
22347
|
+
;
|
|
22348
|
+
render() {
|
|
22349
|
+
return ((this.visible &&
|
|
22350
|
+
index.h("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper" }, index.h("div", { class: "HelperModalWrapper HelperModalVisible" }, index.h("div", { class: "HelperModalContent" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') }, index.h("span", { class: "HelperModalClose" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, "X"), index.h("slot", null))))));
|
|
22351
|
+
}
|
|
22352
|
+
};
|
|
22353
|
+
HelperModal.style = helperModalCss;
|
|
22354
|
+
|
|
22329
22355
|
exports.helper_filters = HelperFilters;
|
|
22356
|
+
exports.helper_modal = HelperModal;
|
|
@@ -502,11 +502,14 @@ const patch = (oldVNode, newVNode) => {
|
|
|
502
502
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
503
503
|
const oldChildren = oldVNode.$children$;
|
|
504
504
|
const newChildren = newVNode.$children$;
|
|
505
|
+
const tag = newVNode.$tag$;
|
|
505
506
|
const text = newVNode.$text$;
|
|
506
507
|
if (text === null) {
|
|
507
508
|
// element node
|
|
508
509
|
{
|
|
509
|
-
|
|
510
|
+
if (tag === 'slot')
|
|
511
|
+
;
|
|
512
|
+
else {
|
|
510
513
|
// either this is the first render of an element OR it's an update
|
|
511
514
|
// AND we already know it's possible it could have changed
|
|
512
515
|
// this updates the element's css classes, attrs, props, listeners, etc.
|
|
@@ -539,9 +542,14 @@ const patch = (oldVNode, newVNode) => {
|
|
|
539
542
|
};
|
|
540
543
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
541
544
|
const hostElm = hostRef.$hostElement$;
|
|
545
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
542
546
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
543
547
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
544
548
|
hostTagName = hostElm.tagName;
|
|
549
|
+
if (cmpMeta.$attrsToReflect$) {
|
|
550
|
+
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
551
|
+
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
552
|
+
}
|
|
545
553
|
rootVnode.$tag$ = null;
|
|
546
554
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
547
555
|
hostRef.$vnode$ = rootVnode;
|
|
@@ -678,11 +686,7 @@ const postUpdateComponent = (hostRef) => {
|
|
|
678
686
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
679
687
|
const elm = hostRef.$hostElement$;
|
|
680
688
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
681
|
-
const instance = hostRef.$lazyInstance$ ;
|
|
682
689
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
683
|
-
{
|
|
684
|
-
safeCall(instance, 'componentDidRender');
|
|
685
|
-
}
|
|
686
690
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
687
691
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
688
692
|
{
|
|
@@ -892,6 +896,9 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
892
896
|
.map(([propName, m]) => {
|
|
893
897
|
const attrName = m[1] || propName;
|
|
894
898
|
attrNameToPropName.set(attrName, propName);
|
|
899
|
+
if (m[0] & 512 /* ReflectAttr */) {
|
|
900
|
+
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
901
|
+
}
|
|
895
902
|
return attrName;
|
|
896
903
|
});
|
|
897
904
|
}
|
|
@@ -1052,6 +1059,9 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1052
1059
|
{
|
|
1053
1060
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
1054
1061
|
}
|
|
1062
|
+
{
|
|
1063
|
+
cmpMeta.$attrsToReflect$ = [];
|
|
1064
|
+
}
|
|
1055
1065
|
const tagName = cmpMeta.$tagName$;
|
|
1056
1066
|
const HostElement = class extends HTMLElement {
|
|
1057
1067
|
// StencilLazyHost
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-979fa60b.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["helper-
|
|
17
|
+
return index.bootstrapLazy([["helper-filters_2.cjs",[[1,"helper-filters",{"showFilterId":[4,"show-filter-id"],"activateTicketSearch":[4,"activate-ticket-search"],"gameId":[1,"game-id"],"playerId":[1,"player-id"],"session":[1],"postMessage":[4,"post-message"],"language":[1],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]],[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -35,30 +35,23 @@ export class HelperFilters {
|
|
|
35
35
|
this.showFilterModal = false;
|
|
36
36
|
this.showClearButton = false;
|
|
37
37
|
this.filterData = {};
|
|
38
|
-
this.filterDataReset = {
|
|
39
|
-
}
|
|
40
|
-
// reset field values each time the filter modal opens
|
|
41
|
-
componentDidRender() {
|
|
42
|
-
this.filterData.ticketDrawId = null;
|
|
43
|
-
this.filterData.filterFromCalendar = null;
|
|
44
|
-
this.filterData.filterToCalendar = null;
|
|
45
|
-
// @TODO: to way binding?
|
|
46
|
-
if (document.getElementById('#FilterById'))
|
|
47
|
-
document.getElementById('#FilterById').value = '';
|
|
38
|
+
this.filterDataReset = { drawTicketId: '', filterFromCalendar: '', filterToCalendar: '' };
|
|
48
39
|
}
|
|
49
40
|
filterSelectionHandler(event) {
|
|
50
|
-
if (this.postMessage)
|
|
41
|
+
if (this.postMessage) {
|
|
51
42
|
window.postMessage({ type: 'filterSelection', event }, window.location.href);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (this.filterData.filterFromCalendar || this.filterData.filterToCalendar)
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
55
45
|
this.filterSelection.emit(event);
|
|
56
|
-
|
|
46
|
+
}
|
|
57
47
|
}
|
|
58
48
|
filterSelectionResetHandler(event) {
|
|
59
|
-
if (this.postMessage)
|
|
49
|
+
if (this.postMessage) {
|
|
60
50
|
window.postMessage({ type: 'filterSelectionReset', event }, window.location.href);
|
|
61
|
-
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
this.filterSelectionReset.emit(event);
|
|
54
|
+
}
|
|
62
55
|
}
|
|
63
56
|
modalCloseEvent() {
|
|
64
57
|
this.showFilterModal = false;
|
|
@@ -76,10 +69,9 @@ export class HelperFilters {
|
|
|
76
69
|
resetSearch() {
|
|
77
70
|
this.showClearButton = false;
|
|
78
71
|
this.filterSelectionResetHandler(this.filterDataReset);
|
|
79
|
-
this.filterData = {};
|
|
80
72
|
}
|
|
81
|
-
|
|
82
|
-
this.filterData.
|
|
73
|
+
handleDrawTicketId(event) {
|
|
74
|
+
this.filterData.drawTicketId = event.target.value;
|
|
83
75
|
}
|
|
84
76
|
handleFilterFrom(event) {
|
|
85
77
|
this.filterData.filterFromCalendar = new Date(event.target.value).toISOString();
|
|
@@ -96,8 +88,7 @@ export class HelperFilters {
|
|
|
96
88
|
h("div", { class: "FilterModalHeader" },
|
|
97
89
|
h("h3", { class: "FilterModalTitle" }, this.activateTicketSearch ? translate('filterModalTicketTitle', this.language) : translate('filterModalDrawTitle', this.language))),
|
|
98
90
|
h("div", { class: "FilterModalBody" },
|
|
99
|
-
h("input", {
|
|
100
|
-
h("p", null, translate('filterOrDate', this.language)),
|
|
91
|
+
h("input", { type: "text", value: this.filterData.drawTicketId, onInput: (event) => this.handleDrawTicketId(event), class: "FilterModalSearch", placeholder: this.activateTicketSearch ? translate('filterTicketPlaceholder', this.language) : translate('filterDrawPlaceholder', this.language) }),
|
|
101
92
|
h("div", { class: "FilterCalendarWrapper" },
|
|
102
93
|
h("vaadin-date-picker", { value: this.filterData.filterFromCalendar, onChange: (event) => this.handleFilterFrom(event), placeholder: translate('filterFromCalendar', this.language), class: "VaadinDatePicker" }),
|
|
103
94
|
h("vaadin-date-picker", { value: this.filterData.filterToCalendar, onChange: (event) => this.handleFilterTo(event), placeholder: translate('filterToCalendar', this.language), class: "VaadinDatePicker" }))),
|
|
@@ -247,25 +238,6 @@ export class HelperFilters {
|
|
|
247
238
|
"filterDataReset": {}
|
|
248
239
|
}; }
|
|
249
240
|
static get events() { return [{
|
|
250
|
-
"method": "filterDraw",
|
|
251
|
-
"name": "filterDraw",
|
|
252
|
-
"bubbles": true,
|
|
253
|
-
"cancelable": true,
|
|
254
|
-
"composed": true,
|
|
255
|
-
"docs": {
|
|
256
|
-
"tags": [],
|
|
257
|
-
"text": ""
|
|
258
|
-
},
|
|
259
|
-
"complexType": {
|
|
260
|
-
"original": "HelperFilters",
|
|
261
|
-
"resolved": "HelperFilters",
|
|
262
|
-
"references": {
|
|
263
|
-
"HelperFilters": {
|
|
264
|
-
"location": "global"
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
}, {
|
|
269
241
|
"method": "filterSelection",
|
|
270
242
|
"name": "filterSelection",
|
|
271
243
|
"bubbles": true,
|
|
@@ -11,8 +11,7 @@ const TRANSLATIONS = {
|
|
|
11
11
|
filterDateRangePlaceholder: 'Date Range',
|
|
12
12
|
filterModalButton: 'Search',
|
|
13
13
|
filterFromCalendar: 'From',
|
|
14
|
-
filterToCalendar: 'To'
|
|
15
|
-
filterOrDate: 'or search by date'
|
|
14
|
+
filterToCalendar: 'To'
|
|
16
15
|
},
|
|
17
16
|
ro: {
|
|
18
17
|
filterOpen: 'Filtrare',
|
|
@@ -22,8 +21,7 @@ const TRANSLATIONS = {
|
|
|
22
21
|
filterTicketPlaceholder: 'Cauta ID bilet',
|
|
23
22
|
filterDrawPlaceholder: 'Cauta ID draw',
|
|
24
23
|
filterDateRangePlaceholder: 'Perioada',
|
|
25
|
-
filterModalButton: 'Cauta'
|
|
26
|
-
filterOrDate: 'sau cauta dupa data'
|
|
24
|
+
filterModalButton: 'Cauta'
|
|
27
25
|
},
|
|
28
26
|
};
|
|
29
27
|
export const translate = (key, customLang) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement as HTMLElement$1, createEvent, h as h$2 } from '@stencil/core/internal/client';
|
|
2
|
-
import '
|
|
2
|
+
import { d as defineCustomElement$2 } from './helper-modal2.js';
|
|
3
3
|
|
|
4
4
|
const DEFAULT_LANGUAGE = 'en';
|
|
5
5
|
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
@@ -14,8 +14,7 @@ const TRANSLATIONS = {
|
|
|
14
14
|
filterDateRangePlaceholder: 'Date Range',
|
|
15
15
|
filterModalButton: 'Search',
|
|
16
16
|
filterFromCalendar: 'From',
|
|
17
|
-
filterToCalendar: 'To'
|
|
18
|
-
filterOrDate: 'or search by date'
|
|
17
|
+
filterToCalendar: 'To'
|
|
19
18
|
},
|
|
20
19
|
ro: {
|
|
21
20
|
filterOpen: 'Filtrare',
|
|
@@ -25,8 +24,7 @@ const TRANSLATIONS = {
|
|
|
25
24
|
filterTicketPlaceholder: 'Cauta ID bilet',
|
|
26
25
|
filterDrawPlaceholder: 'Cauta ID draw',
|
|
27
26
|
filterDateRangePlaceholder: 'Perioada',
|
|
28
|
-
filterModalButton: 'Cauta'
|
|
29
|
-
filterOrDate: 'sau cauta dupa data'
|
|
27
|
+
filterModalButton: 'Cauta'
|
|
30
28
|
},
|
|
31
29
|
};
|
|
32
30
|
const translate$1 = (key, customLang) => {
|
|
@@ -22226,14 +22224,13 @@ class DatePicker extends DatePickerMixin(InputControlMixin(ThemableMixin(Element
|
|
|
22226
22224
|
|
|
22227
22225
|
customElements.define(DatePicker.is, DatePicker);
|
|
22228
22226
|
|
|
22229
|
-
const helperFiltersCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:#00958f;color:#FFF}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:#00958f;color:#FFF}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:#009993;text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:4px;background:#e8ebef;color:#263445;width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:#009993}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:#00958f;color:#FFF}
|
|
22227
|
+
const helperFiltersCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:#00958f;color:#FFF}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:#00958f;color:#FFF}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:#009993;text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:4px;background:#e8ebef;color:#263445;width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:#009993}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:#00958f;color:#FFF}";
|
|
22230
22228
|
|
|
22231
22229
|
const HelperFilters$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
22232
22230
|
constructor() {
|
|
22233
22231
|
super();
|
|
22234
22232
|
this.__registerHost();
|
|
22235
22233
|
this.__attachShadow();
|
|
22236
|
-
this.filterDraw = createEvent(this, "filterDraw", 7);
|
|
22237
22234
|
this.filterSelection = createEvent(this, "filterSelection", 7);
|
|
22238
22235
|
this.filterSelectionReset = createEvent(this, "filterSelectionReset", 7);
|
|
22239
22236
|
/**
|
|
@@ -22267,29 +22264,23 @@ const HelperFilters$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
22267
22264
|
this.showFilterModal = false;
|
|
22268
22265
|
this.showClearButton = false;
|
|
22269
22266
|
this.filterData = {};
|
|
22270
|
-
this.filterDataReset = {
|
|
22271
|
-
}
|
|
22272
|
-
// reset field values each time the filter modal opens
|
|
22273
|
-
componentDidRender() {
|
|
22274
|
-
this.filterData.ticketDrawId = null;
|
|
22275
|
-
this.filterData.filterFromCalendar = null;
|
|
22276
|
-
this.filterData.filterToCalendar = null;
|
|
22277
|
-
// @TODO: to way binding?
|
|
22278
|
-
if (document.getElementById('#FilterById'))
|
|
22279
|
-
document.getElementById('#FilterById').value = '';
|
|
22267
|
+
this.filterDataReset = { drawTicketId: '', filterFromCalendar: '', filterToCalendar: '' };
|
|
22280
22268
|
}
|
|
22281
22269
|
filterSelectionHandler(event) {
|
|
22282
|
-
if (this.postMessage)
|
|
22270
|
+
if (this.postMessage) {
|
|
22283
22271
|
window.postMessage({ type: 'filterSelection', event }, window.location.href);
|
|
22284
|
-
|
|
22285
|
-
|
|
22286
|
-
if (this.filterData.filterFromCalendar || this.filterData.filterToCalendar)
|
|
22272
|
+
}
|
|
22273
|
+
else {
|
|
22287
22274
|
this.filterSelection.emit(event);
|
|
22275
|
+
}
|
|
22288
22276
|
}
|
|
22289
22277
|
filterSelectionResetHandler(event) {
|
|
22290
|
-
if (this.postMessage)
|
|
22278
|
+
if (this.postMessage) {
|
|
22291
22279
|
window.postMessage({ type: 'filterSelectionReset', event }, window.location.href);
|
|
22292
|
-
|
|
22280
|
+
}
|
|
22281
|
+
else {
|
|
22282
|
+
this.filterSelectionReset.emit(event);
|
|
22283
|
+
}
|
|
22293
22284
|
}
|
|
22294
22285
|
modalCloseEvent() {
|
|
22295
22286
|
this.showFilterModal = false;
|
|
@@ -22307,10 +22298,9 @@ const HelperFilters$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
22307
22298
|
resetSearch() {
|
|
22308
22299
|
this.showClearButton = false;
|
|
22309
22300
|
this.filterSelectionResetHandler(this.filterDataReset);
|
|
22310
|
-
this.filterData = {};
|
|
22311
22301
|
}
|
|
22312
|
-
|
|
22313
|
-
this.filterData.
|
|
22302
|
+
handleDrawTicketId(event) {
|
|
22303
|
+
this.filterData.drawTicketId = event.target.value;
|
|
22314
22304
|
}
|
|
22315
22305
|
handleFilterFrom(event) {
|
|
22316
22306
|
this.filterData.filterFromCalendar = new Date(event.target.value).toISOString();
|
|
@@ -22319,7 +22309,7 @@ const HelperFilters$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
22319
22309
|
this.filterData.filterToCalendar = new Date(event.target.value).toISOString();
|
|
22320
22310
|
}
|
|
22321
22311
|
render() {
|
|
22322
|
-
return (h$2("div", { class: "HelperFilters" }, h$2("div", { class: "FilterButtonsWrapper" }, h$2("button", { class: "FilterOpen", onClick: () => this.toggleFilterModal() }, translate$1('filterOpen', this.language)), this.showClearButton ? h$2("button", { class: "FilterClear", onClick: () => this.resetSearch() }, translate$1('filterClear', this.language)) : null), h$2("helper-modal", { "title-modal": "Filter Modal", visible: this.showFilterModal }, h$2("div", { class: "FilterModalHeader" }, h$2("h3", { class: "FilterModalTitle" }, this.activateTicketSearch ? translate$1('filterModalTicketTitle', this.language) : translate$1('filterModalDrawTitle', this.language))), h$2("div", { class: "FilterModalBody" }, h$2("input", {
|
|
22312
|
+
return (h$2("div", { class: "HelperFilters" }, h$2("div", { class: "FilterButtonsWrapper" }, h$2("button", { class: "FilterOpen", onClick: () => this.toggleFilterModal() }, translate$1('filterOpen', this.language)), this.showClearButton ? h$2("button", { class: "FilterClear", onClick: () => this.resetSearch() }, translate$1('filterClear', this.language)) : null), h$2("helper-modal", { "title-modal": "Filter Modal", visible: this.showFilterModal }, h$2("div", { class: "FilterModalHeader" }, h$2("h3", { class: "FilterModalTitle" }, this.activateTicketSearch ? translate$1('filterModalTicketTitle', this.language) : translate$1('filterModalDrawTitle', this.language))), h$2("div", { class: "FilterModalBody" }, h$2("input", { type: "text", value: this.filterData.drawTicketId, onInput: (event) => this.handleDrawTicketId(event), class: "FilterModalSearch", placeholder: this.activateTicketSearch ? translate$1('filterTicketPlaceholder', this.language) : translate$1('filterDrawPlaceholder', this.language) }), h$2("div", { class: "FilterCalendarWrapper" }, h$2("vaadin-date-picker", { value: this.filterData.filterFromCalendar, onChange: (event) => this.handleFilterFrom(event), placeholder: translate$1('filterFromCalendar', this.language), class: "VaadinDatePicker" }), h$2("vaadin-date-picker", { value: this.filterData.filterToCalendar, onChange: (event) => this.handleFilterTo(event), placeholder: translate$1('filterToCalendar', this.language), class: "VaadinDatePicker" }))), h$2("div", { class: "FilterModalFooter" }, h$2("button", { class: "FilterModalButton", onClick: () => this.filterSearch() }, translate$1('filterModalButton', this.language))))));
|
|
22323
22313
|
}
|
|
22324
22314
|
static get style() { return helperFiltersCss; }
|
|
22325
22315
|
}, [1, "helper-filters", {
|
|
@@ -22339,13 +22329,18 @@ function defineCustomElement$1() {
|
|
|
22339
22329
|
if (typeof customElements === "undefined") {
|
|
22340
22330
|
return;
|
|
22341
22331
|
}
|
|
22342
|
-
const components = ["helper-filters"];
|
|
22332
|
+
const components = ["helper-filters", "helper-modal"];
|
|
22343
22333
|
components.forEach(tagName => { switch (tagName) {
|
|
22344
22334
|
case "helper-filters":
|
|
22345
22335
|
if (!customElements.get(tagName)) {
|
|
22346
22336
|
customElements.define(tagName, HelperFilters$1);
|
|
22347
22337
|
}
|
|
22348
22338
|
break;
|
|
22339
|
+
case "helper-modal":
|
|
22340
|
+
if (!customElements.get(tagName)) {
|
|
22341
|
+
defineCustomElement$2();
|
|
22342
|
+
}
|
|
22343
|
+
break;
|
|
22349
22344
|
} });
|
|
22350
22345
|
}
|
|
22351
22346
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name isMobile
|
|
5
|
+
* @description A method that returns if the browser used to access the app is from a mobile device or not
|
|
6
|
+
* @param {String} userAgent window.navigator.userAgent
|
|
7
|
+
* @returns {Boolean} true or false
|
|
8
|
+
*/
|
|
9
|
+
const isMobile = (userAgent) => {
|
|
10
|
+
return !!(userAgent.toLowerCase().match(/android/i) ||
|
|
11
|
+
userAgent.toLowerCase().match(/blackberry|bb/i) ||
|
|
12
|
+
userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
|
|
13
|
+
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const helperModalCss = ":host{display:block}.HelperModalWrapper{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);opacity:0;visibility:hidden;transform:scale(1.1);transition:visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;z-index:1}.HelperModalVisible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.HelperModalContent{position:relative;border:solid 1px #848e97;box-shadow:2px 2px 2px rgba(0, 0, 0, 0.007);font-size:14px;padding:10px 10px 5px 10px;background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:600px;max-height:600px;overflow-y:scroll}.HelperModalMobileContent{background:#FFF;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:80%;max-height:350px}.HelperModalClose{cursor:pointer;position:absolute;top:15px;right:15px;font-size:20px;color:#000}.HelperModalMobileClose{position:absolute;top:15px;right:15px;font-size:20px;color:#000}";
|
|
17
|
+
|
|
18
|
+
const HelperModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.__registerHost();
|
|
22
|
+
this.__attachShadow();
|
|
23
|
+
this.cancel = createEvent(this, "modalCloseEvent", 7);
|
|
24
|
+
/**
|
|
25
|
+
* Toggles if the helper is visible or not
|
|
26
|
+
*/
|
|
27
|
+
this.visible = true;
|
|
28
|
+
this.userAgent = window.navigator.userAgent;
|
|
29
|
+
}
|
|
30
|
+
handleHelperModalClose() {
|
|
31
|
+
this.visible = false;
|
|
32
|
+
this.cancel.emit();
|
|
33
|
+
}
|
|
34
|
+
;
|
|
35
|
+
render() {
|
|
36
|
+
return ((this.visible &&
|
|
37
|
+
h("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper" }, h("div", { class: "HelperModalWrapper HelperModalVisible" }, h("div", { class: "HelperModalContent" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') }, h("span", { class: "HelperModalClose" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, "X"), h("slot", null))))));
|
|
38
|
+
}
|
|
39
|
+
static get style() { return helperModalCss; }
|
|
40
|
+
}, [1, "helper-modal", {
|
|
41
|
+
"titleModal": [1, "title-modal"],
|
|
42
|
+
"visible": [1540]
|
|
43
|
+
}]);
|
|
44
|
+
function defineCustomElement() {
|
|
45
|
+
if (typeof customElements === "undefined") {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const components = ["helper-modal"];
|
|
49
|
+
components.forEach(tagName => { switch (tagName) {
|
|
50
|
+
case "helper-modal":
|
|
51
|
+
if (!customElements.get(tagName)) {
|
|
52
|
+
customElements.define(tagName, HelperModal);
|
|
53
|
+
}
|
|
54
|
+
break;
|
|
55
|
+
} });
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { HelperModal as H, defineCustomElement as d };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-af82b143.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["helper-
|
|
16
|
+
return bootstrapLazy([["helper-filters_2",[[1,"helper-filters",{"showFilterId":[4,"show-filter-id"],"activateTicketSearch":[4,"activate-ticket-search"],"gameId":[1,"game-id"],"playerId":[1,"player-id"],"session":[1],"postMessage":[4,"post-message"],"language":[1],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]],[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540]}]]]], options);
|
|
17
17
|
});
|