@everymatrix/helper-filters 0.1.7 → 0.1.21

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.
@@ -25,21 +25,56 @@ const HelperModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
25
25
  * Toggles if the helper is visible or not
26
26
  */
27
27
  this.visible = true;
28
+ /**
29
+ * Client custom styling via string
30
+ */
31
+ this.clientStyling = '';
32
+ /**
33
+ * Client custom styling via url content
34
+ */
35
+ this.clientStylingUrlContent = '';
36
+ this.limitStylingAppends = false;
28
37
  this.userAgent = window.navigator.userAgent;
38
+ this.setClientStyling = () => {
39
+ let sheet = document.createElement('style');
40
+ sheet.innerHTML = this.clientStyling;
41
+ this.stylingContainer.prepend(sheet);
42
+ };
43
+ this.setClientStylingURL = () => {
44
+ let cssFile = document.createElement('style');
45
+ setTimeout(() => {
46
+ cssFile.innerHTML = this.clientStylingUrlContent;
47
+ this.stylingContainer.prepend(cssFile);
48
+ }, 1);
49
+ };
29
50
  }
30
51
  handleHelperModalClose() {
31
52
  this.visible = false;
32
53
  this.cancel.emit();
33
54
  }
34
55
  ;
56
+ componentDidRender() {
57
+ // start custom styling area
58
+ if (!this.limitStylingAppends && this.stylingContainer) {
59
+ if (this.clientStyling)
60
+ this.setClientStyling();
61
+ if (this.clientStylingUrlContent)
62
+ this.setClientStylingURL();
63
+ this.limitStylingAppends = true;
64
+ }
65
+ // end custom styling area
66
+ }
35
67
  render() {
36
68
  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))))));
69
+ h("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper", ref: el => this.stylingContainer = el }, 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
70
  }
39
71
  static get style() { return helperModalCss; }
40
72
  }, [1, "helper-modal", {
41
73
  "titleModal": [1, "title-modal"],
42
- "visible": [1540]
74
+ "visible": [1540],
75
+ "clientStyling": [1, "client-styling"],
76
+ "clientStylingUrlContent": [1, "client-styling-url-content"],
77
+ "limitStylingAppends": [32]
43
78
  }]);
44
79
  function defineCustomElement() {
45
80
  if (typeof customElements === "undefined") {
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-1b3528e3.js';
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-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);
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],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
17
17
  });