@ngstarter-ui/components 21.0.29 → 21.0.31

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 (40) hide show
  1. package/ai/component-registry.json +49 -10
  2. package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-CKrOhA7h.mjs → ngstarter-ui-components-content-editor-code-block.component-BZniTqu-.mjs} +2 -2
  3. package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-CKrOhA7h.mjs.map → ngstarter-ui-components-content-editor-code-block.component-BZniTqu-.mjs.map} +1 -1
  4. package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-zSApBzF3.mjs → ngstarter-ui-components-content-editor-embed-block-QzDMzd3u.mjs} +2 -2
  5. package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-zSApBzF3.mjs.map → ngstarter-ui-components-content-editor-embed-block-QzDMzd3u.mjs.map} +1 -1
  6. package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-Dv8d0nCy.mjs → ngstarter-ui-components-content-editor-heading-block.component-CnYRnDBY.mjs} +2 -2
  7. package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-Dv8d0nCy.mjs.map → ngstarter-ui-components-content-editor-heading-block.component-CnYRnDBY.mjs.map} +1 -1
  8. package/fesm2022/{ngstarter-ui-components-content-editor-image-block.component-g-H7a5Z_.mjs → ngstarter-ui-components-content-editor-image-block.component-IP_eRCQ2.mjs} +2 -2
  9. package/fesm2022/{ngstarter-ui-components-content-editor-image-block.component-g-H7a5Z_.mjs.map → ngstarter-ui-components-content-editor-image-block.component-IP_eRCQ2.mjs.map} +1 -1
  10. package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-PgqisgxY.mjs → ngstarter-ui-components-content-editor-list-block.component-amyfzXOW.mjs} +2 -2
  11. package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-PgqisgxY.mjs.map → ngstarter-ui-components-content-editor-list-block.component-amyfzXOW.mjs.map} +1 -1
  12. package/fesm2022/{ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-BuMm25ea.mjs → ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-DA-VnRa_.mjs} +453 -36
  13. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-DA-VnRa_.mjs.map +1 -0
  14. package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-DS_6CzuA.mjs → ngstarter-ui-components-content-editor-paragraph-block.component-DtophI4_.mjs} +2 -2
  15. package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-DS_6CzuA.mjs.map → ngstarter-ui-components-content-editor-paragraph-block.component-DtophI4_.mjs.map} +1 -1
  16. package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-Df92Nqvp.mjs → ngstarter-ui-components-content-editor-quote-block.component-B20eHQdw.mjs} +2 -2
  17. package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-Df92Nqvp.mjs.map → ngstarter-ui-components-content-editor-quote-block.component-B20eHQdw.mjs.map} +1 -1
  18. package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-D4rdPkGz.mjs → ngstarter-ui-components-content-editor-table-block.component-hJ4OxKRX.mjs} +4 -4
  19. package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-D4rdPkGz.mjs.map → ngstarter-ui-components-content-editor-table-block.component-hJ4OxKRX.mjs.map} +1 -1
  20. package/fesm2022/{ngstarter-ui-components-content-editor-video-block.component-DqS9Lhp_.mjs → ngstarter-ui-components-content-editor-video-block.component-Cs7L1wwX.mjs} +2 -2
  21. package/fesm2022/{ngstarter-ui-components-content-editor-video-block.component-DqS9Lhp_.mjs.map → ngstarter-ui-components-content-editor-video-block.component-Cs7L1wwX.mjs.map} +1 -1
  22. package/fesm2022/ngstarter-ui-components-content-editor.mjs +1 -1
  23. package/fesm2022/ngstarter-ui-components-toolbar.mjs +2 -2
  24. package/fesm2022/ngstarter-ui-components-toolbar.mjs.map +1 -1
  25. package/package.json +38 -2
  26. package/schematics/collection.json +5 -0
  27. package/schematics/ng-add/index.js +2 -1
  28. package/schematics/ng-add/index.js.map +1 -1
  29. package/schematics/ng-update/index.js +1 -0
  30. package/schematics/ng-update/index.js.map +1 -1
  31. package/schematics/sync-dependencies/index.d.ts +5 -0
  32. package/schematics/sync-dependencies/index.js +14 -0
  33. package/schematics/sync-dependencies/index.js.map +1 -0
  34. package/schematics/sync-dependencies/schema.json +13 -0
  35. package/schematics/utils.d.ts +2 -0
  36. package/schematics/utils.js +12 -10
  37. package/schematics/utils.js.map +1 -1
  38. package/styles/_global.scss +11 -0
  39. package/types/ngstarter-ui-components-content-editor.d.ts +226 -7
  40. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-BuMm25ea.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, PLATFORM_ID, ElementRef, input, output, Directive, signal, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { C as ContentBuilderStore, a as CONTENT_BUILDER, b as CONTENT_EDITOR_BLOCK } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-BuMm25ea.mjs';
3
+ import { C as ContentBuilderStore, a as CONTENT_BUILDER, b as CONTENT_EDITOR_BLOCK } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-DA-VnRa_.mjs';
4
4
  import { C as ContentEditorContentEditableDirective } from './ngstarter-ui-components-content-editor-content-editor-content-editable.directive-Bvfa2dqh.mjs';
5
5
  import { isPlatformServer, NgTemplateOutlet } from '@angular/common';
6
6
  import { C as CursorController } from './ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs';
@@ -212,4 +212,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
212
212
  }], 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 }] }] } });
213
213
 
214
214
  export { ListBlockComponent };
215
- //# sourceMappingURL=ngstarter-ui-components-content-editor-list-block.component-PgqisgxY.mjs.map
215
+ //# sourceMappingURL=ngstarter-ui-components-content-editor-list-block.component-amyfzXOW.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngstarter-ui-components-content-editor-list-block.component-PgqisgxY.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 {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\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\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 ngOnInit() {\n this._listStyle.set(this.settings().listStyle);\n\n if (this.content().length !== 0) {\n this._content.set(this.content());\n }\n }\n\n ngAfterViewInit() {\n this.initialized.set(true);\n }\n\n focus() {\n }\n\n protected onContentChanged(content: string, 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 (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] && !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.getData().content.find((item: any) => item.content.trim().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' && !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 [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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AA,IAAA,EDHI,qCAAqC,EAAA,QAAA,EAAA,mCAAA,EAAA,MAAA,EAAA,CAAA,iCAAA,EAAA,UAAA,EAAA,OAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,EAAA,cAAA,EAAA,aAAA,EAAA,cAAA,CAAA,EAAA,QAAA,EAAA,CAAA,iCAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACrC,gBAAgB,oJAChB,wBAAwB,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAiBf,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAvB9B,SAAS;+BACE,gBAAgB,EAAA,QAAA,EAChB,cAAc,EAAA,OAAA,EACf;wBACP,qCAAqC;wBACrC,gBAAgB;wBAChB;qBACD,EAAA,SAAA,EAGU;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,oBAAoB;AAC7B,4BAAA,WAAW,EAAA,kBAAoB;AAC/B,4BAAA,KAAK,EAAE;AACR;qBACF,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,qBAAqB,EAAE,2BAA2B;AAClD,wBAAA,sBAAsB,EAAE,4BAA4B;AACrD,qBAAA,EAAA,QAAA,EAAA,ylDAAA,EAAA,MAAA,EAAA,CAAA,koBAAA,CAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"ngstarter-ui-components-content-editor-list-block.component-amyfzXOW.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 {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\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\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 ngOnInit() {\n this._listStyle.set(this.settings().listStyle);\n\n if (this.content().length !== 0) {\n this._content.set(this.content());\n }\n }\n\n ngAfterViewInit() {\n this.initialized.set(true);\n }\n\n focus() {\n }\n\n protected onContentChanged(content: string, 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 (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] && !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.getData().content.find((item: any) => item.content.trim().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' && !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 [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;AAEjB,IAAA,eAAe,GAAG,KAAK,CAAC,QAAQ,qFAAE;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,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE;AACrE,QAAA,MAAM,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