@mgdis/mg-components 6.14.0 → 6.16.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-DUJwxnoi.js → index-CpENFzEo.js} +2 -2
- package/dist/cjs/{index-DzBkSgSK.js → index-T3-qWqFE.js} +8 -2
- package/dist/cjs/{index-CwjAofQ1.js → index-YM1EJx9X.js} +43 -31
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mg-action-more_37.cjs.entry.js +136 -150
- package/dist/cjs/mg-alert.cjs.entry.js +4 -4
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-input-combobox.cjs.entry.js +15 -13
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +1247 -16003
- package/dist/cjs/mg-loader.cjs.entry.js +4 -4
- package/dist/cjs/mg-progress.cjs.entry.js +3 -3
- package/dist/collection/assets/icons/index.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +49 -106
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +55 -36
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +11 -9
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +1 -1
- 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/mg-input-rich-text-editor.js +1 -1
- 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 +1 -1
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +2 -2
- package/dist/collection/components/molecules/mg-alert/mg-alert.js +1 -1
- package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
- package/dist/collection/components/molecules/mg-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 +2 -2
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
- package/dist/collection/locales/en/messages.json +19 -15
- package/dist/collection/locales/fr/messages.json +20 -16
- package/dist/components/index2.js +3 -3
- package/dist/components/index3.js +43 -31
- package/dist/components/mg-action-more.js +2 -2
- package/dist/components/mg-alert.js +2 -2
- package/dist/components/mg-badge2.js +1 -1
- package/dist/components/mg-button2.js +1 -1
- package/dist/components/mg-card2.js +1 -1
- package/dist/components/mg-character-left2.js +1 -1
- package/dist/components/mg-details.js +2 -2
- package/dist/components/mg-divider2.js +1 -1
- package/dist/components/mg-form.js +2 -2
- package/dist/components/mg-icon2.js +1 -1
- package/dist/components/mg-illustrated-message.js +2 -2
- package/dist/components/mg-input-checkbox-paginated2.js +42 -124
- package/dist/components/mg-input-checkbox.js +89 -59
- package/dist/components/mg-input-combobox.js +14 -12
- package/dist/components/mg-input-date.js +2 -2
- package/dist/components/mg-input-numeric.js +7 -2
- package/dist/components/mg-input-password.js +2 -2
- package/dist/components/mg-input-radio.js +2 -2
- package/dist/components/mg-input-rich-text-editor.js +1247 -16003
- package/dist/components/mg-input-select2.js +2 -2
- package/dist/components/mg-input-text2.js +2 -2
- package/dist/components/mg-input-textarea.js +2 -2
- package/dist/components/mg-input-title2.js +1 -1
- package/dist/components/mg-input-toggle.js +2 -2
- package/dist/components/mg-input2.js +1 -1
- package/dist/components/mg-item-more2.js +2 -2
- package/dist/components/mg-loader2.js +2 -2
- package/dist/components/mg-menu-item2.js +1 -1
- package/dist/components/mg-message2.js +3 -3
- package/dist/components/mg-modal.js +3 -3
- package/dist/components/mg-pagination.js +227 -1
- package/dist/components/mg-panel.js +3 -3
- package/dist/components/mg-popover-content2.js +2 -2
- package/dist/components/mg-popover2.js +2 -2
- package/dist/components/mg-progress.js +2 -2
- package/dist/components/mg-skip-links.js +2 -2
- package/dist/components/mg-table.js +3 -3
- package/dist/components/mg-tabs.js +1 -311
- package/dist/components/mg-tabs2.js +313 -0
- package/dist/components/mg-tag.js +1 -1
- package/dist/components/mg-tooltip-content2.js +1 -1
- package/dist/components/mg-tooltip2.js +2 -2
- package/dist/esm/{index-Bv7NHR-W.js → index-Bab8_u8S.js} +43 -31
- package/dist/esm/{index-Degtjvph.js → index-JHj_9FSs.js} +8 -2
- package/dist/esm/{index-Dr7GYvIz.js → index-WtiuOkLj.js} +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mg-action-more_37.entry.js +136 -150
- package/dist/esm/mg-alert.entry.js +4 -4
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-input-combobox.entry.js +15 -13
- package/dist/esm/mg-input-rich-text-editor.entry.js +1248 -16004
- package/dist/esm/mg-loader.entry.js +4 -4
- package/dist/esm/mg-progress.entry.js +3 -3
- package/dist/mg-components/locales/en/messages.json +19 -15
- package/dist/mg-components/locales/fr/messages.json +20 -16
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-056ba467.entry.js → p-42a90251.entry.js} +1 -1
- package/dist/mg-components/p-54156253.entry.js +1 -0
- package/dist/mg-components/{p-d13a6fdc.entry.js → p-658f828c.entry.js} +1 -1
- package/dist/mg-components/{p-c522f3c1.entry.js → p-82455ac7.entry.js} +1 -1
- package/dist/mg-components/p-Bab8_u8S.js +1 -0
- package/dist/mg-components/p-JHj_9FSs.js +2 -0
- package/dist/mg-components/p-WtiuOkLj.js +1 -0
- package/dist/mg-components/p-abbd151c.entry.js +1 -0
- package/dist/mg-components/p-c85b5d10.entry.js +1 -0
- package/dist/types/assets/icons/index.d.ts +6 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +17 -40
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +1 -2
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +15 -6
- package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +1 -1
- package/dist/types/components.d.ts +6 -33
- package/ide/intellij/web-types.json +13 -13
- package/ide/vscode/html-custom-data.json +39 -3
- package/package.json +23 -23
- package/dist/components/mg-pagination2.js +0 -229
- package/dist/mg-components/p-625c463c.entry.js +0 -1
- package/dist/mg-components/p-Bv7NHR-W.js +0 -1
- package/dist/mg-components/p-Degtjvph.js +0 -2
- package/dist/mg-components/p-Dr7GYvIz.js +0 -1
- package/dist/mg-components/p-cac23bd7.entry.js +0 -1
- package/dist/mg-components/p-e75f5383.entry.js +0 -10
|
@@ -90,7 +90,7 @@ const MgIllustratedMessage$1 = /*@__PURE__*/ proxyCustomElement(class MgIllustra
|
|
|
90
90
|
* @returns HTML Element
|
|
91
91
|
*/
|
|
92
92
|
render() {
|
|
93
|
-
return (h("div", { key: '
|
|
93
|
+
return (h("div", { key: 'b7cea46c2fad219e02009fa44c772c0a09a5234f', class: this.classCollection.join() }, h("div", { key: '56b956ee405886ef2de2ef413ac1bc6902f287b3', class: "mg-c-illustrated-message__illustration" }, h("slot", { key: '33183d226a2443ccf1763ebff4c48f670d1d77ec', name: "illustration" })), h("div", { key: '69a7e034da7e2aef8dc488f9275b4546e905513c', class: "mg-c-illustrated-message__slots" }, h("slot", { key: '0eb9d5126f3d13380ea0a13a9eb754a7543e4178', name: "title" }), h("slot", { key: '088d3bae3be0d5e5d9fc8c07fee42dda39177fd6', name: "details" }))));
|
|
94
94
|
}
|
|
95
95
|
get element() { return this; }
|
|
96
96
|
static get watchers() { return {
|
|
@@ -98,7 +98,7 @@ const MgIllustratedMessage$1 = /*@__PURE__*/ proxyCustomElement(class MgIllustra
|
|
|
98
98
|
"direction": ["watchDirection"]
|
|
99
99
|
}; }
|
|
100
100
|
static get style() { return mgIllustratedMessageCss; }
|
|
101
|
-
}, [
|
|
101
|
+
}, [257, "mg-illustrated-message", {
|
|
102
102
|
"size": [1],
|
|
103
103
|
"direction": [1],
|
|
104
104
|
"classCollection": [32]
|
|
@@ -1,31 +1,14 @@
|
|
|
1
|
-
import { h, proxyCustomElement, HTMLElement,
|
|
2
|
-
import {
|
|
3
|
-
import { d as defineCustomElement$
|
|
4
|
-
import { d as defineCustomElement$
|
|
5
|
-
import { d as defineCustomElement$5 } from './mg-input-select2.js';
|
|
6
|
-
import { d as defineCustomElement$4 } from './mg-input-title2.js';
|
|
7
|
-
import { d as defineCustomElement$3 } from './mg-pagination2.js';
|
|
8
|
-
import { d as defineCustomElement$2 } from './mg-tooltip2.js';
|
|
9
|
-
import { d as defineCustomElement$1 } from './mg-tooltip-content2.js';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* List of all availables checkbox type
|
|
13
|
-
*/
|
|
14
|
-
const checkboxTypes = ['checkbox', 'multi'];
|
|
15
|
-
/**
|
|
16
|
-
* mg-input-checkbox-paginated section kind value
|
|
17
|
-
*/
|
|
18
|
-
const SectionKind = {
|
|
19
|
-
SELECTED: 'selected',
|
|
20
|
-
NOT_SELECTED: 'not-selected',
|
|
21
|
-
};
|
|
1
|
+
import { h, proxyCustomElement, HTMLElement, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { f as formatID } from './index2.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './mg-button2.js';
|
|
4
|
+
import { d as defineCustomElement$1 } from './mg-icon2.js';
|
|
22
5
|
|
|
23
6
|
/**
|
|
24
7
|
* Get checkboxes list template
|
|
25
8
|
* @param props - MgInputCheckboxList Interface Props
|
|
26
9
|
* @returns input template
|
|
27
10
|
*/
|
|
28
|
-
const MgInputCheckboxList = (props) => (h("ul", { class: "mg-c-input__input-group-container", role: "list", "aria-
|
|
11
|
+
const MgInputCheckboxList = (props) => (h("ul", { class: "mg-c-input__input-group-container", role: "list", "aria-labelledby": props.labelledby, id: props.id }, props.checkboxes.map(input => {
|
|
29
12
|
var _a, _b;
|
|
30
13
|
return (h("li", { key: input._id, class: { 'mg-c-input__input-group': true, 'mg-c-input__input-group--disabled': props.disabled || input.disabled } },
|
|
31
14
|
h("input", { type: "checkbox", id: input._id, name: props.name, value: (_a = input.value) === null || _a === void 0 ? void 0 : _a.toString(), checked: Boolean(input.value), required: input.required, "aria-invalid": ((_b = props.invalid) === null || _b === void 0 ? void 0 : _b.toString()) || 'false', disabled: props.disabled || input.disabled, indeterminate: input.value === null, onInput: input._handleInput, onBlur: input._handleBlur, onKeyDown: input._handleKeydown }),
|
|
@@ -36,11 +19,7 @@ const MgInputCheckboxPaginated = /*@__PURE__*/ proxyCustomElement(class MgInputC
|
|
|
36
19
|
constructor() {
|
|
37
20
|
super();
|
|
38
21
|
this.__registerHost();
|
|
39
|
-
this.
|
|
40
|
-
/*************
|
|
41
|
-
* Constantes *
|
|
42
|
-
*************/
|
|
43
|
-
this.offset = 10;
|
|
22
|
+
this.step = 10;
|
|
44
23
|
/*************
|
|
45
24
|
* Decorators *
|
|
46
25
|
*************/
|
|
@@ -53,76 +32,45 @@ const MgInputCheckboxPaginated = /*@__PURE__*/ proxyCustomElement(class MgInputC
|
|
|
53
32
|
*/
|
|
54
33
|
this.disabled = false;
|
|
55
34
|
/**
|
|
56
|
-
*
|
|
35
|
+
* Page items limit to display
|
|
57
36
|
*/
|
|
58
|
-
this.
|
|
59
|
-
/**
|
|
60
|
-
* Define checkboxes to paginate
|
|
61
|
-
*/
|
|
62
|
-
this.checkboxes = [];
|
|
63
|
-
/**
|
|
64
|
-
* Is checked items values expanded
|
|
65
|
-
*/
|
|
66
|
-
this.expanded = true;
|
|
37
|
+
this.limit = this.step;
|
|
67
38
|
/***********
|
|
68
39
|
* Methods *
|
|
69
40
|
***********/
|
|
70
41
|
/**
|
|
71
|
-
*
|
|
42
|
+
* Component has next checkboxes to display
|
|
43
|
+
* @returns truthy if have next elements
|
|
72
44
|
*/
|
|
73
|
-
this.
|
|
74
|
-
this.
|
|
45
|
+
this.hasNext = () => {
|
|
46
|
+
return this.checkboxes.length > this.limit;
|
|
75
47
|
};
|
|
76
48
|
/**
|
|
77
|
-
*
|
|
49
|
+
* Set items from checkboxes and limit
|
|
78
50
|
*/
|
|
79
|
-
this.
|
|
80
|
-
this.
|
|
51
|
+
this.setItems = () => {
|
|
52
|
+
this.items = this.checkboxes.slice(0, this.limit);
|
|
81
53
|
};
|
|
82
54
|
/**
|
|
83
|
-
*
|
|
84
|
-
* @param from - array start index
|
|
85
|
-
* @param to - array end index
|
|
86
|
-
* @returns array's range
|
|
87
|
-
*/
|
|
88
|
-
this.getArrayRange = (array, from, to) => array.slice(from, to);
|
|
89
|
-
/**
|
|
90
|
-
* Method to get page count from items
|
|
91
|
-
* @param items - items to count
|
|
92
|
-
* @returns page count from items
|
|
93
|
-
*/
|
|
94
|
-
this.getPageCount = (items) => ((items === null || items === void 0 ? void 0 : items.length) > 0 ? Math.ceil(items.length / this.offset) : 0);
|
|
95
|
-
/**
|
|
96
|
-
* Handle mg-pagination current page change event
|
|
97
|
-
* @param event - pagination current page change event
|
|
55
|
+
* Handle load-more <mg-button> click event
|
|
98
56
|
*/
|
|
99
|
-
this.
|
|
100
|
-
this.
|
|
57
|
+
this.handleLoadMore = () => {
|
|
58
|
+
if (this.hasNext()) {
|
|
59
|
+
this.limit += this.step;
|
|
60
|
+
}
|
|
101
61
|
};
|
|
102
62
|
}
|
|
103
|
-
watchCheckboxes(
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
if (pageCountNewValue === 1 || (pageCountNewValue !== 0 && this.currentPage === 0)) {
|
|
109
|
-
this.currentPage = 1;
|
|
110
|
-
}
|
|
111
|
-
// when old items page numbers match the current page AND new items page number is lower than current page, we set the new last page
|
|
112
|
-
else if (pageCountOldValue === this.currentPage && pageCountNewValue < this.currentPage) {
|
|
113
|
-
this.currentPage--;
|
|
114
|
-
}
|
|
115
|
-
this.sectionKind = newValue[0].value ? SectionKind.SELECTED : SectionKind.NOT_SELECTED;
|
|
63
|
+
watchCheckboxes() {
|
|
64
|
+
this.setItems();
|
|
65
|
+
}
|
|
66
|
+
watchLimit() {
|
|
67
|
+
this.setItems();
|
|
116
68
|
}
|
|
117
69
|
/**
|
|
118
|
-
*
|
|
119
|
-
* @returns [from,to] index
|
|
70
|
+
* Method to reset limit
|
|
120
71
|
*/
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const from = isFirstPage ? 0 : (this.currentPage - 1) * this.offset;
|
|
124
|
-
const to = isFirstPage ? this.offset : this.currentPage * this.offset;
|
|
125
|
-
return [from, to];
|
|
72
|
+
async resetLimit() {
|
|
73
|
+
this.limit = this.step;
|
|
126
74
|
}
|
|
127
75
|
/*************
|
|
128
76
|
* Lifecycle *
|
|
@@ -131,39 +79,39 @@ const MgInputCheckboxPaginated = /*@__PURE__*/ proxyCustomElement(class MgInputC
|
|
|
131
79
|
* Validate props
|
|
132
80
|
*/
|
|
133
81
|
componentWillLoad() {
|
|
134
|
-
this.watchCheckboxes(
|
|
82
|
+
this.watchCheckboxes();
|
|
135
83
|
}
|
|
136
84
|
/**
|
|
137
85
|
* Render
|
|
138
86
|
* @returns HTML Element
|
|
139
87
|
*/
|
|
140
88
|
render() {
|
|
141
|
-
const
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
return (h(Host, { key: 'ee67aa1705efa2b88010748b6978e0c1dec6e4de', hidden: this.checkboxes.length < 1 }, h("div", { key: 'b713e2a0e21f57d3b238b72163f3d7a4781b7026', class: "mg-c-input__section-header" }, this.sectionKind === SectionKind.SELECTED ? (h("mg-button", { variant: "flat", onClick: this.handleToggleClick, "aria-controls": itemsContainerId, "aria-expanded": this.expanded.toString() }, h("mg-icon", { icon: this.expanded ? 'chevron-up' : 'chevron-down' }), h("span", { class: "mg-c-input__section-header-title" }, getText(this.checkboxes)))) : (h("p", { class: "mg-c-input__section-header-title mg-c-input__section-header-title--static" }, getText(this.checkboxes))), ((this.sectionKind === SectionKind.SELECTED && this.expanded && this.checkboxes.some(checkbox => checkbox.value === true && checkbox.disabled !== true)) ||
|
|
145
|
-
(this.sectionKind === SectionKind.NOT_SELECTED && this.checkboxes.some(checkbox => checkbox.value === false && checkbox.disabled !== true))) && (h("mg-tooltip", { key: '7e5cba3b03cdc7bab68650b9aed36c195ca4dfe6', class: "mg-c-input__section-header-tootlip", message: this.messages.tooltip }, h("mg-button", { key: '4980f26ade12cbfaa6ef6041fa84918900cb652a', variant: "link", onClick: this.massActionHandler }, this.messages.action))), this.expanded && this.getPageCount(this.checkboxes) > 1 && (h("mg-pagination", { key: "search-pagination", totalPages: this.getPageCount(this.checkboxes), currentPage: this.currentPage, "onCurrent-page-change": this.handleCurrentPageChange, hideNavigationLabels: true, hidePageCount: true, identifier: `input-checkbox-pagination-${this.sectionKind}` }))), h("div", { key: '950b07ea9c59e8bc21e236bf32e3bf0a9318a008', hidden: !this.expanded, id: itemsContainerId, class: "mg-c-input__section-content" }, h(MgInputCheckboxList, { key: '276f679e01756d6d60f043dc1c04807b5058750a', checkboxes: this.getArrayRange(this.checkboxes, from, to), displaySearchInput: true, messages: this.messages, id: `items-${this.sectionKind}`, disabled: this.disabled, name: this.name, invalid: this.invalid }))));
|
|
89
|
+
const listId = formatID(this.messages.label);
|
|
90
|
+
const tabId = 'tab-info';
|
|
91
|
+
return (h(Host, { key: '8e58037e78fcd7990bbd681053758b0ec4d0c4e0' }, h("slot", { key: 'c64e9c8f65a526b2289d3663fff64df02a282c96', name: "header-action" }), h("div", { key: 'c5953bb7e970384b231865d7fa4708fe2da4b407', class: "mg-c-input__tabs-content" }, h("p", { key: 'c0899cb7e7a6dea282f05aacf0fb05acd60a9d20', id: tabId, class: { 'mg-c-input__popover-info': true, 'mg-u-visually-hidden': this.items.length !== 0 }, "aria-live": this.items.length !== 0 ? 'polite' : undefined }, this.items.length === 0 ? this.messages.noValue : this.messages.values.replace('{count}', this.items.length.toString())), this.items.length > 0 && (h(MgInputCheckboxList, { key: '0bb1b4160d75b00d3fb5d9c08f3a560a16105e57', checkboxes: this.items, labelledby: tabId, id: listId, disabled: this.disabled, name: this.name, invalid: this.invalid })), this.hasNext() && (h("mg-button", { key: "load-more", variant: "flat", class: "mg-c-input__load-more", tabIndex: -1, "full-width": true, onClick: this.handleLoadMore, "aria-controls": listId }, h("mg-icon", { key: 'fd1560d7254f437f284925427130f69539b5fd3b', icon: "chevron-down" }), this.messages.showMore)))));
|
|
146
92
|
}
|
|
147
93
|
static get watchers() { return {
|
|
148
|
-
"checkboxes": ["watchCheckboxes"]
|
|
94
|
+
"checkboxes": ["watchCheckboxes"],
|
|
95
|
+
"limit": ["watchLimit"]
|
|
149
96
|
}; }
|
|
150
|
-
}, [
|
|
97
|
+
}, [262, "mg-input-checkbox-paginated", {
|
|
151
98
|
"readonly": [4],
|
|
152
99
|
"disabled": [4],
|
|
153
100
|
"name": [1],
|
|
154
101
|
"invalid": [4],
|
|
155
|
-
"currentPage": [1026, "current-page"],
|
|
156
102
|
"checkboxes": [16],
|
|
157
103
|
"messages": [16],
|
|
158
|
-
"
|
|
104
|
+
"limit": [32],
|
|
105
|
+
"resetLimit": [64]
|
|
159
106
|
}, undefined, {
|
|
160
|
-
"checkboxes": ["watchCheckboxes"]
|
|
107
|
+
"checkboxes": ["watchCheckboxes"],
|
|
108
|
+
"limit": ["watchLimit"]
|
|
161
109
|
}]);
|
|
162
110
|
function defineCustomElement() {
|
|
163
111
|
if (typeof customElements === "undefined") {
|
|
164
112
|
return;
|
|
165
113
|
}
|
|
166
|
-
const components = ["mg-input-checkbox-paginated", "mg-button", "mg-icon"
|
|
114
|
+
const components = ["mg-input-checkbox-paginated", "mg-button", "mg-icon"];
|
|
167
115
|
components.forEach(tagName => { switch (tagName) {
|
|
168
116
|
case "mg-input-checkbox-paginated":
|
|
169
117
|
if (!customElements.get(tagName)) {
|
|
@@ -171,41 +119,11 @@ function defineCustomElement() {
|
|
|
171
119
|
}
|
|
172
120
|
break;
|
|
173
121
|
case "mg-button":
|
|
174
|
-
if (!customElements.get(tagName)) {
|
|
175
|
-
defineCustomElement$8();
|
|
176
|
-
}
|
|
177
|
-
break;
|
|
178
|
-
case "mg-icon":
|
|
179
|
-
if (!customElements.get(tagName)) {
|
|
180
|
-
defineCustomElement$7();
|
|
181
|
-
}
|
|
182
|
-
break;
|
|
183
|
-
case "mg-input":
|
|
184
|
-
if (!customElements.get(tagName)) {
|
|
185
|
-
defineCustomElement$6();
|
|
186
|
-
}
|
|
187
|
-
break;
|
|
188
|
-
case "mg-input-select":
|
|
189
|
-
if (!customElements.get(tagName)) {
|
|
190
|
-
defineCustomElement$5();
|
|
191
|
-
}
|
|
192
|
-
break;
|
|
193
|
-
case "mg-input-title":
|
|
194
|
-
if (!customElements.get(tagName)) {
|
|
195
|
-
defineCustomElement$4();
|
|
196
|
-
}
|
|
197
|
-
break;
|
|
198
|
-
case "mg-pagination":
|
|
199
|
-
if (!customElements.get(tagName)) {
|
|
200
|
-
defineCustomElement$3();
|
|
201
|
-
}
|
|
202
|
-
break;
|
|
203
|
-
case "mg-tooltip":
|
|
204
122
|
if (!customElements.get(tagName)) {
|
|
205
123
|
defineCustomElement$2();
|
|
206
124
|
}
|
|
207
125
|
break;
|
|
208
|
-
case "mg-
|
|
126
|
+
case "mg-icon":
|
|
209
127
|
if (!customElements.get(tagName)) {
|
|
210
128
|
defineCustomElement$1();
|
|
211
129
|
}
|
|
@@ -214,4 +132,4 @@ function defineCustomElement() {
|
|
|
214
132
|
}
|
|
215
133
|
defineCustomElement();
|
|
216
134
|
|
|
217
|
-
export { MgInputCheckboxPaginated as M,
|
|
135
|
+
export { MgInputCheckboxPaginated as M, MgInputCheckboxList as a, defineCustomElement as d };
|
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { C as ClassList,
|
|
3
|
-
import { d as defineCustomElement$
|
|
4
|
-
import { d as defineCustomElement$
|
|
2
|
+
import { C as ClassList, m as cleanString, i as isValidString, t as toString } from './index2.js';
|
|
3
|
+
import { d as defineCustomElement$9, a as MgInputCheckboxList } from './mg-input-checkbox-paginated2.js';
|
|
4
|
+
import { d as defineCustomElement$a, b as classFieldset, e as classVerticalList, c as classReadonly, a as classDisabled } from './mg-input2.js';
|
|
5
5
|
import { i as initLocales } from './index3.js';
|
|
6
|
-
import { d as defineCustomElement$
|
|
7
|
-
import { d as defineCustomElement$
|
|
8
|
-
import { d as defineCustomElement$
|
|
9
|
-
import { d as defineCustomElement$
|
|
10
|
-
import { d as defineCustomElement$
|
|
6
|
+
import { d as defineCustomElement$4, S as Status } from './mg-tabs2.js';
|
|
7
|
+
import { d as defineCustomElement$f } from './mg-badge2.js';
|
|
8
|
+
import { d as defineCustomElement$e } from './mg-button2.js';
|
|
9
|
+
import { d as defineCustomElement$d } from './mg-card2.js';
|
|
10
|
+
import { d as defineCustomElement$c } from './mg-character-left2.js';
|
|
11
|
+
import { d as defineCustomElement$b } from './mg-icon2.js';
|
|
11
12
|
import { d as defineCustomElement$8 } from './mg-input-text2.js';
|
|
12
13
|
import { d as defineCustomElement$7 } from './mg-input-title2.js';
|
|
13
|
-
import { d as defineCustomElement$6 } from './mg-
|
|
14
|
-
import { d as defineCustomElement$5 } from './mg-
|
|
15
|
-
import { d as defineCustomElement$4 } from './mg-popover-content2.js';
|
|
14
|
+
import { d as defineCustomElement$6 } from './mg-popover2.js';
|
|
15
|
+
import { d as defineCustomElement$5 } from './mg-popover-content2.js';
|
|
16
16
|
import { d as defineCustomElement$3 } from './mg-tooltip2.js';
|
|
17
17
|
import { d as defineCustomElement$2 } from './mg-tooltip-content2.js';
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* List of all availables checkbox type
|
|
21
|
+
*/
|
|
22
|
+
const checkboxTypes = ['checkbox', 'multi'];
|
|
23
|
+
/**
|
|
24
|
+
* mg-input-checkbox-paginated section kind value
|
|
25
|
+
*/
|
|
26
|
+
const SectionKind = {
|
|
27
|
+
SELECTED: 'selected',
|
|
28
|
+
NOT_SELECTED: 'not-selected',
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const mgInputCheckboxCss = ".mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);overflow-wrap:anywhere}.mg-c-input.mg-c-input--fieldset{padding:0;border:0;margin-right:0;margin-left:0}.mg-c-input.mg-c-input--fieldset input[type=radio],.mg-c-input.mg-c-input--fieldset input[type=checkbox]{width:var(--mg-c-input-check-size);height:var(--mg-c-input-check-size);flex-shrink:0;margin:calc((var(--mg-b-font-size)*var(--mg-b-line-height) - var(--mg-c-input-check-size))/2) var(--mg-b-size-8) 0 0}.mg-c-input.mg-c-input--fieldset .mg-c-input__input-group{display:flex;align-items:start}.mg-c-input.mg-c-input--fieldset .mg-c-input__input-group-container{display:flex;flex-wrap:wrap;padding:0;margin:0;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);gap:var(--mg-b-size-12) var(--mg-b-size-24);list-style:none}.mg-c-input.mg-c-input--fieldset .mg-c-input__input-group.mg-c-input__input-group--disabled label{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--fieldset.mg-c-input--vertical-list .mg-c-input__input-group-container,.mg-c-input.mg-c-input--fieldset.mg-c-input--checkbox-multi .mg-c-input__input-group-container{flex-direction:column}.mg-c-input.mg-c-input--fieldset.mg-c-input--label-on-top .mg-c-input__input-group-container{margin-top:var(--mg-b-size-8)}.mg-c-input__popover-info{padding:var(--mg-b-size-8);margin:0;color:var(--mg-b-color-neutral-90);text-align:center}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-group-container{padding:var(--mg-b-size-4) var(--mg-b-size-8);margin:0}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-container{display:flex;width:unset;flex:unset;flex-wrap:wrap;column-gap:var(--mg-b-size-8)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-container-list{display:flex;flex-flow:row wrap;padding:0;margin:0;gap:var(--mg-b-size-4);list-style:none}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__tab{display:block;min-height:calc(var(--mg-b-size-4)*55)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__tabs{min-height:0;flex-shrink:1}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__tabs-action{padding-top:var(--mg-b-size-16);padding-bottom:var(--mg-b-size-12)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__tabs-content{height:calc(24*var(--mg-b-size-8) - 2*var(--mg-b-size-8));overflow-y:auto}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-value{display:inline-flex;min-width:var(--mg-b-size-min-height);min-height:var(--mg-b-size-min-height);box-sizing:border-box;align-items:center;justify-content:center;padding:calc((var(--mg-b-size-min-height) - 2*var(--mg-b-size-border) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-12);border-radius:var(--mg-b-size-4);background-color:var(--mg-b-color-neutral-20);font-size:var(--mg-b-font-size)}.mg-c-input.mg-c-input--checkbox-multi b{margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2)}.mg-c-input.mg-c-input--checkbox-multi.mg-c-input--disabled .mg-c-input__input-container b{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--checkbox-multi.mg-c-input--with-values .mg-c-input__input-container{gap:var(--mg-b-size-4)}.mg-c-input.mg-c-input--checkbox-multi.mg-c-input--search-mode .mg-c-input__content{display:flex;width:calc(var(--mg-b-size-floating-element-max-width) - var(--mg-b-size-16));flex-direction:column;gap:var(--mg-b-size-4)}.mg-c-input.mg-c-input--checkbox-multi.mg-c-input--search-mode .mg-c-input__content .mg-c-input__tabs-content{min-height:calc(var(--mg-b-size-4)*55)}.mg-c-input.mg-c-input--checkbox-multi:not(.mg-c-input--label-on-top) mg-tooltip:not(.mg-c-input__section-header-tootlip){margin-left:var(--mg-b-size-8)}.mg-c-input.mg-c-input--checkbox-multi mg-popover{--mg-c-card-spacing:var(--mg-b-size-8)}.mg-c-input.mg-c-input--readonly ul{display:flex;min-height:var(--mg-b-font-size);flex-flow:column wrap;padding:0;margin:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) 0 0;list-style:none;row-gap:var(--mg-b-size-8)}";
|
|
20
32
|
|
|
21
33
|
/**
|
|
22
34
|
* type CheckboxItem validation function
|
|
@@ -45,6 +57,7 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
|
|
|
45
57
|
this.searchStart = 10;
|
|
46
58
|
// popover variables
|
|
47
59
|
this.hasOpenedPopover = false;
|
|
60
|
+
this.checkboxesId = 'checkboxes-list';
|
|
48
61
|
/**
|
|
49
62
|
* Define input name
|
|
50
63
|
* If not set the value equals the identifier
|
|
@@ -103,6 +116,10 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
|
|
|
103
116
|
* Select values button text local key
|
|
104
117
|
*/
|
|
105
118
|
this.selectValuesButtonKey = 'editButton';
|
|
119
|
+
/**
|
|
120
|
+
* Define <mg-tabs> active-tab
|
|
121
|
+
*/
|
|
122
|
+
this.activeTab = 1;
|
|
106
123
|
/**
|
|
107
124
|
* Handle input event
|
|
108
125
|
* @param event - input event
|
|
@@ -151,6 +168,14 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
|
|
|
151
168
|
this.searchValue = event.detail;
|
|
152
169
|
event.stopPropagation();
|
|
153
170
|
};
|
|
171
|
+
/**
|
|
172
|
+
* Handle <mg-tabs> tab-change event
|
|
173
|
+
* @param event - tab change event
|
|
174
|
+
*/
|
|
175
|
+
this.handleActiveTabChange = (event) => {
|
|
176
|
+
this.activeTab = event.detail;
|
|
177
|
+
this.resetTabsLimit();
|
|
178
|
+
};
|
|
154
179
|
/**
|
|
155
180
|
* popover display-change handler
|
|
156
181
|
* @param event - mg-popover display-change custom event
|
|
@@ -164,26 +189,11 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
|
|
|
164
189
|
if (!event.detail) {
|
|
165
190
|
// reset search value
|
|
166
191
|
this.searchValue = '';
|
|
167
|
-
|
|
168
|
-
Array.from(this.element.shadowRoot.querySelectorAll('mg-input-checkbox-paginated')).forEach(element => {
|
|
169
|
-
element.currentPage = 1;
|
|
170
|
-
});
|
|
192
|
+
this.resetTabsLimit();
|
|
171
193
|
this.checkValidity();
|
|
172
194
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
* Handle select all button
|
|
176
|
-
* @param event - mass action event trigger a global select/unselect on values
|
|
177
|
-
*/
|
|
178
|
-
this.handleMassAction = (event) => {
|
|
179
|
-
const displayItems = this.getDisplayItems();
|
|
180
|
-
// update only displayed items
|
|
181
|
-
displayItems.forEach(item => {
|
|
182
|
-
if (item.disabled !== true) {
|
|
183
|
-
item.value = event.detail !== SectionKind.SELECTED;
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
this.updateValues();
|
|
195
|
+
// init active tab to selected if some values are checked
|
|
196
|
+
this.activeTab = this.checkboxItems.some(items => items.value) ? 2 : 1;
|
|
187
197
|
};
|
|
188
198
|
/**
|
|
189
199
|
* Update values
|
|
@@ -281,6 +291,14 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
|
|
|
281
291
|
* @returns selected checkboxItems
|
|
282
292
|
*/
|
|
283
293
|
this.getSelectedItems = () => this.checkboxItems.filter(({ value }) => value);
|
|
294
|
+
/**
|
|
295
|
+
* Reset <mg-input-checkbox-paginated> limit state
|
|
296
|
+
*/
|
|
297
|
+
this.resetTabsLimit = () => {
|
|
298
|
+
Array.from(this.element.shadowRoot.querySelectorAll('mg-input-checkbox-paginated')).forEach(component => {
|
|
299
|
+
component.resetLimit();
|
|
300
|
+
});
|
|
301
|
+
};
|
|
284
302
|
/**
|
|
285
303
|
* Renders the readonly value of the input.
|
|
286
304
|
* @returns The rendered readonly value.
|
|
@@ -292,7 +310,7 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
|
|
|
292
310
|
* Renders the MgInputCheckboxList component.
|
|
293
311
|
* @returns The rendered MgInputCheckboxList component.
|
|
294
312
|
*/
|
|
295
|
-
this.renderMgInputCheckboxList = () => (h(MgInputCheckboxList, { checkboxes: this.checkboxItems,
|
|
313
|
+
this.renderMgInputCheckboxList = () => (h(MgInputCheckboxList, { checkboxes: this.checkboxItems, id: this.checkboxesId, disabled: this.disabled, name: this.name, invalid: this.invalid }));
|
|
296
314
|
}
|
|
297
315
|
validateValue(newValue) {
|
|
298
316
|
if (isCheckboxItems(newValue)) {
|
|
@@ -516,23 +534,30 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
|
|
|
516
534
|
* @param checkboxes - checkboxes to render
|
|
517
535
|
* @returns render sections of checkboxes
|
|
518
536
|
*/
|
|
519
|
-
|
|
537
|
+
renderCheckboxTabs(checkboxes, checkboxPaginatedProps) {
|
|
538
|
+
const handleMassAction = (kind) => () => {
|
|
539
|
+
const displayItems = this.getDisplayItems();
|
|
540
|
+
// update only displayed items
|
|
541
|
+
displayItems.forEach(item => {
|
|
542
|
+
if (!item.disabled) {
|
|
543
|
+
item.value = kind !== SectionKind.SELECTED;
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
this.updateValues();
|
|
547
|
+
};
|
|
520
548
|
const [checkedValues, notCheckedValues] = checkboxes.reduce((acc, curr) => {
|
|
521
549
|
acc[curr.value ? 0 : 1].push(curr);
|
|
522
550
|
return acc;
|
|
523
551
|
}, [[], []]);
|
|
524
|
-
const baseSection = {
|
|
525
|
-
readonly: this.readonly,
|
|
526
|
-
disabled: this.disabled,
|
|
527
|
-
identifier: this.identifier,
|
|
528
|
-
};
|
|
529
552
|
const sections = [
|
|
530
|
-
Object.assign(Object.assign({},
|
|
531
|
-
Object.assign(Object.assign({},
|
|
553
|
+
Object.assign(Object.assign({}, checkboxPaginatedProps), { checkboxes: notCheckedValues, messages: Object.assign(Object.assign({}, this.messages.input.checkbox.sections.notSelected), { showMore: this.messages.input.showMore }), handleMassAction: handleMassAction(SectionKind.NOT_SELECTED) }),
|
|
554
|
+
Object.assign(Object.assign({}, checkboxPaginatedProps), { checkboxes: checkedValues, messages: Object.assign(Object.assign({}, this.messages.input.checkbox.sections.selected), { showMore: this.messages.input.showMore }), handleMassAction: handleMassAction(SectionKind.SELECTED) }),
|
|
532
555
|
];
|
|
533
|
-
return sections
|
|
534
|
-
|
|
535
|
-
|
|
556
|
+
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) => ({
|
|
557
|
+
label: section.messages.title,
|
|
558
|
+
badge: { value: section.checkboxes.length, label: this.messages.input.checkbox.sections.badge.label, role: 'information' },
|
|
559
|
+
status: key + 1 === this.activeTab ? Status.ACTIVE : Status.VISIBLE,
|
|
560
|
+
})), activeTab: this.activeTab, "onActive-tab-change": this.handleActiveTabChange }, sections.map((section, key) => (h("mg-input-checkbox-paginated", Object.assign({ class: "mg-c-input__tab", slot: `tab_content-${key + 1}` }, section, { key: section.messages.title }), section.checkboxes.length > 0 && section.checkboxes.some(checkbox => checkbox.disabled !== true) && (h("mg-tooltip", { slot: "header-action", class: "mg-c-input__tabs-action", message: section.messages.tooltip }, h("mg-button", { variant: "link", onClick: section.handleMassAction }, section.messages.action))))))));
|
|
536
561
|
}
|
|
537
562
|
/**
|
|
538
563
|
* render checkbox multi element
|
|
@@ -541,14 +566,18 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
|
|
|
541
566
|
renderCheckboxMulti() {
|
|
542
567
|
const selectedValuesNb = this.getSelectedItems().length;
|
|
543
568
|
const checkboxes = this.getDisplayItems();
|
|
569
|
+
const checkboxPaginatedProps = {
|
|
570
|
+
readonly: this.readonly,
|
|
571
|
+
disabled: this.disabled,
|
|
572
|
+
identifier: this.identifier,
|
|
573
|
+
};
|
|
544
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) => {
|
|
545
575
|
if (el !== null)
|
|
546
576
|
this.mgPopover = el;
|
|
547
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 ? ([
|
|
548
|
-
h("mg-input-text", { key: "input-search", identifier: `${this.identifier}-input-search`, icon: "magnifying-glass", type: "search", placeholder: this.messages.input.checkbox.label, label: this.messages.input.checkbox.label, mgWidth: "full", value: this.searchValue, labelHide: true, characterLeftHide: true, name: "q", "onValue-change": this.handleSearchChange
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
]) : (h(MgInputCheckboxList, { checkboxes: checkboxes, displaySearchInput: this.displaySearchInput, messages: this.messages.input.checkbox, id: "checkboxes-list", disabled: this.disabled, name: this.name, invalid: this.invalid })), this.displaySearchInput && checkboxes.length === 0 && h("p", { class: "mg-c-input__input-no-result" }, this.messages.input.checkbox.noResult))), 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)))));
|
|
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 }),
|
|
579
|
+
this.searchValue.length > 0 ? (h("mg-input-checkbox-paginated", Object.assign({ class: "mg-c-input__tab" }, checkboxPaginatedProps, { messages: Object.assign(Object.assign({}, this.messages.input.checkbox.sections.search), { showMore: this.messages.input.showMore }), checkboxes: checkboxes, key: "search" }))) : (this.renderCheckboxTabs(checkboxes, checkboxPaginatedProps)),
|
|
580
|
+
]) : (h(MgInputCheckboxList, { checkboxes: checkboxes, id: this.checkboxesId, disabled: this.disabled, 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)))));
|
|
552
581
|
}
|
|
553
582
|
/**
|
|
554
583
|
* Render
|
|
@@ -566,7 +595,7 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
|
|
|
566
595
|
else {
|
|
567
596
|
inputContent = this.renderCheckboxMulti();
|
|
568
597
|
}
|
|
569
|
-
return (h("mg-input", { key: '
|
|
598
|
+
return (h("mg-input", { key: '84d13ac702497773013daa72357e4d1dcf4ebb30', 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));
|
|
570
599
|
}
|
|
571
600
|
get element() { return this; }
|
|
572
601
|
static get watchers() { return {
|
|
@@ -582,7 +611,7 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
|
|
|
582
611
|
"searchValue": ["validateSearchValue"]
|
|
583
612
|
}; }
|
|
584
613
|
static get style() { return mgInputCheckboxCss; }
|
|
585
|
-
}, [
|
|
614
|
+
}, [257, "mg-input-checkbox", {
|
|
586
615
|
"value": [1040],
|
|
587
616
|
"type": [1025],
|
|
588
617
|
"identifier": [1],
|
|
@@ -610,6 +639,7 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
|
|
|
610
639
|
"searchValue": [32],
|
|
611
640
|
"searchResults": [32],
|
|
612
641
|
"selectValuesButtonKey": [32],
|
|
642
|
+
"activeTab": [32],
|
|
613
643
|
"setFocus": [64],
|
|
614
644
|
"displayError": [64],
|
|
615
645
|
"setError": [64],
|
|
@@ -630,44 +660,44 @@ function defineCustomElement$1() {
|
|
|
630
660
|
if (typeof customElements === "undefined") {
|
|
631
661
|
return;
|
|
632
662
|
}
|
|
633
|
-
const components = ["mg-input-checkbox", "mg-button", "mg-card", "mg-character-left", "mg-icon", "mg-input", "mg-input-checkbox-paginated", "mg-input-
|
|
663
|
+
const components = ["mg-input-checkbox", "mg-badge", "mg-button", "mg-card", "mg-character-left", "mg-icon", "mg-input", "mg-input-checkbox-paginated", "mg-input-text", "mg-input-title", "mg-popover", "mg-popover-content", "mg-tabs", "mg-tooltip", "mg-tooltip-content"];
|
|
634
664
|
components.forEach(tagName => { switch (tagName) {
|
|
635
665
|
case "mg-input-checkbox":
|
|
636
666
|
if (!customElements.get(tagName)) {
|
|
637
667
|
customElements.define(tagName, MgInputCheckbox$1);
|
|
638
668
|
}
|
|
639
669
|
break;
|
|
640
|
-
case "mg-
|
|
670
|
+
case "mg-badge":
|
|
641
671
|
if (!customElements.get(tagName)) {
|
|
642
672
|
defineCustomElement$f();
|
|
643
673
|
}
|
|
644
674
|
break;
|
|
645
|
-
case "mg-
|
|
675
|
+
case "mg-button":
|
|
646
676
|
if (!customElements.get(tagName)) {
|
|
647
677
|
defineCustomElement$e();
|
|
648
678
|
}
|
|
649
679
|
break;
|
|
650
|
-
case "mg-
|
|
680
|
+
case "mg-card":
|
|
651
681
|
if (!customElements.get(tagName)) {
|
|
652
682
|
defineCustomElement$d();
|
|
653
683
|
}
|
|
654
684
|
break;
|
|
655
|
-
case "mg-
|
|
685
|
+
case "mg-character-left":
|
|
656
686
|
if (!customElements.get(tagName)) {
|
|
657
687
|
defineCustomElement$c();
|
|
658
688
|
}
|
|
659
689
|
break;
|
|
660
|
-
case "mg-
|
|
690
|
+
case "mg-icon":
|
|
661
691
|
if (!customElements.get(tagName)) {
|
|
662
692
|
defineCustomElement$b();
|
|
663
693
|
}
|
|
664
694
|
break;
|
|
665
|
-
case "mg-input
|
|
695
|
+
case "mg-input":
|
|
666
696
|
if (!customElements.get(tagName)) {
|
|
667
697
|
defineCustomElement$a();
|
|
668
698
|
}
|
|
669
699
|
break;
|
|
670
|
-
case "mg-input-
|
|
700
|
+
case "mg-input-checkbox-paginated":
|
|
671
701
|
if (!customElements.get(tagName)) {
|
|
672
702
|
defineCustomElement$9();
|
|
673
703
|
}
|
|
@@ -682,17 +712,17 @@ function defineCustomElement$1() {
|
|
|
682
712
|
defineCustomElement$7();
|
|
683
713
|
}
|
|
684
714
|
break;
|
|
685
|
-
case "mg-
|
|
715
|
+
case "mg-popover":
|
|
686
716
|
if (!customElements.get(tagName)) {
|
|
687
717
|
defineCustomElement$6();
|
|
688
718
|
}
|
|
689
719
|
break;
|
|
690
|
-
case "mg-popover":
|
|
720
|
+
case "mg-popover-content":
|
|
691
721
|
if (!customElements.get(tagName)) {
|
|
692
722
|
defineCustomElement$5();
|
|
693
723
|
}
|
|
694
724
|
break;
|
|
695
|
-
case "mg-
|
|
725
|
+
case "mg-tabs":
|
|
696
726
|
if (!customElements.get(tagName)) {
|
|
697
727
|
defineCustomElement$4();
|
|
698
728
|
}
|