@everymatrix/general-input 1.31.1 → 1.32.4

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 (136) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +3 -2
  3. package/dist/cjs/checkbox-group-input_10.cjs.entry.js +0 -36077
  4. package/dist/cjs/general-input.cjs.entry.js +0 -75
  5. package/dist/cjs/general-input.cjs.js +0 -19
  6. package/dist/cjs/index-132a0774.js +0 -1327
  7. package/dist/cjs/index.cjs.js +0 -18
  8. package/dist/cjs/loader.cjs.js +0 -21
  9. package/dist/cjs/locale.utils-cef1d3b6.js +0 -128
  10. package/dist/cjs/toggle-checkbox-input.cjs.entry.js +0 -85
  11. package/dist/cjs/tooltipIcon-092a795f.js +0 -5
  12. package/dist/collection/collection-manifest.json +0 -23
  13. package/dist/collection/components/checkbox-group-input/checkbox-group-input.css +0 -82
  14. package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +0 -366
  15. package/dist/collection/components/checkbox-input/checkbox-input.css +0 -68
  16. package/dist/collection/components/checkbox-input/checkbox-input.js +0 -324
  17. package/dist/collection/components/date-input/date-input.css +0 -101
  18. package/dist/collection/components/date-input/date-input.js +0 -396
  19. package/dist/collection/components/email-input/email-input.css +0 -95
  20. package/dist/collection/components/email-input/email-input.js +0 -403
  21. package/dist/collection/components/general-input/general-input.css +0 -4
  22. package/dist/collection/components/general-input/general-input.js +0 -373
  23. package/dist/collection/components/number-input/number-input.css +0 -102
  24. package/dist/collection/components/number-input/number-input.js +0 -368
  25. package/dist/collection/components/password-input/password-input.css +0 -182
  26. package/dist/collection/components/password-input/password-input.js +0 -527
  27. package/dist/collection/components/radio-input/radio-input.css +0 -43
  28. package/dist/collection/components/radio-input/radio-input.js +0 -297
  29. package/dist/collection/components/select-input/select-input.css +0 -122
  30. package/dist/collection/components/select-input/select-input.js +0 -429
  31. package/dist/collection/components/tel-input/tel-input.css +0 -145
  32. package/dist/collection/components/tel-input/tel-input.js +0 -440
  33. package/dist/collection/components/text-input/text-input.css +0 -98
  34. package/dist/collection/components/text-input/text-input.js +0 -448
  35. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.css +0 -82
  36. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +0 -324
  37. package/dist/collection/index.js +0 -17
  38. package/dist/collection/utils/locale.utils.js +0 -123
  39. package/dist/collection/utils/tooltipIcon.svg +0 -5
  40. package/dist/collection/utils/types.js +0 -1
  41. package/dist/collection/utils/utils.js +0 -5
  42. package/dist/components/active-mixin.js +0 -975
  43. package/dist/components/checkbox-group-input.d.ts +0 -11
  44. package/dist/components/checkbox-group-input.js +0 -6
  45. package/dist/components/checkbox-group-input2.js +0 -1078
  46. package/dist/components/checkbox-input.d.ts +0 -11
  47. package/dist/components/checkbox-input.js +0 -6
  48. package/dist/components/checkbox-input2.js +0 -129
  49. package/dist/components/date-input.d.ts +0 -11
  50. package/dist/components/date-input.js +0 -6
  51. package/dist/components/date-input2.js +0 -11556
  52. package/dist/components/email-input.d.ts +0 -11
  53. package/dist/components/email-input.js +0 -6
  54. package/dist/components/email-input2.js +0 -171
  55. package/dist/components/field-mixin.js +0 -12426
  56. package/dist/components/general-input.d.ts +0 -11
  57. package/dist/components/general-input.js +0 -6
  58. package/dist/components/general-input2.js +0 -341
  59. package/dist/components/index.d.ts +0 -26
  60. package/dist/components/index.js +0 -18
  61. package/dist/components/input-field-shared-styles.js +0 -1211
  62. package/dist/components/number-input.d.ts +0 -11
  63. package/dist/components/number-input.js +0 -6
  64. package/dist/components/number-input2.js +0 -158
  65. package/dist/components/password-input.d.ts +0 -11
  66. package/dist/components/password-input.js +0 -6
  67. package/dist/components/password-input2.js +0 -1041
  68. package/dist/components/radio-input.d.ts +0 -11
  69. package/dist/components/radio-input.js +0 -6
  70. package/dist/components/radio-input2.js +0 -114
  71. package/dist/components/select-input.d.ts +0 -11
  72. package/dist/components/select-input.js +0 -6
  73. package/dist/components/select-input2.js +0 -183
  74. package/dist/components/tel-input.d.ts +0 -11
  75. package/dist/components/tel-input.js +0 -6
  76. package/dist/components/tel-input2.js +0 -197
  77. package/dist/components/text-input.d.ts +0 -11
  78. package/dist/components/text-input.js +0 -6
  79. package/dist/components/text-input2.js +0 -199
  80. package/dist/components/toggle-checkbox-input.d.ts +0 -11
  81. package/dist/components/toggle-checkbox-input.js +0 -6
  82. package/dist/components/tooltipIcon.js +0 -127
  83. package/dist/components/vaadin-button.js +0 -490
  84. package/dist/components/vaadin-combo-box.js +0 -4512
  85. package/dist/components/virtual-keyboard-controller.js +0 -2001
  86. package/dist/esm/checkbox-group-input_10.entry.js +0 -36064
  87. package/dist/esm/general-input.entry.js +0 -71
  88. package/dist/esm/general-input.js +0 -17
  89. package/dist/esm/index-db76d5b5.js +0 -1299
  90. package/dist/esm/index.js +0 -16
  91. package/dist/esm/loader.js +0 -17
  92. package/dist/esm/locale.utils-de759721.js +0 -125
  93. package/dist/esm/polyfills/core-js.js +0 -11
  94. package/dist/esm/polyfills/css-shim.js +0 -1
  95. package/dist/esm/polyfills/dom.js +0 -79
  96. package/dist/esm/polyfills/es5-html-element.js +0 -1
  97. package/dist/esm/polyfills/index.js +0 -34
  98. package/dist/esm/polyfills/system.js +0 -6
  99. package/dist/esm/toggle-checkbox-input.entry.js +0 -81
  100. package/dist/esm/tooltipIcon-99c1c7b7.js +0 -3
  101. package/dist/general-input/general-input.esm.js +0 -1
  102. package/dist/general-input/index.esm.js +0 -1
  103. package/dist/general-input/p-10efdf3f.js +0 -1
  104. package/dist/general-input/p-613c3e00.entry.js +0 -1
  105. package/dist/general-input/p-660bcdd1.entry.js +0 -1
  106. package/dist/general-input/p-9b6b0396.entry.js +0 -3646
  107. package/dist/general-input/p-b408093e.js +0 -1
  108. package/dist/general-input/p-f4f4ccda.js +0 -1
  109. package/dist/index.cjs.js +0 -1
  110. package/dist/index.js +0 -1
  111. package/dist/stencil.config.js +0 -22
  112. package/dist/types/Users/sebastian.strulea/Documents/work/widgets-stencil/packages/general-input/.stencil/packages/general-input/stencil.config.d.ts +0 -2
  113. package/dist/types/components/checkbox-group-input/checkbox-group-input.d.ts +0 -74
  114. package/dist/types/components/checkbox-input/checkbox-input.d.ts +0 -65
  115. package/dist/types/components/date-input/date-input.d.ts +0 -84
  116. package/dist/types/components/email-input/email-input.d.ts +0 -80
  117. package/dist/types/components/general-input/general-input.d.ts +0 -75
  118. package/dist/types/components/number-input/number-input.d.ts +0 -74
  119. package/dist/types/components/password-input/password-input.d.ts +0 -91
  120. package/dist/types/components/radio-input/radio-input.d.ts +0 -59
  121. package/dist/types/components/select-input/select-input.d.ts +0 -83
  122. package/dist/types/components/tel-input/tel-input.d.ts +0 -89
  123. package/dist/types/components/text-input/text-input.d.ts +0 -84
  124. package/dist/types/components/toggle-checkbox-input/toggle-checkbox-input.d.ts +0 -67
  125. package/dist/types/components.d.ts +0 -1268
  126. package/dist/types/index.d.ts +0 -1
  127. package/dist/types/stencil-public-runtime.d.ts +0 -1565
  128. package/dist/types/utils/locale.utils.d.ts +0 -17
  129. package/dist/types/utils/types.d.ts +0 -87
  130. package/dist/types/utils/utils.d.ts +0 -1
  131. package/loader/cdn.js +0 -3
  132. package/loader/index.cjs.js +0 -3
  133. package/loader/index.d.ts +0 -12
  134. package/loader/index.es2017.js +0 -3
  135. package/loader/index.js +0 -4
  136. package/loader/package.json +0 -10
@@ -1,324 +0,0 @@
1
- import { Component, h, Prop, State, Event, Listen } from '@stencil/core';
2
- import { translate } from '../../utils/locale.utils';
3
- import tooltipIcon from '../../utils/tooltipIcon.svg';
4
- export class ToggleCheckboxInput {
5
- constructor() {
6
- /**
7
- * Default value for the input.
8
- */
9
- this.defaultValue = '';
10
- /**
11
- * Client custom styling via inline style
12
- */
13
- this.clientStyling = '';
14
- this.limitStylingAppends = false;
15
- this.showTooltip = false;
16
- this.value = '';
17
- this.setClientStyling = () => {
18
- let sheet = document.createElement('style');
19
- sheet.innerHTML = this.clientStyling;
20
- this.stylingContainer.prepend(sheet);
21
- };
22
- }
23
- validityStateHandler(inputStateEvent) {
24
- this.sendValidityState.emit(inputStateEvent);
25
- }
26
- valueHandler(inputValueEvent) {
27
- this.sendInputValue.emit(inputValueEvent);
28
- }
29
- handleClickOutside(event) {
30
- if (event.composedPath()[0] === this.tooltipIconReference)
31
- return;
32
- if (event.composedPath()[0] !== this.tooltipReference)
33
- this.showTooltip = false;
34
- }
35
- componentDidRender() {
36
- // start custom styling area
37
- if (!this.limitStylingAppends && this.stylingContainer) {
38
- if (this.clientStyling)
39
- this.setClientStyling();
40
- this.limitStylingAppends = true;
41
- }
42
- // end custom styling area
43
- }
44
- handleClick() {
45
- this.showFields = this.checkboxReference.checked;
46
- this.errorMessage = this.setErrorMessage();
47
- this.isValid = this.setValidity();
48
- }
49
- setValidity() {
50
- return this.checkboxReference.validity.valid;
51
- }
52
- setErrorMessage() {
53
- if (this.checkboxReference.validity.valueMissing) {
54
- return translate('requiredError', this.language);
55
- }
56
- }
57
- renderLabel() {
58
- return (h("label", { class: 'togglecheckbox__label', htmlFor: `${this.name}__input` },
59
- h("div", { class: 'togglecheckbox__label-text', innerHTML: `${this.displayName} ${this.validation.mandatory ? '*' : ''}` })));
60
- }
61
- renderTooltip() {
62
- if (this.showTooltip) {
63
- return (h("div", { class: `togglecheckbox__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
64
- }
65
- return null;
66
- }
67
- render() {
68
- return h("div", { class: `togglecheckbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el },
69
- h("div", { class: 'togglecheckbox__wrapper--flex' },
70
- h("input", { class: 'togglecheckbox__input', type: "checkbox", id: `${this.name}__input`, ref: (el) => this.checkboxReference = el, name: this.name, checked: this.defaultValue === "true", readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }),
71
- this.renderLabel()),
72
- h("small", { class: 'togglecheckbox__error-message' }, this.errorMessage),
73
- h("div", { class: 'togglecheckbox__wrapper--relative' },
74
- this.tooltip &&
75
- h("img", { class: 'togglecheckbox__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }),
76
- this.renderTooltip()),
77
- h("div", { class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
78
- return h("general-input", { type: subfield.inputType, name: subfield.name, displayName: subfield.displayName, validation: subfield.validate, action: subfield.action || null, defaultValue: subfield.defaultValue, autofilled: subfield.autofill, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: subfield.tooltip, placeholder: subfield.placeholder == null ? '' : subfield.placeholder });
79
- })));
80
- }
81
- static get is() { return "toggle-checkbox-input"; }
82
- static get encapsulation() { return "shadow"; }
83
- static get originalStyleUrls() { return {
84
- "$": ["toggle-checkbox-input.scss"]
85
- }; }
86
- static get styleUrls() { return {
87
- "$": ["toggle-checkbox-input.css"]
88
- }; }
89
- static get properties() { return {
90
- "name": {
91
- "type": "string",
92
- "mutable": false,
93
- "complexType": {
94
- "original": "string",
95
- "resolved": "string",
96
- "references": {}
97
- },
98
- "required": false,
99
- "optional": false,
100
- "docs": {
101
- "tags": [],
102
- "text": "Name of the input."
103
- },
104
- "attribute": "name",
105
- "reflect": true
106
- },
107
- "displayName": {
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": "Name of input to be shown to the user."
120
- },
121
- "attribute": "display-name",
122
- "reflect": true
123
- },
124
- "defaultValue": {
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": "Default value for the input."
137
- },
138
- "attribute": "default-value",
139
- "reflect": true,
140
- "defaultValue": "''"
141
- },
142
- "options": {
143
- "type": "unknown",
144
- "mutable": false,
145
- "complexType": {
146
- "original": "RegCfgContentField[]",
147
- "resolved": "RegCfgContentField[]",
148
- "references": {
149
- "RegCfgContentField": {
150
- "location": "import",
151
- "path": "../../utils/types"
152
- }
153
- }
154
- },
155
- "required": false,
156
- "optional": false,
157
- "docs": {
158
- "tags": [],
159
- "text": "Options of the input."
160
- }
161
- },
162
- "autofilled": {
163
- "type": "boolean",
164
- "mutable": false,
165
- "complexType": {
166
- "original": "boolean",
167
- "resolved": "boolean",
168
- "references": {}
169
- },
170
- "required": false,
171
- "optional": false,
172
- "docs": {
173
- "tags": [],
174
- "text": "Boolean. Determines if input should be readonly."
175
- },
176
- "attribute": "autofilled",
177
- "reflect": true
178
- },
179
- "tooltip": {
180
- "type": "string",
181
- "mutable": false,
182
- "complexType": {
183
- "original": "string",
184
- "resolved": "string",
185
- "references": {}
186
- },
187
- "required": false,
188
- "optional": false,
189
- "docs": {
190
- "tags": [],
191
- "text": "Tooltip text."
192
- },
193
- "attribute": "tooltip",
194
- "reflect": true
195
- },
196
- "validation": {
197
- "type": "unknown",
198
- "mutable": false,
199
- "complexType": {
200
- "original": "ValidationSchema",
201
- "resolved": "ValidationSchema",
202
- "references": {
203
- "ValidationSchema": {
204
- "location": "import",
205
- "path": "../../utils/types"
206
- }
207
- }
208
- },
209
- "required": false,
210
- "optional": false,
211
- "docs": {
212
- "tags": [],
213
- "text": "Object of validation rules for the input."
214
- }
215
- },
216
- "language": {
217
- "type": "string",
218
- "mutable": false,
219
- "complexType": {
220
- "original": "string",
221
- "resolved": "string",
222
- "references": {}
223
- },
224
- "required": false,
225
- "optional": false,
226
- "docs": {
227
- "tags": [],
228
- "text": "Currently selected language."
229
- },
230
- "attribute": "language",
231
- "reflect": true
232
- },
233
- "emitValue": {
234
- "type": "boolean",
235
- "mutable": false,
236
- "complexType": {
237
- "original": "boolean",
238
- "resolved": "boolean",
239
- "references": {}
240
- },
241
- "required": false,
242
- "optional": false,
243
- "docs": {
244
- "tags": [],
245
- "text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
246
- },
247
- "attribute": "emit-value",
248
- "reflect": true
249
- },
250
- "clientStyling": {
251
- "type": "string",
252
- "mutable": false,
253
- "complexType": {
254
- "original": "string",
255
- "resolved": "string",
256
- "references": {}
257
- },
258
- "required": false,
259
- "optional": false,
260
- "docs": {
261
- "tags": [],
262
- "text": "Client custom styling via inline style"
263
- },
264
- "attribute": "client-styling",
265
- "reflect": true,
266
- "defaultValue": "''"
267
- }
268
- }; }
269
- static get states() { return {
270
- "errorMessage": {},
271
- "isValid": {},
272
- "limitStylingAppends": {},
273
- "showTooltip": {},
274
- "showFields": {}
275
- }; }
276
- static get events() { return [{
277
- "method": "sendValidityState",
278
- "name": "sendValidityState",
279
- "bubbles": true,
280
- "cancelable": true,
281
- "composed": true,
282
- "docs": {
283
- "tags": [],
284
- "text": ""
285
- },
286
- "complexType": {
287
- "original": "InputStateEvent",
288
- "resolved": "InputStateEvent",
289
- "references": {
290
- "InputStateEvent": {
291
- "location": "import",
292
- "path": "../../utils/types"
293
- }
294
- }
295
- }
296
- }, {
297
- "method": "sendInputValue",
298
- "name": "sendInputValue",
299
- "bubbles": true,
300
- "cancelable": true,
301
- "composed": true,
302
- "docs": {
303
- "tags": [],
304
- "text": ""
305
- },
306
- "complexType": {
307
- "original": "InputValueEvent",
308
- "resolved": "InputValueEvent",
309
- "references": {
310
- "InputValueEvent": {
311
- "location": "import",
312
- "path": "../../utils/types"
313
- }
314
- }
315
- }
316
- }]; }
317
- static get listeners() { return [{
318
- "name": "click",
319
- "method": "handleClickOutside",
320
- "target": "document",
321
- "capture": false,
322
- "passive": false
323
- }]; }
324
- }
@@ -1,17 +0,0 @@
1
- function safeDecorator(fn) {
2
- // eslint-disable-next-line func-names
3
- return function (...args) {
4
- try {
5
- return fn.apply(this, args);
6
- }
7
- catch (error) {
8
- if (error instanceof DOMException &&
9
- error.message.includes('has already been used with this registry') || error.message.includes('Cannot define multiple custom elements with the same tag name')) {
10
- return false;
11
- }
12
- throw error;
13
- }
14
- };
15
- }
16
- customElements.define = safeDecorator(customElements.define);
17
- export * from './components';
@@ -1,123 +0,0 @@
1
- const DEFAULT_LANGUAGE = 'en';
2
- export const TRANSLATIONS = {
3
- "en": {
4
- "dateError": 'The selected date should be between {min} and {max}',
5
- "dateError2": 'The selected date is not within the accepted range',
6
- "numberLengthError": 'The number should be between {min} and {max}',
7
- "lengthError": `The length should be between {minLength} and {maxLength}`,
8
- "requiredError": 'This input is required.',
9
- "invalidOriginalPasswordError": "Initial password field does not validate all criteria.",
10
- "passwordStrength": "Password strength",
11
- "passwordStrengthWeak": "is not adequate",
12
- "passwordStrengthStrong": "is adequate",
13
- "SpecialCharactersNotAllowed": 'Should not contain special characters',
14
- "InvalidEmailFormat": "Invalid email format.",
15
- "EmailNotMatching": "Emails not matching!",
16
- "PasswordNotMatching": "Passwords not matching",
17
- "MustIncludeNumber": "include a number",
18
- "MustContainCapital": "contain capital letters",
19
- "MustIncludePunctation": "punctuation",
20
- "OnlyNumbers": "Should contains only numbers."
21
- },
22
- "hu": {
23
- "dateError": 'A választott dátumnak {min} és {max} között kell lennie',
24
- "numberLengthError": 'A számnak {min} és {max} között kell lennie',
25
- "lengthError": `A hossznak {minLength} és {maxLength} között kell lennie`,
26
- "requiredError": 'Ez a beviteli mező kötelező.',
27
- "invalidOriginalPasswordError": "Initial password field does not validate all criteria.",
28
- "passwordStrength": "Jelszó erőssége",
29
- "passwordStrengthWeak": "nem megfelelő",
30
- "passwordStrengthStrong": "megfelelő",
31
- "SpecialCharactersNotAllowed": 'Nem tartalmazhat speciális karaktereket',
32
- "InvalidEmailFormat": "Érvénytelen e-mail formátum.",
33
- "EmailNotMatching": "Az e-mailek nem egyeznek!",
34
- "PasswordNotMatching": "A jelszavak nem egyeznek",
35
- "MustIncludeNumber": "tartalmaznia kell egy számot",
36
- "MustContainCapital": "nagybetűket kell tartalmaznia",
37
- "MustIncludePunctation": "írásjelet",
38
- "OnlyNumbers": "Csak számokat kell tartalmaznia."
39
- },
40
- "hr": {
41
- "dateError": 'Odabrani datum treba biti između {min} i {max}',
42
- "dateError2": 'Odabrani datum nije unutar prihvaćenog raspona',
43
- "numberLengthError": 'Broj bi trebao biti između {min} i {max}',
44
- "lengthError": `Duljina bi trebala biti između {minLength} i {maxLength}`,
45
- "requiredError": 'Ovaj unos je obavezan.',
46
- "invalidOriginalPasswordError": "Polje početne lozinke ne potvrđuje sve kriterije",
47
- "passwordStrength": "Jačina zaporke",
48
- "passwordStrengthWeak": "nije adekvatno",
49
- "passwordStrengthStrong": "je adekvatan",
50
- "SpecialCharactersNotAllowed": 'Ne smije sadržavati posebne znakove',
51
- "InvalidEmailFormat": "Nevažeći format e-maila",
52
- "EmailNotMatching": "E-mailovi se ne podudaraju!",
53
- "PasswordNotMatching": "Lozinke se ne podudaraju",
54
- "MustIncludeNumber": "uključiti broj",
55
- "MustContainCapital": "sadrže velika slova",
56
- "MustIncludePunctation": "interpunkcija",
57
- "OnlyNumbers": "Treba sadržavati samo brojeve."
58
- },
59
- 'pt-br': {
60
- "dateError": "A data selecionada deve estar entre {min} e {max}",
61
- "dateError2": "A data selecionada não está dentro de um intervalo válido",
62
- "numberLengthError": "O número deve estar entre {min} e {max}",
63
- "lengthError": "O comprimento deve estar entre {minLength} e {maxLength}",
64
- "requiredError": "Este campo é obrigatório",
65
- "invalidOriginalPasswordError": "O campo de senha inicial não faz parte dos critérios válidos",
66
- "PasswordStrength": "Força da senha",
67
- "PasswordStrengthWeak": "Não é adequado",
68
- "PasswordStrengthStrong": "é apropriado",
69
- "SpecialCharactersNotAllowed": "Não deve conter caracteres especiais",
70
- "InvalidEmailFormat": "Formato de email inválido",
71
- "EmailNotMatching": "E-mail não corresponde",
72
- "PasswordNotMatching": "Senha não corresponde",
73
- "MustIncludeNumber": "inclui um número",
74
- "MustContainCapital": "contém letras maiúsculas",
75
- "MustIncludePunctation": "pontuação",
76
- "OnlyNumbers": "Deve conter apenas números"
77
- },
78
- 'es-mx': {
79
- "dateError": "La fecha seleccionada debe ser entre {min} y {max}",
80
- "dateError2": "La fecha seleccionada no está dentro de un rango válido",
81
- "numberLengthError": "El número debe ser entre {min} y {max}",
82
- "lengthError": "La longitud deber ser entre {minLength} y {maxLength}",
83
- "requiredError": "Este campo es requerido",
84
- "invalidOriginalPasswordError": "El campo de contraseña inicial no es parte del criterio válido",
85
- "PasswordStrength": "La fortaleza de la contraseña",
86
- "PasswordStrengthWeak": "no es adecuada",
87
- "PasswordStrengthStrong": "es adecuada",
88
- "SpecialCharactersNotAllowed": "No debe contener caracteres especiales",
89
- "InvalidEmailFormat": "Formato inválido de correo",
90
- "EmailNotMatching": "El correo electrónico no coincide",
91
- "PasswordNotMatching": "La contraseña no coincide",
92
- "MustIncludeNumber": "incluye un número",
93
- "MustContainCapital": "contiene mayúsculas",
94
- "MustIncludePunctation": "puntuación",
95
- "OnlyNumbers": "Solo debe contener números"
96
- }
97
- };
98
- export const translate = (key, customLang, values) => {
99
- const lang = customLang;
100
- let translation = TRANSLATIONS[lang !== undefined ? lang : DEFAULT_LANGUAGE][key];
101
- if (values !== undefined) {
102
- for (const [key, value] of Object.entries(values.values)) {
103
- const regex = new RegExp(`{${key}}`, 'g');
104
- translation = translation.replace(regex, value);
105
- }
106
- }
107
- return translation;
108
- };
109
- export const getTranslations = (url) => {
110
- // fetch url, get the data, replace the TRANSLATIONS content
111
- return new Promise((resolve) => {
112
- fetch(url)
113
- .then((res) => res.json())
114
- .then((data) => {
115
- Object.keys(data).forEach((item) => {
116
- for (let key in data[item]) {
117
- TRANSLATIONS[item][key] = data[item][key];
118
- }
119
- });
120
- resolve(true);
121
- });
122
- });
123
- };
@@ -1,5 +0,0 @@
1
- <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <circle cx="6" cy="6" r="5.5" stroke="#979797"/>
3
- <rect x="5" y="5" width="2" height="5" fill="#979797"/>
4
- <circle cx="6" cy="3" r="1" fill="#979797"/>
5
- </svg>
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- export function formatName(name) {
2
- return name
3
- .replace(/([A-Z])/g, ' $1')
4
- .replace(/^./, function (str) { return str.toUpperCase(); });
5
- }