mn-angular-lib 2.0.33 → 2.0.35

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