mn-angular-lib 2.0.34 → 2.0.36
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/fesm2022/mn-angular-lib-alert.mjs +515 -527
- package/fesm2022/mn-angular-lib-alert.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-bottom-sheet.mjs +264 -357
- package/fesm2022/mn-angular-lib-bottom-sheet.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-button.mjs +819 -382
- package/fesm2022/mn-angular-lib-button.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-calendar-core.mjs +240 -365
- package/fesm2022/mn-angular-lib-calendar-core.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-calendar.mjs +1691 -1545
- package/fesm2022/mn-angular-lib-calendar.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-collection.mjs +2367 -2796
- package/fesm2022/mn-angular-lib-collection.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-core.mjs +693 -1241
- package/fesm2022/mn-angular-lib-core.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-display.mjs +679 -712
- package/fesm2022/mn-angular-lib-display.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-forms.mjs +3671 -4647
- package/fesm2022/mn-angular-lib-forms.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-keyboard.mjs +221 -190
- package/fesm2022/mn-angular-lib-keyboard.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-modal-core.mjs +711 -896
- package/fesm2022/mn-angular-lib-modal-core.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-modal-ui.mjs +2089 -2035
- package/fesm2022/mn-angular-lib-modal-ui.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-modal.mjs +76 -121
- package/fesm2022/mn-angular-lib-modal.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-rich-text-editor.mjs +289 -277
- package/fesm2022/mn-angular-lib-rich-text-editor.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-segmented.mjs +189 -241
- package/fesm2022/mn-angular-lib-segmented.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-tab.mjs +409 -642
- package/fesm2022/mn-angular-lib-tab.mjs.map +1 -1
- package/fesm2022/mn-angular-lib.mjs +16 -29
- package/package.json +1 -1
- package/types/mn-angular-lib-alert.d.ts +239 -241
- package/types/mn-angular-lib-bottom-sheet.d.ts +190 -150
- package/types/mn-angular-lib-button.d.ts +319 -317
- package/types/mn-angular-lib-calendar-core.d.ts +199 -209
- package/types/mn-angular-lib-calendar.d.ts +656 -511
- package/types/mn-angular-lib-collection.d.ts +1649 -1585
- package/types/mn-angular-lib-core.d.ts +524 -535
- package/types/mn-angular-lib-display.d.ts +946 -886
- package/types/mn-angular-lib-forms.d.ts +3012 -3013
- package/types/mn-angular-lib-keyboard.d.ts +125 -85
- package/types/mn-angular-lib-modal-core.d.ts +978 -994
- package/types/mn-angular-lib-modal-ui.d.ts +541 -493
- package/types/mn-angular-lib-modal.d.ts +24 -27
- package/types/mn-angular-lib-rich-text-editor.d.ts +131 -98
- package/types/mn-angular-lib-segmented.d.ts +354 -341
- package/types/mn-angular-lib-tab.d.ts +345 -336
- package/types/mn-angular-lib.d.ts +16 -16
- package/fesm2022/mn-angular-lib.mjs.map +0 -1
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as i0 from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { MnModalService };
|
|
1
|
+
import { MnModalRef, ModalConfig } from "mn-angular-lib/modal-core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MnModalService {
|
|
4
|
+
private readonly appRef;
|
|
5
|
+
private readonly injector;
|
|
6
|
+
private readonly modalStack;
|
|
7
|
+
constructor();
|
|
8
|
+
/**
|
|
9
|
+
* Loads the modal components ahead of the first `open()`. After it resolves, `open()` renders
|
|
10
|
+
* synchronously; tests await it before asserting on the DOM.
|
|
11
|
+
* @returns Resolves once the components are loaded.
|
|
12
|
+
*/
|
|
13
|
+
preload(): Promise<void>;
|
|
14
|
+
open<TResult = unknown, TModel = unknown>(config: ModalConfig<TResult, TModel>): MnModalRef<TResult>;
|
|
15
|
+
/**
|
|
16
|
+
* Creates the shell for a modal, stacks it on top of any open modal and attaches it to the app.
|
|
17
|
+
* @param ui The loaded modal components.
|
|
18
|
+
* @param modalRef The ref returned from `open()`.
|
|
19
|
+
* @param workingConfig The mutable config shared by the ref and the shell.
|
|
20
|
+
*/
|
|
21
|
+
private render;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MnModalService, never>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
24
|
+
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { OnDestroy } from
|
|
3
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { OnDestroy } from "@angular/core";
|
|
4
3
|
/**
|
|
5
4
|
* One control on the editor's default toolbar.
|
|
6
5
|
*
|
|
7
6
|
* The list doubles as the key space for {@link MnRichTextEditorLabels}: a label
|
|
8
7
|
* can only be given for a control the default toolbar actually renders.
|
|
9
8
|
*/
|
|
10
|
-
type MnRichTextEditorControl = 'textStyle' | 'bold' | 'italic' | 'underline' | 'strike' | 'orderedList' | 'bulletList' | 'blockquote' | 'codeBlock' | 'link' | 'clean';
|
|
9
|
+
export type MnRichTextEditorControl = 'textStyle' | 'bold' | 'italic' | 'underline' | 'strike' | 'orderedList' | 'bulletList' | 'blockquote' | 'codeBlock' | 'link' | 'clean';
|
|
11
10
|
/**
|
|
12
11
|
* Hover labels for the toolbar controls.
|
|
13
12
|
*
|
|
@@ -15,7 +14,7 @@ type MnRichTextEditorControl = 'textStyle' | 'bold' | 'italic' | 'underline' | '
|
|
|
15
14
|
* `MnLanguageService` (`labelKeys`); anything left out falls back to the
|
|
16
15
|
* component's built-in English label.
|
|
17
16
|
*/
|
|
18
|
-
type MnRichTextEditorLabels = Partial<Record<MnRichTextEditorControl, string>>;
|
|
17
|
+
export type MnRichTextEditorLabels = Partial<Record<MnRichTextEditorControl, string>>;
|
|
19
18
|
/**
|
|
20
19
|
* A Quill toolbar definition: rows of control descriptors, exactly as Quill's
|
|
21
20
|
* `modules.toolbar` option takes them.
|
|
@@ -24,8 +23,7 @@ type MnRichTextEditorLabels = Partial<Record<MnRichTextEditorControl, string>>;
|
|
|
24
23
|
* (`{ header: [2, 3, false] }`) in the same row, and the library does not export
|
|
25
24
|
* a type for it.
|
|
26
25
|
*/
|
|
27
|
-
type MnRichTextEditorToolbar = readonly (readonly unknown[])[];
|
|
28
|
-
|
|
26
|
+
export type MnRichTextEditorToolbar = readonly (readonly unknown[])[];
|
|
29
27
|
/**
|
|
30
28
|
* Thin wrapper around the {@link Quill} rich-text editor.
|
|
31
29
|
*
|
|
@@ -64,94 +62,129 @@ type MnRichTextEditorToolbar = readonly (readonly unknown[])[];
|
|
|
64
62
|
* </mn-rich-text-editor>
|
|
65
63
|
* ```
|
|
66
64
|
*/
|
|
67
|
-
declare class MnRichTextEditor implements OnDestroy {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
65
|
+
export declare class MnRichTextEditor implements OnDestroy {
|
|
66
|
+
/**
|
|
67
|
+
* The initial HTML content. Later changes are applied only when they differ
|
|
68
|
+
* from what the editor currently holds, so a parent echoing the emitted value
|
|
69
|
+
* back never moves the caret.
|
|
70
|
+
*/
|
|
71
|
+
readonly content: import("@angular/core").InputSignal<string>;
|
|
72
|
+
/** Placeholder shown while the editor is empty. */
|
|
73
|
+
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
74
|
+
/** Accessible label for the editing surface. */
|
|
75
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
76
|
+
/** Toolbar layout, in Quill's own format. Defaults to a prose-oriented set. */
|
|
77
|
+
readonly toolbar: import("@angular/core").InputSignal<MnRichTextEditorToolbar>;
|
|
78
|
+
/** Literal hover labels per toolbar control. */
|
|
79
|
+
readonly labels: import("@angular/core").InputSignal<Partial<Record<MnRichTextEditorControl, string>>>;
|
|
80
|
+
/** Translation keys per toolbar control; takes precedence over `labels`. */
|
|
81
|
+
readonly labelKeys: import("@angular/core").InputSignal<Partial<Record<MnRichTextEditorControl, string>>>;
|
|
82
|
+
/**
|
|
83
|
+
* Utilities applied to the wrapper, for sizing the writing surface. Overriding
|
|
84
|
+
* this replaces the default height limits, so pass both bounds when you do.
|
|
85
|
+
*/
|
|
86
|
+
readonly editorClass: import("@angular/core").InputSignal<string>;
|
|
87
|
+
/** Emits the editor's HTML on every user edit. */
|
|
88
|
+
readonly contentChange: import("@angular/core").OutputEmitterRef<string>;
|
|
89
|
+
/**
|
|
90
|
+
* Chrome around Quill's snow theme: the field's radius, border and surface.
|
|
91
|
+
*
|
|
92
|
+
* Descendant variants rather than a stylesheet — the utilities come from the
|
|
93
|
+
* consuming app's Tailwind build (which scans this bundle), so they follow the
|
|
94
|
+
* app's theme tokens the same way the rest of the library does.
|
|
95
|
+
*/
|
|
96
|
+
protected readonly chromeClass: string;
|
|
97
|
+
/** Host element, used to keep DOM queries inside this component. */
|
|
98
|
+
private readonly host;
|
|
99
|
+
/** Language service, used to resolve the toolbar labels from keys. */
|
|
100
|
+
private readonly lang;
|
|
101
|
+
/** The container Quill mounts into. */
|
|
102
|
+
private readonly editorHost;
|
|
103
|
+
/** The live editor instance, or null before Quill has loaded. */
|
|
104
|
+
private quill;
|
|
105
|
+
/** Whether the component is gone, so a late Quill load knows to stop. */
|
|
106
|
+
private destroyed;
|
|
107
|
+
/** The last HTML this component emitted, used to skip redundant writes. */
|
|
108
|
+
private readonly lastEmitted;
|
|
109
|
+
constructor();
|
|
110
|
+
/** Drops the editor reference so the instance can be garbage collected. */
|
|
111
|
+
ngOnDestroy(): void;
|
|
112
|
+
/** Moves focus into the editing surface. */
|
|
113
|
+
focusEditor(): void;
|
|
114
|
+
/**
|
|
115
|
+
* Loads Quill, builds the instance and wires its change handler.
|
|
116
|
+
*
|
|
117
|
+
* Nothing awaits this beyond the component itself: the surface appears once
|
|
118
|
+
* the engine has loaded, and until then the `content` effect is a no-op that
|
|
119
|
+
* the seeding below makes good.
|
|
120
|
+
*/
|
|
121
|
+
private createEditor;
|
|
122
|
+
/**
|
|
123
|
+
* Gives each toolbar control a hover label, so hovering explains what the
|
|
124
|
+
* style does. Set on the Quill-generated DOM after init; a control the current
|
|
125
|
+
* toolbar does not render is simply skipped.
|
|
126
|
+
*/
|
|
127
|
+
private applyToolbarLabels;
|
|
128
|
+
/**
|
|
129
|
+
* Picks the hover label for one control.
|
|
130
|
+
* @param control The control being labelled.
|
|
131
|
+
* @param labels Literal labels supplied by the consumer.
|
|
132
|
+
* @param keys Translation keys supplied by the consumer.
|
|
133
|
+
* @returns The translated key, the literal label, or the built-in default.
|
|
134
|
+
*/
|
|
135
|
+
private resolveLabel;
|
|
136
|
+
/**
|
|
137
|
+
* Replaces the editor content with stored HTML. Quill parses it into its own
|
|
138
|
+
* document model, which silently drops anything it has no format for — a
|
|
139
|
+
* useful extra filter on top of the consumer's sanitiser.
|
|
140
|
+
* @param html The HTML to load into the editor.
|
|
141
|
+
*/
|
|
142
|
+
private setEditorHtml;
|
|
143
|
+
/** Emits the editor's current HTML, normalising Quill's "empty" document. */
|
|
144
|
+
private emitCurrentHtml;
|
|
145
|
+
/**
|
|
146
|
+
* Reads the editor's HTML.
|
|
147
|
+
* @returns The current HTML, or an empty string when the editor is blank.
|
|
148
|
+
*/
|
|
149
|
+
private readHtml;
|
|
150
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MnRichTextEditor, never>;
|
|
151
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MnRichTextEditor, "mn-rich-text-editor", never, {
|
|
152
|
+
"content": {
|
|
153
|
+
"alias": "content";
|
|
154
|
+
"required": false;
|
|
155
|
+
"isSignal": true;
|
|
156
|
+
};
|
|
157
|
+
"placeholder": {
|
|
158
|
+
"alias": "placeholder";
|
|
159
|
+
"required": false;
|
|
160
|
+
"isSignal": true;
|
|
161
|
+
};
|
|
162
|
+
"ariaLabel": {
|
|
163
|
+
"alias": "ariaLabel";
|
|
164
|
+
"required": false;
|
|
165
|
+
"isSignal": true;
|
|
166
|
+
};
|
|
167
|
+
"toolbar": {
|
|
168
|
+
"alias": "toolbar";
|
|
169
|
+
"required": false;
|
|
170
|
+
"isSignal": true;
|
|
171
|
+
};
|
|
172
|
+
"labels": {
|
|
173
|
+
"alias": "labels";
|
|
174
|
+
"required": false;
|
|
175
|
+
"isSignal": true;
|
|
176
|
+
};
|
|
177
|
+
"labelKeys": {
|
|
178
|
+
"alias": "labelKeys";
|
|
179
|
+
"required": false;
|
|
180
|
+
"isSignal": true;
|
|
181
|
+
};
|
|
182
|
+
"editorClass": {
|
|
183
|
+
"alias": "editorClass";
|
|
184
|
+
"required": false;
|
|
185
|
+
"isSignal": true;
|
|
186
|
+
};
|
|
187
|
+
}, {
|
|
188
|
+
"contentChange": "contentChange";
|
|
189
|
+
}, never, never, true, never>;
|
|
190
|
+
}
|