@mgdis/mg-components 5.9.1 → 5.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mg-action-more_31.cjs.entry.js +345 -648
- package/dist/cjs/mg-components.cjs.js +1 -1
- package/dist/cjs/mg-item-more.cjs.entry.js +19 -43
- package/dist/cjs/{mg-menu.conf-9afe6571.js → mg-menu.conf-196151fe.js} +16 -21
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +9 -12
- package/dist/collection/components/atoms/mg-button/mg-button.js +18 -27
- package/dist/collection/components/atoms/mg-card/mg-card.js +22 -15
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +1 -4
- package/dist/collection/components/atoms/mg-divider/mg-divider.js +1 -2
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +26 -23
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +1 -4
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +11 -16
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +12 -34
- package/dist/collection/components/molecules/inputs/MgInput.conf.js +4 -1
- package/dist/collection/components/molecules/inputs/MgInput.js +26 -24
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +10 -20
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +7 -17
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +14 -34
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +6 -13
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +10 -27
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +21 -45
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +17 -43
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +14 -22
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +17 -28
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +11 -29
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +20 -47
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +11 -23
- package/dist/collection/components/molecules/mg-details/mg-details.js +1 -6
- package/dist/collection/components/molecules/mg-form/mg-form.js +8 -27
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +1 -4
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +4 -12
- package/dist/collection/components/molecules/mg-message/mg-message.js +12 -20
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +8 -17
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +11 -19
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +11 -30
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +8 -21
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +3 -8
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +20 -36
- package/dist/collection/locales/index.js +2 -3
- package/dist/collection/utils/behaviors.utils.js +16 -32
- package/dist/collection/utils/components.utils.js +22 -33
- package/dist/collection/utils/locale.utils.js +14 -18
- package/dist/collection/utils/unit.test.utils.js +7 -15
- package/dist/components/MgInput.js +30 -24
- package/dist/components/components.utils.js +22 -33
- package/dist/components/index2.js +16 -21
- package/dist/components/mg-action-more.js +9 -21
- package/dist/components/mg-badge2.js +9 -12
- package/dist/components/mg-button2.js +18 -27
- package/dist/components/mg-card2.js +20 -13
- package/dist/components/mg-character-left2.js +1 -4
- package/dist/components/mg-details.js +1 -6
- package/dist/components/mg-divider.js +1 -2
- package/dist/components/mg-form.js +7 -23
- package/dist/components/mg-icon2.js +26 -23
- package/dist/components/mg-illustrated-message.js +1 -4
- package/dist/components/mg-input-checkbox.js +9 -16
- package/dist/components/mg-input-date.js +6 -13
- package/dist/components/mg-input-numeric.js +13 -30
- package/dist/components/mg-input-password.js +5 -9
- package/dist/components/mg-input-radio.js +9 -23
- package/dist/components/mg-input-select2.js +20 -41
- package/dist/components/mg-input-text2.js +15 -35
- package/dist/components/mg-input-textarea.js +13 -18
- package/dist/components/mg-input-title2.js +1 -4
- package/dist/components/mg-input-toggle.js +16 -24
- package/dist/components/mg-item-more.js +18 -42
- package/dist/components/mg-menu-item2.js +17 -44
- package/dist/components/mg-menu2.js +9 -27
- package/dist/components/mg-message.js +12 -20
- package/dist/components/mg-modal.js +8 -17
- package/dist/components/mg-pagination.js +11 -19
- package/dist/components/mg-panel.js +11 -30
- package/dist/components/mg-popover2.js +8 -21
- package/dist/components/mg-skip-links.js +3 -8
- package/dist/components/mg-tabs.js +20 -36
- package/dist/components/mg-tag.js +11 -16
- package/dist/components/mg-tooltip2.js +12 -34
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mg-action-more_31.entry.js +345 -648
- package/dist/esm/mg-components.js +1 -1
- package/dist/esm/mg-item-more.entry.js +19 -43
- package/dist/esm/{mg-menu.conf-881fbd82.js → mg-menu.conf-9ca023ee.js} +16 -21
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-67ce7cb8.entry.js → p-97aaca3e.entry.js} +1 -1
- package/dist/mg-components/p-d891e707.entry.js +1 -0
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +2 -5
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +5 -14
- package/dist/types/components/atoms/mg-card/mg-card.d.ts +11 -8
- package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +1 -4
- package/dist/types/components/atoms/mg-divider/mg-divider.d.ts +1 -2
- package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +8 -7
- package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +1 -4
- package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +3 -8
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +11 -33
- package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +2 -1
- package/dist/types/components/molecules/inputs/MgInput.d.ts +5 -6
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +5 -11
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +4 -11
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +7 -26
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +3 -7
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +5 -18
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.conf.d.ts +2 -2
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +9 -22
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +3 -23
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +4 -9
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +2 -11
- package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +10 -29
- package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +21 -49
- package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +3 -15
- package/dist/types/components/molecules/mg-details/mg-details.d.ts +1 -6
- package/dist/types/components/molecules/mg-form/mg-form.d.ts +3 -19
- package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.d.ts +1 -4
- package/dist/types/components/molecules/mg-item-more/mg-item-more.d.ts +2 -12
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +4 -12
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +3 -12
- package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +5 -14
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +4 -23
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +3 -16
- package/dist/types/components/molecules/mg-skip-links/mg-skip-links.d.ts +2 -7
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +15 -30
- package/dist/types/components.d.ts +22 -34
- package/dist/types/locales/index.d.ts +2 -3
- package/dist/types/utils/behaviors.utils.d.ts +14 -29
- package/dist/types/utils/components.utils.d.ts +19 -29
- package/dist/types/utils/locale.utils.d.ts +14 -18
- package/dist/types/utils/unit.test.utils.d.ts +11 -24
- package/package.json +11 -12
- package/dist/mg-components/p-9a93b7af.entry.js +0 -1
- /package/dist/mg-components/{p-367f92d2.js → p-0d3146d9.js} +0 -0
|
@@ -96,7 +96,7 @@ export declare class MgInputSelect {
|
|
|
96
96
|
/**
|
|
97
97
|
* Component classes
|
|
98
98
|
*/
|
|
99
|
-
|
|
99
|
+
classCollection: ClassList;
|
|
100
100
|
/**
|
|
101
101
|
* Error message to display
|
|
102
102
|
*/
|
|
@@ -123,34 +123,25 @@ export declare class MgInputSelect {
|
|
|
123
123
|
inputValid: EventEmitter<boolean>;
|
|
124
124
|
/**
|
|
125
125
|
* Public method to display errors
|
|
126
|
-
*
|
|
127
|
-
* @returns {Promise<void>}
|
|
128
126
|
*/
|
|
129
127
|
displayError(): Promise<void>;
|
|
130
128
|
/**
|
|
131
129
|
* Handle input event
|
|
132
|
-
*
|
|
133
|
-
* @returns {void}
|
|
134
130
|
*/
|
|
135
131
|
private handleInput;
|
|
136
132
|
/**
|
|
137
133
|
* Method to compare item.title with input.value
|
|
138
|
-
*
|
|
139
|
-
* @
|
|
140
|
-
* @returns {boolean} truthy if input.value is an item
|
|
134
|
+
* @param item - item to compare with
|
|
135
|
+
* @returns truthy if input.value is an item
|
|
141
136
|
*/
|
|
142
137
|
private isInputValue;
|
|
143
138
|
/**
|
|
144
139
|
* value props setter
|
|
145
|
-
*
|
|
146
|
-
* @param {MgInputSelect['value']} newValue value to update with
|
|
147
|
-
* @returns {void}
|
|
140
|
+
* @param newValue - value to update with
|
|
148
141
|
*/
|
|
149
142
|
private setValue;
|
|
150
143
|
/**
|
|
151
144
|
* Update value from input.value
|
|
152
|
-
*
|
|
153
|
-
* @returns {void}
|
|
154
145
|
*/
|
|
155
146
|
private updateValue;
|
|
156
147
|
/**
|
|
@@ -159,8 +150,7 @@ export declare class MgInputSelect {
|
|
|
159
150
|
private handleBlur;
|
|
160
151
|
/**
|
|
161
152
|
* Input value is disabled
|
|
162
|
-
*
|
|
163
|
-
* @returns {boolean} truthy if input value is disabled
|
|
153
|
+
* @returns truthy if input value is disabled
|
|
164
154
|
*/
|
|
165
155
|
private isDisabledValue;
|
|
166
156
|
/**
|
|
@@ -176,21 +166,18 @@ export declare class MgInputSelect {
|
|
|
176
166
|
*************/
|
|
177
167
|
/**
|
|
178
168
|
* Check if component props are well configured on init
|
|
179
|
-
*
|
|
180
|
-
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
169
|
+
* @returns timeout
|
|
181
170
|
*/
|
|
182
171
|
componentWillLoad(): ReturnType<typeof setTimeout>;
|
|
183
172
|
/**
|
|
184
173
|
* Render option
|
|
185
|
-
*
|
|
186
|
-
* @
|
|
187
|
-
* @returns {HTMLElement} render option
|
|
174
|
+
* @param option - to render
|
|
175
|
+
* @returns render option
|
|
188
176
|
*/
|
|
189
177
|
private renderOption;
|
|
190
178
|
/**
|
|
191
179
|
* Render
|
|
192
|
-
*
|
|
193
|
-
* @returns {HTMLElement} HTML Element
|
|
180
|
+
* @returns HTML Element
|
|
194
181
|
*/
|
|
195
182
|
render(): HTMLElement;
|
|
196
183
|
}
|
|
@@ -111,7 +111,7 @@ export declare class MgInputText {
|
|
|
111
111
|
/**
|
|
112
112
|
* Component classes
|
|
113
113
|
*/
|
|
114
|
-
|
|
114
|
+
classCollection: ClassList;
|
|
115
115
|
/**
|
|
116
116
|
* Error message to display
|
|
117
117
|
*/
|
|
@@ -126,56 +126,38 @@ export declare class MgInputText {
|
|
|
126
126
|
inputValid: EventEmitter<boolean>;
|
|
127
127
|
/**
|
|
128
128
|
* Public method to play input focus
|
|
129
|
-
*
|
|
130
|
-
* @returns {Promise<void>}
|
|
131
129
|
*/
|
|
132
130
|
setFocus(): Promise<void>;
|
|
133
131
|
/**
|
|
134
132
|
* Public method to display errors
|
|
135
|
-
*
|
|
136
|
-
* @returns {Promise<void>}
|
|
137
133
|
*/
|
|
138
134
|
displayError(): Promise<void>;
|
|
139
135
|
/**
|
|
140
136
|
* Handle input event
|
|
141
|
-
*
|
|
142
|
-
* @returns {void}
|
|
143
137
|
*/
|
|
144
138
|
private handleInput;
|
|
145
139
|
/**
|
|
146
140
|
* Handle focus event
|
|
147
|
-
*
|
|
148
|
-
* @returns {void}
|
|
149
141
|
*/
|
|
150
142
|
private handleFocus;
|
|
151
143
|
/**
|
|
152
144
|
* Handle blur event
|
|
153
|
-
*
|
|
154
|
-
* @returns {void}
|
|
155
145
|
*/
|
|
156
146
|
private handleBlur;
|
|
157
147
|
/**
|
|
158
148
|
* Check if input is valid
|
|
159
|
-
*
|
|
160
|
-
* @returns {void}
|
|
161
149
|
*/
|
|
162
150
|
private checkValidity;
|
|
163
151
|
/**
|
|
164
152
|
* Set input error message
|
|
165
|
-
*
|
|
166
|
-
* @returns {void}
|
|
167
153
|
*/
|
|
168
154
|
private setErrorMessage;
|
|
169
155
|
/**
|
|
170
156
|
* Validate pattern configuration
|
|
171
|
-
*
|
|
172
|
-
* @returns {void}
|
|
173
157
|
*/
|
|
174
158
|
private validatePattern;
|
|
175
159
|
/**
|
|
176
160
|
* Validate append slot
|
|
177
|
-
*
|
|
178
|
-
* @returns {void}
|
|
179
161
|
*/
|
|
180
162
|
private validateAppendSlot;
|
|
181
163
|
/*************
|
|
@@ -183,14 +165,12 @@ export declare class MgInputText {
|
|
|
183
165
|
*************/
|
|
184
166
|
/**
|
|
185
167
|
* Check if component props are well configured on init
|
|
186
|
-
*
|
|
187
|
-
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
168
|
+
* @returns timeout
|
|
188
169
|
*/
|
|
189
170
|
componentWillLoad(): ReturnType<typeof setTimeout>;
|
|
190
171
|
/**
|
|
191
172
|
* Render
|
|
192
|
-
*
|
|
193
|
-
* @returns {HTMLElement} HTML Element
|
|
173
|
+
* @returns HTML Element
|
|
194
174
|
*/
|
|
195
175
|
render(): HTMLElement;
|
|
196
176
|
}
|
|
@@ -110,7 +110,7 @@ export declare class MgInputTextarea {
|
|
|
110
110
|
/**
|
|
111
111
|
* Component classes
|
|
112
112
|
*/
|
|
113
|
-
|
|
113
|
+
classCollection: ClassList;
|
|
114
114
|
/**
|
|
115
115
|
* Error message to display
|
|
116
116
|
*/
|
|
@@ -125,8 +125,6 @@ export declare class MgInputTextarea {
|
|
|
125
125
|
inputValid: EventEmitter<boolean>;
|
|
126
126
|
/**
|
|
127
127
|
* Public method to display errors
|
|
128
|
-
*
|
|
129
|
-
* @returns {Promise<void>}
|
|
130
128
|
*/
|
|
131
129
|
displayError(): Promise<void>;
|
|
132
130
|
/**
|
|
@@ -144,8 +142,7 @@ export declare class MgInputTextarea {
|
|
|
144
142
|
/**
|
|
145
143
|
* Get pattern validity
|
|
146
144
|
* Pattern is not defined on textarea field: https://developer.mozilla.org/fr/docs/Web/HTML/Element/Textarea
|
|
147
|
-
*
|
|
148
|
-
* @returns {boolean} is pattern valid
|
|
145
|
+
* @returns is pattern valid
|
|
149
146
|
*/
|
|
150
147
|
private getPatternValidity;
|
|
151
148
|
/**
|
|
@@ -165,14 +162,12 @@ export declare class MgInputTextarea {
|
|
|
165
162
|
*************/
|
|
166
163
|
/**
|
|
167
164
|
* Check if component props are well configured on init
|
|
168
|
-
*
|
|
169
|
-
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
165
|
+
* @returns timeout
|
|
170
166
|
*/
|
|
171
167
|
componentWillLoad(): ReturnType<typeof setTimeout>;
|
|
172
168
|
/**
|
|
173
169
|
* Render
|
|
174
|
-
*
|
|
175
|
-
* @returns {HTMLElement} HTML Element
|
|
170
|
+
* @returns HTML Element
|
|
176
171
|
*/
|
|
177
172
|
render(): HTMLElement;
|
|
178
173
|
}
|
|
@@ -24,8 +24,6 @@ export declare class MgInputToggle {
|
|
|
24
24
|
handleValue(newValue: any): void;
|
|
25
25
|
/**
|
|
26
26
|
* Items are the possible options to select
|
|
27
|
-
*
|
|
28
|
-
* @returns {void}
|
|
29
27
|
*/
|
|
30
28
|
items: string[] | ToggleValue[];
|
|
31
29
|
validateItems(newValue: string[] | ToggleValue[]): void;
|
|
@@ -81,7 +79,7 @@ export declare class MgInputToggle {
|
|
|
81
79
|
/**
|
|
82
80
|
* Component classes
|
|
83
81
|
*/
|
|
84
|
-
|
|
82
|
+
classCollection: ClassList;
|
|
85
83
|
/**
|
|
86
84
|
* Formated items for display
|
|
87
85
|
*/
|
|
@@ -101,20 +99,14 @@ export declare class MgInputToggle {
|
|
|
101
99
|
inputValid: EventEmitter<boolean>;
|
|
102
100
|
/**
|
|
103
101
|
* Change checked value
|
|
104
|
-
*
|
|
105
|
-
* @returns {void}
|
|
106
102
|
*/
|
|
107
103
|
private toggleChecked;
|
|
108
104
|
/**
|
|
109
105
|
* Slots validation
|
|
110
|
-
*
|
|
111
|
-
* @returns {void}
|
|
112
106
|
*/
|
|
113
107
|
private validateSlots;
|
|
114
108
|
/**
|
|
115
109
|
* set checked state
|
|
116
|
-
*
|
|
117
|
-
* @returns {void}
|
|
118
110
|
*/
|
|
119
111
|
private setChecked;
|
|
120
112
|
/*************
|
|
@@ -126,8 +118,7 @@ export declare class MgInputToggle {
|
|
|
126
118
|
componentWillLoad(): void;
|
|
127
119
|
/**
|
|
128
120
|
* Render
|
|
129
|
-
*
|
|
130
|
-
* @returns {HTMLElement} HTML Element
|
|
121
|
+
* @returns HTML Element
|
|
131
122
|
*/
|
|
132
123
|
render(): HTMLElement;
|
|
133
124
|
}
|
|
@@ -21,7 +21,7 @@ export declare class MgMenu {
|
|
|
21
21
|
label: string;
|
|
22
22
|
validateLabel(newValue: MgMenu['label']): void;
|
|
23
23
|
/**
|
|
24
|
-
* Component display direction.
|
|
24
|
+
* Component display direction.
|
|
25
25
|
*/
|
|
26
26
|
direction: Direction;
|
|
27
27
|
validateDirection(newValue: MgMenu['direction']): void;
|
|
@@ -33,7 +33,6 @@ export declare class MgMenu {
|
|
|
33
33
|
validateItemMore(newValue: MgMenu['itemmore']): void;
|
|
34
34
|
/**
|
|
35
35
|
* Define mg-menu size
|
|
36
|
-
* Default: 'regular'
|
|
37
36
|
*/
|
|
38
37
|
size: MenuSizeType;
|
|
39
38
|
validateSize(newValue: MgMenu['size']): void;
|
|
@@ -46,48 +45,36 @@ export declare class MgMenu {
|
|
|
46
45
|
*************/
|
|
47
46
|
/**
|
|
48
47
|
* Close matching menu-item
|
|
49
|
-
*
|
|
50
|
-
* @param
|
|
51
|
-
* @param {boolean} condition addionnal condition
|
|
52
|
-
* @returns {void}
|
|
48
|
+
* @param item - menu-item to close
|
|
49
|
+
* @param condition - addionnal condition
|
|
53
50
|
*/
|
|
54
51
|
private closeMenuItem;
|
|
55
52
|
/**
|
|
56
53
|
* get mg-item-more element
|
|
57
|
-
*
|
|
58
|
-
* @returns {HTMLMgItemMoreElement} mg-item-more element
|
|
54
|
+
* @returns mg-item-more element
|
|
59
55
|
*/
|
|
60
56
|
private getItemMore;
|
|
61
57
|
/**
|
|
62
|
-
* get mg-item-more
|
|
63
|
-
*
|
|
64
|
-
* @returns {HTMLMgMenuItemElement} mg-item-more >>> mg-menu-item element
|
|
58
|
+
* get mg-item-more child mg-menu-item element
|
|
59
|
+
* @returns mg-menu-item element
|
|
65
60
|
*/
|
|
66
61
|
private getItemMoreMenuItem;
|
|
67
62
|
/**
|
|
68
63
|
* Set item listend
|
|
69
|
-
*
|
|
70
|
-
* @param
|
|
71
|
-
* @param {MgMenu['focusedMenuItem']} index number
|
|
72
|
-
* @returns {void}
|
|
64
|
+
* @param item - mg-menu-item element
|
|
65
|
+
* @param index - number
|
|
73
66
|
*/
|
|
74
67
|
private setItemListener;
|
|
75
68
|
/**
|
|
76
69
|
* Store menu-items on component init and add listeners
|
|
77
|
-
*
|
|
78
|
-
* @returns {void}
|
|
79
70
|
*/
|
|
80
71
|
private initMenuItemsListeners;
|
|
81
72
|
/**
|
|
82
73
|
* Handle item-loaded event on mg-item-more element
|
|
83
|
-
*
|
|
84
|
-
* @returns {void}
|
|
85
74
|
*/
|
|
86
75
|
private handleItemLoaded;
|
|
87
76
|
/**
|
|
88
77
|
* render mg-item-more
|
|
89
|
-
*
|
|
90
|
-
* @returns {void}
|
|
91
78
|
*/
|
|
92
79
|
private renderMgItemMore;
|
|
93
80
|
/*************
|
|
@@ -95,26 +82,20 @@ export declare class MgMenu {
|
|
|
95
82
|
*************/
|
|
96
83
|
/**
|
|
97
84
|
* Validate props
|
|
98
|
-
*
|
|
99
|
-
* @returns {void}
|
|
100
85
|
*/
|
|
101
86
|
componentWillLoad(): void;
|
|
102
87
|
/**
|
|
103
88
|
* Check if component slots configuration
|
|
104
|
-
*
|
|
105
|
-
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
89
|
+
* @returns timeout
|
|
106
90
|
*/
|
|
107
91
|
componentDidLoad(): ReturnType<typeof setTimeout>;
|
|
108
92
|
/**
|
|
109
93
|
* Add listeners to items
|
|
110
|
-
*
|
|
111
|
-
* @returns {void}
|
|
112
94
|
*/
|
|
113
95
|
componentDidRender(): void;
|
|
114
96
|
/**
|
|
115
97
|
* Render
|
|
116
|
-
*
|
|
117
|
-
* @returns {HTMLElement} HTML Element
|
|
98
|
+
* @returns HTML Element
|
|
118
99
|
*/
|
|
119
100
|
render(): HTMLElement;
|
|
120
101
|
}
|
|
@@ -22,7 +22,6 @@ export declare class MgMenuItem {
|
|
|
22
22
|
************/
|
|
23
23
|
/**
|
|
24
24
|
* Identifier is used to control mg-popover
|
|
25
|
-
* Default: createID('mg-menu-item');
|
|
26
25
|
*/
|
|
27
26
|
identifier: string;
|
|
28
27
|
/**
|
|
@@ -31,12 +30,12 @@ export declare class MgMenuItem {
|
|
|
31
30
|
*/
|
|
32
31
|
href: string;
|
|
33
32
|
/**
|
|
34
|
-
* Define menu-item status.
|
|
33
|
+
* Define menu-item status.
|
|
35
34
|
*/
|
|
36
35
|
status: Status;
|
|
37
36
|
validateStatus(newValue: MgMenuItem['status'], oldValue?: MgMenuItem['status']): void;
|
|
38
37
|
/**
|
|
39
|
-
* Define menu-item content expanded.
|
|
38
|
+
* Define menu-item content expanded.
|
|
40
39
|
*/
|
|
41
40
|
expanded: boolean;
|
|
42
41
|
validateExpanded(newValue: MgMenuItem['expanded']): void;
|
|
@@ -55,7 +54,7 @@ export declare class MgMenuItem {
|
|
|
55
54
|
* States *
|
|
56
55
|
*********/
|
|
57
56
|
/**
|
|
58
|
-
* Define menu-item size.
|
|
57
|
+
* Define menu-item size.
|
|
59
58
|
*/
|
|
60
59
|
size: MenuSizeType;
|
|
61
60
|
validateSize(newValue: MgMenuItem['size'], oldValue?: MgMenuItem['size']): void;
|
|
@@ -77,7 +76,7 @@ export declare class MgMenuItem {
|
|
|
77
76
|
*/
|
|
78
77
|
isItemMore: boolean;
|
|
79
78
|
/**
|
|
80
|
-
* Does component have children.
|
|
79
|
+
* Does component have children.
|
|
81
80
|
*/
|
|
82
81
|
hasChildren: boolean;
|
|
83
82
|
validateHasChildren(newValue: boolean): void;
|
|
@@ -90,75 +89,58 @@ export declare class MgMenuItem {
|
|
|
90
89
|
**********/
|
|
91
90
|
/**
|
|
92
91
|
* Toggle expanded prop value
|
|
93
|
-
*
|
|
94
|
-
* @returns {void}
|
|
95
92
|
*/
|
|
96
93
|
private toggleExpanded;
|
|
97
94
|
/**
|
|
98
95
|
* Does an Element have given Status
|
|
99
|
-
*
|
|
100
|
-
* @param
|
|
101
|
-
* @
|
|
102
|
-
* @returns {boolean} true if element with status is found
|
|
96
|
+
* @param mgMenuItemElement - to parse
|
|
97
|
+
* @param status - to check
|
|
98
|
+
* @returns true if element with status is found
|
|
103
99
|
*/
|
|
104
100
|
private hasStatus;
|
|
105
101
|
/**
|
|
106
102
|
* Is component contextual direction match the given direction
|
|
107
|
-
*
|
|
108
|
-
* @param
|
|
109
|
-
* @
|
|
110
|
-
* @returns {boolean} true is direction match the direction propertie
|
|
103
|
+
* @param direction - in parent menu
|
|
104
|
+
* @param compareWith - direction to compare with. Default: `this.direction`
|
|
105
|
+
* @returns true is direction match the direction propertie
|
|
111
106
|
*/
|
|
112
107
|
private isDirection;
|
|
113
108
|
/**
|
|
114
109
|
* Update displayNotificationBadge
|
|
115
110
|
* current component notification badge have priority over the slot badge when submenu contain badge
|
|
116
|
-
*
|
|
117
|
-
* @returns {void} update displayNotificationBadge value
|
|
118
111
|
*/
|
|
119
112
|
private updateDisplayNotificationBadge;
|
|
120
113
|
/**
|
|
121
114
|
* Method to control if one of component children have active status
|
|
122
|
-
*
|
|
123
|
-
* @returns {boolean} truthy if component has active child
|
|
115
|
+
* @returns truthy if component has active child
|
|
124
116
|
*/
|
|
125
117
|
private hasActiveChild;
|
|
126
118
|
/**
|
|
127
119
|
* Validate slots
|
|
128
|
-
*
|
|
129
|
-
* @param {boolean} guard prevent action whith guard. Default: false.
|
|
130
|
-
* @returns {void}
|
|
120
|
+
* @param guard - prevent action whith guard. Default: false.
|
|
131
121
|
*/
|
|
132
122
|
private validateSlot;
|
|
133
123
|
/**
|
|
134
124
|
* Update status
|
|
135
|
-
*
|
|
136
|
-
* @param {Status[]} guard status to exclude from process in addition to [Status.HIDDEN, Status.DISABLED] . Default: [].
|
|
137
|
-
* @returns {void}
|
|
125
|
+
* @param guard - status to exclude from process in addition to [Status.HIDDEN, Status.DISABLED] . Default: [].
|
|
138
126
|
*/
|
|
139
127
|
private updateStatus;
|
|
140
128
|
/**
|
|
141
129
|
* Init event-listeners
|
|
142
|
-
*
|
|
143
|
-
* @returns {void}
|
|
144
130
|
*/
|
|
145
131
|
private initListeners;
|
|
146
132
|
/**
|
|
147
133
|
* Get mg-popover identifier
|
|
148
|
-
*
|
|
149
|
-
* @returns {MgPopover['identifier']} generated mg-popover identifier
|
|
134
|
+
* @returns generated mg-popover identifier
|
|
150
135
|
*/
|
|
151
136
|
private getPopoverIdentifier;
|
|
152
137
|
/**
|
|
153
138
|
* Render popover clickoutside guard for content slot
|
|
154
|
-
*
|
|
155
|
-
* @returns {void}
|
|
156
139
|
*/
|
|
157
140
|
private updatePopoverGuard;
|
|
158
141
|
/**
|
|
159
142
|
* Condition to know if component should display a mg-popover
|
|
160
|
-
*
|
|
161
|
-
* @returns {boolean} truthy if component display popover
|
|
143
|
+
* @returns truthy if component display popover
|
|
162
144
|
*/
|
|
163
145
|
private displayPopover;
|
|
164
146
|
/************
|
|
@@ -166,16 +148,12 @@ export declare class MgMenuItem {
|
|
|
166
148
|
************/
|
|
167
149
|
/**
|
|
168
150
|
* Handle interacrtive element click
|
|
169
|
-
*
|
|
170
|
-
* @param {MouseEvent} event click on element
|
|
171
|
-
* @returns {void}
|
|
151
|
+
* @param event - click on element
|
|
172
152
|
*/
|
|
173
153
|
private handleElementCLick;
|
|
174
154
|
/**
|
|
175
155
|
* Handle popover element display-change event
|
|
176
|
-
*
|
|
177
|
-
* @param {CustomEvent} event popover display event
|
|
178
|
-
* @returns {void}
|
|
156
|
+
* @param event - popover display event
|
|
179
157
|
*/
|
|
180
158
|
private handlePopoverDisplay;
|
|
181
159
|
/*************
|
|
@@ -183,32 +161,26 @@ export declare class MgMenuItem {
|
|
|
183
161
|
*************/
|
|
184
162
|
/**
|
|
185
163
|
* Validate props
|
|
186
|
-
*
|
|
187
|
-
* @returns {void}
|
|
188
164
|
*/
|
|
189
165
|
componentWillLoad(): void;
|
|
190
166
|
/**
|
|
191
167
|
* Check if component slots configuration
|
|
192
|
-
*
|
|
193
|
-
* @returns {ReturnType<typeof setTimeout>} timeout
|
|
168
|
+
* @returns timeout
|
|
194
169
|
*/
|
|
195
170
|
componentDidLoad(): ReturnType<typeof setTimeout>;
|
|
196
171
|
/**
|
|
197
172
|
* Render ineractive element
|
|
198
|
-
*
|
|
199
|
-
* @returns {HTMLElement} HTML Element
|
|
173
|
+
* @returns HTML Element
|
|
200
174
|
*/
|
|
201
175
|
private renderInteractiveElement;
|
|
202
176
|
/**
|
|
203
177
|
* Render slot
|
|
204
|
-
*
|
|
205
|
-
* @returns {HTMLElement} HTML Element
|
|
178
|
+
* @returns HTML Element
|
|
206
179
|
*/
|
|
207
180
|
private renderSlot;
|
|
208
181
|
/**
|
|
209
182
|
* Render
|
|
210
|
-
*
|
|
211
|
-
* @returns {HTMLElement} HTML Element
|
|
183
|
+
* @returns HTML Element
|
|
212
184
|
*/
|
|
213
185
|
render(): HTMLElement;
|
|
214
186
|
}
|
|
@@ -15,13 +15,11 @@ export declare class MgActionMore {
|
|
|
15
15
|
element: HTMLMgActionMoreElement;
|
|
16
16
|
/**
|
|
17
17
|
* Define displaied icon
|
|
18
|
-
* Default: {icon: 'ellipsis'}
|
|
19
18
|
*/
|
|
20
19
|
icon: MgActionMoreIconType;
|
|
21
20
|
validateIcon(newValue: MgActionMore['icon']): void;
|
|
22
21
|
/**
|
|
23
22
|
* Define button properties
|
|
24
|
-
* Default: {variant: 'flat', isIcon: true}.
|
|
25
23
|
*/
|
|
26
24
|
button: MgActionMoreButtonType;
|
|
27
25
|
validateButton(newValue: MgActionMore['button']): void;
|
|
@@ -37,7 +35,6 @@ export declare class MgActionMore {
|
|
|
37
35
|
validateDisplayChevron(newValue: MgActionMore['displayChevron']): void;
|
|
38
36
|
/**
|
|
39
37
|
* Menu expanded state
|
|
40
|
-
* Default: false.
|
|
41
38
|
*/
|
|
42
39
|
expanded: boolean;
|
|
43
40
|
/************
|
|
@@ -45,22 +42,16 @@ export declare class MgActionMore {
|
|
|
45
42
|
***********/
|
|
46
43
|
/**
|
|
47
44
|
* Toogle expanded props
|
|
48
|
-
*
|
|
49
|
-
* @returns {void}
|
|
50
45
|
*/
|
|
51
46
|
private toggleExpanded;
|
|
52
47
|
/**
|
|
53
48
|
* Button click handler
|
|
54
|
-
*
|
|
55
|
-
* @returns {void}
|
|
56
49
|
*/
|
|
57
50
|
private handleButton;
|
|
58
51
|
/**
|
|
59
52
|
* Item click handler
|
|
60
|
-
*
|
|
61
|
-
* @param
|
|
62
|
-
* @param {MgActionMoreItemType['mouseEventHandler']} customHandler item['mouseEventHandler']
|
|
63
|
-
* @returns {void}
|
|
53
|
+
* @param event - click event
|
|
54
|
+
* @param customHandler - item['mouseEventHandler']
|
|
64
55
|
*/
|
|
65
56
|
private handleItemClick;
|
|
66
57
|
/*************
|
|
@@ -68,14 +59,11 @@ export declare class MgActionMore {
|
|
|
68
59
|
*************/
|
|
69
60
|
/**
|
|
70
61
|
* Validate props
|
|
71
|
-
*
|
|
72
|
-
* @returns {void}
|
|
73
62
|
*/
|
|
74
63
|
componentWillLoad(): void;
|
|
75
64
|
/**
|
|
76
65
|
* Render
|
|
77
|
-
*
|
|
78
|
-
* @returns {HTMLElement} HTML Element
|
|
66
|
+
* @returns HTML Element
|
|
79
67
|
*/
|
|
80
68
|
render(): HTMLElement;
|
|
81
69
|
}
|
|
@@ -31,8 +31,6 @@ export declare class MgDetails {
|
|
|
31
31
|
expandedChange: EventEmitter<boolean>;
|
|
32
32
|
/**
|
|
33
33
|
* Handle details toggle
|
|
34
|
-
*
|
|
35
|
-
* @returns {void}
|
|
36
34
|
*/
|
|
37
35
|
private handleToggle;
|
|
38
36
|
/*************
|
|
@@ -40,14 +38,11 @@ export declare class MgDetails {
|
|
|
40
38
|
*************/
|
|
41
39
|
/**
|
|
42
40
|
* Check if component props are well configured on init
|
|
43
|
-
*
|
|
44
|
-
* @returns {void}
|
|
45
41
|
*/
|
|
46
42
|
componentWillLoad(): void;
|
|
47
43
|
/**
|
|
48
44
|
* Render
|
|
49
|
-
*
|
|
50
|
-
* @returns {HTMLElement} HTML Element
|
|
45
|
+
* @returns HTML Element
|
|
51
46
|
*/
|
|
52
47
|
render(): HTMLElement;
|
|
53
48
|
}
|
|
@@ -46,7 +46,7 @@ export declare class MgForm {
|
|
|
46
46
|
/**
|
|
47
47
|
* Component classes
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
classCollection: ClassList;
|
|
50
50
|
/**
|
|
51
51
|
* Required message
|
|
52
52
|
*/
|
|
@@ -62,34 +62,23 @@ export declare class MgForm {
|
|
|
62
62
|
formSubmit: EventEmitter<boolean>;
|
|
63
63
|
/**
|
|
64
64
|
* Public method to display errors
|
|
65
|
-
*
|
|
66
|
-
* @returns {Promise<void>}
|
|
67
65
|
*/
|
|
68
66
|
displayError(): Promise<void>;
|
|
69
67
|
/**
|
|
70
68
|
* Define required message based on mg-inputs required elements
|
|
71
|
-
* Also
|
|
72
|
-
*
|
|
73
|
-
* @returns {void}
|
|
74
69
|
*/
|
|
75
70
|
private setRequiredMessage;
|
|
76
71
|
/**
|
|
77
72
|
* Check if form is valid
|
|
78
|
-
*
|
|
79
|
-
* @returns {void}
|
|
80
73
|
*/
|
|
81
74
|
private checkValidity;
|
|
82
75
|
/**
|
|
83
76
|
* Handle Form Submit
|
|
84
|
-
*
|
|
85
|
-
* @param {SubmitEvent} event submit event
|
|
86
|
-
* @returns {void}
|
|
77
|
+
* @param event - submit event
|
|
87
78
|
*/
|
|
88
79
|
private handleFormSubmit;
|
|
89
80
|
/**
|
|
90
81
|
* Set mgInputs
|
|
91
|
-
*
|
|
92
|
-
* @returns {void}
|
|
93
82
|
*/
|
|
94
83
|
private setMgInputs;
|
|
95
84
|
/*************
|
|
@@ -97,20 +86,15 @@ export declare class MgForm {
|
|
|
97
86
|
*************/
|
|
98
87
|
/**
|
|
99
88
|
* Check if component props are well configured on init
|
|
100
|
-
*
|
|
101
|
-
* @returns {void}
|
|
102
89
|
*/
|
|
103
90
|
componentWillLoad(): void;
|
|
104
91
|
/**
|
|
105
92
|
* Add slot listeners
|
|
106
|
-
*
|
|
107
|
-
* @returns {void}
|
|
108
93
|
*/
|
|
109
94
|
componentDidLoad(): void;
|
|
110
95
|
/**
|
|
111
96
|
* Render
|
|
112
|
-
*
|
|
113
|
-
* @returns {HTMLElement} HTML Element
|
|
97
|
+
* @returns HTML Element
|
|
114
98
|
*/
|
|
115
99
|
render(): HTMLElement;
|
|
116
100
|
}
|