@semantic-components/editor 0.4.0 → 0.61.0
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 +11 -4
- package/eslint.config.mjs +48 -0
- package/ng-package.json +7 -0
- package/package.json +10 -134
- package/project.json +28 -0
- package/src/index.ts +1 -0
- package/src/lib/components/editor/README.md +354 -0
- package/src/lib/components/editor/editor-align-center-button.ts +45 -0
- package/src/lib/components/editor/editor-align-justify-button.ts +45 -0
- package/src/lib/components/editor/editor-align-left-button.ts +44 -0
- package/src/lib/components/editor/editor-align-right-button.ts +44 -0
- package/src/lib/components/editor/editor-blockquote-button.ts +44 -0
- package/src/lib/components/editor/editor-bold-button.ts +44 -0
- package/src/lib/components/editor/editor-bullet-list-button.ts +44 -0
- package/src/lib/components/editor/editor-char-count.ts +42 -0
- package/src/lib/components/editor/editor-clear-formatting-button.ts +42 -0
- package/src/lib/components/editor/editor-code-button.ts +52 -0
- package/src/lib/components/editor/editor-content.ts +107 -0
- package/src/lib/components/editor/editor-count.ts +28 -0
- package/src/lib/components/editor/editor-footer.ts +30 -0
- package/src/lib/components/editor/editor-header.ts +27 -0
- package/src/lib/components/editor/editor-heading-select.ts +48 -0
- package/src/lib/components/editor/editor-horizontal-rule-button.ts +42 -0
- package/src/lib/components/editor/editor-italic-button.ts +44 -0
- package/src/lib/components/editor/editor-link-button.ts +58 -0
- package/src/lib/components/editor/editor-numbered-list-button.ts +44 -0
- package/src/lib/components/editor/editor-redo-button.ts +42 -0
- package/src/lib/components/editor/editor-separator.ts +25 -0
- package/src/lib/components/editor/editor-strikethrough-button.ts +44 -0
- package/src/lib/components/editor/editor-toolbar-group.ts +27 -0
- package/src/lib/components/editor/editor-toolbar.ts +32 -0
- package/src/lib/components/editor/editor-underline-button.ts +44 -0
- package/src/lib/components/editor/editor-undo-button.ts +42 -0
- package/src/lib/components/editor/editor-word-count.ts +43 -0
- package/src/lib/components/editor/editor.ts +211 -0
- package/src/lib/components/editor/index.ts +45 -0
- package/src/lib/components/index.ts +1 -0
- package/src/lib/styles/editor.css +94 -0
- package/src/lib/styles/index.css +1 -0
- package/tsconfig.json +28 -0
- package/tsconfig.lib.json +12 -0
- package/tsconfig.lib.prod.json +7 -0
- package/fesm2022/semantic-components-editor.mjs +0 -4721
- package/fesm2022/semantic-components-editor.mjs.map +0 -1
- package/index.d.ts +0 -385
|
@@ -1,4721 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, input, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, signal, Injectable, ChangeDetectorRef, contentChild, afterNextRender, forwardRef } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/forms';
|
|
4
|
-
import { NG_VALUE_ACCESSOR, FormGroup, FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
import { cn } from '@semantic-components/utils';
|
|
6
|
-
import { Editor } from '@tiptap/core';
|
|
7
|
-
import Document from '@tiptap/extension-document';
|
|
8
|
-
import Heading from '@tiptap/extension-heading';
|
|
9
|
-
import Paragraph from '@tiptap/extension-paragraph';
|
|
10
|
-
import Text from '@tiptap/extension-text';
|
|
11
|
-
import { ScTooltip, ScToggle, ScMenuShortcut, ScMenuSeparator, ScMenuGroup, ScMenuItem, ScMenuTriggerFor, ScMenu, ScButton, ScLabel, ScInput, ScPopoverTriggerFor, ScSeparator } from '@semantic-components/ui';
|
|
12
|
-
import { SiQuoteIcon, SiBoldIcon, SiListIcon, SiCodeIcon, SiHighlighterIcon, SiMinusIcon, SiItalicIcon, SiListOrderedIcon, SiRedoIcon, SiStrikethroughIcon, SiAlignCenterIcon, SiAlignLeftIcon, SiAlignRightIcon, SiUnderlineIcon, SiUndoIcon, SiUnlinkIcon, SiPaletteIcon, SiImagePlusIcon, SiFileVideoIcon } from '@semantic-icons/lucide-icons';
|
|
13
|
-
import { Dialog, DialogRef, DialogModule } from '@angular/cdk/dialog';
|
|
14
|
-
import { CdkMenuTrigger, CdkMenu, CdkMenuItem } from '@angular/cdk/menu';
|
|
15
|
-
|
|
16
|
-
class ScEditorContent {
|
|
17
|
-
host = inject(ElementRef);
|
|
18
|
-
classInput = input('', {
|
|
19
|
-
alias: 'class',
|
|
20
|
-
});
|
|
21
|
-
class = computed(() => cn('block p-4 min-h-[200px]', this.classInput()));
|
|
22
|
-
get nativeElement() {
|
|
23
|
-
return this.host.nativeElement;
|
|
24
|
-
}
|
|
25
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
26
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.4", type: ScEditorContent, isStandalone: true, selector: "sc-editor-content", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "class()" } }, ngImport: i0, template: ``, isInline: true, styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
27
|
-
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorContent, decorators: [{
|
|
29
|
-
type: Component,
|
|
30
|
-
args: [{ selector: 'sc-editor-content', imports: [], template: ``, host: {
|
|
31
|
-
'[class]': 'class()',
|
|
32
|
-
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
33
|
-
}] });
|
|
34
|
-
|
|
35
|
-
class ScExtensions {
|
|
36
|
-
//history extension
|
|
37
|
-
undo = signal(false);
|
|
38
|
-
redo = signal(false);
|
|
39
|
-
history = computed(() => this.undo() || this.redo());
|
|
40
|
-
//link extension
|
|
41
|
-
setLink = signal(false);
|
|
42
|
-
unsetLink = signal(false);
|
|
43
|
-
link = computed(() => this.setLink() || this.unsetLink());
|
|
44
|
-
//text align extension
|
|
45
|
-
textAlignRight = signal(false);
|
|
46
|
-
textAlignLeft = signal(false);
|
|
47
|
-
textAlignCenter = signal(false);
|
|
48
|
-
textAlign = computed(() => this.textAlignRight() || this.textAlignLeft() || this.textAlignCenter());
|
|
49
|
-
//
|
|
50
|
-
highlight = signal(false);
|
|
51
|
-
color = signal(false);
|
|
52
|
-
underline = signal(false);
|
|
53
|
-
fontFamily = signal(false);
|
|
54
|
-
bold = signal(false);
|
|
55
|
-
youtube = signal(false);
|
|
56
|
-
image = signal(false);
|
|
57
|
-
code = signal(false);
|
|
58
|
-
strike = signal(false);
|
|
59
|
-
italic = signal(false);
|
|
60
|
-
blockquote = signal(false);
|
|
61
|
-
bulletList = signal(false);
|
|
62
|
-
orderedList = signal(false);
|
|
63
|
-
horizontalRule = signal(false);
|
|
64
|
-
textStyle = signal(false);
|
|
65
|
-
table = signal(false);
|
|
66
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
67
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensions });
|
|
68
|
-
}
|
|
69
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensions, decorators: [{
|
|
70
|
-
type: Injectable
|
|
71
|
-
}] });
|
|
72
|
-
|
|
73
|
-
class ScEditor {
|
|
74
|
-
changeDetectorRef = inject(ChangeDetectorRef);
|
|
75
|
-
editorContent = contentChild.required(ScEditorContent);
|
|
76
|
-
value = signal('');
|
|
77
|
-
isEditable = signal(true);
|
|
78
|
-
classInput = input('', {
|
|
79
|
-
alias: 'class',
|
|
80
|
-
});
|
|
81
|
-
class = computed(() => cn('block border rounded-md dark:border-gray-700', this.classInput()));
|
|
82
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
83
|
-
onChange = () => { };
|
|
84
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
85
|
-
onTouched = () => { };
|
|
86
|
-
editor;
|
|
87
|
-
extensions = inject(ScExtensions);
|
|
88
|
-
constructor() {
|
|
89
|
-
afterNextRender(() => {
|
|
90
|
-
this.createEditor();
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
async createEditor() {
|
|
94
|
-
const extensions = [];
|
|
95
|
-
extensions.push(Document);
|
|
96
|
-
extensions.push(Heading);
|
|
97
|
-
extensions.push(Paragraph);
|
|
98
|
-
extensions.push(Text);
|
|
99
|
-
try {
|
|
100
|
-
if (this.extensions.highlight()) {
|
|
101
|
-
const Highlight = (await import('@tiptap/extension-highlight')).Highlight;
|
|
102
|
-
extensions.push(Highlight);
|
|
103
|
-
}
|
|
104
|
-
if (this.extensions.textStyle()) {
|
|
105
|
-
const TextStyle = (await import('@tiptap/extension-text-style')).TextStyle;
|
|
106
|
-
extensions.push(TextStyle);
|
|
107
|
-
}
|
|
108
|
-
if (this.extensions.color()) {
|
|
109
|
-
const Color = (await import('@tiptap/extension-color')).Color;
|
|
110
|
-
extensions.push(Color);
|
|
111
|
-
}
|
|
112
|
-
if (this.extensions.fontFamily()) {
|
|
113
|
-
const FontFamily = (await import('@tiptap/extension-font-family')).FontFamily;
|
|
114
|
-
extensions.push(FontFamily);
|
|
115
|
-
}
|
|
116
|
-
if (this.extensions.underline()) {
|
|
117
|
-
const Underline = (await import('@tiptap/extension-underline')).Underline;
|
|
118
|
-
extensions.push(Underline);
|
|
119
|
-
}
|
|
120
|
-
if (this.extensions.image()) {
|
|
121
|
-
const Image = (await import('@tiptap/extension-image')).Image;
|
|
122
|
-
extensions.push(Image);
|
|
123
|
-
}
|
|
124
|
-
if (this.extensions.youtube()) {
|
|
125
|
-
const Youtube = (await import('@tiptap/extension-youtube')).Youtube;
|
|
126
|
-
extensions.push(Youtube);
|
|
127
|
-
}
|
|
128
|
-
if (this.extensions.link()) {
|
|
129
|
-
const Link = (await import('@tiptap/extension-link')).Link;
|
|
130
|
-
extensions.push(Link);
|
|
131
|
-
}
|
|
132
|
-
if (this.extensions.textAlign()) {
|
|
133
|
-
const TextAlign = (await import('@tiptap/extension-text-align')).TextAlign;
|
|
134
|
-
extensions.push(TextAlign.configure({
|
|
135
|
-
types: ['heading', 'paragraph'],
|
|
136
|
-
}));
|
|
137
|
-
}
|
|
138
|
-
if (this.extensions.bulletList() || this.extensions.orderedList()) {
|
|
139
|
-
const ListItem = (await import('@tiptap/extension-list-item')).ListItem;
|
|
140
|
-
extensions.push(ListItem);
|
|
141
|
-
}
|
|
142
|
-
if (this.extensions.bulletList()) {
|
|
143
|
-
const BulletList = (await import('@tiptap/extension-bullet-list')).BulletList;
|
|
144
|
-
extensions.push(BulletList);
|
|
145
|
-
}
|
|
146
|
-
if (this.extensions.orderedList()) {
|
|
147
|
-
const OrderedList = (await import('@tiptap/extension-ordered-list')).OrderedList;
|
|
148
|
-
extensions.push(OrderedList);
|
|
149
|
-
}
|
|
150
|
-
if (this.extensions.strike()) {
|
|
151
|
-
const Strike = (await import('@tiptap/extension-strike')).Strike;
|
|
152
|
-
extensions.push(Strike);
|
|
153
|
-
}
|
|
154
|
-
if (this.extensions.italic()) {
|
|
155
|
-
const Italic = (await import('@tiptap/extension-italic')).Italic;
|
|
156
|
-
extensions.push(Italic);
|
|
157
|
-
}
|
|
158
|
-
if (this.extensions.bold()) {
|
|
159
|
-
const Bold = (await import('@tiptap/extension-bold')).Bold;
|
|
160
|
-
extensions.push(Bold);
|
|
161
|
-
}
|
|
162
|
-
if (this.extensions.horizontalRule()) {
|
|
163
|
-
const HorizontalRule = (await import('@tiptap/extension-horizontal-rule')).HorizontalRule;
|
|
164
|
-
extensions.push(HorizontalRule);
|
|
165
|
-
}
|
|
166
|
-
if (this.extensions.blockquote()) {
|
|
167
|
-
const Blockquote = (await import('@tiptap/extension-blockquote')).Blockquote;
|
|
168
|
-
extensions.push(Blockquote);
|
|
169
|
-
}
|
|
170
|
-
if (this.extensions.code()) {
|
|
171
|
-
const Code = (await import('@tiptap/extension-code')).Code;
|
|
172
|
-
extensions.push(Code);
|
|
173
|
-
}
|
|
174
|
-
if (this.extensions.history()) {
|
|
175
|
-
const History = (await import('@tiptap/extension-history')).History;
|
|
176
|
-
extensions.push(History);
|
|
177
|
-
}
|
|
178
|
-
if (this.extensions.table()) {
|
|
179
|
-
const TableHeader = (await import('@tiptap/extension-table-header')).TableHeader;
|
|
180
|
-
extensions.push(TableHeader);
|
|
181
|
-
const TableRow = (await import('@tiptap/extension-table-row')).TableRow;
|
|
182
|
-
extensions.push(TableRow);
|
|
183
|
-
const TableCell = (await import('@tiptap/extension-table-cell')).TableCell;
|
|
184
|
-
extensions.push(TableCell);
|
|
185
|
-
const Table = (await import('@tiptap/extension-table')).Table;
|
|
186
|
-
extensions.push(Table.configure({
|
|
187
|
-
resizable: true,
|
|
188
|
-
}));
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
catch (e) {
|
|
192
|
-
console.log(e);
|
|
193
|
-
}
|
|
194
|
-
this.editor = new Editor({
|
|
195
|
-
element: this.editorContent().nativeElement,
|
|
196
|
-
extensions: extensions,
|
|
197
|
-
content: this.value(),
|
|
198
|
-
editable: this.isEditable(),
|
|
199
|
-
editorProps: {
|
|
200
|
-
attributes: {
|
|
201
|
-
class: 'prose dark:prose-invert focus:outline-none max-w-full',
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
});
|
|
205
|
-
this.editor.on('update', ({ editor }) => {
|
|
206
|
-
this.setHtmlContent(editor.getHTML());
|
|
207
|
-
});
|
|
208
|
-
this.editor.on('blur', () => {
|
|
209
|
-
this.onTouched();
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
writeValue(value) {
|
|
213
|
-
this.value.set(value);
|
|
214
|
-
}
|
|
215
|
-
registerOnChange(fn) {
|
|
216
|
-
this.onChange = fn;
|
|
217
|
-
}
|
|
218
|
-
registerOnTouched(fn) {
|
|
219
|
-
this.onTouched = fn;
|
|
220
|
-
}
|
|
221
|
-
setDisabledState(isDisabled) {
|
|
222
|
-
this.isEditable.set(!isDisabled);
|
|
223
|
-
}
|
|
224
|
-
setHtmlContent(htmlContent) {
|
|
225
|
-
this.value.set(htmlContent);
|
|
226
|
-
this.onChange(htmlContent);
|
|
227
|
-
this.changeDetectorRef.markForCheck();
|
|
228
|
-
}
|
|
229
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
230
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.0.4", type: ScEditor, isStandalone: true, selector: "sc-editor", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "class()" } }, providers: [
|
|
231
|
-
{
|
|
232
|
-
provide: NG_VALUE_ACCESSOR,
|
|
233
|
-
useExisting: forwardRef(() => ScEditor),
|
|
234
|
-
multi: true,
|
|
235
|
-
},
|
|
236
|
-
ScExtensions,
|
|
237
|
-
], queries: [{ propertyName: "editorContent", first: true, predicate: ScEditorContent, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
238
|
-
<ng-content />
|
|
239
|
-
`, isInline: true, styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
240
|
-
}
|
|
241
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditor, decorators: [{
|
|
242
|
-
type: Component,
|
|
243
|
-
args: [{ selector: 'sc-editor', imports: [], template: `
|
|
244
|
-
<ng-content />
|
|
245
|
-
`, host: {
|
|
246
|
-
'[class]': 'class()',
|
|
247
|
-
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
248
|
-
{
|
|
249
|
-
provide: NG_VALUE_ACCESSOR,
|
|
250
|
-
useExisting: forwardRef(() => ScEditor),
|
|
251
|
-
multi: true,
|
|
252
|
-
},
|
|
253
|
-
ScExtensions,
|
|
254
|
-
] }]
|
|
255
|
-
}], ctorParameters: () => [] });
|
|
256
|
-
|
|
257
|
-
class ScEditorBlockquote {
|
|
258
|
-
ariaLabel = input('Toggle blockquote', {
|
|
259
|
-
alias: 'aria-label',
|
|
260
|
-
});
|
|
261
|
-
parent = inject(ScEditor);
|
|
262
|
-
extensions = inject(ScExtensions);
|
|
263
|
-
constructor() {
|
|
264
|
-
this.extensions.blockquote.set(true);
|
|
265
|
-
}
|
|
266
|
-
get editor() {
|
|
267
|
-
return this.parent.editor;
|
|
268
|
-
}
|
|
269
|
-
toggleBlockquote() {
|
|
270
|
-
this.editor.chain().focus().toggleBlockquote().run();
|
|
271
|
-
}
|
|
272
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorBlockquote, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
273
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.4", type: ScEditorBlockquote, isStandalone: true, selector: "sc-editor-blockquote", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
274
|
-
<button
|
|
275
|
-
[attr.aria-label]="ariaLabel()"
|
|
276
|
-
[scTooltip]="ariaLabel()"
|
|
277
|
-
(click)="toggleBlockquote()"
|
|
278
|
-
sc-toggle
|
|
279
|
-
variant="outline"
|
|
280
|
-
type="button"
|
|
281
|
-
>
|
|
282
|
-
<svg si-quote-icon></svg>
|
|
283
|
-
<span class="sr-only">{{ ariaLabel() }}</span>
|
|
284
|
-
</button>
|
|
285
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }, { kind: "component", type: SiQuoteIcon, selector: "svg[si-quote-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
286
|
-
}
|
|
287
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorBlockquote, decorators: [{
|
|
288
|
-
type: Component,
|
|
289
|
-
args: [{ selector: 'sc-editor-blockquote', imports: [ScTooltip, ScToggle, SiQuoteIcon], template: `
|
|
290
|
-
<button
|
|
291
|
-
[attr.aria-label]="ariaLabel()"
|
|
292
|
-
[scTooltip]="ariaLabel()"
|
|
293
|
-
(click)="toggleBlockquote()"
|
|
294
|
-
sc-toggle
|
|
295
|
-
variant="outline"
|
|
296
|
-
type="button"
|
|
297
|
-
>
|
|
298
|
-
<svg si-quote-icon></svg>
|
|
299
|
-
<span class="sr-only">{{ ariaLabel() }}</span>
|
|
300
|
-
</button>
|
|
301
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
302
|
-
}], ctorParameters: () => [] });
|
|
303
|
-
|
|
304
|
-
class ScEditorBold {
|
|
305
|
-
ariaLabel = input('Toggle Bold', {
|
|
306
|
-
alias: 'aria-label',
|
|
307
|
-
});
|
|
308
|
-
parent = inject(ScEditor);
|
|
309
|
-
extensions = inject(ScExtensions);
|
|
310
|
-
constructor() {
|
|
311
|
-
this.extensions.bold.set(true);
|
|
312
|
-
}
|
|
313
|
-
get editor() {
|
|
314
|
-
return this.parent.editor;
|
|
315
|
-
}
|
|
316
|
-
toggleBold() {
|
|
317
|
-
this.editor.chain().focus().toggleBold().run();
|
|
318
|
-
}
|
|
319
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorBold, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
320
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.4", type: ScEditorBold, isStandalone: true, selector: "sc-editor-bold", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
321
|
-
<button
|
|
322
|
-
[attr.aria-label]="ariaLabel()"
|
|
323
|
-
[scTooltip]="ariaLabel()"
|
|
324
|
-
(click)="toggleBold()"
|
|
325
|
-
sc-toggle
|
|
326
|
-
variant="outline"
|
|
327
|
-
type="button"
|
|
328
|
-
>
|
|
329
|
-
<svg si-bold-icon></svg>
|
|
330
|
-
<span class="sr-only">{{ ariaLabel() }}</span>
|
|
331
|
-
</button>
|
|
332
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }, { kind: "component", type: SiBoldIcon, selector: "svg[si-bold-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
333
|
-
}
|
|
334
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorBold, decorators: [{
|
|
335
|
-
type: Component,
|
|
336
|
-
args: [{ selector: 'sc-editor-bold', imports: [ScTooltip, ScToggle, SiBoldIcon], template: `
|
|
337
|
-
<button
|
|
338
|
-
[attr.aria-label]="ariaLabel()"
|
|
339
|
-
[scTooltip]="ariaLabel()"
|
|
340
|
-
(click)="toggleBold()"
|
|
341
|
-
sc-toggle
|
|
342
|
-
variant="outline"
|
|
343
|
-
type="button"
|
|
344
|
-
>
|
|
345
|
-
<svg si-bold-icon></svg>
|
|
346
|
-
<span class="sr-only">{{ ariaLabel() }}</span>
|
|
347
|
-
</button>
|
|
348
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
349
|
-
}], ctorParameters: () => [] });
|
|
350
|
-
|
|
351
|
-
class ScEditorBulletList {
|
|
352
|
-
ariaLabel = 'Toggle List';
|
|
353
|
-
parent = inject(ScEditor);
|
|
354
|
-
extensions = inject(ScExtensions);
|
|
355
|
-
constructor() {
|
|
356
|
-
this.extensions.bulletList.set(true);
|
|
357
|
-
}
|
|
358
|
-
get editor() {
|
|
359
|
-
return this.parent.editor;
|
|
360
|
-
}
|
|
361
|
-
toggleBulletList() {
|
|
362
|
-
this.editor.chain().focus().toggleBulletList().run();
|
|
363
|
-
}
|
|
364
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorBulletList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
365
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScEditorBulletList, isStandalone: true, selector: "sc-editor-bullet-list", ngImport: i0, template: `
|
|
366
|
-
<button
|
|
367
|
-
[attr.aria-label]="ariaLabel"
|
|
368
|
-
[scTooltip]="ariaLabel"
|
|
369
|
-
(click)="toggleBulletList()"
|
|
370
|
-
sc-toggle
|
|
371
|
-
variant="outline"
|
|
372
|
-
type="button"
|
|
373
|
-
>
|
|
374
|
-
<svg si-list-icon></svg>
|
|
375
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
376
|
-
</button>
|
|
377
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }, { kind: "component", type: SiListIcon, selector: "svg[si-list-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
378
|
-
}
|
|
379
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorBulletList, decorators: [{
|
|
380
|
-
type: Component,
|
|
381
|
-
args: [{ selector: 'sc-editor-bullet-list', imports: [ScTooltip, ScToggle, SiListIcon], template: `
|
|
382
|
-
<button
|
|
383
|
-
[attr.aria-label]="ariaLabel"
|
|
384
|
-
[scTooltip]="ariaLabel"
|
|
385
|
-
(click)="toggleBulletList()"
|
|
386
|
-
sc-toggle
|
|
387
|
-
variant="outline"
|
|
388
|
-
type="button"
|
|
389
|
-
>
|
|
390
|
-
<svg si-list-icon></svg>
|
|
391
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
392
|
-
</button>
|
|
393
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
394
|
-
}], ctorParameters: () => [] });
|
|
395
|
-
|
|
396
|
-
class ScEditorCode {
|
|
397
|
-
ariaLabel = 'Format code';
|
|
398
|
-
parent = inject(ScEditor);
|
|
399
|
-
extensions = inject(ScExtensions);
|
|
400
|
-
constructor() {
|
|
401
|
-
this.extensions.code.set(true);
|
|
402
|
-
}
|
|
403
|
-
get editor() {
|
|
404
|
-
return this.parent.editor;
|
|
405
|
-
}
|
|
406
|
-
toggleCode() {
|
|
407
|
-
this.editor.chain().focus().toggleCode().run();
|
|
408
|
-
}
|
|
409
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorCode, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
410
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScEditorCode, isStandalone: true, selector: "sc-editor-code", ngImport: i0, template: `
|
|
411
|
-
<button
|
|
412
|
-
[attr.aria-label]="ariaLabel"
|
|
413
|
-
[scTooltip]="ariaLabel"
|
|
414
|
-
(click)="toggleCode()"
|
|
415
|
-
sc-toggle
|
|
416
|
-
variant="outline"
|
|
417
|
-
type="button"
|
|
418
|
-
>
|
|
419
|
-
<svg si-code-icon></svg>
|
|
420
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
421
|
-
</button>
|
|
422
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "component", type: SiCodeIcon, selector: "svg[si-code-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
423
|
-
}
|
|
424
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorCode, decorators: [{
|
|
425
|
-
type: Component,
|
|
426
|
-
args: [{ selector: 'sc-editor-code', imports: [ScTooltip, SiCodeIcon, ScToggle], template: `
|
|
427
|
-
<button
|
|
428
|
-
[attr.aria-label]="ariaLabel"
|
|
429
|
-
[scTooltip]="ariaLabel"
|
|
430
|
-
(click)="toggleCode()"
|
|
431
|
-
sc-toggle
|
|
432
|
-
variant="outline"
|
|
433
|
-
type="button"
|
|
434
|
-
>
|
|
435
|
-
<svg si-code-icon></svg>
|
|
436
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
437
|
-
</button>
|
|
438
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
439
|
-
}], ctorParameters: () => [] });
|
|
440
|
-
|
|
441
|
-
class ScEditorHighlight {
|
|
442
|
-
ariaLabel = 'Toggle Highlight';
|
|
443
|
-
parent = inject(ScEditor);
|
|
444
|
-
extensions = inject(ScExtensions);
|
|
445
|
-
constructor() {
|
|
446
|
-
this.extensions.highlight.set(true);
|
|
447
|
-
}
|
|
448
|
-
get editor() {
|
|
449
|
-
return this.parent.editor;
|
|
450
|
-
}
|
|
451
|
-
toggleHighlight() {
|
|
452
|
-
this.editor.chain().focus().toggleHighlight().run();
|
|
453
|
-
}
|
|
454
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorHighlight, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
455
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScEditorHighlight, isStandalone: true, selector: "sc-editor-highlight", ngImport: i0, template: `
|
|
456
|
-
<button
|
|
457
|
-
[attr.aria-label]="ariaLabel"
|
|
458
|
-
[scTooltip]="ariaLabel"
|
|
459
|
-
(click)="toggleHighlight()"
|
|
460
|
-
sc-toggle
|
|
461
|
-
variant="outline"
|
|
462
|
-
type="button"
|
|
463
|
-
>
|
|
464
|
-
<svg si-highlighter-icon></svg>
|
|
465
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
466
|
-
</button>
|
|
467
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }, { kind: "component", type: SiHighlighterIcon, selector: "svg[si-highlighter-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
468
|
-
}
|
|
469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorHighlight, decorators: [{
|
|
470
|
-
type: Component,
|
|
471
|
-
args: [{ selector: 'sc-editor-highlight', imports: [ScTooltip, ScToggle, SiHighlighterIcon], template: `
|
|
472
|
-
<button
|
|
473
|
-
[attr.aria-label]="ariaLabel"
|
|
474
|
-
[scTooltip]="ariaLabel"
|
|
475
|
-
(click)="toggleHighlight()"
|
|
476
|
-
sc-toggle
|
|
477
|
-
variant="outline"
|
|
478
|
-
type="button"
|
|
479
|
-
>
|
|
480
|
-
<svg si-highlighter-icon></svg>
|
|
481
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
482
|
-
</button>
|
|
483
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
484
|
-
}], ctorParameters: () => [] });
|
|
485
|
-
|
|
486
|
-
class ScEditorHorizontalRule {
|
|
487
|
-
ariaLabel = 'Toggle Horizontal Rule';
|
|
488
|
-
parent = inject(ScEditor);
|
|
489
|
-
extensions = inject(ScExtensions);
|
|
490
|
-
constructor() {
|
|
491
|
-
this.extensions.horizontalRule.set(true);
|
|
492
|
-
}
|
|
493
|
-
get editor() {
|
|
494
|
-
return this.parent.editor;
|
|
495
|
-
}
|
|
496
|
-
setHorizontalRule() {
|
|
497
|
-
this.editor.chain().focus().setHorizontalRule().run();
|
|
498
|
-
}
|
|
499
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorHorizontalRule, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
500
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScEditorHorizontalRule, isStandalone: true, selector: "sc-editor-horizontal-rule", ngImport: i0, template: `
|
|
501
|
-
<button
|
|
502
|
-
[attr.aria-label]="ariaLabel"
|
|
503
|
-
[scTooltip]="ariaLabel"
|
|
504
|
-
(click)="setHorizontalRule()"
|
|
505
|
-
sc-toggle
|
|
506
|
-
variant="outline"
|
|
507
|
-
type="button"
|
|
508
|
-
>
|
|
509
|
-
<svg si-minus-icon></svg>
|
|
510
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
511
|
-
</button>
|
|
512
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }, { kind: "component", type: SiMinusIcon, selector: "svg[si-minus-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
513
|
-
}
|
|
514
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorHorizontalRule, decorators: [{
|
|
515
|
-
type: Component,
|
|
516
|
-
args: [{ selector: 'sc-editor-horizontal-rule', imports: [ScTooltip, ScToggle, SiMinusIcon], template: `
|
|
517
|
-
<button
|
|
518
|
-
[attr.aria-label]="ariaLabel"
|
|
519
|
-
[scTooltip]="ariaLabel"
|
|
520
|
-
(click)="setHorizontalRule()"
|
|
521
|
-
sc-toggle
|
|
522
|
-
variant="outline"
|
|
523
|
-
type="button"
|
|
524
|
-
>
|
|
525
|
-
<svg si-minus-icon></svg>
|
|
526
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
527
|
-
</button>
|
|
528
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
529
|
-
}], ctorParameters: () => [] });
|
|
530
|
-
|
|
531
|
-
class ScEditorItalic {
|
|
532
|
-
ariaLabel = 'Toggle Italic';
|
|
533
|
-
parent = inject(ScEditor);
|
|
534
|
-
extensions = inject(ScExtensions);
|
|
535
|
-
constructor() {
|
|
536
|
-
this.extensions.italic.set(true);
|
|
537
|
-
}
|
|
538
|
-
get editor() {
|
|
539
|
-
return this.parent.editor;
|
|
540
|
-
}
|
|
541
|
-
toggleItalic() {
|
|
542
|
-
this.editor.chain().focus().toggleItalic().run();
|
|
543
|
-
}
|
|
544
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorItalic, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
545
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScEditorItalic, isStandalone: true, selector: "sc-editor-italic", ngImport: i0, template: `
|
|
546
|
-
<button
|
|
547
|
-
[attr.aria-label]="ariaLabel"
|
|
548
|
-
[scTooltip]="ariaLabel"
|
|
549
|
-
(click)="toggleItalic()"
|
|
550
|
-
type="button"
|
|
551
|
-
sc-toggle
|
|
552
|
-
variant="outline"
|
|
553
|
-
>
|
|
554
|
-
<svg si-italic-icon></svg>
|
|
555
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
556
|
-
</button>
|
|
557
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }, { kind: "component", type: SiItalicIcon, selector: "svg[si-italic-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
558
|
-
}
|
|
559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorItalic, decorators: [{
|
|
560
|
-
type: Component,
|
|
561
|
-
args: [{ selector: 'sc-editor-italic', imports: [ScTooltip, ScToggle, SiItalicIcon], template: `
|
|
562
|
-
<button
|
|
563
|
-
[attr.aria-label]="ariaLabel"
|
|
564
|
-
[scTooltip]="ariaLabel"
|
|
565
|
-
(click)="toggleItalic()"
|
|
566
|
-
type="button"
|
|
567
|
-
sc-toggle
|
|
568
|
-
variant="outline"
|
|
569
|
-
>
|
|
570
|
-
<svg si-italic-icon></svg>
|
|
571
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
572
|
-
</button>
|
|
573
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
574
|
-
}], ctorParameters: () => [] });
|
|
575
|
-
|
|
576
|
-
class ScEditorOrderedList {
|
|
577
|
-
ariaLabel = 'Toggle ordered list';
|
|
578
|
-
parent = inject(ScEditor);
|
|
579
|
-
extensions = inject(ScExtensions);
|
|
580
|
-
constructor() {
|
|
581
|
-
this.extensions.orderedList.set(true);
|
|
582
|
-
}
|
|
583
|
-
get editor() {
|
|
584
|
-
return this.parent.editor;
|
|
585
|
-
}
|
|
586
|
-
toggleOrderedList() {
|
|
587
|
-
this.editor.chain().focus().toggleOrderedList().run();
|
|
588
|
-
}
|
|
589
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorOrderedList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
590
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScEditorOrderedList, isStandalone: true, selector: "sc-editor-ordered-list", ngImport: i0, template: `
|
|
591
|
-
<button
|
|
592
|
-
[attr.aria-label]="ariaLabel"
|
|
593
|
-
[scTooltip]="ariaLabel"
|
|
594
|
-
(click)="toggleOrderedList()"
|
|
595
|
-
type="button"
|
|
596
|
-
sc-toggle
|
|
597
|
-
variant="outline"
|
|
598
|
-
>
|
|
599
|
-
<svg si-list-ordered-icon></svg>
|
|
600
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
601
|
-
</button>
|
|
602
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }, { kind: "component", type: SiListOrderedIcon, selector: "svg[si-list-ordered-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
603
|
-
}
|
|
604
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorOrderedList, decorators: [{
|
|
605
|
-
type: Component,
|
|
606
|
-
args: [{ selector: 'sc-editor-ordered-list', imports: [ScTooltip, ScToggle, SiListOrderedIcon], template: `
|
|
607
|
-
<button
|
|
608
|
-
[attr.aria-label]="ariaLabel"
|
|
609
|
-
[scTooltip]="ariaLabel"
|
|
610
|
-
(click)="toggleOrderedList()"
|
|
611
|
-
type="button"
|
|
612
|
-
sc-toggle
|
|
613
|
-
variant="outline"
|
|
614
|
-
>
|
|
615
|
-
<svg si-list-ordered-icon></svg>
|
|
616
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
617
|
-
</button>
|
|
618
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
619
|
-
}], ctorParameters: () => [] });
|
|
620
|
-
|
|
621
|
-
class ScEditorParagraph {
|
|
622
|
-
parent = inject(ScEditor);
|
|
623
|
-
get editor() {
|
|
624
|
-
return this.parent.editor;
|
|
625
|
-
}
|
|
626
|
-
setParagraph() {
|
|
627
|
-
this.editor.chain().focus().setParagraph().run();
|
|
628
|
-
}
|
|
629
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorParagraph, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
630
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScEditorParagraph, isStandalone: true, selector: "sc-editor-paragraph", ngImport: i0, template: `
|
|
631
|
-
<button [scMenuTriggerFor]="menu" sc-toggle variant="outline" type="button">
|
|
632
|
-
Paragraph & Headings
|
|
633
|
-
</button>
|
|
634
|
-
|
|
635
|
-
<ng-template #menu>
|
|
636
|
-
<div sc-menu>
|
|
637
|
-
<sc-menu-group>
|
|
638
|
-
<button (click)="setParagraph()" sc-menu-item>
|
|
639
|
-
<span>Paragraph</span>
|
|
640
|
-
<span sc-menu-shortcut>⌘+Alt+0</span>
|
|
641
|
-
</button>
|
|
642
|
-
</sc-menu-group>
|
|
643
|
-
<hr sc-menu-separator />
|
|
644
|
-
<sc-menu-group>
|
|
645
|
-
<button sc-menu-item>
|
|
646
|
-
<h1>Heading 1</h1>
|
|
647
|
-
<span sc-menu-shortcut>⌘+Alt+1</span>
|
|
648
|
-
</button>
|
|
649
|
-
<button sc-menu-item>
|
|
650
|
-
<h2>Heading 2</h2>
|
|
651
|
-
<span sc-menu-shortcut>⌘+Alt+2</span>
|
|
652
|
-
</button>
|
|
653
|
-
|
|
654
|
-
<button sc-menu-item>
|
|
655
|
-
<h3>Heading 3</h3>
|
|
656
|
-
<span sc-menu-shortcut>⌘+Alt+3</span>
|
|
657
|
-
</button>
|
|
658
|
-
|
|
659
|
-
<button sc-menu-item>
|
|
660
|
-
<h4>Heading 4</h4>
|
|
661
|
-
<span sc-menu-shortcut>⌘+Alt+4</span>
|
|
662
|
-
</button>
|
|
663
|
-
|
|
664
|
-
<button sc-menu-item>
|
|
665
|
-
<h5>Heading 5</h5>
|
|
666
|
-
<span sc-menu-shortcut>⌘+Alt+5</span>
|
|
667
|
-
</button>
|
|
668
|
-
|
|
669
|
-
<button sc-menu-item>
|
|
670
|
-
<h6>Heading 6</h6>
|
|
671
|
-
<span sc-menu-shortcut>⌘+Alt+6</span>
|
|
672
|
-
</button>
|
|
673
|
-
</sc-menu-group>
|
|
674
|
-
</div>
|
|
675
|
-
</ng-template>
|
|
676
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "component", type: ScMenuShortcut, selector: "span[sc-menu-shortcut]", inputs: ["class"] }, { kind: "component", type: ScMenuSeparator, selector: "hr[sc-menu-separator]", inputs: ["class"] }, { kind: "component", type: ScMenuGroup, selector: "sc-menu-group", inputs: ["class"] }, { kind: "component", type: ScMenuItem, selector: "button[sc-menu-item]", inputs: ["class", "inset"] }, { kind: "directive", type: ScMenuTriggerFor, selector: "[scMenuTriggerFor]", inputs: ["scMenuTriggerFor"] }, { kind: "component", type: ScMenu, selector: "div[sc-menu]", inputs: ["class"] }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
677
|
-
}
|
|
678
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorParagraph, decorators: [{
|
|
679
|
-
type: Component,
|
|
680
|
-
args: [{ selector: 'sc-editor-paragraph', imports: [
|
|
681
|
-
ScMenuShortcut,
|
|
682
|
-
ScMenuSeparator,
|
|
683
|
-
ScMenuGroup,
|
|
684
|
-
ScMenuItem,
|
|
685
|
-
ScMenuTriggerFor,
|
|
686
|
-
ScMenu,
|
|
687
|
-
ScToggle,
|
|
688
|
-
], template: `
|
|
689
|
-
<button [scMenuTriggerFor]="menu" sc-toggle variant="outline" type="button">
|
|
690
|
-
Paragraph & Headings
|
|
691
|
-
</button>
|
|
692
|
-
|
|
693
|
-
<ng-template #menu>
|
|
694
|
-
<div sc-menu>
|
|
695
|
-
<sc-menu-group>
|
|
696
|
-
<button (click)="setParagraph()" sc-menu-item>
|
|
697
|
-
<span>Paragraph</span>
|
|
698
|
-
<span sc-menu-shortcut>⌘+Alt+0</span>
|
|
699
|
-
</button>
|
|
700
|
-
</sc-menu-group>
|
|
701
|
-
<hr sc-menu-separator />
|
|
702
|
-
<sc-menu-group>
|
|
703
|
-
<button sc-menu-item>
|
|
704
|
-
<h1>Heading 1</h1>
|
|
705
|
-
<span sc-menu-shortcut>⌘+Alt+1</span>
|
|
706
|
-
</button>
|
|
707
|
-
<button sc-menu-item>
|
|
708
|
-
<h2>Heading 2</h2>
|
|
709
|
-
<span sc-menu-shortcut>⌘+Alt+2</span>
|
|
710
|
-
</button>
|
|
711
|
-
|
|
712
|
-
<button sc-menu-item>
|
|
713
|
-
<h3>Heading 3</h3>
|
|
714
|
-
<span sc-menu-shortcut>⌘+Alt+3</span>
|
|
715
|
-
</button>
|
|
716
|
-
|
|
717
|
-
<button sc-menu-item>
|
|
718
|
-
<h4>Heading 4</h4>
|
|
719
|
-
<span sc-menu-shortcut>⌘+Alt+4</span>
|
|
720
|
-
</button>
|
|
721
|
-
|
|
722
|
-
<button sc-menu-item>
|
|
723
|
-
<h5>Heading 5</h5>
|
|
724
|
-
<span sc-menu-shortcut>⌘+Alt+5</span>
|
|
725
|
-
</button>
|
|
726
|
-
|
|
727
|
-
<button sc-menu-item>
|
|
728
|
-
<h6>Heading 6</h6>
|
|
729
|
-
<span sc-menu-shortcut>⌘+Alt+6</span>
|
|
730
|
-
</button>
|
|
731
|
-
</sc-menu-group>
|
|
732
|
-
</div>
|
|
733
|
-
</ng-template>
|
|
734
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
735
|
-
}] });
|
|
736
|
-
|
|
737
|
-
class ScEditorRedo {
|
|
738
|
-
ariaLabel = 'Redo';
|
|
739
|
-
parent = inject(ScEditor);
|
|
740
|
-
extensions = inject(ScExtensions);
|
|
741
|
-
constructor() {
|
|
742
|
-
this.extensions.redo.set(true);
|
|
743
|
-
}
|
|
744
|
-
get editor() {
|
|
745
|
-
return this.parent.editor;
|
|
746
|
-
}
|
|
747
|
-
redo() {
|
|
748
|
-
this.editor.chain().focus().redo().run();
|
|
749
|
-
}
|
|
750
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorRedo, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
751
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScEditorRedo, isStandalone: true, selector: "sc-editor-redo", ngImport: i0, template: `
|
|
752
|
-
<button
|
|
753
|
-
[attr.aria-label]="ariaLabel"
|
|
754
|
-
[scTooltip]="ariaLabel"
|
|
755
|
-
(click)="redo()"
|
|
756
|
-
sc-toggle
|
|
757
|
-
variant="outline"
|
|
758
|
-
type="button"
|
|
759
|
-
>
|
|
760
|
-
<svg si-redo-icon></svg>
|
|
761
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
762
|
-
</button>
|
|
763
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }, { kind: "component", type: SiRedoIcon, selector: "svg[si-redo-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
764
|
-
}
|
|
765
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorRedo, decorators: [{
|
|
766
|
-
type: Component,
|
|
767
|
-
args: [{ selector: 'sc-editor-redo', imports: [ScTooltip, ScToggle, SiRedoIcon], template: `
|
|
768
|
-
<button
|
|
769
|
-
[attr.aria-label]="ariaLabel"
|
|
770
|
-
[scTooltip]="ariaLabel"
|
|
771
|
-
(click)="redo()"
|
|
772
|
-
sc-toggle
|
|
773
|
-
variant="outline"
|
|
774
|
-
type="button"
|
|
775
|
-
>
|
|
776
|
-
<svg si-redo-icon></svg>
|
|
777
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
778
|
-
</button>
|
|
779
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
780
|
-
}], ctorParameters: () => [] });
|
|
781
|
-
|
|
782
|
-
class ScEditorStrike {
|
|
783
|
-
ariaLabel = 'Toggle Strike';
|
|
784
|
-
parent = inject(ScEditor);
|
|
785
|
-
extensions = inject(ScExtensions);
|
|
786
|
-
constructor() {
|
|
787
|
-
this.extensions.strike.set(true);
|
|
788
|
-
}
|
|
789
|
-
get editor() {
|
|
790
|
-
return this.parent.editor;
|
|
791
|
-
}
|
|
792
|
-
toggleStrike() {
|
|
793
|
-
this.editor.chain().focus().toggleStrike().run();
|
|
794
|
-
}
|
|
795
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorStrike, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
796
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScEditorStrike, isStandalone: true, selector: "sc-editor-strike", ngImport: i0, template: `
|
|
797
|
-
<button
|
|
798
|
-
[attr.aria-label]="ariaLabel"
|
|
799
|
-
[scTooltip]="ariaLabel"
|
|
800
|
-
(click)="toggleStrike()"
|
|
801
|
-
sc-toggle
|
|
802
|
-
variant="outline"
|
|
803
|
-
type="button"
|
|
804
|
-
>
|
|
805
|
-
<svg si-strikethrough-icon></svg>
|
|
806
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
807
|
-
</button>
|
|
808
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "component", type: SiStrikethroughIcon, selector: "svg[si-strikethrough-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
809
|
-
}
|
|
810
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorStrike, decorators: [{
|
|
811
|
-
type: Component,
|
|
812
|
-
args: [{ selector: 'sc-editor-strike', imports: [ScTooltip, SiStrikethroughIcon, ScToggle], template: `
|
|
813
|
-
<button
|
|
814
|
-
[attr.aria-label]="ariaLabel"
|
|
815
|
-
[scTooltip]="ariaLabel"
|
|
816
|
-
(click)="toggleStrike()"
|
|
817
|
-
sc-toggle
|
|
818
|
-
variant="outline"
|
|
819
|
-
type="button"
|
|
820
|
-
>
|
|
821
|
-
<svg si-strikethrough-icon></svg>
|
|
822
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
823
|
-
</button>
|
|
824
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
825
|
-
}], ctorParameters: () => [] });
|
|
826
|
-
|
|
827
|
-
class ScEditorTextAlignCenter {
|
|
828
|
-
ariaLabel = 'Align center';
|
|
829
|
-
parent = inject(ScEditor);
|
|
830
|
-
extensions = inject(ScExtensions);
|
|
831
|
-
constructor() {
|
|
832
|
-
this.extensions.textAlignCenter.set(true);
|
|
833
|
-
}
|
|
834
|
-
get editor() {
|
|
835
|
-
return this.parent.editor;
|
|
836
|
-
}
|
|
837
|
-
setCenterAlign() {
|
|
838
|
-
this.editor.chain().focus().setTextAlign('center').run();
|
|
839
|
-
}
|
|
840
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorTextAlignCenter, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
841
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScEditorTextAlignCenter, isStandalone: true, selector: "sc-editor-text-align-center", ngImport: i0, template: `
|
|
842
|
-
<button
|
|
843
|
-
[attr.aria-label]="ariaLabel"
|
|
844
|
-
[scTooltip]="ariaLabel"
|
|
845
|
-
(click)="setCenterAlign()"
|
|
846
|
-
type="button"
|
|
847
|
-
sc-toggle
|
|
848
|
-
variant="outline"
|
|
849
|
-
>
|
|
850
|
-
<svg si-align-center-icon></svg>
|
|
851
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
852
|
-
</button>
|
|
853
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "component", type: SiAlignCenterIcon, selector: "svg[si-align-center-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
854
|
-
}
|
|
855
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorTextAlignCenter, decorators: [{
|
|
856
|
-
type: Component,
|
|
857
|
-
args: [{ selector: 'sc-editor-text-align-center', imports: [ScTooltip, SiAlignCenterIcon, ScToggle], template: `
|
|
858
|
-
<button
|
|
859
|
-
[attr.aria-label]="ariaLabel"
|
|
860
|
-
[scTooltip]="ariaLabel"
|
|
861
|
-
(click)="setCenterAlign()"
|
|
862
|
-
type="button"
|
|
863
|
-
sc-toggle
|
|
864
|
-
variant="outline"
|
|
865
|
-
>
|
|
866
|
-
<svg si-align-center-icon></svg>
|
|
867
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
868
|
-
</button>
|
|
869
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
870
|
-
}], ctorParameters: () => [] });
|
|
871
|
-
|
|
872
|
-
class ScEditorTextAlignLeft {
|
|
873
|
-
ariaLabel = 'Align left';
|
|
874
|
-
parent = inject(ScEditor);
|
|
875
|
-
extensions = inject(ScExtensions);
|
|
876
|
-
constructor() {
|
|
877
|
-
this.extensions.textAlignLeft.set(true);
|
|
878
|
-
}
|
|
879
|
-
get editor() {
|
|
880
|
-
return this.parent.editor;
|
|
881
|
-
}
|
|
882
|
-
setLeftAlign() {
|
|
883
|
-
this.editor.chain().focus().setTextAlign('left').run();
|
|
884
|
-
}
|
|
885
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorTextAlignLeft, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
886
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScEditorTextAlignLeft, isStandalone: true, selector: "sc-editor-text-align-left", ngImport: i0, template: `
|
|
887
|
-
<button
|
|
888
|
-
[attr.aria-label]="ariaLabel"
|
|
889
|
-
[scTooltip]="ariaLabel"
|
|
890
|
-
(click)="setLeftAlign()"
|
|
891
|
-
type="button"
|
|
892
|
-
sc-toggle
|
|
893
|
-
variant="outline"
|
|
894
|
-
>
|
|
895
|
-
<svg si-align-left-icon></svg>
|
|
896
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
897
|
-
</button>
|
|
898
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "component", type: SiAlignLeftIcon, selector: "svg[si-align-left-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
899
|
-
}
|
|
900
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorTextAlignLeft, decorators: [{
|
|
901
|
-
type: Component,
|
|
902
|
-
args: [{ selector: 'sc-editor-text-align-left', imports: [ScTooltip, SiAlignLeftIcon, ScToggle], template: `
|
|
903
|
-
<button
|
|
904
|
-
[attr.aria-label]="ariaLabel"
|
|
905
|
-
[scTooltip]="ariaLabel"
|
|
906
|
-
(click)="setLeftAlign()"
|
|
907
|
-
type="button"
|
|
908
|
-
sc-toggle
|
|
909
|
-
variant="outline"
|
|
910
|
-
>
|
|
911
|
-
<svg si-align-left-icon></svg>
|
|
912
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
913
|
-
</button>
|
|
914
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
915
|
-
}], ctorParameters: () => [] });
|
|
916
|
-
|
|
917
|
-
class ScEditorTextAlignRight {
|
|
918
|
-
ariaLabel = 'Align right';
|
|
919
|
-
parent = inject(ScEditor);
|
|
920
|
-
extensions = inject(ScExtensions);
|
|
921
|
-
constructor() {
|
|
922
|
-
this.extensions.textAlignRight.set(true);
|
|
923
|
-
}
|
|
924
|
-
get editor() {
|
|
925
|
-
return this.parent.editor;
|
|
926
|
-
}
|
|
927
|
-
setRightAlign() {
|
|
928
|
-
this.editor.chain().focus().setTextAlign('right').run();
|
|
929
|
-
}
|
|
930
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorTextAlignRight, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
931
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScEditorTextAlignRight, isStandalone: true, selector: "sc-editor-text-align-right", ngImport: i0, template: `
|
|
932
|
-
<button
|
|
933
|
-
[attr.aria-label]="ariaLabel"
|
|
934
|
-
[scTooltip]="ariaLabel"
|
|
935
|
-
(click)="setRightAlign()"
|
|
936
|
-
type="button"
|
|
937
|
-
sc-toggle
|
|
938
|
-
variant="outline"
|
|
939
|
-
>
|
|
940
|
-
<svg si-align-right-icon></svg>
|
|
941
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
942
|
-
</button>
|
|
943
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "component", type: SiAlignRightIcon, selector: "svg[si-align-right-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
944
|
-
}
|
|
945
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorTextAlignRight, decorators: [{
|
|
946
|
-
type: Component,
|
|
947
|
-
args: [{ selector: 'sc-editor-text-align-right', imports: [ScTooltip, SiAlignRightIcon, ScToggle], template: `
|
|
948
|
-
<button
|
|
949
|
-
[attr.aria-label]="ariaLabel"
|
|
950
|
-
[scTooltip]="ariaLabel"
|
|
951
|
-
(click)="setRightAlign()"
|
|
952
|
-
type="button"
|
|
953
|
-
sc-toggle
|
|
954
|
-
variant="outline"
|
|
955
|
-
>
|
|
956
|
-
<svg si-align-right-icon></svg>
|
|
957
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
958
|
-
</button>
|
|
959
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
960
|
-
}], ctorParameters: () => [] });
|
|
961
|
-
|
|
962
|
-
class ScEditorUnderline {
|
|
963
|
-
ariaLabel = 'Toggle underline';
|
|
964
|
-
parent = inject(ScEditor);
|
|
965
|
-
extensions = inject(ScExtensions);
|
|
966
|
-
constructor() {
|
|
967
|
-
this.extensions.underline.set(true);
|
|
968
|
-
}
|
|
969
|
-
get editor() {
|
|
970
|
-
return this.parent.editor;
|
|
971
|
-
}
|
|
972
|
-
toggleUnderline() {
|
|
973
|
-
this.editor.chain().focus().toggleUnderline().run();
|
|
974
|
-
}
|
|
975
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorUnderline, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
976
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScEditorUnderline, isStandalone: true, selector: "sc-editor-underline", ngImport: i0, template: `
|
|
977
|
-
<button
|
|
978
|
-
[attr.aria-label]="ariaLabel"
|
|
979
|
-
[scTooltip]="ariaLabel"
|
|
980
|
-
(click)="toggleUnderline()"
|
|
981
|
-
sc-toggle
|
|
982
|
-
variant="outline"
|
|
983
|
-
type="button"
|
|
984
|
-
>
|
|
985
|
-
<svg si-underline-icon></svg>
|
|
986
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
987
|
-
</button>
|
|
988
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "component", type: SiUnderlineIcon, selector: "svg[si-underline-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
989
|
-
}
|
|
990
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorUnderline, decorators: [{
|
|
991
|
-
type: Component,
|
|
992
|
-
args: [{ selector: 'sc-editor-underline', imports: [ScTooltip, SiUnderlineIcon, ScToggle], template: `
|
|
993
|
-
<button
|
|
994
|
-
[attr.aria-label]="ariaLabel"
|
|
995
|
-
[scTooltip]="ariaLabel"
|
|
996
|
-
(click)="toggleUnderline()"
|
|
997
|
-
sc-toggle
|
|
998
|
-
variant="outline"
|
|
999
|
-
type="button"
|
|
1000
|
-
>
|
|
1001
|
-
<svg si-underline-icon></svg>
|
|
1002
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
1003
|
-
</button>
|
|
1004
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
1005
|
-
}], ctorParameters: () => [] });
|
|
1006
|
-
|
|
1007
|
-
class ScEditorUndo {
|
|
1008
|
-
ariaLabel = 'Undo';
|
|
1009
|
-
parent = inject(ScEditor);
|
|
1010
|
-
extensions = inject(ScExtensions);
|
|
1011
|
-
constructor() {
|
|
1012
|
-
this.extensions.undo.set(true);
|
|
1013
|
-
}
|
|
1014
|
-
get editor() {
|
|
1015
|
-
return this.parent.editor;
|
|
1016
|
-
}
|
|
1017
|
-
undo() {
|
|
1018
|
-
this.editor.chain().focus().undo().run();
|
|
1019
|
-
}
|
|
1020
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorUndo, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1021
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScEditorUndo, isStandalone: true, selector: "sc-editor-undo", ngImport: i0, template: `
|
|
1022
|
-
<button
|
|
1023
|
-
[attr.aria-label]="ariaLabel"
|
|
1024
|
-
[scTooltip]="ariaLabel"
|
|
1025
|
-
(click)="undo()"
|
|
1026
|
-
sc-toggle
|
|
1027
|
-
variant="outline"
|
|
1028
|
-
type="button"
|
|
1029
|
-
>
|
|
1030
|
-
<svg si-undo-icon></svg>
|
|
1031
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
1032
|
-
</button>
|
|
1033
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }, { kind: "component", type: SiUndoIcon, selector: "svg[si-undo-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1034
|
-
}
|
|
1035
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorUndo, decorators: [{
|
|
1036
|
-
type: Component,
|
|
1037
|
-
args: [{ selector: 'sc-editor-undo', imports: [ScTooltip, ScToggle, SiUndoIcon], template: `
|
|
1038
|
-
<button
|
|
1039
|
-
[attr.aria-label]="ariaLabel"
|
|
1040
|
-
[scTooltip]="ariaLabel"
|
|
1041
|
-
(click)="undo()"
|
|
1042
|
-
sc-toggle
|
|
1043
|
-
variant="outline"
|
|
1044
|
-
type="button"
|
|
1045
|
-
>
|
|
1046
|
-
<svg si-undo-icon></svg>
|
|
1047
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
1048
|
-
</button>
|
|
1049
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
1050
|
-
}], ctorParameters: () => [] });
|
|
1051
|
-
|
|
1052
|
-
class ScEditorUnsetLink {
|
|
1053
|
-
ariaLabel = 'Unset Link';
|
|
1054
|
-
parent = inject(ScEditor);
|
|
1055
|
-
dialog = inject(Dialog);
|
|
1056
|
-
extensions = inject(ScExtensions);
|
|
1057
|
-
constructor() {
|
|
1058
|
-
this.extensions.unsetLink.set(true);
|
|
1059
|
-
}
|
|
1060
|
-
get editor() {
|
|
1061
|
-
return this.parent.editor;
|
|
1062
|
-
}
|
|
1063
|
-
unsetLink() {
|
|
1064
|
-
this.editor.chain().focus().unsetLink().run();
|
|
1065
|
-
}
|
|
1066
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorUnsetLink, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1067
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScEditorUnsetLink, isStandalone: true, selector: "sc-editor-unset-link", ngImport: i0, template: `
|
|
1068
|
-
<button
|
|
1069
|
-
[attr.aria-label]="ariaLabel"
|
|
1070
|
-
[scTooltip]="ariaLabel"
|
|
1071
|
-
(click)="unsetLink()"
|
|
1072
|
-
sc-toggle
|
|
1073
|
-
variant="outline"
|
|
1074
|
-
type="button"
|
|
1075
|
-
>
|
|
1076
|
-
<svg si-unlink-icon></svg>
|
|
1077
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
1078
|
-
</button>
|
|
1079
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }, { kind: "component", type: SiUnlinkIcon, selector: "svg[si-unlink-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1080
|
-
}
|
|
1081
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorUnsetLink, decorators: [{
|
|
1082
|
-
type: Component,
|
|
1083
|
-
args: [{ selector: 'sc-editor-unset-link', imports: [ScTooltip, ScToggle, SiUnlinkIcon], template: `
|
|
1084
|
-
<button
|
|
1085
|
-
[attr.aria-label]="ariaLabel"
|
|
1086
|
-
[scTooltip]="ariaLabel"
|
|
1087
|
-
(click)="unsetLink()"
|
|
1088
|
-
sc-toggle
|
|
1089
|
-
variant="outline"
|
|
1090
|
-
type="button"
|
|
1091
|
-
>
|
|
1092
|
-
<svg si-unlink-icon></svg>
|
|
1093
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
1094
|
-
</button>
|
|
1095
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
1096
|
-
}], ctorParameters: () => [] });
|
|
1097
|
-
|
|
1098
|
-
class ScEditorGroup {
|
|
1099
|
-
classInput = input('', {
|
|
1100
|
-
alias: 'class',
|
|
1101
|
-
});
|
|
1102
|
-
class = computed(() => cn('flex flex-wrap items-center gap-1', this.classInput()));
|
|
1103
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1104
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.4", type: ScEditorGroup, isStandalone: true, selector: "sc-editor-group", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "class()" } }, ngImport: i0, template: `
|
|
1105
|
-
<ng-content />
|
|
1106
|
-
`, isInline: true, styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1107
|
-
}
|
|
1108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorGroup, decorators: [{
|
|
1109
|
-
type: Component,
|
|
1110
|
-
args: [{ selector: 'sc-editor-group', imports: [], template: `
|
|
1111
|
-
<ng-content />
|
|
1112
|
-
`, host: {
|
|
1113
|
-
'[class]': 'class()',
|
|
1114
|
-
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
1115
|
-
}] });
|
|
1116
|
-
|
|
1117
|
-
class ScEditorToolbar {
|
|
1118
|
-
classInput = input('', {
|
|
1119
|
-
alias: 'class',
|
|
1120
|
-
});
|
|
1121
|
-
class = computed(() => cn('flex items-center justify-between border-b p-2 dark:border-gray-700', this.classInput()));
|
|
1122
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorToolbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1123
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.4", type: ScEditorToolbar, isStandalone: true, selector: "sc-editor-toolbar", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "class()" } }, ngImport: i0, template: `
|
|
1124
|
-
<ng-content />
|
|
1125
|
-
`, isInline: true, styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1126
|
-
}
|
|
1127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScEditorToolbar, decorators: [{
|
|
1128
|
-
type: Component,
|
|
1129
|
-
args: [{ selector: 'sc-editor-toolbar', imports: [], template: `
|
|
1130
|
-
<ng-content />
|
|
1131
|
-
`, host: {
|
|
1132
|
-
'[class]': 'class()',
|
|
1133
|
-
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
1134
|
-
}] });
|
|
1135
|
-
|
|
1136
|
-
const allColors = {
|
|
1137
|
-
slate: {
|
|
1138
|
-
50: '#f8fafc',
|
|
1139
|
-
100: '#f1f5f9',
|
|
1140
|
-
200: '#e2e8f0',
|
|
1141
|
-
300: '#cbd5e1',
|
|
1142
|
-
400: '#94a3b8',
|
|
1143
|
-
500: '#64748b',
|
|
1144
|
-
600: '#475569',
|
|
1145
|
-
700: '#334155',
|
|
1146
|
-
800: '#1e293b',
|
|
1147
|
-
900: '#0f172a',
|
|
1148
|
-
950: '#020617',
|
|
1149
|
-
},
|
|
1150
|
-
gray: {
|
|
1151
|
-
50: '#f9fafb',
|
|
1152
|
-
100: '#f3f4f6',
|
|
1153
|
-
200: '#e5e7eb',
|
|
1154
|
-
300: '#d1d5db',
|
|
1155
|
-
400: '#9ca3af',
|
|
1156
|
-
500: '#6b7280',
|
|
1157
|
-
600: '#4b5563',
|
|
1158
|
-
700: '#374151',
|
|
1159
|
-
800: '#1f2937',
|
|
1160
|
-
900: '#111827',
|
|
1161
|
-
950: '#030712',
|
|
1162
|
-
},
|
|
1163
|
-
zinc: {
|
|
1164
|
-
50: '#fafafa',
|
|
1165
|
-
100: '#f4f4f5',
|
|
1166
|
-
200: '#e4e4e7',
|
|
1167
|
-
300: '#d4d4d8',
|
|
1168
|
-
400: '#a1a1aa',
|
|
1169
|
-
500: '#71717a',
|
|
1170
|
-
600: '#52525b',
|
|
1171
|
-
700: '#3f3f46',
|
|
1172
|
-
800: '#27272a',
|
|
1173
|
-
900: '#18181b',
|
|
1174
|
-
950: '#09090b',
|
|
1175
|
-
},
|
|
1176
|
-
neutral: {
|
|
1177
|
-
50: '#fafafa',
|
|
1178
|
-
100: '#f5f5f5',
|
|
1179
|
-
200: '#e5e5e5',
|
|
1180
|
-
300: '#d4d4d4',
|
|
1181
|
-
400: '#a3a3a3',
|
|
1182
|
-
500: '#737373',
|
|
1183
|
-
600: '#525252',
|
|
1184
|
-
700: '#404040',
|
|
1185
|
-
800: '#262626',
|
|
1186
|
-
900: '#171717',
|
|
1187
|
-
950: '#0a0a0a',
|
|
1188
|
-
},
|
|
1189
|
-
stone: {
|
|
1190
|
-
50: '#fafaf9',
|
|
1191
|
-
100: '#f5f5f4',
|
|
1192
|
-
200: '#e7e5e4',
|
|
1193
|
-
300: '#d6d3d1',
|
|
1194
|
-
400: '#a8a29e',
|
|
1195
|
-
500: '#78716c',
|
|
1196
|
-
600: '#57534e',
|
|
1197
|
-
700: '#44403c',
|
|
1198
|
-
800: '#292524',
|
|
1199
|
-
900: '#1c1917',
|
|
1200
|
-
950: '#0c0a09',
|
|
1201
|
-
},
|
|
1202
|
-
red: {
|
|
1203
|
-
50: '#fef2f2',
|
|
1204
|
-
100: '#fee2e2',
|
|
1205
|
-
200: '#fecaca',
|
|
1206
|
-
300: '#fca5a5',
|
|
1207
|
-
400: '#f87171',
|
|
1208
|
-
500: '#ef4444',
|
|
1209
|
-
600: '#dc2626',
|
|
1210
|
-
700: '#b91c1c',
|
|
1211
|
-
800: '#991b1b',
|
|
1212
|
-
900: '#7f1d1d',
|
|
1213
|
-
950: '#450a0a',
|
|
1214
|
-
},
|
|
1215
|
-
orange: {
|
|
1216
|
-
50: '#fff7ed',
|
|
1217
|
-
100: '#ffedd5',
|
|
1218
|
-
200: '#fed7aa',
|
|
1219
|
-
300: '#fdba74',
|
|
1220
|
-
400: '#fb923c',
|
|
1221
|
-
500: '#f97316',
|
|
1222
|
-
600: '#ea580c',
|
|
1223
|
-
700: '#c2410c',
|
|
1224
|
-
800: '#9a3412',
|
|
1225
|
-
900: '#7c2d12',
|
|
1226
|
-
950: '#431407',
|
|
1227
|
-
},
|
|
1228
|
-
amber: {
|
|
1229
|
-
50: '#fffbeb',
|
|
1230
|
-
100: '#fef3c7',
|
|
1231
|
-
200: '#fde68a',
|
|
1232
|
-
300: '#fcd34d',
|
|
1233
|
-
400: '#fbbf24',
|
|
1234
|
-
500: '#f59e0b',
|
|
1235
|
-
600: '#d97706',
|
|
1236
|
-
700: '#b45309',
|
|
1237
|
-
800: '#92400e',
|
|
1238
|
-
900: '#78350f',
|
|
1239
|
-
950: '#451a03',
|
|
1240
|
-
},
|
|
1241
|
-
yellow: {
|
|
1242
|
-
50: '#fefce8',
|
|
1243
|
-
100: '#fef9c3',
|
|
1244
|
-
200: '#fef08a',
|
|
1245
|
-
300: '#fde047',
|
|
1246
|
-
400: '#facc15',
|
|
1247
|
-
500: '#eab308',
|
|
1248
|
-
600: '#ca8a04',
|
|
1249
|
-
700: '#a16207',
|
|
1250
|
-
800: '#854d0e',
|
|
1251
|
-
900: '#713f12',
|
|
1252
|
-
950: '#422006',
|
|
1253
|
-
},
|
|
1254
|
-
lime: {
|
|
1255
|
-
50: '#f7fee7',
|
|
1256
|
-
100: '#ecfccb',
|
|
1257
|
-
200: '#d9f99d',
|
|
1258
|
-
300: '#bef264',
|
|
1259
|
-
400: '#a3e635',
|
|
1260
|
-
500: '#84cc16',
|
|
1261
|
-
600: '#65a30d',
|
|
1262
|
-
700: '#4d7c0f',
|
|
1263
|
-
800: '#3f6212',
|
|
1264
|
-
900: '#365314',
|
|
1265
|
-
950: '#1a2e05',
|
|
1266
|
-
},
|
|
1267
|
-
green: {
|
|
1268
|
-
50: '#f0fdf4',
|
|
1269
|
-
100: '#dcfce7',
|
|
1270
|
-
200: '#bbf7d0',
|
|
1271
|
-
300: '#86efac',
|
|
1272
|
-
400: '#4ade80',
|
|
1273
|
-
500: '#22c55e',
|
|
1274
|
-
600: '#16a34a',
|
|
1275
|
-
700: '#15803d',
|
|
1276
|
-
800: '#166534',
|
|
1277
|
-
900: '#14532d',
|
|
1278
|
-
950: '#052e16',
|
|
1279
|
-
},
|
|
1280
|
-
emerald: {
|
|
1281
|
-
50: '#ecfdf5',
|
|
1282
|
-
100: '#d1fae5',
|
|
1283
|
-
200: '#a7f3d0',
|
|
1284
|
-
300: '#6ee7b7',
|
|
1285
|
-
400: '#34d399',
|
|
1286
|
-
500: '#10b981',
|
|
1287
|
-
600: '#059669',
|
|
1288
|
-
700: '#047857',
|
|
1289
|
-
800: '#065f46',
|
|
1290
|
-
900: '#064e3b',
|
|
1291
|
-
950: '#022c22',
|
|
1292
|
-
},
|
|
1293
|
-
teal: {
|
|
1294
|
-
50: '#f0fdfa',
|
|
1295
|
-
100: '#ccfbf1',
|
|
1296
|
-
200: '#99f6e4',
|
|
1297
|
-
300: '#5eead4',
|
|
1298
|
-
400: '#2dd4bf',
|
|
1299
|
-
500: '#14b8a6',
|
|
1300
|
-
600: '#0d9488',
|
|
1301
|
-
700: '#0f766e',
|
|
1302
|
-
800: '#115e59',
|
|
1303
|
-
900: '#134e4a',
|
|
1304
|
-
950: '#042f2e',
|
|
1305
|
-
},
|
|
1306
|
-
cyan: {
|
|
1307
|
-
50: '#ecfeff',
|
|
1308
|
-
100: '#cffafe',
|
|
1309
|
-
200: '#a5f3fc',
|
|
1310
|
-
300: '#67e8f9',
|
|
1311
|
-
400: '#22d3ee',
|
|
1312
|
-
500: '#06b6d4',
|
|
1313
|
-
600: '#0891b2',
|
|
1314
|
-
700: '#0e7490',
|
|
1315
|
-
800: '#155e75',
|
|
1316
|
-
900: '#164e63',
|
|
1317
|
-
950: '#083344',
|
|
1318
|
-
},
|
|
1319
|
-
sky: {
|
|
1320
|
-
50: '#f0f9ff',
|
|
1321
|
-
100: '#e0f2fe',
|
|
1322
|
-
200: '#bae6fd',
|
|
1323
|
-
300: '#7dd3fc',
|
|
1324
|
-
400: '#38bdf8',
|
|
1325
|
-
500: '#0ea5e9',
|
|
1326
|
-
600: '#0284c7',
|
|
1327
|
-
700: '#0369a1',
|
|
1328
|
-
800: '#075985',
|
|
1329
|
-
900: '#0c4a6e',
|
|
1330
|
-
950: '#082f49',
|
|
1331
|
-
},
|
|
1332
|
-
blue: {
|
|
1333
|
-
50: '#eff6ff',
|
|
1334
|
-
100: '#dbeafe',
|
|
1335
|
-
200: '#bfdbfe',
|
|
1336
|
-
300: '#93c5fd',
|
|
1337
|
-
400: '#60a5fa',
|
|
1338
|
-
500: '#3b82f6',
|
|
1339
|
-
600: '#2563eb',
|
|
1340
|
-
700: '#1d4ed8',
|
|
1341
|
-
800: '#1e40af',
|
|
1342
|
-
900: '#1e3a8a',
|
|
1343
|
-
950: '#172554',
|
|
1344
|
-
},
|
|
1345
|
-
indigo: {
|
|
1346
|
-
50: '#eef2ff',
|
|
1347
|
-
100: '#e0e7ff',
|
|
1348
|
-
200: '#c7d2fe',
|
|
1349
|
-
300: '#a5b4fc',
|
|
1350
|
-
400: '#818cf8',
|
|
1351
|
-
500: '#6366f1',
|
|
1352
|
-
600: '#4f46e5',
|
|
1353
|
-
700: '#4338ca',
|
|
1354
|
-
800: '#3730a3',
|
|
1355
|
-
900: '#312e81',
|
|
1356
|
-
950: '#1e1b4b',
|
|
1357
|
-
},
|
|
1358
|
-
violet: {
|
|
1359
|
-
50: '#f5f3ff',
|
|
1360
|
-
100: '#ede9fe',
|
|
1361
|
-
200: '#ddd6fe',
|
|
1362
|
-
300: '#c4b5fd',
|
|
1363
|
-
400: '#a78bfa',
|
|
1364
|
-
500: '#8b5cf6',
|
|
1365
|
-
600: '#7c3aed',
|
|
1366
|
-
700: '#6d28d9',
|
|
1367
|
-
800: '#5b21b6',
|
|
1368
|
-
900: '#4c1d95',
|
|
1369
|
-
950: '#2e1065',
|
|
1370
|
-
},
|
|
1371
|
-
purple: {
|
|
1372
|
-
50: '#faf5ff',
|
|
1373
|
-
100: '#f3e8ff',
|
|
1374
|
-
200: '#e9d5ff',
|
|
1375
|
-
300: '#d8b4fe',
|
|
1376
|
-
400: '#c084fc',
|
|
1377
|
-
500: '#a855f7',
|
|
1378
|
-
600: '#9333ea',
|
|
1379
|
-
700: '#7e22ce',
|
|
1380
|
-
800: '#6b21a8',
|
|
1381
|
-
900: '#581c87',
|
|
1382
|
-
950: '#3b0764',
|
|
1383
|
-
},
|
|
1384
|
-
fuchsia: {
|
|
1385
|
-
50: '#fdf4ff',
|
|
1386
|
-
100: '#fae8ff',
|
|
1387
|
-
200: '#f5d0fe',
|
|
1388
|
-
300: '#f0abfc',
|
|
1389
|
-
400: '#e879f9',
|
|
1390
|
-
500: '#d946ef',
|
|
1391
|
-
600: '#c026d3',
|
|
1392
|
-
700: '#a21caf',
|
|
1393
|
-
800: '#86198f',
|
|
1394
|
-
900: '#701a75',
|
|
1395
|
-
950: '#4a044e',
|
|
1396
|
-
},
|
|
1397
|
-
pink: {
|
|
1398
|
-
50: '#fdf2f8',
|
|
1399
|
-
100: '#fce7f3',
|
|
1400
|
-
200: '#fbcfe8',
|
|
1401
|
-
300: '#f9a8d4',
|
|
1402
|
-
400: '#f472b6',
|
|
1403
|
-
500: '#ec4899',
|
|
1404
|
-
600: '#db2777',
|
|
1405
|
-
700: '#be185d',
|
|
1406
|
-
800: '#9d174d',
|
|
1407
|
-
900: '#831843',
|
|
1408
|
-
950: '#500724',
|
|
1409
|
-
},
|
|
1410
|
-
rose: {
|
|
1411
|
-
50: '#fff1f2',
|
|
1412
|
-
100: '#ffe4e6',
|
|
1413
|
-
200: '#fecdd3',
|
|
1414
|
-
300: '#fda4af',
|
|
1415
|
-
400: '#fb7185',
|
|
1416
|
-
500: '#f43f5e',
|
|
1417
|
-
600: '#e11d48',
|
|
1418
|
-
700: '#be123c',
|
|
1419
|
-
800: '#9f1239',
|
|
1420
|
-
900: '#881337',
|
|
1421
|
-
950: '#4c0519',
|
|
1422
|
-
},
|
|
1423
|
-
};
|
|
1424
|
-
const colors = Object.values(allColors).map((v) => v[500]);
|
|
1425
|
-
|
|
1426
|
-
class ScExtensionColor {
|
|
1427
|
-
parent = inject(ScEditor);
|
|
1428
|
-
extensions = inject(ScExtensions);
|
|
1429
|
-
colors = colors;
|
|
1430
|
-
constructor() {
|
|
1431
|
-
this.extensions.color.set(true);
|
|
1432
|
-
}
|
|
1433
|
-
get editor() {
|
|
1434
|
-
return this.parent.editor;
|
|
1435
|
-
}
|
|
1436
|
-
resetColor() {
|
|
1437
|
-
this.editor.commands.unsetColor();
|
|
1438
|
-
}
|
|
1439
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1440
|
-
setHexColor(e) {
|
|
1441
|
-
const hexColor = e.target.getAttribute('data-hex-color');
|
|
1442
|
-
this.editor.chain().focus().setColor(hexColor).run();
|
|
1443
|
-
}
|
|
1444
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensionColor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1445
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: ScExtensionColor, isStandalone: true, selector: "sc-extension-color", ngImport: i0, template: `
|
|
1446
|
-
<button
|
|
1447
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
1448
|
-
[cdkMenuTriggerFor]="textColorDropdown"
|
|
1449
|
-
type="button"
|
|
1450
|
-
scTooltip="Text color"
|
|
1451
|
-
>
|
|
1452
|
-
<svg si-palette-icon></svg>
|
|
1453
|
-
<span class="sr-only">Text color</span>
|
|
1454
|
-
</button>
|
|
1455
|
-
|
|
1456
|
-
<ng-template #textColorDropdown>
|
|
1457
|
-
<div
|
|
1458
|
-
class="z-10 w-48 rounded bg-white p-2 shadow dark:bg-gray-700"
|
|
1459
|
-
id="textColorDropdown"
|
|
1460
|
-
cdkMenu
|
|
1461
|
-
>
|
|
1462
|
-
<div
|
|
1463
|
-
class="group mb-3 grid grid-cols-6 items-center gap-2 rounded-lg p-1.5 hover:bg-gray-100 dark:hover:bg-gray-600"
|
|
1464
|
-
>
|
|
1465
|
-
<input
|
|
1466
|
-
class="col-span-3 h-8 w-full rounded-md border border-gray-200 bg-gray-50 p-px px-1 hover:bg-gray-50 group-hover:bg-gray-50 dark:border-gray-600 dark:bg-gray-700 dark:group-hover:bg-gray-700"
|
|
1467
|
-
id="color"
|
|
1468
|
-
type="color"
|
|
1469
|
-
value="#e66465"
|
|
1470
|
-
/>
|
|
1471
|
-
<label
|
|
1472
|
-
class="col-span-3 text-sm font-medium text-gray-500 group-hover:text-gray-900 dark:text-gray-400 dark:group-hover:text-white"
|
|
1473
|
-
for="color"
|
|
1474
|
-
>
|
|
1475
|
-
Pick a color
|
|
1476
|
-
</label>
|
|
1477
|
-
</div>
|
|
1478
|
-
<div class="mb-3 grid grid-cols-6 gap-1">
|
|
1479
|
-
@for (color of colors; track $index) {
|
|
1480
|
-
<button
|
|
1481
|
-
class="size-6 rounded-md"
|
|
1482
|
-
[style]="'background-color: ' + color"
|
|
1483
|
-
[attr.data-hex-color]="color"
|
|
1484
|
-
(click)="setHexColor($event)"
|
|
1485
|
-
type="button"
|
|
1486
|
-
cdkMenuItem
|
|
1487
|
-
>
|
|
1488
|
-
<span class="sr-only">Blue</span>
|
|
1489
|
-
</button>
|
|
1490
|
-
}
|
|
1491
|
-
</div>
|
|
1492
|
-
<button
|
|
1493
|
-
class="w-full rounded-lg bg-white py-1.5 text-sm font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-900 focus:z-10 focus:outline-none focus:ring-4 focus:ring-gray-100 dark:bg-gray-700 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white dark:focus:ring-gray-700"
|
|
1494
|
-
id="reset-color"
|
|
1495
|
-
(click)="resetColor()"
|
|
1496
|
-
cdkMenuItem
|
|
1497
|
-
type="button"
|
|
1498
|
-
>
|
|
1499
|
-
Reset color
|
|
1500
|
-
</button>
|
|
1501
|
-
</div>
|
|
1502
|
-
</ng-template>
|
|
1503
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: CdkMenuTrigger, selector: "[cdkMenuTriggerFor]", inputs: ["cdkMenuTriggerFor", "cdkMenuPosition", "cdkMenuTriggerData"], outputs: ["cdkMenuOpened", "cdkMenuClosed"], exportAs: ["cdkMenuTriggerFor"] }, { kind: "directive", type: CdkMenu, selector: "[cdkMenu]", outputs: ["closed"], exportAs: ["cdkMenu"] }, { kind: "directive", type: CdkMenuItem, selector: "[cdkMenuItem]", inputs: ["cdkMenuItemDisabled", "cdkMenuitemTypeaheadLabel"], outputs: ["cdkMenuItemTriggered"], exportAs: ["cdkMenuItem"] }, { kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "component", type: SiPaletteIcon, selector: "svg[si-palette-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1504
|
-
}
|
|
1505
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensionColor, decorators: [{
|
|
1506
|
-
type: Component,
|
|
1507
|
-
args: [{ selector: 'sc-extension-color', imports: [CdkMenuTrigger, CdkMenu, CdkMenuItem, ScTooltip, SiPaletteIcon], template: `
|
|
1508
|
-
<button
|
|
1509
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
1510
|
-
[cdkMenuTriggerFor]="textColorDropdown"
|
|
1511
|
-
type="button"
|
|
1512
|
-
scTooltip="Text color"
|
|
1513
|
-
>
|
|
1514
|
-
<svg si-palette-icon></svg>
|
|
1515
|
-
<span class="sr-only">Text color</span>
|
|
1516
|
-
</button>
|
|
1517
|
-
|
|
1518
|
-
<ng-template #textColorDropdown>
|
|
1519
|
-
<div
|
|
1520
|
-
class="z-10 w-48 rounded bg-white p-2 shadow dark:bg-gray-700"
|
|
1521
|
-
id="textColorDropdown"
|
|
1522
|
-
cdkMenu
|
|
1523
|
-
>
|
|
1524
|
-
<div
|
|
1525
|
-
class="group mb-3 grid grid-cols-6 items-center gap-2 rounded-lg p-1.5 hover:bg-gray-100 dark:hover:bg-gray-600"
|
|
1526
|
-
>
|
|
1527
|
-
<input
|
|
1528
|
-
class="col-span-3 h-8 w-full rounded-md border border-gray-200 bg-gray-50 p-px px-1 hover:bg-gray-50 group-hover:bg-gray-50 dark:border-gray-600 dark:bg-gray-700 dark:group-hover:bg-gray-700"
|
|
1529
|
-
id="color"
|
|
1530
|
-
type="color"
|
|
1531
|
-
value="#e66465"
|
|
1532
|
-
/>
|
|
1533
|
-
<label
|
|
1534
|
-
class="col-span-3 text-sm font-medium text-gray-500 group-hover:text-gray-900 dark:text-gray-400 dark:group-hover:text-white"
|
|
1535
|
-
for="color"
|
|
1536
|
-
>
|
|
1537
|
-
Pick a color
|
|
1538
|
-
</label>
|
|
1539
|
-
</div>
|
|
1540
|
-
<div class="mb-3 grid grid-cols-6 gap-1">
|
|
1541
|
-
@for (color of colors; track $index) {
|
|
1542
|
-
<button
|
|
1543
|
-
class="size-6 rounded-md"
|
|
1544
|
-
[style]="'background-color: ' + color"
|
|
1545
|
-
[attr.data-hex-color]="color"
|
|
1546
|
-
(click)="setHexColor($event)"
|
|
1547
|
-
type="button"
|
|
1548
|
-
cdkMenuItem
|
|
1549
|
-
>
|
|
1550
|
-
<span class="sr-only">Blue</span>
|
|
1551
|
-
</button>
|
|
1552
|
-
}
|
|
1553
|
-
</div>
|
|
1554
|
-
<button
|
|
1555
|
-
class="w-full rounded-lg bg-white py-1.5 text-sm font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-900 focus:z-10 focus:outline-none focus:ring-4 focus:ring-gray-100 dark:bg-gray-700 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white dark:focus:ring-gray-700"
|
|
1556
|
-
id="reset-color"
|
|
1557
|
-
(click)="resetColor()"
|
|
1558
|
-
cdkMenuItem
|
|
1559
|
-
type="button"
|
|
1560
|
-
>
|
|
1561
|
-
Reset color
|
|
1562
|
-
</button>
|
|
1563
|
-
</div>
|
|
1564
|
-
</ng-template>
|
|
1565
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
1566
|
-
}], ctorParameters: () => [] });
|
|
1567
|
-
|
|
1568
|
-
class ScExtensionFontFamily {
|
|
1569
|
-
parent = inject(ScEditor);
|
|
1570
|
-
extensions = inject(ScExtensions);
|
|
1571
|
-
constructor() {
|
|
1572
|
-
this.extensions.fontFamily.set(true);
|
|
1573
|
-
}
|
|
1574
|
-
get editor() {
|
|
1575
|
-
return this.parent.editor;
|
|
1576
|
-
}
|
|
1577
|
-
setFontFamily(e) {
|
|
1578
|
-
const fontFamily = e.target.getAttribute('data-font-family');
|
|
1579
|
-
if (fontFamily === null) {
|
|
1580
|
-
throw new Error('Missing data-font-family');
|
|
1581
|
-
}
|
|
1582
|
-
this.editor.chain().focus().setFontFamily(fontFamily).run();
|
|
1583
|
-
}
|
|
1584
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensionFontFamily, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1585
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScExtensionFontFamily, isStandalone: true, selector: "sc-extension-font-family", ngImport: i0, template: `
|
|
1586
|
-
<button
|
|
1587
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
1588
|
-
[cdkMenuTriggerFor]="fontFamilyDropdown"
|
|
1589
|
-
type="button"
|
|
1590
|
-
scTooltip="Font Family"
|
|
1591
|
-
>
|
|
1592
|
-
<svg
|
|
1593
|
-
class="size-5"
|
|
1594
|
-
aria-hidden="true"
|
|
1595
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
1596
|
-
width="24"
|
|
1597
|
-
height="24"
|
|
1598
|
-
fill="none"
|
|
1599
|
-
viewBox="0 0 24 24"
|
|
1600
|
-
>
|
|
1601
|
-
<path
|
|
1602
|
-
stroke="currentColor"
|
|
1603
|
-
stroke-linecap="round"
|
|
1604
|
-
stroke-linejoin="round"
|
|
1605
|
-
stroke-width="2"
|
|
1606
|
-
d="m10.6 19 4.298-10.93a.11.11 0 0 1 .204 0L19.4 19m-8.8 0H9.5m1.1 0h1.65m7.15 0h-1.65m1.65 0h1.1m-7.7-3.985h4.4M3.021 16l1.567-3.985m0 0L7.32 5.07a.11.11 0 0 1 .205 0l2.503 6.945h-5.44Z"
|
|
1607
|
-
/>
|
|
1608
|
-
</svg>
|
|
1609
|
-
<span class="sr-only">Font family</span>
|
|
1610
|
-
</button>
|
|
1611
|
-
|
|
1612
|
-
<ng-template #fontFamilyDropdown>
|
|
1613
|
-
<div
|
|
1614
|
-
class="z-10 w-48 rounded bg-white p-2 shadow dark:bg-gray-700"
|
|
1615
|
-
id="fontFamilyDropdown"
|
|
1616
|
-
cdkMenu
|
|
1617
|
-
>
|
|
1618
|
-
<ul class="space-y-1 text-sm font-medium" aria-labelledby="toggleFontFamilyButton">
|
|
1619
|
-
<li>
|
|
1620
|
-
<button
|
|
1621
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 font-sans text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1622
|
-
(click)="setFontFamily($event)"
|
|
1623
|
-
data-font-family="Poppins, ui-sans-serif"
|
|
1624
|
-
cdkMenuItem
|
|
1625
|
-
type="button"
|
|
1626
|
-
>
|
|
1627
|
-
Default (Poppins)
|
|
1628
|
-
</button>
|
|
1629
|
-
</li>
|
|
1630
|
-
<li>
|
|
1631
|
-
<button
|
|
1632
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1633
|
-
(click)="setFontFamily($event)"
|
|
1634
|
-
data-font-family="Arial, sans-serif"
|
|
1635
|
-
cdkMenuItem
|
|
1636
|
-
type="button"
|
|
1637
|
-
style="font-family: Arial, sans-serif;"
|
|
1638
|
-
>
|
|
1639
|
-
Arial
|
|
1640
|
-
</button>
|
|
1641
|
-
</li>
|
|
1642
|
-
<li>
|
|
1643
|
-
<button
|
|
1644
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1645
|
-
(click)="setFontFamily($event)"
|
|
1646
|
-
data-font-family="'Courier New', monospace"
|
|
1647
|
-
cdkMenuItem
|
|
1648
|
-
type="button"
|
|
1649
|
-
style="font-family: 'Courier New', monospace;"
|
|
1650
|
-
>
|
|
1651
|
-
Courier New
|
|
1652
|
-
</button>
|
|
1653
|
-
</li>
|
|
1654
|
-
<li>
|
|
1655
|
-
<button
|
|
1656
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1657
|
-
(click)="setFontFamily($event)"
|
|
1658
|
-
data-font-family="Georgia, serif"
|
|
1659
|
-
cdkMenuItem
|
|
1660
|
-
type="button"
|
|
1661
|
-
style="font-family: Georgia, serif;"
|
|
1662
|
-
>
|
|
1663
|
-
Georgia
|
|
1664
|
-
</button>
|
|
1665
|
-
</li>
|
|
1666
|
-
<li>
|
|
1667
|
-
<button
|
|
1668
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1669
|
-
(click)="setFontFamily($event)"
|
|
1670
|
-
data-font-family="'Lucida Sans Unicode', sans-serif"
|
|
1671
|
-
cdkMenuItem
|
|
1672
|
-
type="button"
|
|
1673
|
-
style="font-family: 'Lucida Sans Unicode', sans-serif;"
|
|
1674
|
-
>
|
|
1675
|
-
Lucida Sans Unicode
|
|
1676
|
-
</button>
|
|
1677
|
-
</li>
|
|
1678
|
-
<li>
|
|
1679
|
-
<button
|
|
1680
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1681
|
-
(click)="setFontFamily($event)"
|
|
1682
|
-
data-font-family="Tahoma, sans-serif"
|
|
1683
|
-
cdkMenuItem
|
|
1684
|
-
type="button"
|
|
1685
|
-
style="font-family: Tahoma, sans-serif;"
|
|
1686
|
-
>
|
|
1687
|
-
Tahoma
|
|
1688
|
-
</button>
|
|
1689
|
-
</li>
|
|
1690
|
-
<li>
|
|
1691
|
-
<button
|
|
1692
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1693
|
-
(click)="setFontFamily($event)"
|
|
1694
|
-
data-font-family="'Times New Roman', serif;"
|
|
1695
|
-
cdkMenuItem
|
|
1696
|
-
type="button"
|
|
1697
|
-
style="font-family: 'Times New Roman', serif;"
|
|
1698
|
-
>
|
|
1699
|
-
Times New Roman
|
|
1700
|
-
</button>
|
|
1701
|
-
</li>
|
|
1702
|
-
<li>
|
|
1703
|
-
<button
|
|
1704
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1705
|
-
(click)="setFontFamily($event)"
|
|
1706
|
-
data-font-family="'Trebuchet MS', sans-serif"
|
|
1707
|
-
cdkMenuItem
|
|
1708
|
-
type="button"
|
|
1709
|
-
style="font-family: 'Trebuchet MS', sans-serif;"
|
|
1710
|
-
>
|
|
1711
|
-
Trebuchet MS
|
|
1712
|
-
</button>
|
|
1713
|
-
</li>
|
|
1714
|
-
<li>
|
|
1715
|
-
<button
|
|
1716
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1717
|
-
(click)="setFontFamily($event)"
|
|
1718
|
-
data-font-family="Verdana, sans-serif"
|
|
1719
|
-
cdkMenuItem
|
|
1720
|
-
type="button"
|
|
1721
|
-
style="font-family: Verdana, sans-serif;"
|
|
1722
|
-
>
|
|
1723
|
-
Verdana
|
|
1724
|
-
</button>
|
|
1725
|
-
</li>
|
|
1726
|
-
</ul>
|
|
1727
|
-
</div>
|
|
1728
|
-
</ng-template>
|
|
1729
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: CdkMenuTrigger, selector: "[cdkMenuTriggerFor]", inputs: ["cdkMenuTriggerFor", "cdkMenuPosition", "cdkMenuTriggerData"], outputs: ["cdkMenuOpened", "cdkMenuClosed"], exportAs: ["cdkMenuTriggerFor"] }, { kind: "directive", type: CdkMenu, selector: "[cdkMenu]", outputs: ["closed"], exportAs: ["cdkMenu"] }, { kind: "directive", type: CdkMenuItem, selector: "[cdkMenuItem]", inputs: ["cdkMenuItemDisabled", "cdkMenuitemTypeaheadLabel"], outputs: ["cdkMenuItemTriggered"], exportAs: ["cdkMenuItem"] }, { kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1730
|
-
}
|
|
1731
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensionFontFamily, decorators: [{
|
|
1732
|
-
type: Component,
|
|
1733
|
-
args: [{ selector: 'sc-extension-font-family', imports: [CdkMenuTrigger, CdkMenu, CdkMenuItem, ScTooltip], template: `
|
|
1734
|
-
<button
|
|
1735
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
1736
|
-
[cdkMenuTriggerFor]="fontFamilyDropdown"
|
|
1737
|
-
type="button"
|
|
1738
|
-
scTooltip="Font Family"
|
|
1739
|
-
>
|
|
1740
|
-
<svg
|
|
1741
|
-
class="size-5"
|
|
1742
|
-
aria-hidden="true"
|
|
1743
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
1744
|
-
width="24"
|
|
1745
|
-
height="24"
|
|
1746
|
-
fill="none"
|
|
1747
|
-
viewBox="0 0 24 24"
|
|
1748
|
-
>
|
|
1749
|
-
<path
|
|
1750
|
-
stroke="currentColor"
|
|
1751
|
-
stroke-linecap="round"
|
|
1752
|
-
stroke-linejoin="round"
|
|
1753
|
-
stroke-width="2"
|
|
1754
|
-
d="m10.6 19 4.298-10.93a.11.11 0 0 1 .204 0L19.4 19m-8.8 0H9.5m1.1 0h1.65m7.15 0h-1.65m1.65 0h1.1m-7.7-3.985h4.4M3.021 16l1.567-3.985m0 0L7.32 5.07a.11.11 0 0 1 .205 0l2.503 6.945h-5.44Z"
|
|
1755
|
-
/>
|
|
1756
|
-
</svg>
|
|
1757
|
-
<span class="sr-only">Font family</span>
|
|
1758
|
-
</button>
|
|
1759
|
-
|
|
1760
|
-
<ng-template #fontFamilyDropdown>
|
|
1761
|
-
<div
|
|
1762
|
-
class="z-10 w-48 rounded bg-white p-2 shadow dark:bg-gray-700"
|
|
1763
|
-
id="fontFamilyDropdown"
|
|
1764
|
-
cdkMenu
|
|
1765
|
-
>
|
|
1766
|
-
<ul class="space-y-1 text-sm font-medium" aria-labelledby="toggleFontFamilyButton">
|
|
1767
|
-
<li>
|
|
1768
|
-
<button
|
|
1769
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 font-sans text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1770
|
-
(click)="setFontFamily($event)"
|
|
1771
|
-
data-font-family="Poppins, ui-sans-serif"
|
|
1772
|
-
cdkMenuItem
|
|
1773
|
-
type="button"
|
|
1774
|
-
>
|
|
1775
|
-
Default (Poppins)
|
|
1776
|
-
</button>
|
|
1777
|
-
</li>
|
|
1778
|
-
<li>
|
|
1779
|
-
<button
|
|
1780
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1781
|
-
(click)="setFontFamily($event)"
|
|
1782
|
-
data-font-family="Arial, sans-serif"
|
|
1783
|
-
cdkMenuItem
|
|
1784
|
-
type="button"
|
|
1785
|
-
style="font-family: Arial, sans-serif;"
|
|
1786
|
-
>
|
|
1787
|
-
Arial
|
|
1788
|
-
</button>
|
|
1789
|
-
</li>
|
|
1790
|
-
<li>
|
|
1791
|
-
<button
|
|
1792
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1793
|
-
(click)="setFontFamily($event)"
|
|
1794
|
-
data-font-family="'Courier New', monospace"
|
|
1795
|
-
cdkMenuItem
|
|
1796
|
-
type="button"
|
|
1797
|
-
style="font-family: 'Courier New', monospace;"
|
|
1798
|
-
>
|
|
1799
|
-
Courier New
|
|
1800
|
-
</button>
|
|
1801
|
-
</li>
|
|
1802
|
-
<li>
|
|
1803
|
-
<button
|
|
1804
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1805
|
-
(click)="setFontFamily($event)"
|
|
1806
|
-
data-font-family="Georgia, serif"
|
|
1807
|
-
cdkMenuItem
|
|
1808
|
-
type="button"
|
|
1809
|
-
style="font-family: Georgia, serif;"
|
|
1810
|
-
>
|
|
1811
|
-
Georgia
|
|
1812
|
-
</button>
|
|
1813
|
-
</li>
|
|
1814
|
-
<li>
|
|
1815
|
-
<button
|
|
1816
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1817
|
-
(click)="setFontFamily($event)"
|
|
1818
|
-
data-font-family="'Lucida Sans Unicode', sans-serif"
|
|
1819
|
-
cdkMenuItem
|
|
1820
|
-
type="button"
|
|
1821
|
-
style="font-family: 'Lucida Sans Unicode', sans-serif;"
|
|
1822
|
-
>
|
|
1823
|
-
Lucida Sans Unicode
|
|
1824
|
-
</button>
|
|
1825
|
-
</li>
|
|
1826
|
-
<li>
|
|
1827
|
-
<button
|
|
1828
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1829
|
-
(click)="setFontFamily($event)"
|
|
1830
|
-
data-font-family="Tahoma, sans-serif"
|
|
1831
|
-
cdkMenuItem
|
|
1832
|
-
type="button"
|
|
1833
|
-
style="font-family: Tahoma, sans-serif;"
|
|
1834
|
-
>
|
|
1835
|
-
Tahoma
|
|
1836
|
-
</button>
|
|
1837
|
-
</li>
|
|
1838
|
-
<li>
|
|
1839
|
-
<button
|
|
1840
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1841
|
-
(click)="setFontFamily($event)"
|
|
1842
|
-
data-font-family="'Times New Roman', serif;"
|
|
1843
|
-
cdkMenuItem
|
|
1844
|
-
type="button"
|
|
1845
|
-
style="font-family: 'Times New Roman', serif;"
|
|
1846
|
-
>
|
|
1847
|
-
Times New Roman
|
|
1848
|
-
</button>
|
|
1849
|
-
</li>
|
|
1850
|
-
<li>
|
|
1851
|
-
<button
|
|
1852
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1853
|
-
(click)="setFontFamily($event)"
|
|
1854
|
-
data-font-family="'Trebuchet MS', sans-serif"
|
|
1855
|
-
cdkMenuItem
|
|
1856
|
-
type="button"
|
|
1857
|
-
style="font-family: 'Trebuchet MS', sans-serif;"
|
|
1858
|
-
>
|
|
1859
|
-
Trebuchet MS
|
|
1860
|
-
</button>
|
|
1861
|
-
</li>
|
|
1862
|
-
<li>
|
|
1863
|
-
<button
|
|
1864
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1865
|
-
(click)="setFontFamily($event)"
|
|
1866
|
-
data-font-family="Verdana, sans-serif"
|
|
1867
|
-
cdkMenuItem
|
|
1868
|
-
type="button"
|
|
1869
|
-
style="font-family: Verdana, sans-serif;"
|
|
1870
|
-
>
|
|
1871
|
-
Verdana
|
|
1872
|
-
</button>
|
|
1873
|
-
</li>
|
|
1874
|
-
</ul>
|
|
1875
|
-
</div>
|
|
1876
|
-
</ng-template>
|
|
1877
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
1878
|
-
}], ctorParameters: () => [] });
|
|
1879
|
-
|
|
1880
|
-
class ScExtensionHeading {
|
|
1881
|
-
parent = inject(ScEditor);
|
|
1882
|
-
get editor() {
|
|
1883
|
-
return this.parent.editor;
|
|
1884
|
-
}
|
|
1885
|
-
setHeadingLevel(level) {
|
|
1886
|
-
this.editor.chain().focus().toggleHeading({ level: level }).run();
|
|
1887
|
-
}
|
|
1888
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensionHeading, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1889
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScExtensionHeading, isStandalone: true, selector: "sc-extension-heading", ngImport: i0, template: `
|
|
1890
|
-
<button
|
|
1891
|
-
class="flex items-center justify-center rounded-lg bg-gray-100 px-3 py-1.5 text-sm font-medium text-gray-500 hover:bg-gray-200 hover:text-gray-900 focus:z-10 focus:outline-none focus:ring-4 focus:ring-gray-50 dark:bg-gray-600 dark:text-gray-400 dark:hover:bg-gray-500 dark:hover:text-white dark:focus:ring-gray-600"
|
|
1892
|
-
[cdkMenuTriggerFor]="typographyDropdown"
|
|
1893
|
-
type="button"
|
|
1894
|
-
>
|
|
1895
|
-
Heading
|
|
1896
|
-
<svg
|
|
1897
|
-
class="-me-0.5 ms-1.5 size-3.5"
|
|
1898
|
-
aria-hidden="true"
|
|
1899
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
1900
|
-
fill="none"
|
|
1901
|
-
viewBox="0 0 24 24"
|
|
1902
|
-
>
|
|
1903
|
-
<path
|
|
1904
|
-
stroke="currentColor"
|
|
1905
|
-
stroke-linecap="round"
|
|
1906
|
-
stroke-linejoin="round"
|
|
1907
|
-
stroke-width="2"
|
|
1908
|
-
d="m19 9-7 7-7-7"
|
|
1909
|
-
/>
|
|
1910
|
-
</svg>
|
|
1911
|
-
</button>
|
|
1912
|
-
|
|
1913
|
-
<!-- Heading Dropdown -->
|
|
1914
|
-
<ng-template #typographyDropdown>
|
|
1915
|
-
<div class="z-10 w-72 rounded bg-white p-2 shadow dark:bg-gray-700" cdkMenu>
|
|
1916
|
-
<ul class="space-y-1 text-sm font-medium" aria-labelledby="typographyDropdownButton">
|
|
1917
|
-
<li>
|
|
1918
|
-
<button
|
|
1919
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-base text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1920
|
-
(cdkMenuItemTriggered)="setHeadingLevel(1)"
|
|
1921
|
-
data-heading-level="1"
|
|
1922
|
-
cdkMenuItem
|
|
1923
|
-
type="button"
|
|
1924
|
-
>
|
|
1925
|
-
Heading 1
|
|
1926
|
-
<div class="space-x-1.5">
|
|
1927
|
-
<kbd
|
|
1928
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
1929
|
-
>
|
|
1930
|
-
Cmd
|
|
1931
|
-
</kbd>
|
|
1932
|
-
<kbd
|
|
1933
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
1934
|
-
>
|
|
1935
|
-
Alt
|
|
1936
|
-
</kbd>
|
|
1937
|
-
<kbd
|
|
1938
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
1939
|
-
>
|
|
1940
|
-
1
|
|
1941
|
-
</kbd>
|
|
1942
|
-
</div>
|
|
1943
|
-
</button>
|
|
1944
|
-
</li>
|
|
1945
|
-
<li>
|
|
1946
|
-
<button
|
|
1947
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-base text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1948
|
-
(cdkMenuItemTriggered)="setHeadingLevel(2)"
|
|
1949
|
-
data-heading-level="2"
|
|
1950
|
-
cdkMenuItem
|
|
1951
|
-
type="button"
|
|
1952
|
-
>
|
|
1953
|
-
Heading 2
|
|
1954
|
-
<div class="space-x-1.5">
|
|
1955
|
-
<kbd
|
|
1956
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
1957
|
-
>
|
|
1958
|
-
Cmd
|
|
1959
|
-
</kbd>
|
|
1960
|
-
<kbd
|
|
1961
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
1962
|
-
>
|
|
1963
|
-
Alt
|
|
1964
|
-
</kbd>
|
|
1965
|
-
<kbd
|
|
1966
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
1967
|
-
>
|
|
1968
|
-
2
|
|
1969
|
-
</kbd>
|
|
1970
|
-
</div>
|
|
1971
|
-
</button>
|
|
1972
|
-
</li>
|
|
1973
|
-
<li>
|
|
1974
|
-
<button
|
|
1975
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-base text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
1976
|
-
(cdkMenuItemTriggered)="setHeadingLevel(3)"
|
|
1977
|
-
data-heading-level="3"
|
|
1978
|
-
cdkMenuItem
|
|
1979
|
-
type="button"
|
|
1980
|
-
>
|
|
1981
|
-
Heading 3
|
|
1982
|
-
<div class="space-x-1.5">
|
|
1983
|
-
<kbd
|
|
1984
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
1985
|
-
>
|
|
1986
|
-
Cmd
|
|
1987
|
-
</kbd>
|
|
1988
|
-
<kbd
|
|
1989
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
1990
|
-
>
|
|
1991
|
-
Alt
|
|
1992
|
-
</kbd>
|
|
1993
|
-
<kbd
|
|
1994
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
1995
|
-
>
|
|
1996
|
-
3
|
|
1997
|
-
</kbd>
|
|
1998
|
-
</div>
|
|
1999
|
-
</button>
|
|
2000
|
-
</li>
|
|
2001
|
-
<li>
|
|
2002
|
-
<button
|
|
2003
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-base text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
2004
|
-
(cdkMenuItemTriggered)="setHeadingLevel(4)"
|
|
2005
|
-
data-heading-level="4"
|
|
2006
|
-
cdkMenuItem
|
|
2007
|
-
type="button"
|
|
2008
|
-
>
|
|
2009
|
-
Heading 4
|
|
2010
|
-
<div class="space-x-1.5">
|
|
2011
|
-
<kbd
|
|
2012
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2013
|
-
>
|
|
2014
|
-
Cmd
|
|
2015
|
-
</kbd>
|
|
2016
|
-
<kbd
|
|
2017
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2018
|
-
>
|
|
2019
|
-
Alt
|
|
2020
|
-
</kbd>
|
|
2021
|
-
<kbd
|
|
2022
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2023
|
-
>
|
|
2024
|
-
4
|
|
2025
|
-
</kbd>
|
|
2026
|
-
</div>
|
|
2027
|
-
</button>
|
|
2028
|
-
</li>
|
|
2029
|
-
<li>
|
|
2030
|
-
<button
|
|
2031
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-base text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
2032
|
-
(cdkMenuItemTriggered)="setHeadingLevel(5)"
|
|
2033
|
-
data-heading-level="5"
|
|
2034
|
-
cdkMenuItem
|
|
2035
|
-
type="button"
|
|
2036
|
-
>
|
|
2037
|
-
Heading 5
|
|
2038
|
-
<div class="space-x-1.5">
|
|
2039
|
-
<kbd
|
|
2040
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2041
|
-
>
|
|
2042
|
-
Cmd
|
|
2043
|
-
</kbd>
|
|
2044
|
-
<kbd
|
|
2045
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2046
|
-
>
|
|
2047
|
-
Alt
|
|
2048
|
-
</kbd>
|
|
2049
|
-
<kbd
|
|
2050
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2051
|
-
>
|
|
2052
|
-
5
|
|
2053
|
-
</kbd>
|
|
2054
|
-
</div>
|
|
2055
|
-
</button>
|
|
2056
|
-
</li>
|
|
2057
|
-
<li>
|
|
2058
|
-
<button
|
|
2059
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-base text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
2060
|
-
(cdkMenuItemTriggered)="setHeadingLevel(6)"
|
|
2061
|
-
data-heading-level="6"
|
|
2062
|
-
cdkMenuItem
|
|
2063
|
-
type="button"
|
|
2064
|
-
>
|
|
2065
|
-
Heading 6
|
|
2066
|
-
<div class="space-x-1.5">
|
|
2067
|
-
<kbd
|
|
2068
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2069
|
-
>
|
|
2070
|
-
Cmd
|
|
2071
|
-
</kbd>
|
|
2072
|
-
<kbd
|
|
2073
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2074
|
-
>
|
|
2075
|
-
Alt
|
|
2076
|
-
</kbd>
|
|
2077
|
-
<kbd
|
|
2078
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2079
|
-
>
|
|
2080
|
-
6
|
|
2081
|
-
</kbd>
|
|
2082
|
-
</div>
|
|
2083
|
-
</button>
|
|
2084
|
-
</li>
|
|
2085
|
-
</ul>
|
|
2086
|
-
</div>
|
|
2087
|
-
</ng-template>
|
|
2088
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: CdkMenuTrigger, selector: "[cdkMenuTriggerFor]", inputs: ["cdkMenuTriggerFor", "cdkMenuPosition", "cdkMenuTriggerData"], outputs: ["cdkMenuOpened", "cdkMenuClosed"], exportAs: ["cdkMenuTriggerFor"] }, { kind: "directive", type: CdkMenu, selector: "[cdkMenu]", outputs: ["closed"], exportAs: ["cdkMenu"] }, { kind: "directive", type: CdkMenuItem, selector: "[cdkMenuItem]", inputs: ["cdkMenuItemDisabled", "cdkMenuitemTypeaheadLabel"], outputs: ["cdkMenuItemTriggered"], exportAs: ["cdkMenuItem"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2089
|
-
}
|
|
2090
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensionHeading, decorators: [{
|
|
2091
|
-
type: Component,
|
|
2092
|
-
args: [{ selector: 'sc-extension-heading', imports: [CdkMenuTrigger, CdkMenu, CdkMenuItem], template: `
|
|
2093
|
-
<button
|
|
2094
|
-
class="flex items-center justify-center rounded-lg bg-gray-100 px-3 py-1.5 text-sm font-medium text-gray-500 hover:bg-gray-200 hover:text-gray-900 focus:z-10 focus:outline-none focus:ring-4 focus:ring-gray-50 dark:bg-gray-600 dark:text-gray-400 dark:hover:bg-gray-500 dark:hover:text-white dark:focus:ring-gray-600"
|
|
2095
|
-
[cdkMenuTriggerFor]="typographyDropdown"
|
|
2096
|
-
type="button"
|
|
2097
|
-
>
|
|
2098
|
-
Heading
|
|
2099
|
-
<svg
|
|
2100
|
-
class="-me-0.5 ms-1.5 size-3.5"
|
|
2101
|
-
aria-hidden="true"
|
|
2102
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
2103
|
-
fill="none"
|
|
2104
|
-
viewBox="0 0 24 24"
|
|
2105
|
-
>
|
|
2106
|
-
<path
|
|
2107
|
-
stroke="currentColor"
|
|
2108
|
-
stroke-linecap="round"
|
|
2109
|
-
stroke-linejoin="round"
|
|
2110
|
-
stroke-width="2"
|
|
2111
|
-
d="m19 9-7 7-7-7"
|
|
2112
|
-
/>
|
|
2113
|
-
</svg>
|
|
2114
|
-
</button>
|
|
2115
|
-
|
|
2116
|
-
<!-- Heading Dropdown -->
|
|
2117
|
-
<ng-template #typographyDropdown>
|
|
2118
|
-
<div class="z-10 w-72 rounded bg-white p-2 shadow dark:bg-gray-700" cdkMenu>
|
|
2119
|
-
<ul class="space-y-1 text-sm font-medium" aria-labelledby="typographyDropdownButton">
|
|
2120
|
-
<li>
|
|
2121
|
-
<button
|
|
2122
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-base text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
2123
|
-
(cdkMenuItemTriggered)="setHeadingLevel(1)"
|
|
2124
|
-
data-heading-level="1"
|
|
2125
|
-
cdkMenuItem
|
|
2126
|
-
type="button"
|
|
2127
|
-
>
|
|
2128
|
-
Heading 1
|
|
2129
|
-
<div class="space-x-1.5">
|
|
2130
|
-
<kbd
|
|
2131
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2132
|
-
>
|
|
2133
|
-
Cmd
|
|
2134
|
-
</kbd>
|
|
2135
|
-
<kbd
|
|
2136
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2137
|
-
>
|
|
2138
|
-
Alt
|
|
2139
|
-
</kbd>
|
|
2140
|
-
<kbd
|
|
2141
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2142
|
-
>
|
|
2143
|
-
1
|
|
2144
|
-
</kbd>
|
|
2145
|
-
</div>
|
|
2146
|
-
</button>
|
|
2147
|
-
</li>
|
|
2148
|
-
<li>
|
|
2149
|
-
<button
|
|
2150
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-base text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
2151
|
-
(cdkMenuItemTriggered)="setHeadingLevel(2)"
|
|
2152
|
-
data-heading-level="2"
|
|
2153
|
-
cdkMenuItem
|
|
2154
|
-
type="button"
|
|
2155
|
-
>
|
|
2156
|
-
Heading 2
|
|
2157
|
-
<div class="space-x-1.5">
|
|
2158
|
-
<kbd
|
|
2159
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2160
|
-
>
|
|
2161
|
-
Cmd
|
|
2162
|
-
</kbd>
|
|
2163
|
-
<kbd
|
|
2164
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2165
|
-
>
|
|
2166
|
-
Alt
|
|
2167
|
-
</kbd>
|
|
2168
|
-
<kbd
|
|
2169
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2170
|
-
>
|
|
2171
|
-
2
|
|
2172
|
-
</kbd>
|
|
2173
|
-
</div>
|
|
2174
|
-
</button>
|
|
2175
|
-
</li>
|
|
2176
|
-
<li>
|
|
2177
|
-
<button
|
|
2178
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-base text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
2179
|
-
(cdkMenuItemTriggered)="setHeadingLevel(3)"
|
|
2180
|
-
data-heading-level="3"
|
|
2181
|
-
cdkMenuItem
|
|
2182
|
-
type="button"
|
|
2183
|
-
>
|
|
2184
|
-
Heading 3
|
|
2185
|
-
<div class="space-x-1.5">
|
|
2186
|
-
<kbd
|
|
2187
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2188
|
-
>
|
|
2189
|
-
Cmd
|
|
2190
|
-
</kbd>
|
|
2191
|
-
<kbd
|
|
2192
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2193
|
-
>
|
|
2194
|
-
Alt
|
|
2195
|
-
</kbd>
|
|
2196
|
-
<kbd
|
|
2197
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2198
|
-
>
|
|
2199
|
-
3
|
|
2200
|
-
</kbd>
|
|
2201
|
-
</div>
|
|
2202
|
-
</button>
|
|
2203
|
-
</li>
|
|
2204
|
-
<li>
|
|
2205
|
-
<button
|
|
2206
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-base text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
2207
|
-
(cdkMenuItemTriggered)="setHeadingLevel(4)"
|
|
2208
|
-
data-heading-level="4"
|
|
2209
|
-
cdkMenuItem
|
|
2210
|
-
type="button"
|
|
2211
|
-
>
|
|
2212
|
-
Heading 4
|
|
2213
|
-
<div class="space-x-1.5">
|
|
2214
|
-
<kbd
|
|
2215
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2216
|
-
>
|
|
2217
|
-
Cmd
|
|
2218
|
-
</kbd>
|
|
2219
|
-
<kbd
|
|
2220
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2221
|
-
>
|
|
2222
|
-
Alt
|
|
2223
|
-
</kbd>
|
|
2224
|
-
<kbd
|
|
2225
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2226
|
-
>
|
|
2227
|
-
4
|
|
2228
|
-
</kbd>
|
|
2229
|
-
</div>
|
|
2230
|
-
</button>
|
|
2231
|
-
</li>
|
|
2232
|
-
<li>
|
|
2233
|
-
<button
|
|
2234
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-base text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
2235
|
-
(cdkMenuItemTriggered)="setHeadingLevel(5)"
|
|
2236
|
-
data-heading-level="5"
|
|
2237
|
-
cdkMenuItem
|
|
2238
|
-
type="button"
|
|
2239
|
-
>
|
|
2240
|
-
Heading 5
|
|
2241
|
-
<div class="space-x-1.5">
|
|
2242
|
-
<kbd
|
|
2243
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2244
|
-
>
|
|
2245
|
-
Cmd
|
|
2246
|
-
</kbd>
|
|
2247
|
-
<kbd
|
|
2248
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2249
|
-
>
|
|
2250
|
-
Alt
|
|
2251
|
-
</kbd>
|
|
2252
|
-
<kbd
|
|
2253
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2254
|
-
>
|
|
2255
|
-
5
|
|
2256
|
-
</kbd>
|
|
2257
|
-
</div>
|
|
2258
|
-
</button>
|
|
2259
|
-
</li>
|
|
2260
|
-
<li>
|
|
2261
|
-
<button
|
|
2262
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-base text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
2263
|
-
(cdkMenuItemTriggered)="setHeadingLevel(6)"
|
|
2264
|
-
data-heading-level="6"
|
|
2265
|
-
cdkMenuItem
|
|
2266
|
-
type="button"
|
|
2267
|
-
>
|
|
2268
|
-
Heading 6
|
|
2269
|
-
<div class="space-x-1.5">
|
|
2270
|
-
<kbd
|
|
2271
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2272
|
-
>
|
|
2273
|
-
Cmd
|
|
2274
|
-
</kbd>
|
|
2275
|
-
<kbd
|
|
2276
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2277
|
-
>
|
|
2278
|
-
Alt
|
|
2279
|
-
</kbd>
|
|
2280
|
-
<kbd
|
|
2281
|
-
class="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-500 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-400"
|
|
2282
|
-
>
|
|
2283
|
-
6
|
|
2284
|
-
</kbd>
|
|
2285
|
-
</div>
|
|
2286
|
-
</button>
|
|
2287
|
-
</li>
|
|
2288
|
-
</ul>
|
|
2289
|
-
</div>
|
|
2290
|
-
</ng-template>
|
|
2291
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
2292
|
-
}] });
|
|
2293
|
-
|
|
2294
|
-
class ScAddImageDialog {
|
|
2295
|
-
dialogRef = inject((DialogRef));
|
|
2296
|
-
imageForm = new FormGroup({
|
|
2297
|
-
url: new FormControl('https://placehold.co/600x400', Validators.required),
|
|
2298
|
-
alt: new FormControl(''),
|
|
2299
|
-
title: new FormControl(''),
|
|
2300
|
-
});
|
|
2301
|
-
get url() {
|
|
2302
|
-
return this.imageForm.get('url');
|
|
2303
|
-
}
|
|
2304
|
-
get alt() {
|
|
2305
|
-
return this.imageForm.get('alt');
|
|
2306
|
-
}
|
|
2307
|
-
get title() {
|
|
2308
|
-
return this.imageForm.get('title');
|
|
2309
|
-
}
|
|
2310
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScAddImageDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2311
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScAddImageDialog, isStandalone: true, selector: "sc-add-image-dialog", ngImport: i0, template: `
|
|
2312
|
-
<div
|
|
2313
|
-
class="z-50 h-[calc(100%-1rem)] max-h-full w-full items-center justify-center overflow-y-auto overflow-x-hidden md:inset-0"
|
|
2314
|
-
tabindex="-1"
|
|
2315
|
-
aria-hidden="true"
|
|
2316
|
-
>
|
|
2317
|
-
<div class="relative max-h-full w-full max-w-md p-4">
|
|
2318
|
-
<!-- Modal content -->
|
|
2319
|
-
<div class="relative rounded-lg bg-white shadow dark:bg-gray-700">
|
|
2320
|
-
<!-- Modal header -->
|
|
2321
|
-
<div
|
|
2322
|
-
class="flex items-center justify-between rounded-t border-b p-4 md:p-5 dark:border-gray-600"
|
|
2323
|
-
>
|
|
2324
|
-
<h3 class="text-xl font-semibold text-gray-900 dark:text-white">
|
|
2325
|
-
Insert advanced image
|
|
2326
|
-
</h3>
|
|
2327
|
-
<button
|
|
2328
|
-
class="end-2.5 ms-auto inline-flex size-8 items-center justify-center rounded-lg bg-transparent text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
2329
|
-
(click)="dialogRef.close()"
|
|
2330
|
-
type="button"
|
|
2331
|
-
>
|
|
2332
|
-
<svg
|
|
2333
|
-
class="size-3"
|
|
2334
|
-
aria-hidden="true"
|
|
2335
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
2336
|
-
fill="none"
|
|
2337
|
-
viewBox="0 0 14 14"
|
|
2338
|
-
>
|
|
2339
|
-
<path
|
|
2340
|
-
stroke="currentColor"
|
|
2341
|
-
stroke-linecap="round"
|
|
2342
|
-
stroke-linejoin="round"
|
|
2343
|
-
stroke-width="2"
|
|
2344
|
-
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
|
|
2345
|
-
/>
|
|
2346
|
-
</svg>
|
|
2347
|
-
<span class="sr-only">Close modal</span>
|
|
2348
|
-
</button>
|
|
2349
|
-
</div>
|
|
2350
|
-
<!-- Modal body -->
|
|
2351
|
-
<div class="p-4 md:p-5">
|
|
2352
|
-
<form class="space-y-4" [formGroup]="imageForm">
|
|
2353
|
-
<div>
|
|
2354
|
-
<label
|
|
2355
|
-
class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
|
|
2356
|
-
for="image-url"
|
|
2357
|
-
>
|
|
2358
|
-
Image URL
|
|
2359
|
-
</label>
|
|
2360
|
-
<input
|
|
2361
|
-
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder:text-gray-400"
|
|
2362
|
-
id="image-url"
|
|
2363
|
-
type="url"
|
|
2364
|
-
name="image-url"
|
|
2365
|
-
formControlName="url"
|
|
2366
|
-
/>
|
|
2367
|
-
</div>
|
|
2368
|
-
<div>
|
|
2369
|
-
<label
|
|
2370
|
-
class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
|
|
2371
|
-
for="alt"
|
|
2372
|
-
>
|
|
2373
|
-
Image alt
|
|
2374
|
-
</label>
|
|
2375
|
-
<input
|
|
2376
|
-
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder:text-gray-400"
|
|
2377
|
-
id="alt"
|
|
2378
|
-
type="text"
|
|
2379
|
-
formControlName="alt"
|
|
2380
|
-
name="alt"
|
|
2381
|
-
/>
|
|
2382
|
-
</div>
|
|
2383
|
-
<div>
|
|
2384
|
-
<label
|
|
2385
|
-
class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
|
|
2386
|
-
for="title"
|
|
2387
|
-
>
|
|
2388
|
-
Image title
|
|
2389
|
-
</label>
|
|
2390
|
-
<input
|
|
2391
|
-
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder:text-gray-400"
|
|
2392
|
-
id="title"
|
|
2393
|
-
type="text"
|
|
2394
|
-
formControlName="title"
|
|
2395
|
-
name="title"
|
|
2396
|
-
/>
|
|
2397
|
-
</div>
|
|
2398
|
-
<button
|
|
2399
|
-
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
|
|
2400
|
-
(click)="
|
|
2401
|
-
dialogRef.close({
|
|
2402
|
-
url: url?.value,
|
|
2403
|
-
alt: alt?.value,
|
|
2404
|
-
title: title?.value,
|
|
2405
|
-
})
|
|
2406
|
-
"
|
|
2407
|
-
>
|
|
2408
|
-
Add image
|
|
2409
|
-
</button>
|
|
2410
|
-
</form>
|
|
2411
|
-
</div>
|
|
2412
|
-
</div>
|
|
2413
|
-
</div>
|
|
2414
|
-
</div>
|
|
2415
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2416
|
-
}
|
|
2417
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScAddImageDialog, decorators: [{
|
|
2418
|
-
type: Component,
|
|
2419
|
-
args: [{ selector: 'sc-add-image-dialog', imports: [ReactiveFormsModule], template: `
|
|
2420
|
-
<div
|
|
2421
|
-
class="z-50 h-[calc(100%-1rem)] max-h-full w-full items-center justify-center overflow-y-auto overflow-x-hidden md:inset-0"
|
|
2422
|
-
tabindex="-1"
|
|
2423
|
-
aria-hidden="true"
|
|
2424
|
-
>
|
|
2425
|
-
<div class="relative max-h-full w-full max-w-md p-4">
|
|
2426
|
-
<!-- Modal content -->
|
|
2427
|
-
<div class="relative rounded-lg bg-white shadow dark:bg-gray-700">
|
|
2428
|
-
<!-- Modal header -->
|
|
2429
|
-
<div
|
|
2430
|
-
class="flex items-center justify-between rounded-t border-b p-4 md:p-5 dark:border-gray-600"
|
|
2431
|
-
>
|
|
2432
|
-
<h3 class="text-xl font-semibold text-gray-900 dark:text-white">
|
|
2433
|
-
Insert advanced image
|
|
2434
|
-
</h3>
|
|
2435
|
-
<button
|
|
2436
|
-
class="end-2.5 ms-auto inline-flex size-8 items-center justify-center rounded-lg bg-transparent text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
2437
|
-
(click)="dialogRef.close()"
|
|
2438
|
-
type="button"
|
|
2439
|
-
>
|
|
2440
|
-
<svg
|
|
2441
|
-
class="size-3"
|
|
2442
|
-
aria-hidden="true"
|
|
2443
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
2444
|
-
fill="none"
|
|
2445
|
-
viewBox="0 0 14 14"
|
|
2446
|
-
>
|
|
2447
|
-
<path
|
|
2448
|
-
stroke="currentColor"
|
|
2449
|
-
stroke-linecap="round"
|
|
2450
|
-
stroke-linejoin="round"
|
|
2451
|
-
stroke-width="2"
|
|
2452
|
-
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
|
|
2453
|
-
/>
|
|
2454
|
-
</svg>
|
|
2455
|
-
<span class="sr-only">Close modal</span>
|
|
2456
|
-
</button>
|
|
2457
|
-
</div>
|
|
2458
|
-
<!-- Modal body -->
|
|
2459
|
-
<div class="p-4 md:p-5">
|
|
2460
|
-
<form class="space-y-4" [formGroup]="imageForm">
|
|
2461
|
-
<div>
|
|
2462
|
-
<label
|
|
2463
|
-
class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
|
|
2464
|
-
for="image-url"
|
|
2465
|
-
>
|
|
2466
|
-
Image URL
|
|
2467
|
-
</label>
|
|
2468
|
-
<input
|
|
2469
|
-
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder:text-gray-400"
|
|
2470
|
-
id="image-url"
|
|
2471
|
-
type="url"
|
|
2472
|
-
name="image-url"
|
|
2473
|
-
formControlName="url"
|
|
2474
|
-
/>
|
|
2475
|
-
</div>
|
|
2476
|
-
<div>
|
|
2477
|
-
<label
|
|
2478
|
-
class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
|
|
2479
|
-
for="alt"
|
|
2480
|
-
>
|
|
2481
|
-
Image alt
|
|
2482
|
-
</label>
|
|
2483
|
-
<input
|
|
2484
|
-
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder:text-gray-400"
|
|
2485
|
-
id="alt"
|
|
2486
|
-
type="text"
|
|
2487
|
-
formControlName="alt"
|
|
2488
|
-
name="alt"
|
|
2489
|
-
/>
|
|
2490
|
-
</div>
|
|
2491
|
-
<div>
|
|
2492
|
-
<label
|
|
2493
|
-
class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
|
|
2494
|
-
for="title"
|
|
2495
|
-
>
|
|
2496
|
-
Image title
|
|
2497
|
-
</label>
|
|
2498
|
-
<input
|
|
2499
|
-
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder:text-gray-400"
|
|
2500
|
-
id="title"
|
|
2501
|
-
type="text"
|
|
2502
|
-
formControlName="title"
|
|
2503
|
-
name="title"
|
|
2504
|
-
/>
|
|
2505
|
-
</div>
|
|
2506
|
-
<button
|
|
2507
|
-
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
|
|
2508
|
-
(click)="
|
|
2509
|
-
dialogRef.close({
|
|
2510
|
-
url: url?.value,
|
|
2511
|
-
alt: alt?.value,
|
|
2512
|
-
title: title?.value,
|
|
2513
|
-
})
|
|
2514
|
-
"
|
|
2515
|
-
>
|
|
2516
|
-
Add image
|
|
2517
|
-
</button>
|
|
2518
|
-
</form>
|
|
2519
|
-
</div>
|
|
2520
|
-
</div>
|
|
2521
|
-
</div>
|
|
2522
|
-
</div>
|
|
2523
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
2524
|
-
}] });
|
|
2525
|
-
|
|
2526
|
-
class ScExtensionImage {
|
|
2527
|
-
ariaLabel = 'Add image';
|
|
2528
|
-
parent = inject(ScEditor);
|
|
2529
|
-
dialog = inject(Dialog);
|
|
2530
|
-
extensions = inject(ScExtensions);
|
|
2531
|
-
constructor() {
|
|
2532
|
-
this.extensions.image.set(true);
|
|
2533
|
-
}
|
|
2534
|
-
get editor() {
|
|
2535
|
-
return this.parent.editor;
|
|
2536
|
-
}
|
|
2537
|
-
setImage(image) {
|
|
2538
|
-
if (image?.url) {
|
|
2539
|
-
this.editor
|
|
2540
|
-
.chain()
|
|
2541
|
-
.focus()
|
|
2542
|
-
.setImage({
|
|
2543
|
-
src: image.url,
|
|
2544
|
-
alt: image.alt ? image.alt : '',
|
|
2545
|
-
title: image.title ? image.title : '',
|
|
2546
|
-
})
|
|
2547
|
-
.run();
|
|
2548
|
-
}
|
|
2549
|
-
}
|
|
2550
|
-
openDialog() {
|
|
2551
|
-
const dialogRef = this.dialog.open(ScAddImageDialog, {
|
|
2552
|
-
minWidth: '600px',
|
|
2553
|
-
});
|
|
2554
|
-
dialogRef.closed.subscribe((result) => {
|
|
2555
|
-
this.setImage(result);
|
|
2556
|
-
});
|
|
2557
|
-
}
|
|
2558
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensionImage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2559
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScExtensionImage, isStandalone: true, selector: "sc-extension-image", ngImport: i0, template: `
|
|
2560
|
-
<button
|
|
2561
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
2562
|
-
(click)="openDialog()"
|
|
2563
|
-
type="button"
|
|
2564
|
-
scTooltip="Add image"
|
|
2565
|
-
>
|
|
2566
|
-
<svg
|
|
2567
|
-
class="size-5"
|
|
2568
|
-
aria-hidden="true"
|
|
2569
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
2570
|
-
width="24"
|
|
2571
|
-
height="24"
|
|
2572
|
-
fill="currentColor"
|
|
2573
|
-
viewBox="0 0 24 24"
|
|
2574
|
-
>
|
|
2575
|
-
<path
|
|
2576
|
-
fill-rule="evenodd"
|
|
2577
|
-
d="M13 10a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H14a1 1 0 0 1-1-1Z"
|
|
2578
|
-
clip-rule="evenodd"
|
|
2579
|
-
/>
|
|
2580
|
-
<path
|
|
2581
|
-
fill-rule="evenodd"
|
|
2582
|
-
d="M2 6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12c0 .556-.227 1.06-.593 1.422A.999.999 0 0 1 20.5 20H4a2.002 2.002 0 0 1-2-2V6Zm6.892 12 3.833-5.356-3.99-4.322a1 1 0 0 0-1.549.097L4 12.879V6h16v9.95l-3.257-3.619a1 1 0 0 0-1.557.088L11.2 18H8.892Z"
|
|
2583
|
-
clip-rule="evenodd"
|
|
2584
|
-
/>
|
|
2585
|
-
</svg>
|
|
2586
|
-
<span class="sr-only">Add image</span>
|
|
2587
|
-
</button>
|
|
2588
|
-
|
|
2589
|
-
<button
|
|
2590
|
-
[scPopoverTriggerFor]="popover"
|
|
2591
|
-
[attr.aria-label]="ariaLabel"
|
|
2592
|
-
[scTooltip]="ariaLabel"
|
|
2593
|
-
type="button"
|
|
2594
|
-
sc-toggle
|
|
2595
|
-
variant="outline"
|
|
2596
|
-
>
|
|
2597
|
-
<svg si-image-plus-icon></svg>
|
|
2598
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
2599
|
-
</button>
|
|
2600
|
-
|
|
2601
|
-
<ng-template #popover>
|
|
2602
|
-
<div class="grid gap-4">
|
|
2603
|
-
<div class="space-y-2">
|
|
2604
|
-
<h4 class="font-medium leading-none">Dimensions</h4>
|
|
2605
|
-
<p class="text-sm text-muted-foreground">Set the dimensions for the layer.</p>
|
|
2606
|
-
</div>
|
|
2607
|
-
<div class="grid gap-2">
|
|
2608
|
-
<div class="grid grid-cols-3 items-center gap-4">
|
|
2609
|
-
<label sc-label for="width">Url</label>
|
|
2610
|
-
<input class="col-span-2 h-8" id="width" sc-input defaultValue="100%" />
|
|
2611
|
-
</div>
|
|
2612
|
-
<div class="grid grid-cols-3 items-center gap-4">
|
|
2613
|
-
<label sc-label for="maxWidth">Alt</label>
|
|
2614
|
-
<input class="col-span-2 h-8" id="maxWidth" sc-input defaultValue="300px" />
|
|
2615
|
-
</div>
|
|
2616
|
-
<div class="grid grid-cols-3 items-center gap-4">
|
|
2617
|
-
<label sc-label for="height">Title</label>
|
|
2618
|
-
<input class="col-span-2 h-8" id="height" sc-input defaultValue="25px" />
|
|
2619
|
-
</div>
|
|
2620
|
-
<div class="grid grid-cols-3 items-center gap-4">
|
|
2621
|
-
<button sc-button variant="outline" type="button">Cancel</button>
|
|
2622
|
-
<button sc-button type="button">Done</button>
|
|
2623
|
-
</div>
|
|
2624
|
-
</div>
|
|
2625
|
-
</div>
|
|
2626
|
-
</ng-template>
|
|
2627
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: ScButton, selector: "button[sc-button]" }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }, { kind: "component", type: ScLabel, selector: "label[sc-label]", inputs: ["class", "for"] }, { kind: "component", type: ScInput, selector: "input[sc-input]", inputs: ["class", "value", "id"], outputs: ["valueChange"] }, { kind: "directive", type: ScPopoverTriggerFor, selector: "[scPopoverTriggerFor]", inputs: ["scPopoverTriggerFor"] }, { kind: "component", type: SiImagePlusIcon, selector: "svg[si-image-plus-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2628
|
-
}
|
|
2629
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensionImage, decorators: [{
|
|
2630
|
-
type: Component,
|
|
2631
|
-
args: [{ selector: 'sc-extension-image', imports: [
|
|
2632
|
-
ScTooltip,
|
|
2633
|
-
DialogModule,
|
|
2634
|
-
ScButton,
|
|
2635
|
-
ScToggle,
|
|
2636
|
-
ScLabel,
|
|
2637
|
-
ScInput,
|
|
2638
|
-
ScPopoverTriggerFor,
|
|
2639
|
-
SiImagePlusIcon,
|
|
2640
|
-
], template: `
|
|
2641
|
-
<button
|
|
2642
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
2643
|
-
(click)="openDialog()"
|
|
2644
|
-
type="button"
|
|
2645
|
-
scTooltip="Add image"
|
|
2646
|
-
>
|
|
2647
|
-
<svg
|
|
2648
|
-
class="size-5"
|
|
2649
|
-
aria-hidden="true"
|
|
2650
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
2651
|
-
width="24"
|
|
2652
|
-
height="24"
|
|
2653
|
-
fill="currentColor"
|
|
2654
|
-
viewBox="0 0 24 24"
|
|
2655
|
-
>
|
|
2656
|
-
<path
|
|
2657
|
-
fill-rule="evenodd"
|
|
2658
|
-
d="M13 10a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H14a1 1 0 0 1-1-1Z"
|
|
2659
|
-
clip-rule="evenodd"
|
|
2660
|
-
/>
|
|
2661
|
-
<path
|
|
2662
|
-
fill-rule="evenodd"
|
|
2663
|
-
d="M2 6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12c0 .556-.227 1.06-.593 1.422A.999.999 0 0 1 20.5 20H4a2.002 2.002 0 0 1-2-2V6Zm6.892 12 3.833-5.356-3.99-4.322a1 1 0 0 0-1.549.097L4 12.879V6h16v9.95l-3.257-3.619a1 1 0 0 0-1.557.088L11.2 18H8.892Z"
|
|
2664
|
-
clip-rule="evenodd"
|
|
2665
|
-
/>
|
|
2666
|
-
</svg>
|
|
2667
|
-
<span class="sr-only">Add image</span>
|
|
2668
|
-
</button>
|
|
2669
|
-
|
|
2670
|
-
<button
|
|
2671
|
-
[scPopoverTriggerFor]="popover"
|
|
2672
|
-
[attr.aria-label]="ariaLabel"
|
|
2673
|
-
[scTooltip]="ariaLabel"
|
|
2674
|
-
type="button"
|
|
2675
|
-
sc-toggle
|
|
2676
|
-
variant="outline"
|
|
2677
|
-
>
|
|
2678
|
-
<svg si-image-plus-icon></svg>
|
|
2679
|
-
<span class="sr-only">{{ ariaLabel }}</span>
|
|
2680
|
-
</button>
|
|
2681
|
-
|
|
2682
|
-
<ng-template #popover>
|
|
2683
|
-
<div class="grid gap-4">
|
|
2684
|
-
<div class="space-y-2">
|
|
2685
|
-
<h4 class="font-medium leading-none">Dimensions</h4>
|
|
2686
|
-
<p class="text-sm text-muted-foreground">Set the dimensions for the layer.</p>
|
|
2687
|
-
</div>
|
|
2688
|
-
<div class="grid gap-2">
|
|
2689
|
-
<div class="grid grid-cols-3 items-center gap-4">
|
|
2690
|
-
<label sc-label for="width">Url</label>
|
|
2691
|
-
<input class="col-span-2 h-8" id="width" sc-input defaultValue="100%" />
|
|
2692
|
-
</div>
|
|
2693
|
-
<div class="grid grid-cols-3 items-center gap-4">
|
|
2694
|
-
<label sc-label for="maxWidth">Alt</label>
|
|
2695
|
-
<input class="col-span-2 h-8" id="maxWidth" sc-input defaultValue="300px" />
|
|
2696
|
-
</div>
|
|
2697
|
-
<div class="grid grid-cols-3 items-center gap-4">
|
|
2698
|
-
<label sc-label for="height">Title</label>
|
|
2699
|
-
<input class="col-span-2 h-8" id="height" sc-input defaultValue="25px" />
|
|
2700
|
-
</div>
|
|
2701
|
-
<div class="grid grid-cols-3 items-center gap-4">
|
|
2702
|
-
<button sc-button variant="outline" type="button">Cancel</button>
|
|
2703
|
-
<button sc-button type="button">Done</button>
|
|
2704
|
-
</div>
|
|
2705
|
-
</div>
|
|
2706
|
-
</div>
|
|
2707
|
-
</ng-template>
|
|
2708
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
2709
|
-
}], ctorParameters: () => [] });
|
|
2710
|
-
|
|
2711
|
-
class ScAddLinkDialog {
|
|
2712
|
-
dialogRef = inject((DialogRef));
|
|
2713
|
-
linkForm = new FormGroup({
|
|
2714
|
-
url: new FormControl('https://flowbite.com', Validators.required),
|
|
2715
|
-
});
|
|
2716
|
-
get url() {
|
|
2717
|
-
return this.linkForm.get('url');
|
|
2718
|
-
}
|
|
2719
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScAddLinkDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2720
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScAddLinkDialog, isStandalone: true, selector: "sc-add-link-dialog", ngImport: i0, template: `
|
|
2721
|
-
<div
|
|
2722
|
-
class="z-50 h-[calc(100%-1rem)] max-h-full w-full items-center justify-center overflow-y-auto overflow-x-hidden md:inset-0"
|
|
2723
|
-
tabindex="-1"
|
|
2724
|
-
>
|
|
2725
|
-
<div class="relative max-h-full w-full max-w-md p-4">
|
|
2726
|
-
<!-- Modal content -->
|
|
2727
|
-
<div class="relative rounded-lg bg-white shadow dark:bg-gray-700">
|
|
2728
|
-
<!-- Modal header -->
|
|
2729
|
-
<div
|
|
2730
|
-
class="flex items-center justify-between rounded-t border-b p-4 md:p-5 dark:border-gray-600"
|
|
2731
|
-
>
|
|
2732
|
-
<h3 class="text-xl font-semibold text-gray-900 dark:text-white">Insert Url</h3>
|
|
2733
|
-
<button
|
|
2734
|
-
class="end-2.5 ms-auto inline-flex size-8 items-center justify-center rounded-lg bg-transparent text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
2735
|
-
(click)="dialogRef.close()"
|
|
2736
|
-
type="button"
|
|
2737
|
-
>
|
|
2738
|
-
<svg
|
|
2739
|
-
class="size-3"
|
|
2740
|
-
aria-hidden="true"
|
|
2741
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
2742
|
-
fill="none"
|
|
2743
|
-
viewBox="0 0 14 14"
|
|
2744
|
-
>
|
|
2745
|
-
<path
|
|
2746
|
-
stroke="currentColor"
|
|
2747
|
-
stroke-linecap="round"
|
|
2748
|
-
stroke-linejoin="round"
|
|
2749
|
-
stroke-width="2"
|
|
2750
|
-
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
|
|
2751
|
-
/>
|
|
2752
|
-
</svg>
|
|
2753
|
-
<span class="sr-only">Close modal</span>
|
|
2754
|
-
</button>
|
|
2755
|
-
</div>
|
|
2756
|
-
<!-- Modal body -->
|
|
2757
|
-
<div class="p-4 md:p-5">
|
|
2758
|
-
<form class="space-y-4" [formGroup]="linkForm">
|
|
2759
|
-
<div>
|
|
2760
|
-
<label
|
|
2761
|
-
class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
|
|
2762
|
-
for="url"
|
|
2763
|
-
>
|
|
2764
|
-
Url
|
|
2765
|
-
</label>
|
|
2766
|
-
<input
|
|
2767
|
-
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder:text-gray-400"
|
|
2768
|
-
id="url"
|
|
2769
|
-
type="url"
|
|
2770
|
-
name="url"
|
|
2771
|
-
formControlName="url"
|
|
2772
|
-
/>
|
|
2773
|
-
</div>
|
|
2774
|
-
|
|
2775
|
-
<button
|
|
2776
|
-
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
|
|
2777
|
-
(click)="
|
|
2778
|
-
dialogRef.close({
|
|
2779
|
-
url: url?.value,
|
|
2780
|
-
})
|
|
2781
|
-
"
|
|
2782
|
-
>
|
|
2783
|
-
Add link
|
|
2784
|
-
</button>
|
|
2785
|
-
</form>
|
|
2786
|
-
</div>
|
|
2787
|
-
</div>
|
|
2788
|
-
</div>
|
|
2789
|
-
</div>
|
|
2790
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2791
|
-
}
|
|
2792
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScAddLinkDialog, decorators: [{
|
|
2793
|
-
type: Component,
|
|
2794
|
-
args: [{ selector: 'sc-add-link-dialog', imports: [ReactiveFormsModule], template: `
|
|
2795
|
-
<div
|
|
2796
|
-
class="z-50 h-[calc(100%-1rem)] max-h-full w-full items-center justify-center overflow-y-auto overflow-x-hidden md:inset-0"
|
|
2797
|
-
tabindex="-1"
|
|
2798
|
-
>
|
|
2799
|
-
<div class="relative max-h-full w-full max-w-md p-4">
|
|
2800
|
-
<!-- Modal content -->
|
|
2801
|
-
<div class="relative rounded-lg bg-white shadow dark:bg-gray-700">
|
|
2802
|
-
<!-- Modal header -->
|
|
2803
|
-
<div
|
|
2804
|
-
class="flex items-center justify-between rounded-t border-b p-4 md:p-5 dark:border-gray-600"
|
|
2805
|
-
>
|
|
2806
|
-
<h3 class="text-xl font-semibold text-gray-900 dark:text-white">Insert Url</h3>
|
|
2807
|
-
<button
|
|
2808
|
-
class="end-2.5 ms-auto inline-flex size-8 items-center justify-center rounded-lg bg-transparent text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
2809
|
-
(click)="dialogRef.close()"
|
|
2810
|
-
type="button"
|
|
2811
|
-
>
|
|
2812
|
-
<svg
|
|
2813
|
-
class="size-3"
|
|
2814
|
-
aria-hidden="true"
|
|
2815
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
2816
|
-
fill="none"
|
|
2817
|
-
viewBox="0 0 14 14"
|
|
2818
|
-
>
|
|
2819
|
-
<path
|
|
2820
|
-
stroke="currentColor"
|
|
2821
|
-
stroke-linecap="round"
|
|
2822
|
-
stroke-linejoin="round"
|
|
2823
|
-
stroke-width="2"
|
|
2824
|
-
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
|
|
2825
|
-
/>
|
|
2826
|
-
</svg>
|
|
2827
|
-
<span class="sr-only">Close modal</span>
|
|
2828
|
-
</button>
|
|
2829
|
-
</div>
|
|
2830
|
-
<!-- Modal body -->
|
|
2831
|
-
<div class="p-4 md:p-5">
|
|
2832
|
-
<form class="space-y-4" [formGroup]="linkForm">
|
|
2833
|
-
<div>
|
|
2834
|
-
<label
|
|
2835
|
-
class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
|
|
2836
|
-
for="url"
|
|
2837
|
-
>
|
|
2838
|
-
Url
|
|
2839
|
-
</label>
|
|
2840
|
-
<input
|
|
2841
|
-
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder:text-gray-400"
|
|
2842
|
-
id="url"
|
|
2843
|
-
type="url"
|
|
2844
|
-
name="url"
|
|
2845
|
-
formControlName="url"
|
|
2846
|
-
/>
|
|
2847
|
-
</div>
|
|
2848
|
-
|
|
2849
|
-
<button
|
|
2850
|
-
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
|
|
2851
|
-
(click)="
|
|
2852
|
-
dialogRef.close({
|
|
2853
|
-
url: url?.value,
|
|
2854
|
-
})
|
|
2855
|
-
"
|
|
2856
|
-
>
|
|
2857
|
-
Add link
|
|
2858
|
-
</button>
|
|
2859
|
-
</form>
|
|
2860
|
-
</div>
|
|
2861
|
-
</div>
|
|
2862
|
-
</div>
|
|
2863
|
-
</div>
|
|
2864
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
2865
|
-
}] });
|
|
2866
|
-
|
|
2867
|
-
class ScExtensionLink {
|
|
2868
|
-
parent = inject(ScEditor);
|
|
2869
|
-
dialog = inject(Dialog);
|
|
2870
|
-
extensions = inject(ScExtensions);
|
|
2871
|
-
constructor() {
|
|
2872
|
-
this.extensions.setLink.set(true);
|
|
2873
|
-
}
|
|
2874
|
-
get editor() {
|
|
2875
|
-
return this.parent.editor;
|
|
2876
|
-
}
|
|
2877
|
-
openDialog() {
|
|
2878
|
-
const dialogRef = this.dialog.open(ScAddLinkDialog, {
|
|
2879
|
-
minWidth: '600px',
|
|
2880
|
-
});
|
|
2881
|
-
dialogRef.closed.subscribe((result) => {
|
|
2882
|
-
this.editor
|
|
2883
|
-
.chain()
|
|
2884
|
-
.focus()
|
|
2885
|
-
.toggleLink({ href: result?.url ?? '' })
|
|
2886
|
-
.run();
|
|
2887
|
-
});
|
|
2888
|
-
}
|
|
2889
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensionLink, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2890
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScExtensionLink, isStandalone: true, selector: "sc-extension-link", ngImport: i0, template: `
|
|
2891
|
-
<button
|
|
2892
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
2893
|
-
(click)="openDialog()"
|
|
2894
|
-
type="button"
|
|
2895
|
-
scTooltip="Add link"
|
|
2896
|
-
>
|
|
2897
|
-
<svg
|
|
2898
|
-
class="size-5"
|
|
2899
|
-
aria-hidden="true"
|
|
2900
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
2901
|
-
width="24"
|
|
2902
|
-
height="24"
|
|
2903
|
-
fill="none"
|
|
2904
|
-
viewBox="0 0 24 24"
|
|
2905
|
-
>
|
|
2906
|
-
<path
|
|
2907
|
-
stroke="currentColor"
|
|
2908
|
-
stroke-linecap="round"
|
|
2909
|
-
stroke-linejoin="round"
|
|
2910
|
-
stroke-width="2"
|
|
2911
|
-
d="M13.213 9.787a3.391 3.391 0 0 0-4.795 0l-3.425 3.426a3.39 3.39 0 0 0 4.795 4.794l.321-.304m-.321-4.49a3.39 3.39 0 0 0 4.795 0l3.424-3.426a3.39 3.39 0 0 0-4.794-4.795l-1.028.961"
|
|
2912
|
-
/>
|
|
2913
|
-
</svg>
|
|
2914
|
-
<span class="sr-only">Link</span>
|
|
2915
|
-
</button>
|
|
2916
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2917
|
-
}
|
|
2918
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensionLink, decorators: [{
|
|
2919
|
-
type: Component,
|
|
2920
|
-
args: [{ selector: 'sc-extension-link', imports: [ScTooltip], template: `
|
|
2921
|
-
<button
|
|
2922
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
2923
|
-
(click)="openDialog()"
|
|
2924
|
-
type="button"
|
|
2925
|
-
scTooltip="Add link"
|
|
2926
|
-
>
|
|
2927
|
-
<svg
|
|
2928
|
-
class="size-5"
|
|
2929
|
-
aria-hidden="true"
|
|
2930
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
2931
|
-
width="24"
|
|
2932
|
-
height="24"
|
|
2933
|
-
fill="none"
|
|
2934
|
-
viewBox="0 0 24 24"
|
|
2935
|
-
>
|
|
2936
|
-
<path
|
|
2937
|
-
stroke="currentColor"
|
|
2938
|
-
stroke-linecap="round"
|
|
2939
|
-
stroke-linejoin="round"
|
|
2940
|
-
stroke-width="2"
|
|
2941
|
-
d="M13.213 9.787a3.391 3.391 0 0 0-4.795 0l-3.425 3.426a3.39 3.39 0 0 0 4.795 4.794l.321-.304m-.321-4.49a3.39 3.39 0 0 0 4.795 0l3.424-3.426a3.39 3.39 0 0 0-4.794-4.795l-1.028.961"
|
|
2942
|
-
/>
|
|
2943
|
-
</svg>
|
|
2944
|
-
<span class="sr-only">Link</span>
|
|
2945
|
-
</button>
|
|
2946
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
2947
|
-
}], ctorParameters: () => [] });
|
|
2948
|
-
|
|
2949
|
-
class ScAddCellAttributeDialog {
|
|
2950
|
-
dialogRef = inject((DialogRef));
|
|
2951
|
-
attributeForm = new FormGroup({
|
|
2952
|
-
name: new FormControl('backgroundColor', Validators.required),
|
|
2953
|
-
value: new FormControl('#E1EFFE;'),
|
|
2954
|
-
});
|
|
2955
|
-
get name() {
|
|
2956
|
-
return this.attributeForm.get('name');
|
|
2957
|
-
}
|
|
2958
|
-
get value() {
|
|
2959
|
-
return this.attributeForm.get('value');
|
|
2960
|
-
}
|
|
2961
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScAddCellAttributeDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2962
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScAddCellAttributeDialog, isStandalone: true, selector: "sc-add-cell-attribute-dialog", ngImport: i0, template: `
|
|
2963
|
-
<div
|
|
2964
|
-
class="fixed inset-x-0 top-0 z-50 h-[calc(100%-1rem)] max-h-full w-full items-center justify-center overflow-y-auto overflow-x-hidden md:inset-0"
|
|
2965
|
-
id="cell-attribute-modal"
|
|
2966
|
-
tabindex="-1"
|
|
2967
|
-
>
|
|
2968
|
-
<div class="relative max-h-full w-full max-w-md p-4">
|
|
2969
|
-
<!-- Modal content -->
|
|
2970
|
-
<div class="relative rounded-lg bg-white shadow dark:bg-gray-700">
|
|
2971
|
-
<!-- Modal header -->
|
|
2972
|
-
<div
|
|
2973
|
-
class="flex items-center justify-between rounded-t border-b p-4 md:p-5 dark:border-gray-600"
|
|
2974
|
-
>
|
|
2975
|
-
<h3 class="text-xl font-semibold text-gray-900 dark:text-white">Add cell attribute</h3>
|
|
2976
|
-
<button
|
|
2977
|
-
class="end-2.5 ms-auto inline-flex size-8 items-center justify-center rounded-lg bg-transparent text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
2978
|
-
(click)="dialogRef.close()"
|
|
2979
|
-
type="button"
|
|
2980
|
-
data-modal-hide="cell-attribute-modal"
|
|
2981
|
-
>
|
|
2982
|
-
<svg
|
|
2983
|
-
class="size-3"
|
|
2984
|
-
aria-hidden="true"
|
|
2985
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
2986
|
-
fill="none"
|
|
2987
|
-
viewBox="0 0 14 14"
|
|
2988
|
-
>
|
|
2989
|
-
<path
|
|
2990
|
-
stroke="currentColor"
|
|
2991
|
-
stroke-linecap="round"
|
|
2992
|
-
stroke-linejoin="round"
|
|
2993
|
-
stroke-width="2"
|
|
2994
|
-
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
|
|
2995
|
-
/>
|
|
2996
|
-
</svg>
|
|
2997
|
-
<span class="sr-only">Close modal</span>
|
|
2998
|
-
</button>
|
|
2999
|
-
</div>
|
|
3000
|
-
<!-- Modal body -->
|
|
3001
|
-
<div class="p-4 md:p-5">
|
|
3002
|
-
<form class="space-y-4" [formGroup]="attributeForm">
|
|
3003
|
-
<div>
|
|
3004
|
-
<label
|
|
3005
|
-
class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
|
|
3006
|
-
for="attribute-name"
|
|
3007
|
-
>
|
|
3008
|
-
Attribute name
|
|
3009
|
-
</label>
|
|
3010
|
-
<input
|
|
3011
|
-
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder:text-gray-400"
|
|
3012
|
-
id="attribute-name"
|
|
3013
|
-
type="text"
|
|
3014
|
-
formControlName="name"
|
|
3015
|
-
placeholder="eg. backgroundColor"
|
|
3016
|
-
/>
|
|
3017
|
-
</div>
|
|
3018
|
-
<div>
|
|
3019
|
-
<label
|
|
3020
|
-
class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
|
|
3021
|
-
for="attribute-value"
|
|
3022
|
-
>
|
|
3023
|
-
Attribute value
|
|
3024
|
-
</label>
|
|
3025
|
-
<input
|
|
3026
|
-
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder:text-gray-400"
|
|
3027
|
-
id="attribute-value"
|
|
3028
|
-
type="text"
|
|
3029
|
-
formControlName="value"
|
|
3030
|
-
placeholder="#E1EFFE;"
|
|
3031
|
-
/>
|
|
3032
|
-
</div>
|
|
3033
|
-
<button
|
|
3034
|
-
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
|
|
3035
|
-
(click)="
|
|
3036
|
-
dialogRef.close({
|
|
3037
|
-
name: name?.value,
|
|
3038
|
-
value: value?.value,
|
|
3039
|
-
})
|
|
3040
|
-
"
|
|
3041
|
-
type="submit"
|
|
3042
|
-
>
|
|
3043
|
-
Set attribute
|
|
3044
|
-
</button>
|
|
3045
|
-
</form>
|
|
3046
|
-
</div>
|
|
3047
|
-
</div>
|
|
3048
|
-
</div>
|
|
3049
|
-
</div>
|
|
3050
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
3051
|
-
}
|
|
3052
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScAddCellAttributeDialog, decorators: [{
|
|
3053
|
-
type: Component,
|
|
3054
|
-
args: [{ selector: 'sc-add-cell-attribute-dialog', imports: [ReactiveFormsModule], template: `
|
|
3055
|
-
<div
|
|
3056
|
-
class="fixed inset-x-0 top-0 z-50 h-[calc(100%-1rem)] max-h-full w-full items-center justify-center overflow-y-auto overflow-x-hidden md:inset-0"
|
|
3057
|
-
id="cell-attribute-modal"
|
|
3058
|
-
tabindex="-1"
|
|
3059
|
-
>
|
|
3060
|
-
<div class="relative max-h-full w-full max-w-md p-4">
|
|
3061
|
-
<!-- Modal content -->
|
|
3062
|
-
<div class="relative rounded-lg bg-white shadow dark:bg-gray-700">
|
|
3063
|
-
<!-- Modal header -->
|
|
3064
|
-
<div
|
|
3065
|
-
class="flex items-center justify-between rounded-t border-b p-4 md:p-5 dark:border-gray-600"
|
|
3066
|
-
>
|
|
3067
|
-
<h3 class="text-xl font-semibold text-gray-900 dark:text-white">Add cell attribute</h3>
|
|
3068
|
-
<button
|
|
3069
|
-
class="end-2.5 ms-auto inline-flex size-8 items-center justify-center rounded-lg bg-transparent text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3070
|
-
(click)="dialogRef.close()"
|
|
3071
|
-
type="button"
|
|
3072
|
-
data-modal-hide="cell-attribute-modal"
|
|
3073
|
-
>
|
|
3074
|
-
<svg
|
|
3075
|
-
class="size-3"
|
|
3076
|
-
aria-hidden="true"
|
|
3077
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3078
|
-
fill="none"
|
|
3079
|
-
viewBox="0 0 14 14"
|
|
3080
|
-
>
|
|
3081
|
-
<path
|
|
3082
|
-
stroke="currentColor"
|
|
3083
|
-
stroke-linecap="round"
|
|
3084
|
-
stroke-linejoin="round"
|
|
3085
|
-
stroke-width="2"
|
|
3086
|
-
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
|
|
3087
|
-
/>
|
|
3088
|
-
</svg>
|
|
3089
|
-
<span class="sr-only">Close modal</span>
|
|
3090
|
-
</button>
|
|
3091
|
-
</div>
|
|
3092
|
-
<!-- Modal body -->
|
|
3093
|
-
<div class="p-4 md:p-5">
|
|
3094
|
-
<form class="space-y-4" [formGroup]="attributeForm">
|
|
3095
|
-
<div>
|
|
3096
|
-
<label
|
|
3097
|
-
class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
|
|
3098
|
-
for="attribute-name"
|
|
3099
|
-
>
|
|
3100
|
-
Attribute name
|
|
3101
|
-
</label>
|
|
3102
|
-
<input
|
|
3103
|
-
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder:text-gray-400"
|
|
3104
|
-
id="attribute-name"
|
|
3105
|
-
type="text"
|
|
3106
|
-
formControlName="name"
|
|
3107
|
-
placeholder="eg. backgroundColor"
|
|
3108
|
-
/>
|
|
3109
|
-
</div>
|
|
3110
|
-
<div>
|
|
3111
|
-
<label
|
|
3112
|
-
class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
|
|
3113
|
-
for="attribute-value"
|
|
3114
|
-
>
|
|
3115
|
-
Attribute value
|
|
3116
|
-
</label>
|
|
3117
|
-
<input
|
|
3118
|
-
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder:text-gray-400"
|
|
3119
|
-
id="attribute-value"
|
|
3120
|
-
type="text"
|
|
3121
|
-
formControlName="value"
|
|
3122
|
-
placeholder="#E1EFFE;"
|
|
3123
|
-
/>
|
|
3124
|
-
</div>
|
|
3125
|
-
<button
|
|
3126
|
-
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
|
|
3127
|
-
(click)="
|
|
3128
|
-
dialogRef.close({
|
|
3129
|
-
name: name?.value,
|
|
3130
|
-
value: value?.value,
|
|
3131
|
-
})
|
|
3132
|
-
"
|
|
3133
|
-
type="submit"
|
|
3134
|
-
>
|
|
3135
|
-
Set attribute
|
|
3136
|
-
</button>
|
|
3137
|
-
</form>
|
|
3138
|
-
</div>
|
|
3139
|
-
</div>
|
|
3140
|
-
</div>
|
|
3141
|
-
</div>
|
|
3142
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
3143
|
-
}] });
|
|
3144
|
-
|
|
3145
|
-
class ScExtensionTable {
|
|
3146
|
-
parent = inject(ScEditor);
|
|
3147
|
-
dialog = inject(Dialog);
|
|
3148
|
-
extensions = inject(ScExtensions);
|
|
3149
|
-
constructor() {
|
|
3150
|
-
this.extensions.table.set(true);
|
|
3151
|
-
}
|
|
3152
|
-
get editor() {
|
|
3153
|
-
return this.parent.editor;
|
|
3154
|
-
}
|
|
3155
|
-
insertTable() {
|
|
3156
|
-
this.editor.chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run();
|
|
3157
|
-
}
|
|
3158
|
-
deleteTable() {
|
|
3159
|
-
this.editor.chain().focus().deleteTable().run();
|
|
3160
|
-
}
|
|
3161
|
-
addColumnBefore() {
|
|
3162
|
-
this.editor.chain().focus().addColumnBefore().run();
|
|
3163
|
-
}
|
|
3164
|
-
addColumnAfter() {
|
|
3165
|
-
this.editor.chain().focus().addColumnAfter().run();
|
|
3166
|
-
}
|
|
3167
|
-
deleteColumn() {
|
|
3168
|
-
this.editor.chain().focus().deleteColumn().run();
|
|
3169
|
-
}
|
|
3170
|
-
addRowBefore() {
|
|
3171
|
-
this.editor.chain().focus().addRowBefore().run();
|
|
3172
|
-
}
|
|
3173
|
-
addRowAfter() {
|
|
3174
|
-
this.editor.chain().focus().addRowAfter().run();
|
|
3175
|
-
}
|
|
3176
|
-
deleteRow() {
|
|
3177
|
-
this.editor.chain().focus().deleteRow().run();
|
|
3178
|
-
}
|
|
3179
|
-
mergeCells() {
|
|
3180
|
-
this.editor.chain().focus().mergeCells().run();
|
|
3181
|
-
}
|
|
3182
|
-
splitCell() {
|
|
3183
|
-
this.editor.chain().focus().splitCell().run();
|
|
3184
|
-
}
|
|
3185
|
-
mergeOrSplit() {
|
|
3186
|
-
this.editor.chain().focus().mergeOrSplit().run();
|
|
3187
|
-
}
|
|
3188
|
-
toggleHeaderColumn() {
|
|
3189
|
-
this.editor.chain().focus().toggleHeaderColumn().run();
|
|
3190
|
-
}
|
|
3191
|
-
toggleHeaderRow() {
|
|
3192
|
-
this.editor.chain().focus().toggleHeaderRow().run();
|
|
3193
|
-
}
|
|
3194
|
-
toggleHeaderCell() {
|
|
3195
|
-
this.editor.chain().focus().toggleHeaderCell().run();
|
|
3196
|
-
}
|
|
3197
|
-
fixTables() {
|
|
3198
|
-
this.editor.commands.fixTables();
|
|
3199
|
-
}
|
|
3200
|
-
goToPreviousCell() {
|
|
3201
|
-
this.editor.chain().focus().goToPreviousCell().run();
|
|
3202
|
-
}
|
|
3203
|
-
goToNextCell() {
|
|
3204
|
-
this.editor.chain().focus().goToNextCell().run();
|
|
3205
|
-
}
|
|
3206
|
-
openDialog() {
|
|
3207
|
-
const dialogRef = this.dialog.open(ScAddCellAttributeDialog, {
|
|
3208
|
-
minWidth: '600px',
|
|
3209
|
-
});
|
|
3210
|
-
dialogRef.closed.subscribe((result) => {
|
|
3211
|
-
this.editor.commands.setCellAttribute(result?.name ?? '', result?.value ?? '');
|
|
3212
|
-
});
|
|
3213
|
-
}
|
|
3214
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensionTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3215
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScExtensionTable, isStandalone: true, selector: "sc-extension-table", ngImport: i0, template: `
|
|
3216
|
-
<button
|
|
3217
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3218
|
-
(click)="insertTable()"
|
|
3219
|
-
type="button"
|
|
3220
|
-
scTooltip="Add table"
|
|
3221
|
-
>
|
|
3222
|
-
<svg
|
|
3223
|
-
class="size-5"
|
|
3224
|
-
aria-hidden="true"
|
|
3225
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3226
|
-
width="24"
|
|
3227
|
-
height="24"
|
|
3228
|
-
fill="none"
|
|
3229
|
-
viewBox="0 0 24 24"
|
|
3230
|
-
>
|
|
3231
|
-
<path
|
|
3232
|
-
stroke="currentColor"
|
|
3233
|
-
stroke-linecap="round"
|
|
3234
|
-
stroke-linejoin="round"
|
|
3235
|
-
stroke-width="2"
|
|
3236
|
-
d="M3 15v3c0 .5523.44772 1 1 1h10.5M3 15v-4m0 4h11M3 11V6c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v5M3 11h18m0 0v1M8 11v8m4-8v8m4-8v2m1 4h2m0 0h2m-2 0v2m0-2v-2"
|
|
3237
|
-
/>
|
|
3238
|
-
</svg>
|
|
3239
|
-
<span class="sr-only">Add table</span>
|
|
3240
|
-
</button>
|
|
3241
|
-
|
|
3242
|
-
<button
|
|
3243
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3244
|
-
(click)="deleteTable()"
|
|
3245
|
-
type="button"
|
|
3246
|
-
scTooltip="Delete table"
|
|
3247
|
-
>
|
|
3248
|
-
<svg
|
|
3249
|
-
class="size-5"
|
|
3250
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3251
|
-
width="24"
|
|
3252
|
-
height="24"
|
|
3253
|
-
fill="none"
|
|
3254
|
-
viewBox="0 0 24 24"
|
|
3255
|
-
>
|
|
3256
|
-
<path
|
|
3257
|
-
stroke="currentColor"
|
|
3258
|
-
stroke-linecap="round"
|
|
3259
|
-
stroke-linejoin="round"
|
|
3260
|
-
stroke-width="2"
|
|
3261
|
-
d="M3 15.5v3c0 .5523.44772 1 1 1h10.5M3 15.5v-4m0 4h11m-11-4v-5c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v5m-18 0h18m0 0v1m-13-1v8m4-8v8m4-8v2m1.8956 5.9528 1.5047-1.5047m0 0 1.5048-1.5048m-1.5048 1.5048 1.4605 1.4604m-1.4605-1.4604-1.4604-1.4605"
|
|
3262
|
-
/>
|
|
3263
|
-
</svg>
|
|
3264
|
-
<span class="sr-only">Delete table</span>
|
|
3265
|
-
</button>
|
|
3266
|
-
|
|
3267
|
-
<sc-separator class="h5" orientation="vertical" />
|
|
3268
|
-
|
|
3269
|
-
<button
|
|
3270
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3271
|
-
(click)="addColumnBefore()"
|
|
3272
|
-
type="button"
|
|
3273
|
-
data-tooltip-target="tooltip-add-column-before"
|
|
3274
|
-
scTooltip="Add column before"
|
|
3275
|
-
>
|
|
3276
|
-
<svg
|
|
3277
|
-
class="size-5"
|
|
3278
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3279
|
-
width="24"
|
|
3280
|
-
height="24"
|
|
3281
|
-
fill="none"
|
|
3282
|
-
viewBox="0 0 24 24"
|
|
3283
|
-
>
|
|
3284
|
-
<path
|
|
3285
|
-
stroke="currentColor"
|
|
3286
|
-
stroke-linecap="round"
|
|
3287
|
-
stroke-linejoin="round"
|
|
3288
|
-
stroke-width="2"
|
|
3289
|
-
d="M15 5.5v14m-8-7h2m0 0h2m-2 0v2m0-2v-2m12 1h-6m6 4h-6m-11 4h16c.5523 0 1-.4477 1-1v-12c0-.55228-.4477-1-1-1H4c-.55228 0-1 .44772-1 1v12c0 .5523.44772 1 1 1Z"
|
|
3290
|
-
/>
|
|
3291
|
-
</svg>
|
|
3292
|
-
<span class="sr-only">Add column before</span>
|
|
3293
|
-
</button>
|
|
3294
|
-
|
|
3295
|
-
<button
|
|
3296
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3297
|
-
(click)="addColumnAfter()"
|
|
3298
|
-
type="button"
|
|
3299
|
-
data-tooltip-target="tooltip-add-column-after"
|
|
3300
|
-
scTooltip="Add column after"
|
|
3301
|
-
>
|
|
3302
|
-
<svg
|
|
3303
|
-
class="size-5"
|
|
3304
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3305
|
-
width="24"
|
|
3306
|
-
height="24"
|
|
3307
|
-
fill="none"
|
|
3308
|
-
viewBox="0 0 24 24"
|
|
3309
|
-
>
|
|
3310
|
-
<path
|
|
3311
|
-
stroke="currentColor"
|
|
3312
|
-
stroke-linecap="round"
|
|
3313
|
-
stroke-linejoin="round"
|
|
3314
|
-
stroke-width="2"
|
|
3315
|
-
d="M9 5.5v14m8-7h-2m0 0h-2m2 0v2m0-2v-2m-12 1h6m-6 4h6m11 4H4c-.55228 0-1-.4477-1-1v-12c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v12c0 .5523-.4477 1-1 1Z"
|
|
3316
|
-
/>
|
|
3317
|
-
</svg>
|
|
3318
|
-
<span class="sr-only">Add column after</span>
|
|
3319
|
-
</button>
|
|
3320
|
-
|
|
3321
|
-
<button
|
|
3322
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3323
|
-
(click)="deleteColumn()"
|
|
3324
|
-
type="button"
|
|
3325
|
-
data-tooltip-target="tooltip-remove-column"
|
|
3326
|
-
scTooltip="Remove column"
|
|
3327
|
-
>
|
|
3328
|
-
<svg
|
|
3329
|
-
class="size-5"
|
|
3330
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3331
|
-
width="24"
|
|
3332
|
-
height="24"
|
|
3333
|
-
fill="none"
|
|
3334
|
-
viewBox="0 0 24 24"
|
|
3335
|
-
>
|
|
3336
|
-
<path
|
|
3337
|
-
stroke="currentColor"
|
|
3338
|
-
stroke-linecap="round"
|
|
3339
|
-
stroke-linejoin="round"
|
|
3340
|
-
stroke-width="2"
|
|
3341
|
-
d="M9 5.5v14m-6-8h6m-6 4h6m4.5061-1.4939L15.0123 12.5m0 0 1.5061-1.5061M15.0123 12.5l1.5061 1.5061M15.0123 12.5l-1.5062-1.5061M20 19.5H4c-.55228 0-1-.4477-1-1v-12c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v12c0 .5523-.4477 1-1 1Z"
|
|
3342
|
-
/>
|
|
3343
|
-
</svg>
|
|
3344
|
-
<span class="sr-only">Remove column</span>
|
|
3345
|
-
</button>
|
|
3346
|
-
|
|
3347
|
-
<sc-separator class="h5" orientation="vertical" />
|
|
3348
|
-
|
|
3349
|
-
<button
|
|
3350
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3351
|
-
(click)="addRowBefore()"
|
|
3352
|
-
type="button"
|
|
3353
|
-
data-tooltip-target="tooltip-add-row-before"
|
|
3354
|
-
scTooltip="Add row before"
|
|
3355
|
-
>
|
|
3356
|
-
<svg
|
|
3357
|
-
class="size-5"
|
|
3358
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3359
|
-
width="24"
|
|
3360
|
-
height="24"
|
|
3361
|
-
fill="none"
|
|
3362
|
-
viewBox="0 0 24 24"
|
|
3363
|
-
>
|
|
3364
|
-
<path
|
|
3365
|
-
stroke="currentColor"
|
|
3366
|
-
stroke-linecap="round"
|
|
3367
|
-
stroke-linejoin="round"
|
|
3368
|
-
stroke-width="2"
|
|
3369
|
-
d="M3 15.5v3c0 .5523.44772 1 1 1h16c.5523 0 1-.4477 1-1v-3m-18 0v-9c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v9m-18 0h18m-13 0v4m4-4v4m4-4v4m-6-9h2m0 0h2m-2 0v2m0-2v-2"
|
|
3370
|
-
/>
|
|
3371
|
-
</svg>
|
|
3372
|
-
<span class="sr-only">Add row before</span>
|
|
3373
|
-
</button>
|
|
3374
|
-
|
|
3375
|
-
<button
|
|
3376
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3377
|
-
(click)="addRowAfter()"
|
|
3378
|
-
type="button"
|
|
3379
|
-
data-tooltip-target="tooltip-add-row-after"
|
|
3380
|
-
scTooltip="Add row after"
|
|
3381
|
-
>
|
|
3382
|
-
<svg
|
|
3383
|
-
class="size-5"
|
|
3384
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3385
|
-
width="24"
|
|
3386
|
-
height="24"
|
|
3387
|
-
fill="none"
|
|
3388
|
-
viewBox="0 0 24 24"
|
|
3389
|
-
>
|
|
3390
|
-
<path
|
|
3391
|
-
stroke="currentColor"
|
|
3392
|
-
stroke-linecap="round"
|
|
3393
|
-
stroke-linejoin="round"
|
|
3394
|
-
stroke-width="2"
|
|
3395
|
-
d="M3 9.5v-3c0-.55228.44772-1 1-1h16c.5523 0 1 .44771 1 1v3m-18 0v9c0 .5523.44772 1 1 1h16c.5523 0 1-.4477 1-1v-9m-18 0h18m-13 0v-4m4 4v-4m4 4v-4m-6 9h2m0 0h2m-2 0v-2m0 2v2"
|
|
3396
|
-
/>
|
|
3397
|
-
</svg>
|
|
3398
|
-
<span class="sr-only">Add row after</span>
|
|
3399
|
-
</button>
|
|
3400
|
-
|
|
3401
|
-
<button
|
|
3402
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3403
|
-
(click)="deleteRow()"
|
|
3404
|
-
type="button"
|
|
3405
|
-
data-tooltip-target="tooltip-remove-row"
|
|
3406
|
-
scTooltip="Remove row"
|
|
3407
|
-
>
|
|
3408
|
-
<svg
|
|
3409
|
-
class="size-5"
|
|
3410
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3411
|
-
width="24"
|
|
3412
|
-
height="24"
|
|
3413
|
-
fill="none"
|
|
3414
|
-
viewBox="0 0 24 24"
|
|
3415
|
-
>
|
|
3416
|
-
<path
|
|
3417
|
-
stroke="currentColor"
|
|
3418
|
-
stroke-linecap="round"
|
|
3419
|
-
stroke-linejoin="round"
|
|
3420
|
-
stroke-width="2"
|
|
3421
|
-
d="M3 15.5v3c0 .5523.44772 1 1 1h16c.5523 0 1-.4477 1-1v-3m-18 0v-9c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v9m-18 0h18m-13 0v4m4-4v4m4-4v4m-5.5061-7.4939L12 10.5m0 0 1.5061-1.50614M12 10.5l1.5061 1.5061M12 10.5l-1.5061-1.50614"
|
|
3422
|
-
/>
|
|
3423
|
-
</svg>
|
|
3424
|
-
<span class="sr-only">Remove row</span>
|
|
3425
|
-
</button>
|
|
3426
|
-
|
|
3427
|
-
<button
|
|
3428
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3429
|
-
(click)="mergeCells()"
|
|
3430
|
-
type="button"
|
|
3431
|
-
data-tooltip-target="tooltip-merge-cells"
|
|
3432
|
-
scTooltip="Merge cells"
|
|
3433
|
-
>
|
|
3434
|
-
<svg
|
|
3435
|
-
class="size-5"
|
|
3436
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3437
|
-
width="24"
|
|
3438
|
-
height="24"
|
|
3439
|
-
fill="none"
|
|
3440
|
-
viewBox="0 0 24 24"
|
|
3441
|
-
>
|
|
3442
|
-
<path
|
|
3443
|
-
stroke="currentColor"
|
|
3444
|
-
stroke-linecap="round"
|
|
3445
|
-
stroke-linejoin="round"
|
|
3446
|
-
stroke-width="2"
|
|
3447
|
-
d="M10 18.5v2H4v-16h6v2m4 12v2h6v-16h-6v2m-6.49543 8.4954L10 12.5m0 0-2.49543-2.4954M10 12.5H4.05191m12.50199 2.5539L14 12.5m0 0 2.5539-2.55392M14 12.5h5.8319"
|
|
3448
|
-
/>
|
|
3449
|
-
</svg>
|
|
3450
|
-
<span class="sr-only">Merge cells</span>
|
|
3451
|
-
</button>
|
|
3452
|
-
|
|
3453
|
-
<button
|
|
3454
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3455
|
-
(click)="splitCell()"
|
|
3456
|
-
type="button"
|
|
3457
|
-
data-tooltip-target="tooltip-split-cells"
|
|
3458
|
-
scTooltip="Split cells"
|
|
3459
|
-
>
|
|
3460
|
-
<svg
|
|
3461
|
-
class="size-5"
|
|
3462
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3463
|
-
width="24"
|
|
3464
|
-
height="24"
|
|
3465
|
-
fill="none"
|
|
3466
|
-
viewBox="0 0 24 24"
|
|
3467
|
-
>
|
|
3468
|
-
<path
|
|
3469
|
-
stroke="currentColor"
|
|
3470
|
-
stroke-linecap="round"
|
|
3471
|
-
stroke-linejoin="round"
|
|
3472
|
-
stroke-width="2"
|
|
3473
|
-
d="M4 18.5v2h6v-16H4v2m16 12v2h-6v-16h6v2M6.49545 14.9954 4.00003 12.5m0 0 2.49542-2.4954M4.00003 12.5h5.94809m7.49798 2.5539L20 12.5m0 0-2.5539-2.55392M20 12.5h-5.8319"
|
|
3474
|
-
/>
|
|
3475
|
-
</svg>
|
|
3476
|
-
<span class="sr-only">Split cells</span>
|
|
3477
|
-
</button>
|
|
3478
|
-
|
|
3479
|
-
<button
|
|
3480
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3481
|
-
(click)="mergeOrSplit()"
|
|
3482
|
-
type="button"
|
|
3483
|
-
data-tooltip-target="tooltip-merge-or-split"
|
|
3484
|
-
scTooltip="Merge or split"
|
|
3485
|
-
>
|
|
3486
|
-
<svg
|
|
3487
|
-
class="size-5"
|
|
3488
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3489
|
-
width="24"
|
|
3490
|
-
height="24"
|
|
3491
|
-
fill="none"
|
|
3492
|
-
viewBox="0 0 24 24"
|
|
3493
|
-
>
|
|
3494
|
-
<path
|
|
3495
|
-
stroke="currentColor"
|
|
3496
|
-
stroke-linecap="round"
|
|
3497
|
-
stroke-linejoin="round"
|
|
3498
|
-
stroke-width="2"
|
|
3499
|
-
d="M18.5045 14.9954 21 12.5m0 0-2.4955-2.4954M21 12.5h-5.9481m-9.49798 2.5539L3 12.5m0 0 2.55392-2.55392M3 12.5h5.83192m.16807 7v-14H15v14H8.99999Z"
|
|
3500
|
-
/>
|
|
3501
|
-
</svg>
|
|
3502
|
-
<span class="sr-only">Merge or split</span>
|
|
3503
|
-
</button>
|
|
3504
|
-
|
|
3505
|
-
<sc-separator class="h5" orientation="vertical" />
|
|
3506
|
-
|
|
3507
|
-
<button
|
|
3508
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3509
|
-
(click)="toggleHeaderColumn()"
|
|
3510
|
-
type="button"
|
|
3511
|
-
data-tooltip-target="tooltip-toggle-header-column"
|
|
3512
|
-
scTooltip="Toggle header column"
|
|
3513
|
-
>
|
|
3514
|
-
<svg
|
|
3515
|
-
class="size-5"
|
|
3516
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3517
|
-
width="24"
|
|
3518
|
-
height="24"
|
|
3519
|
-
fill="none"
|
|
3520
|
-
viewBox="0 0 24 24"
|
|
3521
|
-
>
|
|
3522
|
-
<path
|
|
3523
|
-
stroke="currentColor"
|
|
3524
|
-
stroke-linecap="round"
|
|
3525
|
-
stroke-linejoin="round"
|
|
3526
|
-
stroke-width="2"
|
|
3527
|
-
d="M15 5.5v14m6-8h-6m6 4h-6m-9-3h1.99093M4 19.5h16c.5523 0 1-.4477 1-1v-12c0-.55228-.4477-1-1-1H4c-.55228 0-1 .44772-1 1v12c0 .5523.44772 1 1 1Zm8-7c0 1.1046-.8954 2-2 2-1.10457 0-2-.8954-2-2s.89543-2 2-2c1.1046 0 2 .8954 2 2Z"
|
|
3528
|
-
/>
|
|
3529
|
-
</svg>
|
|
3530
|
-
<span class="sr-only">Toggle header column</span>
|
|
3531
|
-
</button>
|
|
3532
|
-
|
|
3533
|
-
<button
|
|
3534
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3535
|
-
(click)="toggleHeaderRow()"
|
|
3536
|
-
type="button"
|
|
3537
|
-
data-tooltip-target="tooltip-toggle-header-row"
|
|
3538
|
-
scTooltip="Toggle header row"
|
|
3539
|
-
>
|
|
3540
|
-
<svg
|
|
3541
|
-
class="size-5"
|
|
3542
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3543
|
-
width="24"
|
|
3544
|
-
height="24"
|
|
3545
|
-
fill="none"
|
|
3546
|
-
viewBox="0 0 24 24"
|
|
3547
|
-
>
|
|
3548
|
-
<path
|
|
3549
|
-
stroke="currentColor"
|
|
3550
|
-
stroke-linecap="round"
|
|
3551
|
-
stroke-linejoin="round"
|
|
3552
|
-
stroke-width="2"
|
|
3553
|
-
d="M3 15.5v3c0 .5523.44772 1 1 1h16c.5523 0 1-.4477 1-1v-3m-18 0v-9c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v9m-18 0h18m-13 0v4m4-4v4m4-4v4m-7-9h1.9909M15 10.5c0 1.1046-.8954 2-2 2s-2-.8954-2-2c0-1.10457.8954-2 2-2s2 .89543 2 2Z"
|
|
3554
|
-
/>
|
|
3555
|
-
</svg>
|
|
3556
|
-
<span class="sr-only">Toggle header row</span>
|
|
3557
|
-
</button>
|
|
3558
|
-
|
|
3559
|
-
<button
|
|
3560
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3561
|
-
(click)="toggleHeaderCell()"
|
|
3562
|
-
type="button"
|
|
3563
|
-
data-tooltip-target="tooltip-toggle-header-cell"
|
|
3564
|
-
scTooltip="Toggle header cell"
|
|
3565
|
-
>
|
|
3566
|
-
<svg
|
|
3567
|
-
class="size-5"
|
|
3568
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3569
|
-
width="24"
|
|
3570
|
-
height="24"
|
|
3571
|
-
fill="none"
|
|
3572
|
-
viewBox="0 0 24 24"
|
|
3573
|
-
>
|
|
3574
|
-
<path
|
|
3575
|
-
stroke="currentColor"
|
|
3576
|
-
stroke-linecap="round"
|
|
3577
|
-
stroke-linejoin="round"
|
|
3578
|
-
stroke-width="2"
|
|
3579
|
-
d="M3 15.5v3c0 .5523.44772 1 1 1h16c.5523 0 1-.4477 1-1v-3m-18 0v-9c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v9m-18 0h18m-13 0v4m4-4v4m4-4v4m-7-9h1.9909M15 10.5c0 1.1046-.8954 2-2 2s-2-.8954-2-2c0-1.10457.8954-2 2-2s2 .89543 2 2Z"
|
|
3580
|
-
/>
|
|
3581
|
-
</svg>
|
|
3582
|
-
<span class="sr-only">Toggle header cell</span>
|
|
3583
|
-
</button>
|
|
3584
|
-
|
|
3585
|
-
<button
|
|
3586
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3587
|
-
(click)="openDialog()"
|
|
3588
|
-
type="button"
|
|
3589
|
-
scTooltip="Add cell attribute"
|
|
3590
|
-
>
|
|
3591
|
-
<svg
|
|
3592
|
-
class="size-5"
|
|
3593
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3594
|
-
width="24"
|
|
3595
|
-
height="24"
|
|
3596
|
-
fill="none"
|
|
3597
|
-
viewBox="0 0 24 24"
|
|
3598
|
-
>
|
|
3599
|
-
<path
|
|
3600
|
-
stroke="currentColor"
|
|
3601
|
-
stroke-linecap="round"
|
|
3602
|
-
stroke-linejoin="round"
|
|
3603
|
-
stroke-width="2"
|
|
3604
|
-
d="M3 15.5v3c0 .5523.44772 1 1 1h8v-8m-9 4v-4m0 4h9m-9-4v-5c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v4m-18 1h11m6.25 5c0 1.2426-1.0073 2.25-2.25 2.25m2.25-2.25c0-1.2426-1.0073-2.25-2.25-2.25m2.25 2.25H21m-3 2.25c-1.2426 0-2.25-1.0074-2.25-2.25M18 18.75v.75m-2.25-3c0-1.2426 1.0074-2.25 2.25-2.25m-2.25 2.25H15m3-2.25v-.75m-1.591 1.409-.5303-.5303m4.2426 4.2426-.5303-.5303m-3.182 0-.5303.5303m4.2426-4.2426-.5303.5303"
|
|
3605
|
-
/>
|
|
3606
|
-
</svg>
|
|
3607
|
-
<span class="sr-only">Add cell attribute</span>
|
|
3608
|
-
</button>
|
|
3609
|
-
|
|
3610
|
-
<sc-separator class="h5" orientation="vertical" />
|
|
3611
|
-
|
|
3612
|
-
<button
|
|
3613
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3614
|
-
(click)="fixTables()"
|
|
3615
|
-
type="button"
|
|
3616
|
-
data-tooltip-target="tooltip-fix-tables"
|
|
3617
|
-
scTooltip="Fix tables"
|
|
3618
|
-
>
|
|
3619
|
-
<svg
|
|
3620
|
-
class="size-5"
|
|
3621
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3622
|
-
width="24"
|
|
3623
|
-
height="24"
|
|
3624
|
-
fill="none"
|
|
3625
|
-
viewBox="0 0 24 24"
|
|
3626
|
-
>
|
|
3627
|
-
<path
|
|
3628
|
-
stroke="currentColor"
|
|
3629
|
-
stroke-linecap="round"
|
|
3630
|
-
stroke-linejoin="round"
|
|
3631
|
-
stroke-width="2"
|
|
3632
|
-
d="M3 15.5v3c0 .5523.44772 1 1 1h4v-4m-5 0v-4m0 4h5m-5-4v-5c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v1.98935M3 11.5h5v4m9.4708 4.1718-.8696-1.4388-2.8164-.235-2.573-4.2573 1.4873-2.8362 1.4441 2.3893c.3865.6396 1.2183.8447 1.8579.4582.6396-.3866.8447-1.2184.4582-1.858l-1.444-2.38925h3.1353l2.6101 4.27715-1.0713 2.5847.8695 1.4388"
|
|
3633
|
-
/>
|
|
3634
|
-
</svg>
|
|
3635
|
-
<span class="sr-only">Fix tables</span>
|
|
3636
|
-
</button>
|
|
3637
|
-
|
|
3638
|
-
<button
|
|
3639
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3640
|
-
(click)="goToPreviousCell()"
|
|
3641
|
-
type="button"
|
|
3642
|
-
scTooltip="Previous cell"
|
|
3643
|
-
>
|
|
3644
|
-
<svg
|
|
3645
|
-
class="size-5"
|
|
3646
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3647
|
-
width="24"
|
|
3648
|
-
height="24"
|
|
3649
|
-
fill="none"
|
|
3650
|
-
viewBox="0 0 24 24"
|
|
3651
|
-
>
|
|
3652
|
-
<path
|
|
3653
|
-
stroke="currentColor"
|
|
3654
|
-
stroke-linecap="round"
|
|
3655
|
-
stroke-linejoin="round"
|
|
3656
|
-
stroke-width="2"
|
|
3657
|
-
d="M3 15.5v3c0 .5523.44772 1 1 1h9.5M3 15.5v-4m0 4h9m-9-4v-5c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v5H3Zm5 0v8m4-8v8m5.9001-1.0999L16 16.5m0 0 1.9001-1.9001M16 16.5h5"
|
|
3658
|
-
/>
|
|
3659
|
-
</svg>
|
|
3660
|
-
<span class="sr-only">Previous cell</span>
|
|
3661
|
-
</button>
|
|
3662
|
-
|
|
3663
|
-
<button
|
|
3664
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3665
|
-
(click)="goToNextCell()"
|
|
3666
|
-
type="button"
|
|
3667
|
-
data-tooltip-target="tooltip-next-cell"
|
|
3668
|
-
scTooltip="Next cell"
|
|
3669
|
-
>
|
|
3670
|
-
<svg
|
|
3671
|
-
class="size-5"
|
|
3672
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3673
|
-
width="24"
|
|
3674
|
-
height="24"
|
|
3675
|
-
fill="none"
|
|
3676
|
-
viewBox="0 0 24 24"
|
|
3677
|
-
>
|
|
3678
|
-
<path
|
|
3679
|
-
stroke="currentColor"
|
|
3680
|
-
stroke-linecap="round"
|
|
3681
|
-
stroke-linejoin="round"
|
|
3682
|
-
stroke-width="2"
|
|
3683
|
-
d="M3 15.5v3c0 .5523.44772 1 1 1h9.5M3 15.5v-4m0 4h9m-9-4v-5c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v5H3Zm5 0v8m4-8v8m7.0999-1.0999L21 16.5m0 0-1.9001-1.9001M21 16.5h-5"
|
|
3684
|
-
/>
|
|
3685
|
-
</svg>
|
|
3686
|
-
<span class="sr-only">Next cell</span>
|
|
3687
|
-
</button>
|
|
3688
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "component", type: ScSeparator, selector: "sc-separator", inputs: ["orientation", "class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
3689
|
-
}
|
|
3690
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensionTable, decorators: [{
|
|
3691
|
-
type: Component,
|
|
3692
|
-
args: [{ selector: 'sc-extension-table', imports: [ScTooltip, ScSeparator], template: `
|
|
3693
|
-
<button
|
|
3694
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3695
|
-
(click)="insertTable()"
|
|
3696
|
-
type="button"
|
|
3697
|
-
scTooltip="Add table"
|
|
3698
|
-
>
|
|
3699
|
-
<svg
|
|
3700
|
-
class="size-5"
|
|
3701
|
-
aria-hidden="true"
|
|
3702
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3703
|
-
width="24"
|
|
3704
|
-
height="24"
|
|
3705
|
-
fill="none"
|
|
3706
|
-
viewBox="0 0 24 24"
|
|
3707
|
-
>
|
|
3708
|
-
<path
|
|
3709
|
-
stroke="currentColor"
|
|
3710
|
-
stroke-linecap="round"
|
|
3711
|
-
stroke-linejoin="round"
|
|
3712
|
-
stroke-width="2"
|
|
3713
|
-
d="M3 15v3c0 .5523.44772 1 1 1h10.5M3 15v-4m0 4h11M3 11V6c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v5M3 11h18m0 0v1M8 11v8m4-8v8m4-8v2m1 4h2m0 0h2m-2 0v2m0-2v-2"
|
|
3714
|
-
/>
|
|
3715
|
-
</svg>
|
|
3716
|
-
<span class="sr-only">Add table</span>
|
|
3717
|
-
</button>
|
|
3718
|
-
|
|
3719
|
-
<button
|
|
3720
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3721
|
-
(click)="deleteTable()"
|
|
3722
|
-
type="button"
|
|
3723
|
-
scTooltip="Delete table"
|
|
3724
|
-
>
|
|
3725
|
-
<svg
|
|
3726
|
-
class="size-5"
|
|
3727
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3728
|
-
width="24"
|
|
3729
|
-
height="24"
|
|
3730
|
-
fill="none"
|
|
3731
|
-
viewBox="0 0 24 24"
|
|
3732
|
-
>
|
|
3733
|
-
<path
|
|
3734
|
-
stroke="currentColor"
|
|
3735
|
-
stroke-linecap="round"
|
|
3736
|
-
stroke-linejoin="round"
|
|
3737
|
-
stroke-width="2"
|
|
3738
|
-
d="M3 15.5v3c0 .5523.44772 1 1 1h10.5M3 15.5v-4m0 4h11m-11-4v-5c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v5m-18 0h18m0 0v1m-13-1v8m4-8v8m4-8v2m1.8956 5.9528 1.5047-1.5047m0 0 1.5048-1.5048m-1.5048 1.5048 1.4605 1.4604m-1.4605-1.4604-1.4604-1.4605"
|
|
3739
|
-
/>
|
|
3740
|
-
</svg>
|
|
3741
|
-
<span class="sr-only">Delete table</span>
|
|
3742
|
-
</button>
|
|
3743
|
-
|
|
3744
|
-
<sc-separator class="h5" orientation="vertical" />
|
|
3745
|
-
|
|
3746
|
-
<button
|
|
3747
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3748
|
-
(click)="addColumnBefore()"
|
|
3749
|
-
type="button"
|
|
3750
|
-
data-tooltip-target="tooltip-add-column-before"
|
|
3751
|
-
scTooltip="Add column before"
|
|
3752
|
-
>
|
|
3753
|
-
<svg
|
|
3754
|
-
class="size-5"
|
|
3755
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3756
|
-
width="24"
|
|
3757
|
-
height="24"
|
|
3758
|
-
fill="none"
|
|
3759
|
-
viewBox="0 0 24 24"
|
|
3760
|
-
>
|
|
3761
|
-
<path
|
|
3762
|
-
stroke="currentColor"
|
|
3763
|
-
stroke-linecap="round"
|
|
3764
|
-
stroke-linejoin="round"
|
|
3765
|
-
stroke-width="2"
|
|
3766
|
-
d="M15 5.5v14m-8-7h2m0 0h2m-2 0v2m0-2v-2m12 1h-6m6 4h-6m-11 4h16c.5523 0 1-.4477 1-1v-12c0-.55228-.4477-1-1-1H4c-.55228 0-1 .44772-1 1v12c0 .5523.44772 1 1 1Z"
|
|
3767
|
-
/>
|
|
3768
|
-
</svg>
|
|
3769
|
-
<span class="sr-only">Add column before</span>
|
|
3770
|
-
</button>
|
|
3771
|
-
|
|
3772
|
-
<button
|
|
3773
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3774
|
-
(click)="addColumnAfter()"
|
|
3775
|
-
type="button"
|
|
3776
|
-
data-tooltip-target="tooltip-add-column-after"
|
|
3777
|
-
scTooltip="Add column after"
|
|
3778
|
-
>
|
|
3779
|
-
<svg
|
|
3780
|
-
class="size-5"
|
|
3781
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3782
|
-
width="24"
|
|
3783
|
-
height="24"
|
|
3784
|
-
fill="none"
|
|
3785
|
-
viewBox="0 0 24 24"
|
|
3786
|
-
>
|
|
3787
|
-
<path
|
|
3788
|
-
stroke="currentColor"
|
|
3789
|
-
stroke-linecap="round"
|
|
3790
|
-
stroke-linejoin="round"
|
|
3791
|
-
stroke-width="2"
|
|
3792
|
-
d="M9 5.5v14m8-7h-2m0 0h-2m2 0v2m0-2v-2m-12 1h6m-6 4h6m11 4H4c-.55228 0-1-.4477-1-1v-12c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v12c0 .5523-.4477 1-1 1Z"
|
|
3793
|
-
/>
|
|
3794
|
-
</svg>
|
|
3795
|
-
<span class="sr-only">Add column after</span>
|
|
3796
|
-
</button>
|
|
3797
|
-
|
|
3798
|
-
<button
|
|
3799
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3800
|
-
(click)="deleteColumn()"
|
|
3801
|
-
type="button"
|
|
3802
|
-
data-tooltip-target="tooltip-remove-column"
|
|
3803
|
-
scTooltip="Remove column"
|
|
3804
|
-
>
|
|
3805
|
-
<svg
|
|
3806
|
-
class="size-5"
|
|
3807
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3808
|
-
width="24"
|
|
3809
|
-
height="24"
|
|
3810
|
-
fill="none"
|
|
3811
|
-
viewBox="0 0 24 24"
|
|
3812
|
-
>
|
|
3813
|
-
<path
|
|
3814
|
-
stroke="currentColor"
|
|
3815
|
-
stroke-linecap="round"
|
|
3816
|
-
stroke-linejoin="round"
|
|
3817
|
-
stroke-width="2"
|
|
3818
|
-
d="M9 5.5v14m-6-8h6m-6 4h6m4.5061-1.4939L15.0123 12.5m0 0 1.5061-1.5061M15.0123 12.5l1.5061 1.5061M15.0123 12.5l-1.5062-1.5061M20 19.5H4c-.55228 0-1-.4477-1-1v-12c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v12c0 .5523-.4477 1-1 1Z"
|
|
3819
|
-
/>
|
|
3820
|
-
</svg>
|
|
3821
|
-
<span class="sr-only">Remove column</span>
|
|
3822
|
-
</button>
|
|
3823
|
-
|
|
3824
|
-
<sc-separator class="h5" orientation="vertical" />
|
|
3825
|
-
|
|
3826
|
-
<button
|
|
3827
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3828
|
-
(click)="addRowBefore()"
|
|
3829
|
-
type="button"
|
|
3830
|
-
data-tooltip-target="tooltip-add-row-before"
|
|
3831
|
-
scTooltip="Add row before"
|
|
3832
|
-
>
|
|
3833
|
-
<svg
|
|
3834
|
-
class="size-5"
|
|
3835
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3836
|
-
width="24"
|
|
3837
|
-
height="24"
|
|
3838
|
-
fill="none"
|
|
3839
|
-
viewBox="0 0 24 24"
|
|
3840
|
-
>
|
|
3841
|
-
<path
|
|
3842
|
-
stroke="currentColor"
|
|
3843
|
-
stroke-linecap="round"
|
|
3844
|
-
stroke-linejoin="round"
|
|
3845
|
-
stroke-width="2"
|
|
3846
|
-
d="M3 15.5v3c0 .5523.44772 1 1 1h16c.5523 0 1-.4477 1-1v-3m-18 0v-9c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v9m-18 0h18m-13 0v4m4-4v4m4-4v4m-6-9h2m0 0h2m-2 0v2m0-2v-2"
|
|
3847
|
-
/>
|
|
3848
|
-
</svg>
|
|
3849
|
-
<span class="sr-only">Add row before</span>
|
|
3850
|
-
</button>
|
|
3851
|
-
|
|
3852
|
-
<button
|
|
3853
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3854
|
-
(click)="addRowAfter()"
|
|
3855
|
-
type="button"
|
|
3856
|
-
data-tooltip-target="tooltip-add-row-after"
|
|
3857
|
-
scTooltip="Add row after"
|
|
3858
|
-
>
|
|
3859
|
-
<svg
|
|
3860
|
-
class="size-5"
|
|
3861
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3862
|
-
width="24"
|
|
3863
|
-
height="24"
|
|
3864
|
-
fill="none"
|
|
3865
|
-
viewBox="0 0 24 24"
|
|
3866
|
-
>
|
|
3867
|
-
<path
|
|
3868
|
-
stroke="currentColor"
|
|
3869
|
-
stroke-linecap="round"
|
|
3870
|
-
stroke-linejoin="round"
|
|
3871
|
-
stroke-width="2"
|
|
3872
|
-
d="M3 9.5v-3c0-.55228.44772-1 1-1h16c.5523 0 1 .44771 1 1v3m-18 0v9c0 .5523.44772 1 1 1h16c.5523 0 1-.4477 1-1v-9m-18 0h18m-13 0v-4m4 4v-4m4 4v-4m-6 9h2m0 0h2m-2 0v-2m0 2v2"
|
|
3873
|
-
/>
|
|
3874
|
-
</svg>
|
|
3875
|
-
<span class="sr-only">Add row after</span>
|
|
3876
|
-
</button>
|
|
3877
|
-
|
|
3878
|
-
<button
|
|
3879
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3880
|
-
(click)="deleteRow()"
|
|
3881
|
-
type="button"
|
|
3882
|
-
data-tooltip-target="tooltip-remove-row"
|
|
3883
|
-
scTooltip="Remove row"
|
|
3884
|
-
>
|
|
3885
|
-
<svg
|
|
3886
|
-
class="size-5"
|
|
3887
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3888
|
-
width="24"
|
|
3889
|
-
height="24"
|
|
3890
|
-
fill="none"
|
|
3891
|
-
viewBox="0 0 24 24"
|
|
3892
|
-
>
|
|
3893
|
-
<path
|
|
3894
|
-
stroke="currentColor"
|
|
3895
|
-
stroke-linecap="round"
|
|
3896
|
-
stroke-linejoin="round"
|
|
3897
|
-
stroke-width="2"
|
|
3898
|
-
d="M3 15.5v3c0 .5523.44772 1 1 1h16c.5523 0 1-.4477 1-1v-3m-18 0v-9c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v9m-18 0h18m-13 0v4m4-4v4m4-4v4m-5.5061-7.4939L12 10.5m0 0 1.5061-1.50614M12 10.5l1.5061 1.5061M12 10.5l-1.5061-1.50614"
|
|
3899
|
-
/>
|
|
3900
|
-
</svg>
|
|
3901
|
-
<span class="sr-only">Remove row</span>
|
|
3902
|
-
</button>
|
|
3903
|
-
|
|
3904
|
-
<button
|
|
3905
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3906
|
-
(click)="mergeCells()"
|
|
3907
|
-
type="button"
|
|
3908
|
-
data-tooltip-target="tooltip-merge-cells"
|
|
3909
|
-
scTooltip="Merge cells"
|
|
3910
|
-
>
|
|
3911
|
-
<svg
|
|
3912
|
-
class="size-5"
|
|
3913
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3914
|
-
width="24"
|
|
3915
|
-
height="24"
|
|
3916
|
-
fill="none"
|
|
3917
|
-
viewBox="0 0 24 24"
|
|
3918
|
-
>
|
|
3919
|
-
<path
|
|
3920
|
-
stroke="currentColor"
|
|
3921
|
-
stroke-linecap="round"
|
|
3922
|
-
stroke-linejoin="round"
|
|
3923
|
-
stroke-width="2"
|
|
3924
|
-
d="M10 18.5v2H4v-16h6v2m4 12v2h6v-16h-6v2m-6.49543 8.4954L10 12.5m0 0-2.49543-2.4954M10 12.5H4.05191m12.50199 2.5539L14 12.5m0 0 2.5539-2.55392M14 12.5h5.8319"
|
|
3925
|
-
/>
|
|
3926
|
-
</svg>
|
|
3927
|
-
<span class="sr-only">Merge cells</span>
|
|
3928
|
-
</button>
|
|
3929
|
-
|
|
3930
|
-
<button
|
|
3931
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3932
|
-
(click)="splitCell()"
|
|
3933
|
-
type="button"
|
|
3934
|
-
data-tooltip-target="tooltip-split-cells"
|
|
3935
|
-
scTooltip="Split cells"
|
|
3936
|
-
>
|
|
3937
|
-
<svg
|
|
3938
|
-
class="size-5"
|
|
3939
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3940
|
-
width="24"
|
|
3941
|
-
height="24"
|
|
3942
|
-
fill="none"
|
|
3943
|
-
viewBox="0 0 24 24"
|
|
3944
|
-
>
|
|
3945
|
-
<path
|
|
3946
|
-
stroke="currentColor"
|
|
3947
|
-
stroke-linecap="round"
|
|
3948
|
-
stroke-linejoin="round"
|
|
3949
|
-
stroke-width="2"
|
|
3950
|
-
d="M4 18.5v2h6v-16H4v2m16 12v2h-6v-16h6v2M6.49545 14.9954 4.00003 12.5m0 0 2.49542-2.4954M4.00003 12.5h5.94809m7.49798 2.5539L20 12.5m0 0-2.5539-2.55392M20 12.5h-5.8319"
|
|
3951
|
-
/>
|
|
3952
|
-
</svg>
|
|
3953
|
-
<span class="sr-only">Split cells</span>
|
|
3954
|
-
</button>
|
|
3955
|
-
|
|
3956
|
-
<button
|
|
3957
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3958
|
-
(click)="mergeOrSplit()"
|
|
3959
|
-
type="button"
|
|
3960
|
-
data-tooltip-target="tooltip-merge-or-split"
|
|
3961
|
-
scTooltip="Merge or split"
|
|
3962
|
-
>
|
|
3963
|
-
<svg
|
|
3964
|
-
class="size-5"
|
|
3965
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3966
|
-
width="24"
|
|
3967
|
-
height="24"
|
|
3968
|
-
fill="none"
|
|
3969
|
-
viewBox="0 0 24 24"
|
|
3970
|
-
>
|
|
3971
|
-
<path
|
|
3972
|
-
stroke="currentColor"
|
|
3973
|
-
stroke-linecap="round"
|
|
3974
|
-
stroke-linejoin="round"
|
|
3975
|
-
stroke-width="2"
|
|
3976
|
-
d="M18.5045 14.9954 21 12.5m0 0-2.4955-2.4954M21 12.5h-5.9481m-9.49798 2.5539L3 12.5m0 0 2.55392-2.55392M3 12.5h5.83192m.16807 7v-14H15v14H8.99999Z"
|
|
3977
|
-
/>
|
|
3978
|
-
</svg>
|
|
3979
|
-
<span class="sr-only">Merge or split</span>
|
|
3980
|
-
</button>
|
|
3981
|
-
|
|
3982
|
-
<sc-separator class="h5" orientation="vertical" />
|
|
3983
|
-
|
|
3984
|
-
<button
|
|
3985
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
3986
|
-
(click)="toggleHeaderColumn()"
|
|
3987
|
-
type="button"
|
|
3988
|
-
data-tooltip-target="tooltip-toggle-header-column"
|
|
3989
|
-
scTooltip="Toggle header column"
|
|
3990
|
-
>
|
|
3991
|
-
<svg
|
|
3992
|
-
class="size-5"
|
|
3993
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3994
|
-
width="24"
|
|
3995
|
-
height="24"
|
|
3996
|
-
fill="none"
|
|
3997
|
-
viewBox="0 0 24 24"
|
|
3998
|
-
>
|
|
3999
|
-
<path
|
|
4000
|
-
stroke="currentColor"
|
|
4001
|
-
stroke-linecap="round"
|
|
4002
|
-
stroke-linejoin="round"
|
|
4003
|
-
stroke-width="2"
|
|
4004
|
-
d="M15 5.5v14m6-8h-6m6 4h-6m-9-3h1.99093M4 19.5h16c.5523 0 1-.4477 1-1v-12c0-.55228-.4477-1-1-1H4c-.55228 0-1 .44772-1 1v12c0 .5523.44772 1 1 1Zm8-7c0 1.1046-.8954 2-2 2-1.10457 0-2-.8954-2-2s.89543-2 2-2c1.1046 0 2 .8954 2 2Z"
|
|
4005
|
-
/>
|
|
4006
|
-
</svg>
|
|
4007
|
-
<span class="sr-only">Toggle header column</span>
|
|
4008
|
-
</button>
|
|
4009
|
-
|
|
4010
|
-
<button
|
|
4011
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
4012
|
-
(click)="toggleHeaderRow()"
|
|
4013
|
-
type="button"
|
|
4014
|
-
data-tooltip-target="tooltip-toggle-header-row"
|
|
4015
|
-
scTooltip="Toggle header row"
|
|
4016
|
-
>
|
|
4017
|
-
<svg
|
|
4018
|
-
class="size-5"
|
|
4019
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4020
|
-
width="24"
|
|
4021
|
-
height="24"
|
|
4022
|
-
fill="none"
|
|
4023
|
-
viewBox="0 0 24 24"
|
|
4024
|
-
>
|
|
4025
|
-
<path
|
|
4026
|
-
stroke="currentColor"
|
|
4027
|
-
stroke-linecap="round"
|
|
4028
|
-
stroke-linejoin="round"
|
|
4029
|
-
stroke-width="2"
|
|
4030
|
-
d="M3 15.5v3c0 .5523.44772 1 1 1h16c.5523 0 1-.4477 1-1v-3m-18 0v-9c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v9m-18 0h18m-13 0v4m4-4v4m4-4v4m-7-9h1.9909M15 10.5c0 1.1046-.8954 2-2 2s-2-.8954-2-2c0-1.10457.8954-2 2-2s2 .89543 2 2Z"
|
|
4031
|
-
/>
|
|
4032
|
-
</svg>
|
|
4033
|
-
<span class="sr-only">Toggle header row</span>
|
|
4034
|
-
</button>
|
|
4035
|
-
|
|
4036
|
-
<button
|
|
4037
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
4038
|
-
(click)="toggleHeaderCell()"
|
|
4039
|
-
type="button"
|
|
4040
|
-
data-tooltip-target="tooltip-toggle-header-cell"
|
|
4041
|
-
scTooltip="Toggle header cell"
|
|
4042
|
-
>
|
|
4043
|
-
<svg
|
|
4044
|
-
class="size-5"
|
|
4045
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4046
|
-
width="24"
|
|
4047
|
-
height="24"
|
|
4048
|
-
fill="none"
|
|
4049
|
-
viewBox="0 0 24 24"
|
|
4050
|
-
>
|
|
4051
|
-
<path
|
|
4052
|
-
stroke="currentColor"
|
|
4053
|
-
stroke-linecap="round"
|
|
4054
|
-
stroke-linejoin="round"
|
|
4055
|
-
stroke-width="2"
|
|
4056
|
-
d="M3 15.5v3c0 .5523.44772 1 1 1h16c.5523 0 1-.4477 1-1v-3m-18 0v-9c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v9m-18 0h18m-13 0v4m4-4v4m4-4v4m-7-9h1.9909M15 10.5c0 1.1046-.8954 2-2 2s-2-.8954-2-2c0-1.10457.8954-2 2-2s2 .89543 2 2Z"
|
|
4057
|
-
/>
|
|
4058
|
-
</svg>
|
|
4059
|
-
<span class="sr-only">Toggle header cell</span>
|
|
4060
|
-
</button>
|
|
4061
|
-
|
|
4062
|
-
<button
|
|
4063
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
4064
|
-
(click)="openDialog()"
|
|
4065
|
-
type="button"
|
|
4066
|
-
scTooltip="Add cell attribute"
|
|
4067
|
-
>
|
|
4068
|
-
<svg
|
|
4069
|
-
class="size-5"
|
|
4070
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4071
|
-
width="24"
|
|
4072
|
-
height="24"
|
|
4073
|
-
fill="none"
|
|
4074
|
-
viewBox="0 0 24 24"
|
|
4075
|
-
>
|
|
4076
|
-
<path
|
|
4077
|
-
stroke="currentColor"
|
|
4078
|
-
stroke-linecap="round"
|
|
4079
|
-
stroke-linejoin="round"
|
|
4080
|
-
stroke-width="2"
|
|
4081
|
-
d="M3 15.5v3c0 .5523.44772 1 1 1h8v-8m-9 4v-4m0 4h9m-9-4v-5c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v4m-18 1h11m6.25 5c0 1.2426-1.0073 2.25-2.25 2.25m2.25-2.25c0-1.2426-1.0073-2.25-2.25-2.25m2.25 2.25H21m-3 2.25c-1.2426 0-2.25-1.0074-2.25-2.25M18 18.75v.75m-2.25-3c0-1.2426 1.0074-2.25 2.25-2.25m-2.25 2.25H15m3-2.25v-.75m-1.591 1.409-.5303-.5303m4.2426 4.2426-.5303-.5303m-3.182 0-.5303.5303m4.2426-4.2426-.5303.5303"
|
|
4082
|
-
/>
|
|
4083
|
-
</svg>
|
|
4084
|
-
<span class="sr-only">Add cell attribute</span>
|
|
4085
|
-
</button>
|
|
4086
|
-
|
|
4087
|
-
<sc-separator class="h5" orientation="vertical" />
|
|
4088
|
-
|
|
4089
|
-
<button
|
|
4090
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
4091
|
-
(click)="fixTables()"
|
|
4092
|
-
type="button"
|
|
4093
|
-
data-tooltip-target="tooltip-fix-tables"
|
|
4094
|
-
scTooltip="Fix tables"
|
|
4095
|
-
>
|
|
4096
|
-
<svg
|
|
4097
|
-
class="size-5"
|
|
4098
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4099
|
-
width="24"
|
|
4100
|
-
height="24"
|
|
4101
|
-
fill="none"
|
|
4102
|
-
viewBox="0 0 24 24"
|
|
4103
|
-
>
|
|
4104
|
-
<path
|
|
4105
|
-
stroke="currentColor"
|
|
4106
|
-
stroke-linecap="round"
|
|
4107
|
-
stroke-linejoin="round"
|
|
4108
|
-
stroke-width="2"
|
|
4109
|
-
d="M3 15.5v3c0 .5523.44772 1 1 1h4v-4m-5 0v-4m0 4h5m-5-4v-5c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v1.98935M3 11.5h5v4m9.4708 4.1718-.8696-1.4388-2.8164-.235-2.573-4.2573 1.4873-2.8362 1.4441 2.3893c.3865.6396 1.2183.8447 1.8579.4582.6396-.3866.8447-1.2184.4582-1.858l-1.444-2.38925h3.1353l2.6101 4.27715-1.0713 2.5847.8695 1.4388"
|
|
4110
|
-
/>
|
|
4111
|
-
</svg>
|
|
4112
|
-
<span class="sr-only">Fix tables</span>
|
|
4113
|
-
</button>
|
|
4114
|
-
|
|
4115
|
-
<button
|
|
4116
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
4117
|
-
(click)="goToPreviousCell()"
|
|
4118
|
-
type="button"
|
|
4119
|
-
scTooltip="Previous cell"
|
|
4120
|
-
>
|
|
4121
|
-
<svg
|
|
4122
|
-
class="size-5"
|
|
4123
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4124
|
-
width="24"
|
|
4125
|
-
height="24"
|
|
4126
|
-
fill="none"
|
|
4127
|
-
viewBox="0 0 24 24"
|
|
4128
|
-
>
|
|
4129
|
-
<path
|
|
4130
|
-
stroke="currentColor"
|
|
4131
|
-
stroke-linecap="round"
|
|
4132
|
-
stroke-linejoin="round"
|
|
4133
|
-
stroke-width="2"
|
|
4134
|
-
d="M3 15.5v3c0 .5523.44772 1 1 1h9.5M3 15.5v-4m0 4h9m-9-4v-5c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v5H3Zm5 0v8m4-8v8m5.9001-1.0999L16 16.5m0 0 1.9001-1.9001M16 16.5h5"
|
|
4135
|
-
/>
|
|
4136
|
-
</svg>
|
|
4137
|
-
<span class="sr-only">Previous cell</span>
|
|
4138
|
-
</button>
|
|
4139
|
-
|
|
4140
|
-
<button
|
|
4141
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
4142
|
-
(click)="goToNextCell()"
|
|
4143
|
-
type="button"
|
|
4144
|
-
data-tooltip-target="tooltip-next-cell"
|
|
4145
|
-
scTooltip="Next cell"
|
|
4146
|
-
>
|
|
4147
|
-
<svg
|
|
4148
|
-
class="size-5"
|
|
4149
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4150
|
-
width="24"
|
|
4151
|
-
height="24"
|
|
4152
|
-
fill="none"
|
|
4153
|
-
viewBox="0 0 24 24"
|
|
4154
|
-
>
|
|
4155
|
-
<path
|
|
4156
|
-
stroke="currentColor"
|
|
4157
|
-
stroke-linecap="round"
|
|
4158
|
-
stroke-linejoin="round"
|
|
4159
|
-
stroke-width="2"
|
|
4160
|
-
d="M3 15.5v3c0 .5523.44772 1 1 1h9.5M3 15.5v-4m0 4h9m-9-4v-5c0-.55228.44772-1 1-1h16c.5523 0 1 .44772 1 1v5H3Zm5 0v8m4-8v8m7.0999-1.0999L21 16.5m0 0-1.9001-1.9001M21 16.5h-5"
|
|
4161
|
-
/>
|
|
4162
|
-
</svg>
|
|
4163
|
-
<span class="sr-only">Next cell</span>
|
|
4164
|
-
</button>
|
|
4165
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
4166
|
-
}], ctorParameters: () => [] });
|
|
4167
|
-
|
|
4168
|
-
class ScExtensionTextStyle {
|
|
4169
|
-
parent = inject(ScEditor);
|
|
4170
|
-
extensions = inject(ScExtensions);
|
|
4171
|
-
constructor() {
|
|
4172
|
-
this.extensions.textStyle.set(true);
|
|
4173
|
-
}
|
|
4174
|
-
get editor() {
|
|
4175
|
-
return this.parent.editor;
|
|
4176
|
-
}
|
|
4177
|
-
setTextSize(fontSize) {
|
|
4178
|
-
this.editor.chain().focus().setMark('textStyle', { fontSize }).run();
|
|
4179
|
-
}
|
|
4180
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensionTextStyle, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4181
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScExtensionTextStyle, isStandalone: true, selector: "sc-extension-text-style", ngImport: i0, template: `
|
|
4182
|
-
<button
|
|
4183
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
4184
|
-
[cdkMenuTriggerFor]="textSizeDropdown"
|
|
4185
|
-
type="button"
|
|
4186
|
-
scTooltip="Text size"
|
|
4187
|
-
>
|
|
4188
|
-
<svg
|
|
4189
|
-
class="size-5"
|
|
4190
|
-
aria-hidden="true"
|
|
4191
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4192
|
-
width="24"
|
|
4193
|
-
height="24"
|
|
4194
|
-
fill="none"
|
|
4195
|
-
viewBox="0 0 24 24"
|
|
4196
|
-
>
|
|
4197
|
-
<path
|
|
4198
|
-
stroke="currentColor"
|
|
4199
|
-
stroke-linecap="round"
|
|
4200
|
-
stroke-linejoin="round"
|
|
4201
|
-
stroke-width="2"
|
|
4202
|
-
d="M3 6.2V5h11v1.2M8 5v14m-3 0h6m2-6.8V11h8v1.2M17 11v8m-1.5 0h3"
|
|
4203
|
-
/>
|
|
4204
|
-
</svg>
|
|
4205
|
-
<span class="sr-only">Text size</span>
|
|
4206
|
-
</button>
|
|
4207
|
-
|
|
4208
|
-
<ng-template #textSizeDropdown>
|
|
4209
|
-
<div
|
|
4210
|
-
class="z-10 w-72 rounded bg-white p-2 shadow dark:bg-gray-700"
|
|
4211
|
-
id="textSizeDropdown"
|
|
4212
|
-
cdkMenu
|
|
4213
|
-
>
|
|
4214
|
-
<ul class="space-y-1 text-sm font-medium" aria-labelledby="setTextSizeButton">
|
|
4215
|
-
<li>
|
|
4216
|
-
<button
|
|
4217
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-base text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
4218
|
-
(cdkMenuItemTriggered)="setTextSize('16px')"
|
|
4219
|
-
data-text-size="16px"
|
|
4220
|
-
cdkMenuItem
|
|
4221
|
-
type="button"
|
|
4222
|
-
>
|
|
4223
|
-
16px (Default)
|
|
4224
|
-
</button>
|
|
4225
|
-
</li>
|
|
4226
|
-
<li>
|
|
4227
|
-
<button
|
|
4228
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-xs text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
4229
|
-
(cdkMenuItemTriggered)="setTextSize('12px')"
|
|
4230
|
-
data-text-size="12px"
|
|
4231
|
-
cdkMenuItem
|
|
4232
|
-
type="button"
|
|
4233
|
-
>
|
|
4234
|
-
12px (Tiny)
|
|
4235
|
-
</button>
|
|
4236
|
-
</li>
|
|
4237
|
-
<li>
|
|
4238
|
-
<button
|
|
4239
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
4240
|
-
(cdkMenuItemTriggered)="setTextSize('14px')"
|
|
4241
|
-
data-text-size="14px"
|
|
4242
|
-
cdkMenuItem
|
|
4243
|
-
type="button"
|
|
4244
|
-
>
|
|
4245
|
-
14px (Small)
|
|
4246
|
-
</button>
|
|
4247
|
-
</li>
|
|
4248
|
-
<li>
|
|
4249
|
-
<button
|
|
4250
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-lg text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
4251
|
-
(cdkMenuItemTriggered)="setTextSize('18px')"
|
|
4252
|
-
data-text-size="18px"
|
|
4253
|
-
cdkMenuItem
|
|
4254
|
-
type="button"
|
|
4255
|
-
>
|
|
4256
|
-
18px (Lead)
|
|
4257
|
-
</button>
|
|
4258
|
-
</li>
|
|
4259
|
-
<li>
|
|
4260
|
-
<button
|
|
4261
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-2xl text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
4262
|
-
(cdkMenuItemTriggered)="setTextSize('24px')"
|
|
4263
|
-
data-text-size="24px"
|
|
4264
|
-
cdkMenuItem
|
|
4265
|
-
type="button"
|
|
4266
|
-
>
|
|
4267
|
-
24px (Large)
|
|
4268
|
-
</button>
|
|
4269
|
-
</li>
|
|
4270
|
-
<li>
|
|
4271
|
-
<button
|
|
4272
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-4xl text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
4273
|
-
(cdkMenuItemTriggered)="setTextSize('36px')"
|
|
4274
|
-
data-text-size="36px"
|
|
4275
|
-
cdkMenuItem
|
|
4276
|
-
type="button"
|
|
4277
|
-
>
|
|
4278
|
-
36px (Huge)
|
|
4279
|
-
</button>
|
|
4280
|
-
</li>
|
|
4281
|
-
</ul>
|
|
4282
|
-
</div>
|
|
4283
|
-
</ng-template>
|
|
4284
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: CdkMenuTrigger, selector: "[cdkMenuTriggerFor]", inputs: ["cdkMenuTriggerFor", "cdkMenuPosition", "cdkMenuTriggerData"], outputs: ["cdkMenuOpened", "cdkMenuClosed"], exportAs: ["cdkMenuTriggerFor"] }, { kind: "directive", type: CdkMenu, selector: "[cdkMenu]", outputs: ["closed"], exportAs: ["cdkMenu"] }, { kind: "directive", type: CdkMenuItem, selector: "[cdkMenuItem]", inputs: ["cdkMenuItemDisabled", "cdkMenuitemTypeaheadLabel"], outputs: ["cdkMenuItemTriggered"], exportAs: ["cdkMenuItem"] }, { kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
4285
|
-
}
|
|
4286
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensionTextStyle, decorators: [{
|
|
4287
|
-
type: Component,
|
|
4288
|
-
args: [{ selector: 'sc-extension-text-style', imports: [CdkMenuTrigger, CdkMenu, CdkMenuItem, ScTooltip], template: `
|
|
4289
|
-
<button
|
|
4290
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
4291
|
-
[cdkMenuTriggerFor]="textSizeDropdown"
|
|
4292
|
-
type="button"
|
|
4293
|
-
scTooltip="Text size"
|
|
4294
|
-
>
|
|
4295
|
-
<svg
|
|
4296
|
-
class="size-5"
|
|
4297
|
-
aria-hidden="true"
|
|
4298
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4299
|
-
width="24"
|
|
4300
|
-
height="24"
|
|
4301
|
-
fill="none"
|
|
4302
|
-
viewBox="0 0 24 24"
|
|
4303
|
-
>
|
|
4304
|
-
<path
|
|
4305
|
-
stroke="currentColor"
|
|
4306
|
-
stroke-linecap="round"
|
|
4307
|
-
stroke-linejoin="round"
|
|
4308
|
-
stroke-width="2"
|
|
4309
|
-
d="M3 6.2V5h11v1.2M8 5v14m-3 0h6m2-6.8V11h8v1.2M17 11v8m-1.5 0h3"
|
|
4310
|
-
/>
|
|
4311
|
-
</svg>
|
|
4312
|
-
<span class="sr-only">Text size</span>
|
|
4313
|
-
</button>
|
|
4314
|
-
|
|
4315
|
-
<ng-template #textSizeDropdown>
|
|
4316
|
-
<div
|
|
4317
|
-
class="z-10 w-72 rounded bg-white p-2 shadow dark:bg-gray-700"
|
|
4318
|
-
id="textSizeDropdown"
|
|
4319
|
-
cdkMenu
|
|
4320
|
-
>
|
|
4321
|
-
<ul class="space-y-1 text-sm font-medium" aria-labelledby="setTextSizeButton">
|
|
4322
|
-
<li>
|
|
4323
|
-
<button
|
|
4324
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-base text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
4325
|
-
(cdkMenuItemTriggered)="setTextSize('16px')"
|
|
4326
|
-
data-text-size="16px"
|
|
4327
|
-
cdkMenuItem
|
|
4328
|
-
type="button"
|
|
4329
|
-
>
|
|
4330
|
-
16px (Default)
|
|
4331
|
-
</button>
|
|
4332
|
-
</li>
|
|
4333
|
-
<li>
|
|
4334
|
-
<button
|
|
4335
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-xs text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
4336
|
-
(cdkMenuItemTriggered)="setTextSize('12px')"
|
|
4337
|
-
data-text-size="12px"
|
|
4338
|
-
cdkMenuItem
|
|
4339
|
-
type="button"
|
|
4340
|
-
>
|
|
4341
|
-
12px (Tiny)
|
|
4342
|
-
</button>
|
|
4343
|
-
</li>
|
|
4344
|
-
<li>
|
|
4345
|
-
<button
|
|
4346
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
4347
|
-
(cdkMenuItemTriggered)="setTextSize('14px')"
|
|
4348
|
-
data-text-size="14px"
|
|
4349
|
-
cdkMenuItem
|
|
4350
|
-
type="button"
|
|
4351
|
-
>
|
|
4352
|
-
14px (Small)
|
|
4353
|
-
</button>
|
|
4354
|
-
</li>
|
|
4355
|
-
<li>
|
|
4356
|
-
<button
|
|
4357
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-lg text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
4358
|
-
(cdkMenuItemTriggered)="setTextSize('18px')"
|
|
4359
|
-
data-text-size="18px"
|
|
4360
|
-
cdkMenuItem
|
|
4361
|
-
type="button"
|
|
4362
|
-
>
|
|
4363
|
-
18px (Lead)
|
|
4364
|
-
</button>
|
|
4365
|
-
</li>
|
|
4366
|
-
<li>
|
|
4367
|
-
<button
|
|
4368
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-2xl text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
4369
|
-
(cdkMenuItemTriggered)="setTextSize('24px')"
|
|
4370
|
-
data-text-size="24px"
|
|
4371
|
-
cdkMenuItem
|
|
4372
|
-
type="button"
|
|
4373
|
-
>
|
|
4374
|
-
24px (Large)
|
|
4375
|
-
</button>
|
|
4376
|
-
</li>
|
|
4377
|
-
<li>
|
|
4378
|
-
<button
|
|
4379
|
-
class="flex w-full items-center justify-between rounded px-3 py-2 text-4xl text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600"
|
|
4380
|
-
(cdkMenuItemTriggered)="setTextSize('36px')"
|
|
4381
|
-
data-text-size="36px"
|
|
4382
|
-
cdkMenuItem
|
|
4383
|
-
type="button"
|
|
4384
|
-
>
|
|
4385
|
-
36px (Huge)
|
|
4386
|
-
</button>
|
|
4387
|
-
</li>
|
|
4388
|
-
</ul>
|
|
4389
|
-
</div>
|
|
4390
|
-
</ng-template>
|
|
4391
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
4392
|
-
}], ctorParameters: () => [] });
|
|
4393
|
-
|
|
4394
|
-
class ScAddVideoDialog {
|
|
4395
|
-
dialogRef = inject((DialogRef));
|
|
4396
|
-
videoForm = new FormGroup({
|
|
4397
|
-
url: new FormControl('https://www.youtube.com/watch?v=KaLxCiilHns', Validators.required),
|
|
4398
|
-
width: new FormControl(''),
|
|
4399
|
-
height: new FormControl(''),
|
|
4400
|
-
});
|
|
4401
|
-
get url() {
|
|
4402
|
-
return this.videoForm.get('url');
|
|
4403
|
-
}
|
|
4404
|
-
get width() {
|
|
4405
|
-
return this.videoForm.get('width');
|
|
4406
|
-
}
|
|
4407
|
-
get height() {
|
|
4408
|
-
return this.videoForm.get('height');
|
|
4409
|
-
}
|
|
4410
|
-
getVideoInfo() {
|
|
4411
|
-
return {
|
|
4412
|
-
url: this.url?.value,
|
|
4413
|
-
width: parseInt(this.width?.value ?? ''),
|
|
4414
|
-
height: parseInt(this.height?.value ?? ''),
|
|
4415
|
-
};
|
|
4416
|
-
}
|
|
4417
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScAddVideoDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4418
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScAddVideoDialog, isStandalone: true, selector: "sc-add-video-dialog", ngImport: i0, template: `
|
|
4419
|
-
<div
|
|
4420
|
-
class="z-50 h-[calc(100%-1rem)] max-h-full w-full items-center justify-center overflow-y-auto overflow-x-hidden md:inset-0"
|
|
4421
|
-
tabindex="-1"
|
|
4422
|
-
aria-hidden="true"
|
|
4423
|
-
>
|
|
4424
|
-
<div class="relative max-h-full w-full max-w-md p-4">
|
|
4425
|
-
<!-- Modal content -->
|
|
4426
|
-
<div class="relative rounded-lg bg-white shadow dark:bg-gray-700">
|
|
4427
|
-
<!-- Modal header -->
|
|
4428
|
-
<div
|
|
4429
|
-
class="flex items-center justify-between rounded-t border-b p-4 md:p-5 dark:border-gray-600"
|
|
4430
|
-
>
|
|
4431
|
-
<h3 class="text-xl font-semibold text-gray-900 dark:text-white">
|
|
4432
|
-
Insert advanced video
|
|
4433
|
-
</h3>
|
|
4434
|
-
<button
|
|
4435
|
-
class="end-2.5 ms-auto inline-flex size-8 items-center justify-center rounded-lg bg-transparent text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
4436
|
-
(click)="dialogRef.close()"
|
|
4437
|
-
type="button"
|
|
4438
|
-
>
|
|
4439
|
-
<svg
|
|
4440
|
-
class="size-3"
|
|
4441
|
-
aria-hidden="true"
|
|
4442
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4443
|
-
fill="none"
|
|
4444
|
-
viewBox="0 0 14 14"
|
|
4445
|
-
>
|
|
4446
|
-
<path
|
|
4447
|
-
stroke="currentColor"
|
|
4448
|
-
stroke-linecap="round"
|
|
4449
|
-
stroke-linejoin="round"
|
|
4450
|
-
stroke-width="2"
|
|
4451
|
-
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
|
|
4452
|
-
/>
|
|
4453
|
-
</svg>
|
|
4454
|
-
<span class="sr-only">Close modal</span>
|
|
4455
|
-
</button>
|
|
4456
|
-
</div>
|
|
4457
|
-
<!-- Modal body -->
|
|
4458
|
-
<div class="p-4 md:p-5">
|
|
4459
|
-
<form class="space-y-4" [formGroup]="videoForm">
|
|
4460
|
-
<div>
|
|
4461
|
-
<label
|
|
4462
|
-
class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
|
|
4463
|
-
for="URL"
|
|
4464
|
-
>
|
|
4465
|
-
YouTube URL
|
|
4466
|
-
</label>
|
|
4467
|
-
<input
|
|
4468
|
-
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder:text-gray-400"
|
|
4469
|
-
id="URL"
|
|
4470
|
-
type="url"
|
|
4471
|
-
name="url"
|
|
4472
|
-
formControlName="url"
|
|
4473
|
-
/>
|
|
4474
|
-
</div>
|
|
4475
|
-
<div class="grid grid-cols-2 gap-4">
|
|
4476
|
-
<div>
|
|
4477
|
-
<label
|
|
4478
|
-
class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
|
|
4479
|
-
for="width"
|
|
4480
|
-
>
|
|
4481
|
-
Video width
|
|
4482
|
-
</label>
|
|
4483
|
-
<input
|
|
4484
|
-
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder:text-gray-400"
|
|
4485
|
-
id="width"
|
|
4486
|
-
type="number"
|
|
4487
|
-
name="width"
|
|
4488
|
-
formControlName="width"
|
|
4489
|
-
/>
|
|
4490
|
-
</div>
|
|
4491
|
-
<div>
|
|
4492
|
-
<label
|
|
4493
|
-
class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
|
|
4494
|
-
for="height"
|
|
4495
|
-
>
|
|
4496
|
-
Video height
|
|
4497
|
-
</label>
|
|
4498
|
-
<input
|
|
4499
|
-
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder:text-gray-400"
|
|
4500
|
-
id="height"
|
|
4501
|
-
type="number"
|
|
4502
|
-
name="height"
|
|
4503
|
-
formControlName="height"
|
|
4504
|
-
/>
|
|
4505
|
-
</div>
|
|
4506
|
-
</div>
|
|
4507
|
-
<button
|
|
4508
|
-
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
|
|
4509
|
-
(click)="dialogRef.close(getVideoInfo())"
|
|
4510
|
-
>
|
|
4511
|
-
Add video
|
|
4512
|
-
</button>
|
|
4513
|
-
</form>
|
|
4514
|
-
</div>
|
|
4515
|
-
</div>
|
|
4516
|
-
</div>
|
|
4517
|
-
</div>
|
|
4518
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
4519
|
-
}
|
|
4520
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScAddVideoDialog, decorators: [{
|
|
4521
|
-
type: Component,
|
|
4522
|
-
args: [{ selector: 'sc-add-video-dialog', imports: [ReactiveFormsModule], template: `
|
|
4523
|
-
<div
|
|
4524
|
-
class="z-50 h-[calc(100%-1rem)] max-h-full w-full items-center justify-center overflow-y-auto overflow-x-hidden md:inset-0"
|
|
4525
|
-
tabindex="-1"
|
|
4526
|
-
aria-hidden="true"
|
|
4527
|
-
>
|
|
4528
|
-
<div class="relative max-h-full w-full max-w-md p-4">
|
|
4529
|
-
<!-- Modal content -->
|
|
4530
|
-
<div class="relative rounded-lg bg-white shadow dark:bg-gray-700">
|
|
4531
|
-
<!-- Modal header -->
|
|
4532
|
-
<div
|
|
4533
|
-
class="flex items-center justify-between rounded-t border-b p-4 md:p-5 dark:border-gray-600"
|
|
4534
|
-
>
|
|
4535
|
-
<h3 class="text-xl font-semibold text-gray-900 dark:text-white">
|
|
4536
|
-
Insert advanced video
|
|
4537
|
-
</h3>
|
|
4538
|
-
<button
|
|
4539
|
-
class="end-2.5 ms-auto inline-flex size-8 items-center justify-center rounded-lg bg-transparent text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
4540
|
-
(click)="dialogRef.close()"
|
|
4541
|
-
type="button"
|
|
4542
|
-
>
|
|
4543
|
-
<svg
|
|
4544
|
-
class="size-3"
|
|
4545
|
-
aria-hidden="true"
|
|
4546
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4547
|
-
fill="none"
|
|
4548
|
-
viewBox="0 0 14 14"
|
|
4549
|
-
>
|
|
4550
|
-
<path
|
|
4551
|
-
stroke="currentColor"
|
|
4552
|
-
stroke-linecap="round"
|
|
4553
|
-
stroke-linejoin="round"
|
|
4554
|
-
stroke-width="2"
|
|
4555
|
-
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
|
|
4556
|
-
/>
|
|
4557
|
-
</svg>
|
|
4558
|
-
<span class="sr-only">Close modal</span>
|
|
4559
|
-
</button>
|
|
4560
|
-
</div>
|
|
4561
|
-
<!-- Modal body -->
|
|
4562
|
-
<div class="p-4 md:p-5">
|
|
4563
|
-
<form class="space-y-4" [formGroup]="videoForm">
|
|
4564
|
-
<div>
|
|
4565
|
-
<label
|
|
4566
|
-
class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
|
|
4567
|
-
for="URL"
|
|
4568
|
-
>
|
|
4569
|
-
YouTube URL
|
|
4570
|
-
</label>
|
|
4571
|
-
<input
|
|
4572
|
-
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder:text-gray-400"
|
|
4573
|
-
id="URL"
|
|
4574
|
-
type="url"
|
|
4575
|
-
name="url"
|
|
4576
|
-
formControlName="url"
|
|
4577
|
-
/>
|
|
4578
|
-
</div>
|
|
4579
|
-
<div class="grid grid-cols-2 gap-4">
|
|
4580
|
-
<div>
|
|
4581
|
-
<label
|
|
4582
|
-
class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
|
|
4583
|
-
for="width"
|
|
4584
|
-
>
|
|
4585
|
-
Video width
|
|
4586
|
-
</label>
|
|
4587
|
-
<input
|
|
4588
|
-
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder:text-gray-400"
|
|
4589
|
-
id="width"
|
|
4590
|
-
type="number"
|
|
4591
|
-
name="width"
|
|
4592
|
-
formControlName="width"
|
|
4593
|
-
/>
|
|
4594
|
-
</div>
|
|
4595
|
-
<div>
|
|
4596
|
-
<label
|
|
4597
|
-
class="mb-2 block text-sm font-medium text-gray-900 dark:text-white"
|
|
4598
|
-
for="height"
|
|
4599
|
-
>
|
|
4600
|
-
Video height
|
|
4601
|
-
</label>
|
|
4602
|
-
<input
|
|
4603
|
-
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder:text-gray-400"
|
|
4604
|
-
id="height"
|
|
4605
|
-
type="number"
|
|
4606
|
-
name="height"
|
|
4607
|
-
formControlName="height"
|
|
4608
|
-
/>
|
|
4609
|
-
</div>
|
|
4610
|
-
</div>
|
|
4611
|
-
<button
|
|
4612
|
-
class="w-full rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
|
|
4613
|
-
(click)="dialogRef.close(getVideoInfo())"
|
|
4614
|
-
>
|
|
4615
|
-
Add video
|
|
4616
|
-
</button>
|
|
4617
|
-
</form>
|
|
4618
|
-
</div>
|
|
4619
|
-
</div>
|
|
4620
|
-
</div>
|
|
4621
|
-
</div>
|
|
4622
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
4623
|
-
}] });
|
|
4624
|
-
|
|
4625
|
-
class ScExtensionYoutube {
|
|
4626
|
-
parent = inject(ScEditor);
|
|
4627
|
-
dialog = inject(Dialog);
|
|
4628
|
-
extensions = inject(ScExtensions);
|
|
4629
|
-
constructor() {
|
|
4630
|
-
this.extensions.youtube.set(true);
|
|
4631
|
-
}
|
|
4632
|
-
get editor() {
|
|
4633
|
-
return this.parent.editor;
|
|
4634
|
-
}
|
|
4635
|
-
setYoutubeVideo(video) {
|
|
4636
|
-
if (video?.url) {
|
|
4637
|
-
this.editor.commands.setYoutubeVideo({
|
|
4638
|
-
src: video.url,
|
|
4639
|
-
width: video.width ? video.width : 640,
|
|
4640
|
-
height: video.height ? video.height : 480,
|
|
4641
|
-
});
|
|
4642
|
-
}
|
|
4643
|
-
}
|
|
4644
|
-
openDialog() {
|
|
4645
|
-
const dialogRef = this.dialog.open(ScAddVideoDialog, {
|
|
4646
|
-
minWidth: '600px',
|
|
4647
|
-
});
|
|
4648
|
-
dialogRef.closed.subscribe((result) => {
|
|
4649
|
-
this.setYoutubeVideo(result);
|
|
4650
|
-
});
|
|
4651
|
-
}
|
|
4652
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensionYoutube, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4653
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: ScExtensionYoutube, isStandalone: true, selector: "sc-extension-youtube", ngImport: i0, template: `
|
|
4654
|
-
<button
|
|
4655
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
4656
|
-
(click)="openDialog()"
|
|
4657
|
-
type="button"
|
|
4658
|
-
scTooltip="Add video"
|
|
4659
|
-
>
|
|
4660
|
-
<svg
|
|
4661
|
-
class="size-5"
|
|
4662
|
-
aria-hidden="true"
|
|
4663
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4664
|
-
width="24"
|
|
4665
|
-
height="24"
|
|
4666
|
-
fill="currentColor"
|
|
4667
|
-
viewBox="0 0 24 24"
|
|
4668
|
-
>
|
|
4669
|
-
<path
|
|
4670
|
-
fill-rule="evenodd"
|
|
4671
|
-
d="M9 7V2.221a2 2 0 0 0-.5.365L4.586 6.5a2 2 0 0 0-.365.5H9Zm2 0V2h7a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9h5a2 2 0 0 0 2-2Zm-2 4a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2H9Zm0 2h2v2H9v-2Zm7.965-.557a1 1 0 0 0-1.692-.72l-1.268 1.218a1 1 0 0 0-.308.721v.733a1 1 0 0 0 .37.776l1.267 1.032a1 1 0 0 0 1.631-.776v-2.984Z"
|
|
4672
|
-
clip-rule="evenodd"
|
|
4673
|
-
/>
|
|
4674
|
-
</svg>
|
|
4675
|
-
<span class="sr-only">Add video</span>
|
|
4676
|
-
</button>
|
|
4677
|
-
|
|
4678
|
-
<button type="button" sc-toggle variant="outline">
|
|
4679
|
-
<svg si-file-video-icon></svg>
|
|
4680
|
-
</button>
|
|
4681
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: ScTooltip, selector: "[scTooltip]", inputs: ["scTooltip", "position"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: ScToggle, selector: "button[sc-toggle]" }, { kind: "component", type: SiFileVideoIcon, selector: "svg[si-file-video-icon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
4682
|
-
}
|
|
4683
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: ScExtensionYoutube, decorators: [{
|
|
4684
|
-
type: Component,
|
|
4685
|
-
args: [{ selector: 'sc-extension-youtube', imports: [ScTooltip, DialogModule, ScToggle, SiFileVideoIcon], template: `
|
|
4686
|
-
<button
|
|
4687
|
-
class="cursor-pointer rounded p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
4688
|
-
(click)="openDialog()"
|
|
4689
|
-
type="button"
|
|
4690
|
-
scTooltip="Add video"
|
|
4691
|
-
>
|
|
4692
|
-
<svg
|
|
4693
|
-
class="size-5"
|
|
4694
|
-
aria-hidden="true"
|
|
4695
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4696
|
-
width="24"
|
|
4697
|
-
height="24"
|
|
4698
|
-
fill="currentColor"
|
|
4699
|
-
viewBox="0 0 24 24"
|
|
4700
|
-
>
|
|
4701
|
-
<path
|
|
4702
|
-
fill-rule="evenodd"
|
|
4703
|
-
d="M9 7V2.221a2 2 0 0 0-.5.365L4.586 6.5a2 2 0 0 0-.365.5H9Zm2 0V2h7a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9h5a2 2 0 0 0 2-2Zm-2 4a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2H9Zm0 2h2v2H9v-2Zm7.965-.557a1 1 0 0 0-1.692-.72l-1.268 1.218a1 1 0 0 0-.308.721v.733a1 1 0 0 0 .37.776l1.267 1.032a1 1 0 0 0 1.631-.776v-2.984Z"
|
|
4704
|
-
clip-rule="evenodd"
|
|
4705
|
-
/>
|
|
4706
|
-
</svg>
|
|
4707
|
-
<span class="sr-only">Add video</span>
|
|
4708
|
-
</button>
|
|
4709
|
-
|
|
4710
|
-
<button type="button" sc-toggle variant="outline">
|
|
4711
|
-
<svg si-file-video-icon></svg>
|
|
4712
|
-
</button>
|
|
4713
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
4714
|
-
}], ctorParameters: () => [] });
|
|
4715
|
-
|
|
4716
|
-
/**
|
|
4717
|
-
* Generated bundle index. Do not edit.
|
|
4718
|
-
*/
|
|
4719
|
-
|
|
4720
|
-
export { ScEditor, ScEditorBlockquote, ScEditorBold, ScEditorBulletList, ScEditorCode, ScEditorContent, ScEditorGroup, ScEditorHighlight, ScEditorHorizontalRule, ScEditorItalic, ScEditorOrderedList, ScEditorParagraph, ScEditorRedo, ScEditorStrike, ScEditorTextAlignCenter, ScEditorTextAlignLeft, ScEditorTextAlignRight, ScEditorToolbar, ScEditorUnderline, ScEditorUndo, ScEditorUnsetLink, ScExtensionColor, ScExtensionFontFamily, ScExtensionHeading, ScExtensionImage, ScExtensionLink, ScExtensionTable, ScExtensionTextStyle, ScExtensionYoutube };
|
|
4721
|
-
//# sourceMappingURL=semantic-components-editor.mjs.map
|