@mgdis/mg-components 5.9.1 → 5.10.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/loader.cjs.js +1 -1
- package/dist/cjs/mg-action-more_31.cjs.entry.js +31 -225
- package/dist/cjs/mg-components.cjs.js +1 -1
- package/dist/cjs/mg-item-more.cjs.entry.js +1 -16
- package/dist/cjs/{mg-menu.conf-9afe6571.js → mg-menu.conf-1942ac70.js} +0 -5
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +1 -3
- package/dist/collection/components/atoms/mg-button/mg-button.js +2 -7
- package/dist/collection/components/atoms/mg-card/mg-card.js +13 -4
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +0 -2
- package/dist/collection/components/atoms/mg-divider/mg-divider.js +0 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +10 -5
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +0 -2
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +0 -3
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +1 -13
- package/dist/collection/components/molecules/inputs/MgInput.js +0 -6
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +0 -6
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +0 -5
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +0 -12
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +0 -3
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +0 -9
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +0 -13
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +1 -12
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -5
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +0 -5
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +0 -11
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +0 -18
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +0 -8
- package/dist/collection/components/molecules/mg-details/mg-details.js +0 -3
- package/dist/collection/components/molecules/mg-form/mg-form.js +0 -8
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +0 -2
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +0 -5
- package/dist/collection/components/molecules/mg-message/mg-message.js +2 -7
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +1 -6
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +0 -6
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +5 -15
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +1 -8
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -4
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +0 -12
- package/dist/collection/locales/index.js +0 -1
- package/dist/collection/utils/behaviors.utils.js +0 -10
- package/dist/collection/utils/components.utils.js +1 -10
- package/dist/collection/utils/locale.utils.js +0 -4
- package/dist/collection/utils/unit.test.utils.js +0 -5
- package/dist/components/MgInput.js +0 -6
- package/dist/components/components.utils.js +1 -10
- package/dist/components/index2.js +0 -5
- package/dist/components/mg-action-more.js +0 -8
- package/dist/components/mg-badge2.js +1 -3
- package/dist/components/mg-button2.js +2 -7
- package/dist/components/mg-card2.js +13 -4
- package/dist/components/mg-character-left2.js +0 -2
- package/dist/components/mg-details.js +0 -3
- package/dist/components/mg-divider.js +0 -1
- package/dist/components/mg-form.js +0 -8
- package/dist/components/mg-icon2.js +10 -5
- package/dist/components/mg-illustrated-message.js +0 -2
- package/dist/components/mg-input-checkbox.js +0 -6
- package/dist/components/mg-input-date.js +0 -5
- package/dist/components/mg-input-numeric.js +0 -12
- package/dist/components/mg-input-password.js +0 -3
- package/dist/components/mg-input-radio.js +0 -9
- package/dist/components/mg-input-select2.js +0 -13
- package/dist/components/mg-input-text2.js +1 -12
- package/dist/components/mg-input-textarea.js +1 -5
- package/dist/components/mg-input-title2.js +0 -2
- package/dist/components/mg-input-toggle.js +0 -5
- package/dist/components/mg-item-more.js +0 -15
- package/dist/components/mg-menu-item2.js +0 -18
- package/dist/components/mg-menu2.js +0 -11
- package/dist/components/mg-message.js +2 -7
- package/dist/components/mg-modal.js +1 -6
- package/dist/components/mg-pagination.js +0 -6
- package/dist/components/mg-panel.js +5 -15
- package/dist/components/mg-popover2.js +1 -8
- package/dist/components/mg-skip-links.js +1 -4
- package/dist/components/mg-tabs.js +0 -12
- package/dist/components/mg-tag.js +0 -3
- package/dist/components/mg-tooltip2.js +1 -13
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mg-action-more_31.entry.js +31 -225
- package/dist/esm/mg-components.js +1 -1
- package/dist/esm/mg-item-more.entry.js +1 -16
- package/dist/esm/{mg-menu.conf-881fbd82.js → mg-menu.conf-2cc1bb67.js} +0 -5
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-67ce7cb8.entry.js → p-a56a3157.entry.js} +1 -1
- package/dist/mg-components/{p-9a93b7af.entry.js → p-eb32bb18.entry.js} +1 -1
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +0 -2
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +0 -5
- package/dist/types/components/atoms/mg-card/mg-card.d.ts +10 -3
- package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +0 -2
- package/dist/types/components/atoms/mg-divider/mg-divider.d.ts +0 -1
- package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +6 -3
- package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +0 -2
- package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +0 -3
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +0 -12
- package/dist/types/components/molecules/inputs/MgInput.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +0 -5
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +0 -5
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +0 -12
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +0 -3
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +0 -8
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +0 -9
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +0 -11
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +0 -4
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +0 -5
- package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +0 -11
- package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +0 -18
- package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +0 -5
- package/dist/types/components/molecules/mg-details/mg-details.d.ts +0 -3
- package/dist/types/components/molecules/mg-form/mg-form.d.ts +0 -8
- package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.d.ts +0 -2
- package/dist/types/components/molecules/mg-item-more/mg-item-more.d.ts +0 -5
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +1 -6
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +0 -5
- package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +0 -5
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +0 -10
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +0 -7
- package/dist/types/components/molecules/mg-skip-links/mg-skip-links.d.ts +0 -3
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +0 -11
- package/dist/types/locales/index.d.ts +0 -1
- package/dist/types/utils/behaviors.utils.d.ts +0 -9
- package/dist/types/utils/components.utils.d.ts +1 -9
- package/dist/types/utils/locale.utils.d.ts +0 -4
- package/dist/types/utils/unit.test.utils.d.ts +0 -7
- package/package.json +11 -12
- /package/dist/mg-components/{p-367f92d2.js → p-73156ac9.js} +0 -0
|
@@ -5,7 +5,6 @@ import { Direction } from '../menu/mg-menu/mg-menu.conf';
|
|
|
5
5
|
import { createID } from '../../../utils/components.utils';
|
|
6
6
|
/**
|
|
7
7
|
* MgActionMore['items'] type guard
|
|
8
|
-
*
|
|
9
8
|
* @param {unknown} prop commponent items prop
|
|
10
9
|
* @returns {boolean} return true if type is valid
|
|
11
10
|
*/
|
|
@@ -15,7 +14,6 @@ const isMgActionMoreItems = (prop) => {
|
|
|
15
14
|
};
|
|
16
15
|
/**
|
|
17
16
|
* MgActionMore['button'] type guard
|
|
18
|
-
*
|
|
19
17
|
* @param {unknown} prop commponent button prop
|
|
20
18
|
* @returns {boolean} return true if type is valid
|
|
21
19
|
*/
|
|
@@ -25,7 +23,6 @@ const isMgActionMoreButton = (prop) => {
|
|
|
25
23
|
};
|
|
26
24
|
/**
|
|
27
25
|
* MgActionMore['icon'] type guard
|
|
28
|
-
*
|
|
29
26
|
* @param {unknown} prop commponent icon prop
|
|
30
27
|
* @returns {boolean} return true if type is valid
|
|
31
28
|
*/
|
|
@@ -45,7 +42,6 @@ export class MgActionMore {
|
|
|
45
42
|
***********/
|
|
46
43
|
/**
|
|
47
44
|
* Toogle expanded props
|
|
48
|
-
*
|
|
49
45
|
* @returns {void}
|
|
50
46
|
*/
|
|
51
47
|
this.toggleExpanded = () => {
|
|
@@ -53,7 +49,6 @@ export class MgActionMore {
|
|
|
53
49
|
};
|
|
54
50
|
/**
|
|
55
51
|
* Button click handler
|
|
56
|
-
*
|
|
57
52
|
* @returns {void}
|
|
58
53
|
*/
|
|
59
54
|
this.handleButton = () => {
|
|
@@ -61,7 +56,6 @@ export class MgActionMore {
|
|
|
61
56
|
};
|
|
62
57
|
/**
|
|
63
58
|
* Item click handler
|
|
64
|
-
*
|
|
65
59
|
* @param {MouseEvent} event click event
|
|
66
60
|
* @param {MgActionMoreItemType['mouseEventHandler']} customHandler item['mouseEventHandler']
|
|
67
61
|
* @returns {void}
|
|
@@ -101,7 +95,6 @@ export class MgActionMore {
|
|
|
101
95
|
*************/
|
|
102
96
|
/**
|
|
103
97
|
* Validate props
|
|
104
|
-
*
|
|
105
98
|
* @returns {void}
|
|
106
99
|
*/
|
|
107
100
|
componentWillLoad() {
|
|
@@ -113,7 +106,6 @@ export class MgActionMore {
|
|
|
113
106
|
}
|
|
114
107
|
/**
|
|
115
108
|
* Render
|
|
116
|
-
*
|
|
117
109
|
* @returns {HTMLElement} HTML Element
|
|
118
110
|
*/
|
|
119
111
|
render() {
|
|
@@ -3,7 +3,6 @@ export class MgDetails {
|
|
|
3
3
|
constructor() {
|
|
4
4
|
/**
|
|
5
5
|
* Handle details toggle
|
|
6
|
-
*
|
|
7
6
|
* @returns {void}
|
|
8
7
|
*/
|
|
9
8
|
this.handleToggle = () => {
|
|
@@ -27,7 +26,6 @@ export class MgDetails {
|
|
|
27
26
|
*************/
|
|
28
27
|
/**
|
|
29
28
|
* Check if component props are well configured on init
|
|
30
|
-
*
|
|
31
29
|
* @returns {void}
|
|
32
30
|
*/
|
|
33
31
|
componentWillLoad() {
|
|
@@ -36,7 +34,6 @@ export class MgDetails {
|
|
|
36
34
|
}
|
|
37
35
|
/**
|
|
38
36
|
* Render
|
|
39
|
-
*
|
|
40
37
|
* @returns {HTMLElement} HTML Element
|
|
41
38
|
*/
|
|
42
39
|
render() {
|
|
@@ -8,7 +8,6 @@ export class MgForm {
|
|
|
8
8
|
/**
|
|
9
9
|
* Define required message based on mg-inputs required elements
|
|
10
10
|
* Also
|
|
11
|
-
*
|
|
12
11
|
* @returns {void}
|
|
13
12
|
*/
|
|
14
13
|
this.setRequiredMessage = () => {
|
|
@@ -34,7 +33,6 @@ export class MgForm {
|
|
|
34
33
|
};
|
|
35
34
|
/**
|
|
36
35
|
* Check if form is valid
|
|
37
|
-
*
|
|
38
36
|
* @returns {void}
|
|
39
37
|
*/
|
|
40
38
|
this.checkValidity = () => {
|
|
@@ -47,7 +45,6 @@ export class MgForm {
|
|
|
47
45
|
};
|
|
48
46
|
/**
|
|
49
47
|
* Handle Form Submit
|
|
50
|
-
*
|
|
51
48
|
* @param {SubmitEvent} event submit event
|
|
52
49
|
* @returns {void}
|
|
53
50
|
*/
|
|
@@ -57,7 +54,6 @@ export class MgForm {
|
|
|
57
54
|
};
|
|
58
55
|
/**
|
|
59
56
|
* Set mgInputs
|
|
60
|
-
*
|
|
61
57
|
* @returns {void}
|
|
62
58
|
*/
|
|
63
59
|
this.setMgInputs = () => {
|
|
@@ -89,7 +85,6 @@ export class MgForm {
|
|
|
89
85
|
}
|
|
90
86
|
/**
|
|
91
87
|
* Public method to display errors
|
|
92
|
-
*
|
|
93
88
|
* @returns {Promise<void>}
|
|
94
89
|
*/
|
|
95
90
|
async displayError() {
|
|
@@ -105,7 +100,6 @@ export class MgForm {
|
|
|
105
100
|
*************/
|
|
106
101
|
/**
|
|
107
102
|
* Check if component props are well configured on init
|
|
108
|
-
*
|
|
109
103
|
* @returns {void}
|
|
110
104
|
*/
|
|
111
105
|
componentWillLoad() {
|
|
@@ -133,7 +127,6 @@ export class MgForm {
|
|
|
133
127
|
}
|
|
134
128
|
/**
|
|
135
129
|
* Add slot listeners
|
|
136
|
-
*
|
|
137
130
|
* @returns {void}
|
|
138
131
|
*/
|
|
139
132
|
componentDidLoad() {
|
|
@@ -152,7 +145,6 @@ export class MgForm {
|
|
|
152
145
|
}
|
|
153
146
|
/**
|
|
154
147
|
* Render
|
|
155
|
-
*
|
|
156
148
|
* @returns {HTMLElement} HTML Element
|
|
157
149
|
*/
|
|
158
150
|
render() {
|
package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js
CHANGED
|
@@ -10,7 +10,6 @@ export class MgIllustratedMessage {
|
|
|
10
10
|
*************/
|
|
11
11
|
/**
|
|
12
12
|
* Check if component props are well configured on init
|
|
13
|
-
*
|
|
14
13
|
* @returns {void}
|
|
15
14
|
*/
|
|
16
15
|
componentDidLoad() {
|
|
@@ -26,7 +25,6 @@ export class MgIllustratedMessage {
|
|
|
26
25
|
}
|
|
27
26
|
/**
|
|
28
27
|
* Render
|
|
29
|
-
*
|
|
30
28
|
* @returns {HTMLElement} HTML Element
|
|
31
29
|
*/
|
|
32
30
|
render() {
|
|
@@ -13,7 +13,6 @@ export class MgItemMore {
|
|
|
13
13
|
***********/
|
|
14
14
|
/**
|
|
15
15
|
* render mg-item-more overflow element
|
|
16
|
-
*
|
|
17
16
|
* @returns {HTMLMgItemMoreElement} mg-item-more element
|
|
18
17
|
*/
|
|
19
18
|
this.renderMgMenuItemOverflowElement = () => {
|
|
@@ -63,7 +62,6 @@ export class MgItemMore {
|
|
|
63
62
|
*************/
|
|
64
63
|
/**
|
|
65
64
|
* Disconnect overflow ResizeObserver
|
|
66
|
-
*
|
|
67
65
|
* @returns {void} run overflow resize obeserver disconnexion
|
|
68
66
|
*/
|
|
69
67
|
disconnectedCallback() {
|
|
@@ -71,7 +69,6 @@ export class MgItemMore {
|
|
|
71
69
|
}
|
|
72
70
|
/**
|
|
73
71
|
* Set variables and validate props
|
|
74
|
-
*
|
|
75
72
|
* @returns {void}
|
|
76
73
|
*/
|
|
77
74
|
componentWillLoad() {
|
|
@@ -86,7 +83,6 @@ export class MgItemMore {
|
|
|
86
83
|
}
|
|
87
84
|
/**
|
|
88
85
|
* Add overflow behavior
|
|
89
|
-
*
|
|
90
86
|
* @returns {void}
|
|
91
87
|
*/
|
|
92
88
|
componentDidLoad() {
|
|
@@ -94,7 +90,6 @@ export class MgItemMore {
|
|
|
94
90
|
}
|
|
95
91
|
/**
|
|
96
92
|
* Render
|
|
97
|
-
*
|
|
98
93
|
* @returns {HTMLElement} HTML Element
|
|
99
94
|
*/
|
|
100
95
|
render() {
|
|
@@ -18,7 +18,6 @@ export class MgMessage {
|
|
|
18
18
|
this.isHovered = false;
|
|
19
19
|
/**
|
|
20
20
|
* Set timer
|
|
21
|
-
*
|
|
22
21
|
* @returns {void}
|
|
23
22
|
*/
|
|
24
23
|
this.setTimer = () => {
|
|
@@ -26,7 +25,6 @@ export class MgMessage {
|
|
|
26
25
|
};
|
|
27
26
|
/**
|
|
28
27
|
* Clear timer
|
|
29
|
-
*
|
|
30
28
|
* @returns {void}
|
|
31
29
|
*/
|
|
32
30
|
this.clearTimer = () => {
|
|
@@ -34,7 +32,6 @@ export class MgMessage {
|
|
|
34
32
|
};
|
|
35
33
|
/**
|
|
36
34
|
* Event to add on element
|
|
37
|
-
*
|
|
38
35
|
* @param {MouseEvent | FocusEvent} event event
|
|
39
36
|
* @returns {void}
|
|
40
37
|
*/
|
|
@@ -59,8 +56,7 @@ export class MgMessage {
|
|
|
59
56
|
};
|
|
60
57
|
/**
|
|
61
58
|
* Get icon corresponding to variant
|
|
62
|
-
*
|
|
63
|
-
* @returns {string} icon
|
|
59
|
+
* @returns {MgIcon['icon'] | undefined} icon
|
|
64
60
|
*/
|
|
65
61
|
this.getIcon = () => {
|
|
66
62
|
switch (this.variant) {
|
|
@@ -85,7 +81,7 @@ export class MgMessage {
|
|
|
85
81
|
this.hasActions = false;
|
|
86
82
|
}
|
|
87
83
|
validateDelay(newValue) {
|
|
88
|
-
if (newValue && newValue < 2) {
|
|
84
|
+
if (newValue !== undefined && newValue < 2) {
|
|
89
85
|
throw new Error(`<mg-message> prop "delay" must be greater than 2 seconds.`);
|
|
90
86
|
}
|
|
91
87
|
}
|
|
@@ -154,7 +150,6 @@ export class MgMessage {
|
|
|
154
150
|
}
|
|
155
151
|
/**
|
|
156
152
|
* Render
|
|
157
|
-
*
|
|
158
153
|
* @returns {HTMLElement} HTML Element
|
|
159
154
|
*/
|
|
160
155
|
render() {
|
|
@@ -44,7 +44,6 @@ export class MgModal {
|
|
|
44
44
|
*************/
|
|
45
45
|
/**
|
|
46
46
|
* Handle close button
|
|
47
|
-
*
|
|
48
47
|
* @returns {void}
|
|
49
48
|
*/
|
|
50
49
|
this.handleClose = () => {
|
|
@@ -77,7 +76,6 @@ export class MgModal {
|
|
|
77
76
|
}
|
|
78
77
|
/**
|
|
79
78
|
* Handle 'escape' key down
|
|
80
|
-
*
|
|
81
79
|
* @param {KeyboardEvent} event keydown event
|
|
82
80
|
* @returns {void}
|
|
83
81
|
*/
|
|
@@ -92,7 +90,6 @@ export class MgModal {
|
|
|
92
90
|
*************/
|
|
93
91
|
/**
|
|
94
92
|
* Check if component props are well configured on init
|
|
95
|
-
*
|
|
96
93
|
* @returns {void}
|
|
97
94
|
*/
|
|
98
95
|
componentWillLoad() {
|
|
@@ -112,7 +109,6 @@ export class MgModal {
|
|
|
112
109
|
}
|
|
113
110
|
/**
|
|
114
111
|
* Add observer on component to set focus when displayed
|
|
115
|
-
*
|
|
116
112
|
* @returns {void}
|
|
117
113
|
*/
|
|
118
114
|
componentDidLoad() {
|
|
@@ -128,7 +124,6 @@ export class MgModal {
|
|
|
128
124
|
}
|
|
129
125
|
/**
|
|
130
126
|
* Render
|
|
131
|
-
*
|
|
132
127
|
* @returns {HTMLElement} HTML Element
|
|
133
128
|
*/
|
|
134
129
|
render() {
|
|
@@ -185,7 +180,7 @@ export class MgModal {
|
|
|
185
180
|
},
|
|
186
181
|
"closeButton": {
|
|
187
182
|
"type": "boolean",
|
|
188
|
-
"mutable":
|
|
183
|
+
"mutable": false,
|
|
189
184
|
"complexType": {
|
|
190
185
|
"original": "boolean",
|
|
191
186
|
"resolved": "boolean",
|
|
@@ -16,7 +16,6 @@ import { initLocales } from './../../../locales';
|
|
|
16
16
|
* range(1, 1) = [1]
|
|
17
17
|
* range(1, 5) = [1, 2, 3, 4, 5]
|
|
18
18
|
* range(10, 20, 2) = [10, 12, 14, 16, 18, 20]
|
|
19
|
-
*
|
|
20
19
|
* @param {number} start start range
|
|
21
20
|
* @param {number} end start end
|
|
22
21
|
* @param {number} step step size
|
|
@@ -27,7 +26,6 @@ export class MgPagination {
|
|
|
27
26
|
constructor() {
|
|
28
27
|
/**
|
|
29
28
|
* Change current page from target
|
|
30
|
-
*
|
|
31
29
|
* @param {number} target target page
|
|
32
30
|
* @returns {void}
|
|
33
31
|
*/
|
|
@@ -39,7 +37,6 @@ export class MgPagination {
|
|
|
39
37
|
************/
|
|
40
38
|
/**
|
|
41
39
|
* select handler
|
|
42
|
-
*
|
|
43
40
|
* @param {InputEvent} event value change event
|
|
44
41
|
* @returns {void}
|
|
45
42
|
*/
|
|
@@ -49,7 +46,6 @@ export class MgPagination {
|
|
|
49
46
|
};
|
|
50
47
|
/**
|
|
51
48
|
* Go to 'previous/next' page button handler
|
|
52
|
-
*
|
|
53
49
|
* @param {string} action navigation action
|
|
54
50
|
* @param {boolean} disabled button disable state
|
|
55
51
|
* @returns {void}
|
|
@@ -82,7 +78,6 @@ export class MgPagination {
|
|
|
82
78
|
*************/
|
|
83
79
|
/**
|
|
84
80
|
* Check if props are well configured on init
|
|
85
|
-
*
|
|
86
81
|
* @returns {void}
|
|
87
82
|
*/
|
|
88
83
|
componentWillLoad() {
|
|
@@ -98,7 +93,6 @@ export class MgPagination {
|
|
|
98
93
|
}
|
|
99
94
|
/**
|
|
100
95
|
* Render
|
|
101
|
-
*
|
|
102
96
|
* @returns {HTMLElement} HTML Element
|
|
103
97
|
*/
|
|
104
98
|
render() {
|
|
@@ -8,7 +8,6 @@ export class MgPanel {
|
|
|
8
8
|
************/
|
|
9
9
|
/**
|
|
10
10
|
* Toggle is editing state
|
|
11
|
-
*
|
|
12
11
|
* @returns {void}
|
|
13
12
|
*/
|
|
14
13
|
this.toggleIsEditing = () => {
|
|
@@ -19,7 +18,6 @@ export class MgPanel {
|
|
|
19
18
|
************/
|
|
20
19
|
/**
|
|
21
20
|
* Collapse button click handler
|
|
22
|
-
*
|
|
23
21
|
* @returns {void}
|
|
24
22
|
*/
|
|
25
23
|
this.handleCollapseButton = () => {
|
|
@@ -29,7 +27,6 @@ export class MgPanel {
|
|
|
29
27
|
};
|
|
30
28
|
/**
|
|
31
29
|
* Edit button click handler
|
|
32
|
-
*
|
|
33
30
|
* @returns {void}
|
|
34
31
|
*/
|
|
35
32
|
this.handleEditButton = () => {
|
|
@@ -37,7 +34,6 @@ export class MgPanel {
|
|
|
37
34
|
};
|
|
38
35
|
/**
|
|
39
36
|
* Update title handler
|
|
40
|
-
*
|
|
41
37
|
* @param {CustomEvent<string>} event input value change event
|
|
42
38
|
* @returns {void}
|
|
43
39
|
*/
|
|
@@ -46,7 +42,6 @@ export class MgPanel {
|
|
|
46
42
|
};
|
|
47
43
|
/**
|
|
48
44
|
* Cancel edition button handler
|
|
49
|
-
*
|
|
50
45
|
* @returns {void}
|
|
51
46
|
*/
|
|
52
47
|
this.handleCancelEditButton = () => {
|
|
@@ -55,7 +50,6 @@ export class MgPanel {
|
|
|
55
50
|
};
|
|
56
51
|
/**
|
|
57
52
|
* Validate edition button handler
|
|
58
|
-
*
|
|
59
53
|
* @returns {void}
|
|
60
54
|
*/
|
|
61
55
|
this.handleValidateEditButton = () => {
|
|
@@ -67,7 +61,6 @@ export class MgPanel {
|
|
|
67
61
|
};
|
|
68
62
|
/**
|
|
69
63
|
* Header left conditional render
|
|
70
|
-
*
|
|
71
64
|
* @typedef {HTMLElement} HTMLMgButtonElement
|
|
72
65
|
* @returns {HTMLMgButtonElement | HTMLElement | HTMLElement[]} header left element
|
|
73
66
|
*/
|
|
@@ -105,10 +98,10 @@ export class MgPanel {
|
|
|
105
98
|
this.titleChange.emit(newValue);
|
|
106
99
|
}
|
|
107
100
|
validatetitlePattern(newValue) {
|
|
108
|
-
if (newValue && !this.titleEditable) {
|
|
101
|
+
if (newValue !== undefined && !this.titleEditable) {
|
|
109
102
|
throw new Error('<mg-panel> prop "titleEditable" must be set to `true`.');
|
|
110
103
|
}
|
|
111
|
-
if (newValue && (this.titlePatternErrorMessage === undefined || this.titlePatternErrorMessage.trim() === '')) {
|
|
104
|
+
if (newValue !== undefined && (this.titlePatternErrorMessage === undefined || this.titlePatternErrorMessage.trim() === '')) {
|
|
112
105
|
throw new Error('<mg-panel> prop "titlePattern" must be paired with the prop "titlePatternErrorMessage".');
|
|
113
106
|
}
|
|
114
107
|
}
|
|
@@ -120,7 +113,6 @@ export class MgPanel {
|
|
|
120
113
|
*************/
|
|
121
114
|
/**
|
|
122
115
|
* Check if props are well configured on init
|
|
123
|
-
*
|
|
124
116
|
* @returns {void}
|
|
125
117
|
*/
|
|
126
118
|
componentWillLoad() {
|
|
@@ -132,7 +124,6 @@ export class MgPanel {
|
|
|
132
124
|
}
|
|
133
125
|
/**
|
|
134
126
|
* Edit DOM after render
|
|
135
|
-
*
|
|
136
127
|
* @returns {void}
|
|
137
128
|
*/
|
|
138
129
|
componentDidRender() {
|
|
@@ -143,7 +134,6 @@ export class MgPanel {
|
|
|
143
134
|
}
|
|
144
135
|
/**
|
|
145
136
|
* Render component
|
|
146
|
-
*
|
|
147
137
|
* @returns {HTMLElement} html element
|
|
148
138
|
*/
|
|
149
139
|
render() {
|
|
@@ -200,7 +190,7 @@ export class MgPanel {
|
|
|
200
190
|
},
|
|
201
191
|
"titlePattern": {
|
|
202
192
|
"type": "string",
|
|
203
|
-
"mutable":
|
|
193
|
+
"mutable": false,
|
|
204
194
|
"complexType": {
|
|
205
195
|
"original": "string",
|
|
206
196
|
"resolved": "string",
|
|
@@ -217,7 +207,7 @@ export class MgPanel {
|
|
|
217
207
|
},
|
|
218
208
|
"titlePatternErrorMessage": {
|
|
219
209
|
"type": "string",
|
|
220
|
-
"mutable":
|
|
210
|
+
"mutable": false,
|
|
221
211
|
"complexType": {
|
|
222
212
|
"original": "string",
|
|
223
213
|
"resolved": "string",
|
|
@@ -252,7 +242,7 @@ export class MgPanel {
|
|
|
252
242
|
},
|
|
253
243
|
"expandToggleDisabled": {
|
|
254
244
|
"type": "boolean",
|
|
255
|
-
"mutable":
|
|
245
|
+
"mutable": false,
|
|
256
246
|
"complexType": {
|
|
257
247
|
"original": "boolean",
|
|
258
248
|
"resolved": "boolean",
|
|
@@ -9,7 +9,6 @@ export class MgPopover {
|
|
|
9
9
|
this.classArrowHide = `mg-popover--arrow-hide`;
|
|
10
10
|
/**
|
|
11
11
|
* Check if clicked outside of component
|
|
12
|
-
*
|
|
13
12
|
* @param {MouseEvent} event mouse event
|
|
14
13
|
* @returns {void}
|
|
15
14
|
*/
|
|
@@ -23,7 +22,6 @@ export class MgPopover {
|
|
|
23
22
|
};
|
|
24
23
|
/**
|
|
25
24
|
* Show popover
|
|
26
|
-
*
|
|
27
25
|
* @returns {void}
|
|
28
26
|
*/
|
|
29
27
|
this.show = () => {
|
|
@@ -43,7 +41,6 @@ export class MgPopover {
|
|
|
43
41
|
};
|
|
44
42
|
/**
|
|
45
43
|
* Hide popover
|
|
46
|
-
*
|
|
47
44
|
* @returns {void}
|
|
48
45
|
*/
|
|
49
46
|
this.hide = () => {
|
|
@@ -58,7 +55,6 @@ export class MgPopover {
|
|
|
58
55
|
};
|
|
59
56
|
/**
|
|
60
57
|
* Handle action for close button
|
|
61
|
-
*
|
|
62
58
|
* @returns {void}
|
|
63
59
|
*/
|
|
64
60
|
this.handleCloseButton = () => {
|
|
@@ -92,7 +88,6 @@ export class MgPopover {
|
|
|
92
88
|
*************/
|
|
93
89
|
/**
|
|
94
90
|
* Check if component props are well configured on init
|
|
95
|
-
*
|
|
96
91
|
* @returns {void} timeout
|
|
97
92
|
*/
|
|
98
93
|
componentWillLoad() {
|
|
@@ -104,7 +99,6 @@ export class MgPopover {
|
|
|
104
99
|
}
|
|
105
100
|
/**
|
|
106
101
|
* Check if component props are well configured on init
|
|
107
|
-
*
|
|
108
102
|
* @returns {void}
|
|
109
103
|
*/
|
|
110
104
|
componentDidLoad() {
|
|
@@ -162,7 +156,6 @@ export class MgPopover {
|
|
|
162
156
|
}
|
|
163
157
|
/**
|
|
164
158
|
* Render
|
|
165
|
-
*
|
|
166
159
|
* @returns {HTMLElement} HTML Element
|
|
167
160
|
*/
|
|
168
161
|
render() {
|
|
@@ -279,7 +272,7 @@ export class MgPopover {
|
|
|
279
272
|
},
|
|
280
273
|
"disabled": {
|
|
281
274
|
"type": "boolean",
|
|
282
|
-
"mutable":
|
|
275
|
+
"mutable": false,
|
|
283
276
|
"complexType": {
|
|
284
277
|
"original": "boolean",
|
|
285
278
|
"resolved": "boolean",
|
|
@@ -8,7 +8,6 @@ export class MgSkipLinks {
|
|
|
8
8
|
**********/
|
|
9
9
|
/**
|
|
10
10
|
* Handle link click and emit go-to-anchor event
|
|
11
|
-
*
|
|
12
11
|
* @param {MouseEvent} event mouse event
|
|
13
12
|
* @returns {void}
|
|
14
13
|
*/
|
|
@@ -30,7 +29,6 @@ export class MgSkipLinks {
|
|
|
30
29
|
*************/
|
|
31
30
|
/**
|
|
32
31
|
* Check if props are well configured on init
|
|
33
|
-
*
|
|
34
32
|
* @returns {void}
|
|
35
33
|
*/
|
|
36
34
|
componentWillLoad() {
|
|
@@ -39,7 +37,6 @@ export class MgSkipLinks {
|
|
|
39
37
|
}
|
|
40
38
|
/**
|
|
41
39
|
* Render
|
|
42
|
-
*
|
|
43
40
|
* @returns {HTMLElement} HTML Element
|
|
44
41
|
*/
|
|
45
42
|
render() {
|
|
@@ -61,7 +58,7 @@ export class MgSkipLinks {
|
|
|
61
58
|
return {
|
|
62
59
|
"links": {
|
|
63
60
|
"type": "unknown",
|
|
64
|
-
"mutable":
|
|
61
|
+
"mutable": false,
|
|
65
62
|
"complexType": {
|
|
66
63
|
"original": "SkipLink[]",
|
|
67
64
|
"resolved": "SkipLink[]",
|
|
@@ -3,7 +3,6 @@ import { createID, ClassList, allItemsAreString } from '../../../utils/component
|
|
|
3
3
|
import { sizes, Status } from './mg-tabs.conf';
|
|
4
4
|
/**
|
|
5
5
|
* type TabItem validation function
|
|
6
|
-
*
|
|
7
6
|
* @param {TabItem} tab tab item
|
|
8
7
|
* @returns {boolean} tab item type is valid
|
|
9
8
|
*/
|
|
@@ -19,7 +18,6 @@ export class MgTabs {
|
|
|
19
18
|
this.startIndex = 1;
|
|
20
19
|
/**
|
|
21
20
|
* Method to know if given tab has the given status
|
|
22
|
-
*
|
|
23
21
|
* @param {TabItem} tab item tab key to set to ACTIVE status
|
|
24
22
|
* @param {Status} status status to valide
|
|
25
23
|
* @returns {boolean} status comparaison
|
|
@@ -27,7 +25,6 @@ export class MgTabs {
|
|
|
27
25
|
this.tabHasStatus = (tab, status) => tab.status === status;
|
|
28
26
|
/**
|
|
29
27
|
* Method to get element id from index
|
|
30
|
-
*
|
|
31
28
|
* @param {string} element to get id
|
|
32
29
|
* @param {number} index to generate id
|
|
33
30
|
* @returns {string} generated element id
|
|
@@ -35,20 +32,17 @@ export class MgTabs {
|
|
|
35
32
|
this.getElementId = (element, index) => `${element}-${this.getTabItemIndex(index)}`;
|
|
36
33
|
/**
|
|
37
34
|
* Method to get tab item index
|
|
38
|
-
*
|
|
39
35
|
* @param {number} index to get
|
|
40
36
|
* @returns {number} index
|
|
41
37
|
*/
|
|
42
38
|
this.getTabItemIndex = (index) => index + this.startIndex;
|
|
43
39
|
/**
|
|
44
40
|
* Method to get the active-tab value
|
|
45
|
-
*
|
|
46
41
|
* @returns {number} of the active-tab
|
|
47
42
|
*/
|
|
48
43
|
this.getActiveTab = () => this.activeTab || this.getTabItemIndex(this.tabs.map((tab, index) => (Object.assign(Object.assign({}, tab), { index }))).find(tab => this.tabHasStatus(tab, Status.ACTIVE)).index);
|
|
49
44
|
/**
|
|
50
45
|
* Handle click events on tabs
|
|
51
|
-
*
|
|
52
46
|
* @param {MouseEvent} event mouse event
|
|
53
47
|
*/
|
|
54
48
|
this.handleClick = (event) => {
|
|
@@ -64,14 +58,12 @@ export class MgTabs {
|
|
|
64
58
|
};
|
|
65
59
|
/**
|
|
66
60
|
* get navigation button class from given status
|
|
67
|
-
*
|
|
68
61
|
* @param {Status} status button tab status
|
|
69
62
|
* @returns {string} button class/selector variant
|
|
70
63
|
*/
|
|
71
64
|
this.getNavigationButtonClass = (status) => `${this.buttonTabBaseClass}--${status}`;
|
|
72
65
|
/**
|
|
73
66
|
* Handle keyboard event on tabs
|
|
74
|
-
*
|
|
75
67
|
* @param {MouseEvent} event mouse event
|
|
76
68
|
* @returns {void}
|
|
77
69
|
*/
|
|
@@ -111,7 +103,6 @@ export class MgTabs {
|
|
|
111
103
|
};
|
|
112
104
|
/**
|
|
113
105
|
* Method to reset focus behavior
|
|
114
|
-
*
|
|
115
106
|
* @returns {void}
|
|
116
107
|
*/
|
|
117
108
|
this.resetFocus = () => {
|
|
@@ -191,7 +182,6 @@ export class MgTabs {
|
|
|
191
182
|
*************/
|
|
192
183
|
/**
|
|
193
184
|
* Check if component props are well configured on init
|
|
194
|
-
*
|
|
195
185
|
* @returns {void}
|
|
196
186
|
*/
|
|
197
187
|
componentWillLoad() {
|
|
@@ -204,7 +194,6 @@ export class MgTabs {
|
|
|
204
194
|
}
|
|
205
195
|
/**
|
|
206
196
|
* add listners
|
|
207
|
-
*
|
|
208
197
|
* @returns {void}
|
|
209
198
|
*/
|
|
210
199
|
componentDidLoad() {
|
|
@@ -215,7 +204,6 @@ export class MgTabs {
|
|
|
215
204
|
}
|
|
216
205
|
/**
|
|
217
206
|
* Render
|
|
218
|
-
*
|
|
219
207
|
* @returns {HTMLElement} HTML Element
|
|
220
208
|
*/
|
|
221
209
|
render() {
|