@everymatrix/helper-filters 1.54.4 → 1.54.8

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.
@@ -21,10 +21,10 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'helper-filters';
24
- const BUILD = /* helper-filters */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
24
+ const BUILD = /* helper-filters */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.25.1 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.25.3 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
@@ -823,6 +823,9 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
823
823
  hostRef.$queuedListeners$ = void 0;
824
824
  }
825
825
  }
826
+ {
827
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
828
+ }
826
829
  }
827
830
  endSchedule();
828
831
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
@@ -919,9 +922,6 @@ var postUpdateComponent = (hostRef) => {
919
922
  }
920
923
  };
921
924
  var appDidLoad = (who) => {
922
- {
923
- addHydratedFlag(doc.documentElement);
924
- }
925
925
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
926
926
  };
927
927
  var safeCall = (instance, method, arg, elm) => {
@@ -1094,7 +1094,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1094
1094
  let Cstr;
1095
1095
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1096
1096
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1097
- {
1097
+ const bundleId = cmpMeta.$lazyBundleId$;
1098
+ if (bundleId) {
1098
1099
  const CstrImport = loadModule(cmpMeta, hostRef);
1099
1100
  if (CstrImport && "then" in CstrImport) {
1100
1101
  const endLoad = uniqueTime();
@@ -1123,6 +1124,10 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1123
1124
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
1124
1125
  }
1125
1126
  endNewInstance();
1127
+ } else {
1128
+ Cstr = elm.constructor;
1129
+ const cmpTag = elm.localName;
1130
+ customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1126
1131
  }
1127
1132
  if (Cstr && Cstr.style) {
1128
1133
  let style;
@@ -1290,6 +1295,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1290
1295
  plt.raf(() => {
1291
1296
  var _a3;
1292
1297
  const hostRef = getHostRef(this);
1298
+ const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1299
+ if (i2 > -1) {
1300
+ deferredConnectedCallbacks.splice(i2, 1);
1301
+ }
1293
1302
  if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1294
1303
  delete hostRef.$vnode$.$elm$;
1295
1304
  }
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-b713c8b0.js');
5
+ const index = require('./index-a3bc6484.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["helper-filters_2.cjs",[[1,"helper-filters",{"showFilterId":[516,"show-filter-id"],"activateTicketSearch":[516,"activate-ticket-search"],"gameId":[513,"game-id"],"playerId":[513,"player-id"],"session":[513],"postMessage":[516,"post-message"],"language":[513],"quickFiltersActive":[516,"quick-filters-active"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]],[1,"helper-modal",{"titleModal":[513,"title-modal"],"visible":[1540],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
11
+ return index.bootstrapLazy([["helper-filters_2.cjs",[[1,"helper-filters",{"showFilterId":[516,"show-filter-id"],"activateTicketSearch":[516,"activate-ticket-search"],"gameId":[513,"game-id"],"playerId":[513,"player-id"],"session":[513],"postMessage":[516,"post-message"],"language":[513],"quickFiltersActive":[516,"quick-filters-active"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"translationUrl":[520,"translation-url"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]],[1,"helper-modal",{"titleModal":[513,"title-modal"],"visible":[1540],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -4,7 +4,7 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "4.25.1",
7
+ "version": "4.25.3",
8
8
  "typescriptVersion": "5.5.4"
9
9
  },
10
10
  "collections": [
@@ -1,5 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
- import { translate } from "../../utils/locale.utils";
2
+ import { translate, getTranslations } from "../../utils/locale.utils";
3
3
  import "@vaadin/date-picker";
4
4
  import "../../../../../helper-modal/dist/types/index";
5
5
  export class HelperFilters {
@@ -76,6 +76,11 @@ export class HelperFilters {
76
76
  }, 1);
77
77
  };
78
78
  }
79
+ componentWillLoad() {
80
+ if (this.translationUrl) {
81
+ getTranslations(JSON.parse(this.translationUrl));
82
+ }
83
+ }
79
84
  // reset field values each time the filter modal opens
80
85
  componentDidRender() {
81
86
  // @TODO: to way binding?
@@ -121,10 +126,10 @@ export class HelperFilters {
121
126
  this.filterData = {};
122
127
  }
123
128
  render() {
124
- return (h("div", { key: '285e81fe3f4ba59c4a17445e8a296408a21ac15c', class: "HelperFilters", ref: el => this.stylingContainer = el }, h("div", { key: 'e1839ec68ae9f4d54a97b7e0bc81fd5bd9c6b924', class: "FilterButtonsWrapper" }, h("button", { key: '5b6b2402dad6d7c1c315ffd5a2e251e898c8db5b', class: "FilterOpen", onClick: () => this.toggleFilterModal() }, translate('filterOpen', this.language)), (this.showClearButton || this.quickFiltersActive) ?
129
+ return (h("div", { key: '92b6e88d833f8fdc12d833636e80aff214a8eb9d', class: "HelperFilters", ref: el => this.stylingContainer = el }, h("div", { key: 'fed2cf119553fc6d2b9ecaaf83e3c68ef040fd46', class: "FilterButtonsWrapper" }, h("button", { key: '2ef40face6ef68541041994f263094d155aca23e', class: "FilterOpen", onClick: () => this.toggleFilterModal() }, translate('filterOpen', this.language)), (this.showClearButton || this.quickFiltersActive) ?
125
130
  h("button", { class: "FilterClear", onClick: () => this.resetSearch() }, translate('filterClear', this.language))
126
131
  :
127
- null), h("helper-modal", { key: 'c60e5024e590e3c2217c4d2698f86a5b6d33562a', "title-modal": "Filter Modal", visible: this.showFilterModal, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h("div", { key: 'd0fcf27d381016db6c6460973cefbb28187cbd01', class: "FilterModalHeader" }, h("h3", { key: 'ab73abba95ea9654c902db1f4650b7bc004c62c5', class: "FilterModalTitle" }, this.activateTicketSearch ? translate('filterModalTicketTitle', this.language) : translate('filterModalDrawTitle', this.language))), h("div", { key: '13dff7787135e8e35dadfb23b1acdf9ea11a995b', class: "FilterModalBody" }, this.showFilterId && h("div", { key: '6c773a1b5a5af00c6c2c69aaa24c2f2fa766356a' }, h("input", { key: 'f6ba11c2abaa1977358f08a923db1b7c12290ef1', id: "FilterById", type: "text", value: this.filterData.ticketDrawId, onInput: this.handleTicketDrawId, class: "FilterModalSearch", placeholder: this.activateTicketSearch ? translate('filterTicketPlaceholder', this.language) : translate('filterDrawPlaceholder', this.language) }), h("p", { key: '39fd8bfc2422a227cf118672213b0499298c73bc' }, translate('filterOrDate', this.language))), h("div", { key: 'f86cf8390870b64ed646c94c312198a21f99f565', class: "FilterCalendarWrapper" }, h("vaadin-date-picker", { key: 'cddc64eda6025e2a3568f86e0e039ded55530ab1', value: this.filterData.filterFromCalendar, onChange: this.handleFilterFrom, placeholder: translate('filterFromCalendar', this.language), class: "VaadinDatePicker" }), h("vaadin-date-picker", { key: '0963561d635097452964f55bccf5182cde88e0c2', value: this.filterData.filterToCalendar, onChange: this.handleFilterTo, placeholder: translate('filterToCalendar', this.language), class: "VaadinDatePicker" }))), h("div", { key: '5f880497e96ba7e55fb1f46b073d8b6259feded5', class: "FilterModalFooter" }, h("button", { key: '64cb6b50666e8a9879e3fc10df8ab36315357cef', class: "FilterModalButton", onClick: () => this.filterSearch() }, translate('filterModalButton', this.language))))));
132
+ null), h("helper-modal", { key: '7b6a634f3f1f4497d6d39aebcb8249d153e5c277', "title-modal": "Filter Modal", visible: this.showFilterModal, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h("div", { key: '37c5aaabc27e32d24de1e3a50c8140c3674e07d5', class: "FilterModalHeader" }, h("h3", { key: '50b10b90dffdff3edd5933278d3ab000ecc2a93a', class: "FilterModalTitle" }, this.activateTicketSearch ? translate('filterModalTicketTitle', this.language) : translate('filterModalDrawTitle', this.language))), h("div", { key: 'bf843f5003fe32555a949474b1fa7b966000cb83', class: "FilterModalBody" }, this.showFilterId && h("div", { key: 'bd763dc296c986f1d3a2c04e30f2c4c8f02c9b7e' }, h("input", { key: 'd393e06b61d5f14e3a28330c15c3fb01257c8472', id: "FilterById", type: "text", value: this.filterData.ticketDrawId, onInput: this.handleTicketDrawId, class: "FilterModalSearch", placeholder: this.activateTicketSearch ? translate('filterTicketPlaceholder', this.language) : translate('filterDrawPlaceholder', this.language) }), h("p", { key: 'f8a8afe9594f8f0cad7bf0654f23348341f08a3d' }, translate('filterOrDate', this.language))), h("div", { key: 'a6b8fc4a3c424a1d56236c168e0298de3511cba5', class: "FilterCalendarWrapper" }, h("vaadin-date-picker", { key: '06c32fbf0073a7097ec6a8c24b200868a0c525cb', value: this.filterData.filterFromCalendar, onChange: this.handleFilterFrom, placeholder: translate('filterFromCalendar', this.language), class: "VaadinDatePicker" }), h("vaadin-date-picker", { key: 'a4d4212b6107ce9cf572f40a4713d9d038c8b395', value: this.filterData.filterToCalendar, onChange: this.handleFilterTo, placeholder: translate('filterToCalendar', this.language), class: "VaadinDatePicker" }))), h("div", { key: '7dec7662f1b093b6c443d0c194eb614aa608a342', class: "FilterModalFooter" }, h("button", { key: '336d6f0a0fb88bff6c44f593a754afbc43cd1e03', class: "FilterModalButton", onClick: () => this.filterSearch() }, translate('filterModalButton', this.language))))));
128
133
  }
129
134
  static get is() { return "helper-filters"; }
130
135
  static get encapsulation() { return "shadow"; }
@@ -339,6 +344,25 @@ export class HelperFilters {
339
344
  "attribute": "client-styling-url-content",
340
345
  "reflect": true,
341
346
  "defaultValue": "''"
347
+ },
348
+ "translationUrl": {
349
+ "type": "any",
350
+ "mutable": false,
351
+ "complexType": {
352
+ "original": "any",
353
+ "resolved": "any",
354
+ "references": {}
355
+ },
356
+ "required": false,
357
+ "optional": true,
358
+ "docs": {
359
+ "tags": [],
360
+ "text": "Translations via parent component"
361
+ },
362
+ "getter": false,
363
+ "setter": false,
364
+ "attribute": "translation-url",
365
+ "reflect": true
342
366
  }
343
367
  };
344
368
  }
@@ -8,7 +8,6 @@ const TRANSLATIONS = {
8
8
  filterModalDrawTitle: 'Draws Results History',
9
9
  filterTicketPlaceholder: 'Search for a ticket ID',
10
10
  filterDrawPlaceholder: 'Search for a draw ID',
11
- filterDateRangePlaceholder: 'Date Range',
12
11
  filterModalButton: 'Search',
13
12
  filterFromCalendar: 'From',
14
13
  filterToCalendar: 'To',
@@ -21,7 +20,6 @@ const TRANSLATIONS = {
21
20
  filterModalDrawTitle: 'Rezultatele draw-urilor',
22
21
  filterTicketPlaceholder: 'Cauta ID bilet',
23
22
  filterDrawPlaceholder: 'Cauta ID draw',
24
- filterDateRangePlaceholder: 'Perioada',
25
23
  filterModalButton: 'Cauta',
26
24
  filterOrDate: 'sau cauta dupa data'
27
25
  },
@@ -32,7 +30,6 @@ const TRANSLATIONS = {
32
30
  filterModalDrawTitle: 'Draws Results History',
33
31
  filterTicketPlaceholder: 'Search for a ticket ID',
34
32
  filterDrawPlaceholder: 'Search for a draw ID',
35
- filterDateRangePlaceholder: 'Date Range',
36
33
  filterModalButton: 'Search',
37
34
  filterFromCalendar: 'From',
38
35
  filterToCalendar: 'To',
@@ -45,7 +42,6 @@ const TRANSLATIONS = {
45
42
  filterModalDrawTitle: 'Draws Results History',
46
43
  filterTicketPlaceholder: 'Search for a ticket ID',
47
44
  filterDrawPlaceholder: 'Search for a draw ID',
48
- filterDateRangePlaceholder: 'Date Range',
49
45
  filterModalButton: 'Search',
50
46
  filterFromCalendar: 'From',
51
47
  filterToCalendar: 'To',
@@ -58,7 +54,6 @@ const TRANSLATIONS = {
58
54
  filterModalDrawTitle: 'Povijest rezultata Izvlačenja',
59
55
  filterTicketPlaceholder: 'Pretraga ID listića',
60
56
  filterDrawPlaceholder: 'Pretraga ID izvlačenja',
61
- filterDateRangePlaceholder: 'Raspon datuma',
62
57
  filterModalButton: 'Traži',
63
58
  filterFromCalendar: 'Od',
64
59
  filterToCalendar: 'Do',
@@ -69,3 +64,10 @@ export const translate = (key, customLang) => {
69
64
  const lang = customLang;
70
65
  return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
71
66
  };
67
+ export const getTranslations = (data) => {
68
+ Object.keys(data).forEach((item) => {
69
+ for (let key in data[item]) {
70
+ TRANSLATIONS[item][key] = data[item][key];
71
+ }
72
+ });
73
+ };
@@ -1,9 +1,9 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-82b8e4db.js';
2
- export { s as setNonce } from './index-82b8e4db.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-811e4747.js';
2
+ export { s as setNonce } from './index-811e4747.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v4.25.1 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.25.3 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  var patchBrowser = () => {
9
9
  const importMeta = import.meta.url;
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["helper-filters_2",[[1,"helper-filters",{"showFilterId":[516,"show-filter-id"],"activateTicketSearch":[516,"activate-ticket-search"],"gameId":[513,"game-id"],"playerId":[513,"player-id"],"session":[513],"postMessage":[516,"post-message"],"language":[513],"quickFiltersActive":[516,"quick-filters-active"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]],[1,"helper-modal",{"titleModal":[513,"title-modal"],"visible":[1540],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
19
+ return bootstrapLazy([["helper-filters_2",[[1,"helper-filters",{"showFilterId":[516,"show-filter-id"],"activateTicketSearch":[516,"activate-ticket-search"],"gameId":[513,"game-id"],"playerId":[513,"player-id"],"session":[513],"postMessage":[516,"post-message"],"language":[513],"quickFiltersActive":[516,"quick-filters-active"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"translationUrl":[520,"translation-url"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]],[1,"helper-modal",{"titleModal":[513,"title-modal"],"visible":[1540],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
20
20
  });