@mgdis/mg-components 3.1.0 → 3.2.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/css-shim-629916b0.js +6 -0
- package/dist/cjs/index-369388eb.js +146 -0
- package/dist/cjs/{index-85a4a0b6.js → index-bead7dbd.js} +78 -2
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/mg-badge_21.cjs.entry.js +3313 -0
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-modal.cjs.entry.js +111 -0
- package/dist/cjs/mg-popover.cjs.entry.js +165 -0
- package/dist/cjs/popper-0c3964e7.js +1786 -0
- package/dist/cjs/{shadow-css-8940f82d.js → shadow-css-546083ef.js} +1 -1
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js +1 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +11 -7
- package/dist/collection/components/atoms/mg-badge/mg-badge.stories.js +3 -0
- package/dist/collection/components/atoms/mg-button/mg-button.css +26 -17
- package/dist/collection/components/atoms/mg-button/mg-button.js +71 -2
- package/dist/collection/components/atoms/mg-button/mg-button.stories.js +5 -0
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +12 -1
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.stories.js +8 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +8 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.css +5 -7
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +11 -1
- 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.js +10 -3
- package/dist/collection/components/atoms/mg-tag/mg-tag.stories.js +3 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +9 -0
- package/dist/collection/components/molecules/inputs/MgInput.js +20 -14
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +9 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +103 -40
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.stories.js +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +27 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +125 -56
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.stories.js +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +27 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +144 -68
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.stories.js +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +27 -0
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +101 -35
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.stories.js +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +9 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +115 -37
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.stories.js +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +28 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +132 -51
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.stories.js +14 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +27 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +155 -53
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.stories.js +7 -2
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +27 -0
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +108 -42
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.stories.js +7 -2
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +4 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +60 -31
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.stories.js +6 -1
- package/dist/collection/components/molecules/mg-form/mg-form.css +15 -0
- package/dist/collection/components/molecules/mg-form/mg-form.js +269 -0
- package/dist/collection/components/molecules/mg-form/mg-form.stories.js +58 -0
- package/dist/collection/components/molecules/mg-message/mg-message.css +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +11 -4
- package/dist/collection/components/molecules/mg-message/mg-message.stories.js +5 -1
- package/dist/collection/components/molecules/mg-modal/mg-modal.css +54 -0
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +233 -0
- package/dist/collection/components/molecules/mg-modal/mg-modal.stories.js +51 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +32 -12
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.stories.js +1 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.css +42 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +255 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.stories.js +31 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover.css +2 -2
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +19 -4
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +4 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +14 -3
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +68 -20
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.stories.js +10 -1
- package/dist/collection/stories/messages.stories.js +1 -1
- package/dist/collection/utils/components.utils.js +16 -9
- package/dist/collection/utils/locale.utils.js +6 -3
- package/dist/collection/utils/test.utils.js +27 -15
- package/dist/collection/variables.css +30 -1
- package/dist/collection/variables.scss +30 -1
- package/dist/components/MgInput.js +20 -14
- package/dist/components/components.utils.js +16 -9
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index2.js +22 -12
- package/dist/components/locale.utils.js +6 -3
- package/dist/components/mg-badge2.js +9 -5
- package/dist/components/mg-button2.js +21 -2
- package/dist/components/mg-character-left2.js +12 -1
- package/dist/components/mg-form.d.ts +11 -0
- package/dist/components/mg-form.js +146 -0
- package/dist/components/mg-icon2.js +20 -2
- package/dist/components/mg-input-checkbox.js +65 -36
- package/dist/components/mg-input-date.js +87 -52
- package/dist/components/mg-input-numeric.js +105 -63
- package/dist/components/mg-input-password.js +60 -29
- package/dist/components/mg-input-radio.js +74 -34
- package/dist/components/mg-input-select2.js +89 -46
- package/dist/components/mg-input-text.js +1 -237
- package/dist/components/mg-input-text2.js +288 -0
- package/dist/components/mg-input-textarea.js +67 -36
- package/dist/components/mg-input-title2.js +13 -4
- package/dist/components/mg-input-toggle.js +30 -22
- package/dist/components/mg-message.js +10 -3
- package/dist/components/mg-modal.d.ts +11 -0
- package/dist/components/mg-modal.js +147 -0
- package/dist/components/mg-pagination.js +31 -11
- package/dist/components/mg-panel.d.ts +11 -0
- package/dist/components/mg-panel.js +210 -0
- package/dist/components/mg-popover.js +20 -5
- package/dist/components/mg-tabs.js +43 -11
- package/dist/components/mg-tag.js +8 -1
- package/dist/components/mg-tooltip2.js +9 -0
- package/dist/esm/css-shim-0993aa3b.js +4 -0
- package/dist/esm/{index-e3e84606.js → index-9e877561.js} +78 -2
- package/dist/esm/index-c346f52d.js +139 -0
- package/dist/esm/loader.js +4 -4
- package/dist/esm/mg-badge_21.entry.js +3289 -0
- package/dist/esm/mg-components.js +3 -3
- package/dist/esm/mg-modal.entry.js +107 -0
- package/dist/esm/mg-popover.entry.js +161 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/popper-8874fd6c.js +1784 -0
- package/dist/esm/{shadow-css-5d2d01ce.js → shadow-css-dfa0587f.js} +1 -1
- package/dist/esm-es5/css-shim-0993aa3b.js +1 -0
- package/dist/esm-es5/index-9e877561.js +1 -0
- package/dist/esm-es5/index-c346f52d.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mg-badge_21.entry.js +2 -0
- package/dist/esm-es5/mg-components.js +1 -1
- package/dist/esm-es5/mg-modal.entry.js +1 -0
- package/dist/esm-es5/mg-popover.entry.js +1 -0
- package/dist/esm-es5/popper-8874fd6c.js +1 -0
- package/dist/esm-es5/{shadow-css-5d2d01ce.js → shadow-css-dfa0587f.js} +0 -0
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/mg-components.js +2 -2
- package/dist/mg-components/p-3633e9e1.system.entry.js +2 -0
- package/dist/mg-components/p-3c14153d.js +1 -0
- package/dist/mg-components/p-55a22b35.system.js +1 -0
- package/dist/mg-components/{p-f6455ab3.js → p-5e796581.js} +0 -0
- package/dist/mg-components/p-656b5efb.system.js +1 -0
- package/dist/mg-components/p-68d6f104.js +1 -0
- package/dist/mg-components/{p-366a224e.js → p-6d49ed95.js} +1 -1
- package/dist/mg-components/p-70177194.entry.js +1 -0
- package/dist/mg-components/{p-71d57b8b.system.js → p-8b2d8a2a.system.js} +0 -0
- package/dist/mg-components/p-8cb61c3f.system.js +1 -0
- package/dist/mg-components/p-ace173b1.js +1 -0
- package/dist/mg-components/p-c46fbd54.entry.js +1 -0
- package/dist/mg-components/p-c90cc4bf.system.js +1 -0
- package/dist/mg-components/p-cd2a4acc.system.entry.js +1 -0
- package/dist/mg-components/p-de1164fa.system.entry.js +1 -0
- package/dist/mg-components/p-dfe25da3.entry.js +1 -0
- package/dist/mg-components/p-e4a502b5.system.js +1 -0
- package/dist/mg-components/variables.css +30 -1
- package/dist/mg-components/variables.scss +30 -1
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +8 -4
- package/dist/types/components/atoms/mg-badge/mg-badge.stories.d.ts +5 -0
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +22 -2
- package/dist/types/components/atoms/mg-button/mg-button.stories.d.ts +5 -0
- package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +13 -2
- package/dist/types/components/atoms/mg-character-left/mg-character-left.stories.d.ts +9 -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 +11 -1
- package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +11 -1
- package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +10 -3
- package/dist/types/components/atoms/mg-tag/mg-tag.stories.d.ts +5 -0
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +11 -2
- package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +8 -0
- package/dist/types/components/molecules/inputs/MgInput.d.ts +5 -4
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +31 -11
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.stories.d.ts +5 -0
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +39 -14
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.stories.d.ts +5 -0
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +53 -14
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.stories.d.ts +5 -0
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +28 -9
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.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 +37 -8
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.stories.d.ts +5 -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 +30 -7
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.stories.d.ts +14 -0
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +46 -10
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.stories.d.ts +5 -0
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +30 -10
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.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 +27 -12
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.stories.d.ts +5 -0
- package/dist/types/components/molecules/mg-form/mg-form.d.ts +82 -0
- package/dist/types/components/molecules/mg-form/mg-form.stories.d.ts +11 -0
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +11 -4
- package/dist/types/components/molecules/mg-message/mg-message.stories.d.ts +10 -0
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +83 -0
- package/dist/types/components/molecules/mg-modal/mg-modal.stories.d.ts +13 -0
- package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +23 -7
- package/dist/types/components/molecules/mg-pagination/mg-pagination.stories.d.ts +5 -0
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +110 -0
- package/dist/types/components/molecules/mg-panel/mg-panel.stories.d.ts +6 -0
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +18 -3
- package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +5 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +21 -6
- package/dist/types/components/molecules/mg-tabs/mg-tabs.stories.d.ts +8 -0
- package/dist/types/components.d.ts +365 -78
- package/dist/types/locales/index.d.ts +15 -8
- package/dist/types/utils/components.utils.d.ts +16 -9
- package/dist/types/utils/locale.utils.d.ts +6 -3
- package/dist/types/utils/test.utils.d.ts +13 -1
- package/package.json +13 -9
- package/readme.md +3 -0
- package/dist/cjs/css-shim-a22512c4.js +0 -6
- package/dist/cjs/mg-badge_20.cjs.entry.js +0 -4661
- package/dist/esm/css-shim-7c240feb.js +0 -4
- package/dist/esm/mg-badge_20.entry.js +0 -4638
- package/dist/esm-es5/css-shim-7c240feb.js +0 -1
- package/dist/esm-es5/index-e3e84606.js +0 -1
- package/dist/esm-es5/mg-badge_20.entry.js +0 -2
- 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-422c429b.system.js +0 -1
- package/dist/mg-components/p-62fa3797.js +0 -1
- package/dist/mg-components/p-9a215712.system.js +0 -1
- package/dist/mg-components/p-cbf0464b.entry.js +0 -1
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
/**************
|
|
10
|
+
* Decorators *
|
|
11
|
+
**************/
|
|
12
|
+
element: HTMLMgFormElement;
|
|
13
|
+
/**
|
|
14
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
15
|
+
* If not set, it will be created.
|
|
16
|
+
*/
|
|
17
|
+
identifier: string;
|
|
18
|
+
/**
|
|
19
|
+
* Input name
|
|
20
|
+
* If not set the value equals the identifier
|
|
21
|
+
*/
|
|
22
|
+
name: string;
|
|
23
|
+
/**
|
|
24
|
+
* Define if form is readonly
|
|
25
|
+
*/
|
|
26
|
+
readonly: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Define if form is disabled
|
|
29
|
+
*/
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Define form valid state
|
|
33
|
+
*/
|
|
34
|
+
valid: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Define form invalid state
|
|
37
|
+
*/
|
|
38
|
+
invalid: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Component classes
|
|
41
|
+
*/
|
|
42
|
+
classList: ClassList;
|
|
43
|
+
/**
|
|
44
|
+
* Emitted event on form validity check
|
|
45
|
+
* Tells if form is valid or not
|
|
46
|
+
*/
|
|
47
|
+
formValid: EventEmitter<boolean>;
|
|
48
|
+
/**
|
|
49
|
+
* Public method to display errors
|
|
50
|
+
*
|
|
51
|
+
* @returns {Promise<void>}
|
|
52
|
+
*/
|
|
53
|
+
displayError(): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Define required message based on mg-inputs required elements
|
|
56
|
+
* Also
|
|
57
|
+
*
|
|
58
|
+
* @returns {void}
|
|
59
|
+
*/
|
|
60
|
+
private setRequiredMessage;
|
|
61
|
+
/**
|
|
62
|
+
* Check if form is valid
|
|
63
|
+
*
|
|
64
|
+
* @returns {void}
|
|
65
|
+
*/
|
|
66
|
+
private checkValidity;
|
|
67
|
+
/*************
|
|
68
|
+
* Lifecycle *
|
|
69
|
+
*************/
|
|
70
|
+
/**
|
|
71
|
+
* Check if component props are well configured on init
|
|
72
|
+
*
|
|
73
|
+
* @returns {void}
|
|
74
|
+
*/
|
|
75
|
+
componentWillLoad(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Render
|
|
78
|
+
*
|
|
79
|
+
* @returns {HTMLElement} HTML Element
|
|
80
|
+
*/
|
|
81
|
+
render(): HTMLElement;
|
|
82
|
+
}
|
|
@@ -20,7 +20,7 @@ export declare class MgMessage {
|
|
|
20
20
|
* Value is defined in seconds and must greater than 2 seconds (PDA9-314 RG-06)
|
|
21
21
|
*/
|
|
22
22
|
delay: number;
|
|
23
|
-
validateDelay(newValue:
|
|
23
|
+
validateDelay(newValue: number): void;
|
|
24
24
|
/**
|
|
25
25
|
* Message variant
|
|
26
26
|
*/
|
|
@@ -46,11 +46,11 @@ export declare class MgMessage {
|
|
|
46
46
|
*/
|
|
47
47
|
hasActions: boolean;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* Emited event when message is diplayed
|
|
50
50
|
*/
|
|
51
51
|
componentShow: EventEmitter<string>;
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* Emited event when message is hidden
|
|
54
54
|
*/
|
|
55
55
|
componentHide: EventEmitter<string>;
|
|
56
56
|
/**
|
|
@@ -63,6 +63,8 @@ export declare class MgMessage {
|
|
|
63
63
|
private hideWithDelay;
|
|
64
64
|
/**
|
|
65
65
|
* Get icon corresponding to variant
|
|
66
|
+
*
|
|
67
|
+
* @returns {string} icon
|
|
66
68
|
*/
|
|
67
69
|
private getIcon;
|
|
68
70
|
/*************
|
|
@@ -72,5 +74,10 @@ export declare class MgMessage {
|
|
|
72
74
|
* Check if component props are well configured on init
|
|
73
75
|
*/
|
|
74
76
|
componentWillLoad(): void;
|
|
75
|
-
|
|
77
|
+
/**
|
|
78
|
+
* Render
|
|
79
|
+
*
|
|
80
|
+
* @returns {HTMLElement} HTML Element
|
|
81
|
+
*/
|
|
82
|
+
render(): HTMLElement;
|
|
76
83
|
}
|
|
@@ -0,0 +1,83 @@
|
|
|
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 closeButtonId;
|
|
8
|
+
private titleId;
|
|
9
|
+
/**************
|
|
10
|
+
* Decorators *
|
|
11
|
+
**************/
|
|
12
|
+
element: HTMLMgModalElement;
|
|
13
|
+
/**
|
|
14
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
15
|
+
* If not set, it will be created.
|
|
16
|
+
*/
|
|
17
|
+
identifier: string;
|
|
18
|
+
/**
|
|
19
|
+
* Displayed modal title
|
|
20
|
+
* required
|
|
21
|
+
*/
|
|
22
|
+
modalTitle: string;
|
|
23
|
+
/**
|
|
24
|
+
* Define if modal has a cross button
|
|
25
|
+
*/
|
|
26
|
+
closeButton: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Define if modal is hidden
|
|
29
|
+
*/
|
|
30
|
+
hide: boolean;
|
|
31
|
+
validateHide(newValue: boolean): void;
|
|
32
|
+
/**
|
|
33
|
+
* Define if component is using actions slot
|
|
34
|
+
*/
|
|
35
|
+
hasActions: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Define if component is using content slot
|
|
38
|
+
*/
|
|
39
|
+
hasContent: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Component classes
|
|
42
|
+
*/
|
|
43
|
+
classList: ClassList;
|
|
44
|
+
/**
|
|
45
|
+
* Emmited event when modal is diplayed
|
|
46
|
+
*/
|
|
47
|
+
componentShow: EventEmitter<string>;
|
|
48
|
+
/**
|
|
49
|
+
* Emmited event when modal is hidden
|
|
50
|
+
*/
|
|
51
|
+
componentHide: EventEmitter<string>;
|
|
52
|
+
/**
|
|
53
|
+
* Handle 'escape' key down
|
|
54
|
+
*
|
|
55
|
+
* @param {KeyboardEvent} event keydown event
|
|
56
|
+
* @returns {void}
|
|
57
|
+
*/
|
|
58
|
+
handleKeyDown(event: KeyboardEvent): void;
|
|
59
|
+
/*************
|
|
60
|
+
* Handlers *
|
|
61
|
+
*************/
|
|
62
|
+
/**
|
|
63
|
+
* Handle close button
|
|
64
|
+
*
|
|
65
|
+
* @returns {void}
|
|
66
|
+
*/
|
|
67
|
+
private handleClose;
|
|
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
|
+
}
|
|
@@ -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;
|
|
@@ -7,7 +7,7 @@ export declare class MgPagination {
|
|
|
7
7
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
8
8
|
* If not set, it will be created.
|
|
9
9
|
*/
|
|
10
|
-
identifier
|
|
10
|
+
identifier: string;
|
|
11
11
|
/**
|
|
12
12
|
* Panignation label. Is a short description.
|
|
13
13
|
* Customize default value can be usefull to improve accessibility
|
|
@@ -17,37 +17,53 @@ export declare class MgPagination {
|
|
|
17
17
|
* Component total pages
|
|
18
18
|
*/
|
|
19
19
|
totalPages: number;
|
|
20
|
-
validateTotalPages(newValue:
|
|
20
|
+
validateTotalPages(newValue: number): void;
|
|
21
21
|
/**
|
|
22
22
|
* Component current page
|
|
23
23
|
*/
|
|
24
24
|
currentPage: number;
|
|
25
|
-
validateCurrentPage(newValue:
|
|
25
|
+
validateCurrentPage(newValue: number): void;
|
|
26
26
|
/**
|
|
27
27
|
* Emmited event when current page change
|
|
28
28
|
*/
|
|
29
29
|
currentPageChange: EventEmitter<number>;
|
|
30
30
|
/**
|
|
31
31
|
* Change current page from target
|
|
32
|
-
*
|
|
32
|
+
*
|
|
33
|
+
* @param {number} target target page
|
|
34
|
+
* @returns {void}
|
|
33
35
|
*/
|
|
34
36
|
private goToPage;
|
|
35
37
|
/************
|
|
36
38
|
* Handlers *
|
|
37
39
|
************/
|
|
38
40
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
+
* select handler
|
|
42
|
+
*
|
|
43
|
+
* @param {InputEvent} event value change event
|
|
44
|
+
* @returns {void}
|
|
41
45
|
*/
|
|
42
46
|
private handleSelect;
|
|
43
47
|
/**
|
|
44
48
|
* Go to 'previous/next' page button handler
|
|
49
|
+
*
|
|
50
|
+
* @param {string} action navigation action
|
|
45
51
|
* @returns {void}
|
|
46
52
|
*/
|
|
47
53
|
private handleGoToPage;
|
|
48
54
|
/*************
|
|
49
55
|
* Lifecycle *
|
|
50
56
|
*************/
|
|
57
|
+
/**
|
|
58
|
+
* Check if props are well configured on init
|
|
59
|
+
*
|
|
60
|
+
* @returns {void}
|
|
61
|
+
*/
|
|
51
62
|
componentWillLoad(): void;
|
|
52
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Render
|
|
65
|
+
*
|
|
66
|
+
* @returns {HTMLElement} HTML Element
|
|
67
|
+
*/
|
|
68
|
+
render(): HTMLElement;
|
|
53
69
|
}
|
|
@@ -0,0 +1,110 @@
|
|
|
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
|
+
/**************
|
|
9
|
+
* Decorators *
|
|
10
|
+
**************/
|
|
11
|
+
/**
|
|
12
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
13
|
+
* If not set, it will be created.
|
|
14
|
+
*/
|
|
15
|
+
identifier: string;
|
|
16
|
+
/**
|
|
17
|
+
* Panel title
|
|
18
|
+
*/
|
|
19
|
+
panelTitle: string;
|
|
20
|
+
handelTileChange(newValue: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* Panel is opened
|
|
23
|
+
*/
|
|
24
|
+
expanded: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Panel title is editabled
|
|
27
|
+
*/
|
|
28
|
+
titleEditable: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Component classes
|
|
31
|
+
*/
|
|
32
|
+
classList: ClassList;
|
|
33
|
+
/**
|
|
34
|
+
* Title is in edition mode
|
|
35
|
+
*/
|
|
36
|
+
isEditing: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Cache for updated panel title before validation
|
|
39
|
+
*/
|
|
40
|
+
updatedPanelTitle: string;
|
|
41
|
+
/**
|
|
42
|
+
* Emmited event when title change
|
|
43
|
+
*/
|
|
44
|
+
titleChange: EventEmitter<string>;
|
|
45
|
+
/************
|
|
46
|
+
* Methods *
|
|
47
|
+
************/
|
|
48
|
+
/**
|
|
49
|
+
* Toggle is editing state
|
|
50
|
+
*
|
|
51
|
+
* @returns {void}
|
|
52
|
+
*/
|
|
53
|
+
private toggleIsEditing;
|
|
54
|
+
/************
|
|
55
|
+
* Handlers *
|
|
56
|
+
************/
|
|
57
|
+
/**
|
|
58
|
+
* Collapse button click handler
|
|
59
|
+
*
|
|
60
|
+
* @returns {void}
|
|
61
|
+
*/
|
|
62
|
+
private handleCollapseButton;
|
|
63
|
+
/**
|
|
64
|
+
* Edit button click handler
|
|
65
|
+
*
|
|
66
|
+
* @returns {void}
|
|
67
|
+
*/
|
|
68
|
+
private handleEditButton;
|
|
69
|
+
/**
|
|
70
|
+
* Update title handler
|
|
71
|
+
*
|
|
72
|
+
* @param {CustomEvent<string>} event input value change event
|
|
73
|
+
* @returns {void}
|
|
74
|
+
*/
|
|
75
|
+
private handleUpdateTitle;
|
|
76
|
+
/**
|
|
77
|
+
* Cancel edition button handler
|
|
78
|
+
*
|
|
79
|
+
* @returns {void}
|
|
80
|
+
*/
|
|
81
|
+
private handleCancelEditButton;
|
|
82
|
+
/**
|
|
83
|
+
* Validate edition button handler
|
|
84
|
+
*
|
|
85
|
+
* @returns {void}
|
|
86
|
+
*/
|
|
87
|
+
private handleValidateEditButton;
|
|
88
|
+
/*************
|
|
89
|
+
* Lifecycle *
|
|
90
|
+
*************/
|
|
91
|
+
/**
|
|
92
|
+
* Header left conditional render
|
|
93
|
+
*
|
|
94
|
+
* @typedef {HTMLElement} HTMLMgButtonElement
|
|
95
|
+
* @returns {HTMLMgButtonElement | HTMLElement | HTMLElement[]} header left element
|
|
96
|
+
*/
|
|
97
|
+
private headerLeft;
|
|
98
|
+
/**
|
|
99
|
+
* Edit DOM after render
|
|
100
|
+
*
|
|
101
|
+
* @returns {void}
|
|
102
|
+
*/
|
|
103
|
+
componentDidRender(): void;
|
|
104
|
+
/**
|
|
105
|
+
* Render component
|
|
106
|
+
*
|
|
107
|
+
* @returns {HTMLElement} html element
|
|
108
|
+
*/
|
|
109
|
+
render(): HTMLElement;
|
|
110
|
+
}
|
|
@@ -29,34 +29,49 @@ export declare class MgPopover {
|
|
|
29
29
|
* Display popover
|
|
30
30
|
*/
|
|
31
31
|
display: boolean;
|
|
32
|
-
handleDisplay(newVal:
|
|
32
|
+
handleDisplay(newVal: boolean): void;
|
|
33
33
|
/**
|
|
34
34
|
* Disable popover
|
|
35
35
|
*/
|
|
36
36
|
disabled: boolean;
|
|
37
37
|
/**
|
|
38
38
|
* Check if clicked outside of component
|
|
39
|
-
*
|
|
39
|
+
*
|
|
40
|
+
* @param {MouseEvent} event mouse event
|
|
41
|
+
* @returns {void}
|
|
40
42
|
*/
|
|
41
43
|
private clickOutside;
|
|
42
44
|
/**
|
|
43
45
|
* Show popover
|
|
46
|
+
*
|
|
44
47
|
* @returns {void}
|
|
45
48
|
*/
|
|
46
49
|
private show;
|
|
47
50
|
/**
|
|
48
51
|
* Hide popover
|
|
52
|
+
*
|
|
49
53
|
* @returns {void}
|
|
50
54
|
*/
|
|
51
55
|
private hide;
|
|
52
56
|
/**
|
|
53
57
|
* Handle action for close button
|
|
58
|
+
*
|
|
54
59
|
* @returns {void}
|
|
55
60
|
*/
|
|
56
61
|
private handleCloseButton;
|
|
57
62
|
/*************
|
|
58
63
|
* Lifecycle *
|
|
59
64
|
*************/
|
|
65
|
+
/**
|
|
66
|
+
* Check if component props are well configured on init
|
|
67
|
+
*
|
|
68
|
+
* @returns {void}
|
|
69
|
+
*/
|
|
60
70
|
componentDidLoad(): void;
|
|
61
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Render
|
|
73
|
+
*
|
|
74
|
+
* @returns {HTMLElement} HTML Element
|
|
75
|
+
*/
|
|
76
|
+
render(): HTMLElement;
|
|
62
77
|
}
|
|
@@ -12,24 +12,29 @@ export declare class MgTabs {
|
|
|
12
12
|
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
13
13
|
* If not set, it will be created.
|
|
14
14
|
*/
|
|
15
|
-
identifier
|
|
15
|
+
identifier: string;
|
|
16
16
|
/**
|
|
17
17
|
* Tabs label. Include short tabs description.
|
|
18
18
|
* Required for accessibility
|
|
19
19
|
*/
|
|
20
20
|
label: string;
|
|
21
|
+
/**
|
|
22
|
+
* Define tabs size
|
|
23
|
+
*/
|
|
24
|
+
size: string;
|
|
25
|
+
validateSize(newValue: string): void;
|
|
21
26
|
/**
|
|
22
27
|
* Tabs items
|
|
23
28
|
* Required
|
|
24
29
|
*/
|
|
25
30
|
items: string[] | TabItem[];
|
|
26
|
-
validateItems(newValue:
|
|
31
|
+
validateItems(newValue: string[] | TabItem[]): void;
|
|
27
32
|
/**
|
|
28
33
|
* Active tab number
|
|
29
34
|
* default: first is 1
|
|
30
35
|
*/
|
|
31
36
|
activeTab: number;
|
|
32
|
-
validateActiveTab(newValue:
|
|
37
|
+
validateActiveTab(newValue: number): void;
|
|
33
38
|
/**
|
|
34
39
|
* Component tabs
|
|
35
40
|
*/
|
|
@@ -40,12 +45,15 @@ export declare class MgTabs {
|
|
|
40
45
|
classList: ClassList;
|
|
41
46
|
/**
|
|
42
47
|
* Handle click events on tabs
|
|
43
|
-
*
|
|
48
|
+
*
|
|
49
|
+
* @param {MouseEvent} event mouse event
|
|
44
50
|
*/
|
|
45
51
|
private handleClick;
|
|
46
52
|
/**
|
|
47
53
|
* Handle keyboard event on tabs
|
|
48
|
-
*
|
|
54
|
+
*
|
|
55
|
+
* @param {MouseEvent} event mouse event
|
|
56
|
+
* @returns {void}
|
|
49
57
|
*/
|
|
50
58
|
private handleKeydown;
|
|
51
59
|
/**
|
|
@@ -57,7 +65,14 @@ export declare class MgTabs {
|
|
|
57
65
|
*************/
|
|
58
66
|
/**
|
|
59
67
|
* Check if component props are well configured on init
|
|
68
|
+
*
|
|
69
|
+
* @returns {void}
|
|
60
70
|
*/
|
|
61
71
|
componentWillLoad(): void;
|
|
62
|
-
|
|
72
|
+
/**
|
|
73
|
+
* Render
|
|
74
|
+
*
|
|
75
|
+
* @returns {HTMLElement} HTML Element
|
|
76
|
+
*/
|
|
77
|
+
render(): HTMLElement;
|
|
63
78
|
}
|