@mgdis/mg-components 6.18.0 → 6.20.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.
Files changed (82) hide show
  1. package/dist/cjs/{index-DCZEYvlH.js → index-Bp6wZzau.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/mg-action-more_37.cjs.entry.js +90 -120
  4. package/dist/cjs/mg-alert.cjs.entry.js +1 -1
  5. package/dist/cjs/mg-components.cjs.js +2 -2
  6. package/dist/cjs/mg-fieldset.cjs.entry.js +2 -2
  7. package/dist/cjs/mg-input-combobox.cjs.entry.js +39 -38
  8. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +4 -8
  9. package/dist/cjs/{mg-input.conf-HYIzRsy7.js → mg-input.conf-D7jmj_lh.js} +2 -0
  10. package/dist/cjs/mg-loader.cjs.entry.js +1 -1
  11. package/dist/cjs/mg-progress.cjs.entry.js +1 -1
  12. package/dist/collection/assets/icons/index.js +1 -1
  13. package/dist/collection/components/atoms/mg-icon/mg-icon.js +1 -1
  14. package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js +1 -0
  15. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +36 -35
  16. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +2 -6
  17. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +17 -16
  18. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +5 -21
  19. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +72 -84
  20. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +1 -1
  21. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +1 -1
  22. package/dist/components/mg-card2.js +1 -1
  23. package/dist/components/mg-icon2.js +1 -1
  24. package/dist/components/mg-illustrated-message.js +1 -1
  25. package/dist/components/mg-input-checkbox.js +1 -1
  26. package/dist/components/mg-input-combobox.js +38 -37
  27. package/dist/components/mg-input-date.js +1 -1
  28. package/dist/components/mg-input-numeric.js +1 -1
  29. package/dist/components/mg-input-password.js +1 -1
  30. package/dist/components/mg-input-rich-text-editor.js +2 -6
  31. package/dist/components/mg-input-select2.js +1 -1
  32. package/dist/components/mg-input-text2.js +16 -16
  33. package/dist/components/mg-input-textarea.js +6 -22
  34. package/dist/components/mg-input-toggle.js +60 -75
  35. package/dist/components/mg-input2.js +3 -2
  36. package/dist/components/mg-message2.js +1 -1
  37. package/dist/components/mg-modal.js +1 -1
  38. package/dist/components/mg-panel.js +1 -1
  39. package/dist/components/mg-popover-content2.js +1 -1
  40. package/dist/components/mg-popover2.js +1 -1
  41. package/dist/esm/{index-T6kOJXP1.js → index-BluNKQ3L.js} +1 -1
  42. package/dist/esm/loader.js +3 -3
  43. package/dist/esm/mg-action-more_37.entry.js +90 -120
  44. package/dist/esm/mg-alert.entry.js +1 -1
  45. package/dist/esm/mg-components.js +3 -3
  46. package/dist/esm/mg-fieldset.entry.js +2 -2
  47. package/dist/esm/mg-input-combobox.entry.js +40 -39
  48. package/dist/esm/mg-input-rich-text-editor.entry.js +4 -8
  49. package/dist/esm/{mg-input.conf-D9V2v4n2.js → mg-input.conf-DDnrE1hD.js} +2 -1
  50. package/dist/esm/mg-loader.entry.js +1 -1
  51. package/dist/esm/mg-progress.entry.js +1 -1
  52. package/dist/mg-components/mg-components.css +1 -1
  53. package/dist/mg-components/mg-components.esm.js +1 -1
  54. package/dist/mg-components/{p-f2cddd52.entry.js → p-016bd291.entry.js} +1 -1
  55. package/dist/mg-components/{p-f6afaeb8.entry.js → p-186a6139.entry.js} +1 -1
  56. package/dist/mg-components/p-7132bca1.entry.js +1 -0
  57. package/dist/mg-components/{p-952288bd.entry.js → p-916dfb6d.entry.js} +1 -1
  58. package/dist/mg-components/p-BluNKQ3L.js +2 -0
  59. package/dist/mg-components/p-DDnrE1hD.js +1 -0
  60. package/dist/mg-components/p-cd061b38.entry.js +1 -0
  61. package/dist/mg-components/{p-5abc77cd.entry.js → p-d2c72f09.entry.js} +1 -1
  62. package/dist/mg-components/{p-92e5e5a6.entry.js → p-d5a276eb.entry.js} +1 -1
  63. package/dist/types/assets/icons/index.d.ts +9 -0
  64. package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +1 -0
  65. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.d.ts +1 -0
  66. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +4 -5
  67. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +0 -1
  68. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +1 -5
  69. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +0 -6
  70. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +13 -16
  71. package/dist/types/components.d.ts +6 -8
  72. package/ide/intellij/web-types.json +35 -28
  73. package/ide/vscode/css-custom-data.json +19 -3
  74. package/ide/vscode/custom.css-data.json +425 -0
  75. package/ide/vscode/html-custom-data.json +60 -6
  76. package/package.json +21 -21
  77. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.js +0 -1
  78. package/dist/mg-components/p-2bab89c2.entry.js +0 -1
  79. package/dist/mg-components/p-7d2e43b2.entry.js +0 -1
  80. package/dist/mg-components/p-D9V2v4n2.js +0 -1
  81. package/dist/mg-components/p-T6kOJXP1.js +0 -2
  82. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.d.ts +0 -8
@@ -33,6 +33,7 @@ export declare const icons: {
33
33
  'book-outline': string;
34
34
  briefcase: string;
35
35
  'briefcase-outline': string;
36
+ building: string;
36
37
  'building-outline': string;
37
38
  calculator: string;
38
39
  'calculator-outline': string;
@@ -64,6 +65,7 @@ export declare const icons: {
64
65
  'comment-question': string;
65
66
  'comment-question-outline': string;
66
67
  'comment-sms': string;
68
+ 'comment-sms-outline': string;
67
69
  conversation: string;
68
70
  'conversation-outline': string;
69
71
  copy: string;
@@ -96,7 +98,9 @@ export declare const icons: {
96
98
  'fax-outline': string;
97
99
  file: string;
98
100
  'file-cog': string;
101
+ 'file-cog-outline': string;
99
102
  'file-download': string;
103
+ 'file-download-outline': string;
100
104
  'file-excel': string;
101
105
  'file-excel-outline': string;
102
106
  'file-outline': string;
@@ -105,6 +109,7 @@ export declare const icons: {
105
109
  'file-text': string;
106
110
  'file-text-outline': string;
107
111
  'file-upload': string;
112
+ 'file-upload-outline': string;
108
113
  'file-word': string;
109
114
  'file-word-outline': string;
110
115
  filter: string;
@@ -122,6 +127,7 @@ export declare const icons: {
122
127
  'folder-link-outline': string;
123
128
  'folder-outline': string;
124
129
  'folder-star': string;
130
+ 'folder-star-outline': string;
125
131
  folders: string;
126
132
  'folders-outline': string;
127
133
  gavel: string;
@@ -182,9 +188,12 @@ export declare const icons: {
182
188
  'play-circle': string;
183
189
  plus: string;
184
190
  'plus-circle': string;
191
+ 'plus-circle-outline': string;
185
192
  share: string;
186
193
  'share-outline': string;
187
194
  shuffle: string;
195
+ 'sidebar-arrow-left': string;
196
+ 'sidebar-arrow-right': string;
188
197
  sitemap: string;
189
198
  sliders: string;
190
199
  'sliders-outline': string;
@@ -36,4 +36,5 @@ export declare const classFieldset = "mg-c-input--fieldset";
36
36
  export declare const classDisabled = "mg-c-input--disabled";
37
37
  export declare const classReadonly = "mg-c-input--readonly";
38
38
  export declare const classVerticalList = "mg-c-input--vertical-list";
39
+ export declare const classDisplayCharacterLeft = "mg-c-input--display-character-left";
39
40
  export {};
@@ -11,6 +11,7 @@ export type ActionType = {
11
11
  */
12
12
  export type RequestMappingType = {
13
13
  filter: string;
14
+ filterTransform?: (filter: string) => string;
14
15
  };
15
16
  /**
16
17
  * Define response mapping type
@@ -7,7 +7,6 @@ export declare class MgInputCombobox {
7
7
  /************
8
8
  * Internal *
9
9
  ************/
10
- private readonly classFocus;
11
10
  private input;
12
11
  private loadMoreElement;
13
12
  private popoverId;
@@ -169,7 +168,7 @@ export declare class MgInputCombobox {
169
168
  * Formated items for display
170
169
  */
171
170
  options: Paginate<Option>;
172
- watchOptions(newValue: Paginate<Option>): void;
171
+ watchOptions(): void;
173
172
  /**
174
173
  * Active option
175
174
  */
@@ -305,10 +304,10 @@ export declare class MgInputCombobox {
305
304
  */
306
305
  private setErrorMessage;
307
306
  /**
308
- * Get filtered options from `filter` input value
309
- * @returns filtered options
307
+ * Get first page with filter applied
308
+ * @returns first page with filter applied
310
309
  */
311
- private optionsFilter;
310
+ private getFirstPage;
312
311
  /**
313
312
  * Loading wrapper with a given action
314
313
  * @param action - wrapped loading action
@@ -11,7 +11,6 @@ export declare class MgInputRichTextEditor {
11
11
  private messages;
12
12
  private hasDisplayedError;
13
13
  private customErrorMessage;
14
- private readonly classFocus;
15
14
  /**************
16
15
  * Decorators *
17
16
  **************/
@@ -10,7 +10,6 @@ export declare class MgInputText {
10
10
  /************
11
11
  * Internal *
12
12
  ************/
13
- private readonly classFocus;
14
13
  private readonly classIsInputGroupAppend;
15
14
  private readonly classHasIcon;
16
15
  private readonly classHasButtonsGroupAppend;
@@ -122,6 +121,7 @@ export declare class MgInputText {
122
121
  * Define if component should display character left
123
122
  */
124
123
  characterLeftHide: boolean;
124
+ validateCharacterLeftHide(newValue: boolean): void;
125
125
  /**
126
126
  * Add a help text under the input, usually expected data format and example
127
127
  */
@@ -186,10 +186,6 @@ export declare class MgInputText {
186
186
  * Handle input event
187
187
  */
188
188
  private handleInput;
189
- /**
190
- * Handle focus event
191
- */
192
- private handleFocus;
193
189
  /**
194
190
  * Handle blur event
195
191
  */
@@ -5,8 +5,6 @@ export declare class MgInputTextarea {
5
5
  /************
6
6
  * Internal *
7
7
  ************/
8
- private readonly classFocus;
9
- private readonly classDisplayCharacterLeft;
10
8
  private characterLeftId;
11
9
  private input;
12
10
  private messages;
@@ -165,10 +163,6 @@ export declare class MgInputTextarea {
165
163
  * Handle input event
166
164
  */
167
165
  private handleInput;
168
- /**
169
- * Handle focus event
170
- */
171
- private handleFocus;
172
166
  /**
173
167
  * Handle blur event
174
168
  */
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from '../../../../stencil-public-runtime';
2
2
  import { ClassList } from '@mgdis/core-ui-helpers/dist/utils';
3
- import { ToggleValue } from './mg-input-toggle.conf';
3
+ import { Option as ToggleOption } from '../../../../types';
4
4
  import { type TooltipPosition } from '../mg-input/mg-input.conf';
5
5
  /**
6
6
  * @slot item-1 - Left option toggle content
@@ -24,13 +24,13 @@ export declare class MgInputToggle {
24
24
  /**
25
25
  * Component value
26
26
  */
27
- value: any;
28
- handleValue(newValue: any): void;
27
+ value: ToggleOption['value'];
28
+ watchValue(newValue: MgInputToggle['value'], oldValue?: MgInputToggle['value']): void;
29
29
  /**
30
30
  * Items are the possible options to select
31
31
  */
32
- items: string[] | ToggleValue[];
33
- validateItems(newValue: MgInputToggle['items']): void;
32
+ items: string[] | ToggleOption[];
33
+ watchItems(newValue: MgInputToggle['items']): void;
34
34
  /**
35
35
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
36
36
  */
@@ -93,7 +93,7 @@ export declare class MgInputToggle {
93
93
  /**
94
94
  * Formated items for display
95
95
  */
96
- options: ToggleValue[];
96
+ options: ToggleOption[];
97
97
  /**
98
98
  * Error message to display
99
99
  */
@@ -102,11 +102,6 @@ export declare class MgInputToggle {
102
102
  * Define input valid state
103
103
  */
104
104
  valid: boolean;
105
- /**
106
- * Checked internal value
107
- */
108
- checked: boolean;
109
- handleChecked(newValue: MgInputToggle['checked']): void;
110
105
  /**
111
106
  * Emited event when value change
112
107
  */
@@ -138,9 +133,9 @@ export declare class MgInputToggle {
138
133
  */
139
134
  private setErrorMessage;
140
135
  /**
141
- * Change checked value
136
+ * Handle switch button to update value
142
137
  */
143
- private toggleChecked;
138
+ private handleSwitchButton;
144
139
  /**
145
140
  * Slots validation
146
141
  */
@@ -150,11 +145,13 @@ export declare class MgInputToggle {
150
145
  * @param checked - checked item
151
146
  * @returns toggle value
152
147
  */
153
- private getCheckedItem;
148
+ private getCurrentOptionIndex;
154
149
  /**
155
- * set checked state
150
+ * Check if value is checked
151
+ * @param value - toggle value
152
+ * @returns truthy if value is checked
156
153
  */
157
- private setChecked;
154
+ private isChecked;
158
155
  /*************
159
156
  * Lifecycle *
160
157
  *************/
@@ -15,7 +15,7 @@ import { AriaRoleType, RequiredMessageStatusType } from "./components/molecules/
15
15
  import { IconSizeType, IconType, IconVariantStyleType, IconVariantType } from "./components/atoms/mg-icon/mg-icon.conf";
16
16
  import { IllustratedMessageDirectionType, IllustratedMessageSizeType } from "./components/molecules/mg-illustrated-message/mg-illustrated-message.conf";
17
17
  import { CheckboxItem, CheckboxType, CheckboxValue } from "./components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf";
18
- import { Direction, Option } from "./types";
18
+ import { Direction, Option, Option as ToggleOption } from "./types";
19
19
  import { RequestMappingType, ResponseMappingType } from "./components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf";
20
20
  import { Format, NumericType } from "./components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf";
21
21
  import { RadioOption } from "./components/molecules/inputs/mg-input-radio/mg-input-radio.conf";
@@ -23,7 +23,6 @@ import { EditorOptionsType } from "./components/molecules/inputs/mg-input-rich-t
23
23
  import { SelectOption } from "./components/molecules/inputs/mg-input-select/mg-input-select.conf";
24
24
  import { OptionType, TextType } from "./components/molecules/inputs/mg-input-text/mg-input-text.conf";
25
25
  import { IconType as IconType1 } from "./components";
26
- import { ToggleValue } from "./components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf";
27
26
  import { IconType as IconType2, SizeType as SizeType1, SlotLabelType } from "./components/molecules/internals/mg-item-more/mg-item-more.conf";
28
27
  import { ItemMoreType, MenuSizeType } from "./components/molecules/menus/mg-menu/mg-menu.conf";
29
28
  import { MgMenuStatusType, TargetType } from "./components/molecules/menus/mg-menu-item/mg-menu-item.conf";
@@ -47,7 +46,7 @@ export { AriaRoleType, RequiredMessageStatusType } from "./components/molecules/
47
46
  export { IconSizeType, IconType, IconVariantStyleType, IconVariantType } from "./components/atoms/mg-icon/mg-icon.conf";
48
47
  export { IllustratedMessageDirectionType, IllustratedMessageSizeType } from "./components/molecules/mg-illustrated-message/mg-illustrated-message.conf";
49
48
  export { CheckboxItem, CheckboxType, CheckboxValue } from "./components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf";
50
- export { Direction, Option } from "./types";
49
+ export { Direction, Option, Option as ToggleOption } from "./types";
51
50
  export { RequestMappingType, ResponseMappingType } from "./components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf";
52
51
  export { Format, NumericType } from "./components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf";
53
52
  export { RadioOption } from "./components/molecules/inputs/mg-input-radio/mg-input-radio.conf";
@@ -55,7 +54,6 @@ export { EditorOptionsType } from "./components/molecules/inputs/mg-input-rich-t
55
54
  export { SelectOption } from "./components/molecules/inputs/mg-input-select/mg-input-select.conf";
56
55
  export { OptionType, TextType } from "./components/molecules/inputs/mg-input-text/mg-input-text.conf";
57
56
  export { IconType as IconType1 } from "./components";
58
- export { ToggleValue } from "./components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf";
59
57
  export { IconType as IconType2, SizeType as SizeType1, SlotLabelType } from "./components/molecules/internals/mg-item-more/mg-item-more.conf";
60
58
  export { ItemMoreType, MenuSizeType } from "./components/molecules/menus/mg-menu/mg-menu.conf";
61
59
  export { MgMenuStatusType, TargetType } from "./components/molecules/menus/mg-menu-item/mg-menu-item.conf";
@@ -1615,7 +1613,7 @@ export namespace Components {
1615
1613
  /**
1616
1614
  * Items are the possible options to select
1617
1615
  */
1618
- "items": string[] | ToggleValue[];
1616
+ "items": string[] | ToggleOption[];
1619
1617
  /**
1620
1618
  * Input label
1621
1619
  */
@@ -1666,7 +1664,7 @@ export namespace Components {
1666
1664
  /**
1667
1665
  * Component value
1668
1666
  */
1669
- "value": any;
1667
+ "value": ToggleOption['value'];
1670
1668
  }
1671
1669
  interface MgItemMore {
1672
1670
  /**
@@ -4153,7 +4151,7 @@ declare namespace LocalJSX {
4153
4151
  /**
4154
4152
  * Items are the possible options to select
4155
4153
  */
4156
- "items": string[] | ToggleValue[];
4154
+ "items": string[] | ToggleOption[];
4157
4155
  /**
4158
4156
  * Input label
4159
4157
  */
@@ -4198,7 +4196,7 @@ declare namespace LocalJSX {
4198
4196
  /**
4199
4197
  * Component value
4200
4198
  */
4201
- "value"?: any;
4199
+ "value"?: ToggleOption['value'];
4202
4200
  }
4203
4201
  interface MgItemMore {
4204
4202
  /**