@everymatrix/helper-modal 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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-22317c69.js');
5
+ const index = require('./index-c6e4ec44.js');
6
6
 
7
7
  /**
8
8
  * @name isMobile
@@ -27,16 +27,48 @@ const HelperModal = class {
27
27
  * Toggles if the helper is visible or not
28
28
  */
29
29
  this.visible = true;
30
+ /**
31
+ * Client custom styling via string
32
+ */
33
+ this.clientStyling = '';
34
+ /**
35
+ * Client custom styling via url content
36
+ */
37
+ this.clientStylingUrlContent = '';
38
+ this.limitStylingAppends = false;
30
39
  this.userAgent = window.navigator.userAgent;
40
+ this.setClientStyling = () => {
41
+ let sheet = document.createElement('style');
42
+ sheet.innerHTML = this.clientStyling;
43
+ this.stylingContainer.prepend(sheet);
44
+ };
45
+ this.setClientStylingURL = () => {
46
+ let cssFile = document.createElement('style');
47
+ setTimeout(() => {
48
+ cssFile.innerHTML = this.clientStylingUrlContent;
49
+ this.stylingContainer.prepend(cssFile);
50
+ }, 1);
51
+ };
31
52
  }
32
53
  handleHelperModalClose() {
33
54
  this.visible = false;
34
55
  this.cancel.emit();
35
56
  }
36
57
  ;
58
+ componentDidRender() {
59
+ // start custom styling area
60
+ if (!this.limitStylingAppends && this.stylingContainer) {
61
+ if (this.clientStyling)
62
+ this.setClientStyling();
63
+ if (this.clientStylingUrlContent)
64
+ this.setClientStylingURL();
65
+ this.limitStylingAppends = true;
66
+ }
67
+ // end custom styling area
68
+ }
37
69
  render() {
38
70
  return ((this.visible &&
39
- 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))))));
71
+ index.h("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper", ref: el => this.stylingContainer = el }, 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))))));
40
72
  }
41
73
  };
42
74
  HelperModal.style = helperModalCss;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-22317c69.js');
3
+ const index = require('./index-c6e4ec44.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-modal.cjs",[[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540]}]]]], options);
18
+ return index.bootstrapLazy([["helper-modal.cjs",[[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
19
19
  });
@@ -234,6 +234,12 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
234
234
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
235
235
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
236
236
  }
237
+ else if (memberName === 'ref') {
238
+ // minifier will clean this up
239
+ if (newValue) {
240
+ newValue(elm);
241
+ }
242
+ }
237
243
  else if ((!isProp ) &&
238
244
  memberName[0] === 'o' &&
239
245
  memberName[1] === 'n') {
@@ -390,6 +396,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
390
396
  for (; startIdx <= endIdx; ++startIdx) {
391
397
  if ((vnode = vnodes[startIdx])) {
392
398
  elm = vnode.$elm$;
399
+ callNodeRefs(vnode);
393
400
  // remove the vnode's element from the dom
394
401
  elm.remove();
395
402
  }
@@ -511,6 +518,12 @@ const patch = (oldVNode, newVNode) => {
511
518
  elm.data = text;
512
519
  }
513
520
  };
521
+ const callNodeRefs = (vNode) => {
522
+ {
523
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
524
+ vNode.$children$ && vNode.$children$.map(callNodeRefs);
525
+ }
526
+ };
514
527
  const renderVdom = (hostRef, renderFnResults) => {
515
528
  const hostElm = hostRef.$hostElement$;
516
529
  const cmpMeta = hostRef.$cmpMeta$;
@@ -648,7 +661,11 @@ const postUpdateComponent = (hostRef) => {
648
661
  const tagName = hostRef.$cmpMeta$.$tagName$;
649
662
  const elm = hostRef.$hostElement$;
650
663
  const endPostUpdate = createTime('postUpdate', tagName);
664
+ const instance = hostRef.$lazyInstance$ ;
651
665
  const ancestorComponent = hostRef.$ancestorComponent$;
666
+ {
667
+ safeCall(instance, 'componentDidRender');
668
+ }
652
669
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
653
670
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
654
671
  {
@@ -690,6 +707,17 @@ const appDidLoad = (who) => {
690
707
  }
691
708
  nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
692
709
  };
710
+ const safeCall = (instance, method, arg) => {
711
+ if (instance && instance[method]) {
712
+ try {
713
+ return instance[method](arg);
714
+ }
715
+ catch (e) {
716
+ consoleError(e);
717
+ }
718
+ }
719
+ return undefined;
720
+ };
693
721
  const then = (promise, thenFn) => {
694
722
  return promise && promise.then ? promise.then(thenFn) : thenFn();
695
723
  };
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-22317c69.js');
5
+ const index = require('./index-c6e4ec44.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-modal.cjs",[[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540]}]]]], options);
17
+ return index.bootstrapLazy([["helper-modal.cjs",[[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -1,4 +1,4 @@
1
- import { Component, Event, h, Prop } from '@stencil/core';
1
+ import { Component, Event, h, Prop, State } from '@stencil/core';
2
2
  import { isMobile } from "../../utils/utils";
3
3
  export class HelperModal {
4
4
  constructor() {
@@ -6,16 +6,48 @@ export class HelperModal {
6
6
  * Toggles if the helper is visible or not
7
7
  */
8
8
  this.visible = true;
9
+ /**
10
+ * Client custom styling via string
11
+ */
12
+ this.clientStyling = '';
13
+ /**
14
+ * Client custom styling via url content
15
+ */
16
+ this.clientStylingUrlContent = '';
17
+ this.limitStylingAppends = false;
9
18
  this.userAgent = window.navigator.userAgent;
19
+ this.setClientStyling = () => {
20
+ let sheet = document.createElement('style');
21
+ sheet.innerHTML = this.clientStyling;
22
+ this.stylingContainer.prepend(sheet);
23
+ };
24
+ this.setClientStylingURL = () => {
25
+ let cssFile = document.createElement('style');
26
+ setTimeout(() => {
27
+ cssFile.innerHTML = this.clientStylingUrlContent;
28
+ this.stylingContainer.prepend(cssFile);
29
+ }, 1);
30
+ };
10
31
  }
11
32
  handleHelperModalClose() {
12
33
  this.visible = false;
13
34
  this.cancel.emit();
14
35
  }
15
36
  ;
37
+ componentDidRender() {
38
+ // start custom styling area
39
+ if (!this.limitStylingAppends && this.stylingContainer) {
40
+ if (this.clientStyling)
41
+ this.setClientStyling();
42
+ if (this.clientStylingUrlContent)
43
+ this.setClientStylingURL();
44
+ this.limitStylingAppends = true;
45
+ }
46
+ // end custom styling area
47
+ }
16
48
  render() {
17
49
  return ((this.visible &&
18
- h("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper" },
50
+ h("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper", ref: el => this.stylingContainer = el },
19
51
  h("div", { class: "HelperModalWrapper HelperModalVisible" },
20
52
  h("div", { class: "HelperModalContent" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') },
21
53
  h("span", { class: "HelperModalClose" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, "X"),
@@ -64,8 +96,47 @@ export class HelperModal {
64
96
  "attribute": "visible",
65
97
  "reflect": true,
66
98
  "defaultValue": "true"
99
+ },
100
+ "clientStyling": {
101
+ "type": "string",
102
+ "mutable": false,
103
+ "complexType": {
104
+ "original": "string",
105
+ "resolved": "string",
106
+ "references": {}
107
+ },
108
+ "required": false,
109
+ "optional": false,
110
+ "docs": {
111
+ "tags": [],
112
+ "text": "Client custom styling via string"
113
+ },
114
+ "attribute": "client-styling",
115
+ "reflect": false,
116
+ "defaultValue": "''"
117
+ },
118
+ "clientStylingUrlContent": {
119
+ "type": "string",
120
+ "mutable": false,
121
+ "complexType": {
122
+ "original": "string",
123
+ "resolved": "string",
124
+ "references": {}
125
+ },
126
+ "required": false,
127
+ "optional": false,
128
+ "docs": {
129
+ "tags": [],
130
+ "text": "Client custom styling via url content"
131
+ },
132
+ "attribute": "client-styling-url-content",
133
+ "reflect": false,
134
+ "defaultValue": "''"
67
135
  }
68
136
  }; }
137
+ static get states() { return {
138
+ "limitStylingAppends": {}
139
+ }; }
69
140
  static get events() { return [{
70
141
  "method": "cancel",
71
142
  "name": "modalCloseEvent",
@@ -25,21 +25,56 @@ const HelperModal$1 = /*@__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$1() {
45
80
  if (typeof customElements === "undefined") {
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-e9ec1aeb.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-4d594e7d.js';
2
2
 
3
3
  /**
4
4
  * @name isMobile
@@ -23,16 +23,48 @@ const HelperModal = class {
23
23
  * Toggles if the helper is visible or not
24
24
  */
25
25
  this.visible = true;
26
+ /**
27
+ * Client custom styling via string
28
+ */
29
+ this.clientStyling = '';
30
+ /**
31
+ * Client custom styling via url content
32
+ */
33
+ this.clientStylingUrlContent = '';
34
+ this.limitStylingAppends = false;
26
35
  this.userAgent = window.navigator.userAgent;
36
+ this.setClientStyling = () => {
37
+ let sheet = document.createElement('style');
38
+ sheet.innerHTML = this.clientStyling;
39
+ this.stylingContainer.prepend(sheet);
40
+ };
41
+ this.setClientStylingURL = () => {
42
+ let cssFile = document.createElement('style');
43
+ setTimeout(() => {
44
+ cssFile.innerHTML = this.clientStylingUrlContent;
45
+ this.stylingContainer.prepend(cssFile);
46
+ }, 1);
47
+ };
27
48
  }
28
49
  handleHelperModalClose() {
29
50
  this.visible = false;
30
51
  this.cancel.emit();
31
52
  }
32
53
  ;
54
+ componentDidRender() {
55
+ // start custom styling area
56
+ if (!this.limitStylingAppends && this.stylingContainer) {
57
+ if (this.clientStyling)
58
+ this.setClientStyling();
59
+ if (this.clientStylingUrlContent)
60
+ this.setClientStylingURL();
61
+ this.limitStylingAppends = true;
62
+ }
63
+ // end custom styling area
64
+ }
33
65
  render() {
34
66
  return ((this.visible &&
35
- 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))))));
67
+ 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))))));
36
68
  }
37
69
  };
38
70
  HelperModal.style = helperModalCss;
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-e9ec1aeb.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-4d594e7d.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-modal",[[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540]}]]]], options);
16
+ return bootstrapLazy([["helper-modal",[[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
17
17
  });
@@ -212,6 +212,12 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
212
212
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
213
213
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
214
214
  }
215
+ else if (memberName === 'ref') {
216
+ // minifier will clean this up
217
+ if (newValue) {
218
+ newValue(elm);
219
+ }
220
+ }
215
221
  else if ((!isProp ) &&
216
222
  memberName[0] === 'o' &&
217
223
  memberName[1] === 'n') {
@@ -368,6 +374,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
368
374
  for (; startIdx <= endIdx; ++startIdx) {
369
375
  if ((vnode = vnodes[startIdx])) {
370
376
  elm = vnode.$elm$;
377
+ callNodeRefs(vnode);
371
378
  // remove the vnode's element from the dom
372
379
  elm.remove();
373
380
  }
@@ -489,6 +496,12 @@ const patch = (oldVNode, newVNode) => {
489
496
  elm.data = text;
490
497
  }
491
498
  };
499
+ const callNodeRefs = (vNode) => {
500
+ {
501
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
502
+ vNode.$children$ && vNode.$children$.map(callNodeRefs);
503
+ }
504
+ };
492
505
  const renderVdom = (hostRef, renderFnResults) => {
493
506
  const hostElm = hostRef.$hostElement$;
494
507
  const cmpMeta = hostRef.$cmpMeta$;
@@ -626,7 +639,11 @@ const postUpdateComponent = (hostRef) => {
626
639
  const tagName = hostRef.$cmpMeta$.$tagName$;
627
640
  const elm = hostRef.$hostElement$;
628
641
  const endPostUpdate = createTime('postUpdate', tagName);
642
+ const instance = hostRef.$lazyInstance$ ;
629
643
  const ancestorComponent = hostRef.$ancestorComponent$;
644
+ {
645
+ safeCall(instance, 'componentDidRender');
646
+ }
630
647
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
631
648
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
632
649
  {
@@ -668,6 +685,17 @@ const appDidLoad = (who) => {
668
685
  }
669
686
  nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
670
687
  };
688
+ const safeCall = (instance, method, arg) => {
689
+ if (instance && instance[method]) {
690
+ try {
691
+ return instance[method](arg);
692
+ }
693
+ catch (e) {
694
+ consoleError(e);
695
+ }
696
+ }
697
+ return undefined;
698
+ };
671
699
  const then = (promise, thenFn) => {
672
700
  return promise && promise.then ? promise.then(thenFn) : thenFn();
673
701
  };
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-e9ec1aeb.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-4d594e7d.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["helper-modal",[[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540]}]]]], options);
13
+ return bootstrapLazy([["helper-modal",[[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-3e8f6982.js";(()=>{const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),e(l)})().then((e=>t([["p-53582ffe",[[1,"helper-modal",{titleModal:[1,"title-modal"],visible:[1540]}]]]],e)));
1
+ import{p as t,b as l}from"./p-1c2c3fd8.js";(()=>{const l=import.meta.url,i={};return""!==l&&(i.resourcesUrl=new URL(".",l).href),t(i)})().then((t=>l([["p-66f1c138",[[1,"helper-modal",{titleModal:[1,"title-modal"],visible:[1540],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]}]]]],t)));
@@ -0,0 +1 @@
1
+ let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),i=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),c=new WeakMap,u=e=>"sc-"+e.o,a={},f=e=>"object"==(e=typeof e)||"function"===e,d=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const i=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!f(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?$(null,l):l),o=s)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=$(e,null);return c.u=t,r.length>0&&(c.$=r),c},$=(e,t)=>({t:0,h:e,i:t,m:null,$:null,u:null}),h={},m=(e,t,n,s,r,i)=>{if(n!==s){let c=_(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,l=y(n),o=y(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if("ref"===t)s&&s(e);else if(c||"o"!==t[0]||"n"!==t[1]){const l=f(s);if((c||l&&null!==s)&&!r)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?c=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&i||r)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):_(l,u)?u.slice(2):u[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},p=/\s/,y=e=>e?e.split(p):[],b=(e,t,n,l)=>{const s=11===t.m.nodeType&&t.m.host?t.m.host:t.m,o=e&&e.u||a,r=t.u||a;for(l in o)l in r||m(s,l,o[l],void 0,n,t.t);for(l in r)m(s,l,o[l],r[l],n,t.t)},w=(t,n,l)=>{let o,r,i=n.$[l],c=0;if(null!==i.i)o=i.m=s.createTextNode(i.i);else if(o=i.m=s.createElement(i.h),b(null,i,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),i.$)for(c=0;c<i.$.length;++c)r=w(t,i,c),r&&o.appendChild(r);return o},S=(e,n,l,s,o,r)=>{let i,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=r;++o)s[o]&&(i=w(null,l,o),i&&(s[o].m=i,c.insertBefore(i,n)))},g=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.m,M(l),s.remove())},j=(e,t)=>e.h===t.h,v=(e,t)=>{const n=t.m=e.m,l=e.$,s=t.$,o=t.i;null===o?("slot"===t.h||b(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,r=0,i=t.length-1,c=t[0],u=t[i],a=l.length-1,f=l[0],d=l[a];for(;o<=i&&r<=a;)null==c?c=t[++o]:null==u?u=t[--i]:null==f?f=l[++r]:null==d?d=l[--a]:j(c,f)?(v(c,f),c=t[++o],f=l[++r]):j(u,d)?(v(u,d),u=t[--i],d=l[--a]):j(c,d)?(v(c,d),e.insertBefore(c.m,u.m.nextSibling),c=t[++o],d=l[--a]):j(u,f)?(v(u,f),e.insertBefore(u.m,c.m),u=t[--i],f=l[++r]):(s=w(t&&t[r],n,r),f=l[++r],s&&c.m.parentNode.insertBefore(s,c.m));o>i?S(e,null==l[a+1]?null:l[a+1].m,n,l,r,a):r>a&&g(t,o,i)})(n,l,t,s):null!==s?(null!==e.i&&(n.textContent=""),S(n,null,t,s,0,s.length-1)):null!==l&&g(l,0,l.length-1)):e.i!==o&&(n.data=o)},M=e=>{e.u&&e.u.ref&&e.u.ref(null),e.$&&e.$.map(M)},k=(e,t,n)=>{const l=(e=>F(e).p)(e);return{emit:e=>C(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},C=(e,t,n)=>{const l=o.ce(t,n);return e.dispatchEvent(l),l},O=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},P=(e,t)=>{if(e.t|=16,!(4&e.t))return O(e,e.g),ee((()=>x(e,t)));e.t|=512},x=(e,t)=>{const n=e.j;return L(void 0,(()=>E(e,n,t)))},E=async(e,t,n)=>{const l=e.p,o=l["s-rc"];n&&(e=>{const t=e.v,n=e.p,l=t.t,o=((e,t)=>{let n=u(t),l=I.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=c.get(e=e.head||e);o||c.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);N(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>R(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},N=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.p,o=n.v,r=n.M||$(null,null),i=(e=>e&&e.h===h)(l)?l:d(null,null,l);t=s.tagName,o.k&&(i.u=i.u||{},o.k.map((([e,t])=>i.u[t]=s[e]))),i.h=null,i.t|=4,n.M=i,i.m=r.m=s.shadowRoot||s,e=s["s-sc"],v(r,i)})(n,l)}catch(e){z(e,n.p)}return null},R=e=>{const t=e.p,n=e.g;A(e.j,"componentDidRender"),64&e.t||(e.t|=64,U(t),e.C(t),n||T()),e.S&&(e.S(),e.S=void 0),512&e.t&&Z((()=>P(e,!1))),e.t&=-517},T=()=>{U(s.documentElement),Z((()=>C(l,"appload",{detail:{namespace:"helper-modal"}})))},A=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){z(e)}},L=(e,t)=>e&&e.then?e.then(t):t(),U=e=>e.classList.add("hydrated"),W=(e,t,n)=>{if(t.O){const l=Object.entries(t.O),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>F(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=F(e),o=s.P.get(t),r=s.t,i=s.j;n=((e,t)=>null==e||f(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(n,l.O[t][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.P.set(t,n),i&&2==(18&r)&&P(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){o.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.k.push([e,s]),s}))}}return e},q=(e,t={})=>{const n=[],r=t.exclude||[],c=l.customElements,a=s.head,f=a.querySelector("meta[charset]"),d=s.createElement("style"),$=[];let h,m=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],o:t[1],O:t[2],N:t[3]};l.O=t[2],l.k=[];const s=l.o,a=class extends HTMLElement{constructor(e){super(e),V(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),m?$.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=F(e),n=t.v,l=()=>{};if(!(1&t.t)){t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){O(t,t.g=n);break}}n.O&&Object.entries(n.O).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=G(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(W(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){z(e)}t.t&=-9,e()}if(s.style){let e=s.style;const t=u(n);if(!I.has(t)){const l=()=>{};((e,t,n)=>{let l=I.get(e);i&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,I.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.g,r=()=>P(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>{}))}componentOnReady(){return F(this).R}};l.T=e[0],r.includes(s)||c.get(s)||(n.push(s),c.define(s,W(a,l,1)))}))})),d.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),a.insertBefore(d,f?f.nextSibling:a.firstChild),m=!1,$.length?$.map((e=>e.connectedCallback())):o.jmp((()=>h=setTimeout(T,30)))},D=new WeakMap,F=e=>D.get(e),H=(e,t)=>D.set(t.j=e,t),V=(e,t)=>{const n={t:0,p:e,v:t,P:new Map};return n.R=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],D.set(e,n)},_=(e,t)=>t in e,z=(e,t)=>(0,console.error)(e,t),B=new Map,G=e=>{const t=e.o.replace(/-/g,"_"),n=e.T,l=B.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(B.set(n,e),e[t])),z)},I=new Map,J=[],K=[],Q=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?Z(Y):o.raf(Y))},X=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){z(e)}e.length=0},Y=()=>{X(J),X(K),(n=J.length>0)&&o.raf(Y)},Z=e=>r().then(e),ee=Q(K,!0);export{q as b,k as c,d as h,r as p,H as r}
@@ -0,0 +1 @@
1
+ import{r as i,c as e,h as o}from"./p-1c2c3fd8.js";const s=i=>!!(i.toLowerCase().match(/android/i)||i.toLowerCase().match(/blackberry|bb/i)||i.toLowerCase().match(/iphone|ipad|ipod/i)||i.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),t=class{constructor(o){i(this,o),this.cancel=e(this,"modalCloseEvent",7),this.visible=!0,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.userAgent=window.navigator.userAgent,this.setClientStyling=()=>{let i=document.createElement("style");i.innerHTML=this.clientStyling,this.stylingContainer.prepend(i)},this.setClientStylingURL=()=>{let i=document.createElement("style");setTimeout((()=>{i.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(i)}),1)}}handleHelperModalClose(){this.visible=!1,this.cancel.emit()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return this.visible&&o("div",{class:this.visible?"HelperModalWrapper HelperModalVisible":"HelperModalWrapper",ref:i=>this.stylingContainer=i},o("div",{class:"HelperModalWrapper HelperModalVisible"},o("div",{class:"HelperModalContent"+(s(this.userAgent)?" HelperModalMobileContent":"")},o("span",{class:"HelperModalClose"+(s(this.userAgent)?" HelperModalMobileClose":""),onClick:this.handleHelperModalClose.bind(this)},"X"),o("slot",null))))}};t.style=":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}";export{t as helper_modal}
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -7,11 +7,24 @@ export declare class HelperModal {
7
7
  * Toggles if the helper is visible or not
8
8
  */
9
9
  visible: boolean;
10
+ /**
11
+ * Client custom styling via string
12
+ */
13
+ clientStyling: string;
14
+ /**
15
+ * Client custom styling via url content
16
+ */
17
+ clientStylingUrlContent: string;
18
+ private limitStylingAppends;
10
19
  private userAgent;
20
+ private stylingContainer;
11
21
  /**
12
22
  * The event triggered when the modal is closed
13
23
  */
14
24
  private cancel;
15
25
  handleHelperModalClose(): void;
26
+ componentDidRender(): void;
27
+ setClientStyling: () => void;
28
+ setClientStylingURL: () => void;
16
29
  render(): any;
17
30
  }
@@ -7,6 +7,14 @@
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  export namespace Components {
9
9
  interface HelperModal {
10
+ /**
11
+ * Client custom styling via string
12
+ */
13
+ "clientStyling": string;
14
+ /**
15
+ * Client custom styling via url content
16
+ */
17
+ "clientStylingUrlContent": string;
10
18
  /**
11
19
  * Modal title
12
20
  */
@@ -30,6 +38,14 @@ declare global {
30
38
  }
31
39
  declare namespace LocalJSX {
32
40
  interface HelperModal {
41
+ /**
42
+ * Client custom styling via string
43
+ */
44
+ "clientStyling"?: string;
45
+ /**
46
+ * Client custom styling via url content
47
+ */
48
+ "clientStylingUrlContent"?: string;
33
49
  /**
34
50
  * The event triggered when the modal is closed
35
51
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/helper-modal",
3
- "version": "0.1.7",
3
+ "version": "0.1.21",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),i=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),c=new WeakMap,u=e=>"sc-"+e.o,a={},f=e=>"object"==(e=typeof e)||"function"===e,$=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const i=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!f(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?d(null,l):l),o=s)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=d(e,null);return c.u=t,r.length>0&&(c.$=r),c},d=(e,t)=>({t:0,h:e,i:t,m:null,$:null,u:null}),h={},m=(e,t,n,s,r,i)=>{if(n!==s){let c=V(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,l=y(n),o=y(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if(c||"o"!==t[0]||"n"!==t[1]){const l=f(s);if((c||l&&null!==s)&&!r)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?c=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&i||r)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):V(l,u)?u.slice(2):u[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},p=/\s/,y=e=>e?e.split(p):[],b=(e,t,n,l)=>{const s=11===t.m.nodeType&&t.m.host?t.m.host:t.m,o=e&&e.u||a,r=t.u||a;for(l in o)l in r||m(s,l,o[l],void 0,n,t.t);for(l in r)m(s,l,o[l],r[l],n,t.t)},w=(t,n,l)=>{let o,r,i=n.$[l],c=0;if(null!==i.i)o=i.m=s.createTextNode(i.i);else if(o=i.m=s.createElement(i.h),b(null,i,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),i.$)for(c=0;c<i.$.length;++c)r=w(t,i,c),r&&o.appendChild(r);return o},S=(e,n,l,s,o,r)=>{let i,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=r;++o)s[o]&&(i=w(null,l,o),i&&(s[o].m=i,c.insertBefore(i,n)))},g=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.m.remove()},j=(e,t)=>e.h===t.h,v=(e,t)=>{const n=t.m=e.m,l=e.$,s=t.$,o=t.i;null===o?("slot"===t.h||b(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,r=0,i=t.length-1,c=t[0],u=t[i],a=l.length-1,f=l[0],$=l[a];for(;o<=i&&r<=a;)null==c?c=t[++o]:null==u?u=t[--i]:null==f?f=l[++r]:null==$?$=l[--a]:j(c,f)?(v(c,f),c=t[++o],f=l[++r]):j(u,$)?(v(u,$),u=t[--i],$=l[--a]):j(c,$)?(v(c,$),e.insertBefore(c.m,u.m.nextSibling),c=t[++o],$=l[--a]):j(u,f)?(v(u,f),e.insertBefore(u.m,c.m),u=t[--i],f=l[++r]):(s=w(t&&t[r],n,r),f=l[++r],s&&c.m.parentNode.insertBefore(s,c.m));o>i?S(e,null==l[a+1]?null:l[a+1].m,n,l,r,a):r>a&&g(t,o,i)})(n,l,t,s):null!==s?(null!==e.i&&(n.textContent=""),S(n,null,t,s,0,s.length-1)):null!==l&&g(l,0,l.length-1)):e.i!==o&&(n.data=o)},M=(e,t,n)=>{const l=(e=>q(e).p)(e);return{emit:e=>k(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},k=(e,t,n)=>{const l=o.ce(t,n);return e.dispatchEvent(l),l},C=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},O=(e,t)=>{if(e.t|=16,!(4&e.t))return C(e,e.g),Y((()=>P(e,t)));e.t|=512},P=(e,t)=>{const n=e.j;return A(void 0,(()=>x(e,n,t)))},x=async(e,t,n)=>{const l=e.p,o=l["s-rc"];n&&(e=>{const t=e.v,n=e.p,l=t.t,o=((e,t)=>{let n=u(t),l=D.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=c.get(e=e.head||e);o||c.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);E(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>N(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},E=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.p,o=n.v,r=n.M||d(null,null),i=(e=>e&&e.h===h)(l)?l:$(null,null,l);t=s.tagName,o.k&&(i.u=i.u||{},o.k.map((([e,t])=>i.u[t]=s[e]))),i.h=null,i.t|=4,n.M=i,i.m=r.m=s.shadowRoot||s,e=s["s-sc"],v(r,i)})(n,l)}catch(e){_(e,n.p)}return null},N=e=>{const t=e.p,n=e.g;64&e.t||(e.t|=64,L(t),e.C(t),n||T()),e.S&&(e.S(),e.S=void 0),512&e.t&&X((()=>O(e,!1))),e.t&=-517},T=()=>{L(s.documentElement),X((()=>k(l,"appload",{detail:{namespace:"helper-modal"}})))},A=(e,t)=>e&&e.then?e.then(t):t(),L=e=>e.classList.add("hydrated"),R=(e,t,n)=>{if(t.O){const l=Object.entries(t.O),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>q(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=q(e),o=s.P.get(t),r=s.t,i=s.j;n=((e,t)=>null==e||f(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(n,l.O[t][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.P.set(t,n),i&&2==(18&r)&&O(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){o.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.k.push([e,s]),s}))}}return e},U=(e,t={})=>{const n=[],r=t.exclude||[],c=l.customElements,a=s.head,f=a.querySelector("meta[charset]"),$=s.createElement("style"),d=[];let h,m=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],o:t[1],O:t[2],N:t[3]};l.O=t[2],l.k=[];const s=l.o,a=class extends HTMLElement{constructor(e){super(e),H(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),m?d.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=q(e),n=t.v,l=()=>{};if(!(1&t.t)){t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){C(t,t.g=n);break}}n.O&&Object.entries(n.O).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=B(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(R(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){_(e)}t.t&=-9,e()}if(s.style){let e=s.style;const t=u(n);if(!D.has(t)){const l=()=>{};((e,t,n)=>{let l=D.get(e);i&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,D.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.g,r=()=>O(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>{}))}componentOnReady(){return q(this).T}};l.A=e[0],r.includes(s)||c.get(s)||(n.push(s),c.define(s,R(a,l,1)))}))})),$.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",$.setAttribute("data-styles",""),a.insertBefore($,f?f.nextSibling:a.firstChild),m=!1,d.length?d.map((e=>e.connectedCallback())):o.jmp((()=>h=setTimeout(T,30)))},W=new WeakMap,q=e=>W.get(e),F=(e,t)=>W.set(t.j=e,t),H=(e,t)=>{const n={t:0,p:e,v:t,P:new Map};return n.T=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],W.set(e,n)},V=(e,t)=>t in e,_=(e,t)=>(0,console.error)(e,t),z=new Map,B=e=>{const t=e.o.replace(/-/g,"_"),n=e.A,l=z.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(z.set(n,e),e[t])),_)},D=new Map,G=[],I=[],J=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?X(Q):o.raf(Q))},K=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){_(e)}e.length=0},Q=()=>{K(G),K(I),(n=G.length>0)&&o.raf(Q)},X=e=>r().then(e),Y=J(I,!0);export{U as b,M as c,$ as h,r as p,F as r}
@@ -1 +0,0 @@
1
- import{r as o,c as i,h as e}from"./p-3e8f6982.js";const s=o=>!!(o.toLowerCase().match(/android/i)||o.toLowerCase().match(/blackberry|bb/i)||o.toLowerCase().match(/iphone|ipad|ipod/i)||o.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),l=class{constructor(e){o(this,e),this.cancel=i(this,"modalCloseEvent",7),this.visible=!0,this.userAgent=window.navigator.userAgent}handleHelperModalClose(){this.visible=!1,this.cancel.emit()}render(){return this.visible&&e("div",{class:this.visible?"HelperModalWrapper HelperModalVisible":"HelperModalWrapper"},e("div",{class:"HelperModalWrapper HelperModalVisible"},e("div",{class:"HelperModalContent"+(s(this.userAgent)?" HelperModalMobileContent":"")},e("span",{class:"HelperModalClose"+(s(this.userAgent)?" HelperModalMobileClose":""),onClick:this.handleHelperModalClose.bind(this)},"X"),e("slot",null))))}};l.style=":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}";export{l as helper_modal}
@@ -1,2 +0,0 @@
1
- import { Config } from '../../../../../../../../../../stencil-public-runtime';
2
- export declare const config: Config;