ngx-t-forms 3.1.2 → 3.1.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/fesm2022/{ngx-t-forms-api-endpoint-config.component-B9tCHtwV.mjs → ngx-t-forms-api-endpoint-config.component-Bt7rWYJq.mjs} +15 -13
- package/fesm2022/ngx-t-forms-api-endpoint-config.component-Bt7rWYJq.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-D2Vty1Aj.mjs → ngx-t-forms-auto-complete-input-element.component-IS266hPn.mjs} +28 -11
- package/fesm2022/ngx-t-forms-auto-complete-input-element.component-IS266hPn.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-Dr2bhCnH.mjs → ngx-t-forms-basic-input-input-element.component-BLcDBM6M.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-Dr2bhCnH.mjs.map → ngx-t-forms-basic-input-input-element.component-BLcDBM6M.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-DLBTjfMj.mjs → ngx-t-forms-calculated-field-rules.component-BMheLioT.mjs} +2 -42
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-BMheLioT.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-Bh6jMmtu.mjs → ngx-t-forms-chip-options-creator-editor.component-mPoQRw0c.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-Bh6jMmtu.mjs.map → ngx-t-forms-chip-options-creator-editor.component-mPoQRw0c.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-conditional-display-config.component-ayrWl-c2.mjs → ngx-t-forms-conditional-display-config.component-Cw7Axzql.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-conditional-display-config.component-ayrWl-c2.mjs.map → ngx-t-forms-conditional-display-config.component-Cw7Axzql.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-nOnJfMTo.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-Cacd0Sl8.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-nOnJfMTo.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-Cacd0Sl8.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-data-source-picker.component-mmyhOBvA.mjs → ngx-t-forms-data-source-picker.component-CwQgtKfU.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-data-source-picker.component-mmyhOBvA.mjs.map → ngx-t-forms-data-source-picker.component-CwQgtKfU.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-DmiBra1D.mjs → ngx-t-forms-date-picker-input-element.component-OAnP4aVx.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-DmiBra1D.mjs.map → ngx-t-forms-date-picker-input-element.component-OAnP4aVx.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-Cke5qSzR.mjs → ngx-t-forms-date-range-picker-input-element.component-DJVUs5xV.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-Cke5qSzR.mjs.map → ngx-t-forms-date-range-picker-input-element.component-DJVUs5xV.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-date-time-picker-input-element.component-2Cq0ZEVD.mjs +232 -0
- package/fesm2022/ngx-t-forms-date-time-picker-input-element.component-2Cq0ZEVD.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-C0xx4jrN.mjs → ngx-t-forms-document-list-label-config-editor.component-CZ-XFrjM.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-C0xx4jrN.mjs.map → ngx-t-forms-document-list-label-config-editor.component-CZ-XFrjM.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-document-picker.component-DI7wtEv6.mjs → ngx-t-forms-document-picker.component-qzqg4O0I.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-document-picker.component-DI7wtEv6.mjs.map → ngx-t-forms-document-picker.component-qzqg4O0I.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-editor-input-element.component-DbogKrdk.mjs → ngx-t-forms-editor-input-element.component-hf5qe7sH.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-editor-input-element.component-DbogKrdk.mjs.map → ngx-t-forms-editor-input-element.component-hf5qe7sH.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-DbwvZghJ.mjs → ngx-t-forms-file-upload-input-element.component-s1pe3gKq.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-DbwvZghJ.mjs.map → ngx-t-forms-file-upload-input-element.component-s1pe3gKq.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-input-selector.component-CkuzNdjx.mjs → ngx-t-forms-form-input-selector.component-T3yqbRnV.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-input-selector.component-CkuzNdjx.mjs.map → ngx-t-forms-form-input-selector.component-T3yqbRnV.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-json-view.component-DBCpa_rZ.mjs → ngx-t-forms-form-json-view.component-D5AXKbXq.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-json-view.component-DBCpa_rZ.mjs.map → ngx-t-forms-form-json-view.component-D5AXKbXq.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-jLj6vePZ.mjs → ngx-t-forms-form-section-stepper.component-5p9gBgjj.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-jLj6vePZ.mjs.map → ngx-t-forms-form-section-stepper.component-5p9gBgjj.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-Iyd0grju.mjs → ngx-t-forms-forms-builder-menu.component-DH4-vxBX.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-Iyd0grju.mjs.map → ngx-t-forms-forms-builder-menu.component-DH4-vxBX.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-geo-location.component-BUXRaPy0.mjs → ngx-t-forms-geo-location.component-CaW4y8X1.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-geo-location.component-BUXRaPy0.mjs.map → ngx-t-forms-geo-location.component-CaW4y8X1.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-header-template-editor.component-BLmAqiQA.mjs → ngx-t-forms-header-template-editor.component-D9lka3Y5.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-header-template-editor.component-BLmAqiQA.mjs.map → ngx-t-forms-header-template-editor.component-D9lka3Y5.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-D6Ffuhbv.mjs → ngx-t-forms-image-capture-input-element.component-Dt50q6pH.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-D6Ffuhbv.mjs.map → ngx-t-forms-image-capture-input-element.component-Dt50q6pH.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-index-CJwmJP3u.mjs +2 -0
- package/fesm2022/ngx-t-forms-index-CJwmJP3u.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-input-custom.component-45DTVv-R.mjs +309 -0
- package/fesm2022/ngx-t-forms-input-custom.component-45DTVv-R.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-input-editor.component-D60TpWzO.mjs → ngx-t-forms-input-editor.component-DNg-p_Wl.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-input-editor.component-D60TpWzO.mjs.map → ngx-t-forms-input-editor.component-DNg-p_Wl.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-yfxnNDPs.mjs → ngx-t-forms-map-mat-options-keys-DvrLH9wd.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-yfxnNDPs.mjs.map → ngx-t-forms-map-mat-options-keys-DvrLH9wd.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-cfBBan80.mjs → ngx-t-forms-mat-chip-list-editor.component-1YdhWOqQ.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-cfBBan80.mjs.map → ngx-t-forms-mat-chip-list-editor.component-1YdhWOqQ.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-BcYuduah.mjs → ngx-t-forms-missing-form-configs.component-P8CDm5nZ.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-BcYuduah.mjs.map → ngx-t-forms-missing-form-configs.component-P8CDm5nZ.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-nLawxM9j.mjs → ngx-t-forms-mscoa-chart-toolbar.component-Cj1zfMAW.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-nLawxM9j.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-Cj1zfMAW.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-config.component-B9G_WlEc.mjs → ngx-t-forms-mscoa-config.component-CyG4Lafw.mjs} +61 -12
- package/fesm2022/ngx-t-forms-mscoa-config.component-CyG4Lafw.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-DKEEZ8MD.mjs → ngx-t-forms-mscoa-segment-config.component-BcAgMwcV.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-DKEEZ8MD.mjs.map → ngx-t-forms-mscoa-segment-config.component-BcAgMwcV.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-multiple-input-input-element.component-B99ANTUL.mjs → ngx-t-forms-multiple-input-input-element.component-DN25FtGd.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-multiple-input-input-element.component-B99ANTUL.mjs.map → ngx-t-forms-multiple-input-input-element.component-DN25FtGd.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-ngx-t-forms-9BfJdjl4.mjs → ngx-t-forms-ngx-t-forms-D_PCGH-i.mjs} +10585 -154
- package/fesm2022/ngx-t-forms-ngx-t-forms-D_PCGH-i.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-paginated-selection-table-Bm5-5VWe.mjs → ngx-t-forms-paginated-selection-table-B62XtkB5.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-paginated-selection-table-Bm5-5VWe.mjs.map → ngx-t-forms-paginated-selection-table-B62XtkB5.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-payload-template-editor.component-2hwGuKAB.mjs → ngx-t-forms-payload-template-editor.component-CY7BRHuw.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-payload-template-editor.component-2hwGuKAB.mjs.map → ngx-t-forms-payload-template-editor.component-CY7BRHuw.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-BvjT2zfL.mjs → ngx-t-forms-pipeline-generator.component-I2K-Csz3.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-BvjT2zfL.mjs.map → ngx-t-forms-pipeline-generator.component-I2K-Csz3.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-quill-input.component-BsuOKfZT.mjs → ngx-t-forms-quill-input.component-BrOSKvq1.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-quill-input.component-BsuOKfZT.mjs.map → ngx-t-forms-quill-input.component-BrOSKvq1.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-record-list-manager.component-BK5nwwDp.mjs → ngx-t-forms-record-list-manager.component-BEeTQy5N.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-record-list-manager.component-BK5nwwDp.mjs.map → ngx-t-forms-record-list-manager.component-BEeTQy5N.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-required-inputs.component-DiwMttVf.mjs → ngx-t-forms-required-inputs.component-BUUrpNR0.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-required-inputs.component-DiwMttVf.mjs.map → ngx-t-forms-required-inputs.component-BUUrpNR0.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-CBgG_f06.mjs → ngx-t-forms-rest-api-call-setup.component-CJyrmfYU.mjs} +345 -176
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-CJyrmfYU.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-section-report.component-CyPpFiWS.mjs → ngx-t-forms-section-report.component-Dxecd1uL.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-section-report.component-CyPpFiWS.mjs.map → ngx-t-forms-section-report.component-Dxecd1uL.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-select-input-element.component-B2wr5_88.mjs → ngx-t-forms-select-input-element.component-DPMSwCHF.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-select-input-element.component-B2wr5_88.mjs.map → ngx-t-forms-select-input-element.component-DPMSwCHF.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-BEZLG1Z8.mjs → ngx-t-forms-selection-options-editor.component-i0c0M02r.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-BEZLG1Z8.mjs.map → ngx-t-forms-selection-options-editor.component-i0c0M02r.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-Cmbd0krg.mjs → ngx-t-forms-textarea-input-element.component-CZ5Zlcdy.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-Cmbd0krg.mjs.map → ngx-t-forms-textarea-input-element.component-CZ5Zlcdy.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-toggle-input-element.component-Dd_FcAoD.mjs → ngx-t-forms-toggle-input-element.component-Cbnjjcv4.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-toggle-input-element.component-Dd_FcAoD.mjs.map → ngx-t-forms-toggle-input-element.component-Cbnjjcv4.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-token-text-input.component-DY04Z0fn.mjs → ngx-t-forms-token-text-input.component-B0_C_BSx.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-token-text-input.component-DY04Z0fn.mjs.map → ngx-t-forms-token-text-input.component-B0_C_BSx.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-validators-config.component-Btmz2cKH.mjs → ngx-t-forms-validators-config.component-BvCwOCgs.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-validators-config.component-Btmz2cKH.mjs.map → ngx-t-forms-validators-config.component-BvCwOCgs.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-workflow-adjudication.component-CT6sN9E4.mjs → ngx-t-forms-workflow-adjudication.component-DzE8_xCE.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-workflow-adjudication.component-CT6sN9E4.mjs.map → ngx-t-forms-workflow-adjudication.component-DzE8_xCE.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms.mjs +1 -1
- package/package.json +3 -3
- package/types/ngx-t-forms.d.ts +1754 -5
- package/fesm2022/ngx-t-forms-api-endpoint-config.component-B9tCHtwV.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-auto-complete-input-element.component-D2Vty1Aj.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-DLBTjfMj.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-index-CKj1Oacc.mjs +0 -2
- package/fesm2022/ngx-t-forms-index-CKj1Oacc.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-input-custom.component-BMui37o-.mjs +0 -105
- package/fesm2022/ngx-t-forms-input-custom.component-BMui37o-.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-config.component-B9G_WlEc.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-9BfJdjl4.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-CBgG_f06.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-quill-input.component-BsuOKfZT.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/core/quill-input/quill.config.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/core/editor-full-screen.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/core/editor-full-screen-toggle/editor-full-screen-toggle.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/core/editor-full-screen-toggle/editor-full-screen-toggle.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/core/quill-input/quill-input.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/core/quill-input/quill-input.component.html"],"sourcesContent":["import type Quill from 'quill';\r\nimport type { Op, QuillOptions } from 'quill';\r\n\r\n/**\r\n * Serialized Quill document — the Delta op-list persisted as the control value.\r\n *\r\n * Stored as a plain object (NOT a live `Delta` instance) so it round-trips through\r\n * reactive-form state and the library's structural `_isEqual` check cleanly. `_isEqual`\r\n * rejects values whose constructors differ, so a `Delta` instance would never compare\r\n * equal to the plain object rehydrated from saved form data.\r\n */\r\nexport interface QuillContent {\r\n ops: Op[];\r\n}\r\n\r\n/** Inputs the host component feeds into the Quill setup. */\r\nexport interface QuillEditorPayload {\r\n /** Render the editor in non-editable mode. */\r\n readOnly: boolean;\r\n /** Placeholder shown while the document is empty. */\r\n placeholder?: string;\r\n}\r\n\r\n/**\r\n * Narrow surface of Quill's built-in table module (`getModule('table')`), typed so the\r\n * host component can drive table operations without leaking `any`.\r\n */\r\nexport interface QuillTableModule {\r\n insertTable(rows: number, columns: number): void;\r\n insertRowBelow(): void;\r\n insertColumnRight(): void;\r\n deleteRow(): void;\r\n deleteColumn(): void;\r\n deleteTable(): void;\r\n}\r\n\r\n/** A custom toolbar control wired to a native Quill table operation. */\r\nexport interface QuillTableControl {\r\n /** Toolbar format key — Quill renders it as a `button.ql-<format>`. */\r\n format: string;\r\n /** Tooltip surfaced via the button's `title` attribute. */\r\n title: string;\r\n /** Inline SVG markup. Paths use `ql-stroke` so they inherit the themed icon colour. */\r\n icon: string;\r\n /** Operation run against the native table module when the button is pressed. */\r\n run: (table: QuillTableModule) => void;\r\n}\r\n\r\nconst svg = (body: string): string => `<svg viewBox=\"0 0 18 18\">${body}</svg>`;\r\n\r\n/**\r\n * Word-like table toolkit backed by Quill's native table module. Each control degrades to a\r\n * no-op when the caret is outside a table, so the buttons are always safe to press.\r\n */\r\nexport const QUILL_TABLE_CONTROLS: readonly QuillTableControl[] = [\r\n {\r\n format: 'table-insert',\r\n title: 'Insert table (3×3)',\r\n icon: svg('<rect class=\"ql-stroke\" fill=\"none\" x=\"3\" y=\"4\" width=\"12\" height=\"10\" rx=\"1\"></rect><line class=\"ql-stroke\" x1=\"3\" y1=\"7.3\" x2=\"15\" y2=\"7.3\"></line><line class=\"ql-stroke\" x1=\"3\" y1=\"10.6\" x2=\"15\" y2=\"10.6\"></line><line class=\"ql-stroke\" x1=\"7\" y1=\"4\" x2=\"7\" y2=\"14\"></line><line class=\"ql-stroke\" x1=\"11\" y1=\"4\" x2=\"11\" y2=\"14\"></line>'),\r\n run: table => table.insertTable(3, 3),\r\n },\r\n {\r\n format: 'table-row',\r\n title: 'Insert row below',\r\n icon: svg('<rect class=\"ql-stroke\" fill=\"none\" x=\"3\" y=\"3\" width=\"12\" height=\"6\" rx=\"1\"></rect><line class=\"ql-stroke\" x1=\"9\" y1=\"11\" x2=\"9\" y2=\"15\"></line><line class=\"ql-stroke\" x1=\"7\" y1=\"13\" x2=\"11\" y2=\"13\"></line>'),\r\n run: table => table.insertRowBelow(),\r\n },\r\n {\r\n format: 'table-column',\r\n title: 'Insert column right',\r\n icon: svg('<rect class=\"ql-stroke\" fill=\"none\" x=\"3\" y=\"3\" width=\"6\" height=\"12\" rx=\"1\"></rect><line class=\"ql-stroke\" x1=\"13\" y1=\"6\" x2=\"13\" y2=\"12\"></line><line class=\"ql-stroke\" x1=\"11\" y1=\"9\" x2=\"15\" y2=\"9\"></line>'),\r\n run: table => table.insertColumnRight(),\r\n },\r\n {\r\n format: 'table-delete-row',\r\n title: 'Delete row',\r\n icon: svg('<rect class=\"ql-stroke\" fill=\"none\" x=\"3\" y=\"3\" width=\"12\" height=\"6\" rx=\"1\"></rect><line class=\"ql-stroke\" x1=\"7\" y1=\"13\" x2=\"11\" y2=\"13\"></line>'),\r\n run: table => table.deleteRow(),\r\n },\r\n {\r\n format: 'table-delete-column',\r\n title: 'Delete column',\r\n icon: svg('<rect class=\"ql-stroke\" fill=\"none\" x=\"3\" y=\"3\" width=\"6\" height=\"12\" rx=\"1\"></rect><line class=\"ql-stroke\" x1=\"11\" y1=\"9\" x2=\"15\" y2=\"9\"></line>'),\r\n run: table => table.deleteColumn(),\r\n },\r\n {\r\n format: 'table-delete',\r\n title: 'Delete table',\r\n icon: svg('<rect class=\"ql-stroke\" fill=\"none\" x=\"3\" y=\"3\" width=\"12\" height=\"12\" rx=\"1\"></rect><line class=\"ql-stroke\" x1=\"5.5\" y1=\"5.5\" x2=\"12.5\" y2=\"12.5\"></line><line class=\"ql-stroke\" x1=\"12.5\" y1=\"5.5\" x2=\"5.5\" y2=\"12.5\"></line>'),\r\n run: table => table.deleteTable(),\r\n },\r\n];\r\n\r\n/**\r\n * Human-readable tooltips for the built-in controls, keyed by the button's CSS selector.\r\n * Quill ships no titles of its own, so these make the toolbar self-explanatory.\r\n */\r\nexport const QUILL_BUILTIN_TITLES: Readonly<Record<string, string>> = {\r\n '.ql-bold': 'Bold',\r\n '.ql-italic': 'Italic',\r\n '.ql-underline': 'Underline',\r\n '.ql-strike': 'Strikethrough',\r\n '.ql-blockquote': 'Quote',\r\n '.ql-code-block': 'Code block',\r\n '.ql-link': 'Insert link',\r\n '.ql-image': 'Insert image',\r\n '.ql-video': 'Embed video',\r\n '.ql-clean': 'Clear formatting',\r\n '.ql-list[value=\"ordered\"]': 'Numbered list',\r\n '.ql-list[value=\"bullet\"]': 'Bulleted list',\r\n '.ql-list[value=\"check\"]': 'Checklist',\r\n '.ql-script[value=\"sub\"]': 'Subscript',\r\n '.ql-script[value=\"super\"]': 'Superscript',\r\n '.ql-indent[value=\"-1\"]': 'Decrease indent',\r\n '.ql-indent[value=\"+1\"]': 'Increase indent',\r\n '.ql-direction[value=\"rtl\"]': 'Right-to-left',\r\n '.ql-color': 'Text colour',\r\n '.ql-background': 'Highlight colour',\r\n '.ql-align': 'Alignment',\r\n '.ql-header': 'Heading',\r\n '.ql-font': 'Font',\r\n '.ql-size': 'Font size',\r\n};\r\n\r\n/**\r\n * Comprehensive, logically grouped \"snow\" toolbar — headings/fonts, inline styling, colour,\r\n * scripts, lists, indentation/alignment, blocks, media and a native table toolkit.\r\n */\r\nconst TOOLBAR_CONTAINER: readonly unknown[] = [\r\n [{ header: [1, 2, 3, 4, 5, 6, false] }, { font: [] }, { size: ['small', false, 'large', 'huge'] }],\r\n ['bold', 'italic', 'underline', 'strike'],\r\n [{ color: [] }, { background: [] }],\r\n [{ script: 'sub' }, { script: 'super' }],\r\n [{ list: 'ordered' }, { list: 'bullet' }, { list: 'check' }],\r\n [{ indent: '-1' }, { indent: '+1' }, { align: [] }, { direction: 'rtl' }],\r\n ['blockquote', 'code-block'],\r\n ['link', 'image', 'video'],\r\n QUILL_TABLE_CONTROLS.map(control => control.format),\r\n ['clean']\r\n];\r\n\r\n/** The `this` context Quill binds when it invokes a toolbar handler. */\r\ninterface ToolbarHandlerContext {\r\n quill: Quill;\r\n}\r\n\r\n/**\r\n * Builds the toolbar handler map for the custom table buttons.\r\n *\r\n * These MUST be supplied in the toolbar config (not added later via `addHandler`): Quill's\r\n * toolbar skips attaching a click listener to any button whose format is neither a registered\r\n * blot nor already present in `handlers` at construction time. A late `addHandler` sets the\r\n * handler but never re-attaches the listener, so the button stays inert.\r\n */\r\nconst buildTableHandlers = (): Record<string, (this: ToolbarHandlerContext) => void> => {\r\n const handlers: Record<string, (this: ToolbarHandlerContext) => void> = {};\r\n for (const control of QUILL_TABLE_CONTROLS) {\r\n handlers[control.format] = function tableHandler(this: ToolbarHandlerContext): void {\r\n const table = this.quill.getModule('table') as QuillTableModule;\r\n // Native table ops bail when there is no selection; force focus + a range first.\r\n this.quill.getSelection(true);\r\n control.run(table);\r\n };\r\n }\r\n return handlers;\r\n};\r\n\r\n/**\r\n * Builds a ready-to-use `QuillOptions` for a \"snow\" editor with the native table module\r\n * enabled and the custom table-button handlers wired into the toolbar config.\r\n *\r\n * Browser-only by construction: callers MUST instantiate Quill behind an\r\n * `isPlatformBrowser(...)` guard because Quill touches `document` at construction time.\r\n */\r\nexport const buildQuillOptions = (payload: QuillEditorPayload): QuillOptions => ({\r\n theme: 'snow',\r\n readOnly: payload.readOnly,\r\n placeholder: payload.placeholder ?? \"Let's write something amazing...\",\r\n modules: {\r\n toolbar: {\r\n container: TOOLBAR_CONTAINER,\r\n handlers: buildTableHandlers()\r\n },\r\n table: true,\r\n history: { delay: 1000, maxStack: 100, userOnly: true },\r\n clipboard: { matchVisual: false }\r\n }\r\n});\r\n\r\n/**\r\n * Quill's empty document is a single trailing newline op. Treat that — and a literally\r\n * empty op-list — as \"no value\" so `required` validation behaves intuitively.\r\n */\r\nexport const isEmptyQuillDocument = (ops: Op[]): boolean =>\r\n ops.length === 0 || (ops.length === 1 && ops[0]?.insert === '\\n');\r\n","/**\r\n * Element-level \"pop out to full screen\" shared by the rich-text editors in this folder.\r\n *\r\n * A plain `position: fixed` overlay is **not** sufficient here, and that is the whole point of\r\n * this file. The editors render inside a `mat-form-field`, which consumers routinely nest inside\r\n * a Material stepper, tab body, drawer or dialog. `position: fixed` is viewport-relative only\r\n * while **no** ancestor establishes a containing block — any ancestor with `transform`, `filter`,\r\n * `contain`, `will-change`, `backdrop-filter` or `perspective` captures it, and that ancestor's\r\n * `overflow: hidden` then clips it. Which of those a consumer uses is unknowable from in here, so\r\n * the pop-out has to stop depending on the host component altogether.\r\n *\r\n * The browser's **top layer** is what does that: elements promoted into it are painted outside\r\n * the ancestor chain and are immune to ancestor `transform`, `overflow`, `z-index` and stacking\r\n * contexts. Three strategies are tried, best first:\r\n *\r\n * 1. `requestFullscreen()` — top layer **and** drops the browser chrome. Needs a user gesture.\r\n * 2. `showPopover()` — top layer, no gesture required; covers browsers where element full screen\r\n * is unavailable (Safari on iPhone) or blocked by a `fullscreen` permissions policy in an\r\n * iframe.\r\n * 3. `position: fixed` — last resort for browsers with neither API.\r\n *\r\n * The element is promoted **in place** — never re-parented to `<body>`. Top-layer promotion\r\n * changes painting, not inheritance, so the editor keeps inheriting the app's `--mat-sys-*` theme\r\n * variables from its real ancestors; a portal to `<body>` would lose them.\r\n *\r\n * Only the standard, promise-returning `requestFullscreen` is used. The legacy\r\n * `webkitRequestFullscreen` returns `void` and reports failure through a separate event, so a\r\n * rejection could not be observed in time to fall through cleanly — those browsers take path 2/3.\r\n */\r\n\r\n/**\r\n * Class carried by the element while it is popped out. Each editor styles it in its own\r\n * stylesheet, and that rule **must** set a `display` value: it is what keeps the element visible\r\n * during the popover path (see {@link EditorFullScreenHost.enter}).\r\n */\r\nexport const EDITOR_FULL_SCREEN_CLASS = 'is-fullscreen';\r\n\r\n/** Mechanism currently holding the element open. */\r\nexport type EditorFullScreenMode = 'fullscreen' | 'popover' | 'fixed';\r\n\r\n/**\r\n * Owns the pop-out of a single element. One instance per editor; created behind the component's\r\n * `isPlatformBrowser` guard so nothing here runs during SSR.\r\n */\r\nexport class EditorFullScreenHost {\r\n readonly #document: Document;\r\n readonly #onExternalExit: () => void;\r\n\r\n #element: HTMLElement | undefined;\r\n #mode: EditorFullScreenMode | undefined;\r\n\r\n /**\r\n * @param document The owning document, injected via `DOCUMENT` — never the global.\r\n * @param onExternalExit Called when the browser closed the pop-out without going through\r\n * {@link exit} (Escape, F11, another element claiming full screen).\r\n */\r\n constructor(document: Document, onExternalExit: () => void) {\r\n this.#document = document;\r\n this.#onExternalExit = onExternalExit;\r\n this.#document.addEventListener('fullscreenchange', this.#handleFullScreenChange);\r\n }\r\n\r\n /** Whether an element is currently popped out. */\r\n get active(): boolean {\r\n return this.#mode !== undefined;\r\n }\r\n\r\n /**\r\n * Pops `element` out using the best mechanism the browser allows, adding\r\n * {@link EDITOR_FULL_SCREEN_CLASS} for the duration.\r\n *\r\n * Must be called synchronously from a user gesture, otherwise the Fullscreen API rejects and\r\n * the pop-out silently degrades to the popover path.\r\n *\r\n * @param element The element to promote — must be the one carrying the editor chrome.\r\n * @returns The mechanism that ended up being used.\r\n */\r\n async enter(element: HTMLElement): Promise<EditorFullScreenMode> {\r\n if (this.#mode !== undefined) return this.#mode;\r\n\r\n // Added first, and deliberately so: the class sets `display`, which — being author origin —\r\n // beats the UA's `[popover]:not(:popover-open) { display: none }`. Without it the element\r\n // would be display:none for the window between `setAttribute` and `showPopover()` below, and\r\n // a style recalculation inside that window blurs whatever the user was typing in.\r\n this.#element = element;\r\n element.classList.add(EDITOR_FULL_SCREEN_CLASS);\r\n\r\n // `fullscreenEnabled` is false when a permissions policy blocks it (an iframe without\r\n // `allow=\"fullscreen\"`) and where element full screen is unsupported (Safari on iPhone).\r\n if (this.#document.fullscreenEnabled && typeof element.requestFullscreen === 'function') {\r\n try {\r\n await element.requestFullscreen();\r\n this.#mode = 'fullscreen';\r\n return this.#mode;\r\n } catch {\r\n // Rejected — no transient activation, or the UA refused. Fall through to the top-layer\r\n // popover, which needs neither.\r\n }\r\n }\r\n\r\n if (typeof element.showPopover === 'function') {\r\n element.setAttribute('popover', 'manual');\r\n try {\r\n element.showPopover();\r\n this.#mode = 'popover';\r\n return this.#mode;\r\n } catch {\r\n element.removeAttribute('popover');\r\n }\r\n }\r\n\r\n this.#mode = 'fixed';\r\n return this.#mode;\r\n }\r\n\r\n /** Closes the pop-out and returns the element to its place in the document flow. */\r\n async exit(): Promise<void> {\r\n const element = this.#element;\r\n const mode = this.#mode;\r\n this.#element = undefined;\r\n this.#mode = undefined;\r\n if (!element || mode === undefined) return;\r\n\r\n try {\r\n if (mode === 'fullscreen') {\r\n // Leave full screen first: `exitFullscreen()` settles only once the browser's own\r\n // transition has finished, and the class is what styles the surface until then.\r\n if (this.#document.fullscreenElement === element) await this.#document.exitFullscreen();\r\n } else if (mode === 'popover') {\r\n element.hidePopover();\r\n element.removeAttribute('popover');\r\n }\r\n } finally {\r\n element.classList.remove(EDITOR_FULL_SCREEN_CLASS);\r\n }\r\n }\r\n\r\n /** Detaches the document listener and closes any open pop-out. Call from `ngOnDestroy`. */\r\n destroy(): void {\r\n this.#document.removeEventListener('fullscreenchange', this.#handleFullScreenChange);\r\n void this.exit();\r\n }\r\n\r\n /**\r\n * The browser can close a native full screen behind our back — Escape, F11, or another element\r\n * taking the top layer. Reconcile our own state and tell the owner so its toggle follows.\r\n */\r\n readonly #handleFullScreenChange = (): void => {\r\n if (this.#mode !== 'fullscreen') return;\r\n if (this.#document.fullscreenElement === this.#element) return;\r\n\r\n this.#element?.classList.remove(EDITOR_FULL_SCREEN_CLASS);\r\n this.#element = undefined;\r\n this.#mode = undefined;\r\n this.#onExternalExit();\r\n };\r\n}\r\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input, output } from '@angular/core';\r\n\r\n/**\r\n * Floating action button that pops a rich-text editor out to full screen and back.\r\n *\r\n * Shared by the Quill and Editor.js inputs so both carry the same affordance, icon and\r\n * accessible naming. It deliberately owns no state: the editor that hosts it drives {@link active}\r\n * and performs the promotion (see `editor-full-screen.ts`).\r\n *\r\n * Positioning belongs to the host — this component styles only the button. Place it by targeting\r\n * the element selector from the host's stylesheet.\r\n *\r\n * @example\r\n * <lib-editor-full-screen-toggle [active]=\"fullScreen()\" (toggled)=\"toggleFullScreen()\" />\r\n */\r\n@Component({\r\n selector: 'lib-editor-full-screen-toggle',\r\n templateUrl: './editor-full-screen-toggle.component.html',\r\n styleUrl: './editor-full-screen-toggle.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: {\r\n 'class': 'lib-editor-full-screen-toggle'\r\n },\r\n imports: []\r\n})\r\nexport class EditorFullScreenToggleComponent {\r\n /** Whether the editor this controls is currently popped out. */\r\n readonly active = input.required<boolean>();\r\n\r\n /** Emitted when the user asks to enter or leave full screen. */\r\n readonly toggled = output<void>();\r\n\r\n /** Serves as both tooltip and accessible name, so the two can never drift apart. */\r\n protected readonly label = computed(() => (this.active() ? 'Exit full screen' : 'Full screen'));\r\n}\r\n","<button\r\n type=\"button\"\r\n class=\"fab\"\r\n [title]=\"label()\"\r\n [attr.aria-label]=\"label()\"\r\n [attr.aria-pressed]=\"active()\"\r\n (click)=\"toggled.emit()\"\r\n>\r\n @if (active()) {\r\n <svg viewBox=\"0 0 18 18\" aria-hidden=\"true\">\r\n <polyline points=\"3 7 7 7 7 3\"></polyline>\r\n <polyline points=\"11 3 11 7 15 7\"></polyline>\r\n <polyline points=\"15 11 11 11 11 15\"></polyline>\r\n <polyline points=\"7 15 7 11 3 11\"></polyline>\r\n </svg>\r\n } @else {\r\n <svg viewBox=\"0 0 18 18\" aria-hidden=\"true\">\r\n <polyline points=\"7 3 3 3 3 7\"></polyline>\r\n <polyline points=\"11 3 15 3 15 7\"></polyline>\r\n <polyline points=\"15 11 15 15 11 15\"></polyline>\r\n <polyline points=\"3 11 3 15 7 15\"></polyline>\r\n </svg>\r\n }\r\n</button>\r\n","/// <reference path=\"../../../../../../../types/quill.d.ts\" />\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n PLATFORM_ID,\n computed,\n inject,\n input,\n output,\n signal,\n viewChild\n} from '@angular/core';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { NgControl } from '@angular/forms';\n\nimport { ITowerStepColumn } from 'ngx-t-forms-types';\n// Mirrors the EditorJS sibling (Trap 16): `quill` is a browser-only bundle that touches\n// `document` at construction time and crashes under bare-Node SSR. The top-level import is\n// type-only (zero runtime emission); the real load happens inside the SSR-gated\n// `ngAfterViewInit` via dynamic `import()`.\nimport type QuillType from 'quill';\nimport type { Range as QuillRange } from 'quill';\nimport { MatFormFieldControl } from '@angular/material/form-field';\n\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\nimport {\n buildQuillOptions,\n isEmptyQuillDocument,\n QUILL_BUILTIN_TITLES,\n QUILL_TABLE_CONTROLS,\n QuillContent\n} from './quill.config';\nimport { EditorFullScreenHost } from '../editor-full-screen';\nimport { EditorFullScreenToggleComponent } from '../editor-full-screen-toggle/editor-full-screen-toggle.component';\nimport { TokenBindingMenuComponent, type TokenMenuAnchor } from '../../../../../t-dynamic-data-edit/elements/token-binding-menu/token-binding-menu.component';\nimport type { EditorBinding } from '../../../../../t-dynamic-data-edit/elements/json-editor/json-editor.component';\nimport { _isEqual } from '../../../../../../shared/functions/isEqual';\n\nconst customInputConfig: BaseCustomInputConfig = {\n controlType: 'lib-quill-input',\n nextId: 0\n};\n\n/**\n * Quill (\"snow\" theme) rich-text editor wired into Angular Material's form-field as a\n * custom `MatFormFieldControl`. The full Quill setup — toolbar, formats, history — lives in\n * `quill.config.ts`; this component owns lifecycle, SSR gating and value round-tripping.\n */\n@Component({\n selector: 'lib-quill-input',\n templateUrl: './quill-input.component.html',\n styleUrl: './quill-input.component.css',\n imports: [EditorFullScreenToggleComponent, TokenBindingMenuComponent],\n host: {\n '[class.floating]': 'shouldLabelFloat',\n '[id]': 'id',\n '(keydown.escape)': 'onEscape($event)'\n },\n providers: [{ provide: MatFormFieldControl, useExisting: QuillInputComponent }],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class QuillInputComponent\n extends BaseCustomInput<QuillContent | undefined>\n implements AfterViewInit, OnDestroy {\n\n readonly inputConfig = input.required<ITowerStepColumn>();\n\n readonly valueChanged = output<QuillContent | undefined>();\n\n /**\n * Insertable bindings for the `$`-trigger picker. Empty (the default) leaves the\n * gesture inert, so every existing consumer of this editor is unaffected.\n *\n * Same contract, same menu and same inserted spelling as\n * `TokenTextInputComponent` and the JSON template editors — see\n * `_shared/field-bindings.ts`.\n */\n @Input()\n set bindings(value: readonly EditorBinding[] | undefined) {\n this.#bindings.set(value ?? []);\n }\n get bindings(): readonly EditorBinding[] {\n return this.#bindings();\n }\n readonly #bindings = signal<readonly EditorBinding[]>([]);\n\n /** Whether the `$` menu is open. */\n protected readonly menuOpen = signal(false);\n /** Index of the highlighted option. */\n protected readonly activeIndex = signal(0);\n /** Viewport position of the menu, derived from Quill's own caret bounds. */\n protected readonly anchor = signal<TokenMenuAnchor | null>(null);\n /** Text typed after the `$` that opened the menu. */\n readonly #filter = signal('');\n /** Document index of the `$` that opened the menu. */\n #triggerIndex = -1;\n\n /** Matches `TokenTextInputComponent.FILTER_PATTERN` (dots + hyphens included, for `$ns.key` ids) so the gesture feels identical. */\n static readonly FILTER_PATTERN = /^[a-zA-Z0-9_.\\s-]*$/;\n\n /** Bindings matching the active filter, capped so the list stays usable. */\n protected readonly filtered = computed(() => {\n const term = this.#filter().trim().toLowerCase();\n const all = this.#bindings();\n if (!term) {\n return all.slice(0, 50);\n }\n return all\n .filter(b => (String(b.searchText ?? \"\") + \" \" + b.label).toLowerCase().includes(term))\n .slice(0, 50);\n });\n\n\n protected editor: QuillType | undefined;\n\n /** Whether the editor is currently popped out to fill the screen. */\n protected readonly fullScreen = signal(false);\n\n /** Mirrors the CVA's disabled state into the signal graph so the template can react to it. */\n readonly #controlDisabled = signal(false);\n\n /**\n * Read-only when either the column config or the reactive-form control says so. Drives both\n * Quill's own editable state and hiding the formatting toolbar, which is dead weight when\n * nothing can be edited.\n */\n protected readonly readOnly = computed(() => {\n const config = this.inputConfig();\n return this.#controlDisabled() || config.readonly || config.disabled || false;\n });\n\n /**\n * Height the in-flow wrapper holds onto while the editor is popped out. Set from the editor's\n * measured height on the way in, cleared on the way out.\n */\n protected readonly reservedHeight = signal<number | null>(null);\n\n private readonly editorHost = viewChild.required<ElementRef<HTMLElement>>('editorHost');\n\n /**\n * The bordered surface Quill fills — toolbar included. This is what gets promoted to the\n * browser's top layer. (`viewChild` cannot sit on an ES-private field — NG1053.)\n */\n private readonly quillHost = viewChild.required<ElementRef<HTMLElement>>('quillHost');\n\n readonly #platformId = inject(PLATFORM_ID);\n\n readonly #document = inject(DOCUMENT);\n\n #changeHandler: (() => void) | undefined;\n\n /** Bound once so `on`/`off` refer to the same function. */\n readonly #menuSyncHandler = (): void => this.#syncBindingMenu();\n\n #fullScreenHost: EditorFullScreenHost | undefined;\n\n /** Guards against overlapping pop-out transitions (see `#toggleFullScreen`). */\n #toggling = false;\n\n constructor() {\n super(\n inject(NgControl, { optional: true, self: true }) as NgControl,\n inject<ElementRef<HTMLElement>>(ElementRef),\n customInputConfig\n );\n }\n\n override get empty(): boolean {\n const n = this.value;\n return n === null || n === undefined;\n }\n\n override get shouldLabelFloat(): boolean {\n return true;\n }\n\n override _value: QuillContent | undefined = undefined;\n\n @Input() override set value(value: QuillContent | undefined) {\n if (!_isEqual(this._value, value)) {\n this._value = value;\n this.onChange(value);\n this.stateChanges.next();\n }\n }\n\n override get value(): QuillContent | undefined {\n return this._value;\n }\n\n async ngAfterViewInit(): Promise<void> {\n if (!isPlatformBrowser(this.#platformId)) return;\n\n // Browser-only dynamic load — see the Trap 16 comment at the top of this file. The\n // CSS import injects Quill's global theme styles (Quill's runtime DOM is not view-scoped).\n const [{ default: Quill, Delta }] = await Promise.all([\n import('quill'),\n import('quill/dist/quill.snow.css')\n ]);\n\n this.#fullScreenHost = new EditorFullScreenHost(this.#document, () => this.#setFullScreen(false));\n\n const config = this.inputConfig();\n this.editor = new Quill(this.editorHost().nativeElement, buildQuillOptions({\n readOnly: this.readOnly(),\n placeholder: config.placeholder\n }));\n\n const initial = this.value;\n if (initial?.ops?.length) {\n this.editor.setContents(new Delta(initial.ops), 'silent');\n }\n\n // A `setDisabledState` that arrived before the editor existed is applied here.\n this.#applyReadOnly();\n this.#decorateToolbar();\n\n this.#changeHandler = () => this.contentChangedSaveValue();\n this.editor.on('text-change', this.#changeHandler);\n // MENU SYNC RIDES editor-change, NOT text-change: editor-change fires for\n // selection moves too and always AFTER the selection is updated, so\n // getSelection() inside the handler is never stale — and the menu also\n // closes when the caret merely moves away from the trigger.\n this.editor.on('editor-change', this.#menuSyncHandler);\n this.editorHost().nativeElement.addEventListener('keydown', this.#onBindingKeydown, true);\n }\n\n /**\n * Quill ships no icons for custom buttons and no tooltips for any button. Inject themeable\n * SVG icons (their `ql-stroke` paths inherit the toolbar colour) and `title` tooltips so the\n * toolbar reads clearly in both light and dark mode.\n */\n #decorateToolbar(): void {\n const root = this._elementRef.nativeElement;\n for (const control of QUILL_TABLE_CONTROLS) {\n const button = root.querySelector<HTMLElement>(`.ql-${control.format}`);\n if (!button) continue;\n button.innerHTML = control.icon;\n button.setAttribute('title', control.title);\n }\n for (const [selector, title] of Object.entries(QUILL_BUILTIN_TITLES)) {\n root.querySelectorAll<HTMLElement>(selector).forEach(el => el.setAttribute('title', title));\n }\n }\n\n /**\n * Keeps Quill's own read-only state in step with the control's. The pop-out re-enables pointer\n * events on the popped-out surface (Material kills them field-wide when the control is\n * disabled), so this is what actually keeps a disabled field uneditable — the CSS no longer\n * does it.\n */\n override setDisabledState(isDisabled: boolean): void {\n super.setDisabledState(isDisabled);\n this.#controlDisabled.set(isDisabled);\n this.#applyReadOnly();\n }\n\n /** Pushes {@link readOnly} onto the Quill instance, which is not reactive. */\n #applyReadOnly(): void {\n this.editor?.enable(!this.readOnly());\n }\n\n /** Toggles the pop-out from the floating button. */\n protected toggleFullScreen(): void {\n void this.#toggleFullScreen();\n }\n\n /**\n * Pops the editor out to fill the screen, or restores it. Wired to the toolbar button, so it\n * always runs inside the click gesture the Fullscreen API requires — everything up to the\n * promotion is synchronous for that reason.\n */\n async #toggleFullScreen(): Promise<void> {\n const fullScreenHost = this.#fullScreenHost;\n // Both transitions settle asynchronously; ignore clicks that land mid-flight rather than\n // letting a second `requestFullscreen()` race the first.\n if (!fullScreenHost || this.#toggling) return;\n this.#toggling = true;\n\n // Promotion re-lays the editor out, which drops the caret; put it back afterwards.\n // `getSelection()` without an argument reads the range without stealing focus.\n const selection = this.editor?.getSelection() ?? null;\n\n try {\n if (this.fullScreen()) {\n await fullScreenHost.exit();\n } else {\n const element = this.quillHost().nativeElement;\n this.reservedHeight.set(element.offsetHeight);\n await fullScreenHost.enter(element);\n }\n } finally {\n // `enter()` degrades rather than throwing, but `exit()` can reject if the browser refuses\n // to leave full screen. Either way the controller has already settled its own state, so\n // read it back instead of assuming the toggle succeeded.\n this.#setFullScreen(fullScreenHost.active);\n this.#restoreSelection(selection);\n this.#toggling = false;\n }\n }\n\n /**\n * Escape leaves the pop-out. Native full screen is torn down by the browser itself (picked up\n * through `fullscreenchange`); this covers the popover and fixed fallbacks. The event is\n * stopped so Escape closes the editor rather than an enclosing dialog.\n */\n protected onEscape(event: Event): void {\n if (!this.fullScreen()) return;\n event.preventDefault();\n event.stopPropagation();\n void this.#toggleFullScreen();\n }\n\n /**\n * Single funnel for pop-out state, so the signal and the reserved space always agree —\n * including when the browser closed full screen on its own.\n */\n #setFullScreen(active: boolean): void {\n this.fullScreen.set(active);\n if (!active) this.reservedHeight.set(null);\n }\n\n /** Returns the caret to where it was before the pop-out re-laid the editor out. */\n #restoreSelection(selection: QuillRange | null): void {\n const editor = this.editor;\n if (!editor) return;\n if (selection) editor.setSelection(selection, 'silent');\n else editor.focus();\n }\n\n contentChangedSaveValue(): void {\n if (!this.editor) return;\n const ops = this.editor.getContents().ops;\n const value: QuillContent | undefined = isEmptyQuillDocument(ops) ? undefined : { ops };\n this.value = value;\n this.onChange(value);\n this.valueChanged.emit(value);\n }\n\n override ngOnDestroy(): void {\n this.editorHost()?.nativeElement?.removeEventListener('keydown', this.#onBindingKeydown, true);\n this.#fullScreenHost?.destroy();\n this.#fullScreenHost = undefined;\n if (this.editor && this.#changeHandler) {\n this.editor.off('text-change', this.#changeHandler);\n this.editor.off('editor-change', this.#menuSyncHandler);\n }\n this.editor = undefined;\n // Tear the editor down first, then let the base complete `stateChanges` / `destroy$` and\n // clear the temporary-error timer — none of which happened while this override skipped it.\n super.ngOnDestroy();\n }\n\n /**\n * Re-evaluates the `$` menu against the caret. Runs on every editor-change.\n *\n * Quill addresses positions as an index into the document rather than a\n * `selectionStart` on a string, so the caret maths is Quill-specific even\n * though the menu it drives is the shared one.\n */\n #syncBindingMenu(): void {\n const editor = this.editor;\n if (!editor || this.readOnly() || this.#bindings().length === 0) {\n this.menuOpen.set(false);\n return;\n }\n const selection = editor.getSelection();\n if (!selection) {\n this.menuOpen.set(false);\n return;\n }\n const caret = selection.index;\n const before = editor.getText(0, caret);\n const dollar = before.lastIndexOf('$');\n if (dollar < 0) {\n this.menuOpen.set(false);\n return;\n }\n const term = before.slice(dollar + 1);\n if (!QuillInputComponent.FILTER_PATTERN.test(term)) {\n this.menuOpen.set(false);\n return;\n }\n // `getBounds` is relative to the editor container; add its viewport offset.\n const bounds = editor.getBounds(caret);\n const host = this.editorHost().nativeElement.getBoundingClientRect();\n this.anchor.set({\n top: host.top + (bounds?.bottom ?? 0) + 6,\n left: host.left + (bounds?.left ?? 0),\n width: 260,\n });\n this.#triggerIndex = dollar;\n this.#filter.set(term);\n this.activeIndex.set(0);\n this.menuOpen.set(true);\n }\n\n /**\n * Replaces the `$filter` run with the binding token.\n *\n * Inserted as TEXT, which the email compiler promotes to a real token span\n * (`quillToEmailHtml` 's `promoteTextTokens`). An atomic embed blot — which\n * would stop an author splitting a token by formatting half of it — is the\n * next step and does not change this call site.\n */\n protected insertBinding(binding: EditorBinding): void {\n const editor = this.editor;\n if (!editor || this.#triggerIndex < 0) {\n this.menuOpen.set(false);\n return;\n }\n const selection = editor.getSelection();\n const caret = selection?.index ?? this.#triggerIndex;\n const length = Math.max(0, caret - this.#triggerIndex);\n editor.deleteText(this.#triggerIndex, length, 'user');\n editor.insertText(this.#triggerIndex, binding.insert, 'user');\n editor.setSelection(this.#triggerIndex + binding.insert.length, 0, 'user');\n this.menuOpen.set(false);\n this.#filter.set('');\n this.#triggerIndex = -1;\n this.contentChangedSaveValue();\n }\n\n /**\n * Navigation and acceptance while the menu is open.\n *\n * Bound in the CAPTURE phase so it runs before Quill's own keyboard module,\n * which otherwise swallows Enter as a newline and the arrows as caret moves.\n */\n #onBindingKeydown = (event: KeyboardEvent): void => {\n if (!this.menuOpen()) {\n return;\n }\n const options = this.filtered();\n if (event.key === 'Escape') {\n this.menuOpen.set(false);\n event.stopPropagation();\n event.preventDefault();\n return;\n }\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n if (options.length > 0) {\n const step = event.key === 'ArrowDown' ? 1 : -1;\n this.activeIndex.set((this.activeIndex() + step + options.length) % options.length);\n }\n event.stopPropagation();\n event.preventDefault();\n return;\n }\n if (event.key === 'Enter' || event.key === 'Tab') {\n const chosen = options[this.activeIndex()];\n if (chosen) {\n this.insertBinding(chosen);\n event.stopPropagation();\n event.preventDefault();\n }\n }\n };\n}\n","\r\n<!-- `.quill-shell` stays in the document flow and holds the editor's footprint while\r\n `.quill-host` is promoted to the browser's top layer for full screen. Without it the\r\n surrounding form-field collapses by the editor's height, and the page scroll position\r\n jumps when full screen is left. -->\r\n<div class=\"quill-shell\" [style.height.px]=\"reservedHeight()\">\r\n <div class=\"quill-host\" #quillHost [class.is-readonly]=\"readOnly()\">\r\n <div #editorHost></div>\r\n\r\n <!-- Floats over the editing surface rather than living in the toolbar, so it survives the\r\n toolbar being hidden in read-only mode. -->\r\n <lib-editor-full-screen-toggle\r\n [active]=\"fullScreen()\"\r\n (toggled)=\"toggleFullScreen()\"\r\n ></lib-editor-full-screen-toggle>\r\n </div>\r\n</div>\n\n@if (menuOpen()) {\n <lib-token-binding-menu\n [options]=\"filtered()\"\n [activeIndex]=\"activeIndex()\"\n [anchor]=\"anchor()\"\n (pick)=\"insertBinding($event)\" />\n}\n"],"names":[],"mappings":";;;;;;;;AAgDA,MAAM,GAAG,GAAG,CAAC,IAAY,KAAa,CAAA,yBAAA,EAA4B,IAAI,CAAA,MAAA,CAAQ;AAE9E;;;AAGG;AACI,MAAM,oBAAoB,GAAiC;AAChE,IAAA;AACE,QAAA,MAAM,EAAE,cAAc;AACtB,QAAA,KAAK,EAAE,oBAAo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AE,mBAAmB,EAAE,WAAW,EAAA,mBAAqB,EAAE,CAAC,EAAA,eAAA,EAC9D,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,kgCAAA,EAAA,MAAA,EAAA,CAAA,i6MAAA,CAAA,EAAA;;sBAkB9C;AA4DyE,aAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,YAAY,mEAMb,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA;sBAmCnF;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-quill-input.component-BrOSKvq1.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/core/quill-input/quill.config.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/core/editor-full-screen.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/core/editor-full-screen-toggle/editor-full-screen-toggle.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/core/editor-full-screen-toggle/editor-full-screen-toggle.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/core/quill-input/quill-input.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/editor-input-element/core/quill-input/quill-input.component.html"],"sourcesContent":["import type Quill from 'quill';\r\nimport type { Op, QuillOptions } from 'quill';\r\n\r\n/**\r\n * Serialized Quill document — the Delta op-list persisted as the control value.\r\n *\r\n * Stored as a plain object (NOT a live `Delta` instance) so it round-trips through\r\n * reactive-form state and the library's structural `_isEqual` check cleanly. `_isEqual`\r\n * rejects values whose constructors differ, so a `Delta` instance would never compare\r\n * equal to the plain object rehydrated from saved form data.\r\n */\r\nexport interface QuillContent {\r\n ops: Op[];\r\n}\r\n\r\n/** Inputs the host component feeds into the Quill setup. */\r\nexport interface QuillEditorPayload {\r\n /** Render the editor in non-editable mode. */\r\n readOnly: boolean;\r\n /** Placeholder shown while the document is empty. */\r\n placeholder?: string;\r\n}\r\n\r\n/**\r\n * Narrow surface of Quill's built-in table module (`getModule('table')`), typed so the\r\n * host component can drive table operations without leaking `any`.\r\n */\r\nexport interface QuillTableModule {\r\n insertTable(rows: number, columns: number): void;\r\n insertRowBelow(): void;\r\n insertColumnRight(): void;\r\n deleteRow(): void;\r\n deleteColumn(): void;\r\n deleteTable(): void;\r\n}\r\n\r\n/** A custom toolbar control wired to a native Quill table operation. */\r\nexport interface QuillTableControl {\r\n /** Toolbar format key — Quill renders it as a `button.ql-<format>`. */\r\n format: string;\r\n /** Tooltip surfaced via the button's `title` attribute. */\r\n title: string;\r\n /** Inline SVG markup. Paths use `ql-stroke` so they inherit the themed icon colour. */\r\n icon: string;\r\n /** Operation run against the native table module when the button is pressed. */\r\n run: (table: QuillTableModule) => void;\r\n}\r\n\r\nconst svg = (body: string): string => `<svg viewBox=\"0 0 18 18\">${body}</svg>`;\r\n\r\n/**\r\n * Word-like table toolkit backed by Quill's native table module. Each control degrades to a\r\n * no-op when the caret is outside a table, so the buttons are always safe to press.\r\n */\r\nexport const QUILL_TABLE_CONTROLS: readonly QuillTableControl[] = [\r\n {\r\n format: 'table-insert',\r\n title: 'Insert table (3×3)',\r\n icon: svg('<rect class=\"ql-stroke\" fill=\"none\" x=\"3\" y=\"4\" width=\"12\" height=\"10\" rx=\"1\"></rect><line class=\"ql-stroke\" x1=\"3\" y1=\"7.3\" x2=\"15\" y2=\"7.3\"></line><line class=\"ql-stroke\" x1=\"3\" y1=\"10.6\" x2=\"15\" y2=\"10.6\"></line><line class=\"ql-stroke\" x1=\"7\" y1=\"4\" x2=\"7\" y2=\"14\"></line><line class=\"ql-stroke\" x1=\"11\" y1=\"4\" x2=\"11\" y2=\"14\"></line>'),\r\n run: table => table.insertTable(3, 3),\r\n },\r\n {\r\n format: 'table-row',\r\n title: 'Insert row below',\r\n icon: svg('<rect class=\"ql-stroke\" fill=\"none\" x=\"3\" y=\"3\" width=\"12\" height=\"6\" rx=\"1\"></rect><line class=\"ql-stroke\" x1=\"9\" y1=\"11\" x2=\"9\" y2=\"15\"></line><line class=\"ql-stroke\" x1=\"7\" y1=\"13\" x2=\"11\" y2=\"13\"></line>'),\r\n run: table => table.insertRowBelow(),\r\n },\r\n {\r\n format: 'table-column',\r\n title: 'Insert column right',\r\n icon: svg('<rect class=\"ql-stroke\" fill=\"none\" x=\"3\" y=\"3\" width=\"6\" height=\"12\" rx=\"1\"></rect><line class=\"ql-stroke\" x1=\"13\" y1=\"6\" x2=\"13\" y2=\"12\"></line><line class=\"ql-stroke\" x1=\"11\" y1=\"9\" x2=\"15\" y2=\"9\"></line>'),\r\n run: table => table.insertColumnRight(),\r\n },\r\n {\r\n format: 'table-delete-row',\r\n title: 'Delete row',\r\n icon: svg('<rect class=\"ql-stroke\" fill=\"none\" x=\"3\" y=\"3\" width=\"12\" height=\"6\" rx=\"1\"></rect><line class=\"ql-stroke\" x1=\"7\" y1=\"13\" x2=\"11\" y2=\"13\"></line>'),\r\n run: table => table.deleteRow(),\r\n },\r\n {\r\n format: 'table-delete-column',\r\n title: 'Delete column',\r\n icon: svg('<rect class=\"ql-stroke\" fill=\"none\" x=\"3\" y=\"3\" width=\"6\" height=\"12\" rx=\"1\"></rect><line class=\"ql-stroke\" x1=\"11\" y1=\"9\" x2=\"15\" y2=\"9\"></line>'),\r\n run: table => table.deleteColumn(),\r\n },\r\n {\r\n format: 'table-delete',\r\n title: 'Delete table',\r\n icon: svg('<rect class=\"ql-stroke\" fill=\"none\" x=\"3\" y=\"3\" width=\"12\" height=\"12\" rx=\"1\"></rect><line class=\"ql-stroke\" x1=\"5.5\" y1=\"5.5\" x2=\"12.5\" y2=\"12.5\"></line><line class=\"ql-stroke\" x1=\"12.5\" y1=\"5.5\" x2=\"5.5\" y2=\"12.5\"></line>'),\r\n run: table => table.deleteTable(),\r\n },\r\n];\r\n\r\n/**\r\n * Human-readable tooltips for the built-in controls, keyed by the button's CSS selector.\r\n * Quill ships no titles of its own, so these make the toolbar self-explanatory.\r\n */\r\nexport const QUILL_BUILTIN_TITLES: Readonly<Record<string, string>> = {\r\n '.ql-bold': 'Bold',\r\n '.ql-italic': 'Italic',\r\n '.ql-underline': 'Underline',\r\n '.ql-strike': 'Strikethrough',\r\n '.ql-blockquote': 'Quote',\r\n '.ql-code-block': 'Code block',\r\n '.ql-link': 'Insert link',\r\n '.ql-image': 'Insert image',\r\n '.ql-video': 'Embed video',\r\n '.ql-clean': 'Clear formatting',\r\n '.ql-list[value=\"ordered\"]': 'Numbered list',\r\n '.ql-list[value=\"bullet\"]': 'Bulleted list',\r\n '.ql-list[value=\"check\"]': 'Checklist',\r\n '.ql-script[value=\"sub\"]': 'Subscript',\r\n '.ql-script[value=\"super\"]': 'Superscript',\r\n '.ql-indent[value=\"-1\"]': 'Decrease indent',\r\n '.ql-indent[value=\"+1\"]': 'Increase indent',\r\n '.ql-direction[value=\"rtl\"]': 'Right-to-left',\r\n '.ql-color': 'Text colour',\r\n '.ql-background': 'Highlight colour',\r\n '.ql-align': 'Alignment',\r\n '.ql-header': 'Heading',\r\n '.ql-font': 'Font',\r\n '.ql-size': 'Font size',\r\n};\r\n\r\n/**\r\n * Comprehensive, logically grouped \"snow\" toolbar — headings/fonts, inline styling, colour,\r\n * scripts, lists, indentation/alignment, blocks, media and a native table toolkit.\r\n */\r\nconst TOOLBAR_CONTAINER: readonly unknown[] = [\r\n [{ header: [1, 2, 3, 4, 5, 6, false] }, { font: [] }, { size: ['small', false, 'large', 'huge'] }],\r\n ['bold', 'italic', 'underline', 'strike'],\r\n [{ color: [] }, { background: [] }],\r\n [{ script: 'sub' }, { script: 'super' }],\r\n [{ list: 'ordered' }, { list: 'bullet' }, { list: 'check' }],\r\n [{ indent: '-1' }, { indent: '+1' }, { align: [] }, { direction: 'rtl' }],\r\n ['blockquote', 'code-block'],\r\n ['link', 'image', 'video'],\r\n QUILL_TABLE_CONTROLS.map(control => control.format),\r\n ['clean']\r\n];\r\n\r\n/** The `this` context Quill binds when it invokes a toolbar handler. */\r\ninterface ToolbarHandlerContext {\r\n quill: Quill;\r\n}\r\n\r\n/**\r\n * Builds the toolbar handler map for the custom table buttons.\r\n *\r\n * These MUST be supplied in the toolbar config (not added later via `addHandler`): Quill's\r\n * toolbar skips attaching a click listener to any button whose format is neither a registered\r\n * blot nor already present in `handlers` at construction time. A late `addHandler` sets the\r\n * handler but never re-attaches the listener, so the button stays inert.\r\n */\r\nconst buildTableHandlers = (): Record<string, (this: ToolbarHandlerContext) => void> => {\r\n const handlers: Record<string, (this: ToolbarHandlerContext) => void> = {};\r\n for (const control of QUILL_TABLE_CONTROLS) {\r\n handlers[control.format] = function tableHandler(this: ToolbarHandlerContext): void {\r\n const table = this.quill.getModule('table') as QuillTableModule;\r\n // Native table ops bail when there is no selection; force focus + a range first.\r\n this.quill.getSelection(true);\r\n control.run(table);\r\n };\r\n }\r\n return handlers;\r\n};\r\n\r\n/**\r\n * Builds a ready-to-use `QuillOptions` for a \"snow\" editor with the native table module\r\n * enabled and the custom table-button handlers wired into the toolbar config.\r\n *\r\n * Browser-only by construction: callers MUST instantiate Quill behind an\r\n * `isPlatformBrowser(...)` guard because Quill touches `document` at construction time.\r\n */\r\nexport const buildQuillOptions = (payload: QuillEditorPayload): QuillOptions => ({\r\n theme: 'snow',\r\n readOnly: payload.readOnly,\r\n placeholder: payload.placeholder ?? \"Let's write something amazing...\",\r\n modules: {\r\n toolbar: {\r\n container: TOOLBAR_CONTAINER,\r\n handlers: buildTableHandlers()\r\n },\r\n table: true,\r\n history: { delay: 1000, maxStack: 100, userOnly: true },\r\n clipboard: { matchVisual: false }\r\n }\r\n});\r\n\r\n/**\r\n * Quill's empty document is a single trailing newline op. Treat that — and a literally\r\n * empty op-list — as \"no value\" so `required` validation behaves intuitively.\r\n */\r\nexport const isEmptyQuillDocument = (ops: Op[]): boolean =>\r\n ops.length === 0 || (ops.length === 1 && ops[0]?.insert === '\\n');\r\n","/**\r\n * Element-level \"pop out to full screen\" shared by the rich-text editors in this folder.\r\n *\r\n * A plain `position: fixed` overlay is **not** sufficient here, and that is the whole point of\r\n * this file. The editors render inside a `mat-form-field`, which consumers routinely nest inside\r\n * a Material stepper, tab body, drawer or dialog. `position: fixed` is viewport-relative only\r\n * while **no** ancestor establishes a containing block — any ancestor with `transform`, `filter`,\r\n * `contain`, `will-change`, `backdrop-filter` or `perspective` captures it, and that ancestor's\r\n * `overflow: hidden` then clips it. Which of those a consumer uses is unknowable from in here, so\r\n * the pop-out has to stop depending on the host component altogether.\r\n *\r\n * The browser's **top layer** is what does that: elements promoted into it are painted outside\r\n * the ancestor chain and are immune to ancestor `transform`, `overflow`, `z-index` and stacking\r\n * contexts. Three strategies are tried, best first:\r\n *\r\n * 1. `requestFullscreen()` — top layer **and** drops the browser chrome. Needs a user gesture.\r\n * 2. `showPopover()` — top layer, no gesture required; covers browsers where element full screen\r\n * is unavailable (Safari on iPhone) or blocked by a `fullscreen` permissions policy in an\r\n * iframe.\r\n * 3. `position: fixed` — last resort for browsers with neither API.\r\n *\r\n * The element is promoted **in place** — never re-parented to `<body>`. Top-layer promotion\r\n * changes painting, not inheritance, so the editor keeps inheriting the app's `--mat-sys-*` theme\r\n * variables from its real ancestors; a portal to `<body>` would lose them.\r\n *\r\n * Only the standard, promise-returning `requestFullscreen` is used. The legacy\r\n * `webkitRequestFullscreen` returns `void` and reports failure through a separate event, so a\r\n * rejection could not be observed in time to fall through cleanly — those browsers take path 2/3.\r\n */\r\n\r\n/**\r\n * Class carried by the element while it is popped out. Each editor styles it in its own\r\n * stylesheet, and that rule **must** set a `display` value: it is what keeps the element visible\r\n * during the popover path (see {@link EditorFullScreenHost.enter}).\r\n */\r\nexport const EDITOR_FULL_SCREEN_CLASS = 'is-fullscreen';\r\n\r\n/** Mechanism currently holding the element open. */\r\nexport type EditorFullScreenMode = 'fullscreen' | 'popover' | 'fixed';\r\n\r\n/**\r\n * Owns the pop-out of a single element. One instance per editor; created behind the component's\r\n * `isPlatformBrowser` guard so nothing here runs during SSR.\r\n */\r\nexport class EditorFullScreenHost {\r\n readonly #document: Document;\r\n readonly #onExternalExit: () => void;\r\n\r\n #element: HTMLElement | undefined;\r\n #mode: EditorFullScreenMode | undefined;\r\n\r\n /**\r\n * @param document The owning document, injected via `DOCUMENT` — never the global.\r\n * @param onExternalExit Called when the browser closed the pop-out without going through\r\n * {@link exit} (Escape, F11, another element claiming full screen).\r\n */\r\n constructor(document: Document, onExternalExit: () => void) {\r\n this.#document = document;\r\n this.#onExternalExit = onExternalExit;\r\n this.#document.addEventListener('fullscreenchange', this.#handleFullScreenChange);\r\n }\r\n\r\n /** Whether an element is currently popped out. */\r\n get active(): boolean {\r\n return this.#mode !== undefined;\r\n }\r\n\r\n /**\r\n * Pops `element` out using the best mechanism the browser allows, adding\r\n * {@link EDITOR_FULL_SCREEN_CLASS} for the duration.\r\n *\r\n * Must be called synchronously from a user gesture, otherwise the Fullscreen API rejects and\r\n * the pop-out silently degrades to the popover path.\r\n *\r\n * @param element The element to promote — must be the one carrying the editor chrome.\r\n * @returns The mechanism that ended up being used.\r\n */\r\n async enter(element: HTMLElement): Promise<EditorFullScreenMode> {\r\n if (this.#mode !== undefined) return this.#mode;\r\n\r\n // Added first, and deliberately so: the class sets `display`, which — being author origin —\r\n // beats the UA's `[popover]:not(:popover-open) { display: none }`. Without it the element\r\n // would be display:none for the window between `setAttribute` and `showPopover()` below, and\r\n // a style recalculation inside that window blurs whatever the user was typing in.\r\n this.#element = element;\r\n element.classList.add(EDITOR_FULL_SCREEN_CLASS);\r\n\r\n // `fullscreenEnabled` is false when a permissions policy blocks it (an iframe without\r\n // `allow=\"fullscreen\"`) and where element full screen is unsupported (Safari on iPhone).\r\n if (this.#document.fullscreenEnabled && typeof element.requestFullscreen === 'function') {\r\n try {\r\n await element.requestFullscreen();\r\n this.#mode = 'fullscreen';\r\n return this.#mode;\r\n } catch {\r\n // Rejected — no transient activation, or the UA refused. Fall through to the top-layer\r\n // popover, which needs neither.\r\n }\r\n }\r\n\r\n if (typeof element.showPopover === 'function') {\r\n element.setAttribute('popover', 'manual');\r\n try {\r\n element.showPopover();\r\n this.#mode = 'popover';\r\n return this.#mode;\r\n } catch {\r\n element.removeAttribute('popover');\r\n }\r\n }\r\n\r\n this.#mode = 'fixed';\r\n return this.#mode;\r\n }\r\n\r\n /** Closes the pop-out and returns the element to its place in the document flow. */\r\n async exit(): Promise<void> {\r\n const element = this.#element;\r\n const mode = this.#mode;\r\n this.#element = undefined;\r\n this.#mode = undefined;\r\n if (!element || mode === undefined) return;\r\n\r\n try {\r\n if (mode === 'fullscreen') {\r\n // Leave full screen first: `exitFullscreen()` settles only once the browser's own\r\n // transition has finished, and the class is what styles the surface until then.\r\n if (this.#document.fullscreenElement === element) await this.#document.exitFullscreen();\r\n } else if (mode === 'popover') {\r\n element.hidePopover();\r\n element.removeAttribute('popover');\r\n }\r\n } finally {\r\n element.classList.remove(EDITOR_FULL_SCREEN_CLASS);\r\n }\r\n }\r\n\r\n /** Detaches the document listener and closes any open pop-out. Call from `ngOnDestroy`. */\r\n destroy(): void {\r\n this.#document.removeEventListener('fullscreenchange', this.#handleFullScreenChange);\r\n void this.exit();\r\n }\r\n\r\n /**\r\n * The browser can close a native full screen behind our back — Escape, F11, or another element\r\n * taking the top layer. Reconcile our own state and tell the owner so its toggle follows.\r\n */\r\n readonly #handleFullScreenChange = (): void => {\r\n if (this.#mode !== 'fullscreen') return;\r\n if (this.#document.fullscreenElement === this.#element) return;\r\n\r\n this.#element?.classList.remove(EDITOR_FULL_SCREEN_CLASS);\r\n this.#element = undefined;\r\n this.#mode = undefined;\r\n this.#onExternalExit();\r\n };\r\n}\r\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input, output } from '@angular/core';\r\n\r\n/**\r\n * Floating action button that pops a rich-text editor out to full screen and back.\r\n *\r\n * Shared by the Quill and Editor.js inputs so both carry the same affordance, icon and\r\n * accessible naming. It deliberately owns no state: the editor that hosts it drives {@link active}\r\n * and performs the promotion (see `editor-full-screen.ts`).\r\n *\r\n * Positioning belongs to the host — this component styles only the button. Place it by targeting\r\n * the element selector from the host's stylesheet.\r\n *\r\n * @example\r\n * <lib-editor-full-screen-toggle [active]=\"fullScreen()\" (toggled)=\"toggleFullScreen()\" />\r\n */\r\n@Component({\r\n selector: 'lib-editor-full-screen-toggle',\r\n templateUrl: './editor-full-screen-toggle.component.html',\r\n styleUrl: './editor-full-screen-toggle.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: {\r\n 'class': 'lib-editor-full-screen-toggle'\r\n },\r\n imports: []\r\n})\r\nexport class EditorFullScreenToggleComponent {\r\n /** Whether the editor this controls is currently popped out. */\r\n readonly active = input.required<boolean>();\r\n\r\n /** Emitted when the user asks to enter or leave full screen. */\r\n readonly toggled = output<void>();\r\n\r\n /** Serves as both tooltip and accessible name, so the two can never drift apart. */\r\n protected readonly label = computed(() => (this.active() ? 'Exit full screen' : 'Full screen'));\r\n}\r\n","<button\r\n type=\"button\"\r\n class=\"fab\"\r\n [title]=\"label()\"\r\n [attr.aria-label]=\"label()\"\r\n [attr.aria-pressed]=\"active()\"\r\n (click)=\"toggled.emit()\"\r\n>\r\n @if (active()) {\r\n <svg viewBox=\"0 0 18 18\" aria-hidden=\"true\">\r\n <polyline points=\"3 7 7 7 7 3\"></polyline>\r\n <polyline points=\"11 3 11 7 15 7\"></polyline>\r\n <polyline points=\"15 11 11 11 11 15\"></polyline>\r\n <polyline points=\"7 15 7 11 3 11\"></polyline>\r\n </svg>\r\n } @else {\r\n <svg viewBox=\"0 0 18 18\" aria-hidden=\"true\">\r\n <polyline points=\"7 3 3 3 3 7\"></polyline>\r\n <polyline points=\"11 3 15 3 15 7\"></polyline>\r\n <polyline points=\"15 11 15 15 11 15\"></polyline>\r\n <polyline points=\"3 11 3 15 7 15\"></polyline>\r\n </svg>\r\n }\r\n</button>\r\n","/// <reference path=\"../../../../../../../types/quill.d.ts\" />\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n PLATFORM_ID,\n computed,\n inject,\n input,\n output,\n signal,\n viewChild\n} from '@angular/core';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { NgControl } from '@angular/forms';\n\nimport { ITowerStepColumn } from 'ngx-t-forms-types';\n// Mirrors the EditorJS sibling (Trap 16): `quill` is a browser-only bundle that touches\n// `document` at construction time and crashes under bare-Node SSR. The top-level import is\n// type-only (zero runtime emission); the real load happens inside the SSR-gated\n// `ngAfterViewInit` via dynamic `import()`.\nimport type QuillType from 'quill';\nimport type { Range as QuillRange } from 'quill';\nimport { MatFormFieldControl } from '@angular/material/form-field';\n\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\nimport {\n buildQuillOptions,\n isEmptyQuillDocument,\n QUILL_BUILTIN_TITLES,\n QUILL_TABLE_CONTROLS,\n QuillContent\n} from './quill.config';\nimport { EditorFullScreenHost } from '../editor-full-screen';\nimport { EditorFullScreenToggleComponent } from '../editor-full-screen-toggle/editor-full-screen-toggle.component';\nimport { TokenBindingMenuComponent, type TokenMenuAnchor } from '../../../../../t-dynamic-data-edit/elements/token-binding-menu/token-binding-menu.component';\nimport type { EditorBinding } from '../../../../../t-dynamic-data-edit/elements/json-editor/json-editor.component';\nimport { _isEqual } from '../../../../../../shared/functions/isEqual';\n\nconst customInputConfig: BaseCustomInputConfig = {\n controlType: 'lib-quill-input',\n nextId: 0\n};\n\n/**\n * Quill (\"snow\" theme) rich-text editor wired into Angular Material's form-field as a\n * custom `MatFormFieldControl`. The full Quill setup — toolbar, formats, history — lives in\n * `quill.config.ts`; this component owns lifecycle, SSR gating and value round-tripping.\n */\n@Component({\n selector: 'lib-quill-input',\n templateUrl: './quill-input.component.html',\n styleUrl: './quill-input.component.css',\n imports: [EditorFullScreenToggleComponent, TokenBindingMenuComponent],\n host: {\n '[class.floating]': 'shouldLabelFloat',\n '[id]': 'id',\n '(keydown.escape)': 'onEscape($event)'\n },\n providers: [{ provide: MatFormFieldControl, useExisting: QuillInputComponent }],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class QuillInputComponent\n extends BaseCustomInput<QuillContent | undefined>\n implements AfterViewInit, OnDestroy {\n\n readonly inputConfig = input.required<ITowerStepColumn>();\n\n readonly valueChanged = output<QuillContent | undefined>();\n\n /**\n * Insertable bindings for the `$`-trigger picker. Empty (the default) leaves the\n * gesture inert, so every existing consumer of this editor is unaffected.\n *\n * Same contract, same menu and same inserted spelling as\n * `TokenTextInputComponent` and the JSON template editors — see\n * `_shared/field-bindings.ts`.\n */\n @Input()\n set bindings(value: readonly EditorBinding[] | undefined) {\n this.#bindings.set(value ?? []);\n }\n get bindings(): readonly EditorBinding[] {\n return this.#bindings();\n }\n readonly #bindings = signal<readonly EditorBinding[]>([]);\n\n /** Whether the `$` menu is open. */\n protected readonly menuOpen = signal(false);\n /** Index of the highlighted option. */\n protected readonly activeIndex = signal(0);\n /** Viewport position of the menu, derived from Quill's own caret bounds. */\n protected readonly anchor = signal<TokenMenuAnchor | null>(null);\n /** Text typed after the `$` that opened the menu. */\n readonly #filter = signal('');\n /** Document index of the `$` that opened the menu. */\n #triggerIndex = -1;\n\n /** Matches `TokenTextInputComponent.FILTER_PATTERN` (dots + hyphens included, for `$ns.key` ids) so the gesture feels identical. */\n static readonly FILTER_PATTERN = /^[a-zA-Z0-9_.\\s-]*$/;\n\n /** Bindings matching the active filter, capped so the list stays usable. */\n protected readonly filtered = computed(() => {\n const term = this.#filter().trim().toLowerCase();\n const all = this.#bindings();\n if (!term) {\n return all.slice(0, 50);\n }\n return all\n .filter(b => (String(b.searchText ?? \"\") + \" \" + b.label).toLowerCase().includes(term))\n .slice(0, 50);\n });\n\n\n protected editor: QuillType | undefined;\n\n /** Whether the editor is currently popped out to fill the screen. */\n protected readonly fullScreen = signal(false);\n\n /** Mirrors the CVA's disabled state into the signal graph so the template can react to it. */\n readonly #controlDisabled = signal(false);\n\n /**\n * Read-only when either the column config or the reactive-form control says so. Drives both\n * Quill's own editable state and hiding the formatting toolbar, which is dead weight when\n * nothing can be edited.\n */\n protected readonly readOnly = computed(() => {\n const config = this.inputConfig();\n return this.#controlDisabled() || config.readonly || config.disabled || false;\n });\n\n /**\n * Height the in-flow wrapper holds onto while the editor is popped out. Set from the editor's\n * measured height on the way in, cleared on the way out.\n */\n protected readonly reservedHeight = signal<number | null>(null);\n\n private readonly editorHost = viewChild.required<ElementRef<HTMLElement>>('editorHost');\n\n /**\n * The bordered surface Quill fills — toolbar included. This is what gets promoted to the\n * browser's top layer. (`viewChild` cannot sit on an ES-private field — NG1053.)\n */\n private readonly quillHost = viewChild.required<ElementRef<HTMLElement>>('quillHost');\n\n readonly #platformId = inject(PLATFORM_ID);\n\n readonly #document = inject(DOCUMENT);\n\n #changeHandler: (() => void) | undefined;\n\n /** Bound once so `on`/`off` refer to the same function. */\n readonly #menuSyncHandler = (): void => this.#syncBindingMenu();\n\n #fullScreenHost: EditorFullScreenHost | undefined;\n\n /** Guards against overlapping pop-out transitions (see `#toggleFullScreen`). */\n #toggling = false;\n\n constructor() {\n super(\n inject(NgControl, { optional: true, self: true }) as NgControl,\n inject<ElementRef<HTMLElement>>(ElementRef),\n customInputConfig\n );\n }\n\n override get empty(): boolean {\n const n = this.value;\n return n === null || n === undefined;\n }\n\n override get shouldLabelFloat(): boolean {\n return true;\n }\n\n override _value: QuillContent | undefined = undefined;\n\n @Input() override set value(value: QuillContent | undefined) {\n if (!_isEqual(this._value, value)) {\n this._value = value;\n this.onChange(value);\n this.stateChanges.next();\n }\n }\n\n override get value(): QuillContent | undefined {\n return this._value;\n }\n\n async ngAfterViewInit(): Promise<void> {\n if (!isPlatformBrowser(this.#platformId)) return;\n\n // Browser-only dynamic load — see the Trap 16 comment at the top of this file. The\n // CSS import injects Quill's global theme styles (Quill's runtime DOM is not view-scoped).\n const [{ default: Quill, Delta }] = await Promise.all([\n import('quill'),\n import('quill/dist/quill.snow.css')\n ]);\n\n this.#fullScreenHost = new EditorFullScreenHost(this.#document, () => this.#setFullScreen(false));\n\n const config = this.inputConfig();\n this.editor = new Quill(this.editorHost().nativeElement, buildQuillOptions({\n readOnly: this.readOnly(),\n placeholder: config.placeholder\n }));\n\n const initial = this.value;\n if (initial?.ops?.length) {\n this.editor.setContents(new Delta(initial.ops), 'silent');\n }\n\n // A `setDisabledState` that arrived before the editor existed is applied here.\n this.#applyReadOnly();\n this.#decorateToolbar();\n\n this.#changeHandler = () => this.contentChangedSaveValue();\n this.editor.on('text-change', this.#changeHandler);\n // MENU SYNC RIDES editor-change, NOT text-change: editor-change fires for\n // selection moves too and always AFTER the selection is updated, so\n // getSelection() inside the handler is never stale — and the menu also\n // closes when the caret merely moves away from the trigger.\n this.editor.on('editor-change', this.#menuSyncHandler);\n this.editorHost().nativeElement.addEventListener('keydown', this.#onBindingKeydown, true);\n }\n\n /**\n * Quill ships no icons for custom buttons and no tooltips for any button. Inject themeable\n * SVG icons (their `ql-stroke` paths inherit the toolbar colour) and `title` tooltips so the\n * toolbar reads clearly in both light and dark mode.\n */\n #decorateToolbar(): void {\n const root = this._elementRef.nativeElement;\n for (const control of QUILL_TABLE_CONTROLS) {\n const button = root.querySelector<HTMLElement>(`.ql-${control.format}`);\n if (!button) continue;\n button.innerHTML = control.icon;\n button.setAttribute('title', control.title);\n }\n for (const [selector, title] of Object.entries(QUILL_BUILTIN_TITLES)) {\n root.querySelectorAll<HTMLElement>(selector).forEach(el => el.setAttribute('title', title));\n }\n }\n\n /**\n * Keeps Quill's own read-only state in step with the control's. The pop-out re-enables pointer\n * events on the popped-out surface (Material kills them field-wide when the control is\n * disabled), so this is what actually keeps a disabled field uneditable — the CSS no longer\n * does it.\n */\n override setDisabledState(isDisabled: boolean): void {\n super.setDisabledState(isDisabled);\n this.#controlDisabled.set(isDisabled);\n this.#applyReadOnly();\n }\n\n /** Pushes {@link readOnly} onto the Quill instance, which is not reactive. */\n #applyReadOnly(): void {\n this.editor?.enable(!this.readOnly());\n }\n\n /** Toggles the pop-out from the floating button. */\n protected toggleFullScreen(): void {\n void this.#toggleFullScreen();\n }\n\n /**\n * Pops the editor out to fill the screen, or restores it. Wired to the toolbar button, so it\n * always runs inside the click gesture the Fullscreen API requires — everything up to the\n * promotion is synchronous for that reason.\n */\n async #toggleFullScreen(): Promise<void> {\n const fullScreenHost = this.#fullScreenHost;\n // Both transitions settle asynchronously; ignore clicks that land mid-flight rather than\n // letting a second `requestFullscreen()` race the first.\n if (!fullScreenHost || this.#toggling) return;\n this.#toggling = true;\n\n // Promotion re-lays the editor out, which drops the caret; put it back afterwards.\n // `getSelection()` without an argument reads the range without stealing focus.\n const selection = this.editor?.getSelection() ?? null;\n\n try {\n if (this.fullScreen()) {\n await fullScreenHost.exit();\n } else {\n const element = this.quillHost().nativeElement;\n this.reservedHeight.set(element.offsetHeight);\n await fullScreenHost.enter(element);\n }\n } finally {\n // `enter()` degrades rather than throwing, but `exit()` can reject if the browser refuses\n // to leave full screen. Either way the controller has already settled its own state, so\n // read it back instead of assuming the toggle succeeded.\n this.#setFullScreen(fullScreenHost.active);\n this.#restoreSelection(selection);\n this.#toggling = false;\n }\n }\n\n /**\n * Escape leaves the pop-out. Native full screen is torn down by the browser itself (picked up\n * through `fullscreenchange`); this covers the popover and fixed fallbacks. The event is\n * stopped so Escape closes the editor rather than an enclosing dialog.\n */\n protected onEscape(event: Event): void {\n if (!this.fullScreen()) return;\n event.preventDefault();\n event.stopPropagation();\n void this.#toggleFullScreen();\n }\n\n /**\n * Single funnel for pop-out state, so the signal and the reserved space always agree —\n * including when the browser closed full screen on its own.\n */\n #setFullScreen(active: boolean): void {\n this.fullScreen.set(active);\n if (!active) this.reservedHeight.set(null);\n }\n\n /** Returns the caret to where it was before the pop-out re-laid the editor out. */\n #restoreSelection(selection: QuillRange | null): void {\n const editor = this.editor;\n if (!editor) return;\n if (selection) editor.setSelection(selection, 'silent');\n else editor.focus();\n }\n\n contentChangedSaveValue(): void {\n if (!this.editor) return;\n const ops = this.editor.getContents().ops;\n const value: QuillContent | undefined = isEmptyQuillDocument(ops) ? undefined : { ops };\n this.value = value;\n this.onChange(value);\n this.valueChanged.emit(value);\n }\n\n override ngOnDestroy(): void {\n this.editorHost()?.nativeElement?.removeEventListener('keydown', this.#onBindingKeydown, true);\n this.#fullScreenHost?.destroy();\n this.#fullScreenHost = undefined;\n if (this.editor && this.#changeHandler) {\n this.editor.off('text-change', this.#changeHandler);\n this.editor.off('editor-change', this.#menuSyncHandler);\n }\n this.editor = undefined;\n // Tear the editor down first, then let the base complete `stateChanges` / `destroy$` and\n // clear the temporary-error timer — none of which happened while this override skipped it.\n super.ngOnDestroy();\n }\n\n /**\n * Re-evaluates the `$` menu against the caret. Runs on every editor-change.\n *\n * Quill addresses positions as an index into the document rather than a\n * `selectionStart` on a string, so the caret maths is Quill-specific even\n * though the menu it drives is the shared one.\n */\n #syncBindingMenu(): void {\n const editor = this.editor;\n if (!editor || this.readOnly() || this.#bindings().length === 0) {\n this.menuOpen.set(false);\n return;\n }\n const selection = editor.getSelection();\n if (!selection) {\n this.menuOpen.set(false);\n return;\n }\n const caret = selection.index;\n const before = editor.getText(0, caret);\n const dollar = before.lastIndexOf('$');\n if (dollar < 0) {\n this.menuOpen.set(false);\n return;\n }\n const term = before.slice(dollar + 1);\n if (!QuillInputComponent.FILTER_PATTERN.test(term)) {\n this.menuOpen.set(false);\n return;\n }\n // `getBounds` is relative to the editor container; add its viewport offset.\n const bounds = editor.getBounds(caret);\n const host = this.editorHost().nativeElement.getBoundingClientRect();\n this.anchor.set({\n top: host.top + (bounds?.bottom ?? 0) + 6,\n left: host.left + (bounds?.left ?? 0),\n width: 260,\n });\n this.#triggerIndex = dollar;\n this.#filter.set(term);\n this.activeIndex.set(0);\n this.menuOpen.set(true);\n }\n\n /**\n * Replaces the `$filter` run with the binding token.\n *\n * Inserted as TEXT, which the email compiler promotes to a real token span\n * (`quillToEmailHtml` 's `promoteTextTokens`). An atomic embed blot — which\n * would stop an author splitting a token by formatting half of it — is the\n * next step and does not change this call site.\n */\n protected insertBinding(binding: EditorBinding): void {\n const editor = this.editor;\n if (!editor || this.#triggerIndex < 0) {\n this.menuOpen.set(false);\n return;\n }\n const selection = editor.getSelection();\n const caret = selection?.index ?? this.#triggerIndex;\n const length = Math.max(0, caret - this.#triggerIndex);\n editor.deleteText(this.#triggerIndex, length, 'user');\n editor.insertText(this.#triggerIndex, binding.insert, 'user');\n editor.setSelection(this.#triggerIndex + binding.insert.length, 0, 'user');\n this.menuOpen.set(false);\n this.#filter.set('');\n this.#triggerIndex = -1;\n this.contentChangedSaveValue();\n }\n\n /**\n * Navigation and acceptance while the menu is open.\n *\n * Bound in the CAPTURE phase so it runs before Quill's own keyboard module,\n * which otherwise swallows Enter as a newline and the arrows as caret moves.\n */\n #onBindingKeydown = (event: KeyboardEvent): void => {\n if (!this.menuOpen()) {\n return;\n }\n const options = this.filtered();\n if (event.key === 'Escape') {\n this.menuOpen.set(false);\n event.stopPropagation();\n event.preventDefault();\n return;\n }\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n if (options.length > 0) {\n const step = event.key === 'ArrowDown' ? 1 : -1;\n this.activeIndex.set((this.activeIndex() + step + options.length) % options.length);\n }\n event.stopPropagation();\n event.preventDefault();\n return;\n }\n if (event.key === 'Enter' || event.key === 'Tab') {\n const chosen = options[this.activeIndex()];\n if (chosen) {\n this.insertBinding(chosen);\n event.stopPropagation();\n event.preventDefault();\n }\n }\n };\n}\n","\r\n<!-- `.quill-shell` stays in the document flow and holds the editor's footprint while\r\n `.quill-host` is promoted to the browser's top layer for full screen. Without it the\r\n surrounding form-field collapses by the editor's height, and the page scroll position\r\n jumps when full screen is left. -->\r\n<div class=\"quill-shell\" [style.height.px]=\"reservedHeight()\">\r\n <div class=\"quill-host\" #quillHost [class.is-readonly]=\"readOnly()\">\r\n <div #editorHost></div>\r\n\r\n <!-- Floats over the editing surface rather than living in the toolbar, so it survives the\r\n toolbar being hidden in read-only mode. -->\r\n <lib-editor-full-screen-toggle\r\n [active]=\"fullScreen()\"\r\n (toggled)=\"toggleFullScreen()\"\r\n ></lib-editor-full-screen-toggle>\r\n </div>\r\n</div>\n\n@if (menuOpen()) {\n <lib-token-binding-menu\n [options]=\"filtered()\"\n [activeIndex]=\"activeIndex()\"\n [anchor]=\"anchor()\"\n (pick)=\"insertBinding($event)\" />\n}\n"],"names":[],"mappings":";;;;;;;;AAgDA,MAAM,GAAG,GAAG,CAAC,IAAY,KAAa,CAAA,yBAAA,EAA4B,IAAI,CAAA,MAAA,CAAQ;AAE9E;;;AAGG;AACI,MAAM,oBAAoB,GAAiC;AAChE,IAAA;AACE,QAAA,MAAM,EAAE,cAAc;AACtB,QAAA,KAAK,EAAE,oBAAoB;AAC3B,QAAA,IAAI,EAAE,GAAG,CAAC,mVAAmV,CAAC;AAC9V,QAAA,GAAG,EAAE,KAAK,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;AACtC,KAAA;AACD,IAAA;AACE,QAAA,MAAM,EAAE,WAAW;AACnB,QAAA,KAAK,EAAE,kBAAkB;AACzB,QAAA,IAAI,EAAE,GAAG,CAAC,iNAAiN,CAAC;QAC5N,GAAG,EAAE,KAAK,IAAI,KAAK,CAAC,cAAc,EAAE;AACrC,KAAA;AACD,IAAA;AACE,QAAA,MAAM,EAAE,cAAc;AACtB,QAAA,KAAK,EAAE,qBAAqB;AAC5B,QAAA,IAAI,EAAE,GAAG,CAAC,iNAAiN,CAAC;QAC5N,GAAG,EAAE,KAAK,IAAI,KAAK,CAAC,iBAAiB,EAAE;AACxC,KAAA;AACD,IAAA;AACE,QAAA,MAAM,EAAE,kBAAkB;AAC1B,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,IAAI,EAAE,GAAG,CAAC,oJAAoJ,CAAC;QAC/J,GAAG,EAAE,KAAK,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Y,+BAA+B,oHAAE,yBAAyB,EAAA,QAAA,EAAA,wBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,aAAA,EAAA,QAAA,CAAA,EAAA,OAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;;4FASzD,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAb/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,WAGlB,CAAC,+BAA+B,EAAE,yBAAyB,CAAC,EAAA,IAAA,EAC/D;AACJ,wBAAA,kBAAkB,EAAE,kBAAkB;AACtC,wBAAA,MAAM,EAAE,IAAI;AACZ,wBAAA,kBAAkB,EAAE;AACrB,qBAAA,EAAA,SAAA,EACU,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,mBAAqB,EAAE,CAAC,EAAA,eAAA,EAC9D,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,kgCAAA,EAAA,MAAA,EAAA,CAAA,i6MAAA,CAAA,EAAA;;sBAkB9C;AA4DyE,aAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,YAAY,mEAMb,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA;sBAmCnF;;;;;;;;;;"}
|
|
@@ -21,7 +21,7 @@ import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
|
21
21
|
import * as i5$2 from '@angular/material/tooltip';
|
|
22
22
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
23
23
|
import { Subject } from 'rxjs';
|
|
24
|
-
import {
|
|
24
|
+
import { Q as NESTED_EDITOR_COMPONENT, t as testAgainstItem, R as safeReturnDeepProperty, _ as _isEqual, a as assignDeepPropertyToObject, E as EmptyStateComponent } from './ngx-t-forms-ngx-t-forms-D_PCGH-i.mjs';
|
|
25
25
|
|
|
26
26
|
/** Synthetic column key for the per-row edit/delete action cell. */
|
|
27
27
|
const ACTIONS_COLUMN = 'actions';
|
|
@@ -443,4 +443,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
443
443
|
}], formInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "formInputs", required: false }] }], editorConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "editorConfig", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
444
444
|
|
|
445
445
|
export { RecordListManagerComponent };
|
|
446
|
-
//# sourceMappingURL=ngx-t-forms-record-list-manager.component-
|
|
446
|
+
//# sourceMappingURL=ngx-t-forms-record-list-manager.component-BEeTQy5N.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-record-list-manager.component-BK5nwwDp.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/record-list-manager/record-list-manager.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/record-list-manager/record-list-manager.component.html"],"sourcesContent":["import { CdkPortalOutletAttachedRef, ComponentPortal, PortalModule } from '@angular/cdk/portal';\r\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ComponentRef,\r\n DestroyRef,\r\n ElementRef,\r\n Input,\r\n ViewEncapsulation,\r\n computed,\r\n effect,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { outputToObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { NgControl } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { MatDividerModule } from '@angular/material/divider';\r\nimport { MatExpansionModule } from '@angular/material/expansion';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatTableDataSource, MatTableModule } from '@angular/material/table';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport type {\r\n ElementEditorConfigSectionInterface,\r\n ElementEditorInnerSectionElementInterface,\r\n FormColumnInputs,\r\n} from 'ngx-t-forms-types';\r\nimport { Subject, Subscription } from 'rxjs';\r\nimport { _isEqual } from '../../../../shared/functions/isEqual';\r\nimport { assignDeepPropertyToObject } from '../../../../shared/functions/assignDeepPropertyToObject';\r\nimport { safeReturnDeepProperty } from '../../../../shared/functions/getDeepObject';\r\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\r\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\nimport type { TDynamicDataEditComponent } from '../../t-dynamic-data-edit.component';\r\nimport { NESTED_EDITOR_COMPONENT } from '../../nested-editor.token';\r\nimport { testAgainstItem } from '../../functions/testData';\r\n\r\n/** Row shape held by the record list. Heterogeneous wrapper-defined records. */\r\ntype RecordListRow = Record<string, unknown> & { id?: string };\r\n\r\n/** Table column descriptor (label header + the row key it renders). */\r\ninterface RecordColumn {\r\n readonly label: string;\r\n readonly value: string;\r\n}\r\n\r\n/** Synthetic column key for the per-row edit/delete action cell. */\r\nconst ACTIONS_COLUMN = 'actions';\r\n\r\n/**\r\n * Internal record-list manager. Implements `MatFormFieldControl<unknown[]>` and is\r\n * embedded by `t-dynamic-data-edit` for `RecordListManager` editor types.\r\n *\r\n * Owns only its content (table + edit panel). The parent `mat-form-field` renders\r\n * the label, hint, and validation errors, so this component adds neither a header\r\n * nor an inline error list.\r\n *\r\n * Per-record editing is delegated to a dynamically-attached `TDynamicDataEditComponent`\r\n * portal per inner-section element; the portal's `valueChange` output is patched back\r\n * into the in-edit buffer via the element's `deepBind` path.\r\n *\r\n * NOTE: `MatFormFieldControl<T>` mandates plain mutable `value` / `disabled` /\r\n * `required` / `placeholder` / `id` members, `@Input()` decorators, the\r\n * `focused` / `touched` / `stateChanges` members, and the `useExisting` provider.\r\n * These are framework wiring, not defects — the CLAUDE.md bans on `@Input()` /\r\n * `useExisting` do not apply to MatFormFieldControl integration.\r\n *\r\n * @internal Not exported via public-api.ts.\r\n */\r\n@Component({\r\n selector: 'lib-record-list-manager',\r\n templateUrl: './record-list-manager.component.html',\r\n styleUrl: './record-list-manager.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n imports: [\r\n MatButtonModule,\r\n MatCardModule,\r\n MatDividerModule,\r\n MatExpansionModule,\r\n MatIconModule,\r\n MatProgressSpinnerModule,\r\n MatTableModule,\r\n MatTooltipModule,\r\n PortalModule,\r\n EmptyStateComponent,\r\n ],\r\n providers: [{ provide: MatFormFieldControl, useExisting: RecordListManagerComponent }],\r\n host: {\r\n 'class': 'lib-record-list-manager',\r\n '[id]': 'id',\r\n '[attr.aria-describedby]': 'describedBy',\r\n '[class.lib-record-list-manager--floating]': 'shouldLabelFloat',\r\n },\r\n})\r\nexport class RecordListManagerComponent implements MatFormFieldControl<unknown[]> {\r\n static nextId = 0;\r\n\r\n // --- MatFormFieldControl wiring (plain mutable members, framework-mandated) ---\r\n readonly stateChanges = new Subject<void>();\r\n readonly controlType = 'lib-record-list-manager';\r\n\r\n focused = false;\r\n touched = false;\r\n autofilled = false;\r\n id = `lib-record-list-manager-${RecordListManagerComponent.nextId++}`;\r\n describedBy = '';\r\n\r\n /** Optional wrapper-supplied mapping payload (shape determined by wrapper). */\r\n @Input() mapToData: unknown;\r\n\r\n /** Validation errors surfaced by the parent for error-state derivation. */\r\n @Input() errors: IConfigElementError[] | undefined = [];\r\n\r\n #disabled = false;\r\n @Input()\r\n get disabled(): boolean {\r\n return this.#disabled;\r\n }\r\n set disabled(value: boolean) {\r\n this.#disabled = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n\r\n #required = false;\r\n @Input()\r\n get required(): boolean {\r\n return this.#required;\r\n }\r\n set required(value: boolean) {\r\n this.#required = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n\r\n #placeholder = '';\r\n @Input()\r\n get placeholder(): string {\r\n return this.#placeholder;\r\n }\r\n set placeholder(value: string) {\r\n this.#placeholder = value;\r\n this.stateChanges.next();\r\n }\r\n\r\n /**\r\n * Record rows held by the table. Parent passes heterogeneous payloads\r\n * (`{}` initial / arrays / null); non-array writes coerce to an empty list.\r\n */\r\n @Input()\r\n get value(): RecordListRow[] {\r\n return this.#rows();\r\n }\r\n set value(val: unknown) {\r\n const next = Array.isArray(val) ? (val as RecordListRow[]) : [];\r\n this.#rows.set(next);\r\n this.onChange(next);\r\n this.stateChanges.next();\r\n }\r\n\r\n get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n get empty(): boolean {\r\n return this.#rows().length === 0;\r\n }\r\n\r\n get errorState(): boolean {\r\n const requiredUnset = this.empty && this.#required && this.touched;\r\n const ngControlError = this.ngControl?.errors != null;\r\n const externalError = (this.errors?.length ?? 0) > 0;\r\n return requiredUnset || ngControlError || externalError;\r\n }\r\n\r\n // --- DI ---\r\n readonly ngControl = inject(NgControl, { self: true, optional: true });\r\n readonly #elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\r\n readonly #destroyRef = inject(DestroyRef);\r\n /** The component portalled per record — injected to avoid a circular import. */\r\n readonly #nestedEditor = inject(NESTED_EDITOR_COMPONENT);\r\n\r\n constructor() {\r\n if (this.ngControl != null) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n this.#destroyRef.onDestroy(() => {\r\n this.stateChanges.complete();\r\n this.#teardownPortalSubscriptions();\r\n });\r\n }\r\n\r\n // --- ControlValueAccessor ---\r\n onChange: (_: unknown) => void = () => {\r\n /* noop until registered */\r\n };\r\n onTouched: () => void = () => {\r\n /* noop until registered */\r\n };\r\n\r\n writeValue(value: unknown): void {\r\n this.#rows.set(Array.isArray(value) ? (value as RecordListRow[]) : []);\r\n this.stateChanges.next();\r\n }\r\n\r\n registerOnChange(fn: (_: unknown) => void): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n setDescribedByIds(ids: string[]): void {\r\n this.describedBy = ids.join(' ');\r\n this.#elementRef.nativeElement.setAttribute('aria-describedby', this.describedBy);\r\n this.stateChanges.next();\r\n }\r\n\r\n onContainerClick(): void {\r\n this.markAsTouched();\r\n if (!this.focused) {\r\n this.focused = true;\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n markAsTouched(): void {\r\n if (!this.touched) {\r\n this.touched = true;\r\n this.onTouched();\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n // --- Internal reactive state (signal-first) ---\r\n\r\n /** Backing rows; the `MatTableDataSource` is kept in sync via an effect. */\r\n readonly #rows = signal<RecordListRow[]>([]);\r\n\r\n /** Table data source whose `.data` mirrors `#rows()`. */\r\n readonly dataSource = new MatTableDataSource<RecordListRow>([]);\r\n\r\n /** Row currently being edited, or `null` when no edit is in progress. */\r\n readonly #inEdit = signal<RecordListRow | null>(null);\r\n\r\n /** Inner editor sections derived from the active editor config. */\r\n readonly #sections = signal<readonly ElementEditorConfigSectionInterface[]>([]);\r\n\r\n /** Lazily-built portals keyed by inner-section element id. */\r\n readonly #portals = signal<Readonly<Record<string, ComponentPortal<TDynamicDataEditComponent>>>>(\r\n {},\r\n );\r\n\r\n /** Active per-element portal output subscriptions, keyed by element id. */\r\n readonly #portalSubscriptions = new Map<string, Subscription>();\r\n\r\n /** Form input definitions forwarded into the dynamic editor portals. */\r\n readonly formInputs = input<Array<FormColumnInputs>>([]);\r\n\r\n /** Editor configuration for this record-list element. */\r\n readonly editorConfig = input<ElementEditorInnerSectionElementInterface | undefined>(undefined);\r\n\r\n /** Emits whenever the record list value changes. */\r\n readonly valueChange = output<RecordListRow[]>();\r\n\r\n // --- Template-facing derived state ---\r\n\r\n protected readonly inEditRow = this.#inEdit.asReadonly();\r\n protected readonly portals = this.#portals.asReadonly();\r\n\r\n /**\r\n * Inner sections with each element list narrowed to the elements whose\r\n * `additionalTest` entries ALL pass against the record being edited — the same\r\n * rule `isElementApplicable` applies to top-level editor elements.\r\n *\r\n * An element without `additionalTest` always shows. When a section hides nothing,\r\n * the original section object is returned, and when no section hides anything the\r\n * original array is returned, so consumers that never configured a test (the\r\n * reports / dashboard chart config, for one) get object-identical output and\r\n * behave exactly as before.\r\n */\r\n protected readonly visibleSections = computed<readonly ElementEditorConfigSectionInterface[]>(\r\n () => {\r\n const record = this.#inEdit();\r\n const sections = this.#sections();\r\n let narrowed = false;\r\n const next = sections.map((section) => {\r\n const elements = section.elements.filter((element) =>\r\n (element.additionalTest ?? []).every((test) => testAgainstItem(test, record)),\r\n );\r\n if (elements.length === section.elements.length) {\r\n return section;\r\n }\r\n narrowed = true;\r\n return { ...section, elements };\r\n });\r\n return narrowed ? next : sections;\r\n },\r\n );\r\n\r\n protected readonly tableColumns = computed<readonly RecordColumn[]>(() => [\r\n ...(this.editorConfig()?.options ?? []).map((opt) => ({\r\n label: String(opt.label),\r\n value: String(opt.value),\r\n })),\r\n { label: ' ', value: ACTIONS_COLUMN },\r\n ]);\r\n\r\n protected readonly displayedColumns = computed<readonly string[]>(() =>\r\n this.tableColumns().map((c) => c.value),\r\n );\r\n\r\n protected readonly rowCount = computed<number>(() => this.#rows().length);\r\n\r\n protected readonly isActionsColumn = (column: string): boolean => column === ACTIONS_COLUMN;\r\n\r\n /**\r\n * A cell's text. Rows are heterogeneous wrapper-defined records, so a column may\r\n * hold anything; this renders it as one line and an absent value as an empty cell\r\n * rather than the string `undefined`.\r\n *\r\n * Also the `title` for the cell, which is what makes truncation safe — the full\r\n * value stays readable on hover instead of being lost to the ellipsis.\r\n *\r\n * @param row - The record being rendered.\r\n * @param column - The row key this column shows.\r\n * @returns The cell's display text, or `''` when the record has no such value.\r\n */\r\n protected cellText(row: RecordListRow, column: string): string {\r\n const value = row[column];\r\n return value == null ? '' : String(value);\r\n }\r\n\r\n /**\r\n * Whether the in-edit record may be saved: every `required` inner element must\r\n * resolve to a non-empty value via its `deepBind` path.\r\n *\r\n * Only currently-visible elements are considered — a `required` element hidden by\r\n * its own `additionalTest` cannot be filled in, so counting it would leave the\r\n * save button permanently disabled.\r\n */\r\n protected readonly canSaveRecord = computed<boolean>(() => {\r\n const editing = this.#inEdit();\r\n if (!editing || !this.editorConfig()) {\r\n return false;\r\n }\r\n for (const section of this.visibleSections()) {\r\n for (const element of section.elements) {\r\n if (!element.required) {\r\n continue;\r\n }\r\n const { value } = safeReturnDeepProperty(editing, element.deepBind ?? []);\r\n if (value == null || value === '') {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n });\r\n\r\n // --- Effects (framework-state sync, not signal writes within) ---\r\n\r\n /** Mirror the rows signal into the Material table data source. */\r\n protected readonly tableSync = effect(() => {\r\n this.dataSource.data = this.#rows();\r\n });\r\n\r\n /**\r\n * Rebuild the inner-section list and portal map whenever the editor config\r\n * changes. Portals are recreated per config so a stale `ComponentPortal`\r\n * (already attached) is never re-used.\r\n */\r\n protected readonly configSync = effect(() => {\r\n const next = this.editorConfig()?.secondaryElementEditorConfig ?? [];\r\n if (_isEqual(this.#sections(), next)) {\r\n return;\r\n }\r\n this.#teardownPortalSubscriptions();\r\n this.#sections.set(next);\r\n const portals: Record<string, ComponentPortal<TDynamicDataEditComponent>> = {};\r\n for (const section of next) {\r\n for (const element of section.elements) {\r\n portals[element.id] = new ComponentPortal(this.#nestedEditor);\r\n }\r\n }\r\n this.#portals.set(portals);\r\n });\r\n\r\n // --- Record actions ---\r\n\r\n addNewItem(): void {\r\n this.#inEdit.set({});\r\n }\r\n\r\n editItem(row: RecordListRow): void {\r\n this.#inEdit.set(row);\r\n }\r\n\r\n cancelEdit(): void {\r\n this.#inEdit.set(null);\r\n }\r\n\r\n saveRecord(): void {\r\n const editing = this.#inEdit();\r\n if (!editing) {\r\n return;\r\n }\r\n let next: RecordListRow[];\r\n if (editing.id != null) {\r\n next = this.value.map((item) => (item.id === editing.id ? editing : item));\r\n } else {\r\n next = [...this.value, { ...editing, id: crypto.randomUUID() }];\r\n }\r\n this.value = next;\r\n this.#inEdit.set(null);\r\n this.valueChange.emit(this.value);\r\n }\r\n\r\n removeItem(item: RecordListRow): void {\r\n this.value = this.value.filter((row) => row.id !== item.id);\r\n if (this.#inEdit()?.id === item.id) {\r\n this.#inEdit.set(null);\r\n }\r\n this.valueChange.emit(this.value);\r\n }\r\n\r\n /**\r\n * Wire a freshly-attached per-record editor portal: push the current inputs in,\r\n * and patch the in-edit buffer whenever the inner editor emits a value. The\r\n * subscription is keyed by element id and torn down on config change / destroy.\r\n *\r\n * This also runs on RE-attach, because an element hidden by `additionalTest` has\r\n * its portal outlet destroyed and a brand-new one created when it comes back:\r\n *\r\n * - Double-attach cannot happen. `CdkPortalOutlet.ngOnDestroy` disposes the outlet,\r\n * which detaches the portal and nulls its `_attachedHost`, so the same\r\n * `ComponentPortal` instance is legitimately re-attachable to the new outlet.\r\n * Only the outlet is marked disposed, and that one is gone.\r\n * - Double-subscribe cannot happen either. The previous subscription for this\r\n * element id is unsubscribed below before the new one replaces it, and it would\r\n * in any case have completed already: `outputToObservable` completes when the\r\n * emitting component is destroyed, which also unregisters the\r\n * `takeUntilDestroyed` hook rather than accumulating one per attach.\r\n */\r\n onPortalAttached(\r\n portalRef: CdkPortalOutletAttachedRef,\r\n element: ElementEditorInnerSectionElementInterface,\r\n ): void {\r\n const componentRef = portalRef as ComponentRef<TDynamicDataEditComponent>;\r\n componentRef.setInput('formInputs', this.formInputs());\r\n componentRef.setInput('editorConfig', element);\r\n componentRef.setInput('data', this.#inEdit());\r\n\r\n this.#portalSubscriptions.get(element.id)?.unsubscribe();\r\n const sub = outputToObservable(componentRef.instance.valueChange)\r\n .pipe(takeUntilDestroyed(this.#destroyRef))\r\n .subscribe((event: unknown) => {\r\n const current = this.#inEdit();\r\n const draft = (current ? structuredClone(current) : {}) as RecordListRow;\r\n this.#applyClearOnChange(draft, element, current, event);\r\n const patched = assignDeepPropertyToObject(\r\n draft,\r\n element.deepBind ?? [],\r\n event,\r\n ) as RecordListRow;\r\n this.#inEdit.set(patched);\r\n componentRef.setInput('data', patched);\r\n componentRef.changeDetectorRef.markForCheck();\r\n });\r\n this.#portalSubscriptions.set(element.id, sub);\r\n }\r\n\r\n /**\r\n * Blanks the paths an element declares in `clearOnChange`, so choosing one of a\r\n * pair of mutually exclusive settings drops the other one.\r\n *\r\n * Guarded, unlike the top-level editors: it fires only when the element's own\r\n * bound value moves AWAY from a value the record already carried. The nested\r\n * editor emits once shortly after every attach — replaying the stored value, or\r\n * `defaultValue` when the bound key is absent — so an unguarded clear would wipe\r\n * sibling fields merely because an administrator opened an existing record, and\r\n * again every time a hidden element was re-shown. Elements without\r\n * `clearOnChange` are untouched.\r\n */\r\n #applyClearOnChange(\r\n draft: RecordListRow,\r\n element: ElementEditorInnerSectionElementInterface,\r\n current: RecordListRow | null,\r\n nextValue: unknown,\r\n ): void {\r\n const paths = element.clearOnChange;\r\n if (!paths || paths.length === 0) {\r\n return;\r\n }\r\n const { value: previousValue } = safeReturnDeepProperty(current, element.deepBind ?? []);\r\n // Never set before: this is the first explicit choice, not a change away from\r\n // something, so there is nothing the administrator asked to discard.\r\n if (previousValue === undefined || previousValue === '') {\r\n return;\r\n }\r\n if (_isEqual(previousValue, nextValue)) {\r\n return;\r\n }\r\n for (const path of paths) {\r\n assignDeepPropertyToObject(draft, path, undefined);\r\n }\r\n }\r\n\r\n #teardownPortalSubscriptions(): void {\r\n this.#portalSubscriptions.forEach((sub) => sub.unsubscribe());\r\n this.#portalSubscriptions.clear();\r\n }\r\n}\r\n","<!--\r\n The card clips to its radius; the inner element is the ONLY scroll region. Without\r\n that split a table wider than the editor panel was simply cut off, taking the row\r\n actions with it — unreachable, with nothing to indicate they were there.\r\n-->\r\n<div class=\"lib-record-list-manager__table\">\r\n <div class=\"lib-record-list-manager__scroll\">\r\n <table mat-table [dataSource]=\"dataSource\" class=\"lib-record-list-manager__grid\">\r\n @for (col of tableColumns(); track col.value) {\r\n <!--\r\n `stickyEnd` pins the actions column to the right edge, so edit and delete\r\n stay reachable however far the table is scrolled. Material's own mechanism\r\n rather than hand-rolled `position: sticky`, which it already handles\r\n correctly across the table's collapsed borders.\r\n -->\r\n <ng-container [matColumnDef]=\"col.value\" [stickyEnd]=\"isActionsColumn(col.value)\">\r\n <th mat-header-cell *matHeaderCellDef scope=\"col\">{{ col.label }}</th>\r\n <td mat-cell *matCellDef=\"let row\" class=\"lib-record-list-manager__cell\">\r\n @if (isActionsColumn(col.value)) {\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n class=\"lib-record-list-manager__action\"\r\n matTooltip=\"Edit\"\r\n aria-label=\"Edit record\"\r\n [disabled]=\"disabled\"\r\n (click)=\"editItem(row)\"\r\n >\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n color=\"warn\"\r\n class=\"lib-record-list-manager__action\"\r\n matTooltip=\"Delete\"\r\n aria-label=\"Delete record\"\r\n [disabled]=\"disabled\"\r\n (click)=\"removeItem(row)\"\r\n >\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n } @else {\r\n <!--\r\n Truncated rather than allowed to widen the column: one long value in\r\n one row should not push every other column out of view. The full text\r\n stays reachable on hover and to assistive tech.\r\n -->\r\n <span class=\"lib-record-list-manager__cell-text\" [title]=\"cellText(row, col.value)\">\r\n {{ cellText(row, col.value) }}\r\n </span>\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns()\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: displayedColumns()\"\r\n class=\"lib-record-list-manager__row\"\r\n ></tr>\r\n </table>\r\n </div>\r\n\r\n @if (rowCount() === 0) {\r\n <lib-empty-state\r\n icon=\"inbox\"\r\n message=\"No records yet. Use Add Record to get started.\"\r\n ></lib-empty-state>\r\n }\r\n</div>\r\n\r\n@if (inEditRow(); as editing) {\r\n <div class=\"lib-record-list-manager__editor\">\r\n <mat-accordion class=\"lib-record-list-manager__sections\" togglePosition=\"after\">\r\n @for (section of visibleSections(); track section.id) {\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header>\r\n <mat-panel-title class=\"lib-record-list-manager__section-title\">\r\n <span>{{ section.label }}</span>\r\n @if (section.showItemValue && editing[section.showItemValue] != null) {\r\n <span class=\"lib-record-list-manager__section-value\">\r\n {{ editing[section.showItemValue] }}\r\n </span>\r\n }\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n @for (element of section.elements; track element.id) {\r\n <div class=\"lib-record-list-manager__field\">\r\n @defer (on viewport) {\r\n <ng-template\r\n [cdkPortalOutlet]=\"portals()[element.id]\"\r\n (attached)=\"onPortalAttached($event, element)\"\r\n ></ng-template>\r\n } @placeholder {\r\n <div class=\"lib-record-list-manager__loading\">\r\n <mat-spinner diameter=\"18\"></mat-spinner>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </mat-expansion-panel>\r\n }\r\n </mat-accordion>\r\n\r\n <div class=\"lib-record-list-manager__actions\">\r\n <button type=\"button\" mat-button color=\"primary\" (click)=\"cancelEdit()\">Cancel</button>\r\n <button\r\n type=\"button\"\r\n mat-stroked-button\r\n color=\"primary\"\r\n [disabled]=\"!canSaveRecord()\"\r\n (click)=\"saveRecord()\"\r\n >\r\n {{ editing.id ? 'Update' : 'Save new' }} record\r\n <mat-icon>save</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n} @else {\r\n <div class=\"lib-record-list-manager__actions lib-record-list-manager__actions--list\">\r\n <span class=\"lib-record-list-manager__count\">Records ({{ rowCount() }})</span>\r\n <button\r\n type=\"button\"\r\n mat-stroked-button\r\n color=\"primary\"\r\n matTooltip=\"Add a new record\"\r\n aria-label=\"Add a new record\"\r\n [disabled]=\"disabled\"\r\n (click)=\"addNewItem()\"\r\n >\r\n <mat-icon>add</mat-icon>\r\n Add Record\r\n </button>\r\n </div>\r\n}\r\n"],"names":["i1","i4","i5","i6","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoDA;AACA,MAAM,cAAc,GAAG,SAAS;AAEhC;;;;;;;;;;;;;;;;;;;AAmBG;MA2BU,0BAA0B,CAAA;aAC9B,IAAA,CAAA,MAAM,GAAG,CAAH,CAAK;AAkBlB,IAAA,SAAS;AACT,IAAA,IACI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS;IACvB;IACA,IAAI,QAAQ,CAAC,KAAc,EAAA;AACzB,QAAA,IAAI,CAAC,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC;AAC7C,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;IAC1B;AAEA,IAAA,SAAS;AACT,IAAA,IACI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS;IACvB;IACA,IAAI,QAAQ,CAAC,KAAc,EAAA;AACzB,QAAA,IAAI,CAAC,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC;AAC7C,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;IAC1B;AAEA,IAAA,YAAY;AACZ,IAAA,IACI,WAAW,GAAA;QACb,OAAO,IAAI,CAAC,YAAY;IAC1B;IACA,IAAI,WAAW,CAAC,KAAa,EAAA;AAC3B,QAAA,IAAI,CAAC,YAAY,GAAG,KAAK;AACzB,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;IAC1B;AAEA;;;AAGG;AACH,IAAA,IACI,KAAK,GAAA;AACP,QAAA,OAAO,IAAI,CAAC,KAAK,EAAE;IACrB;IACA,IAAI,KAAK,CAAC,GAAY,EAAA;AACpB,QAAA,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GA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2C,EAAE,kBAAkB;AAChE,qBAAA,EAAA,QAAA,EAAA,mgLAAA,EAAA,MAAA,EAAA,CAAA,ojFAAA,CAAA,EAAA;;sBAgBA;;sBAGA;;sBAGA;;sBAUA;;sBAUA;;sBAaA;;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-record-list-manager.component-BEeTQy5N.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/record-list-manager/record-list-manager.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/record-list-manager/record-list-manager.component.html"],"sourcesContent":["import { CdkPortalOutletAttachedRef, ComponentPortal, PortalModule } from '@angular/cdk/portal';\r\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ComponentRef,\r\n DestroyRef,\r\n ElementRef,\r\n Input,\r\n ViewEncapsulation,\r\n computed,\r\n effect,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { outputToObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { NgControl } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { MatDividerModule } from '@angular/material/divider';\r\nimport { MatExpansionModule } from '@angular/material/expansion';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatTableDataSource, MatTableModule } from '@angular/material/table';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport type {\r\n ElementEditorConfigSectionInterface,\r\n ElementEditorInnerSectionElementInterface,\r\n FormColumnInputs,\r\n} from 'ngx-t-forms-types';\r\nimport { Subject, Subscription } from 'rxjs';\r\nimport { _isEqual } from '../../../../shared/functions/isEqual';\r\nimport { assignDeepPropertyToObject } from '../../../../shared/functions/assignDeepPropertyToObject';\r\nimport { safeReturnDeepProperty } from '../../../../shared/functions/getDeepObject';\r\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\r\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\nimport type { TDynamicDataEditComponent } from '../../t-dynamic-data-edit.component';\r\nimport { NESTED_EDITOR_COMPONENT } from '../../nested-editor.token';\r\nimport { testAgainstItem } from '../../functions/testData';\r\n\r\n/** Row shape held by the record list. Heterogeneous wrapper-defined records. */\r\ntype RecordListRow = Record<string, unknown> & { id?: string };\r\n\r\n/** Table column descriptor (label header + the row key it renders). */\r\ninterface RecordColumn {\r\n readonly label: string;\r\n readonly value: string;\r\n}\r\n\r\n/** Synthetic column key for the per-row edit/delete action cell. */\r\nconst ACTIONS_COLUMN = 'actions';\r\n\r\n/**\r\n * Internal record-list manager. Implements `MatFormFieldControl<unknown[]>` and is\r\n * embedded by `t-dynamic-data-edit` for `RecordListManager` editor types.\r\n *\r\n * Owns only its content (table + edit panel). The parent `mat-form-field` renders\r\n * the label, hint, and validation errors, so this component adds neither a header\r\n * nor an inline error list.\r\n *\r\n * Per-record editing is delegated to a dynamically-attached `TDynamicDataEditComponent`\r\n * portal per inner-section element; the portal's `valueChange` output is patched back\r\n * into the in-edit buffer via the element's `deepBind` path.\r\n *\r\n * NOTE: `MatFormFieldControl<T>` mandates plain mutable `value` / `disabled` /\r\n * `required` / `placeholder` / `id` members, `@Input()` decorators, the\r\n * `focused` / `touched` / `stateChanges` members, and the `useExisting` provider.\r\n * These are framework wiring, not defects — the CLAUDE.md bans on `@Input()` /\r\n * `useExisting` do not apply to MatFormFieldControl integration.\r\n *\r\n * @internal Not exported via public-api.ts.\r\n */\r\n@Component({\r\n selector: 'lib-record-list-manager',\r\n templateUrl: './record-list-manager.component.html',\r\n styleUrl: './record-list-manager.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n imports: [\r\n MatButtonModule,\r\n MatCardModule,\r\n MatDividerModule,\r\n MatExpansionModule,\r\n MatIconModule,\r\n MatProgressSpinnerModule,\r\n MatTableModule,\r\n MatTooltipModule,\r\n PortalModule,\r\n EmptyStateComponent,\r\n ],\r\n providers: [{ provide: MatFormFieldControl, useExisting: RecordListManagerComponent }],\r\n host: {\r\n 'class': 'lib-record-list-manager',\r\n '[id]': 'id',\r\n '[attr.aria-describedby]': 'describedBy',\r\n '[class.lib-record-list-manager--floating]': 'shouldLabelFloat',\r\n },\r\n})\r\nexport class RecordListManagerComponent implements MatFormFieldControl<unknown[]> {\r\n static nextId = 0;\r\n\r\n // --- MatFormFieldControl wiring (plain mutable members, framework-mandated) ---\r\n readonly stateChanges = new Subject<void>();\r\n readonly controlType = 'lib-record-list-manager';\r\n\r\n focused = false;\r\n touched = false;\r\n autofilled = false;\r\n id = `lib-record-list-manager-${RecordListManagerComponent.nextId++}`;\r\n describedBy = '';\r\n\r\n /** Optional wrapper-supplied mapping payload (shape determined by wrapper). */\r\n @Input() mapToData: unknown;\r\n\r\n /** Validation errors surfaced by the parent for error-state derivation. */\r\n @Input() errors: IConfigElementError[] | undefined = [];\r\n\r\n #disabled = false;\r\n @Input()\r\n get disabled(): boolean {\r\n return this.#disabled;\r\n }\r\n set disabled(value: boolean) {\r\n this.#disabled = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n\r\n #required = false;\r\n @Input()\r\n get required(): boolean {\r\n return this.#required;\r\n }\r\n set required(value: boolean) {\r\n this.#required = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n\r\n #placeholder = '';\r\n @Input()\r\n get placeholder(): string {\r\n return this.#placeholder;\r\n }\r\n set placeholder(value: string) {\r\n this.#placeholder = value;\r\n this.stateChanges.next();\r\n }\r\n\r\n /**\r\n * Record rows held by the table. Parent passes heterogeneous payloads\r\n * (`{}` initial / arrays / null); non-array writes coerce to an empty list.\r\n */\r\n @Input()\r\n get value(): RecordListRow[] {\r\n return this.#rows();\r\n }\r\n set value(val: unknown) {\r\n const next = Array.isArray(val) ? (val as RecordListRow[]) : [];\r\n this.#rows.set(next);\r\n this.onChange(next);\r\n this.stateChanges.next();\r\n }\r\n\r\n get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n get empty(): boolean {\r\n return this.#rows().length === 0;\r\n }\r\n\r\n get errorState(): boolean {\r\n const requiredUnset = this.empty && this.#required && this.touched;\r\n const ngControlError = this.ngControl?.errors != null;\r\n const externalError = (this.errors?.length ?? 0) > 0;\r\n return requiredUnset || ngControlError || externalError;\r\n }\r\n\r\n // --- DI ---\r\n readonly ngControl = inject(NgControl, { self: true, optional: true });\r\n readonly #elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\r\n readonly #destroyRef = inject(DestroyRef);\r\n /** The component portalled per record — injected to avoid a circular import. */\r\n readonly #nestedEditor = inject(NESTED_EDITOR_COMPONENT);\r\n\r\n constructor() {\r\n if (this.ngControl != null) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n this.#destroyRef.onDestroy(() => {\r\n this.stateChanges.complete();\r\n this.#teardownPortalSubscriptions();\r\n });\r\n }\r\n\r\n // --- ControlValueAccessor ---\r\n onChange: (_: unknown) => void = () => {\r\n /* noop until registered */\r\n };\r\n onTouched: () => void = () => {\r\n /* noop until registered */\r\n };\r\n\r\n writeValue(value: unknown): void {\r\n this.#rows.set(Array.isArray(value) ? (value as RecordListRow[]) : []);\r\n this.stateChanges.next();\r\n }\r\n\r\n registerOnChange(fn: (_: unknown) => void): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n setDescribedByIds(ids: string[]): void {\r\n this.describedBy = ids.join(' ');\r\n this.#elementRef.nativeElement.setAttribute('aria-describedby', this.describedBy);\r\n this.stateChanges.next();\r\n }\r\n\r\n onContainerClick(): void {\r\n this.markAsTouched();\r\n if (!this.focused) {\r\n this.focused = true;\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n markAsTouched(): void {\r\n if (!this.touched) {\r\n this.touched = true;\r\n this.onTouched();\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n // --- Internal reactive state (signal-first) ---\r\n\r\n /** Backing rows; the `MatTableDataSource` is kept in sync via an effect. */\r\n readonly #rows = signal<RecordListRow[]>([]);\r\n\r\n /** Table data source whose `.data` mirrors `#rows()`. */\r\n readonly dataSource = new MatTableDataSource<RecordListRow>([]);\r\n\r\n /** Row currently being edited, or `null` when no edit is in progress. */\r\n readonly #inEdit = signal<RecordListRow | null>(null);\r\n\r\n /** Inner editor sections derived from the active editor config. */\r\n readonly #sections = signal<readonly ElementEditorConfigSectionInterface[]>([]);\r\n\r\n /** Lazily-built portals keyed by inner-section element id. */\r\n readonly #portals = signal<Readonly<Record<string, ComponentPortal<TDynamicDataEditComponent>>>>(\r\n {},\r\n );\r\n\r\n /** Active per-element portal output subscriptions, keyed by element id. */\r\n readonly #portalSubscriptions = new Map<string, Subscription>();\r\n\r\n /** Form input definitions forwarded into the dynamic editor portals. */\r\n readonly formInputs = input<Array<FormColumnInputs>>([]);\r\n\r\n /** Editor configuration for this record-list element. */\r\n readonly editorConfig = input<ElementEditorInnerSectionElementInterface | undefined>(undefined);\r\n\r\n /** Emits whenever the record list value changes. */\r\n readonly valueChange = output<RecordListRow[]>();\r\n\r\n // --- Template-facing derived state ---\r\n\r\n protected readonly inEditRow = this.#inEdit.asReadonly();\r\n protected readonly portals = this.#portals.asReadonly();\r\n\r\n /**\r\n * Inner sections with each element list narrowed to the elements whose\r\n * `additionalTest` entries ALL pass against the record being edited — the same\r\n * rule `isElementApplicable` applies to top-level editor elements.\r\n *\r\n * An element without `additionalTest` always shows. When a section hides nothing,\r\n * the original section object is returned, and when no section hides anything the\r\n * original array is returned, so consumers that never configured a test (the\r\n * reports / dashboard chart config, for one) get object-identical output and\r\n * behave exactly as before.\r\n */\r\n protected readonly visibleSections = computed<readonly ElementEditorConfigSectionInterface[]>(\r\n () => {\r\n const record = this.#inEdit();\r\n const sections = this.#sections();\r\n let narrowed = false;\r\n const next = sections.map((section) => {\r\n const elements = section.elements.filter((element) =>\r\n (element.additionalTest ?? []).every((test) => testAgainstItem(test, record)),\r\n );\r\n if (elements.length === section.elements.length) {\r\n return section;\r\n }\r\n narrowed = true;\r\n return { ...section, elements };\r\n });\r\n return narrowed ? next : sections;\r\n },\r\n );\r\n\r\n protected readonly tableColumns = computed<readonly RecordColumn[]>(() => [\r\n ...(this.editorConfig()?.options ?? []).map((opt) => ({\r\n label: String(opt.label),\r\n value: String(opt.value),\r\n })),\r\n { label: ' ', value: ACTIONS_COLUMN },\r\n ]);\r\n\r\n protected readonly displayedColumns = computed<readonly string[]>(() =>\r\n this.tableColumns().map((c) => c.value),\r\n );\r\n\r\n protected readonly rowCount = computed<number>(() => this.#rows().length);\r\n\r\n protected readonly isActionsColumn = (column: string): boolean => column === ACTIONS_COLUMN;\r\n\r\n /**\r\n * A cell's text. Rows are heterogeneous wrapper-defined records, so a column may\r\n * hold anything; this renders it as one line and an absent value as an empty cell\r\n * rather than the string `undefined`.\r\n *\r\n * Also the `title` for the cell, which is what makes truncation safe — the full\r\n * value stays readable on hover instead of being lost to the ellipsis.\r\n *\r\n * @param row - The record being rendered.\r\n * @param column - The row key this column shows.\r\n * @returns The cell's display text, or `''` when the record has no such value.\r\n */\r\n protected cellText(row: RecordListRow, column: string): string {\r\n const value = row[column];\r\n return value == null ? '' : String(value);\r\n }\r\n\r\n /**\r\n * Whether the in-edit record may be saved: every `required` inner element must\r\n * resolve to a non-empty value via its `deepBind` path.\r\n *\r\n * Only currently-visible elements are considered — a `required` element hidden by\r\n * its own `additionalTest` cannot be filled in, so counting it would leave the\r\n * save button permanently disabled.\r\n */\r\n protected readonly canSaveRecord = computed<boolean>(() => {\r\n const editing = this.#inEdit();\r\n if (!editing || !this.editorConfig()) {\r\n return false;\r\n }\r\n for (const section of this.visibleSections()) {\r\n for (const element of section.elements) {\r\n if (!element.required) {\r\n continue;\r\n }\r\n const { value } = safeReturnDeepProperty(editing, element.deepBind ?? []);\r\n if (value == null || value === '') {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n });\r\n\r\n // --- Effects (framework-state sync, not signal writes within) ---\r\n\r\n /** Mirror the rows signal into the Material table data source. */\r\n protected readonly tableSync = effect(() => {\r\n this.dataSource.data = this.#rows();\r\n });\r\n\r\n /**\r\n * Rebuild the inner-section list and portal map whenever the editor config\r\n * changes. Portals are recreated per config so a stale `ComponentPortal`\r\n * (already attached) is never re-used.\r\n */\r\n protected readonly configSync = effect(() => {\r\n const next = this.editorConfig()?.secondaryElementEditorConfig ?? [];\r\n if (_isEqual(this.#sections(), next)) {\r\n return;\r\n }\r\n this.#teardownPortalSubscriptions();\r\n this.#sections.set(next);\r\n const portals: Record<string, ComponentPortal<TDynamicDataEditComponent>> = {};\r\n for (const section of next) {\r\n for (const element of section.elements) {\r\n portals[element.id] = new ComponentPortal(this.#nestedEditor);\r\n }\r\n }\r\n this.#portals.set(portals);\r\n });\r\n\r\n // --- Record actions ---\r\n\r\n addNewItem(): void {\r\n this.#inEdit.set({});\r\n }\r\n\r\n editItem(row: RecordListRow): void {\r\n this.#inEdit.set(row);\r\n }\r\n\r\n cancelEdit(): void {\r\n this.#inEdit.set(null);\r\n }\r\n\r\n saveRecord(): void {\r\n const editing = this.#inEdit();\r\n if (!editing) {\r\n return;\r\n }\r\n let next: RecordListRow[];\r\n if (editing.id != null) {\r\n next = this.value.map((item) => (item.id === editing.id ? editing : item));\r\n } else {\r\n next = [...this.value, { ...editing, id: crypto.randomUUID() }];\r\n }\r\n this.value = next;\r\n this.#inEdit.set(null);\r\n this.valueChange.emit(this.value);\r\n }\r\n\r\n removeItem(item: RecordListRow): void {\r\n this.value = this.value.filter((row) => row.id !== item.id);\r\n if (this.#inEdit()?.id === item.id) {\r\n this.#inEdit.set(null);\r\n }\r\n this.valueChange.emit(this.value);\r\n }\r\n\r\n /**\r\n * Wire a freshly-attached per-record editor portal: push the current inputs in,\r\n * and patch the in-edit buffer whenever the inner editor emits a value. The\r\n * subscription is keyed by element id and torn down on config change / destroy.\r\n *\r\n * This also runs on RE-attach, because an element hidden by `additionalTest` has\r\n * its portal outlet destroyed and a brand-new one created when it comes back:\r\n *\r\n * - Double-attach cannot happen. `CdkPortalOutlet.ngOnDestroy` disposes the outlet,\r\n * which detaches the portal and nulls its `_attachedHost`, so the same\r\n * `ComponentPortal` instance is legitimately re-attachable to the new outlet.\r\n * Only the outlet is marked disposed, and that one is gone.\r\n * - Double-subscribe cannot happen either. The previous subscription for this\r\n * element id is unsubscribed below before the new one replaces it, and it would\r\n * in any case have completed already: `outputToObservable` completes when the\r\n * emitting component is destroyed, which also unregisters the\r\n * `takeUntilDestroyed` hook rather than accumulating one per attach.\r\n */\r\n onPortalAttached(\r\n portalRef: CdkPortalOutletAttachedRef,\r\n element: ElementEditorInnerSectionElementInterface,\r\n ): void {\r\n const componentRef = portalRef as ComponentRef<TDynamicDataEditComponent>;\r\n componentRef.setInput('formInputs', this.formInputs());\r\n componentRef.setInput('editorConfig', element);\r\n componentRef.setInput('data', this.#inEdit());\r\n\r\n this.#portalSubscriptions.get(element.id)?.unsubscribe();\r\n const sub = outputToObservable(componentRef.instance.valueChange)\r\n .pipe(takeUntilDestroyed(this.#destroyRef))\r\n .subscribe((event: unknown) => {\r\n const current = this.#inEdit();\r\n const draft = (current ? structuredClone(current) : {}) as RecordListRow;\r\n this.#applyClearOnChange(draft, element, current, event);\r\n const patched = assignDeepPropertyToObject(\r\n draft,\r\n element.deepBind ?? [],\r\n event,\r\n ) as RecordListRow;\r\n this.#inEdit.set(patched);\r\n componentRef.setInput('data', patched);\r\n componentRef.changeDetectorRef.markForCheck();\r\n });\r\n this.#portalSubscriptions.set(element.id, sub);\r\n }\r\n\r\n /**\r\n * Blanks the paths an element declares in `clearOnChange`, so choosing one of a\r\n * pair of mutually exclusive settings drops the other one.\r\n *\r\n * Guarded, unlike the top-level editors: it fires only when the element's own\r\n * bound value moves AWAY from a value the record already carried. The nested\r\n * editor emits once shortly after every attach — replaying the stored value, or\r\n * `defaultValue` when the bound key is absent — so an unguarded clear would wipe\r\n * sibling fields merely because an administrator opened an existing record, and\r\n * again every time a hidden element was re-shown. Elements without\r\n * `clearOnChange` are untouched.\r\n */\r\n #applyClearOnChange(\r\n draft: RecordListRow,\r\n element: ElementEditorInnerSectionElementInterface,\r\n current: RecordListRow | null,\r\n nextValue: unknown,\r\n ): void {\r\n const paths = element.clearOnChange;\r\n if (!paths || paths.length === 0) {\r\n return;\r\n }\r\n const { value: previousValue } = safeReturnDeepProperty(current, element.deepBind ?? []);\r\n // Never set before: this is the first explicit choice, not a change away from\r\n // something, so there is nothing the administrator asked to discard.\r\n if (previousValue === undefined || previousValue === '') {\r\n return;\r\n }\r\n if (_isEqual(previousValue, nextValue)) {\r\n return;\r\n }\r\n for (const path of paths) {\r\n assignDeepPropertyToObject(draft, path, undefined);\r\n }\r\n }\r\n\r\n #teardownPortalSubscriptions(): void {\r\n this.#portalSubscriptions.forEach((sub) => sub.unsubscribe());\r\n this.#portalSubscriptions.clear();\r\n }\r\n}\r\n","<!--\r\n The card clips to its radius; the inner element is the ONLY scroll region. Without\r\n that split a table wider than the editor panel was simply cut off, taking the row\r\n actions with it — unreachable, with nothing to indicate they were there.\r\n-->\r\n<div class=\"lib-record-list-manager__table\">\r\n <div class=\"lib-record-list-manager__scroll\">\r\n <table mat-table [dataSource]=\"dataSource\" class=\"lib-record-list-manager__grid\">\r\n @for (col of tableColumns(); track col.value) {\r\n <!--\r\n `stickyEnd` pins the actions column to the right edge, so edit and delete\r\n stay reachable however far the table is scrolled. Material's own mechanism\r\n rather than hand-rolled `position: sticky`, which it already handles\r\n correctly across the table's collapsed borders.\r\n -->\r\n <ng-container [matColumnDef]=\"col.value\" [stickyEnd]=\"isActionsColumn(col.value)\">\r\n <th mat-header-cell *matHeaderCellDef scope=\"col\">{{ col.label }}</th>\r\n <td mat-cell *matCellDef=\"let row\" class=\"lib-record-list-manager__cell\">\r\n @if (isActionsColumn(col.value)) {\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n class=\"lib-record-list-manager__action\"\r\n matTooltip=\"Edit\"\r\n aria-label=\"Edit record\"\r\n [disabled]=\"disabled\"\r\n (click)=\"editItem(row)\"\r\n >\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n color=\"warn\"\r\n class=\"lib-record-list-manager__action\"\r\n matTooltip=\"Delete\"\r\n aria-label=\"Delete record\"\r\n [disabled]=\"disabled\"\r\n (click)=\"removeItem(row)\"\r\n >\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n } @else {\r\n <!--\r\n Truncated rather than allowed to widen the column: one long value in\r\n one row should not push every other column out of view. The full text\r\n stays reachable on hover and to assistive tech.\r\n -->\r\n <span class=\"lib-record-list-manager__cell-text\" [title]=\"cellText(row, col.value)\">\r\n {{ cellText(row, col.value) }}\r\n </span>\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns()\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: displayedColumns()\"\r\n class=\"lib-record-list-manager__row\"\r\n ></tr>\r\n </table>\r\n </div>\r\n\r\n @if (rowCount() === 0) {\r\n <lib-empty-state\r\n icon=\"inbox\"\r\n message=\"No records yet. Use Add Record to get started.\"\r\n ></lib-empty-state>\r\n }\r\n</div>\r\n\r\n@if (inEditRow(); as editing) {\r\n <div class=\"lib-record-list-manager__editor\">\r\n <mat-accordion class=\"lib-record-list-manager__sections\" togglePosition=\"after\">\r\n @for (section of visibleSections(); track section.id) {\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header>\r\n <mat-panel-title class=\"lib-record-list-manager__section-title\">\r\n <span>{{ section.label }}</span>\r\n @if (section.showItemValue && editing[section.showItemValue] != null) {\r\n <span class=\"lib-record-list-manager__section-value\">\r\n {{ editing[section.showItemValue] }}\r\n </span>\r\n }\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n @for (element of section.elements; track element.id) {\r\n <div class=\"lib-record-list-manager__field\">\r\n @defer (on viewport) {\r\n <ng-template\r\n [cdkPortalOutlet]=\"portals()[element.id]\"\r\n (attached)=\"onPortalAttached($event, element)\"\r\n ></ng-template>\r\n } @placeholder {\r\n <div class=\"lib-record-list-manager__loading\">\r\n <mat-spinner diameter=\"18\"></mat-spinner>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </mat-expansion-panel>\r\n }\r\n </mat-accordion>\r\n\r\n <div class=\"lib-record-list-manager__actions\">\r\n <button type=\"button\" mat-button color=\"primary\" (click)=\"cancelEdit()\">Cancel</button>\r\n <button\r\n type=\"button\"\r\n mat-stroked-button\r\n color=\"primary\"\r\n [disabled]=\"!canSaveRecord()\"\r\n (click)=\"saveRecord()\"\r\n >\r\n {{ editing.id ? 'Update' : 'Save new' }} record\r\n <mat-icon>save</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n} @else {\r\n <div class=\"lib-record-list-manager__actions lib-record-list-manager__actions--list\">\r\n <span class=\"lib-record-list-manager__count\">Records ({{ rowCount() }})</span>\r\n <button\r\n type=\"button\"\r\n mat-stroked-button\r\n color=\"primary\"\r\n matTooltip=\"Add a new record\"\r\n aria-label=\"Add a new record\"\r\n [disabled]=\"disabled\"\r\n (click)=\"addNewItem()\"\r\n >\r\n <mat-icon>add</mat-icon>\r\n Add Record\r\n </button>\r\n </div>\r\n}\r\n"],"names":["i1","i4","i5","i6","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoDA;AACA,MAAM,cAAc,GAAG,SAAS;AAEhC;;;;;;;;;;;;;;;;;;;AAmBG;MA2BU,0BAA0B,CAAA;aAC9B,IAAA,CAAA,MAAM,GAAG,CAAH,CAAK;AAkBlB,IAAA,SAAS;AACT,IAAA,IACI,QAAQ,GAAA;QACV,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A,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAChB,YAAY,+BACZ,mBAAmB,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,sBAAA,EAAA,CAAA,MAAA,CAAAC,EAAA,CAAA,eAAA,CAAA,CAAA,EAAA,CAAA,CAAA;;4FAUV,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBA1BtC,SAAS;+BACE,yBAAyB,EAAA,eAAA,EAGlB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,QAAQ,EAAA,OAAA,EAChC;wBACP,eAAe;wBACf,aAAa;wBACb,gBAAgB;wBAChB,kBAAkB;wBAClB,aAAa;wBACb,wBAAwB;wBACxB,cAAc;wBACd,gBAAgB;wBAChB,YAAY;wBACZ,mBAAmB;qBACpB,EAAA,SAAA,EACU,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,0BAA4B,EAAE,CAAC,EAAA,IAAA,EAChF;AACJ,wBAAA,OAAO,EAAE,yBAAyB;AAClC,wBAAA,MAAM,EAAE,IAAI;AACZ,wBAAA,yBAAyB,EAAE,aAAa;AACxC,wBAAA,2CAA2C,EAAE,kBAAkB;AAChE,qBAAA,EAAA,QAAA,EAAA,mgLAAA,EAAA,MAAA,EAAA,CAAA,ojFAAA,CAAA,EAAA;;sBAgBA;;sBAGA;;sBAGA;;sBAUA;;sBAUA;;sBAaA;;;;;"}
|
|
@@ -17,7 +17,7 @@ import { MatSelectModule } from '@angular/material/select';
|
|
|
17
17
|
import * as i1 from '@angular/forms';
|
|
18
18
|
import { FormsModule } from '@angular/forms';
|
|
19
19
|
import { MinInputTypes, ElementTypes, InputDataTypes } from 'ngx-t-forms-types';
|
|
20
|
-
import { b as getInputIcon, E as EmptyStateComponent } from './ngx-t-forms-ngx-t-forms-
|
|
20
|
+
import { b as getInputIcon, E as EmptyStateComponent } from './ngx-t-forms-ngx-t-forms-D_PCGH-i.mjs';
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Internal editor element for configuring a form's required (minimum) inputs.
|
|
@@ -268,4 +268,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
268
268
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], formInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "formInputs", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], valueChanged: [{ type: i0.Output, args: ["valueChanged"] }] } });
|
|
269
269
|
|
|
270
270
|
export { RequiredInputsComponent };
|
|
271
|
-
//# sourceMappingURL=ngx-t-forms-required-inputs.component-
|
|
271
|
+
//# sourceMappingURL=ngx-t-forms-required-inputs.component-BUUrpNR0.mjs.map
|