@mgdis/mg-components 6.10.0 → 6.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-CfIlskRh.js → index-CL_COdxv.js} +4 -4
- package/dist/cjs/{index-CfIlskRh.js.map → index-CL_COdxv.js.map} +1 -1
- package/dist/cjs/{index.es-BCLy9yYb.js → index.es-DaPqByCe.js} +82 -82
- package/dist/cjs/index.es-DaPqByCe.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mg-action-more_37.cjs.entry.js +1881 -1874
- package/dist/cjs/mg-action-more_37.cjs.entry.js.map +1 -1
- package/dist/cjs/mg-alert.cjs.entry.js +6 -6
- package/dist/cjs/mg-components.cjs.js +1 -1
- package/dist/cjs/mg-input-combobox.cjs.entry.js +33 -33
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +12 -12
- package/dist/cjs/mg-loader.cjs.entry.js +4 -4
- package/dist/cjs/mg-progress.cjs.entry.js +10 -10
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +0 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js.map +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +43 -63
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +47 -97
- package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
- package/dist/components/index.es.js +71 -71
- package/dist/components/index.es.js.map +1 -1
- package/dist/components/index2.js +2 -2
- package/dist/components/mg-action-more.js +6 -6
- package/dist/components/mg-alert.js +5 -5
- package/dist/components/mg-badge2.js +6 -6
- package/dist/components/mg-button2.js +6 -6
- package/dist/components/mg-character-left2.js +4 -4
- package/dist/components/mg-details.js +2 -2
- package/dist/components/mg-form.js +7 -7
- package/dist/components/mg-icon2.js +6 -6
- package/dist/components/mg-illustrated-message.js +5 -5
- package/dist/components/mg-input-checkbox.js +9 -9
- package/dist/components/mg-input-combobox.js +32 -32
- package/dist/components/mg-input-date.js +17 -17
- package/dist/components/mg-input-numeric.js +13 -13
- package/dist/components/mg-input-password.js +3 -3
- package/dist/components/mg-input-radio.js +7 -7
- package/dist/components/mg-input-rich-text-editor.js +11 -11
- package/dist/components/mg-input-select2.js +7 -7
- package/dist/components/mg-input-text2.js +9 -9
- package/dist/components/mg-input-textarea.js +7 -7
- package/dist/components/mg-input-title2.js +4 -4
- package/dist/components/mg-input-toggle.js +6 -6
- package/dist/components/mg-input2.js +8 -8
- package/dist/components/mg-item-more2.js +7 -7
- package/dist/components/mg-loader2.js +3 -3
- package/dist/components/mg-menu-item2.js +11 -11
- package/dist/components/mg-message2.js +4 -4
- package/dist/components/mg-modal.js +8 -8
- package/dist/components/mg-pagination2.js +6 -6
- package/dist/components/mg-panel.js +9 -9
- package/dist/components/mg-popover-content2.js +4 -4
- package/dist/components/mg-popover-content2.js.map +1 -1
- package/dist/components/mg-popover2.js +48 -96
- package/dist/components/mg-popover2.js.map +1 -1
- package/dist/components/mg-progress.js +10 -10
- package/dist/components/mg-skip-links.js +2 -2
- package/dist/components/mg-table.js +6 -6
- package/dist/components/mg-tabs.js +12 -12
- package/dist/components/mg-tag.js +4 -4
- package/dist/components/mg-tooltip-content2.js +1 -1
- package/dist/components/mg-tooltip-content2.js.map +1 -1
- package/dist/components/mg-tooltip2.js +47 -66
- package/dist/components/mg-tooltip2.js.map +1 -1
- package/dist/components/popper.js +1793 -0
- package/dist/components/popper.js.map +1 -0
- package/dist/esm/{index-DmsGewMC.js → index-DALWFL9i.js} +4 -4
- package/dist/esm/{index-DmsGewMC.js.map → index-DALWFL9i.js.map} +1 -1
- package/dist/esm/{index.es-rLV3KFPd.js → index.es-hNwGkhG6.js} +73 -73
- package/dist/esm/index.es-hNwGkhG6.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mg-action-more_37.entry.js +1881 -1874
- package/dist/esm/mg-action-more_37.entry.js.map +1 -1
- package/dist/esm/mg-alert.entry.js +6 -6
- package/dist/esm/mg-components.js +1 -1
- package/dist/esm/mg-input-combobox.entry.js +33 -33
- package/dist/esm/mg-input-rich-text-editor.entry.js +12 -12
- package/dist/esm/mg-loader.entry.js +4 -4
- package/dist/esm/mg-progress.entry.js +10 -10
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-88f77de2.entry.js → p-352cfc01.entry.js} +2 -2
- package/dist/mg-components/{p-0f761c6c.entry.js → p-68f7de47.entry.js} +2 -2
- package/dist/mg-components/{p-DK9teKTo.js → p-Cg3R_y_o.js} +2 -2
- package/dist/mg-components/{p-DK9teKTo.js.map → p-Cg3R_y_o.js.map} +1 -1
- package/dist/mg-components/{p-cdbe689e.entry.js → p-a52a168c.entry.js} +2 -2
- package/dist/mg-components/{p-ad66e7b3.entry.js → p-bf5de898.entry.js} +2 -2
- package/dist/mg-components/{p-d3a868f0.entry.js → p-dcefa0b0.entry.js} +2 -2
- package/dist/mg-components/p-dcefa0b0.entry.js.map +1 -0
- package/dist/mg-components/{p-73099ed7.entry.js → p-e33557f9.entry.js} +2 -2
- package/dist/mg-components/{p-rLV3KFPd.js → p-hNwGkhG6.js} +2 -2
- package/dist/mg-components/p-hNwGkhG6.js.map +1 -0
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.conf.d.ts +0 -6
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +6 -8
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +8 -22
- package/dist/types/components.d.ts +6 -8
- package/ide/intellij/web-types.json +1 -1
- package/package.json +9 -9
- package/dist/cjs/index.es-BCLy9yYb.js.map +0 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.conf.js +0 -2
- package/dist/collection/components/molecules/mg-popover/mg-popover.conf.js.map +0 -1
- package/dist/collection/utils/floating-ui.utils.js +0 -74
- package/dist/collection/utils/floating-ui.utils.js.map +0 -1
- package/dist/components/floating-ui.utils.js +0 -1721
- package/dist/components/floating-ui.utils.js.map +0 -1
- package/dist/esm/index.es-rLV3KFPd.js.map +0 -1
- package/dist/mg-components/p-d3a868f0.entry.js.map +0 -1
- package/dist/mg-components/p-rLV3KFPd.js.map +0 -1
- package/dist/types/components/molecules/mg-popover/mg-popover.conf.d.ts +0 -6
- package/dist/types/utils/floating-ui.utils.d.ts +0 -28
- /package/dist/mg-components/{p-88f77de2.entry.js.map → p-352cfc01.entry.js.map} +0 -0
- /package/dist/mg-components/{p-0f761c6c.entry.js.map → p-68f7de47.entry.js.map} +0 -0
- /package/dist/mg-components/{p-cdbe689e.entry.js.map → p-a52a168c.entry.js.map} +0 -0
- /package/dist/mg-components/{p-ad66e7b3.entry.js.map → p-bf5de898.entry.js.map} +0 -0
- /package/dist/mg-components/{p-73099ed7.entry.js.map → p-e33557f9.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { H as Ht, a as qt, X as Xt, q as qe } from './index.es.js';
|
|
3
3
|
import { d as defineCustomElement$5, b as classFieldset, c as classReadonly, a as classDisabled } from './mg-input2.js';
|
|
4
4
|
import { i as initLocales } from './index2.js';
|
|
5
5
|
import { d as defineCustomElement$6 } from './mg-icon2.js';
|
|
@@ -67,7 +67,7 @@ const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRadio exten
|
|
|
67
67
|
/**
|
|
68
68
|
* Component classes
|
|
69
69
|
*/
|
|
70
|
-
this.classCollection = new
|
|
70
|
+
this.classCollection = new Ht(['mg-c-input--radio', classFieldset]);
|
|
71
71
|
/**
|
|
72
72
|
* Handle input event
|
|
73
73
|
* @param event - input event
|
|
@@ -118,7 +118,7 @@ const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRadio exten
|
|
|
118
118
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
119
119
|
watchValue(newValue) {
|
|
120
120
|
var _a;
|
|
121
|
-
if (
|
|
121
|
+
if (qt(this.items) && typeof newValue === 'string') {
|
|
122
122
|
this.readonlyValue = newValue;
|
|
123
123
|
}
|
|
124
124
|
else if (Array.isArray(this.items) && this.items.every(isOption)) {
|
|
@@ -132,10 +132,10 @@ const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRadio exten
|
|
|
132
132
|
validateItems(newValue) {
|
|
133
133
|
// Validate if items have required min length
|
|
134
134
|
if (typeof newValue === 'object' && newValue.length < 2) {
|
|
135
|
-
throw new Error(`<mg-input-radio> prop "items" require at least 2 items. Passed value: ${
|
|
135
|
+
throw new Error(`<mg-input-radio> prop "items" require at least 2 items. Passed value: ${Xt(newValue)}.`);
|
|
136
136
|
}
|
|
137
137
|
// String array
|
|
138
|
-
else if (
|
|
138
|
+
else if (qt(newValue)) {
|
|
139
139
|
this.options = newValue.map(item => ({ title: item, value: item, disabled: this.disabled }));
|
|
140
140
|
}
|
|
141
141
|
// Object array
|
|
@@ -143,7 +143,7 @@ const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRadio exten
|
|
|
143
143
|
this.options = newValue;
|
|
144
144
|
}
|
|
145
145
|
else {
|
|
146
|
-
throw new Error(`<mg-input-radio> prop "items" is required and all items must be the same type, string or RadioOption. Passed value: ${
|
|
146
|
+
throw new Error(`<mg-input-radio> prop "items" is required and all items must be the same type, string or RadioOption. Passed value: ${Xt(newValue)}.`);
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
watchInputVerticalList(newValue) {
|
|
@@ -205,7 +205,7 @@ const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRadio exten
|
|
|
205
205
|
if (typeof valid !== 'boolean') {
|
|
206
206
|
throw new Error('<mg-input-radio> method "setError()" param "valid" must be a boolean.');
|
|
207
207
|
}
|
|
208
|
-
else if (!
|
|
208
|
+
else if (!qe(errorMessage)) {
|
|
209
209
|
throw new Error('<mg-input-radio> method "setError()" param "errorMessage" must be a string.');
|
|
210
210
|
}
|
|
211
211
|
else {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement as HTMLElement$1, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { q as qe, H as Ht, X as Xt } from './index.es.js';
|
|
3
3
|
import { d as defineCustomElement$5, c as classReadonly, a as classDisabled } from './mg-input2.js';
|
|
4
4
|
import { i as initLocales } from './index2.js';
|
|
5
5
|
import { d as defineCustomElement$6 } from './mg-icon2.js';
|
|
@@ -31119,10 +31119,10 @@ const defineEditor = (wrapperElement, { value, modules, readOnly, placeholder, h
|
|
|
31119
31119
|
readOnly,
|
|
31120
31120
|
placeholder,
|
|
31121
31121
|
});
|
|
31122
|
-
if (
|
|
31122
|
+
if (qe(value) && /<[a-z][\s\S]*>/i.test(value)) {
|
|
31123
31123
|
editor.clipboard.dangerouslyPasteHTML(value);
|
|
31124
31124
|
}
|
|
31125
|
-
else if (
|
|
31125
|
+
else if (qe(value)) {
|
|
31126
31126
|
editor.setText(value);
|
|
31127
31127
|
}
|
|
31128
31128
|
const editorContent = wrapperElement.querySelector('.ql-editor');
|
|
@@ -31187,14 +31187,14 @@ const MgInputRichTextEditor$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRi
|
|
|
31187
31187
|
/**
|
|
31188
31188
|
* Component classes
|
|
31189
31189
|
*/
|
|
31190
|
-
this.classCollection = new
|
|
31190
|
+
this.classCollection = new Ht(['mg-c-input--rich-text-editor']);
|
|
31191
31191
|
/**
|
|
31192
31192
|
* Check if the field is empty taking into account the value format
|
|
31193
31193
|
* @returns truthy is value is invalid
|
|
31194
31194
|
*/
|
|
31195
31195
|
this.isEmpty = () => {
|
|
31196
31196
|
const textContent = this.getTextContent();
|
|
31197
|
-
return !(
|
|
31197
|
+
return !(qe(textContent) && textContent !== '\n');
|
|
31198
31198
|
};
|
|
31199
31199
|
/**
|
|
31200
31200
|
* Extract the text without HTML tags from value
|
|
@@ -31220,7 +31220,7 @@ const MgInputRichTextEditor$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRi
|
|
|
31220
31220
|
this.errorMessage = undefined;
|
|
31221
31221
|
if (this.valid)
|
|
31222
31222
|
return;
|
|
31223
|
-
else if (
|
|
31223
|
+
else if (qe(errorMessage)) {
|
|
31224
31224
|
this.errorMessage = errorMessage;
|
|
31225
31225
|
}
|
|
31226
31226
|
else if (this.required && this.isEmpty()) {
|
|
@@ -31235,7 +31235,7 @@ const MgInputRichTextEditor$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRi
|
|
|
31235
31235
|
*/
|
|
31236
31236
|
this.handleFocus = () => {
|
|
31237
31237
|
this.classCollection.add(this.classFocus);
|
|
31238
|
-
this.classCollection = new
|
|
31238
|
+
this.classCollection = new Ht(this.classCollection.classes);
|
|
31239
31239
|
};
|
|
31240
31240
|
/**
|
|
31241
31241
|
* Handles the blur event on the editor
|
|
@@ -31244,7 +31244,7 @@ const MgInputRichTextEditor$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRi
|
|
|
31244
31244
|
this.handleBlur = () => {
|
|
31245
31245
|
// Manage focus
|
|
31246
31246
|
this.classCollection.delete(this.classFocus);
|
|
31247
|
-
this.classCollection = new
|
|
31247
|
+
this.classCollection = new Ht(this.classCollection.classes);
|
|
31248
31248
|
if (!this.readonly) {
|
|
31249
31249
|
this.checkValidity();
|
|
31250
31250
|
this.setErrorMessage();
|
|
@@ -31296,8 +31296,8 @@ const MgInputRichTextEditor$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRi
|
|
|
31296
31296
|
}
|
|
31297
31297
|
}
|
|
31298
31298
|
validatePattern(newValue) {
|
|
31299
|
-
if (newValue !== undefined && !(
|
|
31300
|
-
throw new Error(`<mg-input-rich-text-editor> props "pattern" and "patternErrorMessage" must be non-empty string and paired. Passed value: "pattern='${
|
|
31299
|
+
if (newValue !== undefined && !(qe(this.pattern) && qe(this.patternErrorMessage))) {
|
|
31300
|
+
throw new Error(`<mg-input-rich-text-editor> props "pattern" and "patternErrorMessage" must be non-empty string and paired. Passed value: "pattern='${Xt(this.pattern)}'" and "patternErrorMessage='${Xt(this.patternErrorMessage)}'".`);
|
|
31301
31301
|
}
|
|
31302
31302
|
}
|
|
31303
31303
|
/**
|
|
@@ -31353,7 +31353,7 @@ const MgInputRichTextEditor$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRi
|
|
|
31353
31353
|
if (typeof valid !== 'boolean') {
|
|
31354
31354
|
throw new Error('<mg-input-rich-text-editor> method "setError()" param "valid" must be a boolean.');
|
|
31355
31355
|
}
|
|
31356
|
-
else if (!
|
|
31356
|
+
else if (!qe(errorMessage)) {
|
|
31357
31357
|
throw new Error('<mg-input-rich-text-editor> method "setError()" param "errorMessage" must be a string.');
|
|
31358
31358
|
}
|
|
31359
31359
|
else {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { H as Ht, a as qt, X as Xt, q as qe } from './index.es.js';
|
|
3
3
|
import { d as defineCustomElement$4, c as classReadonly, a as classDisabled, w as widths } from './mg-input2.js';
|
|
4
4
|
import { i as initLocales } from './index2.js';
|
|
5
5
|
import { d as defineCustomElement$5 } from './mg-icon2.js';
|
|
@@ -100,7 +100,7 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
|
|
|
100
100
|
/**
|
|
101
101
|
* Component classes
|
|
102
102
|
*/
|
|
103
|
-
this.classCollection = new
|
|
103
|
+
this.classCollection = new Ht(['mg-c-input--select']);
|
|
104
104
|
/**
|
|
105
105
|
* Handle input event
|
|
106
106
|
*/
|
|
@@ -130,7 +130,7 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
|
|
|
130
130
|
if (this.input.value === '') {
|
|
131
131
|
this.setValue(null);
|
|
132
132
|
}
|
|
133
|
-
else if (
|
|
133
|
+
else if (qt(this.items) && this.items.includes(this.input.value)) {
|
|
134
134
|
this.setValue(this.input.value);
|
|
135
135
|
}
|
|
136
136
|
else if (allItemsAreOptions(this.items) && typeof this.input.value === 'string' && this.items.some(this.isInputValue)) {
|
|
@@ -188,7 +188,7 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
|
|
|
188
188
|
}
|
|
189
189
|
validateValue(newValue) {
|
|
190
190
|
var _a, _b;
|
|
191
|
-
if (
|
|
191
|
+
if (qt(this.items) && typeof newValue === 'string') {
|
|
192
192
|
this.readonlyValue = ((_a = this.input) === null || _a === void 0 ? void 0 : _a.value) !== undefined ? this.input.value : newValue;
|
|
193
193
|
}
|
|
194
194
|
else if (allItemsAreOptions(this.items)) {
|
|
@@ -205,7 +205,7 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
|
|
|
205
205
|
this.options = [];
|
|
206
206
|
}
|
|
207
207
|
// String array
|
|
208
|
-
else if (
|
|
208
|
+
else if (qt(newValue)) {
|
|
209
209
|
if (typeof this.value === 'string')
|
|
210
210
|
this.valueExist = newValue.includes(this.value);
|
|
211
211
|
this.options = newValue.map(item => ({ title: item, value: item }));
|
|
@@ -223,7 +223,7 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
|
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
else {
|
|
226
|
-
throw new Error(`<mg-input-select> prop "items" is required, can be an empty Array or all items must be the same type: string or Option. Passed value: ${
|
|
226
|
+
throw new Error(`<mg-input-select> prop "items" is required, can be an empty Array or all items must be the same type: string or Option. Passed value: ${Xt(newValue)}.`);
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
watchReadonly(newValue) {
|
|
@@ -288,7 +288,7 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
|
|
|
288
288
|
if (typeof valid !== 'boolean') {
|
|
289
289
|
throw new Error('<mg-input-select> method "setError()" param "valid" must be a boolean.');
|
|
290
290
|
}
|
|
291
|
-
else if (!
|
|
291
|
+
else if (!qe(errorMessage)) {
|
|
292
292
|
throw new Error('<mg-input-select> method "setError()" param "errorMessage" must be a string.');
|
|
293
293
|
}
|
|
294
294
|
else {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { H as Ht, q as qe, a as qt, X as Xt } from './index.es.js';
|
|
3
3
|
import { d as defineCustomElement$4, c as classReadonly, a as classDisabled, w as widths } from './mg-input2.js';
|
|
4
4
|
import { i as initLocales } from './index2.js';
|
|
5
5
|
import { d as defineCustomElement$6 } from './mg-character-left2.js';
|
|
@@ -29,7 +29,7 @@ const isOption = (option) => typeof option === 'object' && typeof option.title =
|
|
|
29
29
|
* @param options - Datalist options to check.
|
|
30
30
|
* @returns True if datalist is well structured.
|
|
31
31
|
*/
|
|
32
|
-
const isDatalistOptions = (options) =>
|
|
32
|
+
const isDatalistOptions = (options) => qt(options) || (Array.isArray(options) && options.every(isOption));
|
|
33
33
|
const MgInputText = /*@__PURE__*/ proxyCustomElement(class MgInputText extends HTMLElement {
|
|
34
34
|
constructor() {
|
|
35
35
|
super();
|
|
@@ -96,13 +96,13 @@ const MgInputText = /*@__PURE__*/ proxyCustomElement(class MgInputText extends H
|
|
|
96
96
|
/**
|
|
97
97
|
* Component classes
|
|
98
98
|
*/
|
|
99
|
-
this.classCollection = new
|
|
99
|
+
this.classCollection = new Ht(['mg-c-input--text']);
|
|
100
100
|
/**
|
|
101
101
|
* Validate pattern configuration
|
|
102
102
|
*/
|
|
103
103
|
this.validatePattern = () => {
|
|
104
104
|
if ((this.pattern !== undefined || this.patternErrorMessage !== undefined) && // At least one is defined
|
|
105
|
-
(!
|
|
105
|
+
(!qe(this.pattern) || (!helpTextTypes.includes(this.type) && !qe(this.patternErrorMessage))) // Both must be defined
|
|
106
106
|
) {
|
|
107
107
|
throw new Error(`<mg-input-text> props "pattern" and "patternErrorMessage" must be non-empty string and paired. Passed value: "pattern='${this.pattern}'" and "patternErrorMessage='${this.patternErrorMessage}'".`);
|
|
108
108
|
}
|
|
@@ -122,7 +122,7 @@ const MgInputText = /*@__PURE__*/ proxyCustomElement(class MgInputText extends H
|
|
|
122
122
|
*/
|
|
123
123
|
this.handleFocus = () => {
|
|
124
124
|
this.classCollection.add(this.classFocus);
|
|
125
|
-
this.classCollection = new
|
|
125
|
+
this.classCollection = new Ht(this.classCollection.classes);
|
|
126
126
|
};
|
|
127
127
|
/**
|
|
128
128
|
* Handle blur event
|
|
@@ -130,7 +130,7 @@ const MgInputText = /*@__PURE__*/ proxyCustomElement(class MgInputText extends H
|
|
|
130
130
|
this.handleBlur = () => {
|
|
131
131
|
// Manage focus
|
|
132
132
|
this.classCollection.delete(this.classFocus);
|
|
133
|
-
this.classCollection = new
|
|
133
|
+
this.classCollection = new Ht(this.classCollection.classes);
|
|
134
134
|
// Display Error
|
|
135
135
|
this.handlerInProgress = 'blur';
|
|
136
136
|
this.displayError().finally(() => {
|
|
@@ -225,7 +225,7 @@ const MgInputText = /*@__PURE__*/ proxyCustomElement(class MgInputText extends H
|
|
|
225
225
|
}
|
|
226
226
|
validateDatalistoptions(newValue) {
|
|
227
227
|
if (Boolean(newValue) && !isDatalistOptions(newValue)) {
|
|
228
|
-
throw new Error(`<mg-input-text> prop "datalistoptions" values must be the same type, string or OptionType. Passed value: ${
|
|
228
|
+
throw new Error(`<mg-input-text> prop "datalistoptions" values must be the same type, string or OptionType. Passed value: ${Xt(newValue)}.`);
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
watchReadonly(newValue) {
|
|
@@ -263,7 +263,7 @@ const MgInputText = /*@__PURE__*/ proxyCustomElement(class MgInputText extends H
|
|
|
263
263
|
this.validatePattern();
|
|
264
264
|
}
|
|
265
265
|
watchHelpText(newValue) {
|
|
266
|
-
if (!
|
|
266
|
+
if (!qe(newValue) && helpTextTypes.includes(this.type)) {
|
|
267
267
|
this.helpText = this.messages.input.text.helpText[this.type];
|
|
268
268
|
}
|
|
269
269
|
}
|
|
@@ -304,7 +304,7 @@ const MgInputText = /*@__PURE__*/ proxyCustomElement(class MgInputText extends H
|
|
|
304
304
|
if (typeof valid !== 'boolean') {
|
|
305
305
|
throw new Error('<mg-input-text> method "setError()" param "valid" must be a boolean.');
|
|
306
306
|
}
|
|
307
|
-
else if (!
|
|
307
|
+
else if (!qe(errorMessage)) {
|
|
308
308
|
throw new Error('<mg-input-text> method "setError()" param "errorMessage" must be a string.');
|
|
309
309
|
}
|
|
310
310
|
else {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { H as Ht, q as qe, X as Xt } from './index.es.js';
|
|
3
3
|
import { d as defineCustomElement$5, c as classReadonly, a as classDisabled, w as widths } from './mg-input2.js';
|
|
4
4
|
import { i as initLocales } from './index2.js';
|
|
5
5
|
import { d as defineCustomElement$7 } from './mg-character-left2.js';
|
|
@@ -77,7 +77,7 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class MgInputTextarea
|
|
|
77
77
|
/**
|
|
78
78
|
* Component classes
|
|
79
79
|
*/
|
|
80
|
-
this.classCollection = new
|
|
80
|
+
this.classCollection = new Ht(['mg-c-input--textarea']);
|
|
81
81
|
/**
|
|
82
82
|
* Handle input event
|
|
83
83
|
*/
|
|
@@ -93,7 +93,7 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class MgInputTextarea
|
|
|
93
93
|
*/
|
|
94
94
|
this.handleFocus = () => {
|
|
95
95
|
this.classCollection.add(this.classFocus);
|
|
96
|
-
this.classCollection = new
|
|
96
|
+
this.classCollection = new Ht(this.classCollection.classes);
|
|
97
97
|
};
|
|
98
98
|
/**
|
|
99
99
|
* Handle blur event
|
|
@@ -101,7 +101,7 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class MgInputTextarea
|
|
|
101
101
|
this.handleBlur = () => {
|
|
102
102
|
// Manage focus
|
|
103
103
|
this.classCollection.delete(this.classFocus);
|
|
104
|
-
this.classCollection = new
|
|
104
|
+
this.classCollection = new Ht(this.classCollection.classes);
|
|
105
105
|
// Display Error
|
|
106
106
|
this.handlerInProgress = 'blur';
|
|
107
107
|
this.displayError().finally(() => {
|
|
@@ -179,8 +179,8 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class MgInputTextarea
|
|
|
179
179
|
this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);
|
|
180
180
|
}
|
|
181
181
|
validatePattern(newValue) {
|
|
182
|
-
if (newValue !== undefined && !(
|
|
183
|
-
throw new Error(`<mg-input-textarea> props "pattern" and "patternErrorMessage" must be non-empty string and paired. Passed value: "pattern='${
|
|
182
|
+
if (newValue !== undefined && !(qe(this.pattern) && qe(this.patternErrorMessage))) {
|
|
183
|
+
throw new Error(`<mg-input-textarea> props "pattern" and "patternErrorMessage" must be non-empty string and paired. Passed value: "pattern='${Xt(this.pattern)}'" and "patternErrorMessage='${Xt(this.patternErrorMessage)}'".`);
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
validatecharacterLeftHide(newValue) {
|
|
@@ -222,7 +222,7 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class MgInputTextarea
|
|
|
222
222
|
if (typeof valid !== 'boolean') {
|
|
223
223
|
throw new Error('<mg-input-textarea> method "setError()" param "valid" must be a boolean.');
|
|
224
224
|
}
|
|
225
|
-
else if (!
|
|
225
|
+
else if (!qe(errorMessage)) {
|
|
226
226
|
throw new Error('<mg-input-textarea> method "setError()" param "errorMessage" must be a string.');
|
|
227
227
|
}
|
|
228
228
|
else {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { q as qe, D as Dt, X as Xt } from './index.es.js';
|
|
3
3
|
|
|
4
4
|
const mgInputTitleCss = ".mg-u-form-legacy.sc-mg-input-title{--mg-c-form-inputs-title-width:calc(100% / 3 - 20px)}.mg-u-is-asterisk.sc-mg-input-title{color:var(--mg-b-color-danger)}legend.mg-c-input-title.sc-mg-input-title{padding-right:0;padding-left:0}.mg-c-input-title__required.sc-mg-input-title{display:var(--mg-c-input-title-display, unset)}";
|
|
5
5
|
|
|
@@ -17,11 +17,11 @@ const MgInputTitle = /*@__PURE__*/ proxyCustomElement(class MgInputTitle extends
|
|
|
17
17
|
this.tagName = 'label';
|
|
18
18
|
}
|
|
19
19
|
validateIdentifier(newValue) {
|
|
20
|
-
if (!
|
|
20
|
+
if (!qe(newValue)) {
|
|
21
21
|
throw new Error('<mg-input-title> prop "identifier" is required.');
|
|
22
22
|
}
|
|
23
|
-
else if (!
|
|
24
|
-
console.error(`<mg-input-title> prop "identifier" value is invalid. Passed value: ${
|
|
23
|
+
else if (!Dt(newValue)) {
|
|
24
|
+
console.error(`<mg-input-title> prop "identifier" value is invalid. Passed value: ${Xt(newValue)}.`);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
validateIsLegend(newValue) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { H as Ht, X as Xt, a as qt, q as qe } from './index.es.js';
|
|
3
3
|
import { d as defineCustomElement$5, c as classReadonly, a as classDisabled } from './mg-input2.js';
|
|
4
4
|
import { d as defineCustomElement$6 } from './mg-icon2.js';
|
|
5
5
|
import { d as defineCustomElement$4 } from './mg-input-title2.js';
|
|
@@ -64,7 +64,7 @@ const MgInputToggle$1 = /*@__PURE__*/ proxyCustomElement(class MgInputToggle ext
|
|
|
64
64
|
/**
|
|
65
65
|
* Component classes
|
|
66
66
|
*/
|
|
67
|
-
this.classCollection = new
|
|
67
|
+
this.classCollection = new Ht(['mg-c-input--toggle']);
|
|
68
68
|
/**
|
|
69
69
|
* Checked internal value
|
|
70
70
|
*/
|
|
@@ -125,10 +125,10 @@ const MgInputToggle$1 = /*@__PURE__*/ proxyCustomElement(class MgInputToggle ext
|
|
|
125
125
|
}
|
|
126
126
|
validateItems(newValue) {
|
|
127
127
|
if (typeof newValue === 'object' && this.items.length !== 2) {
|
|
128
|
-
throw new Error(`<mg-input-toggle> prop "items" require 2 items. Passed value: ${
|
|
128
|
+
throw new Error(`<mg-input-toggle> prop "items" require 2 items. Passed value: ${Xt(newValue)}.`);
|
|
129
129
|
}
|
|
130
130
|
// String array
|
|
131
|
-
else if (
|
|
131
|
+
else if (qt(newValue)) {
|
|
132
132
|
this.options = newValue.map(item => ({ title: item, value: item }));
|
|
133
133
|
}
|
|
134
134
|
// Object array
|
|
@@ -136,7 +136,7 @@ const MgInputToggle$1 = /*@__PURE__*/ proxyCustomElement(class MgInputToggle ext
|
|
|
136
136
|
this.options = newValue;
|
|
137
137
|
}
|
|
138
138
|
else {
|
|
139
|
-
throw new Error(`<mg-input-toggle> prop "items" is required and all items must be the same type: ToggleValue. Passed value: ${
|
|
139
|
+
throw new Error(`<mg-input-toggle> prop "items" is required and all items must be the same type: ToggleValue. Passed value: ${Xt(newValue)}.`);
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
watchIsOnOff(newValue) {
|
|
@@ -184,7 +184,7 @@ const MgInputToggle$1 = /*@__PURE__*/ proxyCustomElement(class MgInputToggle ext
|
|
|
184
184
|
if (typeof valid !== 'boolean') {
|
|
185
185
|
throw new Error('<mg-input-toggle> method "setError()" param "valid" must be a boolean.');
|
|
186
186
|
}
|
|
187
|
-
else if (!
|
|
187
|
+
else if (!qe(errorMessage)) {
|
|
188
188
|
throw new Error('<mg-input-toggle> method "setError()" param "errorMessage" must be a string.');
|
|
189
189
|
}
|
|
190
190
|
else {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { q as qe, X as Xt, D as Dt } from './index.es.js';
|
|
3
3
|
import { d as defineCustomElement$4 } from './mg-icon2.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './mg-input-title2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './mg-tooltip2.js';
|
|
@@ -71,11 +71,11 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
|
|
|
71
71
|
this.renderTooltip = () => (h("mg-tooltip", { identifier: `${this.identifier}-tooltip`, message: this.tooltip }, h("mg-icon", { icon: "info-circle" })));
|
|
72
72
|
}
|
|
73
73
|
watchIdentifier(newValue) {
|
|
74
|
-
if (!
|
|
75
|
-
throw new Error(`<mg-input> prop "identifier" is required and must be a string. Passed value: ${
|
|
74
|
+
if (!qe(newValue)) {
|
|
75
|
+
throw new Error(`<mg-input> prop "identifier" is required and must be a string. Passed value: ${Xt(newValue)}.`);
|
|
76
76
|
}
|
|
77
|
-
else if (!
|
|
78
|
-
console.error(`<mg-input> prop "identifier" value is invalid. Passed value: ${
|
|
77
|
+
else if (!Dt(newValue)) {
|
|
78
|
+
console.error(`<mg-input> prop "identifier" value is invalid. Passed value: ${Xt(newValue)}.`);
|
|
79
79
|
}
|
|
80
80
|
else {
|
|
81
81
|
this.helpTextId = `${this.identifier}-help-text`;
|
|
@@ -97,7 +97,7 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
|
|
|
97
97
|
}
|
|
98
98
|
watchTooltipPosition(newValue) {
|
|
99
99
|
if (!tooltipPositions.includes(newValue)) {
|
|
100
|
-
throw new Error(`<mg-input> prop "tooltipPosition" must be one of: ${tooltipPositions.join(', ')}. Passed value: ${
|
|
100
|
+
throw new Error(`<mg-input> prop "tooltipPosition" must be one of: ${tooltipPositions.join(', ')}. Passed value: ${Xt(newValue)}.`);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
watchErrorMessage(newValue) {
|
|
@@ -166,8 +166,8 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
|
|
|
166
166
|
*/
|
|
167
167
|
// eslint-disable-next-line @stencil-community/no-unused-watch
|
|
168
168
|
watchLabel() {
|
|
169
|
-
if (!
|
|
170
|
-
throw new Error(`<mg-input> prop "label" is required and must be a string. Passed value: ${
|
|
169
|
+
if (!qe(this.label)) {
|
|
170
|
+
throw new Error(`<mg-input> prop "label" is required and must be a string. Passed value: ${Xt(this.label)}.`);
|
|
171
171
|
}
|
|
172
172
|
else {
|
|
173
173
|
this.watchAriaDescribedbyIDs();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { X as Xt } from './index.es.js';
|
|
3
3
|
import { d as defineCustomElement$4, a as directions, s as sizes } from './mg-menu-item2.js';
|
|
4
4
|
import { i as initLocales } from './index2.js';
|
|
5
5
|
import { d as defineCustomElement$8 } from './mg-badge2.js';
|
|
@@ -163,12 +163,12 @@ const MgMenu = /*@__PURE__*/ proxyCustomElement(class MgMenu extends HTMLElement
|
|
|
163
163
|
}
|
|
164
164
|
validateLabel(newValue) {
|
|
165
165
|
if (newValue === undefined && !this.element.hasAttribute('aria-label')) {
|
|
166
|
-
throw new Error(`<${this.name}> prop "label" is required. Passed value: ${
|
|
166
|
+
throw new Error(`<${this.name}> prop "label" is required. Passed value: ${Xt(newValue)}.`);
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
validateDirection(newValue) {
|
|
170
170
|
if (![directions.VERTICAL, directions.HORIZONTAL].includes(newValue)) {
|
|
171
|
-
throw new Error(`<${this.name}> prop "direction" must be one of: ${directions.HORIZONTAL}, ${directions.VERTICAL}. Passed value: ${
|
|
171
|
+
throw new Error(`<${this.name}> prop "direction" must be one of: ${directions.HORIZONTAL}, ${directions.VERTICAL}. Passed value: ${Xt(newValue)}.`);
|
|
172
172
|
}
|
|
173
173
|
else {
|
|
174
174
|
this.updateMenuItems();
|
|
@@ -184,7 +184,7 @@ const MgMenu = /*@__PURE__*/ proxyCustomElement(class MgMenu extends HTMLElement
|
|
|
184
184
|
}
|
|
185
185
|
validateSize(newValue) {
|
|
186
186
|
if (!sizes.includes(newValue)) {
|
|
187
|
-
throw new Error(`<${this.name}> prop "size" must be one of: ${sizes.join(', ')}. Passed value: ${
|
|
187
|
+
throw new Error(`<${this.name}> prop "size" must be one of: ${sizes.join(', ')}. Passed value: ${Xt(newValue)}.`);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
/**
|
|
@@ -355,17 +355,17 @@ const MgItemMore = /*@__PURE__*/ proxyCustomElement(class MgItemMore extends HTM
|
|
|
355
355
|
}
|
|
356
356
|
validateIcon(newValue) {
|
|
357
357
|
if (typeof newValue !== 'object' || (typeof newValue === 'object' && typeof newValue.icon !== 'string'))
|
|
358
|
-
throw new Error(`<${this.name}> prop "icon" must match MgItemMore['icon'] type. Passed value: ${
|
|
358
|
+
throw new Error(`<${this.name}> prop "icon" must match MgItemMore['icon'] type. Passed value: ${Xt(newValue)}.`);
|
|
359
359
|
}
|
|
360
360
|
validateSlotLabel(newValue) {
|
|
361
361
|
if (typeof newValue !== 'object' || (typeof newValue === 'object' && typeof newValue.display !== 'boolean'))
|
|
362
|
-
throw new Error(`<${this.name}> prop "slotlabel" must match MgItemMore['slotlabel'] type. Passed value: ${
|
|
362
|
+
throw new Error(`<${this.name}> prop "slotlabel" must match MgItemMore['slotlabel'] type. Passed value: ${Xt(newValue)}.`);
|
|
363
363
|
else if (typeof newValue.label !== 'string')
|
|
364
364
|
this.slotlabel.label = this.messages.menuLabel;
|
|
365
365
|
}
|
|
366
366
|
validateSize(newValue) {
|
|
367
367
|
if (newValue && !sizes.includes(newValue))
|
|
368
|
-
throw new Error(`<${this.name}> prop "size" must match MgItemMore['size'] type. Passed value: ${
|
|
368
|
+
throw new Error(`<${this.name}> prop "size" must match MgItemMore['size'] type. Passed value: ${Xt(newValue)}.`);
|
|
369
369
|
}
|
|
370
370
|
/*************
|
|
371
371
|
* Lifecycle *
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { i as initLocales } from './index2.js';
|
|
3
|
-
import {
|
|
3
|
+
import { q as qe, X as Xt } from './index.es.js';
|
|
4
4
|
import { d as defineCustomElement$1 } from './mg-icon2.js';
|
|
5
5
|
|
|
6
6
|
const mgLoaderCss = ".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}}:host{display:block}.mg-c-loader{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--mg-b-size-4);text-align:center}";
|
|
@@ -16,8 +16,8 @@ const MgLoader = /*@__PURE__*/ proxyCustomElement(class MgLoader extends HTMLEle
|
|
|
16
16
|
this.messageHide = false;
|
|
17
17
|
}
|
|
18
18
|
watchMessage(newValue) {
|
|
19
|
-
if (newValue && !
|
|
20
|
-
throw new Error(`<mg-loader> prop "message" must be a valid string. Passed value: ${
|
|
19
|
+
if (newValue && !qe(newValue))
|
|
20
|
+
throw new Error(`<mg-loader> prop "message" must be a valid string. Passed value: ${Xt(newValue)}.`);
|
|
21
21
|
}
|
|
22
22
|
/*************
|
|
23
23
|
* Lifecycle *
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { Z as Zt, H as Ht, q as qe, D as Dt, X as Xt, Q as Qt } from './index.es.js';
|
|
3
3
|
import { i as initLocales } from './index2.js';
|
|
4
4
|
import { d as defineCustomElement$6 } from './mg-badge2.js';
|
|
5
5
|
import { d as defineCustomElement$5 } from './mg-button2.js';
|
|
@@ -54,7 +54,7 @@ const MgMenuItem = /*@__PURE__*/ proxyCustomElement(class MgMenuItem extends HTM
|
|
|
54
54
|
/**
|
|
55
55
|
* Identifier is used to control mg-popover
|
|
56
56
|
*/
|
|
57
|
-
this.identifier =
|
|
57
|
+
this.identifier = Zt('mg-menu-item');
|
|
58
58
|
/**
|
|
59
59
|
* Define menu-item status.
|
|
60
60
|
*/
|
|
@@ -73,7 +73,7 @@ const MgMenuItem = /*@__PURE__*/ proxyCustomElement(class MgMenuItem extends HTM
|
|
|
73
73
|
/**
|
|
74
74
|
* Component button classes
|
|
75
75
|
*/
|
|
76
|
-
this.navigationButtonClassList = new
|
|
76
|
+
this.navigationButtonClassList = new Ht([this.navigationButton]);
|
|
77
77
|
/**
|
|
78
78
|
* Does component have children.
|
|
79
79
|
*/
|
|
@@ -112,7 +112,7 @@ const MgMenuItem = /*@__PURE__*/ proxyCustomElement(class MgMenuItem extends HTM
|
|
|
112
112
|
* Is component an interactive item
|
|
113
113
|
* @returns truthy if element is clickable
|
|
114
114
|
*/
|
|
115
|
-
this.isInteractiveItem = () => this.hasChildren || !
|
|
115
|
+
this.isInteractiveItem = () => this.hasChildren || !qe(this.href);
|
|
116
116
|
/**
|
|
117
117
|
* Is component contextual direction match the given direction
|
|
118
118
|
* @param direction - in parent menu
|
|
@@ -165,7 +165,7 @@ const MgMenuItem = /*@__PURE__*/ proxyCustomElement(class MgMenuItem extends HTM
|
|
|
165
165
|
}
|
|
166
166
|
['label', 'metadata'].forEach(slot => {
|
|
167
167
|
Array.from(this.element.querySelectorAll(`[slot="${slot}"]`)).forEach(element => {
|
|
168
|
-
if (!
|
|
168
|
+
if (!qe(element.textContent))
|
|
169
169
|
throw new Error(`<${this.name}> slot "${slot}" must have text content.`);
|
|
170
170
|
if ((guard && !element.hasAttribute('title')) || !guard)
|
|
171
171
|
element.setAttribute('title', element.textContent);
|
|
@@ -232,8 +232,8 @@ const MgMenuItem = /*@__PURE__*/ proxyCustomElement(class MgMenuItem extends HTM
|
|
|
232
232
|
this.renderSlot = () => h("slot", null);
|
|
233
233
|
}
|
|
234
234
|
watchIdentifier(newValue) {
|
|
235
|
-
if (!
|
|
236
|
-
console.error(`<mg-menu-item> prop "identifier" value is invalid. Passed value: ${
|
|
235
|
+
if (!Dt(newValue)) {
|
|
236
|
+
console.error(`<mg-menu-item> prop "identifier" value is invalid. Passed value: ${Xt(newValue)}.`);
|
|
237
237
|
}
|
|
238
238
|
else {
|
|
239
239
|
this.popoverIdentifier = `${this.identifier}-popover`;
|
|
@@ -241,7 +241,7 @@ const MgMenuItem = /*@__PURE__*/ proxyCustomElement(class MgMenuItem extends HTM
|
|
|
241
241
|
}
|
|
242
242
|
watchTarget(newValue) {
|
|
243
243
|
if (newValue && !targets.includes(newValue)) {
|
|
244
|
-
throw new Error(`<mg-link> prop "target" must be one of: ${targets.join(', ')}. Passed value: ${
|
|
244
|
+
throw new Error(`<mg-link> prop "target" must be one of: ${targets.join(', ')}. Passed value: ${Xt(newValue)}.`);
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
watchStatus(newValue, oldValue) {
|
|
@@ -251,7 +251,7 @@ const MgMenuItem = /*@__PURE__*/ proxyCustomElement(class MgMenuItem extends HTM
|
|
|
251
251
|
}
|
|
252
252
|
watchExpanded(newValue) {
|
|
253
253
|
if (typeof newValue !== 'boolean') {
|
|
254
|
-
throw new Error(`<${this.name}> prop "expanded" must be a boolean. Passed value: ${
|
|
254
|
+
throw new Error(`<${this.name}> prop "expanded" must be a boolean. Passed value: ${Xt(newValue)}.`);
|
|
255
255
|
}
|
|
256
256
|
else {
|
|
257
257
|
this.updateExpanded(newValue);
|
|
@@ -300,7 +300,7 @@ const MgMenuItem = /*@__PURE__*/ proxyCustomElement(class MgMenuItem extends HTM
|
|
|
300
300
|
*/
|
|
301
301
|
// eslint-disable-next-line @stencil-community/no-unused-watch
|
|
302
302
|
watchDataHasFocus(newValue) {
|
|
303
|
-
if (!
|
|
303
|
+
if (!qe(newValue))
|
|
304
304
|
this.updateExpanded(Boolean(newValue));
|
|
305
305
|
}
|
|
306
306
|
/**
|
|
@@ -366,7 +366,7 @@ const MgMenuItem = /*@__PURE__*/ proxyCustomElement(class MgMenuItem extends HTM
|
|
|
366
366
|
* @returns promise process wich emit the 'item-updated' event
|
|
367
367
|
*/
|
|
368
368
|
componentShouldUpdate() {
|
|
369
|
-
return
|
|
369
|
+
return Qt(() => {
|
|
370
370
|
this.itemUpdated.emit();
|
|
371
371
|
});
|
|
372
372
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { H as Ht, X as Xt } from './index.es.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './mg-card2.js';
|
|
4
4
|
import { d as defineCustomElement$1 } from './mg-icon2.js';
|
|
5
5
|
|
|
@@ -34,7 +34,7 @@ const MgMessage = /*@__PURE__*/ proxyCustomElement(class MgMessage extends HTMLE
|
|
|
34
34
|
/**
|
|
35
35
|
* Component classes
|
|
36
36
|
*/
|
|
37
|
-
this.classCollection = new
|
|
37
|
+
this.classCollection = new Ht(['mg-c-message']);
|
|
38
38
|
/**
|
|
39
39
|
* Define if component is using actions slot
|
|
40
40
|
*/
|
|
@@ -58,7 +58,7 @@ const MgMessage = /*@__PURE__*/ proxyCustomElement(class MgMessage extends HTMLE
|
|
|
58
58
|
}
|
|
59
59
|
watchVariant(newValue, oldValue) {
|
|
60
60
|
if (!variants.includes(newValue)) {
|
|
61
|
-
throw new Error(`<mg-message> prop "variant" must be one of: ${variants.join(', ')}. Passed value: ${
|
|
61
|
+
throw new Error(`<mg-message> prop "variant" must be one of: ${variants.join(', ')}. Passed value: ${Xt(newValue)}.`);
|
|
62
62
|
}
|
|
63
63
|
else {
|
|
64
64
|
if (newValue !== undefined)
|
|
@@ -69,7 +69,7 @@ const MgMessage = /*@__PURE__*/ proxyCustomElement(class MgMessage extends HTMLE
|
|
|
69
69
|
}
|
|
70
70
|
watchVariantStyle(newValue, oldValue) {
|
|
71
71
|
if (!variantStyles.includes(newValue)) {
|
|
72
|
-
throw new Error(`<mg-message> prop "variantStyle" must be one of: ${variantStyles.join(', ')}. Passed value: ${
|
|
72
|
+
throw new Error(`<mg-message> prop "variantStyle" must be one of: ${variantStyles.join(', ')}. Passed value: ${Xt(newValue)}.`);
|
|
73
73
|
}
|
|
74
74
|
else {
|
|
75
75
|
if (newValue !== undefined)
|