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,284 +1,296 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { MnLanguageService } from
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Toolbar the editor renders when the consumer does not supply one. Deliberately
|
|
7
|
-
* small: it covers written prose, so there is no colour picker, no font picker
|
|
8
|
-
* and no image embedding (an image needs an upload and storage path the editor
|
|
9
|
-
* knows nothing about).
|
|
10
|
-
*/
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ElementRef, ViewEncapsulation, afterNextRender, effect, inject, input, output, signal, untracked, viewChild } from "@angular/core";
|
|
3
|
+
import { MnLanguageService } from "mn-angular-lib/core";
|
|
11
4
|
const DEFAULT_TOOLBAR = [
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
[{ header: [
|
|
6
|
+
2,
|
|
7
|
+
3,
|
|
8
|
+
false
|
|
9
|
+
] }],
|
|
10
|
+
[
|
|
11
|
+
"bold",
|
|
12
|
+
"italic",
|
|
13
|
+
"underline",
|
|
14
|
+
"strike"
|
|
15
|
+
],
|
|
16
|
+
[{ list: "ordered" }, { list: "bullet" }],
|
|
17
|
+
["blockquote", "code-block"],
|
|
18
|
+
["link"],
|
|
19
|
+
["clean"]
|
|
18
20
|
];
|
|
19
|
-
/** Where each control sits in the toolbar Quill builds. */
|
|
20
21
|
const CONTROL_SELECTORS = {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
textStyle: ".ql-header .ql-picker-label",
|
|
23
|
+
bold: "button.ql-bold",
|
|
24
|
+
italic: "button.ql-italic",
|
|
25
|
+
underline: "button.ql-underline",
|
|
26
|
+
strike: "button.ql-strike",
|
|
27
|
+
orderedList: "button.ql-list[value=\"ordered\"]",
|
|
28
|
+
bulletList: "button.ql-list[value=\"bullet\"]",
|
|
29
|
+
blockquote: "button.ql-blockquote",
|
|
30
|
+
codeBlock: "button.ql-code-block",
|
|
31
|
+
link: "button.ql-link",
|
|
32
|
+
clean: "button.ql-clean"
|
|
32
33
|
};
|
|
33
|
-
/** Hover labels used when the consumer supplies neither a label nor a key. */
|
|
34
34
|
const DEFAULT_LABELS = {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
35
|
+
textStyle: "Text style",
|
|
36
|
+
bold: "Bold",
|
|
37
|
+
italic: "Italic",
|
|
38
|
+
underline: "Underline",
|
|
39
|
+
strike: "Strikethrough",
|
|
40
|
+
orderedList: "Numbered list",
|
|
41
|
+
bulletList: "Bulleted list",
|
|
42
|
+
blockquote: "Quote",
|
|
43
|
+
codeBlock: "Code block",
|
|
44
|
+
link: "Link",
|
|
45
|
+
clean: "Clear formatting"
|
|
46
46
|
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
47
|
+
const EMPTY_DOCUMENT = "<p><br></p>";
|
|
48
|
+
var MnRichTextEditor = class MnRichTextEditor {
|
|
49
|
+
content = input("", ...ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []);
|
|
50
|
+
placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
51
|
+
ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
52
|
+
toolbar = input(DEFAULT_TOOLBAR, ...ngDevMode ? [{ debugName: "toolbar" }] : /* istanbul ignore next */ []);
|
|
53
|
+
labels = input({}, ...ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []);
|
|
54
|
+
labelKeys = input({}, ...ngDevMode ? [{ debugName: "labelKeys" }] : /* istanbul ignore next */ []);
|
|
55
|
+
editorClass = input("[&_.ql-editor]:max-h-104 [&_.ql-editor]:min-h-72 [&_.ql-editor]:overflow-y-auto", ...ngDevMode ? [{ debugName: "editorClass" }] : /* istanbul ignore next */ []);
|
|
56
|
+
contentChange = output();
|
|
57
|
+
chromeClass = "[&_.ql-container.ql-snow]:rounded-b-xl [&_.ql-container.ql-snow]:border-base-300 [&_.ql-container.ql-snow]:bg-base-100 [&_.ql-container.ql-snow]:text-base [&_.ql-toolbar.ql-snow]:rounded-t-xl [&_.ql-toolbar.ql-snow]:border-base-300 [&_.ql-toolbar.ql-snow]:bg-base-100";
|
|
58
|
+
host = inject(ElementRef);
|
|
59
|
+
lang = inject(MnLanguageService);
|
|
60
|
+
editorHost = viewChild.required("editorHost", ...ngDevMode ? [{ debugName: "editorHost" }] : /* istanbul ignore next */ []);
|
|
61
|
+
quill = null;
|
|
62
|
+
destroyed = false;
|
|
63
|
+
lastEmitted = signal("", ...ngDevMode ? [{ debugName: "lastEmitted" }] : /* istanbul ignore next */ []);
|
|
64
|
+
constructor() {
|
|
65
|
+
afterNextRender(() => void this.createEditor());
|
|
66
|
+
effect(() => {
|
|
67
|
+
const incoming = this.content();
|
|
68
|
+
if (!this.quill || incoming === untracked(this.lastEmitted)) return;
|
|
69
|
+
this.setEditorHtml(incoming);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
ngOnDestroy() {
|
|
73
|
+
this.destroyed = true;
|
|
74
|
+
this.quill = null;
|
|
75
|
+
}
|
|
76
|
+
focusEditor() {
|
|
77
|
+
this.quill?.focus();
|
|
78
|
+
if (!this.quill) this.host.nativeElement.querySelector(".ql-editor")?.focus();
|
|
79
|
+
}
|
|
80
|
+
async createEditor() {
|
|
81
|
+
const { default: QuillEditor } = await import("quill");
|
|
82
|
+
if (this.destroyed) return;
|
|
83
|
+
const container = this.editorHost().nativeElement;
|
|
84
|
+
this.quill = new QuillEditor(container, {
|
|
85
|
+
theme: "snow",
|
|
86
|
+
placeholder: this.placeholder(),
|
|
87
|
+
modules: { toolbar: this.toolbar() }
|
|
88
|
+
});
|
|
89
|
+
const label = this.ariaLabel();
|
|
90
|
+
if (label) this.quill.root.setAttribute("aria-label", label);
|
|
91
|
+
this.applyToolbarLabels();
|
|
92
|
+
this.setEditorHtml(this.content());
|
|
93
|
+
this.quill.on("text-change", () => this.emitCurrentHtml());
|
|
94
|
+
}
|
|
95
|
+
applyToolbarLabels() {
|
|
96
|
+
const toolbar = this.host.nativeElement.querySelector(".ql-toolbar");
|
|
97
|
+
if (!toolbar) return;
|
|
98
|
+
const labels = this.labels();
|
|
99
|
+
const keys = this.labelKeys();
|
|
100
|
+
for (const [control, selector] of Object.entries(CONTROL_SELECTORS)) {
|
|
101
|
+
const element = toolbar.querySelector(selector);
|
|
102
|
+
if (!element) continue;
|
|
103
|
+
element.classList.add("mn-rte-tooltip");
|
|
104
|
+
element.setAttribute("data-tip", this.resolveLabel(control, labels, keys));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
resolveLabel(control, labels, keys) {
|
|
108
|
+
const key = keys[control];
|
|
109
|
+
if (key) {
|
|
110
|
+
const translated = this.lang.t(key);
|
|
111
|
+
if (translated !== key) return translated;
|
|
112
|
+
}
|
|
113
|
+
return labels[control] ?? DEFAULT_LABELS[control];
|
|
114
|
+
}
|
|
115
|
+
setEditorHtml(html) {
|
|
116
|
+
if (!this.quill) return;
|
|
117
|
+
this.quill.clipboard.dangerouslyPasteHTML(html ?? "", "silent");
|
|
118
|
+
this.lastEmitted.set(this.readHtml());
|
|
119
|
+
}
|
|
120
|
+
emitCurrentHtml() {
|
|
121
|
+
const html = this.readHtml();
|
|
122
|
+
this.lastEmitted.set(html);
|
|
123
|
+
this.contentChange.emit(html);
|
|
124
|
+
}
|
|
125
|
+
readHtml() {
|
|
126
|
+
if (!this.quill) return "";
|
|
127
|
+
const html = this.quill.root.innerHTML;
|
|
128
|
+
return html === EMPTY_DOCUMENT ? "" : html;
|
|
129
|
+
}
|
|
130
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
131
|
+
minVersion: "12.0.0",
|
|
132
|
+
version: "22.2.2",
|
|
133
|
+
ngImport: i0,
|
|
134
|
+
type: MnRichTextEditor,
|
|
135
|
+
deps: [],
|
|
136
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
137
|
+
});
|
|
138
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
139
|
+
minVersion: "17.2.0",
|
|
140
|
+
version: "22.2.2",
|
|
141
|
+
type: MnRichTextEditor,
|
|
142
|
+
isStandalone: true,
|
|
143
|
+
selector: "mn-rich-text-editor",
|
|
144
|
+
inputs: {
|
|
145
|
+
content: {
|
|
146
|
+
classPropertyName: "content",
|
|
147
|
+
publicName: "content",
|
|
148
|
+
isSignal: true,
|
|
149
|
+
isRequired: false,
|
|
150
|
+
transformFunction: null
|
|
151
|
+
},
|
|
152
|
+
placeholder: {
|
|
153
|
+
classPropertyName: "placeholder",
|
|
154
|
+
publicName: "placeholder",
|
|
155
|
+
isSignal: true,
|
|
156
|
+
isRequired: false,
|
|
157
|
+
transformFunction: null
|
|
158
|
+
},
|
|
159
|
+
ariaLabel: {
|
|
160
|
+
classPropertyName: "ariaLabel",
|
|
161
|
+
publicName: "ariaLabel",
|
|
162
|
+
isSignal: true,
|
|
163
|
+
isRequired: false,
|
|
164
|
+
transformFunction: null
|
|
165
|
+
},
|
|
166
|
+
toolbar: {
|
|
167
|
+
classPropertyName: "toolbar",
|
|
168
|
+
publicName: "toolbar",
|
|
169
|
+
isSignal: true,
|
|
170
|
+
isRequired: false,
|
|
171
|
+
transformFunction: null
|
|
172
|
+
},
|
|
173
|
+
labels: {
|
|
174
|
+
classPropertyName: "labels",
|
|
175
|
+
publicName: "labels",
|
|
176
|
+
isSignal: true,
|
|
177
|
+
isRequired: false,
|
|
178
|
+
transformFunction: null
|
|
179
|
+
},
|
|
180
|
+
labelKeys: {
|
|
181
|
+
classPropertyName: "labelKeys",
|
|
182
|
+
publicName: "labelKeys",
|
|
183
|
+
isSignal: true,
|
|
184
|
+
isRequired: false,
|
|
185
|
+
transformFunction: null
|
|
186
|
+
},
|
|
187
|
+
editorClass: {
|
|
188
|
+
classPropertyName: "editorClass",
|
|
189
|
+
publicName: "editorClass",
|
|
190
|
+
isSignal: true,
|
|
191
|
+
isRequired: false,
|
|
192
|
+
transformFunction: null
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
outputs: { contentChange: "contentChange" },
|
|
196
|
+
viewQueries: [{
|
|
197
|
+
propertyName: "editorHost",
|
|
198
|
+
first: true,
|
|
199
|
+
predicate: ["editorHost"],
|
|
200
|
+
descendants: true,
|
|
201
|
+
isSignal: true
|
|
202
|
+
}],
|
|
203
|
+
ngImport: i0,
|
|
204
|
+
template: "<div class=\"mn-rich-text-editor {{ chromeClass }} {{ editorClass() }}\">\n <div #editorHost></div>\n</div>\n",
|
|
205
|
+
styles: [".mn-rich-text-editor .mn-rte-tooltip{position:relative}.mn-rich-text-editor .mn-rte-tooltip[data-tip]:after{content:attr(data-tip);position:absolute;bottom:100%;left:50%;translate:-50% -.375rem;padding:.25rem .5rem;border-radius:.375rem;background-color:var(--color-secondary);color:var(--color-secondary-content);font-size:.75rem;line-height:1rem;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .15s;z-index:50}.mn-rich-text-editor .mn-rte-tooltip[data-tip]:hover:after,.mn-rich-text-editor .mn-rte-tooltip[data-tip]:focus-visible:after{opacity:1}\n"],
|
|
206
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
207
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
208
|
+
});
|
|
209
|
+
};
|
|
210
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
211
|
+
minVersion: "12.0.0",
|
|
212
|
+
version: "22.2.2",
|
|
213
|
+
ngImport: i0,
|
|
214
|
+
type: MnRichTextEditor,
|
|
215
|
+
decorators: [{
|
|
216
|
+
type: Component,
|
|
217
|
+
args: [{
|
|
218
|
+
selector: "mn-rich-text-editor",
|
|
219
|
+
standalone: true,
|
|
220
|
+
encapsulation: ViewEncapsulation.None,
|
|
221
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
222
|
+
template: "<div class=\"mn-rich-text-editor {{ chromeClass }} {{ editorClass() }}\">\n <div #editorHost></div>\n</div>\n",
|
|
223
|
+
styles: [".mn-rich-text-editor .mn-rte-tooltip{position:relative}.mn-rich-text-editor .mn-rte-tooltip[data-tip]:after{content:attr(data-tip);position:absolute;bottom:100%;left:50%;translate:-50% -.375rem;padding:.25rem .5rem;border-radius:.375rem;background-color:var(--color-secondary);color:var(--color-secondary-content);font-size:.75rem;line-height:1rem;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .15s;z-index:50}.mn-rich-text-editor .mn-rte-tooltip[data-tip]:hover:after,.mn-rich-text-editor .mn-rte-tooltip[data-tip]:focus-visible:after{opacity:1}\n"]
|
|
224
|
+
}]
|
|
225
|
+
}],
|
|
226
|
+
ctorParameters: () => [],
|
|
227
|
+
propDecorators: {
|
|
228
|
+
content: [{
|
|
229
|
+
type: i0.Input,
|
|
230
|
+
args: [{
|
|
231
|
+
isSignal: true,
|
|
232
|
+
alias: "content",
|
|
233
|
+
required: false
|
|
234
|
+
}]
|
|
235
|
+
}],
|
|
236
|
+
placeholder: [{
|
|
237
|
+
type: i0.Input,
|
|
238
|
+
args: [{
|
|
239
|
+
isSignal: true,
|
|
240
|
+
alias: "placeholder",
|
|
241
|
+
required: false
|
|
242
|
+
}]
|
|
243
|
+
}],
|
|
244
|
+
ariaLabel: [{
|
|
245
|
+
type: i0.Input,
|
|
246
|
+
args: [{
|
|
247
|
+
isSignal: true,
|
|
248
|
+
alias: "ariaLabel",
|
|
249
|
+
required: false
|
|
250
|
+
}]
|
|
251
|
+
}],
|
|
252
|
+
toolbar: [{
|
|
253
|
+
type: i0.Input,
|
|
254
|
+
args: [{
|
|
255
|
+
isSignal: true,
|
|
256
|
+
alias: "toolbar",
|
|
257
|
+
required: false
|
|
258
|
+
}]
|
|
259
|
+
}],
|
|
260
|
+
labels: [{
|
|
261
|
+
type: i0.Input,
|
|
262
|
+
args: [{
|
|
263
|
+
isSignal: true,
|
|
264
|
+
alias: "labels",
|
|
265
|
+
required: false
|
|
266
|
+
}]
|
|
267
|
+
}],
|
|
268
|
+
labelKeys: [{
|
|
269
|
+
type: i0.Input,
|
|
270
|
+
args: [{
|
|
271
|
+
isSignal: true,
|
|
272
|
+
alias: "labelKeys",
|
|
273
|
+
required: false
|
|
274
|
+
}]
|
|
275
|
+
}],
|
|
276
|
+
editorClass: [{
|
|
277
|
+
type: i0.Input,
|
|
278
|
+
args: [{
|
|
279
|
+
isSignal: true,
|
|
280
|
+
alias: "editorClass",
|
|
281
|
+
required: false
|
|
282
|
+
}]
|
|
283
|
+
}],
|
|
284
|
+
contentChange: [{
|
|
285
|
+
type: i0.Output,
|
|
286
|
+
args: ["contentChange"]
|
|
287
|
+
}],
|
|
288
|
+
editorHost: [{
|
|
289
|
+
type: i0.ViewChild,
|
|
290
|
+
args: ["editorHost", { isSignal: true }]
|
|
291
|
+
}]
|
|
292
|
+
}
|
|
293
|
+
});
|
|
283
294
|
export { MnRichTextEditor };
|
|
284
|
-
|
|
295
|
+
|
|
296
|
+
//# sourceMappingURL=mn-angular-lib-rich-text-editor.mjs.map
|