ngx-t-forms 2.0.33 → 2.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-mygIYJsN.mjs → ngx-t-forms-auto-complete-input-element.component-hDWV_H2E.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-mygIYJsN.mjs.map → ngx-t-forms-auto-complete-input-element.component-hDWV_H2E.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-B4gScnlc.mjs → ngx-t-forms-basic-input-input-element.component-BDWHCfgN.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-B4gScnlc.mjs.map → ngx-t-forms-basic-input-input-element.component-BDWHCfgN.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-I2dW6hGi.mjs → ngx-t-forms-calculated-field-rules.component-C_jwUGqr.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-I2dW6hGi.mjs.map → ngx-t-forms-calculated-field-rules.component-C_jwUGqr.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-84v7QQ3b.mjs → ngx-t-forms-chip-options-creator-editor.component-BIoML988.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-84v7QQ3b.mjs.map → ngx-t-forms-chip-options-creator-editor.component-BIoML988.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-DZLzjFQy.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-D2tkeGrw.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-DZLzjFQy.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-D2tkeGrw.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-data-source-picker.component-C6Xwcq3e.mjs → ngx-t-forms-data-source-picker.component-DHNyMfu5.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-data-source-picker.component-C6Xwcq3e.mjs.map → ngx-t-forms-data-source-picker.component-DHNyMfu5.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-C0uhrM_l.mjs → ngx-t-forms-date-picker-input-element.component-DJnHqSfk.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-C0uhrM_l.mjs.map → ngx-t-forms-date-picker-input-element.component-DJnHqSfk.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-CZU0JScH.mjs → ngx-t-forms-date-range-picker-input-element.component-Iw5Sou7u.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-CZU0JScH.mjs.map → ngx-t-forms-date-range-picker-input-element.component-Iw5Sou7u.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-zM7mpZxt.mjs +373 -0
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-zM7mpZxt.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-document-picker.component-CITHgJjy.mjs → ngx-t-forms-document-picker.component-j7-XiDnt.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-document-picker.component-CITHgJjy.mjs.map → ngx-t-forms-document-picker.component-j7-XiDnt.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-editor-input-element.component-eJ9rpN3t.mjs → ngx-t-forms-editor-input-element.component-CjY8h93n.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-editor-input-element.component-eJ9rpN3t.mjs.map → ngx-t-forms-editor-input-element.component-CjY8h93n.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-editor-js-input.component-BOUSCTQ_.mjs → ngx-t-forms-editor-js-input.component-CB8iaZ8o.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-editor-js-input.component-BOUSCTQ_.mjs.map → ngx-t-forms-editor-js-input.component-CB8iaZ8o.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-BWIeO1O2.mjs → ngx-t-forms-file-upload-input-element.component-C8a1gMMz.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-BWIeO1O2.mjs.map → ngx-t-forms-file-upload-input-element.component-C8a1gMMz.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-input-selector.component-DqRVx8YZ.mjs → ngx-t-forms-form-input-selector.component-vPJ9YksN.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-form-input-selector.component-DqRVx8YZ.mjs.map → ngx-t-forms-form-input-selector.component-vPJ9YksN.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-json-view.component-DSj-8rga.mjs → ngx-t-forms-form-json-view.component-DxvnpZdR.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-json-view.component-DSj-8rga.mjs.map → ngx-t-forms-form-json-view.component-DxvnpZdR.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-payload-projection.component-Ip9ewB18.mjs → ngx-t-forms-form-payload-projection.component-D46W1-4z.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-form-payload-projection.component-Ip9ewB18.mjs.map → ngx-t-forms-form-payload-projection.component-D46W1-4z.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-form-section-stepper.component-_cQl_olU.mjs +389 -0
- package/fesm2022/ngx-t-forms-form-section-stepper.component-_cQl_olU.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-Dz4Vl_ZN.mjs → ngx-t-forms-forms-builder-menu.component-BaBBPuXH.mjs} +11 -11
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-Dz4Vl_ZN.mjs.map → ngx-t-forms-forms-builder-menu.component-BaBBPuXH.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-geo-location.component-BwB_Da_k.mjs → ngx-t-forms-geo-location.component-BPqEkYIg.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-geo-location.component-BwB_Da_k.mjs.map → ngx-t-forms-geo-location.component-BPqEkYIg.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-AAMNhV66.mjs → ngx-t-forms-image-capture-input-element.component-CZojZh_T.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-AAMNhV66.mjs.map → ngx-t-forms-image-capture-input-element.component-CZojZh_T.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-index-CqDck7nn.mjs → ngx-t-forms-index-BI5sb1Lx.mjs} +2 -2
- package/fesm2022/ngx-t-forms-index-BI5sb1Lx.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-input-custom.component-af_d6VZy.mjs → ngx-t-forms-input-custom.component-C-gshpIM.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-input-custom.component-af_d6VZy.mjs.map → ngx-t-forms-input-custom.component-C-gshpIM.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-input-editor.component-CfaTar-x.mjs +190 -0
- package/fesm2022/ngx-t-forms-input-editor.component-CfaTar-x.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-0gqubG8m.mjs → ngx-t-forms-map-mat-options-keys-B8ubWvEz.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-0gqubG8m.mjs.map → ngx-t-forms-map-mat-options-keys-B8ubWvEz.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-ChD7WE5I.mjs → ngx-t-forms-mat-chip-list-editor.component-CT3wnaz8.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-ChD7WE5I.mjs.map → ngx-t-forms-mat-chip-list-editor.component-CT3wnaz8.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-CTaarZIV.mjs → ngx-t-forms-missing-form-configs.component-CSQ_Qtef.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-CTaarZIV.mjs.map → ngx-t-forms-missing-form-configs.component-CSQ_Qtef.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-CY2LAblM.mjs → ngx-t-forms-mscoa-chart-toolbar.component-Ovz5PFIe.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-CY2LAblM.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-Ovz5PFIe.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-CzmMXKYH.mjs → ngx-t-forms-mscoa-segment-config.component-ByR5fNu5.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-CzmMXKYH.mjs.map → ngx-t-forms-mscoa-segment-config.component-ByR5fNu5.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-multiple-input-input-element.component-BfpeOWJx.mjs → ngx-t-forms-multiple-input-input-element.component-DtXYH3Gb.mjs} +10 -10
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-DtXYH3Gb.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-ngx-t-forms-CIX_hqx4.mjs → ngx-t-forms-ngx-t-forms-CW8jN83w.mjs} +1147 -66
- package/fesm2022/ngx-t-forms-ngx-t-forms-CW8jN83w.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-paginated-selection-table-aWTsrLmJ.mjs → ngx-t-forms-paginated-selection-table-CWepPKmn.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-paginated-selection-table-aWTsrLmJ.mjs.map → ngx-t-forms-paginated-selection-table-CWepPKmn.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-BbsZu4Ji.mjs → ngx-t-forms-pipeline-generator.component-1EuDUOtI.mjs} +9 -9
- package/fesm2022/ngx-t-forms-pipeline-generator.component-1EuDUOtI.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-record-list-manager.component-BPaAZoCl.mjs → ngx-t-forms-record-list-manager.component-C-qKvSVR.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-record-list-manager.component-BPaAZoCl.mjs.map → ngx-t-forms-record-list-manager.component-C-qKvSVR.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-required-inputs.component-Bc22SdBb.mjs → ngx-t-forms-required-inputs.component-D5M9c-1i.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-required-inputs.component-Bc22SdBb.mjs.map → ngx-t-forms-required-inputs.component-D5M9c-1i.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-D9QIp83c.mjs → ngx-t-forms-rest-api-call-setup.component-CCz3c0X_.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-D9QIp83c.mjs.map → ngx-t-forms-rest-api-call-setup.component-CCz3c0X_.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-section-report.component-7ORNUfFx.mjs → ngx-t-forms-section-report.component-BypN3AWY.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-section-report.component-7ORNUfFx.mjs.map → ngx-t-forms-section-report.component-BypN3AWY.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-select-input-element.component-DjxK2Otk.mjs → ngx-t-forms-select-input-element.component-DNBZVxhD.mjs} +5 -5
- package/fesm2022/ngx-t-forms-select-input-element.component-DNBZVxhD.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-CtUL550G.mjs → ngx-t-forms-selection-options-editor.component-BSmmQQo3.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-CtUL550G.mjs.map → ngx-t-forms-selection-options-editor.component-BSmmQQo3.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-t-workflow-picker.component-CtavFAUq.mjs → ngx-t-forms-t-workflow-picker.component-DqFMP1rZ.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-t-workflow-picker.component-CtavFAUq.mjs.map → ngx-t-forms-t-workflow-picker.component-DqFMP1rZ.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-CKTTtBRp.mjs → ngx-t-forms-textarea-input-element.component-BEcNjLGC.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-CKTTtBRp.mjs.map → ngx-t-forms-textarea-input-element.component-BEcNjLGC.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-toggle-input-element.component-DjIrmI5x.mjs → ngx-t-forms-toggle-input-element.component-Cn_VOOEu.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-toggle-input-element.component-DjIrmI5x.mjs.map → ngx-t-forms-toggle-input-element.component-Cn_VOOEu.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-validators-config.component-qw17DsC-.mjs → ngx-t-forms-validators-config.component-DdKLxOr9.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-validators-config.component-qw17DsC-.mjs.map → ngx-t-forms-validators-config.component-DdKLxOr9.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-workflow-adjudication.component-B-lohk8w.mjs → ngx-t-forms-workflow-adjudication.component-DB4arTNG.mjs} +9 -9
- package/fesm2022/{ngx-t-forms-workflow-adjudication.component-B-lohk8w.mjs.map → ngx-t-forms-workflow-adjudication.component-DB4arTNG.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms.mjs +1 -1
- package/package.json +8 -2
- package/styles/_editor-mixins.scss +55 -0
- package/types/ngx-t-forms.d.ts +663 -12
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-BmD7KWAi.mjs +0 -368
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-BmD7KWAi.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-form-section-stepper.component-Bz3MpgZQ.mjs +0 -389
- package/fesm2022/ngx-t-forms-form-section-stepper.component-Bz3MpgZQ.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-index-CqDck7nn.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-input-editor.component-CQtlHivg.mjs +0 -193
- package/fesm2022/ngx-t-forms-input-editor.component-CQtlHivg.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BfpeOWJx.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-CIX_hqx4.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-pipeline-generator.component-BbsZu4Ji.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-select-input-element.component-DjxK2Otk.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-chip-options-creator-editor.component-
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-chip-options-creator-editor.component-BIoML988.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 $index) {\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,GAAG,CAAC,KAAK,EAAE,KAAK,CAAU;;AAGtD,QAAA,IAAA,CAAA,cAAc,GAAG,MA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AA;;;;;"}
|
|
@@ -4,14 +4,14 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
|
4
4
|
import { NgControl } from '@angular/forms';
|
|
5
5
|
import * as i2 from '@angular/material/form-field';
|
|
6
6
|
import { MatFormFieldModule, MatFormFieldControl } from '@angular/material/form-field';
|
|
7
|
-
import * as
|
|
7
|
+
import * as i6 from '@angular/material/list';
|
|
8
8
|
import { MatListModule } from '@angular/material/list';
|
|
9
|
-
import * as i8 from '@angular/material/select';
|
|
9
|
+
import * as i8$1 from '@angular/material/select';
|
|
10
10
|
import { MatSelectModule } from '@angular/material/select';
|
|
11
|
-
import * as
|
|
11
|
+
import * as i8 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-
|
|
14
|
+
import { E as EmptyStateComponent } from './ngx-t-forms-ngx-t-forms-CW8jN83w.mjs';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Internal editor that links each configured form input to an MSCOA
|
|
@@ -160,7 +160,7 @@ class ConfigMscoaAdditionalInputsComponent {
|
|
|
160
160
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ConfigMscoaAdditionalInputsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
161
161
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ConfigMscoaAdditionalInputsComponent, isStandalone: true, selector: "lib-config-mscoa-additional-inputs", inputs: { disabled: "disabled", required: "required", errors: "errors", mapToData: "mapToData", getMscoaTree: "getMscoaTree", value: "value" }, outputs: { valueChanged: "valueChanged" }, host: { properties: { "id": "id", "attr.aria-describedby": "describedBy" }, classAttribute: "lib-config-mscoa-additional-inputs" }, providers: [
|
|
162
162
|
{ provide: MatFormFieldControl, useExisting: ConfigMscoaAdditionalInputsComponent },
|
|
163
|
-
], ngImport: i0, template: "@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", styles: [":host{display:block}.lib-config-mscoa-additional-inputs__list{display:flex;flex-direction:column;gap:.75rem;padding:0}.lib-config-mscoa-additional-inputs__row{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type:
|
|
163
|
+
], ngImport: i0, template: "@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", styles: [":host{display:block}.lib-config-mscoa-additional-inputs__list{display:flex;flex-direction:column;gap:.75rem;padding:0}.lib-config-mscoa-additional-inputs__row{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i6.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i8.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i8$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i8$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: EmptyStateComponent, selector: "lib-empty-state", inputs: ["icon", "message"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
164
164
|
}
|
|
165
165
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ConfigMscoaAdditionalInputsComponent, decorators: [{
|
|
166
166
|
type: Component,
|
|
@@ -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-
|
|
195
|
+
//# sourceMappingURL=ngx-t-forms-config-mscoa-additional-inputs.component-D2tkeGrw.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-config-mscoa-additional-inputs.component-DZLzjFQy.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,CAAA,wBAAwB,GAAwB,SAAS;AAEhD,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAE7D,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;;;QAKhC,IAAA,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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-D2tkeGrw.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,CAAA,wBAAwB,GAAwB,SAAS;AAEhD,QAAA,IAAA,CAAA,S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mB,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;;;;;"}
|
|
@@ -9,16 +9,16 @@ import * as i3 from '@angular/material/card';
|
|
|
9
9
|
import { MatCardModule } from '@angular/material/card';
|
|
10
10
|
import * as i3$1 from '@angular/material/icon';
|
|
11
11
|
import { MatIconModule } from '@angular/material/icon';
|
|
12
|
-
import * as
|
|
12
|
+
import * as i6 from '@angular/material/list';
|
|
13
13
|
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-
|
|
18
|
-
import { MatChipListEditorComponent } from './ngx-t-forms-mat-chip-list-editor.component-
|
|
19
|
-
import { PipelineGeneratorComponent } from './ngx-t-forms-pipeline-generator.component-
|
|
20
|
-
import { RequiredInputsComponent } from './ngx-t-forms-required-inputs.component-
|
|
21
|
-
import { RestApiCallSetupComponent } from './ngx-t-forms-rest-api-call-setup.component-
|
|
17
|
+
import { E as EmptyStateComponent } from './ngx-t-forms-ngx-t-forms-CW8jN83w.mjs';
|
|
18
|
+
import { MatChipListEditorComponent } from './ngx-t-forms-mat-chip-list-editor.component-CT3wnaz8.mjs';
|
|
19
|
+
import { PipelineGeneratorComponent } from './ngx-t-forms-pipeline-generator.component-1EuDUOtI.mjs';
|
|
20
|
+
import { RequiredInputsComponent } from './ngx-t-forms-required-inputs.component-D5M9c-1i.mjs';
|
|
21
|
+
import { RestApiCallSetupComponent } from './ngx-t-forms-rest-api-call-setup.component-CCz3c0X_.mjs';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Internal editor element for configuring a report's data sources (API calls and
|
|
@@ -226,7 +226,7 @@ class DataSourcePickerComponent {
|
|
|
226
226
|
return config?.source === DataSources.Api;
|
|
227
227
|
}
|
|
228
228
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DataSourcePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
229
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DataSourcePickerComponent, isStandalone: true, selector: "lib-data-source-picker", inputs: { errors: { classPropertyName: "errors", publicName: "errors", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, editorConfig: { classPropertyName: "editorConfig", publicName: "editorConfig", isSignal: false, isRequired: false, transformFunction: null }, formInputs: { classPropertyName: "formInputs", publicName: "formInputs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { properties: { "attr.id": "id", "class.lib-data-source-picker--focused": "focused", "class.lib-data-source-picker--disabled": "disabled" }, classAttribute: "lib-data-source-picker" }, providers: [{ provide: MatFormFieldControl, useExisting: DataSourcePickerComponent }], ngImport: i0, template: "<div class=\"lib-data-source-picker__list\">\n @if (hasSources()) {\n <mat-list class=\"lib-data-source-picker__sources\">\n @for (row of rows(); track row.source.id) {\n <mat-list-item\n class=\"lib-data-source-picker__source\"\n matTooltipPosition=\"before\"\n [matTooltip]=\"row.source.source + ' ' + row.endpoint\">\n <mat-icon\n matListItemIcon\n class=\"lib-data-source-picker__icon\"\n [class.lib-data-source-picker__icon--api]=\"row.isApi\">\n {{ row.icon }}\n </mat-icon>\n <span matListItemTitle class=\"lib-data-source-picker__name\">{{ row.name }}</span>\n <span matListItemLine class=\"lib-data-source-picker__endpoint\">{{ row.endpoint }}</span>\n <button\n matListItemMeta\n mat-icon-button\n type=\"button\"\n [attr.aria-label]=\"'Remove ' + row.name\"\n [disabled]=\"disabled\"\n (click)=\"removeSource(row.source)\">\n <mat-icon>delete</mat-icon>\n </button>\n </mat-list-item>\n }\n </mat-list>\n } @else {\n <lib-empty-state icon=\"storage\" message=\"No data sources configured. Add one to get started.\" />\n }\n</div>\n\n@if (draft(); as draft) {\n <mat-card appearance=\"outlined\" class=\"lib-data-source-picker__editor\">\n <mat-card-content>\n <label [attr.for]=\"id + '-type'\" class=\"lib-data-source-picker__label\">Select source type</label>\n <lib-mat-chip-list-editor\n [id]=\"id + '-type'\"\n [value]=\"draft.source\"\n [options]=\"dataSourceOptions\"\n (valueChange)=\"sourceTypeChanged($event)\" />\n\n @if (draft.source !== undefined) {\n @switch (draft.source) {\n @case (dataSources.Api) {\n <label [attr.for]=\"id + '-api'\" class=\"lib-data-source-picker__label\">Select API</label>\n <lib-rest-api-call-setup\n [id]=\"id + '-api'\"\n [postmanCollectionConfig]=\"editorConfig?.postmanCollectionConfig\"\n [httpGetDataFunction]=\"editorConfig?.httpGetDataFunction\"\n [value]=\"$any(draft.config)\"\n (valueChanged)=\"sourceConfigChanged($event)\" />\n\n @if (draftMinimumInputRequired(); as minimumInputRequired) {\n <lib-required-inputs\n [id]=\"id + '-required-inputs'\"\n [formInputs]=\"formInputs() || []\"\n [value]=\"minimumInputRequired\"\n [errors]=\"[]\"\n (valueChanged)=\"minimumInputRequiredValueChanged($event)\" />\n }\n }\n @case (dataSources.MongoDb) {\n <label [attr.for]=\"id + '-pipeline'\" class=\"lib-data-source-picker__label\">Add a MongoDB pipeline</label>\n <lib-pipeline-generator\n [id]=\"id + '-pipeline'\"\n [value]=\"$any(draft.config)\"\n [getWorkflowOptions]=\"editorConfig?.getWorkflowOptions\"\n (valueChanged)=\"sourceConfigChanged($event)\" />\n }\n }\n }\n </mat-card-content>\n\n <mat-card-actions class=\"lib-data-source-picker__actions\">\n <button mat-flat-button color=\"primary\" type=\"button\" (click)=\"saveNewSource()\">Save source</button>\n <span class=\"lib-data-source-picker__spacer\"></span>\n <button mat-button color=\"warn\" type=\"button\" (click)=\"cancelEditing()\">Cancel</button>\n </mat-card-actions>\n </mat-card>\n} @else {\n <button\n mat-stroked-button\n color=\"primary\"\n type=\"button\"\n class=\"lib-data-source-picker__add\"\n [disabled]=\"disabled\"\n (click)=\"startEditing()\">\n <mat-icon>add</mat-icon>\n Add data source\n </button>\n}\n", styles: [":host{display:block}.lib-data-source-picker__list{display:block}.lib-data-source-picker__sources{padding:0}.lib-data-source-picker__source{border-radius:var(--lib-forms-radius-sm, 8px)}.lib-data-source-picker__icon{color:var(--lib-forms-on-surface-variant)}.lib-data-source-picker__icon--api{color:var(--lib-forms-primary)}.lib-data-source-picker__name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lib-data-source-picker__endpoint{color:var(--lib-forms-on-surface-variant);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lib-data-source-picker__editor{margin-top:1.5rem;background:var(--lib-forms-surface)}.lib-data-source-picker__label{display:block;margin-top:.75rem;margin-bottom:.5rem;font-size:.625rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--lib-forms-on-surface-variant)}.lib-data-source-picker__actions{display:flex;align-items:center;margin-top:1.5rem}.lib-data-source-picker__spacer{flex:1 1 auto}.lib-data-source-picker__add{width:100%;margin-top:1.5rem}:host(.lib-data-source-picker--disabled){opacity:.55;pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i3.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type:
|
|
229
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DataSourcePickerComponent, isStandalone: true, selector: "lib-data-source-picker", inputs: { errors: { classPropertyName: "errors", publicName: "errors", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, editorConfig: { classPropertyName: "editorConfig", publicName: "editorConfig", isSignal: false, isRequired: false, transformFunction: null }, formInputs: { classPropertyName: "formInputs", publicName: "formInputs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { properties: { "attr.id": "id", "class.lib-data-source-picker--focused": "focused", "class.lib-data-source-picker--disabled": "disabled" }, classAttribute: "lib-data-source-picker" }, providers: [{ provide: MatFormFieldControl, useExisting: DataSourcePickerComponent }], ngImport: i0, template: "<div class=\"lib-data-source-picker__list\">\n @if (hasSources()) {\n <mat-list class=\"lib-data-source-picker__sources\">\n @for (row of rows(); track row.source.id) {\n <mat-list-item\n class=\"lib-data-source-picker__source\"\n matTooltipPosition=\"before\"\n [matTooltip]=\"row.source.source + ' ' + row.endpoint\">\n <mat-icon\n matListItemIcon\n class=\"lib-data-source-picker__icon\"\n [class.lib-data-source-picker__icon--api]=\"row.isApi\">\n {{ row.icon }}\n </mat-icon>\n <span matListItemTitle class=\"lib-data-source-picker__name\">{{ row.name }}</span>\n <span matListItemLine class=\"lib-data-source-picker__endpoint\">{{ row.endpoint }}</span>\n <button\n matListItemMeta\n mat-icon-button\n type=\"button\"\n [attr.aria-label]=\"'Remove ' + row.name\"\n [disabled]=\"disabled\"\n (click)=\"removeSource(row.source)\">\n <mat-icon>delete</mat-icon>\n </button>\n </mat-list-item>\n }\n </mat-list>\n } @else {\n <lib-empty-state icon=\"storage\" message=\"No data sources configured. Add one to get started.\" />\n }\n</div>\n\n@if (draft(); as draft) {\n <mat-card appearance=\"outlined\" class=\"lib-data-source-picker__editor\">\n <mat-card-content>\n <label [attr.for]=\"id + '-type'\" class=\"lib-data-source-picker__label\">Select source type</label>\n <lib-mat-chip-list-editor\n [id]=\"id + '-type'\"\n [value]=\"draft.source\"\n [options]=\"dataSourceOptions\"\n (valueChange)=\"sourceTypeChanged($event)\" />\n\n @if (draft.source !== undefined) {\n @switch (draft.source) {\n @case (dataSources.Api) {\n <label [attr.for]=\"id + '-api'\" class=\"lib-data-source-picker__label\">Select API</label>\n <lib-rest-api-call-setup\n [id]=\"id + '-api'\"\n [postmanCollectionConfig]=\"editorConfig?.postmanCollectionConfig\"\n [httpGetDataFunction]=\"editorConfig?.httpGetDataFunction\"\n [value]=\"$any(draft.config)\"\n (valueChanged)=\"sourceConfigChanged($event)\" />\n\n @if (draftMinimumInputRequired(); as minimumInputRequired) {\n <lib-required-inputs\n [id]=\"id + '-required-inputs'\"\n [formInputs]=\"formInputs() || []\"\n [value]=\"minimumInputRequired\"\n [errors]=\"[]\"\n (valueChanged)=\"minimumInputRequiredValueChanged($event)\" />\n }\n }\n @case (dataSources.MongoDb) {\n <label [attr.for]=\"id + '-pipeline'\" class=\"lib-data-source-picker__label\">Add a MongoDB pipeline</label>\n <lib-pipeline-generator\n [id]=\"id + '-pipeline'\"\n [value]=\"$any(draft.config)\"\n [getWorkflowOptions]=\"editorConfig?.getWorkflowOptions\"\n (valueChanged)=\"sourceConfigChanged($event)\" />\n }\n }\n }\n </mat-card-content>\n\n <mat-card-actions class=\"lib-data-source-picker__actions\">\n <button mat-flat-button color=\"primary\" type=\"button\" (click)=\"saveNewSource()\">Save source</button>\n <span class=\"lib-data-source-picker__spacer\"></span>\n <button mat-button color=\"warn\" type=\"button\" (click)=\"cancelEditing()\">Cancel</button>\n </mat-card-actions>\n </mat-card>\n} @else {\n <button\n mat-stroked-button\n color=\"primary\"\n type=\"button\"\n class=\"lib-data-source-picker__add\"\n [disabled]=\"disabled\"\n (click)=\"startEditing()\">\n <mat-icon>add</mat-icon>\n Add data source\n </button>\n}\n", styles: [":host{display:block}.lib-data-source-picker__list{display:block}.lib-data-source-picker__sources{padding:0}.lib-data-source-picker__source{border-radius:var(--lib-forms-radius-sm, 8px)}.lib-data-source-picker__icon{color:var(--lib-forms-on-surface-variant)}.lib-data-source-picker__icon--api{color:var(--lib-forms-primary)}.lib-data-source-picker__name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lib-data-source-picker__endpoint{color:var(--lib-forms-on-surface-variant);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lib-data-source-picker__editor{margin-top:1.5rem;background:var(--lib-forms-surface)}.lib-data-source-picker__label{display:block;margin-top:.75rem;margin-bottom:.5rem;font-size:.625rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--lib-forms-on-surface-variant)}.lib-data-source-picker__actions{display:flex;align-items:center;margin-top:1.5rem}.lib-data-source-picker__spacer{flex:1 1 auto}.lib-data-source-picker__add{width:100%;margin-top:1.5rem}:host(.lib-data-source-picker--disabled){opacity:.55;pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i3.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i6.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i6.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i6.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i6.MatListItemLine, selector: "[matListItemLine]" }, { kind: "directive", type: i6.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i6.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: EmptyStateComponent, selector: "lib-empty-state", inputs: ["icon", "message"] }, { kind: "component", type: MatChipListEditorComponent, selector: "lib-mat-chip-list-editor", inputs: ["disabled", "multiple", "required", "errors", "value", "options"], outputs: ["valueChange"] }, { kind: "component", type: PipelineGeneratorComponent, selector: "lib-pipeline-generator", inputs: ["disabled", "value", "getWorkflowOptions", "userName", "errors"], outputs: ["valueChanged"] }, { kind: "component", type: RequiredInputsComponent, selector: "lib-required-inputs", inputs: ["value", "formInputs", "disabled", "errors", "id"], outputs: ["valueChanged"] }, { kind: "component", type: RestApiCallSetupComponent, selector: "lib-rest-api-call-setup", inputs: ["id", "postmanCollectionConfig", "httpGetDataFunction", "disabled", "value", "errors"], outputs: ["valueChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
230
230
|
}
|
|
231
231
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DataSourcePickerComponent, decorators: [{
|
|
232
232
|
type: Component,
|
|
@@ -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-
|
|
261
|
+
//# sourceMappingURL=ngx-t-forms-data-source-picker.component-DHNyMfu5.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-data-source-picker.component-C6Xwcq3e.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/data-source-picker/data-source-picker.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/data-source-picker/data-source-picker.component.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n ViewEncapsulation,\n computed,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { Subject } from 'rxjs';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatListModule } from '@angular/material/list';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport {\n APIDataFetchingConfigurationInterface,\n DataSources,\n ElementEditorInnerSectionElementInterface,\n FormColumnInputs,\n IReportDataSources,\n MinimumInputRequiredInterface,\n MongoDbPipeLineConfigInterface,\n} from 'ngx-t-forms-types';\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\nimport { MatChipListEditorComponent } from '../mat-chip-list-editor/mat-chip-list-editor.component';\nimport { PipelineGeneratorComponent } from '../pipeline-generator/pipeline-generator.component';\nimport { RequiredInputsComponent } from '../required-inputs/required-inputs.component';\nimport { RestApiCallSetupComponent } from '../rest-api-call-setup/rest-api-call-setup.component';\n\n/** Source-type option rendered in the chip selector. */\ninterface DataSourceOption {\n label: string;\n value: DataSources;\n}\n\n/** A configured data source decorated with the derived fields the list row renders. */\ninterface DataSourceRow {\n readonly source: IReportDataSources;\n readonly name: string;\n readonly icon: string;\n readonly endpoint: string;\n readonly isApi: boolean;\n}\n\n/** The in-edit working draft: a partial source being composed before save. */\ntype DataSourceDraft = Partial<IReportDataSources>;\n\n/**\n * Internal editor element for configuring a report's data sources (API calls and\n * MongoDB pipelines). It is a real `MatFormFieldControl`, rendered by\n * `t-dynamic-data-edit` inside a `<mat-form-field>` — so the parent owns the\n * surrounding label, hint, and validation errors, and this component owns only\n * the source list, the inline editor card, and the add affordance.\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-data-source-picker',\n imports: [\n MatButtonModule,\n MatCardModule,\n MatIconModule,\n MatListModule,\n MatTooltipModule,\n EmptyStateComponent,\n MatChipListEditorComponent,\n PipelineGeneratorComponent,\n RequiredInputsComponent,\n RestApiCallSetupComponent,\n ],\n templateUrl: './data-source-picker.component.html',\n styleUrl: './data-source-picker.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n providers: [{ provide: MatFormFieldControl, useExisting: DataSourcePickerComponent }],\n host: {\n 'class': 'lib-data-source-picker',\n '[attr.id]': 'id',\n '[class.lib-data-source-picker--focused]': 'focused',\n '[class.lib-data-source-picker--disabled]': 'disabled',\n },\n})\nexport class DataSourcePickerComponent\n implements MatFormFieldControl<Array<IReportDataSources> | undefined>\n{\n static nextId = 0;\n\n /** Emits whenever a piece of `MatFormFieldControl` state changes. */\n readonly stateChanges = new Subject<void>();\n readonly controlType = 'lib-data-source-picker';\n\n id = `lib-data-source-picker-${DataSourcePickerComponent.nextId++}`;\n placeholder = '';\n focused = false;\n touched = false;\n required = false;\n describedBy = '';\n autofilled = false;\n userAriaDescribedBy: string | undefined = undefined;\n disableAutomaticLabeling: boolean | undefined = undefined;\n\n /** Validation errors surfaced by the parent for error-state derivation. */\n @Input() errors: IConfigElementError[] | undefined = [];\n\n #disabled = false;\n /** Whether the control is inert. */\n @Input()\n get disabled(): boolean {\n return this.#disabled;\n }\n set disabled(value: boolean) {\n this.#disabled = value;\n this.stateChanges.next();\n }\n\n // Mirror of the plain MFC `value` member, so the template + computeds react.\n readonly #value = signal<Array<IReportDataSources> | undefined>(undefined);\n\n /** Current list of configured data sources. */\n @Input()\n get value(): Array<IReportDataSources> | undefined {\n return this.#value();\n }\n set value(value: Array<IReportDataSources> | undefined) {\n if (this.#value() === value) {\n return;\n }\n this.#value.set(value);\n this.stateChanges.next();\n }\n\n // Mirror of the plain `editorConfig` member, so the template reacts.\n readonly #editorConfig = signal<ElementEditorInnerSectionElementInterface | undefined>(\n undefined,\n );\n\n /** Editor configuration supplying postman / workflow option providers. */\n @Input()\n get editorConfig(): ElementEditorInnerSectionElementInterface | undefined {\n return this.#editorConfig();\n }\n set editorConfig(config: ElementEditorInnerSectionElementInterface | undefined) {\n this.#editorConfig.set(config);\n }\n\n /** All available form inputs the user can map a required input to. */\n readonly formInputs = input<Array<FormColumnInputs>>([]);\n\n /** Emits the mutated data-source list whenever the user adds or removes a source. */\n readonly valueChange = output<Array<IReportDataSources> | undefined>();\n\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n readonly #elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Source-type enum, exposed to the template. */\n protected readonly dataSources = DataSources;\n\n /** The selectable source types in the chip selector. */\n protected readonly dataSourceOptions: DataSourceOption[] = [\n { label: 'API', value: DataSources.Api },\n { label: 'MongoDB', value: DataSources.MongoDb },\n ];\n\n /** The in-edit draft, or `undefined` when the editor card is closed. */\n protected readonly draft = signal<DataSourceDraft | undefined>(undefined);\n\n /** Decorated rows for the configured-source list. */\n protected readonly rows = computed<readonly DataSourceRow[]>(() =>\n (this.#value() ?? []).map((source, index) => ({\n source,\n name: this.#name(source, index),\n icon: source.source === DataSources.Api ? 'api' : 'storage',\n endpoint: this.#endpoint(source),\n isApi: source.source === DataSources.Api,\n })),\n );\n\n /** Whether any data source is configured. */\n protected readonly hasSources = computed<boolean>(() => (this.#value() ?? []).length > 0);\n\n /** The `minimumInputRequired` list of the draft's API config, or `undefined`. */\n protected readonly draftMinimumInputRequired = computed<\n readonly MinimumInputRequiredInterface[] | undefined\n >(() => {\n const config = this.draft()?.config;\n if (!config || !this.#isApiConfig(config)) {\n return undefined;\n }\n return config.backEndConfig?.minimumInputRequired;\n });\n\n // ---- MatFormFieldControl getters (read during the framework's CD) --------\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 const el = this.#elementRef.nativeElement;\n const control = el.querySelector('.lib-data-source-picker__list');\n control?.setAttribute('aria-describedby', this.describedBy);\n this.stateChanges.next();\n }\n\n onContainerClick(): void {\n this.markAsTouched();\n if (!this.focused) {\n this.focused = true;\n }\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 // ---- Draft editing -------------------------------------------------------\n\n /** Open the editor card with an empty draft. */\n protected startEditing(): void {\n this.draft.set({});\n }\n\n /** Discard the draft and close the editor card. */\n protected cancelEditing(): void {\n this.draft.set(undefined);\n }\n\n /** Set the draft's source type. Child chip editor emits an unknown payload. */\n protected sourceTypeChanged(source: unknown): void {\n this.draft.update((current) =>\n current ? { ...current, source: source as DataSources | undefined } : current,\n );\n }\n\n /** Set the draft's source config (API setup or pipeline). */\n protected sourceConfigChanged(\n config: APIDataFetchingConfigurationInterface | MongoDbPipeLineConfigInterface | undefined,\n ): void {\n this.draft.update((current) => (current ? { ...current, config } : current));\n }\n\n /** Merge the required-input list into the draft's API config. */\n protected minimumInputRequiredValueChanged(\n value: Array<MinimumInputRequiredInterface>,\n ): void {\n this.draft.update((current) => {\n if (!current?.config || !this.#isApiConfig(current.config)) {\n return current;\n }\n const config: APIDataFetchingConfigurationInterface = {\n ...current.config,\n backEndConfig: { ...current.config.backEndConfig, minimumInputRequired: value },\n };\n return { ...current, config };\n });\n }\n\n /** Commit the draft as a new source (assigning a fresh id) and emit. */\n protected saveNewSource(): void {\n const current = this.draft();\n if (!current) {\n return;\n }\n const data: IReportDataSources = { ...current, id: crypto.randomUUID() } as IReportDataSources;\n const next = [...(this.#value() ?? []), data];\n this.value = next;\n this.draft.set(undefined);\n this.markAsTouched();\n this.valueChange.emit(next);\n }\n\n /** Remove a configured source by id and emit. */\n protected removeSource(source: IReportDataSources): void {\n const current = this.#value();\n if (!current) {\n return;\n }\n const next = current.filter((item) => item.id !== source.id);\n this.value = next;\n this.markAsTouched();\n this.valueChange.emit(next);\n }\n\n #name(value: IReportDataSources, index: number): string {\n if (this.#isApiConfig(value.config) && value.config.name) {\n return value.config.name;\n }\n return value.source === DataSources.Api ? `API ${index + 1}` : `MongoDB ${index + 1}`;\n }\n\n #endpoint(value: IReportDataSources): string {\n if (this.#isApiConfig(value.config)) {\n return value.config.httpEndPoint ?? '';\n }\n return value.config.workflowId ?? '';\n }\n\n #isApiConfig(\n config: APIDataFetchingConfigurationInterface | MongoDbPipeLineConfigInterface | undefined,\n ): config is APIDataFetchingConfigurationInterface {\n return config?.source === DataSources.Api;\n }\n}\n","<div class=\"lib-data-source-picker__list\">\n @if (hasSources()) {\n <mat-list class=\"lib-data-source-picker__sources\">\n @for (row of rows(); track row.source.id) {\n <mat-list-item\n class=\"lib-data-source-picker__source\"\n matTooltipPosition=\"before\"\n [matTooltip]=\"row.source.source + ' ' + row.endpoint\">\n <mat-icon\n matListItemIcon\n class=\"lib-data-source-picker__icon\"\n [class.lib-data-source-picker__icon--api]=\"row.isApi\">\n {{ row.icon }}\n </mat-icon>\n <span matListItemTitle class=\"lib-data-source-picker__name\">{{ row.name }}</span>\n <span matListItemLine class=\"lib-data-source-picker__endpoint\">{{ row.endpoint }}</span>\n <button\n matListItemMeta\n mat-icon-button\n type=\"button\"\n [attr.aria-label]=\"'Remove ' + row.name\"\n [disabled]=\"disabled\"\n (click)=\"removeSource(row.source)\">\n <mat-icon>delete</mat-icon>\n </button>\n </mat-list-item>\n }\n </mat-list>\n } @else {\n <lib-empty-state icon=\"storage\" message=\"No data sources configured. Add one to get started.\" />\n }\n</div>\n\n@if (draft(); as draft) {\n <mat-card appearance=\"outlined\" class=\"lib-data-source-picker__editor\">\n <mat-card-content>\n <label [attr.for]=\"id + '-type'\" class=\"lib-data-source-picker__label\">Select source type</label>\n <lib-mat-chip-list-editor\n [id]=\"id + '-type'\"\n [value]=\"draft.source\"\n [options]=\"dataSourceOptions\"\n (valueChange)=\"sourceTypeChanged($event)\" />\n\n @if (draft.source !== undefined) {\n @switch (draft.source) {\n @case (dataSources.Api) {\n <label [attr.for]=\"id + '-api'\" class=\"lib-data-source-picker__label\">Select API</label>\n <lib-rest-api-call-setup\n [id]=\"id + '-api'\"\n [postmanCollectionConfig]=\"editorConfig?.postmanCollectionConfig\"\n [httpGetDataFunction]=\"editorConfig?.httpGetDataFunction\"\n [value]=\"$any(draft.config)\"\n (valueChanged)=\"sourceConfigChanged($event)\" />\n\n @if (draftMinimumInputRequired(); as minimumInputRequired) {\n <lib-required-inputs\n [id]=\"id + '-required-inputs'\"\n [formInputs]=\"formInputs() || []\"\n [value]=\"minimumInputRequired\"\n [errors]=\"[]\"\n (valueChanged)=\"minimumInputRequiredValueChanged($event)\" />\n }\n }\n @case (dataSources.MongoDb) {\n <label [attr.for]=\"id + '-pipeline'\" class=\"lib-data-source-picker__label\">Add a MongoDB pipeline</label>\n <lib-pipeline-generator\n [id]=\"id + '-pipeline'\"\n [value]=\"$any(draft.config)\"\n [getWorkflowOptions]=\"editorConfig?.getWorkflowOptions\"\n (valueChanged)=\"sourceConfigChanged($event)\" />\n }\n }\n }\n </mat-card-content>\n\n <mat-card-actions class=\"lib-data-source-picker__actions\">\n <button mat-flat-button color=\"primary\" type=\"button\" (click)=\"saveNewSource()\">Save source</button>\n <span class=\"lib-data-source-picker__spacer\"></span>\n <button mat-button color=\"warn\" type=\"button\" (click)=\"cancelEditing()\">Cancel</button>\n </mat-card-actions>\n </mat-card>\n} @else {\n <button\n mat-stroked-button\n color=\"primary\"\n type=\"button\"\n class=\"lib-data-source-picker__add\"\n [disabled]=\"disabled\"\n (click)=\"startEditing()\">\n <mat-icon>add</mat-icon>\n Add data source\n </button>\n}\n"],"names":["i2","i3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAsDA;;;;;;;;;;;;AAYG;MA2BU,yBAAyB,CAAA;AA1BtC,IAAA,WAAA,GAAA;;AAgCW,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;QAClC,IAAA,CAAA,WAAW,GAAG,wBAAwB;AAE/C,QAAA,IAAA,CAAA,EAAE,GAAG,CAAA,uBAAA,EAA0B,yBAAyB,CAAC,MAAM,EAAE,EAAE;QACnE,IAAA,CAAA,WAAW,GAAG,EAAE;QAChB,IAAA,CAAA,OAAO,GAAG,KAAK;QACf,IAAA,CAAA,OAAO,GAAG,KAAK;QACf,IAAA,CAAA,QAAQ,GAAG,KAAK;QAChB,IAAA,CAAA,WAAW,GAAG,EAAE;QAChB,IAAA,CAAA,UAAU,GAAG,KAAK;QAClB,IAAA,CAAA,mBAAmB,GAAuB,SAAS;QACnD,IAAA,CAAA,wBAAwB,GAAwB,SAAS;;QAGhD,IAAA,CAAA,MAAM,GAAsC,EAAE;QAEvD,IAAA,CAAA,SAAS,GAAG,KAAK;;AAYR,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAwC,SAAS,6EAAC;;AAgBjE,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAC7B,SAAS,oFACV;;AAYQ,QAAA,IAAA,CAAA,UAAU,GAAG,KAA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uB,wJACvB,yBAAyB,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,IAAA,EAAA,yBAAA,EAAA,qBAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAchB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBA1BrC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wBAAwB,EAAA,OAAA,EACzB;wBACP,eAAe;wBACf,aAAa;wBACb,aAAa;wBACb,aAAa;wBACb,gBAAgB;wBAChB,mBAAmB;wBACnB,0BAA0B;wBAC1B,0BAA0B;wBAC1B,uBAAuB;wBACvB,yBAAyB;AAC1B,qBAAA,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,QAAQ,EAAA,SAAA,EAC9B,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,yBAA2B,EAAE,CAAC,EAAA,IAAA,EAC/E;AACJ,wBAAA,OAAO,EAAE,wBAAwB;AACjC,wBAAA,WAAW,EAAE,IAAI;AACjB,wBAAA,yCAAyC,EAAE,SAAS;AACpD,wBAAA,0CAA0C,EAAE,UAAU;AACvD,qBAAA,EAAA,QAAA,EAAA,2uHAAA,EAAA,MAAA,EAAA,CAAA,4lCAAA,CAAA,EAAA;;sBAsBA;;sBAIA;;sBAaA;;sBAkBA;;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-data-source-picker.component-DHNyMfu5.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/data-source-picker/data-source-picker.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/data-source-picker/data-source-picker.component.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n ViewEncapsulation,\n computed,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { Subject } from 'rxjs';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatListModule } from '@angular/material/list';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport {\n APIDataFetchingConfigurationInterface,\n DataSources,\n ElementEditorInnerSectionElementInterface,\n FormColumnInputs,\n IReportDataSources,\n MinimumInputRequiredInterface,\n MongoDbPipeLineConfigInterface,\n} from 'ngx-t-forms-types';\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\nimport { MatChipListEditorComponent } from '../mat-chip-list-editor/mat-chip-list-editor.component';\nimport { PipelineGeneratorComponent } from '../pipeline-generator/pipeline-generator.component';\nimport { RequiredInputsComponent } from '../required-inputs/required-inputs.component';\nimport { RestApiCallSetupComponent } from '../rest-api-call-setup/rest-api-call-setup.component';\n\n/** Source-type option rendered in the chip selector. */\ninterface DataSourceOption {\n label: string;\n value: DataSources;\n}\n\n/** A configured data source decorated with the derived fields the list row renders. */\ninterface DataSourceRow {\n readonly source: IReportDataSources;\n readonly name: string;\n readonly icon: string;\n readonly endpoint: string;\n readonly isApi: boolean;\n}\n\n/** The in-edit working draft: a partial source being composed before save. */\ntype DataSourceDraft = Partial<IReportDataSources>;\n\n/**\n * Internal editor element for configuring a report's data sources (API calls and\n * MongoDB pipelines). It is a real `MatFormFieldControl`, rendered by\n * `t-dynamic-data-edit` inside a `<mat-form-field>` — so the parent owns the\n * surrounding label, hint, and validation errors, and this component owns only\n * the source list, the inline editor card, and the add affordance.\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-data-source-picker',\n imports: [\n MatButtonModule,\n MatCardModule,\n MatIconModule,\n MatListModule,\n MatTooltipModule,\n EmptyStateComponent,\n MatChipListEditorComponent,\n PipelineGeneratorComponent,\n RequiredInputsComponent,\n RestApiCallSetupComponent,\n ],\n templateUrl: './data-source-picker.component.html',\n styleUrl: './data-source-picker.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n providers: [{ provide: MatFormFieldControl, useExisting: DataSourcePickerComponent }],\n host: {\n 'class': 'lib-data-source-picker',\n '[attr.id]': 'id',\n '[class.lib-data-source-picker--focused]': 'focused',\n '[class.lib-data-source-picker--disabled]': 'disabled',\n },\n})\nexport class DataSourcePickerComponent\n implements MatFormFieldControl<Array<IReportDataSources> | undefined>\n{\n static nextId = 0;\n\n /** Emits whenever a piece of `MatFormFieldControl` state changes. */\n readonly stateChanges = new Subject<void>();\n readonly controlType = 'lib-data-source-picker';\n\n id = `lib-data-source-picker-${DataSourcePickerComponent.nextId++}`;\n placeholder = '';\n focused = false;\n touched = false;\n required = false;\n describedBy = '';\n autofilled = false;\n userAriaDescribedBy: string | undefined = undefined;\n disableAutomaticLabeling: boolean | undefined = undefined;\n\n /** Validation errors surfaced by the parent for error-state derivation. */\n @Input() errors: IConfigElementError[] | undefined = [];\n\n #disabled = false;\n /** Whether the control is inert. */\n @Input()\n get disabled(): boolean {\n return this.#disabled;\n }\n set disabled(value: boolean) {\n this.#disabled = value;\n this.stateChanges.next();\n }\n\n // Mirror of the plain MFC `value` member, so the template + computeds react.\n readonly #value = signal<Array<IReportDataSources> | undefined>(undefined);\n\n /** Current list of configured data sources. */\n @Input()\n get value(): Array<IReportDataSources> | undefined {\n return this.#value();\n }\n set value(value: Array<IReportDataSources> | undefined) {\n if (this.#value() === value) {\n return;\n }\n this.#value.set(value);\n this.stateChanges.next();\n }\n\n // Mirror of the plain `editorConfig` member, so the template reacts.\n readonly #editorConfig = signal<ElementEditorInnerSectionElementInterface | undefined>(\n undefined,\n );\n\n /** Editor configuration supplying postman / workflow option providers. */\n @Input()\n get editorConfig(): ElementEditorInnerSectionElementInterface | undefined {\n return this.#editorConfig();\n }\n set editorConfig(config: ElementEditorInnerSectionElementInterface | undefined) {\n this.#editorConfig.set(config);\n }\n\n /** All available form inputs the user can map a required input to. */\n readonly formInputs = input<Array<FormColumnInputs>>([]);\n\n /** Emits the mutated data-source list whenever the user adds or removes a source. */\n readonly valueChange = output<Array<IReportDataSources> | undefined>();\n\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n readonly #elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Source-type enum, exposed to the template. */\n protected readonly dataSources = DataSources;\n\n /** The selectable source types in the chip selector. */\n protected readonly dataSourceOptions: DataSourceOption[] = [\n { label: 'API', value: DataSources.Api },\n { label: 'MongoDB', value: DataSources.MongoDb },\n ];\n\n /** The in-edit draft, or `undefined` when the editor card is closed. */\n protected readonly draft = signal<DataSourceDraft | undefined>(undefined);\n\n /** Decorated rows for the configured-source list. */\n protected readonly rows = computed<readonly DataSourceRow[]>(() =>\n (this.#value() ?? []).map((source, index) => ({\n source,\n name: this.#name(source, index),\n icon: source.source === DataSources.Api ? 'api' : 'storage',\n endpoint: this.#endpoint(source),\n isApi: source.source === DataSources.Api,\n })),\n );\n\n /** Whether any data source is configured. */\n protected readonly hasSources = computed<boolean>(() => (this.#value() ?? []).length > 0);\n\n /** The `minimumInputRequired` list of the draft's API config, or `undefined`. */\n protected readonly draftMinimumInputRequired = computed<\n readonly MinimumInputRequiredInterface[] | undefined\n >(() => {\n const config = this.draft()?.config;\n if (!config || !this.#isApiConfig(config)) {\n return undefined;\n }\n return config.backEndConfig?.minimumInputRequired;\n });\n\n // ---- MatFormFieldControl getters (read during the framework's CD) --------\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 const el = this.#elementRef.nativeElement;\n const control = el.querySelector('.lib-data-source-picker__list');\n control?.setAttribute('aria-describedby', this.describedBy);\n this.stateChanges.next();\n }\n\n onContainerClick(): void {\n this.markAsTouched();\n if (!this.focused) {\n this.focused = true;\n }\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 // ---- Draft editing -------------------------------------------------------\n\n /** Open the editor card with an empty draft. */\n protected startEditing(): void {\n this.draft.set({});\n }\n\n /** Discard the draft and close the editor card. */\n protected cancelEditing(): void {\n this.draft.set(undefined);\n }\n\n /** Set the draft's source type. Child chip editor emits an unknown payload. */\n protected sourceTypeChanged(source: unknown): void {\n this.draft.update((current) =>\n current ? { ...current, source: source as DataSources | undefined } : current,\n );\n }\n\n /** Set the draft's source config (API setup or pipeline). */\n protected sourceConfigChanged(\n config: APIDataFetchingConfigurationInterface | MongoDbPipeLineConfigInterface | undefined,\n ): void {\n this.draft.update((current) => (current ? { ...current, config } : current));\n }\n\n /** Merge the required-input list into the draft's API config. */\n protected minimumInputRequiredValueChanged(\n value: Array<MinimumInputRequiredInterface>,\n ): void {\n this.draft.update((current) => {\n if (!current?.config || !this.#isApiConfig(current.config)) {\n return current;\n }\n const config: APIDataFetchingConfigurationInterface = {\n ...current.config,\n backEndConfig: { ...current.config.backEndConfig, minimumInputRequired: value },\n };\n return { ...current, config };\n });\n }\n\n /** Commit the draft as a new source (assigning a fresh id) and emit. */\n protected saveNewSource(): void {\n const current = this.draft();\n if (!current) {\n return;\n }\n const data: IReportDataSources = { ...current, id: crypto.randomUUID() } as IReportDataSources;\n const next = [...(this.#value() ?? []), data];\n this.value = next;\n this.draft.set(undefined);\n this.markAsTouched();\n this.valueChange.emit(next);\n }\n\n /** Remove a configured source by id and emit. */\n protected removeSource(source: IReportDataSources): void {\n const current = this.#value();\n if (!current) {\n return;\n }\n const next = current.filter((item) => item.id !== source.id);\n this.value = next;\n this.markAsTouched();\n this.valueChange.emit(next);\n }\n\n #name(value: IReportDataSources, index: number): string {\n if (this.#isApiConfig(value.config) && value.config.name) {\n return value.config.name;\n }\n return value.source === DataSources.Api ? `API ${index + 1}` : `MongoDB ${index + 1}`;\n }\n\n #endpoint(value: IReportDataSources): string {\n if (this.#isApiConfig(value.config)) {\n return value.config.httpEndPoint ?? '';\n }\n return value.config.workflowId ?? '';\n }\n\n #isApiConfig(\n config: APIDataFetchingConfigurationInterface | MongoDbPipeLineConfigInterface | undefined,\n ): config is APIDataFetchingConfigurationInterface {\n return config?.source === DataSources.Api;\n }\n}\n","<div class=\"lib-data-source-picker__list\">\n @if (hasSources()) {\n <mat-list class=\"lib-data-source-picker__sources\">\n @for (row of rows(); track row.source.id) {\n <mat-list-item\n class=\"lib-data-source-picker__source\"\n matTooltipPosition=\"before\"\n [matTooltip]=\"row.source.source + ' ' + row.endpoint\">\n <mat-icon\n matListItemIcon\n class=\"lib-data-source-picker__icon\"\n [class.lib-data-source-picker__icon--api]=\"row.isApi\">\n {{ row.icon }}\n </mat-icon>\n <span matListItemTitle class=\"lib-data-source-picker__name\">{{ row.name }}</span>\n <span matListItemLine class=\"lib-data-source-picker__endpoint\">{{ row.endpoint }}</span>\n <button\n matListItemMeta\n mat-icon-button\n type=\"button\"\n [attr.aria-label]=\"'Remove ' + row.name\"\n [disabled]=\"disabled\"\n (click)=\"removeSource(row.source)\">\n <mat-icon>delete</mat-icon>\n </button>\n </mat-list-item>\n }\n </mat-list>\n } @else {\n <lib-empty-state icon=\"storage\" message=\"No data sources configured. Add one to get started.\" />\n }\n</div>\n\n@if (draft(); as draft) {\n <mat-card appearance=\"outlined\" class=\"lib-data-source-picker__editor\">\n <mat-card-content>\n <label [attr.for]=\"id + '-type'\" class=\"lib-data-source-picker__label\">Select source type</label>\n <lib-mat-chip-list-editor\n [id]=\"id + '-type'\"\n [value]=\"draft.source\"\n [options]=\"dataSourceOptions\"\n (valueChange)=\"sourceTypeChanged($event)\" />\n\n @if (draft.source !== undefined) {\n @switch (draft.source) {\n @case (dataSources.Api) {\n <label [attr.for]=\"id + '-api'\" class=\"lib-data-source-picker__label\">Select API</label>\n <lib-rest-api-call-setup\n [id]=\"id + '-api'\"\n [postmanCollectionConfig]=\"editorConfig?.postmanCollectionConfig\"\n [httpGetDataFunction]=\"editorConfig?.httpGetDataFunction\"\n [value]=\"$any(draft.config)\"\n (valueChanged)=\"sourceConfigChanged($event)\" />\n\n @if (draftMinimumInputRequired(); as minimumInputRequired) {\n <lib-required-inputs\n [id]=\"id + '-required-inputs'\"\n [formInputs]=\"formInputs() || []\"\n [value]=\"minimumInputRequired\"\n [errors]=\"[]\"\n (valueChanged)=\"minimumInputRequiredValueChanged($event)\" />\n }\n }\n @case (dataSources.MongoDb) {\n <label [attr.for]=\"id + '-pipeline'\" class=\"lib-data-source-picker__label\">Add a MongoDB pipeline</label>\n <lib-pipeline-generator\n [id]=\"id + '-pipeline'\"\n [value]=\"$any(draft.config)\"\n [getWorkflowOptions]=\"editorConfig?.getWorkflowOptions\"\n (valueChanged)=\"sourceConfigChanged($event)\" />\n }\n }\n }\n </mat-card-content>\n\n <mat-card-actions class=\"lib-data-source-picker__actions\">\n <button mat-flat-button color=\"primary\" type=\"button\" (click)=\"saveNewSource()\">Save source</button>\n <span class=\"lib-data-source-picker__spacer\"></span>\n <button mat-button color=\"warn\" type=\"button\" (click)=\"cancelEditing()\">Cancel</button>\n </mat-card-actions>\n </mat-card>\n} @else {\n <button\n mat-stroked-button\n color=\"primary\"\n type=\"button\"\n class=\"lib-data-source-picker__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BA1BrC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wBAAwB,EAAA,OAAA,EACzB;wBACP,eAAe;wBACf,aAAa;wBACb,aAAa;wBACb,aAAa;wBACb,gBAAgB;wBAChB,mBAAmB;wBACnB,0BAA0B;wBAC1B,0BAA0B;wBAC1B,uBAAuB;wBACvB,yBAAyB;AAC1B,qBAAA,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,QAAQ,EAAA,SAAA,EAC9B,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,yBAA2B,EAAE,CAAC,EAAA,IAAA,EAC/E;AACJ,wBAAA,OAAO,EAAE,wBAAwB;AACjC,wBAAA,WAAW,EAAE,IAAI;AACjB,wBAAA,yCAAyC,EAAE,SAAS;AACpD,wBAAA,0CAA0C,EAAE,UAAU;AACvD,qBAAA,EAAA,QAAA,EAAA,2uHAAA,EAAA,MAAA,EAAA,CAAA,4lCAAA,CAAA,EAAA;;sBAsBA;;sBAIA;;sBAaA;;sBAkBA;;;;;"}
|
|
@@ -13,7 +13,7 @@ import * as i1$1 from '@angular/material/button';
|
|
|
13
13
|
import { MatButtonModule } from '@angular/material/button';
|
|
14
14
|
import * as i5 from '@angular/material/tooltip';
|
|
15
15
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
16
|
-
import { B as BaseCustomInput, q as getInputErrorMessage, u as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-
|
|
16
|
+
import { B as BaseCustomInput, q as getInputErrorMessage, u as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-CW8jN83w.mjs';
|
|
17
17
|
import * as i2 from '@angular/material/input';
|
|
18
18
|
import { MatInputModule } from '@angular/material/input';
|
|
19
19
|
|
|
@@ -82,4 +82,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
82
82
|
}], propDecorators: { inputConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputConfig", required: true }] }], formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: true }] }], reload: [{ type: i0.Output, args: ["reload"] }] } });
|
|
83
83
|
|
|
84
84
|
export { DatePickerInputElementComponent };
|
|
85
|
-
//# sourceMappingURL=ngx-t-forms-date-picker-input-element.component-
|
|
85
|
+
//# sourceMappingURL=ngx-t-forms-date-picker-input-element.component-DJnHqSfk.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-date-picker-input-element.component-C0uhrM_l.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/date-picker-input-element/core/date-picker-reactive-input/date-picker-reactive-input.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/date-picker-input-element/core/date-picker-reactive-input/date-picker-reactive-input.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/date-picker-input-element/date-picker-input-element.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/date-picker-input-element/date-picker-input-element.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ElementRef, inject, input } from '@angular/core';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\nimport { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { NgControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatDatepicker, MatDatepickerInputEvent, MatDatepickerModule } from '@angular/material/datepicker';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\n\r\nconst customInputConfig: BaseCustomInputConfig = {\r\n controlType: 'lib-auto-complet-reactive-input',\r\n nextId: 0\r\n};\r\n\r\n@Component({\r\n selector: 'lib-date-picker-reactive-input',\r\n imports: [\r\n MatDatepickerModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n ReactiveFormsModule\r\n ],\r\n host: {\r\n '[class.floating]': 'shouldLabelFloat',\r\n '[id]': 'id',\r\n },\r\n providers: [{ provide: MatFormFieldControl, useExisting: DatePickerReactiveInputComponent }],\r\n templateUrl: './date-picker-reactive-input.component.html',\r\n styleUrl: './date-picker-reactive-input.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class DatePickerReactiveInputComponent extends BaseCustomInput<Date> {\r\n readonly picker = input.required<MatDatepicker<unknown>>();\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n\r\n constructor() {\r\n super(\r\n inject(NgControl, { optional: true, self: true }) as NgControl,\r\n inject<ElementRef<HTMLElement>>(ElementRef),\r\n customInputConfig\r\n );\r\n }\r\n\r\n override get empty(): boolean {\r\n const n = this.value;\r\n // Check for null, undefined, or empty string, but allow 0\r\n return n === null || n === undefined || (n as unknown) === '';\r\n }\r\n\r\n override get shouldLabelFloat(): boolean {\r\n return true;\r\n }\r\n\r\n protected changed(event: MatDatepickerInputEvent<unknown, unknown>): void {\r\n this.value = event.value as Date | null;\r\n this.stateChanges.next();\r\n this.onChange(this.value);\r\n }\r\n}\r\n","<input\r\n[required]=\"inputConfig().required\"\r\n[disabled]=\"inputConfig().disabled || inputConfig().readonly\"\r\n[min]=\"inputConfig().min\"\r\n(dateChange)=\"changed($event)\"\r\n[value]=\"value\"\r\n[max]=\"inputConfig().max\" matInput\r\n[matDatepicker]=\"picker()\" />\r\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { provideNativeDateAdapter } from '@angular/material/core';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatDatepickerModule } from '@angular/material/datepicker';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport type { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { DatePickerReactiveInputComponent } from './core/date-picker-reactive-input/date-picker-reactive-input.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\n\r\n/** Wraps a reactive date-picker control inside a `mat-form-field`. */\r\n@Component({\r\n selector: 'lib-date-picker-input-element',\r\n templateUrl: './date-picker-input-element.component.html',\r\n styleUrl: './date-picker-input-element.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [provideNativeDateAdapter()],\r\n imports: [\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n MatDatepickerModule,\r\n TFormInputStatusComponent,\r\n DatePickerReactiveInputComponent,\r\n ],\r\n})\r\nexport class DatePickerInputElementComponent {\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n readonly formGroup = input.required<FormGroup>();\r\n readonly reload = output<void>();\r\n\r\n protected readonly errorMessage = computed(() =>\r\n getInputErrorMessage(this.inputConfig(), this.formGroup()),\r\n );\r\n}\r\n","<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n <lib-date-picker-reactive-input\r\n [inputConfig]=\"inputConfig\"\r\n [required]=\"inputConfig.required\"\r\n [formControlName]=\"inputConfig.id\"\r\n [picker]=\"picker\"\r\n ></lib-date-picker-reactive-input>\r\n\r\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker>\r\n <button mat-button matDatepickerCancel>Cancel</button>\r\n <button mat-raised-button color=\"primary\" matDatepickerApply>Apply</button>\r\n </mat-datepicker>\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.suffixIcon) {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n"],"names":["i4"],"mappings":";;;;;;;;;;;;;;;;;;;AASA,MAAM,iBAAiB,GAA0B;AAC/C,IAAA,WAAW,EAAE,iCAAiC;AAC9C,IAAA,MAAM,EAAE;CACT;AAmBK,MAAO,gCAAiC,SAAQ,eAAqB,CAAA;AAIzE,IAAA,WAAA,GAAA;QACE,KAAK,CACH,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAA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uB,CAAC,MAAM,aACpC,CAAC,wBAAwB,EAAE,CAAC,EAAA,OAAA,EAC9B;wBACP,mBAAmB;wBACnB,kBAAkB;wBAClB,aAAa;wBACb,eAAe;wBACf,gBAAgB;wBAChB,mBAAmB;wBACnB,yBAAyB;wBACzB,gCAAgC;AACjC,qBAAA,EAAA,QAAA,EAAA,4/EAAA,EAAA,MAAA,EAAA,CAAA,oJAAA,CAAA,EAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-date-picker-input-element.component-DJnHqSfk.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/date-picker-input-element/core/date-picker-reactive-input/date-picker-reactive-input.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/date-picker-input-element/core/date-picker-reactive-input/date-picker-reactive-input.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/date-picker-input-element/date-picker-input-element.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/date-picker-input-element/date-picker-input-element.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ElementRef, inject, input } from '@angular/core';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\nimport { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { NgControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatDatepicker, MatDatepickerInputEvent, MatDatepickerModule } from '@angular/material/datepicker';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\n\r\nconst customInputConfig: BaseCustomInputConfig = {\r\n controlType: 'lib-auto-complet-reactive-input',\r\n nextId: 0\r\n};\r\n\r\n@Component({\r\n selector: 'lib-date-picker-reactive-input',\r\n imports: [\r\n MatDatepickerModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n ReactiveFormsModule\r\n ],\r\n host: {\r\n '[class.floating]': 'shouldLabelFloat',\r\n '[id]': 'id',\r\n },\r\n providers: [{ provide: MatFormFieldControl, useExisting: DatePickerReactiveInputComponent }],\r\n templateUrl: './date-picker-reactive-input.component.html',\r\n styleUrl: './date-picker-reactive-input.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class DatePickerReactiveInputComponent extends BaseCustomInput<Date> {\r\n readonly picker = input.required<MatDatepicker<unknown>>();\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n\r\n constructor() {\r\n super(\r\n inject(NgControl, { optional: true, self: true }) as NgControl,\r\n inject<ElementRef<HTMLElement>>(ElementRef),\r\n customInputConfig\r\n );\r\n }\r\n\r\n override get empty(): boolean {\r\n const n = this.value;\r\n // Check for null, undefined, or empty string, but allow 0\r\n return n === null || n === undefined || (n as unknown) === '';\r\n }\r\n\r\n override get shouldLabelFloat(): boolean {\r\n return true;\r\n }\r\n\r\n protected changed(event: MatDatepickerInputEvent<unknown, unknown>): void {\r\n this.value = event.value as Date | null;\r\n this.stateChanges.next();\r\n this.onChange(this.value);\r\n }\r\n}\r\n","<input\r\n[required]=\"inputConfig().required\"\r\n[disabled]=\"inputConfig().disabled || inputConfig().readonly\"\r\n[min]=\"inputConfig().min\"\r\n(dateChange)=\"changed($event)\"\r\n[value]=\"value\"\r\n[max]=\"inputConfig().max\" matInput\r\n[matDatepicker]=\"picker()\" />\r\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { provideNativeDateAdapter } from '@angular/material/core';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatDatepickerModule } from '@angular/material/datepicker';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport type { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { DatePickerReactiveInputComponent } from './core/date-picker-reactive-input/date-picker-reactive-input.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\n\r\n/** Wraps a reactive date-picker control inside a `mat-form-field`. */\r\n@Component({\r\n selector: 'lib-date-picker-input-element',\r\n templateUrl: './date-picker-input-element.component.html',\r\n styleUrl: './date-picker-input-element.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [provideNativeDateAdapter()],\r\n imports: [\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n MatDatepickerModule,\r\n TFormInputStatusComponent,\r\n DatePickerReactiveInputComponent,\r\n ],\r\n})\r\nexport class DatePickerInputElementComponent {\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n readonly formGroup = input.required<FormGroup>();\r\n readonly reload = output<void>();\r\n\r\n protected readonly errorMessage = computed(() =>\r\n getInputErrorMessage(this.inputConfig(), this.formGroup()),\r\n );\r\n}\r\n","<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n <lib-date-picker-reactive-input\r\n [inputConfig]=\"inputConfig\"\r\n [required]=\"inputConfig.required\"\r\n [formControlName]=\"inputConfig.id\"\r\n [picker]=\"picker\"\r\n ></lib-date-picker-reactive-input>\r\n\r\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker>\r\n <button mat-button matDatepickerCancel>Cancel</button>\r\n <button mat-raised-button color=\"primary\" matDatepickerApply>Apply</button>\r\n </mat-datepicker>\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.suffixIcon) {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n"],"names":["i4"],"mappings":";;;;;;;;;;;;;;;;;;;AASA,MAAM,iBAAiB,GAA0B;AAC/C,IAAA,WAAW,EAAE,iCAAiC;AAC9C,IAAA,MAAM,EAAE;CACT;AAmBK,MAAO,gCAAiC,SAAQ,eAAqB,CAAA;AAIzE,IAAA,WAAA,GAAA;QACE,KAAK,CACH,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAc,EAC9D,MAAM,CAA0B,U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EAAE,CAAC,EAAA,OAAA,EAC9B;wBACP,mBAAmB;wBACnB,kBAAkB;wBAClB,aAAa;wBACb,eAAe;wBACf,gBAAgB;wBAChB,mBAAmB;wBACnB,yBAAyB;wBACzB,gCAAgC;AACjC,qBAAA,EAAA,QAAA,EAAA,4/EAAA,EAAA,MAAA,EAAA,CAAA,oJAAA,CAAA,EAAA;;;;;"}
|
|
@@ -13,7 +13,7 @@ import * as i1$1 from '@angular/material/button';
|
|
|
13
13
|
import { MatButtonModule } from '@angular/material/button';
|
|
14
14
|
import * as i5 from '@angular/material/tooltip';
|
|
15
15
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
16
|
-
import { B as BaseCustomInput, q as getInputErrorMessage, u as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-
|
|
16
|
+
import { B as BaseCustomInput, q as getInputErrorMessage, u as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-CW8jN83w.mjs';
|
|
17
17
|
import { MatInputModule } from '@angular/material/input';
|
|
18
18
|
|
|
19
19
|
const customInputConfig = {
|
|
@@ -153,4 +153,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
153
153
|
}], propDecorators: { inputConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputConfig", required: true }] }], formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: true }] }], reload: [{ type: i0.Output, args: ["reload"] }] } });
|
|
154
154
|
|
|
155
155
|
export { DateRangePickerInputElementComponent };
|
|
156
|
-
//# sourceMappingURL=ngx-t-forms-date-range-picker-input-element.component-
|
|
156
|
+
//# sourceMappingURL=ngx-t-forms-date-range-picker-input-element.component-Iw5Sou7u.mjs.map
|