@everymatrix/helper-filters 0.1.5 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/helper-filters.cjs.js +2 -2
- package/dist/cjs/{helper-filters.cjs.entry.js → helper-filters_2.cjs.entry.js} +425 -582
- package/dist/cjs/{index-0c5bb1ff.js → index-4be1aa12.js} +28 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +8 -1
- package/dist/collection/components/helper-filters/helper-filters.js +97 -11
- package/dist/components/helper-filters.js +396 -581
- 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} +425 -583
- package/dist/esm/{index-f5eea413.js → index-5f4ed338.js} +28 -1
- package/dist/esm/loader.js +2 -2
- package/dist/helper-filters/helper-filters.esm.js +1 -1
- package/dist/helper-filters/p-6a46b66a.js +1 -0
- package/dist/helper-filters/{p-5018b398.entry.js → p-f41dd782.entry.js} +143 -103
- package/dist/types/components/helper-filters/helper-filters.d.ts +16 -0
- package/dist/types/components.d.ts +24 -0
- package/package.json +3 -2
- package/dist/helper-filters/p-645ae858.js +0 -1
|
@@ -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-5f4ed338.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],"quickFiltersActive":[4,"quick-filters-active"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]],[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540]}]]]], options);
|
|
17
17
|
});
|