@mgdis/mg-components 4.1.0 → 4.2.0

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 (123) hide show
  1. package/dist/cjs/{index-88560a66.js → index-64cee0c8.js} +248 -81
  2. package/dist/cjs/loader.cjs.js +3 -3
  3. package/dist/cjs/{mg-badge_24.cjs.entry.js → mg-badge_23.cjs.entry.js} +206 -2180
  4. package/dist/cjs/mg-components.cjs.js +3 -3
  5. package/dist/cjs/mg-modal.cjs.entry.js +8 -1
  6. package/dist/cjs/mg-popover.cjs.entry.js +171 -0
  7. package/dist/cjs/popper-71bf3058.js +1790 -0
  8. package/dist/collection/collection-manifest.json +2 -2
  9. package/dist/collection/components/atoms/mg-badge/mg-badge.js +116 -99
  10. package/dist/collection/components/atoms/mg-button/mg-button.js +221 -220
  11. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +72 -69
  12. package/dist/collection/components/atoms/mg-icon/doc/mg-icon.stories.js +1 -2
  13. package/dist/collection/components/atoms/mg-icon/mg-icon.js +102 -92
  14. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +83 -67
  15. package/dist/collection/components/atoms/mg-tag/mg-tag.js +64 -55
  16. package/dist/collection/components/atoms/mg-tooltip/doc/mg-tooltip.stories.js +3 -6
  17. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +120 -106
  18. package/dist/collection/components/molecules/inputs/MgInput.js +8 -17
  19. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +323 -318
  20. package/dist/collection/components/molecules/inputs/mg-input-date/doc/mg-input-date.stories.js +3 -2
  21. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +356 -361
  22. package/dist/collection/components/molecules/inputs/mg-input-numeric/doc/mg-input-numeric.stories.js +1 -2
  23. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +462 -456
  24. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +347 -340
  25. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +348 -343
  26. package/dist/collection/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.js +4 -3
  27. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +406 -401
  28. package/dist/collection/components/molecules/inputs/mg-input-text/doc/mg-input-text.stories.js +12 -15
  29. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +2 -0
  30. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +476 -473
  31. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +461 -456
  32. package/dist/collection/components/molecules/inputs/mg-input-toggle/doc/mg-input-toggle.stories.js +2 -8
  33. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +1 -0
  34. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +299 -298
  35. package/dist/collection/components/molecules/mg-details/doc/mg-details.stories.js +1 -3
  36. package/dist/collection/components/molecules/mg-details/mg-details.js +95 -93
  37. package/dist/collection/components/molecules/mg-form/doc/mg-form.stories.js +13 -27
  38. package/dist/collection/components/molecules/mg-form/mg-form.js +175 -166
  39. package/dist/collection/components/molecules/mg-illustrated-message/doc/mg-illustrated-message.stories.js +2 -6
  40. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +37 -37
  41. package/dist/collection/components/molecules/mg-message/doc/mg-message.stories.js +1 -3
  42. package/dist/collection/components/molecules/mg-message/mg-message.js +154 -153
  43. package/dist/collection/components/molecules/mg-modal/doc/mg-modal.stories.js +11 -15
  44. package/dist/collection/components/molecules/mg-modal/mg-modal.js +147 -134
  45. package/dist/collection/components/molecules/mg-pagination/mg-pagination.css +5 -6
  46. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +112 -117
  47. package/dist/collection/components/molecules/mg-panel/doc/mg-panel.stories.js +1 -8
  48. package/dist/collection/components/molecules/mg-panel/mg-panel.css +2 -2
  49. package/dist/collection/components/molecules/mg-panel/mg-panel.js +192 -189
  50. package/dist/collection/components/molecules/mg-popover/doc/mg-popover.stories.js +1 -4
  51. package/dist/collection/components/molecules/mg-popover/mg-popover.js +129 -127
  52. package/dist/collection/components/molecules/mg-tabs/doc/mg-tabs.stories.js +1 -5
  53. package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +1 -0
  54. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +150 -135
  55. package/dist/collection/fonts/OpenSans-Bold.ttf +0 -0
  56. package/dist/collection/locales/en/messages.json +50 -0
  57. package/dist/collection/locales/fr/messages.json +50 -0
  58. package/dist/collection/stories/grids.stories.js +1 -44
  59. package/dist/collection/stories/helpers.stories.js +1 -19
  60. package/dist/collection/stories/icons.stories.js +1 -4
  61. package/dist/collection/stories/typography.stories.js +1 -12
  62. package/dist/collection/variables.css +3 -2
  63. package/dist/collection/variables.scss +3 -2
  64. package/dist/components/MgInput.js +6 -3
  65. package/dist/components/mg-badge2.js +7 -0
  66. package/dist/components/mg-button2.js +2 -7
  67. package/dist/components/mg-input-checkbox.js +1 -6
  68. package/dist/components/mg-input-date.js +10 -27
  69. package/dist/components/mg-input-numeric.js +1 -6
  70. package/dist/components/mg-input-password.js +1 -6
  71. package/dist/components/mg-input-radio.js +1 -6
  72. package/dist/components/mg-input-select2.js +1 -6
  73. package/dist/components/mg-input-text2.js +3 -8
  74. package/dist/components/mg-input-textarea.js +2 -7
  75. package/dist/components/mg-input-title2.js +9 -0
  76. package/dist/components/mg-input-toggle.js +2 -7
  77. package/dist/components/mg-modal.js +7 -0
  78. package/dist/components/mg-pagination.js +3 -3
  79. package/dist/components/mg-panel.js +8 -4
  80. package/dist/components/mg-tabs.js +8 -1
  81. package/dist/components/mg-tooltip2.js +7 -0
  82. package/dist/esm/{index-bca81100.js → index-120f47fd.js} +248 -81
  83. package/dist/esm/loader.js +3 -3
  84. package/dist/esm/{mg-badge_24.entry.js → mg-badge_23.entry.js} +207 -2180
  85. package/dist/esm/mg-components.js +3 -3
  86. package/dist/esm/mg-modal.entry.js +8 -1
  87. package/dist/esm/mg-popover.entry.js +167 -0
  88. package/dist/esm/popper-93ecb064.js +1788 -0
  89. package/dist/mg-components/fonts/OpenSans-Bold.ttf +0 -0
  90. package/dist/mg-components/locales/en/messages.json +50 -0
  91. package/dist/mg-components/locales/fr/messages.json +50 -0
  92. package/dist/mg-components/mg-components.css +1 -1
  93. package/dist/mg-components/mg-components.esm.js +1 -1
  94. package/dist/mg-components/p-21991be8.entry.js +1 -0
  95. package/dist/mg-components/p-36a64f8c.entry.js +1 -0
  96. package/dist/mg-components/p-4c66f794.js +1 -0
  97. package/dist/mg-components/{p-b14a3443.js → p-7bc32a2f.js} +0 -0
  98. package/dist/mg-components/p-b380a0df.entry.js +1 -0
  99. package/dist/mg-components/variables.css +3 -2
  100. package/dist/mg-components/variables.scss +3 -2
  101. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +1 -0
  102. package/dist/types/components/atoms/mg-button/mg-button.d.ts +0 -1
  103. package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +1 -0
  104. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +1 -0
  105. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +0 -1
  106. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +1 -10
  107. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +0 -1
  108. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +0 -1
  109. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +0 -1
  110. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +0 -1
  111. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +0 -1
  112. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +0 -1
  113. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +0 -1
  114. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +1 -0
  115. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +1 -1
  116. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +1 -0
  117. package/dist/types/components.d.ts +29 -29
  118. package/loader/package.json +1 -0
  119. package/package.json +8 -8
  120. package/dist/collection/fonts/Poppins-Bold.ttf +0 -0
  121. package/dist/mg-components/fonts/Poppins-Bold.ttf +0 -0
  122. package/dist/mg-components/p-a2883dc7.entry.js +0 -1
  123. package/dist/mg-components/p-cffe0519.entry.js +0 -1
@@ -1,18 +1,13 @@
1
- import { Component, Element, Event, h, Prop, State, Watch, Method } from '@stencil/core';
1
+ import { h } from '@stencil/core';
2
2
  import { MgInput } from '../MgInput';
3
3
  import { InputError } from './mg-input-date.conf';
4
- import { createID, ClassList } from '../../../../utils/components.utils';
4
+ import { ClassList } from '../../../../utils/components.utils';
5
5
  import { localeDate, dateRegExp } from '../../../../utils/locale.utils';
6
6
  import { initLocales } from '../../../../locales';
7
7
  export class MgInputDate {
8
8
  constructor() {
9
9
  // hasError (triggered by blur event)
10
10
  this.hasError = false;
11
- /**
12
- * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
13
- * If not set, it will be created.
14
- */
15
- this.identifier = createID('mg-input-date');
16
11
  /**
17
12
  * Input name
18
13
  * If not set the value equals the identifier
@@ -129,18 +124,17 @@ export class MgInputDate {
129
124
  };
130
125
  }
131
126
  validateValue(newValue) {
132
- if (newValue !== undefined && newValue !== '' && !(typeof newValue === 'string' && dateRegExp.test(newValue))) {
127
+ if (newValue !== undefined && (typeof newValue !== 'string' || !dateRegExp.test(newValue))) {
133
128
  throw new Error("<mg-input-date> props 'value' doesn't match pattern: yyyy-mm-dd");
134
129
  }
135
130
  else {
136
131
  this.valueChange.emit(this.value);
137
132
  }
138
133
  }
139
- validateMin(newValue) {
140
- this.validateDateFormat(newValue);
141
- }
142
- validateMax(newValue) {
143
- this.validateDateFormat(newValue);
134
+ validateMinMax(newValue) {
135
+ if ((newValue === null || newValue === void 0 ? void 0 : newValue.length) === 0 || ((newValue === null || newValue === void 0 ? void 0 : newValue.length) > 0 && !(typeof newValue === 'string' && dateRegExp.test(newValue)))) {
136
+ throw new Error("<mg-input-date> props 'min/max' doesn't match pattern: yyyy-mm-dd");
137
+ }
144
138
  }
145
139
  /**
146
140
  * Public method to display errors
@@ -152,17 +146,6 @@ export class MgInputDate {
152
146
  this.checkError();
153
147
  this.hasError = this.invalid;
154
148
  }
155
- /**
156
- * Date format validation
157
- *
158
- * @param {string} date date to validate
159
- * @returns {void}
160
- */
161
- validateDateFormat(date) {
162
- if ((date === null || date === void 0 ? void 0 : date.length) > 0 && !(typeof date === 'string' && dateRegExp.test(date))) {
163
- throw new Error("<mg-input-date> props 'min/max' doesn't match pattern: yyyy-mm-dd");
164
- }
165
- }
166
149
  /*************
167
150
  * Lifecycle *
168
151
  *************/
@@ -178,8 +161,8 @@ export class MgInputDate {
178
161
  this.messages = locales.messages;
179
162
  // Validate
180
163
  this.validateValue(this.value);
181
- this.validateMin(this.min);
182
- this.validateMax(this.max);
164
+ this.validateMinMax(this.min);
165
+ this.validateMinMax(this.max);
183
166
  // Check validity when component is ready
184
167
  // return a promise to process action only in the FIRST render().
185
168
  // https://stenciljs.com/docs/component-lifecycle#componentwillload
@@ -193,345 +176,357 @@ export class MgInputDate {
193
176
  * @returns {HTMLElement} HTML Element
194
177
  */
195
178
  render() {
196
- return (h(MgInput, { identifier: this.identifier, classList: this.classList, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly, mgWidth: undefined, disabled: this.disabled, value: this.value, readonlyValue: localeDate(this.value, this.locale), tooltip: this.tooltip, helpText: this.helpText, errorMessage: this.errorMessage, isFieldset: false },
197
- h("input", { type: "date", class: "mg-input__box", min: this.min, max: this.max, value: this.value, id: this.identifier, name: this.name, disabled: this.disabled, required: this.required, onInput: this.handleInput, onBlur: this.handleBlur, pattern: "[0-9]{4}-[0-9]{2}-[0-9]{2}", ref: el => (this.input = el) })));
179
+ return (h(MgInput, { identifier: this.identifier, classList: this.classList, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly, mgWidth: undefined, disabled: this.disabled, value: this.value, readonlyValue: localeDate(this.value, this.locale), tooltip: this.tooltip, helpText: this.helpText, errorMessage: this.errorMessage, isFieldset: false }, h("input", { type: "date", class: "mg-input__box", min: this.min, max: this.max, value: this.value, id: this.identifier, name: this.name, disabled: this.disabled, required: this.required, onInput: this.handleInput, onBlur: this.handleBlur, pattern: "[0-9]{4}-[0-9]{2}-[0-9]{2}", ref: el => (this.input = el) })));
198
180
  }
199
181
  static get is() { return "mg-input-date"; }
200
182
  static get encapsulation() { return "shadow"; }
201
- static get originalStyleUrls() { return {
202
- "$": ["./mg-input-date.scss"]
203
- }; }
204
- static get styleUrls() { return {
205
- "$": ["mg-input-date.css"]
206
- }; }
207
- static get properties() { return {
208
- "value": {
209
- "type": "string",
210
- "mutable": true,
211
- "complexType": {
212
- "original": "string",
213
- "resolved": "string",
214
- "references": {}
215
- },
216
- "required": false,
217
- "optional": false,
218
- "docs": {
219
- "tags": [],
220
- "text": "Component value"
221
- },
222
- "attribute": "value",
223
- "reflect": true
224
- },
225
- "identifier": {
226
- "type": "string",
227
- "mutable": false,
228
- "complexType": {
229
- "original": "string",
230
- "resolved": "string",
231
- "references": {}
232
- },
233
- "required": false,
234
- "optional": false,
235
- "docs": {
236
- "tags": [],
237
- "text": "Identifier is used for the element ID (id is a reserved prop in Stencil.js)\nIf not set, it will be created."
238
- },
239
- "attribute": "identifier",
240
- "reflect": false,
241
- "defaultValue": "createID('mg-input-date')"
242
- },
243
- "name": {
244
- "type": "string",
245
- "mutable": false,
246
- "complexType": {
247
- "original": "string",
248
- "resolved": "string",
249
- "references": {}
250
- },
251
- "required": false,
252
- "optional": false,
253
- "docs": {
254
- "tags": [],
255
- "text": "Input name\nIf not set the value equals the identifier"
256
- },
257
- "attribute": "name",
258
- "reflect": false,
259
- "defaultValue": "this.identifier"
260
- },
261
- "label": {
262
- "type": "string",
263
- "mutable": false,
264
- "complexType": {
265
- "original": "string",
266
- "resolved": "string",
267
- "references": {}
268
- },
269
- "required": true,
270
- "optional": false,
271
- "docs": {
272
- "tags": [],
273
- "text": "Input label"
274
- },
275
- "attribute": "label",
276
- "reflect": false
277
- },
278
- "labelOnTop": {
279
- "type": "boolean",
280
- "mutable": false,
281
- "complexType": {
282
- "original": "boolean",
283
- "resolved": "boolean",
284
- "references": {}
285
- },
286
- "required": false,
287
- "optional": false,
288
- "docs": {
289
- "tags": [],
290
- "text": "Define if label is displayed on top"
291
- },
292
- "attribute": "label-on-top",
293
- "reflect": false
294
- },
295
- "labelHide": {
296
- "type": "boolean",
297
- "mutable": false,
298
- "complexType": {
299
- "original": "boolean",
300
- "resolved": "boolean",
301
- "references": {}
302
- },
303
- "required": false,
304
- "optional": false,
305
- "docs": {
306
- "tags": [],
307
- "text": "Define if label is visible"
308
- },
309
- "attribute": "label-hide",
310
- "reflect": false,
311
- "defaultValue": "false"
312
- },
313
- "required": {
314
- "type": "boolean",
315
- "mutable": false,
316
- "complexType": {
317
- "original": "boolean",
318
- "resolved": "boolean",
319
- "references": {}
320
- },
321
- "required": false,
322
- "optional": false,
323
- "docs": {
324
- "tags": [],
325
- "text": "Define if input is required"
326
- },
327
- "attribute": "required",
328
- "reflect": false,
329
- "defaultValue": "false"
330
- },
331
- "readonly": {
332
- "type": "boolean",
333
- "mutable": false,
334
- "complexType": {
335
- "original": "boolean",
336
- "resolved": "boolean",
337
- "references": {}
338
- },
339
- "required": false,
340
- "optional": false,
341
- "docs": {
342
- "tags": [],
343
- "text": "Define if input is readonly"
344
- },
345
- "attribute": "readonly",
346
- "reflect": false,
347
- "defaultValue": "false"
348
- },
349
- "disabled": {
350
- "type": "boolean",
351
- "mutable": false,
352
- "complexType": {
353
- "original": "boolean",
354
- "resolved": "boolean",
355
- "references": {}
356
- },
357
- "required": false,
358
- "optional": false,
359
- "docs": {
360
- "tags": [],
361
- "text": "Define if input is disabled"
362
- },
363
- "attribute": "disabled",
364
- "reflect": false,
365
- "defaultValue": "false"
366
- },
367
- "tooltip": {
368
- "type": "string",
369
- "mutable": false,
370
- "complexType": {
371
- "original": "string",
372
- "resolved": "string",
373
- "references": {}
374
- },
375
- "required": false,
376
- "optional": false,
377
- "docs": {
378
- "tags": [],
379
- "text": "Add a tooltip message next to the input"
380
- },
381
- "attribute": "tooltip",
382
- "reflect": false
383
- },
384
- "helpText": {
385
- "type": "string",
386
- "mutable": false,
387
- "complexType": {
388
- "original": "string",
389
- "resolved": "string",
390
- "references": {}
391
- },
392
- "required": false,
393
- "optional": false,
394
- "docs": {
395
- "tags": [],
396
- "text": "Add a help text under the input, usually expected data format and example"
397
- },
398
- "attribute": "help-text",
399
- "reflect": false
400
- },
401
- "valid": {
402
- "type": "boolean",
403
- "mutable": true,
404
- "complexType": {
405
- "original": "boolean",
406
- "resolved": "boolean",
407
- "references": {}
408
- },
409
- "required": false,
410
- "optional": false,
411
- "docs": {
412
- "tags": [],
413
- "text": "Define input valid state"
414
- },
415
- "attribute": "valid",
416
- "reflect": false
417
- },
418
- "invalid": {
419
- "type": "boolean",
420
- "mutable": true,
421
- "complexType": {
422
- "original": "boolean",
423
- "resolved": "boolean",
424
- "references": {}
425
- },
426
- "required": false,
427
- "optional": false,
428
- "docs": {
429
- "tags": [],
430
- "text": "Define input invalid state"
431
- },
432
- "attribute": "invalid",
433
- "reflect": false
434
- },
435
- "min": {
436
- "type": "string",
437
- "mutable": false,
438
- "complexType": {
439
- "original": "string",
440
- "resolved": "string",
441
- "references": {}
442
- },
443
- "required": false,
444
- "optional": false,
445
- "docs": {
446
- "tags": [],
447
- "text": "Define input minimum date\nformat: yyyy-mm-dd"
448
- },
449
- "attribute": "min",
450
- "reflect": false
451
- },
452
- "max": {
453
- "type": "string",
454
- "mutable": false,
455
- "complexType": {
456
- "original": "string",
457
- "resolved": "string",
458
- "references": {}
459
- },
460
- "required": false,
461
- "optional": false,
462
- "docs": {
463
- "tags": [],
464
- "text": "Define input maximum date\nformat: yyyy-mm-dd"
465
- },
466
- "attribute": "max",
467
- "reflect": false
468
- }
469
- }; }
470
- static get states() { return {
471
- "classList": {},
472
- "errorMessage": {}
473
- }; }
474
- static get events() { return [{
475
- "method": "valueChange",
476
- "name": "value-change",
477
- "bubbles": true,
478
- "cancelable": true,
479
- "composed": true,
480
- "docs": {
481
- "tags": [],
482
- "text": "Emited event when value change"
483
- },
484
- "complexType": {
485
- "original": "string",
486
- "resolved": "string",
487
- "references": {}
488
- }
489
- }, {
490
- "method": "inputValid",
491
- "name": "input-valid",
492
- "bubbles": true,
493
- "cancelable": true,
494
- "composed": true,
495
- "docs": {
496
- "tags": [],
497
- "text": "Emited event when checking validity"
498
- },
499
- "complexType": {
500
- "original": "boolean",
501
- "resolved": "boolean",
502
- "references": {}
183
+ static get originalStyleUrls() {
184
+ return {
185
+ "$": ["./mg-input-date.scss"]
186
+ };
187
+ }
188
+ static get styleUrls() {
189
+ return {
190
+ "$": ["mg-input-date.css"]
191
+ };
192
+ }
193
+ static get properties() {
194
+ return {
195
+ "value": {
196
+ "type": "string",
197
+ "mutable": true,
198
+ "complexType": {
199
+ "original": "string",
200
+ "resolved": "string",
201
+ "references": {}
202
+ },
203
+ "required": false,
204
+ "optional": false,
205
+ "docs": {
206
+ "tags": [],
207
+ "text": "Component value"
208
+ },
209
+ "attribute": "value",
210
+ "reflect": true
211
+ },
212
+ "identifier": {
213
+ "type": "string",
214
+ "mutable": false,
215
+ "complexType": {
216
+ "original": "string",
217
+ "resolved": "string",
218
+ "references": {}
219
+ },
220
+ "required": true,
221
+ "optional": false,
222
+ "docs": {
223
+ "tags": [],
224
+ "text": "Identifier is used for the element ID (id is a reserved prop in Stencil.js)"
225
+ },
226
+ "attribute": "identifier",
227
+ "reflect": false
228
+ },
229
+ "name": {
230
+ "type": "string",
231
+ "mutable": false,
232
+ "complexType": {
233
+ "original": "string",
234
+ "resolved": "string",
235
+ "references": {}
236
+ },
237
+ "required": false,
238
+ "optional": false,
239
+ "docs": {
240
+ "tags": [],
241
+ "text": "Input name\nIf not set the value equals the identifier"
242
+ },
243
+ "attribute": "name",
244
+ "reflect": false,
245
+ "defaultValue": "this.identifier"
246
+ },
247
+ "label": {
248
+ "type": "string",
249
+ "mutable": false,
250
+ "complexType": {
251
+ "original": "string",
252
+ "resolved": "string",
253
+ "references": {}
254
+ },
255
+ "required": true,
256
+ "optional": false,
257
+ "docs": {
258
+ "tags": [],
259
+ "text": "Input label"
260
+ },
261
+ "attribute": "label",
262
+ "reflect": false
263
+ },
264
+ "labelOnTop": {
265
+ "type": "boolean",
266
+ "mutable": false,
267
+ "complexType": {
268
+ "original": "boolean",
269
+ "resolved": "boolean",
270
+ "references": {}
271
+ },
272
+ "required": false,
273
+ "optional": false,
274
+ "docs": {
275
+ "tags": [],
276
+ "text": "Define if label is displayed on top"
277
+ },
278
+ "attribute": "label-on-top",
279
+ "reflect": false
280
+ },
281
+ "labelHide": {
282
+ "type": "boolean",
283
+ "mutable": false,
284
+ "complexType": {
285
+ "original": "boolean",
286
+ "resolved": "boolean",
287
+ "references": {}
288
+ },
289
+ "required": false,
290
+ "optional": false,
291
+ "docs": {
292
+ "tags": [],
293
+ "text": "Define if label is visible"
294
+ },
295
+ "attribute": "label-hide",
296
+ "reflect": false,
297
+ "defaultValue": "false"
298
+ },
299
+ "required": {
300
+ "type": "boolean",
301
+ "mutable": false,
302
+ "complexType": {
303
+ "original": "boolean",
304
+ "resolved": "boolean",
305
+ "references": {}
306
+ },
307
+ "required": false,
308
+ "optional": false,
309
+ "docs": {
310
+ "tags": [],
311
+ "text": "Define if input is required"
312
+ },
313
+ "attribute": "required",
314
+ "reflect": false,
315
+ "defaultValue": "false"
316
+ },
317
+ "readonly": {
318
+ "type": "boolean",
319
+ "mutable": false,
320
+ "complexType": {
321
+ "original": "boolean",
322
+ "resolved": "boolean",
323
+ "references": {}
324
+ },
325
+ "required": false,
326
+ "optional": false,
327
+ "docs": {
328
+ "tags": [],
329
+ "text": "Define if input is readonly"
330
+ },
331
+ "attribute": "readonly",
332
+ "reflect": false,
333
+ "defaultValue": "false"
334
+ },
335
+ "disabled": {
336
+ "type": "boolean",
337
+ "mutable": false,
338
+ "complexType": {
339
+ "original": "boolean",
340
+ "resolved": "boolean",
341
+ "references": {}
342
+ },
343
+ "required": false,
344
+ "optional": false,
345
+ "docs": {
346
+ "tags": [],
347
+ "text": "Define if input is disabled"
348
+ },
349
+ "attribute": "disabled",
350
+ "reflect": false,
351
+ "defaultValue": "false"
352
+ },
353
+ "tooltip": {
354
+ "type": "string",
355
+ "mutable": false,
356
+ "complexType": {
357
+ "original": "string",
358
+ "resolved": "string",
359
+ "references": {}
360
+ },
361
+ "required": false,
362
+ "optional": false,
363
+ "docs": {
364
+ "tags": [],
365
+ "text": "Add a tooltip message next to the input"
366
+ },
367
+ "attribute": "tooltip",
368
+ "reflect": false
369
+ },
370
+ "helpText": {
371
+ "type": "string",
372
+ "mutable": false,
373
+ "complexType": {
374
+ "original": "string",
375
+ "resolved": "string",
376
+ "references": {}
377
+ },
378
+ "required": false,
379
+ "optional": false,
380
+ "docs": {
381
+ "tags": [],
382
+ "text": "Add a help text under the input, usually expected data format and example"
383
+ },
384
+ "attribute": "help-text",
385
+ "reflect": false
386
+ },
387
+ "valid": {
388
+ "type": "boolean",
389
+ "mutable": true,
390
+ "complexType": {
391
+ "original": "boolean",
392
+ "resolved": "boolean",
393
+ "references": {}
394
+ },
395
+ "required": false,
396
+ "optional": false,
397
+ "docs": {
398
+ "tags": [],
399
+ "text": "Define input valid state"
400
+ },
401
+ "attribute": "valid",
402
+ "reflect": false
403
+ },
404
+ "invalid": {
405
+ "type": "boolean",
406
+ "mutable": true,
407
+ "complexType": {
408
+ "original": "boolean",
409
+ "resolved": "boolean",
410
+ "references": {}
411
+ },
412
+ "required": false,
413
+ "optional": false,
414
+ "docs": {
415
+ "tags": [],
416
+ "text": "Define input invalid state"
417
+ },
418
+ "attribute": "invalid",
419
+ "reflect": false
420
+ },
421
+ "min": {
422
+ "type": "string",
423
+ "mutable": false,
424
+ "complexType": {
425
+ "original": "string",
426
+ "resolved": "string",
427
+ "references": {}
428
+ },
429
+ "required": false,
430
+ "optional": false,
431
+ "docs": {
432
+ "tags": [],
433
+ "text": "Define input minimum date\nformat: yyyy-mm-dd"
434
+ },
435
+ "attribute": "min",
436
+ "reflect": false
437
+ },
438
+ "max": {
439
+ "type": "string",
440
+ "mutable": false,
441
+ "complexType": {
442
+ "original": "string",
443
+ "resolved": "string",
444
+ "references": {}
445
+ },
446
+ "required": false,
447
+ "optional": false,
448
+ "docs": {
449
+ "tags": [],
450
+ "text": "Define input maximum date\nformat: yyyy-mm-dd"
451
+ },
452
+ "attribute": "max",
453
+ "reflect": false
503
454
  }
504
- }]; }
505
- static get methods() { return {
506
- "displayError": {
507
- "complexType": {
508
- "signature": "() => Promise<void>",
509
- "parameters": [],
510
- "references": {
511
- "Promise": {
512
- "location": "global"
513
- }
514
- },
515
- "return": "Promise<void>"
516
- },
517
- "docs": {
518
- "text": "Public method to display errors",
519
- "tags": [{
520
- "name": "returns",
521
- "text": undefined
522
- }]
455
+ };
456
+ }
457
+ static get states() {
458
+ return {
459
+ "classList": {},
460
+ "errorMessage": {}
461
+ };
462
+ }
463
+ static get events() {
464
+ return [{
465
+ "method": "valueChange",
466
+ "name": "value-change",
467
+ "bubbles": true,
468
+ "cancelable": true,
469
+ "composed": true,
470
+ "docs": {
471
+ "tags": [],
472
+ "text": "Emited event when value change"
473
+ },
474
+ "complexType": {
475
+ "original": "string",
476
+ "resolved": "string",
477
+ "references": {}
478
+ }
479
+ }, {
480
+ "method": "inputValid",
481
+ "name": "input-valid",
482
+ "bubbles": true,
483
+ "cancelable": true,
484
+ "composed": true,
485
+ "docs": {
486
+ "tags": [],
487
+ "text": "Emited event when checking validity"
488
+ },
489
+ "complexType": {
490
+ "original": "boolean",
491
+ "resolved": "boolean",
492
+ "references": {}
493
+ }
494
+ }];
495
+ }
496
+ static get methods() {
497
+ return {
498
+ "displayError": {
499
+ "complexType": {
500
+ "signature": "() => Promise<void>",
501
+ "parameters": [],
502
+ "references": {
503
+ "Promise": {
504
+ "location": "global"
505
+ }
506
+ },
507
+ "return": "Promise<void>"
508
+ },
509
+ "docs": {
510
+ "text": "Public method to display errors",
511
+ "tags": [{
512
+ "name": "returns",
513
+ "text": undefined
514
+ }]
515
+ }
523
516
  }
524
- }
525
- }; }
517
+ };
518
+ }
526
519
  static get elementRef() { return "element"; }
527
- static get watchers() { return [{
528
- "propName": "value",
529
- "methodName": "validateValue"
530
- }, {
531
- "propName": "min",
532
- "methodName": "validateMin"
533
- }, {
534
- "propName": "max",
535
- "methodName": "validateMax"
536
- }]; }
520
+ static get watchers() {
521
+ return [{
522
+ "propName": "value",
523
+ "methodName": "validateValue"
524
+ }, {
525
+ "propName": "min",
526
+ "methodName": "validateMinMax"
527
+ }, {
528
+ "propName": "max",
529
+ "methodName": "validateMinMax"
530
+ }];
531
+ }
537
532
  }