@mgdis/mg-components 6.22.0 → 6.22.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/{index-C2viYwrR.js → index-Dz2LAZQT.js} +325 -1789
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{mg-action-more_37.cjs.entry.js → mg-action-more_36.cjs.entry.js} +109 -130
- package/dist/cjs/mg-alert.cjs.entry.js +2 -2
- package/dist/cjs/mg-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-fieldset.cjs.entry.js +2 -2
- package/dist/cjs/mg-input-combobox.cjs.entry.js +2 -2
- package/dist/cjs/mg-input-file.cjs.entry.js +3 -3
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +2498 -2474
- package/dist/cjs/mg-loader.cjs.entry.js +2 -2
- package/dist/cjs/mg-progress.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +2 -1
- package/dist/collection/components/atoms/mg-button/mg-button.js +6 -3
- package/dist/collection/components/atoms/mg-card/mg-card.js +2 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +8 -4
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +2 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +2 -1
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +4 -2
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.js +38 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +3 -2
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +47 -26
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +13 -7
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +3 -2
- package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +4 -3
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +9 -5
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +5 -3
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +5 -3
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +7 -4
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +22 -8
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +11 -6
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +5 -3
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +7 -4
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +5 -3
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +5 -3
- package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +4 -2
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +11 -7
- package/dist/collection/components/molecules/mg-alert/mg-alert.js +5 -3
- package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.js +3 -2
- package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
- package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +3 -2
- package/dist/collection/components/molecules/mg-form/mg-form.js +5 -3
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +5 -3
- package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +6 -4
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +4 -3
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +2 -1
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +5 -3
- 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 +3 -2
- package/dist/collection/components/molecules/mg-progress/mg-progress.js +3 -2
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +3 -2
- package/dist/collection/components/molecules/mg-table/mg-table.js +4 -2
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +3 -2
- package/dist/components/index2.js +1 -1
- package/dist/components/mg-action-more.js +1 -1
- package/dist/components/mg-alert.js +1 -1
- package/dist/components/mg-breadcrumb.js +1 -1
- package/dist/components/mg-details.js +1 -1
- package/dist/components/mg-fieldset.js +1 -1
- package/dist/components/mg-form.js +1 -1
- package/dist/components/mg-illustrated-message.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 +2 -2
- 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-toggle.js +1 -1
- package/dist/components/mg-item-more2.js +1 -1
- package/dist/components/mg-loader2.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-tabs2.js +1 -1
- package/dist/esm/{index-DFwaH2hS.js → index-C3jUhxdI.js} +325 -1789
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mg-action-more_37.entry.js → mg-action-more_36.entry.js} +111 -131
- package/dist/esm/mg-alert.entry.js +2 -2
- package/dist/esm/mg-breadcrumb.entry.js +2 -2
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-fieldset.entry.js +2 -2
- package/dist/esm/mg-input-combobox.entry.js +2 -2
- package/dist/esm/mg-input-file.entry.js +3 -3
- package/dist/esm/mg-input-rich-text-editor.entry.js +2498 -2474
- package/dist/esm/mg-loader.entry.js +2 -2
- package/dist/esm/mg-progress.entry.js +2 -2
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-2ee92f38.entry.js → p-06fbdb2f.entry.js} +1 -1
- package/dist/mg-components/{p-3b653226.entry.js → p-188b9ca9.entry.js} +1 -1
- package/dist/mg-components/p-4667078d.entry.js +1 -0
- package/dist/mg-components/{p-c63f97f0.entry.js → p-5a859ecf.entry.js} +2 -2
- package/dist/mg-components/{p-d5e69c95.entry.js → p-661da56b.entry.js} +1 -1
- package/dist/mg-components/{p-adec7fcc.entry.js → p-8e256086.entry.js} +1 -1
- package/dist/mg-components/p-C3jUhxdI.js +2 -0
- package/dist/mg-components/{p-cc793586.entry.js → p-b0b8c58f.entry.js} +1 -1
- package/dist/mg-components/{p-5745fbea.entry.js → p-bbcef41c.entry.js} +1 -1
- package/dist/mg-components/{p-c8c8cfc1.entry.js → p-c1aeb277.entry.js} +1 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.d.ts +2 -2
- package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.d.ts +8 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +16 -8
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +15 -5
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +1 -1
- package/dist/types/components.d.ts +525 -170
- package/dist/types/stencil-public-runtime.d.ts +52 -2
- package/ide/intellij/web-types.json +7 -7
- package/ide/vscode/html-custom-data.json +3 -3
- package/package.json +19 -19
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +0 -245
- package/dist/components/mg-input-checkbox-paginated.d.ts +0 -11
- package/dist/components/mg-input-checkbox-paginated.js +0 -1
- package/dist/components/mg-input-checkbox-paginated2.js +0 -1
- package/dist/mg-components/p-0482eb9f.entry.js +0 -1
- package/dist/mg-components/p-DFwaH2hS.js +0 -2
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +0 -77
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Dz2LAZQT.js');
|
|
4
4
|
var index$2 = require('./index-BxB20_Vw.js');
|
|
5
5
|
var index$1 = require('./index-CpENFzEo.js');
|
|
6
6
|
|
|
@@ -35,7 +35,7 @@ const MgLoader = class {
|
|
|
35
35
|
* @returns HTML Element
|
|
36
36
|
*/
|
|
37
37
|
render() {
|
|
38
|
-
return (index.h("div", { key: '
|
|
38
|
+
return (index.h("div", { key: '739b4cbacd8a8da056dbb1445c40fac2cf26766a', class: "mg-c-loader", "aria-live": "polite" }, index.h("mg-icon", { key: '95d3cbf26fcd6dbf0dad4853bf55aa66385f1aba', icon: "loader", spin: true }), index.h("span", { key: 'f6322cd3054d8976bd2ec24f86a2d6bb60ca7ae1', class: { 'mg-u-visually-hidden': this.messageHide } }, this.message || this.messages.loader.inProgress)));
|
|
39
39
|
}
|
|
40
40
|
get element() { return index.getElement(this); }
|
|
41
41
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Dz2LAZQT.js');
|
|
4
4
|
var index$1 = require('./index-CpENFzEo.js');
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -75,7 +75,7 @@ const MgProgress = class {
|
|
|
75
75
|
* @returns HTML Element
|
|
76
76
|
*/
|
|
77
77
|
render() {
|
|
78
|
-
return (index.h(index.Host, { key: '
|
|
78
|
+
return (index.h(index.Host, { key: '8e6c727e9416fa777fd94b32d618a9137e8e08f7', role: this.ariaRole, "aria-label": this.label, "aria-valuenow": this.value, "aria-valuemin": this.min, "aria-valuemax": this.max }, index.h("div", { key: 'ac42ee9c5dda55d70aad7391895e4a013aaa27f9', class: "mg-c-progress" }, index.h("div", { key: '34c77bc6c133bc59b9daa68d7d6c8534f13f7d37', class: { 'mg-c-progress__bar': true, 'mg-c-progress__bar--active': this.value > this.min } }, index.h("div", { key: '7ea03a3f0c54ca0c81616c7c070d178a510dd7e1', class: "mg-c-progress__fill", style: {
|
|
79
79
|
width: `${Math.round(((this.value - this.min) / (this.max - this.min)) * 100)}%`,
|
|
80
80
|
} })))));
|
|
81
81
|
}
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
"components/atoms/mg-tooltip/mg-tooltip.js",
|
|
14
14
|
"components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js",
|
|
15
15
|
"components/molecules/inputs/mg-input/mg-input.js",
|
|
16
|
-
"components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js",
|
|
17
16
|
"components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js",
|
|
18
17
|
"components/molecules/inputs/mg-input-combobox/mg-input-combobox.js",
|
|
19
18
|
"components/molecules/inputs/mg-input-date/mg-input-date.js",
|
|
@@ -46,9 +45,10 @@
|
|
|
46
45
|
"components/molecules/mg-table/mg-table.js",
|
|
47
46
|
"components/molecules/mg-tabs/mg-tabs.js"
|
|
48
47
|
],
|
|
48
|
+
"mixins": [],
|
|
49
49
|
"compiler": {
|
|
50
50
|
"name": "@stencil/core",
|
|
51
|
-
"version": "4.
|
|
51
|
+
"version": "4.43.4",
|
|
52
52
|
"typescriptVersion": "5.8.3"
|
|
53
53
|
},
|
|
54
54
|
"collections": [],
|
|
@@ -126,7 +126,8 @@ export class MgBadge {
|
|
|
126
126
|
"BadgeVariantType": {
|
|
127
127
|
"location": "import",
|
|
128
128
|
"path": "./mg-badge.conf",
|
|
129
|
-
"id": "src/components/atoms/mg-badge/mg-badge.conf.ts::BadgeVariantType"
|
|
129
|
+
"id": "src/components/atoms/mg-badge/mg-badge.conf.ts::BadgeVariantType",
|
|
130
|
+
"referenceLocation": "BadgeVariantType"
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
133
|
},
|
|
@@ -231,7 +231,8 @@ export class MgButton {
|
|
|
231
231
|
"VariantType": {
|
|
232
232
|
"location": "import",
|
|
233
233
|
"path": "./mg-button.conf",
|
|
234
|
-
"id": "src/components/atoms/mg-button/mg-button.conf.ts::VariantType"
|
|
234
|
+
"id": "src/components/atoms/mg-button/mg-button.conf.ts::VariantType",
|
|
235
|
+
"referenceLocation": "VariantType"
|
|
235
236
|
}
|
|
236
237
|
}
|
|
237
238
|
},
|
|
@@ -276,7 +277,8 @@ export class MgButton {
|
|
|
276
277
|
"ButtonType": {
|
|
277
278
|
"location": "import",
|
|
278
279
|
"path": "./mg-button.conf",
|
|
279
|
-
"id": "src/components/atoms/mg-button/mg-button.conf.ts::ButtonType"
|
|
280
|
+
"id": "src/components/atoms/mg-button/mg-button.conf.ts::ButtonType",
|
|
281
|
+
"referenceLocation": "ButtonType"
|
|
280
282
|
}
|
|
281
283
|
}
|
|
282
284
|
},
|
|
@@ -301,7 +303,8 @@ export class MgButton {
|
|
|
301
303
|
"SizeType": {
|
|
302
304
|
"location": "import",
|
|
303
305
|
"path": "./mg-button.conf",
|
|
304
|
-
"id": "src/components/atoms/mg-button/mg-button.conf.ts::SizeType"
|
|
306
|
+
"id": "src/components/atoms/mg-button/mg-button.conf.ts::SizeType",
|
|
307
|
+
"referenceLocation": "SizeType"
|
|
305
308
|
}
|
|
306
309
|
}
|
|
307
310
|
},
|
|
@@ -96,7 +96,8 @@ export class MgCard {
|
|
|
96
96
|
"RadiusSizeType": {
|
|
97
97
|
"location": "import",
|
|
98
98
|
"path": "./mg-card.conf",
|
|
99
|
-
"id": "src/components/atoms/mg-card/mg-card.conf.ts::RadiusSizeType"
|
|
99
|
+
"id": "src/components/atoms/mg-card/mg-card.conf.ts::RadiusSizeType",
|
|
100
|
+
"referenceLocation": "RadiusSizeType"
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
103
|
},
|
|
@@ -149,7 +149,8 @@ export class MgIcon {
|
|
|
149
149
|
"IconType": {
|
|
150
150
|
"location": "import",
|
|
151
151
|
"path": "./mg-icon.conf",
|
|
152
|
-
"id": "src/components/atoms/mg-icon/mg-icon.conf.ts::IconType"
|
|
152
|
+
"id": "src/components/atoms/mg-icon/mg-icon.conf.ts::IconType",
|
|
153
|
+
"referenceLocation": "IconType"
|
|
153
154
|
}
|
|
154
155
|
}
|
|
155
156
|
},
|
|
@@ -174,7 +175,8 @@ export class MgIcon {
|
|
|
174
175
|
"IconSizeType": {
|
|
175
176
|
"location": "import",
|
|
176
177
|
"path": "./mg-icon.conf",
|
|
177
|
-
"id": "src/components/atoms/mg-icon/mg-icon.conf.ts::IconSizeType"
|
|
178
|
+
"id": "src/components/atoms/mg-icon/mg-icon.conf.ts::IconSizeType",
|
|
179
|
+
"referenceLocation": "IconSizeType"
|
|
178
180
|
}
|
|
179
181
|
}
|
|
180
182
|
},
|
|
@@ -200,7 +202,8 @@ export class MgIcon {
|
|
|
200
202
|
"IconVariantType": {
|
|
201
203
|
"location": "import",
|
|
202
204
|
"path": "./mg-icon.conf",
|
|
203
|
-
"id": "src/components/atoms/mg-icon/mg-icon.conf.ts::IconVariantType"
|
|
205
|
+
"id": "src/components/atoms/mg-icon/mg-icon.conf.ts::IconVariantType",
|
|
206
|
+
"referenceLocation": "IconVariantType"
|
|
204
207
|
}
|
|
205
208
|
}
|
|
206
209
|
},
|
|
@@ -225,7 +228,8 @@ export class MgIcon {
|
|
|
225
228
|
"IconVariantStyleType": {
|
|
226
229
|
"location": "import",
|
|
227
230
|
"path": "./mg-icon.conf",
|
|
228
|
-
"id": "src/components/atoms/mg-icon/mg-icon.conf.ts::IconVariantStyleType"
|
|
231
|
+
"id": "src/components/atoms/mg-icon/mg-icon.conf.ts::IconVariantStyleType",
|
|
232
|
+
"referenceLocation": "IconVariantStyleType"
|
|
229
233
|
}
|
|
230
234
|
}
|
|
231
235
|
},
|
|
@@ -110,7 +110,8 @@ export class MgTag {
|
|
|
110
110
|
"TagVariantType": {
|
|
111
111
|
"location": "import",
|
|
112
112
|
"path": "./mg-tag.conf",
|
|
113
|
-
"id": "src/components/atoms/mg-tag/mg-tag.conf.ts::TagVariantType"
|
|
113
|
+
"id": "src/components/atoms/mg-tag/mg-tag.conf.ts::TagVariantType",
|
|
114
|
+
"referenceLocation": "TagVariantType"
|
|
114
115
|
}
|
|
115
116
|
}
|
|
116
117
|
},
|
|
@@ -429,7 +429,8 @@ export class MgTooltip {
|
|
|
429
429
|
"Placement": {
|
|
430
430
|
"location": "import",
|
|
431
431
|
"path": "@popperjs/core",
|
|
432
|
-
"id": "../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/index.d.ts::Placement"
|
|
432
|
+
"id": "../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/index.d.ts::Placement",
|
|
433
|
+
"referenceLocation": "Placement"
|
|
433
434
|
}
|
|
434
435
|
}
|
|
435
436
|
},
|
|
@@ -443,7 +443,8 @@ export class MgInput {
|
|
|
443
443
|
"labelHeading": {
|
|
444
444
|
"location": "import",
|
|
445
445
|
"path": "./mg-input.conf",
|
|
446
|
-
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::labelHeading"
|
|
446
|
+
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::labelHeading",
|
|
447
|
+
"referenceLocation": "labelHeading"
|
|
447
448
|
}
|
|
448
449
|
}
|
|
449
450
|
},
|
|
@@ -507,7 +508,8 @@ export class MgInput {
|
|
|
507
508
|
"TooltipPosition": {
|
|
508
509
|
"location": "import",
|
|
509
510
|
"path": "./mg-input.conf",
|
|
510
|
-
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition"
|
|
511
|
+
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition",
|
|
512
|
+
"referenceLocation": "TooltipPosition"
|
|
511
513
|
}
|
|
512
514
|
}
|
|
513
515
|
},
|
package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { MgInputCheckboxList } from "./MgInputCheckboxList";
|
|
3
|
+
import { formatID } from "@mgdis/core-ui-helpers/dist/utils";
|
|
4
|
+
/**
|
|
5
|
+
* Get items from checkboxes and limit
|
|
6
|
+
* @param checkboxes - checkboxes to slice
|
|
7
|
+
* @param limit - number of items to return
|
|
8
|
+
* @returns list of items to display in section
|
|
9
|
+
*/
|
|
10
|
+
const getItems = (checkboxes, limit) => [...checkboxes].slice(0, limit);
|
|
11
|
+
/**
|
|
12
|
+
* Component has next checkboxes to display
|
|
13
|
+
* @param checkboxes - checkboxes to check
|
|
14
|
+
* @param limit - number of items to display
|
|
15
|
+
* @returns truthy if have next elements
|
|
16
|
+
*/
|
|
17
|
+
const hasNext = (checkboxes, limit) => checkboxes.length > limit;
|
|
18
|
+
/**
|
|
19
|
+
* Internal component use to manage sections instances
|
|
20
|
+
* @param props - MgInputCheckboxList Interface Props
|
|
21
|
+
* @returns input template
|
|
22
|
+
*/
|
|
23
|
+
export const MgInputCheckboxPaginated = (props) => {
|
|
24
|
+
const items = getItems(props.checkboxes, props.limit);
|
|
25
|
+
const listId = formatID(props.messages.label);
|
|
26
|
+
const tabId = `tab-info-${props.key}`;
|
|
27
|
+
/**
|
|
28
|
+
* Handle load-more <mg-button> click event
|
|
29
|
+
*/
|
|
30
|
+
const handleLoadMoreClick = () => {
|
|
31
|
+
if (hasNext(props.checkboxes, props.limit)) {
|
|
32
|
+
props.handleLoadMore();
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
return (h("div", { class: "mg-input-checkbox-paginated mg-c-input__tab", slot: `tab_content-${props.key + 1}` },
|
|
36
|
+
// Mass action depends on all checkboxes list, not only displayed items
|
|
37
|
+
typeof props.handleMassAction === 'function' && props.checkboxes.length > 0 && props.checkboxes.some(checkbox => checkbox.disabled !== true) && (h("mg-tooltip", { slot: "header-action", class: "mg-c-input__tabs-action", message: props.messages.tooltip }, h("mg-button", { variant: "link", onClick: props.handleMassAction }, props.messages.action))), h("div", { class: "mg-c-input__tabs-content" }, h("p", { id: tabId, class: { 'mg-c-input__popover-info': true, 'mg-u-visually-hidden': items.length !== 0 }, "aria-live": items.length !== 0 ? 'polite' : undefined }, items.length === 0 ? props.messages.noValue : props.messages.values.replace('{count}', items.length.toString())), items.length > 0 && (h(MgInputCheckboxList, { checkboxes: items, labelledby: tabId, id: listId, disabled: props.disabled, name: props.name, invalid: props.invalid })), hasNext(props.checkboxes, props.limit) && (h("mg-button", { key: "load-more", variant: "flat", class: "mg-c-input__load-more", tabIndex: -1, "full-width": true, onClick: handleLoadMoreClick, "aria-controls": listId }, h("mg-icon", { icon: "chevron-down" }), props.messages.showMore)))));
|
|
38
|
+
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { ClassList, cleanString, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
|
|
3
|
-
import { checkboxTypes, SectionKind } from "./mg-input-checkbox.conf";
|
|
3
|
+
import { checkboxTypes, SectionKind, } from "./mg-input-checkbox.conf";
|
|
4
4
|
import { MgInputCheckboxList } from "./MgInputCheckboxList";
|
|
5
5
|
import { classDisabled, classReadonly, classFieldset, classVerticalList } from "../mg-input/mg-input.conf";
|
|
6
6
|
import { initLocales } from "../../../../locales";
|
|
7
7
|
import { Status } from "../../mg-tabs/mg-tabs.conf";
|
|
8
|
+
import { MgInputCheckboxPaginated } from "./MgInputCheckboxPaginated";
|
|
8
9
|
/**
|
|
9
|
-
* type
|
|
10
|
+
* type ICheckboxItem validation function
|
|
10
11
|
* @param items - Checkbox item
|
|
11
12
|
* @returns match item type
|
|
12
13
|
*/
|
|
@@ -26,6 +27,7 @@ export class MgInputCheckbox {
|
|
|
26
27
|
// "multi" setup
|
|
27
28
|
this.multiStart = 5;
|
|
28
29
|
this.searchStart = 10;
|
|
30
|
+
this.paginatedStep = 10;
|
|
29
31
|
// popover variables
|
|
30
32
|
this.hasOpenedPopover = false;
|
|
31
33
|
this.checkboxesId = 'checkboxes-list';
|
|
@@ -91,6 +93,10 @@ export class MgInputCheckbox {
|
|
|
91
93
|
* Define <mg-tabs> active-tab
|
|
92
94
|
*/
|
|
93
95
|
this.activeTab = 1;
|
|
96
|
+
/**
|
|
97
|
+
* Paginated sections limit per key
|
|
98
|
+
*/
|
|
99
|
+
this.paginatedLimits = {};
|
|
94
100
|
/**
|
|
95
101
|
* Handle input event
|
|
96
102
|
* @param event - input event
|
|
@@ -136,8 +142,9 @@ export class MgInputCheckbox {
|
|
|
136
142
|
* @param event - input value-change event
|
|
137
143
|
*/
|
|
138
144
|
this.handleSearchChange = (event) => {
|
|
139
|
-
this.searchValue = event.detail;
|
|
140
145
|
event.stopPropagation();
|
|
146
|
+
event.preventDefault();
|
|
147
|
+
this.searchValue = event.detail;
|
|
141
148
|
};
|
|
142
149
|
/**
|
|
143
150
|
* Handle <mg-tabs> tab-change event
|
|
@@ -269,9 +276,15 @@ export class MgInputCheckbox {
|
|
|
269
276
|
* Reset <mg-input-checkbox-paginated> limit state
|
|
270
277
|
*/
|
|
271
278
|
this.resetTabsLimit = () => {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
279
|
+
this.paginatedLimits = {};
|
|
280
|
+
};
|
|
281
|
+
/**
|
|
282
|
+
* Handle load-more action for a paginated section
|
|
283
|
+
* @param key - section key
|
|
284
|
+
*/
|
|
285
|
+
this.handlePaginatedLoadMore = (key) => {
|
|
286
|
+
var _a;
|
|
287
|
+
this.paginatedLimits = Object.assign(Object.assign({}, this.paginatedLimits), { [key]: ((_a = this.paginatedLimits[key]) !== null && _a !== void 0 ? _a : this.paginatedStep) + this.paginatedStep });
|
|
275
288
|
};
|
|
276
289
|
/**
|
|
277
290
|
* Renders the readonly value of the input.
|
|
@@ -292,7 +305,7 @@ export class MgInputCheckbox {
|
|
|
292
305
|
this.valueChange.emit(newValue);
|
|
293
306
|
}
|
|
294
307
|
else {
|
|
295
|
-
throw new Error(`<mg-input-checkbox> prop "value" is required and all values must be the same type,
|
|
308
|
+
throw new Error(`<mg-input-checkbox> prop "value" is required and all values must be the same type, ICheckboxItem. Passed value: ${toString(newValue)}.`);
|
|
296
309
|
}
|
|
297
310
|
}
|
|
298
311
|
validateType(newValue) {
|
|
@@ -517,7 +530,7 @@ export class MgInputCheckbox {
|
|
|
517
530
|
* @param checkboxes - checkboxes to render
|
|
518
531
|
* @returns render sections of checkboxes
|
|
519
532
|
*/
|
|
520
|
-
renderCheckboxTabs(
|
|
533
|
+
renderCheckboxTabs(props) {
|
|
521
534
|
const handleMassAction = (kind) => () => {
|
|
522
535
|
const displayItems = this.getDisplayItems();
|
|
523
536
|
// update only displayed items
|
|
@@ -528,39 +541,43 @@ export class MgInputCheckbox {
|
|
|
528
541
|
});
|
|
529
542
|
this.updateValues();
|
|
530
543
|
};
|
|
531
|
-
const [checkedValues, notCheckedValues] = checkboxes.reduce((acc, curr) => {
|
|
544
|
+
const [checkedValues, notCheckedValues] = props.checkboxes.reduce((acc, curr) => {
|
|
532
545
|
acc[curr.value ? 0 : 1].push(curr);
|
|
533
546
|
return acc;
|
|
534
547
|
}, [[], []]);
|
|
535
548
|
const sections = [
|
|
536
|
-
Object.assign(Object.assign({},
|
|
537
|
-
Object.assign(Object.assign({},
|
|
549
|
+
Object.assign(Object.assign({}, props), { checkboxes: notCheckedValues, messages: Object.assign(Object.assign({}, this.messages.input.checkbox.sections.notSelected), { showMore: this.messages.input.showMore }), key: SectionKind.NOT_SELECTED, handleMassAction: handleMassAction(SectionKind.NOT_SELECTED) }),
|
|
550
|
+
Object.assign(Object.assign({}, props), { checkboxes: checkedValues, messages: Object.assign(Object.assign({}, this.messages.input.checkbox.sections.selected), { showMore: this.messages.input.showMore }), key: SectionKind.SELECTED, handleMassAction: handleMassAction(SectionKind.SELECTED) }),
|
|
538
551
|
];
|
|
539
552
|
return (h("mg-tabs", { identifier: `${this.identifier}-tabs`, class: "mg-c-input__tabs", label: this.messages.input.checkbox.sections.label, items: sections.map((section, key) => ({
|
|
540
553
|
label: section.messages.title,
|
|
541
554
|
badge: { value: section.checkboxes.length, label: this.messages.input.checkbox.sections.badge.label, role: 'information' },
|
|
542
555
|
status: key + 1 === this.activeTab ? Status.ACTIVE : Status.VISIBLE,
|
|
543
|
-
})), activeTab: this.activeTab, "onActive-tab-change": this.handleActiveTabChange }, sections.map(
|
|
556
|
+
})), activeTab: this.activeTab, "onActive-tab-change": this.handleActiveTabChange }, sections.map(section => {
|
|
557
|
+
var _a;
|
|
558
|
+
return (h(MgInputCheckboxPaginated, Object.assign({}, section, { limit: (_a = this.paginatedLimits[section.key]) !== null && _a !== void 0 ? _a : this.paginatedStep, handleLoadMore: () => this.handlePaginatedLoadMore(section.key) })));
|
|
559
|
+
})));
|
|
544
560
|
}
|
|
545
561
|
/**
|
|
546
562
|
* render checkbox multi element
|
|
547
563
|
* @returns html element
|
|
548
564
|
*/
|
|
549
565
|
renderCheckboxMulti() {
|
|
566
|
+
var _a;
|
|
550
567
|
const selectedValuesNb = this.getSelectedItems().length;
|
|
551
|
-
const
|
|
552
|
-
const checkboxPaginatedProps = {
|
|
568
|
+
const props = {
|
|
553
569
|
readonly: this.readonly,
|
|
554
570
|
disabled: this.disabled,
|
|
555
|
-
|
|
571
|
+
checkboxes: this.getDisplayItems(),
|
|
556
572
|
};
|
|
573
|
+
const checkboxesPaginatedSearchProps = Object.assign(Object.assign({}, props), { messages: Object.assign(Object.assign({}, this.messages.input.checkbox.sections.search), { showMore: this.messages.input.showMore }), key: SectionKind.SEARCH, limit: (_a = this.paginatedLimits[SectionKind.SEARCH]) !== null && _a !== void 0 ? _a : this.paginatedStep, handleLoadMore: () => this.handlePaginatedLoadMore(SectionKind.SEARCH) });
|
|
557
574
|
return (h("div", { class: "mg-c-input__input-container" }, h("mg-popover", { arrowHide: true, identifier: this.getMgPopoverIdentifier(), display: this.hasOpenedPopover, "onDisplay-change": this.handleMgPopoverDisplayChange, ref: (el) => {
|
|
558
575
|
if (el !== null)
|
|
559
576
|
this.mgPopover = el;
|
|
560
577
|
} }, h("mg-button", { variant: "secondary", "aria-describedby": `${this.identifier}-title` }, h("mg-icon", { icon: "list" }), this.getSelectValuesButtonMessage()), h("div", { slot: "content", class: "mg-c-input__content" }, this.displaySearchInput ? ([
|
|
561
578
|
h("mg-input-text", { key: "input-search", identifier: `${this.identifier}-input-search`, icon: "magnifying-glass", type: "search", placeholder: this.messages.input.checkbox.sections.search.label, label: this.messages.input.checkbox.sections.search.label, mgWidth: "full", value: this.searchValue, labelHide: true, characterLeftHide: true, name: "q", "onValue-change": this.handleSearchChange }),
|
|
562
|
-
this.searchValue.length > 0 ?
|
|
563
|
-
]) : (h(MgInputCheckboxList, {
|
|
579
|
+
this.searchValue.length > 0 ? h(MgInputCheckboxPaginated, Object.assign({}, checkboxesPaginatedSearchProps)) : this.renderCheckboxTabs(props),
|
|
580
|
+
]) : (h(MgInputCheckboxList, Object.assign({}, props, { id: this.checkboxesId, name: this.name, invalid: this.invalid }))))), this.displaySelectedValues ? (selectedValuesNb > 0 && (h("ul", { role: "list", class: "mg-c-input__input-container-list" }, this.getSelectedItems().map(({ title }) => (h("li", { class: "mg-c-input__input-value", key: title }, title)))))) : (h("b", null, this.messages.input.checkbox[selectedValuesNb > 1 ? 'selectedValues' : 'selectedValue'].replace('{nb}', selectedValuesNb)))));
|
|
564
581
|
}
|
|
565
582
|
/**
|
|
566
583
|
* Render
|
|
@@ -578,7 +595,7 @@ export class MgInputCheckbox {
|
|
|
578
595
|
else {
|
|
579
596
|
inputContent = this.renderCheckboxMulti();
|
|
580
597
|
}
|
|
581
|
-
return (h("mg-input", { key: '
|
|
598
|
+
return (h("mg-input", { key: '11b725ebb111707aaf7dc39d191fe6a9efb25ea6', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: !this.readonly ? this.required : undefined, tooltip: this.tooltip, tooltipPosition: this.readonly && readonlyValue.length === 0 ? 'label' : this.tooltipPosition, helpText: !this.readonly ? this.helpText : undefined, errorMessage: !this.readonly ? this.errorMessage : undefined }, inputContent));
|
|
582
599
|
}
|
|
583
600
|
static get is() { return "mg-input-checkbox"; }
|
|
584
601
|
static get encapsulation() { return "shadow"; }
|
|
@@ -598,13 +615,14 @@ export class MgInputCheckbox {
|
|
|
598
615
|
"type": "unknown",
|
|
599
616
|
"mutable": true,
|
|
600
617
|
"complexType": {
|
|
601
|
-
"original": "
|
|
602
|
-
"resolved": "
|
|
618
|
+
"original": "ICheckboxValue[]",
|
|
619
|
+
"resolved": "ICheckboxValue[]",
|
|
603
620
|
"references": {
|
|
604
|
-
"
|
|
621
|
+
"ICheckboxValue": {
|
|
605
622
|
"location": "import",
|
|
606
623
|
"path": "./mg-input-checkbox.conf",
|
|
607
|
-
"id": "src/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.ts::
|
|
624
|
+
"id": "src/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.ts::ICheckboxValue",
|
|
625
|
+
"referenceLocation": "ICheckboxValue"
|
|
608
626
|
}
|
|
609
627
|
}
|
|
610
628
|
},
|
|
@@ -627,7 +645,8 @@ export class MgInputCheckbox {
|
|
|
627
645
|
"CheckboxType": {
|
|
628
646
|
"location": "import",
|
|
629
647
|
"path": "./mg-input-checkbox.conf",
|
|
630
|
-
"id": "src/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.ts::CheckboxType"
|
|
648
|
+
"id": "src/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.ts::CheckboxType",
|
|
649
|
+
"referenceLocation": "CheckboxType"
|
|
631
650
|
}
|
|
632
651
|
}
|
|
633
652
|
},
|
|
@@ -869,7 +888,8 @@ export class MgInputCheckbox {
|
|
|
869
888
|
"TooltipPosition": {
|
|
870
889
|
"location": "import",
|
|
871
890
|
"path": "../mg-input/mg-input.conf",
|
|
872
|
-
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition"
|
|
891
|
+
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition",
|
|
892
|
+
"referenceLocation": "TooltipPosition"
|
|
873
893
|
}
|
|
874
894
|
}
|
|
875
895
|
},
|
|
@@ -1010,7 +1030,8 @@ export class MgInputCheckbox {
|
|
|
1010
1030
|
"searchValue": {},
|
|
1011
1031
|
"searchResults": {},
|
|
1012
1032
|
"selectValuesButtonKey": {},
|
|
1013
|
-
"activeTab": {}
|
|
1033
|
+
"activeTab": {},
|
|
1034
|
+
"paginatedLimits": {}
|
|
1014
1035
|
};
|
|
1015
1036
|
}
|
|
1016
1037
|
static get events() {
|
|
@@ -1026,7 +1047,7 @@ export class MgInputCheckbox {
|
|
|
1026
1047
|
},
|
|
1027
1048
|
"complexType": {
|
|
1028
1049
|
"original": "HTMLMgInputCheckboxElement['value']",
|
|
1029
|
-
"resolved": "
|
|
1050
|
+
"resolved": "ICheckboxValue[]",
|
|
1030
1051
|
"references": {
|
|
1031
1052
|
"HTMLMgInputCheckboxElement": {
|
|
1032
1053
|
"location": "global",
|
|
@@ -758,7 +758,7 @@ export class MgInputCombobox {
|
|
|
758
758
|
else {
|
|
759
759
|
activeDescendant = (_e = this.value) === null || _e === void 0 ? void 0 : _e.value;
|
|
760
760
|
}
|
|
761
|
-
return (h("mg-input", { key: '
|
|
761
|
+
return (h("mg-input", { key: 'd19136f775e89188dcecf78a004abd1bc8048174', label: this.label, identifier: this.identifier, class: this.classCollection.classes.join(' '), ariaDescribedbyIDs: popoverContent && popoverContent !== 'list' ? popoverContent : undefined, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, readonlyValue)) : (h("mg-popover", { identifier: this.popoverId, placement: "bottom-start", display: this.popoverDisplay, "arrow-hide": true, style: {
|
|
762
762
|
'--mg-c-input-list-width': ((_f = this.input) === null || _f === void 0 ? void 0 : _f.offsetWidth) > 0 ? `${this.input.offsetWidth}px` : undefined,
|
|
763
763
|
}, "data-fallback-placement": "bottom-end", "onDisplay-change": this.handlePopoverDisplay }, h("div", { class: "mg-c-input__input-group-container" }, h("mg-icon", { icon: "magnifying-glass" }), h("input", { type: "text", role: "combobox", class: "mg-c-input__box mg-c-input__box--width", value: this.filter, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, autocomplete: "off", "aria-autocomplete": "list", "aria-expanded": this.popoverDisplay.toString(), "aria-controls": listId, "aria-invalid": (this.invalid === true).toString(), "aria-activedescendant": formatID(activeDescendant), onInput: this.handleFilterInput, onBlur: this.handleFilterBlur, onFocus: this.handleFilterFocus, onKeyDown: this.handleFilterKeydown, ref: (el) => {
|
|
764
764
|
if (el !== null)
|
|
@@ -806,7 +806,8 @@ export class MgInputCombobox {
|
|
|
806
806
|
"Option": {
|
|
807
807
|
"location": "import",
|
|
808
808
|
"path": "../../../../types",
|
|
809
|
-
"id": "src/types/index.ts::Option"
|
|
809
|
+
"id": "src/types/index.ts::Option",
|
|
810
|
+
"referenceLocation": "Option"
|
|
810
811
|
}
|
|
811
812
|
}
|
|
812
813
|
},
|
|
@@ -831,7 +832,8 @@ export class MgInputCombobox {
|
|
|
831
832
|
"Option": {
|
|
832
833
|
"location": "import",
|
|
833
834
|
"path": "../../../../types",
|
|
834
|
-
"id": "src/types/index.ts::Option"
|
|
835
|
+
"id": "src/types/index.ts::Option",
|
|
836
|
+
"referenceLocation": "Option"
|
|
835
837
|
}
|
|
836
838
|
}
|
|
837
839
|
},
|
|
@@ -1053,7 +1055,8 @@ export class MgInputCombobox {
|
|
|
1053
1055
|
"Width": {
|
|
1054
1056
|
"location": "import",
|
|
1055
1057
|
"path": "../mg-input/mg-input.conf",
|
|
1056
|
-
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::Width"
|
|
1058
|
+
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::Width",
|
|
1059
|
+
"referenceLocation": "Width"
|
|
1057
1060
|
}
|
|
1058
1061
|
}
|
|
1059
1062
|
},
|
|
@@ -1098,7 +1101,8 @@ export class MgInputCombobox {
|
|
|
1098
1101
|
"TooltipPosition": {
|
|
1099
1102
|
"location": "import",
|
|
1100
1103
|
"path": "../mg-input/mg-input.conf",
|
|
1101
|
-
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition"
|
|
1104
|
+
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition",
|
|
1105
|
+
"referenceLocation": "TooltipPosition"
|
|
1102
1106
|
}
|
|
1103
1107
|
}
|
|
1104
1108
|
},
|
|
@@ -1198,12 +1202,14 @@ export class MgInputCombobox {
|
|
|
1198
1202
|
"RequestMappingType": {
|
|
1199
1203
|
"location": "import",
|
|
1200
1204
|
"path": "./mg-input-combobox.conf",
|
|
1201
|
-
"id": "src/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.ts::RequestMappingType"
|
|
1205
|
+
"id": "src/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.ts::RequestMappingType",
|
|
1206
|
+
"referenceLocation": "RequestMappingType"
|
|
1202
1207
|
},
|
|
1203
1208
|
"ResponseMappingType": {
|
|
1204
1209
|
"location": "import",
|
|
1205
1210
|
"path": "./mg-input-combobox.conf",
|
|
1206
|
-
"id": "src/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.ts::ResponseMappingType"
|
|
1211
|
+
"id": "src/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.ts::ResponseMappingType",
|
|
1212
|
+
"referenceLocation": "ResponseMappingType"
|
|
1207
1213
|
}
|
|
1208
1214
|
}
|
|
1209
1215
|
},
|
|
@@ -357,7 +357,7 @@ export class MgInputDate {
|
|
|
357
357
|
* @returns HTML Element
|
|
358
358
|
*/
|
|
359
359
|
render() {
|
|
360
|
-
return (h("mg-input", { key: '
|
|
360
|
+
return (h("mg-input", { key: '0c3e08b8c467207110ef75f7d2516c36adc2ec4c', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === null ? 'label' : this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, this.readonly ? (this.value && h("b", { class: "mg-c-input__readonly-value" }, localeDate(this.value, this.locale))) : (h("input", { type: "date", class: "mg-c-input__box", min: this.min, max: this.max, value: this.value, id: this.identifier, name: this.name, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, ref: (el) => {
|
|
361
361
|
if (el !== null)
|
|
362
362
|
this.input = el;
|
|
363
363
|
} }))));
|
|
@@ -621,7 +621,8 @@ export class MgInputDate {
|
|
|
621
621
|
"TooltipPosition": {
|
|
622
622
|
"location": "import",
|
|
623
623
|
"path": "../mg-input/mg-input.conf",
|
|
624
|
-
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition"
|
|
624
|
+
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition",
|
|
625
|
+
"referenceLocation": "TooltipPosition"
|
|
625
626
|
}
|
|
626
627
|
}
|
|
627
628
|
},
|
|
@@ -332,9 +332,9 @@ export class MgInputFile {
|
|
|
332
332
|
* @returns HTML Element
|
|
333
333
|
*/
|
|
334
334
|
render() {
|
|
335
|
-
return (h("mg-input", { key: '
|
|
335
|
+
return (h("mg-input", { key: '075d0b55b004653115305f5dd0d6bc897fd3e9ed', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("div", { key: '16ce644751bf7e4a23876ed59e7076625661794c', class: "mg-c-input__file-container" }, h("input", { key: 'e00df3de20567ef52825ca002b838a81e586c777', name: this.name, id: this.identifier, class: "mg-u-visually-hidden", type: "file", multiple: this.multiple === true, capture: this.capture, accept: this.accept, disabled: this.disabled, required: this.files.length === 0 && this.required, onFocus: this.handleInputFocus, onBlur: this.handleInputBlur, onChange: this.handleInputChange, "aria-invalid": (this.invalid === true).toString(), ref: (el) => {
|
|
336
336
|
this.inputElement = el;
|
|
337
|
-
} }), h("mg-button", { key: '
|
|
337
|
+
} }), h("mg-button", { key: '92e356bd08d09070b4c58c525ef91ab6bdc64b74', variant: "secondary", class: "mg-c-input__file-button", type: "button", disabled: this.disabled, onClick: this.handleButtonClick, onBlur: this.handleButtonBlur, tabindex: "-1", ref: (el) => {
|
|
338
338
|
this.fileButtonElement = el;
|
|
339
339
|
} }, this.messages.input.file.browse), this.renderFiles())));
|
|
340
340
|
}
|
|
@@ -615,7 +615,8 @@ export class MgInputFile {
|
|
|
615
615
|
"TooltipPosition": {
|
|
616
616
|
"location": "import",
|
|
617
617
|
"path": "../mg-input/mg-input.conf",
|
|
618
|
-
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition"
|
|
618
|
+
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition",
|
|
619
|
+
"referenceLocation": "TooltipPosition"
|
|
619
620
|
}
|
|
620
621
|
}
|
|
621
622
|
},
|
|
@@ -460,7 +460,7 @@ export class MgInputNumeric {
|
|
|
460
460
|
* @returns HTML Element
|
|
461
461
|
*/
|
|
462
462
|
render() {
|
|
463
|
-
return (h("mg-input", { key: '
|
|
463
|
+
return (h("mg-input", { key: '9bea775c3e8d7339a45d18aeb1b3974d6da9a650', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, this.readonly
|
|
464
464
|
? this.readonlyValue && this.renderReadonly()
|
|
465
465
|
: [
|
|
466
466
|
h("input", { key: "input", type: "text", class: "mg-c-input__box mg-c-input__box--width", value: this.displayValue(), id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, autocomplete: "off", "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: (el) => {
|
|
@@ -728,7 +728,8 @@ export class MgInputNumeric {
|
|
|
728
728
|
"Width": {
|
|
729
729
|
"location": "import",
|
|
730
730
|
"path": "../mg-input/mg-input.conf",
|
|
731
|
-
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::Width"
|
|
731
|
+
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::Width",
|
|
732
|
+
"referenceLocation": "Width"
|
|
732
733
|
}
|
|
733
734
|
}
|
|
734
735
|
},
|
|
@@ -772,7 +773,8 @@ export class MgInputNumeric {
|
|
|
772
773
|
"TooltipPosition": {
|
|
773
774
|
"location": "import",
|
|
774
775
|
"path": "../mg-input/mg-input.conf",
|
|
775
|
-
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition"
|
|
776
|
+
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition",
|
|
777
|
+
"referenceLocation": "TooltipPosition"
|
|
776
778
|
}
|
|
777
779
|
}
|
|
778
780
|
},
|
|
@@ -817,7 +819,8 @@ export class MgInputNumeric {
|
|
|
817
819
|
"NumericType": {
|
|
818
820
|
"location": "import",
|
|
819
821
|
"path": "./mg-input-numeric.conf",
|
|
820
|
-
"id": "src/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.ts::NumericType"
|
|
822
|
+
"id": "src/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.ts::NumericType",
|
|
823
|
+
"referenceLocation": "NumericType"
|
|
821
824
|
}
|
|
822
825
|
}
|
|
823
826
|
},
|
|
@@ -843,7 +846,8 @@ export class MgInputNumeric {
|
|
|
843
846
|
"Format": {
|
|
844
847
|
"location": "import",
|
|
845
848
|
"path": "./mg-input-numeric.conf",
|
|
846
|
-
"id": "src/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.ts::Format"
|
|
849
|
+
"id": "src/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.ts::Format",
|
|
850
|
+
"referenceLocation": "Format"
|
|
847
851
|
}
|
|
848
852
|
}
|
|
849
853
|
},
|