@mgdis/mg-components 6.5.0 → 6.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-ede3b3dc.js → index-019dd5c0.js} +2 -2
- package/dist/cjs/{index-ede3b3dc.js.map → index-019dd5c0.js.map} +1 -1
- package/dist/cjs/index-1a5a1081.js +4 -0
- package/dist/cjs/{index.es-a112f649.js → index.es-903492c5.js} +26 -27
- package/dist/cjs/index.es-903492c5.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mg-action-more_36.cjs.entry.js +231 -197
- package/dist/cjs/mg-action-more_36.cjs.entry.js.map +1 -1
- package/dist/cjs/mg-alert.cjs.entry.js +4 -4
- package/dist/cjs/mg-components.cjs.js +1 -1
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +16790 -0
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js.map +1 -0
- package/dist/cjs/mg-input.conf-5bbcea79.js +23 -0
- package/dist/cjs/mg-input.conf-5bbcea79.js.map +1 -0
- package/dist/cjs/mg-loader.cjs.entry.js +3 -3
- package/dist/cjs/mg-progress.cjs.entry.js +2 -2
- package/dist/collection/assets/icons/index.js +1 -1
- package/dist/collection/assets/icons/index.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js.map +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +3 -3
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +1 -1
- 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 +1 -1
- 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 +2 -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-rich-text-editor/editor/index.js +110 -0
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/index.js.map +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +846 -0
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js.map +1 -0
- 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 +3 -5
- 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/internals/mg-item-more/mg-item-more.js +4 -4
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js.map +1 -1
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js +1 -1
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js.map +1 -1
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +16 -17
- 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 +8 -6
- 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 +3 -3
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -1
- package/dist/collection/components/molecules/mg-alert/mg-alert.js +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 +2 -2
- package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.js +5 -2
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.js.map +1 -1
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +74 -17
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js.map +1 -1
- package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +2 -2
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +3 -3
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +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.conf.js.map +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +3 -3
- package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
- package/dist/collection/components/molecules/mg-progress/mg-progress.js +1 -1
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
- package/dist/collection/types/index.js.map +1 -1
- package/dist/collection/utils/behaviors.utils.js +4 -1
- package/dist/collection/utils/behaviors.utils.js.map +1 -1
- package/dist/collection/utils/floating-ui.utils.js +1 -6
- package/dist/collection/utils/floating-ui.utils.js.map +1 -1
- package/dist/components/floating-ui.utils.js +1 -6
- package/dist/components/floating-ui.utils.js.map +1 -1
- package/dist/components/index.es.js +24 -25
- package/dist/components/index.es.js.map +1 -1
- package/dist/components/mg-action-more.js +2 -2
- package/dist/components/mg-action-more.js.map +1 -1
- package/dist/components/mg-alert.js +3 -3
- package/dist/components/mg-badge2.js +2 -2
- package/dist/components/mg-button2.js +2 -2
- package/dist/components/mg-card2.js +1 -1
- package/dist/components/mg-card2.js.map +1 -1
- package/dist/components/mg-details.js +1 -1
- package/dist/components/mg-details.js.map +1 -1
- package/dist/components/mg-form.js +4 -4
- package/dist/components/mg-form.js.map +1 -1
- package/dist/components/mg-icon2.js +3 -3
- package/dist/components/mg-icon2.js.map +1 -1
- package/dist/components/mg-illustrated-message.js +69 -16
- package/dist/components/mg-illustrated-message.js.map +1 -1
- package/dist/components/mg-input-checkbox.js +4 -4
- package/dist/components/mg-input-checkbox.js.map +1 -1
- package/dist/components/mg-input-date.js +7 -7
- package/dist/components/mg-input-date.js.map +1 -1
- package/dist/components/mg-input-numeric.js +9 -9
- package/dist/components/mg-input-numeric.js.map +1 -1
- package/dist/components/mg-input-password.js +3 -3
- package/dist/components/mg-input-password.js.map +1 -1
- package/dist/components/mg-input-radio.js +5 -5
- package/dist/components/mg-input-radio.js.map +1 -1
- package/dist/components/mg-input-rich-text-editor.d.ts +11 -0
- package/dist/components/mg-input-rich-text-editor.js +16866 -0
- package/dist/components/mg-input-rich-text-editor.js.map +1 -0
- package/dist/components/mg-input-select2.js +6 -6
- package/dist/components/mg-input-select2.js.map +1 -1
- package/dist/components/mg-input-text2.js +7 -9
- package/dist/components/mg-input-text2.js.map +1 -1
- package/dist/components/mg-input-textarea.js +5 -5
- package/dist/components/mg-input-textarea.js.map +1 -1
- package/dist/components/mg-input-toggle.js +4 -4
- package/dist/components/mg-input2.js +1 -1
- package/dist/components/mg-input2.js.map +1 -1
- package/dist/components/mg-item-more2.js +17 -15
- package/dist/components/mg-item-more2.js.map +1 -1
- package/dist/components/mg-loader.js +1 -1
- package/dist/components/mg-menu-item2.js +11 -9
- package/dist/components/mg-menu-item2.js.map +1 -1
- package/dist/components/mg-message2.js +4 -4
- package/dist/components/mg-modal.js +5 -5
- package/dist/components/mg-modal.js.map +1 -1
- package/dist/components/mg-pagination2.js +3 -3
- package/dist/components/mg-panel.js +3 -3
- package/dist/components/mg-popover-content2.js +4 -4
- package/dist/components/mg-popover2.js +3 -3
- package/dist/components/mg-popover2.js.map +1 -1
- package/dist/components/mg-progress.js +1 -1
- package/dist/components/mg-skip-links.js +1 -1
- package/dist/components/mg-tabs.js +4 -4
- package/dist/components/mg-tag.js +2 -2
- package/dist/components/mg-tooltip2.js +5 -5
- package/dist/components/mg-tooltip2.js.map +1 -1
- package/dist/esm/index-5059254f.js +4 -0
- package/dist/esm/{index-a7c3b5c5.js → index-6b7bdd63.js} +2 -2
- package/dist/esm/{index-a7c3b5c5.js.map → index-6b7bdd63.js.map} +1 -1
- package/dist/esm/{index.es-5e0101ac.js → index.es-b80b758c.js} +25 -26
- package/dist/esm/index.es-b80b758c.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mg-action-more_36.entry.js +182 -148
- package/dist/esm/mg-action-more_36.entry.js.map +1 -1
- package/dist/esm/mg-alert.entry.js +4 -4
- package/dist/esm/mg-components.js +1 -1
- package/dist/esm/mg-input-rich-text-editor.entry.js +16786 -0
- package/dist/esm/mg-input-rich-text-editor.entry.js.map +1 -0
- package/dist/esm/mg-input.conf-712c7bb6.js +16 -0
- package/dist/esm/mg-input.conf-712c7bb6.js.map +1 -0
- package/dist/esm/mg-loader.entry.js +3 -3
- package/dist/esm/mg-progress.entry.js +2 -2
- 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-2403e01d.entry.js → p-0ae49cc4.entry.js} +2 -2
- package/dist/mg-components/p-17f0b7eb.entry.js +2 -0
- package/dist/mg-components/p-17f0b7eb.entry.js.map +1 -0
- package/dist/mg-components/p-2884f369.js +2 -0
- package/dist/mg-components/p-2884f369.js.map +1 -0
- package/dist/mg-components/{p-ad64ab4a.entry.js → p-361cc090.entry.js} +2 -2
- package/dist/mg-components/p-3c6710be.js +2 -0
- package/dist/mg-components/p-3c6710be.js.map +1 -0
- package/dist/mg-components/{p-d9731ebc.js → p-4049bd40.js} +2 -2
- package/dist/mg-components/p-8dbb78aa.entry.js +2 -0
- package/dist/mg-components/p-8dbb78aa.entry.js.map +1 -0
- package/dist/mg-components/{p-1a162791.entry.js → p-c4f37d1f.entry.js} +2 -2
- package/dist/types/assets/icons/index.d.ts +1 -0
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/editor/index.d.ts +21 -0
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +202 -0
- package/dist/types/components/molecules/menu/mg-menu/mg-menu.conf.d.ts +2 -6
- package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +3 -2
- package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +4 -3
- package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.d.ts +10 -3
- package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.d.ts +17 -3
- package/dist/types/components.d.ts +217 -8
- package/dist/types/types/index.d.ts +4 -0
- package/dist/types/utils/floating-ui.utils.d.ts +1 -1
- package/ide/intellij/web-types.json +374 -17
- package/ide/vscode/css-custom-data.json +4 -0
- package/ide/vscode/html-custom-data.json +289 -4
- package/package.json +22 -21
- package/dist/cjs/index.es-a112f649.js.map +0 -1
- package/dist/esm/index.es-5e0101ac.js.map +0 -1
- package/dist/mg-components/p-6c831a83.entry.js +0 -2
- package/dist/mg-components/p-6c831a83.entry.js.map +0 -1
- package/dist/mg-components/p-b6c1a6ce.js +0 -2
- package/dist/mg-components/p-b6c1a6ce.js.map +0 -1
- /package/dist/mg-components/{p-2403e01d.entry.js.map → p-0ae49cc4.entry.js.map} +0 -0
- /package/dist/mg-components/{p-ad64ab4a.entry.js.map → p-361cc090.entry.js.map} +0 -0
- /package/dist/mg-components/{p-d9731ebc.js.map → p-4049bd40.js.map} +0 -0
- /package/dist/mg-components/{p-1a162791.entry.js.map → p-c4f37d1f.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,h as t,g as a}from"./p-e39791fa.js";import{i}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,h as t,g as a}from"./p-e39791fa.js";import{i}from"./p-4049bd40.js";import{m as r,V as s}from"./p-3c6710be.js";const o=".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}:host{display:block}.mg-c-loader{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--mg-b-size-4);text-align:center}";const n=o;const m=class{constructor(t){e(this,t)}watchMessage(e){if(e&&!r(e))throw new Error(`<mg-loader> prop "message" must be a valid string. Passed value: ${s(e)}.`)}componentWillLoad(){this.messages=i(this.element).messages;this.watchMessage(this.message)}render(){return t("div",{key:"b9442e1060b119499a8f35444be6b371d340dffc",class:"mg-c-loader","aria-live":"polite"},t("mg-icon",{key:"9ef418d26dd97c570147c99948509368a8abe84b",icon:"loader",spin:true}),t("span",{key:"4cff50728afc076ffa202fa1b3973573d2a073e8",class:{"mg-u-visually-hidden":this.messageHide}},this.message||this.messages.loader.inProgess))}get element(){return a(this)}static get watchers(){return{message:["watchMessage"]}}};m.style=n;export{m as mg_loader};
|
|
2
|
+
//# sourceMappingURL=p-c4f37d1f.entry.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import Quill, { type QuillOptions } from 'quill';
|
|
2
|
+
export type EditorOptionsType = QuillOptions & {
|
|
3
|
+
value: string;
|
|
4
|
+
handleTextChange: () => void;
|
|
5
|
+
handleFocus: () => void;
|
|
6
|
+
handleBlur: () => void;
|
|
7
|
+
};
|
|
8
|
+
export type EditorType = Quill;
|
|
9
|
+
interface IdefineEditor {
|
|
10
|
+
(wrapperElement: HTMLElement, config: EditorOptionsType): EditorType;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Fixes for handling text selection in Quill when used within the Shadow DOM.
|
|
14
|
+
* - Fixes focus detection
|
|
15
|
+
* - Adapts native range handling to work with the Shadow DOM
|
|
16
|
+
* - Correctly manages text selection across Shadow DOM boundaries
|
|
17
|
+
* - Sets up selection change events
|
|
18
|
+
* @returns Quill instance
|
|
19
|
+
*/
|
|
20
|
+
export declare const defineEditor: IdefineEditor;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
2
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
3
|
+
import { type TooltipPosition } from '../mg-input/mg-input.conf';
|
|
4
|
+
import { type EditorOptionsType } from './editor';
|
|
5
|
+
export declare class MgInputRichTextEditor {
|
|
6
|
+
/************
|
|
7
|
+
* Internal *
|
|
8
|
+
************/
|
|
9
|
+
private editor;
|
|
10
|
+
private wrapperElement;
|
|
11
|
+
private messages;
|
|
12
|
+
private hasDisplayedError;
|
|
13
|
+
private readonly classFocus;
|
|
14
|
+
/**************
|
|
15
|
+
* Decorators *
|
|
16
|
+
**************/
|
|
17
|
+
/**
|
|
18
|
+
* Get component DOM element
|
|
19
|
+
*/
|
|
20
|
+
element: HTMLMgInputRichTextEditorElement;
|
|
21
|
+
/**
|
|
22
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
23
|
+
*/
|
|
24
|
+
identifier: string;
|
|
25
|
+
/**
|
|
26
|
+
* Define the value of the editor
|
|
27
|
+
* Can be either HTML string or plain text
|
|
28
|
+
*/
|
|
29
|
+
value: string;
|
|
30
|
+
/**
|
|
31
|
+
* Input label
|
|
32
|
+
*/
|
|
33
|
+
label: string;
|
|
34
|
+
/**
|
|
35
|
+
* Define if label is displayed on top
|
|
36
|
+
*/
|
|
37
|
+
labelOnTop?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Define if label is visible
|
|
40
|
+
*/
|
|
41
|
+
labelHide: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Input placeholder.
|
|
44
|
+
* It should be a word or short phrase that demonstrates the expected type of data, not a replacement for labels or help text.
|
|
45
|
+
*/
|
|
46
|
+
placeholder?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Define the number of visible text lines for the control
|
|
49
|
+
*/
|
|
50
|
+
rows: number;
|
|
51
|
+
/**
|
|
52
|
+
* Define if input is required
|
|
53
|
+
*/
|
|
54
|
+
required: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Define if the editor is readonly
|
|
57
|
+
*/
|
|
58
|
+
readonly: boolean;
|
|
59
|
+
watchReadonly(newValue: MgInputRichTextEditor['readonly']): void;
|
|
60
|
+
/**
|
|
61
|
+
* Define if input is disabled
|
|
62
|
+
*/
|
|
63
|
+
disabled: boolean;
|
|
64
|
+
watchDisabled(newValue: MgInputRichTextEditor['disabled']): void;
|
|
65
|
+
handleValidityChange(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Define input pattern to validate
|
|
68
|
+
* Please refer to the Pattern section in the input documentation for detailed information on using regular expressions in components.
|
|
69
|
+
*/
|
|
70
|
+
pattern?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Define input pattern error message
|
|
73
|
+
*/
|
|
74
|
+
patternErrorMessage?: string;
|
|
75
|
+
validatePattern(newValue: string): void;
|
|
76
|
+
/**
|
|
77
|
+
* Add a tooltip message next to the input
|
|
78
|
+
*/
|
|
79
|
+
tooltip?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Define tooltip position
|
|
82
|
+
*/
|
|
83
|
+
tooltipPosition: TooltipPosition;
|
|
84
|
+
/**
|
|
85
|
+
* Add a help text under the input, usually expected data format and example
|
|
86
|
+
*/
|
|
87
|
+
helpText?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Define input valid state
|
|
90
|
+
*/
|
|
91
|
+
valid: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Define input invalid state
|
|
94
|
+
*/
|
|
95
|
+
invalid: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Editor modules configuration
|
|
98
|
+
*/
|
|
99
|
+
modules?: EditorOptionsType['modules'];
|
|
100
|
+
/**
|
|
101
|
+
* Component classes
|
|
102
|
+
*/
|
|
103
|
+
classCollection: ClassList;
|
|
104
|
+
/**
|
|
105
|
+
* Error message to display
|
|
106
|
+
*/
|
|
107
|
+
errorMessage: string;
|
|
108
|
+
/**
|
|
109
|
+
* Emited event when checking validity
|
|
110
|
+
*/
|
|
111
|
+
inputValid: EventEmitter<boolean>;
|
|
112
|
+
/**
|
|
113
|
+
* Emited event when value change
|
|
114
|
+
*/
|
|
115
|
+
valueChange: EventEmitter<string>;
|
|
116
|
+
/**
|
|
117
|
+
* Get editor content as HTML
|
|
118
|
+
* @returns HTML content of the editor
|
|
119
|
+
*/
|
|
120
|
+
getHTML(): Promise<string>;
|
|
121
|
+
/**
|
|
122
|
+
* Get editor content as plain text
|
|
123
|
+
* @returns Plain text content of the editor
|
|
124
|
+
*/
|
|
125
|
+
getText(): Promise<string>;
|
|
126
|
+
/**
|
|
127
|
+
* Display input error if it exists.
|
|
128
|
+
*/
|
|
129
|
+
displayError(): Promise<void>;
|
|
130
|
+
/**
|
|
131
|
+
* Set an error and display a custom error message.
|
|
132
|
+
* This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.
|
|
133
|
+
* It must be paired with an error message to display for the given context.
|
|
134
|
+
* When used to set validity to `false`, you should use this method again to reset the validity to `true`.
|
|
135
|
+
* @param valid - value indicating the validity
|
|
136
|
+
* @param errorMessage - the error message to display
|
|
137
|
+
*/
|
|
138
|
+
setError(valid: MgInputRichTextEditor['valid'], errorMessage: string): Promise<void>;
|
|
139
|
+
/**
|
|
140
|
+
* Reset value, validity and error state
|
|
141
|
+
*/
|
|
142
|
+
reset(): Promise<void>;
|
|
143
|
+
/**
|
|
144
|
+
* Check if the field is empty taking into account the value format
|
|
145
|
+
* @returns truthy is value is invalid
|
|
146
|
+
*/
|
|
147
|
+
private isEmpty;
|
|
148
|
+
/**
|
|
149
|
+
* Extract the text without HTML tags from value
|
|
150
|
+
* @returns text content
|
|
151
|
+
*/
|
|
152
|
+
private getTextContent;
|
|
153
|
+
/**
|
|
154
|
+
* Get pattern validity
|
|
155
|
+
* @returns is pattern valid
|
|
156
|
+
*/
|
|
157
|
+
private getPatternValidity;
|
|
158
|
+
/**
|
|
159
|
+
* Method to set validity values
|
|
160
|
+
* @param newValue - valid new value
|
|
161
|
+
*/
|
|
162
|
+
private setValidity;
|
|
163
|
+
/**
|
|
164
|
+
* Check if input is valid
|
|
165
|
+
*/
|
|
166
|
+
private checkValidity;
|
|
167
|
+
/**
|
|
168
|
+
* Set input error message
|
|
169
|
+
* @param errorMessage - errorMessage override
|
|
170
|
+
*/
|
|
171
|
+
private setErrorMessage;
|
|
172
|
+
/**
|
|
173
|
+
* Handle focus event
|
|
174
|
+
*/
|
|
175
|
+
private handleFocus;
|
|
176
|
+
/**
|
|
177
|
+
* Handles the blur event on the editor
|
|
178
|
+
* Checks validity and displays error messages if necessary
|
|
179
|
+
*/
|
|
180
|
+
private handleBlur;
|
|
181
|
+
/**
|
|
182
|
+
* Handle `text-change` event
|
|
183
|
+
*/
|
|
184
|
+
private handleTextChange;
|
|
185
|
+
/*************
|
|
186
|
+
* Lifecycle *
|
|
187
|
+
*************/
|
|
188
|
+
/**
|
|
189
|
+
* Check if component props are well configured on init
|
|
190
|
+
* @returns timeout
|
|
191
|
+
*/
|
|
192
|
+
componentWillLoad(): ReturnType<typeof setTimeout>;
|
|
193
|
+
/**
|
|
194
|
+
* add listeners and render editor element
|
|
195
|
+
*/
|
|
196
|
+
componentDidLoad(): void;
|
|
197
|
+
/**
|
|
198
|
+
* Render
|
|
199
|
+
* @returns HTML mg-input Element
|
|
200
|
+
*/
|
|
201
|
+
render(): HTMLMgInputElement;
|
|
202
|
+
}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import type { Size } from '../../../../types';
|
|
1
|
+
import type { Size, Direction } from '../../../../types';
|
|
2
2
|
import type { MgItemMore } from '../../internals/mg-item-more/mg-item-more';
|
|
3
|
-
/**
|
|
4
|
-
* Menu direction type
|
|
5
|
-
*/
|
|
6
|
-
export type DirectionType = 'vertical' | 'horizontal';
|
|
7
3
|
/**
|
|
8
4
|
* Menu direction values
|
|
9
5
|
*/
|
|
10
|
-
export declare const
|
|
6
|
+
export declare const directions: Record<string, Direction>;
|
|
11
7
|
/**
|
|
12
8
|
* ItemMore prop type
|
|
13
9
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { MenuSizeType, ItemMoreType
|
|
1
|
+
import type { MenuSizeType, ItemMoreType } from './mg-menu.conf';
|
|
2
|
+
import { Direction } from '../../../../types';
|
|
2
3
|
/**
|
|
3
4
|
* @slot - Menu content
|
|
4
5
|
*/
|
|
@@ -23,7 +24,7 @@ export declare class MgMenu {
|
|
|
23
24
|
/**
|
|
24
25
|
* Component display direction.
|
|
25
26
|
*/
|
|
26
|
-
direction:
|
|
27
|
+
direction: Direction;
|
|
27
28
|
validateDirection(newValue: MgMenu['direction']): void;
|
|
28
29
|
/**
|
|
29
30
|
* Customize "mg-item-more" element
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
2
2
|
import { ClassList } from '@mgdis/stencil-helpers';
|
|
3
|
-
import { type MenuSizeType
|
|
3
|
+
import { type MenuSizeType } from '../mg-menu/mg-menu.conf';
|
|
4
4
|
import { type MgMenuStatusType, type TargetType } from './mg-menu-item.conf';
|
|
5
|
+
import { Direction } from '../../../../types';
|
|
5
6
|
/**
|
|
6
7
|
* @slot - Menu item content
|
|
7
8
|
* @slot image - Menu item image content
|
|
@@ -78,7 +79,7 @@ export declare class MgMenuItem {
|
|
|
78
79
|
/**
|
|
79
80
|
* Parent menu direction
|
|
80
81
|
*/
|
|
81
|
-
direction:
|
|
82
|
+
direction: Direction;
|
|
82
83
|
validateDirection(newValue: MgMenuItem['direction'], oldValue: MgMenuItem['direction']): void;
|
|
83
84
|
/**
|
|
84
85
|
* Does element is item-more
|
|
@@ -97,7 +98,7 @@ export declare class MgMenuItem {
|
|
|
97
98
|
* direction value in dataset
|
|
98
99
|
* @param newValue - new direction value
|
|
99
100
|
*/
|
|
100
|
-
watchDataStyleDirection(newValue:
|
|
101
|
+
watchDataStyleDirection(newValue: Direction): void;
|
|
101
102
|
/**
|
|
102
103
|
* has focus value in dataset
|
|
103
104
|
* @param newValue - new direction value
|
package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.d.ts
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import type { Size } from '../../../types';
|
|
1
|
+
import type { Size, Direction } from '../../../types';
|
|
2
2
|
/**
|
|
3
3
|
* List of all possibles sizes
|
|
4
4
|
*/
|
|
5
|
-
declare const sizes: readonly ["medium", "
|
|
5
|
+
export declare const sizes: readonly ["small", "medium", "large"];
|
|
6
6
|
/**
|
|
7
7
|
* IllustratedMessage size type
|
|
8
8
|
*/
|
|
9
9
|
export type IllustratedMessageSizeType = Size & (typeof sizes)[number];
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* List of all possibles directions
|
|
12
|
+
*/
|
|
13
|
+
export declare const directions: readonly ["vertical", "horizontal"];
|
|
14
|
+
/**
|
|
15
|
+
* IllustratedMessage direction type
|
|
16
|
+
*/
|
|
17
|
+
export type IllustratedMessageDirectionType = Direction & (typeof directions)[number];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ClassList } from '@mgdis/stencil-helpers';
|
|
2
|
+
import { type IllustratedMessageDirectionType, type IllustratedMessageSizeType } from './mg-illustrated-message.conf';
|
|
2
3
|
/**
|
|
3
4
|
* @slot illustration - Illustration content
|
|
4
5
|
* @slot title - Title content
|
|
@@ -16,17 +17,30 @@ export declare class MgIllustratedMessage {
|
|
|
16
17
|
* Define illustration size
|
|
17
18
|
*/
|
|
18
19
|
size: IllustratedMessageSizeType;
|
|
20
|
+
watchSize(newValue: IllustratedMessageSizeType, oldValue?: IllustratedMessageSizeType): void;
|
|
19
21
|
/**
|
|
20
22
|
* Define component orientation
|
|
21
23
|
*/
|
|
22
|
-
direction:
|
|
24
|
+
direction: IllustratedMessageDirectionType;
|
|
25
|
+
watchDirection(newValue: IllustratedMessageDirectionType, oldValue?: IllustratedMessageDirectionType): void;
|
|
26
|
+
/**
|
|
27
|
+
* Component classes
|
|
28
|
+
*/
|
|
29
|
+
classCollection: ClassList;
|
|
30
|
+
/***********
|
|
31
|
+
* Methods *
|
|
32
|
+
***********/
|
|
33
|
+
/**
|
|
34
|
+
* Validate slots
|
|
35
|
+
*/
|
|
36
|
+
private validateSlots;
|
|
23
37
|
/*************
|
|
24
38
|
* Lifecycle *
|
|
25
39
|
*************/
|
|
26
40
|
/**
|
|
27
41
|
* Check if component props are well configured on init
|
|
28
42
|
*/
|
|
29
|
-
|
|
43
|
+
componentWillLoad(): void;
|
|
30
44
|
/**
|
|
31
45
|
* Render
|
|
32
46
|
* @returns HTML Element
|