@nanahoshi/mona-ui 0.1.0 → 0.2.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/auto-complete/package.json +4 -0
- package/avatar/package.json +4 -0
- package/breadcrumb/package.json +4 -0
- package/button/package.json +4 -0
- package/button-group/package.json +4 -0
- package/calendar/package.json +4 -0
- package/check-box/package.json +4 -0
- package/chip/package.json +4 -0
- package/circular-progress-bar/package.json +4 -0
- package/color-gradient/package.json +4 -0
- package/color-palette/package.json +4 -0
- package/color-picker/package.json +4 -0
- package/combo-box/package.json +4 -0
- package/common/package.json +4 -0
- package/contextmenu/package.json +4 -0
- package/date-input/package.json +4 -0
- package/date-picker/package.json +4 -0
- package/datetime-picker/package.json +4 -0
- package/dialog/package.json +4 -0
- package/dropdown-button/package.json +4 -0
- package/dropdown-list/package.json +4 -0
- package/dropdowns/package.json +4 -0
- package/editor/package.json +4 -0
- package/expansion-panel/package.json +4 -0
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +40 -55
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +24 -58
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +37 -48
- package/fesm2022/nanahoshi-mona-ui-button.mjs +130 -129
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +69 -165
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +81 -128
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +102 -112
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +11 -25
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +41 -92
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +27 -49
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +64 -65
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +39 -61
- package/fesm2022/nanahoshi-mona-ui-date-input.mjs +12 -15
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +44 -33
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +58 -60
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +52 -165
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +36 -59
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +56 -61
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +302 -81
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +33 -84
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +12 -45
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +18 -48
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-B9SQH5N-.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-B6FBLtrr.mjs} +14 -14
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DlLwcCFT.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-OJe4UYuw.mjs} +4 -8
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-DCd8K6ng.mjs +121 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-DIUutx9s.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-Dl8Hlkhj.mjs} +26 -55
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-C5FRZlvv.mjs +231 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C3eZIaJK.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs} +167 -451
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +10 -28
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +57 -87
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +48 -139
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +29 -1
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +10 -32
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +8 -21
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +50 -156
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +40 -69
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +32 -116
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +81 -107
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +33 -85
- package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +12 -34
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +31 -52
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +38 -110
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +4 -4
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +21 -62
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +66 -111
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +60 -151
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +117 -173
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +32 -45
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +29 -64
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +38 -101
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +58 -79
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +42 -118
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +29 -37
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +60 -81
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +1111 -269
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +45 -39
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +45 -109
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +54 -82
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-window.mjs +35 -115
- package/fieldset/package.json +4 -0
- package/filter/package.json +4 -0
- package/grid/package.json +4 -0
- package/internal/filter-input/package.json +4 -0
- package/internal/indicator-icon/package.json +4 -0
- package/internal/list/package.json +4 -0
- package/internal/package.json +4 -0
- package/internal/tree/package.json +4 -0
- package/list/package.json +4 -0
- package/list-box/package.json +4 -0
- package/list-view/package.json +4 -0
- package/menubar/package.json +4 -0
- package/multi-select/package.json +4 -0
- package/notification/package.json +4 -0
- package/numeric-text-box/package.json +4 -0
- package/package.json +31 -5
- package/pager/package.json +4 -0
- package/placeholder/package.json +4 -0
- package/popover/package.json +4 -0
- package/popup/package.json +4 -0
- package/popup-menu/package.json +4 -0
- package/progress-bar/package.json +4 -0
- package/query/package.json +4 -0
- package/radio-button/package.json +4 -0
- package/scroll-view/package.json +4 -0
- package/slider/package.json +4 -0
- package/split-button/package.json +4 -0
- package/splitter/package.json +4 -0
- package/stepper/package.json +4 -0
- package/switch/package.json +4 -0
- package/tabs/package.json +4 -0
- package/text-area/package.json +4 -0
- package/text-box/package.json +4 -0
- package/theme/package.json +4 -0
- package/time-picker/package.json +4 -0
- package/time-selector/package.json +4 -0
- package/tooltip/package.json +4 -0
- package/tree-view/package.json +4 -0
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +6 -7
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +4 -6
- package/types/nanahoshi-mona-ui-button-group.d.ts +2 -3
- package/types/nanahoshi-mona-ui-button.d.ts +6 -6
- package/types/nanahoshi-mona-ui-calendar.d.ts +21 -22
- package/types/nanahoshi-mona-ui-check-box.d.ts +6 -9
- package/types/nanahoshi-mona-ui-chip.d.ts +2 -3
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +2 -4
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +10 -11
- package/types/nanahoshi-mona-ui-color-palette.d.ts +4 -5
- package/types/nanahoshi-mona-ui-color-picker.d.ts +6 -8
- package/types/nanahoshi-mona-ui-combo-box.d.ts +6 -7
- package/types/nanahoshi-mona-ui-date-input.d.ts +2 -3
- package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -3
- package/types/nanahoshi-mona-ui-dialog.d.ts +7 -8
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +6 -7
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +2 -3
- package/types/nanahoshi-mona-ui-editor.d.ts +17 -17
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +8 -10
- package/types/nanahoshi-mona-ui-fieldset.d.ts +6 -8
- package/types/nanahoshi-mona-ui-filter.d.ts +3 -4
- package/types/nanahoshi-mona-ui-grid.d.ts +16 -17
- package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +0 -1
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +16 -16
- package/types/nanahoshi-mona-ui-internal.d.ts +8 -1
- package/types/nanahoshi-mona-ui-list-box.d.ts +4 -5
- package/types/nanahoshi-mona-ui-list-view.d.ts +2 -3
- package/types/nanahoshi-mona-ui-menubar.d.ts +7 -8
- package/types/nanahoshi-mona-ui-multi-select.d.ts +8 -9
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +2 -3
- package/types/nanahoshi-mona-ui-pager.d.ts +6 -7
- package/types/nanahoshi-mona-ui-placeholder.d.ts +4 -6
- package/types/nanahoshi-mona-ui-popover.d.ts +8 -9
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +12 -13
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +8 -9
- package/types/nanahoshi-mona-ui-radio-button.d.ts +8 -11
- package/types/nanahoshi-mona-ui-scroll-view.d.ts +18 -20
- package/types/nanahoshi-mona-ui-slider.d.ts +18 -18
- package/types/nanahoshi-mona-ui-split-button.d.ts +2 -3
- package/types/nanahoshi-mona-ui-splitter.d.ts +6 -8
- package/types/nanahoshi-mona-ui-stepper.d.ts +13 -14
- package/types/nanahoshi-mona-ui-switch.d.ts +6 -7
- package/types/nanahoshi-mona-ui-tabs.d.ts +15 -17
- package/types/nanahoshi-mona-ui-text-area.d.ts +2 -4
- package/types/nanahoshi-mona-ui-text-box.d.ts +4 -6
- package/types/nanahoshi-mona-ui-theme.d.ts +111 -12
- package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -3
- package/types/nanahoshi-mona-ui-time-selector.d.ts +10 -11
- package/types/nanahoshi-mona-ui-tooltip.d.ts +4 -5
- package/types/nanahoshi-mona-ui-window.d.ts +16 -17
- package/window/package.json +4 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-Dgea-O0X.mjs +0 -130
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DRHycGIh.mjs +0 -240
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, Injectable, computed, inject, Component, DOCUMENT, output,
|
|
3
|
-
import
|
|
4
|
-
import { FormsModule
|
|
2
|
+
import { signal, Injectable, computed, inject, Component, DOCUMENT, output, viewChild, DestroyRef, input, effect, untracked, afterNextRender } from '@angular/core';
|
|
3
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { FormsModule } from '@angular/forms';
|
|
5
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
6
|
import { ImmutableSet, any, List } from '@mirei/ts-collections';
|
|
6
7
|
import { Extension, Editor } from '@tiptap/core';
|
|
7
8
|
import { Color } from '@tiptap/extension-color';
|
|
@@ -23,12 +24,14 @@ import { StarterKit } from '@tiptap/starter-kit';
|
|
|
23
24
|
import { Subject } from 'rxjs';
|
|
24
25
|
import { Image } from '@tiptap/extension-image';
|
|
25
26
|
import { TextSelection, AllSelection } from '@tiptap/pm/state';
|
|
27
|
+
import { cva } from 'class-variance-authority';
|
|
26
28
|
import { ButtonDirective } from '@nanahoshi/mona-ui/button';
|
|
27
29
|
import { ButtonGroupComponent } from '@nanahoshi/mona-ui/button-group';
|
|
28
30
|
import { ColorPickerComponent, ColorPickerValueTemplateDirective } from '@nanahoshi/mona-ui/color-picker';
|
|
29
31
|
import { DropdownListComponent } from '@nanahoshi/mona-ui/dropdown-list';
|
|
30
32
|
import { DropdownItemTemplateDirective } from '@nanahoshi/mona-ui/dropdowns';
|
|
31
|
-
import { WindowComponent } from '@nanahoshi/mona-ui/window';
|
|
33
|
+
import { WindowComponent, WindowContentTemplateDirective } from '@nanahoshi/mona-ui/window';
|
|
34
|
+
import { form, required, maxLength, FormRoot, FormField } from '@angular/forms/signals';
|
|
32
35
|
import { NumericTextBoxComponent } from '@nanahoshi/mona-ui/numeric-text-box';
|
|
33
36
|
import { TextBoxComponent } from '@nanahoshi/mona-ui/text-box';
|
|
34
37
|
import { DialogService } from '@nanahoshi/mona-ui/dialog';
|
|
@@ -449,6 +452,148 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
449
452
|
type: Injectable
|
|
450
453
|
}] });
|
|
451
454
|
|
|
455
|
+
const editorBaseThemeVariants = cva(`
|
|
456
|
+
flex flex-col
|
|
457
|
+
bg-surface text-foreground
|
|
458
|
+
border border-border
|
|
459
|
+
transition-[border-color,box-shadow] duration-150 ease-in
|
|
460
|
+
focus-within:border-focus-indicator
|
|
461
|
+
focus-within:ring-2 focus-within:ring-focus-indicator/35
|
|
462
|
+
|
|
463
|
+
prose prose-neutral max-w-none
|
|
464
|
+
prose-headings:text-foreground prose-headings:font-bold
|
|
465
|
+
prose-headings:mt-1 prose-headings:mb-1
|
|
466
|
+
prose-p:text-foreground prose-p:my-1
|
|
467
|
+
prose-strong:text-foreground
|
|
468
|
+
prose-a:text-primary
|
|
469
|
+
|
|
470
|
+
[&_ol]:ps-8 [&_ul]:ps-8
|
|
471
|
+
|
|
472
|
+
[&_blockquote]:border-l-4
|
|
473
|
+
[&_blockquote]:border-l-solid
|
|
474
|
+
[&_blockquote]:border-l-border-control-hover
|
|
475
|
+
[&_blockquote]:px-4 [&_blockquote]:py-2
|
|
476
|
+
[&_blockquote]:ms-4
|
|
477
|
+
[&_blockquote]:bg-surface-muted
|
|
478
|
+
|
|
479
|
+
[&_hr]:my-1 [&_hr]:bg-border-subtle
|
|
480
|
+
[&_hr]:border [&_hr]:border-border-subtle
|
|
481
|
+
|
|
482
|
+
[&_ul[data-type='taskList']_li]:flex
|
|
483
|
+
[&_ul[data-type='taskList']_li]:py-0.5
|
|
484
|
+
[&_ul[data-type='taskList']_li>label]:grow-0
|
|
485
|
+
[&_ul[data-type='taskList']_li>label]:shrink-0
|
|
486
|
+
[&_ul[data-type='taskList']_li>label]:basis-auto
|
|
487
|
+
[&_ul[data-type='taskList']_li>div]:grow-1
|
|
488
|
+
[&_ul[data-type='taskList']_li>div]:shrink-1
|
|
489
|
+
[&_ul[data-type='taskList']_li>div]:basis-auto
|
|
490
|
+
[&_ul[data-type='taskList']_input[type='checkbox']]:me-2!
|
|
491
|
+
|
|
492
|
+
[&_img]:max-w-full
|
|
493
|
+
[&_img]:h-auto
|
|
494
|
+
[&_img.ProseMirror-selectednode]:outline-3
|
|
495
|
+
[&_img.ProseMirror-selectednode]:outline-focus-indicator
|
|
496
|
+
|
|
497
|
+
[&_pre]:bg-surface-muted
|
|
498
|
+
[&_pre]:border [&_pre]:border-border-subtle
|
|
499
|
+
[&_pre]:whitespace-pre-wrap
|
|
500
|
+
[&_pre]:font-mono
|
|
501
|
+
[&_pre_code]:p-0
|
|
502
|
+
[&_pre_code]:text-sm
|
|
503
|
+
[&_pre_code]:bg-none
|
|
504
|
+
|
|
505
|
+
[&.ProseMirror-gapcursor]:after:border-foreground!
|
|
506
|
+
|
|
507
|
+
[&_table]:border-collapse
|
|
508
|
+
[&_table]:m-0
|
|
509
|
+
[&_table]:overflow-hidden
|
|
510
|
+
[&_table]:table-fixed
|
|
511
|
+
[&_table]:w-full
|
|
512
|
+
[&_table_td]:border [&_table_td]:border-border-subtle
|
|
513
|
+
[&_table_td]:p-2 [&_table_td]:align-top [&_table_td]:relative
|
|
514
|
+
[&_table_th]:border [&_table_th]:border-border-subtle
|
|
515
|
+
[&_table_th]:p-2 [&_table_th]:align-top [&_table_th]:relative
|
|
516
|
+
|
|
517
|
+
[&_table_th]:bg-surface-muted [&_table_th]:text-foreground [&_table_th]:font-bold
|
|
518
|
+
|
|
519
|
+
[&_.selectedCell]:after:content-[''] [&_.selectedCell]:after:absolute [&_.selectedCell]:after:inset-0
|
|
520
|
+
[&_.selectedCell]:after:pointer-events-none
|
|
521
|
+
[&_.selectedCell]:after:z-2
|
|
522
|
+
[&_.selectedCell]:after:bg-active/70
|
|
523
|
+
|
|
524
|
+
[&_.column-resize-handle]:absolute
|
|
525
|
+
[&_.column-resize-handle]:bg-focus-indicator
|
|
526
|
+
[&_.column-resize-handle]:w-1
|
|
527
|
+
[&_.column-resize-handle]:pointer-events-none
|
|
528
|
+
[&_.column-resize-handle]:top-0
|
|
529
|
+
[&_.column-resize-handle]:-bottom-0.5
|
|
530
|
+
[&_.column-resize-handle]:-right-0.5
|
|
531
|
+
|
|
532
|
+
[&_.ProseMirror.resize-cursor]:cursor-ew-resize
|
|
533
|
+
|
|
534
|
+
`);
|
|
535
|
+
const editorContainerThemeVariants = cva(`
|
|
536
|
+
h-full w-full bg-surface
|
|
537
|
+
[&_div:first-child[contenteditable='true']]:p-1.5
|
|
538
|
+
[&_div:first-child[contenteditable='true']]:text-foreground
|
|
539
|
+
[&_div:first-child[contenteditable='true']]:border-none
|
|
540
|
+
[&_div:first-child[contenteditable='true']]:outline-none
|
|
541
|
+
[&_div:first-child[contenteditable='true']]:w-full
|
|
542
|
+
[&_div:first-child[contenteditable='true']]:h-full
|
|
543
|
+
[&_div:first-child[contenteditable='true']]:overflow-auto
|
|
544
|
+
[&_div:first-child[contenteditable='true']]:resize-none
|
|
545
|
+
[&_div:first-child[contenteditable='true']]:[scrollbar-color:var(--color-scrollbar-thumb)_var(--color-scrollbar-track)]
|
|
546
|
+
[&_div:first-child[contenteditable='true']]:[scrollbar-width:thin]
|
|
547
|
+
`);
|
|
548
|
+
const editorFontColorPreviewThemeVariants = cva(`
|
|
549
|
+
w-full flex h-[2px]
|
|
550
|
+
`);
|
|
551
|
+
const editorFontColorValueThemeVariants = cva(`
|
|
552
|
+
flex flex-col items-center justify-center
|
|
553
|
+
gap-0.5 ps-1.25 text-sm
|
|
554
|
+
`);
|
|
555
|
+
const editorFontFamilyDropdownListThemeVariants = cva(`
|
|
556
|
+
w-[12em]
|
|
557
|
+
`);
|
|
558
|
+
const editorFontHighlightPreviewThemeVariants = cva(`
|
|
559
|
+
w-full flex h-[2px]
|
|
560
|
+
`);
|
|
561
|
+
const editorFontHighlightValueThemeVariants = cva(`
|
|
562
|
+
flex flex-col items-center justify-center
|
|
563
|
+
gap-0.5 ps-1.25 text-sm
|
|
564
|
+
`);
|
|
565
|
+
const editorFontSizeDropdownListThemeVariants = cva(`
|
|
566
|
+
w-[8em]
|
|
567
|
+
`);
|
|
568
|
+
const editorHeadingsDropdownListThemeVariants = cva(`
|
|
569
|
+
w-[14em]
|
|
570
|
+
`);
|
|
571
|
+
const editorImageInserterActionsThemeVariants = cva(`
|
|
572
|
+
flex justify-end gap-1 px-2 py-1
|
|
573
|
+
bg-surface-muted
|
|
574
|
+
border-t border-t-border-subtle
|
|
575
|
+
`);
|
|
576
|
+
const editorImageInserterFormThemeVariants = cva(`
|
|
577
|
+
flex flex-col gap-1.5 pt-2
|
|
578
|
+
`);
|
|
579
|
+
const editorImageInserterRowLabelThemeVariants = cva(`
|
|
580
|
+
mb-0.5 ps-0.5 text-sm font-semibold
|
|
581
|
+
`);
|
|
582
|
+
const editorImageInserterRowThemeVariants = cva(`
|
|
583
|
+
flex flex-col justify-center px-2
|
|
584
|
+
`);
|
|
585
|
+
const editorTableCreatorThemeVariants = cva(`
|
|
586
|
+
grid grid-cols-8 gap-0.5 p-1
|
|
587
|
+
`);
|
|
588
|
+
const editorTableCreatorCellThemeVariants = cva(`
|
|
589
|
+
flex h-6 w-6
|
|
590
|
+
bg-input-background border border-input-border
|
|
591
|
+
`);
|
|
592
|
+
const editorToolbarThemeVariants = cva(`
|
|
593
|
+
flex flex-wrap items-center justify-start gap-1 p-1
|
|
594
|
+
bg-surface-muted text-foreground border-b border-b-border-subtle
|
|
595
|
+
`);
|
|
596
|
+
|
|
452
597
|
class EditorBasicTextStylesComponent {
|
|
453
598
|
constructor() {
|
|
454
599
|
this.anyToolVisible = computed(() => {
|
|
@@ -565,11 +710,11 @@ class EditorBasicTextStylesComponent {
|
|
|
565
710
|
}
|
|
566
711
|
}
|
|
567
712
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorBasicTextStylesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
568
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: EditorBasicTextStylesComponent, isStandalone: true, selector: "mona-editor-basic-text-styles", ngImport: i0, template: "@if (anyToolVisible()) {\n <mona-button-group selection=\"multiple\">\n @if (boldVisible()) {\n <button monaButton [selected]=\"boldSelected()\" (click)=\"onBoldToggle()\" title=\"Bold\">\n <i class=\"ri-bold\"></i>\n </button>\n }\n @if (italicVisible()) {\n <button
|
|
713
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: EditorBasicTextStylesComponent, isStandalone: true, selector: "mona-editor-basic-text-styles", ngImport: i0, template: "@if (anyToolVisible()) {\n <mona-button-group selection=\"multiple\" [size]=\"'small'\">\n @if (boldVisible()) {\n <button monaButton [selected]=\"boldSelected()\" [toggleable]=\"false\" (click)=\"onBoldToggle()\" title=\"Bold\">\n <i class=\"ri-bold\"></i>\n </button>\n }\n @if (italicVisible()) {\n <button\n monaButton\n [selected]=\"italicSelected()\"\n [toggleable]=\"false\"\n (click)=\"onItalicToggle()\"\n title=\"Italic\">\n <i class=\"ri-italic\"></i>\n </button>\n }\n @if (underlineVisible()) {\n <button\n monaButton\n [selected]=\"underlineSelected()\"\n [toggleable]=\"false\"\n (click)=\"onUnderlineToggle()\"\n title=\"Underline\">\n <i class=\"ri-underline\"></i>\n </button>\n }\n @if (strikeThroughVisible()) {\n <button\n monaButton\n [selected]=\"strikeThroughSelected()\"\n [toggleable]=\"false\"\n (click)=\"onStrikeThroughToggle()\"\n title=\"Strikethrough\">\n <i class=\"ri-strikethrough\"></i>\n </button>\n }\n @if (subscriptVisible()) {\n <button\n monaButton\n [selected]=\"subscriptSelected()\"\n [toggleable]=\"false\"\n (click)=\"onSubscriptToggle()\"\n title=\"Subscript\">\n <i class=\"ri-subscript\"></i>\n </button>\n }\n @if (superscriptVisible()) {\n <button\n monaButton\n [selected]=\"superscriptSelected()\"\n [toggleable]=\"false\"\n (click)=\"onSuperscriptToggle()\"\n title=\"Superscript\">\n <i class=\"ri-superscript\"></i>\n </button>\n }\n </mona-button-group>\n}\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: ButtonGroupComponent, selector: "mona-button-group", inputs: ["allowEmpty", "aria-label", "disabled", "look", "rounded", "selection", "size", "class"], outputs: ["buttonClick", "disabledChange", "selectionChange"] }] }); }
|
|
569
714
|
}
|
|
570
715
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorBasicTextStylesComponent, decorators: [{
|
|
571
716
|
type: Component,
|
|
572
|
-
args: [{ selector: "mona-editor-basic-text-styles", imports: [ButtonDirective, ButtonGroupComponent], template: "@if (anyToolVisible()) {\n <mona-button-group selection=\"multiple\">\n @if (boldVisible()) {\n <button monaButton [selected]=\"boldSelected()\" (click)=\"onBoldToggle()\" title=\"Bold\">\n <i class=\"ri-bold\"></i>\n </button>\n }\n @if (italicVisible()) {\n <button
|
|
717
|
+
args: [{ selector: "mona-editor-basic-text-styles", imports: [ButtonDirective, ButtonGroupComponent], template: "@if (anyToolVisible()) {\n <mona-button-group selection=\"multiple\" [size]=\"'small'\">\n @if (boldVisible()) {\n <button monaButton [selected]=\"boldSelected()\" [toggleable]=\"false\" (click)=\"onBoldToggle()\" title=\"Bold\">\n <i class=\"ri-bold\"></i>\n </button>\n }\n @if (italicVisible()) {\n <button\n monaButton\n [selected]=\"italicSelected()\"\n [toggleable]=\"false\"\n (click)=\"onItalicToggle()\"\n title=\"Italic\">\n <i class=\"ri-italic\"></i>\n </button>\n }\n @if (underlineVisible()) {\n <button\n monaButton\n [selected]=\"underlineSelected()\"\n [toggleable]=\"false\"\n (click)=\"onUnderlineToggle()\"\n title=\"Underline\">\n <i class=\"ri-underline\"></i>\n </button>\n }\n @if (strikeThroughVisible()) {\n <button\n monaButton\n [selected]=\"strikeThroughSelected()\"\n [toggleable]=\"false\"\n (click)=\"onStrikeThroughToggle()\"\n title=\"Strikethrough\">\n <i class=\"ri-strikethrough\"></i>\n </button>\n }\n @if (subscriptVisible()) {\n <button\n monaButton\n [selected]=\"subscriptSelected()\"\n [toggleable]=\"false\"\n (click)=\"onSubscriptToggle()\"\n title=\"Subscript\">\n <i class=\"ri-subscript\"></i>\n </button>\n }\n @if (superscriptVisible()) {\n <button\n monaButton\n [selected]=\"superscriptSelected()\"\n [toggleable]=\"false\"\n (click)=\"onSuperscriptToggle()\"\n title=\"Superscript\">\n <i class=\"ri-superscript\"></i>\n </button>\n }\n </mona-button-group>\n}\n" }]
|
|
573
718
|
}] });
|
|
574
719
|
|
|
575
720
|
class EditorBlockquoteComponent {
|
|
@@ -591,11 +736,11 @@ class EditorBlockquoteComponent {
|
|
|
591
736
|
}
|
|
592
737
|
}
|
|
593
738
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorBlockquoteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
594
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorBlockquoteComponent, isStandalone: true, selector: "mona-editor-blockquote", ngImport: i0, template: "<button monaButton [selected]=\"blockquoteSelected()\" (click)=\"onBlockquoteToggle()\" title=\"Quotation\">\n <i class=\"ri-double-quotes-r\"></i>\n</button>\n",
|
|
739
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorBlockquoteComponent, isStandalone: true, selector: "mona-editor-blockquote", ngImport: i0, template: "<button monaButton [size]=\"'small'\" [selected]=\"blockquoteSelected()\" (click)=\"onBlockquoteToggle()\" title=\"Quotation\">\n <i class=\"ri-double-quotes-r\"></i>\n</button>\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }] }); }
|
|
595
740
|
}
|
|
596
741
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorBlockquoteComponent, decorators: [{
|
|
597
742
|
type: Component,
|
|
598
|
-
args: [{ selector: "mona-editor-blockquote", imports: [ButtonDirective], template: "<button monaButton [selected]=\"blockquoteSelected()\" (click)=\"onBlockquoteToggle()\" title=\"Quotation\">\n <i class=\"ri-double-quotes-r\"></i>\n</button>\n" }]
|
|
743
|
+
args: [{ selector: "mona-editor-blockquote", imports: [ButtonDirective], template: "<button monaButton [size]=\"'small'\" [selected]=\"blockquoteSelected()\" (click)=\"onBlockquoteToggle()\" title=\"Quotation\">\n <i class=\"ri-double-quotes-r\"></i>\n</button>\n" }]
|
|
599
744
|
}] });
|
|
600
745
|
|
|
601
746
|
class EditorCodeBlockComponent {
|
|
@@ -612,11 +757,11 @@ class EditorCodeBlockComponent {
|
|
|
612
757
|
this.#editorService.editor.chain().toggleCodeBlock().run();
|
|
613
758
|
}
|
|
614
759
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorCodeBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
615
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorCodeBlockComponent, isStandalone: true, selector: "mona-editor-code-block", ngImport: i0, template: "<button monaButton [selected]=\"codeBlockSelected()\" (click)=\"onCodeBlockClick()\">\n <i class=\"ri-code-s-slash-line\"></i>\n</button>\n",
|
|
760
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorCodeBlockComponent, isStandalone: true, selector: "mona-editor-code-block", ngImport: i0, template: "<button monaButton [size]=\"'small'\" [selected]=\"codeBlockSelected()\" (click)=\"onCodeBlockClick()\">\n <i class=\"ri-code-s-slash-line\"></i>\n</button>\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }] }); }
|
|
616
761
|
}
|
|
617
762
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorCodeBlockComponent, decorators: [{
|
|
618
763
|
type: Component,
|
|
619
|
-
args: [{ selector: "mona-editor-code-block", imports: [ButtonDirective], template: "<button monaButton [selected]=\"codeBlockSelected()\" (click)=\"onCodeBlockClick()\">\n <i class=\"ri-code-s-slash-line\"></i>\n</button>\n" }]
|
|
764
|
+
args: [{ selector: "mona-editor-code-block", imports: [ButtonDirective], template: "<button monaButton [size]=\"'small'\" [selected]=\"codeBlockSelected()\" (click)=\"onCodeBlockClick()\">\n <i class=\"ri-code-s-slash-line\"></i>\n</button>\n" }]
|
|
620
765
|
}] });
|
|
621
766
|
|
|
622
767
|
const htmlColorCode = (name, document) => {
|
|
@@ -634,6 +779,14 @@ class EditorFontColorComponent {
|
|
|
634
779
|
this.#document = inject(DOCUMENT);
|
|
635
780
|
this.#editorService = inject(EditorService);
|
|
636
781
|
this.#lastColor = "";
|
|
782
|
+
this.colorPreviewClass = computed(() => {
|
|
783
|
+
return editorFontColorPreviewThemeVariants();
|
|
784
|
+
}, /* @ts-ignore */
|
|
785
|
+
...(ngDevMode ? [{ debugName: "colorPreviewClass" }] : /* istanbul ignore next */ []));
|
|
786
|
+
this.colorValueClass = computed(() => {
|
|
787
|
+
return editorFontColorValueThemeVariants();
|
|
788
|
+
}, /* @ts-ignore */
|
|
789
|
+
...(ngDevMode ? [{ debugName: "colorValueClass" }] : /* istanbul ignore next */ []));
|
|
637
790
|
this.selectedColor = computed(() => {
|
|
638
791
|
this.#editorService.state();
|
|
639
792
|
const attributes = this.#editorService.editor.getAttributes("textStyle");
|
|
@@ -655,15 +808,19 @@ class EditorFontColorComponent {
|
|
|
655
808
|
}
|
|
656
809
|
}
|
|
657
810
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorFontColorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
658
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorFontColorComponent, isStandalone: true, selector: "mona-editor-font-color", ngImport: i0, template: "<mona-color-picker
|
|
811
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorFontColorComponent, isStandalone: true, selector: "mona-editor-font-color", ngImport: i0, template: "<mona-color-picker\n view=\"gradient\"\n [size]=\"'small'\"\n [value]=\"selectedColor()\"\n (valueChange)=\"onColorChange($event)\"\n title=\"Color\">\n <ng-template monaColorPickerValueTemplate let-color>\n <div [class]=\"colorValueClass()\">\n <i class=\"ri-font-family\"></i>\n <span [class]=\"colorPreviewClass()\" [style.background-color]=\"color\"></span>\n </div>\n </ng-template>\n</mona-color-picker>\n", dependencies: [{ kind: "component", type: ColorPickerComponent, selector: "mona-color-picker", inputs: ["closeOnSelect", "columns", "disabled", "invalid", "opacity", "palette", "readonly", "rounded", "showClearButton", "size", "view", "required", "touched", "value"], outputs: ["touch", "valueChange"] }, { kind: "directive", type: ColorPickerValueTemplateDirective, selector: "ng-template[monaColorPickerValueTemplate]" }] }); }
|
|
659
812
|
}
|
|
660
813
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorFontColorComponent, decorators: [{
|
|
661
814
|
type: Component,
|
|
662
|
-
args: [{ selector: "mona-editor-font-color", imports: [ColorPickerComponent, ColorPickerValueTemplateDirective], template: "<mona-color-picker
|
|
815
|
+
args: [{ selector: "mona-editor-font-color", imports: [ColorPickerComponent, ColorPickerValueTemplateDirective], template: "<mona-color-picker\n view=\"gradient\"\n [size]=\"'small'\"\n [value]=\"selectedColor()\"\n (valueChange)=\"onColorChange($event)\"\n title=\"Color\">\n <ng-template monaColorPickerValueTemplate let-color>\n <div [class]=\"colorValueClass()\">\n <i class=\"ri-font-family\"></i>\n <span [class]=\"colorPreviewClass()\" [style.background-color]=\"color\"></span>\n </div>\n </ng-template>\n</mona-color-picker>\n" }]
|
|
663
816
|
}] });
|
|
664
817
|
|
|
665
818
|
class EditorFontFamilyComponent {
|
|
666
819
|
constructor() {
|
|
820
|
+
this.dropdownListClass = computed(() => {
|
|
821
|
+
return editorFontFamilyDropdownListThemeVariants();
|
|
822
|
+
}, /* @ts-ignore */
|
|
823
|
+
...(ngDevMode ? [{ debugName: "dropdownListClass" }] : /* istanbul ignore next */ []));
|
|
667
824
|
this.editorService = inject(EditorService);
|
|
668
825
|
this.selectedFontFamily = computed(() => {
|
|
669
826
|
this.editorService.state();
|
|
@@ -678,20 +835,31 @@ class EditorFontFamilyComponent {
|
|
|
678
835
|
this.editorService.editor.chain().focus().setFontFamily(defaultFontFamily).run();
|
|
679
836
|
}
|
|
680
837
|
onFontFamilyChange(fontFamily) {
|
|
838
|
+
if (!fontFamily) {
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
681
841
|
this.editorService.editor.chain().focus().setFontFamily(fontFamily).run();
|
|
682
842
|
}
|
|
683
843
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorFontFamilyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
684
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorFontFamilyComponent, isStandalone: true, selector: "mona-editor-font-family", ngImport: i0, template: "<mona-dropdown-list\
|
|
844
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorFontFamilyComponent, isStandalone: true, selector: "mona-editor-font-family", ngImport: i0, template: "<mona-dropdown-list\n [data]=\"editorService.fonts()\"\n [value]=\"selectedFontFamily()\"\n (valueChange)=\"onFontFamilyChange($event)\"\n [size]=\"'small'\"\n [class]=\"dropdownListClass()\"\n title=\"Select font family\">\n <ng-template monaDropDownListItemTemplate let-font>\n <span [style.font-family]=\"font\">{{ font }}</span>\n </ng-template>\n</mona-dropdown-list>\n", dependencies: [{ kind: "component", type: DropdownListComponent, selector: "mona-dropdown-list", inputs: ["aria-label", "aria-labelledby", "data", "disabled", "itemDisabled", "invalid", "loading", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "required", "rounded", "showClearButton", "size", "textField", "touched", "class", "valueField", "value"], outputs: ["close", "closed", "disabledChange", "open", "opened", "touch", "valueChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: DropdownItemTemplateDirective, selector: " ng-template[monaDropDownItemTemplate], ng-template[monaAutoCompleteItemTemplate], ng-template[monaDropDownListItemTemplate], ng-template[monaComboBoxItemTemplate], ng-template[monaMultiSelectItemTemplate] " }] }); }
|
|
685
845
|
}
|
|
686
846
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorFontFamilyComponent, decorators: [{
|
|
687
847
|
type: Component,
|
|
688
|
-
args: [{ selector: "mona-editor-font-family", imports: [DropdownListComponent, FormsModule, DropdownItemTemplateDirective], template: "<mona-dropdown-list\
|
|
848
|
+
args: [{ selector: "mona-editor-font-family", imports: [DropdownListComponent, FormsModule, DropdownItemTemplateDirective], template: "<mona-dropdown-list\n [data]=\"editorService.fonts()\"\n [value]=\"selectedFontFamily()\"\n (valueChange)=\"onFontFamilyChange($event)\"\n [size]=\"'small'\"\n [class]=\"dropdownListClass()\"\n title=\"Select font family\">\n <ng-template monaDropDownListItemTemplate let-font>\n <span [style.font-family]=\"font\">{{ font }}</span>\n </ng-template>\n</mona-dropdown-list>\n" }]
|
|
689
849
|
}] });
|
|
690
850
|
|
|
691
851
|
class EditorFontHighlightComponent {
|
|
692
852
|
constructor() {
|
|
693
853
|
this.#editorService = inject(EditorService);
|
|
694
854
|
this.#lastColor = "";
|
|
855
|
+
this.highlightPreviewClass = computed(() => {
|
|
856
|
+
return editorFontHighlightPreviewThemeVariants();
|
|
857
|
+
}, /* @ts-ignore */
|
|
858
|
+
...(ngDevMode ? [{ debugName: "highlightPreviewClass" }] : /* istanbul ignore next */ []));
|
|
859
|
+
this.highlightValueClass = computed(() => {
|
|
860
|
+
return editorFontHighlightValueThemeVariants();
|
|
861
|
+
}, /* @ts-ignore */
|
|
862
|
+
...(ngDevMode ? [{ debugName: "highlightValueClass" }] : /* istanbul ignore next */ []));
|
|
695
863
|
this.selectedColor = computed(() => {
|
|
696
864
|
const state = this.#editorService.state();
|
|
697
865
|
if (state.selection.empty) {
|
|
@@ -722,16 +890,20 @@ class EditorFontHighlightComponent {
|
|
|
722
890
|
}
|
|
723
891
|
}
|
|
724
892
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorFontHighlightComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
725
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
893
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: EditorFontHighlightComponent, isStandalone: true, selector: "mona-editor-font-highlight", ngImport: i0, template: "<mona-color-picker\n view=\"gradient\"\n [value]=\"selectedColor()\"\n (valueChange)=\"onColorChange($event)\"\n [size]=\"'small'\"\n title=\"Background color\">\n <ng-template monaColorPickerValueTemplate let-color>\n <div [class]=\"highlightValueClass()\">\n <i class=\"ri-drop-fill\"></i>\n @if (color) {\n <span [class]=\"highlightPreviewClass()\" [style.background-color]=\"color\"></span>\n }\n </div>\n </ng-template>\n</mona-color-picker>\n", dependencies: [{ kind: "component", type: ColorPickerComponent, selector: "mona-color-picker", inputs: ["closeOnSelect", "columns", "disabled", "invalid", "opacity", "palette", "readonly", "rounded", "showClearButton", "size", "view", "required", "touched", "value"], outputs: ["touch", "valueChange"] }, { kind: "directive", type: ColorPickerValueTemplateDirective, selector: "ng-template[monaColorPickerValueTemplate]" }] }); }
|
|
726
894
|
}
|
|
727
895
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorFontHighlightComponent, decorators: [{
|
|
728
896
|
type: Component,
|
|
729
|
-
args: [{ selector: "mona-editor-font-highlight", imports: [ColorPickerComponent, ColorPickerValueTemplateDirective], template: "<mona-color-picker\n view=\"gradient\"\n [value]=\"selectedColor()\"\n (valueChange)=\"onColorChange($event)\"\n title=\"Background color\">\n <ng-template monaColorPickerValueTemplate let-color>\n <div class=\"
|
|
897
|
+
args: [{ selector: "mona-editor-font-highlight", imports: [ColorPickerComponent, ColorPickerValueTemplateDirective], template: "<mona-color-picker\n view=\"gradient\"\n [value]=\"selectedColor()\"\n (valueChange)=\"onColorChange($event)\"\n [size]=\"'small'\"\n title=\"Background color\">\n <ng-template monaColorPickerValueTemplate let-color>\n <div [class]=\"highlightValueClass()\">\n <i class=\"ri-drop-fill\"></i>\n @if (color) {\n <span [class]=\"highlightPreviewClass()\" [style.background-color]=\"color\"></span>\n }\n </div>\n </ng-template>\n</mona-color-picker>\n" }]
|
|
730
898
|
}] });
|
|
731
899
|
|
|
732
900
|
class EditorFontSizeComponent {
|
|
733
901
|
constructor() {
|
|
734
902
|
this.editorService = inject(EditorService);
|
|
903
|
+
this.dropdownListClass = computed(() => {
|
|
904
|
+
return editorFontSizeDropdownListThemeVariants();
|
|
905
|
+
}, /* @ts-ignore */
|
|
906
|
+
...(ngDevMode ? [{ debugName: "dropdownListClass" }] : /* istanbul ignore next */ []));
|
|
735
907
|
this.selectedFontSize = computed(() => {
|
|
736
908
|
this.editorService.state();
|
|
737
909
|
return (this.editorService
|
|
@@ -740,18 +912,18 @@ class EditorFontSizeComponent {
|
|
|
740
912
|
}, /* @ts-ignore */
|
|
741
913
|
...(ngDevMode ? [{ debugName: "selectedFontSize" }] : /* istanbul ignore next */ []));
|
|
742
914
|
}
|
|
743
|
-
ngOnInit() {
|
|
744
|
-
// this.#editorService.editor.chain().focus().setFontSize(this.selectedFontSize().value).run();
|
|
745
|
-
}
|
|
746
915
|
onFontSizeChange(fontSize) {
|
|
916
|
+
if (!fontSize) {
|
|
917
|
+
return;
|
|
918
|
+
}
|
|
747
919
|
this.editorService.editor.chain().focus().setFontSize(fontSize).run();
|
|
748
920
|
}
|
|
749
921
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorFontSizeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
750
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorFontSizeComponent, isStandalone: true, selector: "mona-editor-font-size", ngImport: i0, template: "<mona-dropdown-list\
|
|
922
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorFontSizeComponent, isStandalone: true, selector: "mona-editor-font-size", ngImport: i0, template: "<mona-dropdown-list\n [data]=\"editorService.fontSizes()\"\n placeholder=\"Font Size\"\n [value]=\"selectedFontSize()\"\n (valueChange)=\"onFontSizeChange($event)\"\n [size]=\"'small'\"\n [class]=\"dropdownListClass()\"\n title=\"Select font size\"></mona-dropdown-list>\n", dependencies: [{ kind: "component", type: DropdownListComponent, selector: "mona-dropdown-list", inputs: ["aria-label", "aria-labelledby", "data", "disabled", "itemDisabled", "invalid", "loading", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "required", "rounded", "showClearButton", "size", "textField", "touched", "class", "valueField", "value"], outputs: ["close", "closed", "disabledChange", "open", "opened", "touch", "valueChange"] }, { kind: "ngmodule", type: FormsModule }] }); }
|
|
751
923
|
}
|
|
752
924
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorFontSizeComponent, decorators: [{
|
|
753
925
|
type: Component,
|
|
754
|
-
args: [{ selector: "mona-editor-font-size", imports: [DropdownListComponent, FormsModule], template: "<mona-dropdown-list\
|
|
926
|
+
args: [{ selector: "mona-editor-font-size", imports: [DropdownListComponent, FormsModule], template: "<mona-dropdown-list\n [data]=\"editorService.fontSizes()\"\n placeholder=\"Font Size\"\n [value]=\"selectedFontSize()\"\n (valueChange)=\"onFontSizeChange($event)\"\n [size]=\"'small'\"\n [class]=\"dropdownListClass()\"\n title=\"Select font size\"></mona-dropdown-list>\n" }]
|
|
755
927
|
}] });
|
|
756
928
|
|
|
757
929
|
var HeadingType;
|
|
@@ -769,6 +941,10 @@ class EditorHeadingsComponent {
|
|
|
769
941
|
constructor() {
|
|
770
942
|
this.#editorService = inject(EditorService);
|
|
771
943
|
this.HeadingType = HeadingType;
|
|
944
|
+
this.dropdownListClass = computed(() => {
|
|
945
|
+
return editorHeadingsDropdownListThemeVariants();
|
|
946
|
+
}, /* @ts-ignore */
|
|
947
|
+
...(ngDevMode ? [{ debugName: "dropdownListClass" }] : /* istanbul ignore next */ []));
|
|
772
948
|
this.headingsDropdownListData = [
|
|
773
949
|
{ text: "Paragraph", value: HeadingType.Paragraph },
|
|
774
950
|
{ text: "Heading 1", value: HeadingType.Heading1 },
|
|
@@ -790,6 +966,9 @@ class EditorHeadingsComponent {
|
|
|
790
966
|
}
|
|
791
967
|
#editorService;
|
|
792
968
|
onFormatChange(headingItem) {
|
|
969
|
+
if (!headingItem) {
|
|
970
|
+
return;
|
|
971
|
+
}
|
|
793
972
|
if (headingItem.value === HeadingType.Paragraph) {
|
|
794
973
|
this.#editorService.editor.chain().focus().setParagraph().run();
|
|
795
974
|
}
|
|
@@ -798,11 +977,11 @@ class EditorHeadingsComponent {
|
|
|
798
977
|
}
|
|
799
978
|
}
|
|
800
979
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorHeadingsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
801
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: EditorHeadingsComponent, isStandalone: true, selector: "mona-editor-headings", ngImport: i0, template: "<mona-dropdown-list\
|
|
980
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: EditorHeadingsComponent, isStandalone: true, selector: "mona-editor-headings", ngImport: i0, template: "<mona-dropdown-list\n [data]=\"headingsDropdownListData\"\n [value]=\"selectedHeadingsDropdownItem()\"\n (valueChange)=\"onFormatChange($event)\"\n [size]=\"'small'\"\n [class]=\"dropdownListClass()\"\n textField=\"text\"\n valueField=\"value\"\n title=\"Format\">\n <ng-template monaDropDownListItemTemplate let-dataItem>\n @switch (dataItem.value) {\n @case (HeadingType.Heading1) {\n <h1 class=\"m-0 text-2xl font-bold\">{{ dataItem.text }}</h1>\n }\n @case (HeadingType.Heading2) {\n <h2 class=\"m-0 text-xl font-bold\">{{ dataItem.text }}</h2>\n }\n @case (HeadingType.Heading3) {\n <h3 class=\"m-0 text-lg font-bold\">{{ dataItem.text }}</h3>\n }\n @case (HeadingType.Heading4) {\n <h4 class=\"m-0 text-base font-bold\">{{ dataItem.text }}</h4>\n }\n @case (HeadingType.Heading5) {\n <h5 class=\"m-0 text-sm font-bold\">{{ dataItem.text }}</h5>\n }\n @case (HeadingType.Heading6) {\n <h6 class=\"m-0 text-xs font-bold\">{{ dataItem.text }}</h6>\n }\n @case (HeadingType.Paragraph) {\n <p class=\"m-0 text-sm\">{{ dataItem.text }}</p>\n }\n @default {\n <p class=\"m-0 text-sm\">{{ dataItem.text }}</p>\n }\n }\n </ng-template>\n</mona-dropdown-list>\n", dependencies: [{ kind: "component", type: DropdownListComponent, selector: "mona-dropdown-list", inputs: ["aria-label", "aria-labelledby", "data", "disabled", "itemDisabled", "invalid", "loading", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "required", "rounded", "showClearButton", "size", "textField", "touched", "class", "valueField", "value"], outputs: ["close", "closed", "disabledChange", "open", "opened", "touch", "valueChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: DropdownItemTemplateDirective, selector: " ng-template[monaDropDownItemTemplate], ng-template[monaAutoCompleteItemTemplate], ng-template[monaDropDownListItemTemplate], ng-template[monaComboBoxItemTemplate], ng-template[monaMultiSelectItemTemplate] " }] }); }
|
|
802
981
|
}
|
|
803
982
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorHeadingsComponent, decorators: [{
|
|
804
983
|
type: Component,
|
|
805
|
-
args: [{ selector: "mona-editor-headings", imports: [DropdownListComponent, FormsModule, DropdownItemTemplateDirective], template: "<mona-dropdown-list\
|
|
984
|
+
args: [{ selector: "mona-editor-headings", imports: [DropdownListComponent, FormsModule, DropdownItemTemplateDirective], template: "<mona-dropdown-list\n [data]=\"headingsDropdownListData\"\n [value]=\"selectedHeadingsDropdownItem()\"\n (valueChange)=\"onFormatChange($event)\"\n [size]=\"'small'\"\n [class]=\"dropdownListClass()\"\n textField=\"text\"\n valueField=\"value\"\n title=\"Format\">\n <ng-template monaDropDownListItemTemplate let-dataItem>\n @switch (dataItem.value) {\n @case (HeadingType.Heading1) {\n <h1 class=\"m-0 text-2xl font-bold\">{{ dataItem.text }}</h1>\n }\n @case (HeadingType.Heading2) {\n <h2 class=\"m-0 text-xl font-bold\">{{ dataItem.text }}</h2>\n }\n @case (HeadingType.Heading3) {\n <h3 class=\"m-0 text-lg font-bold\">{{ dataItem.text }}</h3>\n }\n @case (HeadingType.Heading4) {\n <h4 class=\"m-0 text-base font-bold\">{{ dataItem.text }}</h4>\n }\n @case (HeadingType.Heading5) {\n <h5 class=\"m-0 text-sm font-bold\">{{ dataItem.text }}</h5>\n }\n @case (HeadingType.Heading6) {\n <h6 class=\"m-0 text-xs font-bold\">{{ dataItem.text }}</h6>\n }\n @case (HeadingType.Paragraph) {\n <p class=\"m-0 text-sm\">{{ dataItem.text }}</p>\n }\n @default {\n <p class=\"m-0 text-sm\">{{ dataItem.text }}</p>\n }\n }\n </ng-template>\n</mona-dropdown-list>\n" }]
|
|
806
985
|
}] });
|
|
807
986
|
|
|
808
987
|
class EditorHistoryComponent {
|
|
@@ -827,11 +1006,11 @@ class EditorHistoryComponent {
|
|
|
827
1006
|
this.#editorService.editor.chain().focus().undo().run();
|
|
828
1007
|
}
|
|
829
1008
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorHistoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
830
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorHistoryComponent, isStandalone: true, selector: "mona-editor-history", ngImport: i0, template: "<mona-button-group selection=\"single\">\n <button monaButton [disabled]=\"undoDisabled()\" (click)=\"onUndoClick()\" title=\"Undo\">\n <i class=\"ri-arrow-go-back-line\"></i>\n </button>\n <button monaButton [disabled]=\"redoDisabled()\" (click)=\"onRedoClick()\" title=\"Redo\">\n <i class=\"ri-arrow-go-forward-line\"></i>\n </button>\n</mona-button-group>\n",
|
|
1009
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorHistoryComponent, isStandalone: true, selector: "mona-editor-history", ngImport: i0, template: "<mona-button-group selection=\"single\" [size]=\"'small'\">\n <button monaButton [disabled]=\"undoDisabled()\" (click)=\"onUndoClick()\" title=\"Undo\">\n <i class=\"ri-arrow-go-back-line\"></i>\n </button>\n <button monaButton [disabled]=\"redoDisabled()\" (click)=\"onRedoClick()\" title=\"Redo\">\n <i class=\"ri-arrow-go-forward-line\"></i>\n </button>\n</mona-button-group>\n", dependencies: [{ kind: "component", type: ButtonGroupComponent, selector: "mona-button-group", inputs: ["allowEmpty", "aria-label", "disabled", "look", "rounded", "selection", "size", "class"], outputs: ["buttonClick", "disabledChange", "selectionChange"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }] }); }
|
|
831
1010
|
}
|
|
832
1011
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorHistoryComponent, decorators: [{
|
|
833
1012
|
type: Component,
|
|
834
|
-
args: [{ selector: "mona-editor-history", imports: [ButtonGroupComponent, ButtonDirective], template: "<mona-button-group selection=\"single\">\n <button monaButton [disabled]=\"undoDisabled()\" (click)=\"onUndoClick()\" title=\"Undo\">\n <i class=\"ri-arrow-go-back-line\"></i>\n </button>\n <button monaButton [disabled]=\"redoDisabled()\" (click)=\"onRedoClick()\" title=\"Redo\">\n <i class=\"ri-arrow-go-forward-line\"></i>\n </button>\n</mona-button-group>\n" }]
|
|
1013
|
+
args: [{ selector: "mona-editor-history", imports: [ButtonGroupComponent, ButtonDirective], template: "<mona-button-group selection=\"single\" [size]=\"'small'\">\n <button monaButton [disabled]=\"undoDisabled()\" (click)=\"onUndoClick()\" title=\"Undo\">\n <i class=\"ri-arrow-go-back-line\"></i>\n </button>\n <button monaButton [disabled]=\"redoDisabled()\" (click)=\"onRedoClick()\" title=\"Redo\">\n <i class=\"ri-arrow-go-forward-line\"></i>\n </button>\n</mona-button-group>\n" }]
|
|
835
1014
|
}] });
|
|
836
1015
|
|
|
837
1016
|
class EditorHorizontalRuleComponent {
|
|
@@ -840,41 +1019,63 @@ class EditorHorizontalRuleComponent {
|
|
|
840
1019
|
this.#editorService.editor.chain().focus().setHorizontalRule().run();
|
|
841
1020
|
}
|
|
842
1021
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorHorizontalRuleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
843
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorHorizontalRuleComponent, isStandalone: true, selector: "mona-editor-horizontal-rule", ngImport: i0, template: "<button monaButton (click)=\"onHorizontalRuleClick()\" title=\"Add horizontal line\">\n <i class=\"ri-subtract-line\"></i>\n</button>\n",
|
|
1022
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorHorizontalRuleComponent, isStandalone: true, selector: "mona-editor-horizontal-rule", ngImport: i0, template: "<button monaButton [size]=\"'small'\" (click)=\"onHorizontalRuleClick()\" title=\"Add horizontal line\">\n <i class=\"ri-subtract-line\"></i>\n</button>\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }] }); }
|
|
844
1023
|
}
|
|
845
1024
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorHorizontalRuleComponent, decorators: [{
|
|
846
1025
|
type: Component,
|
|
847
|
-
args: [{ selector: "mona-editor-horizontal-rule", imports: [ButtonDirective], template: "<button monaButton (click)=\"onHorizontalRuleClick()\" title=\"Add horizontal line\">\n <i class=\"ri-subtract-line\"></i>\n</button>\n" }]
|
|
1026
|
+
args: [{ selector: "mona-editor-horizontal-rule", imports: [ButtonDirective], template: "<button monaButton [size]=\"'small'\" (click)=\"onHorizontalRuleClick()\" title=\"Add horizontal line\">\n <i class=\"ri-subtract-line\"></i>\n</button>\n" }]
|
|
848
1027
|
}] });
|
|
849
1028
|
|
|
850
1029
|
class EditorImageInserterComponent {
|
|
851
1030
|
constructor() {
|
|
852
|
-
this
|
|
853
|
-
|
|
854
|
-
height:
|
|
855
|
-
link:
|
|
856
|
-
width:
|
|
1031
|
+
this.#imageFormModel = signal({
|
|
1032
|
+
alt: "",
|
|
1033
|
+
height: null,
|
|
1034
|
+
link: "",
|
|
1035
|
+
width: null
|
|
1036
|
+
}, /* @ts-ignore */
|
|
1037
|
+
...(ngDevMode ? [{ debugName: "#imageFormModel" }] : /* istanbul ignore next */ []));
|
|
1038
|
+
this.actionsClass = computed(() => {
|
|
1039
|
+
return editorImageInserterActionsThemeVariants();
|
|
1040
|
+
}, /* @ts-ignore */
|
|
1041
|
+
...(ngDevMode ? [{ debugName: "actionsClass" }] : /* istanbul ignore next */ []));
|
|
1042
|
+
this.formClass = computed(() => {
|
|
1043
|
+
return editorImageInserterFormThemeVariants();
|
|
1044
|
+
}, /* @ts-ignore */
|
|
1045
|
+
...(ngDevMode ? [{ debugName: "formClass" }] : /* istanbul ignore next */ []));
|
|
1046
|
+
this.iForm = form(this.#imageFormModel, schema => {
|
|
1047
|
+
required(schema.link);
|
|
1048
|
+
maxLength(schema.link, 2048);
|
|
857
1049
|
});
|
|
1050
|
+
this.rowClass = computed(() => {
|
|
1051
|
+
return editorImageInserterRowThemeVariants();
|
|
1052
|
+
}, /* @ts-ignore */
|
|
1053
|
+
...(ngDevMode ? [{ debugName: "rowClass" }] : /* istanbul ignore next */ []));
|
|
1054
|
+
this.rowLabelClass = computed(() => {
|
|
1055
|
+
return editorImageInserterRowLabelThemeVariants();
|
|
1056
|
+
}, /* @ts-ignore */
|
|
1057
|
+
...(ngDevMode ? [{ debugName: "rowLabelClass" }] : /* istanbul ignore next */ []));
|
|
858
1058
|
this.cancel = output();
|
|
859
1059
|
this.insert = output();
|
|
860
1060
|
}
|
|
1061
|
+
#imageFormModel;
|
|
861
1062
|
onCancel() {
|
|
862
1063
|
this.cancel.emit();
|
|
863
1064
|
}
|
|
864
1065
|
onImageInsert() {
|
|
865
1066
|
this.insert.emit({
|
|
866
|
-
|
|
867
|
-
height: this.
|
|
868
|
-
link: this.
|
|
869
|
-
width: this.
|
|
1067
|
+
alt: this.iForm.alt().value(),
|
|
1068
|
+
height: this.iForm.height().value(),
|
|
1069
|
+
link: this.iForm.link().value(),
|
|
1070
|
+
width: this.iForm.width().value()
|
|
870
1071
|
});
|
|
871
1072
|
}
|
|
872
1073
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorImageInserterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
873
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorImageInserterComponent, isStandalone: true, selector: "mona-editor-image-inserter", outputs: { cancel: "cancel", insert: "insert" }, ngImport: i0, template: "<form [
|
|
1074
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorImageInserterComponent, isStandalone: true, selector: "mona-editor-image-inserter", outputs: { cancel: "cancel", insert: "insert" }, ngImport: i0, template: "<form [formRoot]=\"iForm\" [class]=\"formClass()\">\n <div [class]=\"rowClass()\">\n <div [class]=\"rowLabelClass()\">Image URL</div>\n <mona-text-box [size]=\"'small'\" [formField]=\"iForm.link\"></mona-text-box>\n </div>\n <div [class]=\"rowClass()\">\n <div [class]=\"rowLabelClass()\">Alt Text</div>\n <mona-text-box [size]=\"'small'\" [formField]=\"iForm.alt\"></mona-text-box>\n </div>\n <div class=\"flex gap-2\">\n <div [class]=\"rowClass()\">\n <div [class]=\"rowLabelClass()\">Width (px)</div>\n <mona-numeric-text-box [size]=\"'small'\" [formField]=\"iForm.width\"></mona-numeric-text-box>\n </div>\n <div [class]=\"rowClass()\">\n <div [class]=\"rowLabelClass()\">Height (px)</div>\n <mona-numeric-text-box [size]=\"'small'\" [formField]=\"iForm.height\"></mona-numeric-text-box>\n </div>\n </div>\n <div [class]=\"actionsClass()\">\n <button monaButton [size]=\"'small'\" [disabled]=\"!iForm().valid()\" look=\"primary\" (click)=\"onImageInsert()\">\n Insert\n </button>\n <button monaButton [size]=\"'small'\" [look]=\"'secondary'\" (click)=\"onCancel()\">Cancel</button>\n </div>\n</form>\n", dependencies: [{ kind: "component", type: TextBoxComponent, selector: "mona-text-box", inputs: ["clearButton", "disabled", "inputAttributes", "inputClass", "inputStyle", "invalid", "placeholder", "readonly", "required", "rounded", "size", "touched", "type", "class", "value"], outputs: ["inputBlur", "inputFocus", "touch", "valueChange"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: NumericTextBoxComponent, selector: "mona-numeric-text-box", inputs: ["aria-label", "decimals", "disabled", "formatter", "maxValue", "minValue", "nullable", "readonly", "required", "invalid", "rounded", "size", "spinners", "step", "tabindex", "touched", "class", "value"], outputs: ["inputBlur", "inputFocus", "inputFocusOut", "touch", "valueChange"] }, { kind: "directive", type: FormRoot, selector: "form[formRoot]", inputs: ["formRoot"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }] }); }
|
|
874
1075
|
}
|
|
875
1076
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorImageInserterComponent, decorators: [{
|
|
876
1077
|
type: Component,
|
|
877
|
-
args: [{ selector: "mona-editor-image-inserter", imports: [TextBoxComponent,
|
|
1078
|
+
args: [{ selector: "mona-editor-image-inserter", imports: [TextBoxComponent, ButtonDirective, NumericTextBoxComponent, FormRoot, FormField], template: "<form [formRoot]=\"iForm\" [class]=\"formClass()\">\n <div [class]=\"rowClass()\">\n <div [class]=\"rowLabelClass()\">Image URL</div>\n <mona-text-box [size]=\"'small'\" [formField]=\"iForm.link\"></mona-text-box>\n </div>\n <div [class]=\"rowClass()\">\n <div [class]=\"rowLabelClass()\">Alt Text</div>\n <mona-text-box [size]=\"'small'\" [formField]=\"iForm.alt\"></mona-text-box>\n </div>\n <div class=\"flex gap-2\">\n <div [class]=\"rowClass()\">\n <div [class]=\"rowLabelClass()\">Width (px)</div>\n <mona-numeric-text-box [size]=\"'small'\" [formField]=\"iForm.width\"></mona-numeric-text-box>\n </div>\n <div [class]=\"rowClass()\">\n <div [class]=\"rowLabelClass()\">Height (px)</div>\n <mona-numeric-text-box [size]=\"'small'\" [formField]=\"iForm.height\"></mona-numeric-text-box>\n </div>\n </div>\n <div [class]=\"actionsClass()\">\n <button monaButton [size]=\"'small'\" [disabled]=\"!iForm().valid()\" look=\"primary\" (click)=\"onImageInsert()\">\n Insert\n </button>\n <button monaButton [size]=\"'small'\" [look]=\"'secondary'\" (click)=\"onCancel()\">Cancel</button>\n </div>\n</form>\n" }]
|
|
878
1079
|
}], propDecorators: { cancel: [{ type: i0.Output, args: ["cancel"] }], insert: [{ type: i0.Output, args: ["insert"] }] } });
|
|
879
1080
|
|
|
880
1081
|
class EditorImageComponent {
|
|
@@ -905,8 +1106,8 @@ class EditorImageComponent {
|
|
|
905
1106
|
.chain()
|
|
906
1107
|
.setImage({
|
|
907
1108
|
src: event.link,
|
|
908
|
-
alt: event.
|
|
909
|
-
title: event.
|
|
1109
|
+
alt: event.alt,
|
|
1110
|
+
title: event.alt
|
|
910
1111
|
})
|
|
911
1112
|
.updateAttributes("extendedImage", {
|
|
912
1113
|
width: event.width,
|
|
@@ -915,11 +1116,11 @@ class EditorImageComponent {
|
|
|
915
1116
|
.run();
|
|
916
1117
|
}
|
|
917
1118
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
918
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: EditorImageComponent, isStandalone: true, selector: "mona-editor-image", ngImport: i0, template: "<button monaButton (click)=\"onDisplayInserterClick()\" title=\"Insert image\">\n <i class=\"ri-image-add-line\"></i>\n</button>\n\n@if (inserterVisible()) {\n <mona-window
|
|
1119
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: EditorImageComponent, isStandalone: true, selector: "mona-editor-image", ngImport: i0, template: "<button monaButton [size]=\"'small'\" (click)=\"onDisplayInserterClick()\" title=\"Insert image\">\n <i class=\"ri-image-add-line\"></i>\n</button>\n\n@if (inserterVisible()) {\n <mona-window\n [width]=\"400\"\n [modal]=\"false\"\n [title]=\"'Insert Image'\"\n [minimizable]=\"false\"\n [maximizable]=\"false\"\n (close)=\"onInserterClose()\">\n <ng-template monaWindowContentTemplate>\n <mona-editor-image-inserter\n (insert)=\"onImageInsert($event)\"\n (cancel)=\"onInsertCancel()\"></mona-editor-image-inserter>\n </ng-template>\n </mona-window>\n}\n", dependencies: [{ kind: "component", type: WindowComponent, selector: "mona-window", inputs: ["closable", "closeOnEscape", "draggable", "focusedElement", "height", "left", "look", "maxHeight", "maxWidth", "maximizable", "minHeight", "minWidth", "minimizable", "modal", "resizable", "rounded", "title", "top", "width"], outputs: ["close", "closed", "dragEnd", "dragStart", "heightChange", "leftChange", "topChange", "widthChange"] }, { kind: "component", type: EditorImageInserterComponent, selector: "mona-editor-image-inserter", outputs: ["cancel", "insert"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "directive", type: WindowContentTemplateDirective, selector: "ng-template[monaWindowContentTemplate]" }] }); }
|
|
919
1120
|
}
|
|
920
1121
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorImageComponent, decorators: [{
|
|
921
1122
|
type: Component,
|
|
922
|
-
args: [{ selector: "mona-editor-image", imports: [WindowComponent, EditorImageInserterComponent, ButtonDirective], template: "<button monaButton (click)=\"onDisplayInserterClick()\" title=\"Insert image\">\n <i class=\"ri-image-add-line\"></i>\n</button>\n\n@if (inserterVisible()) {\n <mona-window
|
|
1123
|
+
args: [{ selector: "mona-editor-image", imports: [WindowComponent, EditorImageInserterComponent, ButtonDirective, WindowContentTemplateDirective], template: "<button monaButton [size]=\"'small'\" (click)=\"onDisplayInserterClick()\" title=\"Insert image\">\n <i class=\"ri-image-add-line\"></i>\n</button>\n\n@if (inserterVisible()) {\n <mona-window\n [width]=\"400\"\n [modal]=\"false\"\n [title]=\"'Insert Image'\"\n [minimizable]=\"false\"\n [maximizable]=\"false\"\n (close)=\"onInserterClose()\">\n <ng-template monaWindowContentTemplate>\n <mona-editor-image-inserter\n (insert)=\"onImageInsert($event)\"\n (cancel)=\"onInsertCancel()\"></mona-editor-image-inserter>\n </ng-template>\n </mona-window>\n}\n" }]
|
|
923
1124
|
}] });
|
|
924
1125
|
|
|
925
1126
|
class EditorIndentComponent {
|
|
@@ -944,11 +1145,11 @@ class EditorIndentComponent {
|
|
|
944
1145
|
this.#editorService.editor.chain().focus().outdent().run();
|
|
945
1146
|
}
|
|
946
1147
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorIndentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
947
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorIndentComponent, isStandalone: true, selector: "mona-editor-indent", ngImport: i0, template: "<mona-button-group selection=\"single\">\n <button monaButton [disabled]=\"indentDisabled()\" (click)=\"onIndentClick()\" title=\"Indent\">\n <i class=\"ri-indent-increase\"></i>\n </button>\n <button monaButton [disabled]=\"outdentDisabled()\" (click)=\"onOutdentClick()\" title=\"Outdent\">\n <i class=\"ri-indent-decrease\"></i>\n </button>\n</mona-button-group>\n",
|
|
1148
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorIndentComponent, isStandalone: true, selector: "mona-editor-indent", ngImport: i0, template: "<mona-button-group selection=\"single\" [size]=\"'small'\">\n <button monaButton [disabled]=\"indentDisabled()\" (click)=\"onIndentClick()\" title=\"Indent\">\n <i class=\"ri-indent-increase\"></i>\n </button>\n <button monaButton [disabled]=\"outdentDisabled()\" (click)=\"onOutdentClick()\" title=\"Outdent\">\n <i class=\"ri-indent-decrease\"></i>\n </button>\n</mona-button-group>\n", dependencies: [{ kind: "component", type: ButtonGroupComponent, selector: "mona-button-group", inputs: ["allowEmpty", "aria-label", "disabled", "look", "rounded", "selection", "size", "class"], outputs: ["buttonClick", "disabledChange", "selectionChange"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }] }); }
|
|
948
1149
|
}
|
|
949
1150
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorIndentComponent, decorators: [{
|
|
950
1151
|
type: Component,
|
|
951
|
-
args: [{ selector: "mona-editor-indent", imports: [ButtonGroupComponent, ButtonDirective], template: "<mona-button-group selection=\"single\">\n <button monaButton [disabled]=\"indentDisabled()\" (click)=\"onIndentClick()\" title=\"Indent\">\n <i class=\"ri-indent-increase\"></i>\n </button>\n <button monaButton [disabled]=\"outdentDisabled()\" (click)=\"onOutdentClick()\" title=\"Outdent\">\n <i class=\"ri-indent-decrease\"></i>\n </button>\n</mona-button-group>\n" }]
|
|
1152
|
+
args: [{ selector: "mona-editor-indent", imports: [ButtonGroupComponent, ButtonDirective], template: "<mona-button-group selection=\"single\" [size]=\"'small'\">\n <button monaButton [disabled]=\"indentDisabled()\" (click)=\"onIndentClick()\" title=\"Indent\">\n <i class=\"ri-indent-increase\"></i>\n </button>\n <button monaButton [disabled]=\"outdentDisabled()\" (click)=\"onOutdentClick()\" title=\"Outdent\">\n <i class=\"ri-indent-decrease\"></i>\n </button>\n</mona-button-group>\n" }]
|
|
952
1153
|
}] });
|
|
953
1154
|
|
|
954
1155
|
class EditorLinkComponent {
|
|
@@ -990,11 +1191,11 @@ class EditorLinkComponent {
|
|
|
990
1191
|
this.#editorService.editor.chain().focus().extendMarkRange("link").setLink({ href: url }).run();
|
|
991
1192
|
}
|
|
992
1193
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
993
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorLinkComponent, isStandalone: true, selector: "mona-editor-link", ngImport: i0, template: "<mona-button-group selection=\"single\">\n <button
|
|
1194
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorLinkComponent, isStandalone: true, selector: "mona-editor-link", ngImport: i0, template: "<mona-button-group selection=\"single\" [size]=\"'small'\">\n <button\n monaButton\n [selected]=\"linkSelected()\"\n [toggleable]=\"false\"\n (click)=\"onLinkDialogDisplay()\"\n title=\"Insert Link\">\n <i class=\"ri-link-m\"></i>\n </button>\n <button monaButton [disabled]=\"unlinkDisabled()\" (click)=\"onUnlinkClick()\" title=\"Remove Link\">\n <i class=\"ri-link-unlink-m\"></i>\n </button>\n</mona-button-group>\n", dependencies: [{ kind: "component", type: ButtonGroupComponent, selector: "mona-button-group", inputs: ["allowEmpty", "aria-label", "disabled", "look", "rounded", "selection", "size", "class"], outputs: ["buttonClick", "disabledChange", "selectionChange"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }] }); }
|
|
994
1195
|
}
|
|
995
1196
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorLinkComponent, decorators: [{
|
|
996
1197
|
type: Component,
|
|
997
|
-
args: [{ selector: "mona-editor-link", imports: [ButtonGroupComponent, ButtonDirective], template: "<mona-button-group selection=\"single\">\n <button
|
|
1198
|
+
args: [{ selector: "mona-editor-link", imports: [ButtonGroupComponent, ButtonDirective], template: "<mona-button-group selection=\"single\" [size]=\"'small'\">\n <button\n monaButton\n [selected]=\"linkSelected()\"\n [toggleable]=\"false\"\n (click)=\"onLinkDialogDisplay()\"\n title=\"Insert Link\">\n <i class=\"ri-link-m\"></i>\n </button>\n <button monaButton [disabled]=\"unlinkDisabled()\" (click)=\"onUnlinkClick()\" title=\"Remove Link\">\n <i class=\"ri-link-unlink-m\"></i>\n </button>\n</mona-button-group>\n" }]
|
|
998
1199
|
}] });
|
|
999
1200
|
|
|
1000
1201
|
class EditorListComponent {
|
|
@@ -1019,16 +1220,24 @@ class EditorListComponent {
|
|
|
1019
1220
|
this.#editorService.editor.chain().focus().toggleBulletList().run();
|
|
1020
1221
|
}
|
|
1021
1222
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1022
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorListComponent, isStandalone: true, selector: "mona-editor-list", ngImport: i0, template: "<mona-button-group selection=\"single\">\n <button\n monaButton\n [selected]=\"unorderedListSelected()\"\n (click)=\"onUnorderedListToggle()\"\n title=\"Insert unordered list\">\n <i class=\"ri-list-unordered\"></i>\n </button>\n <button
|
|
1223
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorListComponent, isStandalone: true, selector: "mona-editor-list", ngImport: i0, template: "<mona-button-group selection=\"single\" [size]=\"'small'\">\n <button\n monaButton\n [selected]=\"unorderedListSelected()\"\n [toggleable]=\"false\"\n (click)=\"onUnorderedListToggle()\"\n title=\"Insert unordered list\">\n <i class=\"ri-list-unordered\"></i>\n </button>\n <button\n monaButton\n [selected]=\"orderedListSelected()\"\n [toggleable]=\"false\"\n (click)=\"onOrderedListToggle()\"\n title=\"Insert ordered list\">\n <i class=\"ri-list-ordered-2\"></i>\n </button>\n</mona-button-group>\n", dependencies: [{ kind: "component", type: ButtonGroupComponent, selector: "mona-button-group", inputs: ["allowEmpty", "aria-label", "disabled", "look", "rounded", "selection", "size", "class"], outputs: ["buttonClick", "disabledChange", "selectionChange"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }] }); }
|
|
1023
1224
|
}
|
|
1024
1225
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorListComponent, decorators: [{
|
|
1025
1226
|
type: Component,
|
|
1026
|
-
args: [{ selector: "mona-editor-list", imports: [ButtonGroupComponent, ButtonDirective], template: "<mona-button-group selection=\"single\">\n <button\n monaButton\n [selected]=\"unorderedListSelected()\"\n (click)=\"onUnorderedListToggle()\"\n title=\"Insert unordered list\">\n <i class=\"ri-list-unordered\"></i>\n </button>\n <button
|
|
1227
|
+
args: [{ selector: "mona-editor-list", imports: [ButtonGroupComponent, ButtonDirective], template: "<mona-button-group selection=\"single\" [size]=\"'small'\">\n <button\n monaButton\n [selected]=\"unorderedListSelected()\"\n [toggleable]=\"false\"\n (click)=\"onUnorderedListToggle()\"\n title=\"Insert unordered list\">\n <i class=\"ri-list-unordered\"></i>\n </button>\n <button\n monaButton\n [selected]=\"orderedListSelected()\"\n [toggleable]=\"false\"\n (click)=\"onOrderedListToggle()\"\n title=\"Insert ordered list\">\n <i class=\"ri-list-ordered-2\"></i>\n </button>\n</mona-button-group>\n" }]
|
|
1027
1228
|
}] });
|
|
1028
1229
|
|
|
1029
1230
|
class EditorTableCreatorComponent {
|
|
1030
1231
|
constructor() {
|
|
1031
1232
|
this.highlightedCell = { row: 0, col: 0 };
|
|
1233
|
+
this.tableCreatorCellClass = computed(() => {
|
|
1234
|
+
return editorTableCreatorCellThemeVariants();
|
|
1235
|
+
}, /* @ts-ignore */
|
|
1236
|
+
...(ngDevMode ? [{ debugName: "tableCreatorCellClass" }] : /* istanbul ignore next */ []));
|
|
1237
|
+
this.tableCreatorClass = computed(() => {
|
|
1238
|
+
return editorTableCreatorThemeVariants();
|
|
1239
|
+
}, /* @ts-ignore */
|
|
1240
|
+
...(ngDevMode ? [{ debugName: "tableCreatorClass" }] : /* istanbul ignore next */ []));
|
|
1032
1241
|
this.insert = output();
|
|
1033
1242
|
}
|
|
1034
1243
|
onCellClick(row, col) {
|
|
@@ -1042,11 +1251,11 @@ class EditorTableCreatorComponent {
|
|
|
1042
1251
|
this.highlightedCell = { row: 0, col: 0 };
|
|
1043
1252
|
}
|
|
1044
1253
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorTableCreatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1045
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: EditorTableCreatorComponent, isStandalone: true, selector: "mona-editor-table-creator", outputs: { insert: "insert" }, ngImport: i0, template: "<div class=\"
|
|
1254
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: EditorTableCreatorComponent, isStandalone: true, selector: "mona-editor-table-creator", outputs: { insert: "insert" }, ngImport: i0, template: "<div [class]=\"tableCreatorClass()\" (pointerleave)=\"onCellMouseLeave()\">\n @for (rx of [1, 2, 3, 4, 5, 6, 7, 8]; track rx) {\n @for (cx of [1, 2, 3, 4, 5, 6, 7, 8]; track cx) {\n <div\n [class]=\"tableCreatorCellClass()\"\n [style.background-color]=\"\n rx <= highlightedCell.row && cx <= highlightedCell.col\n ? 'var(--color-primary)'\n : 'var(--color-surface-muted)'\n \"\n (click)=\"onCellClick(rx, cx)\"\n (pointerenter)=\"onCellMouseEnter(rx, cx)\"></div>\n }\n }\n</div>\n" }); }
|
|
1046
1255
|
}
|
|
1047
1256
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorTableCreatorComponent, decorators: [{
|
|
1048
1257
|
type: Component,
|
|
1049
|
-
args: [{ selector: "mona-editor-table-creator",
|
|
1258
|
+
args: [{ selector: "mona-editor-table-creator", template: "<div [class]=\"tableCreatorClass()\" (pointerleave)=\"onCellMouseLeave()\">\n @for (rx of [1, 2, 3, 4, 5, 6, 7, 8]; track rx) {\n @for (cx of [1, 2, 3, 4, 5, 6, 7, 8]; track cx) {\n <div\n [class]=\"tableCreatorCellClass()\"\n [style.background-color]=\"\n rx <= highlightedCell.row && cx <= highlightedCell.col\n ? 'var(--color-primary)'\n : 'var(--color-surface-muted)'\n \"\n (click)=\"onCellClick(rx, cx)\"\n (pointerenter)=\"onCellMouseEnter(rx, cx)\"></div>\n }\n }\n</div>\n" }]
|
|
1050
1259
|
}], propDecorators: { insert: [{ type: i0.Output, args: ["insert"] }] } });
|
|
1051
1260
|
|
|
1052
1261
|
class EditorTableComponent {
|
|
@@ -1164,11 +1373,11 @@ class EditorTableComponent {
|
|
|
1164
1373
|
this.#editorService.editor.chain().focus().toggleHeaderRow().run();
|
|
1165
1374
|
}
|
|
1166
1375
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1167
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: EditorTableComponent, isStandalone: true, selector: "mona-editor-table", viewQueries: [{ propertyName: "popover", first: true, predicate: ["popoverComponent"], descendants: true, isSignal: true }], ngImport: i0, template: "<mona-button-group selection=\"single\">\n <button monaButton title=\"Insert table\" #insertTableButton>\n <i class=\"ri-grid-line\"></i>\n </button>\n <button\n monaButton\n [disabled]=\"addColumnBeforeDisabled()\"\n (click)=\"onAddColumnBeforeClick()\"\n title=\"Add column before\">\n <i class=\"ri-insert-column-left\"></i>\n </button>\n <button monaButton [disabled]=\"addColumnAfterDisabled()\" (click)=\"onAddColumnAfterClick()\" title=\"Add column after\">\n <i class=\"ri-insert-column-right\"></i>\n </button>\n <button monaButton [disabled]=\"addRowBeforeDisabled()\" (click)=\"onAddRowBeforeClick()\" title=\"Add row before\">\n <i class=\"ri-insert-row-top\"></i>\n </button>\n <button monaButton [disabled]=\"addRowAfterDisabled()\" (click)=\"onAddRowAfterClick()\" title=\"Add row after\">\n <i class=\"ri-insert-row-bottom\"></i>\n </button>\n <button monaButton [disabled]=\"deleteColumnDisabled()\" (click)=\"onDeleteColumnClick()\" title=\"Delete column\">\n <i class=\"ri-delete-column\"></i>\n </button>\n <button monaButton [disabled]=\"deleteRowDisabled()\" (click)=\"onDeleteRowClick()\" title=\"Delete row\">\n <i class=\"ri-delete-row\"></i>\n </button>\n <button monaButton [disabled]=\"mergeCellsDisabled()\" (click)=\"onMergeCellsClick()\" title=\"Merge selected cells\">\n <i class=\"ri-merge-cells-horizontal\"></i>\n </button>\n <button monaButton [disabled]=\"splitCellDisabled()\" (click)=\"onSplitCellClick()\" title=\"Split cell\">\n <i class=\"ri-split-cells-horizontal\"></i>\n </button>\n <button monaButton [disabled]=\"toggleHeaderRowDisabled()\" (click)=\"onToggleHeaderRow()\" title=\"Toggle header row\">\n <i class=\"ri-table-line\"></i>\n </button>\n <button monaButton [disabled]=\"deleteTableDisabled()\" (click)=\"onDeleteTableClick()\" title=\"Delete table\">\n <i class=\"ri-close-large-line\"></i>\n </button>\n</mona-button-group>\n\n<mona-popover [target]=\"insertTableButton\" position=\"bottom\" #popoverComponent>\n <mona-editor-table-creator (insert)=\"onTableInsert($event)\"></mona-editor-table-creator>\n</mona-popover>\n",
|
|
1376
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: EditorTableComponent, isStandalone: true, selector: "mona-editor-table", viewQueries: [{ propertyName: "popover", first: true, predicate: ["popoverComponent"], descendants: true, isSignal: true }], ngImport: i0, template: "<mona-button-group selection=\"single\" [size]=\"'small'\">\n <button monaButton title=\"Insert table\" #insertTableButton>\n <i class=\"ri-grid-line\"></i>\n </button>\n <button\n monaButton\n [disabled]=\"addColumnBeforeDisabled()\"\n (click)=\"onAddColumnBeforeClick()\"\n title=\"Add column before\">\n <i class=\"ri-insert-column-left\"></i>\n </button>\n <button monaButton [disabled]=\"addColumnAfterDisabled()\" (click)=\"onAddColumnAfterClick()\" title=\"Add column after\">\n <i class=\"ri-insert-column-right\"></i>\n </button>\n <button monaButton [disabled]=\"addRowBeforeDisabled()\" (click)=\"onAddRowBeforeClick()\" title=\"Add row before\">\n <i class=\"ri-insert-row-top\"></i>\n </button>\n <button monaButton [disabled]=\"addRowAfterDisabled()\" (click)=\"onAddRowAfterClick()\" title=\"Add row after\">\n <i class=\"ri-insert-row-bottom\"></i>\n </button>\n <button monaButton [disabled]=\"deleteColumnDisabled()\" (click)=\"onDeleteColumnClick()\" title=\"Delete column\">\n <i class=\"ri-delete-column\"></i>\n </button>\n <button monaButton [disabled]=\"deleteRowDisabled()\" (click)=\"onDeleteRowClick()\" title=\"Delete row\">\n <i class=\"ri-delete-row\"></i>\n </button>\n <button monaButton [disabled]=\"mergeCellsDisabled()\" (click)=\"onMergeCellsClick()\" title=\"Merge selected cells\">\n <i class=\"ri-merge-cells-horizontal\"></i>\n </button>\n <button monaButton [disabled]=\"splitCellDisabled()\" (click)=\"onSplitCellClick()\" title=\"Split cell\">\n <i class=\"ri-split-cells-horizontal\"></i>\n </button>\n <button monaButton [disabled]=\"toggleHeaderRowDisabled()\" (click)=\"onToggleHeaderRow()\" title=\"Toggle header row\">\n <i class=\"ri-table-line\"></i>\n </button>\n <button monaButton [disabled]=\"deleteTableDisabled()\" (click)=\"onDeleteTableClick()\" title=\"Delete table\">\n <i class=\"ri-close-large-line\"></i>\n </button>\n</mona-button-group>\n\n<mona-popover [target]=\"insertTableButton\" position=\"bottom\" #popoverComponent>\n <mona-editor-table-creator (insert)=\"onTableInsert($event)\"></mona-editor-table-creator>\n</mona-popover>\n", dependencies: [{ kind: "component", type: ButtonGroupComponent, selector: "mona-button-group", inputs: ["allowEmpty", "aria-label", "disabled", "look", "rounded", "selection", "size", "class"], outputs: ["buttonClick", "disabledChange", "selectionChange"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: PopoverComponent, selector: "mona-popover", inputs: ["displayArrow", "position", "rounded", "target", "title", "trigger"], outputs: ["hide", "hidden", "show", "shown"], exportAs: ["monaPopover"] }, { kind: "component", type: EditorTableCreatorComponent, selector: "mona-editor-table-creator", outputs: ["insert"] }] }); }
|
|
1168
1377
|
}
|
|
1169
1378
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorTableComponent, decorators: [{
|
|
1170
1379
|
type: Component,
|
|
1171
|
-
args: [{ selector: "mona-editor-table", imports: [ButtonGroupComponent, ButtonDirective, PopoverComponent, EditorTableCreatorComponent], template: "<mona-button-group selection=\"single\">\n <button monaButton title=\"Insert table\" #insertTableButton>\n <i class=\"ri-grid-line\"></i>\n </button>\n <button\n monaButton\n [disabled]=\"addColumnBeforeDisabled()\"\n (click)=\"onAddColumnBeforeClick()\"\n title=\"Add column before\">\n <i class=\"ri-insert-column-left\"></i>\n </button>\n <button monaButton [disabled]=\"addColumnAfterDisabled()\" (click)=\"onAddColumnAfterClick()\" title=\"Add column after\">\n <i class=\"ri-insert-column-right\"></i>\n </button>\n <button monaButton [disabled]=\"addRowBeforeDisabled()\" (click)=\"onAddRowBeforeClick()\" title=\"Add row before\">\n <i class=\"ri-insert-row-top\"></i>\n </button>\n <button monaButton [disabled]=\"addRowAfterDisabled()\" (click)=\"onAddRowAfterClick()\" title=\"Add row after\">\n <i class=\"ri-insert-row-bottom\"></i>\n </button>\n <button monaButton [disabled]=\"deleteColumnDisabled()\" (click)=\"onDeleteColumnClick()\" title=\"Delete column\">\n <i class=\"ri-delete-column\"></i>\n </button>\n <button monaButton [disabled]=\"deleteRowDisabled()\" (click)=\"onDeleteRowClick()\" title=\"Delete row\">\n <i class=\"ri-delete-row\"></i>\n </button>\n <button monaButton [disabled]=\"mergeCellsDisabled()\" (click)=\"onMergeCellsClick()\" title=\"Merge selected cells\">\n <i class=\"ri-merge-cells-horizontal\"></i>\n </button>\n <button monaButton [disabled]=\"splitCellDisabled()\" (click)=\"onSplitCellClick()\" title=\"Split cell\">\n <i class=\"ri-split-cells-horizontal\"></i>\n </button>\n <button monaButton [disabled]=\"toggleHeaderRowDisabled()\" (click)=\"onToggleHeaderRow()\" title=\"Toggle header row\">\n <i class=\"ri-table-line\"></i>\n </button>\n <button monaButton [disabled]=\"deleteTableDisabled()\" (click)=\"onDeleteTableClick()\" title=\"Delete table\">\n <i class=\"ri-close-large-line\"></i>\n </button>\n</mona-button-group>\n\n<mona-popover [target]=\"insertTableButton\" position=\"bottom\" #popoverComponent>\n <mona-editor-table-creator (insert)=\"onTableInsert($event)\"></mona-editor-table-creator>\n</mona-popover>\n" }]
|
|
1380
|
+
args: [{ selector: "mona-editor-table", imports: [ButtonGroupComponent, ButtonDirective, PopoverComponent, EditorTableCreatorComponent], template: "<mona-button-group selection=\"single\" [size]=\"'small'\">\n <button monaButton title=\"Insert table\" #insertTableButton>\n <i class=\"ri-grid-line\"></i>\n </button>\n <button\n monaButton\n [disabled]=\"addColumnBeforeDisabled()\"\n (click)=\"onAddColumnBeforeClick()\"\n title=\"Add column before\">\n <i class=\"ri-insert-column-left\"></i>\n </button>\n <button monaButton [disabled]=\"addColumnAfterDisabled()\" (click)=\"onAddColumnAfterClick()\" title=\"Add column after\">\n <i class=\"ri-insert-column-right\"></i>\n </button>\n <button monaButton [disabled]=\"addRowBeforeDisabled()\" (click)=\"onAddRowBeforeClick()\" title=\"Add row before\">\n <i class=\"ri-insert-row-top\"></i>\n </button>\n <button monaButton [disabled]=\"addRowAfterDisabled()\" (click)=\"onAddRowAfterClick()\" title=\"Add row after\">\n <i class=\"ri-insert-row-bottom\"></i>\n </button>\n <button monaButton [disabled]=\"deleteColumnDisabled()\" (click)=\"onDeleteColumnClick()\" title=\"Delete column\">\n <i class=\"ri-delete-column\"></i>\n </button>\n <button monaButton [disabled]=\"deleteRowDisabled()\" (click)=\"onDeleteRowClick()\" title=\"Delete row\">\n <i class=\"ri-delete-row\"></i>\n </button>\n <button monaButton [disabled]=\"mergeCellsDisabled()\" (click)=\"onMergeCellsClick()\" title=\"Merge selected cells\">\n <i class=\"ri-merge-cells-horizontal\"></i>\n </button>\n <button monaButton [disabled]=\"splitCellDisabled()\" (click)=\"onSplitCellClick()\" title=\"Split cell\">\n <i class=\"ri-split-cells-horizontal\"></i>\n </button>\n <button monaButton [disabled]=\"toggleHeaderRowDisabled()\" (click)=\"onToggleHeaderRow()\" title=\"Toggle header row\">\n <i class=\"ri-table-line\"></i>\n </button>\n <button monaButton [disabled]=\"deleteTableDisabled()\" (click)=\"onDeleteTableClick()\" title=\"Delete table\">\n <i class=\"ri-close-large-line\"></i>\n </button>\n</mona-button-group>\n\n<mona-popover [target]=\"insertTableButton\" position=\"bottom\" #popoverComponent>\n <mona-editor-table-creator (insert)=\"onTableInsert($event)\"></mona-editor-table-creator>\n</mona-popover>\n" }]
|
|
1172
1381
|
}], propDecorators: { popover: [{ type: i0.ViewChild, args: ["popoverComponent", { isSignal: true }] }] } });
|
|
1173
1382
|
|
|
1174
1383
|
class EditorTaskListComponent {
|
|
@@ -1185,11 +1394,11 @@ class EditorTaskListComponent {
|
|
|
1185
1394
|
this.#editorService.editor.chain().focus().toggleTaskList().run();
|
|
1186
1395
|
}
|
|
1187
1396
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorTaskListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1188
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorTaskListComponent, isStandalone: true, selector: "mona-editor-task-list", ngImport: i0, template: "<button monaButton [selected]=\"taskSelected()\" (click)=\"onTaskToggle()\" title=\"Insert task list\">\n <i class=\"ri-checkbox-fill\"></i>\n</button>\n",
|
|
1397
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorTaskListComponent, isStandalone: true, selector: "mona-editor-task-list", ngImport: i0, template: "<button monaButton [selected]=\"taskSelected()\" [size]=\"'small'\" (click)=\"onTaskToggle()\" title=\"Insert task list\">\n <i class=\"ri-checkbox-fill\"></i>\n</button>\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }] }); }
|
|
1189
1398
|
}
|
|
1190
1399
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorTaskListComponent, decorators: [{
|
|
1191
1400
|
type: Component,
|
|
1192
|
-
args: [{ selector: "mona-editor-task-list", imports: [ButtonDirective], template: "<button monaButton [selected]=\"taskSelected()\" (click)=\"onTaskToggle()\" title=\"Insert task list\">\n <i class=\"ri-checkbox-fill\"></i>\n</button>\n" }]
|
|
1401
|
+
args: [{ selector: "mona-editor-task-list", imports: [ButtonDirective], template: "<button monaButton [selected]=\"taskSelected()\" [size]=\"'small'\" (click)=\"onTaskToggle()\" title=\"Insert task list\">\n <i class=\"ri-checkbox-fill\"></i>\n</button>\n" }]
|
|
1193
1402
|
}] });
|
|
1194
1403
|
|
|
1195
1404
|
class EditorTextAlignmentsComponent {
|
|
@@ -1250,51 +1459,65 @@ class EditorTextAlignmentsComponent {
|
|
|
1250
1459
|
}
|
|
1251
1460
|
}
|
|
1252
1461
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorTextAlignmentsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1253
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorTextAlignmentsComponent, isStandalone: true, selector: "mona-editor-text-alignments", ngImport: i0, template: "<mona-button-group selection=\"single\">\
|
|
1462
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EditorTextAlignmentsComponent, isStandalone: true, selector: "mona-editor-text-alignments", ngImport: i0, template: "<mona-button-group selection=\"single\" [size]=\"'small'\">\n <button\n monaButton\n [selected]=\"alignLeftSelected()\"\n [toggleable]=\"false\"\n (click)=\"onAlignLeft()\"\n title=\"Align text left\">\n <i class=\"ri-align-left\"></i>\n </button>\n <button\n monaButton\n [selected]=\"alignCenterSelected()\"\n [toggleable]=\"false\"\n (click)=\"onAlignCenter()\"\n title=\"Center text\">\n <i class=\"ri-align-center\"></i>\n </button>\n <button\n monaButton\n [selected]=\"alignRightSelected()\"\n [toggleable]=\"false\"\n (click)=\"onAlignRight()\"\n title=\"Align text right\">\n <i class=\"ri-align-right\"></i>\n </button>\n <button\n monaButton\n [selected]=\"alignJustifySelected()\"\n [toggleable]=\"false\"\n (click)=\"onAlignJustify()\"\n title=\"Justify\">\n <i class=\"ri-align-justify\"></i>\n </button>\n</mona-button-group>\n", dependencies: [{ kind: "component", type: ButtonGroupComponent, selector: "mona-button-group", inputs: ["allowEmpty", "aria-label", "disabled", "look", "rounded", "selection", "size", "class"], outputs: ["buttonClick", "disabledChange", "selectionChange"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }] }); }
|
|
1254
1463
|
}
|
|
1255
1464
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorTextAlignmentsComponent, decorators: [{
|
|
1256
1465
|
type: Component,
|
|
1257
|
-
args: [{ selector: "mona-editor-text-alignments", imports: [ButtonGroupComponent, ButtonDirective], template: "<mona-button-group selection=\"single\">\
|
|
1466
|
+
args: [{ selector: "mona-editor-text-alignments", imports: [ButtonGroupComponent, ButtonDirective], template: "<mona-button-group selection=\"single\" [size]=\"'small'\">\n <button\n monaButton\n [selected]=\"alignLeftSelected()\"\n [toggleable]=\"false\"\n (click)=\"onAlignLeft()\"\n title=\"Align text left\">\n <i class=\"ri-align-left\"></i>\n </button>\n <button\n monaButton\n [selected]=\"alignCenterSelected()\"\n [toggleable]=\"false\"\n (click)=\"onAlignCenter()\"\n title=\"Center text\">\n <i class=\"ri-align-center\"></i>\n </button>\n <button\n monaButton\n [selected]=\"alignRightSelected()\"\n [toggleable]=\"false\"\n (click)=\"onAlignRight()\"\n title=\"Align text right\">\n <i class=\"ri-align-right\"></i>\n </button>\n <button\n monaButton\n [selected]=\"alignJustifySelected()\"\n [toggleable]=\"false\"\n (click)=\"onAlignJustify()\"\n title=\"Justify\">\n <i class=\"ri-align-justify\"></i>\n </button>\n</mona-button-group>\n" }]
|
|
1258
1467
|
}] });
|
|
1259
1468
|
|
|
1260
1469
|
class EditorComponent {
|
|
1470
|
+
#destroyRef;
|
|
1261
1471
|
constructor() {
|
|
1472
|
+
this.#destroyRef = inject(DestroyRef);
|
|
1473
|
+
this.baseClass = computed(() => {
|
|
1474
|
+
const userClass = this.userClass();
|
|
1475
|
+
const variantClass = editorBaseThemeVariants();
|
|
1476
|
+
return twMerge(variantClass, userClass);
|
|
1477
|
+
}, /* @ts-ignore */
|
|
1478
|
+
...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
|
|
1479
|
+
this.containerClass = computed(() => {
|
|
1480
|
+
return editorContainerThemeVariants();
|
|
1481
|
+
}, /* @ts-ignore */
|
|
1482
|
+
...(ngDevMode ? [{ debugName: "containerClass" }] : /* istanbul ignore next */ []));
|
|
1262
1483
|
this.editorContainer = viewChild.required("editorContainer", /* @ts-ignore */
|
|
1263
1484
|
...(ngDevMode ? [{ debugName: "editorContainer" }] : /* istanbul ignore next */ []));
|
|
1264
1485
|
this.editorService = inject(EditorService);
|
|
1486
|
+
this.toolbarClass = computed(() => {
|
|
1487
|
+
return editorToolbarThemeVariants();
|
|
1488
|
+
}, /* @ts-ignore */
|
|
1489
|
+
...(ngDevMode ? [{ debugName: "toolbarClass" }] : /* istanbul ignore next */ []));
|
|
1265
1490
|
/**
|
|
1266
|
-
* Emits when the editor loses focus.
|
|
1491
|
+
* @description Emits when the editor loses focus.
|
|
1267
1492
|
*/
|
|
1268
1493
|
this.blur = output();
|
|
1269
1494
|
/**
|
|
1270
|
-
* Emits when the editor is created for the first time and is ready to be used.
|
|
1495
|
+
* @description Emits when the editor is created for the first time and is ready to be used.
|
|
1271
1496
|
*/
|
|
1272
1497
|
this.create = output();
|
|
1273
1498
|
/**
|
|
1274
|
-
* Emits when the editor gains focus.
|
|
1499
|
+
* @description Emits when the editor gains focus.
|
|
1275
1500
|
*/
|
|
1276
1501
|
this.focus = output();
|
|
1277
1502
|
/**
|
|
1278
|
-
* Emits when the selection of the editor changes.
|
|
1503
|
+
* @description Emits when the selection of the editor changes.
|
|
1279
1504
|
*/
|
|
1280
1505
|
this.selectionUpdate = output();
|
|
1281
1506
|
/**
|
|
1282
|
-
* Emits when the content of the editor changes.
|
|
1507
|
+
* @description Emits when the content of the editor changes.
|
|
1283
1508
|
*/
|
|
1284
1509
|
this.update = output();
|
|
1285
1510
|
/**
|
|
1286
|
-
* The initial content of the editor.
|
|
1287
|
-
* Accepted values are:
|
|
1288
|
-
* - A string representing the HTML content.
|
|
1289
|
-
* - A {@link JSONContent} representing the content.
|
|
1511
|
+
* @description The initial content of the editor.
|
|
1290
1512
|
*/
|
|
1291
1513
|
this.content = input(/* @ts-ignore */
|
|
1292
1514
|
...(ngDevMode ? [undefined, { debugName: "content" }] : /* istanbul ignore next */ []));
|
|
1293
1515
|
/**
|
|
1294
|
-
* The settings of the editor.
|
|
1516
|
+
* @description The settings of the editor.
|
|
1295
1517
|
*/
|
|
1296
1518
|
this.settings = input({}, /* @ts-ignore */
|
|
1297
1519
|
...(ngDevMode ? [{ debugName: "settings" }] : /* istanbul ignore next */ []));
|
|
1520
|
+
this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
|
|
1298
1521
|
effect(() => {
|
|
1299
1522
|
const settings = this.settings();
|
|
1300
1523
|
untracked(() => {
|
|
@@ -1307,12 +1530,10 @@ class EditorComponent {
|
|
|
1307
1530
|
this.loadEditorContent(content);
|
|
1308
1531
|
});
|
|
1309
1532
|
});
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
ngOnInit() {
|
|
1315
|
-
this.setSubscriptions();
|
|
1533
|
+
afterNextRender({
|
|
1534
|
+
read: () => this.setSubscriptions()
|
|
1535
|
+
});
|
|
1536
|
+
this.#destroyRef.onDestroy(() => this.editorService.destroy());
|
|
1316
1537
|
}
|
|
1317
1538
|
loadEditorContent(content) {
|
|
1318
1539
|
if (typeof content === "string") {
|
|
@@ -1326,19 +1547,19 @@ class EditorComponent {
|
|
|
1326
1547
|
}
|
|
1327
1548
|
}
|
|
1328
1549
|
setSubscriptions() {
|
|
1329
|
-
this.editorService.blur$.subscribe(() => {
|
|
1550
|
+
this.editorService.blur$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => {
|
|
1330
1551
|
this.blur.emit();
|
|
1331
1552
|
});
|
|
1332
|
-
this.editorService.create$.subscribe(() => {
|
|
1553
|
+
this.editorService.create$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => {
|
|
1333
1554
|
this.create.emit();
|
|
1334
1555
|
});
|
|
1335
|
-
this.editorService.focus$.subscribe(() => {
|
|
1556
|
+
this.editorService.focus$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => {
|
|
1336
1557
|
this.focus.emit();
|
|
1337
1558
|
});
|
|
1338
|
-
this.editorService.selectionUpdate$.subscribe(() => {
|
|
1559
|
+
this.editorService.selectionUpdate$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => {
|
|
1339
1560
|
this.selectionUpdate.emit();
|
|
1340
1561
|
});
|
|
1341
|
-
this.editorService.update$.subscribe(() => {
|
|
1562
|
+
this.editorService.update$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => {
|
|
1342
1563
|
this.update.emit({
|
|
1343
1564
|
html: this.html,
|
|
1344
1565
|
json: this.json
|
|
@@ -1360,7 +1581,7 @@ class EditorComponent {
|
|
|
1360
1581
|
return this.editorService.editor.getJSON();
|
|
1361
1582
|
}
|
|
1362
1583
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1363
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: EditorComponent, isStandalone: true, selector: "mona-editor", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { blur: "blur", create: "create", focus: "focus", selectionUpdate: "selectionUpdate", update: "update" }, host: {
|
|
1584
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: EditorComponent, isStandalone: true, selector: "mona-editor", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { blur: "blur", create: "create", focus: "focus", selectionUpdate: "selectionUpdate", update: "update" }, host: { properties: { "class": "baseClass()" } }, providers: [EditorService], viewQueries: [{ propertyName: "editorContainer", first: true, predicate: ["editorContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"toolbarClass()\">\n <mona-editor-basic-text-styles></mona-editor-basic-text-styles>\n @if (editorService.settings().headings) {\n <mona-editor-headings></mona-editor-headings>\n }\n @if (editorService.settings().alignment) {\n <mona-editor-text-alignments></mona-editor-text-alignments>\n }\n @if (editorService.settings().fontSize) {\n <mona-editor-font-size></mona-editor-font-size>\n }\n @if (editorService.settings().fontFamily) {\n <mona-editor-font-family></mona-editor-font-family>\n }\n @if (editorService.settings().fontColor) {\n <mona-editor-font-color></mona-editor-font-color>\n }\n @if (editorService.settings().fontHighlight) {\n <mona-editor-font-highlight></mona-editor-font-highlight>\n }\n @if (editorService.settings().blockquote) {\n <mona-editor-blockquote></mona-editor-blockquote>\n }\n @if (editorService.settings().code) {\n <mona-editor-code-block></mona-editor-code-block>\n }\n @if (editorService.settings().link) {\n <mona-editor-link></mona-editor-link>\n }\n @if (editorService.settings().list) {\n <mona-editor-list></mona-editor-list>\n }\n @if (editorService.settings().taskList) {\n <mona-editor-task-list></mona-editor-task-list>\n }\n @if (editorService.settings().indent) {\n <mona-editor-indent></mona-editor-indent>\n }\n @if (editorService.settings().history) {\n <mona-editor-history></mona-editor-history>\n }\n @if (editorService.settings().horizontalRule) {\n <mona-editor-horizontal-rule></mona-editor-horizontal-rule>\n }\n @if (editorService.settings().image) {\n <mona-editor-image></mona-editor-image>\n }\n @if (editorService.settings().table) {\n <mona-editor-table></mona-editor-table>\n }\n</div>\n<div [class]=\"containerClass()\" #editorContainer></div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "component", type: EditorBasicTextStylesComponent, selector: "mona-editor-basic-text-styles" }, { kind: "component", type: EditorHeadingsComponent, selector: "mona-editor-headings" }, { kind: "component", type: EditorTextAlignmentsComponent, selector: "mona-editor-text-alignments" }, { kind: "component", type: EditorFontSizeComponent, selector: "mona-editor-font-size" }, { kind: "component", type: EditorFontColorComponent, selector: "mona-editor-font-color" }, { kind: "component", type: EditorFontHighlightComponent, selector: "mona-editor-font-highlight" }, { kind: "component", type: EditorBlockquoteComponent, selector: "mona-editor-blockquote" }, { kind: "component", type: EditorLinkComponent, selector: "mona-editor-link" }, { kind: "component", type: EditorListComponent, selector: "mona-editor-list" }, { kind: "component", type: EditorIndentComponent, selector: "mona-editor-indent" }, { kind: "component", type: EditorHistoryComponent, selector: "mona-editor-history" }, { kind: "component", type: EditorFontFamilyComponent, selector: "mona-editor-font-family" }, { kind: "component", type: EditorHorizontalRuleComponent, selector: "mona-editor-horizontal-rule" }, { kind: "component", type: EditorTaskListComponent, selector: "mona-editor-task-list" }, { kind: "component", type: EditorImageComponent, selector: "mona-editor-image" }, { kind: "component", type: EditorTableComponent, selector: "mona-editor-table" }, { kind: "component", type: EditorCodeBlockComponent, selector: "mona-editor-code-block" }] }); }
|
|
1364
1585
|
}
|
|
1365
1586
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorComponent, decorators: [{
|
|
1366
1587
|
type: Component,
|
|
@@ -1384,9 +1605,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
1384
1605
|
EditorTableComponent,
|
|
1385
1606
|
EditorCodeBlockComponent
|
|
1386
1607
|
], providers: [EditorService], host: {
|
|
1387
|
-
class: "
|
|
1388
|
-
}, template: "<div class=\"
|
|
1389
|
-
}], ctorParameters: () => [], propDecorators: { editorContainer: [{ type: i0.ViewChild, args: ["editorContainer", { isSignal: true }] }], blur: [{ type: i0.Output, args: ["blur"] }], create: [{ type: i0.Output, args: ["create"] }], focus: [{ type: i0.Output, args: ["focus"] }], selectionUpdate: [{ type: i0.Output, args: ["selectionUpdate"] }], update: [{ type: i0.Output, args: ["update"] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], settings: [{ type: i0.Input, args: [{ isSignal: true, alias: "settings", required: false }] }] } });
|
|
1608
|
+
"[class]": "baseClass()"
|
|
1609
|
+
}, template: "<div [class]=\"toolbarClass()\">\n <mona-editor-basic-text-styles></mona-editor-basic-text-styles>\n @if (editorService.settings().headings) {\n <mona-editor-headings></mona-editor-headings>\n }\n @if (editorService.settings().alignment) {\n <mona-editor-text-alignments></mona-editor-text-alignments>\n }\n @if (editorService.settings().fontSize) {\n <mona-editor-font-size></mona-editor-font-size>\n }\n @if (editorService.settings().fontFamily) {\n <mona-editor-font-family></mona-editor-font-family>\n }\n @if (editorService.settings().fontColor) {\n <mona-editor-font-color></mona-editor-font-color>\n }\n @if (editorService.settings().fontHighlight) {\n <mona-editor-font-highlight></mona-editor-font-highlight>\n }\n @if (editorService.settings().blockquote) {\n <mona-editor-blockquote></mona-editor-blockquote>\n }\n @if (editorService.settings().code) {\n <mona-editor-code-block></mona-editor-code-block>\n }\n @if (editorService.settings().link) {\n <mona-editor-link></mona-editor-link>\n }\n @if (editorService.settings().list) {\n <mona-editor-list></mona-editor-list>\n }\n @if (editorService.settings().taskList) {\n <mona-editor-task-list></mona-editor-task-list>\n }\n @if (editorService.settings().indent) {\n <mona-editor-indent></mona-editor-indent>\n }\n @if (editorService.settings().history) {\n <mona-editor-history></mona-editor-history>\n }\n @if (editorService.settings().horizontalRule) {\n <mona-editor-horizontal-rule></mona-editor-horizontal-rule>\n }\n @if (editorService.settings().image) {\n <mona-editor-image></mona-editor-image>\n }\n @if (editorService.settings().table) {\n <mona-editor-table></mona-editor-table>\n }\n</div>\n<div [class]=\"containerClass()\" #editorContainer></div>\n" }]
|
|
1610
|
+
}], ctorParameters: () => [], propDecorators: { editorContainer: [{ type: i0.ViewChild, args: ["editorContainer", { isSignal: true }] }], blur: [{ type: i0.Output, args: ["blur"] }], create: [{ type: i0.Output, args: ["create"] }], focus: [{ type: i0.Output, args: ["focus"] }], selectionUpdate: [{ type: i0.Output, args: ["selectionUpdate"] }], update: [{ type: i0.Output, args: ["update"] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], settings: [{ type: i0.Input, args: [{ isSignal: true, alias: "settings", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
1390
1611
|
|
|
1391
1612
|
/*
|
|
1392
1613
|
* Public API Surface of @nanahoshi/mona-ui/editor
|