@aeris-ui/core 22.0.0-alpha.6 → 22.0.0-alpha.7
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 +2 -2
- package/fesm2022/aeris-ui-core-accordion.mjs +12 -12
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +3 -3
- package/fesm2022/aeris-ui-core-auto-complete.mjs +47 -40
- package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-focus.mjs +3 -3
- package/fesm2022/aeris-ui-core-avatar.mjs +6 -6
- package/fesm2022/aeris-ui-core-badge.mjs +6 -6
- package/fesm2022/aeris-ui-core-badge.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-block-ui.mjs +3 -3
- package/fesm2022/aeris-ui-core-breadcrumb.mjs +12 -12
- package/fesm2022/aeris-ui-core-button-group.mjs +3 -3
- package/fesm2022/aeris-ui-core-button.mjs +38 -56
- package/fesm2022/aeris-ui-core-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-card.mjs +18 -18
- package/fesm2022/aeris-ui-core-carousel.mjs +12 -12
- package/fesm2022/aeris-ui-core-cascade-select.mjs +39 -30
- package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chart.mjs +3 -3
- package/fesm2022/aeris-ui-core-checkbox.mjs +22 -19
- package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chip.mjs +9 -9
- package/fesm2022/aeris-ui-core-class-names.mjs +3 -3
- package/fesm2022/aeris-ui-core-color-picker.mjs +28 -26
- package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-compare.mjs +21 -25
- package/fesm2022/aeris-ui-core-compare.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs +45 -43
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-popup.mjs +43 -39
- package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-context-menu.mjs +14 -17
- package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-date-picker.mjs +24 -22
- package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dialog.mjs +32 -29
- package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-divider.mjs +3 -3
- package/fesm2022/aeris-ui-core-drawer.mjs +27 -28
- package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +23 -23
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-editor.mjs +22 -19
- package/fesm2022/aeris-ui-core-editor.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-file-upload.mjs +24 -24
- package/fesm2022/aeris-ui-core-filter-service.mjs +3 -3
- package/fesm2022/aeris-ui-core-fluid.mjs +3 -3
- package/fesm2022/aeris-ui-core-focus-trap.mjs +3 -3
- package/fesm2022/aeris-ui-core-form-field.mjs +31 -26
- package/fesm2022/aeris-ui-core-form-field.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-galleria.mjs +30 -30
- package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-glass.mjs +3 -3
- package/fesm2022/aeris-ui-core-icon-field.mjs +22 -17
- package/fesm2022/aeris-ui-core-icon-field.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-inplace.mjs +9 -9
- package/fesm2022/aeris-ui-core-input-group.mjs +25 -20
- package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-mask.mjs +25 -24
- package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-number.mjs +41 -29
- package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-otp.mjs +28 -28
- package/fesm2022/aeris-ui-core-input-otp.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-text.mjs +32 -31
- package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-key-filter.mjs +3 -3
- package/fesm2022/aeris-ui-core-mega-menu.mjs +6 -6
- package/fesm2022/aeris-ui-core-menu.mjs +23 -26
- package/fesm2022/aeris-ui-core-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menubar.mjs +15 -15
- package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-message.mjs +12 -12
- package/fesm2022/aeris-ui-core-message.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-meter-group.mjs +15 -15
- package/fesm2022/aeris-ui-core-multi-select.mjs +45 -39
- package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-order-list.mjs +9 -9
- package/fesm2022/aeris-ui-core-organization-chart.mjs +9 -9
- package/fesm2022/aeris-ui-core-paginator.mjs +4 -4
- package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-panel.mjs +15 -15
- package/fesm2022/aeris-ui-core-password.mjs +52 -46
- package/fesm2022/aeris-ui-core-password.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-pick-list.mjs +9 -9
- package/fesm2022/aeris-ui-core-popover.mjs +27 -28
- package/fesm2022/aeris-ui-core-popover.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-bar.mjs +9 -9
- package/fesm2022/aeris-ui-core-progress-spinner.mjs +6 -6
- package/fesm2022/aeris-ui-core-radio-button.mjs +22 -19
- package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-rating.mjs +12 -14
- package/fesm2022/aeris-ui-core-rating.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-panel.mjs +3 -3
- package/fesm2022/aeris-ui-core-scroll-top.mjs +3 -3
- package/fesm2022/aeris-ui-core-select.mjs +75 -67
- package/fesm2022/aeris-ui-core-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-skeleton.mjs +3 -3
- package/fesm2022/aeris-ui-core-slider.mjs +42 -52
- package/fesm2022/aeris-ui-core-slider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-speed-dial.mjs +46 -22
- package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-split-button.mjs +38 -37
- package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-splitter.mjs +6 -6
- package/fesm2022/aeris-ui-core-stepper.mjs +12 -12
- package/fesm2022/aeris-ui-core-style-class.mjs +3 -3
- package/fesm2022/aeris-ui-core-table.mjs +28 -22
- package/fesm2022/aeris-ui-core-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tabs.mjs +12 -12
- package/fesm2022/aeris-ui-core-textarea.mjs +37 -35
- package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theme-builder.mjs +1 -1
- package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theming.mjs +4 -4
- package/fesm2022/aeris-ui-core-theming.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tiered-menu.mjs +14 -17
- package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-timeline.mjs +15 -15
- package/fesm2022/aeris-ui-core-toast.mjs +26 -15
- package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toggle-switch.mjs +22 -19
- package/fesm2022/aeris-ui-core-toggle-switch.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toolbar.mjs +18 -18
- package/fesm2022/aeris-ui-core-tooltip.mjs +13 -19
- package/fesm2022/aeris-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-select.mjs +45 -39
- package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-table.mjs +25 -19
- package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree.mjs +14 -14
- package/fesm2022/aeris-ui-core-tree.mjs.map +1 -1
- package/fesm2022/aeris-ui-core.mjs +49 -15
- package/fesm2022/aeris-ui-core.mjs.map +1 -1
- package/package.json +1 -1
- package/schematics/runtime/theme-builder/aeris-theme.js +1 -1
- package/types/aeris-ui-core-auto-complete.d.ts +6 -4
- package/types/aeris-ui-core-badge.d.ts +4 -3
- package/types/aeris-ui-core-button.d.ts +13 -16
- package/types/aeris-ui-core-cascade-select.d.ts +6 -3
- package/types/aeris-ui-core-checkbox.d.ts +5 -4
- package/types/aeris-ui-core-color-picker.d.ts +5 -4
- package/types/aeris-ui-core-compare.d.ts +3 -4
- package/types/aeris-ui-core-confirm-dialog.d.ts +13 -13
- package/types/aeris-ui-core-confirm-popup.d.ts +13 -13
- package/types/aeris-ui-core-context-menu.d.ts +4 -5
- package/types/aeris-ui-core-date-picker.d.ts +5 -4
- package/types/aeris-ui-core-dialog.d.ts +4 -5
- package/types/aeris-ui-core-drawer.d.ts +4 -5
- package/types/aeris-ui-core-dynamic-dialog.d.ts +9 -9
- package/types/aeris-ui-core-editor.d.ts +5 -4
- package/types/aeris-ui-core-filter-service.d.ts +1 -1
- package/types/aeris-ui-core-form-field.d.ts +6 -4
- package/types/aeris-ui-core-galleria.d.ts +2 -2
- package/types/aeris-ui-core-icon-field.d.ts +3 -1
- package/types/aeris-ui-core-input-group.d.ts +22 -20
- package/types/aeris-ui-core-input-mask.d.ts +5 -4
- package/types/aeris-ui-core-input-number.d.ts +5 -4
- package/types/aeris-ui-core-input-otp.d.ts +5 -4
- package/types/aeris-ui-core-input-text.d.ts +7 -5
- package/types/aeris-ui-core-menu.d.ts +4 -5
- package/types/aeris-ui-core-menubar.d.ts +5 -4
- package/types/aeris-ui-core-message.d.ts +3 -2
- package/types/aeris-ui-core-multi-select.d.ts +6 -4
- package/types/aeris-ui-core-password.d.ts +5 -4
- package/types/aeris-ui-core-popover.d.ts +4 -5
- package/types/aeris-ui-core-radio-button.d.ts +5 -4
- package/types/aeris-ui-core-rating.d.ts +3 -4
- package/types/aeris-ui-core-select.d.ts +6 -4
- package/types/aeris-ui-core-slider.d.ts +5 -4
- package/types/aeris-ui-core-speed-dial.d.ts +4 -4
- package/types/aeris-ui-core-split-button.d.ts +10 -12
- package/types/aeris-ui-core-table.d.ts +3 -1
- package/types/aeris-ui-core-textarea.d.ts +8 -5
- package/types/aeris-ui-core-theme-builder.d.ts +1 -1
- package/types/aeris-ui-core-theming.d.ts +1 -1
- package/types/aeris-ui-core-tiered-menu.d.ts +4 -5
- package/types/aeris-ui-core-toast.d.ts +4 -2
- package/types/aeris-ui-core-toggle-switch.d.ts +5 -4
- package/types/aeris-ui-core-tooltip.d.ts +3 -3
- package/types/aeris-ui-core-tree-select.d.ts +6 -4
- package/types/aeris-ui-core-tree-table.d.ts +3 -1
- package/types/aeris-ui-core.d.ts +16 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aeris-ui-core-dynamic-dialog.mjs","sources":["../../../projects/aeris-ui/dynamic-dialog/aeris-dynamic-dialog.ts","../../../projects/aeris-ui/dynamic-dialog/aeris-ui-core-dynamic-dialog.ts"],"sourcesContent":["import { DOCUMENT, NgComponentOutlet } from '@angular/common';\nimport {\n ApplicationRef,\n Component,\n ComponentRef,\n EmbeddedViewRef,\n EnvironmentInjector,\n InjectionToken,\n Injector,\n Service,\n Type,\n computed,\n createComponent,\n inject,\n input,\n linkedSignal,\n signal,\n viewChild,\n} from '@angular/core';\n\nimport {\n AerisDialog,\n type AerisDialogCloseReason,\n type AerisDialogPosition,\n type AerisDialogSize,\n type AerisDialogVisibilityChangeEvent,\n} from '@aeris-ui/core/dialog';\nimport type { AerisAppendTo } from '@aeris-ui/core';\n\nexport interface AerisDynamicDialogConfig<TData = unknown> {\n readonly header?: string;\n readonly appendTo?: AerisAppendTo;\n readonly data?: TData;\n readonly inputValues?: Record<string, unknown>;\n readonly modal?: boolean;\n readonly backdrop?: boolean;\n readonly backdropBlur?: boolean;\n readonly backdropBlurAmount?: string;\n readonly dismissibleMask?: boolean;\n readonly closeOnEscape?: boolean;\n readonly closable?: boolean;\n readonly maximizable?: boolean;\n readonly maximized?: boolean;\n readonly draggable?: boolean;\n readonly resizable?: boolean;\n readonly blockScroll?: boolean;\n readonly focusTrap?: boolean;\n readonly restoreFocus?: boolean;\n readonly autoFocus?: boolean;\n readonly initialFocus?: string;\n readonly position?: AerisDialogPosition;\n readonly size?: AerisDialogSize;\n readonly width?: string;\n readonly minWidth?: string;\n readonly maxWidth?: string;\n readonly height?: string;\n readonly maxHeight?: string;\n readonly mobileWidth?: string;\n readonly closeAriaLabel?: string;\n readonly ariaLabel?: string;\n readonly ariaLabelledBy?: string;\n readonly ariaDescribedBy?: string;\n}\n\nexport interface AerisDynamicDialogResolvedConfig<TData = unknown> {\n readonly header: string;\n readonly appendTo: AerisAppendTo;\n readonly data: TData | undefined;\n readonly inputValues: Record<string, unknown>;\n readonly modal: boolean;\n readonly backdrop: boolean;\n readonly backdropBlur: boolean;\n readonly backdropBlurAmount: string;\n readonly dismissibleMask: boolean;\n readonly closeOnEscape: boolean;\n readonly closable: boolean;\n readonly maximizable: boolean;\n readonly maximized: boolean;\n readonly draggable: boolean;\n readonly resizable: boolean;\n readonly blockScroll: boolean;\n readonly focusTrap: boolean;\n readonly restoreFocus: boolean;\n readonly autoFocus: boolean;\n readonly initialFocus: string;\n readonly position: AerisDialogPosition;\n readonly size: AerisDialogSize;\n readonly width: string;\n readonly minWidth: string;\n readonly maxWidth: string;\n readonly height: string;\n readonly maxHeight: string;\n readonly mobileWidth: string;\n readonly closeAriaLabel: string;\n readonly ariaLabel: string;\n readonly ariaLabelledBy: string;\n readonly ariaDescribedBy: string;\n}\n\nexport interface AerisDynamicDialogShowEvent {\n readonly originalEvent: Event | null;\n}\n\nexport interface AerisDynamicDialogCloseEvent<TResult = unknown> {\n readonly originalEvent: Event | null;\n readonly reason: AerisDialogCloseReason;\n readonly result: TResult | undefined;\n}\n\nexport interface AerisDynamicDialogSubscription {\n unsubscribe(): void;\n}\n\nexport interface AerisDynamicDialogSubscribable<T> {\n subscribe(next: (event: T) => void): AerisDynamicDialogSubscription;\n}\n\nexport const AERIS_DYNAMIC_DIALOG_CONFIG = new InjectionToken<\n AerisDynamicDialogResolvedConfig\n>('AERIS_DYNAMIC_DIALOG_CONFIG');\n\nexport const AERIS_DYNAMIC_DIALOG_DATA = new InjectionToken<unknown>(\n 'AERIS_DYNAMIC_DIALOG_DATA',\n);\n\ninterface AerisDynamicDialogRefController<TResult> {\n readonly close: (result: TResult | undefined, originalEvent: Event | null) => void;\n readonly destroy: () => void;\n readonly focus: (options?: FocusOptions) => void;\n readonly maximize: () => void;\n readonly restore: () => void;\n readonly toggleMaximized: () => void;\n}\n\nclass AerisDynamicDialogEventStream<T> implements AerisDynamicDialogSubscribable<T> {\n private readonly listeners = new Set<(event: T) => void>();\n private completed = false;\n\n subscribe(next: (event: T) => void): AerisDynamicDialogSubscription {\n if (this.completed) return { unsubscribe: () => undefined };\n this.listeners.add(next);\n return {\n unsubscribe: () => {\n this.listeners.delete(next);\n },\n };\n }\n\n next(event: T): void {\n if (this.completed) return;\n for (const listener of [...this.listeners]) listener(event);\n }\n\n complete(): void {\n this.completed = true;\n this.listeners.clear();\n }\n}\n\nexport class AerisDynamicDialogRef<TResult = unknown> {\n private readonly closedStream = new AerisDynamicDialogEventStream<\n AerisDynamicDialogCloseEvent<TResult>\n >();\n private readonly shownStream = new AerisDynamicDialogEventStream<AerisDynamicDialogShowEvent>();\n private controller: AerisDynamicDialogRefController<TResult> | null = null;\n private closedOnce = false;\n\n readonly closed: AerisDynamicDialogSubscribable<AerisDynamicDialogCloseEvent<TResult>> =\n this.closedStream;\n readonly shown: AerisDynamicDialogSubscribable<AerisDynamicDialogShowEvent> = this.shownStream;\n\n close(result?: TResult, originalEvent: Event | null = null): void {\n if (this.closedOnce) return;\n this.controller?.close(result, originalEvent);\n }\n\n destroy(): void {\n if (this.closedOnce) return;\n this.closedOnce = true;\n this.controller?.destroy();\n this.closedStream.complete();\n this.shownStream.complete();\n this.controller = null;\n }\n\n focus(options?: FocusOptions): void {\n this.controller?.focus(options);\n }\n\n maximize(): void {\n this.controller?.maximize();\n }\n\n restore(): void {\n this.controller?.restore();\n }\n\n toggleMaximized(): void {\n this.controller?.toggleMaximized();\n }\n\n attach(controller: AerisDynamicDialogRefController<TResult>): void {\n this.controller = controller;\n }\n\n notifyShown(event: AerisDynamicDialogShowEvent): void {\n if (this.closedOnce) return;\n this.shownStream.next(event);\n }\n\n notifyClosed(event: AerisDynamicDialogCloseEvent<TResult>): void {\n if (this.closedOnce) return;\n this.closedOnce = true;\n this.closedStream.next(event);\n this.closedStream.complete();\n this.shownStream.complete();\n this.controller = null;\n }\n}\n\n@Component({\n selector: 'aeris-dynamic-dialog-host',\n imports: [AerisDialog, NgComponentOutlet],\n template: `\n <aeris-dialog\n #dialog\n [appendTo]=\"settings().appendTo\"\n [header]=\"settings().header\"\n [modal]=\"settings().modal\"\n [backdrop]=\"settings().backdrop\"\n [backdropBlur]=\"settings().backdropBlur\"\n [backdropBlurAmount]=\"settings().backdropBlurAmount\"\n [dismissibleMask]=\"settings().dismissibleMask\"\n [closeOnEscape]=\"settings().closeOnEscape\"\n [closable]=\"settings().closable\"\n [maximizable]=\"settings().maximizable\"\n [(maximized)]=\"maximized\"\n [draggable]=\"settings().draggable\"\n [resizable]=\"settings().resizable\"\n [blockScroll]=\"settings().blockScroll\"\n [focusTrap]=\"settings().focusTrap\"\n [restoreFocus]=\"settings().restoreFocus\"\n [autoFocus]=\"settings().autoFocus\"\n [initialFocus]=\"settings().initialFocus\"\n [position]=\"settings().position\"\n [size]=\"settings().size\"\n [width]=\"settings().width\"\n [minWidth]=\"settings().minWidth\"\n [maxWidth]=\"settings().maxWidth\"\n [height]=\"settings().height\"\n [maxHeight]=\"settings().maxHeight\"\n [mobileWidth]=\"settings().mobileWidth\"\n [closeAriaLabel]=\"settings().closeAriaLabel\"\n [ariaLabel]=\"settings().ariaLabel\"\n [ariaLabelledBy]=\"settings().ariaLabelledBy\"\n [ariaDescribedBy]=\"settings().ariaDescribedBy\"\n [visible]=\"visible()\"\n (shown)=\"handleShown($event)\"\n (hidden)=\"handleHidden($event)\"\n >\n <ng-container\n [ngComponentOutlet]=\"componentType()\"\n [ngComponentOutletInputs]=\"settings().inputValues\"\n [ngComponentOutletInjector]=\"contentInjector()\"\n />\n </aeris-dialog>\n `,\n host: {\n class: 'aeris-dynamic-dialog-host',\n },\n})\nexport class AerisDynamicDialogHost {\n readonly componentType = input.required<Type<unknown>>();\n readonly contentInjector = input.required<Injector>();\n readonly config = input.required<AerisDynamicDialogResolvedConfig>();\n readonly dialogRef = input.required<AerisDynamicDialogRef>();\n\n protected readonly dialog = viewChild<AerisDialog>('dialog');\n protected readonly visible = signal(true);\n protected readonly settings = computed(() => this.config());\n protected readonly maximized = linkedSignal(() => this.settings().maximized);\n private closeResult: unknown;\n\n closeWithResult(result: unknown, originalEvent: Event | null): void {\n this.closeResult = result;\n this.dialog()?.hide(originalEvent, 'api');\n }\n\n focus(options?: FocusOptions): void {\n this.dialog()?.focus(options);\n }\n\n maximize(): void {\n this.dialog()?.maximize();\n }\n\n restore(): void {\n this.dialog()?.restore();\n }\n\n toggleMaximized(): void {\n this.dialog()?.toggleMaximized();\n }\n\n protected handleShown(event: AerisDialogVisibilityChangeEvent): void {\n queueMicrotask(() => this.dialogRef().notifyShown({ originalEvent: event.originalEvent }));\n }\n\n protected handleHidden(event: AerisDialogVisibilityChangeEvent): void {\n this.visible.set(false);\n this.dialogRef().notifyClosed({\n originalEvent: event.originalEvent,\n reason: event.reason,\n result: this.closeResult,\n });\n }\n}\n\n@Service()\nexport class AerisDynamicDialogService {\n private readonly appRef = inject(ApplicationRef);\n private readonly document = inject(DOCUMENT);\n private readonly environmentInjector = inject(EnvironmentInjector);\n private readonly activeRefs = new Set<AerisDynamicDialogRef<unknown>>();\n\n open<TComponent, TData = unknown, TResult = unknown>(\n componentType: Type<TComponent>,\n config: AerisDynamicDialogConfig<TData> = {},\n ): AerisDynamicDialogRef<TResult> {\n const resolvedConfig = this.resolveConfig(config);\n const ref = new AerisDynamicDialogRef<TResult>();\n const contentInjector = Injector.create({\n parent: this.environmentInjector,\n providers: [\n { provide: AerisDynamicDialogRef, useValue: ref },\n { provide: AERIS_DYNAMIC_DIALOG_CONFIG, useValue: resolvedConfig },\n { provide: AERIS_DYNAMIC_DIALOG_DATA, useValue: resolvedConfig.data },\n ],\n });\n const hostRef = createComponent(AerisDynamicDialogHost, {\n environmentInjector: this.environmentInjector,\n });\n const cleanup = (): void => {\n if (!this.activeRefs.delete(ref as AerisDynamicDialogRef<unknown>)) return;\n this.appRef.detachView(hostRef.hostView);\n hostRef.destroy();\n };\n\n ref.attach({\n close: (result, originalEvent) => {\n hostRef.instance.closeWithResult(result, originalEvent);\n hostRef.changeDetectorRef.detectChanges();\n },\n destroy: cleanup,\n focus: (options) => hostRef.instance.focus(options),\n maximize: () => hostRef.instance.maximize(),\n restore: () => hostRef.instance.restore(),\n toggleMaximized: () => hostRef.instance.toggleMaximized(),\n });\n ref.closed.subscribe(() => queueMicrotask(cleanup));\n this.activeRefs.add(ref as AerisDynamicDialogRef<unknown>);\n\n hostRef.setInput('componentType', componentType);\n hostRef.setInput('contentInjector', contentInjector);\n hostRef.setInput('config', resolvedConfig);\n hostRef.setInput('dialogRef', ref);\n this.appRef.attachView(hostRef.hostView);\n this.document.body.appendChild(this.rootNode(hostRef));\n hostRef.changeDetectorRef.detectChanges();\n\n return ref;\n }\n\n closeAll(): void {\n for (const ref of [...this.activeRefs].reverse()) ref.close();\n }\n\n destroyAll(): void {\n for (const ref of [...this.activeRefs].reverse()) ref.destroy();\n }\n\n private resolveConfig<TData>(\n config: AerisDynamicDialogConfig<TData>,\n ): AerisDynamicDialogResolvedConfig<TData> {\n return {\n header: config.header ?? '',\n appendTo: config.appendTo ?? 'body',\n data: config.data,\n inputValues: config.inputValues ?? {},\n modal: config.modal ?? true,\n backdrop: config.backdrop ?? true,\n backdropBlur: config.backdropBlur ?? true,\n backdropBlurAmount: config.backdropBlurAmount ?? '',\n dismissibleMask: config.dismissibleMask ?? false,\n closeOnEscape: config.closeOnEscape ?? true,\n closable: config.closable ?? true,\n maximizable: config.maximizable ?? false,\n maximized: config.maximized ?? false,\n draggable: config.draggable ?? false,\n resizable: config.resizable ?? false,\n blockScroll: config.blockScroll ?? true,\n focusTrap: config.focusTrap ?? true,\n restoreFocus: config.restoreFocus ?? true,\n autoFocus: config.autoFocus ?? true,\n initialFocus: config.initialFocus ?? '',\n position: config.position ?? 'center',\n size: config.size ?? 'md',\n width: config.width ?? '',\n minWidth: config.minWidth ?? '',\n maxWidth: config.maxWidth ?? '',\n height: config.height ?? '',\n maxHeight: config.maxHeight ?? '',\n mobileWidth: config.mobileWidth ?? '',\n closeAriaLabel: config.closeAriaLabel ?? 'Close dialog',\n ariaLabel: config.ariaLabel ?? '',\n ariaLabelledBy: config.ariaLabelledBy ?? '',\n ariaDescribedBy: config.ariaDescribedBy ?? '',\n };\n }\n\n private rootNode(hostRef: ComponentRef<AerisDynamicDialogHost>): Node {\n const [node] = (hostRef.hostView as EmbeddedViewRef<unknown>).rootNodes;\n return node instanceof Node ? node : this.document.createTextNode('');\n }\n}\n\nexport const AerisDynamicDialogModule = [AerisDynamicDialogHost] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAqHa,2BAA2B,GAAG,IAAI,cAAc,CAE3D,6BAA6B;MAElB,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA2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Ac,IAAI,cAAc;AACvD,YAAA,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,EAAE;AACjC,YAAA,cAAc,EAAE,MAAM,CAAC,cAAc,IAAI,EAAE;AAC3C,YAAA,eAAe,EAAE,MAAM,CAAC,eAAe,IAAI,EAAE;SAC9C;IACH;AAEQ,IAAA,QAAQ,CAAC,OAA6C,EAAA;QAC5D,MAAM,CAAC,IAAI,CAAC,GAAI,OAAO,CAAC,QAAqC,CAAC,SAAS;AACvE,QAAA,OAAO,IAAI,YAAY,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;IACvE;uGAxGW,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,OAAA,EAAA,CAAA;wGAAzB,yBAAyB,EAAA,CAAA;;2FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC;;AA4GM,MAAM,wBAAwB,GAAG,CAAC,sBAAsB;;AC1a/D;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"aeris-ui-core-dynamic-dialog.mjs","sources":["../../../projects/aeris-ui/dynamic-dialog/aeris-dynamic-dialog.ts","../../../projects/aeris-ui/dynamic-dialog/aeris-ui-core-dynamic-dialog.ts"],"sourcesContent":["import { DOCUMENT, NgComponentOutlet } from '@angular/common';\nimport {\n ApplicationRef,\n Component,\n ComponentRef,\n EmbeddedViewRef,\n EnvironmentInjector,\n InjectionToken,\n Injector,\n Service,\n Type,\n computed,\n createComponent,\n inject,\n input,\n linkedSignal,\n signal,\n viewChild,\n} from '@angular/core';\n\nimport {\n AerisDialog,\n type AerisDialogCloseReason,\n type AerisDialogPosition,\n type AerisDialogSize,\n type AerisDialogVisibilityChangeEvent,\n} from '@aeris-ui/core/dialog';\nimport type { AerisAppendTo } from '@aeris-ui/core';\n\nexport interface AerisDynamicDialogConfig<TData = unknown> {\n readonly header?: string;\n readonly appendTo?: AerisAppendTo;\n readonly data?: TData;\n readonly inputValues?: Record<string, unknown>;\n readonly modal?: boolean;\n readonly backdrop?: boolean;\n readonly backdropBlur?: boolean;\n readonly backdropBlurAmount?: string;\n readonly closeOnBackdropClick?: boolean;\n readonly closeOnEscape?: boolean;\n readonly closable?: boolean;\n readonly maximizable?: boolean;\n readonly maximized?: boolean;\n readonly draggable?: boolean;\n readonly resizable?: boolean;\n readonly blockScroll?: boolean;\n readonly focusTrap?: boolean;\n readonly restoreFocus?: boolean;\n readonly autoFocus?: boolean;\n readonly initialFocus?: string;\n readonly position?: AerisDialogPosition;\n readonly size?: AerisDialogSize;\n readonly width?: string;\n readonly minWidth?: string;\n readonly maxWidth?: string;\n readonly height?: string;\n readonly maxHeight?: string;\n readonly mobileWidth?: string;\n readonly closeAriaLabel?: string;\n readonly ariaLabel?: string;\n readonly ariaLabelledBy?: string;\n readonly ariaDescribedBy?: string;\n}\n\nexport interface AerisDynamicDialogResolvedConfig<TData = unknown> {\n readonly header: string;\n readonly appendTo: AerisAppendTo;\n readonly data: TData | undefined;\n readonly inputValues: Record<string, unknown>;\n readonly modal: boolean;\n readonly backdrop: boolean;\n readonly backdropBlur: boolean;\n readonly backdropBlurAmount: string;\n readonly closeOnBackdropClick: boolean;\n readonly closeOnEscape: boolean;\n readonly closable: boolean;\n readonly maximizable: boolean;\n readonly maximized: boolean;\n readonly draggable: boolean;\n readonly resizable: boolean;\n readonly blockScroll: boolean;\n readonly focusTrap: boolean;\n readonly restoreFocus: boolean;\n readonly autoFocus: boolean;\n readonly initialFocus: string;\n readonly position: AerisDialogPosition;\n readonly size: AerisDialogSize;\n readonly width: string;\n readonly minWidth: string;\n readonly maxWidth: string;\n readonly height: string;\n readonly maxHeight: string;\n readonly mobileWidth: string;\n readonly closeAriaLabel: string;\n readonly ariaLabel: string;\n readonly ariaLabelledBy: string;\n readonly ariaDescribedBy: string;\n}\n\nexport interface AerisDynamicDialogOpenEvent {\n readonly originalEvent: Event | null;\n}\n\nexport interface AerisDynamicDialogCloseEvent<TResult = unknown> {\n readonly originalEvent: Event | null;\n readonly reason: AerisDialogCloseReason;\n readonly result: TResult | undefined;\n}\n\nexport interface AerisDynamicDialogSubscription {\n unsubscribe(): void;\n}\n\nexport interface AerisDynamicDialogSubscribable<T> {\n subscribe(next: (event: T) => void): AerisDynamicDialogSubscription;\n}\n\nexport const AERIS_DYNAMIC_DIALOG_CONFIG = new InjectionToken<AerisDynamicDialogResolvedConfig>(\n 'AERIS_DYNAMIC_DIALOG_CONFIG',\n);\n\nexport const AERIS_DYNAMIC_DIALOG_DATA = new InjectionToken<unknown>('AERIS_DYNAMIC_DIALOG_DATA');\n\ninterface AerisDynamicDialogRefController<TResult> {\n readonly close: (result: TResult | undefined, originalEvent: Event | null) => void;\n readonly destroy: () => void;\n readonly focus: (options?: FocusOptions) => void;\n readonly maximize: () => void;\n readonly restore: () => void;\n readonly toggleMaximized: () => void;\n}\n\nclass AerisDynamicDialogEventStream<T> implements AerisDynamicDialogSubscribable<T> {\n private readonly listeners = new Set<(event: T) => void>();\n private completed = false;\n\n subscribe(next: (event: T) => void): AerisDynamicDialogSubscription {\n if (this.completed) return { unsubscribe: () => undefined };\n this.listeners.add(next);\n return {\n unsubscribe: () => {\n this.listeners.delete(next);\n },\n };\n }\n\n next(event: T): void {\n if (this.completed) return;\n for (const listener of [...this.listeners]) listener(event);\n }\n\n complete(): void {\n this.completed = true;\n this.listeners.clear();\n }\n}\n\nexport class AerisDynamicDialogRef<TResult = unknown> {\n private readonly closedStream = new AerisDynamicDialogEventStream<\n AerisDynamicDialogCloseEvent<TResult>\n >();\n private readonly openedStream = new AerisDynamicDialogEventStream<AerisDynamicDialogOpenEvent>();\n private controller: AerisDynamicDialogRefController<TResult> | null = null;\n private closedOnce = false;\n\n readonly closed: AerisDynamicDialogSubscribable<AerisDynamicDialogCloseEvent<TResult>> =\n this.closedStream;\n readonly opened: AerisDynamicDialogSubscribable<AerisDynamicDialogOpenEvent> = this.openedStream;\n\n close(result?: TResult, originalEvent: Event | null = null): void {\n if (this.closedOnce) return;\n this.controller?.close(result, originalEvent);\n }\n\n destroy(): void {\n if (this.closedOnce) return;\n this.closedOnce = true;\n this.controller?.destroy();\n this.closedStream.complete();\n this.openedStream.complete();\n this.controller = null;\n }\n\n focus(options?: FocusOptions): void {\n this.controller?.focus(options);\n }\n\n maximize(): void {\n this.controller?.maximize();\n }\n\n restore(): void {\n this.controller?.restore();\n }\n\n toggleMaximized(): void {\n this.controller?.toggleMaximized();\n }\n\n attach(controller: AerisDynamicDialogRefController<TResult>): void {\n this.controller = controller;\n }\n\n notifyOpened(event: AerisDynamicDialogOpenEvent): void {\n if (this.closedOnce) return;\n this.openedStream.next(event);\n }\n\n notifyClosed(event: AerisDynamicDialogCloseEvent<TResult>): void {\n if (this.closedOnce) return;\n this.closedOnce = true;\n this.closedStream.next(event);\n this.closedStream.complete();\n this.openedStream.complete();\n this.controller = null;\n }\n}\n\n@Component({\n selector: 'aeris-dynamic-dialog-host',\n imports: [AerisDialog, NgComponentOutlet],\n template: `\n <aeris-dialog\n #dialog\n [appendTo]=\"settings().appendTo\"\n [header]=\"settings().header\"\n [modal]=\"settings().modal\"\n [backdrop]=\"settings().backdrop\"\n [backdropBlur]=\"settings().backdropBlur\"\n [backdropBlurAmount]=\"settings().backdropBlurAmount\"\n [closeOnBackdropClick]=\"settings().closeOnBackdropClick\"\n [closeOnEscape]=\"settings().closeOnEscape\"\n [closable]=\"settings().closable\"\n [maximizable]=\"settings().maximizable\"\n [(maximized)]=\"maximized\"\n [draggable]=\"settings().draggable\"\n [resizable]=\"settings().resizable\"\n [blockScroll]=\"settings().blockScroll\"\n [focusTrap]=\"settings().focusTrap\"\n [restoreFocus]=\"settings().restoreFocus\"\n [autoFocus]=\"settings().autoFocus\"\n [initialFocus]=\"settings().initialFocus\"\n [position]=\"settings().position\"\n [size]=\"settings().size\"\n [width]=\"settings().width\"\n [minWidth]=\"settings().minWidth\"\n [maxWidth]=\"settings().maxWidth\"\n [height]=\"settings().height\"\n [maxHeight]=\"settings().maxHeight\"\n [mobileWidth]=\"settings().mobileWidth\"\n [closeAriaLabel]=\"settings().closeAriaLabel\"\n [ariaLabel]=\"settings().ariaLabel\"\n [ariaLabelledBy]=\"settings().ariaLabelledBy\"\n [ariaDescribedBy]=\"settings().ariaDescribedBy\"\n [visible]=\"visible()\"\n (opened)=\"handleOpened($event)\"\n (closed)=\"handleHidden($event)\"\n >\n <ng-container\n [ngComponentOutlet]=\"componentType()\"\n [ngComponentOutletInputs]=\"settings().inputValues\"\n [ngComponentOutletInjector]=\"contentInjector()\"\n />\n </aeris-dialog>\n `,\n host: {\n class: 'aeris-dynamic-dialog-host',\n },\n})\nexport class AerisDynamicDialogHost {\n readonly componentType = input.required<Type<unknown>>();\n readonly contentInjector = input.required<Injector>();\n readonly config = input.required<AerisDynamicDialogResolvedConfig>();\n readonly dialogRef = input.required<AerisDynamicDialogRef>();\n\n protected readonly dialog = viewChild<AerisDialog>('dialog');\n protected readonly visible = signal(true);\n protected readonly settings = computed(() => this.config());\n protected readonly maximized = linkedSignal(() => this.settings().maximized);\n private closeResult: unknown;\n\n closeWithResult(result: unknown, originalEvent: Event | null): void {\n this.closeResult = result;\n this.dialog()?.hide(originalEvent, 'api');\n }\n\n focus(options?: FocusOptions): void {\n this.dialog()?.focus(options);\n }\n\n maximize(): void {\n this.dialog()?.maximize();\n }\n\n restore(): void {\n this.dialog()?.restore();\n }\n\n toggleMaximized(): void {\n this.dialog()?.toggleMaximized();\n }\n\n protected handleOpened(event: AerisDialogVisibilityChangeEvent): void {\n queueMicrotask(() => this.dialogRef().notifyOpened({ originalEvent: event.originalEvent }));\n }\n\n protected handleHidden(event: AerisDialogVisibilityChangeEvent): void {\n this.visible.set(false);\n this.dialogRef().notifyClosed({\n originalEvent: event.originalEvent,\n reason: event.reason,\n result: this.closeResult,\n });\n }\n}\n\n@Service()\nexport class AerisDynamicDialogService {\n private readonly appRef = inject(ApplicationRef);\n private readonly document = inject(DOCUMENT);\n private readonly environmentInjector = inject(EnvironmentInjector);\n private readonly activeRefs = new Set<AerisDynamicDialogRef<unknown>>();\n\n open<TComponent, TData = unknown, TResult = unknown>(\n componentType: Type<TComponent>,\n config: AerisDynamicDialogConfig<TData> = {},\n ): AerisDynamicDialogRef<TResult> {\n const resolvedConfig = this.resolveConfig(config);\n const ref = new AerisDynamicDialogRef<TResult>();\n const contentInjector = Injector.create({\n parent: this.environmentInjector,\n providers: [\n { provide: AerisDynamicDialogRef, useValue: ref },\n { provide: AERIS_DYNAMIC_DIALOG_CONFIG, useValue: resolvedConfig },\n { provide: AERIS_DYNAMIC_DIALOG_DATA, useValue: resolvedConfig.data },\n ],\n });\n const hostRef = createComponent(AerisDynamicDialogHost, {\n environmentInjector: this.environmentInjector,\n });\n const cleanup = (): void => {\n if (!this.activeRefs.delete(ref as AerisDynamicDialogRef<unknown>)) return;\n this.appRef.detachView(hostRef.hostView);\n hostRef.destroy();\n };\n\n ref.attach({\n close: (result, originalEvent) => {\n hostRef.instance.closeWithResult(result, originalEvent);\n hostRef.changeDetectorRef.detectChanges();\n },\n destroy: cleanup,\n focus: (options) => hostRef.instance.focus(options),\n maximize: () => hostRef.instance.maximize(),\n restore: () => hostRef.instance.restore(),\n toggleMaximized: () => hostRef.instance.toggleMaximized(),\n });\n ref.closed.subscribe(() => queueMicrotask(cleanup));\n this.activeRefs.add(ref as AerisDynamicDialogRef<unknown>);\n\n hostRef.setInput('componentType', componentType);\n hostRef.setInput('contentInjector', contentInjector);\n hostRef.setInput('config', resolvedConfig);\n hostRef.setInput('dialogRef', ref);\n this.appRef.attachView(hostRef.hostView);\n this.document.body.appendChild(this.rootNode(hostRef));\n hostRef.changeDetectorRef.detectChanges();\n\n return ref;\n }\n\n closeAll(): void {\n for (const ref of [...this.activeRefs].reverse()) ref.close();\n }\n\n destroyAll(): void {\n for (const ref of [...this.activeRefs].reverse()) ref.destroy();\n }\n\n private resolveConfig<TData>(\n config: AerisDynamicDialogConfig<TData>,\n ): AerisDynamicDialogResolvedConfig<TData> {\n return {\n header: config.header ?? '',\n appendTo: config.appendTo,\n data: config.data,\n inputValues: config.inputValues ?? {},\n modal: config.modal ?? true,\n backdrop: config.backdrop ?? true,\n backdropBlur: config.backdropBlur ?? true,\n backdropBlurAmount: config.backdropBlurAmount ?? '',\n closeOnBackdropClick: config.closeOnBackdropClick ?? false,\n closeOnEscape: config.closeOnEscape ?? true,\n closable: config.closable ?? true,\n maximizable: config.maximizable ?? false,\n maximized: config.maximized ?? false,\n draggable: config.draggable ?? false,\n resizable: config.resizable ?? false,\n blockScroll: config.blockScroll ?? true,\n focusTrap: config.focusTrap ?? true,\n restoreFocus: config.restoreFocus ?? true,\n autoFocus: config.autoFocus ?? true,\n initialFocus: config.initialFocus ?? '',\n position: config.position ?? 'center',\n size: config.size ?? 'md',\n width: config.width ?? '',\n minWidth: config.minWidth ?? '',\n maxWidth: config.maxWidth ?? '',\n height: config.height ?? '',\n maxHeight: config.maxHeight ?? '',\n mobileWidth: config.mobileWidth ?? '',\n closeAriaLabel: config.closeAriaLabel ?? 'Close dialog',\n ariaLabel: config.ariaLabel ?? '',\n ariaLabelledBy: config.ariaLabelledBy ?? '',\n ariaDescribedBy: config.ariaDescribedBy ?? '',\n };\n }\n\n private rootNode(hostRef: ComponentRef<AerisDynamicDialogHost>): Node {\n const [node] = (hostRef.hostView as EmbeddedViewRef<unknown>).rootNodes;\n return node instanceof Node ? node : this.document.createTextNode('');\n }\n}\n\nexport const AerisDynamicDialogModule = [AerisDynamicDialogHost] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAqHa,2BAA2B,GAAG,IAAI,cAAc,CAC3D,6BAA6B;MAGlB,yBAAyB,GAAG,IAAI,cAAc,CAAU,2BAA2B;AAWhG,MAAM,6BAA6B,CAAA;AAChB,IAAA,SAAS,GAAG,IAAI,GAAG,EAAsB;IAClD,SAAS,GAAG,KAAK;AAEzB,IAAA,SAAS,CAAC,I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,eAAe,EAAE,MAAM,CAAC,eAAe,IAAI,EAAE;SAC9C;IACH;AAEQ,IAAA,QAAQ,CAAC,OAA6C,EAAA;QAC5D,MAAM,CAAC,IAAI,CAAC,GAAI,OAAO,CAAC,QAAqC,CAAC,SAAS;AACvE,QAAA,OAAO,IAAI,YAAY,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;IACvE;uGAxGW,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,OAAA,EAAA,CAAA;wGAAzB,yBAAyB,EAAA,CAAA;;2FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC;;AA4GM,MAAM,wBAAwB,GAAG,CAAC,sBAAsB;;ACxa/D;;AAEG;;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DOCUMENT } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, model, input, booleanAttribute, output, viewChild, signal,
|
|
3
|
+
import { inject, model, input, booleanAttribute, computed, output, viewChild, signal, effect, SecurityContext, forwardRef, ViewEncapsulation, Component } from '@angular/core';
|
|
4
4
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
|
+
import { ɵaerisDisplayInvalid as _aerisDisplayInvalid } from '@aeris-ui/core';
|
|
5
6
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
6
7
|
import { FORMAT_TEXT_COMMAND, $getSelection, $isRangeSelection, $createParagraphNode, UNDO_COMMAND, REDO_COMMAND, FORMAT_ELEMENT_COMMAND, INDENT_CONTENT_COMMAND, OUTDENT_CONTENT_COMMAND, $isTextNode, createEditor, $getRoot, SELECTION_CHANGE_COMMAND, COMMAND_PRIORITY_LOW, $isElementNode } from 'lexical';
|
|
7
8
|
import { $createHeadingNode, $createQuoteNode, HeadingNode, QuoteNode, registerRichText } from '@lexical/rich-text';
|
|
@@ -70,10 +71,10 @@ class AerisEditorComponent {
|
|
|
70
71
|
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
71
72
|
ariaLabel = input('', /* @ts-ignore */
|
|
72
73
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
73
|
-
|
|
74
|
-
...(ngDevMode ? [{ debugName: "
|
|
75
|
-
|
|
76
|
-
...(ngDevMode ? [{ debugName: "
|
|
74
|
+
ariaLabelledBy = input('', /* @ts-ignore */
|
|
75
|
+
...(ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
|
|
76
|
+
ariaDescribedBy = input('', /* @ts-ignore */
|
|
77
|
+
...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []));
|
|
77
78
|
toolbarAriaLabel = input('Formatting tools', /* @ts-ignore */
|
|
78
79
|
...(ngDevMode ? [{ debugName: "toolbarAriaLabel" }] : /* istanbul ignore next */ []));
|
|
79
80
|
size = input('md', /* @ts-ignore */
|
|
@@ -96,9 +97,12 @@ class AerisEditorComponent {
|
|
|
96
97
|
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
97
98
|
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
98
99
|
invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
100
|
+
touched = input(null, /* @ts-ignore */
|
|
101
|
+
...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
102
|
+
displayInvalid = computed(() => _aerisDisplayInvalid(this.invalid(), this.touched()), /* @ts-ignore */
|
|
103
|
+
...(ngDevMode ? [{ debugName: "displayInvalid" }] : /* istanbul ignore next */ []));
|
|
99
104
|
fluid = input(false, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
100
105
|
showToolbar = input(true, { ...(ngDevMode ? { debugName: "showToolbar" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
101
|
-
valueInput = output();
|
|
102
106
|
changed = output();
|
|
103
107
|
focused = output();
|
|
104
108
|
blurred = output();
|
|
@@ -484,7 +488,6 @@ class AerisEditorComponent {
|
|
|
484
488
|
return;
|
|
485
489
|
this.lastSyncedValue = value;
|
|
486
490
|
this.value.set(value);
|
|
487
|
-
this.valueInput.emit(value);
|
|
488
491
|
this.changed.emit({ value, textContent });
|
|
489
492
|
this.onChange(value);
|
|
490
493
|
}
|
|
@@ -543,8 +546,8 @@ class AerisEditorComponent {
|
|
|
543
546
|
}
|
|
544
547
|
this.activeList.set(currentNode instanceof ListNode ? currentNode.getListType() : null);
|
|
545
548
|
}
|
|
546
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
547
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
549
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AerisEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
550
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AerisEditorComponent, isStandalone: true, selector: "aeris-editor", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null }, toolbarAriaLabel: { classPropertyName: "toolbarAriaLabel", publicName: "toolbarAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, formats: { classPropertyName: "formats", publicName: "formats", isSignal: true, isRequired: false, transformFunction: null }, namespace: { classPropertyName: "namespace", publicName: "namespace", isSignal: true, isRequired: false, transformFunction: null }, lexicalTheme: { classPropertyName: "lexicalTheme", publicName: "lexicalTheme", isSignal: true, isRequired: false, transformFunction: null }, htmlConfig: { classPropertyName: "htmlConfig", publicName: "htmlConfig", isSignal: true, isRequired: false, transformFunction: null }, extensions: { classPropertyName: "extensions", publicName: "extensions", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, showToolbar: { classPropertyName: "showToolbar", publicName: "showToolbar", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", changed: "changed", focused: "focused", blurred: "blurred", touch: "touch", ready: "ready" }, host: { properties: { "attr.data-fluid": "fluid() || null" } }, providers: [
|
|
548
551
|
{
|
|
549
552
|
provide: NG_VALUE_ACCESSOR,
|
|
550
553
|
useExisting: forwardRef(() => AerisEditorComponent),
|
|
@@ -555,7 +558,7 @@ class AerisEditorComponent {
|
|
|
555
558
|
class="aeris-editor"
|
|
556
559
|
[attr.data-size]="size()"
|
|
557
560
|
[attr.data-appearance]="appearance()"
|
|
558
|
-
[attr.data-invalid]="
|
|
561
|
+
[attr.data-invalid]="displayInvalid() || null"
|
|
559
562
|
[attr.data-disabled]="effectiveDisabled() || null"
|
|
560
563
|
[attr.data-readonly]="readonly() || null"
|
|
561
564
|
[attr.data-fluid]="fluid() || null"
|
|
@@ -1018,9 +1021,9 @@ class AerisEditorComponent {
|
|
|
1018
1021
|
[id]="resolvedInputId()"
|
|
1019
1022
|
[attr.contenteditable]="editable()"
|
|
1020
1023
|
[attr.aria-label]="ariaLabel() || null"
|
|
1021
|
-
[attr.aria-labelledby]="
|
|
1022
|
-
[attr.aria-describedby]="
|
|
1023
|
-
[attr.aria-invalid]="
|
|
1024
|
+
[attr.aria-labelledby]="ariaLabelledBy() || null"
|
|
1025
|
+
[attr.aria-describedby]="ariaDescribedBy() || null"
|
|
1026
|
+
[attr.aria-invalid]="displayInvalid() || null"
|
|
1024
1027
|
[attr.aria-required]="required() || null"
|
|
1025
1028
|
[attr.aria-placeholder]="placeholder() || null"
|
|
1026
1029
|
[attr.tabindex]="effectiveDisabled() ? -1 : 0"
|
|
@@ -1039,14 +1042,14 @@ class AerisEditorComponent {
|
|
|
1039
1042
|
</div>
|
|
1040
1043
|
`, isInline: true, 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: .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-md, .875rem);background:var(--aeris-surface);box-shadow:var(--aeris-shadow-xs, 0 1px 2px rgba(15, 23, 42, .05));transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.aeris-editor[data-fluid]{width:100%}.aeris-editor[data-size=sm]{--aeris-editor-padding: .75rem;--aeris-editor-font-size: .875rem}.aeris-editor[data-size=lg]{--aeris-editor-padding: 1rem;--aeris-editor-font-size: 1rem}.aeris-editor[data-appearance=filled]{background:var(--aeris-surface-2)}.aeris-editor:focus-within{border-color:var(--aeris-focus);box-shadow:0 0 0 3px color-mix(in srgb,var(--aeris-focus) 18%,transparent)}.aeris-editor[data-invalid]{border-color:var(--aeris-danger)}.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-sm, .625rem);background:transparent;color:var(--aeris-text);font:inherit;font-size:.8125rem;font-weight:700;cursor:pointer;transition:background .14s ease,color .14s ease,box-shadow .14s ease}.aeris-editor__toolbar button:hover:not(:disabled),.aeris-editor__toolbar button[aria-pressed=true]{background:var(--aeris-primary-soft);color:var(--aeris-text)}.aeris-editor__toolbar button:focus-visible{outline:2px solid var(--aeris-focus);outline-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: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-inline-start:.875rem;border-inline-start:3px solid var(--aeris-primary);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: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}}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
1041
1044
|
}
|
|
1042
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
1045
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AerisEditorComponent, decorators: [{
|
|
1043
1046
|
type: Component,
|
|
1044
1047
|
args: [{ selector: 'aeris-editor', template: `
|
|
1045
1048
|
<div
|
|
1046
1049
|
class="aeris-editor"
|
|
1047
1050
|
[attr.data-size]="size()"
|
|
1048
1051
|
[attr.data-appearance]="appearance()"
|
|
1049
|
-
[attr.data-invalid]="
|
|
1052
|
+
[attr.data-invalid]="displayInvalid() || null"
|
|
1050
1053
|
[attr.data-disabled]="effectiveDisabled() || null"
|
|
1051
1054
|
[attr.data-readonly]="readonly() || null"
|
|
1052
1055
|
[attr.data-fluid]="fluid() || null"
|
|
@@ -1509,9 +1512,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
1509
1512
|
[id]="resolvedInputId()"
|
|
1510
1513
|
[attr.contenteditable]="editable()"
|
|
1511
1514
|
[attr.aria-label]="ariaLabel() || null"
|
|
1512
|
-
[attr.aria-labelledby]="
|
|
1513
|
-
[attr.aria-describedby]="
|
|
1514
|
-
[attr.aria-invalid]="
|
|
1515
|
+
[attr.aria-labelledby]="ariaLabelledBy() || null"
|
|
1516
|
+
[attr.aria-describedby]="ariaDescribedBy() || null"
|
|
1517
|
+
[attr.aria-invalid]="displayInvalid() || null"
|
|
1515
1518
|
[attr.aria-required]="required() || null"
|
|
1516
1519
|
[attr.aria-placeholder]="placeholder() || null"
|
|
1517
1520
|
[attr.tabindex]="effectiveDisabled() ? -1 : 0"
|
|
@@ -1537,7 +1540,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
1537
1540
|
], host: {
|
|
1538
1541
|
'[attr.data-fluid]': 'fluid() || null',
|
|
1539
1542
|
}, 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: .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-md, .875rem);background:var(--aeris-surface);box-shadow:var(--aeris-shadow-xs, 0 1px 2px rgba(15, 23, 42, .05));transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.aeris-editor[data-fluid]{width:100%}.aeris-editor[data-size=sm]{--aeris-editor-padding: .75rem;--aeris-editor-font-size: .875rem}.aeris-editor[data-size=lg]{--aeris-editor-padding: 1rem;--aeris-editor-font-size: 1rem}.aeris-editor[data-appearance=filled]{background:var(--aeris-surface-2)}.aeris-editor:focus-within{border-color:var(--aeris-focus);box-shadow:0 0 0 3px color-mix(in srgb,var(--aeris-focus) 18%,transparent)}.aeris-editor[data-invalid]{border-color:var(--aeris-danger)}.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-sm, .625rem);background:transparent;color:var(--aeris-text);font:inherit;font-size:.8125rem;font-weight:700;cursor:pointer;transition:background .14s ease,color .14s ease,box-shadow .14s ease}.aeris-editor__toolbar button:hover:not(:disabled),.aeris-editor__toolbar button[aria-pressed=true]{background:var(--aeris-primary-soft);color:var(--aeris-text)}.aeris-editor__toolbar button:focus-visible{outline:2px solid var(--aeris-focus);outline-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: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-inline-start:.875rem;border-inline-start:3px solid var(--aeris-primary);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: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}}\n"] }]
|
|
1540
|
-
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }],
|
|
1543
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedBy", required: false }] }], toolbarAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "toolbarAriaLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }], formats: [{ type: i0.Input, args: [{ isSignal: true, alias: "formats", required: false }] }], namespace: [{ type: i0.Input, args: [{ isSignal: true, alias: "namespace", required: false }] }], lexicalTheme: [{ type: i0.Input, args: [{ isSignal: true, alias: "lexicalTheme", required: false }] }], htmlConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "htmlConfig", required: false }] }], extensions: [{ type: i0.Input, args: [{ isSignal: true, alias: "extensions", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], showToolbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToolbar", required: false }] }], changed: [{ type: i0.Output, args: ["changed"] }], focused: [{ type: i0.Output, args: ["focused"] }], blurred: [{ type: i0.Output, args: ["blurred"] }], touch: [{ type: i0.Output, args: ["touch"] }], ready: [{ type: i0.Output, args: ["ready"] }], editorRoot: [{ type: i0.ViewChild, args: ['editorRoot', { isSignal: true }] }] } });
|
|
1541
1544
|
const AerisEditor = [AerisEditorComponent];
|
|
1542
1545
|
|
|
1543
1546
|
/**
|