@everymatrix/helper-filters 1.32.4 → 1.33.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.
Files changed (50) hide show
  1. package/dist/cjs/helper-filters.cjs.js +19 -0
  2. package/dist/cjs/helper-filters_2.cjs.entry.js +23600 -0
  3. package/dist/cjs/index-4be1aa12.js +1235 -0
  4. package/dist/cjs/index.cjs.js +2 -0
  5. package/dist/cjs/loader.cjs.js +21 -0
  6. package/dist/collection/collection-manifest.json +19 -0
  7. package/dist/collection/components/helper-filters/helper-filters.css +119 -0
  8. package/dist/collection/components/helper-filters/helper-filters.js +402 -0
  9. package/dist/collection/index.js +1 -0
  10. package/dist/collection/utils/locale.utils.js +71 -0
  11. package/dist/collection/utils/utils.js +3 -0
  12. package/dist/components/helper-filters.d.ts +11 -0
  13. package/dist/components/helper-filters.js +23566 -0
  14. package/dist/components/helper-modal.js +6 -0
  15. package/dist/components/helper-modal2.js +93 -0
  16. package/dist/components/index.d.ts +26 -0
  17. package/dist/components/index.js +1 -0
  18. package/dist/esm/helper-filters.js +17 -0
  19. package/dist/esm/helper-filters_2.entry.js +23595 -0
  20. package/dist/esm/index-5f4ed338.js +1209 -0
  21. package/dist/esm/index.js +1 -0
  22. package/dist/esm/loader.js +17 -0
  23. package/dist/esm/polyfills/core-js.js +11 -0
  24. package/dist/esm/polyfills/css-shim.js +1 -0
  25. package/dist/esm/polyfills/dom.js +79 -0
  26. package/dist/esm/polyfills/es5-html-element.js +1 -0
  27. package/dist/esm/polyfills/index.js +34 -0
  28. package/dist/esm/polyfills/system.js +6 -0
  29. package/dist/helper-filters/helper-filters.esm.js +1 -0
  30. package/dist/helper-filters/index.esm.js +0 -0
  31. package/dist/helper-filters/p-6a46b66a.js +1 -0
  32. package/dist/helper-filters/p-a4793f5e.entry.js +2800 -0
  33. package/dist/index.cjs.js +1 -0
  34. package/dist/index.js +1 -0
  35. package/dist/stencil.config.js +22 -0
  36. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/helper-filters/.stencil/packages/helper-filters/stencil.config.d.ts +2 -0
  37. package/dist/types/components/helper-filters/helper-filters.d.ts +67 -0
  38. package/dist/types/components.d.ts +120 -0
  39. package/dist/types/index.d.ts +1 -0
  40. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  41. package/dist/types/utils/locale.utils.d.ts +1 -0
  42. package/dist/types/utils/utils.d.ts +1 -0
  43. package/loader/cdn.js +3 -0
  44. package/loader/index.cjs.js +3 -0
  45. package/loader/index.d.ts +12 -0
  46. package/loader/index.es2017.js +3 -0
  47. package/loader/index.js +4 -0
  48. package/loader/package.json +10 -0
  49. package/package.json +2 -3
  50. package/LICENSE +0 -21
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-4be1aa12.js');
6
+
7
+ /*
8
+ Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
9
+ */
10
+ const patchEsm = () => {
11
+ return index.promiseResolve();
12
+ };
13
+
14
+ const defineCustomElements = (win, options) => {
15
+ if (typeof window === 'undefined') return Promise.resolve();
16
+ return patchEsm().then(() => {
17
+ 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);
18
+ });
19
+ };
20
+
21
+ exports.defineCustomElements = defineCustomElements;
@@ -0,0 +1,19 @@
1
+ {
2
+ "entries": [
3
+ "./components/helper-filters/helper-filters.js"
4
+ ],
5
+ "compiler": {
6
+ "name": "@stencil/core",
7
+ "version": "2.15.2",
8
+ "typescriptVersion": "4.5.4"
9
+ },
10
+ "collections": [
11
+ {
12
+ "name": "@everymatrix/helper-modal",
13
+ "tags": [
14
+ "helper-modal"
15
+ ]
16
+ }
17
+ ],
18
+ "bundles": []
19
+ }
@@ -0,0 +1,119 @@
1
+ @import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");
2
+ :host {
3
+ display: block;
4
+ font-family: "Roboto", sans-serif;
5
+ }
6
+
7
+ .FilterButtonsWrapper {
8
+ display: flex;
9
+ justify-content: flex-end;
10
+ gap: 5px;
11
+ }
12
+ .FilterButtonsWrapper .FilterOpen {
13
+ cursor: pointer;
14
+ border-radius: 4px;
15
+ padding: 8px 15px;
16
+ width: max-content;
17
+ border: 1px solid #00958f;
18
+ background: #00958f;
19
+ color: #FFF;
20
+ font-size: 12px;
21
+ transition: all 0.2s linear;
22
+ text-align: center;
23
+ letter-spacing: 0;
24
+ }
25
+ .FilterButtonsWrapper .FilterOpen:hover {
26
+ background: #00958f;
27
+ color: #FFF;
28
+ }
29
+ .FilterButtonsWrapper .FilterClear {
30
+ cursor: pointer;
31
+ border-radius: 4px;
32
+ padding: 8px 15px;
33
+ width: max-content;
34
+ border: 1px solid #00958f;
35
+ background: #FFF;
36
+ color: #000;
37
+ font-size: 12px;
38
+ transition: all 0.2s linear;
39
+ text-align: center;
40
+ letter-spacing: 0;
41
+ }
42
+ .FilterButtonsWrapper .FilterClear:hover {
43
+ background: #00958f;
44
+ color: #FFF;
45
+ }
46
+
47
+ .FilterModalHeader,
48
+ .FilterModalBody,
49
+ .FilterModalFooter {
50
+ display: flex;
51
+ flex-direction: column;
52
+ gap: 5px;
53
+ align-items: center;
54
+ margin: 20px 0;
55
+ }
56
+ .FilterModalHeader .FilterModalTitle,
57
+ .FilterModalBody .FilterModalTitle,
58
+ .FilterModalFooter .FilterModalTitle {
59
+ margin: 0;
60
+ padding: 0;
61
+ font-weight: 700;
62
+ font-size: 16px;
63
+ color: #009993;
64
+ text-transform: uppercase;
65
+ }
66
+ .FilterModalHeader .FilterModalSearch,
67
+ .FilterModalBody .FilterModalSearch,
68
+ .FilterModalFooter .FilterModalSearch {
69
+ border-radius: 4px;
70
+ background: #e8ebef;
71
+ color: #263445;
72
+ width: 100%;
73
+ height: 26px;
74
+ max-width: 280px;
75
+ padding: 5px;
76
+ font-size: 15px;
77
+ border: none;
78
+ outline: #009993;
79
+ }
80
+ .FilterModalHeader .FilterCalendarWrapper,
81
+ .FilterModalBody .FilterCalendarWrapper,
82
+ .FilterModalFooter .FilterCalendarWrapper {
83
+ display: flex;
84
+ gap: 5px;
85
+ }
86
+ .FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,
87
+ .FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,
88
+ .FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker {
89
+ width: 50%;
90
+ max-width: 143px;
91
+ }
92
+ .FilterModalHeader .FilterModalButton,
93
+ .FilterModalBody .FilterModalButton,
94
+ .FilterModalFooter .FilterModalButton {
95
+ cursor: pointer;
96
+ border-radius: 4px;
97
+ padding: 8px 60px;
98
+ width: max-content;
99
+ margin: 5px;
100
+ border: 1px solid #00958f;
101
+ background: #00958f;
102
+ color: #FFF;
103
+ font-size: 12px;
104
+ transition: all 0.2s linear;
105
+ text-transform: uppercase;
106
+ text-align: center;
107
+ letter-spacing: 0;
108
+ }
109
+ .FilterModalHeader .FilterModalButton:hover,
110
+ .FilterModalBody .FilterModalButton:hover,
111
+ .FilterModalFooter .FilterModalButton:hover {
112
+ background: #00958f;
113
+ color: #FFF;
114
+ }
115
+ .FilterModalHeader p,
116
+ .FilterModalBody p,
117
+ .FilterModalFooter p {
118
+ margin: 5px 0;
119
+ }
@@ -0,0 +1,402 @@
1
+ import { Component, h, State, Prop, Event, Listen } from '@stencil/core';
2
+ import { translate } from '../../utils/locale.utils';
3
+ import '@vaadin/date-picker';
4
+ import '@everymatrix/helper-modal';
5
+ export class HelperFilters {
6
+ constructor() {
7
+ /**
8
+ * Check if show the filter option by id
9
+ */
10
+ this.showFilterId = true;
11
+ /**
12
+ * Choose if filter by draw ID or ticket ID. By default is draw ID.
13
+ */
14
+ this.activateTicketSearch = false;
15
+ /**
16
+ * Game ID
17
+ */
18
+ this.gameId = '';
19
+ /**
20
+ * Player ID
21
+ */
22
+ this.playerId = '';
23
+ /**
24
+ * Session ID
25
+ */
26
+ this.session = '';
27
+ /**
28
+ * Instead of customEvents the widget triggers postMessages
29
+ */
30
+ this.postMessage = false;
31
+ /**
32
+ * Language
33
+ */
34
+ this.language = 'en';
35
+ /**
36
+ * Notifies if the quick filters from tickets are active
37
+ */
38
+ this.quickFiltersActive = false;
39
+ /**
40
+ * Client custom styling via string
41
+ */
42
+ this.clientStyling = '';
43
+ /**
44
+ * Client custom styling via url content
45
+ */
46
+ this.clientStylingUrlContent = '';
47
+ this.showFilterModal = false;
48
+ this.showClearButton = false;
49
+ this.filterData = {};
50
+ this.filterDataReset = { ticketDrawId: '', filterFromCalendar: '', filterToCalendar: '' };
51
+ this.limitStylingAppends = false;
52
+ this.setClientStyling = () => {
53
+ let sheet = document.createElement('style');
54
+ sheet.innerHTML = this.clientStyling;
55
+ this.stylingContainer.prepend(sheet);
56
+ };
57
+ this.setClientStylingURL = () => {
58
+ let cssFile = document.createElement('style');
59
+ setTimeout(() => {
60
+ cssFile.innerHTML = this.clientStylingUrlContent;
61
+ this.stylingContainer.prepend(cssFile);
62
+ }, 1);
63
+ };
64
+ }
65
+ // reset field values each time the filter modal opens
66
+ componentDidRender() {
67
+ // @TODO: to way binding?
68
+ if (document.getElementById('#FilterById'))
69
+ document.getElementById('#FilterById').value = '';
70
+ // start custom styling area
71
+ if (!this.limitStylingAppends && this.stylingContainer) {
72
+ if (this.clientStyling)
73
+ this.setClientStyling();
74
+ if (this.clientStylingUrlContent)
75
+ this.setClientStylingURL();
76
+ this.limitStylingAppends = true;
77
+ }
78
+ // end custom styling area
79
+ }
80
+ filterSelectionHandler(event) {
81
+ if (this.postMessage)
82
+ window.postMessage({ type: 'filterSelection', event }, window.location.href);
83
+ if (this.filterData.ticketDrawId || this.filterData.filterFromCalendar || this.filterData.filterToCalendar)
84
+ this.filterSelection.emit(event);
85
+ }
86
+ filterSelectionResetHandler(event) {
87
+ if (this.postMessage)
88
+ window.postMessage({ type: 'filterSelectionReset', event }, window.location.href);
89
+ this.filterSelectionReset.emit(event);
90
+ }
91
+ modalCloseEvent() {
92
+ this.showFilterModal = false;
93
+ }
94
+ // Toggle filter modal
95
+ toggleFilterModal() {
96
+ this.showFilterModal = true;
97
+ }
98
+ // Filter search
99
+ filterSearch() {
100
+ this.modalCloseEvent();
101
+ this.showClearButton = true;
102
+ this.filterSelectionHandler(this.filterData);
103
+ console.log(this.showClearButton);
104
+ }
105
+ resetSearch() {
106
+ this.showClearButton = false;
107
+ this.filterSelectionResetHandler(this.filterDataReset);
108
+ this.filterData = {};
109
+ }
110
+ handleTicketDrawId(event) {
111
+ this.filterData.ticketDrawId = event.target.value;
112
+ }
113
+ handleFilterFrom(event) {
114
+ this.filterData.filterFromCalendar = new Date(event.target.value).toISOString();
115
+ }
116
+ handleFilterTo(event) {
117
+ this.filterData.filterToCalendar = new Date(event.target.value).toISOString();
118
+ }
119
+ render() {
120
+ return (h("div", { class: "HelperFilters", ref: el => this.stylingContainer = el },
121
+ h("div", { class: "FilterButtonsWrapper" },
122
+ h("button", { class: "FilterOpen", onClick: () => this.toggleFilterModal() }, translate('filterOpen', this.language)),
123
+ console.log('in filter Open', this.showClearButton, this.quickFiltersActive),
124
+ (this.showClearButton || this.quickFiltersActive) ?
125
+ h("button", { class: "FilterClear", onClick: () => this.resetSearch() }, translate('filterClear', this.language))
126
+ :
127
+ null),
128
+ h("helper-modal", { "title-modal": "Filter Modal", visible: this.showFilterModal, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent },
129
+ h("div", { class: "FilterModalHeader" },
130
+ h("h3", { class: "FilterModalTitle" }, this.activateTicketSearch ? translate('filterModalTicketTitle', this.language) : translate('filterModalDrawTitle', this.language))),
131
+ h("div", { class: "FilterModalBody" },
132
+ h("input", { id: "FilterById", type: "text", value: this.filterData.ticketDrawId, onInput: (event) => this.handleTicketDrawId(event), class: "FilterModalSearch", placeholder: this.activateTicketSearch ? translate('filterTicketPlaceholder', this.language) : translate('filterDrawPlaceholder', this.language) }),
133
+ h("p", null, translate('filterOrDate', this.language)),
134
+ h("div", { class: "FilterCalendarWrapper" },
135
+ h("vaadin-date-picker", { value: this.filterData.filterFromCalendar, onChange: (event) => this.handleFilterFrom(event), placeholder: translate('filterFromCalendar', this.language), class: "VaadinDatePicker" }),
136
+ h("vaadin-date-picker", { value: this.filterData.filterToCalendar, onChange: (event) => this.handleFilterTo(event), placeholder: translate('filterToCalendar', this.language), class: "VaadinDatePicker" }))),
137
+ h("div", { class: "FilterModalFooter" },
138
+ h("button", { class: "FilterModalButton", onClick: () => this.filterSearch() }, translate('filterModalButton', this.language))))));
139
+ }
140
+ static get is() { return "helper-filters"; }
141
+ static get encapsulation() { return "shadow"; }
142
+ static get originalStyleUrls() { return {
143
+ "$": ["helper-filters.scss"]
144
+ }; }
145
+ static get styleUrls() { return {
146
+ "$": ["helper-filters.css"]
147
+ }; }
148
+ static get properties() { return {
149
+ "showFilterId": {
150
+ "type": "boolean",
151
+ "mutable": false,
152
+ "complexType": {
153
+ "original": "boolean",
154
+ "resolved": "boolean",
155
+ "references": {}
156
+ },
157
+ "required": false,
158
+ "optional": false,
159
+ "docs": {
160
+ "tags": [],
161
+ "text": "Check if show the filter option by id"
162
+ },
163
+ "attribute": "show-filter-id",
164
+ "reflect": true,
165
+ "defaultValue": "true"
166
+ },
167
+ "activateTicketSearch": {
168
+ "type": "boolean",
169
+ "mutable": false,
170
+ "complexType": {
171
+ "original": "boolean",
172
+ "resolved": "boolean",
173
+ "references": {}
174
+ },
175
+ "required": false,
176
+ "optional": false,
177
+ "docs": {
178
+ "tags": [],
179
+ "text": "Choose if filter by draw ID or ticket ID. By default is draw ID."
180
+ },
181
+ "attribute": "activate-ticket-search",
182
+ "reflect": true,
183
+ "defaultValue": "false"
184
+ },
185
+ "gameId": {
186
+ "type": "string",
187
+ "mutable": false,
188
+ "complexType": {
189
+ "original": "string",
190
+ "resolved": "string",
191
+ "references": {}
192
+ },
193
+ "required": false,
194
+ "optional": false,
195
+ "docs": {
196
+ "tags": [],
197
+ "text": "Game ID"
198
+ },
199
+ "attribute": "game-id",
200
+ "reflect": true,
201
+ "defaultValue": "''"
202
+ },
203
+ "playerId": {
204
+ "type": "string",
205
+ "mutable": false,
206
+ "complexType": {
207
+ "original": "string",
208
+ "resolved": "string",
209
+ "references": {}
210
+ },
211
+ "required": false,
212
+ "optional": false,
213
+ "docs": {
214
+ "tags": [],
215
+ "text": "Player ID"
216
+ },
217
+ "attribute": "player-id",
218
+ "reflect": true,
219
+ "defaultValue": "''"
220
+ },
221
+ "session": {
222
+ "type": "string",
223
+ "mutable": false,
224
+ "complexType": {
225
+ "original": "string",
226
+ "resolved": "string",
227
+ "references": {}
228
+ },
229
+ "required": false,
230
+ "optional": false,
231
+ "docs": {
232
+ "tags": [],
233
+ "text": "Session ID"
234
+ },
235
+ "attribute": "session",
236
+ "reflect": true,
237
+ "defaultValue": "''"
238
+ },
239
+ "postMessage": {
240
+ "type": "boolean",
241
+ "mutable": false,
242
+ "complexType": {
243
+ "original": "boolean",
244
+ "resolved": "boolean",
245
+ "references": {}
246
+ },
247
+ "required": false,
248
+ "optional": false,
249
+ "docs": {
250
+ "tags": [],
251
+ "text": "Instead of customEvents the widget triggers postMessages"
252
+ },
253
+ "attribute": "post-message",
254
+ "reflect": true,
255
+ "defaultValue": "false"
256
+ },
257
+ "language": {
258
+ "type": "string",
259
+ "mutable": false,
260
+ "complexType": {
261
+ "original": "string",
262
+ "resolved": "string",
263
+ "references": {}
264
+ },
265
+ "required": false,
266
+ "optional": false,
267
+ "docs": {
268
+ "tags": [],
269
+ "text": "Language"
270
+ },
271
+ "attribute": "language",
272
+ "reflect": true,
273
+ "defaultValue": "'en'"
274
+ },
275
+ "quickFiltersActive": {
276
+ "type": "boolean",
277
+ "mutable": false,
278
+ "complexType": {
279
+ "original": "boolean",
280
+ "resolved": "boolean",
281
+ "references": {}
282
+ },
283
+ "required": false,
284
+ "optional": false,
285
+ "docs": {
286
+ "tags": [],
287
+ "text": "Notifies if the quick filters from tickets are active"
288
+ },
289
+ "attribute": "quick-filters-active",
290
+ "reflect": true,
291
+ "defaultValue": "false"
292
+ },
293
+ "clientStyling": {
294
+ "type": "string",
295
+ "mutable": false,
296
+ "complexType": {
297
+ "original": "string",
298
+ "resolved": "string",
299
+ "references": {}
300
+ },
301
+ "required": false,
302
+ "optional": false,
303
+ "docs": {
304
+ "tags": [],
305
+ "text": "Client custom styling via string"
306
+ },
307
+ "attribute": "client-styling",
308
+ "reflect": true,
309
+ "defaultValue": "''"
310
+ },
311
+ "clientStylingUrlContent": {
312
+ "type": "string",
313
+ "mutable": false,
314
+ "complexType": {
315
+ "original": "string",
316
+ "resolved": "string",
317
+ "references": {}
318
+ },
319
+ "required": false,
320
+ "optional": false,
321
+ "docs": {
322
+ "tags": [],
323
+ "text": "Client custom styling via url content"
324
+ },
325
+ "attribute": "client-styling-url-content",
326
+ "reflect": true,
327
+ "defaultValue": "''"
328
+ }
329
+ }; }
330
+ static get states() { return {
331
+ "showFilterModal": {},
332
+ "showClearButton": {},
333
+ "filterData": {},
334
+ "filterDataReset": {},
335
+ "limitStylingAppends": {}
336
+ }; }
337
+ static get events() { return [{
338
+ "method": "filterDraw",
339
+ "name": "filterDraw",
340
+ "bubbles": true,
341
+ "cancelable": true,
342
+ "composed": true,
343
+ "docs": {
344
+ "tags": [],
345
+ "text": ""
346
+ },
347
+ "complexType": {
348
+ "original": "HelperFilters",
349
+ "resolved": "HelperFilters",
350
+ "references": {
351
+ "HelperFilters": {
352
+ "location": "global"
353
+ }
354
+ }
355
+ }
356
+ }, {
357
+ "method": "filterSelection",
358
+ "name": "filterSelection",
359
+ "bubbles": true,
360
+ "cancelable": true,
361
+ "composed": true,
362
+ "docs": {
363
+ "tags": [],
364
+ "text": ""
365
+ },
366
+ "complexType": {
367
+ "original": "HelperFilters",
368
+ "resolved": "HelperFilters",
369
+ "references": {
370
+ "HelperFilters": {
371
+ "location": "global"
372
+ }
373
+ }
374
+ }
375
+ }, {
376
+ "method": "filterSelectionReset",
377
+ "name": "filterSelectionReset",
378
+ "bubbles": true,
379
+ "cancelable": true,
380
+ "composed": true,
381
+ "docs": {
382
+ "tags": [],
383
+ "text": ""
384
+ },
385
+ "complexType": {
386
+ "original": "HelperFilters",
387
+ "resolved": "HelperFilters",
388
+ "references": {
389
+ "HelperFilters": {
390
+ "location": "global"
391
+ }
392
+ }
393
+ }
394
+ }]; }
395
+ static get listeners() { return [{
396
+ "name": "modalCloseEvent",
397
+ "method": "modalCloseEvent",
398
+ "target": undefined,
399
+ "capture": false,
400
+ "passive": false
401
+ }]; }
402
+ }
@@ -0,0 +1 @@
1
+ export * from './components';
@@ -0,0 +1,71 @@
1
+ const DEFAULT_LANGUAGE = 'en';
2
+ const SUPPORTED_LANGUAGES = ['ro', 'en', 'hr'];
3
+ const TRANSLATIONS = {
4
+ en: {
5
+ filterOpen: 'Filter',
6
+ filterClear: 'Clear',
7
+ filterModalTicketTitle: 'Ticket Results',
8
+ filterModalDrawTitle: 'Draws Results History',
9
+ filterTicketPlaceholder: 'Search for a ticket ID',
10
+ filterDrawPlaceholder: 'Search for a draw ID',
11
+ filterDateRangePlaceholder: 'Date Range',
12
+ filterModalButton: 'Search',
13
+ filterFromCalendar: 'From',
14
+ filterToCalendar: 'To',
15
+ filterOrDate: 'or search by date'
16
+ },
17
+ ro: {
18
+ filterOpen: 'Filtrare',
19
+ filterClear: 'Stergere',
20
+ filterModalTicketTitle: 'Rezultatele biletelor',
21
+ filterModalDrawTitle: 'Rezultatele draw-urilor',
22
+ filterTicketPlaceholder: 'Cauta ID bilet',
23
+ filterDrawPlaceholder: 'Cauta ID draw',
24
+ filterDateRangePlaceholder: 'Perioada',
25
+ filterModalButton: 'Cauta',
26
+ filterOrDate: 'sau cauta dupa data'
27
+ },
28
+ fr: {
29
+ filterOpen: 'Filter',
30
+ filterClear: 'Clear',
31
+ filterModalTicketTitle: 'Ticket Results',
32
+ filterModalDrawTitle: 'Draws Results History',
33
+ filterTicketPlaceholder: 'Search for a ticket ID',
34
+ filterDrawPlaceholder: 'Search for a draw ID',
35
+ filterDateRangePlaceholder: 'Date Range',
36
+ filterModalButton: 'Search',
37
+ filterFromCalendar: 'From',
38
+ filterToCalendar: 'To',
39
+ filterOrDate: 'or search by date'
40
+ },
41
+ ar: {
42
+ filterOpen: 'Filter',
43
+ filterClear: 'Clear',
44
+ filterModalTicketTitle: 'Ticket Results',
45
+ filterModalDrawTitle: 'Draws Results History',
46
+ filterTicketPlaceholder: 'Search for a ticket ID',
47
+ filterDrawPlaceholder: 'Search for a draw ID',
48
+ filterDateRangePlaceholder: 'Date Range',
49
+ filterModalButton: 'Search',
50
+ filterFromCalendar: 'From',
51
+ filterToCalendar: 'To',
52
+ filterOrDate: 'or search by date'
53
+ },
54
+ hr: {
55
+ filterOpen: 'Filter',
56
+ filterClear: 'Očisti',
57
+ filterModalTicketTitle: 'Rezultati listića',
58
+ filterModalDrawTitle: 'Povijest rezultata Izvlačenja',
59
+ filterTicketPlaceholder: 'Pretraga ID listića',
60
+ filterDrawPlaceholder: 'Pretraga ID izvlačenja',
61
+ filterDateRangePlaceholder: 'Raspon datuma',
62
+ filterModalButton: 'Traži',
63
+ filterFromCalendar: 'Od',
64
+ filterToCalendar: 'Do',
65
+ filterOrDate: 'ili tražite po datumu'
66
+ }
67
+ };
68
+ export const translate = (key, customLang) => {
69
+ const lang = customLang;
70
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
71
+ };
@@ -0,0 +1,3 @@
1
+ export function format(first, middle, last) {
2
+ return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));
3
+ }
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface HelperFilters extends Components.HelperFilters, HTMLElement {}
4
+ export const HelperFilters: {
5
+ prototype: HelperFilters;
6
+ new (): HelperFilters;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;