@ngstarter-ui/components 22.3.4 → 22.3.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.
Files changed (37) hide show
  1. package/fesm2022/{ngstarter-ui-components-content-editor-attachment-block-DEhEH1p7.mjs → ngstarter-ui-components-content-editor-attachment-block-BgKuFsDy.mjs} +2 -2
  2. package/fesm2022/{ngstarter-ui-components-content-editor-attachment-block-DEhEH1p7.mjs.map → ngstarter-ui-components-content-editor-attachment-block-BgKuFsDy.mjs.map} +1 -1
  3. package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-BVmVigRq.mjs → ngstarter-ui-components-content-editor-callout-block-CGTJefVK.mjs} +2 -2
  4. package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-BVmVigRq.mjs.map → ngstarter-ui-components-content-editor-callout-block-CGTJefVK.mjs.map} +1 -1
  5. package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-DAT-0k8D.mjs → ngstarter-ui-components-content-editor-code-block.component-B441NasU.mjs} +6 -4
  6. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-B441NasU.mjs.map +1 -0
  7. package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-CvWe0gj7.mjs → ngstarter-ui-components-content-editor-embed-block-Bo3irEeG.mjs} +2 -2
  8. package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-CvWe0gj7.mjs.map → ngstarter-ui-components-content-editor-embed-block-Bo3irEeG.mjs.map} +1 -1
  9. package/fesm2022/{ngstarter-ui-components-content-editor-gallery-block-BUZHo0tg.mjs → ngstarter-ui-components-content-editor-gallery-block-Cbh0nblW.mjs} +2 -2
  10. package/fesm2022/{ngstarter-ui-components-content-editor-gallery-block-BUZHo0tg.mjs.map → ngstarter-ui-components-content-editor-gallery-block-Cbh0nblW.mjs.map} +1 -1
  11. package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-Wnopwn9N.mjs → ngstarter-ui-components-content-editor-grid-block-BVQTRzaX.mjs} +3 -3
  12. package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-Wnopwn9N.mjs.map → ngstarter-ui-components-content-editor-grid-block-BVQTRzaX.mjs.map} +1 -1
  13. package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-BdNrTdgp.mjs → ngstarter-ui-components-content-editor-heading-block.component-CnbRqEWF.mjs} +2 -2
  14. package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-BdNrTdgp.mjs.map → ngstarter-ui-components-content-editor-heading-block.component-CnbRqEWF.mjs.map} +1 -1
  15. package/fesm2022/{ngstarter-ui-components-content-editor-image-block.component-CY0vNbTB.mjs → ngstarter-ui-components-content-editor-image-block.component-Cv9-02mR.mjs} +2 -2
  16. package/fesm2022/{ngstarter-ui-components-content-editor-image-block.component-CY0vNbTB.mjs.map → ngstarter-ui-components-content-editor-image-block.component-Cv9-02mR.mjs.map} +1 -1
  17. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-yvSNKY0B.mjs +188 -0
  18. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-yvSNKY0B.mjs.map +1 -0
  19. package/fesm2022/{ngstarter-ui-components-content-editor-nested-blocks-cAg6p-80.mjs → ngstarter-ui-components-content-editor-nested-blocks-Clz9SzCR.mjs} +2 -2
  20. package/fesm2022/{ngstarter-ui-components-content-editor-nested-blocks-cAg6p-80.mjs.map → ngstarter-ui-components-content-editor-nested-blocks-Clz9SzCR.mjs.map} +1 -1
  21. package/fesm2022/{ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-67JfJX3V.mjs → ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CZn1p9ek.mjs} +16 -16
  22. package/fesm2022/{ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-67JfJX3V.mjs.map → ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CZn1p9ek.mjs.map} +1 -1
  23. package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-eTzRkEH0.mjs → ngstarter-ui-components-content-editor-paragraph-block.component-CxDRklAS.mjs} +2 -2
  24. package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-eTzRkEH0.mjs.map → ngstarter-ui-components-content-editor-paragraph-block.component-CxDRklAS.mjs.map} +1 -1
  25. package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-5DMAhqu0.mjs → ngstarter-ui-components-content-editor-quote-block.component-BNgtiV7U.mjs} +2 -2
  26. package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-5DMAhqu0.mjs.map → ngstarter-ui-components-content-editor-quote-block.component-BNgtiV7U.mjs.map} +1 -1
  27. package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-CfOtM5sz.mjs → ngstarter-ui-components-content-editor-table-block.component-D05mE7nQ.mjs} +2 -2
  28. package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-CfOtM5sz.mjs.map → ngstarter-ui-components-content-editor-table-block.component-D05mE7nQ.mjs.map} +1 -1
  29. package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-D2ZQIQwO.mjs → ngstarter-ui-components-content-editor-toggle-block-Ch1kWIaX.mjs} +3 -3
  30. package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-D2ZQIQwO.mjs.map → ngstarter-ui-components-content-editor-toggle-block-Ch1kWIaX.mjs.map} +1 -1
  31. package/fesm2022/{ngstarter-ui-components-content-editor-video-block.component-q0pWYQOU.mjs → ngstarter-ui-components-content-editor-video-block.component-laP7DTyq.mjs} +2 -2
  32. package/fesm2022/{ngstarter-ui-components-content-editor-video-block.component-q0pWYQOU.mjs.map → ngstarter-ui-components-content-editor-video-block.component-laP7DTyq.mjs.map} +1 -1
  33. package/fesm2022/ngstarter-ui-components-content-editor.mjs +1 -1
  34. package/package.json +1 -1
  35. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-DAT-0k8D.mjs.map +0 -1
  36. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-BBtOG51W.mjs +0 -235
  37. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-BBtOG51W.mjs.map +0 -1
@@ -2,8 +2,8 @@ import * as i0 from '@angular/core';
2
2
  import { ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { ExpansionPanel, ExpansionPanelHeader, ExpansionPanelTitle } from '@ngstarter-ui/components/expansion';
4
4
  import { SlideToggle } from '@ngstarter-ui/components/slide-toggle';
5
- import { g as ContentEditorBlockBase, d as ContentEditorContentEditableDirective } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-67JfJX3V.mjs';
6
- import { C as ContentEditorNestedBlocks } from './ngstarter-ui-components-content-editor-nested-blocks-cAg6p-80.mjs';
5
+ import { g as ContentEditorBlockBase, d as ContentEditorContentEditableDirective } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CZn1p9ek.mjs';
6
+ import { C as ContentEditorNestedBlocks } from './ngstarter-ui-components-content-editor-nested-blocks-Clz9SzCR.mjs';
7
7
 
8
8
  class ContentEditorToggleBlock extends ContentEditorBlockBase {
9
9
  changeTitle(title) { this.save({ ...this.latestContent(), title }); }
@@ -17,4 +17,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
17
17
  }] });
18
18
 
19
19
  export { ContentEditorToggleBlock };
20
- //# sourceMappingURL=ngstarter-ui-components-content-editor-toggle-block-D2ZQIQwO.mjs.map
20
+ //# sourceMappingURL=ngstarter-ui-components-content-editor-toggle-block-Ch1kWIaX.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngstarter-ui-components-content-editor-toggle-block-D2ZQIQwO.mjs","sources":["../../../projects/components/content-editor/src/_builder/toggle-block/toggle-block.ts","../../../projects/components/content-editor/src/_builder/toggle-block/toggle-block.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { ExpansionPanel, ExpansionPanelHeader, ExpansionPanelTitle } from '@ngstarter-ui/components/expansion';\nimport { SlideToggle } from '@ngstarter-ui/components/slide-toggle';\nimport { ContentEditorBlockBase } from '../block-base';\nimport { ContentEditorNestedBlocks } from '../nested-blocks/nested-blocks';\nimport { ContentEditorContentEditableDirective } from '../../content-editor-content-editable.directive';\nimport { ContentEditorText, ContentEditorToggleContent, ContentEditorToggleSettings } from '../../types';\n\n@Component({\n selector: 'ngs-content-editor-toggle-block',\n imports: [ExpansionPanel, ExpansionPanelHeader, ExpansionPanelTitle, SlideToggle, ContentEditorNestedBlocks, ContentEditorContentEditableDirective],\n templateUrl: './toggle-block.html', styleUrl: './toggle-block.scss', changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ContentEditorToggleBlock extends ContentEditorBlockBase<ContentEditorToggleContent, ContentEditorToggleSettings> {\n changeTitle(title: ContentEditorText): void { this.save({ ...this.latestContent(), title }); }\n changeExpanded(expanded: boolean): void { this.save(this.latestContent(), { ...this.settings(), expanded }); }\n}\n","<ngs-expansion-panel [expanded]=\"true\">\n <ngs-expansion-panel-header><ngs-expansion-panel-title>\n <div [ngsContentEditorContentEditable]=\"content().title\" (contentChanged)=\"changeTitle($event)\"\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\" data-empty-placeholder=\"Toggle title…\"></div>\n </ngs-expansion-panel-title></ngs-expansion-panel-header>\n <div class=\"flex flex-col gap-3 py-3\">\n <ngs-slide-toggle [checked]=\"settings().expanded\" (change)=\"changeExpanded($event.checked)\">Expanded by default</ngs-slide-toggle>\n <ngs-content-editor-nested-blocks [scope]=\"{parentId: id()}\"/>\n </div>\n</ngs-expansion-panel>\n"],"names":[],"mappings":";;;;;;;AAaM,MAAO,wBAAyB,SAAQ,sBAA+E,CAAA;AAC3H,IAAA,WAAW,CAAC,KAAwB,EAAA,EAAU,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAC7F,cAAc,CAAC,QAAiB,EAAA,EAAU,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,a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AAA,eAAA,EAAA,UAAA,EAAA,UAAA,EAAA,OAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,EAAA,eAAA,EAAA,QAAA,EAAA,cAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,yBAAyB,gGAAE,qCAAqC,EAAA,QAAA,EAAA,mCAAA,EAAA,MAAA,EAAA,CAAA,iCAAA,EAAA,UAAA,EAAA,OAAA,EAAA,YAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,EAAA,cAAA,EAAA,cAAA,EAAA,aAAA,CAAA,EAAA,QAAA,EAAA,CAAA,iCAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAGvI,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBALpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iCAAiC,WAClC,CAAC,cAAc,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,WAAW,EAAE,yBAAyB,EAAE,qCAAqC,CAAC,EAAA,eAAA,EAC7D,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,srBAAA,EAAA,MAAA,EAAA,CAAA,0pBAAA,CAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"ngstarter-ui-components-content-editor-toggle-block-Ch1kWIaX.mjs","sources":["../../../projects/components/content-editor/src/_builder/toggle-block/toggle-block.ts","../../../projects/components/content-editor/src/_builder/toggle-block/toggle-block.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { ExpansionPanel, ExpansionPanelHeader, ExpansionPanelTitle } from '@ngstarter-ui/components/expansion';\nimport { SlideToggle } from '@ngstarter-ui/components/slide-toggle';\nimport { ContentEditorBlockBase } from '../block-base';\nimport { ContentEditorNestedBlocks } from '../nested-blocks/nested-blocks';\nimport { ContentEditorContentEditableDirective } from '../../content-editor-content-editable.directive';\nimport { ContentEditorText, ContentEditorToggleContent, ContentEditorToggleSettings } from '../../types';\n\n@Component({\n selector: 'ngs-content-editor-toggle-block',\n imports: [ExpansionPanel, ExpansionPanelHeader, ExpansionPanelTitle, SlideToggle, ContentEditorNestedBlocks, ContentEditorContentEditableDirective],\n templateUrl: './toggle-block.html', styleUrl: './toggle-block.scss', changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ContentEditorToggleBlock extends ContentEditorBlockBase<ContentEditorToggleContent, ContentEditorToggleSettings> {\n changeTitle(title: ContentEditorText): void { this.save({ ...this.latestContent(), title }); }\n changeExpanded(expanded: boolean): void { this.save(this.latestContent(), { ...this.settings(), expanded }); }\n}\n","<ngs-expansion-panel [expanded]=\"true\">\n <ngs-expansion-panel-header><ngs-expansion-panel-title>\n <div [ngsContentEditorContentEditable]=\"content().title\" (contentChanged)=\"changeTitle($event)\"\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\" data-empty-placeholder=\"Toggle title…\"></div>\n </ngs-expansion-panel-title></ngs-expansion-panel-header>\n <div class=\"flex flex-col gap-3 py-3\">\n <ngs-slide-toggle [checked]=\"settings().expanded\" (change)=\"changeExpanded($event.checked)\">Expanded by default</ngs-slide-toggle>\n <ngs-content-editor-nested-blocks [scope]=\"{parentId: id()}\"/>\n </div>\n</ngs-expansion-panel>\n"],"names":[],"mappings":";;;;;;;AAaM,MAAO,wBAAyB,SAAQ,sBAA+E,CAAA;AAC3H,IAAA,WAAW,CAAC,KAAwB,EAAA,EAAU,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAC7F,cAAc,CAAC,QAAiB,EAAA,EAAU,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,CA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,EAAA,CAAA,gBAAA,EAAA,eAAA,EAAA,QAAA,EAAA,cAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,yBAAyB,gGAAE,qCAAqC,EAAA,QAAA,EAAA,mCAAA,EAAA,MAAA,EAAA,CAAA,iCAAA,EAAA,UAAA,EAAA,OAAA,EAAA,YAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,EAAA,cAAA,EAAA,cAAA,EAAA,aAAA,CAAA,EAAA,QAAA,EAAA,CAAA,iCAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAGvI,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBALpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iCAAiC,WAClC,CAAC,cAAc,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,WAAW,EAAE,yBAAyB,EAAE,qCAAqC,CAAC,EAAA,eAAA,EAC7D,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,srBAAA,EAAA,MAAA,EAAA,CAAA,0pBAAA,CAAA,EAAA;;;;;"}
@@ -1,4 +1,4 @@
1
- import { f as ContentEditorUploadBlockBase, e as CONTENT_EDITOR_BLOCK } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-67JfJX3V.mjs';
1
+ import { f as ContentEditorUploadBlockBase, e as CONTENT_EDITOR_BLOCK } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CZn1p9ek.mjs';
2
2
  import { C as ContentEditorUploadStatus } from './ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs';
3
3
  import * as i0 from '@angular/core';
4
4
  import { signal, model, viewChild, effect, untracked, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
@@ -131,4 +131,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
131
131
  }], ctorParameters: () => [], propDecorators: { _caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "_caption", required: false }] }, { type: i0.Output, args: ["_captionChange"] }], _settings: [{ type: i0.Input, args: [{ isSignal: true, alias: "_settings", required: false }] }, { type: i0.Output, args: ["_settingsChange"] }], videoElement: [{ type: i0.ViewChild, args: ['videoPlayer', { isSignal: true }] }] } });
132
132
 
133
133
  export { VideoBlockComponent };
134
- //# sourceMappingURL=ngstarter-ui-components-content-editor-video-block.component-q0pWYQOU.mjs.map
134
+ //# sourceMappingURL=ngstarter-ui-components-content-editor-video-block.component-laP7DTyq.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngstarter-ui-components-content-editor-video-block.component-q0pWYQOU.mjs","sources":["../../../projects/components/content-editor/src/_builder/video-block/video-block.component.ts","../../../projects/components/content-editor/src/_builder/video-block/video-block.component.html"],"sourcesContent":["import { ContentEditorUploadBlockBase } from '../upload-block-base';\nimport { ContentEditorUploadStatus } from '../upload-status/upload-status';\nimport { ChangeDetectionStrategy, Component, effect, untracked, forwardRef, model, OnInit, signal, viewChild, ElementRef } from '@angular/core';\nimport { UploadArea, UploadFileSelectedEvent, UploadTriggerDirective } from '@ngstarter-ui/components/upload';\nimport {\n CONTENT_EDITOR_BLOCK,\n ContentEditorVideoBlockSettings,\n ContentEditorVideoContent\n} from '../../types';\nimport { FormField, Label } from '@ngstarter-ui/components/form-field';\nimport { Input } from '@ngstarter-ui/components/input';\nimport { FormsModule } from '@angular/forms';\nimport { ResizableContainer } from '@ngstarter-ui/components/resizable-container';\n\n@Component({\n selector: 'ngs-video-block',\n imports: [\n ContentEditorUploadStatus,\n UploadArea,\n UploadTriggerDirective,\n FormField,\n Input,\n FormsModule,\n Label,\n ResizableContainer\n ],\n providers: [\n {\n provide: CONTENT_EDITOR_BLOCK,\n useExisting: forwardRef(() => VideoBlockComponent),\n multi: true\n }\n ],\n templateUrl: './video-block.component.html',\n styleUrl: './video-block.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(keypress)': 'handleKeyPress($event)',\n 'class': 'block'\n }\n})\nexport class VideoBlockComponent extends ContentEditorUploadBlockBase<ContentEditorVideoContent, ContentEditorVideoBlockSettings> implements OnInit {\n\n protected _src = signal<string>('');\n protected _caption = model<string>('');\n protected _orientation = signal<'portrait' | 'landscape'>('landscape');\n protected _settings = model<ContentEditorVideoBlockSettings>({});\n\n readonly videoElement = viewChild<ElementRef<HTMLVideoElement>>('videoPlayer');\n\n private _aspectRatio = 16 / 9;\n\n constructor() {\n super();\n effect(() => {\n const content = this.content();\n const settings = this.settings();\n untracked(() => {\n this._src.set(content.src);\n this._caption.set(content.caption);\n this._orientation.set(content.orientation || 'landscape');\n this._settings.set({ ...settings });\n });\n });\n }\n\n ngOnInit() {\n this._src.set(this.content().src);\n this._caption.set(this.content().caption);\n this._orientation.set(this.content().orientation || 'landscape');\n this._settings.set(this.settings() || {});\n }\n\n override focus() {\n if (this._src()) {\n this.builder.focusBlock(this.id());\n }\n }\n\n override getData(): any {\n return {\n content: {\n src: this._src(),\n caption: this._caption(),\n orientation: this._orientation()\n },\n settings: {\n ...this._settings(),\n }\n };\n }\n\n override isEmpty(): boolean {\n const src = this.getData().content.src;\n return typeof src === 'string' ? src.trim().length === 0 : !src;\n }\n\n protected onFileSelected(event: UploadFileSelectedEvent): Promise<void> {\n return this.uploadFiles('video', { files: event.files.slice(0, 1), accept: file => file.type.startsWith('video/'), apply: results => {\n this._src.set(results[0].url);\n this.update();\n } });\n }\n\n protected _onCaptionChange() {\n this.update();\n }\n\n protected _onVideoResized(event: { width: number }) {\n let width = event.width;\n if (width > 704) {\n width = 704;\n }\n const height = Math.round(width / this._aspectRatio);\n\n this._settings.update(s => ({\n ...s,\n width,\n height\n }));\n\n this.update();\n }\n\n protected _onVideoLoaded(event: any) {\n const video = event.target as HTMLVideoElement;\n this._aspectRatio = video.videoWidth / video.videoHeight;\n }\n\n protected handleKeyPress(event: KeyboardEvent) {\n if (event.key === 'Enter') {\n event.preventDefault();\n event.stopPropagation();\n this.builder.insertEmptyBlock(this.index());\n }\n }\n\n private update() {\n this.store.updateBlock(this.id(), {...this.getData(), isEmpty: this.isEmpty()});\n this.builder.emitContentChangeEvent();\n }\n}\n","<ngs-content-editor-upload-status [task]=\"uploadTask\"/>\n@if (_src()) {\n <div class=\"flex items-center justify-center overflow-hidden\">\n <ngs-resizable-container (resized)=\"_onVideoResized($event)\"\n [style.width.px]=\"_settings().width || null\"\n [style.height.px]=\"_settings().height || null\"\n [class.max-w-full]=\"!_settings().width\">\n <video #videoPlayer\n [src]=\"_src()\"\n class=\"w-full h-auto block\"\n (loadedmetadata)=\"_onVideoLoaded($event)\"\n controls></video>\n </ngs-resizable-container>\n </div>\n <ngs-form-field class=\"w-full mt-5\">\n <ngs-label>Caption</ngs-label>\n <input ngsInput [(ngModel)]=\"_caption\" (ngModelChange)=\"_onCaptionChange()\">\n </ngs-form-field>\n} @else if (!uploading()) {\n <ngs-upload-area #uploadArea=\"ngsUploadArea\"\n ngsUploadTrigger accept=\"video/*\"\n (fileSelected)=\"onFileSelected($event)\" multiple=\"false\"\n class=\"cursor-pointer hover:outline-2 hover:outline-[var(--color-primary)]\">\n @if (!uploadArea.api.isDropActive) {\n Drag & drop video here or click to upload\n } @else {\n <div class=\"font-medium\">Drop video here</div>\n }\n </ngs-upload-area>\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAyCM,MAAO,mBAAoB,SAAQ,4BAAwF,CAAA;IAErH,IAAI,GAAG,MAAM,CAAS,EAAE;6EAAC;IACzB,QAAQ,GAAG,KAAK,CAAS,EAAE;iFAAC;IAC5B,YAAY,GAAG,MAAM,CAA2B,WAAW;qFAAC;IAC5D,SAAS,GAAG,KAAK,CAAkC,EAAE;kFAAC;IAEvD,YAAY,GAAG,SAAS,CAA+B,aAAa;qFAAC;AAEtE,IAAA,YAAY,GAAG,EAAE,GAAG,CAAC;AAE7B,IAAA,WAAA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AW,EAAE,UAAU,CAAC,yBAAyB,CAAC;AAClD,4BAAA,KAAK,EAAE;AACR;qBACF,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,YAAY,EAAE,wBAAwB;AACtC,wBAAA,OAAO,EAAE;AACV,qBAAA,EAAA,QAAA,EAAA,01CAAA,EAAA,MAAA,EAAA,CAAA,+MAAA,CAAA,EAAA;qYAS+D,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
1
+ {"version":3,"file":"ngstarter-ui-components-content-editor-video-block.component-laP7DTyq.mjs","sources":["../../../projects/components/content-editor/src/_builder/video-block/video-block.component.ts","../../../projects/components/content-editor/src/_builder/video-block/video-block.component.html"],"sourcesContent":["import { ContentEditorUploadBlockBase } from '../upload-block-base';\nimport { ContentEditorUploadStatus } from '../upload-status/upload-status';\nimport { ChangeDetectionStrategy, Component, effect, untracked, forwardRef, model, OnInit, signal, viewChild, ElementRef } from '@angular/core';\nimport { UploadArea, UploadFileSelectedEvent, UploadTriggerDirective } from '@ngstarter-ui/components/upload';\nimport {\n CONTENT_EDITOR_BLOCK,\n ContentEditorVideoBlockSettings,\n ContentEditorVideoContent\n} from '../../types';\nimport { FormField, Label } from '@ngstarter-ui/components/form-field';\nimport { Input } from '@ngstarter-ui/components/input';\nimport { FormsModule } from '@angular/forms';\nimport { ResizableContainer } from '@ngstarter-ui/components/resizable-container';\n\n@Component({\n selector: 'ngs-video-block',\n imports: [\n ContentEditorUploadStatus,\n UploadArea,\n UploadTriggerDirective,\n FormField,\n Input,\n FormsModule,\n Label,\n ResizableContainer\n ],\n providers: [\n {\n provide: CONTENT_EDITOR_BLOCK,\n useExisting: forwardRef(() => VideoBlockComponent),\n multi: true\n }\n ],\n templateUrl: './video-block.component.html',\n styleUrl: './video-block.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(keypress)': 'handleKeyPress($event)',\n 'class': 'block'\n }\n})\nexport class VideoBlockComponent extends ContentEditorUploadBlockBase<ContentEditorVideoContent, ContentEditorVideoBlockSettings> implements OnInit {\n\n protected _src = signal<string>('');\n protected _caption = model<string>('');\n protected _orientation = signal<'portrait' | 'landscape'>('landscape');\n protected _settings = model<ContentEditorVideoBlockSettings>({});\n\n readonly videoElement = viewChild<ElementRef<HTMLVideoElement>>('videoPlayer');\n\n private _aspectRatio = 16 / 9;\n\n constructor() {\n super();\n effect(() => {\n const content = this.content();\n const settings = this.settings();\n untracked(() => {\n this._src.set(content.src);\n this._caption.set(content.caption);\n this._orientation.set(content.orientation || 'landscape');\n this._settings.set({ ...settings });\n });\n });\n }\n\n ngOnInit() {\n this._src.set(this.content().src);\n this._caption.set(this.content().caption);\n this._orientation.set(this.content().orientation || 'landscape');\n this._settings.set(this.settings() || {});\n }\n\n override focus() {\n if (this._src()) {\n this.builder.focusBlock(this.id());\n }\n }\n\n override getData(): any {\n return {\n content: {\n src: this._src(),\n caption: this._caption(),\n orientation: this._orientation()\n },\n settings: {\n ...this._settings(),\n }\n };\n }\n\n override isEmpty(): boolean {\n const src = this.getData().content.src;\n return typeof src === 'string' ? src.trim().length === 0 : !src;\n }\n\n protected onFileSelected(event: UploadFileSelectedEvent): Promise<void> {\n return this.uploadFiles('video', { files: event.files.slice(0, 1), accept: file => file.type.startsWith('video/'), apply: results => {\n this._src.set(results[0].url);\n this.update();\n } });\n }\n\n protected _onCaptionChange() {\n this.update();\n }\n\n protected _onVideoResized(event: { width: number }) {\n let width = event.width;\n if (width > 704) {\n width = 704;\n }\n const height = Math.round(width / this._aspectRatio);\n\n this._settings.update(s => ({\n ...s,\n width,\n height\n }));\n\n this.update();\n }\n\n protected _onVideoLoaded(event: any) {\n const video = event.target as HTMLVideoElement;\n this._aspectRatio = video.videoWidth / video.videoHeight;\n }\n\n protected handleKeyPress(event: KeyboardEvent) {\n if (event.key === 'Enter') {\n event.preventDefault();\n event.stopPropagation();\n this.builder.insertEmptyBlock(this.index());\n }\n }\n\n private update() {\n this.store.updateBlock(this.id(), {...this.getData(), isEmpty: this.isEmpty()});\n this.builder.emitContentChangeEvent();\n }\n}\n","<ngs-content-editor-upload-status [task]=\"uploadTask\"/>\n@if (_src()) {\n <div class=\"flex items-center justify-center overflow-hidden\">\n <ngs-resizable-container (resized)=\"_onVideoResized($event)\"\n [style.width.px]=\"_settings().width || null\"\n [style.height.px]=\"_settings().height || null\"\n [class.max-w-full]=\"!_settings().width\">\n <video #videoPlayer\n [src]=\"_src()\"\n class=\"w-full h-auto block\"\n (loadedmetadata)=\"_onVideoLoaded($event)\"\n controls></video>\n </ngs-resizable-container>\n </div>\n <ngs-form-field class=\"w-full mt-5\">\n <ngs-label>Caption</ngs-label>\n <input ngsInput [(ngModel)]=\"_caption\" (ngModelChange)=\"_onCaptionChange()\">\n </ngs-form-field>\n} @else if (!uploading()) {\n <ngs-upload-area #uploadArea=\"ngsUploadArea\"\n ngsUploadTrigger accept=\"video/*\"\n (fileSelected)=\"onFileSelected($event)\" multiple=\"false\"\n class=\"cursor-pointer hover:outline-2 hover:outline-[var(--color-primary)]\">\n @if (!uploadArea.api.isDropActive) {\n Drag & drop video here or click to upload\n } @else {\n <div class=\"font-medium\">Drop video here</div>\n }\n </ngs-upload-area>\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAyCM,MAAO,mBAAoB,SAAQ,4BAAwF,CAAA;IAErH,IAAI,GAAG,MAAM,CAAS,EAAE;6EAAC;IACzB,QAAQ,GAAG,KAAK,CAAS,EAAE;iFAAC;IAC5B,YAAY,GAAG,MAAM,CAA2B,WAAW;qFAAC;IAC5D,SAAS,GAAG,KAAK,CAAkC,EAAE;kFAAC;IAEvD,YAAY,GAAG,SAAS,CAA+B,aAAa;qFAAC;AAEtE,IAAA,YAAY,GAAG,EAAE,GAAG,CAAC;AAE7B,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QACP,MAAM,CAAC,MAAK;AACV,YAAA,MAA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BACF,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,YAAY,EAAE,wBAAwB;AACtC,wBAAA,OAAO,EAAE;AACV,qBAAA,EAAA,QAAA,EAAA,01CAAA,EAAA,MAAA,EAAA,CAAA,+MAAA,CAAA,EAAA;qYAS+D,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
@@ -1,2 +1,2 @@
1
- export { B as BlockSelectionDirective, a as CONTENT_BUILDER, e as CONTENT_EDITOR_BLOCK, p as CONTENT_EDITOR_BLOCK_RENDERERS, q as CONTENT_EDITOR_CALLOUT_HTML_STYLES, r as CONTENT_EDITOR_CONFIG, s as CONTENT_EDITOR_CONVERTIBLE_BLOCKS, t as CONTENT_EDITOR_DEFAULT_HTML_CONVERTERS, u as CONTENT_EDITOR_DEFAULT_RENDERERS, v as CONTENT_EDITOR_GALLERY_HTML_STYLES, w as CONTENT_EDITOR_GRID_HTML_STYLES, x as CONTENT_EDITOR_RENDER_CONFIG, y as CommandBarComponent, z as ContentBuilderComponent, A as ContentEditorAttachmentRenderer, g as ContentEditorBlockBase, D as ContentEditorCalloutRenderer, E as ContentEditorCodeRenderer, F as ContentEditorDividerRenderer, G as ContentEditorDraftController, H as ContentEditorEmbedRenderer, I as ContentEditorGalleryRenderer, J as ContentEditorGridRenderer, K as ContentEditorHeadingRenderer, L as ContentEditorHtmlSerializer, M as ContentEditorImageRenderer, N as ContentEditorImportError, O as ContentEditorImporter, P as ContentEditorListRenderer, Q as ContentEditorParagraphRenderer, R as ContentEditorQuoteRenderer, S as ContentEditorRenderer, T as ContentEditorRendererBase, U as ContentEditorTableRenderer, V as ContentEditorToggleRenderer, f as ContentEditorUploadBlockBase, W as ContentEditorUploadTask, X as ContentEditorVideoRenderer, Y as TextSelectionPopupDirective, c as cloneContentEditorValue, Z as contentEditorAttachmentToHtml, _ as contentEditorBlockScope, $ as contentEditorBlockToHtml, n as contentEditorBlockView, a0 as contentEditorCalloutToHtml, o as contentEditorChildCollections, a1 as contentEditorCodeToHtml, m as contentEditorCollection, a2 as contentEditorConvertBlock, a3 as contentEditorCopyBlocks, a4 as contentEditorDividerToHtml, a5 as contentEditorEmbedToHtml, h as contentEditorFileSize, a6 as contentEditorFromHtml, a7 as contentEditorFromJson, a8 as contentEditorGalleryToHtml, a9 as contentEditorGridToHtml, aa as contentEditorHeadingToHtml, ab as contentEditorImageToHtml, ac as contentEditorListToHtml, ad as contentEditorNativeBlock, ae as contentEditorParagraphToHtml, af as contentEditorQuoteToHtml, i as contentEditorResourceUrl, ag as contentEditorSliceText, ah as contentEditorTableToHtml, b as contentEditorText, ai as contentEditorToHtml, aj as contentEditorToggleToHtml, ak as contentEditorVideoToHtml, k as findContentEditorBlock, al as isContentEditorBlockEmpty, am as mergeContentEditorConfig, an as provideContentEditor, ao as provideContentEditorConfig, ap as provideContentEditorRenderer, aq as provideContentEditorRenderers, ar as readContentEditorFile, as as replaceContentEditorCollection } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-67JfJX3V.mjs';
1
+ export { B as BlockSelectionDirective, a as CONTENT_BUILDER, e as CONTENT_EDITOR_BLOCK, p as CONTENT_EDITOR_BLOCK_RENDERERS, q as CONTENT_EDITOR_CALLOUT_HTML_STYLES, r as CONTENT_EDITOR_CONFIG, s as CONTENT_EDITOR_CONVERTIBLE_BLOCKS, t as CONTENT_EDITOR_DEFAULT_HTML_CONVERTERS, u as CONTENT_EDITOR_DEFAULT_RENDERERS, v as CONTENT_EDITOR_GALLERY_HTML_STYLES, w as CONTENT_EDITOR_GRID_HTML_STYLES, x as CONTENT_EDITOR_RENDER_CONFIG, y as CommandBarComponent, z as ContentBuilderComponent, A as ContentEditorAttachmentRenderer, g as ContentEditorBlockBase, D as ContentEditorCalloutRenderer, E as ContentEditorCodeRenderer, F as ContentEditorDividerRenderer, G as ContentEditorDraftController, H as ContentEditorEmbedRenderer, I as ContentEditorGalleryRenderer, J as ContentEditorGridRenderer, K as ContentEditorHeadingRenderer, L as ContentEditorHtmlSerializer, M as ContentEditorImageRenderer, N as ContentEditorImportError, O as ContentEditorImporter, P as ContentEditorListRenderer, Q as ContentEditorParagraphRenderer, R as ContentEditorQuoteRenderer, S as ContentEditorRenderer, T as ContentEditorRendererBase, U as ContentEditorTableRenderer, V as ContentEditorToggleRenderer, f as ContentEditorUploadBlockBase, W as ContentEditorUploadTask, X as ContentEditorVideoRenderer, Y as TextSelectionPopupDirective, c as cloneContentEditorValue, Z as contentEditorAttachmentToHtml, _ as contentEditorBlockScope, $ as contentEditorBlockToHtml, n as contentEditorBlockView, a0 as contentEditorCalloutToHtml, o as contentEditorChildCollections, a1 as contentEditorCodeToHtml, m as contentEditorCollection, a2 as contentEditorConvertBlock, a3 as contentEditorCopyBlocks, a4 as contentEditorDividerToHtml, a5 as contentEditorEmbedToHtml, h as contentEditorFileSize, a6 as contentEditorFromHtml, a7 as contentEditorFromJson, a8 as contentEditorGalleryToHtml, a9 as contentEditorGridToHtml, aa as contentEditorHeadingToHtml, ab as contentEditorImageToHtml, ac as contentEditorListToHtml, ad as contentEditorNativeBlock, ae as contentEditorParagraphToHtml, af as contentEditorQuoteToHtml, i as contentEditorResourceUrl, ag as contentEditorSliceText, ah as contentEditorTableToHtml, b as contentEditorText, ai as contentEditorToHtml, aj as contentEditorToggleToHtml, ak as contentEditorVideoToHtml, k as findContentEditorBlock, al as isContentEditorBlockEmpty, am as mergeContentEditorConfig, an as provideContentEditor, ao as provideContentEditorConfig, ap as provideContentEditorRenderer, aq as provideContentEditorRenderers, ar as readContentEditorFile, as as replaceContentEditorCollection } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CZn1p9ek.mjs';
2
2
  //# sourceMappingURL=ngstarter-ui-components-content-editor.mjs.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ngstarter-ui/components",
3
3
  "description": "NgStarter - AI-friendly Enterprise Angular UI Components and Admin Panel",
4
- "version": "22.3.4",
4
+ "version": "22.3.6",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/elementarlabsdev/ngstarter.git"
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngstarter-ui-components-content-editor-code-block.component-DAT-0k8D.mjs","sources":["../../../projects/components/content-editor/src/_builder/code-block/code-block.component.ts","../../../projects/components/content-editor/src/_builder/code-block/code-block.component.html"],"sourcesContent":["import { NgsHeadlessEditorText, createNgsHeadlessEditorText } from '@ngstarter-ui/components/headless-editor';\nimport { contentEditorText } from '../../document';\nimport {\n ChangeDetectionStrategy,\n Component, effect, untracked,\n DestroyRef,\n ElementRef, forwardRef,\n inject,\n input, OnDestroy,\n OnInit,\n signal,\n viewChild\n} from '@angular/core';\nimport {\n CONTENT_BUILDER,\n CONTENT_EDITOR_BLOCK,\n ContentEditorDataBlock\n} from '../../types';\nimport { ContentBuilderStore } from '../../content-builder.store';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { EditorView, keymap, ViewUpdate } from '@codemirror/view';\nimport { basicSetup } from 'codemirror';\nimport { Compartment, Prec } from '@codemirror/state';\nimport { Menu, MenuItem, MenuTrigger } from '@ngstarter-ui/components/menu';\nimport { Button } from '@ngstarter-ui/components/button';\nimport { githubLight } from '@uiw/codemirror-theme-github';\nimport { indentWithTab } from \"@codemirror/commands\"\nimport { ContentBuilderComponent } from '../../content-builder/content-builder.component';\nimport { DOCUMENT } from '@angular/common';\n\nexport interface ContentEditorCodeBlockSettings {\n language: string;\n}\n\nexport interface ContentEditorCodeLanguage {\n language: string;\n name: string;\n library: () => Promise<any>;\n}\n\n@Component({\n selector: 'ngs-code-block',\n imports: [\n Menu,\n MenuItem,\n MenuTrigger,\n Button\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './code-block.component.html',\n styleUrl: './code-block.component.scss',\n providers: [\n {\n provide: CONTENT_EDITOR_BLOCK,\n useExisting: forwardRef(() => CodeBlockComponent),\n multi: true\n }\n ],\n host: {\n 'class': 'ngs-code-block',\n }\n})\nexport class CodeBlockComponent implements OnInit, OnDestroy, ContentEditorDataBlock {\n private _store = inject(ContentBuilderStore);\n private _contentBuilder = inject<ContentBuilderComponent>(CONTENT_BUILDER);\n private _destroyRef = inject(DestroyRef);\n private document = inject(DOCUMENT);\n\n private _contentRef = viewChild.required<ElementRef<HTMLParagraphElement>>('contentRef');\n\n id = input.required<string>();\n content = input.required<readonly NgsHeadlessEditorText[]>();\n settings = input.required<ContentEditorCodeBlockSettings>();\n index = input.required<number>();\n props = input<unknown[]>([]);\n placeholder = input('Write your code here');\n\n protected _languageList = signal<ContentEditorCodeLanguage[]>([\n {\n language: 'none',\n name: 'None',\n library: () => new Promise(() => {})\n },\n {\n language: 'angular',\n name: 'Angular',\n library: () => import('@codemirror/lang-angular').then(lang => lang.angular())\n },\n {\n language: 'javascript',\n name: 'JavaScript',\n library: () => import('@codemirror/lang-javascript').then(lang => lang.javascript())\n },\n {\n language: 'typescript',\n name: 'TypeScript',\n library: () => import('@codemirror/lang-javascript').then(lang => lang.javascript({ typescript: true }))\n },\n {\n language: 'html',\n name: 'HTML',\n library: () => import('@codemirror/lang-html').then(lang => lang.html())\n },\n {\n language: 'css',\n name: 'CSS',\n library: () => import('@codemirror/lang-css').then(lang => lang.css())\n },\n {\n language: 'sass',\n name: 'Sass',\n library: () => import('@codemirror/lang-sass').then(lang => lang.sass())\n },\n {\n language: 'json',\n name: 'JSON',\n library: () => import('@codemirror/lang-json').then(lang => lang.json())\n }\n ]);\n protected _code = signal<string>('');\n protected _language = signal<ContentEditorCodeLanguage>(this._languageList()[0]);\n protected _isEmpty = signal<boolean>(true);\n\n private _editorView!: EditorView;\n private _editorLanguage = new Compartment();\n readonly initialized = signal(false);\n\n private restoring = false;\n\n constructor() {\n effect(() => {\n const content = this.content();\n const settings = this.settings();\n untracked(() => {\n if (!this._editorView) return;\n const code = contentEditorText(content);\n this.restoring = true;\n try {\n if (this._editorView.state.doc.toString() !== code) {\n this._editorView.dispatch({ changes: { from: 0, to: this._editorView.state.doc.length, insert: code } });\n }\n const language = this._languageList().find(item => item.language === settings.language);\n if (language && this._language().language !== language.language) {\n void this.selectLanguage(language, false);\n }\n } finally { this.restoring = false; }\n });\n });\n }\n\n async ngOnInit() {\n const codeLanguage = this._languageList().find(\n codeLanguage => codeLanguage.language === this.settings().language\n );\n\n if (codeLanguage) {\n this._language.set(codeLanguage);\n }\n\n this._code.set(contentEditorText(this.content()));\n this._isEmpty.set(this._code().trim().length === 0);\n this._contentBuilder\n .focusChanged\n .pipe(takeUntilDestroyed(this._destroyRef))\n .subscribe(() => {\n if (this._store.focusedBlockId() === this.id()) {\n this.focus();\n }\n });\n this._editorView = new EditorView({\n doc: this._code(),\n parent: this._contentRef().nativeElement,\n extensions: [\n basicSetup,\n githubLight,\n Prec.highest(keymap.of([\n { key: 'Mod-z', run: () => this._store.editor.undo() },\n { key: 'Mod-Shift-z', run: () => this._store.editor.redo() },\n { key: 'Mod-y', run: () => this._store.editor.redo() },\n indentWithTab\n ])),\n this._editorLanguage.of([]),\n EditorView.updateListener.of((v: ViewUpdate) => {\n if (v.docChanged && !this.restoring) {\n this._store.withTextEdit('keyboard', `code:${this.id()}`, () => this.update());\n }\n })\n ],\n });\n await this.selectLanguage(this._language(), false);\n this._editorView.contentDOM.style.width = '0';\n this._editorView.focus();\n this.initialized.set(true);\n }\n\n ngOnDestroy() {\n this._editorView.destroy();\n }\n\n focus() {\n this._editorView.focus();\n }\n\n getData(): any {\n return {\n content: [createNgsHeadlessEditorText(this._editorView.state.doc.toString())],\n settings: {\n ...this.settings(),\n language: this._language().language\n }\n };\n }\n\n isEmpty(): boolean {\n return this._editorView.state.doc.toString().trim().length === 0;\n }\n\n protected async selectLanguage(codeLanguage: ContentEditorCodeLanguage, persist = true) {\n this._language.set(codeLanguage);\n\n if (codeLanguage.language === 'none') {\n this._editorView.dispatch({\n effects: this._editorLanguage.reconfigure([])\n });\n } else {\n const language = await this._language().library();\n this._editorView.dispatch({\n effects: this._editorLanguage.reconfigure(language)\n });\n }\n\n if (persist) this.update();\n }\n\n private update() {\n this._store.updateBlock(this.id(), {...this.getData(), isEmpty: this.isEmpty()});\n this._contentBuilder.emitContentChangeEvent();\n }\n}\n","<div class=\"bg-surface-container rounded-xl\">\n <div class=\"border-b border-b-default h-12 header\">\n <button ngsButton [ngsMenuTriggerFor]=\"languageListMenu\" class=\"-ms-2\">{{ _language().name }}</button>\n </div>\n <div class=\"content\">\n <div class=\"content-code\" #contentRef></div>\n </div>\n</div>\n\n<ngs-menu #languageListMenu=\"ngsMenu\">\n @for (languageItem of _languageList(); track $index) {\n <button ngs-menu-item (click)=\"selectLanguage(languageItem)\"\n class=\"[&.is-active]:!bg-secondary-fixed\"\n [class.is-active]=\"languageItem.language === _language().language\">{{ languageItem.name }}</button>\n }\n</ngs-menu>\n"],"names":[],"mappings":";;;;;;;;;;;;;;MA8Da,kBAAkB,CAAA;AACrB,IAAA,MAAM,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACpC,IAAA,eAAe,GAAG,MAAM,CAA0B,eAAe,CAAC;AAClE,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAE3B,IAAA,WAAW,GAAG,SAAS,CAAC,QAAQ,CAAmC,YAAY;oFAAC;IAExF,EAAE,GAAG,KAAK,CAAC,QAAQ;2EAAU;IAC7B,OAAO,GAAG,KAAK,CAAC,QAAQ;gFAAoC;IAC5D,QAAQ,GAAG,KAAK,CAAC,QAAQ;iFAAkC;IAC3D,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAAU;IAChC,KAAK,GAAG,KAAK,CAAY,EAAE;8EAAC;IAC5B,WAAW,GAAG,KAAK,CAAC,sBAAsB;oFAAC;IAEjC,aAAa,GAAG,MAAM,CAA8B;AAC5D,QAAA;AACE,YAAA,QAAQ,EAAE,MAAM;AAChB,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,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,aAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
@@ -1,235 +0,0 @@
1
- import { C as ContentBuilderStore, a as CONTENT_BUILDER, c as cloneContentEditorValue, b as contentEditorText, d as ContentEditorContentEditableDirective, e as CONTENT_EDITOR_BLOCK } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-67JfJX3V.mjs';
2
- import * as i0 from '@angular/core';
3
- import { inject, PLATFORM_ID, ElementRef, input, output, Directive, signal, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
4
- import { isPlatformServer, NgTemplateOutlet } from '@angular/common';
5
- import { C as CursorController } from './ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs';
6
-
7
- class ContentObserverDirective {
8
- _platformId = inject(PLATFORM_ID);
9
- _elementRef = inject(ElementRef);
10
- _observer;
11
- detectAddedNode = input.required(/* @ts-ignore */
12
- ...(ngDevMode ? [{ debugName: "detectAddedNode" }] : /* istanbul ignore next */ []));
13
- nodeAdded = output();
14
- ngOnInit() {
15
- if (isPlatformServer(this._platformId)) {
16
- return;
17
- }
18
- const config = { attributes: false, childList: true, subtree: false };
19
- const callback = (mutationList, observer) => {
20
- for (const mutation of mutationList) {
21
- if (mutation.type === 'childList') {
22
- const addedNode = mutation.addedNodes[0];
23
- if (addedNode && addedNode.tagName && addedNode.classList.contains(this.detectAddedNode())) {
24
- this.nodeAdded.emit(addedNode);
25
- }
26
- }
27
- }
28
- };
29
- this._observer = new MutationObserver(callback);
30
- this._observer.observe(this._elementRef.nativeElement, config);
31
- }
32
- ngOnDestroy() {
33
- this._observer?.disconnect();
34
- }
35
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentObserverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
36
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.7", type: ContentObserverDirective, isStandalone: true, selector: "[ngsContentObserver]", inputs: { detectAddedNode: { classPropertyName: "detectAddedNode", publicName: "detectAddedNode", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { nodeAdded: "nodeAdded" }, ngImport: i0 });
37
- }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentObserverDirective, decorators: [{
39
- type: Directive,
40
- args: [{
41
- selector: '[ngsContentObserver]'
42
- }]
43
- }], propDecorators: { detectAddedNode: [{ type: i0.Input, args: [{ isSignal: true, alias: "detectAddedNode", required: true }] }], nodeAdded: [{ type: i0.Output, args: ["nodeAdded"] }] } });
44
-
45
- class ListBlockComponent {
46
- _store = inject(ContentBuilderStore);
47
- _contentBuilder = inject(CONTENT_BUILDER);
48
- id = input.required(/* @ts-ignore */
49
- ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
50
- content = input.required(/* @ts-ignore */
51
- ...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
52
- settings = input.required(/* @ts-ignore */
53
- ...(ngDevMode ? [{ debugName: "settings" }] : /* istanbul ignore next */ []));
54
- index = input.required(/* @ts-ignore */
55
- ...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
56
- props = input([], /* @ts-ignore */
57
- ...(ngDevMode ? [{ debugName: "props" }] : /* istanbul ignore next */ []));
58
- _placeholder = signal('List item', /* @ts-ignore */
59
- ...(ngDevMode ? [{ debugName: "_placeholder" }] : /* istanbul ignore next */ []));
60
- _content = signal([
61
- {
62
- content: [],
63
- props: [],
64
- children: []
65
- }
66
- ], /* @ts-ignore */
67
- ...(ngDevMode ? [{ debugName: "_content" }] : /* istanbul ignore next */ []));
68
- _listStyle = signal('', /* @ts-ignore */
69
- ...(ngDevMode ? [{ debugName: "_listStyle" }] : /* istanbul ignore next */ []));
70
- initialized = signal(false, /* @ts-ignore */
71
- ...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
72
- constructor() {
73
- effect(() => {
74
- const content = this.content();
75
- const settings = this.settings();
76
- untracked(() => {
77
- this._content.set(cloneContentEditorValue(content.length ? content : [{ content: [], props: [], children: [] }]));
78
- this._listStyle.set(settings.listStyle);
79
- });
80
- });
81
- }
82
- ngOnInit() {
83
- this._listStyle.set(this.settings().listStyle);
84
- if (this.content().length !== 0) {
85
- this._content.set(cloneContentEditorValue(this.content()));
86
- }
87
- }
88
- ngAfterViewInit() {
89
- this.initialized.set(true);
90
- }
91
- focus() {
92
- }
93
- onContentChanged(content, list, index) {
94
- if (!list[index]) {
95
- return;
96
- }
97
- list[index].content = content;
98
- this.update();
99
- }
100
- onPressedEnter(event, contentEditable, list, index, level, parentItem, parentList) {
101
- event.preventDefault();
102
- event.stopPropagation();
103
- if (level === 0) {
104
- const content = contentEditable.getContent();
105
- if (contentEditorText(content)) {
106
- list.splice(index + 1, 0, {
107
- content: [],
108
- props: [],
109
- styles: {},
110
- children: []
111
- });
112
- }
113
- else {
114
- list.splice(index, 1);
115
- if (list.length === 0) {
116
- this._contentBuilder.deleteBlock(this.id());
117
- }
118
- this._contentBuilder.insertEmptyBlock(this.index());
119
- }
120
- }
121
- else {
122
- if (list[index] && !contentEditorText(list[index].content)) {
123
- list.splice(index, 1);
124
- const parentIndex = parentList.findIndex(item => item === parentItem);
125
- parentList.splice(parentIndex + 1, 0, {
126
- content: [],
127
- props: [],
128
- children: []
129
- });
130
- }
131
- else {
132
- list.splice(index + 1, 0, {
133
- content: [],
134
- props: [],
135
- styles: {},
136
- children: []
137
- });
138
- }
139
- }
140
- this.update();
141
- }
142
- getId(level, index) {
143
- return 'item-level-' + (level + index + 2).toString();
144
- }
145
- getData() {
146
- return {
147
- content: this._content(),
148
- settings: {
149
- ...this.settings(),
150
- }
151
- };
152
- }
153
- isEmpty() {
154
- return !this._content().some(item => contentEditorText(item.content).trim() || item.children.length > 0);
155
- }
156
- _onNodeAdded(node) {
157
- this._focusItem(node.querySelector('.list-item-content'));
158
- }
159
- _focusItem(element) {
160
- const cursorController = new CursorController(element);
161
- cursorController.setToEnd();
162
- }
163
- _onKeyDown(event, contentEditable, list, index, level, parentItem, parentList, listItem) {
164
- if (event.key === 'Backspace' && !contentEditorText(contentEditable.getContent())) {
165
- const latestElementInParentList = listItem.closest('.list')?.parentNode;
166
- list.splice(index, 1);
167
- const prevElement = listItem.previousSibling;
168
- if (prevElement) {
169
- this._focusItem(prevElement.querySelector('.list-item-content'));
170
- }
171
- else {
172
- if (latestElementInParentList) {
173
- this._focusItem(latestElementInParentList.querySelector('.list-item-content'));
174
- }
175
- }
176
- }
177
- else if (event.key === 'Tab') {
178
- event.preventDefault();
179
- event.stopPropagation();
180
- if (event.shiftKey && parentItem) {
181
- const cached = JSON.parse(JSON.stringify(list[index]));
182
- list.splice(index, 1);
183
- const parentIndex = parentList.findIndex(item => item === parentItem);
184
- parentList.splice(parentIndex + 1, 0, cached);
185
- }
186
- else {
187
- if (list[index - 1]) {
188
- const cached = JSON.parse(JSON.stringify(list[index]));
189
- list.splice(index, 1);
190
- list[index - 1].children.push(cached);
191
- }
192
- }
193
- }
194
- if (level === 0 && list.length === 0) {
195
- this._contentBuilder.deleteBlock(this.id());
196
- }
197
- this.update();
198
- }
199
- onPropsChanged(props, item) {
200
- item.props = props;
201
- this.update();
202
- }
203
- update() {
204
- this._store.updateBlock(this.id(), { ...this.getData(), isEmpty: this.isEmpty() });
205
- this._contentBuilder.emitContentChangeEvent();
206
- }
207
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ListBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
208
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ListBlockComponent, isStandalone: true, selector: "ngs-list-block", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: true, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: true, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: true, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.list-bullet": "_listStyle() === 'bullet'", "class.list-ordered": "_listStyle() === 'ordered'" } }, providers: [
209
- {
210
- provide: CONTENT_EDITOR_BLOCK,
211
- useExisting: ListBlockComponent,
212
- multi: true
213
- }
214
- ], exportAs: ["ngsListBlock"], ngImport: i0, template: "<ul class=\"list\"\n ngsContentObserver\n detectAddedNode=\"list-item\"\n (nodeAdded)=\"_onNodeAdded($event)\">\n <ng-container [ngTemplateOutlet]=\"listTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: _content(), level: 0, parentItem: null, parentList: [] }\"/>\n</ul>\n\n<ng-template #listTpl let-list let-level=\"level\" let-parentItem=\"parentItem\" let-parentList=\"parentList\">\n @for (item of list; track $index; let index = $index) {\n <li #listItem class=\"list-item\" [attr.id]=\"getId(level, index)\">\n <div [singleLine]=\"true\"\n [ngsContentEditorContentEditable]=\"item.content\"\n [props]=\"item.props\"\n (propsChanged)=\"onPropsChanged($event, item)\"\n #contentEditable=\"ngsContentEditorContentEditable\"\n class=\"list-item-content\"\n (contentChanged)=\"onContentChanged($event, list, index)\"\n (pressedEnter)=\"onPressedEnter($event, contentEditable, list, index, level, parentItem, parentList)\"\n (keydown)=\"_onKeyDown($event, contentEditable, list, index, level, parentItem, parentList, listItem)\"\n [attr.data-empty-placeholder]=\"_placeholder()\"></div>\n @if (item.children.length > 0) {\n <ol class=\"list\"\n ngsContentObserver\n detectAddedNode=\"list-item\"\n (nodeAdded)=\"_onNodeAdded($event)\">\n <ng-container [ngTemplateOutlet]=\"listTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: item.children, level: level + 1, parentItem: item, parentList: list }\"/>\n </ol>\n }\n </li>\n }\n</ng-template>\n", styles: [":host .list{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2);padding-inline-start:calc(var(--spacing, .25rem) * 4);--tw-outline-style: none;outline-style:none}:host .list .list{margin-top:calc(var(--spacing, .25rem) * 2);padding-inline-start:calc(var(--spacing, .25rem) * 4)}:host.list-ordered .list{list-style-type:decimal}:host.list-bullet .list{list-style-type:disc}:host .list-item-content{--tw-outline-style: none;outline-style:none}:host .list-item-content:empty:before{content:attr(data-empty-placeholder);color:var(--ngs-content-editor-placeholder-color, var(--ngs-color-on-surface-variant))}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: ContentEditorContentEditableDirective, selector: "[ngsContentEditorContentEditable]", inputs: ["ngsContentEditorContentEditable", "settings", "props", "singleLine"], outputs: ["contentChanged", "propsChanged", "pressedEnter", "initialized"], exportAs: ["ngsContentEditorContentEditable"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ContentObserverDirective, selector: "[ngsContentObserver]", inputs: ["detectAddedNode"], outputs: ["nodeAdded"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
215
- }
216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ListBlockComponent, decorators: [{
217
- type: Component,
218
- args: [{ selector: 'ngs-list-block', exportAs: 'ngsListBlock', imports: [
219
- ContentEditorContentEditableDirective,
220
- NgTemplateOutlet,
221
- ContentObserverDirective
222
- ], providers: [
223
- {
224
- provide: CONTENT_EDITOR_BLOCK,
225
- useExisting: ListBlockComponent,
226
- multi: true
227
- }
228
- ], changeDetection: ChangeDetectionStrategy.OnPush, host: {
229
- '[class.list-bullet]': "_listStyle() === 'bullet'",
230
- '[class.list-ordered]': "_listStyle() === 'ordered'",
231
- }, template: "<ul class=\"list\"\n ngsContentObserver\n detectAddedNode=\"list-item\"\n (nodeAdded)=\"_onNodeAdded($event)\">\n <ng-container [ngTemplateOutlet]=\"listTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: _content(), level: 0, parentItem: null, parentList: [] }\"/>\n</ul>\n\n<ng-template #listTpl let-list let-level=\"level\" let-parentItem=\"parentItem\" let-parentList=\"parentList\">\n @for (item of list; track $index; let index = $index) {\n <li #listItem class=\"list-item\" [attr.id]=\"getId(level, index)\">\n <div [singleLine]=\"true\"\n [ngsContentEditorContentEditable]=\"item.content\"\n [props]=\"item.props\"\n (propsChanged)=\"onPropsChanged($event, item)\"\n #contentEditable=\"ngsContentEditorContentEditable\"\n class=\"list-item-content\"\n (contentChanged)=\"onContentChanged($event, list, index)\"\n (pressedEnter)=\"onPressedEnter($event, contentEditable, list, index, level, parentItem, parentList)\"\n (keydown)=\"_onKeyDown($event, contentEditable, list, index, level, parentItem, parentList, listItem)\"\n [attr.data-empty-placeholder]=\"_placeholder()\"></div>\n @if (item.children.length > 0) {\n <ol class=\"list\"\n ngsContentObserver\n detectAddedNode=\"list-item\"\n (nodeAdded)=\"_onNodeAdded($event)\">\n <ng-container [ngTemplateOutlet]=\"listTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: item.children, level: level + 1, parentItem: item, parentList: list }\"/>\n </ol>\n }\n </li>\n }\n</ng-template>\n", styles: [":host .list{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2);padding-inline-start:calc(var(--spacing, .25rem) * 4);--tw-outline-style: none;outline-style:none}:host .list .list{margin-top:calc(var(--spacing, .25rem) * 2);padding-inline-start:calc(var(--spacing, .25rem) * 4)}:host.list-ordered .list{list-style-type:decimal}:host.list-bullet .list{list-style-type:disc}:host .list-item-content{--tw-outline-style: none;outline-style:none}:host .list-item-content:empty:before{content:attr(data-empty-placeholder);color:var(--ngs-content-editor-placeholder-color, var(--ngs-color-on-surface-variant))}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
232
- }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: true }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: true }] }], settings: [{ type: i0.Input, args: [{ isSignal: true, alias: "settings", required: true }] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: true }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
233
-
234
- export { ListBlockComponent };
235
- //# sourceMappingURL=ngstarter-ui-components-content-editor-list-block.component-BBtOG51W.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngstarter-ui-components-content-editor-list-block.component-BBtOG51W.mjs","sources":["../../../projects/components/content-editor/src/content-observer.directive.ts","../../../projects/components/content-editor/src/_builder/list-block/list-block.component.ts","../../../projects/components/content-editor/src/_builder/list-block/list-block.component.html"],"sourcesContent":["import { Directive, ElementRef, inject, input, OnDestroy, OnInit, output, PLATFORM_ID } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\n\n@Directive({\n selector: '[ngsContentObserver]'\n})\nexport class ContentObserverDirective implements OnInit, OnDestroy {\n private _platformId = inject(PLATFORM_ID);\n private _elementRef = inject(ElementRef);\n private _observer!: MutationObserver;\n\n detectAddedNode = input.required();\n\n readonly nodeAdded = output<HTMLElement>();\n\n ngOnInit() {\n if (isPlatformServer(this._platformId)) {\n return;\n }\n\n const config = { attributes: false, childList: true, subtree: false };\n const callback = (mutationList: any, observer: any) => {\n for (const mutation of mutationList) {\n if (mutation.type === 'childList') {\n const addedNode = mutation.addedNodes[0];\n\n if (addedNode && addedNode.tagName && addedNode.classList.contains(this.detectAddedNode())) {\n this.nodeAdded.emit(addedNode);\n }\n }\n }\n };\n this._observer = new MutationObserver(callback);\n this._observer.observe(this._elementRef.nativeElement, config);\n }\n\n ngOnDestroy() {\n this._observer?.disconnect();\n }\n}\n","import { NgsHeadlessEditorText } from '@ngstarter-ui/components/headless-editor';\nimport { contentEditorText, cloneContentEditorValue } from '../../document';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component, effect, untracked,\n DestroyRef,\n ElementRef,\n inject,\n input,\n OnInit,\n signal\n} from '@angular/core';\nimport { ContentBuilderStore } from '../../content-builder.store';\nimport {\n CONTENT_BUILDER, CONTENT_EDITOR_BLOCK,\n ContentEditorDataBlock,\n ContentEditorItemProperty,\n ContentEditorListItem,\n ContentEditorListSettings\n} from '../../types';\nimport { ContentEditorContentEditableDirective } from '../../content-editor-content-editable.directive';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ContentObserverDirective } from '../../content-observer.directive';\nimport { CursorController } from '../../utils/cursor-controller';\nimport { ContentBuilderComponent } from '../../content-builder/content-builder.component';\n\n@Component({\n selector: 'ngs-list-block',\n exportAs: 'ngsListBlock',\n imports: [\n ContentEditorContentEditableDirective,\n NgTemplateOutlet,\n ContentObserverDirective\n ],\n templateUrl: './list-block.component.html',\n styleUrl: './list-block.component.scss',\n providers: [\n {\n provide: CONTENT_EDITOR_BLOCK,\n useExisting: ListBlockComponent,\n multi: true\n }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.list-bullet]': \"_listStyle() === 'bullet'\",\n '[class.list-ordered]': \"_listStyle() === 'ordered'\",\n }\n})\nexport class ListBlockComponent implements OnInit, ContentEditorDataBlock, AfterViewInit {\n private _store = inject(ContentBuilderStore);\n private _contentBuilder = inject<ContentBuilderComponent>(CONTENT_BUILDER);\n\n id = input.required<string>();\n content = input.required<ContentEditorListItem[]>();\n settings = input.required<ContentEditorListSettings>();\n index = input.required<number>();\n props = input<ContentEditorItemProperty[]>([]);\n\n protected _placeholder = signal<string>('List item');\n protected _content = signal<ContentEditorListItem[]>([\n {\n content: [],\n props: [],\n children: []\n }\n ]);\n protected _listStyle = signal('');\n readonly initialized = signal(false);\n\n constructor() {\n effect(() => {\n const content = this.content();\n const settings = this.settings();\n untracked(() => {\n this._content.set(cloneContentEditorValue(content.length ? content : [{ content: [], props: [], children: [] }]));\n this._listStyle.set(settings.listStyle);\n });\n });\n }\n\n ngOnInit() {\n this._listStyle.set(this.settings().listStyle);\n\n if (this.content().length !== 0) {\n this._content.set(cloneContentEditorValue(this.content()));\n }\n }\n\n ngAfterViewInit() {\n this.initialized.set(true);\n }\n\n focus() {\n }\n\n protected onContentChanged(content: readonly NgsHeadlessEditorText[], list: ContentEditorListItem[], index: number) {\n if (!list[index]) {\n return;\n }\n\n list[index].content = content;\n this.update();\n }\n\n protected onPressedEnter(\n event: KeyboardEvent,\n contentEditable: ContentEditorContentEditableDirective,\n list: ContentEditorListItem[],\n index: number,\n level: number,\n parentItem: ContentEditorListItem | null,\n parentList: ContentEditorListItem[]\n ) {\n event.preventDefault();\n event.stopPropagation();\n\n if (level === 0) {\n const content = contentEditable.getContent();\n\n if (contentEditorText(content)) {\n list.splice(index + 1, 0, {\n content: [],\n props: [],\n styles: {},\n children: []\n });\n } else {\n list.splice(index, 1);\n\n if (list.length === 0) {\n this._contentBuilder.deleteBlock(this.id());\n }\n\n this._contentBuilder.insertEmptyBlock(this.index());\n }\n } else {\n if (list[index] && !contentEditorText(list[index].content)) {\n list.splice(index, 1);\n const parentIndex = parentList.findIndex(item => item === parentItem);\n parentList.splice(parentIndex + 1, 0, {\n content: [],\n props: [],\n children: []\n });\n } else {\n list.splice(index + 1, 0, {\n content: [],\n props: [],\n styles: {},\n children: []\n });\n }\n }\n\n this.update();\n }\n\n getId(level: number, index: number): string {\n return 'item-level-' + (level + index + 2).toString();\n }\n\n getData(): any {\n return {\n content: this._content(),\n settings: {\n ...this.settings(),\n }\n };\n }\n\n isEmpty(): boolean {\n return !this._content().some(item => contentEditorText(item.content).trim() || item.children.length > 0);\n }\n\n protected _onNodeAdded(node: HTMLElement) {\n this._focusItem(node.querySelector('.list-item-content') as HTMLElement);\n }\n\n protected _focusItem(element: HTMLElement) {\n const cursorController = new CursorController(element);\n cursorController.setToEnd();\n }\n\n protected _onKeyDown(\n event: KeyboardEvent,\n contentEditable: ContentEditorContentEditableDirective,\n list: ContentEditorListItem[],\n index: number,\n level: number,\n parentItem: ContentEditorListItem | null,\n parentList: ContentEditorListItem[],\n listItem: HTMLElement\n ) {\n if (event.key === 'Backspace' && !contentEditorText(contentEditable.getContent())) {\n const latestElementInParentList = (listItem.closest('.list') as HTMLElement)?.parentNode;\n list.splice(index, 1);\n const prevElement = listItem.previousSibling as HTMLElement;\n\n if (prevElement) {\n this._focusItem(prevElement.querySelector('.list-item-content') as HTMLElement);\n } else {\n if (latestElementInParentList) {\n this._focusItem(latestElementInParentList.querySelector('.list-item-content') as HTMLElement);\n }\n }\n } else if (event.key === 'Tab') {\n event.preventDefault();\n event.stopPropagation();\n\n if (event.shiftKey && parentItem) {\n const cached = JSON.parse(JSON.stringify(list[index]));\n list.splice(index, 1);\n const parentIndex = parentList.findIndex(item => item === parentItem);\n parentList.splice(parentIndex + 1, 0, cached);\n } else {\n if (list[index - 1]) {\n const cached = JSON.parse(JSON.stringify(list[index]));\n list.splice(index, 1);\n list[index - 1].children.push(cached);\n }\n }\n }\n\n if (level === 0 && list.length === 0) {\n this._contentBuilder.deleteBlock(this.id());\n }\n\n this.update();\n }\n\n onPropsChanged(props: ContentEditorItemProperty[], item: any) {\n item.props = props;\n this.update();\n }\n\n private update() {\n this._store.updateBlock(this.id(), {...this.getData(), isEmpty: this.isEmpty()});\n this._contentBuilder.emitContentChangeEvent();\n }\n}\n","<ul class=\"list\"\n ngsContentObserver\n detectAddedNode=\"list-item\"\n (nodeAdded)=\"_onNodeAdded($event)\">\n <ng-container [ngTemplateOutlet]=\"listTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: _content(), level: 0, parentItem: null, parentList: [] }\"/>\n</ul>\n\n<ng-template #listTpl let-list let-level=\"level\" let-parentItem=\"parentItem\" let-parentList=\"parentList\">\n @for (item of list; track $index; let index = $index) {\n <li #listItem class=\"list-item\" [attr.id]=\"getId(level, index)\">\n <div [singleLine]=\"true\"\n [ngsContentEditorContentEditable]=\"item.content\"\n [props]=\"item.props\"\n (propsChanged)=\"onPropsChanged($event, item)\"\n #contentEditable=\"ngsContentEditorContentEditable\"\n class=\"list-item-content\"\n (contentChanged)=\"onContentChanged($event, list, index)\"\n (pressedEnter)=\"onPressedEnter($event, contentEditable, list, index, level, parentItem, parentList)\"\n (keydown)=\"_onKeyDown($event, contentEditable, list, index, level, parentItem, parentList, listItem)\"\n [attr.data-empty-placeholder]=\"_placeholder()\"></div>\n @if (item.children.length > 0) {\n <ol class=\"list\"\n ngsContentObserver\n detectAddedNode=\"list-item\"\n (nodeAdded)=\"_onNodeAdded($event)\">\n <ng-container [ngTemplateOutlet]=\"listTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: item.children, level: level + 1, parentItem: item, parentList: list }\"/>\n </ol>\n }\n </li>\n }\n</ng-template>\n"],"names":[],"mappings":";;;;;;MAMa,wBAAwB,CAAA;AAC3B,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AACjC,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC,IAAA,SAAS;IAEjB,eAAe,GAAG,KAAK,CAAC,QAAQ;wFAAE;IAEzB,SAAS,GAAG,MAAM,EAAe;IAE1C,QAAQ,GAAA;AACN,QAAA,IAAI,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YACtC;QACF;AAEA,QAAA,MAAM,MAAM,GAAG,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