@mgdis/mg-components 6.17.0 → 6.19.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-DCZEYvlH.js → index-Bp6wZzau.js} +5 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mg-action-more_37.cjs.entry.js +438 -212
- package/dist/cjs/mg-alert.cjs.entry.js +2 -2
- package/dist/cjs/mg-components.cjs.js +2 -2
- package/dist/cjs/mg-fieldset.cjs.entry.js +141 -0
- package/dist/cjs/mg-input-combobox.cjs.entry.js +93 -80
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +35 -26
- package/dist/cjs/{mg-input.conf-WTsvDfpC.js → mg-input.conf-D7jmj_lh.js} +7 -0
- package/dist/cjs/mg-loader.cjs.entry.js +2 -2
- package/dist/cjs/mg-progress.cjs.entry.js +2 -2
- package/dist/collection/assets/icons/index.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js +5 -0
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +178 -18
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +36 -16
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +98 -78
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +41 -22
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +32 -12
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +30 -12
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +31 -12
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +41 -25
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +31 -12
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +60 -40
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +35 -33
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +36 -11
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +1 -1
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +5 -1
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +2 -2
- package/dist/collection/components/molecules/mg-alert/mg-alert.js +1 -1
- package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
- package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +404 -0
- package/dist/collection/components/molecules/mg-form/mg-form.js +13 -4
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +1 -1
- package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +2 -2
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +40 -9
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +1 -1
- package/dist/collection/components/molecules/mg-progress/mg-progress.js +1 -1
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
- package/dist/components/mg-action-more.js +1 -1
- package/dist/components/mg-alert.js +1 -1
- package/dist/components/mg-details.js +1 -1
- package/dist/components/mg-fieldset.d.ts +11 -0
- package/dist/components/mg-fieldset.js +209 -0
- package/dist/components/mg-form.js +4 -3
- package/dist/components/mg-icon2.js +1 -1
- package/dist/components/mg-illustrated-message.js +2 -2
- package/dist/components/mg-input-checkbox-paginated2.js +1 -1
- package/dist/components/mg-input-checkbox.js +29 -16
- package/dist/components/mg-input-combobox.js +92 -79
- package/dist/components/mg-input-date.js +34 -22
- package/dist/components/mg-input-numeric.js +25 -12
- package/dist/components/mg-input-password.js +23 -12
- package/dist/components/mg-input-radio.js +23 -11
- package/dist/components/mg-input-rich-text-editor.js +33 -24
- package/dist/components/mg-input-select2.js +24 -12
- package/dist/components/mg-input-text2.js +51 -39
- package/dist/components/mg-input-textarea.js +28 -33
- package/dist/components/mg-input-toggle.js +35 -10
- package/dist/components/mg-input2.js +119 -19
- package/dist/components/mg-item-more2.js +5 -1
- package/dist/components/mg-loader2.js +1 -1
- package/dist/components/mg-message2.js +2 -2
- package/dist/components/mg-modal.js +3 -3
- package/dist/components/mg-panel.js +37 -8
- package/dist/components/mg-popover-content2.js +2 -2
- package/dist/components/mg-popover2.js +2 -2
- package/dist/components/mg-progress.js +1 -1
- package/dist/components/mg-skip-links.js +1 -1
- package/dist/components/mg-tabs2.js +1 -1
- package/dist/esm/{index-T6kOJXP1.js → index-BluNKQ3L.js} +5 -1
- package/dist/esm/{index-WtiuOkLj.js → index-C7xjtdiw.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mg-action-more_37.entry.js +439 -213
- package/dist/esm/mg-alert.entry.js +3 -3
- package/dist/esm/mg-components.js +3 -3
- package/dist/esm/mg-fieldset.entry.js +139 -0
- package/dist/esm/mg-input-combobox.entry.js +94 -81
- package/dist/esm/mg-input-rich-text-editor.entry.js +36 -27
- package/dist/esm/{mg-input.conf-CNgv8hc5.js → mg-input.conf-DDnrE1hD.js} +6 -1
- package/dist/esm/mg-loader.entry.js +3 -3
- package/dist/esm/mg-progress.entry.js +3 -3
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/p-016bd291.entry.js +1 -0
- package/dist/mg-components/{p-397bf67b.entry.js → p-186a6139.entry.js} +1 -1
- package/dist/mg-components/p-66a1cb83.entry.js +1 -0
- package/dist/mg-components/p-6efd819f.entry.js +1 -0
- package/dist/mg-components/{p-c5da335e.entry.js → p-916dfb6d.entry.js} +1 -1
- package/dist/mg-components/p-BluNKQ3L.js +2 -0
- package/dist/mg-components/{p-WtiuOkLj.js → p-C7xjtdiw.js} +1 -1
- package/dist/mg-components/p-DDnrE1hD.js +1 -0
- package/dist/mg-components/{p-0e6b40d6.entry.js → p-d2c72f09.entry.js} +1 -1
- package/dist/mg-components/{p-5dc3a1fb.entry.js → p-d5a276eb.entry.js} +1 -1
- package/dist/types/assets/icons/index.d.ts +9 -0
- package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +6 -0
- package/dist/types/components/molecules/inputs/mg-input/mg-input.d.ts +32 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +4 -3
- package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.d.ts +1 -0
- package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +8 -7
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +4 -2
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +4 -2
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +4 -2
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +4 -2
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +4 -3
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +4 -2
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +5 -7
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +4 -8
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +4 -2
- package/dist/types/components/molecules/mg-fieldset/mg-fieldset.d.ts +105 -0
- package/dist/types/components/molecules/mg-form/mg-form.d.ts +1 -1
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +8 -1
- package/dist/types/components.d.ts +168 -18
- package/ide/intellij/web-types.json +289 -22
- package/ide/vscode/css-custom-data.json +7 -3
- package/ide/vscode/html-custom-data.json +300 -8
- package/package.json +18 -18
- package/dist/mg-components/p-8a69175b.entry.js +0 -1
- package/dist/mg-components/p-CNgv8hc5.js +0 -1
- package/dist/mg-components/p-T6kOJXP1.js +0 -2
- package/dist/mg-components/p-d84d87ea.entry.js +0 -1
|
@@ -33,6 +33,7 @@ export declare const icons: {
|
|
|
33
33
|
'book-outline': string;
|
|
34
34
|
briefcase: string;
|
|
35
35
|
'briefcase-outline': string;
|
|
36
|
+
building: string;
|
|
36
37
|
'building-outline': string;
|
|
37
38
|
calculator: string;
|
|
38
39
|
'calculator-outline': string;
|
|
@@ -64,6 +65,7 @@ export declare const icons: {
|
|
|
64
65
|
'comment-question': string;
|
|
65
66
|
'comment-question-outline': string;
|
|
66
67
|
'comment-sms': string;
|
|
68
|
+
'comment-sms-outline': string;
|
|
67
69
|
conversation: string;
|
|
68
70
|
'conversation-outline': string;
|
|
69
71
|
copy: string;
|
|
@@ -96,7 +98,9 @@ export declare const icons: {
|
|
|
96
98
|
'fax-outline': string;
|
|
97
99
|
file: string;
|
|
98
100
|
'file-cog': string;
|
|
101
|
+
'file-cog-outline': string;
|
|
99
102
|
'file-download': string;
|
|
103
|
+
'file-download-outline': string;
|
|
100
104
|
'file-excel': string;
|
|
101
105
|
'file-excel-outline': string;
|
|
102
106
|
'file-outline': string;
|
|
@@ -105,6 +109,7 @@ export declare const icons: {
|
|
|
105
109
|
'file-text': string;
|
|
106
110
|
'file-text-outline': string;
|
|
107
111
|
'file-upload': string;
|
|
112
|
+
'file-upload-outline': string;
|
|
108
113
|
'file-word': string;
|
|
109
114
|
'file-word-outline': string;
|
|
110
115
|
filter: string;
|
|
@@ -122,6 +127,7 @@ export declare const icons: {
|
|
|
122
127
|
'folder-link-outline': string;
|
|
123
128
|
'folder-outline': string;
|
|
124
129
|
'folder-star': string;
|
|
130
|
+
'folder-star-outline': string;
|
|
125
131
|
folders: string;
|
|
126
132
|
'folders-outline': string;
|
|
127
133
|
gavel: string;
|
|
@@ -182,9 +188,12 @@ export declare const icons: {
|
|
|
182
188
|
'play-circle': string;
|
|
183
189
|
plus: string;
|
|
184
190
|
'plus-circle': string;
|
|
191
|
+
'plus-circle-outline': string;
|
|
185
192
|
share: string;
|
|
186
193
|
'share-outline': string;
|
|
187
194
|
shuffle: string;
|
|
195
|
+
'sidebar-arrow-left': string;
|
|
196
|
+
'sidebar-arrow-right': string;
|
|
188
197
|
sitemap: string;
|
|
189
198
|
sliders: string;
|
|
190
199
|
'sliders-outline': string;
|
|
@@ -8,6 +8,11 @@ export type Width = (typeof widths)[number];
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const tooltipPositions: readonly ["input", "label"];
|
|
10
10
|
export type TooltipPosition = (typeof tooltipPositions)[number];
|
|
11
|
+
/**
|
|
12
|
+
* Possible label headings
|
|
13
|
+
*/
|
|
14
|
+
export declare const labelHeadings: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
15
|
+
export type labelHeading = (typeof labelHeadings)[number];
|
|
11
16
|
/**
|
|
12
17
|
* Base interface for common methods
|
|
13
18
|
*/
|
|
@@ -31,4 +36,5 @@ export declare const classFieldset = "mg-c-input--fieldset";
|
|
|
31
36
|
export declare const classDisabled = "mg-c-input--disabled";
|
|
32
37
|
export declare const classReadonly = "mg-c-input--readonly";
|
|
33
38
|
export declare const classVerticalList = "mg-c-input--vertical-list";
|
|
39
|
+
export declare const classDisplayCharacterLeft = "mg-c-input--display-character-left";
|
|
34
40
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type TooltipPosition } from './mg-input.conf';
|
|
1
|
+
import { type TooltipPosition, labelHeading } from './mg-input.conf';
|
|
2
2
|
/**
|
|
3
3
|
* @slot - Input content
|
|
4
4
|
*/
|
|
@@ -16,6 +16,9 @@ export declare class MgInput {
|
|
|
16
16
|
private readonly classInput;
|
|
17
17
|
private readonly classHasError;
|
|
18
18
|
private readonly classLabelOnTop;
|
|
19
|
+
private readonly classHasHeading;
|
|
20
|
+
private readonly classLabelBorderDisplay;
|
|
21
|
+
private readonly classInputsOnBottom;
|
|
19
22
|
/**************
|
|
20
23
|
* Decorators *
|
|
21
24
|
**************/
|
|
@@ -42,6 +45,18 @@ export declare class MgInput {
|
|
|
42
45
|
*/
|
|
43
46
|
labelHide: boolean;
|
|
44
47
|
watchLabelConfig(): void;
|
|
48
|
+
/**
|
|
49
|
+
* Define label heading, use to define label with associated semantic
|
|
50
|
+
* You must pair this mode with `labelOnTop`and `fieldset` class
|
|
51
|
+
*/
|
|
52
|
+
labelHeading?: labelHeading;
|
|
53
|
+
watchlabelHeading(newValue: MgInput['labelHeading']): void;
|
|
54
|
+
/**
|
|
55
|
+
* Define if label border is visible
|
|
56
|
+
* You must pair this mode with `labelOnTop`and `fieldset` class
|
|
57
|
+
*/
|
|
58
|
+
labelBorderDisplay: boolean;
|
|
59
|
+
watchLabelBorderDisplay(newValue: MgInput['labelBorderDisplay']): void;
|
|
45
60
|
/**
|
|
46
61
|
* Add a tooltip message next to the input
|
|
47
62
|
*/
|
|
@@ -65,6 +80,11 @@ export declare class MgInput {
|
|
|
65
80
|
*/
|
|
66
81
|
helpText?: string;
|
|
67
82
|
watchHelpText(newValue: MgInput['helpText']): void;
|
|
83
|
+
/**
|
|
84
|
+
* Display inputs after help-text and error message
|
|
85
|
+
*/
|
|
86
|
+
inputsOnBottom?: boolean;
|
|
87
|
+
watchInputsOnBottom(newValue: MgInput['inputsOnBottom']): void;
|
|
68
88
|
/**
|
|
69
89
|
* Define aria-describedby ids to link with
|
|
70
90
|
*/
|
|
@@ -97,6 +117,12 @@ export declare class MgInput {
|
|
|
97
117
|
/************
|
|
98
118
|
* Methods *
|
|
99
119
|
************/
|
|
120
|
+
/**
|
|
121
|
+
* Update element aria-describedby
|
|
122
|
+
* @param element - element to update
|
|
123
|
+
* @param ariaDescribedbyIDs - ariaDescribedbyIDs references
|
|
124
|
+
*/
|
|
125
|
+
private updateElementAriaDescribedby;
|
|
100
126
|
/**
|
|
101
127
|
* Render input label
|
|
102
128
|
*/
|
|
@@ -125,6 +151,11 @@ export declare class MgInput {
|
|
|
125
151
|
* @returns mg-tooltip
|
|
126
152
|
*/
|
|
127
153
|
private renderTooltip;
|
|
154
|
+
/**
|
|
155
|
+
* Get input container element
|
|
156
|
+
* @returns ordered elements
|
|
157
|
+
*/
|
|
158
|
+
private inputContainerElements;
|
|
128
159
|
/**
|
|
129
160
|
* Render
|
|
130
161
|
* @returns HTML Element
|
|
@@ -10,6 +10,7 @@ export declare class MgInputCheckbox implements Omit<MgInputCheckboxListProps, '
|
|
|
10
10
|
private searchInput;
|
|
11
11
|
private messages;
|
|
12
12
|
private hasDisplayedError;
|
|
13
|
+
private customErrorMessage;
|
|
13
14
|
private mode;
|
|
14
15
|
private readonly baseClassName;
|
|
15
16
|
private readonly classTypeMulti;
|
|
@@ -179,8 +180,9 @@ export declare class MgInputCheckbox implements Omit<MgInputCheckboxListProps, '
|
|
|
179
180
|
* When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
180
181
|
* @param valid - value indicating the validity
|
|
181
182
|
* @param errorMessage - the error message to display
|
|
183
|
+
* @param errorMessageLock - lock the error message and validity state
|
|
182
184
|
*/
|
|
183
|
-
setError(valid: MgInputCheckbox['valid'], errorMessage
|
|
185
|
+
setError(valid: MgInputCheckbox['valid'], errorMessage?: string, errorMessageLock?: boolean): Promise<void>;
|
|
184
186
|
/**
|
|
185
187
|
* Reset value, validity and error state
|
|
186
188
|
*/
|
|
@@ -259,8 +261,7 @@ export declare class MgInputCheckbox implements Omit<MgInputCheckboxListProps, '
|
|
|
259
261
|
private getSelectValuesButtonMessage;
|
|
260
262
|
/**
|
|
261
263
|
* Set input error message
|
|
262
|
-
* @param
|
|
263
|
-
* @param errorMessage - errorMessage override
|
|
264
|
+
* @param fromSetErrorContext - context come from `setError` method
|
|
264
265
|
*/
|
|
265
266
|
private setErrorMessage;
|
|
266
267
|
/**
|
|
@@ -7,12 +7,12 @@ export declare class MgInputCombobox {
|
|
|
7
7
|
/************
|
|
8
8
|
* Internal *
|
|
9
9
|
************/
|
|
10
|
-
private readonly classFocus;
|
|
11
10
|
private input;
|
|
12
11
|
private loadMoreElement;
|
|
13
12
|
private popoverId;
|
|
14
13
|
private messages;
|
|
15
14
|
private hasDisplayedError;
|
|
15
|
+
private customErrorMessage;
|
|
16
16
|
private handlerInProgress;
|
|
17
17
|
private loadingAction;
|
|
18
18
|
private debounce;
|
|
@@ -168,7 +168,7 @@ export declare class MgInputCombobox {
|
|
|
168
168
|
* Formated items for display
|
|
169
169
|
*/
|
|
170
170
|
options: Paginate<Option>;
|
|
171
|
-
watchOptions(
|
|
171
|
+
watchOptions(): void;
|
|
172
172
|
/**
|
|
173
173
|
* Active option
|
|
174
174
|
*/
|
|
@@ -226,8 +226,9 @@ export declare class MgInputCombobox {
|
|
|
226
226
|
* When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
227
227
|
* @param valid - value indicating the validity
|
|
228
228
|
* @param errorMessage - the error message to display
|
|
229
|
+
* @param errorMessageLock - lock the error message and validity state
|
|
229
230
|
*/
|
|
230
|
-
setError(valid: MgInputCombobox['valid'], errorMessage
|
|
231
|
+
setError(valid: MgInputCombobox['valid'], errorMessage?: string, errorMessageLock?: boolean): Promise<void>;
|
|
231
232
|
/**
|
|
232
233
|
* Reset value, validity and error state
|
|
233
234
|
*/
|
|
@@ -299,14 +300,14 @@ export declare class MgInputCombobox {
|
|
|
299
300
|
private checkValidity;
|
|
300
301
|
/**
|
|
301
302
|
* Set input error message
|
|
302
|
-
* @param
|
|
303
|
+
* @param fromSetErrorContext - context come from `setError` method
|
|
303
304
|
*/
|
|
304
305
|
private setErrorMessage;
|
|
305
306
|
/**
|
|
306
|
-
* Get
|
|
307
|
-
* @returns
|
|
307
|
+
* Get first page with filter applied
|
|
308
|
+
* @returns first page with filter applied
|
|
308
309
|
*/
|
|
309
|
-
private
|
|
310
|
+
private getFirstPage;
|
|
310
311
|
/**
|
|
311
312
|
* Loading wrapper with a given action
|
|
312
313
|
* @param action - wrapped loading action
|
|
@@ -11,6 +11,7 @@ export declare class MgInputDate {
|
|
|
11
11
|
private systemLocale;
|
|
12
12
|
private hasDisplayedError;
|
|
13
13
|
private handlerInProgress;
|
|
14
|
+
private customErrorMessage;
|
|
14
15
|
/**************
|
|
15
16
|
* Decorators *
|
|
16
17
|
**************/
|
|
@@ -126,8 +127,9 @@ export declare class MgInputDate {
|
|
|
126
127
|
* When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
127
128
|
* @param valid - value indicating the validity
|
|
128
129
|
* @param errorMessage - the error message to display
|
|
130
|
+
* @param errorMessageLock - lock the error message and validity state
|
|
129
131
|
*/
|
|
130
|
-
setError(valid: MgInputDate['valid'], errorMessage
|
|
132
|
+
setError(valid: MgInputDate['valid'], errorMessage?: string, errorMessageLock?: boolean): Promise<void>;
|
|
131
133
|
/**
|
|
132
134
|
* Reset value, validity and error state
|
|
133
135
|
*/
|
|
@@ -173,7 +175,7 @@ export declare class MgInputDate {
|
|
|
173
175
|
private getInputError;
|
|
174
176
|
/**
|
|
175
177
|
* Check input errors
|
|
176
|
-
* @param
|
|
178
|
+
* @param fromSetErrorContext - context come from `setError` method
|
|
177
179
|
*/
|
|
178
180
|
private setErrorMessage;
|
|
179
181
|
/*************
|
|
@@ -18,6 +18,7 @@ export declare class MgInputNumeric {
|
|
|
18
18
|
private messages;
|
|
19
19
|
private hasDisplayedError;
|
|
20
20
|
private handlerInProgress;
|
|
21
|
+
private customErrorMessage;
|
|
21
22
|
/**************
|
|
22
23
|
* Decorators *
|
|
23
24
|
**************/
|
|
@@ -174,8 +175,9 @@ export declare class MgInputNumeric {
|
|
|
174
175
|
* When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
175
176
|
* @param valid - value indicating the validity
|
|
176
177
|
* @param errorMessage - the error message to display
|
|
178
|
+
* @param errorMessageLock - lock the error message and validity state
|
|
177
179
|
*/
|
|
178
|
-
setError(valid: MgInputNumeric['valid'], errorMessage
|
|
180
|
+
setError(valid: MgInputNumeric['valid'], errorMessage?: string, errorMessageLock?: boolean): Promise<void>;
|
|
179
181
|
/**
|
|
180
182
|
* Reset value, validity and error state
|
|
181
183
|
*/
|
|
@@ -229,7 +231,7 @@ export declare class MgInputNumeric {
|
|
|
229
231
|
private formatErrorValue;
|
|
230
232
|
/**
|
|
231
233
|
* Set input error message
|
|
232
|
-
* @param
|
|
234
|
+
* @param fromSetErrorContext - context come from `setError` method
|
|
233
235
|
*/
|
|
234
236
|
private setErrorMessage;
|
|
235
237
|
/**
|
|
@@ -9,6 +9,7 @@ export declare class MgInputPassword {
|
|
|
9
9
|
private messages;
|
|
10
10
|
private hasDisplayedError;
|
|
11
11
|
private handlerInProgress;
|
|
12
|
+
private customErrorMessage;
|
|
12
13
|
/**************
|
|
13
14
|
* Decorators *
|
|
14
15
|
**************/
|
|
@@ -126,8 +127,9 @@ export declare class MgInputPassword {
|
|
|
126
127
|
* When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
127
128
|
* @param valid - value indicating the validity
|
|
128
129
|
* @param errorMessage - the error message to display
|
|
130
|
+
* @param errorMessageLock - lock the error message and validity state
|
|
129
131
|
*/
|
|
130
|
-
setError(valid: MgInputPassword['valid'], errorMessage
|
|
132
|
+
setError(valid: MgInputPassword['valid'], errorMessage?: string, errorMessageLock?: boolean): Promise<void>;
|
|
131
133
|
/**
|
|
132
134
|
* Reset value, validity and error state
|
|
133
135
|
*/
|
|
@@ -155,7 +157,7 @@ export declare class MgInputPassword {
|
|
|
155
157
|
private checkValidity;
|
|
156
158
|
/**
|
|
157
159
|
* Set input error message
|
|
158
|
-
* @param
|
|
160
|
+
* @param fromSetErrorContext - context come from `setError` method
|
|
159
161
|
*/
|
|
160
162
|
private setErrorMessage;
|
|
161
163
|
/*************
|
|
@@ -11,6 +11,7 @@ export declare class MgInputRadio {
|
|
|
11
11
|
private messages;
|
|
12
12
|
private hasDisplayedError;
|
|
13
13
|
private handlerInProgress;
|
|
14
|
+
private customErrorMessage;
|
|
14
15
|
/**************
|
|
15
16
|
* Decorators *
|
|
16
17
|
**************/
|
|
@@ -128,8 +129,9 @@ export declare class MgInputRadio {
|
|
|
128
129
|
* When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
129
130
|
* @param valid - value indicating the validity
|
|
130
131
|
* @param errorMessage - the error message to display
|
|
132
|
+
* @param errorMessageLock - lock the error message and validity state
|
|
131
133
|
*/
|
|
132
|
-
setError(valid: MgInputRadio['valid'], errorMessage
|
|
134
|
+
setError(valid: MgInputRadio['valid'], errorMessage?: string, errorMessageLock?: boolean): Promise<void>;
|
|
133
135
|
/**
|
|
134
136
|
* Reset value, validity and error state
|
|
135
137
|
*/
|
|
@@ -154,7 +156,7 @@ export declare class MgInputRadio {
|
|
|
154
156
|
private checkValidity;
|
|
155
157
|
/**
|
|
156
158
|
* Set input error message
|
|
157
|
-
* @param
|
|
159
|
+
* @param fromSetErrorContext - context come from `setError` method
|
|
158
160
|
*/
|
|
159
161
|
private setErrorMessage;
|
|
160
162
|
/**
|
|
@@ -10,7 +10,7 @@ export declare class MgInputRichTextEditor {
|
|
|
10
10
|
private wrapperElement;
|
|
11
11
|
private messages;
|
|
12
12
|
private hasDisplayedError;
|
|
13
|
-
private
|
|
13
|
+
private customErrorMessage;
|
|
14
14
|
/**************
|
|
15
15
|
* Decorators *
|
|
16
16
|
**************/
|
|
@@ -138,8 +138,9 @@ export declare class MgInputRichTextEditor {
|
|
|
138
138
|
* When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
139
139
|
* @param valid - value indicating the validity
|
|
140
140
|
* @param errorMessage - the error message to display
|
|
141
|
+
* @param errorMessageLock - lock the error message and validity state
|
|
141
142
|
*/
|
|
142
|
-
setError(valid: MgInputRichTextEditor['valid'], errorMessage
|
|
143
|
+
setError(valid: MgInputRichTextEditor['valid'], errorMessage?: string, errorMessageLock?: boolean): Promise<void>;
|
|
143
144
|
/**
|
|
144
145
|
* Reset value, validity and error state
|
|
145
146
|
*/
|
|
@@ -170,7 +171,7 @@ export declare class MgInputRichTextEditor {
|
|
|
170
171
|
private checkValidity;
|
|
171
172
|
/**
|
|
172
173
|
* Set input error message
|
|
173
|
-
* @param
|
|
174
|
+
* @param fromSetErrorContext - context come from `setError` method
|
|
174
175
|
*/
|
|
175
176
|
private setErrorMessage;
|
|
176
177
|
/**
|
|
@@ -10,6 +10,7 @@ export declare class MgInputSelect {
|
|
|
10
10
|
private messages;
|
|
11
11
|
private hasDisplayedError;
|
|
12
12
|
private handlerInProgress;
|
|
13
|
+
private customErrorMessage;
|
|
13
14
|
/**************
|
|
14
15
|
* Decorators *
|
|
15
16
|
**************/
|
|
@@ -140,8 +141,9 @@ export declare class MgInputSelect {
|
|
|
140
141
|
* When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
141
142
|
* @param valid - value indicating the validity
|
|
142
143
|
* @param errorMessage - the error message to display
|
|
144
|
+
* @param errorMessageLock - lock the error message and validity state
|
|
143
145
|
*/
|
|
144
|
-
setError(valid: MgInputSelect['valid'], errorMessage
|
|
146
|
+
setError(valid: MgInputSelect['valid'], errorMessage?: string, errorMessageLock?: boolean): Promise<void>;
|
|
145
147
|
/**
|
|
146
148
|
* Reset value, validity and error state
|
|
147
149
|
*/
|
|
@@ -181,7 +183,7 @@ export declare class MgInputSelect {
|
|
|
181
183
|
private checkValidity;
|
|
182
184
|
/**
|
|
183
185
|
* Set input error message
|
|
184
|
-
* @param
|
|
186
|
+
* @param fromSetErrorContext - context come from `setError` method
|
|
185
187
|
*/
|
|
186
188
|
private setErrorMessage;
|
|
187
189
|
/*************
|
|
@@ -10,7 +10,6 @@ export declare class MgInputText {
|
|
|
10
10
|
/************
|
|
11
11
|
* Internal *
|
|
12
12
|
************/
|
|
13
|
-
private readonly classFocus;
|
|
14
13
|
private readonly classIsInputGroupAppend;
|
|
15
14
|
private readonly classHasIcon;
|
|
16
15
|
private readonly classHasButtonsGroupAppend;
|
|
@@ -21,6 +20,7 @@ export declare class MgInputText {
|
|
|
21
20
|
private input;
|
|
22
21
|
private messages;
|
|
23
22
|
private hasDisplayedError;
|
|
23
|
+
private customErrorMessage;
|
|
24
24
|
private handlerInProgress;
|
|
25
25
|
/**************
|
|
26
26
|
* Decorators *
|
|
@@ -121,6 +121,7 @@ export declare class MgInputText {
|
|
|
121
121
|
* Define if component should display character left
|
|
122
122
|
*/
|
|
123
123
|
characterLeftHide: boolean;
|
|
124
|
+
validateCharacterLeftHide(newValue: boolean): void;
|
|
124
125
|
/**
|
|
125
126
|
* Add a help text under the input, usually expected data format and example
|
|
126
127
|
*/
|
|
@@ -165,8 +166,9 @@ export declare class MgInputText {
|
|
|
165
166
|
* When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
166
167
|
* @param valid - value indicating the validity
|
|
167
168
|
* @param errorMessage - the error message to display
|
|
169
|
+
* @param errorMessageLock - lock the error message and validity state
|
|
168
170
|
*/
|
|
169
|
-
setError(valid: MgInputText['valid'], errorMessage
|
|
171
|
+
setError(valid: MgInputText['valid'], errorMessage?: string, errorMessageLock?: boolean): Promise<void>;
|
|
170
172
|
/**
|
|
171
173
|
* Reset value, validity and error state
|
|
172
174
|
*/
|
|
@@ -184,10 +186,6 @@ export declare class MgInputText {
|
|
|
184
186
|
* Handle input event
|
|
185
187
|
*/
|
|
186
188
|
private handleInput;
|
|
187
|
-
/**
|
|
188
|
-
* Handle focus event
|
|
189
|
-
*/
|
|
190
|
-
private handleFocus;
|
|
191
189
|
/**
|
|
192
190
|
* Handle blur event
|
|
193
191
|
*/
|
|
@@ -198,7 +196,7 @@ export declare class MgInputText {
|
|
|
198
196
|
private checkValidity;
|
|
199
197
|
/**
|
|
200
198
|
* Set input error message
|
|
201
|
-
* @param
|
|
199
|
+
* @param fromSetErrorContext - context come from `setError` method
|
|
202
200
|
*/
|
|
203
201
|
private setErrorMessage;
|
|
204
202
|
/**
|
|
@@ -5,13 +5,12 @@ export declare class MgInputTextarea {
|
|
|
5
5
|
/************
|
|
6
6
|
* Internal *
|
|
7
7
|
************/
|
|
8
|
-
private readonly classFocus;
|
|
9
|
-
private readonly classDisplayCharacterLeft;
|
|
10
8
|
private characterLeftId;
|
|
11
9
|
private input;
|
|
12
10
|
private messages;
|
|
13
11
|
private hasDisplayedError;
|
|
14
12
|
private handlerInProgress;
|
|
13
|
+
private customErrorMessage;
|
|
15
14
|
/**************
|
|
16
15
|
* Decorators *
|
|
17
16
|
**************/
|
|
@@ -148,8 +147,9 @@ export declare class MgInputTextarea {
|
|
|
148
147
|
* When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
149
148
|
* @param valid - value indicating the validity
|
|
150
149
|
* @param errorMessage - the error message to display
|
|
150
|
+
* @param errorMessageLock - lock the error message and validity state
|
|
151
151
|
*/
|
|
152
|
-
setError(valid: MgInputTextarea['valid'], errorMessage
|
|
152
|
+
setError(valid: MgInputTextarea['valid'], errorMessage?: string, errorMessageLock?: boolean): Promise<void>;
|
|
153
153
|
/**
|
|
154
154
|
* Reset value, validity and error state
|
|
155
155
|
*/
|
|
@@ -163,10 +163,6 @@ export declare class MgInputTextarea {
|
|
|
163
163
|
* Handle input event
|
|
164
164
|
*/
|
|
165
165
|
private handleInput;
|
|
166
|
-
/**
|
|
167
|
-
* Handle focus event
|
|
168
|
-
*/
|
|
169
|
-
private handleFocus;
|
|
170
166
|
/**
|
|
171
167
|
* Handle blur event
|
|
172
168
|
*/
|
|
@@ -183,7 +179,7 @@ export declare class MgInputTextarea {
|
|
|
183
179
|
private checkValidity;
|
|
184
180
|
/**
|
|
185
181
|
* Set input error message
|
|
186
|
-
* @param
|
|
182
|
+
* @param fromSetErrorContext - context come from `setError` method
|
|
187
183
|
*/
|
|
188
184
|
private setErrorMessage;
|
|
189
185
|
/*************
|
|
@@ -53,7 +53,9 @@ export declare class MgInputToggle {
|
|
|
53
53
|
*/
|
|
54
54
|
labelHide: boolean;
|
|
55
55
|
/**
|
|
56
|
-
* Define if toggle have on/off style
|
|
56
|
+
* Define if toggle have on/off style,
|
|
57
|
+
* the left icon is hidden.
|
|
58
|
+
* Only available in combination with the "isIcon" prop.
|
|
57
59
|
*/
|
|
58
60
|
isOnOff: boolean;
|
|
59
61
|
watchIsOnOff(newValue: MgInputToggle['isOnOff']): void;
|
|
@@ -125,7 +127,7 @@ export declare class MgInputToggle {
|
|
|
125
127
|
* @param valid - value indicating the validity
|
|
126
128
|
* @param errorMessage - the error message to display
|
|
127
129
|
*/
|
|
128
|
-
setError(valid: boolean, errorMessage
|
|
130
|
+
setError(valid: boolean, errorMessage?: string): Promise<void>;
|
|
129
131
|
/**
|
|
130
132
|
* Reset value, validity, error and visual state
|
|
131
133
|
*/
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { ClassList } from '@mgdis/core-ui-helpers/dist/utils';
|
|
2
|
+
import { labelHeading } from '../inputs/mg-input/mg-input.conf';
|
|
3
|
+
export declare class MgFieldset {
|
|
4
|
+
/************
|
|
5
|
+
* Internal *
|
|
6
|
+
************/
|
|
7
|
+
private mgInputs;
|
|
8
|
+
/**************
|
|
9
|
+
* Decorators *
|
|
10
|
+
**************/
|
|
11
|
+
/**
|
|
12
|
+
* Get component DOM element
|
|
13
|
+
*/
|
|
14
|
+
element: HTMLMgFieldsetElement;
|
|
15
|
+
/**
|
|
16
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
17
|
+
*/
|
|
18
|
+
identifier: string;
|
|
19
|
+
/**
|
|
20
|
+
* Fieldset name
|
|
21
|
+
* If not set the value equals the identifier
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* Fieldset legend
|
|
26
|
+
*/
|
|
27
|
+
legend: string;
|
|
28
|
+
/**
|
|
29
|
+
* Define if legend is visible
|
|
30
|
+
*/
|
|
31
|
+
legendHide: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Define legend heading, use to define legend with associated semantic
|
|
34
|
+
*/
|
|
35
|
+
legendHeading?: labelHeading;
|
|
36
|
+
/**
|
|
37
|
+
* Define if legend border is visible.
|
|
38
|
+
*/
|
|
39
|
+
legendBorderDisplay: boolean;
|
|
40
|
+
watchLegendBorderDisplay(newValue: MgFieldset['legendBorderDisplay']): void;
|
|
41
|
+
/**
|
|
42
|
+
* Define if inputs are readonly
|
|
43
|
+
*/
|
|
44
|
+
readonly: boolean;
|
|
45
|
+
watchReadonly(newValue: MgFieldset['readonly']): void;
|
|
46
|
+
/**
|
|
47
|
+
* Define if inputs are disabled
|
|
48
|
+
*/
|
|
49
|
+
disabled: boolean;
|
|
50
|
+
handleAttributeChange(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Add a tooltip message next to the fieldset
|
|
53
|
+
*/
|
|
54
|
+
tooltip?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Add a help text under the fieldset, usually expected data format and example
|
|
57
|
+
*/
|
|
58
|
+
helpText?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Define custom error message to display
|
|
61
|
+
*/
|
|
62
|
+
errorMessage?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Define fieldset valid state
|
|
65
|
+
*/
|
|
66
|
+
valid: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Component classes
|
|
69
|
+
*/
|
|
70
|
+
classCollection: ClassList;
|
|
71
|
+
/**
|
|
72
|
+
* Component is not a candidate for constraint validation.
|
|
73
|
+
* You can use this method to define the `errorMessage` and set the `valid` state to `false`.
|
|
74
|
+
* @param errorMessage - error message to display. Use a valid `string` to define an error or `undefined` to delete the error
|
|
75
|
+
*/
|
|
76
|
+
setCustomValidity(errorMessage?: string): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Display inputs error if it exists.
|
|
79
|
+
*/
|
|
80
|
+
displayError(): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Check if fieldset is valid
|
|
83
|
+
*/
|
|
84
|
+
private checkValidity;
|
|
85
|
+
/**
|
|
86
|
+
* Set mgInputs
|
|
87
|
+
*/
|
|
88
|
+
private setMgInputs;
|
|
89
|
+
/*************
|
|
90
|
+
* Lifecycle *
|
|
91
|
+
*************/
|
|
92
|
+
/**
|
|
93
|
+
* Check if component props are well configured on init
|
|
94
|
+
*/
|
|
95
|
+
componentWillLoad(): void;
|
|
96
|
+
/**
|
|
97
|
+
* Add slot listeners
|
|
98
|
+
*/
|
|
99
|
+
componentDidLoad(): void;
|
|
100
|
+
/**
|
|
101
|
+
* Render
|
|
102
|
+
* @returns HTML Element
|
|
103
|
+
*/
|
|
104
|
+
render(): HTMLElement;
|
|
105
|
+
}
|
|
@@ -3,6 +3,7 @@ import { ClassList } from '@mgdis/core-ui-helpers/dist/utils';
|
|
|
3
3
|
import { type ExpandToggleDisplayType, type TitlePositionType } from './mg-panel.conf';
|
|
4
4
|
/**
|
|
5
5
|
* @slot - Panel content
|
|
6
|
+
* @slot panel-title - Panel title content (replaces panel-title prop when used)
|
|
6
7
|
* @slot header-right - Header right panel content
|
|
7
8
|
*/
|
|
8
9
|
export declare class MgPanel {
|
|
@@ -27,7 +28,7 @@ export declare class MgPanel {
|
|
|
27
28
|
/**
|
|
28
29
|
* Panel title
|
|
29
30
|
*/
|
|
30
|
-
panelTitle
|
|
31
|
+
panelTitle?: string;
|
|
31
32
|
validatePanelTitle(newValue: MgPanel['panelTitle']): void;
|
|
32
33
|
/**
|
|
33
34
|
* Panel title pattern
|
|
@@ -42,6 +43,7 @@ export declare class MgPanel {
|
|
|
42
43
|
* Define if panel title is editable
|
|
43
44
|
*/
|
|
44
45
|
titleEditable: boolean;
|
|
46
|
+
validateTitleEditable(newValue: MgPanel['titleEditable']): void;
|
|
45
47
|
/**
|
|
46
48
|
* Define title position
|
|
47
49
|
*/
|
|
@@ -88,6 +90,11 @@ export declare class MgPanel {
|
|
|
88
90
|
/************
|
|
89
91
|
* Methods *
|
|
90
92
|
************/
|
|
93
|
+
/**
|
|
94
|
+
* Check if panel-title slot is used
|
|
95
|
+
* @returns true if slot is used
|
|
96
|
+
*/
|
|
97
|
+
private hasPanelTitleSlot;
|
|
91
98
|
/**
|
|
92
99
|
* Toggle is editing state
|
|
93
100
|
*/
|