ngx-t-forms 2.0.29 → 2.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ngx-t-forms-auto-complete-input-element.component-DCKuXHAW.mjs +104 -0
- package/fesm2022/ngx-t-forms-auto-complete-input-element.component-DCKuXHAW.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-basic-input-input-element.component-Ce4ipSUc.mjs +85 -0
- package/fesm2022/ngx-t-forms-basic-input-input-element.component-Ce4ipSUc.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-C5TPddVe.mjs +643 -0
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-C5TPddVe.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-CICQaqz6.mjs +97 -0
- package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-CICQaqz6.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-CzisLSIP.mjs +195 -0
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-CzisLSIP.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-data-source-picker.component-Dzz_o6fJ.mjs +261 -0
- package/fesm2022/ngx-t-forms-data-source-picker.component-Dzz_o6fJ.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-date-picker-input-element.component-CYUbVyzP.mjs +85 -0
- package/fesm2022/ngx-t-forms-date-picker-input-element.component-CYUbVyzP.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-CmoquQGV.mjs +156 -0
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-CmoquQGV.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-CLUOXreG.mjs +368 -0
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-CLUOXreG.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-document-picker.component-qObjcqhE.mjs +704 -0
- package/fesm2022/ngx-t-forms-document-picker.component-qObjcqhE.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-editor-input-element.component-BLXlfb6F.mjs +294 -0
- package/fesm2022/ngx-t-forms-editor-input-element.component-BLXlfb6F.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-editor-js-input.component-BQL0AH7H.mjs +240 -0
- package/fesm2022/ngx-t-forms-editor-js-input.component-BQL0AH7H.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-file-upload-input-element.component-C7mMeEjF.mjs +205 -0
- package/fesm2022/ngx-t-forms-file-upload-input-element.component-C7mMeEjF.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-form-input-selector.component-C9u8zq9B.mjs +86 -0
- package/fesm2022/ngx-t-forms-form-input-selector.component-C9u8zq9B.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-form-json-view.component-856Hx1Bg.mjs +22 -0
- package/fesm2022/ngx-t-forms-form-json-view.component-856Hx1Bg.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-form-payload-projection.component-CDkTuX9S.mjs +179 -0
- package/fesm2022/ngx-t-forms-form-payload-projection.component-CDkTuX9S.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-form-section-stepper.component-Bs50-nEB.mjs +319 -0
- package/fesm2022/ngx-t-forms-form-section-stepper.component-Bs50-nEB.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-qrhM0jGL.mjs +379 -0
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-qrhM0jGL.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-geo-location.component-Bosp1UzR.mjs +124 -0
- package/fesm2022/ngx-t-forms-geo-location.component-Bosp1UzR.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-getInputIcon-B4ADgevZ.mjs +31 -0
- package/fesm2022/ngx-t-forms-getInputIcon-B4ADgevZ.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-image-capture-input-element.component-C1g7Z0cK.mjs +180 -0
- package/fesm2022/ngx-t-forms-image-capture-input-element.component-C1g7Z0cK.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-index-dDSobs6A.mjs +2 -0
- package/fesm2022/ngx-t-forms-index-dDSobs6A.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-input-custom.component-BkbHFAyR.mjs +105 -0
- package/fesm2022/ngx-t-forms-input-custom.component-BkbHFAyR.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-input-editor.component-BPUOM9kQ.mjs +181 -0
- package/fesm2022/ngx-t-forms-input-editor.component-BPUOM9kQ.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-CbdW82su.mjs → ngx-t-forms-map-mat-options-keys-B6hJ7Io5.mjs} +12 -14
- package/fesm2022/ngx-t-forms-map-mat-options-keys-B6hJ7Io5.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-c7uZT1sr.mjs +66 -0
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-c7uZT1sr.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-mat-slider-editor.component-CTSBrM-j.mjs +211 -0
- package/fesm2022/ngx-t-forms-mat-slider-editor.component-CTSBrM-j.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-CcYiwx-8.mjs +165 -0
- package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-CcYiwx-8.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-missing-form-configs.component-DrnH8qdG.mjs +38 -0
- package/fesm2022/ngx-t-forms-missing-form-configs.component-DrnH8qdG.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-C_abEBQ5.mjs +38 -0
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-C_abEBQ5.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-mscoa-error-display.component-99DpVSy7.mjs +126 -0
- package/fesm2022/ngx-t-forms-mscoa-error-display.component-99DpVSy7.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-C0qsMfsq.mjs +336 -0
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-C0qsMfsq.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-B1Z-IXSL.mjs +74 -0
- package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-B1Z-IXSL.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-C7y1OGPx.mjs +905 -0
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-C7y1OGPx.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-ngx-t-forms-u_kigDid.mjs +19461 -0
- package/fesm2022/ngx-t-forms-ngx-t-forms-u_kigDid.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-paginated-selection-table-AQZSMmhr.mjs +555 -0
- package/fesm2022/ngx-t-forms-paginated-selection-table-AQZSMmhr.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-pipeline-generator.component-DmNSc5aw.mjs +748 -0
- package/fesm2022/ngx-t-forms-pipeline-generator.component-DmNSc5aw.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-record-list-manager.component-CUMMvMch.mjs +358 -0
- package/fesm2022/ngx-t-forms-record-list-manager.component-CUMMvMch.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-required-inputs.component-Ch2yNcIS.mjs +272 -0
- package/fesm2022/ngx-t-forms-required-inputs.component-Ch2yNcIS.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-C_aFtdvW.mjs +398 -0
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-C_aFtdvW.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-search-field.component-B2ZO7lqO.mjs +38 -0
- package/fesm2022/ngx-t-forms-search-field.component-B2ZO7lqO.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-section-report.component-BxOhR6C0.mjs +98 -0
- package/fesm2022/ngx-t-forms-section-report.component-BxOhR6C0.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-select-input-element.component-DbgZdNoe.mjs +150 -0
- package/fesm2022/ngx-t-forms-select-input-element.component-DbgZdNoe.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-selection-options-editor.component-Dhln81DL.mjs +169 -0
- package/fesm2022/ngx-t-forms-selection-options-editor.component-Dhln81DL.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-leBokXvM.mjs +204 -0
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-leBokXvM.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-textarea-input-element.component-BEbXJjFA.mjs +95 -0
- package/fesm2022/ngx-t-forms-textarea-input-element.component-BEbXJjFA.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-toggle-input-element.component-DDErRUJd.mjs +82 -0
- package/fesm2022/ngx-t-forms-toggle-input-element.component-DDErRUJd.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-validators-config.component-oGjQVGE2.mjs +733 -0
- package/fesm2022/ngx-t-forms-validators-config.component-oGjQVGE2.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-CtU8dECN.mjs +1303 -0
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-CtU8dECN.mjs.map +1 -0
- package/fesm2022/ngx-t-forms.mjs +2 -1
- package/fesm2022/ngx-t-forms.mjs.map +1 -1
- package/package.json +20 -18
- package/styles/_editor-mixins.scss +62 -0
- package/styles/_json-editor-syntax.scss +26 -0
- package/styles/_signature-pad.scss +26 -0
- package/styles/_tokens.scss +148 -0
- package/types/ngx-t-forms.d.ts +1767 -621
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-D-SBMdYg.mjs +0 -313
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-D-SBMdYg.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-1cpszpPN.mjs +0 -191
- package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-1cpszpPN.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-DFdAVWTg.mjs +0 -207
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-DFdAVWTg.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-data-source-picker.component-DxORinAD.mjs +0 -204
- package/fesm2022/ngx-t-forms-data-source-picker.component-DxORinAD.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-DcWS1txl.mjs +0 -289
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-DcWS1txl.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-form-input-selector.component-B2QEnvkq.mjs +0 -134
- package/fesm2022/ngx-t-forms-form-input-selector.component-B2QEnvkq.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-form-json-view.component-DePf44w6.mjs +0 -22
- package/fesm2022/ngx-t-forms-form-json-view.component-DePf44w6.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-form-section-stepper.component-BTkcSjg7.mjs +0 -270
- package/fesm2022/ngx-t-forms-form-section-stepper.component-BTkcSjg7.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-Wamzf_sq.mjs +0 -345
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-Wamzf_sq.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-input-editor.component-D4xHO76K.mjs +0 -147
- package/fesm2022/ngx-t-forms-input-editor.component-D4xHO76K.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-map-mat-options-keys-CbdW82su.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-DmTyO9Wi.mjs +0 -105
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-DmTyO9Wi.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mat-slider-editor.component-DZ4TenrI.mjs +0 -109
- package/fesm2022/ngx-t-forms-mat-slider-editor.component-DZ4TenrI.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-DPyBYE4p.mjs +0 -155
- package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-DPyBYE4p.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-missing-form-configs.component-BRmnwAK6.mjs +0 -28
- package/fesm2022/ngx-t-forms-missing-form-configs.component-BRmnwAK6.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-D_umeAPL.mjs +0 -43
- package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-D_umeAPL.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-error-display.component-CSX2NCNU.mjs +0 -116
- package/fesm2022/ngx-t-forms-mscoa-error-display.component-CSX2NCNU.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-B6IF8kGg.mjs +0 -296
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-B6IF8kGg.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-BPkjsRmH.mjs +0 -83
- package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-BPkjsRmH.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-D9qmig6g.mjs +0 -16844
- package/fesm2022/ngx-t-forms-ngx-t-forms-D9qmig6g.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-pipeline-generator.component-DBJEyCbd.mjs +0 -613
- package/fesm2022/ngx-t-forms-pipeline-generator.component-DBJEyCbd.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-record-list-manager.component-Dgs9lNSr.mjs +0 -269
- package/fesm2022/ngx-t-forms-record-list-manager.component-Dgs9lNSr.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-required-inputs.component-CSIJvSHq.mjs +0 -190
- package/fesm2022/ngx-t-forms-required-inputs.component-CSIJvSHq.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-CY-JSkGs.mjs +0 -291
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-CY-JSkGs.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-section-report.component-12-KdKT6.mjs +0 -156
- package/fesm2022/ngx-t-forms-section-report.component-12-KdKT6.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-selection-options-editor.component-Be3QAG_L.mjs +0 -186
- package/fesm2022/ngx-t-forms-selection-options-editor.component-Be3QAG_L.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-a4f1r8gH.mjs +0 -187
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-a4f1r8gH.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-validators-config.component-B3j9Dmgu.mjs +0 -215
- package/fesm2022/ngx-t-forms-validators-config.component-B3j9Dmgu.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-image-capture-input-element.component-C1g7Z0cK.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/file-upload-input-element/core/file-uploader/camera-functions.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/image-capture-input-element/core/camera-capture/camera-capture.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/image-capture-input-element/core/camera-capture/camera-capture.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/image-capture-input-element/image-capture-input-element.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/image-capture-input-element/image-capture-input-element.component.html"],"sourcesContent":["// Image capture\r\n\r\nimport { AbstractControl, ValidationErrors } from \"@angular/forms\";\r\nimport { FileUploadInputValueInterface } from \"ngx-t-forms-types\";\r\n\r\n\r\nexport async function setupDevices(\r\n cameraCallback: (stream: MediaStream) => void\r\n): Promise<MediaStream | string | unknown | undefined> {\r\n // SSR guard (Trap 14): free helper has no DI context. Returning `undefined`\r\n // matches the existing \"no media device\" branch — caller contract preserved.\r\n if (typeof navigator === 'undefined') return undefined;\r\n\r\n if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {\r\n try {\r\n const stream = await navigator.mediaDevices.getUserMedia({\r\n video: true,\r\n });\r\n if (stream) {\r\n cameraCallback(stream);\r\n return stream;\r\n } else {\r\n return 'You have no output video device';\r\n }\r\n } catch (e) {\r\n return e;\r\n }\r\n }\r\n return undefined;\r\n}\r\n\r\n\r\nexport function fileUploaderValidator(control: AbstractControl): ValidationErrors | null {\r\n // Implement your validation logic here\r\n const file: FileUploadInputValueInterface= control.value;\r\n\r\n // Example validation: Check if file is provided\r\n if (!file || !file.base64) {\r\n return { requiredFile: 'You must upload a file.' };\r\n }\r\n\r\n // Add more validation logic as needed\r\n // ...\r\n\r\n return null; // Return null if no validation errors\r\n}","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n PLATFORM_ID,\r\n inject,\r\n input,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { NgControl } from '@angular/forms';\r\nimport { isPlatformBrowser } from '@angular/common';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatToolbarModule } from '@angular/material/toolbar';\r\nimport { MatButtonModule } from '@angular/material/button';\r\n\r\nimport { FileUploadInputValueInterface, IFileUploadInput, ITowerStepColumn } from 'ngx-t-forms-types';\r\n\r\nimport { setupDevices } from '../../../file-upload-input-element/core/file-uploader/camera-functions';\r\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\n\r\nconst customInputConfig: BaseCustomInputConfig = {\r\n controlType: 'app-camera-capture',\r\n nextId: 0,\r\n};\r\n\r\n@Component({\r\n selector: 'lib-camera-capture',\r\n templateUrl: './camera-capture.component.html',\r\n styleUrls: ['./camera-capture.component.scss'],\r\n imports: [MatIconModule, MatToolbarModule, MatButtonModule],\r\n providers: [{ provide: MatFormFieldControl, useExisting: CameraCaptureComponent }],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class CameraCaptureComponent extends BaseCustomInput<FileUploadInputValueInterface | object | null> {\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n\r\n protected readonly video = viewChild.required<ElementRef<HTMLVideoElement>>('video');\r\n protected readonly canvas = viewChild.required<ElementRef<HTMLCanvasElement>>('canvas');\r\n\r\n protected readonly WIDTH = 640;\r\n protected readonly HEIGHT = 480;\r\n protected captures: string[] = [];\r\n protected isCaptured = false;\r\n protected videoMode = false;\r\n\r\n readonly #platformId = inject(PLATFORM_ID);\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 return !this.value;\r\n }\r\n\r\n override get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n protected recapture(): void {\r\n if (!isPlatformBrowser(this.#platformId)) return;\r\n const videoEl = this.video()?.nativeElement;\r\n if (!videoEl) return;\r\n videoEl.srcObject = null;\r\n this.isCaptured = false;\r\n setupDevices(this.setup);\r\n this.value = null;\r\n this.stateChanges.next();\r\n }\r\n\r\n protected readonly setup = (stream: MediaStream): void => {\r\n if (!isPlatformBrowser(this.#platformId)) return;\r\n const videoEl = this.video()?.nativeElement;\r\n if (!videoEl) return;\r\n try {\r\n videoEl.srcObject = stream;\r\n void videoEl.play();\r\n } catch {\r\n // Ignored: play() may reject if the element is detached or autoplay is blocked.\r\n }\r\n };\r\n\r\n protected touch(): void {\r\n this.markAsTouched();\r\n }\r\n\r\n protected capture(): void {\r\n if (!isPlatformBrowser(this.#platformId)) return;\r\n const videoEl = this.video()?.nativeElement;\r\n const canvasEl = this.canvas()?.nativeElement;\r\n if (!videoEl || !canvasEl) return;\r\n\r\n this.touch();\r\n this.drawImageToCanvas(videoEl);\r\n const fileType = (this.inputConfig() as IFileUploadInput | undefined)?.fileType;\r\n this.value = {\r\n fileName: new Date(),\r\n type: fileType,\r\n base64: canvasEl.toDataURL('image/png'),\r\n };\r\n\r\n this.captures.push(canvasEl.toDataURL('image/png'));\r\n this.isCaptured = true;\r\n this.stopVideo();\r\n this.onChange(this.value);\r\n this.stateChanges.next();\r\n }\r\n\r\n protected stopVideo(): void {\r\n if (!isPlatformBrowser(this.#platformId)) return;\r\n const videoEl = this.video()?.nativeElement;\r\n const src = videoEl?.srcObject;\r\n if (src && src instanceof MediaStream) {\r\n src.getTracks().forEach(track => track.stop());\r\n }\r\n }\r\n\r\n private drawImageToCanvas(image: HTMLVideoElement): void {\r\n if (!isPlatformBrowser(this.#platformId)) return;\r\n const canvasEl = this.canvas()?.nativeElement;\r\n const ctx = canvasEl?.getContext('2d');\r\n if (!ctx) return;\r\n ctx.drawImage(image, 0, 0, this.WIDTH, this.HEIGHT);\r\n }\r\n}\r\n","<br>\r\n<div class=\"video-container\">\r\n <video\r\n style=\"margin: auto;\"\r\n [style.display]=\"!isCaptured ? 'block' : 'none'\"\r\n #video\r\n id=\"video\"\r\n [width]=\"WIDTH\"\r\n [height]=\"HEIGHT\"\r\n autoplay\r\n ></video>\r\n <canvas\r\n [style.display]=\"isCaptured ? 'block' : 'none'\"\r\n #canvas\r\n id=\"canvas\"\r\n [width]=\"WIDTH\"\r\n [height]=\"HEIGHT\"\r\n ></canvas>\r\n</div>\r\n<mat-toolbar style=\"background: none;\">\r\n <span class=\"spacer\"></span>\r\n <button (click)=\"isCaptured ? recapture() : capture()\" [color]=\"isCaptured?'primary':'warn'\" mat-icon-button>\r\n <mat-icon>\r\n photo_camera\r\n </mat-icon>\r\n\r\n </button>\r\n @if (!isCaptured) {\r\n <button (click)=\"stopVideo()\" mat-icon-button>\r\n <mat-icon>\r\n stop\r\n </mat-icon>\r\n\r\n </button>\r\n }\r\n <span class=\"spacer\"></span>\r\n</mat-toolbar>\r\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\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 { CameraCaptureComponent } from './core/camera-capture/camera-capture.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\n\r\n/** Wraps the camera-capture control inside a `mat-form-field`. */\r\n@Component({\r\n selector: 'lib-image-capture-input-element',\r\n templateUrl: './image-capture-input-element.component.html',\r\n styleUrl: './image-capture-input-element.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n TFormInputStatusComponent,\r\n CameraCaptureComponent,\r\n ],\r\n})\r\nexport class ImageCaptureInputElementComponent {\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","<ng-container [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-camera-capture\r\n [required]=\"inputConfig.required\"\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n ></lib-camera-capture>\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.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.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\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</ng-container>\r\n"],"names":["i1","i3","i4","i5"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAMO,eAAe,YAAY,CAChC,cAA6C,EAAA;;;IAI7C,IAAI,OAAO,SAAS,KAAK,WAAW;AAAE,QAAA,OAAO,SAAS;IAEtD,IAAI,SAAS,CAAC,YAAY,IAAI,SAAS,CAAC,YAAY,CAAC,YAAY,EAAE;AACjE,QAAA,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,YAAY,CAAC,YAAY,CAAC;AACvD,gBAAA,KAAK,EAAE,IAAI;AACZ,aAAA,CAAC;YACF,IAAI,MAAM,EAAE;gBACV,cAAc,CAAC,MAAM,CAAC;AACtB,gBAAA,OAAO,MAAM;Y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AAA,CAAA;;4FAGb,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAf7C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iCAAiC,EAAA,eAAA,EAG1B,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,mBAAmB;wBACnB,kBAAkB;wBAClB,aAAa;wBACb,eAAe;wBACf,gBAAgB;wBAChB,yBAAyB;wBACzB,sBAAsB;AACvB,qBAAA,EAAA,QAAA,EAAA,ksEAAA,EAAA,MAAA,EAAA,CAAA,oJAAA,CAAA,EAAA;;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { o as DialogTemplateComponent, p as FormBuilderComponent, q as FormsComponent, M as MscoaFormInputComponent, S as SignatureInputElementComponent, T as TDynamicDataEditComponent, b as TDynamicDataViewComponent, r as TFormInputComponent, U as UserFormStepperComponent, V as ValidationExpressioCreatorComponent, u as getSignatureImage, t as testAgainstItem } from './ngx-t-forms-ngx-t-forms-u_kigDid.mjs';
|
|
2
|
+
//# sourceMappingURL=ngx-t-forms-index-dDSobs6A.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-index-dDSobs6A.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, DestroyRef, viewChild, forwardRef, Input, Optional, Self, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
5
|
+
import * as i2 from '@angular/material/input';
|
|
6
|
+
import { MatInputModule } from '@angular/material/input';
|
|
7
|
+
import { Subject, debounceTime } from 'rxjs';
|
|
8
|
+
import { B as BaseCustomInput } from './ngx-t-forms-ngx-t-forms-u_kigDid.mjs';
|
|
9
|
+
import * as i1 from '@angular/forms';
|
|
10
|
+
|
|
11
|
+
const customInputConfig = {
|
|
12
|
+
controlType: 'lib-input-custom',
|
|
13
|
+
nextId: 0,
|
|
14
|
+
};
|
|
15
|
+
class InputCustomComponent extends BaseCustomInput {
|
|
16
|
+
#destroyRef;
|
|
17
|
+
#debounceTimeMs;
|
|
18
|
+
#valueSubject;
|
|
19
|
+
constructor(ngControl, elementRef) {
|
|
20
|
+
super(ngControl, elementRef, customInputConfig);
|
|
21
|
+
this.#destroyRef = inject(DestroyRef);
|
|
22
|
+
this.#debounceTimeMs = 300;
|
|
23
|
+
this.#valueSubject = new Subject();
|
|
24
|
+
// The native input is left uncontrolled while the user types: binding the
|
|
25
|
+
// (debounced, therefore lagging) model to `[value]` made Angular overwrite the
|
|
26
|
+
// DOM mid-keystroke and drop characters during fast typing. We instead push the
|
|
27
|
+
// model to the DOM only on external writes (writeValue) — never while typing.
|
|
28
|
+
// TS `private` (not ES `#private`): Angular signal queries cannot sit on an ES-private field.
|
|
29
|
+
this.inputEl = viewChild('inputEl', ...(ngDevMode ? [{ debugName: "inputEl" }] : /* istanbul ignore next */ []));
|
|
30
|
+
}
|
|
31
|
+
get empty() {
|
|
32
|
+
const n = this.value;
|
|
33
|
+
// Check for null, undefined, or empty string, but allow 0
|
|
34
|
+
return n === null || n === undefined || n === '';
|
|
35
|
+
}
|
|
36
|
+
get shouldLabelFloat() {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
ngOnInit() {
|
|
40
|
+
this.#valueSubject
|
|
41
|
+
.pipe(debounceTime(this.#debounceTimeMs), takeUntilDestroyed(this.#destroyRef))
|
|
42
|
+
.subscribe((next) => {
|
|
43
|
+
// The base `value` setter guards on equality and fires onChange + stateChanges.
|
|
44
|
+
// Only the (heavier) form propagation + validation is debounced — never the display.
|
|
45
|
+
this.value = next;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
ngAfterViewInit() {
|
|
49
|
+
// Reflect any value the form set before the view existed (initial bind / patch).
|
|
50
|
+
this.#syncInputFromModel();
|
|
51
|
+
}
|
|
52
|
+
writeValue(value) {
|
|
53
|
+
super.writeValue(value);
|
|
54
|
+
// External model change (patchValue / reset) — push it to the DOM. This never
|
|
55
|
+
// runs in response to the user's own typing, so it can't clobber the cursor.
|
|
56
|
+
this.#syncInputFromModel();
|
|
57
|
+
}
|
|
58
|
+
onInputChange($event) {
|
|
59
|
+
const next = $event.target?.value ?? '';
|
|
60
|
+
this.#valueSubject.next(next);
|
|
61
|
+
}
|
|
62
|
+
#syncInputFromModel() {
|
|
63
|
+
const el = this.inputEl()?.nativeElement;
|
|
64
|
+
if (!el) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const v = this.value;
|
|
68
|
+
el.value = v === null || v === undefined ? '' : String(v);
|
|
69
|
+
}
|
|
70
|
+
onInputBlur($event) {
|
|
71
|
+
this.touched = true; // Mark as touched on blur
|
|
72
|
+
this.onTouched();
|
|
73
|
+
this.blur.emit($event);
|
|
74
|
+
}
|
|
75
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: InputCustomComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
76
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: InputCustomComponent, isStandalone: true, selector: "lib-input-custom", inputs: { inputConfig: "inputConfig" }, host: { properties: { "class.floating": "shouldLabelFloat", "id": "id" } }, providers: [
|
|
77
|
+
{
|
|
78
|
+
provide: MatFormFieldControl,
|
|
79
|
+
//:Note
|
|
80
|
+
useExisting: forwardRef(() => InputCustomComponent),
|
|
81
|
+
},
|
|
82
|
+
], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (inputConfig) {\r\n <input matInput\r\n #inputEl\r\n [readonly]=\"inputConfig.readonly || inputConfig.disabled\"\r\n (blur)=\"onInputBlur($event)\"\r\n [pattern]=\"inputConfig.pattern || ''\"\r\n [required]=\"inputConfig.required\"\r\n [attr.maxlength]=\"inputConfig.maxLength\"\r\n [type]=\"inputConfig.type || 'text'\"\r\n (input)=\"onInputChange($event)\"\r\n [attr.minlength]=\"inputConfig.minLength\"\r\n [autocomplete]=\"inputConfig.autocomplete\"\r\n [min]=\"inputConfig.min\"\r\n [max]=\"inputConfig.max\" />\r\n}\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
83
|
+
}
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: InputCustomComponent, decorators: [{
|
|
85
|
+
type: Component,
|
|
86
|
+
args: [{ selector: 'lib-input-custom', imports: [MatInputModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: {
|
|
87
|
+
'[class.floating]': 'shouldLabelFloat',
|
|
88
|
+
'[id]': 'id',
|
|
89
|
+
}, providers: [
|
|
90
|
+
{
|
|
91
|
+
provide: MatFormFieldControl,
|
|
92
|
+
//:Note
|
|
93
|
+
useExisting: forwardRef(() => InputCustomComponent),
|
|
94
|
+
},
|
|
95
|
+
], template: "@if (inputConfig) {\r\n <input matInput\r\n #inputEl\r\n [readonly]=\"inputConfig.readonly || inputConfig.disabled\"\r\n (blur)=\"onInputBlur($event)\"\r\n [pattern]=\"inputConfig.pattern || ''\"\r\n [required]=\"inputConfig.required\"\r\n [attr.maxlength]=\"inputConfig.maxLength\"\r\n [type]=\"inputConfig.type || 'text'\"\r\n (input)=\"onInputChange($event)\"\r\n [attr.minlength]=\"inputConfig.minLength\"\r\n [autocomplete]=\"inputConfig.autocomplete\"\r\n [min]=\"inputConfig.min\"\r\n [max]=\"inputConfig.max\" />\r\n}\r\n" }]
|
|
96
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
97
|
+
type: Optional
|
|
98
|
+
}, {
|
|
99
|
+
type: Self
|
|
100
|
+
}] }, { type: i0.ElementRef }], propDecorators: { inputConfig: [{
|
|
101
|
+
type: Input
|
|
102
|
+
}], inputEl: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }] } });
|
|
103
|
+
|
|
104
|
+
export { InputCustomComponent };
|
|
105
|
+
//# sourceMappingURL=ngx-t-forms-input-custom.component-BkbHFAyR.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-input-custom.component-BkbHFAyR.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/basic-input-input-element/core/input-custom/input-custom.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/basic-input-input-element/core/input-custom/input-custom.component.html"],"sourcesContent":["import {\r\n AfterViewInit,\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n ElementRef,\r\n Input,\r\n OnInit,\r\n Optional,\r\n Self,\r\n ViewEncapsulation,\r\n forwardRef,\r\n inject,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { Subject, debounceTime } from 'rxjs';\r\n\r\nimport {\r\n BaseCustomInput,\r\n BaseCustomInputConfig,\r\n} from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\n\r\nconst customInputConfig: BaseCustomInputConfig = {\r\n controlType: 'lib-input-custom',\r\n nextId: 0,\r\n};\r\n\r\n@Component({\r\n selector: 'lib-input-custom',\r\n imports: [MatInputModule],\r\n templateUrl: './input-custom.component.html',\r\n styleUrl: './input-custom.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: {\r\n '[class.floating]': 'shouldLabelFloat',\r\n '[id]': 'id',\r\n },\r\n providers: [\r\n {\r\n provide: MatFormFieldControl,\r\n //:Note\r\n useExisting: forwardRef(() => InputCustomComponent),\r\n },\r\n ],\r\n})\r\nexport class InputCustomComponent\r\n extends BaseCustomInput<string | number | Date>\r\n implements OnInit, AfterViewInit\r\n{\r\n // Kept as @Input() because BaseCustomInput exposes `required`/`disabled`/`placeholder`\r\n // as setter-backed @Input()s tied to MatFormFieldControl `stateChanges`. Keeping\r\n // `inputConfig` as a classic @Input keeps the imperative-setter ergonomic consistent\r\n // with the base class and avoids mixing signal + setter inputs on one component.\r\n @Input() inputConfig!: ITowerStepColumn;\r\n\r\n readonly #destroyRef = inject(DestroyRef);\r\n readonly #debounceTimeMs = 300;\r\n readonly #valueSubject = new Subject<string>();\r\n\r\n // The native input is left uncontrolled while the user types: binding the\r\n // (debounced, therefore lagging) model to `[value]` made Angular overwrite the\r\n // DOM mid-keystroke and drop characters during fast typing. We instead push the\r\n // model to the DOM only on external writes (writeValue) — never while typing.\r\n // TS `private` (not ES `#private`): Angular signal queries cannot sit on an ES-private field.\r\n private readonly inputEl = viewChild<ElementRef<HTMLInputElement>>('inputEl');\r\n\r\n constructor(\r\n @Optional() @Self() ngControl: NgControl,\r\n elementRef: ElementRef<HTMLElement>,\r\n ) {\r\n super(ngControl, elementRef, customInputConfig);\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 === '';\r\n }\r\n\r\n override get shouldLabelFloat(): boolean {\r\n return true;\r\n }\r\n\r\n ngOnInit(): void {\r\n this.#valueSubject\r\n .pipe(debounceTime(this.#debounceTimeMs), takeUntilDestroyed(this.#destroyRef))\r\n .subscribe((next) => {\r\n // The base `value` setter guards on equality and fires onChange + stateChanges.\r\n // Only the (heavier) form propagation + validation is debounced — never the display.\r\n this.value = next;\r\n });\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n // Reflect any value the form set before the view existed (initial bind / patch).\r\n this.#syncInputFromModel();\r\n }\r\n\r\n override writeValue(value: string | number | Date): void {\r\n super.writeValue(value);\r\n // External model change (patchValue / reset) — push it to the DOM. This never\r\n // runs in response to the user's own typing, so it can't clobber the cursor.\r\n this.#syncInputFromModel();\r\n }\r\n\r\n protected onInputChange($event: Event): void {\r\n const next = ($event.target as HTMLInputElement | null)?.value ?? '';\r\n this.#valueSubject.next(next);\r\n }\r\n\r\n #syncInputFromModel(): void {\r\n const el = this.inputEl()?.nativeElement;\r\n if (!el) {\r\n return;\r\n }\r\n const v = this.value;\r\n el.value = v === null || v === undefined ? '' : String(v);\r\n }\r\n\r\n protected onInputBlur($event: FocusEvent): void {\r\n this.touched = true; // Mark as touched on blur\r\n this.onTouched();\r\n this.blur.emit($event);\r\n }\r\n}\r\n","@if (inputConfig) {\r\n <input matInput\r\n #inputEl\r\n [readonly]=\"inputConfig.readonly || inputConfig.disabled\"\r\n (blur)=\"onInputBlur($event)\"\r\n [pattern]=\"inputConfig.pattern || ''\"\r\n [required]=\"inputConfig.required\"\r\n [attr.maxlength]=\"inputConfig.maxLength\"\r\n [type]=\"inputConfig.type || 'text'\"\r\n (input)=\"onInputChange($event)\"\r\n [attr.minlength]=\"inputConfig.minLength\"\r\n [autocomplete]=\"inputConfig.autocomplete\"\r\n [min]=\"inputConfig.min\"\r\n [max]=\"inputConfig.max\" />\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;AA2BA,MAAM,iBAAiB,GAA0B;AAC/C,IAAA,WAAW,EAAE,kBAAkB;AAC/B,IAAA,MAAM,EAAE,CAAC;CACV;AAqBK,MAAO,oBAC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;;;"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { isPlatformBrowser, AsyncPipe } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { inject, DestroyRef, ChangeDetectionStrategy, Component, PLATFORM_ID, DOCUMENT, computed } from '@angular/core';
|
|
4
|
+
import * as i3$2 from '@angular/material/card';
|
|
5
|
+
import { MatCardModule } from '@angular/material/card';
|
|
6
|
+
import * as i1 from '@angular/material/button';
|
|
7
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
8
|
+
import * as i3 from '@angular/material/icon';
|
|
9
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
10
|
+
import { MatDividerModule } from '@angular/material/divider';
|
|
11
|
+
import * as i5$2 from '@angular/material/toolbar';
|
|
12
|
+
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
13
|
+
import * as i1$1 from '@angular/cdk/drag-drop';
|
|
14
|
+
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
15
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
16
|
+
import * as i4 from '@angular/material/list';
|
|
17
|
+
import { MatListModule } from '@angular/material/list';
|
|
18
|
+
import { F as FormsStoreService, T as TDynamicDataEditComponent, b as TDynamicDataViewComponent } from './ngx-t-forms-ngx-t-forms-u_kigDid.mjs';
|
|
19
|
+
import { DefaultInputConfig } from 'ngx-t-forms-types';
|
|
20
|
+
import { take, tap } from 'rxjs';
|
|
21
|
+
import { g as getInputIcon } from './ngx-t-forms-getInputIcon-B4ADgevZ.mjs';
|
|
22
|
+
import * as i5 from '@angular/material/expansion';
|
|
23
|
+
import { MatExpansionModule } from '@angular/material/expansion';
|
|
24
|
+
import * as i5$1 from '@angular/material/tooltip';
|
|
25
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
26
|
+
import * as i3$1 from '@angular/material/progress-spinner';
|
|
27
|
+
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
28
|
+
import * as i2 from '@angular/material/form-field';
|
|
29
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
30
|
+
import './ngx-t-forms-index-dDSobs6A.mjs';
|
|
31
|
+
|
|
32
|
+
class DefaultElementComponent {
|
|
33
|
+
constructor() {
|
|
34
|
+
this.inputs = DefaultInputConfig;
|
|
35
|
+
this.#store = inject(FormsStoreService);
|
|
36
|
+
this.#destroyRef = inject(DestroyRef);
|
|
37
|
+
}
|
|
38
|
+
#store;
|
|
39
|
+
#destroyRef;
|
|
40
|
+
getDefaultInputs() {
|
|
41
|
+
const i = JSON.parse(JSON.stringify(DefaultInputConfig));
|
|
42
|
+
return Object.keys(i);
|
|
43
|
+
}
|
|
44
|
+
getInputIcon(element) {
|
|
45
|
+
return getInputIcon(element);
|
|
46
|
+
}
|
|
47
|
+
selectInputTemplate(input) {
|
|
48
|
+
this.#store.selectors.selectInputInEditId$
|
|
49
|
+
.pipe(take(1), takeUntilDestroyed(this.#destroyRef))
|
|
50
|
+
.subscribe((id) => {
|
|
51
|
+
if (!id)
|
|
52
|
+
return;
|
|
53
|
+
this.#store.actionsFormBuilder.selectInputTemplate(id, input);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DefaultElementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
57
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DefaultElementComponent, isStandalone: true, selector: "lib-default-element", ngImport: i0, template: "<br>\r\n<mat-nav-list style=\"margin: 5px;\">\r\n\r\n\r\n @defer () {\r\n @for (input of getDefaultInputs(); track input) {\r\n @if (inputs[input]?.disabled === false) {\r\n <mat-list-item style=\"background: var(--mdc-elevated-card-container-color, var(--mat-app-surface-container-low));\"\r\n (click)=\"selectInputTemplate(input)\">\r\n <mat-icon matListItemAvatar>{{ getInputIcon(input) }}</mat-icon>\r\n <span matListItemTitle href=\"...\">{{ inputs[input]?.label}}</span>\r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n }\r\n \r\n }\r\n\r\n\r\n</mat-nav-list>", styles: ["mat-icon[matListItemAvatar]{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;font-size:24px;line-height:1;border-radius:50%;background:var(--mat-app-surface-variant, rgba(0, 0, 0, .06));color:var(--mat-app-on-surface-variant, currentColor)}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i4.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatDividerModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [i4.MatListItem, i4.MatListItemAvatar, i4.MatDivider, i4.MatListItemTitle, i3.MatIcon]] }); }
|
|
58
|
+
}
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DefaultElementComponent, decorators: [{
|
|
60
|
+
type: Component,
|
|
61
|
+
args: [{ selector: 'lib-default-element', imports: [MatListModule, MatIconModule, MatDividerModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<br>\r\n<mat-nav-list style=\"margin: 5px;\">\r\n\r\n\r\n @defer () {\r\n @for (input of getDefaultInputs(); track input) {\r\n @if (inputs[input]?.disabled === false) {\r\n <mat-list-item style=\"background: var(--mdc-elevated-card-container-color, var(--mat-app-surface-container-low));\"\r\n (click)=\"selectInputTemplate(input)\">\r\n <mat-icon matListItemAvatar>{{ getInputIcon(input) }}</mat-icon>\r\n <span matListItemTitle href=\"...\">{{ inputs[input]?.label}}</span>\r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n }\r\n \r\n }\r\n\r\n\r\n</mat-nav-list>", styles: ["mat-icon[matListItemAvatar]{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;font-size:24px;line-height:1;border-radius:50%;background:var(--mat-app-surface-variant, rgba(0, 0, 0, .06));color:var(--mat-app-on-surface-variant, currentColor)}\n"] }]
|
|
62
|
+
}] });
|
|
63
|
+
|
|
64
|
+
class InputElementEditorComponent {
|
|
65
|
+
constructor() {
|
|
66
|
+
this.#store = inject(FormsStoreService);
|
|
67
|
+
this.#platformId = inject(PLATFORM_ID);
|
|
68
|
+
this.#document = inject(DOCUMENT);
|
|
69
|
+
this.#signals = this.#store.formBuilderSignalSelectors;
|
|
70
|
+
this.vm = computed(() => ({
|
|
71
|
+
defaultInputInEdit: this.#signals.defaultInputInEdit(),
|
|
72
|
+
inputInEdit: this.#signals.inputInEdit(),
|
|
73
|
+
inputElementEditorConfigs: this.#signals.inputElementEditorConfigs(),
|
|
74
|
+
inputInEditValidationErrors: this.#signals.inputInEditValidationErrors(),
|
|
75
|
+
formInputs: this.#signals.getAllFormInputs(),
|
|
76
|
+
}), ...(ngDevMode ? [{ debugName: "vm" }] : /* istanbul ignore next */ []));
|
|
77
|
+
this.elementConfigurationChanged = (value, ele) => {
|
|
78
|
+
const inputVal = this.#signals.inputInEdit();
|
|
79
|
+
if (!inputVal)
|
|
80
|
+
return;
|
|
81
|
+
this.#store.actionsFormBuilder.elementConfigurationChanged(inputVal.id, value, ele);
|
|
82
|
+
};
|
|
83
|
+
this.clearInputInEdit = () => {
|
|
84
|
+
const inputVal = this.#signals.inputInEdit();
|
|
85
|
+
if (!inputVal)
|
|
86
|
+
return;
|
|
87
|
+
this.#store.actionsFormBuilder.clearInputInEdit(inputVal.id);
|
|
88
|
+
};
|
|
89
|
+
this.elementBlur = (event, element) => {
|
|
90
|
+
const inputVal = this.#signals.inputInEdit();
|
|
91
|
+
if (!inputVal)
|
|
92
|
+
return;
|
|
93
|
+
this.#store.actionsFormBuilder.elementBlur(inputVal.id, event, element);
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
#store;
|
|
97
|
+
#platformId;
|
|
98
|
+
#document;
|
|
99
|
+
#signals;
|
|
100
|
+
getInputIcon(element) {
|
|
101
|
+
return getInputIcon(element);
|
|
102
|
+
}
|
|
103
|
+
showDebugData() {
|
|
104
|
+
if (!isPlatformBrowser(this.#platformId))
|
|
105
|
+
return;
|
|
106
|
+
const win = this.#document.defaultView;
|
|
107
|
+
if (!win)
|
|
108
|
+
return;
|
|
109
|
+
const jsonData = JSON.stringify(this.vm(), null, 2);
|
|
110
|
+
const blob = new Blob([jsonData], { type: 'application/json' });
|
|
111
|
+
const url = win.URL.createObjectURL(blob);
|
|
112
|
+
const link = this.#document.createElement('a');
|
|
113
|
+
link.href = url;
|
|
114
|
+
link.download = 'debug-data.json';
|
|
115
|
+
link.click();
|
|
116
|
+
win.URL.revokeObjectURL(url);
|
|
117
|
+
}
|
|
118
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: InputElementEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
119
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: InputElementEditorComponent, isStandalone: true, selector: "lib-input-element-editor", ngImport: i0, template: "<mat-toolbar class=\"section-header\">\r\n <span class=\"header\">Element configuration</span>\r\n <span class=\"spacer\"></span>\r\n</mat-toolbar>\r\n<mat-divider></mat-divider>\r\n@if (vm(); as vm) {\r\n @defer (on viewport) {\r\n\r\n <mat-accordion togglePosition=\"before\">\r\n @for(section of (vm.inputElementEditorConfigs.editorSections||[]); track section.id; let i = $index) {\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n {{section.label}}\r\n <span class=\"spacer\"></span>\r\n @if (section.hasErrors) {\r\n <mat-icon color=\"warn\">error</mat-icon>\r\n }\r\n @if (section.showItemValue && !!(vm.inputInEdit)) {\r\n <span class=\"showItemValue\">\r\n {{ vm.inputInEdit[section.showItemValue]}}\r\n </span>\r\n }\r\n <mat-divider style=\"position: absolute; left:0px; width:100%; bottom:0px;\"></mat-divider>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n <div style=\"margin-top: 16px;\"></div>\r\n\r\n <!-- Element type selector (only in first section) -->\r\n @if(i === 0) {\r\n <mat-nav-list>\r\n <mat-list-item [disabled]=\"vm.inputInEdit?.systemDefault\" matTooltip=\"Change input element\"\r\n (click)=\"vm.inputInEdit?.systemDefault? '':clearInputInEdit()\">\r\n <mat-icon matListItemAvatar [attr.aria-label]=\"(vm.defaultInputInEdit)?.label\">\r\n {{ getInputIcon(vm.inputInEdit?.element) }}\r\n </mat-icon>\r\n <span matListItemTitle>{{ (vm.defaultInputInEdit)?.label}}</span>\r\n <span matListItemMeta>\r\n <mat-icon>arrow_forward_ios</mat-icon>\r\n </span>\r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n </mat-nav-list>\r\n }\r\n\r\n <!-- Section elements -->\r\n @for(element of section.elements; track element.id) {\r\n <p style=\"margin-bottom: 16px; margin-top: 8px;\">\r\n @defer (on viewport) {\r\n <lib-t-dynamic-data-edit\r\n [editorConfig]=\"element\"\r\n [data]=\"(vm.inputInEdit)\"\r\n [validationErrors]=\"element.computedErrors||[]\"\r\n (valueChange)=\"elementConfigurationChanged($event, element)\" [formInputs]=\"(vm.formInputs)||[]\"\r\n (blur)=\"elementBlur($event, element)\">\r\n </lib-t-dynamic-data-edit>\r\n } @placeholder {\r\n <div style=\"padding: 50px; display:flex; justify-content:center; align-items:center; text-align: center;\">\r\n <mat-spinner diameter=\"18\"></mat-spinner>\r\n </div>\r\n }\r\n </p>\r\n }\r\n </mat-expansion-panel>\r\n }\r\n </mat-accordion>\r\n } @placeholder {\r\n <div style=\"padding: 50px; display:flex; justify-content:center; align-items:center; text-align: center;\">\r\n <mat-spinner diameter=\"50\" />\r\n </div>\r\n } @error {\r\n <div style=\"padding: 16px;\">\r\n <mat-error>\r\n <h3>Error loading element editor</h3>\r\n <p>An error occurred while loading the element editor. Please try again later.</p>\r\n </mat-error>\r\n </div>\r\n\r\n }\r\n\r\n\r\n\r\n\r\n <!-- Diagnostic section -->\r\n <mat-toolbar class=\"section-header\">\r\n <span class=\"header\">Diagnostic data</span>\r\n <span class=\"spacer\"></span>\r\n </mat-toolbar>\r\n <mat-divider></mat-divider>\r\n\r\n <mat-accordion togglePosition=\"before\">\r\n\r\n @if(((vm.inputInEditValidationErrors)||[]).length > 0) {\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n Validation Errors\r\n <span class=\"spacer\"></span>\r\n <mat-error>\r\n {{(vm.inputInEditValidationErrors).length||''}}\r\n </mat-error>\r\n <mat-divider style=\"position: absolute; left:0px; width:100%; bottom:0px;\"></mat-divider>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div style=\"margin-top: 16px;\"></div>\r\n <mat-error style=\"border: solid 1px; border-radius: 8px; padding: 16px;\">\r\n <h1>All configuration errors:</h1>\r\n <p>\r\n {{(vm.inputInEditValidationErrors).length||''}} errors found. When an error is found, the input will\r\n not\r\n be saved.\r\n </p>\r\n <ul>\r\n @for(error of (vm.inputInEditValidationErrors); track error.key) {\r\n <li>\r\n <strong>{{error.key}}</strong> {{error.message}}\r\n </li>\r\n }\r\n </ul>\r\n </mat-error>\r\n </mat-expansion-panel>\r\n }\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header style=\" padding-right: 0px;\">\r\n <mat-panel-title>\r\n Complete Virtual Model\r\n <span class=\"spacer\"></span>\r\n <button mat-icon-button (click)=\"showDebugData()\">\r\n <mat-icon>\r\n troubleshoot\r\n </mat-icon>\r\n </button>\r\n <mat-divider style=\"position: absolute; left:0px; width:100%; bottom:0px;\"></mat-divider>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div style=\"margin-top: 16px;\"></div>\r\n <mat-card style=\"padding: 16px;\">\r\n\r\n <lib-t-dynamic-data-view [data]=\"({\r\n 'Default Input Template InEdit': vm.defaultInputInEdit,\r\n 'Input In Edit': vm.inputInEdit,\r\n 'Input Editor Sections': vm.inputElementEditorConfigs?.editorSections,\r\n })\"></lib-t-dynamic-data-view>\r\n\r\n </mat-card>\r\n </mat-expansion-panel>\r\n\r\n </mat-accordion>\r\n}\r\n", styles: [".showItemValue{opacity:.6}mat-form-field{width:100%}mat-slider{width:100%}.header{margin-bottom:0;font-size:small;opacity:.6}.section-header{height:38px;margin-top:12px}mat-icon[matListItemAvatar]{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;font-size:24px;line-height:1;border-radius:50%;background:var(--mat-app-surface-variant, rgba(0, 0, 0, .06));color:var(--mat-app-on-surface-variant, currentColor)}\n"], dependencies: [{ kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i5$2.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i4.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: MatExpansionModule }, { kind: "directive", type: i5.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i5.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i5.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i5.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatListModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i3$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatButtonModule }, { 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$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: TDynamicDataViewComponent, selector: "lib-t-dynamic-data-view", inputs: ["data"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [i4.MatDivider, i5.MatAccordion, i5.MatExpansionPanel, i5.MatExpansionPanelHeader, i5.MatExpansionPanelTitle, i3.MatIcon, i4.MatNavList, i4.MatListItem, i4.MatListItemAvatar, i4.MatListItemTitle, i4.MatListItemMeta, i5$1.MatTooltip, i3$1.MatProgressSpinner], () => [TDynamicDataEditComponent]] }); }
|
|
120
|
+
}
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: InputElementEditorComponent, decorators: [{
|
|
122
|
+
type: Component,
|
|
123
|
+
args: [{ selector: 'lib-input-element-editor', imports: [
|
|
124
|
+
MatToolbarModule,
|
|
125
|
+
MatDividerModule,
|
|
126
|
+
MatExpansionModule,
|
|
127
|
+
MatIconModule,
|
|
128
|
+
MatListModule,
|
|
129
|
+
MatTooltipModule,
|
|
130
|
+
MatProgressSpinnerModule,
|
|
131
|
+
MatButtonModule,
|
|
132
|
+
MatCardModule,
|
|
133
|
+
MatFormFieldModule,
|
|
134
|
+
TDynamicDataEditComponent,
|
|
135
|
+
TDynamicDataViewComponent,
|
|
136
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-toolbar class=\"section-header\">\r\n <span class=\"header\">Element configuration</span>\r\n <span class=\"spacer\"></span>\r\n</mat-toolbar>\r\n<mat-divider></mat-divider>\r\n@if (vm(); as vm) {\r\n @defer (on viewport) {\r\n\r\n <mat-accordion togglePosition=\"before\">\r\n @for(section of (vm.inputElementEditorConfigs.editorSections||[]); track section.id; let i = $index) {\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n {{section.label}}\r\n <span class=\"spacer\"></span>\r\n @if (section.hasErrors) {\r\n <mat-icon color=\"warn\">error</mat-icon>\r\n }\r\n @if (section.showItemValue && !!(vm.inputInEdit)) {\r\n <span class=\"showItemValue\">\r\n {{ vm.inputInEdit[section.showItemValue]}}\r\n </span>\r\n }\r\n <mat-divider style=\"position: absolute; left:0px; width:100%; bottom:0px;\"></mat-divider>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n <div style=\"margin-top: 16px;\"></div>\r\n\r\n <!-- Element type selector (only in first section) -->\r\n @if(i === 0) {\r\n <mat-nav-list>\r\n <mat-list-item [disabled]=\"vm.inputInEdit?.systemDefault\" matTooltip=\"Change input element\"\r\n (click)=\"vm.inputInEdit?.systemDefault? '':clearInputInEdit()\">\r\n <mat-icon matListItemAvatar [attr.aria-label]=\"(vm.defaultInputInEdit)?.label\">\r\n {{ getInputIcon(vm.inputInEdit?.element) }}\r\n </mat-icon>\r\n <span matListItemTitle>{{ (vm.defaultInputInEdit)?.label}}</span>\r\n <span matListItemMeta>\r\n <mat-icon>arrow_forward_ios</mat-icon>\r\n </span>\r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n </mat-nav-list>\r\n }\r\n\r\n <!-- Section elements -->\r\n @for(element of section.elements; track element.id) {\r\n <p style=\"margin-bottom: 16px; margin-top: 8px;\">\r\n @defer (on viewport) {\r\n <lib-t-dynamic-data-edit\r\n [editorConfig]=\"element\"\r\n [data]=\"(vm.inputInEdit)\"\r\n [validationErrors]=\"element.computedErrors||[]\"\r\n (valueChange)=\"elementConfigurationChanged($event, element)\" [formInputs]=\"(vm.formInputs)||[]\"\r\n (blur)=\"elementBlur($event, element)\">\r\n </lib-t-dynamic-data-edit>\r\n } @placeholder {\r\n <div style=\"padding: 50px; display:flex; justify-content:center; align-items:center; text-align: center;\">\r\n <mat-spinner diameter=\"18\"></mat-spinner>\r\n </div>\r\n }\r\n </p>\r\n }\r\n </mat-expansion-panel>\r\n }\r\n </mat-accordion>\r\n } @placeholder {\r\n <div style=\"padding: 50px; display:flex; justify-content:center; align-items:center; text-align: center;\">\r\n <mat-spinner diameter=\"50\" />\r\n </div>\r\n } @error {\r\n <div style=\"padding: 16px;\">\r\n <mat-error>\r\n <h3>Error loading element editor</h3>\r\n <p>An error occurred while loading the element editor. Please try again later.</p>\r\n </mat-error>\r\n </div>\r\n\r\n }\r\n\r\n\r\n\r\n\r\n <!-- Diagnostic section -->\r\n <mat-toolbar class=\"section-header\">\r\n <span class=\"header\">Diagnostic data</span>\r\n <span class=\"spacer\"></span>\r\n </mat-toolbar>\r\n <mat-divider></mat-divider>\r\n\r\n <mat-accordion togglePosition=\"before\">\r\n\r\n @if(((vm.inputInEditValidationErrors)||[]).length > 0) {\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n Validation Errors\r\n <span class=\"spacer\"></span>\r\n <mat-error>\r\n {{(vm.inputInEditValidationErrors).length||''}}\r\n </mat-error>\r\n <mat-divider style=\"position: absolute; left:0px; width:100%; bottom:0px;\"></mat-divider>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div style=\"margin-top: 16px;\"></div>\r\n <mat-error style=\"border: solid 1px; border-radius: 8px; padding: 16px;\">\r\n <h1>All configuration errors:</h1>\r\n <p>\r\n {{(vm.inputInEditValidationErrors).length||''}} errors found. When an error is found, the input will\r\n not\r\n be saved.\r\n </p>\r\n <ul>\r\n @for(error of (vm.inputInEditValidationErrors); track error.key) {\r\n <li>\r\n <strong>{{error.key}}</strong> {{error.message}}\r\n </li>\r\n }\r\n </ul>\r\n </mat-error>\r\n </mat-expansion-panel>\r\n }\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header style=\" padding-right: 0px;\">\r\n <mat-panel-title>\r\n Complete Virtual Model\r\n <span class=\"spacer\"></span>\r\n <button mat-icon-button (click)=\"showDebugData()\">\r\n <mat-icon>\r\n troubleshoot\r\n </mat-icon>\r\n </button>\r\n <mat-divider style=\"position: absolute; left:0px; width:100%; bottom:0px;\"></mat-divider>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div style=\"margin-top: 16px;\"></div>\r\n <mat-card style=\"padding: 16px;\">\r\n\r\n <lib-t-dynamic-data-view [data]=\"({\r\n 'Default Input Template InEdit': vm.defaultInputInEdit,\r\n 'Input In Edit': vm.inputInEdit,\r\n 'Input Editor Sections': vm.inputElementEditorConfigs?.editorSections,\r\n })\"></lib-t-dynamic-data-view>\r\n\r\n </mat-card>\r\n </mat-expansion-panel>\r\n\r\n </mat-accordion>\r\n}\r\n", styles: [".showItemValue{opacity:.6}mat-form-field{width:100%}mat-slider{width:100%}.header{margin-bottom:0;font-size:small;opacity:.6}.section-header{height:38px;margin-top:12px}mat-icon[matListItemAvatar]{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;font-size:24px;line-height:1;border-radius:50%;background:var(--mat-app-surface-variant, rgba(0, 0, 0, .06));color:var(--mat-app-on-surface-variant, currentColor)}\n"] }]
|
|
137
|
+
}] });
|
|
138
|
+
|
|
139
|
+
class InputEditorComponent {
|
|
140
|
+
constructor() {
|
|
141
|
+
this.#store = inject(FormsStoreService);
|
|
142
|
+
this.defaultInputs = DefaultInputConfig;
|
|
143
|
+
this.inputInEdit$ = this.#store.formBuilderSelectors.inputInEdit$;
|
|
144
|
+
this.defaultInputInEdit$ = this.#store.formBuilderSelectors.defaultInputInEdit$;
|
|
145
|
+
this.saveInput = () => {
|
|
146
|
+
this.inputInEdit$
|
|
147
|
+
.pipe(take(1), tap((inputVal) => {
|
|
148
|
+
if (!inputVal)
|
|
149
|
+
return;
|
|
150
|
+
this.#store.actionsFormBuilder.saveInput(inputVal.id);
|
|
151
|
+
}))
|
|
152
|
+
.subscribe();
|
|
153
|
+
};
|
|
154
|
+
this.closeEditor = () => {
|
|
155
|
+
this.#store.actions.setInputInEditId({ inputInEdit: null });
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
#store;
|
|
159
|
+
get validationErrors$() {
|
|
160
|
+
return this.#store.formBuilderSelectors.inputInEditValidationErrors$;
|
|
161
|
+
}
|
|
162
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: InputEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
163
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: InputEditorComponent, isStandalone: true, selector: "lib-input-editor", ngImport: i0, template: "<mat-card\r\n\r\nstyle=\"\r\n\r\nbackground: var(--mat-sys-surface-container, var(--mat-app-surface));\r\nmargin:0px;\r\nborder:solid 1px var(--mat-divider-color, var(--mat-app-outline))\">\r\n\r\n <mat-card-header >\r\n <mat-card-title>\r\n {{\r\n !!(inputInEdit$|async)?.element\r\n ? \"Edit \" + (inputInEdit$|async)?.label + \" element\"\r\n : \"Setup Form Element\"\r\n }}\r\n </mat-card-title>\r\n <mat-card-subtitle> {{\r\n !!(inputInEdit$|async)?.element? \"Configure the element below\": \"Form element are components making up a form section. Types of form elements are defined by their behaviour and use case, for example a date range picker is well suited to determine duration.\"\r\n }}</mat-card-subtitle>\r\n <button style=\"position: absolute;right:4px\" mat-icon-button cdkDragHandle >\r\n <mat-icon>drag_indicator</mat-icon>\r\n </button>\r\n </mat-card-header>\r\n\r\n\r\n\r\n @if(!!((inputInEdit$|async))?.element){\r\n <lib-input-element-editor\r\n style=\"background: var(--mat-sys-surface-container, var(--mat-app-surface))\">\r\n </lib-input-element-editor>\r\n }@else{\r\n <lib-default-element style=\"background: var(--mat-sys-surface-container, var(--mat-app-surface))\"></lib-default-element>\r\n }\r\n <br>\r\n\r\n <br>\r\n <mat-divider style=\"position: sticky;bottom: 53px;\"></mat-divider>\r\n <mat-toolbar style=\"position: sticky;bottom: 0;\">\r\n <span class=\"spacer\"></span>\r\n <button (click)=\"closeEditor()\" class=\"\" mat-button>close</button>\r\n\r\n @if (!((inputInEdit$|async))?.id) {\r\n <button mat-flat-button\r\n (click)=\"saveInput()\"\r\n [disabled]=\"((validationErrors$|async)||[]).length>0\"\r\n color=\"primary\">save new input</button>\r\n }\r\n </mat-toolbar>\r\n\r\n\r\n</mat-card>\r\n", styles: ["mat-card{margin:16px}mat-card-content{overflow-y:auto;max-height:calc(100vh - 190px)}mat-card-actions{position:sticky;bottom:0}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i3$2.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i3$2.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "directive", type: i3$2.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { 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: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i4.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i5$2.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: DefaultElementComponent, selector: "lib-default-element" }, { kind: "component", type: InputElementEditorComponent, selector: "lib-input-element-editor" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
164
|
+
}
|
|
165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: InputEditorComponent, decorators: [{
|
|
166
|
+
type: Component,
|
|
167
|
+
args: [{ selector: 'lib-input-editor', imports: [
|
|
168
|
+
AsyncPipe,
|
|
169
|
+
MatCardModule,
|
|
170
|
+
MatButtonModule,
|
|
171
|
+
MatIconModule,
|
|
172
|
+
MatDividerModule,
|
|
173
|
+
MatToolbarModule,
|
|
174
|
+
DragDropModule,
|
|
175
|
+
DefaultElementComponent,
|
|
176
|
+
InputElementEditorComponent,
|
|
177
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-card\r\n\r\nstyle=\"\r\n\r\nbackground: var(--mat-sys-surface-container, var(--mat-app-surface));\r\nmargin:0px;\r\nborder:solid 1px var(--mat-divider-color, var(--mat-app-outline))\">\r\n\r\n <mat-card-header >\r\n <mat-card-title>\r\n {{\r\n !!(inputInEdit$|async)?.element\r\n ? \"Edit \" + (inputInEdit$|async)?.label + \" element\"\r\n : \"Setup Form Element\"\r\n }}\r\n </mat-card-title>\r\n <mat-card-subtitle> {{\r\n !!(inputInEdit$|async)?.element? \"Configure the element below\": \"Form element are components making up a form section. Types of form elements are defined by their behaviour and use case, for example a date range picker is well suited to determine duration.\"\r\n }}</mat-card-subtitle>\r\n <button style=\"position: absolute;right:4px\" mat-icon-button cdkDragHandle >\r\n <mat-icon>drag_indicator</mat-icon>\r\n </button>\r\n </mat-card-header>\r\n\r\n\r\n\r\n @if(!!((inputInEdit$|async))?.element){\r\n <lib-input-element-editor\r\n style=\"background: var(--mat-sys-surface-container, var(--mat-app-surface))\">\r\n </lib-input-element-editor>\r\n }@else{\r\n <lib-default-element style=\"background: var(--mat-sys-surface-container, var(--mat-app-surface))\"></lib-default-element>\r\n }\r\n <br>\r\n\r\n <br>\r\n <mat-divider style=\"position: sticky;bottom: 53px;\"></mat-divider>\r\n <mat-toolbar style=\"position: sticky;bottom: 0;\">\r\n <span class=\"spacer\"></span>\r\n <button (click)=\"closeEditor()\" class=\"\" mat-button>close</button>\r\n\r\n @if (!((inputInEdit$|async))?.id) {\r\n <button mat-flat-button\r\n (click)=\"saveInput()\"\r\n [disabled]=\"((validationErrors$|async)||[]).length>0\"\r\n color=\"primary\">save new input</button>\r\n }\r\n </mat-toolbar>\r\n\r\n\r\n</mat-card>\r\n", styles: ["mat-card{margin:16px}mat-card-content{overflow-y:auto;max-height:calc(100vh - 190px)}mat-card-actions{position:sticky;bottom:0}\n"] }]
|
|
178
|
+
}] });
|
|
179
|
+
|
|
180
|
+
export { InputEditorComponent };
|
|
181
|
+
//# sourceMappingURL=ngx-t-forms-input-editor.component-BPUOM9kQ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-input-editor.component-BPUOM9kQ.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/default-element/default-element.component.ts","../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/default-element/default-element.component.html","../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/input-element-editor/input-element-editor.component.ts","../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/input-element-editor/input-element-editor.component.html","../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/input-editor/input-editor.component.ts","../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/input-editor/input-editor.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, DestroyRef, inject } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatDividerModule } from '@angular/material/divider';\r\n\r\nimport { FormsStoreService } from '../../../forms/store/forms-store.service';\r\nimport { DefaultInputConfig, ElementTypes } from 'ngx-t-forms-types';\r\nimport { take } from 'rxjs';\r\nimport { getInputIcon } from '../../../../shared/functions/getInputIcon';\r\n\r\n@Component({\r\n selector: 'lib-default-element',\r\n imports: [MatListModule, MatIconModule, MatDividerModule],\r\n templateUrl: './default-element.component.html',\r\n styleUrl: './default-element.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class DefaultElementComponent {\r\n protected readonly inputs = DefaultInputConfig;\r\n readonly #store = inject(FormsStoreService);\r\n readonly #destroyRef = inject(DestroyRef);\r\n\r\n protected getDefaultInputs(): ElementTypes[] {\r\n const i = JSON.parse(JSON.stringify(DefaultInputConfig)) as Record<string, unknown>;\r\n return Object.keys(i) as ElementTypes[];\r\n }\r\n\r\n protected getInputIcon(element: ElementTypes): string {\r\n return getInputIcon(element);\r\n }\r\n\r\n protected selectInputTemplate(input: ElementTypes): void {\r\n this.#store.selectors.selectInputInEditId$\r\n .pipe(take(1), takeUntilDestroyed(this.#destroyRef))\r\n .subscribe((id) => {\r\n if (!id) return;\r\n this.#store.actionsFormBuilder.selectInputTemplate(id, input);\r\n });\r\n }\r\n}\r\n","<br>\r\n<mat-nav-list style=\"margin: 5px;\">\r\n\r\n\r\n @defer () {\r\n @for (input of getDefaultInputs(); track input) {\r\n @if (inputs[input]?.disabled === false) {\r\n <mat-list-item style=\"background: var(--mdc-elevated-card-container-color, var(--mat-app-surface-container-low));\"\r\n (click)=\"selectInputTemplate(input)\">\r\n <mat-icon matListItemAvatar>{{ getInputIcon(input) }}</mat-icon>\r\n <span matListItemTitle href=\"...\">{{ inputs[input]?.label}}</span>\r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n }\r\n \r\n }\r\n\r\n\r\n</mat-nav-list>","import { ChangeDetectionStrategy, Component, DOCUMENT, PLATFORM_ID, computed, inject } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatListModule } from '@angular/material/list';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatFormFieldModule } from '@angular/material/form-field';\n\nimport { FormsStoreService } from '../../../forms/store/forms-store.service';\n\nimport { TDynamicDataEditComponent, TDynamicDataViewComponent } from '../../..';\n\nimport type { ElementEditorInnerSectionElementInterface, ElementTypes } from 'ngx-t-forms-types';\nimport { getInputIcon } from '../../../../shared/functions/getInputIcon';\n\n@Component({\n selector: 'lib-input-element-editor',\n imports: [\n MatToolbarModule,\n MatDividerModule,\n MatExpansionModule,\n MatIconModule,\n MatListModule,\n MatTooltipModule,\n MatProgressSpinnerModule,\n MatButtonModule,\n MatCardModule,\n MatFormFieldModule,\n TDynamicDataEditComponent,\n TDynamicDataViewComponent,\n ],\n templateUrl: './input-element-editor.component.html',\n styleUrl: './input-element-editor.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputElementEditorComponent {\n readonly #store = inject(FormsStoreService);\n readonly #platformId = inject(PLATFORM_ID);\n readonly #document = inject(DOCUMENT);\n\n readonly #signals = this.#store.formBuilderSignalSelectors;\n\n protected readonly vm = computed(() => ({\n defaultInputInEdit: this.#signals.defaultInputInEdit(),\n inputInEdit: this.#signals.inputInEdit(),\n inputElementEditorConfigs: this.#signals.inputElementEditorConfigs(),\n inputInEditValidationErrors: this.#signals.inputInEditValidationErrors(),\n formInputs: this.#signals.getAllFormInputs(),\n }));\n\n protected readonly elementConfigurationChanged = (\n value: unknown,\n ele: ElementEditorInnerSectionElementInterface,\n ): void => {\n const inputVal = this.#signals.inputInEdit();\n if (!inputVal) return;\n this.#store.actionsFormBuilder.elementConfigurationChanged(inputVal.id, value, ele);\n };\n\n protected readonly clearInputInEdit = (): void => {\n const inputVal = this.#signals.inputInEdit();\n if (!inputVal) return;\n this.#store.actionsFormBuilder.clearInputInEdit(inputVal.id);\n };\n\n protected readonly elementBlur = (\n event: unknown,\n element: ElementEditorInnerSectionElementInterface,\n ): void => {\n const inputVal = this.#signals.inputInEdit();\n if (!inputVal) return;\n this.#store.actionsFormBuilder.elementBlur(inputVal.id, event, element);\n };\n\n protected getInputIcon(element: ElementTypes | undefined | null): string {\n return getInputIcon(element);\n }\n\n protected showDebugData(): void {\n if (!isPlatformBrowser(this.#platformId)) return;\n const win = this.#document.defaultView;\n if (!win) return;\n const jsonData = JSON.stringify(this.vm(), null, 2);\n const blob = new Blob([jsonData], { type: 'application/json' });\n const url = win.URL.createObjectURL(blob);\n const link = this.#document.createElement('a');\n link.href = url;\n link.download = 'debug-data.json';\n link.click();\n win.URL.revokeObjectURL(url);\n }\n}\n","<mat-toolbar class=\"section-header\">\r\n <span class=\"header\">Element configuration</span>\r\n <span class=\"spacer\"></span>\r\n</mat-toolbar>\r\n<mat-divider></mat-divider>\r\n@if (vm(); as vm) {\r\n @defer (on viewport) {\r\n\r\n <mat-accordion togglePosition=\"before\">\r\n @for(section of (vm.inputElementEditorConfigs.editorSections||[]); track section.id; let i = $index) {\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n {{section.label}}\r\n <span class=\"spacer\"></span>\r\n @if (section.hasErrors) {\r\n <mat-icon color=\"warn\">error</mat-icon>\r\n }\r\n @if (section.showItemValue && !!(vm.inputInEdit)) {\r\n <span class=\"showItemValue\">\r\n {{ vm.inputInEdit[section.showItemValue]}}\r\n </span>\r\n }\r\n <mat-divider style=\"position: absolute; left:0px; width:100%; bottom:0px;\"></mat-divider>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n <div style=\"margin-top: 16px;\"></div>\r\n\r\n <!-- Element type selector (only in first section) -->\r\n @if(i === 0) {\r\n <mat-nav-list>\r\n <mat-list-item [disabled]=\"vm.inputInEdit?.systemDefault\" matTooltip=\"Change input element\"\r\n (click)=\"vm.inputInEdit?.systemDefault? '':clearInputInEdit()\">\r\n <mat-icon matListItemAvatar [attr.aria-label]=\"(vm.defaultInputInEdit)?.label\">\r\n {{ getInputIcon(vm.inputInEdit?.element) }}\r\n </mat-icon>\r\n <span matListItemTitle>{{ (vm.defaultInputInEdit)?.label}}</span>\r\n <span matListItemMeta>\r\n <mat-icon>arrow_forward_ios</mat-icon>\r\n </span>\r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n </mat-nav-list>\r\n }\r\n\r\n <!-- Section elements -->\r\n @for(element of section.elements; track element.id) {\r\n <p style=\"margin-bottom: 16px; margin-top: 8px;\">\r\n @defer (on viewport) {\r\n <lib-t-dynamic-data-edit\r\n [editorConfig]=\"element\"\r\n [data]=\"(vm.inputInEdit)\"\r\n [validationErrors]=\"element.computedErrors||[]\"\r\n (valueChange)=\"elementConfigurationChanged($event, element)\" [formInputs]=\"(vm.formInputs)||[]\"\r\n (blur)=\"elementBlur($event, element)\">\r\n </lib-t-dynamic-data-edit>\r\n } @placeholder {\r\n <div style=\"padding: 50px; display:flex; justify-content:center; align-items:center; text-align: center;\">\r\n <mat-spinner diameter=\"18\"></mat-spinner>\r\n </div>\r\n }\r\n </p>\r\n }\r\n </mat-expansion-panel>\r\n }\r\n </mat-accordion>\r\n } @placeholder {\r\n <div style=\"padding: 50px; display:flex; justify-content:center; align-items:center; text-align: center;\">\r\n <mat-spinner diameter=\"50\" />\r\n </div>\r\n } @error {\r\n <div style=\"padding: 16px;\">\r\n <mat-error>\r\n <h3>Error loading element editor</h3>\r\n <p>An error occurred while loading the element editor. Please try again later.</p>\r\n </mat-error>\r\n </div>\r\n\r\n }\r\n\r\n\r\n\r\n\r\n <!-- Diagnostic section -->\r\n <mat-toolbar class=\"section-header\">\r\n <span class=\"header\">Diagnostic data</span>\r\n <span class=\"spacer\"></span>\r\n </mat-toolbar>\r\n <mat-divider></mat-divider>\r\n\r\n <mat-accordion togglePosition=\"before\">\r\n\r\n @if(((vm.inputInEditValidationErrors)||[]).length > 0) {\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n Validation Errors\r\n <span class=\"spacer\"></span>\r\n <mat-error>\r\n {{(vm.inputInEditValidationErrors).length||''}}\r\n </mat-error>\r\n <mat-divider style=\"position: absolute; left:0px; width:100%; bottom:0px;\"></mat-divider>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div style=\"margin-top: 16px;\"></div>\r\n <mat-error style=\"border: solid 1px; border-radius: 8px; padding: 16px;\">\r\n <h1>All configuration errors:</h1>\r\n <p>\r\n {{(vm.inputInEditValidationErrors).length||''}} errors found. When an error is found, the input will\r\n not\r\n be saved.\r\n </p>\r\n <ul>\r\n @for(error of (vm.inputInEditValidationErrors); track error.key) {\r\n <li>\r\n <strong>{{error.key}}</strong> {{error.message}}\r\n </li>\r\n }\r\n </ul>\r\n </mat-error>\r\n </mat-expansion-panel>\r\n }\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header style=\" padding-right: 0px;\">\r\n <mat-panel-title>\r\n Complete Virtual Model\r\n <span class=\"spacer\"></span>\r\n <button mat-icon-button (click)=\"showDebugData()\">\r\n <mat-icon>\r\n troubleshoot\r\n </mat-icon>\r\n </button>\r\n <mat-divider style=\"position: absolute; left:0px; width:100%; bottom:0px;\"></mat-divider>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div style=\"margin-top: 16px;\"></div>\r\n <mat-card style=\"padding: 16px;\">\r\n\r\n <lib-t-dynamic-data-view [data]=\"({\r\n 'Default Input Template InEdit': vm.defaultInputInEdit,\r\n 'Input In Edit': vm.inputInEdit,\r\n 'Input Editor Sections': vm.inputElementEditorConfigs?.editorSections,\r\n })\"></lib-t-dynamic-data-view>\r\n\r\n </mat-card>\r\n </mat-expansion-panel>\r\n\r\n </mat-accordion>\r\n}\r\n","import { AsyncPipe } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, inject } from '@angular/core';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatDividerModule } from '@angular/material/divider';\r\nimport { MatToolbarModule } from '@angular/material/toolbar';\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\n\r\nimport { DefaultElementComponent } from '../default-element/default-element.component';\r\nimport { InputElementEditorComponent } from '../input-element-editor/input-element-editor.component';\r\nimport { FormsStoreService } from '../../../forms/store/forms-store.service';\r\n\r\nimport { Observable, take, tap } from 'rxjs';\r\nimport { DefaultInputConfig } from 'ngx-t-forms-types';\r\n\r\n@Component({\r\n selector: 'lib-input-editor',\r\n imports: [\r\n AsyncPipe,\r\n MatCardModule,\r\n MatButtonModule,\r\n MatIconModule,\r\n MatDividerModule,\r\n MatToolbarModule,\r\n DragDropModule,\r\n DefaultElementComponent,\r\n InputElementEditorComponent,\r\n ],\r\n templateUrl: './input-editor.component.html',\r\n styleUrl: './input-editor.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class InputEditorComponent {\r\n readonly #store = inject(FormsStoreService);\r\n\r\n protected readonly defaultInputs = DefaultInputConfig;\r\n protected readonly inputInEdit$ = this.#store.formBuilderSelectors.inputInEdit$;\r\n protected readonly defaultInputInEdit$ = this.#store.formBuilderSelectors.defaultInputInEdit$;\r\n\r\n protected readonly saveInput = (): void => {\r\n this.inputInEdit$\r\n .pipe(\r\n take(1),\r\n tap((inputVal) => {\r\n if (!inputVal) return;\r\n this.#store.actionsFormBuilder.saveInput(inputVal.id);\r\n }),\r\n )\r\n .subscribe();\r\n };\r\n\r\n protected readonly closeEditor = (): void => {\r\n this.#store.actions.setInputInEditId({ inputInEdit: null });\r\n };\r\n\r\n protected get validationErrors$(): Observable<{ key: string; message: string }[] | null> {\r\n return this.#store.formBuilderSelectors.inputInEditValidationErrors$;\r\n }\r\n}\r\n","<mat-card\r\n\r\nstyle=\"\r\n\r\nbackground: var(--mat-sys-surface-container, var(--mat-app-surface));\r\nmargin:0px;\r\nborder:solid 1px var(--mat-divider-color, var(--mat-app-outline))\">\r\n\r\n <mat-card-header >\r\n <mat-card-title>\r\n {{\r\n !!(inputInEdit$|async)?.element\r\n ? \"Edit \" + (inputInEdit$|async)?.label + \" element\"\r\n : \"Setup Form Element\"\r\n }}\r\n </mat-card-title>\r\n <mat-card-subtitle> {{\r\n !!(inputInEdit$|async)?.element? \"Configure the element below\": \"Form element are components making up a form section. Types of form elements are defined by their behaviour and use case, for example a date range picker is well suited to determine duration.\"\r\n }}</mat-card-subtitle>\r\n <button style=\"position: absolute;right:4px\" mat-icon-button cdkDragHandle >\r\n <mat-icon>drag_indicator</mat-icon>\r\n </button>\r\n </mat-card-header>\r\n\r\n\r\n\r\n @if(!!((inputInEdit$|async))?.element){\r\n <lib-input-element-editor\r\n style=\"background: var(--mat-sys-surface-container, var(--mat-app-surface))\">\r\n </lib-input-element-editor>\r\n }@else{\r\n <lib-default-element style=\"background: var(--mat-sys-surface-container, var(--mat-app-surface))\"></lib-default-element>\r\n }\r\n <br>\r\n\r\n <br>\r\n <mat-divider style=\"position: sticky;bottom: 53px;\"></mat-divider>\r\n <mat-toolbar style=\"position: sticky;bottom: 0;\">\r\n <span class=\"spacer\"></span>\r\n <button (click)=\"closeEditor()\" class=\"\" mat-button>close</button>\r\n\r\n @if (!((inputInEdit$|async))?.id) {\r\n <button mat-flat-button\r\n (click)=\"saveInput()\"\r\n [disabled]=\"((validationErrors$|async)||[]).length>0\"\r\n color=\"primary\">save new input</button>\r\n }\r\n </mat-toolbar>\r\n\r\n\r\n</mat-card>\r\n"],"names":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AjBhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,EAAA,OAAA,EACnB;wBACP,SAAS;wBACT,aAAa;wBACb,eAAe;wBACf,aAAa;wBACb,gBAAgB;wBAChB,gBAAgB;wBAChB,cAAc;wBACd,uBAAuB;wBACvB,2BAA2B;qBAC5B,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,wjEAAA,EAAA,MAAA,EAAA,CAAA,mIAAA,CAAA,EAAA;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { output, Input, Optional, Self, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
4
4
|
import { Subject } from 'rxjs';
|
|
5
|
-
import {
|
|
5
|
+
import { l as DataTreeComponent } from './ngx-t-forms-ngx-t-forms-u_kigDid.mjs';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
7
7
|
import * as i1 from '@angular/forms';
|
|
8
8
|
|
|
@@ -32,7 +32,7 @@ class MapMatOptionsKeys {
|
|
|
32
32
|
this.value = null;
|
|
33
33
|
this.formInputs = [];
|
|
34
34
|
// -- Outputs --
|
|
35
|
-
this.valueChanged =
|
|
35
|
+
this.valueChanged = output();
|
|
36
36
|
this.onTouched = () => { };
|
|
37
37
|
if (this.ngControl) {
|
|
38
38
|
this.ngControl.valueAccessor = this;
|
|
@@ -94,19 +94,19 @@ class MapMatOptionsKeys {
|
|
|
94
94
|
this.valueChanged.emit(path);
|
|
95
95
|
this.stateChanges.next();
|
|
96
96
|
}
|
|
97
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
98
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
97
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: MapMatOptionsKeys, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
98
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.12", type: MapMatOptionsKeys, isStandalone: true, selector: "lib-map-mat-options-keys", inputs: { disabled: "disabled", errors: "errors", value: "value", formInputs: "formInputs", mapToData: "mapToData" }, outputs: { valueChanged: "valueChanged" }, host: { properties: { "id": "id" } }, providers: [{ provide: MatFormFieldControl, useExisting: MapMatOptionsKeys }], ngImport: i0, template: "<div class=\"lib-map-mat-options-keys\">\r\n <lib-data-tree\r\n [data]=\"mapToData\"\r\n [value]=\"value || ''\"\r\n [formInputs]=\"formInputs\"\r\n (pathChanged)=\"pathChanged($event)\">\r\n </lib-data-tree>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "component", type: DataTreeComponent, selector: "lib-data-tree", inputs: ["data", "value", "formInputs"], outputs: ["pathChanged"] }, { kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
99
99
|
}
|
|
100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: MapMatOptionsKeys, decorators: [{
|
|
101
101
|
type: Component,
|
|
102
|
-
args: [{ selector: 'lib-map-mat-options-keys', imports: [DataTreeComponent, CommonModule], providers: [{ provide: MatFormFieldControl, useExisting: MapMatOptionsKeys }], standalone: true,
|
|
102
|
+
args: [{ selector: 'lib-map-mat-options-keys', imports: [DataTreeComponent, CommonModule], providers: [{ provide: MatFormFieldControl, useExisting: MapMatOptionsKeys }], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
103
|
+
'[id]': 'id',
|
|
104
|
+
}, template: "<div class=\"lib-map-mat-options-keys\">\r\n <lib-data-tree\r\n [data]=\"mapToData\"\r\n [value]=\"value || ''\"\r\n [formInputs]=\"formInputs\"\r\n (pathChanged)=\"pathChanged($event)\">\r\n </lib-data-tree>\r\n</div>\r\n" }]
|
|
103
105
|
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
104
106
|
type: Optional
|
|
105
107
|
}, {
|
|
106
108
|
type: Self
|
|
107
|
-
}] }, { type: i0.ElementRef }], propDecorators: {
|
|
108
|
-
type: HostBinding
|
|
109
|
-
}], disabled: [{
|
|
109
|
+
}] }, { type: i0.ElementRef }], propDecorators: { disabled: [{
|
|
110
110
|
type: Input
|
|
111
111
|
}], errors: [{
|
|
112
112
|
type: Input
|
|
@@ -116,9 +116,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
116
116
|
type: Input
|
|
117
117
|
}], mapToData: [{
|
|
118
118
|
type: Input
|
|
119
|
-
}], valueChanged: [{
|
|
120
|
-
type: Output
|
|
121
|
-
}] } });
|
|
119
|
+
}], valueChanged: [{ type: i0.Output, args: ["valueChanged"] }] } });
|
|
122
120
|
|
|
123
121
|
export { MapMatOptionsKeys };
|
|
124
|
-
//# sourceMappingURL=ngx-t-forms-map-mat-options-keys-
|
|
122
|
+
//# sourceMappingURL=ngx-t-forms-map-mat-options-keys-B6hJ7Io5.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-map-mat-options-keys-B6hJ7Io5.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/map-mat-options-keys/map-mat-options-keys.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/map-mat-options-keys/map-mat-options-keys.html"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n Input,\r\n OnDestroy,\r\n Optional,\r\n Self,\r\n output,\r\n} from '@angular/core';\r\nimport { NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { Subject } from 'rxjs';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\nimport { FormColumnInputs, TreeNode } from 'ngx-t-forms-types';\r\nimport { DataTreeComponent } from '../api-value-access-rules/elements/data-tree/data-tree.component';\r\nimport { CommonModule } from '@angular/common';\r\n\r\n@Component({\r\n selector: 'lib-map-mat-options-keys',\r\n imports: [DataTreeComponent,CommonModule],\r\n providers: [{ provide: MatFormFieldControl, useExisting: MapMatOptionsKeys }],\r\n standalone: true,\r\n templateUrl: './map-mat-options-keys.html',\r\n styleUrl: './map-mat-options-keys.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n '[id]': 'id',\r\n },\r\n})\r\nexport class MapMatOptionsKeys implements MatFormFieldControl<TreeNode[] | string | null>, OnDestroy {\r\n static nextId = 0;\r\n private _mapToData: unknown;\r\n // -- MatFormFieldControl Boilerplate --\r\n stateChanges = new Subject<void>();\r\n id = `lib-map-mat-options-keys-${MapMatOptionsKeys.nextId++}`;\r\n placeholder = '';\r\n focused = false;\r\n touched = false;\r\n controlType?: string | undefined;\r\n autofilled?: boolean | undefined;\r\n userAriaDescribedBy?: string | undefined;\r\n disableAutomaticLabeling?: boolean | undefined;\r\n required = false;\r\n\r\n // -- Inputs --\r\n @Input() disabled = false;\r\n @Input() errors: IConfigElementError[] | undefined = [];\r\n @Input() value: TreeNode[] | string | null = null;\r\n @Input() formInputs: FormColumnInputs[] = [];\r\n @Input() set mapToData(value: unknown){\r\n this._mapToData = value;\r\n console.error('mapToData changed', value);\r\n };\r\n get mapToData(): unknown {\r\n return this._mapToData;\r\n }\r\n\r\n // -- Outputs --\r\n readonly valueChanged = output<TreeNode[] | string | null>();\r\n\r\n constructor(\r\n @Optional() @Self() public ngControl: NgControl,\r\n private _elementRef: ElementRef<HTMLElement>\r\n ) {\r\n if (this.ngControl) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.stateChanges.complete();\r\n }\r\n\r\n // -- Getters for Template --\r\n get empty(): boolean {\r\n if (this.value == null) return true;\r\n if (typeof this.value === 'string') return this.value === '';\r\n return Array.isArray(this.value) && this.value.length === 0;\r\n }\r\n\r\n get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n get errorState(): boolean {\r\n const hasError =\r\n !!this.ngControl?.control?.errors ||\r\n ((this.errors?.length ?? 0) > 0 && this.touched);\r\n return (!this.value && !!this.required) || hasError;\r\n }\r\n\r\n // -- MatFormFieldControl Methods --\r\n setDescribedByIds(ids: string[]): void {\r\n if (this._elementRef?.nativeElement) {\r\n const controlElement = this._elementRef.nativeElement.querySelector(\r\n '.lib-map-mat-options-keys'\r\n );\r\n if (controlElement) {\r\n controlElement.setAttribute('aria-describedby', ids.join(' '));\r\n }\r\n }\r\n }\r\n\r\n onContainerClick(_event: MouseEvent): void {\r\n this.markAsTouched();\r\n this.stateChanges.next();\r\n }\r\n\r\n onTouched = (): void => { };\r\n\r\n markAsTouched(): void {\r\n if (!this.touched) {\r\n this.onTouched();\r\n this.touched = true;\r\n }\r\n }\r\n\r\n // -- ControlValueAccessor --\r\n writeValue(value: TreeNode[] | string | null): void {\r\n this.value = value;\r\n this.stateChanges.next();\r\n }\r\n\r\n registerOnChange(_fn: (value: TreeNode[] | string | null) => void): void {\r\n // Handled by parent or ngControl usually, but good practice to have stub\r\n }\r\n\r\n registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n pathChanged(path: TreeNode[] | string): void {\r\n if (!Array.isArray(path) && typeof path !== 'string') return;\r\n this.value = path;\r\n this.valueChanged.emit(path);\r\n this.stateChanges.next();\r\n }\r\n\r\n \r\n}\r\n","<div class=\"lib-map-mat-options-keys\">\r\n <lib-data-tree\r\n [data]=\"mapToData\"\r\n [value]=\"value || ''\"\r\n [formInputs]=\"formInputs\"\r\n (pathChanged)=\"pathChanged($event)\">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