ngx-t-forms 2.0.31 → 2.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-DCKuXHAW.mjs → ngx-t-forms-auto-complete-input-element.component-CaXs4561.mjs} +2 -2
  2. package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-DCKuXHAW.mjs.map → ngx-t-forms-auto-complete-input-element.component-CaXs4561.mjs.map} +1 -1
  3. package/fesm2022/{ngx-t-forms-basic-input-input-element.component-Ce4ipSUc.mjs → ngx-t-forms-basic-input-input-element.component-Dotyd-Qs.mjs} +3 -3
  4. package/fesm2022/{ngx-t-forms-basic-input-input-element.component-Ce4ipSUc.mjs.map → ngx-t-forms-basic-input-input-element.component-Dotyd-Qs.mjs.map} +1 -1
  5. package/fesm2022/{ngx-t-forms-calculated-field-rules.component-C5TPddVe.mjs → ngx-t-forms-calculated-field-rules.component-BhxT6tRq.mjs} +4 -4
  6. package/fesm2022/{ngx-t-forms-calculated-field-rules.component-C5TPddVe.mjs.map → ngx-t-forms-calculated-field-rules.component-BhxT6tRq.mjs.map} +1 -1
  7. package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-CICQaqz6.mjs → ngx-t-forms-chip-options-creator-editor.component-d4QeVhsp.mjs} +4 -4
  8. package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-CICQaqz6.mjs.map → ngx-t-forms-chip-options-creator-editor.component-d4QeVhsp.mjs.map} +1 -1
  9. package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CzisLSIP.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-Gn8exJ9a.mjs} +2 -2
  10. package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CzisLSIP.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-Gn8exJ9a.mjs.map} +1 -1
  11. package/fesm2022/{ngx-t-forms-data-source-picker.component-Dzz_o6fJ.mjs → ngx-t-forms-data-source-picker.component-Ebf_if9j.mjs} +6 -6
  12. package/fesm2022/{ngx-t-forms-data-source-picker.component-Dzz_o6fJ.mjs.map → ngx-t-forms-data-source-picker.component-Ebf_if9j.mjs.map} +1 -1
  13. package/fesm2022/{ngx-t-forms-date-picker-input-element.component-CYUbVyzP.mjs → ngx-t-forms-date-picker-input-element.component-kdinBGRA.mjs} +2 -2
  14. package/fesm2022/{ngx-t-forms-date-picker-input-element.component-CYUbVyzP.mjs.map → ngx-t-forms-date-picker-input-element.component-kdinBGRA.mjs.map} +1 -1
  15. package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-CmoquQGV.mjs → ngx-t-forms-date-range-picker-input-element.component-4W6uvrDU.mjs} +2 -2
  16. package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-CmoquQGV.mjs.map → ngx-t-forms-date-range-picker-input-element.component-4W6uvrDU.mjs.map} +1 -1
  17. package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-CLUOXreG.mjs → ngx-t-forms-document-list-label-config-editor.component-CR6EvgJO.mjs} +3 -3
  18. package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-CLUOXreG.mjs.map → ngx-t-forms-document-list-label-config-editor.component-CR6EvgJO.mjs.map} +1 -1
  19. package/fesm2022/{ngx-t-forms-document-picker.component-qObjcqhE.mjs → ngx-t-forms-document-picker.component-BThdRFec.mjs} +2 -2
  20. package/fesm2022/{ngx-t-forms-document-picker.component-qObjcqhE.mjs.map → ngx-t-forms-document-picker.component-BThdRFec.mjs.map} +1 -1
  21. package/fesm2022/{ngx-t-forms-editor-input-element.component-BLXlfb6F.mjs → ngx-t-forms-editor-input-element.component-1X6uAPeZ.mjs} +3 -3
  22. package/fesm2022/{ngx-t-forms-editor-input-element.component-BLXlfb6F.mjs.map → ngx-t-forms-editor-input-element.component-1X6uAPeZ.mjs.map} +1 -1
  23. package/fesm2022/{ngx-t-forms-editor-js-input.component-BQL0AH7H.mjs → ngx-t-forms-editor-js-input.component-5MD8wRj0.mjs} +2 -2
  24. package/fesm2022/{ngx-t-forms-editor-js-input.component-BQL0AH7H.mjs.map → ngx-t-forms-editor-js-input.component-5MD8wRj0.mjs.map} +1 -1
  25. package/fesm2022/{ngx-t-forms-file-upload-input-element.component-C7mMeEjF.mjs → ngx-t-forms-file-upload-input-element.component-BAtuymMY.mjs} +2 -2
  26. package/fesm2022/{ngx-t-forms-file-upload-input-element.component-C7mMeEjF.mjs.map → ngx-t-forms-file-upload-input-element.component-BAtuymMY.mjs.map} +1 -1
  27. package/fesm2022/{ngx-t-forms-form-input-selector.component-C9u8zq9B.mjs → ngx-t-forms-form-input-selector.component-B42xP3jh.mjs} +2 -2
  28. package/fesm2022/{ngx-t-forms-form-input-selector.component-C9u8zq9B.mjs.map → ngx-t-forms-form-input-selector.component-B42xP3jh.mjs.map} +1 -1
  29. package/fesm2022/{ngx-t-forms-form-json-view.component-856Hx1Bg.mjs → ngx-t-forms-form-json-view.component-DnnLXqR0.mjs} +2 -2
  30. package/fesm2022/{ngx-t-forms-form-json-view.component-856Hx1Bg.mjs.map → ngx-t-forms-form-json-view.component-DnnLXqR0.mjs.map} +1 -1
  31. package/fesm2022/{ngx-t-forms-form-payload-projection.component-CDkTuX9S.mjs → ngx-t-forms-form-payload-projection.component-Ip9ewB18.mjs} +4 -4
  32. package/fesm2022/{ngx-t-forms-form-payload-projection.component-CDkTuX9S.mjs.map → ngx-t-forms-form-payload-projection.component-Ip9ewB18.mjs.map} +1 -1
  33. package/fesm2022/{ngx-t-forms-form-section-stepper.component-Bs50-nEB.mjs → ngx-t-forms-form-section-stepper.component-BPgPfZSy.mjs} +4 -4
  34. package/fesm2022/{ngx-t-forms-form-section-stepper.component-Bs50-nEB.mjs.map → ngx-t-forms-form-section-stepper.component-BPgPfZSy.mjs.map} +1 -1
  35. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-qrhM0jGL.mjs → ngx-t-forms-forms-builder-menu.component-Dv0Dfw79.mjs} +5 -5
  36. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-qrhM0jGL.mjs.map → ngx-t-forms-forms-builder-menu.component-Dv0Dfw79.mjs.map} +1 -1
  37. package/fesm2022/{ngx-t-forms-geo-location.component-Bosp1UzR.mjs → ngx-t-forms-geo-location.component-Bmd84Gcb.mjs} +2 -2
  38. package/fesm2022/{ngx-t-forms-geo-location.component-Bosp1UzR.mjs.map → ngx-t-forms-geo-location.component-Bmd84Gcb.mjs.map} +1 -1
  39. package/fesm2022/{ngx-t-forms-image-capture-input-element.component-C1g7Z0cK.mjs → ngx-t-forms-image-capture-input-element.component-CUd04Ghl.mjs} +2 -2
  40. package/fesm2022/{ngx-t-forms-image-capture-input-element.component-C1g7Z0cK.mjs.map → ngx-t-forms-image-capture-input-element.component-CUd04Ghl.mjs.map} +1 -1
  41. package/fesm2022/ngx-t-forms-index-BcrQ01DQ.mjs +2 -0
  42. package/fesm2022/ngx-t-forms-index-BcrQ01DQ.mjs.map +1 -0
  43. package/fesm2022/{ngx-t-forms-input-custom.component-BkbHFAyR.mjs → ngx-t-forms-input-custom.component-Cn-KH0Lb.mjs} +2 -2
  44. package/fesm2022/{ngx-t-forms-input-custom.component-BkbHFAyR.mjs.map → ngx-t-forms-input-custom.component-Cn-KH0Lb.mjs.map} +1 -1
  45. package/fesm2022/{ngx-t-forms-input-editor.component-BPUOM9kQ.mjs → ngx-t-forms-input-editor.component-DLru1Ezu.mjs} +17 -5
  46. package/fesm2022/ngx-t-forms-input-editor.component-DLru1Ezu.mjs.map +1 -0
  47. package/fesm2022/{ngx-t-forms-map-mat-options-keys-B6hJ7Io5.mjs → ngx-t-forms-map-mat-options-keys-CVlPdrCO.mjs} +2 -2
  48. package/fesm2022/{ngx-t-forms-map-mat-options-keys-B6hJ7Io5.mjs.map → ngx-t-forms-map-mat-options-keys-CVlPdrCO.mjs.map} +1 -1
  49. package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-c7uZT1sr.mjs → ngx-t-forms-mat-chip-list-editor.component-BWisS3Em.mjs} +4 -4
  50. package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-c7uZT1sr.mjs.map → ngx-t-forms-mat-chip-list-editor.component-BWisS3Em.mjs.map} +1 -1
  51. package/fesm2022/{ngx-t-forms-missing-form-configs.component-DrnH8qdG.mjs → ngx-t-forms-missing-form-configs.component-DxdynZY6.mjs} +2 -2
  52. package/fesm2022/{ngx-t-forms-missing-form-configs.component-DrnH8qdG.mjs.map → ngx-t-forms-missing-form-configs.component-DxdynZY6.mjs.map} +1 -1
  53. package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-C_abEBQ5.mjs → ngx-t-forms-mscoa-chart-toolbar.component-D4Xa_Yi0.mjs} +2 -2
  54. package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-C_abEBQ5.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-D4Xa_Yi0.mjs.map} +1 -1
  55. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-Bo0aDEMy.mjs +447 -0
  56. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-Bo0aDEMy.mjs.map +1 -0
  57. package/fesm2022/{ngx-t-forms-multiple-input-input-element.component-C7y1OGPx.mjs → ngx-t-forms-multiple-input-input-element.component-C8JP3D6r.mjs} +16 -16
  58. package/fesm2022/{ngx-t-forms-multiple-input-input-element.component-C7y1OGPx.mjs.map → ngx-t-forms-multiple-input-input-element.component-C8JP3D6r.mjs.map} +1 -1
  59. package/fesm2022/{ngx-t-forms-ngx-t-forms-u_kigDid.mjs → ngx-t-forms-ngx-t-forms-C2G8_WQk.mjs} +931 -82
  60. package/fesm2022/ngx-t-forms-ngx-t-forms-C2G8_WQk.mjs.map +1 -0
  61. package/fesm2022/{ngx-t-forms-paginated-selection-table-AQZSMmhr.mjs → ngx-t-forms-paginated-selection-table-0OI1ikWW.mjs} +2 -2
  62. package/fesm2022/{ngx-t-forms-paginated-selection-table-AQZSMmhr.mjs.map → ngx-t-forms-paginated-selection-table-0OI1ikWW.mjs.map} +1 -1
  63. package/fesm2022/{ngx-t-forms-pipeline-generator.component-DmNSc5aw.mjs → ngx-t-forms-pipeline-generator.component-CZ21sd77.mjs} +3 -3
  64. package/fesm2022/{ngx-t-forms-pipeline-generator.component-DmNSc5aw.mjs.map → ngx-t-forms-pipeline-generator.component-CZ21sd77.mjs.map} +1 -1
  65. package/fesm2022/{ngx-t-forms-record-list-manager.component-CUMMvMch.mjs → ngx-t-forms-record-list-manager.component-CykBq_nW.mjs} +2 -2
  66. package/fesm2022/{ngx-t-forms-record-list-manager.component-CUMMvMch.mjs.map → ngx-t-forms-record-list-manager.component-CykBq_nW.mjs.map} +1 -1
  67. package/fesm2022/{ngx-t-forms-required-inputs.component-Ch2yNcIS.mjs → ngx-t-forms-required-inputs.component-ONbhxVSH.mjs} +2 -2
  68. package/fesm2022/{ngx-t-forms-required-inputs.component-Ch2yNcIS.mjs.map → ngx-t-forms-required-inputs.component-ONbhxVSH.mjs.map} +1 -1
  69. package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-C_aFtdvW.mjs → ngx-t-forms-rest-api-call-setup.component-WPUxtY7Q.mjs} +2 -2
  70. package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-C_aFtdvW.mjs.map → ngx-t-forms-rest-api-call-setup.component-WPUxtY7Q.mjs.map} +1 -1
  71. package/fesm2022/{ngx-t-forms-section-report.component-BxOhR6C0.mjs → ngx-t-forms-section-report.component-C1w16LYm.mjs} +4 -4
  72. package/fesm2022/{ngx-t-forms-section-report.component-BxOhR6C0.mjs.map → ngx-t-forms-section-report.component-C1w16LYm.mjs.map} +1 -1
  73. package/fesm2022/{ngx-t-forms-select-input-element.component-DbgZdNoe.mjs → ngx-t-forms-select-input-element.component-CWcywuS6.mjs} +8 -8
  74. package/fesm2022/{ngx-t-forms-select-input-element.component-DbgZdNoe.mjs.map → ngx-t-forms-select-input-element.component-CWcywuS6.mjs.map} +1 -1
  75. package/fesm2022/{ngx-t-forms-selection-options-editor.component-Dhln81DL.mjs → ngx-t-forms-selection-options-editor.component-KjbZhc2u.mjs} +4 -4
  76. package/fesm2022/{ngx-t-forms-selection-options-editor.component-Dhln81DL.mjs.map → ngx-t-forms-selection-options-editor.component-KjbZhc2u.mjs.map} +1 -1
  77. package/fesm2022/{ngx-t-forms-t-workflow-picker.component-leBokXvM.mjs → ngx-t-forms-t-workflow-picker.component-CtavFAUq.mjs} +3 -3
  78. package/fesm2022/{ngx-t-forms-t-workflow-picker.component-leBokXvM.mjs.map → ngx-t-forms-t-workflow-picker.component-CtavFAUq.mjs.map} +1 -1
  79. package/fesm2022/{ngx-t-forms-textarea-input-element.component-BEbXJjFA.mjs → ngx-t-forms-textarea-input-element.component-DkJkBQif.mjs} +2 -2
  80. package/fesm2022/{ngx-t-forms-textarea-input-element.component-BEbXJjFA.mjs.map → ngx-t-forms-textarea-input-element.component-DkJkBQif.mjs.map} +1 -1
  81. package/fesm2022/{ngx-t-forms-toggle-input-element.component-DDErRUJd.mjs → ngx-t-forms-toggle-input-element.component-Dr7MNli8.mjs} +2 -2
  82. package/fesm2022/{ngx-t-forms-toggle-input-element.component-DDErRUJd.mjs.map → ngx-t-forms-toggle-input-element.component-Dr7MNli8.mjs.map} +1 -1
  83. package/fesm2022/{ngx-t-forms-validators-config.component-oGjQVGE2.mjs → ngx-t-forms-validators-config.component-BknyAmV_.mjs} +8 -167
  84. package/fesm2022/ngx-t-forms-validators-config.component-BknyAmV_.mjs.map +1 -0
  85. package/fesm2022/{ngx-t-forms-workflow-adjudication.component-CtU8dECN.mjs → ngx-t-forms-workflow-adjudication.component-CPvwm7f4.mjs} +3 -3
  86. package/fesm2022/{ngx-t-forms-workflow-adjudication.component-CtU8dECN.mjs.map → ngx-t-forms-workflow-adjudication.component-CPvwm7f4.mjs.map} +1 -1
  87. package/fesm2022/ngx-t-forms.mjs +1 -1
  88. package/package.json +2 -2
  89. package/types/ngx-t-forms.d.ts +191 -4
  90. package/fesm2022/ngx-t-forms-index-dDSobs6A.mjs +0 -2
  91. package/fesm2022/ngx-t-forms-index-dDSobs6A.mjs.map +0 -1
  92. package/fesm2022/ngx-t-forms-input-editor.component-BPUOM9kQ.mjs.map +0 -1
  93. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-C0qsMfsq.mjs +0 -336
  94. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-C0qsMfsq.mjs.map +0 -1
  95. package/fesm2022/ngx-t-forms-ngx-t-forms-u_kigDid.mjs.map +0 -1
  96. package/fesm2022/ngx-t-forms-validators-config.component-oGjQVGE2.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-t-forms-calculated-field-rules.component-C5TPddVe.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/calculated-field-rules/formula-tex.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/calculated-field-rules/math-preview.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/calculated-field-rules/calculated-field-rules.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/calculated-field-rules/calculated-field-rules.component.html"],"sourcesContent":["import { parse } from 'mathjs';\n\n/** Outcome of parsing a user-typed infix expression. */\nexport interface FormulaParseResult {\n /** LaTeX rendering of the expression, or `null` when it is empty/invalid. */\n readonly tex: string | null;\n /** A non-technical validation message, or `null` when the expression is valid (or empty). */\n readonly error: string | null;\n}\n\n/**\n * Parses a strictly-infix expression (the format `math.evaluate` consumes) and,\n * when it is syntactically valid, returns its LaTeX form for KaTeX to render.\n *\n * The expression is never rewritten — what the user types is what gets stored\n * and later evaluated by mathjs. This only *reads* it to derive a preview and a\n * friendly validity message; an empty expression is treated as \"not yet valid\"\n * rather than an error.\n */\nexport function parseInfixFormula(expression: string): FormulaParseResult {\n const trimmed = expression.trim();\n if (!trimmed) {\n return { tex: null, error: null };\n }\n try {\n return { tex: parse(trimmed).toTex(), error: null };\n } catch (error) {\n return { tex: null, error: friendlyMessage(error) };\n }\n}\n\n/** Maps mathjs' technical parser errors onto guidance a non-technical user can act on. */\nfunction friendlyMessage(error: unknown): string {\n const raw = error instanceof Error ? error.message : '';\n if (/end of expression/i.test(raw)) {\n return 'The equation looks unfinished — add the missing number or variable.';\n }\n if (/parenthesis|bracket/i.test(raw)) {\n return 'Check that every opening bracket \"(\" has a matching closing bracket \")\".';\n }\n if (/value expected/i.test(raw)) {\n return 'An operator (like + or ×) is missing a number or variable next to it.';\n }\n if (/unexpected/i.test(raw)) {\n return 'There is an unexpected symbol in the equation.';\n }\n return 'This equation is not valid yet.';\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n PLATFORM_ID,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport katex from 'katex';\n\nimport { parseInfixFormula } from './formula-tex';\n\n/**\n * Read-only \"natural maths\" preview of a strictly-infix expression.\n *\n * It parses the expression with mathjs and renders the result as MathML via\n * KaTeX (no stylesheet required — the browser draws the glyphs natively). The\n * expression itself is never modified, so what is previewed is exactly what\n * `math.evaluate` will later consume.\n *\n * Internal to `t-dynamic-data-edit` — not part of the library's public surface.\n */\n@Component({\n selector: 'lib-math-preview',\n template: '',\n styleUrl: './math-preview.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n 'class': 'lib-math-preview',\n '[attr.data-state]': 'state()',\n },\n})\nexport class MathPreviewComponent {\n /** Strictly-infix expression to render (mathjs syntax, e.g. `((a+2)/(b-1))*2`). */\n readonly expression = input<string>('');\n\n /** Text shown when there is nothing to preview. */\n readonly placeholder = input<string>('Nothing to preview yet');\n\n /** `'empty'` when no expression is set, otherwise `'rendered'`. */\n protected readonly state = computed<'empty' | 'rendered'>(() =>\n this.expression().trim() ? 'rendered' : 'empty',\n );\n\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly #isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n constructor() {\n effect(() => {\n const expression = this.expression().trim();\n const placeholder = this.placeholder();\n const element = this.#host.nativeElement;\n\n // On the server KaTeX has no DOM to render into — fall back to plain text.\n if (!this.#isBrowser) {\n element.textContent = expression || placeholder;\n return;\n }\n if (!expression) {\n element.textContent = placeholder;\n return;\n }\n\n const { tex } = parseInfixFormula(expression);\n if (tex == null) {\n // Mid-edit / not yet valid: show the raw infix until it parses cleanly.\n element.textContent = expression;\n return;\n }\n katex.render(tex, element, {\n output: 'mathml',\n throwOnError: false,\n displayMode: true,\n });\n });\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n ViewEncapsulation,\n computed,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, NgControl } from '@angular/forms';\nimport { MatSelectChange, MatSelectModule } from '@angular/material/select';\nimport { MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { Subject } from 'rxjs';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport {\n CalculatedFieldRules,\n CalculationFunctions,\n FormColumnInputs,\n TableConfigurationsInterface,\n calculationVariableInterface,\n} from 'ngx-t-forms-types';\n\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\nimport { _isEqual } from '../../../../shared/functions/isEqual';\nimport { MathPreviewComponent } from './math-preview.component';\nimport { parseInfixFormula } from './formula-tex';\n\n/** Escapes a string for safe inclusion as a literal inside a `RegExp`. */\nfunction escapeRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\n/** One selectable rounding strategy shown as a chip option. */\ninterface RoundingOption {\n readonly value: 'FLOOR' | 'CEIL' | 'ROUND';\n readonly label: string;\n}\n\n/** One operator-palette button: the glyph shown, the infix token it inserts. */\ninterface OperatorKey {\n /** Glyph rendered on the button. */\n readonly label: string;\n /** Strictly-infix token inserted into the equation (mathjs syntax). */\n readonly token: string;\n /** Characters to step the caret back after insertion (e.g. land inside `()`). */\n readonly caretBack: number;\n /** Accessible name for the button. */\n readonly aria: string;\n}\n\n/** Live syntactic state of the equation, surfaced to the user as plain guidance. */\ninterface FormulaStatus {\n readonly kind: 'empty' | 'valid' | 'invalid';\n readonly message: string;\n}\n\n// ControlValueAccessor write callback. Angular types the registered change\n// handler as `(value: any) => void`; the alias keeps that `any` contained to one\n// place rather than repeating an eslint-disable on every reference.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Angular CVA mandates an untyped change callback.\ntype CvaChange = (value: any) => void;\n\n/**\n * Internal calculated-field-rules editor implementing\n * `MatFormFieldControl<CalculatedFieldRules | undefined>` and\n * `ControlValueAccessor`.\n *\n * Rendered by `t-dynamic-data-edit`, which supplies the surrounding field label,\n * hint, and validation errors — so this component owns only its two modes: a\n * read-only formula summary (view) and a sectioned editor (edit) for the\n * formula, its variables, the optional formula source link, and the rounding\n * settings.\n *\n * NOTE: `MatFormFieldControl<T>` and `ControlValueAccessor` mandate plain\n * mutable `value` / `placeholder` / `required` / `disabled` / `id` members,\n * `@Input()` decorators on them, the `focused` / `touched` / `stateChanges` /\n * `onChange` / `onTouched` members, and the `useExisting` provider. These are\n * framework wiring, not defects — the CLAUDE.md bans on `@Input()` /\n * `useExisting` do not apply to MatFormFieldControl integration. Genuinely\n * internal state is signal-based.\n */\n@Component({\n selector: 'lib-calculated-field-rules',\n templateUrl: './calculated-field-rules.component.html',\n styleUrls: ['./calculated-field-rules.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n imports: [\n CommonModule,\n FormsModule,\n MathPreviewComponent,\n OverlayModule,\n MatFormFieldModule,\n MatInputModule,\n MatSelectModule,\n MatIconModule,\n MatCardModule,\n MatButtonModule,\n MatChipsModule,\n ],\n providers: [{ provide: MatFormFieldControl, useExisting: CalculatedFieldRulesComponent }],\n host: {\n 'class': 'lib-calculated-field-rules',\n '[attr.aria-describedby]': 'describedBy',\n },\n})\nexport class CalculatedFieldRulesComponent\n implements OnDestroy, MatFormFieldControl<CalculatedFieldRules | undefined>\n{\n static nextId = 0;\n\n // #region MatFormFieldControl framework members (plain mutable — not signals)\n @Input() placeholder = '';\n @Input() required = false;\n @Input() disabled = false;\n\n readonly stateChanges = new Subject<void>();\n readonly controlType = 'app-calculated-field-rules';\n readonly id = `app-calculated-field-rules-${CalculatedFieldRulesComponent.nextId++}`;\n\n focused = false;\n touched = false;\n describedBy = '';\n // #endregion\n\n // #region Non-MFC inputs / outputs (contract preserved exactly)\n /** Owning input definition; supplies table mode and the formula-source map. */\n readonly mapToData = input<FormColumnInputs | undefined>(undefined);\n /** All form inputs available to bind as calculation variables. */\n readonly formInputs = input<Array<FormColumnInputs>>([]);\n /** Validation errors surfaced by the parent for error-state derivation. */\n readonly errors = input<IConfigElementError[] | undefined>([]);\n\n /** Retained on the contract; reserved for path-scoped value emission. */\n readonly valueChange2dWithPath = output<unknown>();\n /** Emits the persisted rules whenever the editor commits a new value. */\n readonly valueChanged = output<CalculatedFieldRules | null>();\n // #endregion\n\n // #region Internal signal state\n /** Whether the editor card is open (edit mode) versus the summary (view). */\n protected readonly isEditing = signal(false);\n /** Working copy edited in the card; committed to `value` on save. */\n protected readonly tempValue = signal<CalculatedFieldRules>({} as CalculatedFieldRules);\n\n /** Whether the inline `$` field-picker is open. */\n protected readonly pickerOpen = signal(false);\n /** Text typed after `$`, used to filter the field-picker. */\n protected readonly pickerQuery = signal('');\n /** Keyboard-highlighted result in the field-picker. */\n protected readonly pickerActiveIndex = signal(0);\n\n /** Index of the `$` that opened the picker, and the caret at that moment. */\n #dollarIndex = -1;\n #cursorPosition = 0;\n // #endregion\n\n protected readonly roundingType: readonly RoundingOption[] = [\n { value: 'ROUND', label: 'Nearest' },\n { value: 'FLOOR', label: 'Round down' },\n { value: 'CEIL', label: 'Round up' },\n ];\n\n /** Operator palette inserted into the equation; glyphs are friendly, tokens are infix. */\n protected readonly operatorKeys: readonly OperatorKey[] = [\n { label: '+', token: ' + ', caretBack: 0, aria: 'Add' },\n { label: '−', token: ' - ', caretBack: 0, aria: 'Subtract' },\n { label: '×', token: ' * ', caretBack: 0, aria: 'Multiply' },\n { label: '÷', token: ' / ', caretBack: 0, aria: 'Divide' },\n { label: '( )', token: '()', caretBack: 1, aria: 'Brackets' },\n { label: 'xⁿ', token: '^', caretBack: 0, aria: 'Power' },\n ];\n\n /** The equation textarea, used for caret-aware token insertion. */\n protected readonly formulaInputRef =\n viewChild<ElementRef<HTMLTextAreaElement>>('formulaInput');\n\n /** Live, non-technical validity of the working equation (drives the preview banner). */\n protected readonly formulaStatus = computed<FormulaStatus>(() => {\n const formula = (this.tempValue().formula ?? '').trim();\n if (!formula) {\n return { kind: 'empty', message: 'Start building your equation below.' };\n }\n const { error } = parseInfixFormula(formula);\n return error\n ? { kind: 'invalid', message: error }\n : { kind: 'valid', message: 'This equation is valid.' };\n });\n\n /** Number-typed inputs that may back a calculation variable. */\n protected readonly cachedNumberInputs = computed<FormColumnInputs[]>(() =>\n this.formInputs().filter(\n (input) => input.dataType === 'number' || input.type === 'number',\n ),\n );\n\n /** Field-picker results: number inputs filtered by the text typed after `$`. */\n protected readonly pickerResults = computed<FormColumnInputs[]>(() => {\n const query = this.pickerQuery().trim().toLowerCase();\n const inputs = this.cachedNumberInputs();\n if (!query) {\n return inputs;\n }\n return inputs.filter(\n (input) =>\n input.label?.toLowerCase().includes(query) ||\n input.formControlName?.toLowerCase().includes(query),\n );\n });\n\n /** Every calculation function offered as a list-aggregation chip. */\n protected readonly allCalculationFunction = computed<CalculationFunctions[]>(() =>\n Object.values(CalculationFunctions),\n );\n\n /** True when this editor targets a table column rather than a scalar input. */\n protected readonly tableMode = computed<boolean>(() => !!this.mapToData()?.tableConfig);\n\n /** Table configuration when in table mode. */\n protected readonly tableConfig = computed<TableConfigurationsInterface | undefined>(\n () => this.mapToData()?.tableConfig,\n );\n\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n readonly #elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngOnDestroy(): void {\n this.stateChanges.next();\n this.stateChanges.complete();\n }\n\n // #region Value accessor & MatFormFieldControl logic\n\n #value: CalculatedFieldRules | undefined;\n\n @Input()\n get value(): CalculatedFieldRules | undefined {\n return this.#value;\n }\n set value(val: CalculatedFieldRules | undefined) {\n if (_isEqual(this.#value, val)) {\n return;\n }\n this.#value = val ? { ...val } : undefined;\n this.stateChanges.next();\n this.valueChanged.emit(this.#value ?? null);\n this.onChange(this.#value);\n }\n\n // MatFormFieldControl reads these as plain getters during its own change\n // detection, so they stay getters rather than `computed()` signals.\n get empty(): boolean {\n return !this.#value;\n }\n\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n get errorState(): boolean {\n const hasCustomError = (this.errors() ?? []).length > 0;\n const hasControlError = this.ngControl?.control?.errors != null;\n return (\n (this.touched && (hasControlError || hasCustomError)) ||\n (this.required && !this.#value)\n );\n }\n\n // ControlValueAccessor — Angular registers an untyped change callback.\n onChange: CvaChange = () => {};\n onTouched: () => void = () => {};\n\n writeValue(value: CalculatedFieldRules): void {\n this.value = value;\n }\n\n registerOnChange(fn: CvaChange): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.stateChanges.next();\n }\n\n setDescribedByIds(ids: string[]): void {\n const controlElement = this.#elementRef.nativeElement.querySelector(\n '.app-calculated-field-rules',\n );\n controlElement?.setAttribute('aria-describedby', ids.join(' '));\n this.describedBy = ids.join(' ');\n this.stateChanges.next();\n }\n\n onContainerClick(): void {\n if (!this.focused) {\n this.focused = true;\n this.stateChanges.next();\n }\n this.markAsTouched();\n }\n\n markAsTouched(): void {\n if (!this.touched) {\n this.onTouched();\n this.touched = true;\n this.stateChanges.next();\n }\n }\n\n // #endregion\n\n // #region Edit-mode lifecycle\n\n protected startEdit(): void {\n this.tempValue.set(\n this.#value ? structuredClone(this.#value) : ({} as CalculatedFieldRules),\n );\n this.isEditing.set(true);\n this.markAsTouched();\n }\n\n protected saveEdit(): void {\n this.value = this.tempValue();\n this.isEditing.set(false);\n }\n\n protected cancelEdit(): void {\n this.isEditing.set(false);\n this.tempValue.set({} as CalculatedFieldRules);\n }\n\n // #endregion\n\n // #region Formula / variable editing (operates on tempValue)\n\n protected checkIfInputCanBeLinkedToCalVariable(\n currentInput: FormColumnInputs | undefined,\n inputToDisable: {\n formControlName: unknown;\n parentInput?: unknown;\n multipleInputInEditId?: unknown;\n },\n ): boolean {\n if (!currentInput) {\n return false;\n }\n if (currentInput.formControlName === inputToDisable.formControlName) {\n return true;\n }\n if (!currentInput.multipleInputInEditId) {\n return !!inputToDisable.parentInput || !!inputToDisable.multipleInputInEditId;\n }\n return false;\n }\n\n protected linkFormulaSource(event: MatSelectChange): void {\n // Resetting formula to undefined intentionally during edit; persisted value\n // re-validates on save.\n this.tempValue.update((current) => ({\n ...current,\n formControlWithFormula: event.value,\n formula: '',\n }));\n }\n\n protected removeVariable(variableId: string): void {\n const current = this.tempValue();\n const variables = current.variables ?? [];\n const target = variables.find((v) => v.id === variableId);\n let formula = current.formula ?? '';\n if (target?.variable) {\n formula = formula\n .replace(new RegExp(`\\\\b${escapeRegExp(target.variable)}\\\\b`, 'g'), '')\n .replace(/\\s{2,}/g, ' ')\n .trim();\n }\n this.tempValue.set({\n ...current,\n variables: variables.filter((v) => v.id !== variableId),\n formula,\n });\n }\n\n protected appendVariableToFormula(variableName: string): void {\n // A variable carries no spacing of its own, so pad it only where it would\n // otherwise fuse with an adjacent token (e.g. `ab` instead of `a b`).\n const { before, after } = this.#caretSlices();\n const lead = before.length > 0 && !/[\\s(]$/.test(before) ? ' ' : '';\n const trail = after.length > 0 && !/^[\\s)]/.test(after) ? ' ' : '';\n this.insertToken(`${lead}${variableName}${trail}`, trail ? 1 : 0);\n }\n\n protected setFormula(formula: string): void {\n this.tempValue.update((current) => ({ ...current, formula }));\n }\n\n /**\n * Inserts an infix token at the caret (or appends it when the textarea is not\n * focused), then restores the caret just after the insertion. Used by both the\n * operator palette and the variable chips so the equation reads naturally while\n * staying strictly infix.\n */\n protected insertToken(token: string, caretBack = 0): void {\n const element = this.formulaInputRef()?.nativeElement;\n const { before, after } = this.#caretSlices();\n const next = before + token + after;\n\n this.setFormula(next);\n\n if (!element) {\n return;\n }\n const caret = before.length + token.length - caretBack;\n // Restore focus + caret after Angular has written the new value back to the DOM.\n setTimeout(() => {\n element.focus();\n element.setSelectionRange(caret, caret);\n });\n }\n\n /** The formula split around the current caret/selection (end-of-string when unfocused). */\n #caretSlices(): { before: string; after: string } {\n const current = this.tempValue().formula ?? '';\n const element = this.formulaInputRef()?.nativeElement;\n const start = element?.selectionStart ?? current.length;\n const end = element?.selectionEnd ?? current.length;\n return { before: current.slice(0, start), after: current.slice(end) };\n }\n\n protected setDecimalPlaces(value: number | string | null): void {\n const parsed =\n value === null || value === '' ? undefined : Number(value);\n this.tempValue.update((current) => ({\n ...current,\n decimalPlaces: parsed !== undefined && Number.isFinite(parsed) ? parsed : undefined,\n }));\n }\n\n protected setRoundingMode(mode: 'FLOOR' | 'CEIL' | 'ROUND'): void {\n this.tempValue.update((current) => ({ ...current, roundingMode: mode }));\n }\n\n /** Friendly label for a stored rounding mode, used in the read-only summary. */\n protected roundingLabel(mode: 'FLOOR' | 'CEIL' | 'ROUND' | undefined): string {\n return this.roundingType.find((option) => option.value === mode)?.label ?? 'nearest';\n }\n\n // #endregion\n\n // #region Inline `$` field-picker & variable binding\n\n /** Formula text changed: persist it and re-evaluate whether the `$` picker should show. */\n protected onFormulaChange(value: string): void {\n this.setFormula(value);\n this.#syncPicker();\n }\n\n /** Caret moved (click / arrow keys / focus): re-evaluate the `$` picker against the new caret. */\n protected onFormulaCaret(): void {\n this.#syncPicker();\n }\n\n /** Closes the picker shortly after blur, leaving time for a result click to register. */\n protected onFormulaBlur(): void {\n setTimeout(() => this.closePicker(), 150);\n }\n\n /** Keyboard control for the open picker: navigate, select, dismiss. */\n protected onFormulaKeydown(event: KeyboardEvent): void {\n if (!this.pickerOpen()) {\n return;\n }\n const results = this.pickerResults();\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n this.pickerActiveIndex.update((i) => Math.min(i + 1, results.length - 1));\n break;\n case 'ArrowUp':\n event.preventDefault();\n this.pickerActiveIndex.update((i) => Math.max(i - 1, 0));\n break;\n case 'Enter': {\n const item = results[this.pickerActiveIndex()];\n if (item) {\n event.preventDefault();\n this.selectField(item);\n }\n break;\n }\n case 'Escape':\n event.preventDefault();\n this.closePicker();\n break;\n }\n }\n\n protected closePicker(): void {\n this.pickerOpen.set(false);\n this.pickerActiveIndex.set(0);\n this.#dollarIndex = -1;\n }\n\n /**\n * Binds a form field to a calculation variable and drops its short token into\n * the equation. Reuses an existing scalar binding for the same field; otherwise\n * mints the next free short name (a, b, c, …). When opened from `$`, the typed\n * `$query` is replaced in place; otherwise the token is appended.\n */\n protected selectField(input: FormColumnInputs): void {\n const current = this.tempValue();\n const variables = current.variables ?? [];\n const existing = variables.find(\n (v) => v.formControlName === input.formControlName && !v.function && !v.parentInputId,\n );\n const token = existing ? existing.variable : this.#nextShortName();\n const nextVars = existing ? variables : [...variables, this.#makeVariable(input, token)];\n\n const formula = current.formula ?? '';\n let nextFormula: string;\n let caret: number;\n if (this.pickerOpen() && this.#dollarIndex >= 0) {\n const before = formula.slice(0, this.#dollarIndex);\n const after = formula.slice(this.#cursorPosition);\n const lead = before.length > 0 && !/[\\s(]$/.test(before) ? ' ' : '';\n const insert = `${lead}${token} `;\n nextFormula = before + insert + after;\n caret = (before + insert).length;\n } else {\n const lead = formula.length > 0 && !/[\\s(]$/.test(formula) ? ' ' : '';\n nextFormula = `${formula}${lead}${token} `;\n caret = nextFormula.length;\n }\n\n this.tempValue.set({ ...current, formula: nextFormula, variables: nextVars });\n this.closePicker();\n\n const element = this.formulaInputRef()?.nativeElement;\n if (element) {\n setTimeout(() => {\n element.focus();\n element.setSelectionRange(caret, caret);\n });\n }\n }\n\n /**\n * Renames a variable's short token, updating every whole-word occurrence in the\n * formula. An empty name is ignored so the token never desyncs from the formula\n * (the field repopulates with the current name on the next render).\n */\n protected setVariableShortName(id: string, rawName: string): void {\n const name = rawName.trim();\n const current = this.tempValue();\n const variables = current.variables ?? [];\n const target = variables.find((v) => v.id === id);\n if (!target || !name || name === target.variable) {\n return;\n }\n const formula = target.variable\n ? (current.formula ?? '').replace(\n new RegExp(`\\\\b${escapeRegExp(target.variable)}\\\\b`, 'g'),\n name,\n )\n : (current.formula ?? '');\n this.tempValue.set({\n ...current,\n formula,\n variables: variables.map((v) => (v.id === id ? { ...v, variable: name } : v)),\n });\n }\n\n /** Toggles a list-aggregation function (sum/avg/…) on a sub-item variable. */\n protected setVariableFunction(id: string, func: CalculationFunctions): void {\n this.tempValue.update((current) => ({\n ...current,\n variables: (current.variables ?? []).map((v) => {\n if (v.id !== id) {\n return v;\n }\n if (v.function === func) {\n return {\n ...v,\n function: undefined,\n applyFunctionToCol: undefined,\n applyFunctionToLabel: undefined,\n };\n }\n return {\n ...v,\n function: func,\n applyFunctionToCol: v.formControlName,\n applyFunctionToLabel: v.label,\n };\n }),\n }));\n }\n\n /** Recomputes the picker visibility/query from the current formula and caret. */\n #syncPicker(): void {\n const element = this.formulaInputRef()?.nativeElement;\n if (!element) {\n this.closePicker();\n return;\n }\n const position = element.selectionStart ?? 0;\n this.#cursorPosition = position;\n const formula = this.tempValue().formula ?? '';\n const lastDollar = formula.slice(0, position).lastIndexOf('$');\n if (lastDollar === -1) {\n this.closePicker();\n return;\n }\n const query = formula.slice(lastDollar + 1, position);\n // Only a run of letters/digits/spaces keeps the picker open; anything else\n // (an operator, a newline) means the `$` was not a field trigger.\n if (!/^[a-zA-Z0-9 ]*$/.test(query)) {\n this.closePicker();\n return;\n }\n this.#dollarIndex = lastDollar;\n this.pickerQuery.set(query);\n this.pickerActiveIndex.set(0);\n this.pickerOpen.set(true);\n }\n\n /** Builds a calculation variable bound to a form field, carrying the list parent when present. */\n #makeVariable(input: FormColumnInputs, token: string): calculationVariableInterface {\n return {\n id: uuidv4(),\n variable: token,\n formControlName: input.formControlName,\n inputId: input.id,\n label: input.label,\n ...(input.multipleInputInEditId ? { parentInputId: input.multipleInputInEditId } : {}),\n } as calculationVariableInterface;\n }\n\n /** Next free single-letter token (a, b, c, …), skipping mathjs constants and falling back to v1, v2…. */\n #nextShortName(): string {\n const used = new Set((this.tempValue().variables ?? []).map((v) => v.variable));\n const reserved = new Set(['e', 'i']); // mathjs constants\n for (let code = 97; code <= 122; code++) {\n const char = String.fromCharCode(code);\n if (!used.has(char) && !reserved.has(char)) {\n return char;\n }\n }\n let n = 1;\n while (used.has(`v${n}`)) {\n n++;\n }\n return `v${n}`;\n }\n\n // #endregion\n}\n","<!-- View mode: read-only calculation summary -->\n@if (!isEditing()) {\n<div class=\"cfr-summary\">\n @if (!!value && !mapToData()?.id && !tableMode()) {\n <div class=\"cfr-hint\">\n <mat-icon class=\"cfr-hint__icon\" color=\"primary\">info</mat-icon>\n <span>Save the input first to enable calculated field configurations</span>\n </div>\n }\n\n <div class=\"cfr-formula-card\">\n <span class=\"cfr-section__label\">Calculation</span>\n <lib-math-preview class=\"cfr-formula-card__preview\" [expression]=\"value?.formula || ''\"\n placeholder=\"No calculation set up yet\" />\n @if (value?.decimalPlaces) {\n <div class=\"cfr-formula-card__meta\">\n <mat-icon class=\"cfr-formula-card__meta-icon\">tune</mat-icon>\n <span>Shown to {{ value?.decimalPlaces }} decimal place(s) · {{ value?.roundingMode ? roundingLabel(value?.roundingMode) : 'nearest' }}</span>\n </div>\n }\n </div>\n\n <button class=\"cfr-edit-trigger\" mat-stroked-button color=\"primary\" [disabled]=\"disabled\"\n (click)=\"startEdit()\">\n <mat-icon>edit</mat-icon>\n {{ !!value?.formula ? 'Edit calculation' : 'Set up calculation' }}\n </button>\n</div>\n}\n\n<!-- Edit mode: guided calculation builder -->\n@else {\n<mat-card appearance=\"outlined\" class=\"cfr-editor\">\n <header class=\"cfr-editor__head\">\n <h3 class=\"cfr-editor__title\">\n <mat-icon>functions</mat-icon>\n Build the calculation\n </h3>\n <p class=\"cfr-editor__subtitle\">\n Combine your form fields with operators to work out this value automatically.\n </p>\n </header>\n\n <!-- Live preview + validity -->\n <div class=\"cfr-preview\" [attr.data-state]=\"formulaStatus().kind\">\n <span class=\"cfr-section__label\">Live preview</span>\n <lib-math-preview class=\"cfr-preview__render\" [expression]=\"tempValue().formula || ''\"\n placeholder=\"Your equation will appear here\" />\n <p class=\"cfr-preview__status\">\n <mat-icon class=\"cfr-preview__status-icon\">\n {{ formulaStatus().kind === 'valid' ? 'check_circle' : formulaStatus().kind === 'invalid' ? 'error' : 'lightbulb' }}\n </mat-icon>\n <span>{{ formulaStatus().message }}</span>\n </p>\n </div>\n\n <section class=\"cfr-section\">\n <!-- Equation input + inline field-picker + operator keypad -->\n <div class=\"cfr-equation\">\n <div class=\"cfr-equation__field\">\n <mat-form-field class=\"cfr-field\" [subscriptSizing]=\"'dynamic'\" [floatLabel]=\"'always'\"\n appearance=\"outline\">\n <mat-label>Equation</mat-label>\n <textarea #formulaInput matInput [ngModel]=\"tempValue().formula\"\n (ngModelChange)=\"onFormulaChange($event)\" (keyup)=\"onFormulaCaret()\"\n (click)=\"onFormulaCaret()\" (focus)=\"onFormulaCaret()\"\n (keydown)=\"onFormulaKeydown($event)\" (blur)=\"onFormulaBlur()\"\n placeholder=\"e.g. (a + 2) / b\" rows=\"2\" spellcheck=\"false\" autocapitalize=\"off\"\n autocomplete=\"off\"></textarea>\n <mat-hint>Type <strong>$</strong> to add a form field, then join fields with the operator keys.</mat-hint>\n </mat-form-field>\n\n @if (pickerOpen()) {\n <div class=\"cfr-picker\" role=\"listbox\" aria-label=\"Form fields\">\n <div class=\"cfr-picker__head\">Insert a field</div>\n @if (pickerResults().length === 0) {\n <div class=\"cfr-picker__empty\">No matching number fields</div>\n } @else {\n @for (item of pickerResults(); track item.id; let idx = $index) {\n <button type=\"button\" role=\"option\" class=\"cfr-picker__item\"\n [class.cfr-picker__item--active]=\"idx === pickerActiveIndex()\"\n [attr.aria-selected]=\"idx === pickerActiveIndex()\"\n (mousedown)=\"$event.preventDefault()\" (click)=\"selectField(item)\">\n <mat-icon class=\"cfr-picker__icon\">{{ item.multipleInputInEditId ? 'format_list_numbered' : 'tag' }}</mat-icon>\n <span class=\"cfr-picker__label\">{{ item.label }}</span>\n <span class=\"cfr-picker__meta\">{{ item.formControlName }}</span>\n </button>\n }\n }\n </div>\n }\n </div>\n\n <div class=\"cfr-keypad\" role=\"group\" aria-label=\"Operators\">\n @for (key of operatorKeys; track key.token) {\n <button type=\"button\" class=\"cfr-key\" [attr.aria-label]=\"key.aria\"\n (click)=\"insertToken(key.token, key.caretBack)\">\n {{ key.label }}\n </button>\n }\n </div>\n </div>\n\n <!-- Optional equation source link -->\n @if (!!tempValue().getFormulaFromAFormInput) {\n <mat-form-field class=\"cfr-field\" [subscriptSizing]=\"'dynamic'\" [floatLabel]=\"'always'\"\n appearance=\"outline\">\n <mat-label>Equation source</mat-label>\n <mat-select [value]=\"tempValue().formControlWithFormula\"\n (selectionChange)=\"linkFormulaSource($event)\" placeholder=\"Select an input that holds a formula\">\n @for (input of formInputs(); track input.id) {\n <mat-option\n [disabled]=\"checkIfInputCanBeLinkedToCalVariable(mapToData(), input) || input.element !== 'select'\"\n [value]=\"input.formControlName\">\n {{ input.label }}\n </mat-option>\n }\n </mat-select>\n <mat-hint>Pull the equation from another input's value</mat-hint>\n </mat-form-field>\n }\n\n <!-- Bound fields legend -->\n <div class=\"cfr-variables\">\n <div class=\"cfr-block-head\">\n <span class=\"cfr-section__label\">Fields in this calculation</span>\n <span class=\"cfr-block-head__hint\">Rename a letter, or type $ above to add another</span>\n </div>\n\n @if ((tempValue().variables || []).length === 0) {\n <p class=\"cfr-variables__empty\">\n Type <strong>$</strong> in the equation above to add a form field — each becomes a short\n letter you can use in the equation.\n </p>\n } @else {\n <ul class=\"cfr-legend\">\n @for (variable of (tempValue().variables || []); track variable.id) {\n <li class=\"cfr-legend__row\">\n <div class=\"cfr-legend__main\">\n <input class=\"cfr-legend__token\" [ngModel]=\"variable.variable\"\n (ngModelChange)=\"setVariableShortName(variable.id, $event)\" aria-label=\"Short name\"\n maxlength=\"12\" spellcheck=\"false\" autocomplete=\"off\" autocapitalize=\"off\">\n <mat-icon class=\"cfr-legend__arrow\">arrow_right_alt</mat-icon>\n <button type=\"button\" class=\"cfr-legend__field\"\n [attr.aria-label]=\"'Insert ' + variable.label + ' into the equation'\"\n (click)=\"appendVariableToFormula(variable.variable)\">\n {{ variable.label }}\n </button>\n <button type=\"button\" class=\"cfr-legend__remove\"\n [attr.aria-label]=\"'Remove ' + variable.variable\"\n (click)=\"removeVariable(variable.id)\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n\n @if (variable.parentInputId) {\n <div class=\"cfr-legend__fns\" role=\"group\" aria-label=\"Combine list values with\">\n <span class=\"cfr-legend__fns-label\" aria-hidden=\"true\">ƒ</span>\n @for (func of allCalculationFunction(); track func) {\n <button type=\"button\" class=\"cfr-legend__fn\"\n [class.cfr-legend__fn--active]=\"variable.function === func\"\n (click)=\"setVariableFunction(variable.id, func)\">\n {{ func }}\n </button>\n }\n </div>\n }\n </li>\n }\n </ul>\n }\n </div>\n\n <!-- Result formatting -->\n <div class=\"cfr-rounding\">\n <div class=\"cfr-block-head\">\n <span class=\"cfr-section__label\">Result formatting</span>\n <span class=\"cfr-block-head__hint\">Optional — how the answer is rounded</span>\n </div>\n\n <div class=\"cfr-rounding__row\">\n <mat-form-field class=\"cfr-field cfr-rounding__decimals\" [subscriptSizing]=\"'dynamic'\"\n [floatLabel]=\"'always'\" appearance=\"outline\">\n <mat-label>Decimal places</mat-label>\n <input matInput [ngModel]=\"tempValue().decimalPlaces\"\n (ngModelChange)=\"setDecimalPlaces($event)\" placeholder=\"0\" type=\"number\" min=\"0\">\n </mat-form-field>\n\n @if (tempValue().decimalPlaces) {\n <div class=\"cfr-rounding__mode\">\n <label class=\"cfr-section__label\">Rounding</label>\n <mat-chip-listbox aria-label=\"Rounding method\">\n @for (type of roundingType; track type.value) {\n <mat-chip-option (click)=\"setRoundingMode(type.value)\"\n [selected]=\"tempValue().roundingMode === type.value\">\n {{ type.label }}\n </mat-chip-option>\n }\n </mat-chip-listbox>\n </div>\n }\n </div>\n </div>\n </section>\n\n <div class=\"cfr-editor__actions\">\n <button mat-button (click)=\"cancelEdit()\">Cancel</button>\n <button mat-flat-button color=\"primary\" [disabled]=\"formulaStatus().kind === 'invalid'\"\n (click)=\"saveEdit()\">\n Save calculation\n </button>\n </div>\n</mat-card>\n}\n\n<!-- Disabled overlay -->\n<ng-template cdkConnectedOverlay [cdkConnectedOverlayOpen]=\"disabled\">\n <div class=\"cfr-disabled-overlay\"></div>\n</ng-template>\n"],"names":["uuidv4","i4","i5","i6","i7","i9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA;;;;;;;;AAQG;AACG,SAAU,iBAAiB,CAAC,UAAkB,EAAA;AAClD,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,EAAE;IACjC,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;IACnC;AACA,IAAA,IAAI;AACF,QAAA,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;IACrD;IAAE,OAAO,KAAK,EAAE;AACd,QAAA,OAAO,EAAE,G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AAA,CAAA;sBAkE1D;;;;;"}
1
+ {"version":3,"file":"ngx-t-forms-calculated-field-rules.component-BhxT6tRq.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/calculated-field-rules/formula-tex.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/calculated-field-rules/math-preview.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/calculated-field-rules/calculated-field-rules.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/calculated-field-rules/calculated-field-rules.component.html"],"sourcesContent":["import { parse } from 'mathjs';\n\n/** Outcome of parsing a user-typed infix expression. */\nexport interface FormulaParseResult {\n /** LaTeX rendering of the expression, or `null` when it is empty/invalid. */\n readonly tex: string | null;\n /** A non-technical validation message, or `null` when the expression is valid (or empty). */\n readonly error: string | null;\n}\n\n/**\n * Parses a strictly-infix expression (the format `math.evaluate` consumes) and,\n * when it is syntactically valid, returns its LaTeX form for KaTeX to render.\n *\n * The expression is never rewritten — what the user types is what gets stored\n * and later evaluated by mathjs. This only *reads* it to derive a preview and a\n * friendly validity message; an empty expression is treated as \"not yet valid\"\n * rather than an error.\n */\nexport function parseInfixFormula(expression: string): FormulaParseResult {\n const trimmed = expression.trim();\n if (!trimmed) {\n return { tex: null, error: null };\n }\n try {\n return { tex: parse(trimmed).toTex(), error: null };\n } catch (error) {\n return { tex: null, error: friendlyMessage(error) };\n }\n}\n\n/** Maps mathjs' technical parser errors onto guidance a non-technical user can act on. */\nfunction friendlyMessage(error: unknown): string {\n const raw = error instanceof Error ? error.message : '';\n if (/end of expression/i.test(raw)) {\n return 'The equation looks unfinished — add the missing number or variable.';\n }\n if (/parenthesis|bracket/i.test(raw)) {\n return 'Check that every opening bracket \"(\" has a matching closing bracket \")\".';\n }\n if (/value expected/i.test(raw)) {\n return 'An operator (like + or ×) is missing a number or variable next to it.';\n }\n if (/unexpected/i.test(raw)) {\n return 'There is an unexpected symbol in the equation.';\n }\n return 'This equation is not valid yet.';\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n PLATFORM_ID,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport katex from 'katex';\n\nimport { parseInfixFormula } from './formula-tex';\n\n/**\n * Read-only \"natural maths\" preview of a strictly-infix expression.\n *\n * It parses the expression with mathjs and renders the result as MathML via\n * KaTeX (no stylesheet required — the browser draws the glyphs natively). The\n * expression itself is never modified, so what is previewed is exactly what\n * `math.evaluate` will later consume.\n *\n * Internal to `t-dynamic-data-edit` — not part of the library's public surface.\n */\n@Component({\n selector: 'lib-math-preview',\n template: '',\n styleUrl: './math-preview.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n 'class': 'lib-math-preview',\n '[attr.data-state]': 'state()',\n },\n})\nexport class MathPreviewComponent {\n /** Strictly-infix expression to render (mathjs syntax, e.g. `((a+2)/(b-1))*2`). */\n readonly expression = input<string>('');\n\n /** Text shown when there is nothing to preview. */\n readonly placeholder = input<string>('Nothing to preview yet');\n\n /** `'empty'` when no expression is set, otherwise `'rendered'`. */\n protected readonly state = computed<'empty' | 'rendered'>(() =>\n this.expression().trim() ? 'rendered' : 'empty',\n );\n\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly #isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n constructor() {\n effect(() => {\n const expression = this.expression().trim();\n const placeholder = this.placeholder();\n const element = this.#host.nativeElement;\n\n // On the server KaTeX has no DOM to render into — fall back to plain text.\n if (!this.#isBrowser) {\n element.textContent = expression || placeholder;\n return;\n }\n if (!expression) {\n element.textContent = placeholder;\n return;\n }\n\n const { tex } = parseInfixFormula(expression);\n if (tex == null) {\n // Mid-edit / not yet valid: show the raw infix until it parses cleanly.\n element.textContent = expression;\n return;\n }\n katex.render(tex, element, {\n output: 'mathml',\n throwOnError: false,\n displayMode: true,\n });\n });\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n ViewEncapsulation,\n computed,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, NgControl } from '@angular/forms';\nimport { MatSelectChange, MatSelectModule } from '@angular/material/select';\nimport { MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { Subject } from 'rxjs';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport {\n CalculatedFieldRules,\n CalculationFunctions,\n FormColumnInputs,\n TableConfigurationsInterface,\n calculationVariableInterface,\n} from 'ngx-t-forms-types';\n\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\nimport { _isEqual } from '../../../../shared/functions/isEqual';\nimport { MathPreviewComponent } from './math-preview.component';\nimport { parseInfixFormula } from './formula-tex';\n\n/** Escapes a string for safe inclusion as a literal inside a `RegExp`. */\nfunction escapeRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\n/** One selectable rounding strategy shown as a chip option. */\ninterface RoundingOption {\n readonly value: 'FLOOR' | 'CEIL' | 'ROUND';\n readonly label: string;\n}\n\n/** One operator-palette button: the glyph shown, the infix token it inserts. */\ninterface OperatorKey {\n /** Glyph rendered on the button. */\n readonly label: string;\n /** Strictly-infix token inserted into the equation (mathjs syntax). */\n readonly token: string;\n /** Characters to step the caret back after insertion (e.g. land inside `()`). */\n readonly caretBack: number;\n /** Accessible name for the button. */\n readonly aria: string;\n}\n\n/** Live syntactic state of the equation, surfaced to the user as plain guidance. */\ninterface FormulaStatus {\n readonly kind: 'empty' | 'valid' | 'invalid';\n readonly message: string;\n}\n\n// ControlValueAccessor write callback. Angular types the registered change\n// handler as `(value: any) => void`; the alias keeps that `any` contained to one\n// place rather than repeating an eslint-disable on every reference.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Angular CVA mandates an untyped change callback.\ntype CvaChange = (value: any) => void;\n\n/**\n * Internal calculated-field-rules editor implementing\n * `MatFormFieldControl<CalculatedFieldRules | undefined>` and\n * `ControlValueAccessor`.\n *\n * Rendered by `t-dynamic-data-edit`, which supplies the surrounding field label,\n * hint, and validation errors — so this component owns only its two modes: a\n * read-only formula summary (view) and a sectioned editor (edit) for the\n * formula, its variables, the optional formula source link, and the rounding\n * settings.\n *\n * NOTE: `MatFormFieldControl<T>` and `ControlValueAccessor` mandate plain\n * mutable `value` / `placeholder` / `required` / `disabled` / `id` members,\n * `@Input()` decorators on them, the `focused` / `touched` / `stateChanges` /\n * `onChange` / `onTouched` members, and the `useExisting` provider. These are\n * framework wiring, not defects — the CLAUDE.md bans on `@Input()` /\n * `useExisting` do not apply to MatFormFieldControl integration. Genuinely\n * internal state is signal-based.\n */\n@Component({\n selector: 'lib-calculated-field-rules',\n templateUrl: './calculated-field-rules.component.html',\n styleUrls: ['./calculated-field-rules.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n imports: [\n CommonModule,\n FormsModule,\n MathPreviewComponent,\n OverlayModule,\n MatFormFieldModule,\n MatInputModule,\n MatSelectModule,\n MatIconModule,\n MatCardModule,\n MatButtonModule,\n MatChipsModule,\n ],\n providers: [{ provide: MatFormFieldControl, useExisting: CalculatedFieldRulesComponent }],\n host: {\n 'class': 'lib-calculated-field-rules',\n '[attr.aria-describedby]': 'describedBy',\n },\n})\nexport class CalculatedFieldRulesComponent\n implements OnDestroy, MatFormFieldControl<CalculatedFieldRules | undefined>\n{\n static nextId = 0;\n\n // #region MatFormFieldControl framework members (plain mutable — not signals)\n @Input() placeholder = '';\n @Input() required = false;\n @Input() disabled = false;\n\n readonly stateChanges = new Subject<void>();\n readonly controlType = 'app-calculated-field-rules';\n readonly id = `app-calculated-field-rules-${CalculatedFieldRulesComponent.nextId++}`;\n\n focused = false;\n touched = false;\n describedBy = '';\n // #endregion\n\n // #region Non-MFC inputs / outputs (contract preserved exactly)\n /** Owning input definition; supplies table mode and the formula-source map. */\n readonly mapToData = input<FormColumnInputs | undefined>(undefined);\n /** All form inputs available to bind as calculation variables. */\n readonly formInputs = input<Array<FormColumnInputs>>([]);\n /** Validation errors surfaced by the parent for error-state derivation. */\n readonly errors = input<IConfigElementError[] | undefined>([]);\n\n /** Retained on the contract; reserved for path-scoped value emission. */\n readonly valueChange2dWithPath = output<unknown>();\n /** Emits the persisted rules whenever the editor commits a new value. */\n readonly valueChanged = output<CalculatedFieldRules | null>();\n // #endregion\n\n // #region Internal signal state\n /** Whether the editor card is open (edit mode) versus the summary (view). */\n protected readonly isEditing = signal(false);\n /** Working copy edited in the card; committed to `value` on save. */\n protected readonly tempValue = signal<CalculatedFieldRules>({} as CalculatedFieldRules);\n\n /** Whether the inline `$` field-picker is open. */\n protected readonly pickerOpen = signal(false);\n /** Text typed after `$`, used to filter the field-picker. */\n protected readonly pickerQuery = signal('');\n /** Keyboard-highlighted result in the field-picker. */\n protected readonly pickerActiveIndex = signal(0);\n\n /** Index of the `$` that opened the picker, and the caret at that moment. */\n #dollarIndex = -1;\n #cursorPosition = 0;\n // #endregion\n\n protected readonly roundingType: readonly RoundingOption[] = [\n { value: 'ROUND', label: 'Nearest' },\n { value: 'FLOOR', label: 'Round down' },\n { value: 'CEIL', label: 'Round up' },\n ];\n\n /** Operator palette inserted into the equation; glyphs are friendly, tokens are infix. */\n protected readonly operatorKeys: readonly OperatorKey[] = [\n { label: '+', token: ' + ', caretBack: 0, aria: 'Add' },\n { label: '−', token: ' - ', caretBack: 0, aria: 'Subtract' },\n { label: '×', token: ' * ', caretBack: 0, aria: 'Multiply' },\n { label: '÷', token: ' / ', caretBack: 0, aria: 'Divide' },\n { label: '( )', token: '()', caretBack: 1, aria: 'Brackets' },\n { label: 'xⁿ', token: '^', caretBack: 0, aria: 'Power' },\n ];\n\n /** The equation textarea, used for caret-aware token insertion. */\n protected readonly formulaInputRef =\n viewChild<ElementRef<HTMLTextAreaElement>>('formulaInput');\n\n /** Live, non-technical validity of the working equation (drives the preview banner). */\n protected readonly formulaStatus = computed<FormulaStatus>(() => {\n const formula = (this.tempValue().formula ?? '').trim();\n if (!formula) {\n return { kind: 'empty', message: 'Start building your equation below.' };\n }\n const { error } = parseInfixFormula(formula);\n return error\n ? { kind: 'invalid', message: error }\n : { kind: 'valid', message: 'This equation is valid.' };\n });\n\n /** Number-typed inputs that may back a calculation variable. */\n protected readonly cachedNumberInputs = computed<FormColumnInputs[]>(() =>\n this.formInputs().filter(\n (input) => input.dataType === 'number' || input.type === 'number',\n ),\n );\n\n /** Field-picker results: number inputs filtered by the text typed after `$`. */\n protected readonly pickerResults = computed<FormColumnInputs[]>(() => {\n const query = this.pickerQuery().trim().toLowerCase();\n const inputs = this.cachedNumberInputs();\n if (!query) {\n return inputs;\n }\n return inputs.filter(\n (input) =>\n input.label?.toLowerCase().includes(query) ||\n input.formControlName?.toLowerCase().includes(query),\n );\n });\n\n /** Every calculation function offered as a list-aggregation chip. */\n protected readonly allCalculationFunction = computed<CalculationFunctions[]>(() =>\n Object.values(CalculationFunctions),\n );\n\n /** True when this editor targets a table column rather than a scalar input. */\n protected readonly tableMode = computed<boolean>(() => !!this.mapToData()?.tableConfig);\n\n /** Table configuration when in table mode. */\n protected readonly tableConfig = computed<TableConfigurationsInterface | undefined>(\n () => this.mapToData()?.tableConfig,\n );\n\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n readonly #elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngOnDestroy(): void {\n this.stateChanges.next();\n this.stateChanges.complete();\n }\n\n // #region Value accessor & MatFormFieldControl logic\n\n #value: CalculatedFieldRules | undefined;\n\n @Input()\n get value(): CalculatedFieldRules | undefined {\n return this.#value;\n }\n set value(val: CalculatedFieldRules | undefined) {\n if (_isEqual(this.#value, val)) {\n return;\n }\n this.#value = val ? { ...val } : undefined;\n this.stateChanges.next();\n this.valueChanged.emit(this.#value ?? null);\n this.onChange(this.#value);\n }\n\n // MatFormFieldControl reads these as plain getters during its own change\n // detection, so they stay getters rather than `computed()` signals.\n get empty(): boolean {\n return !this.#value;\n }\n\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n get errorState(): boolean {\n const hasCustomError = (this.errors() ?? []).length > 0;\n const hasControlError = this.ngControl?.control?.errors != null;\n return (\n (this.touched && (hasControlError || hasCustomError)) ||\n (this.required && !this.#value)\n );\n }\n\n // ControlValueAccessor — Angular registers an untyped change callback.\n onChange: CvaChange = () => {};\n onTouched: () => void = () => {};\n\n writeValue(value: CalculatedFieldRules): void {\n this.value = value;\n }\n\n registerOnChange(fn: CvaChange): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.stateChanges.next();\n }\n\n setDescribedByIds(ids: string[]): void {\n const controlElement = this.#elementRef.nativeElement.querySelector(\n '.app-calculated-field-rules',\n );\n controlElement?.setAttribute('aria-describedby', ids.join(' '));\n this.describedBy = ids.join(' ');\n this.stateChanges.next();\n }\n\n onContainerClick(): void {\n if (!this.focused) {\n this.focused = true;\n this.stateChanges.next();\n }\n this.markAsTouched();\n }\n\n markAsTouched(): void {\n if (!this.touched) {\n this.onTouched();\n this.touched = true;\n this.stateChanges.next();\n }\n }\n\n // #endregion\n\n // #region Edit-mode lifecycle\n\n protected startEdit(): void {\n this.tempValue.set(\n this.#value ? structuredClone(this.#value) : ({} as CalculatedFieldRules),\n );\n this.isEditing.set(true);\n this.markAsTouched();\n }\n\n protected saveEdit(): void {\n this.value = this.tempValue();\n this.isEditing.set(false);\n }\n\n protected cancelEdit(): void {\n this.isEditing.set(false);\n this.tempValue.set({} as CalculatedFieldRules);\n }\n\n // #endregion\n\n // #region Formula / variable editing (operates on tempValue)\n\n protected checkIfInputCanBeLinkedToCalVariable(\n currentInput: FormColumnInputs | undefined,\n inputToDisable: {\n formControlName: unknown;\n parentInput?: unknown;\n multipleInputInEditId?: unknown;\n },\n ): boolean {\n if (!currentInput) {\n return false;\n }\n if (currentInput.formControlName === inputToDisable.formControlName) {\n return true;\n }\n if (!currentInput.multipleInputInEditId) {\n return !!inputToDisable.parentInput || !!inputToDisable.multipleInputInEditId;\n }\n return false;\n }\n\n protected linkFormulaSource(event: MatSelectChange): void {\n // Resetting formula to undefined intentionally during edit; persisted value\n // re-validates on save.\n this.tempValue.update((current) => ({\n ...current,\n formControlWithFormula: event.value,\n formula: '',\n }));\n }\n\n protected removeVariable(variableId: string): void {\n const current = this.tempValue();\n const variables = current.variables ?? [];\n const target = variables.find((v) => v.id === variableId);\n let formula = current.formula ?? '';\n if (target?.variable) {\n formula = formula\n .replace(new RegExp(`\\\\b${escapeRegExp(target.variable)}\\\\b`, 'g'), '')\n .replace(/\\s{2,}/g, ' ')\n .trim();\n }\n this.tempValue.set({\n ...current,\n variables: variables.filter((v) => v.id !== variableId),\n formula,\n });\n }\n\n protected appendVariableToFormula(variableName: string): void {\n // A variable carries no spacing of its own, so pad it only where it would\n // otherwise fuse with an adjacent token (e.g. `ab` instead of `a b`).\n const { before, after } = this.#caretSlices();\n const lead = before.length > 0 && !/[\\s(]$/.test(before) ? ' ' : '';\n const trail = after.length > 0 && !/^[\\s)]/.test(after) ? ' ' : '';\n this.insertToken(`${lead}${variableName}${trail}`, trail ? 1 : 0);\n }\n\n protected setFormula(formula: string): void {\n this.tempValue.update((current) => ({ ...current, formula }));\n }\n\n /**\n * Inserts an infix token at the caret (or appends it when the textarea is not\n * focused), then restores the caret just after the insertion. Used by both the\n * operator palette and the variable chips so the equation reads naturally while\n * staying strictly infix.\n */\n protected insertToken(token: string, caretBack = 0): void {\n const element = this.formulaInputRef()?.nativeElement;\n const { before, after } = this.#caretSlices();\n const next = before + token + after;\n\n this.setFormula(next);\n\n if (!element) {\n return;\n }\n const caret = before.length + token.length - caretBack;\n // Restore focus + caret after Angular has written the new value back to the DOM.\n setTimeout(() => {\n element.focus();\n element.setSelectionRange(caret, caret);\n });\n }\n\n /** The formula split around the current caret/selection (end-of-string when unfocused). */\n #caretSlices(): { before: string; after: string } {\n const current = this.tempValue().formula ?? '';\n const element = this.formulaInputRef()?.nativeElement;\n const start = element?.selectionStart ?? current.length;\n const end = element?.selectionEnd ?? current.length;\n return { before: current.slice(0, start), after: current.slice(end) };\n }\n\n protected setDecimalPlaces(value: number | string | null): void {\n const parsed =\n value === null || value === '' ? undefined : Number(value);\n this.tempValue.update((current) => ({\n ...current,\n decimalPlaces: parsed !== undefined && Number.isFinite(parsed) ? parsed : undefined,\n }));\n }\n\n protected setRoundingMode(mode: 'FLOOR' | 'CEIL' | 'ROUND'): void {\n this.tempValue.update((current) => ({ ...current, roundingMode: mode }));\n }\n\n /** Friendly label for a stored rounding mode, used in the read-only summary. */\n protected roundingLabel(mode: 'FLOOR' | 'CEIL' | 'ROUND' | undefined): string {\n return this.roundingType.find((option) => option.value === mode)?.label ?? 'nearest';\n }\n\n // #endregion\n\n // #region Inline `$` field-picker & variable binding\n\n /** Formula text changed: persist it and re-evaluate whether the `$` picker should show. */\n protected onFormulaChange(value: string): void {\n this.setFormula(value);\n this.#syncPicker();\n }\n\n /** Caret moved (click / arrow keys / focus): re-evaluate the `$` picker against the new caret. */\n protected onFormulaCaret(): void {\n this.#syncPicker();\n }\n\n /** Closes the picker shortly after blur, leaving time for a result click to register. */\n protected onFormulaBlur(): void {\n setTimeout(() => this.closePicker(), 150);\n }\n\n /** Keyboard control for the open picker: navigate, select, dismiss. */\n protected onFormulaKeydown(event: KeyboardEvent): void {\n if (!this.pickerOpen()) {\n return;\n }\n const results = this.pickerResults();\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n this.pickerActiveIndex.update((i) => Math.min(i + 1, results.length - 1));\n break;\n case 'ArrowUp':\n event.preventDefault();\n this.pickerActiveIndex.update((i) => Math.max(i - 1, 0));\n break;\n case 'Enter': {\n const item = results[this.pickerActiveIndex()];\n if (item) {\n event.preventDefault();\n this.selectField(item);\n }\n break;\n }\n case 'Escape':\n event.preventDefault();\n this.closePicker();\n break;\n }\n }\n\n protected closePicker(): void {\n this.pickerOpen.set(false);\n this.pickerActiveIndex.set(0);\n this.#dollarIndex = -1;\n }\n\n /**\n * Binds a form field to a calculation variable and drops its short token into\n * the equation. Reuses an existing scalar binding for the same field; otherwise\n * mints the next free short name (a, b, c, …). When opened from `$`, the typed\n * `$query` is replaced in place; otherwise the token is appended.\n */\n protected selectField(input: FormColumnInputs): void {\n const current = this.tempValue();\n const variables = current.variables ?? [];\n const existing = variables.find(\n (v) => v.formControlName === input.formControlName && !v.function && !v.parentInputId,\n );\n const token = existing ? existing.variable : this.#nextShortName();\n const nextVars = existing ? variables : [...variables, this.#makeVariable(input, token)];\n\n const formula = current.formula ?? '';\n let nextFormula: string;\n let caret: number;\n if (this.pickerOpen() && this.#dollarIndex >= 0) {\n const before = formula.slice(0, this.#dollarIndex);\n const after = formula.slice(this.#cursorPosition);\n const lead = before.length > 0 && !/[\\s(]$/.test(before) ? ' ' : '';\n const insert = `${lead}${token} `;\n nextFormula = before + insert + after;\n caret = (before + insert).length;\n } else {\n const lead = formula.length > 0 && !/[\\s(]$/.test(formula) ? ' ' : '';\n nextFormula = `${formula}${lead}${token} `;\n caret = nextFormula.length;\n }\n\n this.tempValue.set({ ...current, formula: nextFormula, variables: nextVars });\n this.closePicker();\n\n const element = this.formulaInputRef()?.nativeElement;\n if (element) {\n setTimeout(() => {\n element.focus();\n element.setSelectionRange(caret, caret);\n });\n }\n }\n\n /**\n * Renames a variable's short token, updating every whole-word occurrence in the\n * formula. An empty name is ignored so the token never desyncs from the formula\n * (the field repopulates with the current name on the next render).\n */\n protected setVariableShortName(id: string, rawName: string): void {\n const name = rawName.trim();\n const current = this.tempValue();\n const variables = current.variables ?? [];\n const target = variables.find((v) => v.id === id);\n if (!target || !name || name === target.variable) {\n return;\n }\n const formula = target.variable\n ? (current.formula ?? '').replace(\n new RegExp(`\\\\b${escapeRegExp(target.variable)}\\\\b`, 'g'),\n name,\n )\n : (current.formula ?? '');\n this.tempValue.set({\n ...current,\n formula,\n variables: variables.map((v) => (v.id === id ? { ...v, variable: name } : v)),\n });\n }\n\n /** Toggles a list-aggregation function (sum/avg/…) on a sub-item variable. */\n protected setVariableFunction(id: string, func: CalculationFunctions): void {\n this.tempValue.update((current) => ({\n ...current,\n variables: (current.variables ?? []).map((v) => {\n if (v.id !== id) {\n return v;\n }\n if (v.function === func) {\n return {\n ...v,\n function: undefined,\n applyFunctionToCol: undefined,\n applyFunctionToLabel: undefined,\n };\n }\n return {\n ...v,\n function: func,\n applyFunctionToCol: v.formControlName,\n applyFunctionToLabel: v.label,\n };\n }),\n }));\n }\n\n /** Recomputes the picker visibility/query from the current formula and caret. */\n #syncPicker(): void {\n const element = this.formulaInputRef()?.nativeElement;\n if (!element) {\n this.closePicker();\n return;\n }\n const position = element.selectionStart ?? 0;\n this.#cursorPosition = position;\n const formula = this.tempValue().formula ?? '';\n const lastDollar = formula.slice(0, position).lastIndexOf('$');\n if (lastDollar === -1) {\n this.closePicker();\n return;\n }\n const query = formula.slice(lastDollar + 1, position);\n // Only a run of letters/digits/spaces keeps the picker open; anything else\n // (an operator, a newline) means the `$` was not a field trigger.\n if (!/^[a-zA-Z0-9 ]*$/.test(query)) {\n this.closePicker();\n return;\n }\n this.#dollarIndex = lastDollar;\n this.pickerQuery.set(query);\n this.pickerActiveIndex.set(0);\n this.pickerOpen.set(true);\n }\n\n /** Builds a calculation variable bound to a form field, carrying the list parent when present. */\n #makeVariable(input: FormColumnInputs, token: string): calculationVariableInterface {\n return {\n id: uuidv4(),\n variable: token,\n formControlName: input.formControlName,\n inputId: input.id,\n label: input.label,\n ...(input.multipleInputInEditId ? { parentInputId: input.multipleInputInEditId } : {}),\n } as calculationVariableInterface;\n }\n\n /** Next free single-letter token (a, b, c, …), skipping mathjs constants and falling back to v1, v2…. */\n #nextShortName(): string {\n const used = new Set((this.tempValue().variables ?? []).map((v) => v.variable));\n const reserved = new Set(['e', 'i']); // mathjs constants\n for (let code = 97; code <= 122; code++) {\n const char = String.fromCharCode(code);\n if (!used.has(char) && !reserved.has(char)) {\n return char;\n }\n }\n let n = 1;\n while (used.has(`v${n}`)) {\n n++;\n }\n return `v${n}`;\n }\n\n // #endregion\n}\n","<!-- View mode: read-only calculation summary -->\n@if (!isEditing()) {\n<div class=\"cfr-summary\">\n @if (!!value && !mapToData()?.id && !tableMode()) {\n <div class=\"cfr-hint\">\n <mat-icon class=\"cfr-hint__icon\" color=\"primary\">info</mat-icon>\n <span>Save the input first to enable calculated field configurations</span>\n </div>\n }\n\n <div class=\"cfr-formula-card\">\n <span class=\"cfr-section__label\">Calculation</span>\n <lib-math-preview class=\"cfr-formula-card__preview\" [expression]=\"value?.formula || ''\"\n placeholder=\"No calculation set up yet\" />\n @if (value?.decimalPlaces) {\n <div class=\"cfr-formula-card__meta\">\n <mat-icon class=\"cfr-formula-card__meta-icon\">tune</mat-icon>\n <span>Shown to {{ value?.decimalPlaces }} decimal place(s) · {{ value?.roundingMode ? roundingLabel(value?.roundingMode) : 'nearest' }}</span>\n </div>\n }\n </div>\n\n <button class=\"cfr-edit-trigger\" mat-stroked-button color=\"primary\" [disabled]=\"disabled\"\n (click)=\"startEdit()\">\n <mat-icon>edit</mat-icon>\n {{ !!value?.formula ? 'Edit calculation' : 'Set up calculation' }}\n </button>\n</div>\n}\n\n<!-- Edit mode: guided calculation builder -->\n@else {\n<mat-card appearance=\"outlined\" class=\"cfr-editor\">\n <header class=\"cfr-editor__head\">\n <h3 class=\"cfr-editor__title\">\n <mat-icon>functions</mat-icon>\n Build the calculation\n </h3>\n <p class=\"cfr-editor__subtitle\">\n Combine your form fields with operators to work out this value automatically.\n </p>\n </header>\n\n <!-- Live preview + validity -->\n <div class=\"cfr-preview\" [attr.data-state]=\"formulaStatus().kind\">\n <span class=\"cfr-section__label\">Live preview</span>\n <lib-math-preview class=\"cfr-preview__render\" [expression]=\"tempValue().formula || ''\"\n placeholder=\"Your equation will appear here\" />\n <p class=\"cfr-preview__status\">\n <mat-icon class=\"cfr-preview__status-icon\">\n {{ formulaStatus().kind === 'valid' ? 'check_circle' : formulaStatus().kind === 'invalid' ? 'error' : 'lightbulb' }}\n </mat-icon>\n <span>{{ formulaStatus().message }}</span>\n </p>\n </div>\n\n <section class=\"cfr-section\">\n <!-- Equation input + inline field-picker + operator keypad -->\n <div class=\"cfr-equation\">\n <div class=\"cfr-equation__field\">\n <mat-form-field class=\"cfr-field\" [subscriptSizing]=\"'dynamic'\" [floatLabel]=\"'always'\"\n appearance=\"outline\">\n <mat-label>Equation</mat-label>\n <textarea #formulaInput matInput [ngModel]=\"tempValue().formula\"\n (ngModelChange)=\"onFormulaChange($event)\" (keyup)=\"onFormulaCaret()\"\n (click)=\"onFormulaCaret()\" (focus)=\"onFormulaCaret()\"\n (keydown)=\"onFormulaKeydown($event)\" (blur)=\"onFormulaBlur()\"\n placeholder=\"e.g. (a + 2) / b\" rows=\"2\" spellcheck=\"false\" autocapitalize=\"off\"\n autocomplete=\"off\"></textarea>\n <mat-hint>Type <strong>$</strong> to add a form field, then join fields with the operator keys.</mat-hint>\n </mat-form-field>\n\n @if (pickerOpen()) {\n <div class=\"cfr-picker\" role=\"listbox\" aria-label=\"Form fields\">\n <div class=\"cfr-picker__head\">Insert a field</div>\n @if (pickerResults().length === 0) {\n <div class=\"cfr-picker__empty\">No matching number fields</div>\n } @else {\n @for (item of pickerResults(); track item.id; let idx = $index) {\n <button type=\"button\" role=\"option\" class=\"cfr-picker__item\"\n [class.cfr-picker__item--active]=\"idx === pickerActiveIndex()\"\n [attr.aria-selected]=\"idx === pickerActiveIndex()\"\n (mousedown)=\"$event.preventDefault()\" (click)=\"selectField(item)\">\n <mat-icon class=\"cfr-picker__icon\">{{ item.multipleInputInEditId ? 'format_list_numbered' : 'tag' }}</mat-icon>\n <span class=\"cfr-picker__label\">{{ item.label }}</span>\n <span class=\"cfr-picker__meta\">{{ item.formControlName }}</span>\n </button>\n }\n }\n </div>\n }\n </div>\n\n <div class=\"cfr-keypad\" role=\"group\" aria-label=\"Operators\">\n @for (key of operatorKeys; track key.token) {\n <button type=\"button\" class=\"cfr-key\" [attr.aria-label]=\"key.aria\"\n (click)=\"insertToken(key.token, key.caretBack)\">\n {{ key.label }}\n </button>\n }\n </div>\n </div>\n\n <!-- Optional equation source link -->\n @if (!!tempValue().getFormulaFromAFormInput) {\n <mat-form-field class=\"cfr-field\" [subscriptSizing]=\"'dynamic'\" [floatLabel]=\"'always'\"\n appearance=\"outline\">\n <mat-label>Equation source</mat-label>\n <mat-select [value]=\"tempValue().formControlWithFormula\"\n (selectionChange)=\"linkFormulaSource($event)\" placeholder=\"Select an input that holds a formula\">\n @for (input of formInputs(); track input.id) {\n <mat-option\n [disabled]=\"checkIfInputCanBeLinkedToCalVariable(mapToData(), input) || input.element !== 'select'\"\n [value]=\"input.formControlName\">\n {{ input.label }}\n </mat-option>\n }\n </mat-select>\n <mat-hint>Pull the equation from another input's value</mat-hint>\n </mat-form-field>\n }\n\n <!-- Bound fields legend -->\n <div class=\"cfr-variables\">\n <div class=\"cfr-block-head\">\n <span class=\"cfr-section__label\">Fields in this calculation</span>\n <span class=\"cfr-block-head__hint\">Rename a letter, or type $ above to add another</span>\n </div>\n\n @if ((tempValue().variables || []).length === 0) {\n <p class=\"cfr-variables__empty\">\n Type <strong>$</strong> in the equation above to add a form field — each becomes a short\n letter you can use in the equation.\n </p>\n } @else {\n <ul class=\"cfr-legend\">\n @for (variable of (tempValue().variables || []); track variable.id) {\n <li class=\"cfr-legend__row\">\n <div class=\"cfr-legend__main\">\n <input class=\"cfr-legend__token\" [ngModel]=\"variable.variable\"\n (ngModelChange)=\"setVariableShortName(variable.id, $event)\" aria-label=\"Short name\"\n maxlength=\"12\" spellcheck=\"false\" autocomplete=\"off\" autocapitalize=\"off\">\n <mat-icon class=\"cfr-legend__arrow\">arrow_right_alt</mat-icon>\n <button type=\"button\" class=\"cfr-legend__field\"\n [attr.aria-label]=\"'Insert ' + variable.label + ' into the equation'\"\n (click)=\"appendVariableToFormula(variable.variable)\">\n {{ variable.label }}\n </button>\n <button type=\"button\" class=\"cfr-legend__remove\"\n [attr.aria-label]=\"'Remove ' + variable.variable\"\n (click)=\"removeVariable(variable.id)\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n\n @if (variable.parentInputId) {\n <div class=\"cfr-legend__fns\" role=\"group\" aria-label=\"Combine list values with\">\n <span class=\"cfr-legend__fns-label\" aria-hidden=\"true\">ƒ</span>\n @for (func of allCalculationFunction(); track func) {\n <button type=\"button\" class=\"cfr-legend__fn\"\n [class.cfr-legend__fn--active]=\"variable.function === func\"\n (click)=\"setVariableFunction(variable.id, func)\">\n {{ func }}\n </button>\n }\n </div>\n }\n </li>\n }\n </ul>\n }\n </div>\n\n <!-- Result formatting -->\n <div class=\"cfr-rounding\">\n <div class=\"cfr-block-head\">\n <span class=\"cfr-section__label\">Result formatting</span>\n <span class=\"cfr-block-head__hint\">Optional — how the answer is rounded</span>\n </div>\n\n <div class=\"cfr-rounding__row\">\n <mat-form-field class=\"cfr-field cfr-rounding__decimals\" [subscriptSizing]=\"'dynamic'\"\n [floatLabel]=\"'always'\" appearance=\"outline\">\n <mat-label>Decimal places</mat-label>\n <input matInput [ngModel]=\"tempValue().decimalPlaces\"\n (ngModelChange)=\"setDecimalPlaces($event)\" placeholder=\"0\" type=\"number\" min=\"0\">\n </mat-form-field>\n\n @if (tempValue().decimalPlaces) {\n <div class=\"cfr-rounding__mode\">\n <label class=\"cfr-section__label\">Rounding</label>\n <mat-chip-listbox aria-label=\"Rounding method\">\n @for (type of roundingType; track type.value) {\n <mat-chip-option (click)=\"setRoundingMode(type.value)\"\n [selected]=\"tempValue().roundingMode === type.value\">\n {{ type.label }}\n </mat-chip-option>\n }\n </mat-chip-listbox>\n </div>\n }\n </div>\n </div>\n </section>\n\n <div class=\"cfr-editor__actions\">\n <button mat-button (click)=\"cancelEdit()\">Cancel</button>\n <button mat-flat-button color=\"primary\" [disabled]=\"formulaStatus().kind === 'invalid'\"\n (click)=\"saveEdit()\">\n Save calculation\n </button>\n </div>\n</mat-card>\n}\n\n<!-- Disabled overlay -->\n<ng-template cdkConnectedOverlay [cdkConnectedOverlayOpen]=\"disabled\">\n <div class=\"cfr-disabled-overlay\"></div>\n</ng-template>\n"],"names":["uuidv4","i4","i5","i6","i7","i9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA;;;;;;;;AAQG;AACG,SAAU,iBAAiB,CAAC,UAAkB,EAAA;AAClD,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,EAAE;IACjC,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;IACnC;AACA,IAAA,IAAI;AACF,QAAA,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;IACrD;IAAE,OAAO,KAAK,EAAE;AACd,QAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,EAAE;IACrD;AACF;AAEA;AACA,SAAS,eAAe,CAAC,KAAc,EAAA;AACrC,IAAA,MAAM,GAAG,GAAG,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,EAAE;AACvD,IAAA,IAAI,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAClC,QAAA,OAAO,qEAAqE;IAC9E;AACA,IAAA,IAAI,sBAAsB,CAAC,IAAI,CAAC,G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,IAAA,EAAAA,EAAA,CAAA,aAAA,EAAA,QAAA,EAAA,oFAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAQL,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAzBzC,SAAS;+BACE,4BAA4B,EAAA,eAAA,EAGrB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,QAAQ,EAAA,OAAA,EAChC;wBACP,YAAY;wBACZ,WAAW;wBACX,oBAAoB;wBACpB,aAAa;wBACb,kBAAkB;wBAClB,cAAc;wBACd,eAAe;wBACf,aAAa;wBACb,aAAa;wBACb,eAAe;wBACf,cAAc;qBACf,EAAA,SAAA,EACU,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,6BAA+B,EAAE,CAAC,EAAA,IAAA,EACnF;AACJ,wBAAA,OAAO,EAAE,4BAA4B;AACrC,wBAAA,yBAAyB,EAAE,aAAa;AACzC,qBAAA,EAAA,QAAA,EAAA,s7SAAA,EAAA,MAAA,EAAA,CAAA,o5RAAA,CAAA,EAAA;;sBAQA;;sBACA;;sBACA;6eA6D4C,cAAc,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA;sBAkE1D;;;;;"}
@@ -2,11 +2,11 @@ import * as i0 from '@angular/core';
2
2
  import { input, output, signal, computed, inject, effect, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { LiveAnnouncer } from '@angular/cdk/a11y';
4
4
  import { ENTER, COMMA } from '@angular/cdk/keycodes';
5
- import * as i1 from '@angular/material/chips';
5
+ import * as i4 from '@angular/material/chips';
6
6
  import { MatChipsModule } from '@angular/material/chips';
7
7
  import * as i3 from '@angular/material/icon';
8
8
  import { MatIconModule } from '@angular/material/icon';
9
- import { E as EmptyStateComponent } from './ngx-t-forms-ngx-t-forms-u_kigDid.mjs';
9
+ import { E as EmptyStateComponent } from './ngx-t-forms-ngx-t-forms-C2G8_WQk.mjs';
10
10
 
11
11
  /**
12
12
  * Internal chip-options creator editor: the user types free-text tokens that
@@ -83,7 +83,7 @@ class ChipOptionsCreatorEditorComponent {
83
83
  this.valueChange.emit(snapshot);
84
84
  }
85
85
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ChipOptionsCreatorEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
86
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ChipOptionsCreatorEditorComponent, isStandalone: true, selector: "lib-chip-options-creator-editor", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { properties: { "attr.id": "id()" }, classAttribute: "lib-chip-options-creator-editor" }, ngImport: i0, template: "@if (isEmpty()) {\n<lib-empty-state icon=\"label_off\" message=\"No options yet \u2014 type below to add one\" />\n}\n\n<mat-chip-grid\n #chipGrid\n class=\"lib-chip-options-creator-editor__grid\"\n [disabled]=\"disabled()\"\n aria-label=\"Chip options\">\n @for (segment of currentValue(); track segment) {\n <mat-chip-row\n class=\"lib-chip-options-creator-editor__chip\"\n [editable]=\"true\"\n [aria-description]=\"'press enter to edit ' + segment\"\n (edited)=\"edit(segment, $event)\"\n (removed)=\"remove(segment)\">\n {{ segment }}\n <button matChipRemove [attr.aria-label]=\"'remove ' + segment\">\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip-row>\n }\n <input\n class=\"lib-chip-options-creator-editor__input\"\n [placeholder]=\"placeholder() || 'New selection...'\"\n [matChipInputFor]=\"chipGrid\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"add($event)\" />\n</mat-chip-grid>\n", styles: [":host{display:flex;flex-direction:column;gap:.75rem}.lib-chip-options-creator-editor__input{border:none;outline:none;background:transparent;font-size:.875rem;color:var(--lib-forms-on-surface)}.lib-chip-options-creator-editor__input::placeholder{color:color-mix(in srgb,var(--lib-forms-on-surface-variant) 60%,transparent)}.lib-chip-options-creator-editor__chip.mat-mdc-chip{display:inline-flex;align-items:center;gap:.5rem;padding:.25rem .5rem .25rem .625rem;background:color-mix(in srgb,var(--lib-forms-primary) 10%,transparent);border-radius:var(--lib-forms-radius-pill, 6px);font-size:.8125rem;color:var(--lib-forms-on-surface)}.lib-chip-options-creator-editor__chip.mat-mdc-chip:focus-within{outline:none;border-color:var(--lib-forms-primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--lib-forms-primary) 25%,transparent)}.lib-chip-options-creator-editor__chip.mat-mdc-chip .mat-mdc-chip-remove{display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;padding:0;border-radius:var(--lib-forms-radius-sm, 8px);color:var(--lib-forms-on-surface-variant);opacity:1;transition:color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),background var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing)}.lib-chip-options-creator-editor__chip.mat-mdc-chip .mat-mdc-chip-remove:hover{color:var(--lib-forms-error);background:color-mix(in srgb,var(--lib-forms-error) 20%,transparent)}.lib-chip-options-creator-editor__chip.mat-mdc-chip .mat-mdc-chip-remove mat-icon{width:1rem;height:1rem;font-size:1rem}:host(.lib-chip-options-creator-editor[aria-disabled=true]),.lib-chip-options-creator-editor__grid[disabled]{opacity:.55;pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i1.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i1.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i1.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i1.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: EmptyStateComponent, selector: "lib-empty-state", inputs: ["icon", "message"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
86
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ChipOptionsCreatorEditorComponent, isStandalone: true, selector: "lib-chip-options-creator-editor", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { properties: { "attr.id": "id()" }, classAttribute: "lib-chip-options-creator-editor" }, ngImport: i0, template: "@if (isEmpty()) {\n<lib-empty-state icon=\"label_off\" message=\"No options yet \u2014 type below to add one\" />\n}\n\n<mat-chip-grid\n #chipGrid\n class=\"lib-chip-options-creator-editor__grid\"\n [disabled]=\"disabled()\"\n aria-label=\"Chip options\">\n @for (segment of currentValue(); track segment) {\n <mat-chip-row\n class=\"lib-chip-options-creator-editor__chip\"\n [editable]=\"true\"\n [aria-description]=\"'press enter to edit ' + segment\"\n (edited)=\"edit(segment, $event)\"\n (removed)=\"remove(segment)\">\n {{ segment }}\n <button matChipRemove [attr.aria-label]=\"'remove ' + segment\">\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip-row>\n }\n <input\n class=\"lib-chip-options-creator-editor__input\"\n [placeholder]=\"placeholder() || 'New selection...'\"\n [matChipInputFor]=\"chipGrid\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"add($event)\" />\n</mat-chip-grid>\n", styles: [":host{display:flex;flex-direction:column;gap:.75rem}.lib-chip-options-creator-editor__input{border:none;outline:none;background:transparent;font-size:.875rem;color:var(--lib-forms-on-surface)}.lib-chip-options-creator-editor__input::placeholder{color:color-mix(in srgb,var(--lib-forms-on-surface-variant) 60%,transparent)}.lib-chip-options-creator-editor__chip.mat-mdc-chip{display:inline-flex;align-items:center;gap:.5rem;padding:.25rem .5rem .25rem .625rem;background:color-mix(in srgb,var(--lib-forms-primary) 10%,transparent);border-radius:var(--lib-forms-radius-pill, 6px);font-size:.8125rem;color:var(--lib-forms-on-surface)}.lib-chip-options-creator-editor__chip.mat-mdc-chip:focus-within{outline:none;border-color:var(--lib-forms-primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--lib-forms-primary) 25%,transparent)}.lib-chip-options-creator-editor__chip.mat-mdc-chip .mat-mdc-chip-remove{display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;padding:0;border-radius:var(--lib-forms-radius-sm, 8px);color:var(--lib-forms-on-surface-variant);opacity:1;transition:color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),background var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing)}.lib-chip-options-creator-editor__chip.mat-mdc-chip .mat-mdc-chip-remove:hover{color:var(--lib-forms-error);background:color-mix(in srgb,var(--lib-forms-error) 20%,transparent)}.lib-chip-options-creator-editor__chip.mat-mdc-chip .mat-mdc-chip-remove mat-icon{width:1rem;height:1rem;font-size:1rem}:host(.lib-chip-options-creator-editor[aria-disabled=true]),.lib-chip-options-creator-editor__grid[disabled]{opacity:.55;pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i4.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i4.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i4.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i4.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: EmptyStateComponent, selector: "lib-empty-state", inputs: ["icon", "message"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
87
87
  }
88
88
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ChipOptionsCreatorEditorComponent, decorators: [{
89
89
  type: Component,
@@ -94,4 +94,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
94
94
  }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
95
95
 
96
96
  export { ChipOptionsCreatorEditorComponent };
97
- //# sourceMappingURL=ngx-t-forms-chip-options-creator-editor.component-CICQaqz6.mjs.map
97
+ //# sourceMappingURL=ngx-t-forms-chip-options-creator-editor.component-d4QeVhsp.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-t-forms-chip-options-creator-editor.component-CICQaqz6.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/chip-options-creator-editor/chip-options-creator-editor.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/chip-options-creator-editor/chip-options-creator-editor.component.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { LiveAnnouncer } from '@angular/cdk/a11y';\nimport { COMMA, ENTER } from '@angular/cdk/keycodes';\nimport { MatChipEditedEvent, MatChipInputEvent, MatChipsModule } from '@angular/material/chips';\nimport { MatIconModule } from '@angular/material/icon';\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\n\n/**\n * Internal chip-options creator editor: the user types free-text tokens that\n * become removable, editable chips; the resulting `string[]` is emitted.\n *\n * Rendered by `t-dynamic-data-edit`'s non-control branch (it is NOT a\n * MatFormFieldControl), which already supplies the field label, hint, and\n * validation errors — so this component owns only the chip grid and its empty\n * state.\n */\n@Component({\n selector: 'lib-chip-options-creator-editor',\n imports: [MatChipsModule, MatIconModule, EmptyStateComponent],\n templateUrl: './chip-options-creator-editor.component.html',\n styleUrl: './chip-options-creator-editor.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n 'class': 'lib-chip-options-creator-editor',\n '[attr.id]': 'id()',\n },\n})\nexport class ChipOptionsCreatorEditorComponent {\n /** Optional id attribute supplied by the parent editor. */\n readonly id = input<string | undefined>(undefined);\n /** Disables chip entry/edit/remove. */\n readonly disabled = input<boolean>(false);\n /** Whether a non-empty value is required (kept on the contract). */\n readonly required = input<boolean>(false);\n /** External validation errors (surfaced by the parent). */\n readonly errors = input<IConfigElementError[] | undefined>([]);\n /** The chip values to render. */\n readonly value = input<string[] | undefined>(undefined);\n /** Placeholder for the new-chip input. */\n readonly placeholder = input<string>('');\n\n /** Emits the full chip list whenever it changes. */\n readonly valueChange = output<string[] | undefined>();\n\n protected readonly separatorKeysCodes = [ENTER, COMMA] as const;\n\n /** Local working copy of the chip list; mirrors the `value` input. */\n readonly #internalValue = signal<readonly string[]>([]);\n /** Read-only accessor used by the template. */\n protected readonly currentValue = this.#internalValue.asReadonly();\n protected readonly isEmpty = computed(() => this.#internalValue().length === 0);\n\n readonly #announcer = inject(LiveAnnouncer);\n\n constructor() {\n // The parent drives the value declaratively via [value].\n effect(() => {\n this.#internalValue.set(this.value() ?? []);\n });\n }\n\n protected add(event: MatChipInputEvent): void {\n const value = (event.value || '').trim();\n event.chipInput?.clear();\n if (!value) {\n return;\n }\n const current = this.#internalValue();\n if (current.includes(value)) {\n this.#announcer.announce(`value ${value} already exists`);\n return;\n }\n this.#commit([...current, value]);\n }\n\n protected edit(segment: string, event: MatChipEditedEvent): void {\n const newValue = event.value.trim();\n if (!newValue) {\n this.remove(segment);\n return;\n }\n this.#commit(this.#internalValue().map((s) => (s === segment ? newValue : s)));\n }\n\n protected remove(segment: string): void {\n const current = this.#internalValue();\n if (!current.includes(segment)) {\n return;\n }\n this.#announcer.announce(`Removed ${segment}`);\n this.#commit(current.filter((s) => s !== segment));\n }\n\n #commit(next: readonly string[]): void {\n const snapshot = [...next];\n this.#internalValue.set(snapshot);\n this.valueChange.emit(snapshot);\n }\n}\n","@if (isEmpty()) {\n<lib-empty-state icon=\"label_off\" message=\"No options yet — type below to add one\" />\n}\n\n<mat-chip-grid\n #chipGrid\n class=\"lib-chip-options-creator-editor__grid\"\n [disabled]=\"disabled()\"\n aria-label=\"Chip options\">\n @for (segment of currentValue(); track segment) {\n <mat-chip-row\n class=\"lib-chip-options-creator-editor__chip\"\n [editable]=\"true\"\n [aria-description]=\"'press enter to edit ' + segment\"\n (edited)=\"edit(segment, $event)\"\n (removed)=\"remove(segment)\">\n {{ segment }}\n <button matChipRemove [attr.aria-label]=\"'remove ' + segment\">\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip-row>\n }\n <input\n class=\"lib-chip-options-creator-editor__input\"\n [placeholder]=\"placeholder() || 'New selection...'\"\n [matChipInputFor]=\"chipGrid\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"add($event)\" />\n</mat-chip-grid>\n"],"names":[],"mappings":";;;;;;;;;;AAkBA;;;;;;;;AAQG;MAaU,iCAAiC,CAAA;;AAoBnC,IAAA,cAAc;AAKd,IAAA,UAAU;AAEnB,IAAA,WAAA,GAAA;;AAzBS,QAAA,IAAA,CAAA,EAAE,GAAG,KAAK,CAAqB,SAAS,yEAAC;;AAEzC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;;AAEhC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;;AAEh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AA,EAAA,CAAA,EAAA,QAAA,EAAA,iCAAiC,WAClC,CAAC,cAAc,EAAE,aAAa,EAAE,mBAAmB,CAAC,EAAA,eAAA,EAG5C,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,OAAO,EAAE,iCAAiC;AAC1C,wBAAA,WAAW,EAAE,MAAM;AACpB,qBAAA,EAAA,QAAA,EAAA,ygCAAA,EAAA,MAAA,EAAA,CAAA,4pDAAA,CAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"ngx-t-forms-chip-options-creator-editor.component-d4QeVhsp.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/chip-options-creator-editor/chip-options-creator-editor.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/chip-options-creator-editor/chip-options-creator-editor.component.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { LiveAnnouncer } from '@angular/cdk/a11y';\nimport { COMMA, ENTER } from '@angular/cdk/keycodes';\nimport { MatChipEditedEvent, MatChipInputEvent, MatChipsModule } from '@angular/material/chips';\nimport { MatIconModule } from '@angular/material/icon';\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\n\n/**\n * Internal chip-options creator editor: the user types free-text tokens that\n * become removable, editable chips; the resulting `string[]` is emitted.\n *\n * Rendered by `t-dynamic-data-edit`'s non-control branch (it is NOT a\n * MatFormFieldControl), which already supplies the field label, hint, and\n * validation errors — so this component owns only the chip grid and its empty\n * state.\n */\n@Component({\n selector: 'lib-chip-options-creator-editor',\n imports: [MatChipsModule, MatIconModule, EmptyStateComponent],\n templateUrl: './chip-options-creator-editor.component.html',\n styleUrl: './chip-options-creator-editor.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n 'class': 'lib-chip-options-creator-editor',\n '[attr.id]': 'id()',\n },\n})\nexport class ChipOptionsCreatorEditorComponent {\n /** Optional id attribute supplied by the parent editor. */\n readonly id = input<string | undefined>(undefined);\n /** Disables chip entry/edit/remove. */\n readonly disabled = input<boolean>(false);\n /** Whether a non-empty value is required (kept on the contract). */\n readonly required = input<boolean>(false);\n /** External validation errors (surfaced by the parent). */\n readonly errors = input<IConfigElementError[] | undefined>([]);\n /** The chip values to render. */\n readonly value = input<string[] | undefined>(undefined);\n /** Placeholder for the new-chip input. */\n readonly placeholder = input<string>('');\n\n /** Emits the full chip list whenever it changes. */\n readonly valueChange = output<string[] | undefined>();\n\n protected readonly separatorKeysCodes = [ENTER, COMMA] as const;\n\n /** Local working copy of the chip list; mirrors the `value` input. */\n readonly #internalValue = signal<readonly string[]>([]);\n /** Read-only accessor used by the template. */\n protected readonly currentValue = this.#internalValue.asReadonly();\n protected readonly isEmpty = computed(() => this.#internalValue().length === 0);\n\n readonly #announcer = inject(LiveAnnouncer);\n\n constructor() {\n // The parent drives the value declaratively via [value].\n effect(() => {\n this.#internalValue.set(this.value() ?? []);\n });\n }\n\n protected add(event: MatChipInputEvent): void {\n const value = (event.value || '').trim();\n event.chipInput?.clear();\n if (!value) {\n return;\n }\n const current = this.#internalValue();\n if (current.includes(value)) {\n this.#announcer.announce(`value ${value} already exists`);\n return;\n }\n this.#commit([...current, value]);\n }\n\n protected edit(segment: string, event: MatChipEditedEvent): void {\n const newValue = event.value.trim();\n if (!newValue) {\n this.remove(segment);\n return;\n }\n this.#commit(this.#internalValue().map((s) => (s === segment ? newValue : s)));\n }\n\n protected remove(segment: string): void {\n const current = this.#internalValue();\n if (!current.includes(segment)) {\n return;\n }\n this.#announcer.announce(`Removed ${segment}`);\n this.#commit(current.filter((s) => s !== segment));\n }\n\n #commit(next: readonly string[]): void {\n const snapshot = [...next];\n this.#internalValue.set(snapshot);\n this.valueChange.emit(snapshot);\n }\n}\n","@if (isEmpty()) {\n<lib-empty-state icon=\"label_off\" message=\"No options yet — type below to add one\" />\n}\n\n<mat-chip-grid\n #chipGrid\n class=\"lib-chip-options-creator-editor__grid\"\n [disabled]=\"disabled()\"\n aria-label=\"Chip options\">\n @for (segment of currentValue(); track segment) {\n <mat-chip-row\n class=\"lib-chip-options-creator-editor__chip\"\n [editable]=\"true\"\n [aria-description]=\"'press enter to edit ' + segment\"\n (edited)=\"edit(segment, $event)\"\n (removed)=\"remove(segment)\">\n {{ segment }}\n <button matChipRemove [attr.aria-label]=\"'remove ' + segment\">\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip-row>\n }\n <input\n class=\"lib-chip-options-creator-editor__input\"\n [placeholder]=\"placeholder() || 'New selection...'\"\n [matChipInputFor]=\"chipGrid\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"add($event)\" />\n</mat-chip-grid>\n"],"names":["i1"],"mappings":";;;;;;;;;;AAkBA;;;;;;;;AAQG;MAaU,iCAAiC,CAAA;;AAoBnC,IAAA,cAAc;AAKd,IAAA,UAAU;AAEnB,IAAA,WAAA,GAAA;;AAzBS,QAAA,IAAA,CAAA,EAAE,GAAG,KAAK,CAAqB,SAAS,yEAAC;;AAEzC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;;AAEhC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;;AAEhC,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAoC,EAAE,6EAAC;;AAErD,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAuB,SAAS,4EAAC;;AAE9C,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,EAAE,kFAAC;;QAG/B,IAAA,CAAA,WAAW,GAAG,MAAM,EAAwB;AAElC,QAAA,IAAA,CAAA,kBAAkB,GA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qBAAA,EAAA,QAAA,EAAA,ygCAAA,EAAA,MAAA,EAAA,CAAA,4pDAAA,CAAA,EAAA;;;;;"}
@@ -11,7 +11,7 @@ import { MatSelectModule } from '@angular/material/select';
11
11
  import * as i5 from '@angular/material/toolbar';
12
12
  import { MatToolbarModule } from '@angular/material/toolbar';
13
13
  import { Subject, take, tap, catchError, of } from 'rxjs';
14
- import { E as EmptyStateComponent } from './ngx-t-forms-ngx-t-forms-u_kigDid.mjs';
14
+ import { E as EmptyStateComponent } from './ngx-t-forms-ngx-t-forms-C2G8_WQk.mjs';
15
15
 
16
16
  /**
17
17
  * Internal editor that links each configured form input to an MSCOA
@@ -192,4 +192,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
192
192
  }] } });
193
193
 
194
194
  export { ConfigMscoaAdditionalInputsComponent };
195
- //# sourceMappingURL=ngx-t-forms-config-mscoa-additional-inputs.component-CzisLSIP.mjs.map
195
+ //# sourceMappingURL=ngx-t-forms-config-mscoa-additional-inputs.component-Gn8exJ9a.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-t-forms-config-mscoa-additional-inputs.component-CzisLSIP.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/config-mscoa-additional-inputs/config-mscoa-additional-inputs.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/config-mscoa-additional-inputs/config-mscoa-additional-inputs.component.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Input,\n ViewEncapsulation,\n computed,\n inject,\n output,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NgControl } from '@angular/forms';\nimport { MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';\nimport { MatListModule } from '@angular/material/list';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { Subject, catchError, of, take, tap, type Observable } from 'rxjs';\n\nimport type { FormColumnInputs, IGetTreeResponse } from 'ngx-t-forms-types';\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\n\n/**\n * A configured form input paired with the MSCOA account-segment it links to.\n *\n * `segment` is `undefined` when the user selects \"None\" (i.e. the input is not\n * bound to any account segment).\n */\nexport interface ConfiguredMscoaInput extends FormColumnInputs {\n /** Selected account-segment key. `undefined` when the user picks \"None\". */\n segment: string | undefined;\n}\n\n/** A selectable account-segment option (plus the synthetic \"None\" entry). */\ninterface SegmentOption {\n readonly value: string | undefined;\n readonly label: string;\n}\n\n/**\n * Internal editor that links each configured form input to an MSCOA\n * account-segment, implementing `MatFormFieldControl<ConfiguredMscoaInput[]>`\n * for the dynamic-data-edit configuration surface.\n *\n * Rendered by `t-dynamic-data-edit`, which supplies the surrounding field label,\n * hint, and validation errors — so this component owns only the per-input\n * segment selectors and the empty-state hint.\n *\n * NOTE: `MatFormFieldControl<T>` mandates plain mutable `value` / `disabled` /\n * `required` / `placeholder` / `id` members, `@Input()` decorators, the\n * `focused` / `touched` / `stateChanges` members, and the `useExisting`\n * provider. These are framework wiring, not defects — the CLAUDE.md bans on\n * `@Input()` / `useExisting` do not apply to MatFormFieldControl integration.\n */\n@Component({\n selector: 'lib-config-mscoa-additional-inputs',\n imports: [\n MatListModule,\n MatToolbarModule,\n MatFormFieldModule,\n MatSelectModule,\n EmptyStateComponent,\n ],\n templateUrl: './config-mscoa-additional-inputs.component.html',\n styleUrls: ['./config-mscoa-additional-inputs.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n { provide: MatFormFieldControl, useExisting: ConfigMscoaAdditionalInputsComponent },\n ],\n host: {\n 'class': 'lib-config-mscoa-additional-inputs',\n '[id]': 'id',\n '[attr.aria-describedby]': 'describedBy',\n },\n})\nexport class ConfigMscoaAdditionalInputsComponent\n implements MatFormFieldControl<ConfiguredMscoaInput[]>\n{\n static nextId = 0;\n\n // ---- MatFormFieldControl wiring (framework-mandated plain members) -------\n\n /** Emits whenever a piece of `MatFormFieldControl` state changes. */\n readonly stateChanges = new Subject<void>();\n readonly controlType = 'lib-config-mscoa-additional-inputs';\n\n id = `app-config-mscoa-additional-inputs-${ConfigMscoaAdditionalInputsComponent.nextId++}`;\n placeholder = '';\n focused = false;\n touched = false;\n describedBy = '';\n autofilled: boolean | undefined = undefined;\n userAriaDescribedBy: string | undefined = undefined;\n disableAutomaticLabeling: boolean | undefined = undefined;\n\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n\n readonly #destroyRef = inject(DestroyRef);\n\n // ---- Public input/output contract ---------------------------------------\n\n /** Whether all segment selectors are inert. */\n @Input() disabled = false;\n\n /** Whether a value is required (drives the MFC error state). */\n @Input() required = false;\n\n /** Validation errors surfaced by the parent for error-state derivation. */\n @Input() errors: IConfigElementError[] | undefined = [];\n\n /** Data context; the add-input affordance is gated on `mapToData?.id`. */\n @Input() mapToData: FormColumnInputs | undefined = undefined;\n\n /**\n * One-shot stream of the MSCOA tree. The first emitted response's\n * `accountTreeKeys` populate the per-input segment options; later\n * assignments are ignored (the stream is consumed once).\n */\n @Input() set getMscoaTree(options$: Observable<IGetTreeResponse | undefined>) {\n if (!options$ || this.#mscoaInitiated) {\n return;\n }\n this.#mscoaInitiated = true;\n options$\n .pipe(\n take(1),\n tap((options) => this.#accountTreeKeys.set(options?.accountTreeKeys ?? [])),\n catchError(() => of(undefined)),\n takeUntilDestroyed(this.#destroyRef),\n )\n .subscribe();\n }\n\n /** Emits the full configured-input list whenever a segment changes. */\n readonly valueChanged = output<ConfiguredMscoaInput[]>();\n\n #mscoaInitiated = false;\n readonly #accountTreeKeys = signal<string[]>([]);\n readonly #value = signal<ConfiguredMscoaInput[]>([]);\n\n /** Currently hovered list row index, for hover affordances. */\n protected readonly hovered = signal<number | null>(null);\n\n /**\n * Segment options offered per input: every account-tree key plus a trailing\n * synthetic \"None\" entry that clears the binding.\n */\n protected readonly limitInputTo = computed<SegmentOption[]>(() => [\n ...this.#accountTreeKeys().map((key) => ({ value: key as string | undefined, label: key })),\n { value: undefined, label: 'None' },\n ]);\n\n /**\n * Whether the empty-state hint may render.\n *\n * A plain getter (not a `computed()`) because `mapToData` is a framework-style\n * mutable `@Input` rather than a signal — OnPush re-evaluates this binding\n * each change-detection pass.\n */\n protected get canAddInputs(): boolean {\n return !!this.mapToData?.id;\n }\n\n /** Configured inputs to render. */\n protected readonly inputs = this.#value.asReadonly();\n\n /** Current MatFormFieldControl value (the configured-input list). */\n @Input()\n get value(): ConfiguredMscoaInput[] {\n return this.#value();\n }\n set value(val: ConfiguredMscoaInput[]) {\n this.#value.set(val ?? []);\n this.stateChanges.next();\n }\n\n // ---- MatFormFieldControl framework getters ------------------------------\n\n get empty(): boolean {\n return this.#value().length === 0;\n }\n\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n get errorState(): boolean {\n const requiredUnset = this.empty && this.required;\n const ngControlError = this.ngControl?.errors != null;\n const externalError = (this.errors?.length ?? 0) > 0 && this.touched;\n return requiredUnset || ngControlError || externalError;\n }\n\n setDescribedByIds(ids: string[]): void {\n this.describedBy = ids.join(' ');\n this.stateChanges.next();\n }\n\n onContainerClick(): void {\n this.markAsTouched();\n this.stateChanges.next();\n }\n\n onTouched: () => void = () => {};\n\n markAsTouched(): void {\n if (!this.touched) {\n this.touched = true;\n this.onTouched();\n this.stateChanges.next();\n }\n }\n\n // ---- Behaviour ----------------------------------------------------------\n\n /**\n * Assigns the chosen account-segment to the input at `index` and emits the\n * updated list immediately. Selecting \"None\" (`undefined`) clears the binding.\n */\n inputSegmentChanged(\n event: { detail?: { value: string }; value?: string },\n index: number,\n ): void {\n const detailValue = event.detail?.value ?? event.value;\n const current = this.#value();\n const item = current[index];\n if (!item) {\n return;\n }\n const next = current.map((input, i) =>\n i === index\n ? { ...input, segment: detailValue === 'None' ? undefined : detailValue }\n : input,\n );\n this.#value.set(next);\n this.markAsTouched();\n this.stateChanges.next();\n this.valueChanged.emit(next);\n }\n}\n","@if (inputs().length > 0) {\n <mat-list class=\"lib-config-mscoa-additional-inputs__list\">\n <mat-toolbar class=\"lib-config-mscoa-additional-inputs__heading\">\n Additional inputs configuration\n </mat-toolbar>\n @for (input of inputs(); track input.id; let i = $index) {\n <mat-form-field\n class=\"lib-config-mscoa-additional-inputs__row\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n (mouseover)=\"hovered.set(i)\"\n (mouseleave)=\"hovered.set(null)\">\n <mat-label>{{ input.label }}</mat-label>\n <mat-select\n matNativeControl\n [disabled]=\"disabled\"\n [value]=\"input.segment\"\n placeholder=\"select segment\"\n (selectionChange)=\"inputSegmentChanged($event, i)\">\n @for (segment of limitInputTo(); track segment.label) {\n <mat-option [value]=\"segment.value\">{{ segment.label }}</mat-option>\n }\n </mat-select>\n <mat-hint>Link formula to an input value</mat-hint>\n </mat-form-field>\n }\n </mat-list>\n} @else if (canAddInputs) {\n <lib-empty-state\n icon=\"info\"\n message=\"No input configuration available.\" />\n}\n"],"names":["i1","i3","i4"],"mappings":";;;;;;;;;;;;;;;AAwCA;;;;;;;;;;;;;;AAcG;MAuBU,oCAAoC,CAAA;AAtBjD,IAAA,WAAA,GAAA;;;AA8BW,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;QAClC,IAAA,CAAA,WAAW,GAAG,oCAAoC;AAE3D,QAAA,IAAA,CAAA,EAAE,GAAG,CAAA,mCAAA,EAAsC,oCAAoC,CAAC,MAAM,EAAE,EAAE;QAC1F,IAAA,CAAA,WAAW,GAAG,EAAE;QAChB,IAAA,CAAA,OAAO,GAAG,KAAK;QACf,IAAA,CAAA,OAAO,GAAG,KAAK;QACf,IAAA,CAAA,WAAW,GAAG,EAAE;QAChB,IAAA,CAAA,UAAU,GAAwB,SAAS;QAC3C,IAAA,CAAA,mBAAmB,GAAuB,SAAS;QACnD,IAAA,C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,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACf,mBAAmB,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAeV,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBAtBhD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oCAAoC,EAAA,OAAA,EACrC;wBACP,aAAa;wBACb,gBAAgB;wBAChB,kBAAkB;wBAClB,eAAe;wBACf,mBAAmB;AACpB,qBAAA,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,QAAQ,EAAA,SAAA,EAC9B;AACT,wBAAA,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,sCAAsC,EAAE;qBACpF,EAAA,IAAA,EACK;AACJ,wBAAA,OAAO,EAAE,oCAAoC;AAC7C,wBAAA,MAAM,EAAE,IAAI;AACZ,wBAAA,yBAAyB,EAAE,aAAa;AACzC,qBAAA,EAAA,QAAA,EAAA,0sCAAA,EAAA,MAAA,EAAA,CAAA,8KAAA,CAAA,EAAA;;sBA6BA;;sBAGA;;sBAGA;;sBAGA;;sBAOA;;sBAiDA;;;;;"}
1
+ {"version":3,"file":"ngx-t-forms-config-mscoa-additional-inputs.component-Gn8exJ9a.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/config-mscoa-additional-inputs/config-mscoa-additional-inputs.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/config-mscoa-additional-inputs/config-mscoa-additional-inputs.component.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Input,\n ViewEncapsulation,\n computed,\n inject,\n output,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NgControl } from '@angular/forms';\nimport { MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';\nimport { MatListModule } from '@angular/material/list';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { Subject, catchError, of, take, tap, type Observable } from 'rxjs';\n\nimport type { FormColumnInputs, IGetTreeResponse } from 'ngx-t-forms-types';\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\n\n/**\n * A configured form input paired with the MSCOA account-segment it links to.\n *\n * `segment` is `undefined` when the user selects \"None\" (i.e. the input is not\n * bound to any account segment).\n */\nexport interface ConfiguredMscoaInput extends FormColumnInputs {\n /** Selected account-segment key. `undefined` when the user picks \"None\". */\n segment: string | undefined;\n}\n\n/** A selectable account-segment option (plus the synthetic \"None\" entry). */\ninterface SegmentOption {\n readonly value: string | undefined;\n readonly label: string;\n}\n\n/**\n * Internal editor that links each configured form input to an MSCOA\n * account-segment, implementing `MatFormFieldControl<ConfiguredMscoaInput[]>`\n * for the dynamic-data-edit configuration surface.\n *\n * Rendered by `t-dynamic-data-edit`, which supplies the surrounding field label,\n * hint, and validation errors — so this component owns only the per-input\n * segment selectors and the empty-state hint.\n *\n * NOTE: `MatFormFieldControl<T>` mandates plain mutable `value` / `disabled` /\n * `required` / `placeholder` / `id` members, `@Input()` decorators, the\n * `focused` / `touched` / `stateChanges` members, and the `useExisting`\n * provider. These are framework wiring, not defects — the CLAUDE.md bans on\n * `@Input()` / `useExisting` do not apply to MatFormFieldControl integration.\n */\n@Component({\n selector: 'lib-config-mscoa-additional-inputs',\n imports: [\n MatListModule,\n MatToolbarModule,\n MatFormFieldModule,\n MatSelectModule,\n EmptyStateComponent,\n ],\n templateUrl: './config-mscoa-additional-inputs.component.html',\n styleUrls: ['./config-mscoa-additional-inputs.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n { provide: MatFormFieldControl, useExisting: ConfigMscoaAdditionalInputsComponent },\n ],\n host: {\n 'class': 'lib-config-mscoa-additional-inputs',\n '[id]': 'id',\n '[attr.aria-describedby]': 'describedBy',\n },\n})\nexport class ConfigMscoaAdditionalInputsComponent\n implements MatFormFieldControl<ConfiguredMscoaInput[]>\n{\n static nextId = 0;\n\n // ---- MatFormFieldControl wiring (framework-mandated plain members) -------\n\n /** Emits whenever a piece of `MatFormFieldControl` state changes. */\n readonly stateChanges = new Subject<void>();\n readonly controlType = 'lib-config-mscoa-additional-inputs';\n\n id = `app-config-mscoa-additional-inputs-${ConfigMscoaAdditionalInputsComponent.nextId++}`;\n placeholder = '';\n focused = false;\n touched = false;\n describedBy = '';\n autofilled: boolean | undefined = undefined;\n userAriaDescribedBy: string | undefined = undefined;\n disableAutomaticLabeling: boolean | undefined = undefined;\n\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n\n readonly #destroyRef = inject(DestroyRef);\n\n // ---- Public input/output contract ---------------------------------------\n\n /** Whether all segment selectors are inert. */\n @Input() disabled = false;\n\n /** Whether a value is required (drives the MFC error state). */\n @Input() required = false;\n\n /** Validation errors surfaced by the parent for error-state derivation. */\n @Input() errors: IConfigElementError[] | undefined = [];\n\n /** Data context; the add-input affordance is gated on `mapToData?.id`. */\n @Input() mapToData: FormColumnInputs | undefined = undefined;\n\n /**\n * One-shot stream of the MSCOA tree. The first emitted response's\n * `accountTreeKeys` populate the per-input segment options; later\n * assignments are ignored (the stream is consumed once).\n */\n @Input() set getMscoaTree(options$: Observable<IGetTreeResponse | undefined>) {\n if (!options$ || this.#mscoaInitiated) {\n return;\n }\n this.#mscoaInitiated = true;\n options$\n .pipe(\n take(1),\n tap((options) => this.#accountTreeKeys.set(options?.accountTreeKeys ?? [])),\n catchError(() => of(undefined)),\n takeUntilDestroyed(this.#destroyRef),\n )\n .subscribe();\n }\n\n /** Emits the full configured-input list whenever a segment changes. */\n readonly valueChanged = output<ConfiguredMscoaInput[]>();\n\n #mscoaInitiated = false;\n readonly #accountTreeKeys = signal<string[]>([]);\n readonly #value = signal<ConfiguredMscoaInput[]>([]);\n\n /** Currently hovered list row index, for hover affordances. */\n protected readonly hovered = signal<number | null>(null);\n\n /**\n * Segment options offered per input: every account-tree key plus a trailing\n * synthetic \"None\" entry that clears the binding.\n */\n protected readonly limitInputTo = computed<SegmentOption[]>(() => [\n ...this.#accountTreeKeys().map((key) => ({ value: key as string | undefined, label: key })),\n { value: undefined, label: 'None' },\n ]);\n\n /**\n * Whether the empty-state hint may render.\n *\n * A plain getter (not a `computed()`) because `mapToData` is a framework-style\n * mutable `@Input` rather than a signal — OnPush re-evaluates this binding\n * each change-detection pass.\n */\n protected get canAddInputs(): boolean {\n return !!this.mapToData?.id;\n }\n\n /** Configured inputs to render. */\n protected readonly inputs = this.#value.asReadonly();\n\n /** Current MatFormFieldControl value (the configured-input list). */\n @Input()\n get value(): ConfiguredMscoaInput[] {\n return this.#value();\n }\n set value(val: ConfiguredMscoaInput[]) {\n this.#value.set(val ?? []);\n this.stateChanges.next();\n }\n\n // ---- MatFormFieldControl framework getters ------------------------------\n\n get empty(): boolean {\n return this.#value().length === 0;\n }\n\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n get errorState(): boolean {\n const requiredUnset = this.empty && this.required;\n const ngControlError = this.ngControl?.errors != null;\n const externalError = (this.errors?.length ?? 0) > 0 && this.touched;\n return requiredUnset || ngControlError || externalError;\n }\n\n setDescribedByIds(ids: string[]): void {\n this.describedBy = ids.join(' ');\n this.stateChanges.next();\n }\n\n onContainerClick(): void {\n this.markAsTouched();\n this.stateChanges.next();\n }\n\n onTouched: () => void = () => {};\n\n markAsTouched(): void {\n if (!this.touched) {\n this.touched = true;\n this.onTouched();\n this.stateChanges.next();\n }\n }\n\n // ---- Behaviour ----------------------------------------------------------\n\n /**\n * Assigns the chosen account-segment to the input at `index` and emits the\n * updated list immediately. Selecting \"None\" (`undefined`) clears the binding.\n */\n inputSegmentChanged(\n event: { detail?: { value: string }; value?: string },\n index: number,\n ): void {\n const detailValue = event.detail?.value ?? event.value;\n const current = this.#value();\n const item = current[index];\n if (!item) {\n return;\n }\n const next = current.map((input, i) =>\n i === index\n ? { ...input, segment: detailValue === 'None' ? undefined : detailValue }\n : input,\n );\n this.#value.set(next);\n this.markAsTouched();\n this.stateChanges.next();\n this.valueChanged.emit(next);\n }\n}\n","@if (inputs().length > 0) {\n <mat-list class=\"lib-config-mscoa-additional-inputs__list\">\n <mat-toolbar class=\"lib-config-mscoa-additional-inputs__heading\">\n Additional inputs configuration\n </mat-toolbar>\n @for (input of inputs(); track input.id; let i = $index) {\n <mat-form-field\n class=\"lib-config-mscoa-additional-inputs__row\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n (mouseover)=\"hovered.set(i)\"\n (mouseleave)=\"hovered.set(null)\">\n <mat-label>{{ input.label }}</mat-label>\n <mat-select\n matNativeControl\n [disabled]=\"disabled\"\n [value]=\"input.segment\"\n placeholder=\"select segment\"\n (selectionChange)=\"inputSegmentChanged($event, i)\">\n @for (segment of limitInputTo(); track segment.label) {\n <mat-option [value]=\"segment.value\">{{ segment.label }}</mat-option>\n }\n </mat-select>\n <mat-hint>Link formula to an input value</mat-hint>\n </mat-form-field>\n }\n </mat-list>\n} @else if (canAddInputs) {\n <lib-empty-state\n icon=\"info\"\n message=\"No input configuration available.\" />\n}\n"],"names":["i1","i3","i4"],"mappings":";;;;;;;;;;;;;;;AAwCA;;;;;;;;;;;;;;AAcG;MAuBU,oCAAoC,CAAA;AAtBjD,IAAA,WAAA,GAAA;;;AA8BW,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;QAClC,IAAA,CAAA,WAAW,GAAG,oCAAoC;AAE3D,QAAA,IAAA,CAAA,EAAE,GAAG,CAAA,mCAAA,EAAsC,oCAAoC,CAAC,MAAM,EAAE,EAAE;QAC1F,IAAA,CAAA,WAAW,GAAG,EAAE;QAChB,IAAA,CAAA,OAAO,GAAG,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AAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,IAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACf,mBAAmB,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAeV,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBAtBhD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oCAAoC,EAAA,OAAA,EACrC;wBACP,aAAa;wBACb,gBAAgB;wBAChB,kBAAkB;wBAClB,eAAe;wBACf,mBAAmB;AACpB,qBAAA,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,QAAQ,EAAA,SAAA,EAC9B;AACT,wBAAA,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,sCAAsC,EAAE;qBACpF,EAAA,IAAA,EACK;AACJ,wBAAA,OAAO,EAAE,oCAAoC;AAC7C,wBAAA,MAAM,EAAE,IAAI;AACZ,wBAAA,yBAAyB,EAAE,aAAa;AACzC,qBAAA,EAAA,QAAA,EAAA,0sCAAA,EAAA,MAAA,EAAA,CAAA,8KAAA,CAAA,EAAA;;sBA6BA;;sBAGA;;sBAGA;;sBAGA;;sBAOA;;sBAiDA;;;;;"}
@@ -14,11 +14,11 @@ import { MatListModule } from '@angular/material/list';
14
14
  import * as i5 from '@angular/material/tooltip';
15
15
  import { MatTooltipModule } from '@angular/material/tooltip';
16
16
  import { DataSources } from 'ngx-t-forms-types';
17
- import { E as EmptyStateComponent } from './ngx-t-forms-ngx-t-forms-u_kigDid.mjs';
18
- import { MatChipListEditorComponent } from './ngx-t-forms-mat-chip-list-editor.component-c7uZT1sr.mjs';
19
- import { PipelineGeneratorComponent } from './ngx-t-forms-pipeline-generator.component-DmNSc5aw.mjs';
20
- import { RequiredInputsComponent } from './ngx-t-forms-required-inputs.component-Ch2yNcIS.mjs';
21
- import { RestApiCallSetupComponent } from './ngx-t-forms-rest-api-call-setup.component-C_aFtdvW.mjs';
17
+ import { E as EmptyStateComponent } from './ngx-t-forms-ngx-t-forms-C2G8_WQk.mjs';
18
+ import { MatChipListEditorComponent } from './ngx-t-forms-mat-chip-list-editor.component-BWisS3Em.mjs';
19
+ import { PipelineGeneratorComponent } from './ngx-t-forms-pipeline-generator.component-CZ21sd77.mjs';
20
+ import { RequiredInputsComponent } from './ngx-t-forms-required-inputs.component-ONbhxVSH.mjs';
21
+ import { RestApiCallSetupComponent } from './ngx-t-forms-rest-api-call-setup.component-WPUxtY7Q.mjs';
22
22
 
23
23
  /**
24
24
  * Internal editor element for configuring a report's data sources (API calls and
@@ -258,4 +258,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
258
258
  }], formInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "formInputs", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
259
259
 
260
260
  export { DataSourcePickerComponent };
261
- //# sourceMappingURL=ngx-t-forms-data-source-picker.component-Dzz_o6fJ.mjs.map
261
+ //# sourceMappingURL=ngx-t-forms-data-source-picker.component-Ebf_if9j.mjs.map