@aeris-ui/core 22.0.0-alpha.1 → 22.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +200 -191
- package/fesm2022/aeris-ui-core-accordion.mjs +646 -255
- package/fesm2022/aeris-ui-core-accordion.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +284 -103
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-complete.mjs +1228 -446
- package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-focus.mjs +111 -61
- package/fesm2022/aeris-ui-core-auto-focus.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-avatar.mjs +383 -101
- package/fesm2022/aeris-ui-core-avatar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-badge.mjs +562 -115
- package/fesm2022/aeris-ui-core-badge.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-block-ui.mjs +209 -101
- package/fesm2022/aeris-ui-core-block-ui.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-breadcrumb.mjs +581 -189
- package/fesm2022/aeris-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button-group.mjs +153 -38
- package/fesm2022/aeris-ui-core-button-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button.mjs +741 -139
- package/fesm2022/aeris-ui-core-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-card.mjs +371 -101
- package/fesm2022/aeris-ui-core-card.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-carousel.mjs +773 -369
- package/fesm2022/aeris-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-cascade-select.mjs +1171 -521
- package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chart.mjs +455 -258
- package/fesm2022/aeris-ui-core-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-checkbox.mjs +440 -140
- package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chip.mjs +430 -117
- package/fesm2022/aeris-ui-core-chip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-class-names.mjs +87 -65
- package/fesm2022/aeris-ui-core-class-names.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-code-block.mjs +637 -0
- package/fesm2022/aeris-ui-core-code-block.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-color-picker.mjs +1340 -700
- package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-compare.mjs +823 -318
- package/fesm2022/aeris-ui-core-compare.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs +1404 -555
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-popup.mjs +1471 -740
- package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-context-menu.mjs +918 -443
- package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-date-picker.mjs +1942 -1123
- package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dialog.mjs +1079 -346
- package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-divider.mjs +204 -43
- package/fesm2022/aeris-ui-core-divider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-drawer.mjs +1015 -322
- package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +410 -254
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-editor.mjs +967 -587
- package/fesm2022/aeris-ui-core-editor.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-file-upload.mjs +1379 -522
- package/fesm2022/aeris-ui-core-file-upload.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-filter-service.mjs +258 -301
- package/fesm2022/aeris-ui-core-filter-service.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-fluid.mjs +68 -21
- package/fesm2022/aeris-ui-core-fluid.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-focus-trap.mjs +206 -182
- package/fesm2022/aeris-ui-core-focus-trap.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-form-field.mjs +688 -0
- package/fesm2022/aeris-ui-core-form-field.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-galleria.mjs +2446 -1117
- package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-glass.mjs +110 -33
- package/fesm2022/aeris-ui-core-glass.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-icon-field.mjs +426 -98
- package/fesm2022/aeris-ui-core-icon-field.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-inplace.mjs +452 -130
- package/fesm2022/aeris-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-group.mjs +413 -107
- package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-mask.mjs +658 -255
- package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-number.mjs +926 -291
- package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-otp.mjs +678 -264
- package/fesm2022/aeris-ui-core-input-otp.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-text.mjs +625 -158
- package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-key-filter.mjs +263 -201
- package/fesm2022/aeris-ui-core-key-filter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-mega-menu.mjs +613 -382
- package/fesm2022/aeris-ui-core-mega-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menu.mjs +1062 -472
- package/fesm2022/aeris-ui-core-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menubar.mjs +994 -393
- package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-message.mjs +477 -145
- package/fesm2022/aeris-ui-core-message.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-meter-group.mjs +623 -230
- package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-multi-select.mjs +1598 -561
- package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-order-list.mjs +592 -220
- package/fesm2022/aeris-ui-core-order-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-organization-chart.mjs +485 -199
- package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-paginator.mjs +428 -123
- package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-panel.mjs +596 -196
- package/fesm2022/aeris-ui-core-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-password.mjs +925 -249
- package/fesm2022/aeris-ui-core-password.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-pick-list.mjs +1280 -659
- package/fesm2022/aeris-ui-core-pick-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-popover.mjs +912 -375
- package/fesm2022/aeris-ui-core-popover.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-bar.mjs +549 -176
- package/fesm2022/aeris-ui-core-progress-bar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-spinner.mjs +410 -133
- package/fesm2022/aeris-ui-core-progress-spinner.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-radio-button.mjs +394 -124
- package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-rating.mjs +506 -231
- package/fesm2022/aeris-ui-core-rating.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-panel.mjs +457 -154
- package/fesm2022/aeris-ui-core-scroll-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-top.mjs +226 -63
- package/fesm2022/aeris-ui-core-scroll-top.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-select.mjs +1845 -648
- package/fesm2022/aeris-ui-core-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-skeleton.mjs +149 -45
- package/fesm2022/aeris-ui-core-skeleton.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-slider.mjs +884 -430
- package/fesm2022/aeris-ui-core-slider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-speed-dial.mjs +861 -337
- package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-split-button.mjs +955 -266
- package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-splitter.mjs +812 -352
- package/fesm2022/aeris-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-stepper.mjs +697 -254
- package/fesm2022/aeris-ui-core-stepper.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-style-class.mjs +587 -342
- package/fesm2022/aeris-ui-core-style-class.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-table.mjs +2034 -869
- package/fesm2022/aeris-ui-core-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tabs.mjs +789 -279
- package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-textarea.mjs +856 -219
- package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theme-builder.mjs +1284 -1399
- package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theming.mjs +132 -144
- package/fesm2022/aeris-ui-core-theming.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tiered-menu.mjs +909 -441
- package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-timeline.mjs +407 -131
- package/fesm2022/aeris-ui-core-timeline.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toast.mjs +1076 -384
- package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toggle-switch.mjs +398 -132
- package/fesm2022/aeris-ui-core-toggle-switch.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toolbar.mjs +458 -121
- package/fesm2022/aeris-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tooltip.mjs +625 -330
- package/fesm2022/aeris-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-select.mjs +1453 -621
- package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-table.mjs +2019 -940
- package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree.mjs +1107 -658
- package/fesm2022/aeris-ui-core-tree.mjs.map +1 -1
- package/fesm2022/aeris-ui-core.mjs +985 -316
- package/fesm2022/aeris-ui-core.mjs.map +1 -1
- package/package.json +20 -8
- package/schematics/ng-add/schema.json +1 -1
- package/schematics/runtime/schematics/ng-add/options.js +4 -4
- package/schematics/runtime/schematics/ng-add/options.js.map +1 -1
- package/schematics/runtime/schematics/ng-add/workspace.js +1 -1
- package/schematics/runtime/schematics/ng-add/workspace.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-contrast.js +6 -17
- package/schematics/runtime/theme-builder/aeris-contrast.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-foundation.js +10 -4
- package/schematics/runtime/theme-builder/aeris-foundation.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-semantic-tones.js +28 -5
- package/schematics/runtime/theme-builder/aeris-semantic-tones.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-generator.js +2 -2
- package/schematics/runtime/theme-builder/aeris-theme-generator.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-resolver.js +22 -8
- package/schematics/runtime/theme-builder/aeris-theme-resolver.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-tokens.js +12 -4
- package/schematics/runtime/theme-builder/aeris-theme-tokens.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-validation.js +7 -1
- package/schematics/runtime/theme-builder/aeris-theme-validation.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme.js +49 -33
- package/schematics/runtime/theme-builder/aeris-theme.js.map +1 -1
- package/styles/_fallback-colors.scss +10 -0
- package/styles/_mobile.scss +16 -0
- package/styles/_tokens.scss +5 -5
- package/styles/aeris.css +412 -125
- package/styles/controls.css +61 -29
- package/tools/aeris-theme.mjs +2 -2
- package/tools/aeris-theme.schema.json +5 -2
- package/types/aeris-ui-core-accordion.d.ts +167 -93
- package/types/aeris-ui-core-animate-on-scroll.d.ts +72 -31
- package/types/aeris-ui-core-auto-complete.d.ts +327 -140
- package/types/aeris-ui-core-auto-focus.d.ts +24 -16
- package/types/aeris-ui-core-avatar.d.ts +112 -42
- package/types/aeris-ui-core-badge.d.ts +160 -46
- package/types/aeris-ui-core-block-ui.d.ts +47 -27
- package/types/aeris-ui-core-breadcrumb.d.ts +163 -92
- package/types/aeris-ui-core-button-group.d.ts +37 -16
- package/types/aeris-ui-core-button.d.ts +226 -67
- package/types/aeris-ui-core-card.d.ts +74 -37
- package/types/aeris-ui-core-carousel.d.ts +201 -117
- package/types/aeris-ui-core-cascade-select.d.ts +257 -123
- package/types/aeris-ui-core-chart.d.ts +134 -84
- package/types/aeris-ui-core-checkbox.d.ts +139 -54
- package/types/aeris-ui-core-chip.d.ts +116 -51
- package/types/aeris-ui-core-class-names.d.ts +22 -20
- package/types/aeris-ui-core-code-block.d.ts +188 -0
- package/types/aeris-ui-core-color-picker.d.ts +348 -143
- package/types/aeris-ui-core-compare.d.ts +224 -102
- package/types/aeris-ui-core-confirm-dialog.d.ts +442 -245
- package/types/aeris-ui-core-confirm-popup.d.ts +442 -263
- package/types/aeris-ui-core-context-menu.d.ts +264 -146
- package/types/aeris-ui-core-date-picker.d.ts +489 -217
- package/types/aeris-ui-core-dialog.d.ts +288 -117
- package/types/aeris-ui-core-divider.d.ts +58 -20
- package/types/aeris-ui-core-drawer.d.ts +273 -112
- package/types/aeris-ui-core-dynamic-dialog.d.ts +158 -137
- package/types/aeris-ui-core-editor.d.ts +250 -123
- package/types/aeris-ui-core-file-upload.d.ts +367 -197
- package/types/aeris-ui-core-filter-service.d.ts +48 -52
- package/types/aeris-ui-core-fluid.d.ts +12 -9
- package/types/aeris-ui-core-focus-trap.d.ts +39 -31
- package/types/aeris-ui-core-form-field.d.ts +163 -0
- package/types/aeris-ui-core-galleria.d.ts +588 -256
- package/types/aeris-ui-core-glass.d.ts +24 -11
- package/types/aeris-ui-core-icon-field.d.ts +94 -32
- package/types/aeris-ui-core-inplace.d.ts +123 -62
- package/types/aeris-ui-core-input-group.d.ts +84 -33
- package/types/aeris-ui-core-input-mask.d.ts +194 -69
- package/types/aeris-ui-core-input-number.d.ts +272 -87
- package/types/aeris-ui-core-input-otp.d.ts +191 -81
- package/types/aeris-ui-core-input-text.d.ts +185 -60
- package/types/aeris-ui-core-key-filter.d.ts +53 -39
- package/types/aeris-ui-core-mega-menu.d.ts +175 -121
- package/types/aeris-ui-core-menu.d.ts +277 -168
- package/types/aeris-ui-core-menubar.d.ts +273 -135
- package/types/aeris-ui-core-message.d.ts +132 -60
- package/types/aeris-ui-core-meter-group.d.ts +163 -90
- package/types/aeris-ui-core-multi-select.d.ts +439 -180
- package/types/aeris-ui-core-order-list.d.ts +144 -66
- package/types/aeris-ui-core-organization-chart.d.ts +133 -77
- package/types/aeris-ui-core-paginator.d.ts +93 -38
- package/types/aeris-ui-core-panel.d.ts +149 -78
- package/types/aeris-ui-core-password.d.ts +258 -102
- package/types/aeris-ui-core-pick-list.d.ts +374 -179
- package/types/aeris-ui-core-popover.d.ts +219 -105
- package/types/aeris-ui-core-progress-bar.d.ts +157 -73
- package/types/aeris-ui-core-progress-spinner.d.ts +110 -48
- package/types/aeris-ui-core-radio-button.d.ts +124 -50
- package/types/aeris-ui-core-rating.d.ts +149 -76
- package/types/aeris-ui-core-scroll-panel.d.ts +142 -64
- package/types/aeris-ui-core-scroll-top.d.ts +66 -29
- package/types/aeris-ui-core-select.d.ts +475 -217
- package/types/aeris-ui-core-skeleton.d.ts +39 -17
- package/types/aeris-ui-core-slider.d.ts +270 -115
- package/types/aeris-ui-core-speed-dial.d.ts +241 -111
- package/types/aeris-ui-core-split-button.d.ts +267 -113
- package/types/aeris-ui-core-splitter.d.ts +225 -106
- package/types/aeris-ui-core-stepper.d.ts +184 -91
- package/types/aeris-ui-core-style-class.d.ts +141 -71
- package/types/aeris-ui-core-table.d.ts +596 -304
- package/types/aeris-ui-core-tabs.d.ts +181 -76
- package/types/aeris-ui-core-textarea.d.ts +261 -78
- package/types/aeris-ui-core-theme-builder.d.ts +472 -450
- package/types/aeris-ui-core-theming.d.ts +42 -45
- package/types/aeris-ui-core-tiered-menu.d.ts +251 -142
- package/types/aeris-ui-core-timeline.d.ts +109 -71
- package/types/aeris-ui-core-toast.d.ts +225 -115
- package/types/aeris-ui-core-toggle-switch.d.ts +125 -51
- package/types/aeris-ui-core-toolbar.d.ts +98 -41
- package/types/aeris-ui-core-tooltip.d.ts +157 -88
- package/types/aeris-ui-core-tree-select.d.ts +364 -171
- package/types/aeris-ui-core-tree-table.d.ts +566 -286
- package/types/aeris-ui-core-tree.d.ts +270 -165
- package/types/aeris-ui-core.d.ts +197 -72
|
@@ -1,561 +1,718 @@
|
|
|
1
|
-
import { DOCUMENT } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import { NG_VALUE_ACCESSOR } from
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { $
|
|
8
|
-
import { $
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
1
|
+
import { DOCUMENT } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { Component, SecurityContext, ViewEncapsulation, booleanAttribute, computed, effect, forwardRef, inject, input, model, output, signal, viewChild } from "@angular/core";
|
|
4
|
+
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
5
|
+
import { ɵaerisDisplayInvalid } from "@aeris-ui/core";
|
|
6
|
+
import { DomSanitizer } from "@angular/platform-browser";
|
|
7
|
+
import { $createParagraphNode, $getRoot, $getSelection, $isElementNode, $isRangeSelection, $isTextNode, COMMAND_PRIORITY_LOW, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, INDENT_CONTENT_COMMAND, OUTDENT_CONTENT_COMMAND, REDO_COMMAND, SELECTION_CHANGE_COMMAND, UNDO_COMMAND, createEditor } from "lexical";
|
|
8
|
+
import { $createHeadingNode, $createQuoteNode, HeadingNode, QuoteNode, registerRichText } from "@lexical/rich-text";
|
|
9
|
+
import { $generateHtmlFromNodes, $generateNodesFromDOM } from "@lexical/html";
|
|
10
|
+
import { INSERT_CHECK_LIST_COMMAND, INSERT_ORDERED_LIST_COMMAND, INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode, REMOVE_LIST_COMMAND, registerCheckList, registerList } from "@lexical/list";
|
|
11
|
+
import { createEmptyHistoryState, registerHistory } from "@lexical/history";
|
|
12
|
+
import { $setBlocksType } from "@lexical/selection";
|
|
13
13
|
const AERIS_EDITOR_DEFAULT_FORMATS = [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
"undo",
|
|
15
|
+
"redo",
|
|
16
|
+
"bold",
|
|
17
|
+
"italic",
|
|
18
|
+
"underline",
|
|
19
|
+
"heading",
|
|
20
|
+
"quote",
|
|
21
|
+
"bulletList",
|
|
22
|
+
"numberedList"
|
|
23
23
|
];
|
|
24
24
|
const AERIS_EDITOR_ALL_FORMATS = [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
25
|
+
"undo",
|
|
26
|
+
"redo",
|
|
27
|
+
"bold",
|
|
28
|
+
"italic",
|
|
29
|
+
"underline",
|
|
30
|
+
"strikethrough",
|
|
31
|
+
"code",
|
|
32
|
+
"highlight",
|
|
33
|
+
"subscript",
|
|
34
|
+
"superscript",
|
|
35
|
+
"lowercase",
|
|
36
|
+
"uppercase",
|
|
37
|
+
"capitalize",
|
|
38
|
+
"paragraph",
|
|
39
|
+
"heading1",
|
|
40
|
+
"heading2",
|
|
41
|
+
"heading3",
|
|
42
|
+
"heading4",
|
|
43
|
+
"heading5",
|
|
44
|
+
"heading6",
|
|
45
|
+
"quote",
|
|
46
|
+
"bulletList",
|
|
47
|
+
"numberedList",
|
|
48
|
+
"checkList",
|
|
49
|
+
"alignLeft",
|
|
50
|
+
"alignStart",
|
|
51
|
+
"alignCenter",
|
|
52
|
+
"alignRight",
|
|
53
|
+
"alignEnd",
|
|
54
|
+
"alignJustify",
|
|
55
|
+
"outdent",
|
|
56
|
+
"indent",
|
|
57
|
+
"clear"
|
|
58
58
|
];
|
|
59
59
|
let editorId = 0;
|
|
60
|
-
class AerisEditorComponent {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
60
|
+
var AerisEditorComponent = class AerisEditorComponent {
|
|
61
|
+
document = inject(DOCUMENT);
|
|
62
|
+
sanitizer = inject(DomSanitizer);
|
|
63
|
+
value = model("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
64
|
+
inputId = input("", ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
|
|
65
|
+
name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
66
|
+
placeholder = input("Write something...", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
67
|
+
ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
68
|
+
ariaLabelledBy = input("", ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
|
|
69
|
+
ariaDescribedBy = input("", ...ngDevMode ? [{ debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []);
|
|
70
|
+
toolbarAriaLabel = input("Formatting tools", ...ngDevMode ? [{ debugName: "toolbarAriaLabel" }] : /* istanbul ignore next */ []);
|
|
71
|
+
size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
72
|
+
appearance = input("outline", ...ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []);
|
|
73
|
+
minHeight = input("12rem", ...ngDevMode ? [{ debugName: "minHeight" }] : /* istanbul ignore next */ []);
|
|
74
|
+
formats = input(AERIS_EDITOR_DEFAULT_FORMATS, ...ngDevMode ? [{ debugName: "formats" }] : /* istanbul ignore next */ []);
|
|
75
|
+
namespace = input("AerisEditor", ...ngDevMode ? [{ debugName: "namespace" }] : /* istanbul ignore next */ []);
|
|
76
|
+
lexicalTheme = input({}, ...ngDevMode ? [{ debugName: "lexicalTheme" }] : /* istanbul ignore next */ []);
|
|
77
|
+
htmlConfig = input({}, ...ngDevMode ? [{ debugName: "htmlConfig" }] : /* istanbul ignore next */ []);
|
|
78
|
+
extensions = input([], ...ngDevMode ? [{ debugName: "extensions" }] : /* istanbul ignore next */ []);
|
|
79
|
+
disabled = input(false, {
|
|
80
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
81
|
+
transform: booleanAttribute
|
|
82
|
+
});
|
|
83
|
+
readonly = input(false, {
|
|
84
|
+
...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
|
|
85
|
+
transform: booleanAttribute
|
|
86
|
+
});
|
|
87
|
+
required = input(false, {
|
|
88
|
+
...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
|
|
89
|
+
transform: booleanAttribute
|
|
90
|
+
});
|
|
91
|
+
invalid = input(false, {
|
|
92
|
+
...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
|
|
93
|
+
transform: booleanAttribute
|
|
94
|
+
});
|
|
95
|
+
touched = input(null, ...ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []);
|
|
96
|
+
displayInvalid = computed(() => ɵaerisDisplayInvalid(this.invalid(), this.touched()), ...ngDevMode ? [{ debugName: "displayInvalid" }] : /* istanbul ignore next */ []);
|
|
97
|
+
fluid = input(false, {
|
|
98
|
+
...ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {},
|
|
99
|
+
transform: booleanAttribute
|
|
100
|
+
});
|
|
101
|
+
showToolbar = input(true, {
|
|
102
|
+
...ngDevMode ? { debugName: "showToolbar" } : /* istanbul ignore next */ {},
|
|
103
|
+
transform: booleanAttribute
|
|
104
|
+
});
|
|
105
|
+
changed = output();
|
|
106
|
+
focused = output();
|
|
107
|
+
blurred = output();
|
|
108
|
+
touch = output();
|
|
109
|
+
ready = output();
|
|
110
|
+
editorRoot = viewChild("editorRoot", ...ngDevMode ? [{ debugName: "editorRoot" }] : /* istanbul ignore next */ []);
|
|
111
|
+
generatedId = `aeris-editor-${++editorId}`;
|
|
112
|
+
formDisabled = signal(false, ...ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []);
|
|
113
|
+
isEditorReady = signal(false, ...ngDevMode ? [{ debugName: "isEditorReady" }] : /* istanbul ignore next */ []);
|
|
114
|
+
hasFocus = signal(false, ...ngDevMode ? [{ debugName: "hasFocus" }] : /* istanbul ignore next */ []);
|
|
115
|
+
textContent = signal("", ...ngDevMode ? [{ debugName: "textContent" }] : /* istanbul ignore next */ []);
|
|
116
|
+
activeBold = signal(false, ...ngDevMode ? [{ debugName: "activeBold" }] : /* istanbul ignore next */ []);
|
|
117
|
+
activeItalic = signal(false, ...ngDevMode ? [{ debugName: "activeItalic" }] : /* istanbul ignore next */ []);
|
|
118
|
+
activeUnderline = signal(false, ...ngDevMode ? [{ debugName: "activeUnderline" }] : /* istanbul ignore next */ []);
|
|
119
|
+
activeStrikethrough = signal(false, ...ngDevMode ? [{ debugName: "activeStrikethrough" }] : /* istanbul ignore next */ []);
|
|
120
|
+
activeCode = signal(false, ...ngDevMode ? [{ debugName: "activeCode" }] : /* istanbul ignore next */ []);
|
|
121
|
+
activeHighlight = signal(false, ...ngDevMode ? [{ debugName: "activeHighlight" }] : /* istanbul ignore next */ []);
|
|
122
|
+
activeSubscript = signal(false, ...ngDevMode ? [{ debugName: "activeSubscript" }] : /* istanbul ignore next */ []);
|
|
123
|
+
activeSuperscript = signal(false, ...ngDevMode ? [{ debugName: "activeSuperscript" }] : /* istanbul ignore next */ []);
|
|
124
|
+
activeLowercase = signal(false, ...ngDevMode ? [{ debugName: "activeLowercase" }] : /* istanbul ignore next */ []);
|
|
125
|
+
activeUppercase = signal(false, ...ngDevMode ? [{ debugName: "activeUppercase" }] : /* istanbul ignore next */ []);
|
|
126
|
+
activeCapitalize = signal(false, ...ngDevMode ? [{ debugName: "activeCapitalize" }] : /* istanbul ignore next */ []);
|
|
127
|
+
activeBlock = signal("paragraph", ...ngDevMode ? [{ debugName: "activeBlock" }] : /* istanbul ignore next */ []);
|
|
128
|
+
activeList = signal(null, ...ngDevMode ? [{ debugName: "activeList" }] : /* istanbul ignore next */ []);
|
|
129
|
+
activeAlignment = signal("left", ...ngDevMode ? [{ debugName: "activeAlignment" }] : /* istanbul ignore next */ []);
|
|
130
|
+
availableFormats = computed(() => new Set(this.formats()), ...ngDevMode ? [{ debugName: "availableFormats" }] : /* istanbul ignore next */ []);
|
|
131
|
+
hasInlineActions = computed(() => this.formats().some((format) => [
|
|
132
|
+
"bold",
|
|
133
|
+
"italic",
|
|
134
|
+
"underline",
|
|
135
|
+
"strikethrough",
|
|
136
|
+
"code",
|
|
137
|
+
"highlight",
|
|
138
|
+
"subscript",
|
|
139
|
+
"superscript",
|
|
140
|
+
"lowercase",
|
|
141
|
+
"uppercase",
|
|
142
|
+
"capitalize"
|
|
143
|
+
].includes(format)), ...ngDevMode ? [{ debugName: "hasInlineActions" }] : /* istanbul ignore next */ []);
|
|
144
|
+
hasBlockActions = computed(() => this.formats().some((format) => [
|
|
145
|
+
"paragraph",
|
|
146
|
+
"heading",
|
|
147
|
+
"heading1",
|
|
148
|
+
"heading2",
|
|
149
|
+
"heading3",
|
|
150
|
+
"heading4",
|
|
151
|
+
"heading5",
|
|
152
|
+
"heading6",
|
|
153
|
+
"quote"
|
|
154
|
+
].includes(format)), ...ngDevMode ? [{ debugName: "hasBlockActions" }] : /* istanbul ignore next */ []);
|
|
155
|
+
hasListActions = computed(() => this.formats().some((format) => [
|
|
156
|
+
"bulletList",
|
|
157
|
+
"numberedList",
|
|
158
|
+
"checkList"
|
|
159
|
+
].includes(format)), ...ngDevMode ? [{ debugName: "hasListActions" }] : /* istanbul ignore next */ []);
|
|
160
|
+
hasAlignmentActions = computed(() => this.formats().some((format) => [
|
|
161
|
+
"alignLeft",
|
|
162
|
+
"alignStart",
|
|
163
|
+
"alignCenter",
|
|
164
|
+
"alignRight",
|
|
165
|
+
"alignEnd",
|
|
166
|
+
"alignJustify"
|
|
167
|
+
].includes(format)), ...ngDevMode ? [{ debugName: "hasAlignmentActions" }] : /* istanbul ignore next */ []);
|
|
168
|
+
hasDocumentActions = computed(() => this.formats().some((format) => [
|
|
169
|
+
"outdent",
|
|
170
|
+
"indent",
|
|
171
|
+
"clear"
|
|
172
|
+
].includes(format)), ...ngDevMode ? [{ debugName: "hasDocumentActions" }] : /* istanbul ignore next */ []);
|
|
173
|
+
toolbarSeparators = computed(() => {
|
|
174
|
+
let hasPreviousGroup = this.availableFormats().has("undo") || this.availableFormats().has("redo");
|
|
175
|
+
const beforeGroup = (hasActions) => {
|
|
176
|
+
const show = hasPreviousGroup && hasActions;
|
|
177
|
+
hasPreviousGroup ||= hasActions;
|
|
178
|
+
return show;
|
|
179
|
+
};
|
|
180
|
+
return {
|
|
181
|
+
inline: beforeGroup(this.hasInlineActions()),
|
|
182
|
+
block: beforeGroup(this.hasBlockActions()),
|
|
183
|
+
list: beforeGroup(this.hasListActions()),
|
|
184
|
+
alignment: beforeGroup(this.hasAlignmentActions()),
|
|
185
|
+
document: beforeGroup(this.hasDocumentActions())
|
|
186
|
+
};
|
|
187
|
+
}, ...ngDevMode ? [{ debugName: "toolbarSeparators" }] : /* istanbul ignore next */ []);
|
|
188
|
+
resolvedInputId = computed(() => this.inputId() || this.generatedId, ...ngDevMode ? [{ debugName: "resolvedInputId" }] : /* istanbul ignore next */ []);
|
|
189
|
+
effectiveDisabled = computed(() => this.disabled() || this.formDisabled(), ...ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []);
|
|
190
|
+
editable = computed(() => !this.effectiveDisabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []);
|
|
191
|
+
toolbarDisabled = computed(() => !this.editable() || !this.isEditorReady(), ...ngDevMode ? [{ debugName: "toolbarDisabled" }] : /* istanbul ignore next */ []);
|
|
192
|
+
placeholderVisible = computed(() => !this.hasFocus() && !this.textContent().trim() && !!this.placeholder(), ...ngDevMode ? [{ debugName: "placeholderVisible" }] : /* istanbul ignore next */ []);
|
|
193
|
+
editor = null;
|
|
194
|
+
unregisterEditor = null;
|
|
195
|
+
lastSyncedValue = "";
|
|
196
|
+
onChange = () => void 0;
|
|
197
|
+
onTouched = () => void 0;
|
|
198
|
+
constructor() {
|
|
199
|
+
effect(() => {
|
|
200
|
+
const editable = this.editable();
|
|
201
|
+
this.editor?.setEditable(editable);
|
|
202
|
+
});
|
|
203
|
+
effect(() => {
|
|
204
|
+
const nextValue = this.value();
|
|
205
|
+
if (!this.editor || nextValue === this.lastSyncedValue) return;
|
|
206
|
+
this.writeEditorValue(nextValue);
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
ngAfterViewInit() {
|
|
210
|
+
this.createEditor();
|
|
211
|
+
}
|
|
212
|
+
ngOnDestroy() {
|
|
213
|
+
this.unregisterEditor?.();
|
|
214
|
+
this.unregisterEditor = null;
|
|
215
|
+
this.editor?.setRootElement(null);
|
|
216
|
+
this.editor = null;
|
|
217
|
+
this.isEditorReady.set(false);
|
|
218
|
+
}
|
|
219
|
+
writeValue(value) {
|
|
220
|
+
const nextValue = value == null ? "" : String(value);
|
|
221
|
+
this.value.set(nextValue);
|
|
222
|
+
this.writeEditorValue(nextValue);
|
|
223
|
+
}
|
|
224
|
+
registerOnChange(callback) {
|
|
225
|
+
this.onChange = callback;
|
|
226
|
+
}
|
|
227
|
+
registerOnTouched(callback) {
|
|
228
|
+
this.onTouched = callback;
|
|
229
|
+
}
|
|
230
|
+
setDisabledState(disabled) {
|
|
231
|
+
this.formDisabled.set(disabled);
|
|
232
|
+
}
|
|
233
|
+
focus() {
|
|
234
|
+
this.editor?.focus();
|
|
235
|
+
}
|
|
236
|
+
clear() {
|
|
237
|
+
if (!this.editable()) return;
|
|
238
|
+
this.writeEditorValue("");
|
|
239
|
+
this.focus();
|
|
240
|
+
}
|
|
241
|
+
reset() {
|
|
242
|
+
this.clear();
|
|
243
|
+
}
|
|
244
|
+
format(format) {
|
|
245
|
+
if (!this.editable()) return;
|
|
246
|
+
this.editor?.dispatchCommand(FORMAT_TEXT_COMMAND, format);
|
|
247
|
+
}
|
|
248
|
+
setBlock(block) {
|
|
249
|
+
if (!this.editable()) return;
|
|
250
|
+
this.editor?.update(() => {
|
|
251
|
+
const selection = $getSelection();
|
|
252
|
+
if (!$isRangeSelection(selection)) return;
|
|
253
|
+
if (block === "heading") block = "h2";
|
|
254
|
+
if (block.startsWith("h") && this.activeBlock() !== block) {
|
|
255
|
+
$setBlocksType(selection, () => $createHeadingNode(block));
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
if (block === "quote" && this.activeBlock() !== "quote") {
|
|
259
|
+
$setBlocksType(selection, () => $createQuoteNode());
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
$setBlocksType(selection, () => $createParagraphNode());
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
toggleBulletList() {
|
|
266
|
+
if (!this.editable()) return;
|
|
267
|
+
this.editor?.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, void 0);
|
|
268
|
+
}
|
|
269
|
+
toggleNumberedList() {
|
|
270
|
+
if (!this.editable()) return;
|
|
271
|
+
this.editor?.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, void 0);
|
|
272
|
+
}
|
|
273
|
+
toggleCheckList() {
|
|
274
|
+
if (!this.editable()) return;
|
|
275
|
+
this.editor?.dispatchCommand(INSERT_CHECK_LIST_COMMAND, void 0);
|
|
276
|
+
}
|
|
277
|
+
removeList() {
|
|
278
|
+
if (!this.editable()) return;
|
|
279
|
+
this.editor?.dispatchCommand(REMOVE_LIST_COMMAND, void 0);
|
|
280
|
+
}
|
|
281
|
+
undo() {
|
|
282
|
+
if (!this.editable()) return;
|
|
283
|
+
this.editor?.dispatchCommand(UNDO_COMMAND, void 0);
|
|
284
|
+
}
|
|
285
|
+
redo() {
|
|
286
|
+
if (!this.editable()) return;
|
|
287
|
+
this.editor?.dispatchCommand(REDO_COMMAND, void 0);
|
|
288
|
+
}
|
|
289
|
+
align(alignment) {
|
|
290
|
+
if (!this.editable()) return;
|
|
291
|
+
this.editor?.dispatchCommand(FORMAT_ELEMENT_COMMAND, alignment);
|
|
292
|
+
}
|
|
293
|
+
indent() {
|
|
294
|
+
if (!this.editable()) return;
|
|
295
|
+
this.editor?.dispatchCommand(INDENT_CONTENT_COMMAND, void 0);
|
|
296
|
+
}
|
|
297
|
+
outdent() {
|
|
298
|
+
if (!this.editable()) return;
|
|
299
|
+
this.editor?.dispatchCommand(OUTDENT_CONTENT_COMMAND, void 0);
|
|
300
|
+
}
|
|
301
|
+
clearFormatting() {
|
|
302
|
+
if (!this.editable()) return;
|
|
303
|
+
this.editor?.update(() => {
|
|
304
|
+
const selection = $getSelection();
|
|
305
|
+
if (!$isRangeSelection(selection)) return;
|
|
306
|
+
selection.setFormat(0);
|
|
307
|
+
for (const node of selection.getNodes()) if ($isTextNode(node)) {
|
|
308
|
+
node.setFormat(0);
|
|
309
|
+
node.setStyle("");
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
getLexicalEditor() {
|
|
314
|
+
return this.editor;
|
|
315
|
+
}
|
|
316
|
+
handleFocus(event) {
|
|
317
|
+
this.hasFocus.set(true);
|
|
318
|
+
this.focused.emit(event);
|
|
319
|
+
}
|
|
320
|
+
handleBlur(event) {
|
|
321
|
+
this.blurred.emit(event);
|
|
322
|
+
}
|
|
323
|
+
handleFocusOut(event) {
|
|
324
|
+
const relatedTarget = event.relatedTarget;
|
|
325
|
+
const root = this.editorRoot()?.nativeElement;
|
|
326
|
+
if (relatedTarget instanceof Node && root?.parentElement?.contains(relatedTarget)) return;
|
|
327
|
+
this.hasFocus.set(false);
|
|
328
|
+
this.touch.emit();
|
|
329
|
+
this.onTouched();
|
|
330
|
+
}
|
|
331
|
+
createEditor() {
|
|
332
|
+
const rootElement = this.editorRoot()?.nativeElement;
|
|
333
|
+
if (!rootElement) return;
|
|
334
|
+
const extensions = this.extensions();
|
|
335
|
+
const editor = createEditor({
|
|
336
|
+
namespace: this.namespace(),
|
|
337
|
+
html: this.htmlConfig(),
|
|
338
|
+
nodes: [
|
|
339
|
+
HeadingNode,
|
|
340
|
+
QuoteNode,
|
|
341
|
+
ListNode,
|
|
342
|
+
ListItemNode,
|
|
343
|
+
...extensions.flatMap((extension) => extension.nodes ?? [])
|
|
344
|
+
],
|
|
345
|
+
onError(error) {
|
|
346
|
+
throw error;
|
|
347
|
+
},
|
|
348
|
+
theme: this.resolveTheme()
|
|
349
|
+
});
|
|
350
|
+
this.editor = editor;
|
|
351
|
+
editor.setRootElement(rootElement);
|
|
352
|
+
editor.setEditable(this.editable());
|
|
353
|
+
this.isEditorReady.set(true);
|
|
354
|
+
const historyState = createEmptyHistoryState();
|
|
355
|
+
const cleanups = [
|
|
356
|
+
registerRichText(editor),
|
|
357
|
+
registerList(editor),
|
|
358
|
+
registerCheckList(editor),
|
|
359
|
+
registerHistory(editor, historyState, 250),
|
|
360
|
+
...extensions.flatMap((extension) => {
|
|
361
|
+
const cleanup = extension.setup?.(editor);
|
|
362
|
+
return cleanup ? [cleanup] : [];
|
|
363
|
+
}),
|
|
364
|
+
editor.registerUpdateListener(({ editorState }) => {
|
|
365
|
+
editorState.read(() => {
|
|
366
|
+
const root = $getRoot();
|
|
367
|
+
const textContent = root.getTextContent();
|
|
368
|
+
const hasStructuredContent = root.getChildren().some((node) => ![
|
|
369
|
+
"paragraph",
|
|
370
|
+
"heading",
|
|
371
|
+
"quote"
|
|
372
|
+
].includes(node.getType()));
|
|
373
|
+
const html = textContent.trim() || hasStructuredContent ? $generateHtmlFromNodes(editor, null) : "";
|
|
374
|
+
this.syncSelectionState();
|
|
375
|
+
this.emitValue(html, textContent);
|
|
376
|
+
}, { editor });
|
|
377
|
+
}),
|
|
378
|
+
editor.registerCommand(SELECTION_CHANGE_COMMAND, () => {
|
|
379
|
+
this.syncSelectionState();
|
|
380
|
+
return false;
|
|
381
|
+
}, COMMAND_PRIORITY_LOW)
|
|
382
|
+
];
|
|
383
|
+
this.unregisterEditor = () => {
|
|
384
|
+
for (const cleanup of cleanups) cleanup();
|
|
385
|
+
};
|
|
386
|
+
this.writeEditorValue(this.value());
|
|
387
|
+
this.ready.emit(editor);
|
|
388
|
+
}
|
|
389
|
+
resolveTheme() {
|
|
390
|
+
const customTheme = this.lexicalTheme();
|
|
391
|
+
return {
|
|
392
|
+
...customTheme,
|
|
393
|
+
heading: {
|
|
394
|
+
h1: "aeris-editor-content__heading aeris-editor-content__heading--h1",
|
|
395
|
+
h2: "aeris-editor-content__heading aeris-editor-content__heading--h2",
|
|
396
|
+
h3: "aeris-editor-content__heading aeris-editor-content__heading--h3",
|
|
397
|
+
h4: "aeris-editor-content__heading aeris-editor-content__heading--h4",
|
|
398
|
+
h5: "aeris-editor-content__heading aeris-editor-content__heading--h5",
|
|
399
|
+
h6: "aeris-editor-content__heading aeris-editor-content__heading--h6",
|
|
400
|
+
...customTheme.heading
|
|
401
|
+
},
|
|
402
|
+
list: {
|
|
403
|
+
checklist: "aeris-editor-content__check-list",
|
|
404
|
+
listitem: "aeris-editor-content__list-item",
|
|
405
|
+
listitemChecked: "aeris-editor-content__list-item--checked",
|
|
406
|
+
listitemUnchecked: "aeris-editor-content__list-item--unchecked",
|
|
407
|
+
ol: "aeris-editor-content__ordered-list",
|
|
408
|
+
ul: "aeris-editor-content__unordered-list",
|
|
409
|
+
...customTheme.list,
|
|
410
|
+
nested: {
|
|
411
|
+
listitem: "aeris-editor-content__nested-list-item",
|
|
412
|
+
...customTheme.list?.nested
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
paragraph: customTheme.paragraph ?? "aeris-editor-content__paragraph",
|
|
416
|
+
quote: customTheme.quote ?? "aeris-editor-content__quote",
|
|
417
|
+
text: {
|
|
418
|
+
bold: "aeris-editor-content__bold",
|
|
419
|
+
capitalize: "aeris-editor-content__capitalize",
|
|
420
|
+
code: "aeris-editor-content__code",
|
|
421
|
+
highlight: "aeris-editor-content__highlight",
|
|
422
|
+
italic: "aeris-editor-content__italic",
|
|
423
|
+
lowercase: "aeris-editor-content__lowercase",
|
|
424
|
+
strikethrough: "aeris-editor-content__strikethrough",
|
|
425
|
+
subscript: "aeris-editor-content__subscript",
|
|
426
|
+
superscript: "aeris-editor-content__superscript",
|
|
427
|
+
underline: "aeris-editor-content__underline",
|
|
428
|
+
underlineStrikethrough: "aeris-editor-content__underline aeris-editor-content__strikethrough",
|
|
429
|
+
uppercase: "aeris-editor-content__uppercase",
|
|
430
|
+
...customTheme.text
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
writeEditorValue(value) {
|
|
435
|
+
if (!this.editor) return;
|
|
436
|
+
this.lastSyncedValue = value;
|
|
437
|
+
this.editor.update(() => {
|
|
438
|
+
const root = $getRoot();
|
|
439
|
+
root.clear();
|
|
440
|
+
const sanitizedValue = this.sanitizer.sanitize(SecurityContext.HTML, value) ?? "";
|
|
441
|
+
if (!sanitizedValue.trim()) {
|
|
442
|
+
root.append($createParagraphNode());
|
|
443
|
+
this.textContent.set("");
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
446
|
+
const Parser = this.document.defaultView?.DOMParser;
|
|
447
|
+
if (!Parser) {
|
|
448
|
+
root.append($createParagraphNode());
|
|
449
|
+
this.textContent.set("");
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
const dom = new Parser().parseFromString(sanitizedValue, "text/html");
|
|
453
|
+
const nodes = $generateNodesFromDOM(this.editor, dom);
|
|
454
|
+
root.append(...nodes.length ? nodes : [$createParagraphNode()]);
|
|
455
|
+
this.textContent.set(root.getTextContent());
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
emitValue(value, textContent) {
|
|
459
|
+
this.textContent.set(textContent);
|
|
460
|
+
this.syncSelectionState();
|
|
461
|
+
if (value === this.lastSyncedValue && value === this.value()) return;
|
|
462
|
+
this.lastSyncedValue = value;
|
|
463
|
+
this.value.set(value);
|
|
464
|
+
this.changed.emit({
|
|
465
|
+
value,
|
|
466
|
+
textContent
|
|
467
|
+
});
|
|
468
|
+
this.onChange(value);
|
|
469
|
+
}
|
|
470
|
+
syncSelectionState() {
|
|
471
|
+
const selection = $getSelection();
|
|
472
|
+
if (!$isRangeSelection(selection)) {
|
|
473
|
+
this.activeBold.set(false);
|
|
474
|
+
this.activeItalic.set(false);
|
|
475
|
+
this.activeUnderline.set(false);
|
|
476
|
+
this.activeStrikethrough.set(false);
|
|
477
|
+
this.activeCode.set(false);
|
|
478
|
+
this.activeHighlight.set(false);
|
|
479
|
+
this.activeSubscript.set(false);
|
|
480
|
+
this.activeSuperscript.set(false);
|
|
481
|
+
this.activeLowercase.set(false);
|
|
482
|
+
this.activeUppercase.set(false);
|
|
483
|
+
this.activeCapitalize.set(false);
|
|
484
|
+
this.activeBlock.set("paragraph");
|
|
485
|
+
this.activeList.set(null);
|
|
486
|
+
this.activeAlignment.set("left");
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
this.activeBold.set(selection.hasFormat("bold"));
|
|
490
|
+
this.activeItalic.set(selection.hasFormat("italic"));
|
|
491
|
+
this.activeUnderline.set(selection.hasFormat("underline"));
|
|
492
|
+
this.activeStrikethrough.set(selection.hasFormat("strikethrough"));
|
|
493
|
+
this.activeCode.set(selection.hasFormat("code"));
|
|
494
|
+
this.activeHighlight.set(selection.hasFormat("highlight"));
|
|
495
|
+
this.activeSubscript.set(selection.hasFormat("subscript"));
|
|
496
|
+
this.activeSuperscript.set(selection.hasFormat("superscript"));
|
|
497
|
+
this.activeLowercase.set(selection.hasFormat("lowercase"));
|
|
498
|
+
this.activeUppercase.set(selection.hasFormat("uppercase"));
|
|
499
|
+
this.activeCapitalize.set(selection.hasFormat("capitalize"));
|
|
500
|
+
const nodes = selection.getNodes();
|
|
501
|
+
const topLevel = nodes[0]?.getTopLevelElementOrThrow();
|
|
502
|
+
if (topLevel instanceof HeadingNode) this.activeBlock.set(topLevel.getTag());
|
|
503
|
+
else if (topLevel instanceof QuoteNode) this.activeBlock.set("quote");
|
|
504
|
+
else this.activeBlock.set("paragraph");
|
|
505
|
+
const elementAlignment = $isElementNode(topLevel) ? topLevel.getFormatType() : "";
|
|
506
|
+
this.activeAlignment.set(elementAlignment === "center" || elementAlignment === "start" || elementAlignment === "right" || elementAlignment === "end" || elementAlignment === "justify" ? elementAlignment : "left");
|
|
507
|
+
let currentNode = nodes[0] ?? null;
|
|
508
|
+
while (currentNode && !(currentNode instanceof ListNode)) currentNode = currentNode.getParent();
|
|
509
|
+
this.activeList.set(currentNode instanceof ListNode ? currentNode.getListType() : null);
|
|
510
|
+
}
|
|
511
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
512
|
+
minVersion: "12.0.0",
|
|
513
|
+
version: "22.2.2",
|
|
514
|
+
ngImport: i0,
|
|
515
|
+
type: AerisEditorComponent,
|
|
516
|
+
deps: [],
|
|
517
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
518
|
+
});
|
|
519
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
520
|
+
minVersion: "17.0.0",
|
|
521
|
+
version: "22.2.2",
|
|
522
|
+
type: AerisEditorComponent,
|
|
523
|
+
isStandalone: true,
|
|
524
|
+
selector: "aeris-editor",
|
|
525
|
+
inputs: {
|
|
526
|
+
value: {
|
|
527
|
+
classPropertyName: "value",
|
|
528
|
+
publicName: "value",
|
|
529
|
+
isSignal: true,
|
|
530
|
+
isRequired: false,
|
|
531
|
+
transformFunction: null
|
|
532
|
+
},
|
|
533
|
+
inputId: {
|
|
534
|
+
classPropertyName: "inputId",
|
|
535
|
+
publicName: "inputId",
|
|
536
|
+
isSignal: true,
|
|
537
|
+
isRequired: false,
|
|
538
|
+
transformFunction: null
|
|
539
|
+
},
|
|
540
|
+
name: {
|
|
541
|
+
classPropertyName: "name",
|
|
542
|
+
publicName: "name",
|
|
543
|
+
isSignal: true,
|
|
544
|
+
isRequired: false,
|
|
545
|
+
transformFunction: null
|
|
546
|
+
},
|
|
547
|
+
placeholder: {
|
|
548
|
+
classPropertyName: "placeholder",
|
|
549
|
+
publicName: "placeholder",
|
|
550
|
+
isSignal: true,
|
|
551
|
+
isRequired: false,
|
|
552
|
+
transformFunction: null
|
|
553
|
+
},
|
|
554
|
+
ariaLabel: {
|
|
555
|
+
classPropertyName: "ariaLabel",
|
|
556
|
+
publicName: "ariaLabel",
|
|
557
|
+
isSignal: true,
|
|
558
|
+
isRequired: false,
|
|
559
|
+
transformFunction: null
|
|
560
|
+
},
|
|
561
|
+
ariaLabelledBy: {
|
|
562
|
+
classPropertyName: "ariaLabelledBy",
|
|
563
|
+
publicName: "ariaLabelledBy",
|
|
564
|
+
isSignal: true,
|
|
565
|
+
isRequired: false,
|
|
566
|
+
transformFunction: null
|
|
567
|
+
},
|
|
568
|
+
ariaDescribedBy: {
|
|
569
|
+
classPropertyName: "ariaDescribedBy",
|
|
570
|
+
publicName: "ariaDescribedBy",
|
|
571
|
+
isSignal: true,
|
|
572
|
+
isRequired: false,
|
|
573
|
+
transformFunction: null
|
|
574
|
+
},
|
|
575
|
+
toolbarAriaLabel: {
|
|
576
|
+
classPropertyName: "toolbarAriaLabel",
|
|
577
|
+
publicName: "toolbarAriaLabel",
|
|
578
|
+
isSignal: true,
|
|
579
|
+
isRequired: false,
|
|
580
|
+
transformFunction: null
|
|
581
|
+
},
|
|
582
|
+
size: {
|
|
583
|
+
classPropertyName: "size",
|
|
584
|
+
publicName: "size",
|
|
585
|
+
isSignal: true,
|
|
586
|
+
isRequired: false,
|
|
587
|
+
transformFunction: null
|
|
588
|
+
},
|
|
589
|
+
appearance: {
|
|
590
|
+
classPropertyName: "appearance",
|
|
591
|
+
publicName: "appearance",
|
|
592
|
+
isSignal: true,
|
|
593
|
+
isRequired: false,
|
|
594
|
+
transformFunction: null
|
|
595
|
+
},
|
|
596
|
+
minHeight: {
|
|
597
|
+
classPropertyName: "minHeight",
|
|
598
|
+
publicName: "minHeight",
|
|
599
|
+
isSignal: true,
|
|
600
|
+
isRequired: false,
|
|
601
|
+
transformFunction: null
|
|
602
|
+
},
|
|
603
|
+
formats: {
|
|
604
|
+
classPropertyName: "formats",
|
|
605
|
+
publicName: "formats",
|
|
606
|
+
isSignal: true,
|
|
607
|
+
isRequired: false,
|
|
608
|
+
transformFunction: null
|
|
609
|
+
},
|
|
610
|
+
namespace: {
|
|
611
|
+
classPropertyName: "namespace",
|
|
612
|
+
publicName: "namespace",
|
|
613
|
+
isSignal: true,
|
|
614
|
+
isRequired: false,
|
|
615
|
+
transformFunction: null
|
|
616
|
+
},
|
|
617
|
+
lexicalTheme: {
|
|
618
|
+
classPropertyName: "lexicalTheme",
|
|
619
|
+
publicName: "lexicalTheme",
|
|
620
|
+
isSignal: true,
|
|
621
|
+
isRequired: false,
|
|
622
|
+
transformFunction: null
|
|
623
|
+
},
|
|
624
|
+
htmlConfig: {
|
|
625
|
+
classPropertyName: "htmlConfig",
|
|
626
|
+
publicName: "htmlConfig",
|
|
627
|
+
isSignal: true,
|
|
628
|
+
isRequired: false,
|
|
629
|
+
transformFunction: null
|
|
630
|
+
},
|
|
631
|
+
extensions: {
|
|
632
|
+
classPropertyName: "extensions",
|
|
633
|
+
publicName: "extensions",
|
|
634
|
+
isSignal: true,
|
|
635
|
+
isRequired: false,
|
|
636
|
+
transformFunction: null
|
|
637
|
+
},
|
|
638
|
+
disabled: {
|
|
639
|
+
classPropertyName: "disabled",
|
|
640
|
+
publicName: "disabled",
|
|
641
|
+
isSignal: true,
|
|
642
|
+
isRequired: false,
|
|
643
|
+
transformFunction: null
|
|
644
|
+
},
|
|
645
|
+
readonly: {
|
|
646
|
+
classPropertyName: "readonly",
|
|
647
|
+
publicName: "readonly",
|
|
648
|
+
isSignal: true,
|
|
649
|
+
isRequired: false,
|
|
650
|
+
transformFunction: null
|
|
651
|
+
},
|
|
652
|
+
required: {
|
|
653
|
+
classPropertyName: "required",
|
|
654
|
+
publicName: "required",
|
|
655
|
+
isSignal: true,
|
|
656
|
+
isRequired: false,
|
|
657
|
+
transformFunction: null
|
|
658
|
+
},
|
|
659
|
+
invalid: {
|
|
660
|
+
classPropertyName: "invalid",
|
|
661
|
+
publicName: "invalid",
|
|
662
|
+
isSignal: true,
|
|
663
|
+
isRequired: false,
|
|
664
|
+
transformFunction: null
|
|
665
|
+
},
|
|
666
|
+
touched: {
|
|
667
|
+
classPropertyName: "touched",
|
|
668
|
+
publicName: "touched",
|
|
669
|
+
isSignal: true,
|
|
670
|
+
isRequired: false,
|
|
671
|
+
transformFunction: null
|
|
672
|
+
},
|
|
673
|
+
fluid: {
|
|
674
|
+
classPropertyName: "fluid",
|
|
675
|
+
publicName: "fluid",
|
|
676
|
+
isSignal: true,
|
|
677
|
+
isRequired: false,
|
|
678
|
+
transformFunction: null
|
|
679
|
+
},
|
|
680
|
+
showToolbar: {
|
|
681
|
+
classPropertyName: "showToolbar",
|
|
682
|
+
publicName: "showToolbar",
|
|
683
|
+
isSignal: true,
|
|
684
|
+
isRequired: false,
|
|
685
|
+
transformFunction: null
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
outputs: {
|
|
689
|
+
value: "valueChange",
|
|
690
|
+
changed: "changed",
|
|
691
|
+
focused: "focused",
|
|
692
|
+
blurred: "blurred",
|
|
693
|
+
touch: "touch",
|
|
694
|
+
ready: "ready"
|
|
695
|
+
},
|
|
696
|
+
host: { properties: { "attr.data-fluid": "fluid() || null" } },
|
|
697
|
+
providers: [{
|
|
698
|
+
provide: NG_VALUE_ACCESSOR,
|
|
699
|
+
useExisting: forwardRef(() => AerisEditorComponent),
|
|
700
|
+
multi: true
|
|
701
|
+
}],
|
|
702
|
+
viewQueries: [{
|
|
703
|
+
propertyName: "editorRoot",
|
|
704
|
+
first: true,
|
|
705
|
+
predicate: ["editorRoot"],
|
|
706
|
+
descendants: true,
|
|
707
|
+
isSignal: true
|
|
708
|
+
}],
|
|
709
|
+
ngImport: i0,
|
|
710
|
+
template: `
|
|
554
711
|
<div
|
|
555
712
|
class="aeris-editor"
|
|
556
713
|
[attr.data-size]="size()"
|
|
557
714
|
[attr.data-appearance]="appearance()"
|
|
558
|
-
[attr.data-invalid]="
|
|
715
|
+
[attr.data-invalid]="displayInvalid() || null"
|
|
559
716
|
[attr.data-disabled]="effectiveDisabled() || null"
|
|
560
717
|
[attr.data-readonly]="readonly() || null"
|
|
561
718
|
[attr.data-fluid]="fluid() || null"
|
|
@@ -580,7 +737,7 @@ class AerisEditorComponent {
|
|
|
580
737
|
</button>
|
|
581
738
|
}
|
|
582
739
|
|
|
583
|
-
@if (
|
|
740
|
+
@if (toolbarSeparators().inline) {
|
|
584
741
|
<span class="aeris-editor__separator" aria-hidden="true"></span>
|
|
585
742
|
}
|
|
586
743
|
@if (availableFormats().has('bold')) {
|
|
@@ -709,7 +866,7 @@ class AerisEditorComponent {
|
|
|
709
866
|
</button>
|
|
710
867
|
}
|
|
711
868
|
|
|
712
|
-
@if (
|
|
869
|
+
@if (toolbarSeparators().block) {
|
|
713
870
|
<span class="aeris-editor__separator" aria-hidden="true"></span>
|
|
714
871
|
}
|
|
715
872
|
@if (availableFormats().has('paragraph')) {
|
|
@@ -819,7 +976,7 @@ class AerisEditorComponent {
|
|
|
819
976
|
</button>
|
|
820
977
|
}
|
|
821
978
|
|
|
822
|
-
@if (
|
|
979
|
+
@if (toolbarSeparators().list) {
|
|
823
980
|
<span class="aeris-editor__separator" aria-hidden="true"></span>
|
|
824
981
|
}
|
|
825
982
|
@if (availableFormats().has('bulletList')) {
|
|
@@ -881,7 +1038,7 @@ class AerisEditorComponent {
|
|
|
881
1038
|
</button>
|
|
882
1039
|
}
|
|
883
1040
|
|
|
884
|
-
@if (
|
|
1041
|
+
@if (toolbarSeparators().alignment) {
|
|
885
1042
|
<span class="aeris-editor__separator" aria-hidden="true"></span>
|
|
886
1043
|
}
|
|
887
1044
|
@if (availableFormats().has('alignLeft')) {
|
|
@@ -963,7 +1120,7 @@ class AerisEditorComponent {
|
|
|
963
1120
|
</button>
|
|
964
1121
|
}
|
|
965
1122
|
|
|
966
|
-
@if (
|
|
1123
|
+
@if (toolbarSeparators().document) {
|
|
967
1124
|
<span class="aeris-editor__separator" aria-hidden="true"></span>
|
|
968
1125
|
}
|
|
969
1126
|
@if (availableFormats().has('outdent')) {
|
|
@@ -1018,9 +1175,9 @@ class AerisEditorComponent {
|
|
|
1018
1175
|
[id]="resolvedInputId()"
|
|
1019
1176
|
[attr.contenteditable]="editable()"
|
|
1020
1177
|
[attr.aria-label]="ariaLabel() || null"
|
|
1021
|
-
[attr.aria-labelledby]="
|
|
1022
|
-
[attr.aria-describedby]="
|
|
1023
|
-
[attr.aria-invalid]="
|
|
1178
|
+
[attr.aria-labelledby]="ariaLabelledBy() || null"
|
|
1179
|
+
[attr.aria-describedby]="ariaDescribedBy() || null"
|
|
1180
|
+
[attr.aria-invalid]="displayInvalid() || null"
|
|
1024
1181
|
[attr.aria-required]="required() || null"
|
|
1025
1182
|
[attr.aria-placeholder]="placeholder() || null"
|
|
1026
1183
|
[attr.tabindex]="effectiveDisabled() ? -1 : 0"
|
|
@@ -1037,16 +1194,27 @@ class AerisEditorComponent {
|
|
|
1037
1194
|
<input type="hidden" [name]="name()" [value]="value()" />
|
|
1038
1195
|
}
|
|
1039
1196
|
</div>
|
|
1040
|
-
`,
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1197
|
+
`,
|
|
1198
|
+
isInline: true,
|
|
1199
|
+
styles: [":host{display:inline-block;color:var(--aeris-text)}:host([data-fluid]){display:block;width:100%}.aeris-editor{--aeris-editor-padding: .875rem;--aeris-editor-font-size: var(--aeris-font-size-xl, .9375rem);--aeris-editor-line-height: 1.6;display:grid;overflow:hidden;width:min(100%,44rem);border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-structured-control, var(--aeris-radius-control, var(--aeris-radius-md, .5625rem)));background:var(--aeris-surface);box-shadow:var(--aeris-shadow-xs, 0 1px 2px rgba(0, 0, 0, .1));transition:border-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),box-shadow var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),background var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}.aeris-editor[data-fluid]{width:100%}.aeris-editor[data-size=sm]{--aeris-editor-padding: .75rem;--aeris-editor-font-size: var(--aeris-font-size-lg, .875rem)}.aeris-editor[data-size=lg]{--aeris-editor-padding: 1rem;--aeris-editor-font-size: var(--aeris-font-size-2xl, 1rem)}.aeris-editor[data-appearance=filled]{background:var(--aeris-surface-2)}.aeris-editor:focus-within{border-color:var(--aeris-control-focus-border, var(--aeris-focus));box-shadow:0 0 0 var(--aeris-focus-ring-width, 3px) var(--aeris-control-focus-ring-color, var(--aeris-focus-ring-color, transparent))}.aeris-editor[data-invalid]{border-color:var(--aeris-control-invalid-border, var(--aeris-danger))}.aeris-editor[data-invalid]:focus-within{box-shadow:0 0 0 var(--aeris-focus-ring-width, 3px) var(--aeris-control-invalid-focus-ring-color, transparent)}.aeris-editor[data-disabled]{cursor:not-allowed;opacity:.62}.aeris-editor__toolbar{display:flex;flex-wrap:wrap;gap:.25rem;align-items:center;padding:.5rem;border-bottom:1px solid var(--aeris-border);background:color-mix(in srgb,var(--aeris-surface-2) 82%,transparent)}.aeris-editor__toolbar button{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--aeris-radius-item, var(--aeris-radius-sm, .4375rem));background:transparent;color:var(--aeris-text);font:inherit;font-size:var(--aeris-font-size-md, .8125rem);font-weight:var(--aeris-font-weight-bold, 700);cursor:pointer;transition:background var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),box-shadow var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}.aeris-editor__toolbar button[aria-pressed=true]{background:var(--aeris-primary-soft);color:var(--aeris-text)}@media(hover:hover){.aeris-editor__toolbar button:hover:not(:disabled){background:var(--aeris-primary-soft);color:var(--aeris-text)}}.aeris-editor__toolbar button:focus-visible{outline:var(--aeris-focus-ring-width, 3px) solid var(--aeris-focus);outline-offset:var(--aeris-focus-ring-offset, 2px)}.aeris-editor__toolbar button:disabled{cursor:not-allowed;opacity:.45}.aeris-editor__toolbar svg{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.9}:dir(rtl) .aeris-editor__logical-icon{transform:scaleX(-1)}.aeris-editor__separator{width:1px;height:1.5rem;margin-inline:.125rem;background:var(--aeris-border)}.aeris-editor__underline{text-decoration:underline;text-underline-offset:.14em}.aeris-editor__strikethrough{text-decoration:line-through}.aeris-editor__toolbar sub,.aeris-editor__toolbar sup{font-size:.65em}.aeris-editor__content-shell{position:relative;display:grid}.aeris-editor__content{position:relative;z-index:1;min-width:0;padding:var(--aeris-editor-padding);color:var(--aeris-text);font-size:var(--aeris-editor-font-size);line-height:var(--aeris-editor-line-height);outline:0;overflow-wrap:anywhere}.aeris-editor__content[contenteditable=false]{cursor:default}.aeris-editor__placeholder{position:absolute;inset-block-start:var(--aeris-editor-padding);inset-inline-start:var(--aeris-editor-padding);color:var(--aeris-text-muted);font-size:var(--aeris-editor-font-size);line-height:var(--aeris-editor-line-height);pointer-events:none}.aeris-editor-content__paragraph{margin:0 0 .65rem}.aeris-editor-content__paragraph:last-child{margin-bottom:0}.aeris-editor-content__heading{margin:0 0 .75rem;color:var(--aeris-text);font-size:1.3em;line-height:var(--aeris-line-height-tight, 1.25)}.aeris-editor-content__heading--h1{font-size:1.65em}.aeris-editor-content__heading--h2{font-size:1.35em}.aeris-editor-content__heading--h3{font-size:1.15em}.aeris-editor-content__heading--h4{font-size:1.05em}.aeris-editor-content__heading--h5{font-size:.95em}.aeris-editor-content__heading--h6{font-size:.85em;letter-spacing:.02em;text-transform:uppercase}.aeris-editor-content__quote{margin:0 0 .75rem;padding:.75rem .875rem;border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .4375rem));background:var(--aeris-surface-2);color:var(--aeris-text-muted)}.aeris-editor-content__unordered-list,.aeris-editor-content__ordered-list{margin:0 0 .75rem;padding-inline-start:1.35rem}.aeris-editor-content__nested-list-item{list-style-type:none}.aeris-editor-content__check-list{margin:0 0 .75rem;padding-inline-start:0;list-style:none}.aeris-editor-content__list-item--checked,.aeris-editor-content__list-item--unchecked{position:relative;padding-inline-start:1.75rem;list-style:none}.aeris-editor-content__list-item--checked:before,.aeris-editor-content__list-item--unchecked:before{position:absolute;inset-block-start:.26em;inset-inline-start:0;width:1rem;height:1rem;border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-xs, .25rem);background:var(--aeris-surface);content:\"\"}.aeris-editor-content__list-item--checked:before{border-color:var(--aeris-primary);background:var(--aeris-primary)}.aeris-editor-content__list-item--checked:after{position:absolute;inset-block-start:.43em;inset-inline-start:.27rem;width:.45rem;height:.24rem;border-block-end:2px solid var(--aeris-primary-contrast, white);border-inline-start:2px solid var(--aeris-primary-contrast, white);content:\"\";transform:rotate(-45deg)}.aeris-editor-content__list-item--checked{color:var(--aeris-text-muted);text-decoration:line-through}.aeris-editor-content__bold{font-weight:var(--aeris-font-weight-bold, 700)}.aeris-editor-content__italic{font-style:italic}.aeris-editor-content__underline{text-decoration:underline;text-underline-offset:.14em}.aeris-editor-content__strikethrough{text-decoration:line-through}.aeris-editor-content__code{padding:.12em .32em;border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-xs, .25rem);background:var(--aeris-surface-2);font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.9em}.aeris-editor-content__highlight{border-radius:.18em;background:color-mix(in srgb,var(--aeris-warning, #c38600) 28%,transparent)}.aeris-editor-content__lowercase{text-transform:lowercase}.aeris-editor-content__uppercase{text-transform:uppercase}.aeris-editor-content__capitalize{text-transform:capitalize}.aeris-editor-content__subscript,.aeris-editor-content__superscript{font-size:.75em;line-height:0}.aeris-editor-content__subscript{vertical-align:sub}.aeris-editor-content__superscript{vertical-align:super}@media(prefers-reduced-motion:reduce){.aeris-editor,.aeris-editor__toolbar button{transition:none}}@media(pointer:coarse){input:not([type=checkbox]):not([type=radio]),textarea{font-size:var(--aeris-mobile-input-font-size, 1rem)}}\n"],
|
|
1200
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
1201
|
+
});
|
|
1202
|
+
};
|
|
1203
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1204
|
+
minVersion: "12.0.0",
|
|
1205
|
+
version: "22.2.2",
|
|
1206
|
+
ngImport: i0,
|
|
1207
|
+
type: AerisEditorComponent,
|
|
1208
|
+
decorators: [{
|
|
1209
|
+
type: Component,
|
|
1210
|
+
args: [{
|
|
1211
|
+
selector: "aeris-editor",
|
|
1212
|
+
template: `
|
|
1045
1213
|
<div
|
|
1046
1214
|
class="aeris-editor"
|
|
1047
1215
|
[attr.data-size]="size()"
|
|
1048
1216
|
[attr.data-appearance]="appearance()"
|
|
1049
|
-
[attr.data-invalid]="
|
|
1217
|
+
[attr.data-invalid]="displayInvalid() || null"
|
|
1050
1218
|
[attr.data-disabled]="effectiveDisabled() || null"
|
|
1051
1219
|
[attr.data-readonly]="readonly() || null"
|
|
1052
1220
|
[attr.data-fluid]="fluid() || null"
|
|
@@ -1071,7 +1239,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
1071
1239
|
</button>
|
|
1072
1240
|
}
|
|
1073
1241
|
|
|
1074
|
-
@if (
|
|
1242
|
+
@if (toolbarSeparators().inline) {
|
|
1075
1243
|
<span class="aeris-editor__separator" aria-hidden="true"></span>
|
|
1076
1244
|
}
|
|
1077
1245
|
@if (availableFormats().has('bold')) {
|
|
@@ -1200,7 +1368,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
1200
1368
|
</button>
|
|
1201
1369
|
}
|
|
1202
1370
|
|
|
1203
|
-
@if (
|
|
1371
|
+
@if (toolbarSeparators().block) {
|
|
1204
1372
|
<span class="aeris-editor__separator" aria-hidden="true"></span>
|
|
1205
1373
|
}
|
|
1206
1374
|
@if (availableFormats().has('paragraph')) {
|
|
@@ -1310,7 +1478,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
1310
1478
|
</button>
|
|
1311
1479
|
}
|
|
1312
1480
|
|
|
1313
|
-
@if (
|
|
1481
|
+
@if (toolbarSeparators().list) {
|
|
1314
1482
|
<span class="aeris-editor__separator" aria-hidden="true"></span>
|
|
1315
1483
|
}
|
|
1316
1484
|
@if (availableFormats().has('bulletList')) {
|
|
@@ -1372,7 +1540,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
1372
1540
|
</button>
|
|
1373
1541
|
}
|
|
1374
1542
|
|
|
1375
|
-
@if (
|
|
1543
|
+
@if (toolbarSeparators().alignment) {
|
|
1376
1544
|
<span class="aeris-editor__separator" aria-hidden="true"></span>
|
|
1377
1545
|
}
|
|
1378
1546
|
@if (availableFormats().has('alignLeft')) {
|
|
@@ -1454,7 +1622,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
1454
1622
|
</button>
|
|
1455
1623
|
}
|
|
1456
1624
|
|
|
1457
|
-
@if (
|
|
1625
|
+
@if (toolbarSeparators().document) {
|
|
1458
1626
|
<span class="aeris-editor__separator" aria-hidden="true"></span>
|
|
1459
1627
|
}
|
|
1460
1628
|
@if (availableFormats().has('outdent')) {
|
|
@@ -1509,9 +1677,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
1509
1677
|
[id]="resolvedInputId()"
|
|
1510
1678
|
[attr.contenteditable]="editable()"
|
|
1511
1679
|
[attr.aria-label]="ariaLabel() || null"
|
|
1512
|
-
[attr.aria-labelledby]="
|
|
1513
|
-
[attr.aria-describedby]="
|
|
1514
|
-
[attr.aria-invalid]="
|
|
1680
|
+
[attr.aria-labelledby]="ariaLabelledBy() || null"
|
|
1681
|
+
[attr.aria-describedby]="ariaDescribedBy() || null"
|
|
1682
|
+
[attr.aria-invalid]="displayInvalid() || null"
|
|
1515
1683
|
[attr.aria-required]="required() || null"
|
|
1516
1684
|
[attr.aria-placeholder]="placeholder() || null"
|
|
1517
1685
|
[attr.tabindex]="effectiveDisabled() ? -1 : 0"
|
|
@@ -1528,21 +1696,233 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
1528
1696
|
<input type="hidden" [name]="name()" [value]="value()" />
|
|
1529
1697
|
}
|
|
1530
1698
|
</div>
|
|
1531
|
-
`,
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1699
|
+
`,
|
|
1700
|
+
encapsulation: ViewEncapsulation.None,
|
|
1701
|
+
providers: [{
|
|
1702
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1703
|
+
useExisting: forwardRef(() => AerisEditorComponent),
|
|
1704
|
+
multi: true
|
|
1705
|
+
}],
|
|
1706
|
+
host: { "[attr.data-fluid]": "fluid() || null" },
|
|
1707
|
+
styles: [":host{display:inline-block;color:var(--aeris-text)}:host([data-fluid]){display:block;width:100%}.aeris-editor{--aeris-editor-padding: .875rem;--aeris-editor-font-size: var(--aeris-font-size-xl, .9375rem);--aeris-editor-line-height: 1.6;display:grid;overflow:hidden;width:min(100%,44rem);border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-structured-control, var(--aeris-radius-control, var(--aeris-radius-md, .5625rem)));background:var(--aeris-surface);box-shadow:var(--aeris-shadow-xs, 0 1px 2px rgba(0, 0, 0, .1));transition:border-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),box-shadow var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),background var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}.aeris-editor[data-fluid]{width:100%}.aeris-editor[data-size=sm]{--aeris-editor-padding: .75rem;--aeris-editor-font-size: var(--aeris-font-size-lg, .875rem)}.aeris-editor[data-size=lg]{--aeris-editor-padding: 1rem;--aeris-editor-font-size: var(--aeris-font-size-2xl, 1rem)}.aeris-editor[data-appearance=filled]{background:var(--aeris-surface-2)}.aeris-editor:focus-within{border-color:var(--aeris-control-focus-border, var(--aeris-focus));box-shadow:0 0 0 var(--aeris-focus-ring-width, 3px) var(--aeris-control-focus-ring-color, var(--aeris-focus-ring-color, transparent))}.aeris-editor[data-invalid]{border-color:var(--aeris-control-invalid-border, var(--aeris-danger))}.aeris-editor[data-invalid]:focus-within{box-shadow:0 0 0 var(--aeris-focus-ring-width, 3px) var(--aeris-control-invalid-focus-ring-color, transparent)}.aeris-editor[data-disabled]{cursor:not-allowed;opacity:.62}.aeris-editor__toolbar{display:flex;flex-wrap:wrap;gap:.25rem;align-items:center;padding:.5rem;border-bottom:1px solid var(--aeris-border);background:color-mix(in srgb,var(--aeris-surface-2) 82%,transparent)}.aeris-editor__toolbar button{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--aeris-radius-item, var(--aeris-radius-sm, .4375rem));background:transparent;color:var(--aeris-text);font:inherit;font-size:var(--aeris-font-size-md, .8125rem);font-weight:var(--aeris-font-weight-bold, 700);cursor:pointer;transition:background var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),box-shadow var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}.aeris-editor__toolbar button[aria-pressed=true]{background:var(--aeris-primary-soft);color:var(--aeris-text)}@media(hover:hover){.aeris-editor__toolbar button:hover:not(:disabled){background:var(--aeris-primary-soft);color:var(--aeris-text)}}.aeris-editor__toolbar button:focus-visible{outline:var(--aeris-focus-ring-width, 3px) solid var(--aeris-focus);outline-offset:var(--aeris-focus-ring-offset, 2px)}.aeris-editor__toolbar button:disabled{cursor:not-allowed;opacity:.45}.aeris-editor__toolbar svg{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.9}:dir(rtl) .aeris-editor__logical-icon{transform:scaleX(-1)}.aeris-editor__separator{width:1px;height:1.5rem;margin-inline:.125rem;background:var(--aeris-border)}.aeris-editor__underline{text-decoration:underline;text-underline-offset:.14em}.aeris-editor__strikethrough{text-decoration:line-through}.aeris-editor__toolbar sub,.aeris-editor__toolbar sup{font-size:.65em}.aeris-editor__content-shell{position:relative;display:grid}.aeris-editor__content{position:relative;z-index:1;min-width:0;padding:var(--aeris-editor-padding);color:var(--aeris-text);font-size:var(--aeris-editor-font-size);line-height:var(--aeris-editor-line-height);outline:0;overflow-wrap:anywhere}.aeris-editor__content[contenteditable=false]{cursor:default}.aeris-editor__placeholder{position:absolute;inset-block-start:var(--aeris-editor-padding);inset-inline-start:var(--aeris-editor-padding);color:var(--aeris-text-muted);font-size:var(--aeris-editor-font-size);line-height:var(--aeris-editor-line-height);pointer-events:none}.aeris-editor-content__paragraph{margin:0 0 .65rem}.aeris-editor-content__paragraph:last-child{margin-bottom:0}.aeris-editor-content__heading{margin:0 0 .75rem;color:var(--aeris-text);font-size:1.3em;line-height:var(--aeris-line-height-tight, 1.25)}.aeris-editor-content__heading--h1{font-size:1.65em}.aeris-editor-content__heading--h2{font-size:1.35em}.aeris-editor-content__heading--h3{font-size:1.15em}.aeris-editor-content__heading--h4{font-size:1.05em}.aeris-editor-content__heading--h5{font-size:.95em}.aeris-editor-content__heading--h6{font-size:.85em;letter-spacing:.02em;text-transform:uppercase}.aeris-editor-content__quote{margin:0 0 .75rem;padding:.75rem .875rem;border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .4375rem));background:var(--aeris-surface-2);color:var(--aeris-text-muted)}.aeris-editor-content__unordered-list,.aeris-editor-content__ordered-list{margin:0 0 .75rem;padding-inline-start:1.35rem}.aeris-editor-content__nested-list-item{list-style-type:none}.aeris-editor-content__check-list{margin:0 0 .75rem;padding-inline-start:0;list-style:none}.aeris-editor-content__list-item--checked,.aeris-editor-content__list-item--unchecked{position:relative;padding-inline-start:1.75rem;list-style:none}.aeris-editor-content__list-item--checked:before,.aeris-editor-content__list-item--unchecked:before{position:absolute;inset-block-start:.26em;inset-inline-start:0;width:1rem;height:1rem;border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-xs, .25rem);background:var(--aeris-surface);content:\"\"}.aeris-editor-content__list-item--checked:before{border-color:var(--aeris-primary);background:var(--aeris-primary)}.aeris-editor-content__list-item--checked:after{position:absolute;inset-block-start:.43em;inset-inline-start:.27rem;width:.45rem;height:.24rem;border-block-end:2px solid var(--aeris-primary-contrast, white);border-inline-start:2px solid var(--aeris-primary-contrast, white);content:\"\";transform:rotate(-45deg)}.aeris-editor-content__list-item--checked{color:var(--aeris-text-muted);text-decoration:line-through}.aeris-editor-content__bold{font-weight:var(--aeris-font-weight-bold, 700)}.aeris-editor-content__italic{font-style:italic}.aeris-editor-content__underline{text-decoration:underline;text-underline-offset:.14em}.aeris-editor-content__strikethrough{text-decoration:line-through}.aeris-editor-content__code{padding:.12em .32em;border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-xs, .25rem);background:var(--aeris-surface-2);font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.9em}.aeris-editor-content__highlight{border-radius:.18em;background:color-mix(in srgb,var(--aeris-warning, #c38600) 28%,transparent)}.aeris-editor-content__lowercase{text-transform:lowercase}.aeris-editor-content__uppercase{text-transform:uppercase}.aeris-editor-content__capitalize{text-transform:capitalize}.aeris-editor-content__subscript,.aeris-editor-content__superscript{font-size:.75em;line-height:0}.aeris-editor-content__subscript{vertical-align:sub}.aeris-editor-content__superscript{vertical-align:super}@media(prefers-reduced-motion:reduce){.aeris-editor,.aeris-editor__toolbar button{transition:none}}@media(pointer:coarse){input:not([type=checkbox]):not([type=radio]),textarea{font-size:var(--aeris-mobile-input-font-size, 1rem)}}\n"]
|
|
1708
|
+
}]
|
|
1709
|
+
}],
|
|
1710
|
+
ctorParameters: () => [],
|
|
1711
|
+
propDecorators: {
|
|
1712
|
+
value: [{
|
|
1713
|
+
type: i0.Input,
|
|
1714
|
+
args: [{
|
|
1715
|
+
isSignal: true,
|
|
1716
|
+
alias: "value",
|
|
1717
|
+
required: false
|
|
1718
|
+
}]
|
|
1719
|
+
}, {
|
|
1720
|
+
type: i0.Output,
|
|
1721
|
+
args: ["valueChange"]
|
|
1722
|
+
}],
|
|
1723
|
+
inputId: [{
|
|
1724
|
+
type: i0.Input,
|
|
1725
|
+
args: [{
|
|
1726
|
+
isSignal: true,
|
|
1727
|
+
alias: "inputId",
|
|
1728
|
+
required: false
|
|
1729
|
+
}]
|
|
1730
|
+
}],
|
|
1731
|
+
name: [{
|
|
1732
|
+
type: i0.Input,
|
|
1733
|
+
args: [{
|
|
1734
|
+
isSignal: true,
|
|
1735
|
+
alias: "name",
|
|
1736
|
+
required: false
|
|
1737
|
+
}]
|
|
1738
|
+
}],
|
|
1739
|
+
placeholder: [{
|
|
1740
|
+
type: i0.Input,
|
|
1741
|
+
args: [{
|
|
1742
|
+
isSignal: true,
|
|
1743
|
+
alias: "placeholder",
|
|
1744
|
+
required: false
|
|
1745
|
+
}]
|
|
1746
|
+
}],
|
|
1747
|
+
ariaLabel: [{
|
|
1748
|
+
type: i0.Input,
|
|
1749
|
+
args: [{
|
|
1750
|
+
isSignal: true,
|
|
1751
|
+
alias: "ariaLabel",
|
|
1752
|
+
required: false
|
|
1753
|
+
}]
|
|
1754
|
+
}],
|
|
1755
|
+
ariaLabelledBy: [{
|
|
1756
|
+
type: i0.Input,
|
|
1757
|
+
args: [{
|
|
1758
|
+
isSignal: true,
|
|
1759
|
+
alias: "ariaLabelledBy",
|
|
1760
|
+
required: false
|
|
1761
|
+
}]
|
|
1762
|
+
}],
|
|
1763
|
+
ariaDescribedBy: [{
|
|
1764
|
+
type: i0.Input,
|
|
1765
|
+
args: [{
|
|
1766
|
+
isSignal: true,
|
|
1767
|
+
alias: "ariaDescribedBy",
|
|
1768
|
+
required: false
|
|
1769
|
+
}]
|
|
1770
|
+
}],
|
|
1771
|
+
toolbarAriaLabel: [{
|
|
1772
|
+
type: i0.Input,
|
|
1773
|
+
args: [{
|
|
1774
|
+
isSignal: true,
|
|
1775
|
+
alias: "toolbarAriaLabel",
|
|
1776
|
+
required: false
|
|
1777
|
+
}]
|
|
1778
|
+
}],
|
|
1779
|
+
size: [{
|
|
1780
|
+
type: i0.Input,
|
|
1781
|
+
args: [{
|
|
1782
|
+
isSignal: true,
|
|
1783
|
+
alias: "size",
|
|
1784
|
+
required: false
|
|
1785
|
+
}]
|
|
1786
|
+
}],
|
|
1787
|
+
appearance: [{
|
|
1788
|
+
type: i0.Input,
|
|
1789
|
+
args: [{
|
|
1790
|
+
isSignal: true,
|
|
1791
|
+
alias: "appearance",
|
|
1792
|
+
required: false
|
|
1793
|
+
}]
|
|
1794
|
+
}],
|
|
1795
|
+
minHeight: [{
|
|
1796
|
+
type: i0.Input,
|
|
1797
|
+
args: [{
|
|
1798
|
+
isSignal: true,
|
|
1799
|
+
alias: "minHeight",
|
|
1800
|
+
required: false
|
|
1801
|
+
}]
|
|
1802
|
+
}],
|
|
1803
|
+
formats: [{
|
|
1804
|
+
type: i0.Input,
|
|
1805
|
+
args: [{
|
|
1806
|
+
isSignal: true,
|
|
1807
|
+
alias: "formats",
|
|
1808
|
+
required: false
|
|
1809
|
+
}]
|
|
1810
|
+
}],
|
|
1811
|
+
namespace: [{
|
|
1812
|
+
type: i0.Input,
|
|
1813
|
+
args: [{
|
|
1814
|
+
isSignal: true,
|
|
1815
|
+
alias: "namespace",
|
|
1816
|
+
required: false
|
|
1817
|
+
}]
|
|
1818
|
+
}],
|
|
1819
|
+
lexicalTheme: [{
|
|
1820
|
+
type: i0.Input,
|
|
1821
|
+
args: [{
|
|
1822
|
+
isSignal: true,
|
|
1823
|
+
alias: "lexicalTheme",
|
|
1824
|
+
required: false
|
|
1825
|
+
}]
|
|
1826
|
+
}],
|
|
1827
|
+
htmlConfig: [{
|
|
1828
|
+
type: i0.Input,
|
|
1829
|
+
args: [{
|
|
1830
|
+
isSignal: true,
|
|
1831
|
+
alias: "htmlConfig",
|
|
1832
|
+
required: false
|
|
1833
|
+
}]
|
|
1834
|
+
}],
|
|
1835
|
+
extensions: [{
|
|
1836
|
+
type: i0.Input,
|
|
1837
|
+
args: [{
|
|
1838
|
+
isSignal: true,
|
|
1839
|
+
alias: "extensions",
|
|
1840
|
+
required: false
|
|
1841
|
+
}]
|
|
1842
|
+
}],
|
|
1843
|
+
disabled: [{
|
|
1844
|
+
type: i0.Input,
|
|
1845
|
+
args: [{
|
|
1846
|
+
isSignal: true,
|
|
1847
|
+
alias: "disabled",
|
|
1848
|
+
required: false
|
|
1849
|
+
}]
|
|
1850
|
+
}],
|
|
1851
|
+
readonly: [{
|
|
1852
|
+
type: i0.Input,
|
|
1853
|
+
args: [{
|
|
1854
|
+
isSignal: true,
|
|
1855
|
+
alias: "readonly",
|
|
1856
|
+
required: false
|
|
1857
|
+
}]
|
|
1858
|
+
}],
|
|
1859
|
+
required: [{
|
|
1860
|
+
type: i0.Input,
|
|
1861
|
+
args: [{
|
|
1862
|
+
isSignal: true,
|
|
1863
|
+
alias: "required",
|
|
1864
|
+
required: false
|
|
1865
|
+
}]
|
|
1866
|
+
}],
|
|
1867
|
+
invalid: [{
|
|
1868
|
+
type: i0.Input,
|
|
1869
|
+
args: [{
|
|
1870
|
+
isSignal: true,
|
|
1871
|
+
alias: "invalid",
|
|
1872
|
+
required: false
|
|
1873
|
+
}]
|
|
1874
|
+
}],
|
|
1875
|
+
touched: [{
|
|
1876
|
+
type: i0.Input,
|
|
1877
|
+
args: [{
|
|
1878
|
+
isSignal: true,
|
|
1879
|
+
alias: "touched",
|
|
1880
|
+
required: false
|
|
1881
|
+
}]
|
|
1882
|
+
}],
|
|
1883
|
+
fluid: [{
|
|
1884
|
+
type: i0.Input,
|
|
1885
|
+
args: [{
|
|
1886
|
+
isSignal: true,
|
|
1887
|
+
alias: "fluid",
|
|
1888
|
+
required: false
|
|
1889
|
+
}]
|
|
1890
|
+
}],
|
|
1891
|
+
showToolbar: [{
|
|
1892
|
+
type: i0.Input,
|
|
1893
|
+
args: [{
|
|
1894
|
+
isSignal: true,
|
|
1895
|
+
alias: "showToolbar",
|
|
1896
|
+
required: false
|
|
1897
|
+
}]
|
|
1898
|
+
}],
|
|
1899
|
+
changed: [{
|
|
1900
|
+
type: i0.Output,
|
|
1901
|
+
args: ["changed"]
|
|
1902
|
+
}],
|
|
1903
|
+
focused: [{
|
|
1904
|
+
type: i0.Output,
|
|
1905
|
+
args: ["focused"]
|
|
1906
|
+
}],
|
|
1907
|
+
blurred: [{
|
|
1908
|
+
type: i0.Output,
|
|
1909
|
+
args: ["blurred"]
|
|
1910
|
+
}],
|
|
1911
|
+
touch: [{
|
|
1912
|
+
type: i0.Output,
|
|
1913
|
+
args: ["touch"]
|
|
1914
|
+
}],
|
|
1915
|
+
ready: [{
|
|
1916
|
+
type: i0.Output,
|
|
1917
|
+
args: ["ready"]
|
|
1918
|
+
}],
|
|
1919
|
+
editorRoot: [{
|
|
1920
|
+
type: i0.ViewChild,
|
|
1921
|
+
args: ["editorRoot", { isSignal: true }]
|
|
1922
|
+
}]
|
|
1923
|
+
}
|
|
1924
|
+
});
|
|
1541
1925
|
const AerisEditor = [AerisEditorComponent];
|
|
1542
|
-
|
|
1543
|
-
/**
|
|
1544
|
-
* Generated bundle index. Do not edit.
|
|
1545
|
-
*/
|
|
1546
|
-
|
|
1547
1926
|
export { AERIS_EDITOR_ALL_FORMATS, AERIS_EDITOR_DEFAULT_FORMATS, AerisEditor, AerisEditorComponent };
|
|
1548
|
-
|
|
1927
|
+
|
|
1928
|
+
//# sourceMappingURL=aeris-ui-core-editor.mjs.map
|