@shival99/z-ui 1.9.27 → 2.0.2
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/README.md +1 -1
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +2 -2
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-avatar.mjs +187 -0
- package/fesm2022/shival99-z-ui-components-z-avatar.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs +7 -3
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-editor.mjs +649 -154
- package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs +242 -18
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-input.mjs +9 -5
- package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-marquee.mjs +70 -0
- package/fesm2022/shival99-z-ui-components-z-marquee.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-menu.mjs +12 -6
- package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-metric-card.mjs +128 -0
- package/fesm2022/shival99-z-ui-components-z-metric-card.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-select.mjs +16 -2
- package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-i18n.mjs +14 -0
- package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -1
- package/package.json +38 -23
- package/types/shival99-z-ui-components-z-autocomplete.d.ts +1 -1
- package/types/shival99-z-ui-components-z-avatar.d.ts +90 -0
- package/types/shival99-z-ui-components-z-calendar.d.ts +4 -4
- package/types/shival99-z-ui-components-z-editor.d.ts +97 -37
- package/types/shival99-z-ui-components-z-gallery.d.ts +14 -1
- package/types/shival99-z-ui-components-z-input.d.ts +1 -0
- package/types/shival99-z-ui-components-z-marquee.d.ts +35 -0
- package/types/shival99-z-ui-components-z-metric-card.d.ts +67 -0
- package/types/shival99-z-ui-components-z-select.d.ts +1 -1
- package/types/shival99-z-ui-components-z-table.d.ts +1 -1
|
@@ -1,17 +1,49 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injector, DestroyRef, output, input, signal, computed, forwardRef, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { inject, Injector, DestroyRef, viewChild, output, input, signal, computed, afterNextRender, effect, forwardRef, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
-
import * as
|
|
5
|
-
import { NgControl, NgModel, PristineChangeEvent, TouchedChangeEvent,
|
|
4
|
+
import * as i1 from '@angular/forms';
|
|
5
|
+
import { NgControl, NgModel, PristineChangeEvent, TouchedChangeEvent, FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
6
|
+
import { TranslatePipe } from '@ngx-translate/core';
|
|
7
|
+
import { ZButtonComponent } from '@shival99/z-ui/components/z-button';
|
|
8
|
+
import { ZIconComponent } from '@shival99/z-ui/components/z-icon';
|
|
9
|
+
import { ZInputComponent } from '@shival99/z-ui/components/z-input';
|
|
10
|
+
import { ZModalComponent, ZModalContentDirective } from '@shival99/z-ui/components/z-modal';
|
|
6
11
|
import { ZTranslateService } from '@shival99/z-ui/services';
|
|
7
12
|
import { zTransform, zUuid, zMergeClasses, zCreateEvent } from '@shival99/z-ui/utils';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
13
|
+
import { Editor } from '@tiptap/core';
|
|
14
|
+
import Code from '@tiptap/extension-code';
|
|
15
|
+
import HorizontalRule from '@tiptap/extension-horizontal-rule';
|
|
16
|
+
import Image from '@tiptap/extension-image';
|
|
17
|
+
import Link from '@tiptap/extension-link';
|
|
18
|
+
import Mention from '@tiptap/extension-mention';
|
|
19
|
+
import Placeholder from '@tiptap/extension-placeholder';
|
|
20
|
+
import TextAlign from '@tiptap/extension-text-align';
|
|
21
|
+
import Underline from '@tiptap/extension-underline';
|
|
22
|
+
import { Markdown } from '@tiptap/markdown';
|
|
23
|
+
import StarterKit from '@tiptap/starter-kit';
|
|
12
24
|
import { merge, filter } from 'rxjs';
|
|
13
25
|
import { cva } from 'class-variance-authority';
|
|
14
26
|
|
|
27
|
+
const Z_EDITOR_DEFAULT_TOOLBAR = [
|
|
28
|
+
{ id: 'undo', icon: 'lucideUndo', label: 'Undo' },
|
|
29
|
+
{ id: 'redo', icon: 'lucideRedo', label: 'Redo' },
|
|
30
|
+
{ id: 'bold', icon: 'lucideBold', label: 'Bold' },
|
|
31
|
+
{ id: 'italic', icon: 'lucideItalic', label: 'Italic' },
|
|
32
|
+
{ id: 'underline', icon: 'lucideUnderline', label: 'Underline' },
|
|
33
|
+
{ id: 'strike', icon: 'lucideStrikethrough', label: 'Strike' },
|
|
34
|
+
{ id: 'code', icon: 'lucideCode', label: 'Code' },
|
|
35
|
+
{ id: 'heading1', icon: 'lucideHeading1', label: 'Heading 1' },
|
|
36
|
+
{ id: 'heading2', icon: 'lucideHeading2', label: 'Heading 2' },
|
|
37
|
+
{ id: 'bulletList', icon: 'lucideList', label: 'Bullet list' },
|
|
38
|
+
{ id: 'orderedList', icon: 'lucideListOrdered', label: 'Ordered list' },
|
|
39
|
+
{ id: 'blockquote', icon: 'lucideQuote', label: 'Blockquote' },
|
|
40
|
+
{ id: 'codeBlock', icon: 'lucideFileCode', label: 'Code block' },
|
|
41
|
+
{ id: 'link', icon: 'lucideLink', label: 'Link' },
|
|
42
|
+
{ id: 'image', icon: 'lucideImage', label: 'Image' },
|
|
43
|
+
{ id: 'horizontalRule', icon: 'lucideMinus', label: 'Horizontal rule' },
|
|
44
|
+
{ id: 'clearFormatting', icon: 'lucideRemoveFormatting', label: 'Clear formatting' },
|
|
45
|
+
];
|
|
46
|
+
|
|
15
47
|
const zEditorVariants = cva([
|
|
16
48
|
'z-editor block w-full rounded-[0.375rem] border border-input bg-white shadow-xs',
|
|
17
49
|
'transition-[border-color,box-shadow,background-color,color,opacity] duration-200',
|
|
@@ -20,9 +52,9 @@ const zEditorVariants = cva([
|
|
|
20
52
|
], {
|
|
21
53
|
variants: {
|
|
22
54
|
zSize: {
|
|
23
|
-
sm: '[&_.
|
|
24
|
-
default: '[&_.
|
|
25
|
-
lg: '[&_.
|
|
55
|
+
sm: '[&_.z-editor-prosemirror]:min-h-24 [&_.z-editor-prosemirror]:text-sm',
|
|
56
|
+
default: '[&_.z-editor-prosemirror]:min-h-40 [&_.z-editor-prosemirror]:text-sm',
|
|
57
|
+
lg: '[&_.z-editor-prosemirror]:min-h-60 [&_.z-editor-prosemirror]:text-base',
|
|
26
58
|
},
|
|
27
59
|
zStatus: {
|
|
28
60
|
default: 'focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]',
|
|
@@ -30,29 +62,23 @@ const zEditorVariants = cva([
|
|
|
30
62
|
disabled: 'opacity-50 cursor-not-allowed bg-muted! text-muted-foreground',
|
|
31
63
|
readonly: 'bg-muted/50! text-muted-foreground cursor-default',
|
|
32
64
|
},
|
|
65
|
+
zPlaceholderMode: {
|
|
66
|
+
firstLine: 'z-editor-placeholder-first-line',
|
|
67
|
+
everyLine: '',
|
|
68
|
+
},
|
|
33
69
|
},
|
|
34
70
|
defaultVariants: {
|
|
35
71
|
zSize: 'default',
|
|
36
72
|
zStatus: 'default',
|
|
73
|
+
zPlaceholderMode: 'everyLine',
|
|
37
74
|
},
|
|
38
75
|
});
|
|
39
76
|
|
|
40
|
-
Quill.register('modules/resize', QuillResizeImage);
|
|
41
|
-
const DEFAULT_TOOLBAR = [
|
|
42
|
-
['bold', 'italic', 'underline', 'strike'],
|
|
43
|
-
['blockquote', 'code-block'],
|
|
44
|
-
[{ header: 1 }, { header: 2 }],
|
|
45
|
-
[{ list: 'ordered' }, { list: 'bullet' }],
|
|
46
|
-
[{ indent: '-1' }, { indent: '+1' }],
|
|
47
|
-
[{ align: [] }],
|
|
48
|
-
[{ color: [] }, { background: [] }],
|
|
49
|
-
['link', 'image'],
|
|
50
|
-
['clean'],
|
|
51
|
-
];
|
|
52
77
|
class ZEditorComponent {
|
|
53
78
|
_injector = inject(Injector);
|
|
54
79
|
_destroyRef = inject(DestroyRef);
|
|
55
80
|
_zTranslate = inject(ZTranslateService);
|
|
81
|
+
_editorHost = viewChild.required('editorHost');
|
|
56
82
|
zOnChange = output();
|
|
57
83
|
zOnFocus = output();
|
|
58
84
|
zOnBlur = output();
|
|
@@ -66,17 +92,29 @@ class ZEditorComponent {
|
|
|
66
92
|
zRequired = input(false, { ...(ngDevMode ? { debugName: "zRequired" } : {}), transform: zTransform });
|
|
67
93
|
zDisabled = input(false, { ...(ngDevMode ? { debugName: "zDisabled" } : {}), transform: zTransform });
|
|
68
94
|
zReadonly = input(false, { ...(ngDevMode ? { debugName: "zReadonly" } : {}), transform: zTransform });
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
zTheme = input('snow', ...(ngDevMode ? [{ debugName: "zTheme" }] : []));
|
|
95
|
+
zContentType = input('html', ...(ngDevMode ? [{ debugName: "zContentType" }] : []));
|
|
96
|
+
zToolbar = input(Z_EDITOR_DEFAULT_TOOLBAR, ...(ngDevMode ? [{ debugName: "zToolbar" }] : []));
|
|
97
|
+
zTipTap = input({}, ...(ngDevMode ? [{ debugName: "zTipTap" }] : []));
|
|
73
98
|
zValidators = input([], ...(ngDevMode ? [{ debugName: "zValidators" }] : []));
|
|
74
99
|
editorId = zUuid('z-editor');
|
|
100
|
+
linkInputId = zUuid('z-editor-link');
|
|
75
101
|
_value = signal('', ...(ngDevMode ? [{ debugName: "_value" }] : []));
|
|
76
102
|
_disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
|
|
77
103
|
_formControl = signal(null, ...(ngDevMode ? [{ debugName: "_formControl" }] : []));
|
|
78
104
|
_formStateVersion = signal(0, ...(ngDevMode ? [{ debugName: "_formStateVersion" }] : []));
|
|
79
105
|
_isNgModel = signal(false, ...(ngDevMode ? [{ debugName: "_isNgModel" }] : []));
|
|
106
|
+
_selectionVersion = signal(0, ...(ngDevMode ? [{ debugName: "_selectionVersion" }] : []));
|
|
107
|
+
_plainText = signal('', ...(ngDevMode ? [{ debugName: "_plainText" }] : []));
|
|
108
|
+
linkModalVisible = signal(false, ...(ngDevMode ? [{ debugName: "linkModalVisible" }] : []));
|
|
109
|
+
linkUrl = signal('', ...(ngDevMode ? [{ debugName: "linkUrl" }] : []));
|
|
110
|
+
activeLinkHref = signal('', ...(ngDevMode ? [{ debugName: "activeLinkHref" }] : []));
|
|
111
|
+
linkValidators = [
|
|
112
|
+
{
|
|
113
|
+
error: 'url',
|
|
114
|
+
message: 'i18n_z_ui_editor_invalid_url',
|
|
115
|
+
validate: value => this._normalizeUrl(String(value ?? '')) !== '',
|
|
116
|
+
},
|
|
117
|
+
];
|
|
80
118
|
uiState = signal({
|
|
81
119
|
touched: false,
|
|
82
120
|
dirty: false,
|
|
@@ -85,29 +123,29 @@ class ZEditorComponent {
|
|
|
85
123
|
_onChange = () => void 0;
|
|
86
124
|
_onTouched = () => void 0;
|
|
87
125
|
_ngControl = null;
|
|
88
|
-
|
|
126
|
+
_editor = null;
|
|
127
|
+
_pendingValue = '';
|
|
128
|
+
_linkSelection = null;
|
|
89
129
|
isDisabled = computed(() => this._disabled() || this.zDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
130
|
+
showToolbar = computed(() => this.zToolbar() !== false && !this.zReadonly() && !this.isDisabled(), ...(ngDevMode ? [{ debugName: "showToolbar" }] : []));
|
|
131
|
+
normalizedLinkUrl = computed(() => this._normalizeUrl(this.linkUrl()), ...(ngDevMode ? [{ debugName: "normalizedLinkUrl" }] : []));
|
|
132
|
+
canApplyLink = computed(() => !!this.normalizedLinkUrl(), ...(ngDevMode ? [{ debugName: "canApplyLink" }] : []));
|
|
90
133
|
effectivePlaceholder = computed(() => {
|
|
91
134
|
this._zTranslate.currentLang();
|
|
92
135
|
return this.zPlaceholder() || this._zTranslate.instant('i18n_z_ui_editor_placeholder');
|
|
93
136
|
}, ...(ngDevMode ? [{ debugName: "effectivePlaceholder" }] : []));
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
maxStack: 50,
|
|
107
|
-
userOnly: true,
|
|
108
|
-
},
|
|
109
|
-
};
|
|
110
|
-
}, ...(ngDevMode ? [{ debugName: "effectiveModules" }] : []));
|
|
137
|
+
toolbarItems = computed(() => {
|
|
138
|
+
this._selectionVersion();
|
|
139
|
+
const toolbar = this.zToolbar();
|
|
140
|
+
if (toolbar === false) {
|
|
141
|
+
return [];
|
|
142
|
+
}
|
|
143
|
+
return toolbar.map(item => ({
|
|
144
|
+
...item,
|
|
145
|
+
active: this._isToolbarCommandActive(item.id),
|
|
146
|
+
disabled: this._isToolbarCommandDisabled(item.id),
|
|
147
|
+
}));
|
|
148
|
+
}, ...(ngDevMode ? [{ debugName: "toolbarItems" }] : []));
|
|
111
149
|
_shouldShowValidation = computed(() => {
|
|
112
150
|
const control = this._formControl();
|
|
113
151
|
this._formStateVersion();
|
|
@@ -121,38 +159,36 @@ class ZEditorComponent {
|
|
|
121
159
|
}, ...(ngDevMode ? [{ debugName: "_shouldShowValidation" }] : []));
|
|
122
160
|
_getValidationErrors() {
|
|
123
161
|
const errors = [];
|
|
124
|
-
const
|
|
162
|
+
const plainText = this._plainText().trim();
|
|
163
|
+
const valueText = this._serializeValueAsText();
|
|
125
164
|
const validators = this.zValidators();
|
|
126
165
|
if (!this._shouldShowValidation()) {
|
|
127
166
|
return errors;
|
|
128
167
|
}
|
|
129
|
-
// Check zRequired independently (works with ngModel without formControlName)
|
|
130
168
|
const isRequired = this.zRequired() || this._formControl()?.errors?.['required'];
|
|
131
|
-
if (isRequired &&
|
|
169
|
+
if (isRequired && !plainText && this._isEditorEmpty()) {
|
|
132
170
|
this._zTranslate.currentLang();
|
|
133
171
|
errors.push(this._zTranslate.instant('i18n_z_ui_editor_required'));
|
|
134
172
|
}
|
|
135
173
|
for (const validator of validators) {
|
|
136
|
-
// Skip required check here since we already checked above
|
|
137
174
|
if (validator.error === 'required') {
|
|
138
175
|
continue;
|
|
139
176
|
}
|
|
140
|
-
if (validator.minLength &&
|
|
177
|
+
if (validator.minLength && valueText.length < validator.minLength) {
|
|
141
178
|
errors.push(validator.message);
|
|
142
179
|
continue;
|
|
143
180
|
}
|
|
144
|
-
if (validator.maxLength &&
|
|
181
|
+
if (validator.maxLength && valueText.length > validator.maxLength) {
|
|
145
182
|
errors.push(validator.message);
|
|
146
183
|
continue;
|
|
147
184
|
}
|
|
148
|
-
if (validator.pattern && !validator.pattern.test(
|
|
185
|
+
if (validator.pattern && !validator.pattern.test(valueText)) {
|
|
149
186
|
errors.push(validator.message);
|
|
150
187
|
}
|
|
151
188
|
}
|
|
152
189
|
return errors;
|
|
153
190
|
}
|
|
154
191
|
hasError = computed(() => {
|
|
155
|
-
// Custom error from setErrorMessage takes priority
|
|
156
192
|
if (this._customError()) {
|
|
157
193
|
return true;
|
|
158
194
|
}
|
|
@@ -168,7 +204,6 @@ class ZEditorComponent {
|
|
|
168
204
|
return control.invalid && this._shouldShowValidation();
|
|
169
205
|
}, ...(ngDevMode ? [{ debugName: "hasError" }] : []));
|
|
170
206
|
errorMessage = computed(() => {
|
|
171
|
-
// Custom error from setErrorMessage takes priority
|
|
172
207
|
const customError = this._customError();
|
|
173
208
|
if (customError) {
|
|
174
209
|
return customError;
|
|
@@ -211,11 +246,29 @@ class ZEditorComponent {
|
|
|
211
246
|
return 'default';
|
|
212
247
|
}, ...(ngDevMode ? [{ debugName: "currentStatus" }] : []));
|
|
213
248
|
wrapperClasses = computed(() => 'z-editor-wrapper flex w-full flex-col gap-2', ...(ngDevMode ? [{ debugName: "wrapperClasses" }] : []));
|
|
214
|
-
labelClasses = computed(() => zMergeClasses('mb-1.5 block text-sm font-medium text-foreground', this.zLabelClass()), ...(ngDevMode ? [{ debugName: "labelClasses" }] : []));
|
|
215
249
|
editorClasses = computed(() => zMergeClasses(zEditorVariants({
|
|
216
250
|
zSize: this.zSize(),
|
|
217
251
|
zStatus: this.currentStatus(),
|
|
252
|
+
zPlaceholderMode: this._placeholderMode(),
|
|
218
253
|
}), this.class()), ...(ngDevMode ? [{ debugName: "editorClasses" }] : []));
|
|
254
|
+
constructor() {
|
|
255
|
+
afterNextRender(() => {
|
|
256
|
+
this._createEditor();
|
|
257
|
+
});
|
|
258
|
+
effect(() => {
|
|
259
|
+
const editor = this._editor;
|
|
260
|
+
const editable = !this.isDisabled() && !this.zReadonly();
|
|
261
|
+
if (!editor || editor.isEditable === editable) {
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
editor.setEditable(editable);
|
|
265
|
+
this._selectionVersion.update(v => v + 1);
|
|
266
|
+
});
|
|
267
|
+
this._destroyRef.onDestroy(() => {
|
|
268
|
+
this._editor?.destroy();
|
|
269
|
+
this._editor = null;
|
|
270
|
+
});
|
|
271
|
+
}
|
|
219
272
|
ngOnInit() {
|
|
220
273
|
queueMicrotask(() => {
|
|
221
274
|
try {
|
|
@@ -235,10 +288,16 @@ class ZEditorComponent {
|
|
|
235
288
|
this._ngControl = null;
|
|
236
289
|
}
|
|
237
290
|
});
|
|
238
|
-
setTimeout(() => this._emitControl());
|
|
239
291
|
}
|
|
240
292
|
writeValue(value) {
|
|
241
|
-
|
|
293
|
+
const nextValue = value || '';
|
|
294
|
+
this._pendingValue = nextValue;
|
|
295
|
+
this._value.set(nextValue);
|
|
296
|
+
if (!this._editor || this._isCurrentEditorContent(nextValue)) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
this._editor.commands.setContent(nextValue, { emitUpdate: false });
|
|
300
|
+
this._refreshEditorState();
|
|
242
301
|
}
|
|
243
302
|
registerOnChange(fn) {
|
|
244
303
|
this._onChange = fn;
|
|
@@ -248,20 +307,160 @@ class ZEditorComponent {
|
|
|
248
307
|
}
|
|
249
308
|
setDisabledState(isDisabled) {
|
|
250
309
|
this._disabled.set(isDisabled);
|
|
310
|
+
this._editor?.setEditable(!isDisabled && !this.zReadonly());
|
|
311
|
+
}
|
|
312
|
+
onToolbarClick(command) {
|
|
313
|
+
const editor = this._editor;
|
|
314
|
+
if (!editor || this._isToolbarCommandDisabled(command)) {
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
switch (command) {
|
|
318
|
+
case 'bold':
|
|
319
|
+
editor.chain().focus().toggleBold().run();
|
|
320
|
+
break;
|
|
321
|
+
case 'italic':
|
|
322
|
+
editor.chain().focus().toggleItalic().run();
|
|
323
|
+
break;
|
|
324
|
+
case 'underline':
|
|
325
|
+
editor.chain().focus().toggleUnderline().run();
|
|
326
|
+
break;
|
|
327
|
+
case 'strike':
|
|
328
|
+
editor.chain().focus().toggleStrike().run();
|
|
329
|
+
break;
|
|
330
|
+
case 'code':
|
|
331
|
+
editor.chain().focus().toggleCode().run();
|
|
332
|
+
break;
|
|
333
|
+
case 'heading1':
|
|
334
|
+
editor.chain().focus().toggleHeading({ level: 1 }).run();
|
|
335
|
+
break;
|
|
336
|
+
case 'heading2':
|
|
337
|
+
editor.chain().focus().toggleHeading({ level: 2 }).run();
|
|
338
|
+
break;
|
|
339
|
+
case 'paragraph':
|
|
340
|
+
editor.chain().focus().setParagraph().run();
|
|
341
|
+
break;
|
|
342
|
+
case 'bulletList':
|
|
343
|
+
editor.chain().focus().toggleBulletList().run();
|
|
344
|
+
break;
|
|
345
|
+
case 'orderedList':
|
|
346
|
+
editor.chain().focus().toggleOrderedList().run();
|
|
347
|
+
break;
|
|
348
|
+
case 'blockquote':
|
|
349
|
+
editor.chain().focus().toggleBlockquote().run();
|
|
350
|
+
break;
|
|
351
|
+
case 'codeBlock':
|
|
352
|
+
editor.chain().focus().toggleCodeBlock().run();
|
|
353
|
+
break;
|
|
354
|
+
case 'horizontalRule':
|
|
355
|
+
editor.chain().focus().setHorizontalRule().run();
|
|
356
|
+
break;
|
|
357
|
+
case 'link':
|
|
358
|
+
this._toggleLink();
|
|
359
|
+
break;
|
|
360
|
+
case 'image':
|
|
361
|
+
this._insertImage();
|
|
362
|
+
break;
|
|
363
|
+
case 'undo':
|
|
364
|
+
editor.chain().focus().undo().run();
|
|
365
|
+
break;
|
|
366
|
+
case 'redo':
|
|
367
|
+
editor.chain().focus().redo().run();
|
|
368
|
+
break;
|
|
369
|
+
case 'clearFormatting':
|
|
370
|
+
editor.chain().focus().clearNodes().unsetAllMarks().run();
|
|
371
|
+
break;
|
|
372
|
+
}
|
|
373
|
+
this._refreshEditorState();
|
|
374
|
+
}
|
|
375
|
+
_createEditor() {
|
|
376
|
+
if (this._editor) {
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
const host = this._editorHost().nativeElement;
|
|
380
|
+
const tiptapOptions = this.zTipTap();
|
|
381
|
+
const placeholderConfig = this._placeholderConfig();
|
|
382
|
+
this._editor = new Editor({
|
|
383
|
+
element: host,
|
|
384
|
+
content: this._pendingValue,
|
|
385
|
+
editable: !this.isDisabled() && !this.zReadonly(),
|
|
386
|
+
extensions: [
|
|
387
|
+
this.zContentType() === 'markdown' &&
|
|
388
|
+
Markdown.configure({
|
|
389
|
+
markedOptions: {
|
|
390
|
+
gfm: true,
|
|
391
|
+
},
|
|
392
|
+
}),
|
|
393
|
+
StarterKit.configure({
|
|
394
|
+
code: false,
|
|
395
|
+
horizontalRule: false,
|
|
396
|
+
link: false,
|
|
397
|
+
dropcursor: {
|
|
398
|
+
color: 'var(--primary)',
|
|
399
|
+
width: 2,
|
|
400
|
+
},
|
|
401
|
+
...tiptapOptions.starterKit,
|
|
402
|
+
}),
|
|
403
|
+
Code.extend({
|
|
404
|
+
excludes: 'code',
|
|
405
|
+
}),
|
|
406
|
+
Underline,
|
|
407
|
+
TextAlign.configure({
|
|
408
|
+
types: ['heading', 'paragraph'],
|
|
409
|
+
}),
|
|
410
|
+
Link.configure({
|
|
411
|
+
openOnClick: false,
|
|
412
|
+
...tiptapOptions.link,
|
|
413
|
+
}),
|
|
414
|
+
HorizontalRule,
|
|
415
|
+
tiptapOptions.image !== false &&
|
|
416
|
+
Image.configure(typeof tiptapOptions.image === 'boolean' ? {} : tiptapOptions.image),
|
|
417
|
+
tiptapOptions.mention !== false &&
|
|
418
|
+
Mention.configure({
|
|
419
|
+
HTMLAttributes: {
|
|
420
|
+
class: 'mention',
|
|
421
|
+
},
|
|
422
|
+
...(typeof tiptapOptions.mention === 'boolean' ? {} : tiptapOptions.mention),
|
|
423
|
+
}),
|
|
424
|
+
Placeholder.configure({
|
|
425
|
+
placeholder: this.effectivePlaceholder(),
|
|
426
|
+
showOnlyWhenEditable: false,
|
|
427
|
+
showOnlyCurrent: true,
|
|
428
|
+
...placeholderConfig,
|
|
429
|
+
}),
|
|
430
|
+
...(tiptapOptions.extensions ?? []),
|
|
431
|
+
].filter(extension => !!extension),
|
|
432
|
+
editorProps: {
|
|
433
|
+
attributes: {
|
|
434
|
+
class: 'z-editor-prosemirror',
|
|
435
|
+
autocomplete: 'off',
|
|
436
|
+
autocorrect: 'off',
|
|
437
|
+
autocapitalize: 'off',
|
|
438
|
+
translate: 'no',
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
onUpdate: () => this._handleEditorUpdate(),
|
|
442
|
+
onSelectionUpdate: () => this._refreshEditorState(),
|
|
443
|
+
onTransaction: () => this._refreshEditorState(),
|
|
444
|
+
onFocus: () => this._handleFocus(),
|
|
445
|
+
onBlur: () => this._handleBlur(),
|
|
446
|
+
});
|
|
447
|
+
this._refreshEditorState();
|
|
448
|
+
this._emitControl();
|
|
251
449
|
}
|
|
252
|
-
|
|
253
|
-
const
|
|
254
|
-
this._value.set(
|
|
450
|
+
_handleEditorUpdate() {
|
|
451
|
+
const value = this._getSerializedContent();
|
|
452
|
+
this._value.set(value);
|
|
255
453
|
this.uiState.update(s => ({ ...s, dirty: true }));
|
|
256
|
-
this._onChange(
|
|
257
|
-
this.zOnChange.emit(
|
|
454
|
+
this._onChange(value);
|
|
455
|
+
this.zOnChange.emit(value);
|
|
456
|
+
this._refreshEditorState();
|
|
258
457
|
}
|
|
259
|
-
|
|
458
|
+
_handleFocus() {
|
|
260
459
|
const focusEvent = new FocusEvent('focus');
|
|
261
460
|
this.zOnFocus.emit(focusEvent);
|
|
262
461
|
this.zEvent.emit(zCreateEvent('focus', focusEvent));
|
|
263
462
|
}
|
|
264
|
-
|
|
463
|
+
_handleBlur() {
|
|
265
464
|
if (this.uiState().dirty) {
|
|
266
465
|
this.uiState.update(s => ({ ...s, touched: true }));
|
|
267
466
|
}
|
|
@@ -270,85 +469,254 @@ class ZEditorComponent {
|
|
|
270
469
|
this.zOnBlur.emit(blurEvent);
|
|
271
470
|
this.zEvent.emit(zCreateEvent('blur', blurEvent));
|
|
272
471
|
}
|
|
273
|
-
|
|
274
|
-
|
|
472
|
+
_emitControl() {
|
|
473
|
+
const control = {
|
|
474
|
+
focus: () => this._editor?.commands.focus(),
|
|
475
|
+
blur: () => this._editor?.commands.blur(),
|
|
476
|
+
clear: () => this._setEditorContent(''),
|
|
477
|
+
setContent: content => this._setEditorContent(content),
|
|
478
|
+
getContent: () => this._getSerializedContent(),
|
|
479
|
+
getHTML: () => this._editor?.getHTML() ?? '',
|
|
480
|
+
getJSON: () => this._editor?.getJSON() ?? { type: 'doc', content: [] },
|
|
481
|
+
getMarkdown: () => this._getMarkdown(),
|
|
482
|
+
getText: () => this._editor?.getText() ?? '',
|
|
483
|
+
getLength: () => this._editor?.state.doc.content.size ?? 0,
|
|
484
|
+
getEditor: () => this._editor,
|
|
485
|
+
valid: () => this._validateControl(),
|
|
486
|
+
validate: () => !this._validateControl(),
|
|
487
|
+
reset: () => {
|
|
488
|
+
this._customError.set(null);
|
|
489
|
+
this.uiState.set({ touched: false, dirty: false });
|
|
490
|
+
this._setEditorContent('');
|
|
491
|
+
},
|
|
492
|
+
setValue: content => this._setEditorContent(content),
|
|
493
|
+
setErrorMessage: message => {
|
|
494
|
+
this._customError.set(message);
|
|
495
|
+
this._formStateVersion.update(v => v + 1);
|
|
496
|
+
},
|
|
497
|
+
hasError: this.hasError,
|
|
498
|
+
value: this._value.asReadonly(),
|
|
499
|
+
errorMessage: this.errorMessage,
|
|
500
|
+
};
|
|
501
|
+
this.zControl.emit(control);
|
|
502
|
+
}
|
|
503
|
+
_setEditorContent(content) {
|
|
504
|
+
this._pendingValue = content;
|
|
505
|
+
this._editor?.commands.setContent(content, { emitUpdate: false });
|
|
506
|
+
const value = this._getSerializedContent();
|
|
507
|
+
this._value.set(value);
|
|
508
|
+
this._plainText.set(this._editor?.getText() ?? '');
|
|
509
|
+
this._onChange(value);
|
|
510
|
+
this.zOnChange.emit(value);
|
|
511
|
+
this._refreshEditorState();
|
|
512
|
+
}
|
|
513
|
+
_validateControl() {
|
|
514
|
+
this.uiState.set({ touched: true, dirty: true });
|
|
515
|
+
this._formControl()?.markAsDirty();
|
|
516
|
+
this._formControl()?.markAsTouched();
|
|
517
|
+
this._formControl()?.updateValueAndValidity({ onlySelf: true });
|
|
518
|
+
this._formStateVersion.update(v => v + 1);
|
|
519
|
+
return !this.hasError();
|
|
520
|
+
}
|
|
521
|
+
_getSerializedContent() {
|
|
522
|
+
const editor = this._editor;
|
|
523
|
+
if (!editor) {
|
|
524
|
+
return this._value();
|
|
525
|
+
}
|
|
526
|
+
if (this.zContentType() === 'json') {
|
|
527
|
+
return editor.getJSON();
|
|
528
|
+
}
|
|
529
|
+
if (this.zContentType() === 'markdown') {
|
|
530
|
+
return this._getMarkdown();
|
|
531
|
+
}
|
|
532
|
+
return editor.getHTML();
|
|
533
|
+
}
|
|
534
|
+
_getMarkdown() {
|
|
535
|
+
const editor = this._editor;
|
|
536
|
+
return editor?.getMarkdown?.() ?? this._editor?.getText() ?? '';
|
|
537
|
+
}
|
|
538
|
+
_serializeValueAsText() {
|
|
539
|
+
const value = this._value();
|
|
540
|
+
if (typeof value === 'string') {
|
|
541
|
+
return value;
|
|
542
|
+
}
|
|
543
|
+
return JSON.stringify(value);
|
|
544
|
+
}
|
|
545
|
+
_refreshEditorState() {
|
|
546
|
+
this._plainText.set(this._editor?.getText() ?? '');
|
|
547
|
+
this._selectionVersion.update(v => v + 1);
|
|
548
|
+
this._formStateVersion.update(v => v + 1);
|
|
275
549
|
}
|
|
276
|
-
|
|
277
|
-
this.
|
|
550
|
+
_isEditorEmpty() {
|
|
551
|
+
const editor = this._editor;
|
|
552
|
+
if (editor) {
|
|
553
|
+
return editor.isEmpty;
|
|
554
|
+
}
|
|
555
|
+
const value = this._value();
|
|
556
|
+
if (typeof value === 'string') {
|
|
557
|
+
return !value || value === '<p></p>' || value === '<p><br></p>';
|
|
558
|
+
}
|
|
559
|
+
return false;
|
|
278
560
|
}
|
|
279
|
-
|
|
280
|
-
this.
|
|
281
|
-
|
|
561
|
+
_isCurrentEditorContent(content) {
|
|
562
|
+
const editor = this._editor;
|
|
563
|
+
if (!editor) {
|
|
564
|
+
return false;
|
|
565
|
+
}
|
|
566
|
+
if (this.zContentType() === 'json') {
|
|
567
|
+
return JSON.stringify(editor.getJSON()) === JSON.stringify(content);
|
|
568
|
+
}
|
|
569
|
+
return editor.getHTML() === String(content);
|
|
282
570
|
}
|
|
283
|
-
|
|
284
|
-
this.
|
|
285
|
-
|
|
571
|
+
_isToolbarCommandActive(command) {
|
|
572
|
+
const editor = this._editor;
|
|
573
|
+
if (!editor || !editor.isEditable) {
|
|
574
|
+
return false;
|
|
575
|
+
}
|
|
576
|
+
switch (command) {
|
|
577
|
+
case 'bold':
|
|
578
|
+
case 'italic':
|
|
579
|
+
case 'underline':
|
|
580
|
+
case 'strike':
|
|
581
|
+
case 'code':
|
|
582
|
+
case 'bulletList':
|
|
583
|
+
case 'orderedList':
|
|
584
|
+
case 'blockquote':
|
|
585
|
+
case 'codeBlock':
|
|
586
|
+
case 'link':
|
|
587
|
+
return editor.isActive(command);
|
|
588
|
+
case 'heading1':
|
|
589
|
+
return editor.isActive('heading', { level: 1 });
|
|
590
|
+
case 'heading2':
|
|
591
|
+
return editor.isActive('heading', { level: 2 });
|
|
592
|
+
case 'paragraph':
|
|
593
|
+
return editor.isActive('paragraph');
|
|
594
|
+
default:
|
|
595
|
+
return false;
|
|
596
|
+
}
|
|
286
597
|
}
|
|
287
|
-
|
|
288
|
-
|
|
598
|
+
_isToolbarCommandDisabled(command) {
|
|
599
|
+
const editor = this._editor;
|
|
600
|
+
if (!editor || !editor.isEditable || this.isDisabled() || this.zReadonly()) {
|
|
601
|
+
return true;
|
|
602
|
+
}
|
|
603
|
+
switch (command) {
|
|
604
|
+
case 'undo':
|
|
605
|
+
return !editor.can().undo();
|
|
606
|
+
case 'redo':
|
|
607
|
+
return !editor.can().redo();
|
|
608
|
+
case 'link':
|
|
609
|
+
return editor.state.selection.empty && !editor.isActive('link');
|
|
610
|
+
default:
|
|
611
|
+
return false;
|
|
612
|
+
}
|
|
289
613
|
}
|
|
290
|
-
|
|
291
|
-
|
|
614
|
+
_toggleLink() {
|
|
615
|
+
const editor = this._editor;
|
|
616
|
+
if (!editor) {
|
|
617
|
+
return;
|
|
618
|
+
}
|
|
619
|
+
const { from, to } = editor.state.selection;
|
|
620
|
+
this._linkSelection = { from, to };
|
|
621
|
+
const href = String(editor.getAttributes('link')['href'] ?? '');
|
|
622
|
+
this.activeLinkHref.set(href);
|
|
623
|
+
this.linkUrl.set(href);
|
|
624
|
+
this.linkModalVisible.set(true);
|
|
292
625
|
}
|
|
293
|
-
|
|
294
|
-
|
|
626
|
+
closeLinkModal() {
|
|
627
|
+
this.linkModalVisible.set(false);
|
|
295
628
|
}
|
|
296
|
-
|
|
297
|
-
this.
|
|
629
|
+
onLinkUrlChange(value) {
|
|
630
|
+
this.linkUrl.set(String(value ?? ''));
|
|
298
631
|
}
|
|
299
|
-
|
|
300
|
-
this.
|
|
632
|
+
applyLink() {
|
|
633
|
+
const editor = this._editor;
|
|
634
|
+
const href = this.normalizedLinkUrl();
|
|
635
|
+
const selection = this._linkSelection;
|
|
636
|
+
if (!editor || !href || !selection) {
|
|
637
|
+
return;
|
|
638
|
+
}
|
|
639
|
+
editor.chain().focus().setTextSelection(selection).extendMarkRange('link').setLink({ href }).run();
|
|
640
|
+
this.closeLinkModal();
|
|
641
|
+
this._refreshEditorState();
|
|
301
642
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
643
|
+
_normalizeUrl(value) {
|
|
644
|
+
const trimmed = value.trim();
|
|
645
|
+
if (!trimmed) {
|
|
646
|
+
return '';
|
|
647
|
+
}
|
|
648
|
+
try {
|
|
649
|
+
const url = new URL(trimmed);
|
|
650
|
+
return url.protocol === 'http:' || url.protocol === 'https:' ? url.toString() : '';
|
|
651
|
+
}
|
|
652
|
+
catch {
|
|
653
|
+
return '';
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
removeLink() {
|
|
657
|
+
const editor = this._editor;
|
|
658
|
+
const selection = this._linkSelection;
|
|
659
|
+
if (!editor || !selection) {
|
|
660
|
+
this.closeLinkModal();
|
|
661
|
+
return;
|
|
309
662
|
}
|
|
310
|
-
|
|
663
|
+
editor.chain().focus().setTextSelection(selection).extendMarkRange('link').unsetLink().run();
|
|
664
|
+
this.closeLinkModal();
|
|
665
|
+
this._refreshEditorState();
|
|
311
666
|
}
|
|
312
|
-
|
|
313
|
-
|
|
667
|
+
_insertImage() {
|
|
668
|
+
const editor = this._editor;
|
|
669
|
+
if (!editor) {
|
|
670
|
+
return;
|
|
671
|
+
}
|
|
672
|
+
const selectionFrom = editor.state.selection.from;
|
|
673
|
+
const input = document.createElement('input');
|
|
674
|
+
input.type = 'file';
|
|
675
|
+
input.accept = 'image/*';
|
|
676
|
+
input.style.display = 'none';
|
|
677
|
+
const removeInput = () => {
|
|
678
|
+
input.remove();
|
|
679
|
+
};
|
|
680
|
+
input.addEventListener('change', () => {
|
|
681
|
+
const file = input.files?.[0];
|
|
682
|
+
if (!file) {
|
|
683
|
+
removeInput();
|
|
684
|
+
return;
|
|
685
|
+
}
|
|
686
|
+
const reader = new FileReader();
|
|
687
|
+
reader.addEventListener('load', () => {
|
|
688
|
+
const src = typeof reader.result === 'string' ? reader.result : '';
|
|
689
|
+
if (src) {
|
|
690
|
+
editor.chain().focus().setTextSelection(selectionFrom).setImage({ src, alt: file.name }).run();
|
|
691
|
+
}
|
|
692
|
+
removeInput();
|
|
693
|
+
});
|
|
694
|
+
reader.addEventListener('error', removeInput);
|
|
695
|
+
reader.readAsDataURL(file);
|
|
696
|
+
}, { once: true });
|
|
697
|
+
document.body.appendChild(input);
|
|
698
|
+
input.click();
|
|
314
699
|
}
|
|
315
|
-
|
|
316
|
-
this.
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
this._onChange('');
|
|
320
|
-
if (this._ngControl?.control) {
|
|
321
|
-
this._ngControl.control.markAsPristine();
|
|
322
|
-
this._ngControl.control.markAsUntouched();
|
|
700
|
+
_placeholderConfig() {
|
|
701
|
+
const { placeholder } = this.zTipTap();
|
|
702
|
+
if (!placeholder || typeof placeholder === 'string') {
|
|
703
|
+
return {};
|
|
323
704
|
}
|
|
705
|
+
const { mode: _mode, ...config } = placeholder;
|
|
706
|
+
return config;
|
|
324
707
|
}
|
|
325
|
-
|
|
326
|
-
this.
|
|
327
|
-
|
|
328
|
-
blur: () => this.blur(),
|
|
329
|
-
clear: () => this.clear(),
|
|
330
|
-
setContent: (content) => this.setContent(content),
|
|
331
|
-
getContent: () => this.getContent(),
|
|
332
|
-
getText: () => this.getText(),
|
|
333
|
-
getLength: () => this.getLength(),
|
|
334
|
-
valid: () => this.valid(),
|
|
335
|
-
validate: () => this.validate(),
|
|
336
|
-
reset: () => this.reset(),
|
|
337
|
-
setValue: (content) => this.setValue(content),
|
|
338
|
-
setErrorMessage: (message) => this.setErrorMessage(message),
|
|
339
|
-
hasError: this.hasError,
|
|
340
|
-
value: this._value.asReadonly(),
|
|
341
|
-
errorMessage: this.errorMessage,
|
|
342
|
-
});
|
|
708
|
+
_placeholderMode() {
|
|
709
|
+
const { placeholder } = this.zTipTap();
|
|
710
|
+
return typeof placeholder === 'object' && placeholder.mode === 'firstLine' ? 'firstLine' : 'everyLine';
|
|
343
711
|
}
|
|
344
712
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
345
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: ZEditorComponent, isStandalone: true, selector: "z-editor", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zLabel: { classPropertyName: "zLabel", publicName: "zLabel", isSignal: true, isRequired: false, transformFunction: null }, zLabelClass: { classPropertyName: "zLabelClass", publicName: "zLabelClass", isSignal: true, isRequired: false, transformFunction: null }, zPlaceholder: { classPropertyName: "zPlaceholder", publicName: "zPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, zRequired: { classPropertyName: "zRequired", publicName: "zRequired", isSignal: true, isRequired: false, transformFunction: null }, zDisabled: { classPropertyName: "zDisabled", publicName: "zDisabled", isSignal: true, isRequired: false, transformFunction: null }, zReadonly: { classPropertyName: "zReadonly", publicName: "zReadonly", isSignal: true, isRequired: false, transformFunction: null },
|
|
713
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: ZEditorComponent, isStandalone: true, selector: "z-editor", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zLabel: { classPropertyName: "zLabel", publicName: "zLabel", isSignal: true, isRequired: false, transformFunction: null }, zLabelClass: { classPropertyName: "zLabelClass", publicName: "zLabelClass", isSignal: true, isRequired: false, transformFunction: null }, zPlaceholder: { classPropertyName: "zPlaceholder", publicName: "zPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, zRequired: { classPropertyName: "zRequired", publicName: "zRequired", isSignal: true, isRequired: false, transformFunction: null }, zDisabled: { classPropertyName: "zDisabled", publicName: "zDisabled", isSignal: true, isRequired: false, transformFunction: null }, zReadonly: { classPropertyName: "zReadonly", publicName: "zReadonly", isSignal: true, isRequired: false, transformFunction: null }, zContentType: { classPropertyName: "zContentType", publicName: "zContentType", isSignal: true, isRequired: false, transformFunction: null }, zToolbar: { classPropertyName: "zToolbar", publicName: "zToolbar", isSignal: true, isRequired: false, transformFunction: null }, zTipTap: { classPropertyName: "zTipTap", publicName: "zTipTap", isSignal: true, isRequired: false, transformFunction: null }, zValidators: { classPropertyName: "zValidators", publicName: "zValidators", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zOnChange: "zOnChange", zOnFocus: "zOnFocus", zOnBlur: "zOnBlur", zControl: "zControl", zEvent: "zEvent" }, providers: [
|
|
346
714
|
{
|
|
347
715
|
provide: NG_VALUE_ACCESSOR,
|
|
348
716
|
useExisting: forwardRef(() => ZEditorComponent),
|
|
349
717
|
multi: true,
|
|
350
718
|
},
|
|
351
|
-
], exportAs: ["zEditor"], ngImport: i0, template: `
|
|
719
|
+
], viewQueries: [{ propertyName: "_editorHost", first: true, predicate: ["editorHost"], descendants: true, isSignal: true }], exportAs: ["zEditor"], ngImport: i0, template: `
|
|
352
720
|
<div [class]="wrapperClasses()" [class.z-editor-disabled]="isDisabled()" [class.z-editor-readonly]="zReadonly()">
|
|
353
721
|
@if (zLabel()) {
|
|
354
722
|
<label [for]="editorId" class="text-xs leading-none font-medium" [class]="zLabelClass()">
|
|
@@ -359,32 +727,100 @@ class ZEditorComponent {
|
|
|
359
727
|
</label>
|
|
360
728
|
}
|
|
361
729
|
|
|
362
|
-
<
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
730
|
+
<div [class]="editorClasses()">
|
|
731
|
+
@if (showToolbar()) {
|
|
732
|
+
<div class="z-editor-toolbar" role="toolbar" [attr.aria-controls]="editorId">
|
|
733
|
+
@for (item of toolbarItems(); track item.id) {
|
|
734
|
+
<button
|
|
735
|
+
type="button"
|
|
736
|
+
class="z-editor-toolbar-button"
|
|
737
|
+
[class.z-editor-toolbar-button-active]="item.active"
|
|
738
|
+
[disabled]="item.disabled"
|
|
739
|
+
[attr.aria-label]="item.label"
|
|
740
|
+
[attr.title]="item.label"
|
|
741
|
+
(click)="onToolbarClick(item.id)"
|
|
742
|
+
>
|
|
743
|
+
<i z-icon [zType]="item.icon" zSize="16"></i>
|
|
744
|
+
</button>
|
|
745
|
+
}
|
|
746
|
+
</div>
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
<div
|
|
750
|
+
#editorHost
|
|
751
|
+
[id]="editorId"
|
|
752
|
+
class="z-editor-content"
|
|
753
|
+
role="textbox"
|
|
754
|
+
[attr.aria-multiline]="true"
|
|
755
|
+
[attr.aria-readonly]="isDisabled() || zReadonly()"
|
|
756
|
+
></div>
|
|
757
|
+
</div>
|
|
376
758
|
|
|
377
759
|
@if (hasError()) {
|
|
378
760
|
<p class="text-destructive animate-in fade-in slide-in-from-top-1 m-0 text-xs duration-200">
|
|
379
761
|
{{ errorMessage() }}
|
|
380
762
|
</p>
|
|
381
763
|
}
|
|
764
|
+
|
|
765
|
+
<z-modal
|
|
766
|
+
[(zVisible)]="linkModalVisible"
|
|
767
|
+
class="z-editor-link-modal"
|
|
768
|
+
zWidth="360px"
|
|
769
|
+
[zClosable]="false"
|
|
770
|
+
[zHideHeader]="true"
|
|
771
|
+
[zHideFooter]="true"
|
|
772
|
+
>
|
|
773
|
+
<ng-template z-modal-content>
|
|
774
|
+
<div class="space-y-4">
|
|
775
|
+
<z-input
|
|
776
|
+
zType="url"
|
|
777
|
+
zLabel="URL"
|
|
778
|
+
zPlaceholder="https://example.com"
|
|
779
|
+
[zRequired]="true"
|
|
780
|
+
[zValidators]="linkValidators"
|
|
781
|
+
[ngModel]="linkUrl()"
|
|
782
|
+
(ngModelChange)="onLinkUrlChange($event)"
|
|
783
|
+
(zOnEnter)="applyLink()"
|
|
784
|
+
/>
|
|
785
|
+
|
|
786
|
+
<div class="mt-4 flex items-center justify-between gap-2">
|
|
787
|
+
<button
|
|
788
|
+
type="button"
|
|
789
|
+
z-button
|
|
790
|
+
zType="ghost"
|
|
791
|
+
zSize="sm"
|
|
792
|
+
[zDisabled]="!activeLinkHref()"
|
|
793
|
+
(click)="removeLink()"
|
|
794
|
+
>
|
|
795
|
+
{{ 'i18n_z_ui_common_remove' | translate }}
|
|
796
|
+
</button>
|
|
797
|
+
<div class="flex items-center gap-2">
|
|
798
|
+
<button type="button" z-button zType="outline" zSize="sm" (click)="closeLinkModal()">
|
|
799
|
+
{{ 'i18n_z_ui_common_cancel' | translate }}
|
|
800
|
+
</button>
|
|
801
|
+
<button type="button" z-button zSize="sm" [zDisabled]="!canApplyLink()" (click)="applyLink()">
|
|
802
|
+
{{ 'i18n_z_ui_common_apply' | translate }}
|
|
803
|
+
</button>
|
|
804
|
+
</div>
|
|
805
|
+
</div>
|
|
806
|
+
</div>
|
|
807
|
+
</ng-template>
|
|
808
|
+
</z-modal>
|
|
382
809
|
</div>
|
|
383
|
-
`, isInline: true, styles: [".ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container:not(.ql-disabled) li[data-list=checked]>.ql-ui,.ql-container:not(.ql-disabled) li[data-list=unchecked]>.ql-ui{cursor:pointer}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;counter-reset:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0}@supports (counter-set:none){.ql-editor p,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{counter-set:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor p,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{counter-reset:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor table{border-collapse:collapse}.ql-editor td{border:1px solid #000;padding:2px 5px}.ql-editor ol{padding-left:1.5em}.ql-editor li{list-style-type:none;padding-left:1.5em;position:relative}.ql-editor li>.ql-ui:before{display:inline-block;margin-left:-1.5em;margin-right:.3em;text-align:right;white-space:nowrap;width:1.2em}.ql-editor li[data-list=checked]>.ql-ui,.ql-editor li[data-list=unchecked]>.ql-ui{color:#777}.ql-editor li[data-list=bullet]>.ql-ui:before{content:\"\\2022\"}.ql-editor li[data-list=checked]>.ql-ui:before{content:\"\\2611\"}.ql-editor li[data-list=unchecked]>.ql-ui:before{content:\"\\2610\"}@supports (counter-set:none){.ql-editor li[data-list]{counter-set:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list]{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered]{counter-increment:list-0}.ql-editor li[data-list=ordered]>.ql-ui:before{content:counter(list-0,decimal) \". \"}.ql-editor li[data-list=ordered].ql-indent-1{counter-increment:list-1}.ql-editor li[data-list=ordered].ql-indent-1>.ql-ui:before{content:counter(list-1,lower-alpha) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-1{counter-set:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-2{counter-increment:list-2}.ql-editor li[data-list=ordered].ql-indent-2>.ql-ui:before{content:counter(list-2,lower-roman) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-2{counter-set:list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-3{counter-increment:list-3}.ql-editor li[data-list=ordered].ql-indent-3>.ql-ui:before{content:counter(list-3,decimal) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-3{counter-set:list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-4{counter-increment:list-4}.ql-editor li[data-list=ordered].ql-indent-4>.ql-ui:before{content:counter(list-4,lower-alpha) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-4{counter-set:list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-5{counter-increment:list-5}.ql-editor li[data-list=ordered].ql-indent-5>.ql-ui:before{content:counter(list-5,lower-roman) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-5{counter-set:list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-6{counter-increment:list-6}.ql-editor li[data-list=ordered].ql-indent-6>.ql-ui:before{content:counter(list-6,decimal) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-6{counter-set:list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-6{counter-reset:list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-7{counter-increment:list-7}.ql-editor li[data-list=ordered].ql-indent-7>.ql-ui:before{content:counter(list-7,lower-alpha) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-7{counter-set:list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-7{counter-reset:list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-8{counter-increment:list-8}.ql-editor li[data-list=ordered].ql-indent-8>.ql-ui:before{content:counter(list-8,lower-roman) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-8{counter-set:list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-8{counter-reset:list-9}}.ql-editor li[data-list=ordered].ql-indent-9{counter-increment:list-9}.ql-editor li[data-list=ordered].ql-indent-9>.ql-ui:before{content:counter(list-9,decimal) \". \"}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor li.ql-direction-rtl{padding-right:1.5em}.ql-editor li.ql-direction-rtl>.ql-ui:before{margin-left:.3em;margin-right:-1.5em;text-align:left}.ql-editor table{table-layout:fixed;width:100%}.ql-editor table td{outline:none}.ql-editor .ql-code-block-container{font-family:monospace}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor .ql-ui{position:absolute}.ql-editor.ql-blank:before{color:#0009;content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-snow.ql-toolbar:after,.ql-snow .ql-toolbar:after{clear:both;content:\"\";display:table}.ql-snow.ql-toolbar button,.ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-snow.ql-toolbar button svg,.ql-snow .ql-toolbar button svg{float:left;height:100%}.ql-snow.ql-toolbar button:active:hover,.ql-snow .ql-toolbar button:active:hover{outline:none}.ql-snow.ql-toolbar input.ql-image[type=file],.ql-snow .ql-toolbar input.ql-image[type=file]{display:none}.ql-snow.ql-toolbar button:hover,.ql-snow .ql-toolbar button:hover,.ql-snow.ql-toolbar button:focus,.ql-snow .ql-toolbar button:focus,.ql-snow.ql-toolbar button.ql-active,.ql-snow .ql-toolbar button.ql-active,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-item:hover,.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item.ql-selected{color:#06c}.ql-snow.ql-toolbar button:hover .ql-fill,.ql-snow .ql-toolbar button:hover .ql-fill,.ql-snow.ql-toolbar button:focus .ql-fill,.ql-snow .ql-toolbar button:focus .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill{fill:#06c}.ql-snow.ql-toolbar button:hover .ql-stroke,.ql-snow .ql-toolbar button:hover .ql-stroke,.ql-snow.ql-toolbar button:focus .ql-stroke,.ql-snow .ql-toolbar button:focus .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar button:hover .ql-stroke-miter,.ql-snow .ql-toolbar button:hover .ql-stroke-miter,.ql-snow.ql-toolbar button:focus .ql-stroke-miter,.ql-snow .ql-toolbar button:focus .ql-stroke-miter,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter{stroke:#06c}@media(pointer:coarse){.ql-snow.ql-toolbar button:hover:not(.ql-active),.ql-snow .ql-toolbar button:hover:not(.ql-active){color:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#444}}.ql-snow,.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:\"\";display:table}.ql-snow .ql-stroke{fill:none;stroke:#444;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#444;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-thin,.ql-snow .ql-stroke.ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor .ql-code-block-container{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor .ql-code-block-container{margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor .ql-code-block-container{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#444;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-snow .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label:before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#ccc;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=\"\"]):before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=\"\"]):before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=\"\"]):before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=\"\"]):before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=\"\"]):before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=\"\"]):before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-label:before,.ql-snow .ql-picker.ql-header .ql-picker-item:before{content:\"Normal\"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"1\"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]:before{content:\"Heading 1\"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"2\"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]:before{content:\"Heading 2\"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"3\"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]:before{content:\"Heading 3\"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"4\"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]:before{content:\"Heading 4\"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"5\"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]:before{content:\"Heading 5\"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"6\"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]:before{content:\"Heading 6\"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]:before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]:before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]:before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]:before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]:before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]:before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-label:before,.ql-snow .ql-picker.ql-font .ql-picker-item:before{content:\"Sans Serif\"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{content:\"Serif\"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{content:\"Monospace\"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-label:before,.ql-snow .ql-picker.ql-size .ql-picker-item:before{content:\"Normal\"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{content:\"Small\"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{content:\"Large\"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{content:\"Huge\"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-code-block-container{position:relative}.ql-code-block-container .ql-ui{right:5px;top:5px}.ql-toolbar.ql-snow{border:1px solid #ccc;box-sizing:border-box;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:#0003 0 2px 8px}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label,.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#ccc}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0}.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip:before{content:\"Visit URL:\";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #ccc;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action:after{border-right:1px solid #ccc;content:\"Edit\";margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove:before{content:\"Remove\";margin-left:8px}.ql-snow .ql-tooltip a{line-height:26px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action:after{border-right:0;content:\"Save\";padding-right:0}.ql-snow .ql-tooltip[data-mode=link]:before{content:\"Enter link:\"}.ql-snow .ql-tooltip[data-mode=formula]:before{content:\"Enter formula:\"}.ql-snow .ql-tooltip[data-mode=video]:before{content:\"Enter video:\"}.ql-snow a{color:#06c}.ql-container.ql-snow{border:1px solid #ccc}.z-editor-wrapper .ql-toolbar.ql-snow{border:none;border-bottom:.0625rem solid var(--border)}.z-editor-wrapper .ql-container.ql-snow{border:none}.z-editor-wrapper .ql-toolbar.ql-snow{border:none!important;border-bottom:.0625rem solid var(--border)!important;border-top-left-radius:.375rem;border-top-right-radius:.375rem;background-color:color-mix(in srgb,var(--muted) 30%,transparent);padding:.5rem}.z-editor-wrapper .ql-toolbar.ql-snow .ql-formats{margin-right:.25rem;display:inline-flex;gap:.125rem;align-items:center}.z-editor-wrapper .ql-toolbar.ql-snow button{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;border-radius:.25rem;padding:0;color:var(--muted-foreground);transition:all .15s ease}.z-editor-wrapper .ql-toolbar.ql-snow button:hover{background-color:var(--accent);color:var(--foreground)}.z-editor-wrapper .ql-toolbar.ql-snow button.ql-active{background-color:color-mix(in srgb,var(--primary) 10%,transparent);color:var(--primary)}.z-editor-wrapper .ql-toolbar.ql-snow button svg{width:1rem;height:1rem}.z-editor-wrapper .ql-toolbar.ql-snow .ql-picker{color:var(--muted-foreground);height:1.75rem}.z-editor-wrapper .ql-toolbar.ql-snow .ql-picker .ql-picker-label{display:inline-flex;align-items:center;justify-content:center;border-radius:.25rem;padding:0 8px;height:100%;transition:all .15s ease}.z-editor-wrapper .ql-toolbar.ql-snow .ql-picker .ql-picker-label:hover{background-color:var(--accent);color:var(--foreground)}.z-editor-wrapper .ql-toolbar.ql-snow .ql-picker .ql-picker-options{border-radius:.375rem;border:1px solid var(--border);background-color:var(--popover);box-shadow:0 4px 6px -1px #0000001a}.z-editor-wrapper .ql-toolbar.ql-snow .ql-picker .ql-picker-options .ql-picker-item{border-radius:.25rem;padding:.25rem 8px;transition:all .15s ease}.z-editor-wrapper .ql-toolbar.ql-snow .ql-picker .ql-picker-options .ql-picker-item:hover{background-color:var(--accent)}.z-editor-wrapper .ql-container.ql-snow{border:none!important;border-bottom-left-radius:.375rem;border-bottom-right-radius:.375rem;font-family:inherit}.z-editor-wrapper .ql-container.ql-snow .ql-editor{padding:.5rem 12px}.z-editor-wrapper .ql-container.ql-snow .ql-editor.ql-blank:before{font-style:normal;color:var(--muted-foreground)}.z-editor-wrapper .ql-container.ql-snow .ql-editor .ql-align-center{text-align:center}.z-editor-wrapper .ql-container.ql-snow .ql-editor .ql-align-center img{display:inline-block}.z-editor-wrapper .ql-container.ql-snow .ql-editor .ql-align-right{text-align:right}.z-editor-wrapper .ql-container.ql-snow .ql-editor .ql-align-right img{display:inline-block}.z-editor-wrapper .ql-container.ql-snow .ql-editor .ql-align-left,.z-editor-wrapper .ql-container.ql-snow .ql-editor .ql-align-justify{text-align:left}.z-editor-wrapper .ql-container.ql-snow .ql-editor .ql-align-left img,.z-editor-wrapper .ql-container.ql-snow .ql-editor .ql-align-justify img{display:inline-block}.z-editor-wrapper .ql-container.ql-snow .ql-editor img[style*=\"float: left\"]{margin-right:1rem;margin-bottom:.5rem}.z-editor-wrapper .ql-container.ql-snow .ql-editor img[style*=\"float: right\"]{margin-left:1rem;margin-bottom:.5rem}.z-editor-wrapper .ql-container.ql-snow .ql-editor img[style*=\"margin: auto\"],.z-editor-wrapper .ql-container.ql-snow .ql-editor img[style*=\"display: block\"]{display:block;margin-left:auto;margin-right:auto}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip{left:.5rem!important;right:auto!important;max-width:calc(100% - 1rem);display:flex;align-items:center;border-radius:.375rem;border:1px solid var(--border);background-color:var(--popover);box-shadow:0 4px 6px -1px #0000001a;padding:.375rem!important;gap:.5rem;color:var(--foreground);z-index:10}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip.ql-hidden{display:none}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip:before,.z-editor-wrapper .ql-container.ql-snow .ql-tooltip:after{display:none}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-preview{display:none}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip input[type=text]{border:1px solid var(--border);border-radius:.25rem;padding:.25rem 8px;font-size:.875rem;outline:none;background-color:var(--background);color:var(--foreground)}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip input[type=text]:focus{border-color:var(--ring);box-shadow:0 0 0 2px color-mix(in srgb,var(--ring) 30%,transparent)}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-action,.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-remove{cursor:pointer;font-size:.75rem;padding:0rem 8px;border-radius:.25rem;transition:all .15s ease;text-decoration:none;border:1px solid var(--border);background-color:var(--background);box-shadow:0 1px 2px #0000000d}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-action:hover,.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-remove:hover{background-color:var(--accent);color:var(--accent-foreground)}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-action:after,.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-remove:after{padding:0!important;margin:0!important;border:none!important}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-action{color:var(--primary)}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-remove{color:var(--destructive)}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-remove:hover{background-color:color-mix(in srgb,var(--destructive) 10%,transparent);color:var(--destructive)}:root.dark .z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-action,:root.dark .z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-remove{background-color:color-mix(in srgb,var(--input) 30%,transparent);border-color:var(--input)}:root.dark .z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-action:hover,:root.dark .z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-remove:hover{background-color:color-mix(in srgb,var(--input) 50%,transparent)}.z-editor-wrapper.z-editor-disabled .ql-toolbar,.z-editor-wrapper.z-editor-disabled .ql-container{pointer-events:none}.z-editor-wrapper.z-editor-readonly .ql-toolbar{display:none}.z-editor-wrapper.z-editor-readonly .ql-container{border-radius:.375rem}.z-editor-wrapper.z-editor-readonly .ql-editor{cursor:default}\n/*! Bundled license information:\n\nquill/dist/quill.snow.css:\n (*!\n * Quill Editor v2.0.3\n * https://quilljs.com\n * Copyright (c) 2017-2024, Slab\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n *)\n*/\n"], dependencies: [{ kind: "ngmodule", type: QuillModule }, { kind: "component", type: i1.QuillEditorComponent, selector: "quill-editor" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
810
|
+
`, isInline: true, styles: [".z-editor-wrapper .z-editor-toolbar{display:flex;flex-wrap:wrap;gap:.125rem;align-items:center;border-bottom:.0625rem solid var(--border);border-top-left-radius:.375rem;border-top-right-radius:.375rem;background-color:color-mix(in srgb,var(--muted) 30%,transparent);padding:.5rem}.z-editor-wrapper .z-editor-toolbar-button{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;border-radius:.25rem;padding:0;color:var(--muted-foreground);transition:background-color .15s ease,color .15s ease,opacity .15s ease}.z-editor-wrapper .z-editor-toolbar-button:hover:not(:disabled){background-color:var(--accent);color:var(--foreground)}.z-editor-wrapper .z-editor-toolbar-button:disabled{cursor:not-allowed;opacity:.45}.z-editor-wrapper .z-editor-toolbar-button.z-editor-toolbar-button-active{background-color:color-mix(in srgb,var(--primary) 10%,transparent);color:var(--primary)}.z-editor-wrapper .z-editor-content{border-bottom-right-radius:.375rem;border-bottom-left-radius:.375rem}.z-editor-wrapper .z-editor-prosemirror{width:100%;outline:none;padding:.75rem;color:var(--foreground)}.z-editor-wrapper .z-editor-prosemirror>*{margin-top:1.25rem;margin-bottom:1.25rem}.z-editor-wrapper .z-editor-prosemirror>:first-child{margin-top:0}.z-editor-wrapper .z-editor-prosemirror>:last-child{margin-bottom:0}.z-editor-wrapper .z-editor-prosemirror p{line-height:1.75}.z-editor-wrapper .z-editor-prosemirror a{border-bottom:.0625rem solid transparent;color:var(--primary);font-weight:500;transition:border-color .15s ease}.z-editor-wrapper .z-editor-prosemirror a:hover{border-color:var(--primary)}.z-editor-wrapper .z-editor-prosemirror .mention{color:var(--primary);font-weight:500}.z-editor-wrapper .z-editor-prosemirror :is(h1,h2,h3,h4,h5,h6){color:var(--foreground);font-weight:700;line-height:1.2}.z-editor-wrapper .z-editor-prosemirror h1{font-size:1.875rem}.z-editor-wrapper .z-editor-prosemirror h2{font-size:1.5rem}.z-editor-wrapper .z-editor-prosemirror h3{font-size:1.25rem}.z-editor-wrapper .z-editor-prosemirror h4{font-size:1.125rem}.z-editor-wrapper .z-editor-prosemirror h5,.z-editor-wrapper .z-editor-prosemirror h6{font-size:1rem}.z-editor-wrapper .z-editor-prosemirror blockquote{border-left:.25rem solid var(--border);padding-left:1rem;font-style:italic;color:var(--muted-foreground)}.z-editor-wrapper .z-editor-prosemirror [data-type=horizontalRule]{margin-top:2rem;margin-bottom:2rem;padding-top:.5rem;padding-bottom:.5rem}.z-editor-wrapper .z-editor-prosemirror hr{border:0;border-top:.0625rem solid var(--border)}.z-editor-wrapper .z-editor-prosemirror pre{overflow-x:auto;border:.0625rem solid var(--border);border-radius:.375rem;background-color:var(--muted);padding:.75rem 1rem;font-size:.875rem;line-height:1.5;white-space:pre-wrap;word-break:break-word}.z-editor-wrapper .z-editor-prosemirror pre code{display:inline;border:0;border-radius:0;background-color:transparent;padding:0;color:inherit;font:inherit}.z-editor-wrapper .z-editor-prosemirror code{display:inline-block;border:.0625rem solid var(--border);border-radius:.375rem;background-color:var(--muted);padding:.125rem .375rem;color:var(--foreground);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875em;font-weight:500}.z-editor-wrapper .z-editor-prosemirror :is(ul,ol){padding-left:1.5rem}.z-editor-wrapper .z-editor-prosemirror ul{list-style:disc}.z-editor-wrapper .z-editor-prosemirror ol{list-style:decimal}.z-editor-wrapper .z-editor-prosemirror li{margin-top:.375rem;margin-bottom:.375rem;padding-left:.375rem}.z-editor-wrapper .z-editor-prosemirror img{display:block;max-width:100%;border-radius:.375rem}.z-editor-wrapper .z-editor-prosemirror img.ProseMirror-selectednode{outline:.125rem solid var(--primary)}.z-editor-wrapper .z-editor-prosemirror .ProseMirror-selectednode:not(img):not(pre):not([data-node-view-wrapper]){background-color:color-mix(in srgb,var(--primary) 20%,transparent)}.z-editor-wrapper .z-editor-prosemirror :is(p,h1,h2,h3,h4,h5,h6).is-empty:before{float:left;height:0;color:var(--muted-foreground);content:attr(data-placeholder);pointer-events:none}.z-editor-placeholder-first-line .z-editor-wrapper .z-editor-prosemirror :is(p,h1,h2,h3,h4,h5,h6).is-empty:before{content:none}.z-editor-placeholder-first-line .z-editor-wrapper .z-editor-prosemirror :is(p,h1,h2,h3,h4,h5,h6).is-editor-empty:first-child:before{content:attr(data-placeholder)}.z-editor-wrapper.z-editor-disabled .z-editor-toolbar,.z-editor-wrapper.z-editor-disabled .z-editor-content{pointer-events:none}.z-editor-wrapper.z-editor-readonly .z-editor-toolbar{display:none}.z-editor-wrapper.z-editor-readonly .z-editor-content{border-radius:.375rem}.z-editor-wrapper.z-editor-readonly .z-editor-prosemirror{cursor:default}.z-editor-link-modal{padding-top:0;padding-bottom:0}.z-editor-link-modal .z-modal-scrollbar main{min-height:0;padding:1rem}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: ZButtonComponent, selector: "z-button, button[z-button], a[z-button]", inputs: ["class", "zType", "zSize", "zShape", "zLabel", "zLoading", "zDisabled", "zTypeIcon", "zSizeIcon", "zStrokeWidthIcon", "zWave"], exportAs: ["zButton"] }, { kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "component", type: ZInputComponent, selector: "z-input", inputs: ["class", "zType", "zSize", "zAlign", "zLabel", "zLabelClass", "zPlaceholder", "zRequired", "zDisabled", "zReadonly", "zPrefix", "zSuffix", "zMin", "zMax", "zStep", "zShowArrows", "zMask", "zDecimalPlaces", "zAllowNegative", "zThousandSeparator", "zDecimalMarker", "zValidators", "zAsyncValidators", "zAsyncDebounce", "zAsyncValidateOn", "zShowPasswordToggle", "zSearch", "zDebounce", "zAutofocus", "zAutoComplete", "zAllowClear", "zAutoSizeContent", "zRows", "zResize", "zMaxLength", "zAutoSuggest", "zColorConfig"], outputs: ["zOnSearch", "zOnChange", "zOnBlur", "zOnFocus", "zOnKeydown", "zOnEnter", "zOnColorCollapse", "zControl", "zEvent"], exportAs: ["zInput"] }, { kind: "component", type: ZModalComponent, selector: "z-modal", inputs: ["class", "zVisible", "zTitle", "zDescription", "zWidth", "zClosable", "zMaskClosable", "zHideHeader", "zHideFooter", "zOkText", "zCancelText", "zOkDestructive", "zOkDisabled", "zLoading", "zContentLoading", "zSkeletonRows", "zOverlay"], outputs: ["zOk", "zCancel", "zAfterClose", "zScrollbar", "zVisibleChange"], exportAs: ["zModal"] }, { kind: "directive", type: ZModalContentDirective, selector: "[z-modal-content], [zModalContent]" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
384
811
|
}
|
|
385
812
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZEditorComponent, decorators: [{
|
|
386
813
|
type: Component,
|
|
387
|
-
args: [{ selector: 'z-editor', imports: [
|
|
814
|
+
args: [{ selector: 'z-editor', imports: [
|
|
815
|
+
FormsModule,
|
|
816
|
+
ReactiveFormsModule,
|
|
817
|
+
ZButtonComponent,
|
|
818
|
+
ZIconComponent,
|
|
819
|
+
ZInputComponent,
|
|
820
|
+
ZModalComponent,
|
|
821
|
+
ZModalContentDirective,
|
|
822
|
+
TranslatePipe,
|
|
823
|
+
], standalone: true, template: `
|
|
388
824
|
<div [class]="wrapperClasses()" [class.z-editor-disabled]="isDisabled()" [class.z-editor-readonly]="zReadonly()">
|
|
389
825
|
@if (zLabel()) {
|
|
390
826
|
<label [for]="editorId" class="text-xs leading-none font-medium" [class]="zLabelClass()">
|
|
@@ -395,26 +831,85 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
|
|
|
395
831
|
</label>
|
|
396
832
|
}
|
|
397
833
|
|
|
398
|
-
<
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
834
|
+
<div [class]="editorClasses()">
|
|
835
|
+
@if (showToolbar()) {
|
|
836
|
+
<div class="z-editor-toolbar" role="toolbar" [attr.aria-controls]="editorId">
|
|
837
|
+
@for (item of toolbarItems(); track item.id) {
|
|
838
|
+
<button
|
|
839
|
+
type="button"
|
|
840
|
+
class="z-editor-toolbar-button"
|
|
841
|
+
[class.z-editor-toolbar-button-active]="item.active"
|
|
842
|
+
[disabled]="item.disabled"
|
|
843
|
+
[attr.aria-label]="item.label"
|
|
844
|
+
[attr.title]="item.label"
|
|
845
|
+
(click)="onToolbarClick(item.id)"
|
|
846
|
+
>
|
|
847
|
+
<i z-icon [zType]="item.icon" zSize="16"></i>
|
|
848
|
+
</button>
|
|
849
|
+
}
|
|
850
|
+
</div>
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
<div
|
|
854
|
+
#editorHost
|
|
855
|
+
[id]="editorId"
|
|
856
|
+
class="z-editor-content"
|
|
857
|
+
role="textbox"
|
|
858
|
+
[attr.aria-multiline]="true"
|
|
859
|
+
[attr.aria-readonly]="isDisabled() || zReadonly()"
|
|
860
|
+
></div>
|
|
861
|
+
</div>
|
|
412
862
|
|
|
413
863
|
@if (hasError()) {
|
|
414
864
|
<p class="text-destructive animate-in fade-in slide-in-from-top-1 m-0 text-xs duration-200">
|
|
415
865
|
{{ errorMessage() }}
|
|
416
866
|
</p>
|
|
417
867
|
}
|
|
868
|
+
|
|
869
|
+
<z-modal
|
|
870
|
+
[(zVisible)]="linkModalVisible"
|
|
871
|
+
class="z-editor-link-modal"
|
|
872
|
+
zWidth="360px"
|
|
873
|
+
[zClosable]="false"
|
|
874
|
+
[zHideHeader]="true"
|
|
875
|
+
[zHideFooter]="true"
|
|
876
|
+
>
|
|
877
|
+
<ng-template z-modal-content>
|
|
878
|
+
<div class="space-y-4">
|
|
879
|
+
<z-input
|
|
880
|
+
zType="url"
|
|
881
|
+
zLabel="URL"
|
|
882
|
+
zPlaceholder="https://example.com"
|
|
883
|
+
[zRequired]="true"
|
|
884
|
+
[zValidators]="linkValidators"
|
|
885
|
+
[ngModel]="linkUrl()"
|
|
886
|
+
(ngModelChange)="onLinkUrlChange($event)"
|
|
887
|
+
(zOnEnter)="applyLink()"
|
|
888
|
+
/>
|
|
889
|
+
|
|
890
|
+
<div class="mt-4 flex items-center justify-between gap-2">
|
|
891
|
+
<button
|
|
892
|
+
type="button"
|
|
893
|
+
z-button
|
|
894
|
+
zType="ghost"
|
|
895
|
+
zSize="sm"
|
|
896
|
+
[zDisabled]="!activeLinkHref()"
|
|
897
|
+
(click)="removeLink()"
|
|
898
|
+
>
|
|
899
|
+
{{ 'i18n_z_ui_common_remove' | translate }}
|
|
900
|
+
</button>
|
|
901
|
+
<div class="flex items-center gap-2">
|
|
902
|
+
<button type="button" z-button zType="outline" zSize="sm" (click)="closeLinkModal()">
|
|
903
|
+
{{ 'i18n_z_ui_common_cancel' | translate }}
|
|
904
|
+
</button>
|
|
905
|
+
<button type="button" z-button zSize="sm" [zDisabled]="!canApplyLink()" (click)="applyLink()">
|
|
906
|
+
{{ 'i18n_z_ui_common_apply' | translate }}
|
|
907
|
+
</button>
|
|
908
|
+
</div>
|
|
909
|
+
</div>
|
|
910
|
+
</div>
|
|
911
|
+
</ng-template>
|
|
912
|
+
</z-modal>
|
|
418
913
|
</div>
|
|
419
914
|
`, providers: [
|
|
420
915
|
{
|
|
@@ -422,12 +917,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
|
|
|
422
917
|
useExisting: forwardRef(() => ZEditorComponent),
|
|
423
918
|
multi: true,
|
|
424
919
|
},
|
|
425
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, exportAs: 'zEditor', styles: [".ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container:not(.ql-disabled) li[data-list=checked]>.ql-ui,.ql-container:not(.ql-disabled) li[data-list=unchecked]>.ql-ui{cursor:pointer}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;counter-reset:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0}@supports (counter-set:none){.ql-editor p,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{counter-set:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor p,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{counter-reset:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor table{border-collapse:collapse}.ql-editor td{border:1px solid #000;padding:2px 5px}.ql-editor ol{padding-left:1.5em}.ql-editor li{list-style-type:none;padding-left:1.5em;position:relative}.ql-editor li>.ql-ui:before{display:inline-block;margin-left:-1.5em;margin-right:.3em;text-align:right;white-space:nowrap;width:1.2em}.ql-editor li[data-list=checked]>.ql-ui,.ql-editor li[data-list=unchecked]>.ql-ui{color:#777}.ql-editor li[data-list=bullet]>.ql-ui:before{content:\"\\2022\"}.ql-editor li[data-list=checked]>.ql-ui:before{content:\"\\2611\"}.ql-editor li[data-list=unchecked]>.ql-ui:before{content:\"\\2610\"}@supports (counter-set:none){.ql-editor li[data-list]{counter-set:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list]{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered]{counter-increment:list-0}.ql-editor li[data-list=ordered]>.ql-ui:before{content:counter(list-0,decimal) \". \"}.ql-editor li[data-list=ordered].ql-indent-1{counter-increment:list-1}.ql-editor li[data-list=ordered].ql-indent-1>.ql-ui:before{content:counter(list-1,lower-alpha) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-1{counter-set:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-2{counter-increment:list-2}.ql-editor li[data-list=ordered].ql-indent-2>.ql-ui:before{content:counter(list-2,lower-roman) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-2{counter-set:list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-3{counter-increment:list-3}.ql-editor li[data-list=ordered].ql-indent-3>.ql-ui:before{content:counter(list-3,decimal) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-3{counter-set:list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-4{counter-increment:list-4}.ql-editor li[data-list=ordered].ql-indent-4>.ql-ui:before{content:counter(list-4,lower-alpha) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-4{counter-set:list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-5{counter-increment:list-5}.ql-editor li[data-list=ordered].ql-indent-5>.ql-ui:before{content:counter(list-5,lower-roman) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-5{counter-set:list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-6{counter-increment:list-6}.ql-editor li[data-list=ordered].ql-indent-6>.ql-ui:before{content:counter(list-6,decimal) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-6{counter-set:list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-6{counter-reset:list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-7{counter-increment:list-7}.ql-editor li[data-list=ordered].ql-indent-7>.ql-ui:before{content:counter(list-7,lower-alpha) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-7{counter-set:list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-7{counter-reset:list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-8{counter-increment:list-8}.ql-editor li[data-list=ordered].ql-indent-8>.ql-ui:before{content:counter(list-8,lower-roman) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-8{counter-set:list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-8{counter-reset:list-9}}.ql-editor li[data-list=ordered].ql-indent-9{counter-increment:list-9}.ql-editor li[data-list=ordered].ql-indent-9>.ql-ui:before{content:counter(list-9,decimal) \". \"}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor li.ql-direction-rtl{padding-right:1.5em}.ql-editor li.ql-direction-rtl>.ql-ui:before{margin-left:.3em;margin-right:-1.5em;text-align:left}.ql-editor table{table-layout:fixed;width:100%}.ql-editor table td{outline:none}.ql-editor .ql-code-block-container{font-family:monospace}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor .ql-ui{position:absolute}.ql-editor.ql-blank:before{color:#0009;content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-snow.ql-toolbar:after,.ql-snow .ql-toolbar:after{clear:both;content:\"\";display:table}.ql-snow.ql-toolbar button,.ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-snow.ql-toolbar button svg,.ql-snow .ql-toolbar button svg{float:left;height:100%}.ql-snow.ql-toolbar button:active:hover,.ql-snow .ql-toolbar button:active:hover{outline:none}.ql-snow.ql-toolbar input.ql-image[type=file],.ql-snow .ql-toolbar input.ql-image[type=file]{display:none}.ql-snow.ql-toolbar button:hover,.ql-snow .ql-toolbar button:hover,.ql-snow.ql-toolbar button:focus,.ql-snow .ql-toolbar button:focus,.ql-snow.ql-toolbar button.ql-active,.ql-snow .ql-toolbar button.ql-active,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-item:hover,.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item.ql-selected{color:#06c}.ql-snow.ql-toolbar button:hover .ql-fill,.ql-snow .ql-toolbar button:hover .ql-fill,.ql-snow.ql-toolbar button:focus .ql-fill,.ql-snow .ql-toolbar button:focus .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill{fill:#06c}.ql-snow.ql-toolbar button:hover .ql-stroke,.ql-snow .ql-toolbar button:hover .ql-stroke,.ql-snow.ql-toolbar button:focus .ql-stroke,.ql-snow .ql-toolbar button:focus .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar button:hover .ql-stroke-miter,.ql-snow .ql-toolbar button:hover .ql-stroke-miter,.ql-snow.ql-toolbar button:focus .ql-stroke-miter,.ql-snow .ql-toolbar button:focus .ql-stroke-miter,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter{stroke:#06c}@media(pointer:coarse){.ql-snow.ql-toolbar button:hover:not(.ql-active),.ql-snow .ql-toolbar button:hover:not(.ql-active){color:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#444}}.ql-snow,.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:\"\";display:table}.ql-snow .ql-stroke{fill:none;stroke:#444;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#444;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-thin,.ql-snow .ql-stroke.ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor .ql-code-block-container{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor .ql-code-block-container{margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor .ql-code-block-container{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#444;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-snow .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label:before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#ccc;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=\"\"]):before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=\"\"]):before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=\"\"]):before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=\"\"]):before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=\"\"]):before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=\"\"]):before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-label:before,.ql-snow .ql-picker.ql-header .ql-picker-item:before{content:\"Normal\"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"1\"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]:before{content:\"Heading 1\"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"2\"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]:before{content:\"Heading 2\"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"3\"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]:before{content:\"Heading 3\"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"4\"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]:before{content:\"Heading 4\"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"5\"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]:before{content:\"Heading 5\"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"6\"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]:before{content:\"Heading 6\"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]:before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]:before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]:before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]:before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]:before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]:before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-label:before,.ql-snow .ql-picker.ql-font .ql-picker-item:before{content:\"Sans Serif\"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{content:\"Serif\"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{content:\"Monospace\"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-label:before,.ql-snow .ql-picker.ql-size .ql-picker-item:before{content:\"Normal\"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{content:\"Small\"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{content:\"Large\"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{content:\"Huge\"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-code-block-container{position:relative}.ql-code-block-container .ql-ui{right:5px;top:5px}.ql-toolbar.ql-snow{border:1px solid #ccc;box-sizing:border-box;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:#0003 0 2px 8px}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label,.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#ccc}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0}.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip:before{content:\"Visit URL:\";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #ccc;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action:after{border-right:1px solid #ccc;content:\"Edit\";margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove:before{content:\"Remove\";margin-left:8px}.ql-snow .ql-tooltip a{line-height:26px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action:after{border-right:0;content:\"Save\";padding-right:0}.ql-snow .ql-tooltip[data-mode=link]:before{content:\"Enter link:\"}.ql-snow .ql-tooltip[data-mode=formula]:before{content:\"Enter formula:\"}.ql-snow .ql-tooltip[data-mode=video]:before{content:\"Enter video:\"}.ql-snow a{color:#06c}.ql-container.ql-snow{border:1px solid #ccc}.z-editor-wrapper .ql-toolbar.ql-snow{border:none;border-bottom:.0625rem solid var(--border)}.z-editor-wrapper .ql-container.ql-snow{border:none}.z-editor-wrapper .ql-toolbar.ql-snow{border:none!important;border-bottom:.0625rem solid var(--border)!important;border-top-left-radius:.375rem;border-top-right-radius:.375rem;background-color:color-mix(in srgb,var(--muted) 30%,transparent);padding:.5rem}.z-editor-wrapper .ql-toolbar.ql-snow .ql-formats{margin-right:.25rem;display:inline-flex;gap:.125rem;align-items:center}.z-editor-wrapper .ql-toolbar.ql-snow button{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;border-radius:.25rem;padding:0;color:var(--muted-foreground);transition:all .15s ease}.z-editor-wrapper .ql-toolbar.ql-snow button:hover{background-color:var(--accent);color:var(--foreground)}.z-editor-wrapper .ql-toolbar.ql-snow button.ql-active{background-color:color-mix(in srgb,var(--primary) 10%,transparent);color:var(--primary)}.z-editor-wrapper .ql-toolbar.ql-snow button svg{width:1rem;height:1rem}.z-editor-wrapper .ql-toolbar.ql-snow .ql-picker{color:var(--muted-foreground);height:1.75rem}.z-editor-wrapper .ql-toolbar.ql-snow .ql-picker .ql-picker-label{display:inline-flex;align-items:center;justify-content:center;border-radius:.25rem;padding:0 8px;height:100%;transition:all .15s ease}.z-editor-wrapper .ql-toolbar.ql-snow .ql-picker .ql-picker-label:hover{background-color:var(--accent);color:var(--foreground)}.z-editor-wrapper .ql-toolbar.ql-snow .ql-picker .ql-picker-options{border-radius:.375rem;border:1px solid var(--border);background-color:var(--popover);box-shadow:0 4px 6px -1px #0000001a}.z-editor-wrapper .ql-toolbar.ql-snow .ql-picker .ql-picker-options .ql-picker-item{border-radius:.25rem;padding:.25rem 8px;transition:all .15s ease}.z-editor-wrapper .ql-toolbar.ql-snow .ql-picker .ql-picker-options .ql-picker-item:hover{background-color:var(--accent)}.z-editor-wrapper .ql-container.ql-snow{border:none!important;border-bottom-left-radius:.375rem;border-bottom-right-radius:.375rem;font-family:inherit}.z-editor-wrapper .ql-container.ql-snow .ql-editor{padding:.5rem 12px}.z-editor-wrapper .ql-container.ql-snow .ql-editor.ql-blank:before{font-style:normal;color:var(--muted-foreground)}.z-editor-wrapper .ql-container.ql-snow .ql-editor .ql-align-center{text-align:center}.z-editor-wrapper .ql-container.ql-snow .ql-editor .ql-align-center img{display:inline-block}.z-editor-wrapper .ql-container.ql-snow .ql-editor .ql-align-right{text-align:right}.z-editor-wrapper .ql-container.ql-snow .ql-editor .ql-align-right img{display:inline-block}.z-editor-wrapper .ql-container.ql-snow .ql-editor .ql-align-left,.z-editor-wrapper .ql-container.ql-snow .ql-editor .ql-align-justify{text-align:left}.z-editor-wrapper .ql-container.ql-snow .ql-editor .ql-align-left img,.z-editor-wrapper .ql-container.ql-snow .ql-editor .ql-align-justify img{display:inline-block}.z-editor-wrapper .ql-container.ql-snow .ql-editor img[style*=\"float: left\"]{margin-right:1rem;margin-bottom:.5rem}.z-editor-wrapper .ql-container.ql-snow .ql-editor img[style*=\"float: right\"]{margin-left:1rem;margin-bottom:.5rem}.z-editor-wrapper .ql-container.ql-snow .ql-editor img[style*=\"margin: auto\"],.z-editor-wrapper .ql-container.ql-snow .ql-editor img[style*=\"display: block\"]{display:block;margin-left:auto;margin-right:auto}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip{left:.5rem!important;right:auto!important;max-width:calc(100% - 1rem);display:flex;align-items:center;border-radius:.375rem;border:1px solid var(--border);background-color:var(--popover);box-shadow:0 4px 6px -1px #0000001a;padding:.375rem!important;gap:.5rem;color:var(--foreground);z-index:10}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip.ql-hidden{display:none}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip:before,.z-editor-wrapper .ql-container.ql-snow .ql-tooltip:after{display:none}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-preview{display:none}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip input[type=text]{border:1px solid var(--border);border-radius:.25rem;padding:.25rem 8px;font-size:.875rem;outline:none;background-color:var(--background);color:var(--foreground)}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip input[type=text]:focus{border-color:var(--ring);box-shadow:0 0 0 2px color-mix(in srgb,var(--ring) 30%,transparent)}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-action,.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-remove{cursor:pointer;font-size:.75rem;padding:0rem 8px;border-radius:.25rem;transition:all .15s ease;text-decoration:none;border:1px solid var(--border);background-color:var(--background);box-shadow:0 1px 2px #0000000d}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-action:hover,.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-remove:hover{background-color:var(--accent);color:var(--accent-foreground)}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-action:after,.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-remove:after{padding:0!important;margin:0!important;border:none!important}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-action{color:var(--primary)}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-remove{color:var(--destructive)}.z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-remove:hover{background-color:color-mix(in srgb,var(--destructive) 10%,transparent);color:var(--destructive)}:root.dark .z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-action,:root.dark .z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-remove{background-color:color-mix(in srgb,var(--input) 30%,transparent);border-color:var(--input)}:root.dark .z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-action:hover,:root.dark .z-editor-wrapper .ql-container.ql-snow .ql-tooltip .ql-remove:hover{background-color:color-mix(in srgb,var(--input) 50%,transparent)}.z-editor-wrapper.z-editor-disabled .ql-toolbar,.z-editor-wrapper.z-editor-disabled .ql-container{pointer-events:none}.z-editor-wrapper.z-editor-readonly .ql-toolbar{display:none}.z-editor-wrapper.z-editor-readonly .ql-container{border-radius:.375rem}.z-editor-wrapper.z-editor-readonly .ql-editor{cursor:default}\n/*! Bundled license information:\n\nquill/dist/quill.snow.css:\n (*!\n * Quill Editor v2.0.3\n * https://quilljs.com\n * Copyright (c) 2017-2024, Slab\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n *)\n*/\n"] }]
|
|
426
|
-
}], propDecorators: { zOnChange: [{ type: i0.Output, args: ["zOnChange"] }], zOnFocus: [{ type: i0.Output, args: ["zOnFocus"] }], zOnBlur: [{ type: i0.Output, args: ["zOnBlur"] }], zControl: [{ type: i0.Output, args: ["zControl"] }], zEvent: [{ type: i0.Output, args: ["zEvent"] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSize", required: false }] }], zLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLabel", required: false }] }], zLabelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLabelClass", required: false }] }], zPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "zPlaceholder", required: false }] }], zRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "zRequired", required: false }] }], zDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDisabled", required: false }] }], zReadonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "zReadonly", required: false }] }],
|
|
920
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, exportAs: 'zEditor', styles: [".z-editor-wrapper .z-editor-toolbar{display:flex;flex-wrap:wrap;gap:.125rem;align-items:center;border-bottom:.0625rem solid var(--border);border-top-left-radius:.375rem;border-top-right-radius:.375rem;background-color:color-mix(in srgb,var(--muted) 30%,transparent);padding:.5rem}.z-editor-wrapper .z-editor-toolbar-button{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;border-radius:.25rem;padding:0;color:var(--muted-foreground);transition:background-color .15s ease,color .15s ease,opacity .15s ease}.z-editor-wrapper .z-editor-toolbar-button:hover:not(:disabled){background-color:var(--accent);color:var(--foreground)}.z-editor-wrapper .z-editor-toolbar-button:disabled{cursor:not-allowed;opacity:.45}.z-editor-wrapper .z-editor-toolbar-button.z-editor-toolbar-button-active{background-color:color-mix(in srgb,var(--primary) 10%,transparent);color:var(--primary)}.z-editor-wrapper .z-editor-content{border-bottom-right-radius:.375rem;border-bottom-left-radius:.375rem}.z-editor-wrapper .z-editor-prosemirror{width:100%;outline:none;padding:.75rem;color:var(--foreground)}.z-editor-wrapper .z-editor-prosemirror>*{margin-top:1.25rem;margin-bottom:1.25rem}.z-editor-wrapper .z-editor-prosemirror>:first-child{margin-top:0}.z-editor-wrapper .z-editor-prosemirror>:last-child{margin-bottom:0}.z-editor-wrapper .z-editor-prosemirror p{line-height:1.75}.z-editor-wrapper .z-editor-prosemirror a{border-bottom:.0625rem solid transparent;color:var(--primary);font-weight:500;transition:border-color .15s ease}.z-editor-wrapper .z-editor-prosemirror a:hover{border-color:var(--primary)}.z-editor-wrapper .z-editor-prosemirror .mention{color:var(--primary);font-weight:500}.z-editor-wrapper .z-editor-prosemirror :is(h1,h2,h3,h4,h5,h6){color:var(--foreground);font-weight:700;line-height:1.2}.z-editor-wrapper .z-editor-prosemirror h1{font-size:1.875rem}.z-editor-wrapper .z-editor-prosemirror h2{font-size:1.5rem}.z-editor-wrapper .z-editor-prosemirror h3{font-size:1.25rem}.z-editor-wrapper .z-editor-prosemirror h4{font-size:1.125rem}.z-editor-wrapper .z-editor-prosemirror h5,.z-editor-wrapper .z-editor-prosemirror h6{font-size:1rem}.z-editor-wrapper .z-editor-prosemirror blockquote{border-left:.25rem solid var(--border);padding-left:1rem;font-style:italic;color:var(--muted-foreground)}.z-editor-wrapper .z-editor-prosemirror [data-type=horizontalRule]{margin-top:2rem;margin-bottom:2rem;padding-top:.5rem;padding-bottom:.5rem}.z-editor-wrapper .z-editor-prosemirror hr{border:0;border-top:.0625rem solid var(--border)}.z-editor-wrapper .z-editor-prosemirror pre{overflow-x:auto;border:.0625rem solid var(--border);border-radius:.375rem;background-color:var(--muted);padding:.75rem 1rem;font-size:.875rem;line-height:1.5;white-space:pre-wrap;word-break:break-word}.z-editor-wrapper .z-editor-prosemirror pre code{display:inline;border:0;border-radius:0;background-color:transparent;padding:0;color:inherit;font:inherit}.z-editor-wrapper .z-editor-prosemirror code{display:inline-block;border:.0625rem solid var(--border);border-radius:.375rem;background-color:var(--muted);padding:.125rem .375rem;color:var(--foreground);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875em;font-weight:500}.z-editor-wrapper .z-editor-prosemirror :is(ul,ol){padding-left:1.5rem}.z-editor-wrapper .z-editor-prosemirror ul{list-style:disc}.z-editor-wrapper .z-editor-prosemirror ol{list-style:decimal}.z-editor-wrapper .z-editor-prosemirror li{margin-top:.375rem;margin-bottom:.375rem;padding-left:.375rem}.z-editor-wrapper .z-editor-prosemirror img{display:block;max-width:100%;border-radius:.375rem}.z-editor-wrapper .z-editor-prosemirror img.ProseMirror-selectednode{outline:.125rem solid var(--primary)}.z-editor-wrapper .z-editor-prosemirror .ProseMirror-selectednode:not(img):not(pre):not([data-node-view-wrapper]){background-color:color-mix(in srgb,var(--primary) 20%,transparent)}.z-editor-wrapper .z-editor-prosemirror :is(p,h1,h2,h3,h4,h5,h6).is-empty:before{float:left;height:0;color:var(--muted-foreground);content:attr(data-placeholder);pointer-events:none}.z-editor-placeholder-first-line .z-editor-wrapper .z-editor-prosemirror :is(p,h1,h2,h3,h4,h5,h6).is-empty:before{content:none}.z-editor-placeholder-first-line .z-editor-wrapper .z-editor-prosemirror :is(p,h1,h2,h3,h4,h5,h6).is-editor-empty:first-child:before{content:attr(data-placeholder)}.z-editor-wrapper.z-editor-disabled .z-editor-toolbar,.z-editor-wrapper.z-editor-disabled .z-editor-content{pointer-events:none}.z-editor-wrapper.z-editor-readonly .z-editor-toolbar{display:none}.z-editor-wrapper.z-editor-readonly .z-editor-content{border-radius:.375rem}.z-editor-wrapper.z-editor-readonly .z-editor-prosemirror{cursor:default}.z-editor-link-modal{padding-top:0;padding-bottom:0}.z-editor-link-modal .z-modal-scrollbar main{min-height:0;padding:1rem}\n"] }]
|
|
921
|
+
}], ctorParameters: () => [], propDecorators: { _editorHost: [{ type: i0.ViewChild, args: ['editorHost', { isSignal: true }] }], zOnChange: [{ type: i0.Output, args: ["zOnChange"] }], zOnFocus: [{ type: i0.Output, args: ["zOnFocus"] }], zOnBlur: [{ type: i0.Output, args: ["zOnBlur"] }], zControl: [{ type: i0.Output, args: ["zControl"] }], zEvent: [{ type: i0.Output, args: ["zEvent"] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSize", required: false }] }], zLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLabel", required: false }] }], zLabelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLabelClass", required: false }] }], zPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "zPlaceholder", required: false }] }], zRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "zRequired", required: false }] }], zDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDisabled", required: false }] }], zReadonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "zReadonly", required: false }] }], zContentType: [{ type: i0.Input, args: [{ isSignal: true, alias: "zContentType", required: false }] }], zToolbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "zToolbar", required: false }] }], zTipTap: [{ type: i0.Input, args: [{ isSignal: true, alias: "zTipTap", required: false }] }], zValidators: [{ type: i0.Input, args: [{ isSignal: true, alias: "zValidators", required: false }] }] } });
|
|
427
922
|
|
|
428
923
|
/**
|
|
429
924
|
* Generated bundle index. Do not edit.
|
|
430
925
|
*/
|
|
431
926
|
|
|
432
|
-
export { ZEditorComponent, zEditorVariants };
|
|
927
|
+
export { ZEditorComponent, Z_EDITOR_DEFAULT_TOOLBAR, zEditorVariants };
|
|
433
928
|
//# sourceMappingURL=shival99-z-ui-components-z-editor.mjs.map
|