@everymatrix/lottery-tipping-dialog 0.0.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.
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/index-cce3295b.js +1232 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/lottery-tipping-dialog-436fb642.js +204 -0
- package/dist/cjs/lottery-tipping-dialog.cjs.entry.js +10 -0
- package/dist/cjs/lottery-tipping-dialog.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/lottery-tipping-dialog/index.js +1 -0
- package/dist/collection/components/lottery-tipping-dialog/lottery-tipping-dialog.css +138 -0
- package/dist/collection/components/lottery-tipping-dialog/lottery-tipping-dialog.js +479 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +35 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-2e1dbc99.js +1204 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/lottery-tipping-dialog-bcbb9b50.js +202 -0
- package/dist/esm/lottery-tipping-dialog.entry.js +2 -0
- package/dist/esm/lottery-tipping-dialog.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/lottery-tipping-dialog/app-globals-0f993ce5.js +1 -0
- package/dist/lottery-tipping-dialog/index-2e1dbc99.js +2 -0
- package/dist/lottery-tipping-dialog/index.esm.js +1 -0
- package/dist/lottery-tipping-dialog/lottery-tipping-dialog-bcbb9b50.js +1 -0
- package/dist/lottery-tipping-dialog/lottery-tipping-dialog.entry.js +1 -0
- package/dist/lottery-tipping-dialog/lottery-tipping-dialog.esm.js +1 -0
- package/dist/stencil.config.dev.js +19 -0
- package/dist/stencil.config.js +19 -0
- package/dist/storybook/main.js +43 -0
- package/dist/storybook/preview.js +9 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-tipping-dialog/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-tipping-dialog/.stencil/packages/stencil/lottery-tipping-dialog/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-tipping-dialog/.stencil/packages/stencil/lottery-tipping-dialog/stencil.config.dev.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-tipping-dialog/.stencil/packages/stencil/lottery-tipping-dialog/storybook/main.d.ts +3 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-tipping-dialog/.stencil/packages/stencil/lottery-tipping-dialog/storybook/preview.d.ts +70 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-tipping-dialog/.stencil/tools/plugins/index.d.ts +3 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-tipping-dialog/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-tipping-dialog/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-tipping-dialog/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
- package/dist/types/components/lottery-tipping-dialog/index.d.ts +1 -0
- package/dist/types/components/lottery-tipping-dialog/lottery-tipping-dialog.d.ts +92 -0
- package/dist/types/components.d.ts +197 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/locale.utils.d.ts +2 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +27 -0
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { translate, getTranslations } from "../../utils/locale.utils";
|
|
3
|
+
import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
|
|
4
|
+
export class LotteryTippingDialog {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.wasVisible = false;
|
|
7
|
+
this.mbSource = undefined;
|
|
8
|
+
this.clientStyling = '';
|
|
9
|
+
this.clientStylingUrl = '';
|
|
10
|
+
this.visible = undefined;
|
|
11
|
+
this.dialogTitle = '';
|
|
12
|
+
this.width = '520px';
|
|
13
|
+
this.closable = true;
|
|
14
|
+
this.mask = true;
|
|
15
|
+
this.maskClosable = true;
|
|
16
|
+
this.animationDuration = 300;
|
|
17
|
+
this.fullscreen = false;
|
|
18
|
+
this.showFooter = true;
|
|
19
|
+
this.showCancelBtn = true;
|
|
20
|
+
this.language = 'en';
|
|
21
|
+
this.translationUrl = undefined;
|
|
22
|
+
}
|
|
23
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
24
|
+
if (newValue != oldValue) {
|
|
25
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
29
|
+
if (newValue != oldValue) {
|
|
30
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
34
|
+
if (newValue != oldValue) {
|
|
35
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
componentWillLoad() {
|
|
39
|
+
if (this.translationUrl) {
|
|
40
|
+
getTranslations(JSON.parse(this.translationUrl));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
componentWillUpdate() {
|
|
44
|
+
if (this.visible && !this.wasVisible) {
|
|
45
|
+
this.disableBodyScroll();
|
|
46
|
+
}
|
|
47
|
+
else if (!this.visible && this.wasVisible) {
|
|
48
|
+
this.enableBodyScroll();
|
|
49
|
+
}
|
|
50
|
+
this.wasVisible = this.visible;
|
|
51
|
+
}
|
|
52
|
+
disconnectedCallback() {
|
|
53
|
+
this.enableBodyScroll();
|
|
54
|
+
}
|
|
55
|
+
disableBodyScroll() {
|
|
56
|
+
document.body.style.overflow = 'hidden';
|
|
57
|
+
}
|
|
58
|
+
enableBodyScroll() {
|
|
59
|
+
document.body.style.overflow = '';
|
|
60
|
+
}
|
|
61
|
+
handleClose() {
|
|
62
|
+
this.visible = false;
|
|
63
|
+
this.cancel.emit();
|
|
64
|
+
}
|
|
65
|
+
handleMaskClick(e) {
|
|
66
|
+
if (this.maskClosable && e.target === this.el.querySelector('.mask')) {
|
|
67
|
+
this.visible = false;
|
|
68
|
+
this.cancel.emit();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
handleConfirm() {
|
|
72
|
+
this.visible = false;
|
|
73
|
+
this.confirm.emit();
|
|
74
|
+
}
|
|
75
|
+
render() {
|
|
76
|
+
const dialogStyle = {
|
|
77
|
+
width: typeof this.width === 'number' ? `${this.width}px` : this.width,
|
|
78
|
+
'--duration': `${this.animationDuration}ms`
|
|
79
|
+
};
|
|
80
|
+
const dialogWrapperClass = ['dialog-wrapper', this.visible ? 'dialog-wrapper-visible' : ''];
|
|
81
|
+
const maskClass = ['mask', this.visible ? 'mask-enter' : 'mask-leave'];
|
|
82
|
+
const dialogClass = [
|
|
83
|
+
'dialog',
|
|
84
|
+
this.visible ? 'dialog-enter' : 'dialog-leave',
|
|
85
|
+
this.fullscreen ? 'fullscreen' : ''
|
|
86
|
+
].join(' ');
|
|
87
|
+
const contentStyle = {
|
|
88
|
+
maxHeight: 'calc(100vh - 62px)',
|
|
89
|
+
overflowY: 'auto'
|
|
90
|
+
};
|
|
91
|
+
return (h("div", { key: 'cf311658c951f1d8af6d015f02b30e5cfd14e972', class: dialogWrapperClass.join(' ') }, h("div", { key: 'bec49cd133029ca0db51462db39a6b1957d285c7', class: maskClass.join(' '), onClick: this.handleMaskClick.bind(this) }), h("div", { key: '7d9b2faf2fee0d483acfc00e4820d0aac82a718a', class: dialogClass, style: dialogStyle, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-title" }, h("div", { key: '9d4c2471258cab88ad9ed6a05e513815d96f13a9', class: "dialog-header" }, h("h2", { key: '8bd30b19c31eb9fddebe8d19c6af454a89f5d234', id: "dialog-title", class: "dialog-title" }, this.dialogTitle), this.closable && (h("button", { key: 'f8e4dfebc9506a6aa79e1c68abdd42686a7bbc2f', class: "close-btn", onClick: this.handleClose.bind(this) }, "x"))), h("div", { key: 'b21127dfcb5912d35d41260798d82c15b59335ef', class: "dialog-content", style: contentStyle }, h("slot", { key: 'ca0dedda350d3aef9e54202f8e7add236d0a8795' })), this.showFooter && (h("div", { key: '2d7ccaf4414d509f30db1909948452efaf74aec1', class: "dialog-footer" }, h("slot", { key: '1f6d67f646936756abe1edf768dd37418683815f', name: "footer" }, this.showCancelBtn && (h("button", { key: '92055092b2978c41eabed218b73e242cafe4accc', class: "cancel-btn", onClick: this.handleClose.bind(this) }, translate('cancel', this.language))), h("button", { key: 'c950eefc68feb4546665105a0e2d0f2300183d8f', class: "confirm-btn", onClick: this.handleConfirm.bind(this) }, translate('confirm', this.language))))))));
|
|
92
|
+
}
|
|
93
|
+
static get is() { return "lottery-tipping-dialog"; }
|
|
94
|
+
static get encapsulation() { return "shadow"; }
|
|
95
|
+
static get originalStyleUrls() {
|
|
96
|
+
return {
|
|
97
|
+
"$": ["lottery-tipping-dialog.scss"]
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
static get styleUrls() {
|
|
101
|
+
return {
|
|
102
|
+
"$": ["lottery-tipping-dialog.css"]
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
static get properties() {
|
|
106
|
+
return {
|
|
107
|
+
"mbSource": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"mutable": false,
|
|
110
|
+
"complexType": {
|
|
111
|
+
"original": "string",
|
|
112
|
+
"resolved": "string",
|
|
113
|
+
"references": {}
|
|
114
|
+
},
|
|
115
|
+
"required": false,
|
|
116
|
+
"optional": false,
|
|
117
|
+
"docs": {
|
|
118
|
+
"tags": [],
|
|
119
|
+
"text": "Client custom styling via streamStyling"
|
|
120
|
+
},
|
|
121
|
+
"attribute": "mb-source",
|
|
122
|
+
"reflect": false
|
|
123
|
+
},
|
|
124
|
+
"clientStyling": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"mutable": false,
|
|
127
|
+
"complexType": {
|
|
128
|
+
"original": "string",
|
|
129
|
+
"resolved": "string",
|
|
130
|
+
"references": {}
|
|
131
|
+
},
|
|
132
|
+
"required": false,
|
|
133
|
+
"optional": false,
|
|
134
|
+
"docs": {
|
|
135
|
+
"tags": [],
|
|
136
|
+
"text": "Client custom styling via string"
|
|
137
|
+
},
|
|
138
|
+
"attribute": "client-styling",
|
|
139
|
+
"reflect": true,
|
|
140
|
+
"defaultValue": "''"
|
|
141
|
+
},
|
|
142
|
+
"clientStylingUrl": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"mutable": false,
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "string",
|
|
147
|
+
"resolved": "string",
|
|
148
|
+
"references": {}
|
|
149
|
+
},
|
|
150
|
+
"required": false,
|
|
151
|
+
"optional": false,
|
|
152
|
+
"docs": {
|
|
153
|
+
"tags": [],
|
|
154
|
+
"text": "Client custom styling via url"
|
|
155
|
+
},
|
|
156
|
+
"attribute": "client-styling-url",
|
|
157
|
+
"reflect": true,
|
|
158
|
+
"defaultValue": "''"
|
|
159
|
+
},
|
|
160
|
+
"visible": {
|
|
161
|
+
"type": "boolean",
|
|
162
|
+
"mutable": false,
|
|
163
|
+
"complexType": {
|
|
164
|
+
"original": "boolean",
|
|
165
|
+
"resolved": "boolean",
|
|
166
|
+
"references": {}
|
|
167
|
+
},
|
|
168
|
+
"required": false,
|
|
169
|
+
"optional": false,
|
|
170
|
+
"docs": {
|
|
171
|
+
"tags": [],
|
|
172
|
+
"text": "Controls whether the dialog is visible or hidden"
|
|
173
|
+
},
|
|
174
|
+
"attribute": "visible",
|
|
175
|
+
"reflect": true
|
|
176
|
+
},
|
|
177
|
+
"dialogTitle": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"mutable": false,
|
|
180
|
+
"complexType": {
|
|
181
|
+
"original": "string",
|
|
182
|
+
"resolved": "string",
|
|
183
|
+
"references": {}
|
|
184
|
+
},
|
|
185
|
+
"required": false,
|
|
186
|
+
"optional": false,
|
|
187
|
+
"docs": {
|
|
188
|
+
"tags": [],
|
|
189
|
+
"text": "Text content for the dialog title"
|
|
190
|
+
},
|
|
191
|
+
"attribute": "dialog-title",
|
|
192
|
+
"reflect": false,
|
|
193
|
+
"defaultValue": "''"
|
|
194
|
+
},
|
|
195
|
+
"width": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"mutable": false,
|
|
198
|
+
"complexType": {
|
|
199
|
+
"original": "string",
|
|
200
|
+
"resolved": "string",
|
|
201
|
+
"references": {}
|
|
202
|
+
},
|
|
203
|
+
"required": false,
|
|
204
|
+
"optional": false,
|
|
205
|
+
"docs": {
|
|
206
|
+
"tags": [{
|
|
207
|
+
"name": "default",
|
|
208
|
+
"text": "'520px'"
|
|
209
|
+
}],
|
|
210
|
+
"text": "Width of the dialog, accepts number (pixels) or string (e.g. '50%')"
|
|
211
|
+
},
|
|
212
|
+
"attribute": "width",
|
|
213
|
+
"reflect": false,
|
|
214
|
+
"defaultValue": "'520px'"
|
|
215
|
+
},
|
|
216
|
+
"closable": {
|
|
217
|
+
"type": "boolean",
|
|
218
|
+
"mutable": false,
|
|
219
|
+
"complexType": {
|
|
220
|
+
"original": "boolean",
|
|
221
|
+
"resolved": "boolean",
|
|
222
|
+
"references": {}
|
|
223
|
+
},
|
|
224
|
+
"required": false,
|
|
225
|
+
"optional": false,
|
|
226
|
+
"docs": {
|
|
227
|
+
"tags": [{
|
|
228
|
+
"name": "default",
|
|
229
|
+
"text": "true"
|
|
230
|
+
}],
|
|
231
|
+
"text": "Whether to display the close button"
|
|
232
|
+
},
|
|
233
|
+
"attribute": "closable",
|
|
234
|
+
"reflect": false,
|
|
235
|
+
"defaultValue": "true"
|
|
236
|
+
},
|
|
237
|
+
"mask": {
|
|
238
|
+
"type": "boolean",
|
|
239
|
+
"mutable": false,
|
|
240
|
+
"complexType": {
|
|
241
|
+
"original": "boolean",
|
|
242
|
+
"resolved": "boolean",
|
|
243
|
+
"references": {}
|
|
244
|
+
},
|
|
245
|
+
"required": false,
|
|
246
|
+
"optional": false,
|
|
247
|
+
"docs": {
|
|
248
|
+
"tags": [{
|
|
249
|
+
"name": "default",
|
|
250
|
+
"text": "true"
|
|
251
|
+
}],
|
|
252
|
+
"text": "Whether to display the close button"
|
|
253
|
+
},
|
|
254
|
+
"attribute": "mask",
|
|
255
|
+
"reflect": false,
|
|
256
|
+
"defaultValue": "true"
|
|
257
|
+
},
|
|
258
|
+
"maskClosable": {
|
|
259
|
+
"type": "boolean",
|
|
260
|
+
"mutable": false,
|
|
261
|
+
"complexType": {
|
|
262
|
+
"original": "boolean",
|
|
263
|
+
"resolved": "boolean",
|
|
264
|
+
"references": {}
|
|
265
|
+
},
|
|
266
|
+
"required": false,
|
|
267
|
+
"optional": false,
|
|
268
|
+
"docs": {
|
|
269
|
+
"tags": [{
|
|
270
|
+
"name": "default",
|
|
271
|
+
"text": "true"
|
|
272
|
+
}],
|
|
273
|
+
"text": "Whether clicking the mask layer can close the dialog"
|
|
274
|
+
},
|
|
275
|
+
"attribute": "mask-closable",
|
|
276
|
+
"reflect": false,
|
|
277
|
+
"defaultValue": "true"
|
|
278
|
+
},
|
|
279
|
+
"animationDuration": {
|
|
280
|
+
"type": "number",
|
|
281
|
+
"mutable": false,
|
|
282
|
+
"complexType": {
|
|
283
|
+
"original": "number",
|
|
284
|
+
"resolved": "number",
|
|
285
|
+
"references": {}
|
|
286
|
+
},
|
|
287
|
+
"required": false,
|
|
288
|
+
"optional": false,
|
|
289
|
+
"docs": {
|
|
290
|
+
"tags": [{
|
|
291
|
+
"name": "default",
|
|
292
|
+
"text": "300"
|
|
293
|
+
}],
|
|
294
|
+
"text": "Duration of the dialog animation in milliseconds"
|
|
295
|
+
},
|
|
296
|
+
"attribute": "animation-duration",
|
|
297
|
+
"reflect": false,
|
|
298
|
+
"defaultValue": "300"
|
|
299
|
+
},
|
|
300
|
+
"fullscreen": {
|
|
301
|
+
"type": "boolean",
|
|
302
|
+
"mutable": false,
|
|
303
|
+
"complexType": {
|
|
304
|
+
"original": "boolean",
|
|
305
|
+
"resolved": "boolean",
|
|
306
|
+
"references": {}
|
|
307
|
+
},
|
|
308
|
+
"required": false,
|
|
309
|
+
"optional": false,
|
|
310
|
+
"docs": {
|
|
311
|
+
"tags": [{
|
|
312
|
+
"name": "default",
|
|
313
|
+
"text": "false"
|
|
314
|
+
}],
|
|
315
|
+
"text": "Whether the dialog should be displayed in fullscreen mode"
|
|
316
|
+
},
|
|
317
|
+
"attribute": "fullscreen",
|
|
318
|
+
"reflect": false,
|
|
319
|
+
"defaultValue": "false"
|
|
320
|
+
},
|
|
321
|
+
"showFooter": {
|
|
322
|
+
"type": "boolean",
|
|
323
|
+
"mutable": false,
|
|
324
|
+
"complexType": {
|
|
325
|
+
"original": "boolean",
|
|
326
|
+
"resolved": "boolean",
|
|
327
|
+
"references": {}
|
|
328
|
+
},
|
|
329
|
+
"required": false,
|
|
330
|
+
"optional": false,
|
|
331
|
+
"docs": {
|
|
332
|
+
"tags": [{
|
|
333
|
+
"name": "default",
|
|
334
|
+
"text": "true"
|
|
335
|
+
}],
|
|
336
|
+
"text": "Whether to show the footer with action buttons"
|
|
337
|
+
},
|
|
338
|
+
"attribute": "show-footer",
|
|
339
|
+
"reflect": false,
|
|
340
|
+
"defaultValue": "true"
|
|
341
|
+
},
|
|
342
|
+
"showCancelBtn": {
|
|
343
|
+
"type": "boolean",
|
|
344
|
+
"mutable": false,
|
|
345
|
+
"complexType": {
|
|
346
|
+
"original": "boolean",
|
|
347
|
+
"resolved": "boolean",
|
|
348
|
+
"references": {}
|
|
349
|
+
},
|
|
350
|
+
"required": false,
|
|
351
|
+
"optional": false,
|
|
352
|
+
"docs": {
|
|
353
|
+
"tags": [{
|
|
354
|
+
"name": "default",
|
|
355
|
+
"text": "true"
|
|
356
|
+
}],
|
|
357
|
+
"text": "Whether to show the cancel button (only effective when showFooter is true)"
|
|
358
|
+
},
|
|
359
|
+
"attribute": "show-cancel-btn",
|
|
360
|
+
"reflect": false,
|
|
361
|
+
"defaultValue": "true"
|
|
362
|
+
},
|
|
363
|
+
"language": {
|
|
364
|
+
"type": "string",
|
|
365
|
+
"mutable": false,
|
|
366
|
+
"complexType": {
|
|
367
|
+
"original": "string",
|
|
368
|
+
"resolved": "string",
|
|
369
|
+
"references": {}
|
|
370
|
+
},
|
|
371
|
+
"required": false,
|
|
372
|
+
"optional": false,
|
|
373
|
+
"docs": {
|
|
374
|
+
"tags": [{
|
|
375
|
+
"name": "default",
|
|
376
|
+
"text": "'en'"
|
|
377
|
+
}],
|
|
378
|
+
"text": "Language code used by the component"
|
|
379
|
+
},
|
|
380
|
+
"attribute": "language",
|
|
381
|
+
"reflect": true,
|
|
382
|
+
"defaultValue": "'en'"
|
|
383
|
+
},
|
|
384
|
+
"translationUrl": {
|
|
385
|
+
"type": "any",
|
|
386
|
+
"mutable": false,
|
|
387
|
+
"complexType": {
|
|
388
|
+
"original": "any",
|
|
389
|
+
"resolved": "any",
|
|
390
|
+
"references": {}
|
|
391
|
+
},
|
|
392
|
+
"required": false,
|
|
393
|
+
"optional": true,
|
|
394
|
+
"docs": {
|
|
395
|
+
"tags": [],
|
|
396
|
+
"text": "URL to translation files for loading multilingual configurations"
|
|
397
|
+
},
|
|
398
|
+
"attribute": "translation-url",
|
|
399
|
+
"reflect": true
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
static get events() {
|
|
404
|
+
return [{
|
|
405
|
+
"method": "open",
|
|
406
|
+
"name": "open",
|
|
407
|
+
"bubbles": true,
|
|
408
|
+
"cancelable": true,
|
|
409
|
+
"composed": true,
|
|
410
|
+
"docs": {
|
|
411
|
+
"tags": [],
|
|
412
|
+
"text": ""
|
|
413
|
+
},
|
|
414
|
+
"complexType": {
|
|
415
|
+
"original": "void",
|
|
416
|
+
"resolved": "void",
|
|
417
|
+
"references": {}
|
|
418
|
+
}
|
|
419
|
+
}, {
|
|
420
|
+
"method": "close",
|
|
421
|
+
"name": "close",
|
|
422
|
+
"bubbles": true,
|
|
423
|
+
"cancelable": true,
|
|
424
|
+
"composed": true,
|
|
425
|
+
"docs": {
|
|
426
|
+
"tags": [],
|
|
427
|
+
"text": ""
|
|
428
|
+
},
|
|
429
|
+
"complexType": {
|
|
430
|
+
"original": "void",
|
|
431
|
+
"resolved": "void",
|
|
432
|
+
"references": {}
|
|
433
|
+
}
|
|
434
|
+
}, {
|
|
435
|
+
"method": "confirm",
|
|
436
|
+
"name": "confirm",
|
|
437
|
+
"bubbles": true,
|
|
438
|
+
"cancelable": true,
|
|
439
|
+
"composed": true,
|
|
440
|
+
"docs": {
|
|
441
|
+
"tags": [],
|
|
442
|
+
"text": ""
|
|
443
|
+
},
|
|
444
|
+
"complexType": {
|
|
445
|
+
"original": "void",
|
|
446
|
+
"resolved": "void",
|
|
447
|
+
"references": {}
|
|
448
|
+
}
|
|
449
|
+
}, {
|
|
450
|
+
"method": "cancel",
|
|
451
|
+
"name": "cancel",
|
|
452
|
+
"bubbles": true,
|
|
453
|
+
"cancelable": true,
|
|
454
|
+
"composed": true,
|
|
455
|
+
"docs": {
|
|
456
|
+
"tags": [],
|
|
457
|
+
"text": ""
|
|
458
|
+
},
|
|
459
|
+
"complexType": {
|
|
460
|
+
"original": "void",
|
|
461
|
+
"resolved": "void",
|
|
462
|
+
"references": {}
|
|
463
|
+
}
|
|
464
|
+
}];
|
|
465
|
+
}
|
|
466
|
+
static get elementRef() { return "el"; }
|
|
467
|
+
static get watchers() {
|
|
468
|
+
return [{
|
|
469
|
+
"propName": "clientStyling",
|
|
470
|
+
"methodName": "handleClientStylingChange"
|
|
471
|
+
}, {
|
|
472
|
+
"propName": "clientStylingUrl",
|
|
473
|
+
"methodName": "handleClientStylingUrlChange"
|
|
474
|
+
}, {
|
|
475
|
+
"propName": "mbSource",
|
|
476
|
+
"methodName": "handleMbSourceChange"
|
|
477
|
+
}];
|
|
478
|
+
}
|
|
479
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/lottery-tipping-dialog';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
2
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
3
|
+
const TRANSLATIONS = {
|
|
4
|
+
en: {
|
|
5
|
+
cancel: 'Cancel',
|
|
6
|
+
confirm: 'Confirm'
|
|
7
|
+
},
|
|
8
|
+
ro: {
|
|
9
|
+
cancel: 'Anulează',
|
|
10
|
+
confirm: 'Confirmă'
|
|
11
|
+
},
|
|
12
|
+
fr: {
|
|
13
|
+
cancel: 'Annuler',
|
|
14
|
+
confirm: 'Confirmer'
|
|
15
|
+
},
|
|
16
|
+
ar: {
|
|
17
|
+
cancel: 'إلغاء',
|
|
18
|
+
confirm: 'تأكيد'
|
|
19
|
+
},
|
|
20
|
+
hr: {
|
|
21
|
+
cancel: 'Odustani',
|
|
22
|
+
confirm: 'Potvrdi'
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
export const translate = (key, customLang) => {
|
|
26
|
+
const lang = customLang;
|
|
27
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
28
|
+
};
|
|
29
|
+
export const getTranslations = (data) => {
|
|
30
|
+
Object.keys(data).forEach((item) => {
|
|
31
|
+
for (let key in data[item]) {
|
|
32
|
+
TRANSLATIONS[item][key] = data[item][key];
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
};
|