@ngstarter-ui/components 22.2.3 → 22.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/component-registry.json +22 -0
- package/content-editor/BLOCK_FORMAT.md +144 -0
- package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-rzZKJ2JH.mjs +35 -0
- package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-rzZKJ2JH.mjs.map +1 -0
- package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-Jbf8h2yz.mjs → ngstarter-ui-components-content-editor-callout-block-DTdApN0r.mjs} +2 -3
- package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-Jbf8h2yz.mjs.map → ngstarter-ui-components-content-editor-callout-block-DTdApN0r.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-BizHRPdC.mjs → ngstarter-ui-components-content-editor-code-block.component-DpONkTMU.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-BizHRPdC.mjs.map → ngstarter-ui-components-content-editor-code-block.component-DpONkTMU.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-BzoaJvai.mjs → ngstarter-ui-components-content-editor-embed-block-CmhzpaRk.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-BzoaJvai.mjs.map → ngstarter-ui-components-content-editor-embed-block-CmhzpaRk.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-gallery-block-C4p-S0Do.mjs → ngstarter-ui-components-content-editor-gallery-block-gtH7yWd5.mjs} +16 -39
- package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-gtH7yWd5.mjs.map +1 -0
- package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-Cdq_Dcv2.mjs → ngstarter-ui-components-content-editor-grid-block-Pb-xV7Pw.mjs} +3 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-Cdq_Dcv2.mjs.map → ngstarter-ui-components-content-editor-grid-block-Pb-xV7Pw.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-CDSt4rXe.mjs → ngstarter-ui-components-content-editor-heading-block.component-BKe9Zy_x.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-CDSt4rXe.mjs.map → ngstarter-ui-components-content-editor-heading-block.component-BKe9Zy_x.mjs.map} +1 -1
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-DSpBVTu-.mjs +113 -0
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-DSpBVTu-.mjs.map +1 -0
- package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-CdQ30RjA.mjs → ngstarter-ui-components-content-editor-list-block.component-BPKPE1uY.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-CdQ30RjA.mjs.map → ngstarter-ui-components-content-editor-list-block.component-BPKPE1uY.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-nested-blocks-CbZY0keH.mjs → ngstarter-ui-components-content-editor-nested-blocks-Dh-p3WMp.mjs} +4 -4
- package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-Dh-p3WMp.mjs.map +1 -0
- package/fesm2022/{ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CK4ssnlk.mjs → ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CR-NrarE.mjs} +2021 -1505
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CR-NrarE.mjs.map +1 -0
- package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-Dd0pQquG.mjs → ngstarter-ui-components-content-editor-paragraph-block.component-D5wS3m6O.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-Dd0pQquG.mjs.map → ngstarter-ui-components-content-editor-paragraph-block.component-D5wS3m6O.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-CUxKoeb_.mjs → ngstarter-ui-components-content-editor-quote-block.component-C3GFAGKF.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-CUxKoeb_.mjs.map → ngstarter-ui-components-content-editor-quote-block.component-C3GFAGKF.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-BTExrXy8.mjs → ngstarter-ui-components-content-editor-table-block.component-DQgs_kyN.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-BTExrXy8.mjs.map → ngstarter-ui-components-content-editor-table-block.component-DQgs_kyN.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-B46YeMGQ.mjs → ngstarter-ui-components-content-editor-toggle-block-Cb67ChE8.mjs} +3 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-B46YeMGQ.mjs.map → ngstarter-ui-components-content-editor-toggle-block-Cb67ChE8.mjs.map} +1 -1
- package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs +19 -0
- package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-CRa0g9Ez.mjs +134 -0
- package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-CRa0g9Ez.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-headless-editor.mjs +57 -0
- package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ngstarter-ui-components-content-editor.d.ts +205 -10
- package/types/ngstarter-ui-components-headless-editor.d.ts +6 -1
- package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-DlUkhwCu.mjs +0 -54
- package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-DlUkhwCu.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-block-base-C46lyMrp.mjs +0 -47
- package/fesm2022/ngstarter-ui-components-content-editor-block-base-C46lyMrp.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-C4p-S0Do.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-LfKZapgv.mjs +0 -169
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-LfKZapgv.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-CbZY0keH.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CK4ssnlk.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-upload-block-base-DKqojf--.mjs +0 -29
- package/fesm2022/ngstarter-ui-components-content-editor-upload-block-base-DKqojf--.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-hBR5AauH.mjs +0 -201
- package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-hBR5AauH.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-CR-NrarE.mjs';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { inject, DestroyRef, viewChild, input, signal, effect, untracked, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
4
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
@@ -129,4 +129,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
129
129
|
}], ctorParameters: () => [], propDecorators: { _contentRef: [{ type: i0.ViewChild, args: ['contentRef', { isSignal: true }] }], 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 }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: true }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }] } });
|
|
130
130
|
|
|
131
131
|
export { ParagraphBlockComponent };
|
|
132
|
-
//# sourceMappingURL=ngstarter-ui-components-content-editor-paragraph-block.component-
|
|
132
|
+
//# sourceMappingURL=ngstarter-ui-components-content-editor-paragraph-block.component-D5wS3m6O.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngstarter-ui-components-content-editor-paragraph-block.component-Dd0pQquG.mjs","sources":["../../../projects/components/content-editor/src/_builder/paragraph-block/paragraph-block.component.ts","../../../projects/components/content-editor/src/_builder/paragraph-block/paragraph-block.component.html"],"sourcesContent":["import { NgsHeadlessEditorText } from '@ngstarter-ui/components/headless-editor';\nimport { contentEditorText, cloneContentEditorValue } from '../../document';\nimport {\n ChangeDetectionStrategy,\n Component, effect, untracked, DestroyRef,\n ElementRef, forwardRef,\n inject,\n input,\n OnInit, signal,\n viewChild\n} from '@angular/core';\nimport { ContentEditorContentEditableDirective } from '../../content-editor-content-editable.directive';\nimport { ContentBuilderComponent } from '../../content-builder/content-builder.component';\nimport {\n CONTENT_BUILDER,\n CONTENT_EDITOR_BLOCK,\n ContentEditorDataBlock,\n ContentEditorItemProperty\n} from '../../types';\nimport { ContentBuilderStore } from '../../content-builder.store';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { CursorController } from '../../utils/cursor-controller';\n\n@Component({\n selector: 'ngs-paragraph-block',\n imports: [\n ContentEditorContentEditableDirective\n ],\n providers: [\n {\n provide: CONTENT_EDITOR_BLOCK,\n useExisting: forwardRef(() => ParagraphBlockComponent),\n multi: true\n }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './paragraph-block.component.html',\n styleUrl: './paragraph-block.component.scss',\n host: {\n 'class': 'ngs-paragraph-block',\n '[class.is-empty]': '_isEmpty()'\n }\n})\nexport class ParagraphBlockComponent implements OnInit, ContentEditorDataBlock {\n private _store = inject(ContentBuilderStore);\n private _contentBuilder = inject<ContentBuilderComponent>(CONTENT_BUILDER);\n private _destroyRef = inject(DestroyRef);\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<any>();\n props = input<ContentEditorItemProperty[]>([]);\n index = input.required<number>();\n placeholder = input('Enter text here');\n\n protected _content = signal<readonly NgsHeadlessEditorText[]>([]);\n protected _props = signal<ContentEditorItemProperty[]>([]);\n protected _isEmpty = signal<boolean>(true);\n readonly initialized = signal(false);\n\n constructor() {\n effect(() => {\n const content = this.content();\n const props = this.props();\n untracked(() => {\n this._content.set(content);\n this._props.set(cloneContentEditorValue(props));\n this._isEmpty.set(!contentEditorText(content).trim());\n });\n });\n }\n\n ngOnInit() {\n this._content.set(this.content());\n this._props.set(this.props());\n this._isEmpty.set(!contentEditorText(this.content()).trim());\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 }\n\n focus() {\n const element = this._contentRef().nativeElement;\n const cursorController = new CursorController(element);\n cursorController.setToEnd();\n }\n\n getData(): any {\n return {\n content: this._content(),\n props: this._props(),\n settings: {\n ...this.settings(),\n }\n };\n }\n\n isEmpty(): boolean {\n return !contentEditorText(this._content()).trim();\n }\n\n protected onContentChanged(content: readonly NgsHeadlessEditorText[]) {\n if (!this.initialized()) {\n return;\n }\n\n this._content.set(content);\n this._isEmpty.set(!contentEditorText(content).trim());\n\n this.update();\n }\n\n protected onPropsChanged(props: ContentEditorItemProperty[]) {\n this._props.set(props);\n this.update();\n }\n\n protected onPressedEnter(event: KeyboardEvent) {\n event.preventDefault();\n event.stopPropagation();\n this._contentBuilder.insertEmptyBlock(this.index());\n }\n\n protected onContentEditableInitialized() {\n if (this._store.focusedBlockId() === this.id()) {\n this.focus();\n }\n\n this.initialized.set(true);\n }\n\n protected _onKeyDown(event: KeyboardEvent) {\n if (event.key === 'Backspace' && !contentEditorText(this._content())) {\n this._contentBuilder.deleteBlock(this.id());\n }\n }\n\n private update() {\n this._contentBuilder.updateParagraph(this.id(), {...this.getData(), isEmpty: this.isEmpty()});\n this._contentBuilder.emitContentChangeEvent();\n }\n}\n","<div #contentRef\n class=\"content\"\n [singleLine]=\"true\"\n [ngsContentEditorContentEditable]=\"_content()\"\n [settings]=\"settings()\"\n [props]=\"props()\"\n (propsChanged)=\"onPropsChanged($event)\"\n [attr.data-empty-placeholder]=\"placeholder()\"\n (contentChanged)=\"onContentChanged($event)\"\n (pressedEnter)=\"onPressedEnter($event)\"\n (keydown)=\"_onKeyDown($event)\"\n (initialized)=\"onContentEditableInitialized()\"></div>\n"],"names":[],"mappings":";;;;;;MA2Ca,uBAAuB,CAAA;AAC1B,IAAA,MAAM,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACpC,IAAA,eAAe,GAAG,MAAM,CAA0B,eAAe,CAAC;AAClE,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAEhC,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;iFAAO;IAChC,KAAK,GAAG,KAAK,CAA8B,EAAE;8EAAC;IAC9C,KAA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A,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,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,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
|
+
{"version":3,"file":"ngstarter-ui-components-content-editor-paragraph-block.component-D5wS3m6O.mjs","sources":["../../../projects/components/content-editor/src/_builder/paragraph-block/paragraph-block.component.ts","../../../projects/components/content-editor/src/_builder/paragraph-block/paragraph-block.component.html"],"sourcesContent":["import { NgsHeadlessEditorText } from '@ngstarter-ui/components/headless-editor';\nimport { contentEditorText, cloneContentEditorValue } from '../../document';\nimport {\n ChangeDetectionStrategy,\n Component, effect, untracked, DestroyRef,\n ElementRef, forwardRef,\n inject,\n input,\n OnInit, signal,\n viewChild\n} from '@angular/core';\nimport { ContentEditorContentEditableDirective } from '../../content-editor-content-editable.directive';\nimport { ContentBuilderComponent } from '../../content-builder/content-builder.component';\nimport {\n CONTENT_BUILDER,\n CONTENT_EDITOR_BLOCK,\n ContentEditorDataBlock,\n ContentEditorItemProperty\n} from '../../types';\nimport { ContentBuilderStore } from '../../content-builder.store';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { CursorController } from '../../utils/cursor-controller';\n\n@Component({\n selector: 'ngs-paragraph-block',\n imports: [\n ContentEditorContentEditableDirective\n ],\n providers: [\n {\n provide: CONTENT_EDITOR_BLOCK,\n useExisting: forwardRef(() => ParagraphBlockComponent),\n multi: true\n }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './paragraph-block.component.html',\n styleUrl: './paragraph-block.component.scss',\n host: {\n 'class': 'ngs-paragraph-block',\n '[class.is-empty]': '_isEmpty()'\n }\n})\nexport class ParagraphBlockComponent implements OnInit, ContentEditorDataBlock {\n private _store = inject(ContentBuilderStore);\n private _contentBuilder = inject<ContentBuilderComponent>(CONTENT_BUILDER);\n private _destroyRef = inject(DestroyRef);\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<any>();\n props = input<ContentEditorItemProperty[]>([]);\n index = input.required<number>();\n placeholder = input('Enter text here');\n\n protected _content = signal<readonly NgsHeadlessEditorText[]>([]);\n protected _props = signal<ContentEditorItemProperty[]>([]);\n protected _isEmpty = signal<boolean>(true);\n readonly initialized = signal(false);\n\n constructor() {\n effect(() => {\n const content = this.content();\n const props = this.props();\n untracked(() => {\n this._content.set(content);\n this._props.set(cloneContentEditorValue(props));\n this._isEmpty.set(!contentEditorText(content).trim());\n });\n });\n }\n\n ngOnInit() {\n this._content.set(this.content());\n this._props.set(this.props());\n this._isEmpty.set(!contentEditorText(this.content()).trim());\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 }\n\n focus() {\n const element = this._contentRef().nativeElement;\n const cursorController = new CursorController(element);\n cursorController.setToEnd();\n }\n\n getData(): any {\n return {\n content: this._content(),\n props: this._props(),\n settings: {\n ...this.settings(),\n }\n };\n }\n\n isEmpty(): boolean {\n return !contentEditorText(this._content()).trim();\n }\n\n protected onContentChanged(content: readonly NgsHeadlessEditorText[]) {\n if (!this.initialized()) {\n return;\n }\n\n this._content.set(content);\n this._isEmpty.set(!contentEditorText(content).trim());\n\n this.update();\n }\n\n protected onPropsChanged(props: ContentEditorItemProperty[]) {\n this._props.set(props);\n this.update();\n }\n\n protected onPressedEnter(event: KeyboardEvent) {\n event.preventDefault();\n event.stopPropagation();\n this._contentBuilder.insertEmptyBlock(this.index());\n }\n\n protected onContentEditableInitialized() {\n if (this._store.focusedBlockId() === this.id()) {\n this.focus();\n }\n\n this.initialized.set(true);\n }\n\n protected _onKeyDown(event: KeyboardEvent) {\n if (event.key === 'Backspace' && !contentEditorText(this._content())) {\n this._contentBuilder.deleteBlock(this.id());\n }\n }\n\n private update() {\n this._contentBuilder.updateParagraph(this.id(), {...this.getData(), isEmpty: this.isEmpty()});\n this._contentBuilder.emitContentChangeEvent();\n }\n}\n","<div #contentRef\n class=\"content\"\n [singleLine]=\"true\"\n [ngsContentEditorContentEditable]=\"_content()\"\n [settings]=\"settings()\"\n [props]=\"props()\"\n (propsChanged)=\"onPropsChanged($event)\"\n [attr.data-empty-placeholder]=\"placeholder()\"\n (contentChanged)=\"onContentChanged($event)\"\n (pressedEnter)=\"onPressedEnter($event)\"\n (keydown)=\"_onKeyDown($event)\"\n (initialized)=\"onContentEditableInitialized()\"></div>\n"],"names":[],"mappings":";;;;;;MA2Ca,uBAAuB,CAAA;AAC1B,IAAA,MAAM,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACpC,IAAA,eAAe,GAAG,MAAM,CAA0B,eAAe,CAAC;AAClE,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAEhC,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;iFAAO;IAChC,KAAK,GAAG,KAAK,CAA8B,EAAE;8EAAC;IA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AAA,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,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,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,4 +1,4 @@
|
|
|
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-
|
|
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-CR-NrarE.mjs';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { inject, DestroyRef, viewChild, input, signal, computed, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
4
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
@@ -168,4 +168,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
168
168
|
}], ctorParameters: () => [], propDecorators: { _contentRef: [{ type: i0.ViewChild, args: ['contentRef', { isSignal: true }] }], 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 }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], captionPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "captionPlaceholder", required: false }] }] } });
|
|
169
169
|
|
|
170
170
|
export { QuoteBlockComponent };
|
|
171
|
-
//# sourceMappingURL=ngstarter-ui-components-content-editor-quote-block.component-
|
|
171
|
+
//# sourceMappingURL=ngstarter-ui-components-content-editor-quote-block.component-C3GFAGKF.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngstarter-ui-components-content-editor-quote-block.component-CUxKoeb_.mjs","sources":["../../../projects/components/content-editor/src/_builder/quote-block/quote-block.component.ts","../../../projects/components/content-editor/src/_builder/quote-block/quote-block.component.html"],"sourcesContent":["import { NgsHeadlessEditorText } from '@ngstarter-ui/components/headless-editor';\nimport { ContentEditorText } from '../../types';\nimport { contentEditorText, cloneContentEditorValue } from '../../document';\nimport {\n ChangeDetectionStrategy,\n Component, computed, effect, untracked,\n DestroyRef,\n ElementRef,\n inject,\n input,\n OnInit,\n signal,\n viewChild\n} from '@angular/core';\nimport { ContentBuilderStore } from '../../content-builder.store';\nimport {\n CONTENT_BUILDER,\n CONTENT_EDITOR_BLOCK,\n ContentEditorDataBlock,\n ContentEditorItemProperty\n} from '../../types';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ContentEditorContentEditableDirective } from '../../content-editor-content-editable.directive';\nimport { ContentBuilderComponent } from '../../content-builder/content-builder.component';\n\nexport interface ContentEditorQuoteBlockContent {\n cite: {\n content: ContentEditorText;\n props: ContentEditorItemProperty[];\n };\n caption?: {\n content: ContentEditorText;\n props: ContentEditorItemProperty[];\n }\n}\n\nexport interface ContentEditorQuoteBlock {\n content: ContentEditorQuoteBlockContent,\n settings: any\n}\n\n@Component({\n selector: 'ngs-quote-block',\n exportAs: 'ngsQuoteBlock',\n imports: [\n ContentEditorContentEditableDirective,\n ],\n providers: [\n {\n provide: CONTENT_EDITOR_BLOCK,\n useExisting: QuoteBlockComponent,\n multi: true\n }\n ],\n templateUrl: './quote-block.component.html',\n styleUrl: './quote-block.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class QuoteBlockComponent implements OnInit, ContentEditorDataBlock {\n private _store = inject(ContentBuilderStore);\n private _contentBuilder = inject<ContentBuilderComponent>(CONTENT_BUILDER);\n private _destroyRef = inject(DestroyRef);\n\n private _contentRef = viewChild.required<ElementRef<HTMLParagraphElement>>('contentRef');\n\n id = input.required<string>();\n content = input.required<ContentEditorQuoteBlockContent>();\n settings = input.required<any>();\n index = input.required<number>();\n props = input<ContentEditorItemProperty[]>([]);\n placeholder = input('Enter quote here');\n captionPlaceholder = input('Enter caption here');\n\n protected _citeContent = signal<ContentEditorText>([]);\n protected _citeProps = signal<ContentEditorItemProperty[]>([]);\n protected _captionContent = signal<ContentEditorText>([]);\n protected _captionProps = signal<ContentEditorItemProperty[]>([]);\n protected _isEmpty = signal<boolean>(true);\n readonly initialized = signal(false);\n\n citeOriginalContent = computed(() => {\n return this.content().cite.content || [];\n });\n citeOriginalProps = computed(() => {\n return this.content().cite.props || [];\n });\n captionOriginalContent = computed(() => {\n return this.content().caption?.content || [];\n });\n captionOriginalProps = computed(() => {\n return this.content().caption?.props || [];\n });\n\n constructor() {\n effect(() => {\n const content = this.content();\n untracked(() => {\n this._citeContent.set(content.cite.content);\n this._citeProps.set(cloneContentEditorValue(content.cite.props));\n this._captionContent.set(content.caption?.content ?? []);\n this._captionProps.set(cloneContentEditorValue(content.caption?.props ?? []));\n this._isEmpty.set(!contentEditorText(content.cite.content).trim());\n });\n });\n }\n\n ngOnInit() {\n this._citeContent.set(this.citeOriginalContent());\n this._citeProps.set(this.citeOriginalProps());\n this._captionContent.set(this.captionOriginalContent());\n this._captionProps.set(this.captionOriginalProps());\n this._isEmpty.set(this._citeContent().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 }\n\n focus() {\n const element = this._contentRef().nativeElement;\n const range = window.document.createRange();\n range.setStart(element, 0);\n range.setEnd(element, 0);\n const selection = window.getSelection() as Selection;\n selection.removeAllRanges();\n selection.addRange(range);\n }\n\n getData(): any {\n return {\n content: {\n cite: {\n content: this._citeContent(),\n props: this._citeProps(),\n },\n caption: {\n content: this._captionContent(),\n props: this._captionProps(),\n }\n },\n settings: {\n ...this.settings(),\n }\n };\n }\n\n isEmpty(): boolean {\n return !contentEditorText(this._citeContent()).trim();\n }\n\n protected onCiteContentChanged(content: readonly NgsHeadlessEditorText[]) {\n if (!this.initialized()) {\n return;\n }\n\n this._isEmpty.set(!contentEditorText(content).trim());\n this._citeContent.set(content);\n this.update();\n }\n\n protected onCaptionContentChanged(content: readonly NgsHeadlessEditorText[]) {\n if (!this.initialized()) {\n return;\n }\n\n this._captionContent.set(content);\n this.update();\n }\n\n protected onCitePropsChanged(props: ContentEditorItemProperty[]) {\n this._citeProps.set(props);\n this.update();\n }\n\n protected onCaptionPropsChanged(props: ContentEditorItemProperty[]) {\n this._captionProps.set(props);\n this.update();\n }\n\n protected onPressedEnter(event: KeyboardEvent) {\n event.preventDefault();\n event.stopPropagation();\n this._contentBuilder.insertEmptyBlock(this.index());\n }\n\n protected onContentEditableInitialized() {\n if (this._store.focusedBlockId() === this.id()) {\n this.focus();\n }\n\n this.initialized.set(true);\n }\n\n private update() {\n this._store.updateBlock(this.id(), {...this.getData(), isEmpty: this.isEmpty()});\n this._contentBuilder.emitContentChangeEvent();\n }\n}\n","<blockquote #contentRef\n #contentEditableRef=\"ngsContentEditorContentEditable\"\n class=\"content\"\n [singleLine]=\"true\"\n [ngsContentEditorContentEditable]=\"citeOriginalContent()\"\n [props]=\"citeOriginalProps()\"\n (propsChanged)=\"onCitePropsChanged($event)\"\n [attr.data-empty-placeholder]=\"placeholder()\"\n (contentChanged)=\"onCiteContentChanged($event)\"\n (pressedEnter)=\"onPressedEnter($event)\"\n (initialized)=\"onContentEditableInitialized()\"></blockquote>\n<div class=\"caption\"\n #captionRef\n #captionEditableRef=\"ngsContentEditorContentEditable\"\n [singleLine]=\"true\"\n [ngsContentEditorContentEditable]=\"captionOriginalContent()\"\n [props]=\"captionOriginalProps()\"\n (propsChanged)=\"onCaptionPropsChanged($event)\"\n [attr.data-empty-placeholder]=\"placeholder()\"\n (contentChanged)=\"onCaptionContentChanged($event)\"\n (pressedEnter)=\"onPressedEnter($event)\"></div>\n"],"names":[],"mappings":";;;;;MA0Da,mBAAmB,CAAA;AACtB,IAAA,MAAM,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACpC,IAAA,eAAe,GAAG,MAAM,CAA0B,eAAe,CAAC;AAClE,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAEhC,IAAA,WAAW,GAAG,SAAS,CAAC,QAAQ,CAAmC,YAAY;oFAAC;IAExF,EAAE,GAAG,KAAK,CAAC,QAAQ;2EAAU;IAC7B,OAAO,GAAG,KAAK,CAAC,QAAQ;gFAAkC;IAC1D,QAAQ,GAAG,KAAK,CAAC,QAAQ;iFAAO;IAChC,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAAU;IAChC,KAAK,GAAG,KAAK,CAA8B,EAAE;8EAAC;IAC9C,WAAW,GAAG,KAAK,CAAC,kBAAkB;oFAAC;IACvC,kBAAkB,GAAG,KAAK,CAAC,oBAAoB;2FAAC;IAEtC,YAAY,GAAG,MAAM,CAAoB,EAAE;qFAAC;IAC5C,UAAU,GAAG,MAAM,CAA8B,EAAE;mF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EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,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,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,kBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"ngstarter-ui-components-content-editor-quote-block.component-C3GFAGKF.mjs","sources":["../../../projects/components/content-editor/src/_builder/quote-block/quote-block.component.ts","../../../projects/components/content-editor/src/_builder/quote-block/quote-block.component.html"],"sourcesContent":["import { NgsHeadlessEditorText } from '@ngstarter-ui/components/headless-editor';\nimport { ContentEditorText } from '../../types';\nimport { contentEditorText, cloneContentEditorValue } from '../../document';\nimport {\n ChangeDetectionStrategy,\n Component, computed, effect, untracked,\n DestroyRef,\n ElementRef,\n inject,\n input,\n OnInit,\n signal,\n viewChild\n} from '@angular/core';\nimport { ContentBuilderStore } from '../../content-builder.store';\nimport {\n CONTENT_BUILDER,\n CONTENT_EDITOR_BLOCK,\n ContentEditorDataBlock,\n ContentEditorItemProperty\n} from '../../types';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ContentEditorContentEditableDirective } from '../../content-editor-content-editable.directive';\nimport { ContentBuilderComponent } from '../../content-builder/content-builder.component';\n\nexport interface ContentEditorQuoteBlockContent {\n cite: {\n content: ContentEditorText;\n props: ContentEditorItemProperty[];\n };\n caption?: {\n content: ContentEditorText;\n props: ContentEditorItemProperty[];\n }\n}\n\nexport interface ContentEditorQuoteBlock {\n content: ContentEditorQuoteBlockContent,\n settings: any\n}\n\n@Component({\n selector: 'ngs-quote-block',\n exportAs: 'ngsQuoteBlock',\n imports: [\n ContentEditorContentEditableDirective,\n ],\n providers: [\n {\n provide: CONTENT_EDITOR_BLOCK,\n useExisting: QuoteBlockComponent,\n multi: true\n }\n ],\n templateUrl: './quote-block.component.html',\n styleUrl: './quote-block.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class QuoteBlockComponent implements OnInit, ContentEditorDataBlock {\n private _store = inject(ContentBuilderStore);\n private _contentBuilder = inject<ContentBuilderComponent>(CONTENT_BUILDER);\n private _destroyRef = inject(DestroyRef);\n\n private _contentRef = viewChild.required<ElementRef<HTMLParagraphElement>>('contentRef');\n\n id = input.required<string>();\n content = input.required<ContentEditorQuoteBlockContent>();\n settings = input.required<any>();\n index = input.required<number>();\n props = input<ContentEditorItemProperty[]>([]);\n placeholder = input('Enter quote here');\n captionPlaceholder = input('Enter caption here');\n\n protected _citeContent = signal<ContentEditorText>([]);\n protected _citeProps = signal<ContentEditorItemProperty[]>([]);\n protected _captionContent = signal<ContentEditorText>([]);\n protected _captionProps = signal<ContentEditorItemProperty[]>([]);\n protected _isEmpty = signal<boolean>(true);\n readonly initialized = signal(false);\n\n citeOriginalContent = computed(() => {\n return this.content().cite.content || [];\n });\n citeOriginalProps = computed(() => {\n return this.content().cite.props || [];\n });\n captionOriginalContent = computed(() => {\n return this.content().caption?.content || [];\n });\n captionOriginalProps = computed(() => {\n return this.content().caption?.props || [];\n });\n\n constructor() {\n effect(() => {\n const content = this.content();\n untracked(() => {\n this._citeContent.set(content.cite.content);\n this._citeProps.set(cloneContentEditorValue(content.cite.props));\n this._captionContent.set(content.caption?.content ?? []);\n this._captionProps.set(cloneContentEditorValue(content.caption?.props ?? []));\n this._isEmpty.set(!contentEditorText(content.cite.content).trim());\n });\n });\n }\n\n ngOnInit() {\n this._citeContent.set(this.citeOriginalContent());\n this._citeProps.set(this.citeOriginalProps());\n this._captionContent.set(this.captionOriginalContent());\n this._captionProps.set(this.captionOriginalProps());\n this._isEmpty.set(this._citeContent().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 }\n\n focus() {\n const element = this._contentRef().nativeElement;\n const range = window.document.createRange();\n range.setStart(element, 0);\n range.setEnd(element, 0);\n const selection = window.getSelection() as Selection;\n selection.removeAllRanges();\n selection.addRange(range);\n }\n\n getData(): any {\n return {\n content: {\n cite: {\n content: this._citeContent(),\n props: this._citeProps(),\n },\n caption: {\n content: this._captionContent(),\n props: this._captionProps(),\n }\n },\n settings: {\n ...this.settings(),\n }\n };\n }\n\n isEmpty(): boolean {\n return !contentEditorText(this._citeContent()).trim();\n }\n\n protected onCiteContentChanged(content: readonly NgsHeadlessEditorText[]) {\n if (!this.initialized()) {\n return;\n }\n\n this._isEmpty.set(!contentEditorText(content).trim());\n this._citeContent.set(content);\n this.update();\n }\n\n protected onCaptionContentChanged(content: readonly NgsHeadlessEditorText[]) {\n if (!this.initialized()) {\n return;\n }\n\n this._captionContent.set(content);\n this.update();\n }\n\n protected onCitePropsChanged(props: ContentEditorItemProperty[]) {\n this._citeProps.set(props);\n this.update();\n }\n\n protected onCaptionPropsChanged(props: ContentEditorItemProperty[]) {\n this._captionProps.set(props);\n this.update();\n }\n\n protected onPressedEnter(event: KeyboardEvent) {\n event.preventDefault();\n event.stopPropagation();\n this._contentBuilder.insertEmptyBlock(this.index());\n }\n\n protected onContentEditableInitialized() {\n if (this._store.focusedBlockId() === this.id()) {\n this.focus();\n }\n\n this.initialized.set(true);\n }\n\n private update() {\n this._store.updateBlock(this.id(), {...this.getData(), isEmpty: this.isEmpty()});\n this._contentBuilder.emitContentChangeEvent();\n }\n}\n","<blockquote #contentRef\n #contentEditableRef=\"ngsContentEditorContentEditable\"\n class=\"content\"\n [singleLine]=\"true\"\n [ngsContentEditorContentEditable]=\"citeOriginalContent()\"\n [props]=\"citeOriginalProps()\"\n (propsChanged)=\"onCitePropsChanged($event)\"\n [attr.data-empty-placeholder]=\"placeholder()\"\n (contentChanged)=\"onCiteContentChanged($event)\"\n (pressedEnter)=\"onPressedEnter($event)\"\n (initialized)=\"onContentEditableInitialized()\"></blockquote>\n<div class=\"caption\"\n #captionRef\n #captionEditableRef=\"ngsContentEditorContentEditable\"\n [singleLine]=\"true\"\n [ngsContentEditorContentEditable]=\"captionOriginalContent()\"\n [props]=\"captionOriginalProps()\"\n (propsChanged)=\"onCaptionPropsChanged($event)\"\n [attr.data-empty-placeholder]=\"placeholder()\"\n (contentChanged)=\"onCaptionContentChanged($event)\"\n (pressedEnter)=\"onPressedEnter($event)\"></div>\n"],"names":[],"mappings":";;;;;MA0Da,mBAAmB,CAAA;AACtB,IAAA,MAAM,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACpC,IAAA,eAAe,GAAG,MAAM,CAA0B,eAAe,CAAC;AAClE,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAEhC,IAAA,WAAW,GAAG,SAAS,CAAC,QAAQ,CAAmC,YAAY;oFAAC;IAExF,EAAE,GAAG,KAAK,CAAC,QAAQ;2EAAU;IAC7B,OAAO,GAAG,KAAK,CAAC,QAAQ;gFAAkC;IAC1D,QAAQ,GAAG,KAAK,CAAC,QAAQ;iFAAO;IAChC,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R_BLOCK } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-
|
|
1
|
+
import { a as CONTENT_BUILDER, C as ContentBuilderStore, 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-CR-NrarE.mjs';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { inject, ElementRef, DestroyRef, output, afterNextRender, Directive, PLATFORM_ID, Input, Renderer2, NgZone, input, booleanAttribute, HostBinding, ChangeDetectionStrategy, Component, ChangeDetectorRef, viewChild, signal, effect, untracked } from '@angular/core';
|
|
4
4
|
import { DOCUMENT, isPlatformServer, isPlatformBrowser } from '@angular/common';
|
|
@@ -1627,4 +1627,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
1627
1627
|
}], ctorParameters: () => [], propDecorators: { _tableRef: [{ type: i0.ViewChild, args: ['table', { isSignal: true }] }], 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 }] }] } });
|
|
1628
1628
|
|
|
1629
1629
|
export { TableBlockComponent };
|
|
1630
|
-
//# sourceMappingURL=ngstarter-ui-components-content-editor-table-block.component-
|
|
1630
|
+
//# sourceMappingURL=ngstarter-ui-components-content-editor-table-block.component-DQgs_kyN.mjs.map
|