@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.
- package/dist/cjs/{index-88560a66.js → index-64cee0c8.js} +248 -81
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{mg-badge_24.cjs.entry.js → mg-badge_23.cjs.entry.js} +206 -2180
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-modal.cjs.entry.js +8 -1
- package/dist/cjs/mg-popover.cjs.entry.js +171 -0
- package/dist/cjs/popper-71bf3058.js +1790 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +116 -99
- package/dist/collection/components/atoms/mg-button/mg-button.js +221 -220
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +72 -69
- package/dist/collection/components/atoms/mg-icon/doc/mg-icon.stories.js +1 -2
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +102 -92
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +83 -67
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +64 -55
- package/dist/collection/components/atoms/mg-tooltip/doc/mg-tooltip.stories.js +3 -6
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +120 -106
- package/dist/collection/components/molecules/inputs/MgInput.js +8 -17
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +323 -318
- package/dist/collection/components/molecules/inputs/mg-input-date/doc/mg-input-date.stories.js +3 -2
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +356 -361
- package/dist/collection/components/molecules/inputs/mg-input-numeric/doc/mg-input-numeric.stories.js +1 -2
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +462 -456
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +347 -340
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +348 -343
- package/dist/collection/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.js +4 -3
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +406 -401
- package/dist/collection/components/molecules/inputs/mg-input-text/doc/mg-input-text.stories.js +12 -15
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +2 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +476 -473
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +461 -456
- package/dist/collection/components/molecules/inputs/mg-input-toggle/doc/mg-input-toggle.stories.js +2 -8
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +299 -298
- package/dist/collection/components/molecules/mg-details/doc/mg-details.stories.js +1 -3
- package/dist/collection/components/molecules/mg-details/mg-details.js +95 -93
- package/dist/collection/components/molecules/mg-form/doc/mg-form.stories.js +13 -27
- package/dist/collection/components/molecules/mg-form/mg-form.js +175 -166
- package/dist/collection/components/molecules/mg-illustrated-message/doc/mg-illustrated-message.stories.js +2 -6
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +37 -37
- package/dist/collection/components/molecules/mg-message/doc/mg-message.stories.js +1 -3
- package/dist/collection/components/molecules/mg-message/mg-message.js +154 -153
- package/dist/collection/components/molecules/mg-modal/doc/mg-modal.stories.js +11 -15
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +147 -134
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.css +5 -6
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +112 -117
- package/dist/collection/components/molecules/mg-panel/doc/mg-panel.stories.js +1 -8
- package/dist/collection/components/molecules/mg-panel/mg-panel.css +2 -2
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +192 -189
- package/dist/collection/components/molecules/mg-popover/doc/mg-popover.stories.js +1 -4
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +129 -127
- package/dist/collection/components/molecules/mg-tabs/doc/mg-tabs.stories.js +1 -5
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +1 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +150 -135
- package/dist/collection/fonts/OpenSans-Bold.ttf +0 -0
- package/dist/collection/locales/en/messages.json +50 -0
- package/dist/collection/locales/fr/messages.json +50 -0
- package/dist/collection/stories/grids.stories.js +1 -44
- package/dist/collection/stories/helpers.stories.js +1 -19
- package/dist/collection/stories/icons.stories.js +1 -4
- package/dist/collection/stories/typography.stories.js +1 -12
- package/dist/collection/variables.css +3 -2
- package/dist/collection/variables.scss +3 -2
- package/dist/components/MgInput.js +6 -3
- package/dist/components/mg-badge2.js +7 -0
- package/dist/components/mg-button2.js +2 -7
- package/dist/components/mg-input-checkbox.js +1 -6
- package/dist/components/mg-input-date.js +10 -27
- package/dist/components/mg-input-numeric.js +1 -6
- package/dist/components/mg-input-password.js +1 -6
- package/dist/components/mg-input-radio.js +1 -6
- package/dist/components/mg-input-select2.js +1 -6
- package/dist/components/mg-input-text2.js +3 -8
- package/dist/components/mg-input-textarea.js +2 -7
- package/dist/components/mg-input-title2.js +9 -0
- package/dist/components/mg-input-toggle.js +2 -7
- package/dist/components/mg-modal.js +7 -0
- package/dist/components/mg-pagination.js +3 -3
- package/dist/components/mg-panel.js +8 -4
- package/dist/components/mg-tabs.js +8 -1
- package/dist/components/mg-tooltip2.js +7 -0
- package/dist/esm/{index-bca81100.js → index-120f47fd.js} +248 -81
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mg-badge_24.entry.js → mg-badge_23.entry.js} +207 -2180
- package/dist/esm/mg-components.js +3 -3
- package/dist/esm/mg-modal.entry.js +8 -1
- package/dist/esm/mg-popover.entry.js +167 -0
- package/dist/esm/popper-93ecb064.js +1788 -0
- package/dist/mg-components/fonts/OpenSans-Bold.ttf +0 -0
- package/dist/mg-components/locales/en/messages.json +50 -0
- package/dist/mg-components/locales/fr/messages.json +50 -0
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/p-21991be8.entry.js +1 -0
- package/dist/mg-components/p-36a64f8c.entry.js +1 -0
- package/dist/mg-components/p-4c66f794.js +1 -0
- package/dist/mg-components/{p-b14a3443.js → p-7bc32a2f.js} +0 -0
- package/dist/mg-components/p-b380a0df.entry.js +1 -0
- package/dist/mg-components/variables.css +3 -2
- package/dist/mg-components/variables.scss +3 -2
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +1 -0
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +0 -1
- package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +1 -0
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +1 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +1 -10
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +0 -1
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +1 -0
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +1 -1
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +1 -0
- package/dist/types/components.d.ts +29 -29
- package/loader/package.json +1 -0
- package/package.json +8 -8
- package/dist/collection/fonts/Poppins-Bold.ttf +0 -0
- package/dist/mg-components/fonts/Poppins-Bold.ttf +0 -0
- package/dist/mg-components/p-a2883dc7.entry.js +0 -1
- package/dist/mg-components/p-cffe0519.entry.js +0 -1
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
2
|
import { MgInput } from '../MgInput';
|
|
3
3
|
import { InputError } from './mg-input-date.conf';
|
|
4
|
-
import {
|
|
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 &&
|
|
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
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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.
|
|
182
|
-
this.
|
|
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() {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
"
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
"
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
"
|
|
249
|
-
"
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
"
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
"
|
|
267
|
-
"
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
"
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
"
|
|
284
|
-
"
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
"
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
"
|
|
301
|
-
"
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
"
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
"
|
|
319
|
-
"
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
"
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
"
|
|
337
|
-
"
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
"
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
"
|
|
355
|
-
"
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
"
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
"
|
|
373
|
-
"
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
"
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
"
|
|
390
|
-
"
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
"
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
"
|
|
407
|
-
"
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
"
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
"
|
|
424
|
-
"
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
"
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
"
|
|
441
|
-
"
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
"
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
"
|
|
458
|
-
"
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
"
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
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
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
"
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
"
|
|
519
|
-
"
|
|
520
|
-
|
|
521
|
-
|
|
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() {
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
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
|
}
|