@mgdis/mg-components 5.21.1 → 5.23.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-b4c6ee30.js → index-0cf3e6d5.js} +22 -13
- package/dist/cjs/index-0cf3e6d5.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mg-action-more_34.cjs.entry.js +380 -285
- package/dist/cjs/mg-action-more_34.cjs.entry.js.map +1 -1
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-components.cjs.js.map +1 -1
- package/dist/cjs/mg-item-more.cjs.entry.js +7 -6
- package/dist/cjs/mg-item-more.cjs.entry.js.map +1 -1
- package/dist/cjs/mg-menu.conf-0229bb75.js +333 -0
- package/dist/cjs/mg-menu.conf-0229bb75.js.map +1 -0
- package/dist/collection/assets/icons/index.js +91 -90
- package/dist/collection/assets/icons/index.js.map +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +1 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.js.map +1 -1
- package/dist/collection/components/atoms/mg-button/mg-button.js +1 -1
- package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -1
- package/dist/collection/components/atoms/mg-card/mg-card.js +1 -1
- package/dist/collection/components/atoms/mg-card/mg-card.js.map +1 -1
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js.map +1 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +1 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.js.map +1 -1
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +1 -1
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js.map +1 -1
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +1 -1
- package/dist/collection/components/atoms/mg-tag/mg-tag.js.map +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +4 -2
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
- package/dist/collection/components/molecules/inputs/MgInput.js +1 -1
- package/dist/collection/components/molecules/inputs/MgInput.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +9 -5
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +9 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +54 -39
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +35 -6
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +1 -2
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +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-radio/mg-input-radio.js.map +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-select/mg-input-select.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -1
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js.map +1 -1
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +1 -1
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js.map +1 -1
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +1 -1
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -1
- package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
- package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -1
- package/dist/collection/components/molecules/mg-form/mg-form.js +1 -1
- package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +1 -1
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js.map +1 -1
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +1 -1
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.js.map +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js.map +1 -1
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +6 -5
- package/dist/collection/components/molecules/mg-modal/mg-modal.js.map +1 -1
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +1 -1
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js.map +1 -1
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +1 -1
- package/dist/collection/components/molecules/mg-panel/mg-panel.js.map +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-content/mg-popover-content.js.map +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js.map +1 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js.map +1 -1
- package/dist/collection/locales/en/messages.json +13 -3
- package/dist/collection/locales/fr/messages.json +13 -3
- package/dist/collection/locales/index.js +2 -2
- package/dist/collection/locales/index.js.map +1 -1
- package/dist/collection/utils/behaviors.utils.js.map +1 -1
- package/dist/collection/utils/behaviors.utils.spec.js +1 -1
- package/dist/collection/utils/behaviors.utils.spec.js.map +1 -1
- package/dist/collection/utils/unit.test.utils.js +0 -104
- package/dist/collection/utils/unit.test.utils.js.map +1 -1
- package/dist/components/MgInput.js +3 -3
- package/dist/components/MgInput.js.map +1 -1
- package/dist/components/index.es.js +75 -0
- package/dist/components/index.es.js.map +1 -0
- package/dist/components/index2.js +30 -65
- package/dist/components/index2.js.map +1 -1
- package/dist/components/mg-action-more.js +5 -4
- package/dist/components/mg-action-more.js.map +1 -1
- package/dist/components/mg-badge2.js +5 -4
- package/dist/components/mg-badge2.js.map +1 -1
- package/dist/components/mg-button2.js +6 -5
- package/dist/components/mg-button2.js.map +1 -1
- package/dist/components/mg-card2.js +4 -3
- package/dist/components/mg-card2.js.map +1 -1
- package/dist/components/mg-character-left2.js +2 -1
- package/dist/components/mg-character-left2.js.map +1 -1
- package/dist/components/mg-details.js +4 -3
- package/dist/components/mg-details.js.map +1 -1
- package/dist/components/mg-divider.js +2 -1
- package/dist/components/mg-divider.js.map +1 -1
- package/dist/components/mg-form.js +5 -4
- package/dist/components/mg-form.js.map +1 -1
- package/dist/components/mg-icon2.js +96 -93
- package/dist/components/mg-icon2.js.map +1 -1
- package/dist/components/mg-illustrated-message.js +4 -3
- package/dist/components/mg-illustrated-message.js.map +1 -1
- package/dist/components/mg-input-checkbox-paginated.js +1 -1
- package/dist/components/mg-input-checkbox-paginated2.js +19 -6
- package/dist/components/mg-input-checkbox-paginated2.js.map +1 -1
- package/dist/components/mg-input-checkbox.js +59 -43
- package/dist/components/mg-input-checkbox.js.map +1 -1
- package/dist/components/mg-input-date.js +41 -10
- package/dist/components/mg-input-date.js.map +1 -1
- package/dist/components/mg-input-numeric.js +7 -6
- package/dist/components/mg-input-numeric.js.map +1 -1
- package/dist/components/mg-input-password.js +5 -4
- package/dist/components/mg-input-password.js.map +1 -1
- package/dist/components/mg-input-radio.js +6 -5
- package/dist/components/mg-input-radio.js.map +1 -1
- package/dist/components/mg-input-select2.js +8 -7
- package/dist/components/mg-input-select2.js.map +1 -1
- package/dist/components/mg-input-text2.js +8 -7
- package/dist/components/mg-input-text2.js.map +1 -1
- package/dist/components/mg-input-textarea.js +8 -7
- package/dist/components/mg-input-textarea.js.map +1 -1
- package/dist/components/mg-input-title2.js +4 -3
- package/dist/components/mg-input-title2.js.map +1 -1
- package/dist/components/mg-input-toggle.js +6 -5
- package/dist/components/mg-input-toggle.js.map +1 -1
- package/dist/components/mg-item-more.js +4 -3
- package/dist/components/mg-item-more.js.map +1 -1
- package/dist/components/mg-menu-item2.js +6 -5
- package/dist/components/mg-menu-item2.js.map +1 -1
- package/dist/components/mg-menu2.js +2 -1
- package/dist/components/mg-menu2.js.map +1 -1
- package/dist/components/mg-message.js +5 -4
- package/dist/components/mg-message.js.map +1 -1
- package/dist/components/mg-modal.js +12 -10
- package/dist/components/mg-modal.js.map +1 -1
- package/dist/components/mg-pagination2.js +4 -3
- package/dist/components/mg-pagination2.js.map +1 -1
- package/dist/components/mg-panel.js +6 -5
- package/dist/components/mg-panel.js.map +1 -1
- package/dist/components/mg-popover-content2.js +5 -4
- package/dist/components/mg-popover-content2.js.map +1 -1
- package/dist/components/mg-popover2.js +5 -4
- package/dist/components/mg-popover2.js.map +1 -1
- package/dist/components/mg-skip-links.js +4 -3
- package/dist/components/mg-skip-links.js.map +1 -1
- package/dist/components/mg-tabs.js +8 -7
- package/dist/components/mg-tabs.js.map +1 -1
- package/dist/components/mg-tag.js +5 -4
- package/dist/components/mg-tag.js.map +1 -1
- package/dist/components/mg-tooltip-content2.js +2 -1
- package/dist/components/mg-tooltip-content2.js.map +1 -1
- package/dist/components/mg-tooltip2.js +11 -8
- package/dist/components/mg-tooltip2.js.map +1 -1
- package/dist/esm/{index-61c7cfb5.js → index-91977c3d.js} +22 -13
- package/dist/esm/index-91977c3d.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mg-action-more_34.entry.js +348 -253
- package/dist/esm/mg-action-more_34.entry.js.map +1 -1
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-components.js.map +1 -1
- package/dist/esm/mg-item-more.entry.js +5 -4
- package/dist/esm/mg-item-more.entry.js.map +1 -1
- package/dist/esm/mg-menu.conf-4b2d2eab.js +315 -0
- package/dist/esm/mg-menu.conf-4b2d2eab.js.map +1 -0
- package/dist/mg-components/locales/en/messages.json +13 -3
- package/dist/mg-components/locales/fr/messages.json +13 -3
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/mg-components.esm.js.map +1 -1
- package/dist/mg-components/p-1564df7a.js +2 -0
- package/dist/mg-components/p-1564df7a.js.map +1 -0
- package/dist/mg-components/p-49e1ffcb.js +3 -0
- package/dist/mg-components/p-49e1ffcb.js.map +1 -0
- package/dist/mg-components/p-6c68c7eb.entry.js +2 -0
- package/dist/mg-components/p-6c68c7eb.entry.js.map +1 -0
- package/dist/mg-components/p-d6d71404.entry.js +2 -0
- package/dist/mg-components/p-d6d71404.entry.js.map +1 -0
- package/dist/types/assets/icons/index.d.ts +1 -0
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +1 -1
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +1 -1
- package/dist/types/components/atoms/mg-card/mg-card.d.ts +1 -1
- package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +1 -1
- package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +1 -1
- package/dist/types/components/molecules/inputs/MgInput.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +8 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +15 -13
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +18 -1
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +1 -1
- package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +1 -1
- package/dist/types/components/molecules/mg-form/mg-form.d.ts +1 -1
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +1 -1
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +1 -1
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +1 -1
- package/dist/types/components/molecules/mg-popover/mg-popover-content/mg-popover-content.d.ts +1 -1
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +1 -1
- package/dist/types/components.d.ts +2 -2
- package/dist/types/locales/index.d.ts +1 -176
- package/dist/types/utils/unit.test.utils.d.ts +0 -82
- package/package.json +36 -35
- package/dist/cjs/components.utils-cd908d4e.js +0 -443
- package/dist/cjs/components.utils-cd908d4e.js.map +0 -1
- package/dist/cjs/index-b4c6ee30.js.map +0 -1
- package/dist/collection/utils/components.utils.js +0 -147
- package/dist/collection/utils/components.utils.js.map +0 -1
- package/dist/collection/utils/components.utils.spec.js +0 -156
- package/dist/collection/utils/components.utils.spec.js.map +0 -1
- package/dist/collection/utils/e2e.test.utils.js +0 -46
- package/dist/collection/utils/e2e.test.utils.js.map +0 -1
- package/dist/collection/utils/locale.utils.js +0 -57
- package/dist/collection/utils/locale.utils.js.map +0 -1
- package/dist/collection/utils/locale.utils.spec.js +0 -52
- package/dist/collection/utils/locale.utils.spec.js.map +0 -1
- package/dist/components/components.utils.js +0 -150
- package/dist/components/components.utils.js.map +0 -1
- package/dist/esm/components.utils-0d67c31c.js +0 -427
- package/dist/esm/components.utils-0d67c31c.js.map +0 -1
- package/dist/esm/index-61c7cfb5.js.map +0 -1
- package/dist/mg-components/p-1c17516a.entry.js +0 -2
- package/dist/mg-components/p-1c17516a.entry.js.map +0 -1
- package/dist/mg-components/p-5b4eb029.entry.js +0 -2
- package/dist/mg-components/p-5b4eb029.entry.js.map +0 -1
- package/dist/mg-components/p-6e7aebeb.js +0 -3
- package/dist/mg-components/p-6e7aebeb.js.map +0 -1
- package/dist/mg-components/p-af42d17b.js +0 -2
- package/dist/mg-components/p-af42d17b.js.map +0 -1
- package/dist/types/utils/components.utils.d.ts +0 -87
- package/dist/types/utils/e2e.test.utils.d.ts +0 -22
- package/dist/types/utils/locale.utils.d.ts +0 -38
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
2
|
import { VariantType, ButtonType } from './mg-button.conf';
|
|
3
|
-
import { ClassList } from '
|
|
3
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
4
4
|
export declare class MgButton {
|
|
5
5
|
/************
|
|
6
6
|
* Internal *
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FunctionalComponent } from '../../../stencil-public-runtime';
|
|
2
2
|
import { Width } from './MgInput.conf';
|
|
3
|
-
import { ClassList } from '
|
|
3
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
4
4
|
import { MgInputTitle } from '../../atoms/mg-input-title/mg-input-title';
|
|
5
5
|
/**
|
|
6
6
|
* MgInput Interface
|
package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts
CHANGED
|
@@ -64,3 +64,11 @@ export interface MgInputCheckboxListProps extends IMgInputCheckboxBase {
|
|
|
64
64
|
checkboxes: CheckboxItem[];
|
|
65
65
|
id: string;
|
|
66
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Define select values button key
|
|
69
|
+
*/
|
|
70
|
+
export declare enum SelectValuesButtonKey {
|
|
71
|
+
EDIT = "editButton",
|
|
72
|
+
SHOW = "showButton",
|
|
73
|
+
SELECT = "selectButton"
|
|
74
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
2
|
-
import { ClassList } from '
|
|
3
|
-
import { CheckboxItem, CheckboxType, CheckboxValue, MgInputCheckboxListProps } from './mg-input-checkbox.conf';
|
|
2
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
3
|
+
import { CheckboxItem, CheckboxType, CheckboxValue, MgInputCheckboxListProps, SelectValuesButtonKey } from './mg-input-checkbox.conf';
|
|
4
4
|
export declare class MgInputCheckbox implements Omit<MgInputCheckboxListProps, 'id' | 'checkboxes' | 'messages'> {
|
|
5
5
|
/************
|
|
6
6
|
* Internal *
|
|
@@ -15,6 +15,7 @@ export declare class MgInputCheckbox implements Omit<MgInputCheckboxListProps, '
|
|
|
15
15
|
private readonly baseClassName;
|
|
16
16
|
private readonly multiStart;
|
|
17
17
|
private readonly searchStart;
|
|
18
|
+
private hasOpenedPopover;
|
|
18
19
|
/**************
|
|
19
20
|
* Decorators *
|
|
20
21
|
**************/
|
|
@@ -124,6 +125,10 @@ export declare class MgInputCheckbox implements Omit<MgInputCheckboxListProps, '
|
|
|
124
125
|
* Search current page
|
|
125
126
|
*/
|
|
126
127
|
searchResults: CheckboxItem[];
|
|
128
|
+
/**
|
|
129
|
+
* Select values button text local key
|
|
130
|
+
*/
|
|
131
|
+
selectValuesButtonKey: SelectValuesButtonKey;
|
|
127
132
|
/**
|
|
128
133
|
* Emitted event when value change
|
|
129
134
|
*/
|
|
@@ -157,7 +162,7 @@ export declare class MgInputCheckbox implements Omit<MgInputCheckboxListProps, '
|
|
|
157
162
|
private handleInput;
|
|
158
163
|
/**
|
|
159
164
|
* Keyboard handler
|
|
160
|
-
* @param event - to
|
|
165
|
+
* @param event - to track "tab" key
|
|
161
166
|
*/
|
|
162
167
|
private handleKeydown;
|
|
163
168
|
/**
|
|
@@ -209,11 +214,9 @@ export declare class MgInputCheckbox implements Omit<MgInputCheckboxListProps, '
|
|
|
209
214
|
*/
|
|
210
215
|
private checkValidity;
|
|
211
216
|
/**
|
|
212
|
-
*
|
|
213
|
-
* @param selectedValuesNb - nb of selected values
|
|
214
|
-
* @returns translated message
|
|
217
|
+
* Set button text locale key
|
|
215
218
|
*/
|
|
216
|
-
private
|
|
219
|
+
private setButtonText;
|
|
217
220
|
/**
|
|
218
221
|
* Set input error message
|
|
219
222
|
* @param displayError - dispay error condition
|
|
@@ -230,6 +233,11 @@ export declare class MgInputCheckbox implements Omit<MgInputCheckboxListProps, '
|
|
|
230
233
|
* @returns items to display
|
|
231
234
|
*/
|
|
232
235
|
private getDisplayItems;
|
|
236
|
+
/**
|
|
237
|
+
* get list of selected checkboxItems
|
|
238
|
+
* @returns selected checkboxItems
|
|
239
|
+
*/
|
|
240
|
+
private getSelectedItems;
|
|
233
241
|
/*************
|
|
234
242
|
* Lifecycle *
|
|
235
243
|
*************/
|
|
@@ -242,12 +250,6 @@ export declare class MgInputCheckbox implements Omit<MgInputCheckboxListProps, '
|
|
|
242
250
|
* add listeners and DOM attributed
|
|
243
251
|
*/
|
|
244
252
|
componentDidLoad(): void;
|
|
245
|
-
/**
|
|
246
|
-
* Render checkbox multi display values
|
|
247
|
-
* @param selectedValuesNb - selected values length
|
|
248
|
-
* @returns display selected values
|
|
249
|
-
*/
|
|
250
|
-
private renderCheckboxMultiDisplaySelectedValues;
|
|
251
253
|
/**
|
|
252
254
|
* Render checkboxes by section
|
|
253
255
|
* @param checkboxes - checkboxes to render
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
2
|
-
import { ClassList } from '
|
|
2
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
3
3
|
export declare class MgInputDate {
|
|
4
4
|
/************
|
|
5
5
|
* Internal *
|
|
@@ -7,6 +7,7 @@ export declare class MgInputDate {
|
|
|
7
7
|
private input;
|
|
8
8
|
private messages;
|
|
9
9
|
private locale;
|
|
10
|
+
private systemLocale;
|
|
10
11
|
private hasDisplayedError;
|
|
11
12
|
private handlerInProgress;
|
|
12
13
|
/**************
|
|
@@ -61,6 +62,11 @@ export declare class MgInputDate {
|
|
|
61
62
|
tooltip: string;
|
|
62
63
|
/**
|
|
63
64
|
* Add a help text under the input, usually expected data format and example
|
|
65
|
+
* Available string variables:
|
|
66
|
+
* - `{pattern}`: render innerHTML pattern based on system
|
|
67
|
+
* - `{date}`: render innerText date with a pattern base format.
|
|
68
|
+
* - `{defaultHelpText}`: render default `helpText` usefull to concat helpText local with your custom text.
|
|
69
|
+
* ex: `Input use {pattern} pattern` as `helpText` prop value will be render as `Input use mm/dd/yyyy pattern`
|
|
64
70
|
*/
|
|
65
71
|
helpText: string;
|
|
66
72
|
/**
|
|
@@ -111,6 +117,12 @@ export declare class MgInputDate {
|
|
|
111
117
|
* @param errorMessage - the error message to display
|
|
112
118
|
*/
|
|
113
119
|
setError(valid: MgInputDate['valid'], errorMessage: string): Promise<void>;
|
|
120
|
+
/**
|
|
121
|
+
* Format help text to display
|
|
122
|
+
* @param helpText - help text format
|
|
123
|
+
* @returns formated pattern help text. Ex: Format attendu : jj/mm/aaaa (ex : 20/12/2020)
|
|
124
|
+
*/
|
|
125
|
+
private formatHelpText;
|
|
114
126
|
/**
|
|
115
127
|
* Method to set validity values
|
|
116
128
|
* @param newValue - valid new value
|
|
@@ -146,6 +158,11 @@ export declare class MgInputDate {
|
|
|
146
158
|
* @returns timeout
|
|
147
159
|
*/
|
|
148
160
|
componentWillLoad(): ReturnType<typeof setTimeout>;
|
|
161
|
+
/**
|
|
162
|
+
* Render pattern
|
|
163
|
+
* @returns translated html pattern
|
|
164
|
+
*/
|
|
165
|
+
private renderPattern;
|
|
149
166
|
/**
|
|
150
167
|
* Render
|
|
151
168
|
* @returns HTML Element
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
2
2
|
import { Width } from '../MgInput.conf';
|
|
3
|
-
import { ClassList } from '
|
|
3
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
4
4
|
export declare class MgInputNumeric {
|
|
5
5
|
/************
|
|
6
6
|
* Internal *
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
2
2
|
import { Width } from '../MgInput.conf';
|
|
3
|
-
import { ClassList } from '
|
|
3
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
4
4
|
export declare class MgInputPassword {
|
|
5
5
|
/************
|
|
6
6
|
* Internal *
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
2
|
-
import { ClassList } from '
|
|
2
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
3
3
|
import { RadioOption } from './mg-input-radio.conf';
|
|
4
4
|
export declare class MgInputRadio {
|
|
5
5
|
/************
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
2
2
|
import { Width } from '../MgInput.conf';
|
|
3
|
-
import { ClassList } from '
|
|
3
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
4
4
|
import { SelectOption, OptGroup } from './mg-input-select.conf';
|
|
5
5
|
export declare class MgInputSelect {
|
|
6
6
|
/************
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
2
2
|
import { Width } from '../MgInput.conf';
|
|
3
|
-
import { ClassList } from '
|
|
3
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
4
4
|
import { TextType } from './mg-input-text.conf';
|
|
5
5
|
export declare class MgInputText {
|
|
6
6
|
/************
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
2
2
|
import { Width } from '../MgInput.conf';
|
|
3
|
-
import { ClassList } from '
|
|
3
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
4
4
|
export declare class MgInputTextarea {
|
|
5
5
|
/************
|
|
6
6
|
* Internal *
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
2
|
-
import { ClassList } from '
|
|
2
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
3
3
|
import { ToggleValue } from './mg-input-toggle.conf';
|
|
4
4
|
export declare class MgInputToggle {
|
|
5
5
|
/************
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
2
|
-
import { ClassList } from '
|
|
2
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
3
3
|
import { Status } from './mg-menu-item.conf';
|
|
4
4
|
import type { MenuSizeType } from '../mg-menu/mg-menu.conf';
|
|
5
5
|
import type { DirectionType } from './mg-menu-item.conf';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
-
import { ClassList } from '
|
|
2
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
3
3
|
import { AriaRoleType, RequiredMessageStatusType } from './mg-form.conf';
|
|
4
4
|
export declare class MgForm {
|
|
5
5
|
/************
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
-
import { ClassList } from '
|
|
2
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
3
3
|
import { VariantType } from './mg-message.conf';
|
|
4
4
|
export declare class MgMessage {
|
|
5
5
|
/************
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
-
import { ClassList } from '
|
|
2
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
3
3
|
import { DialogRoleType } from './mg-modal.conf';
|
|
4
4
|
export declare class MgModal {
|
|
5
5
|
/************
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
-
import { ClassList } from '
|
|
2
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
3
3
|
import { type ExpandToggleDisplayType, type TitlePositionType } from './mg-panel.conf';
|
|
4
4
|
export declare class MgPanel {
|
|
5
5
|
/************
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
-
import { ClassList } from '
|
|
2
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
3
3
|
import { TabItem, SizeType } from './mg-tabs.conf';
|
|
4
4
|
export declare class MgTabs {
|
|
5
5
|
/************
|
|
@@ -365,7 +365,7 @@ export namespace Components {
|
|
|
365
365
|
*/
|
|
366
366
|
"displayError": () => Promise<void>;
|
|
367
367
|
/**
|
|
368
|
-
* Add a help text under the input, usually expected data format and example
|
|
368
|
+
* Add a help text under the input, usually expected data format and example Available string variables: - `{pattern}`: render innerHTML pattern based on system - `{date}`: render innerText date with a pattern base format. - `{defaultHelpText}`: render default `helpText` usefull to concat helpText local with your custom text. ex: `Input use {pattern} pattern` as `helpText` prop value will be render as `Input use mm/dd/yyyy pattern`
|
|
369
369
|
*/
|
|
370
370
|
"helpText": string;
|
|
371
371
|
/**
|
|
@@ -2216,7 +2216,7 @@ declare namespace LocalJSX {
|
|
|
2216
2216
|
*/
|
|
2217
2217
|
"disabled"?: boolean;
|
|
2218
2218
|
/**
|
|
2219
|
-
* Add a help text under the input, usually expected data format and example
|
|
2219
|
+
* Add a help text under the input, usually expected data format and example Available string variables: - `{pattern}`: render innerHTML pattern based on system - `{date}`: render innerText date with a pattern base format. - `{defaultHelpText}`: render default `helpText` usefull to concat helpText local with your custom text. ex: `Input use {pattern} pattern` as `helpText` prop value will be render as `Input use mm/dd/yyyy pattern`
|
|
2220
2220
|
*/
|
|
2221
2221
|
"helpText"?: string;
|
|
2222
2222
|
/**
|
|
@@ -1,177 +1,3 @@
|
|
|
1
|
-
declare const messages: {
|
|
2
|
-
en: {
|
|
3
|
-
errors: {
|
|
4
|
-
required: string;
|
|
5
|
-
date: {
|
|
6
|
-
badInput: string;
|
|
7
|
-
min: string;
|
|
8
|
-
max: string;
|
|
9
|
-
minMax: string;
|
|
10
|
-
};
|
|
11
|
-
numeric: {
|
|
12
|
-
min: string;
|
|
13
|
-
max: string;
|
|
14
|
-
minMax: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
nbCharLeft: string;
|
|
18
|
-
input: {
|
|
19
|
-
select: {
|
|
20
|
-
placeholder: string;
|
|
21
|
-
};
|
|
22
|
-
checkbox: {
|
|
23
|
-
selectedValues: string;
|
|
24
|
-
selectedValue: string;
|
|
25
|
-
editButton: string;
|
|
26
|
-
selectButton: string;
|
|
27
|
-
showButton: string;
|
|
28
|
-
label: string;
|
|
29
|
-
result: string;
|
|
30
|
-
results: string;
|
|
31
|
-
searchResults: string;
|
|
32
|
-
noResult: string;
|
|
33
|
-
sections: {
|
|
34
|
-
selected: {
|
|
35
|
-
title: string;
|
|
36
|
-
titlePlurial: string;
|
|
37
|
-
action: string;
|
|
38
|
-
};
|
|
39
|
-
notSelected: {
|
|
40
|
-
title: string;
|
|
41
|
-
titlePlurial: string;
|
|
42
|
-
action: string;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
form: {
|
|
48
|
-
required: string;
|
|
49
|
-
requiredSingle: string;
|
|
50
|
-
allRequired: string;
|
|
51
|
-
allRequiredSingle: string;
|
|
52
|
-
};
|
|
53
|
-
message: {
|
|
54
|
-
closeButton: string;
|
|
55
|
-
};
|
|
56
|
-
modal: {
|
|
57
|
-
closeButton: string;
|
|
58
|
-
};
|
|
59
|
-
pagination: {
|
|
60
|
-
label: string;
|
|
61
|
-
page: string;
|
|
62
|
-
pages: string;
|
|
63
|
-
nextPage: string;
|
|
64
|
-
previousPage: string;
|
|
65
|
-
selectPage: string;
|
|
66
|
-
};
|
|
67
|
-
panel: {
|
|
68
|
-
editLabel: string;
|
|
69
|
-
};
|
|
70
|
-
skipLinks: {
|
|
71
|
-
navLabel: string;
|
|
72
|
-
};
|
|
73
|
-
general: {
|
|
74
|
-
confirm: string;
|
|
75
|
-
cancel: string;
|
|
76
|
-
close: string;
|
|
77
|
-
next: string;
|
|
78
|
-
previous: string;
|
|
79
|
-
};
|
|
80
|
-
plusMenu: {
|
|
81
|
-
moreLabel: string;
|
|
82
|
-
badgeLabel: string;
|
|
83
|
-
};
|
|
84
|
-
actionMore: {
|
|
85
|
-
label: string;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
fr: {
|
|
89
|
-
errors: {
|
|
90
|
-
required: string;
|
|
91
|
-
date: {
|
|
92
|
-
badInput: string;
|
|
93
|
-
min: string;
|
|
94
|
-
max: string;
|
|
95
|
-
minMax: string;
|
|
96
|
-
};
|
|
97
|
-
numeric: {
|
|
98
|
-
min: string;
|
|
99
|
-
max: string;
|
|
100
|
-
minMax: string;
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
nbCharLeft: string;
|
|
104
|
-
input: {
|
|
105
|
-
select: {
|
|
106
|
-
placeholder: string;
|
|
107
|
-
};
|
|
108
|
-
checkbox: {
|
|
109
|
-
selectedValues: string;
|
|
110
|
-
selectedValue: string;
|
|
111
|
-
editButton: string;
|
|
112
|
-
selectButton: string;
|
|
113
|
-
showButton: string;
|
|
114
|
-
label: string;
|
|
115
|
-
result: string;
|
|
116
|
-
results: string;
|
|
117
|
-
searchResults: string;
|
|
118
|
-
noResult: string;
|
|
119
|
-
sections: {
|
|
120
|
-
selected: {
|
|
121
|
-
title: string;
|
|
122
|
-
titlePlurial: string;
|
|
123
|
-
action: string;
|
|
124
|
-
};
|
|
125
|
-
notSelected: {
|
|
126
|
-
title: string;
|
|
127
|
-
titlePlurial: string;
|
|
128
|
-
action: string;
|
|
129
|
-
};
|
|
130
|
-
};
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
form: {
|
|
134
|
-
required: string;
|
|
135
|
-
requiredSingle: string;
|
|
136
|
-
allRequired: string;
|
|
137
|
-
allRequiredSingle: string;
|
|
138
|
-
};
|
|
139
|
-
message: {
|
|
140
|
-
closeButton: string;
|
|
141
|
-
};
|
|
142
|
-
modal: {
|
|
143
|
-
closeButton: string;
|
|
144
|
-
};
|
|
145
|
-
pagination: {
|
|
146
|
-
label: string;
|
|
147
|
-
page: string;
|
|
148
|
-
pages: string;
|
|
149
|
-
nextPage: string;
|
|
150
|
-
previousPage: string;
|
|
151
|
-
selectPage: string;
|
|
152
|
-
};
|
|
153
|
-
panel: {
|
|
154
|
-
editLabel: string;
|
|
155
|
-
};
|
|
156
|
-
skipLinks: {
|
|
157
|
-
navLabel: string;
|
|
158
|
-
};
|
|
159
|
-
general: {
|
|
160
|
-
confirm: string;
|
|
161
|
-
cancel: string;
|
|
162
|
-
close: string;
|
|
163
|
-
next: string;
|
|
164
|
-
previous: string;
|
|
165
|
-
};
|
|
166
|
-
plusMenu: {
|
|
167
|
-
moreLabel: string;
|
|
168
|
-
badgeLabel: string;
|
|
169
|
-
};
|
|
170
|
-
actionMore: {
|
|
171
|
-
label: string;
|
|
172
|
-
};
|
|
173
|
-
};
|
|
174
|
-
};
|
|
175
1
|
/**
|
|
176
2
|
* Get Intl object
|
|
177
3
|
* @param element - element we need to get the language
|
|
@@ -179,6 +5,5 @@ declare const messages: {
|
|
|
179
5
|
*/
|
|
180
6
|
export declare const initLocales: (element: HTMLElement) => {
|
|
181
7
|
locale: string;
|
|
182
|
-
messages:
|
|
8
|
+
messages: import("@mgdis/stencil-helpers/dist/locale/index.conf").ObjectType;
|
|
183
9
|
};
|
|
184
|
-
export {};
|
|
@@ -1,76 +1,3 @@
|
|
|
1
|
-
import { MockCustomEvent } from '@stencil/core/mock-doc';
|
|
2
|
-
/**
|
|
3
|
-
* Clone Deep function
|
|
4
|
-
* @param obj - object to clone
|
|
5
|
-
* @returns cloned json
|
|
6
|
-
*/
|
|
7
|
-
export declare const cloneDeep: (obj: unknown) => unknown;
|
|
8
|
-
/**
|
|
9
|
-
* Utility function that mocks the `MutationObserver` API. Recommended to execute inside `beforeEach`.
|
|
10
|
-
* @param mutationObserverMock - Parameter that is sent to the `Object.defineProperty`
|
|
11
|
-
* overwrite method. `jest.fn()` mock functions can be passed here if the goal is to not only
|
|
12
|
-
* mock the mutation observer, but its methods.
|
|
13
|
-
* You can manually fire an intersection entry:
|
|
14
|
-
* @param mutationObserverMock - configuration object
|
|
15
|
-
* @returns Mocked MutationObserver
|
|
16
|
-
* @example
|
|
17
|
-
* ```
|
|
18
|
-
* let fireMo;
|
|
19
|
-
* setupMutationObserverMock({
|
|
20
|
-
* observe: function () {
|
|
21
|
-
* fireMo = this.cb;
|
|
22
|
-
* },
|
|
23
|
-
* });
|
|
24
|
-
* ...
|
|
25
|
-
* fireMo([{ type: 'childList', addedNodes: [AMockElemenet, AnotherMockElemenet], target: yourMockElemenet }]);;
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
type SetupMutationObserverMockParams = {
|
|
29
|
-
disconnect: MutationObserver['disconnect'];
|
|
30
|
-
observe: MutationObserver['observe'];
|
|
31
|
-
takeRecords: MutationObserver['takeRecords'];
|
|
32
|
-
};
|
|
33
|
-
export declare const setupMutationObserverMock: ({ disconnect, observe, takeRecords }: SetupMutationObserverMockParams) => typeof MutationObserver;
|
|
34
|
-
type setupResizeObserverMockParams = {
|
|
35
|
-
disconnect: ResizeObserver['disconnect'];
|
|
36
|
-
observe: ResizeObserver['observe'];
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Utility function that mocks the `ResizeObserver` API. Recommended to execute inside `beforeEach`.
|
|
40
|
-
* @param resizeObserverMock - Parameter that is sent to the `Object.defineProperty`
|
|
41
|
-
* overwrite method. `jest.fn()` mock functions can be passed here if the goal is to not only
|
|
42
|
-
* mock the resize observer, but its methods.
|
|
43
|
-
* You can manually fire an intersection entry:
|
|
44
|
-
* @param resizeObserverMock - configuration object
|
|
45
|
-
* @returns Mocked ResizeObserver
|
|
46
|
-
* @example
|
|
47
|
-
* ```
|
|
48
|
-
* let fireRo;
|
|
49
|
-
* setupResizeObserverMock({
|
|
50
|
-
* observe: function () {
|
|
51
|
-
* fireRo = this.cb;
|
|
52
|
-
* },
|
|
53
|
-
* });
|
|
54
|
-
* ...
|
|
55
|
-
* fireRo([{
|
|
56
|
-
* borderBoxSize: ResizeObserverSize[],
|
|
57
|
-
* contentBoxSize: ResizeObserverSize[],
|
|
58
|
-
* contentRect: DOMRectReadOnly,
|
|
59
|
-
* devicePixelContentBoxSize: ResizeObserverSize[],
|
|
60
|
-
* target: yourMockElemenet
|
|
61
|
-
* }]);;
|
|
62
|
-
* ```
|
|
63
|
-
*/
|
|
64
|
-
export declare const setupResizeObserverMock: ({ disconnect, observe }: setupResizeObserverMockParams) => typeof ResizeObserver;
|
|
65
|
-
/**
|
|
66
|
-
* Utility function that mocks the `SubmitEvent` API. Recommended to execute inside `beforeEach`.
|
|
67
|
-
* @example
|
|
68
|
-
* ```
|
|
69
|
-
* setupSubmitEventMock();
|
|
70
|
-
* ```
|
|
71
|
-
* @returns custom event mock
|
|
72
|
-
*/
|
|
73
|
-
export declare const setupSubmitEventMock: () => typeof MockCustomEvent;
|
|
74
1
|
/**
|
|
75
2
|
* force popover id when component use randomed identifier
|
|
76
3
|
* @param component - element wich include mg-popover
|
|
@@ -78,17 +5,8 @@ export declare const setupSubmitEventMock: () => typeof MockCustomEvent;
|
|
|
78
5
|
* @param interactiveElement - element where attribute 'aria-controls' is set
|
|
79
6
|
*/
|
|
80
7
|
export declare const forcePopoverId: (component: Element, id: string, interactiveElement?: string) => void;
|
|
81
|
-
/**
|
|
82
|
-
* fix popper console.error in test
|
|
83
|
-
* it is generated in `@popperjs/core/dist/cjs/popper.js l.1859`
|
|
84
|
-
* this is due to internal function isHTMLElement(), so we can not mock it directly.
|
|
85
|
-
* this function check if test DOM element mockHTMLElement instance is 'instanceof HTMLElement'
|
|
86
|
-
* so we only override the console.error side effect for this error
|
|
87
|
-
*/
|
|
88
|
-
export declare const mockConsoleError: () => void;
|
|
89
8
|
/**
|
|
90
9
|
* Add missing window.frames property to test context
|
|
91
10
|
* usefull for component with iframe listeners, ex: mg-popover
|
|
92
11
|
*/
|
|
93
12
|
export declare const mockWindowFrames: () => void;
|
|
94
|
-
export {};
|