@mgdis/mg-components 3.1.0 → 4.0.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-85a4a0b6.js → index-88560a66.js} +123 -48
- package/dist/cjs/index-a39c5567.js +233 -0
- package/dist/cjs/loader.cjs.js +3 -17
- package/dist/cjs/mg-badge_21.cjs.entry.js +3538 -0
- package/dist/cjs/mg-components.cjs.js +3 -7
- package/dist/cjs/mg-modal.cjs.entry.js +117 -0
- package/dist/cjs/mg-popover.cjs.entry.js +170 -0
- package/dist/cjs/popper-71bf3058.js +1790 -0
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/atoms/mg-badge/{mg-badge.stories.js → doc/mg-badge.stories.js} +4 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js +1 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.css +0 -2
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +26 -10
- package/dist/collection/components/atoms/mg-button/{mg-button.stories.js → doc/mg-button.stories.js} +7 -2
- package/dist/collection/components/atoms/mg-button/mg-button.conf.js +1 -1
- package/dist/collection/components/atoms/mg-button/mg-button.css +46 -49
- package/dist/collection/components/atoms/mg-button/mg-button.js +78 -4
- package/dist/collection/components/atoms/mg-character-left/{mg-character-left.stories.js → doc/mg-character-left.stories.js} +8 -0
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +20 -46
- package/dist/collection/components/atoms/mg-icon/{mg-icon.stories.js → doc/mg-icon.stories.js} +1 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +104 -9
- package/dist/collection/components/atoms/mg-icon/mg-icon.css +9 -7
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +33 -7
- package/dist/collection/components/atoms/mg-input-title/{mg-input-title.stories.js → doc/mg-input-title.stories.js} +0 -0
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.css +4 -4
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +14 -3
- package/dist/collection/components/atoms/mg-tag/{mg-tag.stories.js → doc/mg-tag.stories.js} +4 -1
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +28 -6
- package/dist/collection/components/atoms/mg-tooltip/{mg-tooltip.stories.js → doc/mg-tooltip.stories.js} +14 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +20 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +16 -2
- package/dist/collection/components/molecules/inputs/MgInput.conf.js +1 -7
- package/dist/collection/components/molecules/inputs/MgInput.js +25 -29
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/{mg-input-checkbox.stories.js → doc/mg-input-checkbox.stories.js} +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +25 -11
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +102 -52
- package/dist/collection/components/molecules/inputs/mg-input-date/{mg-input-date.stories.js → doc/mg-input-date.stories.js} +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +37 -9
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +136 -66
- package/dist/collection/components/molecules/inputs/mg-input-numeric/{mg-input-numeric.stories.js → doc/mg-input-numeric.stories.js} +15 -3
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +38 -10
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +180 -80
- package/dist/collection/components/molecules/inputs/mg-input-password/{mg-input-password.stories.js → doc/mg-input-password.stories.js} +16 -2
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +37 -9
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +108 -47
- package/dist/collection/components/molecules/inputs/mg-input-radio/{mg-input-radio.stories.js → doc/mg-input-radio.stories.js} +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +25 -11
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +113 -42
- package/dist/collection/components/molecules/inputs/mg-input-select/{mg-input-select.stories.js → doc/mg-input-select.stories.js} +22 -2
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +39 -10
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +145 -71
- package/dist/collection/components/molecules/inputs/mg-input-text/{mg-input-text.stories.js → doc/mg-input-text.stories.js} +17 -8
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +69 -19
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +184 -83
- package/dist/collection/components/molecules/inputs/mg-input-textarea/{mg-input-textarea.stories.js → doc/mg-input-textarea.stories.js} +16 -5
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +69 -13
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +163 -70
- package/dist/collection/components/molecules/inputs/mg-input-toggle/{mg-input-toggle.stories.js → doc/mg-input-toggle.stories.js} +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +22 -10
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +68 -33
- package/dist/collection/components/molecules/mg-form/doc/mg-form.stories.js +58 -0
- package/dist/collection/components/molecules/mg-form/mg-form.css +19 -0
- package/dist/collection/components/molecules/mg-form/mg-form.js +271 -0
- package/dist/collection/components/molecules/mg-message/{mg-message.stories.js → doc/mg-message.stories.js} +6 -2
- package/dist/collection/components/molecules/mg-message/mg-message.css +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +26 -11
- package/dist/collection/components/molecules/mg-modal/doc/mg-modal.stories.js +51 -0
- package/dist/collection/components/molecules/mg-modal/mg-modal.css +52 -0
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +240 -0
- package/dist/collection/components/molecules/mg-pagination/{mg-pagination.stories.js → doc/mg-pagination.stories.js} +1 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +47 -28
- package/dist/collection/components/molecules/mg-panel/doc/mg-panel.stories.js +39 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.css +53 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +356 -0
- package/dist/collection/components/molecules/mg-popover/{mg-popover.stories.js → doc/mg-popover.stories.js} +10 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover.conf.js +20 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover.css +2 -2
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +37 -12
- package/dist/collection/components/molecules/mg-tabs/{mg-tabs.stories.js → doc/mg-tabs.stories.js} +20 -4
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +11 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +17 -3
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +139 -26
- package/dist/collection/locales/index.js +33 -4
- package/dist/collection/stories/helpers.stories.js +33 -0
- package/dist/collection/utils/components.utils.js +16 -9
- package/dist/collection/utils/locale.utils.js +13 -7
- package/dist/collection/utils/test.utils.js +27 -15
- package/dist/collection/variables.css +39 -5
- package/dist/collection/variables.scss +39 -5
- package/dist/components/MgInput.js +26 -37
- package/dist/components/components.utils.js +16 -9
- package/dist/components/index.d.ts +24 -6
- package/dist/components/index.js +23 -0
- package/dist/components/index2.js +116 -17
- package/dist/components/locale.utils.js +13 -8
- package/dist/components/mg-badge2.js +25 -9
- package/dist/components/mg-button2.js +29 -5
- package/dist/components/mg-character-left2.js +14 -26
- package/dist/components/mg-form.d.ts +11 -0
- package/dist/components/mg-form.js +148 -0
- package/dist/components/mg-icon2.js +138 -17
- package/dist/components/mg-input-checkbox.js +66 -53
- package/dist/components/mg-input-date.js +100 -69
- package/dist/components/mg-input-numeric.js +125 -81
- package/dist/components/mg-input-password.js +69 -48
- package/dist/components/mg-input-radio.js +74 -46
- package/dist/components/mg-input-select2.js +103 -71
- package/dist/components/mg-input-text.js +1 -237
- package/dist/components/mg-input-text2.js +300 -0
- package/dist/components/mg-input-textarea.js +100 -46
- package/dist/components/mg-input-title2.js +13 -4
- package/dist/components/mg-input-toggle.js +39 -31
- package/dist/components/mg-message.js +25 -10
- package/dist/components/mg-modal.d.ts +11 -0
- package/dist/components/mg-modal.js +153 -0
- package/dist/components/mg-pagination.js +45 -31
- package/dist/components/mg-panel.d.ts +11 -0
- package/dist/components/mg-panel.js +244 -0
- package/dist/components/mg-popover.js +31 -11
- package/dist/components/mg-tabs.js +113 -23
- package/dist/components/mg-tag.js +27 -5
- package/dist/components/mg-tooltip2.js +10 -1
- package/dist/components/popper.js +6 -2
- package/dist/esm/{index-e3e84606.js → index-bca81100.js} +124 -46
- package/dist/esm/index-e51ae032.js +228 -0
- package/dist/esm/loader.js +3 -17
- package/dist/esm/mg-badge_21.entry.js +3514 -0
- package/dist/esm/mg-components.js +3 -7
- package/dist/esm/mg-modal.entry.js +113 -0
- package/dist/esm/mg-popover.entry.js +166 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/popper-93ecb064.js +1788 -0
- package/dist/index.js +1 -1
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/p-003a1344.entry.js +1 -0
- package/dist/mg-components/p-462d648a.entry.js +1 -0
- package/dist/mg-components/p-4c66f794.js +1 -0
- package/dist/mg-components/p-5126ab10.entry.js +1 -0
- package/dist/mg-components/p-780bd52d.js +1 -0
- package/dist/mg-components/p-b14a3443.js +2 -0
- package/dist/mg-components/variables.css +39 -5
- package/dist/mg-components/variables.scss +39 -5
- package/dist/types/components/atoms/mg-badge/{mg-badge.stories.d.ts → doc/mg-badge.stories.d.ts} +5 -0
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +16 -5
- package/dist/types/components/atoms/mg-button/{mg-button.stories.d.ts → doc/mg-button.stories.d.ts} +5 -0
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +23 -3
- package/dist/types/components/atoms/mg-character-left/{mg-character-left.stories.d.ts → doc/mg-character-left.stories.d.ts} +9 -0
- package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +16 -13
- package/dist/types/components/atoms/mg-icon/{mg-icon.stories.d.ts → doc/mg-icon.stories.d.ts} +0 -0
- package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +1 -1
- package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +14 -4
- package/dist/types/components/atoms/mg-input-title/{mg-input-title.stories.d.ts → doc/mg-input-title.stories.d.ts} +0 -0
- package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +11 -1
- package/dist/types/components/atoms/mg-tag/{mg-tag.stories.d.ts → doc/mg-tag.stories.d.ts} +5 -0
- package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +18 -4
- package/dist/types/components/atoms/mg-tooltip/doc/mg-tooltip.stories.d.ts +29 -0
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.conf.d.ts +8 -0
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +13 -3
- package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +6 -4
- package/dist/types/components/molecules/inputs/MgInput.d.ts +7 -8
- package/dist/types/components/molecules/inputs/mg-input-checkbox/{mg-input-checkbox.stories.d.ts → doc/mg-input-checkbox.stories.d.ts} +5 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +36 -13
- package/dist/types/components/molecules/inputs/mg-input-date/{mg-input-date.stories.d.ts → doc/mg-input-date.stories.d.ts} +5 -0
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +46 -15
- package/dist/types/components/molecules/inputs/mg-input-numeric/{mg-input-numeric.stories.d.ts → doc/mg-input-numeric.stories.d.ts} +11 -0
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +61 -16
- package/dist/types/components/molecules/inputs/mg-input-password/doc/mg-input-password.stories.d.ts +22 -0
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +35 -11
- package/dist/types/components/molecules/inputs/mg-input-radio/{mg-input-radio.stories.d.ts → doc/mg-input-radio.stories.d.ts} +5 -0
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +42 -9
- package/dist/types/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.d.ts +34 -0
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.conf.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +37 -9
- package/dist/types/components/molecules/inputs/mg-input-text/{mg-input-text.stories.d.ts → doc/mg-input-text.stories.d.ts} +13 -0
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +52 -16
- package/dist/types/components/molecules/inputs/mg-input-textarea/doc/mg-input-textarea.stories.d.ts +19 -0
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +45 -17
- package/dist/types/components/molecules/inputs/mg-input-toggle/{mg-input-toggle.stories.d.ts → doc/mg-input-toggle.stories.d.ts} +5 -0
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +29 -12
- package/dist/types/components/molecules/{mg-popover/mg-popover.stories.d.ts → mg-form/doc/mg-form.stories.d.ts} +3 -4
- package/dist/types/components/molecules/mg-form/mg-form.d.ts +83 -0
- package/dist/types/components/molecules/mg-message/{mg-message.stories.d.ts → doc/mg-message.stories.d.ts} +10 -0
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +13 -4
- package/dist/types/components/molecules/mg-modal/doc/mg-modal.stories.d.ts +13 -0
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +85 -0
- package/dist/types/components/molecules/mg-pagination/{mg-pagination.stories.d.ts → doc/mg-pagination.stories.d.ts} +5 -0
- package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +31 -7
- package/dist/types/components/molecules/mg-panel/doc/mg-panel.stories.d.ts +11 -0
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +139 -0
- package/dist/types/components/molecules/mg-popover/doc/mg-popover.stories.d.ts +25 -0
- package/dist/types/components/molecules/mg-popover/mg-popover.conf.d.ts +8 -0
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +27 -4
- package/dist/types/components/molecules/mg-tabs/doc/mg-tabs.stories.d.ts +20 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +11 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +70 -6
- package/dist/types/components.d.ts +528 -211
- package/dist/types/locales/index.d.ts +108 -38
- package/dist/types/stories/{buttons.stories.d.ts → helpers.stories.d.ts} +1 -1
- package/dist/types/utils/components.utils.d.ts +16 -9
- package/dist/types/utils/locale.utils.d.ts +13 -6
- package/dist/types/utils/test.utils.d.ts +13 -1
- package/loader/index.js +1 -1
- package/package.json +45 -14
- package/readme.md +9 -35
- package/dist/cjs/css-shim-a22512c4.js +0 -6
- package/dist/cjs/mg-badge_20.cjs.entry.js +0 -4661
- package/dist/cjs/shadow-css-8940f82d.js +0 -390
- package/dist/collection/stories/buttons.stories.js +0 -43
- package/dist/collection/stories/messages.stories.js +0 -44
- package/dist/collection/stories/tags.stories.js +0 -13
- package/dist/esm/css-shim-7c240feb.js +0 -4
- package/dist/esm/mg-badge_20.entry.js +0 -4638
- package/dist/esm/shadow-css-5d2d01ce.js +0 -388
- package/dist/esm-es5/css-shim-7c240feb.js +0 -1
- package/dist/esm-es5/index-e3e84606.js +0 -1
- package/dist/esm-es5/index.js +0 -0
- package/dist/esm-es5/loader.js +0 -1
- package/dist/esm-es5/mg-badge_20.entry.js +0 -2
- package/dist/esm-es5/mg-components.js +0 -1
- package/dist/esm-es5/shadow-css-5d2d01ce.js +0 -12
- package/dist/mg-components/mg-components.js +0 -132
- package/dist/mg-components/p-1cd24462.system.js +0 -1
- package/dist/mg-components/p-2e2f6b27.system.entry.js +0 -2
- package/dist/mg-components/p-366a224e.js +0 -1
- package/dist/mg-components/p-422c429b.system.js +0 -1
- package/dist/mg-components/p-50ea2036.system.js +0 -1
- package/dist/mg-components/p-62fa3797.js +0 -1
- package/dist/mg-components/p-71d57b8b.system.js +0 -13
- package/dist/mg-components/p-9a215712.system.js +0 -1
- package/dist/mg-components/p-cbf0464b.entry.js +0 -1
- package/dist/mg-components/p-f6455ab3.js +0 -12
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.stories.d.ts +0 -11
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.stories.d.ts +0 -9
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.stories.d.ts +0 -14
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.stories.d.ts +0 -6
- package/dist/types/components/molecules/mg-tabs/mg-tabs.stories.d.ts +0 -7
- package/dist/types/stories/messages.stories.d.ts +0 -13
- package/dist/types/stories/tags.stories.d.ts +0 -5
|
@@ -8,6 +8,8 @@ export declare class MgInputToggle {
|
|
|
8
8
|
private classReadonly;
|
|
9
9
|
private classDisabled;
|
|
10
10
|
private classIsActive;
|
|
11
|
+
private classOnOff;
|
|
12
|
+
private classIcon;
|
|
11
13
|
/**************
|
|
12
14
|
* Decorators *
|
|
13
15
|
**************/
|
|
@@ -18,26 +20,27 @@ export declare class MgInputToggle {
|
|
|
18
20
|
/**
|
|
19
21
|
* Component value
|
|
20
22
|
*/
|
|
21
|
-
value
|
|
23
|
+
value: any;
|
|
24
|
+
handleValue(newValue: any): void;
|
|
22
25
|
/**
|
|
23
26
|
* Items are the possible options to select
|
|
24
|
-
*
|
|
27
|
+
*
|
|
28
|
+
* @returns {void}
|
|
25
29
|
*/
|
|
26
30
|
items: string[] | ToggleValue[];
|
|
27
|
-
validateItems(newValue:
|
|
31
|
+
validateItems(newValue: string[] | ToggleValue[]): void;
|
|
28
32
|
/**
|
|
29
33
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
30
34
|
* If not set, it will be created.
|
|
31
35
|
*/
|
|
32
|
-
identifier
|
|
36
|
+
identifier: string;
|
|
33
37
|
/**
|
|
34
38
|
* Input name
|
|
35
39
|
* If not set the value equals the identifier
|
|
36
40
|
*/
|
|
37
|
-
name
|
|
41
|
+
name: string;
|
|
38
42
|
/**
|
|
39
43
|
* Input label
|
|
40
|
-
* Required
|
|
41
44
|
*/
|
|
42
45
|
label: string;
|
|
43
46
|
/**
|
|
@@ -51,12 +54,12 @@ export declare class MgInputToggle {
|
|
|
51
54
|
/**
|
|
52
55
|
* Define if toggle have on/off style
|
|
53
56
|
*/
|
|
54
|
-
isOnOff
|
|
57
|
+
isOnOff: boolean;
|
|
55
58
|
handleIsOnOff(newValue: boolean): void;
|
|
56
59
|
/**
|
|
57
60
|
* Define if toggle display icon
|
|
58
61
|
*/
|
|
59
|
-
isIcon
|
|
62
|
+
isIcon: boolean;
|
|
60
63
|
handleIsIcon(newValue: boolean): void;
|
|
61
64
|
/**
|
|
62
65
|
* Define if input is readonly
|
|
@@ -88,22 +91,31 @@ export declare class MgInputToggle {
|
|
|
88
91
|
* Checked internal value
|
|
89
92
|
*/
|
|
90
93
|
checked: boolean;
|
|
91
|
-
handleChecked(newValue:
|
|
94
|
+
handleChecked(newValue: boolean): void;
|
|
92
95
|
/**
|
|
93
|
-
*
|
|
96
|
+
* Emited event when value change
|
|
94
97
|
*/
|
|
95
98
|
valueChange: EventEmitter<any>;
|
|
99
|
+
/**
|
|
100
|
+
* Emited event when checking validity
|
|
101
|
+
*/
|
|
102
|
+
inputValid: EventEmitter<boolean>;
|
|
96
103
|
/**
|
|
97
104
|
* Change checked value
|
|
105
|
+
*
|
|
106
|
+
* @returns {void}
|
|
98
107
|
*/
|
|
99
108
|
private toggleChecked;
|
|
100
109
|
/**
|
|
101
110
|
* Slots validation
|
|
111
|
+
*
|
|
112
|
+
* @returns {void}
|
|
102
113
|
*/
|
|
103
114
|
private validateSlots;
|
|
104
115
|
/**
|
|
105
116
|
* set checked state
|
|
106
|
-
*
|
|
117
|
+
*
|
|
118
|
+
* @returns {void}
|
|
107
119
|
*/
|
|
108
120
|
private setChecked;
|
|
109
121
|
/*************
|
|
@@ -113,5 +125,10 @@ export declare class MgInputToggle {
|
|
|
113
125
|
* Check if component props are well configured on init
|
|
114
126
|
*/
|
|
115
127
|
componentWillLoad(): void;
|
|
116
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Render
|
|
130
|
+
*
|
|
131
|
+
* @returns {HTMLElement} HTML Element
|
|
132
|
+
*/
|
|
133
|
+
render(): HTMLElement;
|
|
117
134
|
}
|
|
@@ -2,11 +2,10 @@ declare const _default: {
|
|
|
2
2
|
component: string;
|
|
3
3
|
title: string;
|
|
4
4
|
parameters: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
iframeHeight: number;
|
|
5
|
+
actions: {
|
|
6
|
+
handles: string[];
|
|
8
7
|
};
|
|
9
8
|
};
|
|
10
9
|
};
|
|
11
10
|
export default _default;
|
|
12
|
-
export declare const
|
|
11
|
+
export declare const MgForm: any;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
+
import { ClassList } from '../../../utils/components.utils';
|
|
3
|
+
export declare class MgForm {
|
|
4
|
+
/************
|
|
5
|
+
* Internal *
|
|
6
|
+
************/
|
|
7
|
+
private mgInputs;
|
|
8
|
+
private requiredMessage;
|
|
9
|
+
private messages;
|
|
10
|
+
/**************
|
|
11
|
+
* Decorators *
|
|
12
|
+
**************/
|
|
13
|
+
element: HTMLMgFormElement;
|
|
14
|
+
/**
|
|
15
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
16
|
+
* If not set, it will be created.
|
|
17
|
+
*/
|
|
18
|
+
identifier: string;
|
|
19
|
+
/**
|
|
20
|
+
* Input name
|
|
21
|
+
* If not set the value equals the identifier
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* Define if form is readonly
|
|
26
|
+
*/
|
|
27
|
+
readonly: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Define if form is disabled
|
|
30
|
+
*/
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Define form valid state
|
|
34
|
+
*/
|
|
35
|
+
valid: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Define form invalid state
|
|
38
|
+
*/
|
|
39
|
+
invalid: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Component classes
|
|
42
|
+
*/
|
|
43
|
+
classList: ClassList;
|
|
44
|
+
/**
|
|
45
|
+
* Emitted event on form validity check
|
|
46
|
+
* Tells if form is valid or not
|
|
47
|
+
*/
|
|
48
|
+
formValid: EventEmitter<boolean>;
|
|
49
|
+
/**
|
|
50
|
+
* Public method to display errors
|
|
51
|
+
*
|
|
52
|
+
* @returns {Promise<void>}
|
|
53
|
+
*/
|
|
54
|
+
displayError(): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Define required message based on mg-inputs required elements
|
|
57
|
+
* Also
|
|
58
|
+
*
|
|
59
|
+
* @returns {void}
|
|
60
|
+
*/
|
|
61
|
+
private setRequiredMessage;
|
|
62
|
+
/**
|
|
63
|
+
* Check if form is valid
|
|
64
|
+
*
|
|
65
|
+
* @returns {void}
|
|
66
|
+
*/
|
|
67
|
+
private checkValidity;
|
|
68
|
+
/*************
|
|
69
|
+
* Lifecycle *
|
|
70
|
+
*************/
|
|
71
|
+
/**
|
|
72
|
+
* Check if component props are well configured on init
|
|
73
|
+
*
|
|
74
|
+
* @returns {void}
|
|
75
|
+
*/
|
|
76
|
+
componentWillLoad(): void;
|
|
77
|
+
/**
|
|
78
|
+
* Render
|
|
79
|
+
*
|
|
80
|
+
* @returns {HTMLElement} HTML Element
|
|
81
|
+
*/
|
|
82
|
+
render(): HTMLElement;
|
|
83
|
+
}
|
|
@@ -4,8 +4,10 @@ export declare class MgMessage {
|
|
|
4
4
|
/************
|
|
5
5
|
* Internal *
|
|
6
6
|
************/
|
|
7
|
+
private classHide;
|
|
7
8
|
private closeButtonId;
|
|
8
9
|
private storedTimer;
|
|
10
|
+
private messages;
|
|
9
11
|
/**************
|
|
10
12
|
* Decorators *
|
|
11
13
|
**************/
|
|
@@ -20,7 +22,7 @@ export declare class MgMessage {
|
|
|
20
22
|
* Value is defined in seconds and must greater than 2 seconds (PDA9-314 RG-06)
|
|
21
23
|
*/
|
|
22
24
|
delay: number;
|
|
23
|
-
validateDelay(newValue:
|
|
25
|
+
validateDelay(newValue: number): void;
|
|
24
26
|
/**
|
|
25
27
|
* Message variant
|
|
26
28
|
*/
|
|
@@ -46,11 +48,11 @@ export declare class MgMessage {
|
|
|
46
48
|
*/
|
|
47
49
|
hasActions: boolean;
|
|
48
50
|
/**
|
|
49
|
-
*
|
|
51
|
+
* Emited event when message is diplayed
|
|
50
52
|
*/
|
|
51
53
|
componentShow: EventEmitter<string>;
|
|
52
54
|
/**
|
|
53
|
-
*
|
|
55
|
+
* Emited event when message is hidden
|
|
54
56
|
*/
|
|
55
57
|
componentHide: EventEmitter<string>;
|
|
56
58
|
/**
|
|
@@ -63,6 +65,8 @@ export declare class MgMessage {
|
|
|
63
65
|
private hideWithDelay;
|
|
64
66
|
/**
|
|
65
67
|
* Get icon corresponding to variant
|
|
68
|
+
*
|
|
69
|
+
* @returns {string} icon
|
|
66
70
|
*/
|
|
67
71
|
private getIcon;
|
|
68
72
|
/*************
|
|
@@ -72,5 +76,10 @@ export declare class MgMessage {
|
|
|
72
76
|
* Check if component props are well configured on init
|
|
73
77
|
*/
|
|
74
78
|
componentWillLoad(): void;
|
|
75
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Render
|
|
81
|
+
*
|
|
82
|
+
* @returns {HTMLElement} HTML Element
|
|
83
|
+
*/
|
|
84
|
+
render(): HTMLElement;
|
|
76
85
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
component: string;
|
|
3
|
+
title: string;
|
|
4
|
+
parameters: {
|
|
5
|
+
actions: {
|
|
6
|
+
handles: string[];
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
export declare const MgModal: any;
|
|
12
|
+
export declare const WithCloseButton: any;
|
|
13
|
+
export declare const WithActions: any;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
+
import { ClassList } from '../../../utils/components.utils';
|
|
3
|
+
export declare class MgModal {
|
|
4
|
+
/************
|
|
5
|
+
* Internal *
|
|
6
|
+
************/
|
|
7
|
+
private classHide;
|
|
8
|
+
private closeButtonId;
|
|
9
|
+
private titleId;
|
|
10
|
+
private messages;
|
|
11
|
+
/**************
|
|
12
|
+
* Decorators *
|
|
13
|
+
**************/
|
|
14
|
+
element: HTMLMgModalElement;
|
|
15
|
+
/**
|
|
16
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
17
|
+
* If not set, it will be created.
|
|
18
|
+
*/
|
|
19
|
+
identifier: string;
|
|
20
|
+
/**
|
|
21
|
+
* Displayed modal title
|
|
22
|
+
* required
|
|
23
|
+
*/
|
|
24
|
+
modalTitle: string;
|
|
25
|
+
/**
|
|
26
|
+
* Define if modal has a cross button
|
|
27
|
+
*/
|
|
28
|
+
closeButton: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Define if modal is hidden
|
|
31
|
+
*/
|
|
32
|
+
hide: boolean;
|
|
33
|
+
validateHide(newValue: boolean): void;
|
|
34
|
+
/**
|
|
35
|
+
* Define if component is using actions slot
|
|
36
|
+
*/
|
|
37
|
+
hasActions: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Define if component is using content slot
|
|
40
|
+
*/
|
|
41
|
+
hasContent: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Component classes
|
|
44
|
+
*/
|
|
45
|
+
classList: ClassList;
|
|
46
|
+
/**
|
|
47
|
+
* Emmited event when modal is diplayed
|
|
48
|
+
*/
|
|
49
|
+
componentShow: EventEmitter<string>;
|
|
50
|
+
/**
|
|
51
|
+
* Emmited event when modal is hidden
|
|
52
|
+
*/
|
|
53
|
+
componentHide: EventEmitter<string>;
|
|
54
|
+
/**
|
|
55
|
+
* Handle 'escape' key down
|
|
56
|
+
*
|
|
57
|
+
* @param {KeyboardEvent} event keydown event
|
|
58
|
+
* @returns {void}
|
|
59
|
+
*/
|
|
60
|
+
handleKeyDown(event: KeyboardEvent): void;
|
|
61
|
+
/*************
|
|
62
|
+
* Handlers *
|
|
63
|
+
*************/
|
|
64
|
+
/**
|
|
65
|
+
* Handle close button
|
|
66
|
+
*
|
|
67
|
+
* @returns {void}
|
|
68
|
+
*/
|
|
69
|
+
private handleClose;
|
|
70
|
+
/*************
|
|
71
|
+
* Lifecycle *
|
|
72
|
+
*************/
|
|
73
|
+
/**
|
|
74
|
+
* Check if component props are well configured on init
|
|
75
|
+
*
|
|
76
|
+
* @returns {void}
|
|
77
|
+
*/
|
|
78
|
+
componentWillLoad(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Render
|
|
81
|
+
*
|
|
82
|
+
* @returns {HTMLElement} HTML Element
|
|
83
|
+
*/
|
|
84
|
+
render(): HTMLElement;
|
|
85
|
+
}
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
2
|
export declare class MgPagination {
|
|
3
|
+
/************
|
|
4
|
+
* Internal *
|
|
5
|
+
************/
|
|
6
|
+
private messages;
|
|
3
7
|
/**************
|
|
4
8
|
* Decorators *
|
|
5
9
|
**************/
|
|
10
|
+
/**
|
|
11
|
+
* Get component DOM element
|
|
12
|
+
*/
|
|
13
|
+
element: HTMLMgPaginationElement;
|
|
6
14
|
/**
|
|
7
15
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
8
16
|
* If not set, it will be created.
|
|
9
17
|
*/
|
|
10
|
-
identifier
|
|
18
|
+
identifier: string;
|
|
11
19
|
/**
|
|
12
20
|
* Panignation label. Is a short description.
|
|
13
21
|
* Customize default value can be usefull to improve accessibility
|
|
@@ -17,37 +25,53 @@ export declare class MgPagination {
|
|
|
17
25
|
* Component total pages
|
|
18
26
|
*/
|
|
19
27
|
totalPages: number;
|
|
20
|
-
validateTotalPages(newValue:
|
|
28
|
+
validateTotalPages(newValue: number): void;
|
|
21
29
|
/**
|
|
22
30
|
* Component current page
|
|
23
31
|
*/
|
|
24
32
|
currentPage: number;
|
|
25
|
-
validateCurrentPage(newValue:
|
|
33
|
+
validateCurrentPage(newValue: number): void;
|
|
26
34
|
/**
|
|
27
35
|
* Emmited event when current page change
|
|
28
36
|
*/
|
|
29
37
|
currentPageChange: EventEmitter<number>;
|
|
30
38
|
/**
|
|
31
39
|
* Change current page from target
|
|
32
|
-
*
|
|
40
|
+
*
|
|
41
|
+
* @param {number} target target page
|
|
42
|
+
* @returns {void}
|
|
33
43
|
*/
|
|
34
44
|
private goToPage;
|
|
35
45
|
/************
|
|
36
46
|
* Handlers *
|
|
37
47
|
************/
|
|
38
48
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
49
|
+
* select handler
|
|
50
|
+
*
|
|
51
|
+
* @param {InputEvent} event value change event
|
|
52
|
+
* @returns {void}
|
|
41
53
|
*/
|
|
42
54
|
private handleSelect;
|
|
43
55
|
/**
|
|
44
56
|
* Go to 'previous/next' page button handler
|
|
57
|
+
*
|
|
58
|
+
* @param {string} action navigation action
|
|
45
59
|
* @returns {void}
|
|
46
60
|
*/
|
|
47
61
|
private handleGoToPage;
|
|
48
62
|
/*************
|
|
49
63
|
* Lifecycle *
|
|
50
64
|
*************/
|
|
65
|
+
/**
|
|
66
|
+
* Check if props are well configured on init
|
|
67
|
+
*
|
|
68
|
+
* @returns {void}
|
|
69
|
+
*/
|
|
51
70
|
componentWillLoad(): void;
|
|
52
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Render
|
|
73
|
+
*
|
|
74
|
+
* @returns {HTMLElement} HTML Element
|
|
75
|
+
*/
|
|
76
|
+
render(): HTMLElement;
|
|
53
77
|
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
+
import { ClassList } from '../../../utils/components.utils';
|
|
3
|
+
export declare class MgPanel {
|
|
4
|
+
/************
|
|
5
|
+
* Internal *
|
|
6
|
+
************/
|
|
7
|
+
private editInputElement;
|
|
8
|
+
private messages;
|
|
9
|
+
/**************
|
|
10
|
+
* Decorators *
|
|
11
|
+
**************/
|
|
12
|
+
/**
|
|
13
|
+
* Get component DOM element
|
|
14
|
+
*/
|
|
15
|
+
element: HTMLMgPanelElement;
|
|
16
|
+
/**
|
|
17
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
18
|
+
* If not set, it will be created.
|
|
19
|
+
*/
|
|
20
|
+
identifier: string;
|
|
21
|
+
/**
|
|
22
|
+
* Panel title
|
|
23
|
+
*/
|
|
24
|
+
panelTitle: string;
|
|
25
|
+
handelTileChange(newValue: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* Panel title pattern
|
|
28
|
+
*/
|
|
29
|
+
titlePattern: string;
|
|
30
|
+
validatetitlePattern(newValue: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* Panel title pattern error message
|
|
33
|
+
*/
|
|
34
|
+
titlePatternErrorMessage: string;
|
|
35
|
+
/**
|
|
36
|
+
* Panel is opened
|
|
37
|
+
*/
|
|
38
|
+
expanded: boolean;
|
|
39
|
+
handleExpanded(newValue: boolean): void;
|
|
40
|
+
/**
|
|
41
|
+
* Disable possibility to toggle expand
|
|
42
|
+
*/
|
|
43
|
+
expandToggleDisabled: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Panel title is editabled
|
|
46
|
+
*/
|
|
47
|
+
titleEditable: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Component classes
|
|
50
|
+
*/
|
|
51
|
+
classList: ClassList;
|
|
52
|
+
/**
|
|
53
|
+
* Title is in edition mode
|
|
54
|
+
*/
|
|
55
|
+
isEditing: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Cache for updated panel title before validation
|
|
58
|
+
*/
|
|
59
|
+
updatedPanelTitle: string;
|
|
60
|
+
/**
|
|
61
|
+
* Emmited event when title change
|
|
62
|
+
*/
|
|
63
|
+
titleChange: EventEmitter<string>;
|
|
64
|
+
/**
|
|
65
|
+
* Emmited event when expanded change
|
|
66
|
+
*/
|
|
67
|
+
expandedChange: EventEmitter<boolean>;
|
|
68
|
+
/************
|
|
69
|
+
* Methods *
|
|
70
|
+
************/
|
|
71
|
+
/**
|
|
72
|
+
* Toggle is editing state
|
|
73
|
+
*
|
|
74
|
+
* @returns {void}
|
|
75
|
+
*/
|
|
76
|
+
private toggleIsEditing;
|
|
77
|
+
/************
|
|
78
|
+
* Handlers *
|
|
79
|
+
************/
|
|
80
|
+
/**
|
|
81
|
+
* Collapse button click handler
|
|
82
|
+
*
|
|
83
|
+
* @returns {void}
|
|
84
|
+
*/
|
|
85
|
+
private handleCollapseButton;
|
|
86
|
+
/**
|
|
87
|
+
* Edit button click handler
|
|
88
|
+
*
|
|
89
|
+
* @returns {void}
|
|
90
|
+
*/
|
|
91
|
+
private handleEditButton;
|
|
92
|
+
/**
|
|
93
|
+
* Update title handler
|
|
94
|
+
*
|
|
95
|
+
* @param {CustomEvent<string>} event input value change event
|
|
96
|
+
* @returns {void}
|
|
97
|
+
*/
|
|
98
|
+
private handleUpdateTitle;
|
|
99
|
+
/**
|
|
100
|
+
* Cancel edition button handler
|
|
101
|
+
*
|
|
102
|
+
* @returns {void}
|
|
103
|
+
*/
|
|
104
|
+
private handleCancelEditButton;
|
|
105
|
+
/**
|
|
106
|
+
* Validate edition button handler
|
|
107
|
+
*
|
|
108
|
+
* @returns {void}
|
|
109
|
+
*/
|
|
110
|
+
private handleValidateEditButton;
|
|
111
|
+
/*************
|
|
112
|
+
* Lifecycle *
|
|
113
|
+
*************/
|
|
114
|
+
/**
|
|
115
|
+
* Check if props are well configured on init
|
|
116
|
+
*
|
|
117
|
+
* @returns {void}
|
|
118
|
+
*/
|
|
119
|
+
componentWillLoad(): void;
|
|
120
|
+
/**
|
|
121
|
+
* Header left conditional render
|
|
122
|
+
*
|
|
123
|
+
* @typedef {HTMLElement} HTMLMgButtonElement
|
|
124
|
+
* @returns {HTMLMgButtonElement | HTMLElement | HTMLElement[]} header left element
|
|
125
|
+
*/
|
|
126
|
+
private headerLeft;
|
|
127
|
+
/**
|
|
128
|
+
* Edit DOM after render
|
|
129
|
+
*
|
|
130
|
+
* @returns {void}
|
|
131
|
+
*/
|
|
132
|
+
componentDidRender(): void;
|
|
133
|
+
/**
|
|
134
|
+
* Render component
|
|
135
|
+
*
|
|
136
|
+
* @returns {HTMLElement} html element
|
|
137
|
+
*/
|
|
138
|
+
render(): HTMLElement;
|
|
139
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
component: string;
|
|
3
|
+
title: string;
|
|
4
|
+
parameters: {
|
|
5
|
+
layout: string;
|
|
6
|
+
docs: {
|
|
7
|
+
iframeHeight: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
argTypes: {
|
|
11
|
+
placement: {
|
|
12
|
+
options: readonly ["auto", "auto-start", "auto-end", "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "right", "right-start", "right-end", "left", "left-start", "left-end"];
|
|
13
|
+
control: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
table: {
|
|
17
|
+
defaultValue: {
|
|
18
|
+
summary: "auto";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
|
25
|
+
export declare const MgPopover: any;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List of all possibles placements
|
|
3
|
+
*/
|
|
4
|
+
export declare const placements: readonly ["auto", "auto-start", "auto-end", "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "right", "right-start", "right-end", "left", "left-start", "left-end"];
|
|
5
|
+
/**
|
|
6
|
+
* Placement type from placements
|
|
7
|
+
*/
|
|
8
|
+
export declare type Placement = typeof placements[number];
|