@mgdis/mg-components 6.21.0 → 6.22.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-CCsGMNyq.js → index-BxB20_Vw.js} +8 -0
- package/dist/cjs/index-C2viYwrR.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mg-action-more_37.cjs.entry.js +116 -137
- package/dist/cjs/mg-alert.cjs.entry.js +1 -1
- package/dist/cjs/mg-breadcrumb.cjs.entry.js +63 -0
- package/dist/cjs/mg-components.cjs.js +1 -1
- package/dist/cjs/mg-fieldset.cjs.entry.js +1 -1
- package/dist/cjs/mg-input-combobox.cjs.entry.js +3 -3
- package/dist/cjs/mg-input-file.cjs.entry.js +3 -3
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +40071 -15808
- package/dist/cjs/mg-loader.cjs.entry.js +2 -2
- package/dist/cjs/mg-progress.cjs.entry.js +1 -1
- package/dist/collection/assets/icons/index.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js +1 -1
- package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +1 -1
- package/dist/collection/components/atoms/mg-card/mg-card.js +1 -1
- package/dist/collection/components/atoms/mg-divider/mg-divider.js +1 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +2 -2
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +2 -2
- 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 +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +2 -2
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +2 -2
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/custom-properties.scss +212 -0
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/index.js +300 -94
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.conf.js +29 -0
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +160 -50
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +2 -2
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +1 -1
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +3 -36
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.conf.js +0 -4
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +21 -43
- package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +65 -38
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +1 -1
- package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.conf.js +1 -0
- package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.js +92 -0
- package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
- package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +1 -1
- package/dist/collection/components/molecules/mg-form/mg-form.js +1 -1
- 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 +1 -1
- 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-table/mg-table.js +37 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +0 -4
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +13 -33
- package/dist/collection/locales/en/messages.json +3 -0
- package/dist/collection/locales/fr/messages.json +3 -0
- package/dist/components/index3.js +1 -1
- package/dist/components/mg-action-more.js +1 -1
- package/dist/components/mg-breadcrumb.d.ts +11 -0
- package/dist/components/mg-breadcrumb.js +1 -0
- package/dist/components/mg-card2.js +1 -1
- package/dist/components/mg-character-left2.js +1 -1
- package/dist/components/mg-details.js +1 -1
- package/dist/components/mg-divider2.js +1 -1
- package/dist/components/mg-fieldset.js +1 -1
- package/dist/components/mg-form.js +1 -1
- package/dist/components/mg-icon2.js +1 -1
- package/dist/components/mg-illustrated-message.js +1 -1
- package/dist/components/mg-input-checkbox-paginated2.js +1 -1
- package/dist/components/mg-input-checkbox.js +1 -1
- package/dist/components/mg-input-combobox.js +1 -1
- package/dist/components/mg-input-date.js +1 -1
- package/dist/components/mg-input-file.js +1 -1
- package/dist/components/mg-input-numeric.js +1 -1
- package/dist/components/mg-input-password.js +1 -1
- package/dist/components/mg-input-radio.js +1 -1
- package/dist/components/mg-input-rich-text-editor.js +1663 -1
- package/dist/components/mg-input-select2.js +1 -1
- package/dist/components/mg-input-text2.js +1 -1
- package/dist/components/mg-input-textarea.js +1 -1
- package/dist/components/mg-input-title2.js +1 -1
- package/dist/components/mg-input-toggle.js +1 -1
- package/dist/components/mg-input2.js +1 -1
- package/dist/components/mg-item-more2.js +1 -1
- package/dist/components/mg-loader2.js +1 -1
- package/dist/components/mg-menu-item2.js +1 -1
- package/dist/components/mg-message2.js +1 -1
- package/dist/components/mg-modal.js +1 -1
- package/dist/components/mg-panel.js +1 -1
- package/dist/components/mg-popover-content2.js +1 -1
- package/dist/components/mg-popover2.js +1 -1
- package/dist/components/mg-progress.js +1 -1
- package/dist/components/mg-skip-links.js +1 -1
- package/dist/components/mg-table.js +1 -1
- package/dist/components/mg-tabs2.js +1 -1
- package/dist/components/mg-tag.js +1 -1
- package/dist/components/mg-tooltip-content2.js +1 -1
- package/dist/components/mg-tooltip2.js +1 -1
- package/dist/esm/index-DFwaH2hS.js +4 -0
- package/dist/esm/{index-D-uaxCxH.js → index-DSEloqPn.js} +8 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mg-action-more_37.entry.js +116 -137
- package/dist/esm/mg-alert.entry.js +1 -1
- package/dist/esm/mg-breadcrumb.entry.js +61 -0
- package/dist/esm/mg-components.js +1 -1
- package/dist/esm/mg-fieldset.entry.js +1 -1
- package/dist/esm/mg-input-combobox.entry.js +3 -3
- package/dist/esm/mg-input-file.entry.js +3 -3
- package/dist/esm/mg-input-rich-text-editor.entry.js +40057 -15794
- package/dist/esm/mg-loader.entry.js +2 -2
- package/dist/esm/mg-progress.entry.js +1 -1
- package/dist/mg-components/locales/en/messages.json +3 -0
- package/dist/mg-components/locales/fr/messages.json +3 -0
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/p-0482eb9f.entry.js +1 -0
- package/dist/mg-components/{p-6b57f249.entry.js → p-2ee92f38.entry.js} +1 -1
- package/dist/mg-components/{p-c3d116b9.entry.js → p-3b653226.entry.js} +1 -1
- package/dist/mg-components/{p-dd1934f4.entry.js → p-5745fbea.entry.js} +1 -1
- package/dist/mg-components/p-DSEloqPn.js +1 -0
- package/dist/mg-components/{p-988c282e.entry.js → p-adec7fcc.entry.js} +1 -1
- package/dist/mg-components/p-c63f97f0.entry.js +1658 -0
- package/dist/mg-components/{p-4175dcbe.entry.js → p-c8c8cfc1.entry.js} +1 -1
- package/dist/mg-components/{p-6b655830.entry.js → p-cc793586.entry.js} +1 -1
- package/dist/mg-components/p-d5e69c95.entry.js +1 -0
- package/dist/types/assets/icons/index.d.ts +2 -0
- package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.conf.d.ts +17 -0
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/editor/index.d.ts +27 -19
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.conf.d.ts +3 -0
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +48 -14
- package/dist/types/components/molecules/internals/mg-item-more/mg-item-more.conf.d.ts +0 -5
- package/dist/types/components/molecules/internals/mg-item-more/mg-item-more.d.ts +1 -6
- package/dist/types/components/molecules/menus/mg-menu/mg-menu.conf.d.ts +2 -10
- package/dist/types/components/molecules/menus/mg-menu/mg-menu.d.ts +7 -7
- package/dist/types/components/molecules/menus/mg-menu-item/mg-menu-item.d.ts +12 -8
- package/dist/types/components/molecules/mg-breadcrumb/mg-breadcrumb.conf.d.ts +18 -0
- package/dist/types/components/molecules/mg-breadcrumb/mg-breadcrumb.d.ts +34 -0
- package/dist/types/components/molecules/mg-table/mg-table.d.ts +6 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +1 -9
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +4 -4
- package/dist/types/components.d.ts +93 -38
- package/ide/intellij/web-types.json +139 -51
- package/ide/vscode/css-custom-data.json +10 -2
- package/ide/vscode/html-custom-data.json +111 -32
- package/package.json +20 -19
- package/dist/mg-components/p-08fa327b.entry.js +0 -1
- package/dist/mg-components/p-D-uaxCxH.js +0 -1
- package/dist/mg-components/p-a79b1f19.entry.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { directions
|
|
2
|
+
import { directions } from "./mg-menu.conf";
|
|
3
3
|
import { toString } from "@mgdis/core-ui-helpers/dist/utils";
|
|
4
4
|
/**
|
|
5
5
|
* @slot - Menu content
|
|
@@ -14,10 +14,6 @@ export class MgMenu {
|
|
|
14
14
|
* Component display direction.
|
|
15
15
|
*/
|
|
16
16
|
this.direction = 'horizontal';
|
|
17
|
-
/**
|
|
18
|
-
* Define mg-menu size
|
|
19
|
-
*/
|
|
20
|
-
this.size = 'medium';
|
|
21
17
|
/*************
|
|
22
18
|
* Methods *
|
|
23
19
|
*************/
|
|
@@ -53,7 +49,6 @@ export class MgMenu {
|
|
|
53
49
|
* render mg-item-more
|
|
54
50
|
*/
|
|
55
51
|
this.renderMgItemMore = () => {
|
|
56
|
-
var _a;
|
|
57
52
|
if (this.direction === directions.VERTICAL || (this.direction === directions.HORIZONTAL && this.isChildMenu()) || this.element.children.length <= 1) {
|
|
58
53
|
return;
|
|
59
54
|
}
|
|
@@ -67,8 +62,6 @@ export class MgMenu {
|
|
|
67
62
|
for (const propertie in this.itemmore) {
|
|
68
63
|
itemMoreElement[propertie] = this.itemmore[propertie];
|
|
69
64
|
}
|
|
70
|
-
if (((_a = this.itemmore) === null || _a === void 0 ? void 0 : _a.size) === undefined)
|
|
71
|
-
itemMoreElement.size = this.size;
|
|
72
65
|
};
|
|
73
66
|
}
|
|
74
67
|
validateLabel(newValue) {
|
|
@@ -92,11 +85,6 @@ export class MgMenu {
|
|
|
92
85
|
this.renderMgItemMore();
|
|
93
86
|
}
|
|
94
87
|
}
|
|
95
|
-
validateSize(newValue) {
|
|
96
|
-
if (!sizes.includes(newValue)) {
|
|
97
|
-
throw new Error(`<${this.name}> prop "size" must be one of: ${sizes.join(', ')}. Passed value: ${toString(newValue)}.`);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
88
|
/**
|
|
101
89
|
* Define mg-menu-item listener when they are loaded
|
|
102
90
|
* @param event - mg-item-loaded "item-loaded" custom event
|
|
@@ -131,7 +119,6 @@ export class MgMenu {
|
|
|
131
119
|
this.validateDirection(this.direction);
|
|
132
120
|
this.validateLabel(this.label);
|
|
133
121
|
this.validateItemMore(this.itemmore);
|
|
134
|
-
this.validateSize(this.size);
|
|
135
122
|
}
|
|
136
123
|
/**
|
|
137
124
|
* Check if component slots configuration
|
|
@@ -166,7 +153,7 @@ export class MgMenu {
|
|
|
166
153
|
* @returns HTML Element
|
|
167
154
|
*/
|
|
168
155
|
render() {
|
|
169
|
-
return (h(Host, { key: '
|
|
156
|
+
return (h(Host, { key: '17b5111014e866939f58170452ca74ee40c8454c', role: "list", "aria-label": this.label }, h("slot", { key: '7c2a9aafccbc7526c74acaf7a505d7a33befc5ad' })));
|
|
170
157
|
}
|
|
171
158
|
static get is() { return "mg-menu"; }
|
|
172
159
|
static get encapsulation() { return "shadow"; }
|
|
@@ -227,54 +214,48 @@ export class MgMenu {
|
|
|
227
214
|
"attribute": "direction",
|
|
228
215
|
"defaultValue": "'horizontal'"
|
|
229
216
|
},
|
|
230
|
-
"
|
|
217
|
+
"size": {
|
|
231
218
|
"type": "unknown",
|
|
232
219
|
"mutable": false,
|
|
233
220
|
"complexType": {
|
|
234
|
-
"original": "
|
|
235
|
-
"resolved": "
|
|
236
|
-
"references": {
|
|
237
|
-
"ItemMoreType": {
|
|
238
|
-
"location": "import",
|
|
239
|
-
"path": "./mg-menu.conf",
|
|
240
|
-
"id": "src/components/molecules/menus/mg-menu/mg-menu.conf.ts::ItemMoreType"
|
|
241
|
-
}
|
|
242
|
-
}
|
|
221
|
+
"original": "never",
|
|
222
|
+
"resolved": "never",
|
|
223
|
+
"references": {}
|
|
243
224
|
},
|
|
244
225
|
"required": false,
|
|
245
|
-
"optional":
|
|
226
|
+
"optional": false,
|
|
246
227
|
"docs": {
|
|
247
|
-
"tags": [
|
|
248
|
-
|
|
228
|
+
"tags": [{
|
|
229
|
+
"name": "deprecated",
|
|
230
|
+
"text": "this prop is deprecated and will be removed in future releases"
|
|
231
|
+
}],
|
|
232
|
+
"text": "Size of the menu items"
|
|
249
233
|
},
|
|
250
234
|
"getter": false,
|
|
251
235
|
"setter": false
|
|
252
236
|
},
|
|
253
|
-
"
|
|
254
|
-
"type": "
|
|
237
|
+
"itemmore": {
|
|
238
|
+
"type": "unknown",
|
|
255
239
|
"mutable": false,
|
|
256
240
|
"complexType": {
|
|
257
|
-
"original": "
|
|
258
|
-
"resolved": "
|
|
241
|
+
"original": "ItemMoreType",
|
|
242
|
+
"resolved": "{ icon?: IconType; slotlabel?: SlotLabelType; }",
|
|
259
243
|
"references": {
|
|
260
|
-
"
|
|
244
|
+
"ItemMoreType": {
|
|
261
245
|
"location": "import",
|
|
262
246
|
"path": "./mg-menu.conf",
|
|
263
|
-
"id": "src/components/molecules/menus/mg-menu/mg-menu.conf.ts::
|
|
247
|
+
"id": "src/components/molecules/menus/mg-menu/mg-menu.conf.ts::ItemMoreType"
|
|
264
248
|
}
|
|
265
249
|
}
|
|
266
250
|
},
|
|
267
251
|
"required": false,
|
|
268
|
-
"optional":
|
|
252
|
+
"optional": true,
|
|
269
253
|
"docs": {
|
|
270
254
|
"tags": [],
|
|
271
|
-
"text": "
|
|
255
|
+
"text": "Customize \"mg-item-more\" element\nUsed with direction: 'horizontal' to manage overflow"
|
|
272
256
|
},
|
|
273
257
|
"getter": false,
|
|
274
|
-
"setter": false
|
|
275
|
-
"reflect": false,
|
|
276
|
-
"attribute": "size",
|
|
277
|
-
"defaultValue": "'medium'"
|
|
258
|
+
"setter": false
|
|
278
259
|
}
|
|
279
260
|
};
|
|
280
261
|
}
|
|
@@ -289,9 +270,6 @@ export class MgMenu {
|
|
|
289
270
|
}, {
|
|
290
271
|
"propName": "itemmore",
|
|
291
272
|
"methodName": "validateItemMore"
|
|
292
|
-
}, {
|
|
293
|
-
"propName": "size",
|
|
294
|
-
"methodName": "validateSize"
|
|
295
273
|
}];
|
|
296
274
|
}
|
|
297
275
|
static get listeners() {
|
|
@@ -16,7 +16,7 @@ export class MgMenuItem {
|
|
|
16
16
|
* Internal *
|
|
17
17
|
************/
|
|
18
18
|
this.name = 'mg-menu-item';
|
|
19
|
-
this.
|
|
19
|
+
this.classNavigationButton = 'mg-c-menu-item__navigation-button';
|
|
20
20
|
/************
|
|
21
21
|
* Props *
|
|
22
22
|
************/
|
|
@@ -28,6 +28,10 @@ export class MgMenuItem {
|
|
|
28
28
|
* Define menu-item status.
|
|
29
29
|
*/
|
|
30
30
|
this.status = 'visible';
|
|
31
|
+
/**
|
|
32
|
+
* Define menu-item isIcon style.
|
|
33
|
+
*/
|
|
34
|
+
this.isIcon = false;
|
|
31
35
|
/**
|
|
32
36
|
* Define menu-item content expanded.
|
|
33
37
|
*/
|
|
@@ -35,14 +39,10 @@ export class MgMenuItem {
|
|
|
35
39
|
/**********
|
|
36
40
|
* States *
|
|
37
41
|
*********/
|
|
38
|
-
/**
|
|
39
|
-
* Define menu-item size.
|
|
40
|
-
*/
|
|
41
|
-
this.size = 'medium';
|
|
42
42
|
/**
|
|
43
43
|
* Component button classes
|
|
44
44
|
*/
|
|
45
|
-
this.
|
|
45
|
+
this.classNavigationButtonClassList = new ClassList([this.classNavigationButton]);
|
|
46
46
|
/**
|
|
47
47
|
* Does component have children.
|
|
48
48
|
*/
|
|
@@ -146,12 +146,6 @@ export class MgMenuItem {
|
|
|
146
146
|
* @param guard - prevent action with guard
|
|
147
147
|
*/
|
|
148
148
|
this.updateItem = (guard) => {
|
|
149
|
-
const menu = this.getParentMenu();
|
|
150
|
-
// define element size
|
|
151
|
-
if ((menu === null || menu === void 0 ? void 0 : menu.size) !== undefined && !this.isItemMore)
|
|
152
|
-
this.size = menu.size;
|
|
153
|
-
else if (this.isItemMore)
|
|
154
|
-
this.size = this.element.dataset.size;
|
|
155
149
|
// when vertical main menu item contain an active item we force expanded
|
|
156
150
|
this.updateExpanded(this.expanded);
|
|
157
151
|
this.updateStatus(guard);
|
|
@@ -177,9 +171,6 @@ export class MgMenuItem {
|
|
|
177
171
|
const closePopover = (element) => {
|
|
178
172
|
if (element === null)
|
|
179
173
|
return;
|
|
180
|
-
else if (element !== this.element && element.expanded && element.shadowRoot.querySelector('mg-popover') !== null) {
|
|
181
|
-
element.expanded = false;
|
|
182
|
-
}
|
|
183
174
|
else {
|
|
184
175
|
closePopover(element.parentElement.closest('mg-menu-item'));
|
|
185
176
|
}
|
|
@@ -215,8 +206,23 @@ export class MgMenuItem {
|
|
|
215
206
|
}
|
|
216
207
|
watchStatus(newValue, oldValue) {
|
|
217
208
|
if (oldValue !== undefined)
|
|
218
|
-
this.
|
|
219
|
-
this.
|
|
209
|
+
this.classNavigationButtonClassList.delete(`${this.classNavigationButton}--${oldValue}`);
|
|
210
|
+
this.classNavigationButtonClassList.add(`${this.classNavigationButton}--${newValue}`);
|
|
211
|
+
}
|
|
212
|
+
watchIsIcon(newValue) {
|
|
213
|
+
const classIcon = `${this.classNavigationButton}--is-icon`;
|
|
214
|
+
if (newValue) {
|
|
215
|
+
// in vertical menu isIcon is not available
|
|
216
|
+
if (this.direction === 'vertical') {
|
|
217
|
+
this.isIcon = false;
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
this.classNavigationButtonClassList.add(classIcon);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
this.classNavigationButtonClassList.delete(classIcon);
|
|
225
|
+
}
|
|
220
226
|
}
|
|
221
227
|
watchExpanded(newValue) {
|
|
222
228
|
if (typeof newValue !== 'boolean') {
|
|
@@ -231,15 +237,10 @@ export class MgMenuItem {
|
|
|
231
237
|
});
|
|
232
238
|
}
|
|
233
239
|
}
|
|
234
|
-
watchSize(newValue, oldValue) {
|
|
235
|
-
if (oldValue !== undefined)
|
|
236
|
-
this.navigationButtonClassList.delete(`${this.navigationButton}--size-${oldValue}`);
|
|
237
|
-
this.navigationButtonClassList.add(`${this.navigationButton}--size-${newValue}`);
|
|
238
|
-
}
|
|
239
240
|
validateDirection(newValue, oldValue) {
|
|
240
241
|
if (oldValue !== undefined)
|
|
241
|
-
this.
|
|
242
|
-
this.
|
|
242
|
+
this.classNavigationButtonClassList.delete(`${this.classNavigationButton}--${oldValue}`);
|
|
243
|
+
this.classNavigationButtonClassList.add(`${this.classNavigationButton}--${newValue}`);
|
|
243
244
|
// manage all sub levels child menu-items level with data-level attribut
|
|
244
245
|
Array.from(this.element.querySelectorAll('mg-menu-item')).forEach(item => {
|
|
245
246
|
if (this.isDirection(directions.VERTICAL, newValue)) {
|
|
@@ -262,6 +263,7 @@ export class MgMenuItem {
|
|
|
262
263
|
// eslint-disable-next-line @stencil-community/no-unused-watch
|
|
263
264
|
watchDataStyleDirection(newValue) {
|
|
264
265
|
this.direction = newValue;
|
|
266
|
+
this.watchIsIcon(this.isIcon);
|
|
265
267
|
}
|
|
266
268
|
/**
|
|
267
269
|
* has focus value in dataset
|
|
@@ -301,7 +303,7 @@ export class MgMenuItem {
|
|
|
301
303
|
this.watchExpanded(this.expanded);
|
|
302
304
|
this.watchTarget(this.target);
|
|
303
305
|
this.watchIdentifier(this.identifier);
|
|
304
|
-
this.
|
|
306
|
+
this.watchIsIcon(this.isIcon);
|
|
305
307
|
}
|
|
306
308
|
/**
|
|
307
309
|
* Check if component slots configuration
|
|
@@ -315,7 +317,6 @@ export class MgMenuItem {
|
|
|
315
317
|
// https://stenciljs.com/docs/component-lifecycle#componentwillload
|
|
316
318
|
return setTimeout(() => {
|
|
317
319
|
this.watchDataStyleDirection(this.element.dataset.styleDirection);
|
|
318
|
-
this.watchDataHasFocus(this.element.dataset.hasFocus);
|
|
319
320
|
this.updateItem([Status.ACTIVE]);
|
|
320
321
|
// emit loaded event when component is fully loaded
|
|
321
322
|
this.itemLoaded.emit();
|
|
@@ -339,19 +340,26 @@ export class MgMenuItem {
|
|
|
339
340
|
this.itemUpdated.emit();
|
|
340
341
|
});
|
|
341
342
|
}
|
|
343
|
+
/**
|
|
344
|
+
* Render information slot or notification badge
|
|
345
|
+
* @returns HTML Element
|
|
346
|
+
*/
|
|
347
|
+
renderInformationSlotOrNotification() {
|
|
348
|
+
return !this.displayNotificationBadge ? (h("slot", { name: "information" })) : (h("span", { class: `${this.classNavigationButton}-text-content-notification` }, h("mg-badge", { label: this.messages.badgeLabel, value: "!", variant: "text-color", slot: "information" })));
|
|
349
|
+
}
|
|
342
350
|
/**
|
|
343
351
|
* Render ineractive element
|
|
344
352
|
* @returns HTML Element
|
|
345
353
|
*/
|
|
346
354
|
renderInteractiveElement() {
|
|
347
355
|
const TagName = this.href !== undefined ? 'a' : 'button';
|
|
348
|
-
return (h(TagName, { href: this.href, class: this.
|
|
349
|
-
h("mg-icon", { key: "icon-new-tab", class: `${this.
|
|
356
|
+
return (h(TagName, { href: this.href, class: this.classNavigationButtonClassList.join(), tabindex: [Status.DISABLED, Status.HIDDEN].includes(this.status) ? -1 : undefined, disabled: this.status === Status.DISABLED, hidden: this.status === Status.HIDDEN, target: this.href !== undefined && this.target !== undefined ? this.target : undefined, "aria-expanded": this.hasChildren && this.expanded.toString(), "aria-current": this.status === Status.ACTIVE && 'page', onClick: this.handleElementCLick }, h("slot", { name: "image" }), h("div", { class: { [`${this.classNavigationButton}-center`]: true, 'mg-u-visually-hidden': this.isIcon } }, h("div", { class: `${this.classNavigationButton}-text-content` }, h("slot", { name: "label" }), !this.isIcon && this.renderInformationSlotOrNotification(), this.target === '_blank' && [
|
|
357
|
+
h("mg-icon", { key: "icon-new-tab", class: `${this.classNavigationButton}-new-tab`, icon: "arrow-up-right-square" }),
|
|
350
358
|
h("span", { key: "a11y-new-tab", class: "mg-u-visually-hidden" }, this.messages.openNewTab),
|
|
351
|
-
]), this.
|
|
352
|
-
[`${this.
|
|
353
|
-
[`${this.
|
|
354
|
-
} }, h("mg-icon", { icon: "chevron-down" })))));
|
|
359
|
+
]), !this.isIcon && h("slot", { name: "metadata" })), this.isIcon && this.renderInformationSlotOrNotification(), this.hasChildren && this.href === undefined && !this.isIcon && (h("span", { class: {
|
|
360
|
+
[`${this.classNavigationButton}-chevron`]: true,
|
|
361
|
+
[`${this.classNavigationButton}-chevron--rotate`]: this.expanded === true,
|
|
362
|
+
} }, h("mg-icon", { icon: "chevron-down", size: "small" })))));
|
|
355
363
|
}
|
|
356
364
|
/**
|
|
357
365
|
* Render
|
|
@@ -362,7 +370,7 @@ export class MgMenuItem {
|
|
|
362
370
|
['mg-c-menu-item__collapse-container']: true,
|
|
363
371
|
['mg-c-menu-item__collapse-container--first-level']: (this.isInMainMenu() || this.isItemMore) && this.isDirection(directions.HORIZONTAL),
|
|
364
372
|
});
|
|
365
|
-
return (h(Host, { key: '
|
|
373
|
+
return (h(Host, { key: '374bf5cb625380973d15163b1088e7e743da5dd4', role: this.isItemMore ? 'presentation' : 'listitem' }, this.hasPopover() ? (h("mg-popover", { display: this.expanded, placement: "bottom-start", arrowHide: true, "onDisplay-change": this.handlePopoverDisplay, identifier: this.popoverIdentifier, "data-fallback-placement": "bottom-end" // use for the last element of the menu if it is placed on the right side
|
|
366
374
|
}, this.renderInteractiveElement(), h("div", { class: getContainerClasses(), slot: "content" }, this.renderSlot()))) : ([
|
|
367
375
|
this.renderInteractiveElement(),
|
|
368
376
|
h("div", { key: "vertical-container", class: getContainerClasses(), hidden: !this.expanded }, this.renderSlot()),
|
|
@@ -472,6 +480,26 @@ export class MgMenuItem {
|
|
|
472
480
|
"attribute": "status",
|
|
473
481
|
"defaultValue": "'visible'"
|
|
474
482
|
},
|
|
483
|
+
"isIcon": {
|
|
484
|
+
"type": "boolean",
|
|
485
|
+
"mutable": true,
|
|
486
|
+
"complexType": {
|
|
487
|
+
"original": "boolean",
|
|
488
|
+
"resolved": "boolean",
|
|
489
|
+
"references": {}
|
|
490
|
+
},
|
|
491
|
+
"required": false,
|
|
492
|
+
"optional": true,
|
|
493
|
+
"docs": {
|
|
494
|
+
"tags": [],
|
|
495
|
+
"text": "Define menu-item isIcon style."
|
|
496
|
+
},
|
|
497
|
+
"getter": false,
|
|
498
|
+
"setter": false,
|
|
499
|
+
"reflect": false,
|
|
500
|
+
"attribute": "is-icon",
|
|
501
|
+
"defaultValue": "false"
|
|
502
|
+
},
|
|
475
503
|
"expanded": {
|
|
476
504
|
"type": "boolean",
|
|
477
505
|
"mutable": true,
|
|
@@ -496,8 +524,7 @@ export class MgMenuItem {
|
|
|
496
524
|
}
|
|
497
525
|
static get states() {
|
|
498
526
|
return {
|
|
499
|
-
"
|
|
500
|
-
"navigationButtonClassList": {},
|
|
527
|
+
"classNavigationButtonClassList": {},
|
|
501
528
|
"direction": {},
|
|
502
529
|
"isItemMore": {},
|
|
503
530
|
"hasChildren": {},
|
|
@@ -548,12 +575,12 @@ export class MgMenuItem {
|
|
|
548
575
|
}, {
|
|
549
576
|
"propName": "status",
|
|
550
577
|
"methodName": "watchStatus"
|
|
578
|
+
}, {
|
|
579
|
+
"propName": "isIcon",
|
|
580
|
+
"methodName": "watchIsIcon"
|
|
551
581
|
}, {
|
|
552
582
|
"propName": "expanded",
|
|
553
583
|
"methodName": "watchExpanded"
|
|
554
|
-
}, {
|
|
555
|
-
"propName": "size",
|
|
556
|
-
"methodName": "watchSize"
|
|
557
584
|
}, {
|
|
558
585
|
"propName": "direction",
|
|
559
586
|
"methodName": "validateDirection"
|
|
@@ -195,7 +195,7 @@ export class MgActionMore {
|
|
|
195
195
|
"mutable": true,
|
|
196
196
|
"complexType": {
|
|
197
197
|
"original": "MgActionMoreIconType",
|
|
198
|
-
"resolved": "{ icon: \"filter\" | \"link\" | \"picture\" | \"table\" | \"circle\" | \"download\" | \"key\" | \"list\" | \"copy\" | \"history\" | \"location\" | \"loader\" | \"address-card\" | \"address-card-outline\" | \"align-center\" | \"align-justify\" | \"align-left\" | \"align-right\" | \"api\" | \"archive\" | \"archive-outline\" | \"arrow-clock\" | \"arrow-down\" | \"arrow-down-a-z\" | \"arrow-down-right\" | \"arrow-left\" | \"arrow-right\" | \"arrow-rotate\" | \"arrow-rotate-backward\" | \"arrow-up\" | \"arrow-up-right\" | \"arrow-up-right-square\" | \"arrow-up-z-a\" | \"arrows-compare\" | \"arrows-right-down\" | \"arrows-right-left\" | \"arrows-rotate\" | \"arrows-rotate-backward\" | \"arrows-up-down\" | \"ban\" | \"bell\" | \"bell-outline\" | \"book\" | \"book-outline\" | \"briefcase\" | \"briefcase-outline\" | \"building\" | \"building-outline\" | \"calculator\" | \"calculator-outline\" | \"calendar\" | \"calendar-euro\" | \"calendar-euro-outline\" | \"calendar-outline\" | \"check\" | \"check-circle\" | \"check-circle-outline\" | \"chevron-down\" | \"chevron-down-circle\" | \"chevron-left\" | \"chevron-left-circle\" | \"chevron-right\" | \"chevron-right-circle\" | \"chevron-up\" | \"chevron-up-circle\" | \"clock\" | \"clock-outline\" | \"code-square-outline\" | \"cog\" | \"cog-outline\" | \"comment\" | \"comment-exclamation\" | \"comment-exclamation-outline\" | \"comment-outline\" | \"comment-question\" | \"comment-question-outline\" | \"comment-sms\" | \"comment-sms-outline\" | \"conversation\" | \"conversation-outline\" | \"copy-file\" | \"copy-file-outline\" | \"copy-outline\" | \"credit-card\" | \"cross\" | \"cross-circle\" | \"cross-circle-outline\" | \"dashboard\" | \"dashboard-outline\" | \"earth\" | \"earth-outline\" | \"ellipsis\" | \"ellipsis-vertical\" | \"euro\" | \"euro-circle\" | \"exclamation-circle\" | \"exclamation-circle-outline\" | \"exclamation-stamp\" | \"exclamation-triangle\" | \"exclamation-triangle-outline\" | \"eye\" | \"eye-outline\" | \"eye-slash\" | \"eye-slash-outline\" | \"fax\" | \"fax-outline\" | \"file\" | \"file-cog\" | \"file-cog-outline\" | \"file-download\" | \"file-download-outline\" | \"file-excel\" | \"file-excel-outline\" | \"file-outline\" | \"file-pdf\" | \"file-pdf-outline\" | \"file-text\" | \"file-text-outline\" | \"file-upload\" | \"file-upload-outline\" | \"file-word\" | \"file-word-outline\" | \"filter-outline\" | \"floppy-disk\" | \"floppy-disk-checked\" | \"floppy-disk-checked-outline\" | \"floppy-disk-outline\" | \"folder\" | \"folder-check\" | \"folder-check-outline\" | \"folder-lines\" | \"folder-lines-outline\" | \"folder-link\" | \"folder-link-outline\" | \"folder-outline\" | \"folder-star\" | \"folder-star-outline\" | \"folders\" | \"folders-outline\" | \"gavel\" | \"gavel-outline\" | \"graduation-cap\" | \"graduation-cap-outline\" | \"hand-euro\" | \"hand-euro-outline\" | \"hand-up\" | \"home\" | \"home-outline\" | \"info-circle\" | \"info-circle-outline\" | \"interrogation-circle\" | \"interrogation-circle-outline\" | \"laptop\" | \"layers\" | \"life-ring\" | \"lines-rectangle\" | \"lines-rectangle-outline\" | \"location-outline\" | \"lock\" | \"lock-outline\" | \"log-in\" | \"log-out\" | \"magnifying-glass\" | \"mail\" | \"mail-open\" | \"mail-open-outline\" | \"mail-outline\" | \"messages-square\" | \"messages-square-outline\" | \"mobile\" | \"mobile-outline\" | \"notes\" | \"notes-outline\" | \"paper-plane\" | \"paper-plane-outline\" | \"paper-plane-slash\" | \"paper-plane-slash-outline\" | \"paperclip\" | \"pen\" | \"pen-circle\" | \"pen-fancy\" | \"pen-fancy-files-outline\" | \"pen-fancy-outline\" | \"pen-outline\" | \"phone\" | \"phone-outline\" | \"picture-outline\" | \"play-circle\" | \"plus\" | \"plus-circle\" | \"plus-circle-outline\" | \"share\" | \"share-outline\" | \"shuffle\" | \"sidebar-arrow-left\" | \"sidebar-arrow-right\" | \"sitemap\" | \"sliders\" | \"sliders-outline\" | \"squares\" | \"star\" | \"star-outline\" | \"tag\" | \"tag-outline\" | \"tags\" | \"tags-outline\" | \"thumb-down\" | \"thumb-down-outline\" | \"thumb-up\" | \"thumb-up-outline\" | \"thumbtack\" | \"thumbtack-outline\" | \"trash\" | \"trash-outline\" | \"universal-access\" | \"universal-access-outline\" | \"unlink\" | \"unlock\" | \"unlock-outline\" | \"upload\" | \"user\" | \"user-circle\" | \"user-group\" | \"user-group-outline\" | \"user-lock\" | \"user-outline\" | \"user-pen-fancy-outline\" | \"user-plus\" | \"user-question-outline\" | \"user-shield\" | \"user-shield-outline\" | \"users\" | \"users-outline\" | \"wallet\" | \"wallet-outline\"; }",
|
|
198
|
+
"resolved": "{ icon: \"filter\" | \"link\" | \"picture\" | \"table\" | \"circle\" | \"download\" | \"key\" | \"list\" | \"copy\" | \"history\" | \"location\" | \"pause\" | \"loader\" | \"address-card\" | \"address-card-outline\" | \"align-center\" | \"align-justify\" | \"align-left\" | \"align-right\" | \"api\" | \"archive\" | \"archive-outline\" | \"arrow-clock\" | \"arrow-down\" | \"arrow-down-a-z\" | \"arrow-down-right\" | \"arrow-left\" | \"arrow-right\" | \"arrow-rotate\" | \"arrow-rotate-backward\" | \"arrow-up\" | \"arrow-up-right\" | \"arrow-up-right-square\" | \"arrow-up-z-a\" | \"arrows-compare\" | \"arrows-right-down\" | \"arrows-right-left\" | \"arrows-rotate\" | \"arrows-rotate-backward\" | \"arrows-up-down\" | \"ban\" | \"bell\" | \"bell-outline\" | \"book\" | \"book-outline\" | \"briefcase\" | \"briefcase-outline\" | \"building\" | \"building-outline\" | \"calculator\" | \"calculator-outline\" | \"calendar\" | \"calendar-euro\" | \"calendar-euro-outline\" | \"calendar-outline\" | \"check\" | \"check-circle\" | \"check-circle-outline\" | \"chevron-down\" | \"chevron-down-circle\" | \"chevron-left\" | \"chevron-left-circle\" | \"chevron-right\" | \"chevron-right-circle\" | \"chevron-up\" | \"chevron-up-circle\" | \"clock\" | \"clock-outline\" | \"code-square-outline\" | \"cog\" | \"cog-outline\" | \"comment\" | \"comment-exclamation\" | \"comment-exclamation-outline\" | \"comment-outline\" | \"comment-question\" | \"comment-question-outline\" | \"comment-sms\" | \"comment-sms-outline\" | \"conversation\" | \"conversation-outline\" | \"copy-file\" | \"copy-file-outline\" | \"copy-outline\" | \"credit-card\" | \"cross\" | \"cross-circle\" | \"cross-circle-outline\" | \"dashboard\" | \"dashboard-outline\" | \"earth\" | \"earth-outline\" | \"ellipsis\" | \"ellipsis-vertical\" | \"euro\" | \"euro-circle\" | \"exclamation-circle\" | \"exclamation-circle-outline\" | \"exclamation-stamp\" | \"exclamation-triangle\" | \"exclamation-triangle-outline\" | \"eye\" | \"eye-outline\" | \"eye-slash\" | \"eye-slash-outline\" | \"fax\" | \"fax-outline\" | \"file\" | \"file-cog\" | \"file-cog-outline\" | \"file-download\" | \"file-download-outline\" | \"file-excel\" | \"file-excel-outline\" | \"file-outline\" | \"file-pdf\" | \"file-pdf-outline\" | \"file-text\" | \"file-text-outline\" | \"file-upload\" | \"file-upload-outline\" | \"file-word\" | \"file-word-outline\" | \"filter-outline\" | \"floppy-disk\" | \"floppy-disk-checked\" | \"floppy-disk-checked-outline\" | \"floppy-disk-outline\" | \"folder\" | \"folder-check\" | \"folder-check-outline\" | \"folder-lines\" | \"folder-lines-outline\" | \"folder-link\" | \"folder-link-outline\" | \"folder-outline\" | \"folder-star\" | \"folder-star-outline\" | \"folders\" | \"folders-outline\" | \"gavel\" | \"gavel-outline\" | \"graduation-cap\" | \"graduation-cap-outline\" | \"hand-euro\" | \"hand-euro-outline\" | \"hand-up\" | \"home\" | \"home-outline\" | \"info-circle\" | \"info-circle-outline\" | \"interrogation-circle\" | \"interrogation-circle-outline\" | \"laptop\" | \"layers\" | \"life-ring\" | \"lines-rectangle\" | \"lines-rectangle-outline\" | \"location-outline\" | \"lock\" | \"lock-outline\" | \"log-in\" | \"log-out\" | \"magnifying-glass\" | \"mail\" | \"mail-open\" | \"mail-open-outline\" | \"mail-outline\" | \"messages-square\" | \"messages-square-outline\" | \"mobile\" | \"mobile-outline\" | \"notes\" | \"notes-outline\" | \"paper-plane\" | \"paper-plane-outline\" | \"paper-plane-slash\" | \"paper-plane-slash-outline\" | \"paperclip\" | \"pause-outline\" | \"pen\" | \"pen-circle\" | \"pen-fancy\" | \"pen-fancy-files-outline\" | \"pen-fancy-outline\" | \"pen-outline\" | \"phone\" | \"phone-outline\" | \"picture-outline\" | \"play-circle\" | \"plus\" | \"plus-circle\" | \"plus-circle-outline\" | \"share\" | \"share-outline\" | \"shuffle\" | \"sidebar-arrow-left\" | \"sidebar-arrow-right\" | \"sitemap\" | \"sliders\" | \"sliders-outline\" | \"squares\" | \"star\" | \"star-outline\" | \"tag\" | \"tag-outline\" | \"tags\" | \"tags-outline\" | \"thumb-down\" | \"thumb-down-outline\" | \"thumb-up\" | \"thumb-up-outline\" | \"thumbtack\" | \"thumbtack-outline\" | \"trash\" | \"trash-outline\" | \"universal-access\" | \"universal-access-outline\" | \"unlink\" | \"unlock\" | \"unlock-outline\" | \"upload\" | \"user\" | \"user-circle\" | \"user-group\" | \"user-group-outline\" | \"user-lock\" | \"user-outline\" | \"user-pen-fancy-outline\" | \"user-plus\" | \"user-question-outline\" | \"user-shield\" | \"user-shield-outline\" | \"users\" | \"users-outline\" | \"wallet\" | \"wallet-outline\"; }",
|
|
199
199
|
"references": {
|
|
200
200
|
"MgActionMoreIconType": {
|
|
201
201
|
"location": "import",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { initLocales } from "../../../locales";
|
|
3
|
+
import { isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
|
|
4
|
+
/**
|
|
5
|
+
* Type guard for BreadcrumbItemType[]
|
|
6
|
+
* @param items - value to check
|
|
7
|
+
* @returns true if items is a non-empty array of valid BreadcrumbItemType (label required, href required except for last item)
|
|
8
|
+
*/
|
|
9
|
+
const isBreadcrumbItems = (items) => Array.isArray(items) &&
|
|
10
|
+
items.length > 0 &&
|
|
11
|
+
items.every((item, index) => typeof item === 'object' && item !== null && isValidString(item.label) && (index === items.length - 1 || isValidString(item.href)));
|
|
12
|
+
export class MgBreadcrumb {
|
|
13
|
+
validateItems(newValue) {
|
|
14
|
+
if (newValue === undefined || !isBreadcrumbItems(newValue)) {
|
|
15
|
+
throw new Error(`<mg-breadcrumb> prop "items" is required and all values must be the same type, BreadcrumbItemType. Passed value: ${toString(newValue)}.`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/***********
|
|
19
|
+
* Methods *
|
|
20
|
+
**********/
|
|
21
|
+
/**
|
|
22
|
+
* Render a single breadcrumb item (link or current page)
|
|
23
|
+
* @param item - The breadcrumb item
|
|
24
|
+
* @param isLast - Whether this item is the last in the list
|
|
25
|
+
* @returns The rendered link or span element
|
|
26
|
+
*/
|
|
27
|
+
renderItem(item, isLast) {
|
|
28
|
+
if (isValidString(item.href)) {
|
|
29
|
+
return (h("a", { href: item.href, "aria-label": item.icon !== undefined ? item.label : undefined, "aria-current": isLast ? 'page' : undefined }, item.icon !== undefined ? h("mg-icon", { icon: item.icon }) : item.label));
|
|
30
|
+
}
|
|
31
|
+
return h("span", null, item.label);
|
|
32
|
+
}
|
|
33
|
+
/*************
|
|
34
|
+
* Lifecycle *
|
|
35
|
+
*************/
|
|
36
|
+
componentWillLoad() {
|
|
37
|
+
this.validateItems(this.items);
|
|
38
|
+
this.messages = initLocales(this.element).messages.breadcrumb;
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
return (h("nav", { key: '5181512072a7de6e161adcbb9988ae3407f61301', "aria-label": this.messages.label, class: "mg-c-breadcrumb" }, h("ol", { key: '2a4cec366a72027091ebcbccd78d552884005b93', class: "mg-c-breadcrumb__list" }, this.items.map((item, index) => {
|
|
42
|
+
var _a;
|
|
43
|
+
return (h("li", { key: `${index}-${(_a = item.href) !== null && _a !== void 0 ? _a : item.label}`, class: "mg-c-breadcrumb__list-item" }, this.renderItem(item, index === this.items.length - 1)));
|
|
44
|
+
}))));
|
|
45
|
+
}
|
|
46
|
+
static get is() { return "mg-breadcrumb"; }
|
|
47
|
+
static get encapsulation() { return "shadow"; }
|
|
48
|
+
static get originalStyleUrls() {
|
|
49
|
+
return {
|
|
50
|
+
"$": ["../../../../node_modules/@mgdis/styles/dist/components/mg-breadcrumb.css"]
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
static get styleUrls() {
|
|
54
|
+
return {
|
|
55
|
+
"$": ["../../../../node_modules/@mgdis/styles/dist/components/mg-breadcrumb.css"]
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
static get properties() {
|
|
59
|
+
return {
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "unknown",
|
|
62
|
+
"mutable": false,
|
|
63
|
+
"complexType": {
|
|
64
|
+
"original": "BreadcrumbItemType[]",
|
|
65
|
+
"resolved": "BreadcrumbItemType[]",
|
|
66
|
+
"references": {
|
|
67
|
+
"BreadcrumbItemType": {
|
|
68
|
+
"location": "import",
|
|
69
|
+
"path": "./mg-breadcrumb.conf",
|
|
70
|
+
"id": "src/components/molecules/mg-breadcrumb/mg-breadcrumb.conf.ts::BreadcrumbItemType"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"required": true,
|
|
75
|
+
"optional": false,
|
|
76
|
+
"docs": {
|
|
77
|
+
"tags": [],
|
|
78
|
+
"text": "Breadcrumb items (hierarchical order: root \u2192 current page)."
|
|
79
|
+
},
|
|
80
|
+
"getter": false,
|
|
81
|
+
"setter": false
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
static get elementRef() { return "element"; }
|
|
86
|
+
static get watchers() {
|
|
87
|
+
return [{
|
|
88
|
+
"propName": "items",
|
|
89
|
+
"methodName": "validateItems"
|
|
90
|
+
}];
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -53,7 +53,7 @@ export class MgDetails {
|
|
|
53
53
|
* @returns HTML Element
|
|
54
54
|
*/
|
|
55
55
|
render() {
|
|
56
|
-
return (h("details", { key: '
|
|
56
|
+
return (h("details", { key: '4da17afd7a964a14b5b101bcfadc241be569d55a', class: { 'mg-c-details': true, 'mg-c-details--empty-summary': this.isEmptySummary }, onToggle: this.handleToggle, open: this.expanded, ref: (el) => (this.details = el) }, h("summary", { key: '515d6c4e117b547fe80a310fb90e114900f645e8' }, h("slot", { key: '0c9c0dcc47dd418e34e541d878bfc03ca137c68d', name: "summary" }), h("span", { key: 'c94f52994843b10c1161c0d85f38f8cb917ea806', class: "mg-c-details__toggle" }, h("mg-icon", { key: '9421452572af3deb03146a8dfd189369b249ba2d', icon: "chevron-up", class: { 'mg-c-details__toggle-icon': true, 'mg-c-details__toggle-icon--reverse': !this.expanded } }), h("span", { key: 'dbfb0b34da00e37f55ec07236611c2babdd6b7c5', class: { 'mg-u-visually-hidden': this.hideSummary } }, this.expanded ? this.toggleOpened : this.toggleClosed))), h("div", { key: '1b18b65a98e39a8663fa5d7e51eef5fbe2b92f76', class: "mg-c-details__details" }, h("slot", { key: '81c213594b1b67747db439624090784eaa5e6fcd', name: "details" }))));
|
|
57
57
|
}
|
|
58
58
|
static get is() { return "mg-details"; }
|
|
59
59
|
static get encapsulation() { return "shadow"; }
|
|
@@ -133,7 +133,7 @@ export class MgFieldset {
|
|
|
133
133
|
* @returns HTML Element
|
|
134
134
|
*/
|
|
135
135
|
render() {
|
|
136
|
-
return (h("mg-input", { key: '
|
|
136
|
+
return (h("mg-input", { key: 'b0b16a170de87de91fa02a38371eb3dd6fe995d7', label: this.legend, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: !this.legendHide, labelHeading: this.legendHeading, labelBorderDisplay: this.legendHeading && this.legendBorderDisplay, labelHide: this.legendHide, inputsOnBottom: this.legendHeading !== undefined, tooltip: this.tooltip, tooltipPosition: 'label', helpText: this.helpText, errorMessage: !this.valid && isValidString(this.errorMessage) ? this.errorMessage : undefined }, h("span", { key: 'c449a5235da7b190d8d311469d15cebcfaf3badc', class: "mg-c-input__input-group" }, h("slot", { key: '6d8c60e2555bfd65c8c146233dc840a2d73597d5' }))));
|
|
137
137
|
}
|
|
138
138
|
static get is() { return "mg-fieldset"; }
|
|
139
139
|
static get encapsulation() { return "shadow"; }
|
|
@@ -242,7 +242,7 @@ export class MgForm {
|
|
|
242
242
|
* @returns HTML Element
|
|
243
243
|
*/
|
|
244
244
|
render() {
|
|
245
|
-
return (h("form", { key: '
|
|
245
|
+
return (h("form", { key: 'b1a6b50f2bbb9b71cecd23d419771cf1b40e13b4', class: this.classCollection.join(), id: this.identifier, name: this.name, onSubmit: this.handleFormSubmit, role: this.ariaRole }, this.requiredMessageText && h("p", { key: '9c878f3730a06e1b683240057511b588edf5e887', innerHTML: this.requiredMessageText }), h("slot", { key: '3cf5ca0f07e2f3573615cf6566e230f4d5678b31' }), !this.readonly && !this.disabled && h("slot", { key: '6cbfd58e9600f7a9d9b55ec23bdd64877c03f0d7', name: "actions" })));
|
|
246
246
|
}
|
|
247
247
|
static get is() { return "mg-form"; }
|
|
248
248
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js
CHANGED
|
@@ -81,7 +81,7 @@ export class MgIllustratedMessage {
|
|
|
81
81
|
* @returns HTML Element
|
|
82
82
|
*/
|
|
83
83
|
render() {
|
|
84
|
-
return (h("div", { key: '
|
|
84
|
+
return (h("div", { key: 'ed3b924f5c5a75706aef03ef8798cb699679012d', class: this.classCollection.join() }, h("div", { key: '59b7f7b3fe4ad808377094f93e8b6e86ba2f49ec', class: "mg-c-illustrated-message__illustration" }, h("slot", { key: 'd28aa873cd7025647f56f3a4ed62d9e35dde25d3', name: "illustration" })), h("div", { key: '3b150411a26531827c988a2d34e2990a2302f982', class: "mg-c-illustrated-message__slots" }, h("slot", { key: '8ffea6e50bf5dc4b870d414cb710fc88e0984f61', name: "title" }), h("slot", { key: 'ec85b4a50d28ddf14dbd6b0feff59e2030348b68', name: "details" }))));
|
|
85
85
|
}
|
|
86
86
|
static get is() { return "mg-illustrated-message"; }
|
|
87
87
|
static get encapsulation() { return "shadow"; }
|
|
@@ -29,7 +29,7 @@ export class MgLoader {
|
|
|
29
29
|
* @returns HTML Element
|
|
30
30
|
*/
|
|
31
31
|
render() {
|
|
32
|
-
return (h("div", { key: '
|
|
32
|
+
return (h("div", { key: 'da82988810c1e2916a2464299844cad674cd1f12', class: "mg-c-loader", "aria-live": "polite" }, h("mg-icon", { key: '45588ae8dd55ca582a4872d4c1e731bb00681c28', icon: "loader", spin: true }), h("span", { key: '3bc07f4bbf8995de61c019942c33c8076793096a', class: { 'mg-u-visually-hidden': this.messageHide } }, this.message || this.messages.loader.inProgress)));
|
|
33
33
|
}
|
|
34
34
|
static get is() { return "mg-loader"; }
|
|
35
35
|
static get encapsulation() { return "shadow"; }
|
|
@@ -86,9 +86,9 @@ export class MgMessage {
|
|
|
86
86
|
* @returns HTML Element
|
|
87
87
|
*/
|
|
88
88
|
render() {
|
|
89
|
-
return (h("div", { key: '
|
|
89
|
+
return (h("div", { key: '516691c613b30edf92d43fb9596169459dd8058a', class: this.classCollection.join() }, h("mg-card", { key: '2be929dd6ed5458927b155d2f4c94fa15f9717e9', shadow: true }, this.variantStyle === 'bar-left' && h("span", { key: '604d5a7bd37abc571b40f8be09ac5dadbde69ec1', class: "mg-c-message__bar" }), h("span", { key: '837cce7c506997955de6efb4cffc53e5107fb602', class: "mg-c-message__icon" }, h("mg-icon", { key: '3fd70f747cad5605f129bec491aa1bfd5ea42a95', icon: this.getIcon() })), h("div", { key: 'bf0b166fee2c94014fc35980b06a45dfc91b8596', class: "mg-c-message__content" }, h("span", { key: '305f79545b87055a954831c7355e7685340d1aa6', class: "mg-c-message__content-slot" }, h("slot", { key: 'd25113f6305d8ceaa39d12672fecc4e4bf6ffb49' })), this.hasActions && [
|
|
90
90
|
h("span", { class: "mg-c-message__content-separator", key: "content-separator" }),
|
|
91
|
-
h("span", { class: "mg-c-message__content-actions-slot", key: "content-actions-slot" }, h("slot", { key: '
|
|
91
|
+
h("span", { class: "mg-c-message__content-actions-slot", key: "content-actions-slot" }, h("slot", { key: '744098ecfdcc8bb5f5e0b913884126498c21d3f0', name: "actions" })),
|
|
92
92
|
]))));
|
|
93
93
|
}
|
|
94
94
|
static get is() { return "mg-message"; }
|
|
@@ -106,11 +106,11 @@ export class MgModal {
|
|
|
106
106
|
* @returns HTML Element
|
|
107
107
|
*/
|
|
108
108
|
render() {
|
|
109
|
-
return (h("dialog", { key: '
|
|
109
|
+
return (h("dialog", { key: 'fe7c7abaf53fbc5c87d2855cc72de2212dfe8642', role: this.dialogRole, id: this.identifier, class: this.classCollection.join(), "aria-labelledby": this.titleId, ref: (el) => {
|
|
110
110
|
if (el !== null) {
|
|
111
111
|
this.dialog = el;
|
|
112
112
|
}
|
|
113
|
-
} }, h("mg-card", { key: '
|
|
113
|
+
} }, h("mg-card", { key: '4b361ad45cd0b20253cf82e8f68c574429dd451c', shadow: true }, h("div", { key: '90f5490fb82f2900403f0a7549b338e884eea171', class: "mg-c-modal__dialog" }, h("header", { key: 'a58be90f41ad4448c387b1d18372aa31522d8d35', class: "mg-c-modal__header" }, this.closeButton && (h("span", { key: 'd9a0f9c1944b89b4a64f35fc9c1b70bea60f5423', class: "mg-c-modal__close-button" }, h("mg-button", { key: 'd7ecae6a2c2b2b094fea6b4a6d3c761f0f975b29', "is-icon": true, variant: "flat", label: this.messages.modal.closeButton, onClick: this.handleClose }, h("mg-icon", { key: '54b91decfd0deb5e452e03c23f68bac58d97677a', icon: "cross" })))), h("h1", { key: '7dc2519bdf97ebc5cc18505fbbd347c7b1a4c336', class: "mg-c-modal__title", id: this.titleId }, this.modalTitle)), h("article", { key: 'b6a27c0bb6e5a350e10addbd0325b04626b07239', class: "mg-c-modal__content" }, h("slot", { key: '41acebdafae6289d2f03fc3226eb7f3c4334e33f' })), this.hasActions && (h("footer", { key: '04a934a044bfbfa64f65642361e1962d2f599bf9', class: "mg-c-modal__footer" }, h("slot", { key: '8d72488a4095c245b638d7d0e5fdbda77fa5ab01', name: "actions" })))))));
|
|
114
114
|
}
|
|
115
115
|
static get is() { return "mg-modal"; }
|
|
116
116
|
static get encapsulation() { return "shadow"; }
|
|
@@ -224,7 +224,7 @@ export class MgPanel {
|
|
|
224
224
|
*/
|
|
225
225
|
render() {
|
|
226
226
|
const headerId = `${this.identifier}-header`;
|
|
227
|
-
return (h("section", { key: '
|
|
227
|
+
return (h("section", { key: 'e92b270e15717a1b6ab7d938674ccd785fe3ee97', class: this.classCollection.join(), id: this.identifier }, h("mg-card", { key: '40647ea277463f5e915c2fb5aa982f22527545ea', shadow: this.shadow }, h("header", { key: '604611af47d683cf1f0d3ffc8b5873be390e3fb9', class: { 'mg-c-panel__header': true, 'mg-c-panel__header--reverse': this.titlePosition === 'right' }, id: headerId }, this.renderHeaderChildren()), h("article", { key: 'ff640071dd4813aa113f5928b2a0350f4528a22c', class: "mg-c-panel__content", id: `${this.identifier}-content`, "aria-labelledby": headerId, hidden: !this.expanded }, h("slot", { key: 'fe54d2ca332c573e8dfa782a3e72454501b47adf' })))));
|
|
228
228
|
}
|
|
229
229
|
static get is() { return "mg-panel"; }
|
|
230
230
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js
CHANGED
|
@@ -46,7 +46,7 @@ export class MgPopoverContent {
|
|
|
46
46
|
* @returns HTML Element
|
|
47
47
|
*/
|
|
48
48
|
render() {
|
|
49
|
-
return (h(Host, { key: '
|
|
49
|
+
return (h(Host, { key: '56962c792e0015e1b52f8121914829b7da136283' }, h("mg-card", { key: '05b557704fd10e1be87e1931fe672f5c29d3afc4', class: this.classCollection.join(), shadow: true }, this.closeButton && (h("mg-button", { key: 'd2fc38c5be7ea92d0d0efc36133d6c683baa4e68', "is-icon": true, variant: "flat", label: this.messages.general.close, onClick: this.handleCloseButton }, h("mg-icon", { key: '5d2091d064f3908a291af3b90acaddc59e2b9268', icon: "cross" }))), h("div", { key: 'd599231cfe330cdbc73f4bf7553b2cc66baf4889', class: "mg-c-popover-content__title" }, h("slot", { key: 'fbb836bac9d9f5f2327ecba13ddc3b1cab974930', name: "title" })), h("slot", { key: 'bdb29d255f35931efa24be57c13c4303ba326778', name: "content" })), h("slot", { key: 'b09b667ea04096baaeac07fac9097a3a22335f2b', name: "arrow" })));
|
|
50
50
|
}
|
|
51
51
|
static get is() { return "mg-popover-content"; }
|
|
52
52
|
static get encapsulation() { return "shadow"; }
|