@everymatrix/helper-filters 0.1.0 → 0.1.1

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'];
@@ -22325,42 +22326,4 @@ const HelperFilters = class {
22325
22326
  };
22326
22327
  HelperFilters.style = helperFiltersCss;
22327
22328
 
22328
- /**
22329
- * @name isMobile
22330
- * @description A method that returns if the browser used to access the app is from a mobile device or not
22331
- * @param {String} userAgent window.navigator.userAgent
22332
- * @returns {Boolean} true or false
22333
- */
22334
- const isMobile = (userAgent) => {
22335
- return !!(userAgent.toLowerCase().match(/android/i) ||
22336
- userAgent.toLowerCase().match(/blackberry|bb/i) ||
22337
- userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
22338
- userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
22339
- };
22340
-
22341
- 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}";
22342
-
22343
- const HelperModal = class {
22344
- constructor(hostRef) {
22345
- index.registerInstance(this, hostRef);
22346
- this.cancel = index.createEvent(this, "modalCloseEvent", 7);
22347
- /**
22348
- * Toggles if the helper is visible or not
22349
- */
22350
- this.visible = true;
22351
- this.userAgent = window.navigator.userAgent;
22352
- }
22353
- handleHelperModalClose() {
22354
- this.visible = false;
22355
- this.cancel.emit();
22356
- }
22357
- ;
22358
- render() {
22359
- return ((this.visible &&
22360
- 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))))));
22361
- }
22362
- };
22363
- HelperModal.style = helperModalCss;
22364
-
22365
22329
  exports.helper_filters = HelperFilters;
22366
- 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'];
@@ -22339,18 +22339,13 @@ function defineCustomElement$1() {
22339
22339
  if (typeof customElements === "undefined") {
22340
22340
  return;
22341
22341
  }
22342
- const components = ["helper-filters", "helper-modal"];
22342
+ const components = ["helper-filters"];
22343
22343
  components.forEach(tagName => { switch (tagName) {
22344
22344
  case "helper-filters":
22345
22345
  if (!customElements.get(tagName)) {
22346
22346
  customElements.define(tagName, HelperFilters$1);
22347
22347
  }
22348
22348
  break;
22349
- case "helper-modal":
22350
- if (!customElements.get(tagName)) {
22351
- defineCustomElement$2();
22352
- }
22353
- break;
22354
22349
  } });
22355
22350
  }
22356
22351
 
@@ -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'];
@@ -22321,41 +22322,4 @@ const HelperFilters = class {
22321
22322
  };
22322
22323
  HelperFilters.style = helperFiltersCss;
22323
22324
 
22324
- /**
22325
- * @name isMobile
22326
- * @description A method that returns if the browser used to access the app is from a mobile device or not
22327
- * @param {String} userAgent window.navigator.userAgent
22328
- * @returns {Boolean} true or false
22329
- */
22330
- const isMobile = (userAgent) => {
22331
- return !!(userAgent.toLowerCase().match(/android/i) ||
22332
- userAgent.toLowerCase().match(/blackberry|bb/i) ||
22333
- userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
22334
- userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
22335
- };
22336
-
22337
- 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}";
22338
-
22339
- const HelperModal = class {
22340
- constructor(hostRef) {
22341
- registerInstance(this, hostRef);
22342
- this.cancel = createEvent(this, "modalCloseEvent", 7);
22343
- /**
22344
- * Toggles if the helper is visible or not
22345
- */
22346
- this.visible = true;
22347
- this.userAgent = window.navigator.userAgent;
22348
- }
22349
- handleHelperModalClose() {
22350
- this.visible = false;
22351
- this.cancel.emit();
22352
- }
22353
- ;
22354
- render() {
22355
- return ((this.visible &&
22356
- 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))))));
22357
- }
22358
- };
22359
- HelperModal.style = helperModalCss;
22360
-
22361
- export { HelperFilters as helper_filters, HelperModal as helper_modal };
22325
+ 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-4b4c4d5f",[[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-011c5248",[[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)));