@everymatrix/helper-filters 0.1.4 → 0.1.5

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,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-d16cebbc.js');
5
+ const index = require('./index-0c5bb1ff.js');
6
+ require('@everymatrix/helper-modal');
6
7
 
7
8
  const DEFAULT_LANGUAGE = 'en';
8
9
  const SUPPORTED_LANGUAGES = ['ro', 'en'];
@@ -22551,42 +22552,4 @@ const HelperFilters = class {
22551
22552
  };
22552
22553
  HelperFilters.style = helperFiltersCss;
22553
22554
 
22554
- /**
22555
- * @name isMobile
22556
- * @description A method that returns if the browser used to access the app is from a mobile device or not
22557
- * @param {String} userAgent window.navigator.userAgent
22558
- * @returns {Boolean} true or false
22559
- */
22560
- const isMobile = (userAgent) => {
22561
- return !!(userAgent.toLowerCase().match(/android/i) ||
22562
- userAgent.toLowerCase().match(/blackberry|bb/i) ||
22563
- userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
22564
- userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
22565
- };
22566
-
22567
- 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}";
22568
-
22569
- const HelperModal = class {
22570
- constructor(hostRef) {
22571
- index.registerInstance(this, hostRef);
22572
- this.cancel = index.createEvent(this, "modalCloseEvent", 7);
22573
- /**
22574
- * Toggles if the helper is visible or not
22575
- */
22576
- this.visible = true;
22577
- this.userAgent = window.navigator.userAgent;
22578
- }
22579
- handleHelperModalClose() {
22580
- this.visible = false;
22581
- this.cancel.emit();
22582
- }
22583
- ;
22584
- render() {
22585
- return ((this.visible &&
22586
- 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))))));
22587
- }
22588
- };
22589
- HelperModal.style = helperModalCss;
22590
-
22591
22555
  exports.helper_filters = HelperFilters;
22592
- exports.helper_modal = HelperModal;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-d16cebbc.js');
3
+ const index = require('./index-0c5bb1ff.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-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
+ return index.bootstrapLazy([["helper-filters.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"]]]]]], options);
19
19
  });
@@ -502,14 +502,11 @@ 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$;
506
505
  const text = newVNode.$text$;
507
506
  if (text === null) {
508
507
  // element node
509
508
  {
510
- if (tag === 'slot')
511
- ;
512
- else {
509
+ {
513
510
  // either this is the first render of an element OR it's an update
514
511
  // AND we already know it's possible it could have changed
515
512
  // this updates the element's css classes, attrs, props, listeners, etc.
@@ -542,14 +539,9 @@ const patch = (oldVNode, newVNode) => {
542
539
  };
543
540
  const renderVdom = (hostRef, renderFnResults) => {
544
541
  const hostElm = hostRef.$hostElement$;
545
- const cmpMeta = hostRef.$cmpMeta$;
546
542
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
547
543
  const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
548
544
  hostTagName = hostElm.tagName;
549
- if (cmpMeta.$attrsToReflect$) {
550
- rootVnode.$attrs$ = rootVnode.$attrs$ || {};
551
- cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
552
- }
553
545
  rootVnode.$tag$ = null;
554
546
  rootVnode.$flags$ |= 4 /* isHost */;
555
547
  hostRef.$vnode$ = rootVnode;
@@ -900,9 +892,6 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
900
892
  .map(([propName, m]) => {
901
893
  const attrName = m[1] || propName;
902
894
  attrNameToPropName.set(attrName, propName);
903
- if (m[0] & 512 /* ReflectAttr */) {
904
- cmpMeta.$attrsToReflect$.push([propName, attrName]);
905
- }
906
895
  return attrName;
907
896
  });
908
897
  }
@@ -1063,9 +1052,6 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1063
1052
  {
1064
1053
  cmpMeta.$listeners$ = compactMeta[3];
1065
1054
  }
1066
- {
1067
- cmpMeta.$attrsToReflect$ = [];
1068
- }
1069
1055
  const tagName = cmpMeta.$tagName$;
1070
1056
  const HostElement = class extends HTMLElement {
1071
1057
  // StencilLazyHost
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-d16cebbc.js');
5
+ const index = require('./index-0c5bb1ff.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-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);
17
+ return index.bootstrapLazy([["helper-filters.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"]]]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -7,13 +7,6 @@
7
7
  "version": "2.15.2",
8
8
  "typescriptVersion": "4.5.4"
9
9
  },
10
- "collections": [
11
- {
12
- "name": "@everymatrix/helper-modal",
13
- "tags": [
14
- "helper-modal"
15
- ]
16
- }
17
- ],
10
+ "collections": [],
18
11
  "bundles": []
19
12
  }
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement as HTMLElement$1, createEvent, h as h$2 } from '@stencil/core/internal/client';
2
- import { d as defineCustomElement$2 } from './helper-modal2.js';
2
+ import '@everymatrix/helper-modal';
3
3
 
4
4
  const DEFAULT_LANGUAGE = 'en';
5
5
  const SUPPORTED_LANGUAGES = ['ro', 'en'];
@@ -22565,18 +22565,13 @@ function defineCustomElement$1() {
22565
22565
  if (typeof customElements === "undefined") {
22566
22566
  return;
22567
22567
  }
22568
- const components = ["helper-filters", "helper-modal"];
22568
+ const components = ["helper-filters"];
22569
22569
  components.forEach(tagName => { switch (tagName) {
22570
22570
  case "helper-filters":
22571
22571
  if (!customElements.get(tagName)) {
22572
22572
  customElements.define(tagName, HelperFilters$1);
22573
22573
  }
22574
22574
  break;
22575
- case "helper-modal":
22576
- if (!customElements.get(tagName)) {
22577
- defineCustomElement$2();
22578
- }
22579
- break;
22580
22575
  } });
22581
22576
  }
22582
22577
 
@@ -1,4 +1,5 @@
1
- import { r as registerInstance, c as createEvent, h as h$2 } from './index-1b3528e3.js';
1
+ import { r as registerInstance, c as createEvent, h as h$2 } from './index-f5eea413.js';
2
+ import '@everymatrix/helper-modal';
2
3
 
3
4
  const DEFAULT_LANGUAGE = 'en';
4
5
  const SUPPORTED_LANGUAGES = ['ro', 'en'];
@@ -22547,41 +22548,4 @@ const HelperFilters = class {
22547
22548
  };
22548
22549
  HelperFilters.style = helperFiltersCss;
22549
22550
 
22550
- /**
22551
- * @name isMobile
22552
- * @description A method that returns if the browser used to access the app is from a mobile device or not
22553
- * @param {String} userAgent window.navigator.userAgent
22554
- * @returns {Boolean} true or false
22555
- */
22556
- const isMobile = (userAgent) => {
22557
- return !!(userAgent.toLowerCase().match(/android/i) ||
22558
- userAgent.toLowerCase().match(/blackberry|bb/i) ||
22559
- userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
22560
- userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
22561
- };
22562
-
22563
- 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}";
22564
-
22565
- const HelperModal = class {
22566
- constructor(hostRef) {
22567
- registerInstance(this, hostRef);
22568
- this.cancel = createEvent(this, "modalCloseEvent", 7);
22569
- /**
22570
- * Toggles if the helper is visible or not
22571
- */
22572
- this.visible = true;
22573
- this.userAgent = window.navigator.userAgent;
22574
- }
22575
- handleHelperModalClose() {
22576
- this.visible = false;
22577
- this.cancel.emit();
22578
- }
22579
- ;
22580
- render() {
22581
- return ((this.visible &&
22582
- h$2("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper" }, h$2("div", { class: "HelperModalWrapper HelperModalVisible" }, h$2("div", { class: "HelperModalContent" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') }, h$2("span", { class: "HelperModalClose" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, "X"), h$2("slot", null))))));
22583
- }
22584
- };
22585
- HelperModal.style = helperModalCss;
22586
-
22587
- export { HelperFilters as helper_filters, HelperModal as helper_modal };
22551
+ export { HelperFilters as helper_filters };
@@ -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-f5eea413.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",[[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"]]]]]], options);
17
17
  });
@@ -480,14 +480,11 @@ const patch = (oldVNode, newVNode) => {
480
480
  const elm = (newVNode.$elm$ = oldVNode.$elm$);
481
481
  const oldChildren = oldVNode.$children$;
482
482
  const newChildren = newVNode.$children$;
483
- const tag = newVNode.$tag$;
484
483
  const text = newVNode.$text$;
485
484
  if (text === null) {
486
485
  // element node
487
486
  {
488
- if (tag === 'slot')
489
- ;
490
- else {
487
+ {
491
488
  // either this is the first render of an element OR it's an update
492
489
  // AND we already know it's possible it could have changed
493
490
  // this updates the element's css classes, attrs, props, listeners, etc.
@@ -520,14 +517,9 @@ const patch = (oldVNode, newVNode) => {
520
517
  };
521
518
  const renderVdom = (hostRef, renderFnResults) => {
522
519
  const hostElm = hostRef.$hostElement$;
523
- const cmpMeta = hostRef.$cmpMeta$;
524
520
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
525
521
  const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
526
522
  hostTagName = hostElm.tagName;
527
- if (cmpMeta.$attrsToReflect$) {
528
- rootVnode.$attrs$ = rootVnode.$attrs$ || {};
529
- cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
530
- }
531
523
  rootVnode.$tag$ = null;
532
524
  rootVnode.$flags$ |= 4 /* isHost */;
533
525
  hostRef.$vnode$ = rootVnode;
@@ -878,9 +870,6 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
878
870
  .map(([propName, m]) => {
879
871
  const attrName = m[1] || propName;
880
872
  attrNameToPropName.set(attrName, propName);
881
- if (m[0] & 512 /* ReflectAttr */) {
882
- cmpMeta.$attrsToReflect$.push([propName, attrName]);
883
- }
884
873
  return attrName;
885
874
  });
886
875
  }
@@ -1041,9 +1030,6 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1041
1030
  {
1042
1031
  cmpMeta.$listeners$ = compactMeta[3];
1043
1032
  }
1044
- {
1045
- cmpMeta.$attrsToReflect$ = [];
1046
- }
1047
1033
  const tagName = cmpMeta.$tagName$;
1048
1034
  const HostElement = class extends HTMLElement {
1049
1035
  // StencilLazyHost
@@ -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-f5eea413.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-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);
13
+ return bootstrapLazy([["helper-filters",[[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"]]]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-2cd626f1.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-b3835112",[[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]}]]]],e)));
1
+ import{p as e,b as t}from"./p-645ae858.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-5018b398",[[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"]]]]]],e)));