@ngstarter-ui/components 22.2.4 → 22.2.6
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/ai/component-registry.json +89 -13
- package/content-editor/BLOCK_FORMAT.md +38 -0
- package/data-view/API.md +262 -0
- package/fesm2022/ngstarter-ui-components-autocomplete.mjs +67 -44
- package/fesm2022/ngstarter-ui-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-button.mjs +2 -2
- package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-attachment-block-rzZKJ2JH.mjs → ngstarter-ui-components-content-editor-attachment-block-Dvrxn-PJ.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-attachment-block-rzZKJ2JH.mjs.map → ngstarter-ui-components-content-editor-attachment-block-Dvrxn-PJ.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-DTdApN0r.mjs → ngstarter-ui-components-content-editor-callout-block-hBA6Xogj.mjs} +3 -3
- package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-DTdApN0r.mjs.map → ngstarter-ui-components-content-editor-callout-block-hBA6Xogj.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-DpONkTMU.mjs → ngstarter-ui-components-content-editor-code-block.component-BaaymubZ.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-DpONkTMU.mjs.map → ngstarter-ui-components-content-editor-code-block.component-BaaymubZ.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-CmhzpaRk.mjs → ngstarter-ui-components-content-editor-embed-block-BWAtix_P.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-CmhzpaRk.mjs.map → ngstarter-ui-components-content-editor-embed-block-BWAtix_P.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-gallery-block-gtH7yWd5.mjs → ngstarter-ui-components-content-editor-gallery-block-C8mgrc2q.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-gallery-block-gtH7yWd5.mjs.map → ngstarter-ui-components-content-editor-gallery-block-C8mgrc2q.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-Pb-xV7Pw.mjs → ngstarter-ui-components-content-editor-grid-block-B0AfTFLQ.mjs} +6 -6
- package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-Pb-xV7Pw.mjs.map → ngstarter-ui-components-content-editor-grid-block-B0AfTFLQ.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-BKe9Zy_x.mjs → ngstarter-ui-components-content-editor-heading-block.component-B0ZuUcQn.mjs} +8 -5
- package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-B0ZuUcQn.mjs.map +1 -0
- package/fesm2022/{ngstarter-ui-components-content-editor-image-block.component-DSpBVTu-.mjs → ngstarter-ui-components-content-editor-image-block.component-ZCS4hvUg.mjs} +4 -4
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-ZCS4hvUg.mjs.map +1 -0
- package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-BPKPE1uY.mjs → ngstarter-ui-components-content-editor-list-block.component-Ct-ARQ12.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-BPKPE1uY.mjs.map → ngstarter-ui-components-content-editor-list-block.component-Ct-ARQ12.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-nested-blocks-Dh-p3WMp.mjs → ngstarter-ui-components-content-editor-nested-blocks-B22kRf9a.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-nested-blocks-Dh-p3WMp.mjs.map → ngstarter-ui-components-content-editor-nested-blocks-B22kRf9a.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CR-NrarE.mjs → ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-B_6Olt0R.mjs} +93 -41
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-B_6Olt0R.mjs.map +1 -0
- package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-D5wS3m6O.mjs → ngstarter-ui-components-content-editor-paragraph-block.component-BiBe4KAy.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-D5wS3m6O.mjs.map → ngstarter-ui-components-content-editor-paragraph-block.component-BiBe4KAy.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-C3GFAGKF.mjs → ngstarter-ui-components-content-editor-quote-block.component-BuCyqiE2.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-C3GFAGKF.mjs.map → ngstarter-ui-components-content-editor-quote-block.component-BuCyqiE2.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-DQgs_kyN.mjs → ngstarter-ui-components-content-editor-table-block.component-Ck5GsDJM.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-DQgs_kyN.mjs.map → ngstarter-ui-components-content-editor-table-block.component-Ck5GsDJM.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-Cb67ChE8.mjs → ngstarter-ui-components-content-editor-toggle-block-_hXAyzUb.mjs} +3 -3
- package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-Cb67ChE8.mjs.map → ngstarter-ui-components-content-editor-toggle-block-_hXAyzUb.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-video-block.component-CRa0g9Ez.mjs → ngstarter-ui-components-content-editor-video-block.component-bDo8XvID.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-video-block.component-CRa0g9Ez.mjs.map → ngstarter-ui-components-content-editor-video-block.component-bDo8XvID.mjs.map} +1 -1
- package/fesm2022/ngstarter-ui-components-content-editor.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-core.mjs +114 -3
- package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-country-select.mjs +5 -17
- package/fesm2022/ngstarter-ui-components-country-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-currency-select.mjs +6 -18
- package/fesm2022/ngstarter-ui-components-currency-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-data-view.mjs +1011 -90
- package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-date-format-select.mjs +3 -4
- package/fesm2022/ngstarter-ui-components-date-format-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-datepicker.mjs +45 -19
- package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-form-builder.mjs +5 -5
- package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-headless-editor.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-designer.mjs +2 -2
- package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-kanban-board.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-menu.mjs +244 -29
- package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-option.mjs +36 -31
- package/fesm2022/ngstarter-ui-components-option.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-paginator.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-paginator.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-builder.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-phone-input.mjs +2 -2
- package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-select.mjs +157 -105
- package/fesm2022/ngstarter-ui-components-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-signature-pad.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-sort.mjs +9 -2
- package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-table.mjs +10 -0
- package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-timepicker.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-timepicker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-timezone-select.mjs +6 -13
- package/fesm2022/ngstarter-ui-components-timezone-select.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/_common.scss +2 -1
- package/styles/_tokens.scss +32 -1
- package/styles/themes/default.scss +1 -1
- package/types/ngstarter-ui-components-autocomplete.d.ts +6 -1
- package/types/ngstarter-ui-components-content-editor.d.ts +6 -1
- package/types/ngstarter-ui-components-core.d.ts +24 -3
- package/types/ngstarter-ui-components-country-select.d.ts +0 -2
- package/types/ngstarter-ui-components-currency-select.d.ts +0 -2
- package/types/ngstarter-ui-components-data-view.d.ts +204 -11
- package/types/ngstarter-ui-components-datepicker.d.ts +3 -1
- package/types/ngstarter-ui-components-menu.d.ts +44 -5
- package/types/ngstarter-ui-components-option.d.ts +11 -3
- package/types/ngstarter-ui-components-select.d.ts +12 -7
- package/types/ngstarter-ui-components-sort.d.ts +1 -0
- package/types/ngstarter-ui-components-table.d.ts +2 -0
- package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-BKe9Zy_x.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-DSpBVTu-.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CR-NrarE.mjs.map +0 -1
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { inject, Injectable, InjectionToken, makeEnvironmentProviders, DestroyRef, signal, computed, ElementRef, input, output, effect, untracked, afterNextRender, afterRenderEffect, Directive, ChangeDetectionStrategy, Component, DOCUMENT as DOCUMENT$1, model, EventEmitter, HostListener, Output, Input as Input$1, PLATFORM_ID, viewChild, numberAttribute, EnvironmentInjector, ChangeDetectorRef, booleanAttribute, runInInjectionContext, forwardRef, linkedSignal, viewChildren } from '@angular/core';
|
|
3
3
|
import { Button } from '@ngstarter-ui/components/button';
|
|
4
4
|
import { Icon } from '@ngstarter-ui/components/icon';
|
|
5
|
-
import { Menu, MenuItem, MenuTrigger, MenuHeading, MenuContent } from '@ngstarter-ui/components/menu';
|
|
5
|
+
import { Menu, MenuItem, MenuTrigger, MenuHeading, MenuContent, MenuHeader } from '@ngstarter-ui/components/menu';
|
|
6
6
|
import { DialogRef, DialogContent, DialogTitle, DialogActions, DIALOG_DATA, Dialog } from '@ngstarter-ui/components/dialog';
|
|
7
7
|
import * as i1 from '@ngstarter-ui/components/headless-editor';
|
|
8
8
|
import { isNgsHeadlessEditorTextContent, getNgsHeadlessEditorTableData, createNgsHeadlessEditorId, normalizeNgsHeadlessEditorLink, normalizeNgsHeadlessEditorColor, basicTextEditorPlugin, colorEditorPlugin, linkEditorPlugin, createNgsHeadlessEditorText, normalizeNgsHeadlessEditorTextContent, NgsHeadlessEditor, NgsHeadlessEditorInlineRegion, NgsHeadlessEditorSurface, provideNgsHeadlessEditorInlineRegion, NGS_HEADLESS_EDITOR_TOGGLE_BOLD, NGS_HEADLESS_EDITOR_TOGGLE_ITALIC, NGS_HEADLESS_EDITOR_TOGGLE_CODE, NGS_HEADLESS_EDITOR_TOGGLE_STRIKE, NGS_HEADLESS_EDITOR_TOGGLE_UNDERLINE, NGS_HEADLESS_EDITOR_TOGGLE_SUPERSCRIPT, NGS_HEADLESS_EDITOR_TOGGLE_SUBSCRIPT, NGS_HEADLESS_EDITOR_SET_LINK, NGS_HEADLESS_EDITOR_UNSET_LINK, NGS_HEADLESS_EDITOR_SET_TEXT_COLOR, NGS_HEADLESS_EDITOR_UNSET_TEXT_COLOR, NGS_HEADLESS_EDITOR_SET_BACKGROUND_COLOR, NGS_HEADLESS_EDITOR_UNSET_BACKGROUND_COLOR, provideNgsHeadlessEditor, withHeadlessEditorPlugin, createNgsHeadlessEditorDocument, NgsHeadlessEditorRuns } from '@ngstarter-ui/components/headless-editor';
|
|
@@ -13,10 +13,12 @@ import * as i1$1 from '@angular/forms';
|
|
|
13
13
|
import { FormBuilder, Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
14
14
|
import { SlideToggle } from '@ngstarter-ui/components/slide-toggle';
|
|
15
15
|
import { Tooltip } from '@ngstarter-ui/components/tooltip';
|
|
16
|
+
import { EmptyState } from '@ngstarter-ui/components/empty-state';
|
|
16
17
|
import { v7 } from 'uuid';
|
|
17
18
|
import { CdkDropList, CdkDrag, CdkDragHandle, CdkDragPlaceholder } from '@angular/cdk/drag-drop';
|
|
18
19
|
import { ConfirmManager } from '@ngstarter-ui/components/confirm';
|
|
19
20
|
import { CdkMonitorFocus } from '@angular/cdk/a11y';
|
|
21
|
+
import { bindNgsOverlayTheme, SafeResourceUrlPipe } from '@ngstarter-ui/components/core';
|
|
20
22
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
21
23
|
import { Subject, fromEvent } from 'rxjs';
|
|
22
24
|
import { throttleTime, shareReplay, auditTime, map, startWith, distinctUntilChanged } from 'rxjs/operators';
|
|
@@ -31,7 +33,6 @@ import { ExpansionPanel, ExpansionPanelHeader, ExpansionPanelTitle } from '@ngst
|
|
|
31
33
|
import { Alert, AlertIconDirective } from '@ngstarter-ui/components/alert';
|
|
32
34
|
import { CodeHighlighter } from '@ngstarter-ui/components/code-highlighter';
|
|
33
35
|
import { Divider } from '@ngstarter-ui/components/divider';
|
|
34
|
-
import { SafeResourceUrlPipe } from '@ngstarter-ui/components/core';
|
|
35
36
|
import { NativeTable } from '@ngstarter-ui/components/table';
|
|
36
37
|
|
|
37
38
|
/** Plain text used by empty states and literal code editing. */
|
|
@@ -1554,14 +1555,14 @@ class TextColorComponent {
|
|
|
1554
1555
|
}
|
|
1555
1556
|
}
|
|
1556
1557
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TextColorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1557
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: TextColorComponent, isStandalone: true, selector: "ngs-text-color", inputs: { recentlyUsed: { classPropertyName: "recentlyUsed", publicName: "recentlyUsed", isSignal: true, isRequired: false, transformFunction: null }, selectedTextColor: { classPropertyName: "selectedTextColor", publicName: "selectedTextColor", isSignal: true, isRequired: false, transformFunction: null }, selectedBackgroundColor: { classPropertyName: "selectedBackgroundColor", publicName: "selectedBackgroundColor", isSignal: true, isRequired: false, transformFunction: null }, textColors: { classPropertyName: "textColors", publicName: "textColors", isSignal: true, isRequired: false, transformFunction: null }, backgroundColors: { classPropertyName: "backgroundColors", publicName: "backgroundColors", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { recentlyUsed: "recentlyUsedChange", selectedTextColor: "selectedTextColorChange", selectedBackgroundColor: "selectedBackgroundColorChange", textColorChanged: "textColorChanged", backgroundColorChanged: "backgroundColorChanged" }, ngImport: i0, template: "@if (recentlyUsed().length > 0) {\n <div class=\"mb-5\">\n <div class=\"text-xs text-
|
|
1558
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: TextColorComponent, isStandalone: true, selector: "ngs-text-color", inputs: { recentlyUsed: { classPropertyName: "recentlyUsed", publicName: "recentlyUsed", isSignal: true, isRequired: false, transformFunction: null }, selectedTextColor: { classPropertyName: "selectedTextColor", publicName: "selectedTextColor", isSignal: true, isRequired: false, transformFunction: null }, selectedBackgroundColor: { classPropertyName: "selectedBackgroundColor", publicName: "selectedBackgroundColor", isSignal: true, isRequired: false, transformFunction: null }, textColors: { classPropertyName: "textColors", publicName: "textColors", isSignal: true, isRequired: false, transformFunction: null }, backgroundColors: { classPropertyName: "backgroundColors", publicName: "backgroundColors", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { recentlyUsed: "recentlyUsedChange", selectedTextColor: "selectedTextColorChange", selectedBackgroundColor: "selectedBackgroundColorChange", textColorChanged: "textColorChanged", backgroundColorChanged: "backgroundColorChanged" }, ngImport: i0, template: "@if (recentlyUsed().length > 0) {\n <div class=\"mb-5\">\n <div class=\"text-xs text-on-surface-variant text-semibold\">Recently colors</div>\n <div class=\"flex gap-2 flex-wrap mt-3\">\n @for (recentlyColor of recentlyUsed(); track recentlyColor) {\n @if (recentlyColor.type === 'text') {\n <button class=\"rounded-sm border border-border size-7 flex-none flex items-center justify-center cursor-pointer\"\n [style.color]=\"recentlyColor.color\" [ngsTooltip]=\"recentlyColor.name\" [attr.aria-label]=\"recentlyColor.type + ' color: ' + recentlyColor.name\"\n (click)=\"selectRecentlyColor(recentlyColor)\">\n <ngs-icon name=\"fluent:text-field-24-regular\"/>\n </button>\n } @else if (recentlyColor.type === 'background') {\n <button class=\"rounded-sm border border-border size-7 flex-none flex items-center justify-center cursor-pointer\"\n [style.background-color]=\"recentlyColor.color\" [ngsTooltip]=\"recentlyColor.name\" [attr.aria-label]=\"recentlyColor.type + ' color: ' + recentlyColor.name\"\n (click)=\"selectRecentlyColor(recentlyColor)\">\n </button>\n }\n }\n </div>\n </div>\n}\n\n<div class=\"mb-5\">\n <div class=\"text-xs text-on-surface-variant text-semibold\">Text color</div>\n <div class=\"flex gap-2 flex-wrap mt-3\">\n @for (textColor of textColors(); track $index) {\n <button class=\"rounded-sm border border-border size-7 flex-none flex items-center justify-center cursor-pointer\n [&.is-selected]:outline [&.is-selected]:outline-primary\"\n [style.color]=\"textColor.color\" [ngsTooltip]=\"textColor.name\" [attr.aria-label]=\"'Text color: ' + textColor.name\"\n [class.is-selected]=\"selectedTextColor()?.color === textColor.color\"\n (click)=\"selectTextColor(textColor)\">\n <ngs-icon name=\"fluent:text-field-24-regular\"/>\n </button>\n }\n </div>\n</div>\n\n<div>\n <div class=\"text-xs text-on-surface-variant text-semibold\">Background color</div>\n <div class=\"flex gap-2 flex-wrap mt-3\">\n @for (backgroundColor of backgroundColors(); track $index) {\n <button class=\"rounded-sm border border-border size-7 flex-none flex items-center justify-center cursor-pointer\n [&.is-selected]:outline [&.is-selected]:outline-primary\"\n [style.background-color]=\"backgroundColor.color\" [ngsTooltip]=\"backgroundColor.name\" [attr.aria-label]=\"'Background color: ' + backgroundColor.name\"\n [class.is-selected]=\"selectedBackgroundColor()?.color === backgroundColor.color\"\n (click)=\"selectBackgroundColor(backgroundColor)\">\n </button>\n }\n </div>\n</div>\n", styles: [":host{display:block;width:172px}\n"], dependencies: [{ kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }, { kind: "directive", type: Tooltip, selector: "[ngsTooltip]", inputs: ["ngsTooltip", "ngsTooltipPosition", "ngsTooltipClass", "ngsTooltipShowDelay", "ngsTooltipHideDelay", "ngsTooltipOffset", "ngsTooltipPositionAtOrigin", "ngsTooltipDisabled"], exportAs: ["ngsTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
1558
1559
|
}
|
|
1559
1560
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TextColorComponent, decorators: [{
|
|
1560
1561
|
type: Component,
|
|
1561
1562
|
args: [{ selector: 'ngs-text-color', imports: [
|
|
1562
1563
|
Icon,
|
|
1563
1564
|
Tooltip
|
|
1564
|
-
], changeDetection: ChangeDetectionStrategy.Eager, template: "@if (recentlyUsed().length > 0) {\n <div class=\"mb-5\">\n <div class=\"text-xs text-
|
|
1565
|
+
], changeDetection: ChangeDetectionStrategy.Eager, template: "@if (recentlyUsed().length > 0) {\n <div class=\"mb-5\">\n <div class=\"text-xs text-on-surface-variant text-semibold\">Recently colors</div>\n <div class=\"flex gap-2 flex-wrap mt-3\">\n @for (recentlyColor of recentlyUsed(); track recentlyColor) {\n @if (recentlyColor.type === 'text') {\n <button class=\"rounded-sm border border-border size-7 flex-none flex items-center justify-center cursor-pointer\"\n [style.color]=\"recentlyColor.color\" [ngsTooltip]=\"recentlyColor.name\" [attr.aria-label]=\"recentlyColor.type + ' color: ' + recentlyColor.name\"\n (click)=\"selectRecentlyColor(recentlyColor)\">\n <ngs-icon name=\"fluent:text-field-24-regular\"/>\n </button>\n } @else if (recentlyColor.type === 'background') {\n <button class=\"rounded-sm border border-border size-7 flex-none flex items-center justify-center cursor-pointer\"\n [style.background-color]=\"recentlyColor.color\" [ngsTooltip]=\"recentlyColor.name\" [attr.aria-label]=\"recentlyColor.type + ' color: ' + recentlyColor.name\"\n (click)=\"selectRecentlyColor(recentlyColor)\">\n </button>\n }\n }\n </div>\n </div>\n}\n\n<div class=\"mb-5\">\n <div class=\"text-xs text-on-surface-variant text-semibold\">Text color</div>\n <div class=\"flex gap-2 flex-wrap mt-3\">\n @for (textColor of textColors(); track $index) {\n <button class=\"rounded-sm border border-border size-7 flex-none flex items-center justify-center cursor-pointer\n [&.is-selected]:outline [&.is-selected]:outline-primary\"\n [style.color]=\"textColor.color\" [ngsTooltip]=\"textColor.name\" [attr.aria-label]=\"'Text color: ' + textColor.name\"\n [class.is-selected]=\"selectedTextColor()?.color === textColor.color\"\n (click)=\"selectTextColor(textColor)\">\n <ngs-icon name=\"fluent:text-field-24-regular\"/>\n </button>\n }\n </div>\n</div>\n\n<div>\n <div class=\"text-xs text-on-surface-variant text-semibold\">Background color</div>\n <div class=\"flex gap-2 flex-wrap mt-3\">\n @for (backgroundColor of backgroundColors(); track $index) {\n <button class=\"rounded-sm border border-border size-7 flex-none flex items-center justify-center cursor-pointer\n [&.is-selected]:outline [&.is-selected]:outline-primary\"\n [style.background-color]=\"backgroundColor.color\" [ngsTooltip]=\"backgroundColor.name\" [attr.aria-label]=\"'Background color: ' + backgroundColor.name\"\n [class.is-selected]=\"selectedBackgroundColor()?.color === backgroundColor.color\"\n (click)=\"selectBackgroundColor(backgroundColor)\">\n </button>\n }\n </div>\n</div>\n", styles: [":host{display:block;width:172px}\n"] }]
|
|
1565
1566
|
}], propDecorators: { recentlyUsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "recentlyUsed", required: false }] }, { type: i0.Output, args: ["recentlyUsedChange"] }], selectedTextColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedTextColor", required: false }] }, { type: i0.Output, args: ["selectedTextColorChange"] }], selectedBackgroundColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedBackgroundColor", required: false }] }, { type: i0.Output, args: ["selectedBackgroundColorChange"] }], textColors: [{ type: i0.Input, args: [{ isSignal: true, alias: "textColors", required: false }] }], backgroundColors: [{ type: i0.Input, args: [{ isSignal: true, alias: "backgroundColors", required: false }] }], textColorChanged: [{ type: i0.Output, args: ["textColorChanged"] }], backgroundColorChanged: [{ type: i0.Output, args: ["backgroundColorChanged"] }] } });
|
|
1566
1567
|
|
|
1567
1568
|
class CommandBarComponent {
|
|
@@ -1664,14 +1665,14 @@ class CommandBarComponent {
|
|
|
1664
1665
|
region.focus();
|
|
1665
1666
|
}
|
|
1666
1667
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CommandBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1667
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: CommandBarComponent, isStandalone: true, selector: "ngs-command-bar", inputs: { observedElement: { classPropertyName: "observedElement", publicName: "observedElement", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mousedown": "preserveSelection($event)" }, classAttribute: "ngs-command-bar" }, ngImport: i0, template: "<div class=\"flex items-center gap-1\">\n <button ngsIconButton (click)=\"toggleBold()\"\n [class.is-active]=\"isActive('strong')\">\n <ngs-icon name=\"fluent:text-bold-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleItalic()\"\n [class.is-active]=\"isActive('em')\">\n <ngs-icon name=\"fluent:text-italic-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleStrike()\"\n [class.is-active]=\"isActive('s')\">\n <ngs-icon name=\"fluent:text-strikethrough-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleUnderline()\"\n [class.is-active]=\"isActive('u')\">\n <ngs-icon name=\"fluent:text-underline-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleSuperscript()\"\n [class.is-active]=\"isActive('sup')\">\n <ngs-icon name=\"fluent:text-superscript-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleSubscript()\"\n [class.is-active]=\"isActive('sub')\">\n <ngs-icon name=\"fluent:text-subscript-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleCode()\"\n [class.is-active]=\"isActive('code')\">\n <ngs-icon name=\"fluent:code-24-regular\"/>\n </button>\n\n @if (isLinkActive()) {\n <button ngsIconButton (click)=\"editLink()\">\n <ngs-icon name=\"fluent:link-24-regular\"/>\n </button>\n } @else {\n <button ngsIconButton (click)=\"addLink()\">\n <ngs-icon name=\"fluent:link-add-24-regular\"/>\n </button>\n }\n <button ngsIconButton [ngsMenuTriggerFor]=\"alignMenu\"\n (menuOpened)=\"retainSelection()\" (menuClosed)=\"restoreSelectionAfterOverlay()\">\n @switch (alignment()) {\n @case ('left') {\n <ngs-icon name=\"fluent:text-align-left-24-regular\"/>\n }\n @case ('center') {\n <ngs-icon name=\"fluent:text-align-center-24-regular\"/>\n }\n @case ('right') {\n <ngs-icon name=\"fluent:text-align-right-24-regular\"/>\n }\n }\n </button>\n <button ngsIconButton [ngsMenuTriggerFor]=\"formatColorText\"\n (menuOpened)=\"retainSelection()\" (menuClosed)=\"restoreSelectionAfterOverlay()\">\n <ngs-icon name=\"fluent:text-color-24-regular\"/>\n </button>\n</div>\n\n<ngs-menu #alignMenu=\"ngsMenu\">\n <button class=\"[&.is-active]:!bg-secondary-container\"\n [class.is-active]=\"isTextAlignment('left')\"\n ngs-menu-item\n (click)=\"setTextAlignment('left')\">\n <ngs-icon name=\"fluent:text-align-left-24-regular\"/>\n Align Left\n </button>\n <button class=\"[&.is-active]:!bg-secondary-container\"\n [class.is-active]=\"isTextAlignment('center')\"\n ngs-menu-item\n (click)=\"setTextAlignment('center')\">\n <ngs-icon name=\"fluent:text-align-center-24-regular\"/>\n Align Center\n </button>\n <button class=\"[&.is-active]:!bg-secondary-container\"\n [class.is-active]=\"isTextAlignment('right')\"\n ngs-menu-item (click)=\"setTextAlignment('right')\">\n <ngs-icon name=\"fluent:text-align-right-24-regular\"/>\n Align Right\n </button>\n</ngs-menu>\n\n<ngs-menu #formatColorText=\"ngsMenu\">\n <div class=\"px-4 py-3\" (mousedown)=\"preventMenuClose($event)\">\n <ngs-text-color (textColorChanged)=\"onTextColorChanged($event)\"\n (backgroundColorChanged)=\"onBackgroundColorChanged($event)\"/>\n </div>\n</ngs-menu>\n", styles: [":host{background:var(--ngs-color-on-surface);color:var(--ngs-color-surface);border-radius:
|
|
1668
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: CommandBarComponent, isStandalone: true, selector: "ngs-command-bar", inputs: { observedElement: { classPropertyName: "observedElement", publicName: "observedElement", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mousedown": "preserveSelection($event)" }, classAttribute: "ngs-command-bar" }, ngImport: i0, template: "<div class=\"flex items-center gap-1\">\n <button ngsIconButton (click)=\"toggleBold()\"\n [class.is-active]=\"isActive('strong')\">\n <ngs-icon name=\"fluent:text-bold-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleItalic()\"\n [class.is-active]=\"isActive('em')\">\n <ngs-icon name=\"fluent:text-italic-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleStrike()\"\n [class.is-active]=\"isActive('s')\">\n <ngs-icon name=\"fluent:text-strikethrough-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleUnderline()\"\n [class.is-active]=\"isActive('u')\">\n <ngs-icon name=\"fluent:text-underline-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleSuperscript()\"\n [class.is-active]=\"isActive('sup')\">\n <ngs-icon name=\"fluent:text-superscript-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleSubscript()\"\n [class.is-active]=\"isActive('sub')\">\n <ngs-icon name=\"fluent:text-subscript-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleCode()\"\n [class.is-active]=\"isActive('code')\">\n <ngs-icon name=\"fluent:code-24-regular\"/>\n </button>\n\n @if (isLinkActive()) {\n <button ngsIconButton (click)=\"editLink()\">\n <ngs-icon name=\"fluent:link-24-regular\"/>\n </button>\n } @else {\n <button ngsIconButton (click)=\"addLink()\">\n <ngs-icon name=\"fluent:link-add-24-regular\"/>\n </button>\n }\n <button ngsIconButton [ngsMenuTriggerFor]=\"alignMenu\"\n (menuOpened)=\"retainSelection()\" (menuClosed)=\"restoreSelectionAfterOverlay()\">\n @switch (alignment()) {\n @case ('left') {\n <ngs-icon name=\"fluent:text-align-left-24-regular\"/>\n }\n @case ('center') {\n <ngs-icon name=\"fluent:text-align-center-24-regular\"/>\n }\n @case ('right') {\n <ngs-icon name=\"fluent:text-align-right-24-regular\"/>\n }\n }\n </button>\n <button ngsIconButton [ngsMenuTriggerFor]=\"formatColorText\"\n (menuOpened)=\"retainSelection()\" (menuClosed)=\"restoreSelectionAfterOverlay()\">\n <ngs-icon name=\"fluent:text-color-24-regular\"/>\n </button>\n</div>\n\n<ngs-menu #alignMenu=\"ngsMenu\" [themeSource]=\"observedElement()\">\n <button class=\"[&.is-active]:!bg-secondary-container\"\n [class.is-active]=\"isTextAlignment('left')\"\n ngs-menu-item\n (click)=\"setTextAlignment('left')\">\n <ngs-icon name=\"fluent:text-align-left-24-regular\"/>\n Align Left\n </button>\n <button class=\"[&.is-active]:!bg-secondary-container\"\n [class.is-active]=\"isTextAlignment('center')\"\n ngs-menu-item\n (click)=\"setTextAlignment('center')\">\n <ngs-icon name=\"fluent:text-align-center-24-regular\"/>\n Align Center\n </button>\n <button class=\"[&.is-active]:!bg-secondary-container\"\n [class.is-active]=\"isTextAlignment('right')\"\n ngs-menu-item (click)=\"setTextAlignment('right')\">\n <ngs-icon name=\"fluent:text-align-right-24-regular\"/>\n Align Right\n </button>\n</ngs-menu>\n\n<ngs-menu #formatColorText=\"ngsMenu\" [themeSource]=\"observedElement()\">\n <div class=\"px-4 py-3\" (mousedown)=\"preventMenuClose($event)\">\n <ngs-text-color (textColorChanged)=\"onTextColorChanged($event)\"\n (backgroundColorChanged)=\"onBackgroundColorChanged($event)\"/>\n </div>\n</ngs-menu>\n", styles: [":host{background:var(--ngs-content-editor-toolbar-bg, var(--ngs-color-on-surface));color:var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface));border-radius:var(--ngs-content-editor-toolbar-radius, var(--ngs-control-radius));padding:var(--spacing, .25rem);box-shadow:var(--ngs-shadow-lg)}:host button[ngsIconButton]{--ngs-button-color: var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface));--ngs-button-hover-bg: var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface));--ngs-state-focus-ring: var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface))}@supports (color: color-mix(in lab,red,red)){:host button[ngsIconButton]{--ngs-button-hover-bg: color-mix(in srgb, var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface)) 12%, transparent)}}@supports (color: color-mix(in lab,red,red)){:host button[ngsIconButton]{--ngs-state-focus-ring: color-mix(in srgb, var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface)) 40%, transparent)}}:host button[ngsIconButton].is-active{--ngs-button-bg: var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface));--ngs-button-hover-bg: var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface))}@supports (color: color-mix(in lab,red,red)){:host button[ngsIconButton].is-active{--ngs-button-bg: color-mix(in srgb, var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface)) 20%, transparent)}}@supports (color: color-mix(in lab,red,red)){:host button[ngsIconButton].is-active{--ngs-button-hover-bg: color-mix(in srgb, var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface)) 28%, transparent)}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }, { kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }, { kind: "component", type: Menu, selector: "ngs-menu", inputs: ["themeSource", "role", "classList", "xPosition", "yPosition", "pushIntoViewport"], outputs: ["closed"], exportAs: ["ngsMenu"] }, { kind: "component", type: MenuItem, selector: "ngs-menu-item, [ngs-menu-item]", inputs: ["disabled", "role", "selected"], outputs: ["_triggered"], exportAs: ["ngsMenuItem"] }, { kind: "directive", type: MenuTrigger, selector: "[ngsMenuTriggerFor]", inputs: ["ngsMenuTriggerFor", "ngsMenuTriggerData", "ngsMenuDisabled", "xPosition", "yPosition", "ngsMenuTriggerRestoreFocus"], outputs: ["menuOpened", "menuClosed"], exportAs: ["ngsMenuTrigger"] }, { kind: "component", type: TextColorComponent, selector: "ngs-text-color", inputs: ["recentlyUsed", "selectedTextColor", "selectedBackgroundColor", "textColors", "backgroundColors"], outputs: ["recentlyUsedChange", "selectedTextColorChange", "selectedBackgroundColorChange", "textColorChanged", "backgroundColorChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1668
1669
|
}
|
|
1669
1670
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CommandBarComponent, decorators: [{
|
|
1670
1671
|
type: Component,
|
|
1671
1672
|
args: [{ selector: 'ngs-command-bar', imports: [Button, Icon, Menu, MenuItem, MenuTrigger, TextColorComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1672
1673
|
'class': 'ngs-command-bar',
|
|
1673
1674
|
'(mousedown)': 'preserveSelection($event)'
|
|
1674
|
-
}, template: "<div class=\"flex items-center gap-1\">\n <button ngsIconButton (click)=\"toggleBold()\"\n [class.is-active]=\"isActive('strong')\">\n <ngs-icon name=\"fluent:text-bold-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleItalic()\"\n [class.is-active]=\"isActive('em')\">\n <ngs-icon name=\"fluent:text-italic-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleStrike()\"\n [class.is-active]=\"isActive('s')\">\n <ngs-icon name=\"fluent:text-strikethrough-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleUnderline()\"\n [class.is-active]=\"isActive('u')\">\n <ngs-icon name=\"fluent:text-underline-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleSuperscript()\"\n [class.is-active]=\"isActive('sup')\">\n <ngs-icon name=\"fluent:text-superscript-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleSubscript()\"\n [class.is-active]=\"isActive('sub')\">\n <ngs-icon name=\"fluent:text-subscript-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleCode()\"\n [class.is-active]=\"isActive('code')\">\n <ngs-icon name=\"fluent:code-24-regular\"/>\n </button>\n\n @if (isLinkActive()) {\n <button ngsIconButton (click)=\"editLink()\">\n <ngs-icon name=\"fluent:link-24-regular\"/>\n </button>\n } @else {\n <button ngsIconButton (click)=\"addLink()\">\n <ngs-icon name=\"fluent:link-add-24-regular\"/>\n </button>\n }\n <button ngsIconButton [ngsMenuTriggerFor]=\"alignMenu\"\n (menuOpened)=\"retainSelection()\" (menuClosed)=\"restoreSelectionAfterOverlay()\">\n @switch (alignment()) {\n @case ('left') {\n <ngs-icon name=\"fluent:text-align-left-24-regular\"/>\n }\n @case ('center') {\n <ngs-icon name=\"fluent:text-align-center-24-regular\"/>\n }\n @case ('right') {\n <ngs-icon name=\"fluent:text-align-right-24-regular\"/>\n }\n }\n </button>\n <button ngsIconButton [ngsMenuTriggerFor]=\"formatColorText\"\n (menuOpened)=\"retainSelection()\" (menuClosed)=\"restoreSelectionAfterOverlay()\">\n <ngs-icon name=\"fluent:text-color-24-regular\"/>\n </button>\n</div>\n\n<ngs-menu #alignMenu=\"ngsMenu\">\n <button class=\"[&.is-active]:!bg-secondary-container\"\n [class.is-active]=\"isTextAlignment('left')\"\n ngs-menu-item\n (click)=\"setTextAlignment('left')\">\n <ngs-icon name=\"fluent:text-align-left-24-regular\"/>\n Align Left\n </button>\n <button class=\"[&.is-active]:!bg-secondary-container\"\n [class.is-active]=\"isTextAlignment('center')\"\n ngs-menu-item\n (click)=\"setTextAlignment('center')\">\n <ngs-icon name=\"fluent:text-align-center-24-regular\"/>\n Align Center\n </button>\n <button class=\"[&.is-active]:!bg-secondary-container\"\n [class.is-active]=\"isTextAlignment('right')\"\n ngs-menu-item (click)=\"setTextAlignment('right')\">\n <ngs-icon name=\"fluent:text-align-right-24-regular\"/>\n Align Right\n </button>\n</ngs-menu>\n\n<ngs-menu #formatColorText=\"ngsMenu\">\n <div class=\"px-4 py-3\" (mousedown)=\"preventMenuClose($event)\">\n <ngs-text-color (textColorChanged)=\"onTextColorChanged($event)\"\n (backgroundColorChanged)=\"onBackgroundColorChanged($event)\"/>\n </div>\n</ngs-menu>\n", styles: [":host{background:var(--ngs-color-on-surface);color:var(--ngs-color-surface);border-radius:
|
|
1675
|
+
}, template: "<div class=\"flex items-center gap-1\">\n <button ngsIconButton (click)=\"toggleBold()\"\n [class.is-active]=\"isActive('strong')\">\n <ngs-icon name=\"fluent:text-bold-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleItalic()\"\n [class.is-active]=\"isActive('em')\">\n <ngs-icon name=\"fluent:text-italic-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleStrike()\"\n [class.is-active]=\"isActive('s')\">\n <ngs-icon name=\"fluent:text-strikethrough-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleUnderline()\"\n [class.is-active]=\"isActive('u')\">\n <ngs-icon name=\"fluent:text-underline-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleSuperscript()\"\n [class.is-active]=\"isActive('sup')\">\n <ngs-icon name=\"fluent:text-superscript-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleSubscript()\"\n [class.is-active]=\"isActive('sub')\">\n <ngs-icon name=\"fluent:text-subscript-24-regular\"/>\n </button>\n <button ngsIconButton (click)=\"toggleCode()\"\n [class.is-active]=\"isActive('code')\">\n <ngs-icon name=\"fluent:code-24-regular\"/>\n </button>\n\n @if (isLinkActive()) {\n <button ngsIconButton (click)=\"editLink()\">\n <ngs-icon name=\"fluent:link-24-regular\"/>\n </button>\n } @else {\n <button ngsIconButton (click)=\"addLink()\">\n <ngs-icon name=\"fluent:link-add-24-regular\"/>\n </button>\n }\n <button ngsIconButton [ngsMenuTriggerFor]=\"alignMenu\"\n (menuOpened)=\"retainSelection()\" (menuClosed)=\"restoreSelectionAfterOverlay()\">\n @switch (alignment()) {\n @case ('left') {\n <ngs-icon name=\"fluent:text-align-left-24-regular\"/>\n }\n @case ('center') {\n <ngs-icon name=\"fluent:text-align-center-24-regular\"/>\n }\n @case ('right') {\n <ngs-icon name=\"fluent:text-align-right-24-regular\"/>\n }\n }\n </button>\n <button ngsIconButton [ngsMenuTriggerFor]=\"formatColorText\"\n (menuOpened)=\"retainSelection()\" (menuClosed)=\"restoreSelectionAfterOverlay()\">\n <ngs-icon name=\"fluent:text-color-24-regular\"/>\n </button>\n</div>\n\n<ngs-menu #alignMenu=\"ngsMenu\" [themeSource]=\"observedElement()\">\n <button class=\"[&.is-active]:!bg-secondary-container\"\n [class.is-active]=\"isTextAlignment('left')\"\n ngs-menu-item\n (click)=\"setTextAlignment('left')\">\n <ngs-icon name=\"fluent:text-align-left-24-regular\"/>\n Align Left\n </button>\n <button class=\"[&.is-active]:!bg-secondary-container\"\n [class.is-active]=\"isTextAlignment('center')\"\n ngs-menu-item\n (click)=\"setTextAlignment('center')\">\n <ngs-icon name=\"fluent:text-align-center-24-regular\"/>\n Align Center\n </button>\n <button class=\"[&.is-active]:!bg-secondary-container\"\n [class.is-active]=\"isTextAlignment('right')\"\n ngs-menu-item (click)=\"setTextAlignment('right')\">\n <ngs-icon name=\"fluent:text-align-right-24-regular\"/>\n Align Right\n </button>\n</ngs-menu>\n\n<ngs-menu #formatColorText=\"ngsMenu\" [themeSource]=\"observedElement()\">\n <div class=\"px-4 py-3\" (mousedown)=\"preventMenuClose($event)\">\n <ngs-text-color (textColorChanged)=\"onTextColorChanged($event)\"\n (backgroundColorChanged)=\"onBackgroundColorChanged($event)\"/>\n </div>\n</ngs-menu>\n", styles: [":host{background:var(--ngs-content-editor-toolbar-bg, var(--ngs-color-on-surface));color:var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface));border-radius:var(--ngs-content-editor-toolbar-radius, var(--ngs-control-radius));padding:var(--spacing, .25rem);box-shadow:var(--ngs-shadow-lg)}:host button[ngsIconButton]{--ngs-button-color: var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface));--ngs-button-hover-bg: var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface));--ngs-state-focus-ring: var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface))}@supports (color: color-mix(in lab,red,red)){:host button[ngsIconButton]{--ngs-button-hover-bg: color-mix(in srgb, var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface)) 12%, transparent)}}@supports (color: color-mix(in lab,red,red)){:host button[ngsIconButton]{--ngs-state-focus-ring: color-mix(in srgb, var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface)) 40%, transparent)}}:host button[ngsIconButton].is-active{--ngs-button-bg: var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface));--ngs-button-hover-bg: var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface))}@supports (color: color-mix(in lab,red,red)){:host button[ngsIconButton].is-active{--ngs-button-bg: color-mix(in srgb, var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface)) 20%, transparent)}}@supports (color: color-mix(in lab,red,red)){:host button[ngsIconButton].is-active{--ngs-button-hover-bg: color-mix(in srgb, var(--ngs-content-editor-toolbar-color, var(--ngs-color-surface)) 28%, transparent)}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
1675
1676
|
}], propDecorators: { observedElement: [{ type: i0.Input, args: [{ isSignal: true, alias: "observedElement", required: false }] }] } });
|
|
1676
1677
|
|
|
1677
1678
|
/** Shared marks and commands for content editing and read-only rendering. */
|
|
@@ -1681,25 +1682,25 @@ function provideContentEditor() {
|
|
|
1681
1682
|
|
|
1682
1683
|
const CONTENT_EDITOR_EXTRA_BLOCK_DEFS = [
|
|
1683
1684
|
{
|
|
1684
|
-
type: 'callout', component: () => import('./ngstarter-ui-components-content-editor-callout-block-
|
|
1685
|
+
type: 'callout', component: () => import('./ngstarter-ui-components-content-editor-callout-block-hBA6Xogj.mjs').then(m => m.ContentEditorCalloutBlock),
|
|
1685
1686
|
empty: () => ({ content: [createNgsHeadlessEditorText()], settings: { variant: 'note' } }), options: {}
|
|
1686
1687
|
},
|
|
1687
1688
|
{
|
|
1688
|
-
type: 'toggle', component: () => import('./ngstarter-ui-components-content-editor-toggle-block-
|
|
1689
|
+
type: 'toggle', component: () => import('./ngstarter-ui-components-content-editor-toggle-block-_hXAyzUb.mjs').then(m => m.ContentEditorToggleBlock),
|
|
1689
1690
|
empty: () => ({ content: { title: [], blocks: [emptyParagraph()] }, settings: { expanded: true } }), options: {}
|
|
1690
1691
|
},
|
|
1691
1692
|
{
|
|
1692
|
-
type: 'attachment', component: () => import('./ngstarter-ui-components-content-editor-attachment-block-
|
|
1693
|
+
type: 'attachment', component: () => import('./ngstarter-ui-components-content-editor-attachment-block-Dvrxn-PJ.mjs').then(m => m.ContentEditorAttachmentBlock),
|
|
1693
1694
|
empty: () => ({ content: { url: '', name: '', size: 0, mimeType: '' }, settings: {} }),
|
|
1694
1695
|
options: { uploadFn: (_file, dataUrl) => Promise.resolve(dataUrl) }
|
|
1695
1696
|
},
|
|
1696
1697
|
{
|
|
1697
|
-
type: 'gallery', component: () => import('./ngstarter-ui-components-content-editor-gallery-block-
|
|
1698
|
+
type: 'gallery', component: () => import('./ngstarter-ui-components-content-editor-gallery-block-C8mgrc2q.mjs').then(m => m.ContentEditorGalleryBlock),
|
|
1698
1699
|
empty: () => ({ content: { images: [] }, settings: {} }),
|
|
1699
1700
|
options: { uploadFn: (_file, dataUrl) => Promise.resolve(dataUrl) }
|
|
1700
1701
|
},
|
|
1701
1702
|
{
|
|
1702
|
-
type: 'grid', component: () => import('./ngstarter-ui-components-content-editor-grid-block-
|
|
1703
|
+
type: 'grid', component: () => import('./ngstarter-ui-components-content-editor-grid-block-B0AfTFLQ.mjs').then(m => m.ContentEditorGridBlock),
|
|
1703
1704
|
empty: () => ({ content: { cells: Array.from({ length: 4 }, emptyGridCell) }, settings: { columns: 2, gap: 'medium', stackOnMobile: true } }), options: {}
|
|
1704
1705
|
}
|
|
1705
1706
|
].map(def => ({ ...def, toHtml: CONTENT_EDITOR_DEFAULT_HTML_CONVERTERS[def.type] }));
|
|
@@ -1840,7 +1841,6 @@ function contentEditorConvertBlock(block, type, settings = {}) {
|
|
|
1840
1841
|
};
|
|
1841
1842
|
}
|
|
1842
1843
|
|
|
1843
|
-
// src/app/text-selection-popup.directive.ts
|
|
1844
1844
|
const POPUP_VERTICAL_OFFSET = 8;
|
|
1845
1845
|
const POPUP_VIEWPORT_MARGIN = 8;
|
|
1846
1846
|
class TextSelectionPopupDirective {
|
|
@@ -1853,6 +1853,7 @@ class TextSelectionPopupDirective {
|
|
|
1853
1853
|
targetComponent;
|
|
1854
1854
|
closestContentObserverClass = null;
|
|
1855
1855
|
tagSelected = new EventEmitter();
|
|
1856
|
+
themeCleanup = null;
|
|
1856
1857
|
overlayRef = null;
|
|
1857
1858
|
hostElement;
|
|
1858
1859
|
currentSelectionRange = null;
|
|
@@ -1964,6 +1965,7 @@ class TextSelectionPopupDirective {
|
|
|
1964
1965
|
hasBackdrop: false,
|
|
1965
1966
|
scrollStrategy: this.overlay.scrollStrategies.noop(),
|
|
1966
1967
|
});
|
|
1968
|
+
this.themeCleanup = bindNgsOverlayTheme(this.hostElement, this.overlayRef.overlayElement);
|
|
1967
1969
|
const portal = new ComponentPortal(this.targetComponent, this.viewContainerRef);
|
|
1968
1970
|
const componentRef = this.overlayRef.attach(portal);
|
|
1969
1971
|
if (componentRef.instance && 'observedElement' in componentRef.instance) {
|
|
@@ -1991,6 +1993,8 @@ class TextSelectionPopupDirective {
|
|
|
1991
1993
|
return;
|
|
1992
1994
|
this.popupResizeObserver?.disconnect();
|
|
1993
1995
|
this.popupResizeObserver = null;
|
|
1996
|
+
this.themeCleanup?.();
|
|
1997
|
+
this.themeCleanup = null;
|
|
1994
1998
|
this.overlayRef.dispose();
|
|
1995
1999
|
this.overlayRef = null;
|
|
1996
2000
|
this.positionStrategy = null;
|
|
@@ -2299,6 +2303,7 @@ class ContentBuilderComponent {
|
|
|
2299
2303
|
...(ngDevMode ? [{ debugName: "dropList" }] : /* istanbul ignore next */ []));
|
|
2300
2304
|
connectedDropLists = this._store.dropLists;
|
|
2301
2305
|
elRef = inject(ElementRef);
|
|
2306
|
+
themeSource = this.elRef.nativeElement;
|
|
2302
2307
|
envInjector = inject(EnvironmentInjector);
|
|
2303
2308
|
cdr = inject(ChangeDetectorRef);
|
|
2304
2309
|
confirmManager = inject(ConfirmManager);
|
|
@@ -2327,7 +2332,7 @@ class ContentBuilderComponent {
|
|
|
2327
2332
|
}
|
|
2328
2333
|
},
|
|
2329
2334
|
{
|
|
2330
|
-
component: () => import('./ngstarter-ui-components-content-editor-paragraph-block.component-
|
|
2335
|
+
component: () => import('./ngstarter-ui-components-content-editor-paragraph-block.component-BiBe4KAy.mjs').then(c => c.ParagraphBlockComponent),
|
|
2331
2336
|
type: 'paragraph',
|
|
2332
2337
|
options: {},
|
|
2333
2338
|
empty: () => {
|
|
@@ -2339,7 +2344,7 @@ class ContentBuilderComponent {
|
|
|
2339
2344
|
}
|
|
2340
2345
|
},
|
|
2341
2346
|
{
|
|
2342
|
-
component: () => import('./ngstarter-ui-components-content-editor-code-block.component-
|
|
2347
|
+
component: () => import('./ngstarter-ui-components-content-editor-code-block.component-BaaymubZ.mjs').then(c => c.CodeBlockComponent),
|
|
2343
2348
|
type: 'code',
|
|
2344
2349
|
options: {},
|
|
2345
2350
|
empty: () => {
|
|
@@ -2352,7 +2357,7 @@ class ContentBuilderComponent {
|
|
|
2352
2357
|
}
|
|
2353
2358
|
},
|
|
2354
2359
|
{
|
|
2355
|
-
component: () => import('./ngstarter-ui-components-content-editor-heading-block.component-
|
|
2360
|
+
component: () => import('./ngstarter-ui-components-content-editor-heading-block.component-B0ZuUcQn.mjs').then(c => c.HeadingBlockComponent),
|
|
2356
2361
|
type: 'heading',
|
|
2357
2362
|
options: {},
|
|
2358
2363
|
empty: () => {
|
|
@@ -2366,7 +2371,7 @@ class ContentBuilderComponent {
|
|
|
2366
2371
|
}
|
|
2367
2372
|
},
|
|
2368
2373
|
{
|
|
2369
|
-
component: () => import('./ngstarter-ui-components-content-editor-image-block.component-
|
|
2374
|
+
component: () => import('./ngstarter-ui-components-content-editor-image-block.component-ZCS4hvUg.mjs').then(c => c.ImageBlockComponent),
|
|
2370
2375
|
type: 'image',
|
|
2371
2376
|
options: {
|
|
2372
2377
|
uploadFn: (file, base64) => {
|
|
@@ -2393,7 +2398,7 @@ class ContentBuilderComponent {
|
|
|
2393
2398
|
}
|
|
2394
2399
|
},
|
|
2395
2400
|
{
|
|
2396
|
-
component: () => import('./ngstarter-ui-components-content-editor-video-block.component-
|
|
2401
|
+
component: () => import('./ngstarter-ui-components-content-editor-video-block.component-bDo8XvID.mjs').then(c => c.VideoBlockComponent),
|
|
2397
2402
|
type: 'video',
|
|
2398
2403
|
options: {
|
|
2399
2404
|
uploadFn: (file, base64) => {
|
|
@@ -2421,7 +2426,7 @@ class ContentBuilderComponent {
|
|
|
2421
2426
|
}
|
|
2422
2427
|
},
|
|
2423
2428
|
{
|
|
2424
|
-
component: () => import('./ngstarter-ui-components-content-editor-list-block.component-
|
|
2429
|
+
component: () => import('./ngstarter-ui-components-content-editor-list-block.component-Ct-ARQ12.mjs').then(c => c.ListBlockComponent),
|
|
2425
2430
|
type: 'bulletList',
|
|
2426
2431
|
options: {},
|
|
2427
2432
|
empty: () => {
|
|
@@ -2434,7 +2439,7 @@ class ContentBuilderComponent {
|
|
|
2434
2439
|
}
|
|
2435
2440
|
},
|
|
2436
2441
|
{
|
|
2437
|
-
component: () => import('./ngstarter-ui-components-content-editor-list-block.component-
|
|
2442
|
+
component: () => import('./ngstarter-ui-components-content-editor-list-block.component-Ct-ARQ12.mjs').then(c => c.ListBlockComponent),
|
|
2438
2443
|
type: 'orderedList',
|
|
2439
2444
|
options: {},
|
|
2440
2445
|
empty: () => {
|
|
@@ -2447,7 +2452,7 @@ class ContentBuilderComponent {
|
|
|
2447
2452
|
}
|
|
2448
2453
|
},
|
|
2449
2454
|
{
|
|
2450
|
-
component: () => import('./ngstarter-ui-components-content-editor-table-block.component-
|
|
2455
|
+
component: () => import('./ngstarter-ui-components-content-editor-table-block.component-Ck5GsDJM.mjs').then(c => c.TableBlockComponent),
|
|
2451
2456
|
type: 'table',
|
|
2452
2457
|
options: {},
|
|
2453
2458
|
empty: () => {
|
|
@@ -2516,7 +2521,7 @@ class ContentBuilderComponent {
|
|
|
2516
2521
|
}
|
|
2517
2522
|
},
|
|
2518
2523
|
{
|
|
2519
|
-
component: () => import('./ngstarter-ui-components-content-editor-quote-block.component-
|
|
2524
|
+
component: () => import('./ngstarter-ui-components-content-editor-quote-block.component-BuCyqiE2.mjs').then(c => c.QuoteBlockComponent),
|
|
2520
2525
|
type: 'quote',
|
|
2521
2526
|
options: {},
|
|
2522
2527
|
empty: () => {
|
|
@@ -2536,7 +2541,7 @@ class ContentBuilderComponent {
|
|
|
2536
2541
|
}
|
|
2537
2542
|
},
|
|
2538
2543
|
{
|
|
2539
|
-
component: () => import('./ngstarter-ui-components-content-editor-embed-block-
|
|
2544
|
+
component: () => import('./ngstarter-ui-components-content-editor-embed-block-BWAtix_P.mjs').then(c => c.EmbedBlock),
|
|
2540
2545
|
type: 'embed',
|
|
2541
2546
|
options: {},
|
|
2542
2547
|
empty: () => {
|
|
@@ -2729,10 +2734,53 @@ class ContentBuilderComponent {
|
|
|
2729
2734
|
iconName: definition.menu.iconName ?? 'fluent:document-24-regular', blockType: type,
|
|
2730
2735
|
blockSettings: definition.menu.settings ?? {}, hotKeys: ''
|
|
2731
2736
|
}] : []);
|
|
2732
|
-
const
|
|
2733
|
-
|
|
2737
|
+
const defaults = this.suggestions();
|
|
2738
|
+
const existingTypes = new Set(defaults.filter((item) => item.type === 'item').map((item) => item.blockType));
|
|
2739
|
+
const extra = custom.filter(item => !existingTypes.has(item.blockType));
|
|
2740
|
+
return [...defaults.map((item) => custom.find(entry => entry.blockType === item.blockType) ?? item),
|
|
2741
|
+
...(extra.length ? [{ type: 'heading', title: 'Custom blocks' }, ...extra] : [])];
|
|
2734
2742
|
}, /* @ts-ignore */
|
|
2735
2743
|
...(ngDevMode ? [{ debugName: "insertionSuggestions" }] : /* istanbul ignore next */ []));
|
|
2744
|
+
menuQuery = signal('', /* @ts-ignore */
|
|
2745
|
+
...(ngDevMode ? [{ debugName: "menuQuery" }] : /* istanbul ignore next */ []));
|
|
2746
|
+
filteredInsertionSuggestions = computed(() => {
|
|
2747
|
+
const query = this.menuQuery().trim().toLocaleLowerCase();
|
|
2748
|
+
if (!query)
|
|
2749
|
+
return this.insertionSuggestions();
|
|
2750
|
+
const items = [];
|
|
2751
|
+
let heading = null;
|
|
2752
|
+
for (const item of this.insertionSuggestions()) {
|
|
2753
|
+
if (item.type === 'heading') {
|
|
2754
|
+
heading = item;
|
|
2755
|
+
continue;
|
|
2756
|
+
}
|
|
2757
|
+
if (!`${item.title} ${item.description ?? ''} ${item.blockType}`.toLocaleLowerCase().includes(query))
|
|
2758
|
+
continue;
|
|
2759
|
+
if (heading) {
|
|
2760
|
+
items.push(heading);
|
|
2761
|
+
heading = null;
|
|
2762
|
+
}
|
|
2763
|
+
items.push(item);
|
|
2764
|
+
}
|
|
2765
|
+
return items;
|
|
2766
|
+
}, /* @ts-ignore */
|
|
2767
|
+
...(ngDevMode ? [{ debugName: "filteredInsertionSuggestions" }] : /* istanbul ignore next */ []));
|
|
2768
|
+
onMenuSearchKeydown(event, target) {
|
|
2769
|
+
event.stopPropagation();
|
|
2770
|
+
if (event.key === 'ArrowDown') {
|
|
2771
|
+
event.preventDefault();
|
|
2772
|
+
this.blockMenu().items()[0]?.focus();
|
|
2773
|
+
}
|
|
2774
|
+
if (event.key === 'Escape')
|
|
2775
|
+
this.blockMenu().closed.emit('keydown');
|
|
2776
|
+
if (event.key === 'Enter') {
|
|
2777
|
+
const first = this.filteredInsertionSuggestions().find(item => item.type === 'item');
|
|
2778
|
+
if (first) {
|
|
2779
|
+
event.preventDefault();
|
|
2780
|
+
this.addBlockFromSuggestionMenu(this.blockMenu(), target, first.blockType, first.blockSettings);
|
|
2781
|
+
}
|
|
2782
|
+
}
|
|
2783
|
+
}
|
|
2736
2784
|
componentSources = new Map();
|
|
2737
2785
|
buildBlockDefMaps() {
|
|
2738
2786
|
const overrides = this.options() || {};
|
|
@@ -3346,6 +3394,7 @@ class ContentBuilderComponent {
|
|
|
3346
3394
|
onFocusChange(origin, dataBlock) {
|
|
3347
3395
|
}
|
|
3348
3396
|
onSuggestionsMenuClose(reason) {
|
|
3397
|
+
this.menuQuery.set('');
|
|
3349
3398
|
if (!reason) {
|
|
3350
3399
|
this._store.setFocusedBlockId(this._store.activeBlockId());
|
|
3351
3400
|
this.focusChanged.emit();
|
|
@@ -3486,7 +3535,7 @@ class ContentBuilderComponent {
|
|
|
3486
3535
|
provide: CONTENT_BUILDER,
|
|
3487
3536
|
useExisting: forwardRef(() => ContentBuilderComponent)
|
|
3488
3537
|
}
|
|
3489
|
-
], viewQueries: [{ propertyName: "conversionMenu", first: true, predicate: ["conversionMenu"], descendants: true, isSignal: true }, { propertyName: "blockMenu", first: true, predicate: ["suggestionsMenu"], descendants: true, isSignal: true }, { propertyName: "dropList", first: true, predicate: CdkDropList, descendants: true, isSignal: true }], exportAs: ["ngsContentEditorBuilder"], hostDirectives: [{ directive: BlockSelectionDirective, inputs: ["autoScrollContainerSelector", "autoScrollContainerSelector"] }], ngImport: i0, template: "<div class=\"container py-4\">\n <div class=\"content\"\n cdkDropList\n [cdkDropListData]=\"{}\"\n [cdkDropListConnectedTo]=\"connectedDropLists()\"\n [cdkDropListEnterPredicate]=\"canEnterRoot\"\n ngsTextSelectionPopup\n closestContentObserverClass=\"ngs-content-editor-content-editable\"\n [targetComponent]=\"commandBar\"\n (tagSelected)=\"onTagSelected($event)\"\n (cdkDropListDropped)=\"drop($event)\">\n @for (contentBlock of _content(); track contentBlock.id) {\n <div class=\"block\"\n [attr.data-block-id]=\"contentBlock.id\"\n [class.is-focused]=\"isBlockFocused(contentBlock.id)\"\n [class.is-active]=\"isActiveBlock(contentBlock.id)\"\n cdkDrag\n [cdkDragData]=\"contentBlock.id\"\n cdkMonitorSubtreeFocus\n (cdkDragStarted)=\"onDragStarted($event, contentBlock)\"\n (cdkDragEnded)=\"onDragEnded($event, contentBlock)\"\n (cdkFocusChange)=\"onFocusChange($event, contentBlock)\">\n <div class=\"block-controls\" [class.is-settings-popover-open]=\"settingsTrigger.api.isOpen()\">\n <button class=\"block-control\" aria-label=\"Add block\"\n (mousedown)=\"setActiveBlockId($event, contentBlock.id)\"\n [ngsMenuTriggerFor]=\"suggestionsMenu\"\n [ngsMenuTriggerData]=\"{target: {scope: {}, afterId: contentBlock.id}}\"\n [ngsMenuTriggerRestoreFocus]=\"false\">\n <ngs-icon name=\"fluent:add-24-regular\"/>\n </button>\n <div class=\"block-control block-control-drag\"\n (click)=\"selectBlock(contentBlock.id)\"\n [ngsPopoverTriggerFor]=\"settingsPopover\"\n (closed)=\"onSettingsPopoverClose()\"\n #settingsTrigger=\"ngsPopoverTriggerFor\"\n hasBackdrop\n position=\"before-center\">\n <button cdkDragHandle\n trigger=\"hover\"\n closeOnOriginClick\n closeOnOriginMouseLeave\n #dragTrigger=\"ngsPopoverTriggerFor\"\n [ngsPopoverTriggerFor]=\"dragControlTooltip\"\n position=\"below-center\"\n (mousedown)=\"dragTrigger.api.close()\"\n delay=\"1000\" class=\"w-full h-full flex items-center justify-center\">\n <ngs-icon name=\"fluent:re-order-dots-vertical-24-regular\"/>\n </button>\n </div>\n <ng-template #dragControlTooltip>\n <div class=\"bg-neutral-900 text-xs flex flex-col gap-0.5 rounded-lg items-center px-2 py-1.5 font-medium\">\n <div>\n <div class=\"text-neutral-100\">Drag <span class=\"text-neutral-400\">to move</span></div>\n </div>\n <div>\n <div class=\"text-neutral-100\">Click <span class=\"text-neutral-400\">to open menu</span></div>\n </div>\n </div>\n </ng-template>\n </div>\n <div class=\"block-content\" [class.is-selected]=\"isBlockSelected(contentBlock.id)\">\n <div class=\"drag-placeholder\" *cdkDragPlaceholder></div>\n <ng-container [ngComponentOutlet]=\"blockDefsMap.get(contentBlock.type) | async\"\n [ngComponentOutletInputs]=\"{\n id: contentBlock.id,\n content: contentBlock.content,\n settings: contentBlock.settings,\n props: contentBlock.props,\n index: $index\n }\"/>\n </div>\n </div>\n }\n </div>\n</div>\n\n<ngs-popover #settingsPopover=\"ngsPopover\">\n <div class=\"px-2 py-0 w-72 settings-popover\">\n <ngs-list>\n @if (selectedBlocksModel.selected.length === 1 && canConvertBlock(selectedBlocksModel.selected[0])) {\n <ngs-list-item [ngsMenuTriggerFor]=\"conversionMenu\" [ngsMenuTriggerData]=\"{blockId: selectedBlocksModel.selected[0]}\" [ngsMenuTriggerRestoreFocus]=\"false\">\n <ngs-icon name=\"fluent:arrow-swap-24-regular\" ngsListItemIcon/>\n <div ngsListItemTitle>Turn into</div>\n </ngs-list-item>\n }\n <ngs-list-item (click)=\"duplicateSelectedBlocks(settingsPopover)\">\n <ngs-icon name=\"fluent:copy-24-regular\" ngsListItemIcon/>\n <div ngsListItemTitle>Duplicate</div>\n </ngs-list-item>\n <ngs-list-item (click)=\"deleteSelectedBlocks(settingsPopover)\">\n <ngs-icon name=\"fluent:delete-24-regular\" ngsListItemIcon/>\n <div ngsListItemTitle>Delete</div>\n </ngs-list-item>\n </ngs-list>\n </div>\n</ngs-popover>\n\n<ngs-menu #suggestionsMenu=\"ngsMenu\" classList=\"min-h-[70vh] max-h-[70vh]!\" pushIntoViewport (closed)=\"onSuggestionsMenuClose($event)\">\n <ng-template ngsMenuContent let-target=\"target\">\n <div (click)=\"preventMenuClose($event)\">\n @for (suggestionItem of insertionSuggestions(); track $index; let first = $first) {\n @switch (suggestionItem.type) {\n @case ('heading') {\n <ngs-menu-heading>{{ suggestionItem.title }}</ngs-menu-heading>\n }\n @case ('item') {\n <button ngs-menu-item\n (click)=\"addBlockFromSuggestionMenu(suggestionsMenu, target, suggestionItem.blockType, suggestionItem.blockSettings)\">\n <div class=\"h-full flex items-center gap-3 py-2\">\n <div class=\"size-9 flex items-center rounded-lg justify-center bg-surface-container\">\n <ngs-icon [name]=\"suggestionItem.iconName\" class=\"!me-0\"/>\n </div>\n <div class=\"grow min-w-[200px]\">\n <div>{{ suggestionItem.title }}</div>\n <div class=\"text-2xs text-neutral-600\">{{ suggestionItem.description }}</div>\n </div>\n @if (suggestionItem.hotKeys) {\n <div class=\"ms-auto bg-surface-container-highest rounded-full h-5\n text-4xs px-2 flex items-center font-bold\">{{ suggestionItem.hotKeys }}</div>\n }\n </div>\n </button>\n }\n }\n }\n </div>\n </ng-template>\n</ngs-menu>\n\n<ngs-menu #conversionMenu>\n <ng-template ngsMenuContent let-blockId=\"blockId\">\n @for (type of conversionTypes; track type) {\n <button ngs-menu-item (click)=\"convertBlock(blockId, type); settingsPopover.close()\">{{type}}</button>\n }\n </ng-template>\n</ngs-menu>\n", styles: [":host{--ngs-content-editor-builder-content-width: 704px;outline:none}:host.is-block-dragging{cursor:grabbing}:host .container{display:flex;width:100%;max-width:820px;min-height:200px;height:100%;padding:calc(var(--spacing, .25rem) * 5) calc(var(--spacing, .25rem) * 5) calc(var(--spacing, .25rem) * 5) 0;margin:0 auto;outline:none}:host .content{flex-grow:1;width:100%;min-width:0}:host .block{position:relative;flex:none;padding:var(--spacing, .25rem) 0;display:flex;align-items:center}:host .block:not(:has(.block-content.is-selected)):hover .block-content{background:var(--ngs-color-neutral-50)}:host:not(.is-block-dragging) .block:hover .block-controls,:host:not(.is-block-dragging) .block.is-active .block-controls{opacity:1}:host .block-content{position:relative;flex-grow:1;min-width:0;padding:calc(var(--spacing, .25rem) * 3)}:host .block-content.is-selected{background:var(--ngs-color-primary-100)}:host ::ng-deep .selection-area{background:var(--ngs-color-primary-100);opacity:.4;border:1px solid var(--ngs-color-primary);border-radius:var(--ngs-radius-sm)}:host ::ng-deep .ngs-content-editor-content-editable{-webkit-user-select:text;user-select:text}:host ::ng-deep .ngs-content-editor-content-editable a[data-ngs-headless-editor-mark=link]{color:var(--ngs-color-primary);text-decoration:underline;text-underline-offset:.15em}:host ::ng-deep .ngs-content-editor-content-editable.align-center{text-align:center}:host ::ng-deep .ngs-content-editor-content-editable.align-right{text-align:right}:host ::ng-deep .ngs-content-editor-content-editable.align-justify{text-align:justify}:host ::ng-deep .ngs-content-editor-content-editable>p{margin:0}:host ::ng-deep .ngs-content-editor-content-editable[data-empty]:before{content:attr(data-empty-placeholder);display:block;height:0;color:var(--ngs-color-neutral-500);pointer-events:none}:host.select-none ::ng-deep .ngs-content-editor-content-editable,:host.is-selection-of-blocks-active ::ng-deep .ngs-content-editor-content-editable{-webkit-user-select:none!important;user-select:none!important}:host .block-controls{left:0;display:flex;align-items:center;color:var(--ngs-color-neutral-500);width:calc(var(--spacing, .25rem) * 18);padding:0 calc(var(--spacing, .25rem) * 2);opacity:0;flex:none}:host .block-controls.is-settings-popover-open{opacity:1}:host .block-controls.is-settings-popover-open .block-control:not(.block-control-drag){opacity:0}:host .block-control{cursor:pointer;width:calc(var(--spacing, .25rem) * 7);height:calc(var(--spacing, .25rem) * 7);flex:none;border-radius:var(--ngs-radius-lg);display:inline-flex;align-items:center;justify-content:center}:host .block-control:hover{background:var(--ngs-color-surface-container-low);color:var(--ngs-color-on-surface)}:host .block-control-drag button{cursor:grab}:host .drag-placeholder{height:calc(var(--spacing, .25rem) * 8);flex:none;position:relative}:host .drag-placeholder:before{position:absolute;left:calc(var(--spacing, .25rem) * 18);display:block;right:0;content:\"\";height:calc(var(--spacing, .25rem) * 2);top:50%;transform:translateY(-50%);background:var(--ngs-color-primary-300);border-radius:calc(var(--spacing, .25rem) * .5)}:host ::ng-deep code{color:var(--ngs-color-primary)}.cdk-drag.cdk-drag-preview{overflow:hidden;display:flex;align-items:center;color:var(--ngs-color-neutral-500);width:calc(var(--spacing, .25rem) * 18);padding:0 calc(var(--spacing, .25rem) * 2)}.cdk-drag.cdk-drag-preview .block-control{width:calc(var(--spacing, .25rem) * 7);height:calc(var(--spacing, .25rem) * 7);flex:none;border-radius:var(--ngs-radius-lg);display:inline-flex;align-items:center;justify-content:center;cursor:grabbing}.cdk-drag.cdk-drag-preview .block-control:first-child{opacity:0}.cdk-drag.cdk-drag-preview .block-control:last-child{color:var(--ngs-color-on-surface)}.cdk-drag.cdk-drag-preview .block-content{opacity:0}.settings-popover{--ngs-list-list-item-one-line-container-height: calc(var(--spacing, .25rem) * 10)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "component", type: Menu, selector: "ngs-menu", inputs: ["role", "classList", "xPosition", "yPosition", "pushIntoViewport"], outputs: ["closed"], exportAs: ["ngsMenu"] }, { kind: "component", type: MenuItem, selector: "ngs-menu-item, [ngs-menu-item]", inputs: ["disabled", "role", "selected"], outputs: ["_triggered"], exportAs: ["ngsMenuItem"] }, { kind: "directive", type: MenuTrigger, selector: "[ngsMenuTriggerFor]", inputs: ["ngsMenuTriggerFor", "ngsMenuTriggerData", "ngsMenuDisabled", "xPosition", "yPosition", "ngsMenuTriggerRestoreFocus"], outputs: ["menuOpened", "menuClosed"], exportAs: ["ngsMenuTrigger"] }, { kind: "directive", type: CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "directive", type: TextSelectionPopupDirective, selector: "[ngsTextSelectionPopup]", inputs: ["targetComponent", "closestContentObserverClass"], outputs: ["tagSelected"] }, { kind: "directive", type: PopoverTriggerForDirective, selector: "[ngsPopoverTriggerFor]", inputs: ["ngsPopoverTriggerFor", "ngsPopoverContext", "trigger", "position", "delay", "origin", "closeOnOriginClick", "closeOnOriginMouseLeave", "hasBackdrop"], outputs: ["opened", "closed"], exportAs: ["ngsPopoverTriggerFor"] }, { kind: "component", type: Popover, selector: "ngs-popover", exportAs: ["ngsPopover"] }, { kind: "directive", type: ListItemTitle, selector: "[ngsListItemTitle]" }, { kind: "directive", type: ListItemIcon, selector: "[ngsListItemIcon]" }, { kind: "component", type: ListItem, selector: "ngs-list-item, a[ngs-list-item], button[ngs-list-item]", inputs: ["disabled", "lines"], exportAs: ["ngsListItem"] }, { kind: "component", type: List, selector: "ngs-list", inputs: ["disabled", "disableRipple"], exportAs: ["ngsList"] }, { kind: "component", type: MenuHeading, selector: "ngs-menu-heading" }, { kind: "directive", type: MenuContent, selector: "[ngsMenuContent]" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3538
|
+
], viewQueries: [{ propertyName: "conversionMenu", first: true, predicate: ["conversionMenu"], descendants: true, isSignal: true }, { propertyName: "blockMenu", first: true, predicate: ["suggestionsMenu"], descendants: true, isSignal: true }, { propertyName: "dropList", first: true, predicate: CdkDropList, descendants: true, isSignal: true }], exportAs: ["ngsContentEditorBuilder"], hostDirectives: [{ directive: BlockSelectionDirective, inputs: ["autoScrollContainerSelector", "autoScrollContainerSelector"] }], ngImport: i0, template: "<div class=\"container py-4\">\n <div class=\"content\"\n cdkDropList\n [cdkDropListData]=\"{}\"\n [cdkDropListConnectedTo]=\"connectedDropLists()\"\n [cdkDropListEnterPredicate]=\"canEnterRoot\"\n ngsTextSelectionPopup\n closestContentObserverClass=\"ngs-content-editor-content-editable\"\n [targetComponent]=\"commandBar\"\n (tagSelected)=\"onTagSelected($event)\"\n (cdkDropListDropped)=\"drop($event)\">\n @for (contentBlock of _content(); track contentBlock.id) {\n <div class=\"block\"\n [attr.data-block-id]=\"contentBlock.id\"\n [class.is-focused]=\"isBlockFocused(contentBlock.id)\"\n [class.is-active]=\"isActiveBlock(contentBlock.id)\"\n cdkDrag\n [cdkDragData]=\"contentBlock.id\"\n cdkMonitorSubtreeFocus\n (cdkDragStarted)=\"onDragStarted($event, contentBlock)\"\n (cdkDragEnded)=\"onDragEnded($event, contentBlock)\"\n (cdkFocusChange)=\"onFocusChange($event, contentBlock)\">\n <div class=\"block-controls\" [class.is-settings-popover-open]=\"settingsTrigger.api.isOpen()\">\n <button class=\"block-control\" aria-label=\"Add block\"\n (mousedown)=\"setActiveBlockId($event, contentBlock.id)\"\n [ngsMenuTriggerFor]=\"suggestionsMenu\"\n [ngsMenuTriggerData]=\"{target: {scope: {}, afterId: contentBlock.id}}\"\n [ngsMenuTriggerRestoreFocus]=\"false\">\n <ngs-icon name=\"fluent:add-24-regular\"/>\n </button>\n <div class=\"block-control block-control-drag\"\n (click)=\"selectBlock(contentBlock.id)\"\n [ngsPopoverTriggerFor]=\"settingsPopover\"\n (closed)=\"onSettingsPopoverClose()\"\n #settingsTrigger=\"ngsPopoverTriggerFor\"\n hasBackdrop\n position=\"before-center\">\n <button cdkDragHandle\n trigger=\"hover\"\n closeOnOriginClick\n closeOnOriginMouseLeave\n #dragTrigger=\"ngsPopoverTriggerFor\"\n [ngsPopoverTriggerFor]=\"dragControlTooltip\"\n position=\"below-center\"\n (mousedown)=\"dragTrigger.api.close()\"\n delay=\"1000\" class=\"w-full h-full flex items-center justify-center\">\n <ngs-icon name=\"fluent:re-order-dots-vertical-24-regular\"/>\n </button>\n </div>\n <ng-template #dragControlTooltip>\n <div class=\"bg-on-surface text-xs flex flex-col gap-0.5 rounded-lg items-center px-2 py-1.5 font-medium\">\n <div>\n <div class=\"text-surface\">Drag <span class=\"text-surface/70\">to move</span></div>\n </div>\n <div>\n <div class=\"text-surface\">Click <span class=\"text-surface/70\">to open menu</span></div>\n </div>\n </div>\n </ng-template>\n </div>\n <div class=\"block-content\" [class.is-selected]=\"isBlockSelected(contentBlock.id)\">\n <div class=\"drag-placeholder\" *cdkDragPlaceholder></div>\n <ng-container [ngComponentOutlet]=\"blockDefsMap.get(contentBlock.type) | async\"\n [ngComponentOutletInputs]=\"{\n id: contentBlock.id,\n content: contentBlock.content,\n settings: contentBlock.settings,\n props: contentBlock.props,\n index: $index\n }\"/>\n </div>\n </div>\n }\n </div>\n</div>\n\n<ngs-popover #settingsPopover=\"ngsPopover\">\n <div class=\"px-2 py-0 w-72 settings-popover\">\n <ngs-list>\n @if (selectedBlocksModel.selected.length === 1 && canConvertBlock(selectedBlocksModel.selected[0])) {\n <ngs-list-item [ngsMenuTriggerFor]=\"conversionMenu\" [ngsMenuTriggerData]=\"{blockId: selectedBlocksModel.selected[0]}\" [ngsMenuTriggerRestoreFocus]=\"false\">\n <ngs-icon name=\"fluent:arrow-swap-24-regular\" ngsListItemIcon/>\n <div ngsListItemTitle>Turn into</div>\n </ngs-list-item>\n }\n <ngs-list-item (click)=\"duplicateSelectedBlocks(settingsPopover)\">\n <ngs-icon name=\"fluent:copy-24-regular\" ngsListItemIcon/>\n <div ngsListItemTitle>Duplicate</div>\n </ngs-list-item>\n <ngs-list-item (click)=\"deleteSelectedBlocks(settingsPopover)\">\n <ngs-icon name=\"fluent:delete-24-regular\" ngsListItemIcon/>\n <div ngsListItemTitle>Delete</div>\n </ngs-list-item>\n </ngs-list>\n </div>\n</ngs-popover>\n\n<ngs-menu #suggestionsMenu=\"ngsMenu\" classList=\"min-h-[70vh] max-h-[70vh]! w-80 max-w-[calc(100vw-1rem)]!\" [themeSource]=\"themeSource\" pushIntoViewport (closed)=\"onSuggestionsMenuClose($event)\">\n <ngs-menu-header>\n <div class=\"p-3\">\n <div class=\"mb-2 text-sm font-semibold text-on-surface\">Insert block</div>\n <ngs-form-field subscriptHiddenIfEmpty>\n <input ngsInput aria-label=\"Search blocks\" placeholder=\"Search blocks\u2026\" [value]=\"menuQuery()\" (input)=\"menuQuery.set($any($event.target).value)\" (keydown)=\"onMenuSearchKeydown($event, blockMenu().context()?.target ?? getInsertionTarget())\">\n </ngs-form-field>\n </div>\n </ngs-menu-header>\n <ng-template ngsMenuContent let-target=\"target\">\n <div (click)=\"preventMenuClose($event)\">\n @for (suggestionItem of filteredInsertionSuggestions(); track $index; let first = $first) {\n @switch (suggestionItem.type) {\n @case ('heading') {\n <ngs-menu-heading>{{ suggestionItem.title }}</ngs-menu-heading>\n }\n @case ('item') {\n <button ngs-menu-item\n (click)=\"addBlockFromSuggestionMenu(suggestionsMenu, target, suggestionItem.blockType, suggestionItem.blockSettings)\">\n <div class=\"h-full flex items-center gap-3 py-2\">\n <div class=\"size-9 flex items-center rounded-lg justify-center bg-surface-container\">\n <ngs-icon [name]=\"suggestionItem.iconName\" class=\"!me-0\"/>\n </div>\n <div class=\"grow min-w-[200px]\">\n <div>{{ suggestionItem.title }}</div>\n <div class=\"text-xs text-on-surface-variant\">{{ suggestionItem.description }}</div>\n </div>\n @if (suggestionItem.hotKeys) {\n <div class=\"ms-auto bg-surface-container-highest rounded-full h-5\n text-4xs px-2 flex items-center font-bold\">{{ suggestionItem.hotKeys }}</div>\n }\n </div>\n </button>\n }\n }\n }\n @if (!filteredInsertionSuggestions().length) { <ngs-empty-state>No matching blocks</ngs-empty-state> }\n </div>\n </ng-template>\n</ngs-menu>\n\n<ngs-menu #conversionMenu [themeSource]=\"themeSource\">\n <ng-template ngsMenuContent let-blockId=\"blockId\">\n @for (type of conversionTypes; track type) {\n <button ngs-menu-item (click)=\"convertBlock(blockId, type); settingsPopover.close()\">{{type}}</button>\n }\n </ng-template>\n</ngs-menu>\n", styles: [":host{--ngs-content-editor-builder-content-width: var(--ngs-content-editor-content-width, 704px);font-size:var(--ngs-content-editor-font-size, var(--ngs-font-size-md));line-height:var(--ngs-content-editor-line-height, 1.6);outline:none}:host.is-block-dragging{cursor:grabbing}:host .container{display:flex;width:100%;max-width:820px;min-height:200px;height:100%;padding:calc(var(--spacing, .25rem) * 5) calc(var(--spacing, .25rem) * 5) calc(var(--spacing, .25rem) * 5) 0;margin:0 auto;outline:none}:host .content{flex-grow:1;width:100%;min-width:0}:host .block{position:relative;flex:none;padding:var(--spacing, .25rem) 0;display:flex;align-items:center}:host .block:not(:has(.block-content.is-selected)):hover .block-content{background:var(--ngs-content-editor-hover-bg, var(--ngs-state-hover-bg))}:host:not(.is-block-dragging) .block:hover .block-controls,:host:not(.is-block-dragging) .block.is-active .block-controls,:host:not(.is-block-dragging) .block:focus-within .block-controls{opacity:1}:host .block-content{position:relative;flex-grow:1;min-width:0;padding:var(--ngs-content-editor-block-padding, calc(var(--spacing, .25rem) * 3));border-radius:var(--ngs-content-editor-block-radius, var(--ngs-control-radius))}:host .block-content.is-selected{background:var(--ngs-content-editor-selected-bg, var(--ngs-color-primary-container));color:var(--ngs-content-editor-selected-color, var(--ngs-color-on-primary-container))}:host ::ng-deep .selection-area{background:var(--ngs-content-editor-selected-bg, var(--ngs-color-primary-container));opacity:.4;border:1px solid var(--ngs-color-primary);border-radius:var(--ngs-radius-sm)}:host ::ng-deep .ngs-content-editor-content-editable{-webkit-user-select:text;user-select:text}:host ::ng-deep .ngs-content-editor-content-editable a[data-ngs-headless-editor-mark=link]{color:var(--ngs-color-primary);text-decoration:underline;text-underline-offset:.15em}:host ::ng-deep .ngs-content-editor-content-editable.align-center{text-align:center}:host ::ng-deep .ngs-content-editor-content-editable.align-right{text-align:right}:host ::ng-deep .ngs-content-editor-content-editable.align-justify{text-align:justify}:host ::ng-deep .ngs-content-editor-content-editable>p{margin:0}:host ::ng-deep .ngs-content-editor-content-editable[data-empty]:before{content:attr(data-empty-placeholder);display:block;height:0;color:var(--ngs-content-editor-placeholder-color, var(--ngs-color-on-surface-variant));pointer-events:none}:host.select-none ::ng-deep .ngs-content-editor-content-editable,:host.is-selection-of-blocks-active ::ng-deep .ngs-content-editor-content-editable{-webkit-user-select:none!important;user-select:none!important}:host .block-controls{left:0;display:flex;align-items:center;color:var(--ngs-content-editor-muted-color, var(--ngs-color-on-surface-variant));width:calc(2 * var(--ngs-content-editor-control-size, calc(var(--spacing, .25rem) * 8)) + calc(var(--spacing, .25rem) * 4));padding:0 calc(var(--spacing, .25rem) * 2);opacity:0;flex:none}:host .block-controls.is-settings-popover-open{opacity:1}:host .block-controls.is-settings-popover-open .block-control:not(.block-control-drag){opacity:0}:host .block-control{cursor:pointer;width:var(--ngs-content-editor-control-size, calc(var(--spacing, .25rem) * 8));height:var(--ngs-content-editor-control-size, calc(var(--spacing, .25rem) * 8));flex:none;border-radius:var(--ngs-radius-lg);display:inline-flex;align-items:center;justify-content:center}:host .block-control:hover{background:var(--ngs-color-surface-container-low);color:var(--ngs-color-on-surface)}:host .block-control:focus-visible{outline:2px solid var(--ngs-state-focus-ring);outline-offset:2px}:host .block-control-drag button{cursor:grab}@media(hover:none){:host .block-controls{opacity:1}}:host .drag-placeholder{height:calc(var(--spacing, .25rem) * 8);flex:none;position:relative}:host .drag-placeholder:before{position:absolute;left:calc(var(--spacing, .25rem) * 18);display:block;right:0;content:\"\";height:calc(var(--spacing, .25rem) * 2);top:50%;transform:translateY(-50%);background:var(--ngs-color-primary-300);border-radius:calc(var(--spacing, .25rem) * .5)}:host ::ng-deep ngs-form-field{--ngs-form-field-border-radius: var(--ngs-control-radius);--ngs-form-field-border-color: var(--ngs-content-editor-field-border, var(--ngs-color-outline))}:host ::ng-deep ngs-upload-area{--ngs-upload-area-color: var(--ngs-content-editor-muted-color, var(--ngs-color-on-surface-variant));--ngs-upload-area-border: 1px solid var(--ngs-content-editor-field-border, var(--ngs-color-outline));--ngs-upload-area-border-radius: var(--ngs-control-radius)}:host ::ng-deep code{color:var(--ngs-color-primary)}.cdk-drag.cdk-drag-preview{overflow:hidden;display:flex;align-items:center;color:var(--ngs-content-editor-muted-color, var(--ngs-color-on-surface-variant));width:calc(2 * var(--ngs-content-editor-control-size, calc(var(--spacing, .25rem) * 8)) + calc(var(--spacing, .25rem) * 4));padding:0 calc(var(--spacing, .25rem) * 2)}.cdk-drag.cdk-drag-preview .block-control{width:var(--ngs-content-editor-control-size, calc(var(--spacing, .25rem) * 8));height:var(--ngs-content-editor-control-size, calc(var(--spacing, .25rem) * 8));flex:none;border-radius:var(--ngs-radius-lg);display:inline-flex;align-items:center;justify-content:center;cursor:grabbing}.cdk-drag.cdk-drag-preview .block-control:first-child{opacity:0}.cdk-drag.cdk-drag-preview .block-control:last-child{color:var(--ngs-color-on-surface)}.cdk-drag.cdk-drag-preview .block-content{opacity:0}.settings-popover{--ngs-list-list-item-one-line-container-height: calc(var(--spacing, .25rem) * 10)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "component", type: Menu, selector: "ngs-menu", inputs: ["themeSource", "role", "classList", "xPosition", "yPosition", "pushIntoViewport"], outputs: ["closed"], exportAs: ["ngsMenu"] }, { kind: "component", type: MenuItem, selector: "ngs-menu-item, [ngs-menu-item]", inputs: ["disabled", "role", "selected"], outputs: ["_triggered"], exportAs: ["ngsMenuItem"] }, { kind: "directive", type: MenuTrigger, selector: "[ngsMenuTriggerFor]", inputs: ["ngsMenuTriggerFor", "ngsMenuTriggerData", "ngsMenuDisabled", "xPosition", "yPosition", "ngsMenuTriggerRestoreFocus"], outputs: ["menuOpened", "menuClosed"], exportAs: ["ngsMenuTrigger"] }, { kind: "directive", type: CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "directive", type: TextSelectionPopupDirective, selector: "[ngsTextSelectionPopup]", inputs: ["targetComponent", "closestContentObserverClass"], outputs: ["tagSelected"] }, { kind: "directive", type: PopoverTriggerForDirective, selector: "[ngsPopoverTriggerFor]", inputs: ["ngsPopoverTriggerFor", "ngsPopoverContext", "trigger", "position", "delay", "origin", "closeOnOriginClick", "closeOnOriginMouseLeave", "hasBackdrop"], outputs: ["opened", "closed"], exportAs: ["ngsPopoverTriggerFor"] }, { kind: "component", type: Popover, selector: "ngs-popover", exportAs: ["ngsPopover"] }, { kind: "directive", type: ListItemTitle, selector: "[ngsListItemTitle]" }, { kind: "directive", type: ListItemIcon, selector: "[ngsListItemIcon]" }, { kind: "component", type: ListItem, selector: "ngs-list-item, a[ngs-list-item], button[ngs-list-item]", inputs: ["disabled", "lines"], exportAs: ["ngsListItem"] }, { kind: "component", type: List, selector: "ngs-list", inputs: ["disabled", "disableRipple"], exportAs: ["ngsList"] }, { kind: "component", type: MenuHeading, selector: "ngs-menu-heading" }, { kind: "directive", type: MenuContent, selector: "[ngsMenuContent]" }, { kind: "component", type: MenuHeader, selector: "ngs-menu-header", exportAs: ["ngsMenuHeader"] }, { kind: "component", type: FormField, selector: "ngs-form-field", inputs: ["labelMode", "subscriptHiddenIfEmpty", "sameHeightAsButton"], exportAs: ["ngsFormField"] }, { kind: "directive", type: Input, selector: "input[ngsInput], textarea[ngsInput]", inputs: ["id", "placeholder", "required", "disabled", "readonly", "errorStateMatcher"], exportAs: ["ngsInput"] }, { kind: "component", type: EmptyState, selector: "ngs-empty-state", exportAs: ["ngsEmptyState"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3490
3539
|
}
|
|
3491
3540
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentBuilderComponent, decorators: [{
|
|
3492
3541
|
type: Component,
|
|
@@ -3510,7 +3559,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
3510
3559
|
ListItem,
|
|
3511
3560
|
List,
|
|
3512
3561
|
MenuHeading,
|
|
3513
|
-
MenuContent
|
|
3562
|
+
MenuContent, MenuHeader, FormField, Input, EmptyState
|
|
3514
3563
|
], hostDirectives: [
|
|
3515
3564
|
{
|
|
3516
3565
|
directive: BlockSelectionDirective,
|
|
@@ -3536,7 +3585,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
3536
3585
|
'tabindex': '0',
|
|
3537
3586
|
'(paste)': '_onPaste($event)',
|
|
3538
3587
|
'(keydown)': '_onKeyDown($event)',
|
|
3539
|
-
}, template: "<div class=\"container py-4\">\n <div class=\"content\"\n cdkDropList\n [cdkDropListData]=\"{}\"\n [cdkDropListConnectedTo]=\"connectedDropLists()\"\n [cdkDropListEnterPredicate]=\"canEnterRoot\"\n ngsTextSelectionPopup\n closestContentObserverClass=\"ngs-content-editor-content-editable\"\n [targetComponent]=\"commandBar\"\n (tagSelected)=\"onTagSelected($event)\"\n (cdkDropListDropped)=\"drop($event)\">\n @for (contentBlock of _content(); track contentBlock.id) {\n <div class=\"block\"\n [attr.data-block-id]=\"contentBlock.id\"\n [class.is-focused]=\"isBlockFocused(contentBlock.id)\"\n [class.is-active]=\"isActiveBlock(contentBlock.id)\"\n cdkDrag\n [cdkDragData]=\"contentBlock.id\"\n cdkMonitorSubtreeFocus\n (cdkDragStarted)=\"onDragStarted($event, contentBlock)\"\n (cdkDragEnded)=\"onDragEnded($event, contentBlock)\"\n (cdkFocusChange)=\"onFocusChange($event, contentBlock)\">\n <div class=\"block-controls\" [class.is-settings-popover-open]=\"settingsTrigger.api.isOpen()\">\n <button class=\"block-control\" aria-label=\"Add block\"\n (mousedown)=\"setActiveBlockId($event, contentBlock.id)\"\n [ngsMenuTriggerFor]=\"suggestionsMenu\"\n [ngsMenuTriggerData]=\"{target: {scope: {}, afterId: contentBlock.id}}\"\n [ngsMenuTriggerRestoreFocus]=\"false\">\n <ngs-icon name=\"fluent:add-24-regular\"/>\n </button>\n <div class=\"block-control block-control-drag\"\n (click)=\"selectBlock(contentBlock.id)\"\n [ngsPopoverTriggerFor]=\"settingsPopover\"\n (closed)=\"onSettingsPopoverClose()\"\n #settingsTrigger=\"ngsPopoverTriggerFor\"\n hasBackdrop\n position=\"before-center\">\n <button cdkDragHandle\n trigger=\"hover\"\n closeOnOriginClick\n closeOnOriginMouseLeave\n #dragTrigger=\"ngsPopoverTriggerFor\"\n [ngsPopoverTriggerFor]=\"dragControlTooltip\"\n position=\"below-center\"\n (mousedown)=\"dragTrigger.api.close()\"\n delay=\"1000\" class=\"w-full h-full flex items-center justify-center\">\n <ngs-icon name=\"fluent:re-order-dots-vertical-24-regular\"/>\n </button>\n </div>\n <ng-template #dragControlTooltip>\n <div class=\"bg-neutral-900 text-xs flex flex-col gap-0.5 rounded-lg items-center px-2 py-1.5 font-medium\">\n <div>\n <div class=\"text-neutral-100\">Drag <span class=\"text-neutral-400\">to move</span></div>\n </div>\n <div>\n <div class=\"text-neutral-100\">Click <span class=\"text-neutral-400\">to open menu</span></div>\n </div>\n </div>\n </ng-template>\n </div>\n <div class=\"block-content\" [class.is-selected]=\"isBlockSelected(contentBlock.id)\">\n <div class=\"drag-placeholder\" *cdkDragPlaceholder></div>\n <ng-container [ngComponentOutlet]=\"blockDefsMap.get(contentBlock.type) | async\"\n [ngComponentOutletInputs]=\"{\n id: contentBlock.id,\n content: contentBlock.content,\n settings: contentBlock.settings,\n props: contentBlock.props,\n index: $index\n }\"/>\n </div>\n </div>\n }\n </div>\n</div>\n\n<ngs-popover #settingsPopover=\"ngsPopover\">\n <div class=\"px-2 py-0 w-72 settings-popover\">\n <ngs-list>\n @if (selectedBlocksModel.selected.length === 1 && canConvertBlock(selectedBlocksModel.selected[0])) {\n <ngs-list-item [ngsMenuTriggerFor]=\"conversionMenu\" [ngsMenuTriggerData]=\"{blockId: selectedBlocksModel.selected[0]}\" [ngsMenuTriggerRestoreFocus]=\"false\">\n <ngs-icon name=\"fluent:arrow-swap-24-regular\" ngsListItemIcon/>\n <div ngsListItemTitle>Turn into</div>\n </ngs-list-item>\n }\n <ngs-list-item (click)=\"duplicateSelectedBlocks(settingsPopover)\">\n <ngs-icon name=\"fluent:copy-24-regular\" ngsListItemIcon/>\n <div ngsListItemTitle>Duplicate</div>\n </ngs-list-item>\n <ngs-list-item (click)=\"deleteSelectedBlocks(settingsPopover)\">\n <ngs-icon name=\"fluent:delete-24-regular\" ngsListItemIcon/>\n <div ngsListItemTitle>Delete</div>\n </ngs-list-item>\n </ngs-list>\n </div>\n</ngs-popover>\n\n<ngs-menu #suggestionsMenu=\"ngsMenu\" classList=\"min-h-[70vh] max-h-[70vh]!\" pushIntoViewport (closed)=\"onSuggestionsMenuClose($event)\">\n <ng-template ngsMenuContent let-target=\"target\">\n <div (click)=\"preventMenuClose($event)\">\n @for (suggestionItem of insertionSuggestions(); track $index; let first = $first) {\n @switch (suggestionItem.type) {\n @case ('heading') {\n <ngs-menu-heading>{{ suggestionItem.title }}</ngs-menu-heading>\n }\n @case ('item') {\n <button ngs-menu-item\n (click)=\"addBlockFromSuggestionMenu(suggestionsMenu, target, suggestionItem.blockType, suggestionItem.blockSettings)\">\n <div class=\"h-full flex items-center gap-3 py-2\">\n <div class=\"size-9 flex items-center rounded-lg justify-center bg-surface-container\">\n <ngs-icon [name]=\"suggestionItem.iconName\" class=\"!me-0\"/>\n </div>\n <div class=\"grow min-w-[200px]\">\n <div>{{ suggestionItem.title }}</div>\n <div class=\"text-2xs text-neutral-600\">{{ suggestionItem.description }}</div>\n </div>\n @if (suggestionItem.hotKeys) {\n <div class=\"ms-auto bg-surface-container-highest rounded-full h-5\n text-4xs px-2 flex items-center font-bold\">{{ suggestionItem.hotKeys }}</div>\n }\n </div>\n </button>\n }\n }\n }\n </div>\n </ng-template>\n</ngs-menu>\n\n<ngs-menu #conversionMenu>\n <ng-template ngsMenuContent let-blockId=\"blockId\">\n @for (type of conversionTypes; track type) {\n <button ngs-menu-item (click)=\"convertBlock(blockId, type); settingsPopover.close()\">{{type}}</button>\n }\n </ng-template>\n</ngs-menu>\n", styles: [":host{--ngs-content-editor-builder-content-width: 704px;outline:none}:host.is-block-dragging{cursor:grabbing}:host .container{display:flex;width:100%;max-width:820px;min-height:200px;height:100%;padding:calc(var(--spacing, .25rem) * 5) calc(var(--spacing, .25rem) * 5) calc(var(--spacing, .25rem) * 5) 0;margin:0 auto;outline:none}:host .content{flex-grow:1;width:100%;min-width:0}:host .block{position:relative;flex:none;padding:var(--spacing, .25rem) 0;display:flex;align-items:center}:host .block:not(:has(.block-content.is-selected)):hover .block-content{background:var(--ngs-color-neutral-50)}:host:not(.is-block-dragging) .block:hover .block-controls,:host:not(.is-block-dragging) .block.is-active .block-controls{opacity:1}:host .block-content{position:relative;flex-grow:1;min-width:0;padding:calc(var(--spacing, .25rem) * 3)}:host .block-content.is-selected{background:var(--ngs-color-primary-100)}:host ::ng-deep .selection-area{background:var(--ngs-color-primary-100);opacity:.4;border:1px solid var(--ngs-color-primary);border-radius:var(--ngs-radius-sm)}:host ::ng-deep .ngs-content-editor-content-editable{-webkit-user-select:text;user-select:text}:host ::ng-deep .ngs-content-editor-content-editable a[data-ngs-headless-editor-mark=link]{color:var(--ngs-color-primary);text-decoration:underline;text-underline-offset:.15em}:host ::ng-deep .ngs-content-editor-content-editable.align-center{text-align:center}:host ::ng-deep .ngs-content-editor-content-editable.align-right{text-align:right}:host ::ng-deep .ngs-content-editor-content-editable.align-justify{text-align:justify}:host ::ng-deep .ngs-content-editor-content-editable>p{margin:0}:host ::ng-deep .ngs-content-editor-content-editable[data-empty]:before{content:attr(data-empty-placeholder);display:block;height:0;color:var(--ngs-color-neutral-500);pointer-events:none}:host.select-none ::ng-deep .ngs-content-editor-content-editable,:host.is-selection-of-blocks-active ::ng-deep .ngs-content-editor-content-editable{-webkit-user-select:none!important;user-select:none!important}:host .block-controls{left:0;display:flex;align-items:center;color:var(--ngs-color-neutral-500);width:calc(var(--spacing, .25rem) * 18);padding:0 calc(var(--spacing, .25rem) * 2);opacity:0;flex:none}:host .block-controls.is-settings-popover-open{opacity:1}:host .block-controls.is-settings-popover-open .block-control:not(.block-control-drag){opacity:0}:host .block-control{cursor:pointer;width:calc(var(--spacing, .25rem) * 7);height:calc(var(--spacing, .25rem) * 7);flex:none;border-radius:var(--ngs-radius-lg);display:inline-flex;align-items:center;justify-content:center}:host .block-control:hover{background:var(--ngs-color-surface-container-low);color:var(--ngs-color-on-surface)}:host .block-control-drag button{cursor:grab}:host .drag-placeholder{height:calc(var(--spacing, .25rem) * 8);flex:none;position:relative}:host .drag-placeholder:before{position:absolute;left:calc(var(--spacing, .25rem) * 18);display:block;right:0;content:\"\";height:calc(var(--spacing, .25rem) * 2);top:50%;transform:translateY(-50%);background:var(--ngs-color-primary-300);border-radius:calc(var(--spacing, .25rem) * .5)}:host ::ng-deep code{color:var(--ngs-color-primary)}.cdk-drag.cdk-drag-preview{overflow:hidden;display:flex;align-items:center;color:var(--ngs-color-neutral-500);width:calc(var(--spacing, .25rem) * 18);padding:0 calc(var(--spacing, .25rem) * 2)}.cdk-drag.cdk-drag-preview .block-control{width:calc(var(--spacing, .25rem) * 7);height:calc(var(--spacing, .25rem) * 7);flex:none;border-radius:var(--ngs-radius-lg);display:inline-flex;align-items:center;justify-content:center;cursor:grabbing}.cdk-drag.cdk-drag-preview .block-control:first-child{opacity:0}.cdk-drag.cdk-drag-preview .block-control:last-child{color:var(--ngs-color-on-surface)}.cdk-drag.cdk-drag-preview .block-content{opacity:0}.settings-popover{--ngs-list-list-item-one-line-container-height: calc(var(--spacing, .25rem) * 10)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
3588
|
+
}, template: "<div class=\"container py-4\">\n <div class=\"content\"\n cdkDropList\n [cdkDropListData]=\"{}\"\n [cdkDropListConnectedTo]=\"connectedDropLists()\"\n [cdkDropListEnterPredicate]=\"canEnterRoot\"\n ngsTextSelectionPopup\n closestContentObserverClass=\"ngs-content-editor-content-editable\"\n [targetComponent]=\"commandBar\"\n (tagSelected)=\"onTagSelected($event)\"\n (cdkDropListDropped)=\"drop($event)\">\n @for (contentBlock of _content(); track contentBlock.id) {\n <div class=\"block\"\n [attr.data-block-id]=\"contentBlock.id\"\n [class.is-focused]=\"isBlockFocused(contentBlock.id)\"\n [class.is-active]=\"isActiveBlock(contentBlock.id)\"\n cdkDrag\n [cdkDragData]=\"contentBlock.id\"\n cdkMonitorSubtreeFocus\n (cdkDragStarted)=\"onDragStarted($event, contentBlock)\"\n (cdkDragEnded)=\"onDragEnded($event, contentBlock)\"\n (cdkFocusChange)=\"onFocusChange($event, contentBlock)\">\n <div class=\"block-controls\" [class.is-settings-popover-open]=\"settingsTrigger.api.isOpen()\">\n <button class=\"block-control\" aria-label=\"Add block\"\n (mousedown)=\"setActiveBlockId($event, contentBlock.id)\"\n [ngsMenuTriggerFor]=\"suggestionsMenu\"\n [ngsMenuTriggerData]=\"{target: {scope: {}, afterId: contentBlock.id}}\"\n [ngsMenuTriggerRestoreFocus]=\"false\">\n <ngs-icon name=\"fluent:add-24-regular\"/>\n </button>\n <div class=\"block-control block-control-drag\"\n (click)=\"selectBlock(contentBlock.id)\"\n [ngsPopoverTriggerFor]=\"settingsPopover\"\n (closed)=\"onSettingsPopoverClose()\"\n #settingsTrigger=\"ngsPopoverTriggerFor\"\n hasBackdrop\n position=\"before-center\">\n <button cdkDragHandle\n trigger=\"hover\"\n closeOnOriginClick\n closeOnOriginMouseLeave\n #dragTrigger=\"ngsPopoverTriggerFor\"\n [ngsPopoverTriggerFor]=\"dragControlTooltip\"\n position=\"below-center\"\n (mousedown)=\"dragTrigger.api.close()\"\n delay=\"1000\" class=\"w-full h-full flex items-center justify-center\">\n <ngs-icon name=\"fluent:re-order-dots-vertical-24-regular\"/>\n </button>\n </div>\n <ng-template #dragControlTooltip>\n <div class=\"bg-on-surface text-xs flex flex-col gap-0.5 rounded-lg items-center px-2 py-1.5 font-medium\">\n <div>\n <div class=\"text-surface\">Drag <span class=\"text-surface/70\">to move</span></div>\n </div>\n <div>\n <div class=\"text-surface\">Click <span class=\"text-surface/70\">to open menu</span></div>\n </div>\n </div>\n </ng-template>\n </div>\n <div class=\"block-content\" [class.is-selected]=\"isBlockSelected(contentBlock.id)\">\n <div class=\"drag-placeholder\" *cdkDragPlaceholder></div>\n <ng-container [ngComponentOutlet]=\"blockDefsMap.get(contentBlock.type) | async\"\n [ngComponentOutletInputs]=\"{\n id: contentBlock.id,\n content: contentBlock.content,\n settings: contentBlock.settings,\n props: contentBlock.props,\n index: $index\n }\"/>\n </div>\n </div>\n }\n </div>\n</div>\n\n<ngs-popover #settingsPopover=\"ngsPopover\">\n <div class=\"px-2 py-0 w-72 settings-popover\">\n <ngs-list>\n @if (selectedBlocksModel.selected.length === 1 && canConvertBlock(selectedBlocksModel.selected[0])) {\n <ngs-list-item [ngsMenuTriggerFor]=\"conversionMenu\" [ngsMenuTriggerData]=\"{blockId: selectedBlocksModel.selected[0]}\" [ngsMenuTriggerRestoreFocus]=\"false\">\n <ngs-icon name=\"fluent:arrow-swap-24-regular\" ngsListItemIcon/>\n <div ngsListItemTitle>Turn into</div>\n </ngs-list-item>\n }\n <ngs-list-item (click)=\"duplicateSelectedBlocks(settingsPopover)\">\n <ngs-icon name=\"fluent:copy-24-regular\" ngsListItemIcon/>\n <div ngsListItemTitle>Duplicate</div>\n </ngs-list-item>\n <ngs-list-item (click)=\"deleteSelectedBlocks(settingsPopover)\">\n <ngs-icon name=\"fluent:delete-24-regular\" ngsListItemIcon/>\n <div ngsListItemTitle>Delete</div>\n </ngs-list-item>\n </ngs-list>\n </div>\n</ngs-popover>\n\n<ngs-menu #suggestionsMenu=\"ngsMenu\" classList=\"min-h-[70vh] max-h-[70vh]! w-80 max-w-[calc(100vw-1rem)]!\" [themeSource]=\"themeSource\" pushIntoViewport (closed)=\"onSuggestionsMenuClose($event)\">\n <ngs-menu-header>\n <div class=\"p-3\">\n <div class=\"mb-2 text-sm font-semibold text-on-surface\">Insert block</div>\n <ngs-form-field subscriptHiddenIfEmpty>\n <input ngsInput aria-label=\"Search blocks\" placeholder=\"Search blocks\u2026\" [value]=\"menuQuery()\" (input)=\"menuQuery.set($any($event.target).value)\" (keydown)=\"onMenuSearchKeydown($event, blockMenu().context()?.target ?? getInsertionTarget())\">\n </ngs-form-field>\n </div>\n </ngs-menu-header>\n <ng-template ngsMenuContent let-target=\"target\">\n <div (click)=\"preventMenuClose($event)\">\n @for (suggestionItem of filteredInsertionSuggestions(); track $index; let first = $first) {\n @switch (suggestionItem.type) {\n @case ('heading') {\n <ngs-menu-heading>{{ suggestionItem.title }}</ngs-menu-heading>\n }\n @case ('item') {\n <button ngs-menu-item\n (click)=\"addBlockFromSuggestionMenu(suggestionsMenu, target, suggestionItem.blockType, suggestionItem.blockSettings)\">\n <div class=\"h-full flex items-center gap-3 py-2\">\n <div class=\"size-9 flex items-center rounded-lg justify-center bg-surface-container\">\n <ngs-icon [name]=\"suggestionItem.iconName\" class=\"!me-0\"/>\n </div>\n <div class=\"grow min-w-[200px]\">\n <div>{{ suggestionItem.title }}</div>\n <div class=\"text-xs text-on-surface-variant\">{{ suggestionItem.description }}</div>\n </div>\n @if (suggestionItem.hotKeys) {\n <div class=\"ms-auto bg-surface-container-highest rounded-full h-5\n text-4xs px-2 flex items-center font-bold\">{{ suggestionItem.hotKeys }}</div>\n }\n </div>\n </button>\n }\n }\n }\n @if (!filteredInsertionSuggestions().length) { <ngs-empty-state>No matching blocks</ngs-empty-state> }\n </div>\n </ng-template>\n</ngs-menu>\n\n<ngs-menu #conversionMenu [themeSource]=\"themeSource\">\n <ng-template ngsMenuContent let-blockId=\"blockId\">\n @for (type of conversionTypes; track type) {\n <button ngs-menu-item (click)=\"convertBlock(blockId, type); settingsPopover.close()\">{{type}}</button>\n }\n </ng-template>\n</ngs-menu>\n", styles: [":host{--ngs-content-editor-builder-content-width: var(--ngs-content-editor-content-width, 704px);font-size:var(--ngs-content-editor-font-size, var(--ngs-font-size-md));line-height:var(--ngs-content-editor-line-height, 1.6);outline:none}:host.is-block-dragging{cursor:grabbing}:host .container{display:flex;width:100%;max-width:820px;min-height:200px;height:100%;padding:calc(var(--spacing, .25rem) * 5) calc(var(--spacing, .25rem) * 5) calc(var(--spacing, .25rem) * 5) 0;margin:0 auto;outline:none}:host .content{flex-grow:1;width:100%;min-width:0}:host .block{position:relative;flex:none;padding:var(--spacing, .25rem) 0;display:flex;align-items:center}:host .block:not(:has(.block-content.is-selected)):hover .block-content{background:var(--ngs-content-editor-hover-bg, var(--ngs-state-hover-bg))}:host:not(.is-block-dragging) .block:hover .block-controls,:host:not(.is-block-dragging) .block.is-active .block-controls,:host:not(.is-block-dragging) .block:focus-within .block-controls{opacity:1}:host .block-content{position:relative;flex-grow:1;min-width:0;padding:var(--ngs-content-editor-block-padding, calc(var(--spacing, .25rem) * 3));border-radius:var(--ngs-content-editor-block-radius, var(--ngs-control-radius))}:host .block-content.is-selected{background:var(--ngs-content-editor-selected-bg, var(--ngs-color-primary-container));color:var(--ngs-content-editor-selected-color, var(--ngs-color-on-primary-container))}:host ::ng-deep .selection-area{background:var(--ngs-content-editor-selected-bg, var(--ngs-color-primary-container));opacity:.4;border:1px solid var(--ngs-color-primary);border-radius:var(--ngs-radius-sm)}:host ::ng-deep .ngs-content-editor-content-editable{-webkit-user-select:text;user-select:text}:host ::ng-deep .ngs-content-editor-content-editable a[data-ngs-headless-editor-mark=link]{color:var(--ngs-color-primary);text-decoration:underline;text-underline-offset:.15em}:host ::ng-deep .ngs-content-editor-content-editable.align-center{text-align:center}:host ::ng-deep .ngs-content-editor-content-editable.align-right{text-align:right}:host ::ng-deep .ngs-content-editor-content-editable.align-justify{text-align:justify}:host ::ng-deep .ngs-content-editor-content-editable>p{margin:0}:host ::ng-deep .ngs-content-editor-content-editable[data-empty]:before{content:attr(data-empty-placeholder);display:block;height:0;color:var(--ngs-content-editor-placeholder-color, var(--ngs-color-on-surface-variant));pointer-events:none}:host.select-none ::ng-deep .ngs-content-editor-content-editable,:host.is-selection-of-blocks-active ::ng-deep .ngs-content-editor-content-editable{-webkit-user-select:none!important;user-select:none!important}:host .block-controls{left:0;display:flex;align-items:center;color:var(--ngs-content-editor-muted-color, var(--ngs-color-on-surface-variant));width:calc(2 * var(--ngs-content-editor-control-size, calc(var(--spacing, .25rem) * 8)) + calc(var(--spacing, .25rem) * 4));padding:0 calc(var(--spacing, .25rem) * 2);opacity:0;flex:none}:host .block-controls.is-settings-popover-open{opacity:1}:host .block-controls.is-settings-popover-open .block-control:not(.block-control-drag){opacity:0}:host .block-control{cursor:pointer;width:var(--ngs-content-editor-control-size, calc(var(--spacing, .25rem) * 8));height:var(--ngs-content-editor-control-size, calc(var(--spacing, .25rem) * 8));flex:none;border-radius:var(--ngs-radius-lg);display:inline-flex;align-items:center;justify-content:center}:host .block-control:hover{background:var(--ngs-color-surface-container-low);color:var(--ngs-color-on-surface)}:host .block-control:focus-visible{outline:2px solid var(--ngs-state-focus-ring);outline-offset:2px}:host .block-control-drag button{cursor:grab}@media(hover:none){:host .block-controls{opacity:1}}:host .drag-placeholder{height:calc(var(--spacing, .25rem) * 8);flex:none;position:relative}:host .drag-placeholder:before{position:absolute;left:calc(var(--spacing, .25rem) * 18);display:block;right:0;content:\"\";height:calc(var(--spacing, .25rem) * 2);top:50%;transform:translateY(-50%);background:var(--ngs-color-primary-300);border-radius:calc(var(--spacing, .25rem) * .5)}:host ::ng-deep ngs-form-field{--ngs-form-field-border-radius: var(--ngs-control-radius);--ngs-form-field-border-color: var(--ngs-content-editor-field-border, var(--ngs-color-outline))}:host ::ng-deep ngs-upload-area{--ngs-upload-area-color: var(--ngs-content-editor-muted-color, var(--ngs-color-on-surface-variant));--ngs-upload-area-border: 1px solid var(--ngs-content-editor-field-border, var(--ngs-color-outline));--ngs-upload-area-border-radius: var(--ngs-control-radius)}:host ::ng-deep code{color:var(--ngs-color-primary)}.cdk-drag.cdk-drag-preview{overflow:hidden;display:flex;align-items:center;color:var(--ngs-content-editor-muted-color, var(--ngs-color-on-surface-variant));width:calc(2 * var(--ngs-content-editor-control-size, calc(var(--spacing, .25rem) * 8)) + calc(var(--spacing, .25rem) * 4));padding:0 calc(var(--spacing, .25rem) * 2)}.cdk-drag.cdk-drag-preview .block-control{width:var(--ngs-content-editor-control-size, calc(var(--spacing, .25rem) * 8));height:var(--ngs-content-editor-control-size, calc(var(--spacing, .25rem) * 8));flex:none;border-radius:var(--ngs-radius-lg);display:inline-flex;align-items:center;justify-content:center;cursor:grabbing}.cdk-drag.cdk-drag-preview .block-control:first-child{opacity:0}.cdk-drag.cdk-drag-preview .block-control:last-child{color:var(--ngs-color-on-surface)}.cdk-drag.cdk-drag-preview .block-content{opacity:0}.settings-popover{--ngs-list-list-item-one-line-container-height: calc(var(--spacing, .25rem) * 10)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
3540
3589
|
}], ctorParameters: () => [], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], conversionMenu: [{ type: i0.ViewChild, args: ['conversionMenu', { isSignal: true }] }], blockMenu: [{ type: i0.ViewChild, args: ['suggestionsMenu', { isSignal: true }] }], documentId: [{ type: i0.Input, args: [{ isSignal: true, alias: "documentId", required: false }] }], draftDebounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "draftDebounceMs", required: false }] }], dropList: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkDropList), { isSignal: true }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], contentChangedDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentChangedDelay", required: false }] }], persistDraft: [{ type: i0.Input, args: [{ isSignal: true, alias: "persistDraft", required: false }] }], suggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "suggestions", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], scrollContainer: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollContainer", required: false }] }], contentChanged: [{ type: i0.Output, args: ["contentChanged"] }] } });
|
|
3541
3590
|
|
|
3542
3591
|
const CONTENT_EDITOR_BLOCK_RENDERERS = new InjectionToken('CONTENT_EDITOR_BLOCK_RENDERERS', {
|
|
@@ -3859,13 +3908,13 @@ class ContentEditorHeadingRenderer {
|
|
|
3859
3908
|
...(ngDevMode ? [{ debugName: "runs" }] : /* istanbul ignore next */ []));
|
|
3860
3909
|
level = computed(() => {
|
|
3861
3910
|
const level = this.settings()?.level;
|
|
3862
|
-
return level ===
|
|
3911
|
+
return typeof level === 'number' && Number.isInteger(level) && level >= 1 && level <= 6 ? level : 2;
|
|
3863
3912
|
}, /* @ts-ignore */
|
|
3864
3913
|
...(ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []));
|
|
3865
3914
|
alignment = computed(() => getTextAlignment(this.props()), /* @ts-ignore */
|
|
3866
3915
|
...(ngDevMode ? [{ debugName: "alignment" }] : /* istanbul ignore next */ []));
|
|
3867
3916
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorHeadingRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3868
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ContentEditorHeadingRenderer, isStandalone: true, selector: "ngs-content-editor-heading-renderer", inputs: { block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.level-1": "level() === 1", "class.level-2": "level() === 2", "class.level-3": "level() === 3" }, classAttribute: "ngs-content-editor-heading-renderer" }, ngImport: i0, template: "@switch (level()) {\n @case (1) {\n <h1\n class=\"content-html\"\n [class.align-left]=\"alignment() === 'left'\"\n [class.align-center]=\"alignment() === 'center'\"\n [class.align-right]=\"alignment() === 'right'\"\n [class.align-justify]=\"alignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"runs()\"\n ></h1>\n }\n @case (3) {\n <h3\n class=\"content-html\"\n [class.align-left]=\"alignment() === 'left'\"\n [class.align-center]=\"alignment() === 'center'\"\n [class.align-right]=\"alignment() === 'right'\"\n [class.align-justify]=\"alignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"runs()\"\n ></h3>\n }\n @default {\n <h2\n class=\"content-html\"\n [class.align-left]=\"alignment() === 'left'\"\n [class.align-center]=\"alignment() === 'center'\"\n [class.align-right]=\"alignment() === 'right'\"\n [class.align-justify]=\"alignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"runs()\"\n ></h2>\n }\n}\n", styles: [":host{display:block}:host .content-html{margin:0;font-weight:
|
|
3917
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ContentEditorHeadingRenderer, isStandalone: true, selector: "ngs-content-editor-heading-renderer", inputs: { block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.level-1": "level() === 1", "class.level-2": "level() === 2", "class.level-3": "level() === 3", "class.level-6": "level() === 6", "class.level-5": "level() === 5", "class.level-4": "level() === 4" }, classAttribute: "ngs-content-editor-heading-renderer" }, ngImport: i0, template: "@switch (level()) {\n @case (1) {\n <h1\n class=\"content-html\"\n [class.align-left]=\"alignment() === 'left'\"\n [class.align-center]=\"alignment() === 'center'\"\n [class.align-right]=\"alignment() === 'right'\"\n [class.align-justify]=\"alignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"runs()\"\n ></h1>\n }\n @case (3) {\n <h3\n class=\"content-html\"\n [class.align-left]=\"alignment() === 'left'\"\n [class.align-center]=\"alignment() === 'center'\"\n [class.align-right]=\"alignment() === 'right'\"\n [class.align-justify]=\"alignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"runs()\"\n ></h3>\n }\n @case (4) {\n <h4 class=\"content-html\" [class.align-left]=\"alignment() === 'left'\" [class.align-center]=\"alignment() === 'center'\" [class.align-right]=\"alignment() === 'right'\" [class.align-justify]=\"alignment() === 'justify'\" [ngsHeadlessEditorRuns]=\"runs()\"></h4>\n }\n @case (5) {\n <h5 class=\"content-html\" [class.align-left]=\"alignment() === 'left'\" [class.align-center]=\"alignment() === 'center'\" [class.align-right]=\"alignment() === 'right'\" [class.align-justify]=\"alignment() === 'justify'\" [ngsHeadlessEditorRuns]=\"runs()\"></h5>\n }\n @case (6) {\n <h6 class=\"content-html\" [class.align-left]=\"alignment() === 'left'\" [class.align-center]=\"alignment() === 'center'\" [class.align-right]=\"alignment() === 'right'\" [class.align-justify]=\"alignment() === 'justify'\" [ngsHeadlessEditorRuns]=\"runs()\"></h6>\n }\n @default {\n <h2\n class=\"content-html\"\n [class.align-left]=\"alignment() === 'left'\"\n [class.align-center]=\"alignment() === 'center'\"\n [class.align-right]=\"alignment() === 'right'\"\n [class.align-justify]=\"alignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"runs()\"\n ></h2>\n }\n}\n", styles: [":host{display:block}:host .align-left{text-align:left}:host .align-center{text-align:center}:host .align-right{text-align:right}:host .align-justify{text-align:justify}:host .content-html{margin:0;outline:none;font-weight:var(--ngs-content-editor-heading-weight, 650);line-height:var(--ngs-content-editor-heading-line-height, 1.2)}:host.level-1 .content-html{font-size:var(--ngs-content-editor-heading-1-size, 2.5rem)}:host.level-2 .content-html{font-size:var(--ngs-content-editor-heading-2-size, 2rem)}:host.level-3 .content-html{font-size:var(--ngs-content-editor-heading-3-size, 1.5rem)}:host.level-4 .content-html{font-size:var(--ngs-content-editor-heading-4-size, 1.25rem)}:host.level-5 .content-html{font-size:var(--ngs-content-editor-heading-5-size, 1.125rem)}:host.level-6 .content-html{font-size:var(--ngs-content-editor-heading-6-size, 1rem)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgsHeadlessEditorRuns, selector: "[ngsHeadlessEditorRuns]", inputs: ["ngsHeadlessEditorRuns"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3869
3918
|
}
|
|
3870
3919
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorHeadingRenderer, decorators: [{
|
|
3871
3920
|
type: Component,
|
|
@@ -3876,7 +3925,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
3876
3925
|
'[class.level-1]': 'level() === 1',
|
|
3877
3926
|
'[class.level-2]': 'level() === 2',
|
|
3878
3927
|
'[class.level-3]': 'level() === 3',
|
|
3879
|
-
|
|
3928
|
+
'[class.level-6]': 'level() === 6',
|
|
3929
|
+
'[class.level-5]': 'level() === 5',
|
|
3930
|
+
'[class.level-4]': 'level() === 4',
|
|
3931
|
+
}, template: "@switch (level()) {\n @case (1) {\n <h1\n class=\"content-html\"\n [class.align-left]=\"alignment() === 'left'\"\n [class.align-center]=\"alignment() === 'center'\"\n [class.align-right]=\"alignment() === 'right'\"\n [class.align-justify]=\"alignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"runs()\"\n ></h1>\n }\n @case (3) {\n <h3\n class=\"content-html\"\n [class.align-left]=\"alignment() === 'left'\"\n [class.align-center]=\"alignment() === 'center'\"\n [class.align-right]=\"alignment() === 'right'\"\n [class.align-justify]=\"alignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"runs()\"\n ></h3>\n }\n @case (4) {\n <h4 class=\"content-html\" [class.align-left]=\"alignment() === 'left'\" [class.align-center]=\"alignment() === 'center'\" [class.align-right]=\"alignment() === 'right'\" [class.align-justify]=\"alignment() === 'justify'\" [ngsHeadlessEditorRuns]=\"runs()\"></h4>\n }\n @case (5) {\n <h5 class=\"content-html\" [class.align-left]=\"alignment() === 'left'\" [class.align-center]=\"alignment() === 'center'\" [class.align-right]=\"alignment() === 'right'\" [class.align-justify]=\"alignment() === 'justify'\" [ngsHeadlessEditorRuns]=\"runs()\"></h5>\n }\n @case (6) {\n <h6 class=\"content-html\" [class.align-left]=\"alignment() === 'left'\" [class.align-center]=\"alignment() === 'center'\" [class.align-right]=\"alignment() === 'right'\" [class.align-justify]=\"alignment() === 'justify'\" [ngsHeadlessEditorRuns]=\"runs()\"></h6>\n }\n @default {\n <h2\n class=\"content-html\"\n [class.align-left]=\"alignment() === 'left'\"\n [class.align-center]=\"alignment() === 'center'\"\n [class.align-right]=\"alignment() === 'right'\"\n [class.align-justify]=\"alignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"runs()\"\n ></h2>\n }\n}\n", styles: [":host{display:block}:host .align-left{text-align:left}:host .align-center{text-align:center}:host .align-right{text-align:right}:host .align-justify{text-align:justify}:host .content-html{margin:0;outline:none;font-weight:var(--ngs-content-editor-heading-weight, 650);line-height:var(--ngs-content-editor-heading-line-height, 1.2)}:host.level-1 .content-html{font-size:var(--ngs-content-editor-heading-1-size, 2.5rem)}:host.level-2 .content-html{font-size:var(--ngs-content-editor-heading-2-size, 2rem)}:host.level-3 .content-html{font-size:var(--ngs-content-editor-heading-3-size, 1.5rem)}:host.level-4 .content-html{font-size:var(--ngs-content-editor-heading-4-size, 1.25rem)}:host.level-5 .content-html{font-size:var(--ngs-content-editor-heading-5-size, 1.125rem)}:host.level-6 .content-html{font-size:var(--ngs-content-editor-heading-6-size, 1rem)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
3880
3932
|
}], propDecorators: { block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], settings: [{ type: i0.Input, args: [{ isSignal: true, alias: "settings", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: false }] }] } });
|
|
3881
3933
|
|
|
3882
3934
|
class ContentEditorImageRenderer {
|
|
@@ -3903,13 +3955,13 @@ class ContentEditorImageRenderer {
|
|
|
3903
3955
|
height = computed(() => getDimensionAttribute(this.settings()?.height), /* @ts-ignore */
|
|
3904
3956
|
...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
3905
3957
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorImageRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3906
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ContentEditorImageRenderer, isStandalone: true, selector: "ngs-content-editor-image-renderer", inputs: { block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ngs-content-editor-image-renderer" }, ngImport: i0, template: "@if (src()) {\n <figure>\n <img [src]=\"src()\" [alt]=\"alt()\" [attr.width]=\"width()\" [attr.height]=\"height()\">\n @if (alt()) {\n <figcaption>{{ alt() }}</figcaption>\n }\n </figure>\n}\n", styles: [":host{display:block}:host figure{margin:0}:host img{display:block;max-width:100%;height:auto}:host figcaption{margin-top:calc(var(--spacing, .25rem) * 2);color:var(--ngs-color-
|
|
3958
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ContentEditorImageRenderer, isStandalone: true, selector: "ngs-content-editor-image-renderer", inputs: { block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ngs-content-editor-image-renderer" }, ngImport: i0, template: "@if (src()) {\n <figure>\n <img [src]=\"src()\" [alt]=\"alt()\" [attr.width]=\"width()\" [attr.height]=\"height()\">\n @if (alt()) {\n <figcaption>{{ alt() }}</figcaption>\n }\n </figure>\n}\n", styles: [":host{display:block}:host figure{margin:0}:host img{display:block;max-width:100%;height:auto}:host figcaption{margin-top:calc(var(--spacing, .25rem) * 2);color:var(--ngs-content-editor-muted-color, var(--ngs-color-on-surface-variant));font-size:var(--ngs-font-size-sm);text-align:center}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3907
3959
|
}
|
|
3908
3960
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorImageRenderer, decorators: [{
|
|
3909
3961
|
type: Component,
|
|
3910
3962
|
args: [{ selector: 'ngs-content-editor-image-renderer', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
3911
3963
|
'class': 'ngs-content-editor-image-renderer',
|
|
3912
|
-
}, template: "@if (src()) {\n <figure>\n <img [src]=\"src()\" [alt]=\"alt()\" [attr.width]=\"width()\" [attr.height]=\"height()\">\n @if (alt()) {\n <figcaption>{{ alt() }}</figcaption>\n }\n </figure>\n}\n", styles: [":host{display:block}:host figure{margin:0}:host img{display:block;max-width:100%;height:auto}:host figcaption{margin-top:calc(var(--spacing, .25rem) * 2);color:var(--ngs-color-
|
|
3964
|
+
}, template: "@if (src()) {\n <figure>\n <img [src]=\"src()\" [alt]=\"alt()\" [attr.width]=\"width()\" [attr.height]=\"height()\">\n @if (alt()) {\n <figcaption>{{ alt() }}</figcaption>\n }\n </figure>\n}\n", styles: [":host{display:block}:host figure{margin:0}:host img{display:block;max-width:100%;height:auto}:host figcaption{margin-top:calc(var(--spacing, .25rem) * 2);color:var(--ngs-content-editor-muted-color, var(--ngs-color-on-surface-variant));font-size:var(--ngs-font-size-sm);text-align:center}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
3913
3965
|
}], propDecorators: { block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], settings: [{ type: i0.Input, args: [{ isSignal: true, alias: "settings", required: false }] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: false }] }] } });
|
|
3914
3966
|
|
|
3915
3967
|
class ContentEditorListRenderer {
|
|
@@ -3969,7 +4021,7 @@ class ContentEditorParagraphRenderer {
|
|
|
3969
4021
|
alignment = computed(() => getTextAlignment(this.props()), /* @ts-ignore */
|
|
3970
4022
|
...(ngDevMode ? [{ debugName: "alignment" }] : /* istanbul ignore next */ []));
|
|
3971
4023
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorParagraphRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3972
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: ContentEditorParagraphRenderer, isStandalone: true, selector: "ngs-content-editor-paragraph-renderer", inputs: { block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ngs-content-editor-paragraph-renderer" }, ngImport: i0, template: "<p\n class=\"content-html\"\n [class.align-left]=\"alignment() === 'left'\"\n [class.align-center]=\"alignment() === 'center'\"\n [class.align-right]=\"alignment() === 'right'\"\n [class.align-justify]=\"alignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"runs()\"\n></p>\n", styles: [":host{display:block}:host .content-html{margin:0;line-height:var(--
|
|
4024
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: ContentEditorParagraphRenderer, isStandalone: true, selector: "ngs-content-editor-paragraph-renderer", inputs: { block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ngs-content-editor-paragraph-renderer" }, ngImport: i0, template: "<p\n class=\"content-html\"\n [class.align-left]=\"alignment() === 'left'\"\n [class.align-center]=\"alignment() === 'center'\"\n [class.align-right]=\"alignment() === 'right'\"\n [class.align-justify]=\"alignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"runs()\"\n></p>\n", styles: [":host{display:block}:host .content-html{margin:0;line-height:var(--ngs-content-editor-line-height, 1.6)}:host .align-left{text-align:left}:host .align-center{text-align:center}:host .align-right{text-align:right}:host .align-justify{text-align:justify}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgsHeadlessEditorRuns, selector: "[ngsHeadlessEditorRuns]", inputs: ["ngsHeadlessEditorRuns"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3973
4025
|
}
|
|
3974
4026
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorParagraphRenderer, decorators: [{
|
|
3975
4027
|
type: Component,
|
|
@@ -3977,7 +4029,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
3977
4029
|
NgsHeadlessEditorRuns,
|
|
3978
4030
|
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
3979
4031
|
'class': 'ngs-content-editor-paragraph-renderer',
|
|
3980
|
-
}, template: "<p\n class=\"content-html\"\n [class.align-left]=\"alignment() === 'left'\"\n [class.align-center]=\"alignment() === 'center'\"\n [class.align-right]=\"alignment() === 'right'\"\n [class.align-justify]=\"alignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"runs()\"\n></p>\n", styles: [":host{display:block}:host .content-html{margin:0;line-height:var(--
|
|
4032
|
+
}, template: "<p\n class=\"content-html\"\n [class.align-left]=\"alignment() === 'left'\"\n [class.align-center]=\"alignment() === 'center'\"\n [class.align-right]=\"alignment() === 'right'\"\n [class.align-justify]=\"alignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"runs()\"\n></p>\n", styles: [":host{display:block}:host .content-html{margin:0;line-height:var(--ngs-content-editor-line-height, 1.6)}:host .align-left{text-align:left}:host .align-center{text-align:center}:host .align-right{text-align:right}:host .align-justify{text-align:justify}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
3981
4033
|
}], propDecorators: { block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], settings: [{ type: i0.Input, args: [{ isSignal: true, alias: "settings", required: false }] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: false }] }] } });
|
|
3982
4034
|
|
|
3983
4035
|
class ContentEditorQuoteRenderer {
|
|
@@ -4006,7 +4058,7 @@ class ContentEditorQuoteRenderer {
|
|
|
4006
4058
|
captionAlignment = computed(() => getTextAlignment(this.content()?.caption?.props), /* @ts-ignore */
|
|
4007
4059
|
...(ngDevMode ? [{ debugName: "captionAlignment" }] : /* istanbul ignore next */ []));
|
|
4008
4060
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorQuoteRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4009
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ContentEditorQuoteRenderer, isStandalone: true, selector: "ngs-content-editor-quote-renderer", inputs: { block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ngs-content-editor-quote-renderer" }, ngImport: i0, template: "<blockquote\n class=\"content-html\"\n [class.align-left]=\"quoteAlignment() === 'left'\"\n [class.align-center]=\"quoteAlignment() === 'center'\"\n [class.align-right]=\"quoteAlignment() === 'right'\"\n [class.align-justify]=\"quoteAlignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"quoteRuns()\"\n></blockquote>\n@if (hasCaption()) {\n <figcaption\n class=\"caption-html\"\n [class.align-left]=\"captionAlignment() === 'left'\"\n [class.align-center]=\"captionAlignment() === 'center'\"\n [class.align-right]=\"captionAlignment() === 'right'\"\n [class.align-justify]=\"captionAlignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"captionRuns()\"\n ></figcaption>\n}\n", styles: [":host{display:block}:host .content-html{border-inline-start:var(--spacing, .25rem) solid var(--ngs-color-border);margin:0 0 calc(var(--spacing, .25rem) * 2);padding:calc(var(--spacing, .25rem) * 2) calc(var(--spacing, .25rem) * 3)}:host .caption-html{color:var(--ngs-color-
|
|
4061
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ContentEditorQuoteRenderer, isStandalone: true, selector: "ngs-content-editor-quote-renderer", inputs: { block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ngs-content-editor-quote-renderer" }, ngImport: i0, template: "<blockquote\n class=\"content-html\"\n [class.align-left]=\"quoteAlignment() === 'left'\"\n [class.align-center]=\"quoteAlignment() === 'center'\"\n [class.align-right]=\"quoteAlignment() === 'right'\"\n [class.align-justify]=\"quoteAlignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"quoteRuns()\"\n></blockquote>\n@if (hasCaption()) {\n <figcaption\n class=\"caption-html\"\n [class.align-left]=\"captionAlignment() === 'left'\"\n [class.align-center]=\"captionAlignment() === 'center'\"\n [class.align-right]=\"captionAlignment() === 'right'\"\n [class.align-justify]=\"captionAlignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"captionRuns()\"\n ></figcaption>\n}\n", styles: [":host{display:block}:host .content-html{border-inline-start:var(--spacing, .25rem) solid var(--ngs-color-border);margin:0 0 calc(var(--spacing, .25rem) * 2);padding:calc(var(--spacing, .25rem) * 2) calc(var(--spacing, .25rem) * 3)}:host .caption-html{color:var(--ngs-content-editor-muted-color, var(--ngs-color-on-surface-variant));display:block;font-size:var(--ngs-font-size-sm)}:host .align-left{text-align:left}:host .align-center{text-align:center}:host .align-right{text-align:right}:host .align-justify{text-align:justify}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgsHeadlessEditorRuns, selector: "[ngsHeadlessEditorRuns]", inputs: ["ngsHeadlessEditorRuns"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4010
4062
|
}
|
|
4011
4063
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorQuoteRenderer, decorators: [{
|
|
4012
4064
|
type: Component,
|
|
@@ -4014,7 +4066,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
4014
4066
|
NgsHeadlessEditorRuns,
|
|
4015
4067
|
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
4016
4068
|
'class': 'ngs-content-editor-quote-renderer',
|
|
4017
|
-
}, template: "<blockquote\n class=\"content-html\"\n [class.align-left]=\"quoteAlignment() === 'left'\"\n [class.align-center]=\"quoteAlignment() === 'center'\"\n [class.align-right]=\"quoteAlignment() === 'right'\"\n [class.align-justify]=\"quoteAlignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"quoteRuns()\"\n></blockquote>\n@if (hasCaption()) {\n <figcaption\n class=\"caption-html\"\n [class.align-left]=\"captionAlignment() === 'left'\"\n [class.align-center]=\"captionAlignment() === 'center'\"\n [class.align-right]=\"captionAlignment() === 'right'\"\n [class.align-justify]=\"captionAlignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"captionRuns()\"\n ></figcaption>\n}\n", styles: [":host{display:block}:host .content-html{border-inline-start:var(--spacing, .25rem) solid var(--ngs-color-border);margin:0 0 calc(var(--spacing, .25rem) * 2);padding:calc(var(--spacing, .25rem) * 2) calc(var(--spacing, .25rem) * 3)}:host .caption-html{color:var(--ngs-color-
|
|
4069
|
+
}, template: "<blockquote\n class=\"content-html\"\n [class.align-left]=\"quoteAlignment() === 'left'\"\n [class.align-center]=\"quoteAlignment() === 'center'\"\n [class.align-right]=\"quoteAlignment() === 'right'\"\n [class.align-justify]=\"quoteAlignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"quoteRuns()\"\n></blockquote>\n@if (hasCaption()) {\n <figcaption\n class=\"caption-html\"\n [class.align-left]=\"captionAlignment() === 'left'\"\n [class.align-center]=\"captionAlignment() === 'center'\"\n [class.align-right]=\"captionAlignment() === 'right'\"\n [class.align-justify]=\"captionAlignment() === 'justify'\"\n [ngsHeadlessEditorRuns]=\"captionRuns()\"\n ></figcaption>\n}\n", styles: [":host{display:block}:host .content-html{border-inline-start:var(--spacing, .25rem) solid var(--ngs-color-border);margin:0 0 calc(var(--spacing, .25rem) * 2);padding:calc(var(--spacing, .25rem) * 2) calc(var(--spacing, .25rem) * 3)}:host .caption-html{color:var(--ngs-content-editor-muted-color, var(--ngs-color-on-surface-variant));display:block;font-size:var(--ngs-font-size-sm)}:host .align-left{text-align:left}:host .align-center{text-align:center}:host .align-right{text-align:right}:host .align-justify{text-align:justify}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
4018
4070
|
}], propDecorators: { block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], settings: [{ type: i0.Input, args: [{ isSignal: true, alias: "settings", required: false }] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: false }] }] } });
|
|
4019
4071
|
|
|
4020
4072
|
class ContentEditorTableRenderer {
|
|
@@ -4084,13 +4136,13 @@ class ContentEditorVideoRenderer {
|
|
|
4084
4136
|
height = computed(() => getDimensionAttribute(this.settings()?.height), /* @ts-ignore */
|
|
4085
4137
|
...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
4086
4138
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorVideoRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4087
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ContentEditorVideoRenderer, isStandalone: true, selector: "ngs-content-editor-video-renderer", inputs: { block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ngs-content-editor-video-renderer" }, ngImport: i0, template: "@if (src()) {\n <figure>\n <video\n [src]=\"src()\"\n [attr.width]=\"width()\"\n [attr.height]=\"height()\"\n controls\n ></video>\n @if (caption()) {\n <figcaption>{{ caption() }}</figcaption>\n }\n </figure>\n}\n", styles: [":host{display:block}:host figure{margin:0}:host video{display:block;max-width:100%;height:auto}:host figcaption{margin-top:calc(var(--spacing, .25rem) * 2);color:var(--ngs-color-
|
|
4139
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ContentEditorVideoRenderer, isStandalone: true, selector: "ngs-content-editor-video-renderer", inputs: { block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ngs-content-editor-video-renderer" }, ngImport: i0, template: "@if (src()) {\n <figure>\n <video\n [src]=\"src()\"\n [attr.width]=\"width()\"\n [attr.height]=\"height()\"\n controls\n ></video>\n @if (caption()) {\n <figcaption>{{ caption() }}</figcaption>\n }\n </figure>\n}\n", styles: [":host{display:block}:host figure{margin:0}:host video{display:block;max-width:100%;height:auto}:host figcaption{margin-top:calc(var(--spacing, .25rem) * 2);color:var(--ngs-content-editor-muted-color, var(--ngs-color-on-surface-variant));font-size:var(--ngs-font-size-sm);text-align:center}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4088
4140
|
}
|
|
4089
4141
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorVideoRenderer, decorators: [{
|
|
4090
4142
|
type: Component,
|
|
4091
4143
|
args: [{ selector: 'ngs-content-editor-video-renderer', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
4092
4144
|
'class': 'ngs-content-editor-video-renderer',
|
|
4093
|
-
}, template: "@if (src()) {\n <figure>\n <video\n [src]=\"src()\"\n [attr.width]=\"width()\"\n [attr.height]=\"height()\"\n controls\n ></video>\n @if (caption()) {\n <figcaption>{{ caption() }}</figcaption>\n }\n </figure>\n}\n", styles: [":host{display:block}:host figure{margin:0}:host video{display:block;max-width:100%;height:auto}:host figcaption{margin-top:calc(var(--spacing, .25rem) * 2);color:var(--ngs-color-
|
|
4145
|
+
}, template: "@if (src()) {\n <figure>\n <video\n [src]=\"src()\"\n [attr.width]=\"width()\"\n [attr.height]=\"height()\"\n controls\n ></video>\n @if (caption()) {\n <figcaption>{{ caption() }}</figcaption>\n }\n </figure>\n}\n", styles: [":host{display:block}:host figure{margin:0}:host video{display:block;max-width:100%;height:auto}:host figcaption{margin-top:calc(var(--spacing, .25rem) * 2);color:var(--ngs-content-editor-muted-color, var(--ngs-color-on-surface-variant));font-size:var(--ngs-font-size-sm);text-align:center}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
4094
4146
|
}], propDecorators: { block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], settings: [{ type: i0.Input, args: [{ isSignal: true, alias: "settings", required: false }] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: false }] }] } });
|
|
4095
4147
|
|
|
4096
4148
|
const CONTENT_EDITOR_DEFAULT_RENDERERS = [
|
|
@@ -4196,7 +4248,7 @@ class ContentEditorRenderer {
|
|
|
4196
4248
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4197
4249
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ContentEditorRenderer, isStandalone: true, selector: "ngs-content-editor-renderer", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, blocks: { classPropertyName: "blocks", publicName: "blocks", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ngs-content-editor-renderer prose max-w-full" }, providers: [provideContentEditor(), ContentEditorHtmlSerializer, {
|
|
4198
4250
|
provide: CONTENT_EDITOR_RENDER_CONFIG, useFactory: () => inject(forwardRef(() => ContentEditorRenderer)).resolvedConfig
|
|
4199
|
-
}], exportAs: ["ngsContentEditorRenderer"], ngImport: i0, template: "@for (item of items(); track item.block.id || $index) {\n @if (item.component) {\n <div class=\"block\" [attr.data-block-id]=\"item.block.id\" [attr.data-block-type]=\"item.block.type\">\n <ng-container\n [ngComponentOutlet]=\"item.component\"\n [ngComponentOutletInputs]=\"item.inputs\"\n />\n </div>\n }\n}\n", styles: [":host{--ngs-content-editor-renderer-block-gap: calc(var(--spacing, .25rem) * 4);display:flex;flex-direction:column;gap:var(--ngs-content-editor-renderer-block-gap)}:host .block{min-width:0}:host ::ng-deep a[data-ngs-headless-editor-mark=link]{color:var(--ngs-color-primary);text-decoration:underline;text-underline-offset:.15em}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4251
|
+
}], exportAs: ["ngsContentEditorRenderer"], ngImport: i0, template: "@for (item of items(); track item.block.id || $index) {\n @if (item.component) {\n <div class=\"block\" [attr.data-block-id]=\"item.block.id\" [attr.data-block-type]=\"item.block.type\">\n <ng-container\n [ngComponentOutlet]=\"item.component\"\n [ngComponentOutletInputs]=\"item.inputs\"\n />\n </div>\n }\n}\n", styles: [":host{--ngs-content-editor-renderer-block-gap: calc(var(--spacing, .25rem) * 4);font-size:var(--ngs-content-editor-font-size, var(--ngs-font-size-md));line-height:var(--ngs-content-editor-line-height, 1.6);display:flex;flex-direction:column;gap:var(--ngs-content-editor-renderer-block-gap)}:host .block{min-width:0}:host ::ng-deep a[data-ngs-headless-editor-mark=link]{color:var(--ngs-color-primary);text-decoration:underline;text-underline-offset:.15em}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4200
4252
|
}
|
|
4201
4253
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorRenderer, decorators: [{
|
|
4202
4254
|
type: Component,
|
|
@@ -4206,7 +4258,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
4206
4258
|
NgComponentOutlet,
|
|
4207
4259
|
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
4208
4260
|
'class': 'ngs-content-editor-renderer prose max-w-full',
|
|
4209
|
-
}, template: "@for (item of items(); track item.block.id || $index) {\n @if (item.component) {\n <div class=\"block\" [attr.data-block-id]=\"item.block.id\" [attr.data-block-type]=\"item.block.type\">\n <ng-container\n [ngComponentOutlet]=\"item.component\"\n [ngComponentOutletInputs]=\"item.inputs\"\n />\n </div>\n }\n}\n", styles: [":host{--ngs-content-editor-renderer-block-gap: calc(var(--spacing, .25rem) * 4);display:flex;flex-direction:column;gap:var(--ngs-content-editor-renderer-block-gap)}:host .block{min-width:0}:host ::ng-deep a[data-ngs-headless-editor-mark=link]{color:var(--ngs-color-primary);text-decoration:underline;text-underline-offset:.15em}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
4261
|
+
}, template: "@for (item of items(); track item.block.id || $index) {\n @if (item.component) {\n <div class=\"block\" [attr.data-block-id]=\"item.block.id\" [attr.data-block-type]=\"item.block.type\">\n <ng-container\n [ngComponentOutlet]=\"item.component\"\n [ngComponentOutletInputs]=\"item.inputs\"\n />\n </div>\n }\n}\n", styles: [":host{--ngs-content-editor-renderer-block-gap: calc(var(--spacing, .25rem) * 4);font-size:var(--ngs-content-editor-font-size, var(--ngs-font-size-md));line-height:var(--ngs-content-editor-line-height, 1.6);display:flex;flex-direction:column;gap:var(--ngs-content-editor-renderer-block-gap)}:host .block{min-width:0}:host ::ng-deep a[data-ngs-headless-editor-mark=link]{color:var(--ngs-color-primary);text-decoration:underline;text-underline-offset:.15em}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
4210
4262
|
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], blocks: [{ type: i0.Input, args: [{ isSignal: true, alias: "blocks", required: false }] }] } });
|
|
4211
4263
|
|
|
4212
4264
|
/** One cancellable request per block. Retry only sends failed files again. */
|
|
@@ -4382,4 +4434,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
4382
4434
|
*/
|
|
4383
4435
|
|
|
4384
4436
|
export { contentEditorBlockToHtml as $, ContentEditorAttachmentRenderer as A, BlockSelectionDirective as B, ContentBuilderStore as C, ContentEditorCalloutRenderer as D, ContentEditorCodeRenderer as E, ContentEditorDividerRenderer as F, ContentEditorDraftController as G, ContentEditorEmbedRenderer as H, ContentEditorGalleryRenderer as I, ContentEditorGridRenderer as J, ContentEditorHeadingRenderer as K, ContentEditorHtmlSerializer as L, ContentEditorImageRenderer as M, ContentEditorImportError as N, ContentEditorImporter as O, ContentEditorListRenderer as P, ContentEditorParagraphRenderer as Q, ContentEditorQuoteRenderer as R, ContentEditorRenderer as S, ContentEditorRendererBase as T, ContentEditorTableRenderer as U, ContentEditorToggleRenderer as V, ContentEditorUploadTask as W, ContentEditorVideoRenderer as X, TextSelectionPopupDirective as Y, contentEditorAttachmentToHtml as Z, contentEditorBlockScope as _, CONTENT_BUILDER as a, contentEditorCalloutToHtml as a0, contentEditorCodeToHtml as a1, contentEditorConvertBlock as a2, contentEditorCopyBlocks as a3, contentEditorDividerToHtml as a4, contentEditorEmbedToHtml as a5, contentEditorFromHtml as a6, contentEditorFromJson as a7, contentEditorGalleryToHtml as a8, contentEditorGridToHtml as a9, contentEditorHeadingToHtml as aa, contentEditorImageToHtml as ab, contentEditorListToHtml as ac, contentEditorNativeBlock as ad, contentEditorParagraphToHtml as ae, contentEditorQuoteToHtml as af, contentEditorSliceText as ag, contentEditorTableToHtml as ah, contentEditorToHtml as ai, contentEditorToggleToHtml as aj, contentEditorVideoToHtml as ak, isContentEditorBlockEmpty as al, mergeContentEditorConfig as am, provideContentEditor as an, provideContentEditorConfig as ao, provideContentEditorRenderer as ap, provideContentEditorRenderers as aq, readContentEditorFile as ar, replaceContentEditorCollection as as, contentEditorText as b, cloneContentEditorValue as c, ContentEditorContentEditableDirective as d, CONTENT_EDITOR_BLOCK as e, ContentEditorUploadBlockBase as f, ContentEditorBlockBase as g, contentEditorFileSize as h, contentEditorResourceUrl as i, contentEditorGridSettings as j, findContentEditorBlock as k, emptyGridCell as l, contentEditorCollection as m, contentEditorBlockView as n, contentEditorChildCollections as o, CONTENT_EDITOR_BLOCK_RENDERERS as p, CONTENT_EDITOR_CALLOUT_HTML_STYLES as q, CONTENT_EDITOR_CONFIG as r, CONTENT_EDITOR_CONVERTIBLE_BLOCKS as s, CONTENT_EDITOR_DEFAULT_HTML_CONVERTERS as t, CONTENT_EDITOR_DEFAULT_RENDERERS as u, CONTENT_EDITOR_GALLERY_HTML_STYLES as v, CONTENT_EDITOR_GRID_HTML_STYLES as w, CONTENT_EDITOR_RENDER_CONFIG as x, CommandBarComponent as y, ContentBuilderComponent as z };
|
|
4385
|
-
//# sourceMappingURL=ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-
|
|
4437
|
+
//# sourceMappingURL=ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-B_6Olt0R.mjs.map
|