ngx-t-forms 2.0.16 → 2.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{ngx-t-forms-api-value-access-rules.component-DADGz7pX.mjs → ngx-t-forms-api-value-access-rules.component-Drlk8YPy.mjs} +13 -13
- package/fesm2022/ngx-t-forms-api-value-access-rules.component-Drlk8YPy.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-BkkHK5vI.mjs → ngx-t-forms-calculated-field-rules.component-Byim7p5A.mjs} +8 -7
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-Byim7p5A.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-CHnQQdI8.mjs → ngx-t-forms-chip-options-creator-editor.component-DJdo617E.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-CHnQQdI8.mjs.map → ngx-t-forms-chip-options-creator-editor.component-DJdo617E.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-AhbjCCQv.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-D9iDMGP4.mjs} +6 -6
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-D9iDMGP4.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-data-source-picker.component-BOlk7nkl.mjs → ngx-t-forms-data-source-picker.component-baq9XVW_.mjs} +8 -9
- package/fesm2022/ngx-t-forms-data-source-picker.component-baq9XVW_.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-Bc-qTS2m.mjs → ngx-t-forms-document-list-label-config-editor.component-O0z6NtqG.mjs} +6 -7
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-O0z6NtqG.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-form-input-selector.component-BuVzRUkY.mjs → ngx-t-forms-form-input-selector.component-DdTRH1a0.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-form-input-selector.component-BuVzRUkY.mjs.map → ngx-t-forms-form-input-selector.component-DdTRH1a0.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-json-view.component-hCrrYu82.mjs → ngx-t-forms-form-json-view.component-BAcSfl3f.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-json-view.component-hCrrYu82.mjs.map → ngx-t-forms-form-json-view.component-BAcSfl3f.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-form-section-stepper.component-npSCBik4.mjs +257 -0
- package/fesm2022/ngx-t-forms-form-section-stepper.component-npSCBik4.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-DuXf9zC_.mjs → ngx-t-forms-forms-builder-menu.component-DIHHOIPI.mjs} +12 -12
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-DuXf9zC_.mjs.map → ngx-t-forms-forms-builder-menu.component-DIHHOIPI.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-input-editor.component-C5cPOIhT.mjs → ngx-t-forms-input-editor.component-BCRKxzzO.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-input-editor.component-C5cPOIhT.mjs.map → ngx-t-forms-input-editor.component-BCRKxzzO.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-C9Hd21i1.mjs → ngx-t-forms-mat-chip-list-editor.component-CK-W-ltG.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-C9Hd21i1.mjs.map → ngx-t-forms-mat-chip-list-editor.component-CK-W-ltG.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-slider-editor.component-9K8e2gqm.mjs → ngx-t-forms-mat-slider-editor.component-T764zgZ1.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mat-slider-editor.component-9K8e2gqm.mjs.map → ngx-t-forms-mat-slider-editor.component-T764zgZ1.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-CbYV5fCZ.mjs → ngx-t-forms-mat-slider-toggle-editor.component-DfTrKkE_.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-CbYV5fCZ.mjs.map → ngx-t-forms-mat-slider-toggle-editor.component-DfTrKkE_.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-DynxybEE.mjs → ngx-t-forms-missing-form-configs.component-BXGNkL4Z.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-DynxybEE.mjs.map → ngx-t-forms-missing-form-configs.component-BXGNkL4Z.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-C1zx7OZB.mjs → ngx-t-forms-mscoa-segment-config.component-DqCaJoe6.mjs} +5 -6
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-DqCaJoe6.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-ngx-t-forms-BX1gh-MK.mjs → ngx-t-forms-ngx-t-forms-B4C0NbAb.mjs} +593 -233
- package/fesm2022/ngx-t-forms-ngx-t-forms-B4C0NbAb.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-pipeline-generator.component-CLs9AZ8p.mjs +727 -0
- package/fesm2022/ngx-t-forms-pipeline-generator.component-CLs9AZ8p.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-required-inputs.component-DDHYfkyu.mjs +189 -0
- package/fesm2022/ngx-t-forms-required-inputs.component-DDHYfkyu.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-CDraedkm.mjs → ngx-t-forms-rest-api-call-setup.component-BqiD8UGC.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-CDraedkm.mjs.map → ngx-t-forms-rest-api-call-setup.component-BqiD8UGC.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-section-report.component-DFvcLFZn.mjs → ngx-t-forms-section-report.component-Cl3KWTOq.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-section-report.component-DFvcLFZn.mjs.map → ngx-t-forms-section-report.component-Cl3KWTOq.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-Cj7fqo70.mjs → ngx-t-forms-selection-options-editor.component-BZFa1mmi.mjs} +5 -5
- package/fesm2022/ngx-t-forms-selection-options-editor.component-BZFa1mmi.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-DQA2XovD.mjs +171 -0
- package/fesm2022/ngx-t-forms-t-workflow-picker.component-DQA2XovD.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-validators-config.component-BkzKKK07.mjs +218 -0
- package/fesm2022/ngx-t-forms-validators-config.component-BkzKKK07.mjs.map +1 -0
- package/fesm2022/ngx-t-forms.mjs +1 -1
- package/lib/components/t-dynamic-data-edit/elements/pipeline-generator/pipeline-generator.component.d.ts +1 -3
- package/lib/components/t-dynamic-data-edit/elements/t-workflow-picker/t-workflow-picker.component.d.ts +44 -8
- package/lib/components/t-form-input/elements/Geo-location-form-input/geo-location.component.d.ts +4 -1
- package/lib/components/t-form-input/elements/auto-complete-input-element/auto-complete-input-element.component.d.ts +4 -1
- package/lib/components/t-form-input/elements/basic-input-input-element/basic-input-input-element.component.d.ts +4 -1
- package/lib/components/t-form-input/elements/date-picker-input-element/date-picker-input-element.component.d.ts +4 -1
- package/lib/components/t-form-input/elements/date-range-picker-input-element/date-range-picker-input-element.component.d.ts +4 -1
- package/lib/components/t-form-input/elements/document-picker/core/document-picker-reactive-input/document-picker-reactive-input.component.d.ts +47 -0
- package/lib/components/t-form-input/elements/document-picker/document-picker.component.d.ts +15 -0
- package/lib/components/t-form-input/elements/editor-input-element/editor-input-element.component.d.ts +4 -1
- package/lib/components/t-form-input/elements/file-upload-input-element/file-upload-input-element.component.d.ts +4 -1
- package/lib/components/t-form-input/elements/image-capture-input-element/image-capture-input-element.component.d.ts +4 -1
- package/lib/components/t-form-input/elements/mscoa-form-input/mscoa-form-input.component.d.ts +4 -1
- package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-component-store.service.d.ts +0 -1
- package/lib/components/t-form-input/elements/multiple-input-input-element/core/multiple-input-table/multiple-input-table.component.d.ts +1 -0
- package/lib/components/t-form-input/elements/multiple-input-input-element/core/multiple-input-table-view/multiple-input-table-view.component.d.ts +9 -2
- package/lib/components/t-form-input/elements/multiple-input-input-element/multiple-input-input-element.component.d.ts +4 -1
- package/lib/components/t-form-input/elements/select-input-element/select-input-element.component.d.ts +4 -1
- package/lib/components/t-form-input/elements/signature-input-element/signature-input-element.component.d.ts +4 -1
- package/lib/components/t-form-input/elements/textarea-input-element/textarea-input-element.component.d.ts +4 -1
- package/lib/components/t-form-input/elements/toggle-input-element/toggle-input-element.component.d.ts +4 -1
- package/lib/components/t-form-input/t-form-input.component.d.ts +2 -1
- package/lib/components/user-form-stepper/user-form-stepper.component.d.ts +2 -0
- package/lib/injection-tokens/index.d.ts +3 -3
- package/lib/services/core/t-input-controller/functions/configureCols.d.ts +1 -1
- package/lib/shared/pipes/format-Data.pipe.d.ts +8 -0
- package/lib/shared/pipes/index.d.ts +2 -0
- package/package.json +2 -2
- package/public-api.d.ts +1 -0
- package/fesm2022/ngx-t-forms-api-value-access-rules.component-DADGz7pX.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-BkkHK5vI.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-AhbjCCQv.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-data-source-picker.component-BOlk7nkl.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-Bc-qTS2m.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-form-section-stepper.component-CR3gyw3D.mjs +0 -253
- package/fesm2022/ngx-t-forms-form-section-stepper.component-CR3gyw3D.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-C1zx7OZB.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-BX1gh-MK.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-pipeline-generator.component-CmSkYW71.mjs +0 -780
- package/fesm2022/ngx-t-forms-pipeline-generator.component-CmSkYW71.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-required-inputs.component-QsOGfmug.mjs +0 -189
- package/fesm2022/ngx-t-forms-required-inputs.component-QsOGfmug.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-selection-options-editor.component-Cj7fqo70.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-validators-config.component-DPD3QcOu.mjs +0 -218
- package/fesm2022/ngx-t-forms-validators-config.component-DPD3QcOu.mjs.map +0 -1
- package/lib/components/t-form-input/elements/select-table-input/elements/input-table/input-table.component.d.ts +0 -29
- package/lib/components/t-form-input/elements/select-table-input/select-table-input.component.d.ts +0 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-document-list-label-config-editor.component-O0z6NtqG.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/document-list-label-config-editor/document-list-label-config-editor.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/document-list-label-config-editor/document-list-label-config-editor.component.html"],"sourcesContent":["import { Component, ElementRef, EventEmitter, HostBinding, Input, Optional, Output, Self } from '@angular/core';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\nimport { Subject } from 'rxjs';\r\nimport { DocumentLitsLabelConfigInterface, DocumentLitsLabelConfigInterfaceValueType, ElementEditorInnerSectionElementInterface, FormColumnInputs } from 'ngx-t-forms-types';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { NgControl } from '@angular/forms';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatCardModule } from '@angular/material/card';\r\n\r\nimport { MatSliderToggleEditorComponent } from '../mat-slider-toggle-editor/mat-slider-toggle-editor.component';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatChipListEditorComponent } from '../mat-chip-list-editor/mat-chip-list-editor.component';\r\nimport { MatAutocompleteModule, MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport {\r\n CdkDragDrop,\r\n CdkDrag,\r\n CdkDropList,\r\n} from '@angular/cdk/drag-drop';\r\nimport { _isEqual } from '../../../../shared/functions/isEqual';\r\nimport { ClipboardModule } from '@angular/cdk/clipboard';\r\n@Component({\r\n selector: 'lib-document-list-label-config-editor',\r\n imports: [CommonModule, MatListModule, MatTooltipModule,ClipboardModule, MatSliderToggleEditorComponent,\r\n MatChipListEditorComponent,\r\n MatFormFieldModule,\r\n MatButtonModule,\r\n MatAutocompleteModule,\r\n MatInputModule,\r\n MatIconModule, MatCardModule, CdkDropList, CdkDrag],\r\n templateUrl: './document-list-label-config-editor.component.html',\r\n styleUrl: './document-list-label-config-editor.component.css',\r\n providers: [{ provide: MatFormFieldControl, useExisting: DocumentListLabelConfigEditorComponent }],\r\n})\r\nexport class DocumentListLabelConfigEditorComponent implements MatFormFieldControl<Array<DocumentLitsLabelConfigInterface>> {\r\n\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n @Input() errors: IConfigElementError[] | undefined = [];\r\n @HostBinding() id = `lib-document-list-label-config-editor-${DocumentListLabelConfigEditorComponent.nextId++}`;\r\n\r\n placeholder: string = ''\r\n constructor(@Optional() @Self() public ngControl: NgControl, private _elementRef: ElementRef<HTMLElement>) { }\r\n focused: boolean = false;\r\n get empty() {\r\n return !this.value\r\n }\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n required: boolean = false;\r\n get errorState(): boolean {\r\n const hasError = !!this.ngControl?.control?.errors || (this.errors || []).length > 0 && this.touched\r\n return !this.value && !!this.required || hasError\r\n }\r\n\r\n controlType?: string | undefined;\r\n autofilled?: boolean | undefined;\r\n userAriaDescribedBy?: string | undefined;\r\n disableAutomaticLabeling?: boolean | undefined;\r\n setDescribedByIds(ids: string[]) {\r\n // Ensure the component view is initialized\r\n if (this._elementRef && this._elementRef.nativeElement) {\r\n const controlElement = this._elementRef.nativeElement.querySelector('.lib-document-list-label-config-editor');\r\n // Check if the controlElement exists before attempting to set its attribute\r\n if (controlElement) {\r\n controlElement.setAttribute('aria-describedby', ids.join(' '));\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 touched: boolean = false;\r\n onTouched = () => { };\r\n markAsTouched() {\r\n console.log('markAsTouched')\r\n if (!this.touched) {\r\n this.onTouched();\r\n this.touched = true;\r\n }\r\n }\r\n\r\n\r\n\r\n\r\n _value: Array<DocumentLitsLabelConfigInterface> = []\r\n @Input() set value(value: Array<DocumentLitsLabelConfigInterface>) {\r\n\r\n this._value = value as Array<DocumentLitsLabelConfigInterface>\r\n }\r\n get value() {\r\n return this._value\r\n }\r\n\r\n _editorConfig: ElementEditorInnerSectionElementInterface | undefined = undefined\r\n @Input() formInputs: Array<FormColumnInputs> = []\r\n @Input() disabled: boolean = false\r\n @Input() mapToData: string[] | undefined = []\r\n @Output() valueChange = new EventEmitter<any>()\r\n @Input() set editorConfig(config: ElementEditorInnerSectionElementInterface | undefined) {\r\n this._editorConfig = (config)\r\n }\r\n get editorConfig() {\r\n return this._editorConfig\r\n }\r\nget filteredControlNames() {\r\n // Handle case where mapToData is undefined\r\n if (!this.mapToData) return [];\r\n \r\n const searchTerm = this.labelInEdit?.formControlName;\r\n \r\n // If searchTerm is undefined or empty, return all options\r\n if (!searchTerm || searchTerm.trim() === '') {\r\n return this.mapToData;\r\n }\r\n \r\n const lowerSearchTerm = searchTerm.toLowerCase();\r\n \r\n return this.mapToData.filter(option => {\r\n // Skip null/undefined options\r\n if (option == null) return false;\r\n \r\n // Convert option to string for comparison\r\n const optionStr = String(option).toLowerCase();\r\n \r\n // Flexible matching using includes (less rigid than exact RegExp)\r\n if (optionStr.includes(lowerSearchTerm)) return true;\r\n \r\n // Also match if any word in the option starts with the search term\r\n // This helps with partial word matching\r\n return optionStr.split(/\\s+/).some(word => \r\n word.startsWith(lowerSearchTerm)\r\n );\r\n });\r\n}\r\n saveHeader() {\r\n\r\n const formControlName = this.labelInEdit?.formControlName\r\n const index = this.value.findIndex((item) => item.formControlName === formControlName)\r\n const v = [...this.value]\r\n if (index !== -1) {\r\n v[index] = this.labelInEdit as DocumentLitsLabelConfigInterface\r\n\r\n\r\n\r\n } else {\r\n\r\n v.push(this.labelInEdit as DocumentLitsLabelConfigInterface)\r\n\r\n\r\n }\r\n console.error('saveHeader', v)\r\n this.value = v\r\n this.valueChange.emit(v)\r\n this.labelInEdit = null\r\n\r\n\r\n }\r\n removeLabel(label: DocumentLitsLabelConfigInterface) {\r\n this.value = this.value.filter(\r\n (item) => item.formControlName !== label.formControlName\r\n )\r\n this.valueChange.emit(this.value)\r\n }\r\n labelInEdit: DocumentLitsLabelConfigInterface | null | Record<string, any> = null\r\n get labelSaveDisabled() {\r\n if (!this.labelInEdit) return true\r\n if (!this.labelInEdit.label) return true\r\n if (!this.labelInEdit.formControlName) return true\r\n if (!this.labelInEdit.valueType) return true\r\n\r\n return false\r\n }\r\n get valueTypes() {\r\n return Object.keys(DocumentLitsLabelConfigInterfaceValueType).map((key) => {\r\n return {\r\n label: key.replace(/([A-Z])/g, ' $1').trim().toLowerCase().replace(/^\\w/, c => c.toUpperCase()),\r\n value: key\r\n }\r\n })\r\n }\r\n nameChange(event: any) {\r\n const value = event.target?.value;\r\n\r\n this.labelInEdit = {\r\n ...this.labelInEdit,\r\n label: value\r\n }\r\n\r\n\r\n }\r\n formControlNameChange(event: any) {\r\n const value = event.target?.value;\r\n\r\n this.labelInEdit = {\r\n ...this.labelInEdit,\r\n formControlName: value\r\n }\r\n }\r\n valueTypeChanged(event: any) {\r\n const value = event\r\n\r\n this.labelInEdit = {\r\n ...this.labelInEdit,\r\n valueType: value\r\n }\r\n\r\n }\r\n isHiddenChanged(event: boolean) {\r\n\r\n\r\n this.labelInEdit = {\r\n ...this.labelInEdit,\r\n isHidden: event\r\n }\r\n\r\n }\r\n formControlSelected(event: MatAutocompleteSelectedEvent) {\r\n\r\n const formControlName = event.option.value\r\n this.labelInEdit = {\r\n ...this.labelInEdit,\r\n formControlName\r\n }\r\n\r\n\r\n }\r\n reorderArray(arr: DocumentLitsLabelConfigInterface[], fromIndex: number, toIndex: number): DocumentLitsLabelConfigInterface[] {\r\n const element = arr[fromIndex];\r\n if (!element) return arr\r\n const newArr = [...arr];\r\n newArr.splice(fromIndex, 1);\r\n newArr.splice(toIndex, 0, element);\r\n return newArr;\r\n }\r\n\r\n drop(event: CdkDragDrop<DocumentLitsLabelConfigInterface[]>) {\r\n this.value = [... this.reorderArray(this.value, event.previousIndex, event.currentIndex)] \r\n this.valueChange.emit(this.value)\r\n }\r\n copyToClipboard(value: string) {\r\n \r\n }\r\n}\r\n","<mat-nav-list cdkDropList [cdkDropListData]=\"value\"\r\n(cdkDropListDropped)=\"drop($event)\" class=\"list\" >\r\n <h5 matSubheader class=\"api-list-header\">\r\n\r\n List header config\r\n </h5>\r\n @if((value).length === 0){\r\n <p class=\"no-api-list\">\r\n No header configured. Add one to get started.\r\n </p>\r\n }\r\n @for (label of value||[]; track label.formControlName) {\r\n\r\n <mat-list-item cdkDrag style=\"background: azure;\" \r\n [matTooltip]=\"'click to copy ' + label.formControlName\"\r\n [cdkCopyToClipboard]=\"label.formControlName\"\r\n matTooltipPosition=\"before\" class=\"api-list-item\">\r\n\r\n <mat-icon matListItemIcon>\r\n view_column\r\n </mat-icon>\r\n <div matListItemTitle>\r\n <div style=\"line-height: normal;\">\r\n <small style=\"white-space: nowrap;overflow: hidden;text-overflow: ellipsis;\">\r\n <strong>\r\n {{label.label}}\r\n\r\n </strong>\r\n </small>\r\n\r\n </div>\r\n <div style=\"line-height: normal;opacity: 0.6;\">\r\n <small>\r\n <strong><code>{{label.formControlName}}</code></strong>: {{label.valueType}}\r\n </small>\r\n </div>\r\n </div>\r\n\r\n <button [disabled]=\"disabled\" matListItemMeta (click)=\"removeLabel(label)\" mat-icon-button>\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n\r\n </mat-list-item>\r\n <mat-divider>\r\n </mat-divider>\r\n\r\n\r\n\r\n }\r\n\r\n\r\n</mat-nav-list>\r\n<br>\r\n@if(labelInEdit !== null){\r\n<mat-card appearance=\"outlined\" class=\"data-source-card\">\r\n <mat-card-content>\r\n\r\n <label for=\"fb27a2ec-e41f-45f0-916b-f2ef303c2344\">\r\n Form Control Name\r\n </label>\r\n <input ngDefaultControl type=\"text\" \r\n [id]=\"'fb27a2ec-e41f-45f0-916b-f2ef303c2344'\"\r\n placeholder=\"Pick one\" aria-label=\"form control\" \r\n [value]=\"labelInEdit.formControlName||''\" \r\n (input)=\"formControlNameChange($event)\"\r\n [matAutocomplete]=\"auto\">\r\n <mat-autocomplete (optionSelected)=\"formControlSelected($event)\" autoActiveFirstOption #auto=\"matAutocomplete\">\r\n @for (option of filteredControlNames ; track option) {\r\n <mat-option [value]=\"option\">{{option}}</mat-option>\r\n }\r\n </mat-autocomplete>\r\n\r\n\r\n <label for=\"629879d6-763b-4f98-b67f-67bbe91045ea\">\r\n Name\r\n </label>\r\n <input (input)=\"nameChange($event)\" [value]=\"labelInEdit.label||''\" \r\n [id]=\"'4002a77c-9b01-4cdb-b4ce-fdad5a3597d7'\" [placeholder]=\"'Enter label name'\">\r\n <label for=\"bbdad0dc-f92e-4359-92af-a3ff90d0924b\">\r\n value Type\r\n </label>\r\n <lib-mat-chip-list-editor [errors]=\"[]\" [id]=\"'bbdad0dc-f92e-4359-92af-a3ff90d0924b'\"\r\n [value]=\"labelInEdit.valueType\" [options]=\"valueTypes\"\r\n (valueChange)=\"valueTypeChanged($event)\"></lib-mat-chip-list-editor>\r\n\r\n\r\n <lib-mat-slider-toggle-editor [label]=\"'is Hidden '\" [id]=\"'7c0b575c-c41c-4525-ac7e-dc4b9c351009'\"\r\n (valueChange)=\"isHiddenChanged(!!$event)\" [value]=\"labelInEdit.isHidden\" [errors]=\"[]\">\r\n </lib-mat-slider-toggle-editor>\r\n\r\n </mat-card-content>\r\n <br>\r\n <mat-divider></mat-divider>\r\n <mat-card-actions>\r\n <button mat-flat-button color=\"primary\"\r\n [disabled]=\"labelSaveDisabled\"\r\n (click)=\"saveHeader()\">Save Header</button>\r\n <span class=\"spacer\"></span>\r\n <button mat-button (click)=\"labelInEdit = null\" color=\"warn\">Cancel</button>\r\n </mat-card-actions>\r\n</mat-card>\r\n}\r\n\r\n@if (labelInEdit === null) {\r\n<button [disabled]=\"disabled\" (click)=\"labelInEdit={}\" style=\"width: 100%;\" class=\"AddButton\" mat-stroked-button color=\"primary\">\r\n Add new column\r\n</button>\r\n}"],"names":["i2","i3","i4","i6","i7","i8","i9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;MAsCa,sCAAsC,CAAA;aAE1C,IAAM,CAAA,MAAA,GAAG,CAAH,CAAK;IAMlB,WAAuC,CAAA,SAAoB,EAAU,WAAoC,EAAA;QAAlE,IAAS,CAAA,SAAA,GAAT,SAAS;QAAqB,IAAW,CAAA,WAAA,GAAX,WAAW;AALhF,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;QACzB,IAAM,CAAA,MAAA,GAAsC,EAAE;AACxC,QAAA,IAAA,CAAA,EAAE,GAAG,CAAyC,sCAAA,EAAA,sCAAsC,CAAC,MAAM,EAAE,EAAE;QAE9G,IAAW,CAAA,WAAA,GAAW,EAAE;QAExB,IAAO,CAAA,OAAA,GAAY,KAAK;QAOxB,IAAQ,CAAA,QAAA,GAAY,KAAK;QAyBzB,IAAO,CAAA,OAAA,GAAY,KAAK;AACxB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAK,GAAI;QAYrB,IAAM,CAAA,MAAA,GAA4C,EAAE;QASpD,IAAa,CAAA,aAAA,GAA0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BAAA,EAAA,iBAAA,EAAA,mBAAA,EAAA,yBAAA,EAAA,iBAAA,EAAA,0BAAA,EAAA,qBAAA,EAAA,yBAAA,EAAA,cAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,eAAA,EAAA,gBAAA,EAAA,cAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAKzC,sCAAsC,EAAA,UAAA,EAAA,CAAA;kBAblD,SAAS;+BACE,uCAAuC,EAAA,OAAA,EACxC,CAAC,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAC,eAAe,EAAE,8BAA8B;wBACrG,0BAA0B;wBAC1B,kBAAkB;wBAClB,eAAe;wBACf,qBAAqB;wBACrB,cAAc;AACd,wBAAA,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,OAAO,CAAC,EAAA,SAAA,EAG1C,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,sCAAwC,EAAE,CAAC,EAAA,QAAA,EAAA,mwHAAA,EAAA,MAAA,EAAA,CAAA,m1BAAA,CAAA,EAAA;;0BAUrF;;0BAAY;kEAJhB,MAAM,EAAA,CAAA;sBAAd;gBACc,EAAE,EAAA,CAAA;sBAAhB;gBAkDY,KAAK,EAAA,CAAA;sBAAjB;gBASQ,UAAU,EAAA,CAAA;sBAAlB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,SAAS,EAAA,CAAA;sBAAjB;gBACS,WAAW,EAAA,CAAA;sBAApB;gBACY,YAAY,EAAA,CAAA;sBAAxB;;;;;"}
|
|
@@ -3,17 +3,17 @@ import { EventEmitter, Output, Input, HostBinding, Optional, Self, Component } f
|
|
|
3
3
|
import { Subject, BehaviorSubject, take, tap } from 'rxjs';
|
|
4
4
|
import * as i2 from '@angular/common';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
6
|
-
import { M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-
|
|
6
|
+
import { M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-B4C0NbAb.mjs';
|
|
7
7
|
import { map } from 'rxjs/operators';
|
|
8
8
|
import { g as getInputIllustration } from './ngx-t-forms-getInputIllustration-GCSKx5e5.mjs';
|
|
9
9
|
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
10
10
|
import * as i1 from '@angular/forms';
|
|
11
11
|
import * as i4 from '@angular/material/divider';
|
|
12
12
|
import * as i4$1 from '@angular/material/grid-list';
|
|
13
|
-
import * as
|
|
14
|
-
import * as i6
|
|
13
|
+
import * as i5 from '@angular/material/icon';
|
|
14
|
+
import * as i6 from '@angular/material/list';
|
|
15
15
|
import * as i7 from '@angular/material/core';
|
|
16
|
-
import * as
|
|
16
|
+
import * as i4$2 from '@angular/material/tooltip';
|
|
17
17
|
|
|
18
18
|
class FormInputSelectorComponent {
|
|
19
19
|
static { this.nextId = 0; }
|
|
@@ -106,7 +106,7 @@ class FormInputSelectorComponent {
|
|
|
106
106
|
return getInputIllustration(input.element);
|
|
107
107
|
}
|
|
108
108
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FormInputSelectorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
109
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: FormInputSelectorComponent, isStandalone: true, selector: "lib-form-input-selector", inputs: { errors: "errors", value: "value", formInputs: "formInputs", disabled: "disabled" }, outputs: { change: "change" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: FormInputSelectorComponent }], ngImport: i0, template: "\r\n\r\n <mat-nav-list class=\"inputList\"> \r\n @for(input of filteredInputs$|async;track input.id){\r\n <mat-list-item \r\n [disabled]=\"disabled\"\r\n (click)=\"selectInput(input.id)\" \r\n [activated]=\"input.selected\"\r\n matRipple matTooltip=\"Select form input\">\r\n <img matListItemAvatar \r\n style=\"margin-left: 8px;\" [src]=\"input.illustration \"\r\n [alt]=\"input.label\">\r\n \r\n <span matListItemTitle >\r\n {{ input.label}}\r\n </span>\r\n <span *ngIf=\"input.multipleInputInEditId\" matListItemLine>\r\n Item List Input\r\n </span>\r\n <span matListItemMeta>\r\n <mat-icon [color]=\"input.selected?'primary':''\">\r\n \r\n {{input.selected?'check_circle':'radio_button_unchecked'}}\r\n \r\n </mat-icon>\r\n </span>\r\n \r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n @if((filteredInputs$|async)?.length===0){\r\n <mat-list-item>\r\n <span matLine>\r\n No form inputs found\r\n </span>\r\n </mat-list-item>\r\n }\r\n </mat-nav-list>\r\n\r\n", styles: ["mat-nav-list{max-height:600px;overflow:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i4.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i4$1.MatLine, selector: "[mat-line], [matLine]" }, { kind: "component", type:
|
|
109
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: FormInputSelectorComponent, isStandalone: true, selector: "lib-form-input-selector", inputs: { errors: "errors", value: "value", formInputs: "formInputs", disabled: "disabled" }, outputs: { change: "change" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: FormInputSelectorComponent }], ngImport: i0, template: "\r\n\r\n <mat-nav-list class=\"inputList\"> \r\n @for(input of filteredInputs$|async;track input.id){\r\n <mat-list-item \r\n [disabled]=\"disabled\"\r\n (click)=\"selectInput(input.id)\" \r\n [activated]=\"input.selected\"\r\n matRipple matTooltip=\"Select form input\">\r\n <img matListItemAvatar \r\n style=\"margin-left: 8px;\" [src]=\"input.illustration \"\r\n [alt]=\"input.label\">\r\n \r\n <span matListItemTitle >\r\n {{ input.label}}\r\n </span>\r\n <span *ngIf=\"input.multipleInputInEditId\" matListItemLine>\r\n Item List Input\r\n </span>\r\n <span matListItemMeta>\r\n <mat-icon [color]=\"input.selected?'primary':''\">\r\n \r\n {{input.selected?'check_circle':'radio_button_unchecked'}}\r\n \r\n </mat-icon>\r\n </span>\r\n \r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n @if((filteredInputs$|async)?.length===0){\r\n <mat-list-item>\r\n <span matLine>\r\n No form inputs found\r\n </span>\r\n </mat-list-item>\r\n }\r\n </mat-nav-list>\r\n\r\n", styles: ["mat-nav-list{max-height:600px;overflow:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i4.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i4$1.MatLine, selector: "[mat-line], [matLine]" }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i6.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i6.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "directive", type: i6.MatListItemLine, selector: "[matListItemLine]" }, { kind: "directive", type: i6.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i6.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "directive", type: i7.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: i4$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
|
|
110
110
|
}
|
|
111
111
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FormInputSelectorComponent, decorators: [{
|
|
112
112
|
type: Component,
|
|
@@ -130,4 +130,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
130
130
|
}] } });
|
|
131
131
|
|
|
132
132
|
export { FormInputSelectorComponent };
|
|
133
|
-
//# sourceMappingURL=ngx-t-forms-form-input-selector.component-
|
|
133
|
+
//# sourceMappingURL=ngx-t-forms-form-input-selector.component-DdTRH1a0.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-form-input-selector.component-BuVzRUkY.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/form-input-selector/form-input-selector.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/form-input-selector/form-input-selector.component.html"],"sourcesContent":["import { Component, ElementRef, EventEmitter, HostBinding, Input, Optional, Output, Self } from '@angular/core';\r\nimport { FormColumnInputs } from 'ngx-t-forms-types';\r\nimport { BehaviorSubject, Observable, Subject, take, tap } from 'rxjs';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { map } from 'rxjs/operators';\r\nimport { getInputIllustration } from '../../../../shared/functions/getInputIllustration';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { NgControl } from '@angular/forms';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\n\r\ninterface IFormColumnUiList extends FormColumnInputs {\r\n selected: boolean,\r\n illustration: string\r\n}\r\n@Component({\r\n selector: 'lib-form-input-selector',\r\n standalone: true,\r\n imports: [CommonModule, MatModulesModule],\r\n templateUrl: './form-input-selector.component.html',\r\n styleUrl: './form-input-selector.component.css',\r\n providers: [{ provide: MatFormFieldControl, useExisting: FormInputSelectorComponent }],\r\n})\r\nexport class FormInputSelectorComponent implements MatFormFieldControl<string | undefined> {\r\n\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n @Input() errors:IConfigElementError[] |undefined = [];\r\n @HostBinding() id = `lib-form-input-selector-${FormInputSelectorComponent .nextId++}`;\r\n \r\n placeholder: string = ''\r\n constructor(@Optional() @Self() public ngControl: NgControl, private _elementRef: ElementRef<HTMLElement>,) { }\r\n focused: boolean = false;\r\n get empty() {\r\n return !this.value\r\n }\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n required: boolean = false;\r\nget errorState(): boolean {\r\n const hasError = !!this.ngControl?.control?.errors || (this.errors||[]).length > 0 && this.touched\r\n return !this.value && !!this.required || hasError\r\n }\r\n\r\n controlType?: string | undefined;\r\n autofilled?: boolean | undefined;\r\n userAriaDescribedBy?: string | undefined;\r\n disableAutomaticLabeling?: boolean | undefined;\r\n setDescribedByIds(ids: string[]) {\r\n // Ensure the component view is initialized\r\n if (this._elementRef && this._elementRef.nativeElement) {\r\n const controlElement = this._elementRef.nativeElement.querySelector('.lib-form-input-selector');\r\n // Check if the controlElement exists before attempting to set its attribute\r\n if (controlElement) {\r\n controlElement.setAttribute('aria-describedby', ids.join(' '));\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 touched: boolean = false;\r\n onTouched = () => {};\r\n markAsTouched() {\r\n console.log('markAsTouched') \r\n if (!this.touched) {\r\n this.onTouched();\r\n this.touched = true;\r\n }\r\n } \r\n\r\n\r\n\r\n\r\n _value = new BehaviorSubject<string | undefined>(undefined)\r\n @Input() set value(value: string | undefined) {\r\n if (this._value.getValue() === value) {\r\n return\r\n }\r\n this._value.next(value)\r\n }\r\n get value() {\r\n return this._value.getValue()\r\n }\r\n get value$() {\r\n return this._value.asObservable()\r\n\r\n }\r\n @Input() formInputs: Array<FormColumnInputs> = []\r\n @Input() disabled: boolean = false\r\n @Output() change = new EventEmitter<any>()\r\n selectInput(id: string) {\r\n this.value$.pipe(\r\n take(1),\r\n tap((value) => {\r\n if (value === id) {\r\n this.change.emit(undefined)\r\n return;\r\n }\r\n this.change.emit(id)\r\n })\r\n ).subscribe()\r\n\r\n }\r\n get filteredInputs$():Observable<Array<IFormColumnUiList>> {\r\n return this.value$.pipe(\r\n map((value: string | undefined) => {\r\n const inputs = () => {\r\n const selectedInput = this.formInputs.find((input) => input.id === value)\r\n if (selectedInput) {\r\n return [{ ...selectedInput, selected: true , illustration: this.getInputIllustration(selectedInput) }]\r\n }\r\n return this.formInputs.map(input => ({ ...input, selected: false, illustration: this.getInputIllustration(input) }))\r\n }\r\n return inputs().map(\r\n (input) => {\r\n return {\r\n ...input,\r\n illustration: this.getInputIllustration(input)\r\n }\r\n\r\n })}\r\n\r\n )\r\n )\r\n }\r\n getInputIllustration(input: FormColumnInputs) {\r\n return getInputIllustration(input.element)\r\n }\r\n}\r\n","\r\n\r\n <mat-nav-list class=\"inputList\"> \r\n @for(input of filteredInputs$|async;track input.id){\r\n <mat-list-item \r\n [disabled]=\"disabled\"\r\n (click)=\"selectInput(input.id)\" \r\n [activated]=\"input.selected\"\r\n matRipple matTooltip=\"Select form input\">\r\n <img matListItemAvatar \r\n style=\"margin-left: 8px;\" [src]=\"input.illustration \"\r\n [alt]=\"input.label\">\r\n \r\n <span matListItemTitle >\r\n {{ input.label}}\r\n </span>\r\n <span *ngIf=\"input.multipleInputInEditId\" matListItemLine>\r\n Item List Input\r\n </span>\r\n <span matListItemMeta>\r\n <mat-icon [color]=\"input.selected?'primary':''\">\r\n \r\n {{input.selected?'check_circle':'radio_button_unchecked'}}\r\n \r\n </mat-icon>\r\n </span>\r\n \r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n @if((filteredInputs$|async)?.length===0){\r\n <mat-list-item>\r\n <span matLine>\r\n No form inputs found\r\n </span>\r\n </mat-list-item>\r\n }\r\n </mat-nav-list>\r\n\r\n"],"names":["i3","i4","i5","i6"],"mappings":";;;;;;;;;;;;;;;;;MAuBa,0BAA0B,CAAA;aAE9B,IAAM,CAAA,MAAA,GAAG,CAAH,CAAK;IAMlB,WAAuC,CAAA,SAAoB,EAAU,WAAoC,EAAA;QAAlE,IAAS,CAAA,SAAA,GAAT,SAAS;QAAqB,IAAW,CAAA,WAAA,GAAX,WAAW;AALhF,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;QACvB,IAAM,CAAA,MAAA,GAAoC,EAAE;AACxC,QAAA,IAAA,CAAA,EAAE,GAAG,CAA2B,wBAAA,EAAA,0BAA0B,CAAE,MAAM,EAAE,EAAE;QAErF,IAAW,CAAA,WAAA,GAAW,EAAE;QAExB,IAAO,CAAA,OAAA,GAAY,KAAK;QAOxB,IAAQ,CAAA,QAAA,GAAY,KAAK;QAyBzB,IAAO,CAAA,OAAA,GAAY,KAAK;AACxB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAK,GAAG;AAYpB,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,eAAe,CAAqB,SAAS,CAAC;QAclD,IAAU,CAAA,UAAA,GAA4B,EAAE;QACxC,IAAQ,CAAA,QAAA,GAAY,KAAK;AACxB,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,YAAY,EAAO;;AA5D1C,IAAA,IAAI,KAAK,GAAA;AACP,QAAA,OAAO,CAAC,IAAI,CAAC,KAAK;;AAEpB,IAAA,IAAI,gBAAgB,GAAA;QAClB,OAAO,IA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A,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAK7B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBARtC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,cACvB,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,gBAAgB,CAAC,EAAA,SAAA,EAG7B,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,0BAA4B,EAAE,CAAC,EAAA,QAAA,EAAA,m7CAAA,EAAA,MAAA,EAAA,CAAA,gDAAA,CAAA,EAAA;;0BAU1E;;0BAAY;kEAJd,MAAM,EAAA,CAAA;sBAAd;gBACY,EAAE,EAAA,CAAA;sBAAhB;gBAkDY,KAAK,EAAA,CAAA;sBAAjB;gBAaQ,UAAU,EAAA,CAAA;sBAAlB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACS,MAAM,EAAA,CAAA;sBAAf;;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-form-input-selector.component-DdTRH1a0.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/form-input-selector/form-input-selector.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/form-input-selector/form-input-selector.component.html"],"sourcesContent":["import { Component, ElementRef, EventEmitter, HostBinding, Input, Optional, Output, Self } from '@angular/core';\r\nimport { FormColumnInputs } from 'ngx-t-forms-types';\r\nimport { BehaviorSubject, Observable, Subject, take, tap } from 'rxjs';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { map } from 'rxjs/operators';\r\nimport { getInputIllustration } from '../../../../shared/functions/getInputIllustration';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { NgControl } from '@angular/forms';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\n\r\ninterface IFormColumnUiList extends FormColumnInputs {\r\n selected: boolean,\r\n illustration: string\r\n}\r\n@Component({\r\n selector: 'lib-form-input-selector',\r\n standalone: true,\r\n imports: [CommonModule, MatModulesModule],\r\n templateUrl: './form-input-selector.component.html',\r\n styleUrl: './form-input-selector.component.css',\r\n providers: [{ provide: MatFormFieldControl, useExisting: FormInputSelectorComponent }],\r\n})\r\nexport class FormInputSelectorComponent implements MatFormFieldControl<string | undefined> {\r\n\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n @Input() errors:IConfigElementError[] |undefined = [];\r\n @HostBinding() id = `lib-form-input-selector-${FormInputSelectorComponent .nextId++}`;\r\n \r\n placeholder: string = ''\r\n constructor(@Optional() @Self() public ngControl: NgControl, private _elementRef: ElementRef<HTMLElement>,) { }\r\n focused: boolean = false;\r\n get empty() {\r\n return !this.value\r\n }\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n required: boolean = false;\r\nget errorState(): boolean {\r\n const hasError = !!this.ngControl?.control?.errors || (this.errors||[]).length > 0 && this.touched\r\n return !this.value && !!this.required || hasError\r\n }\r\n\r\n controlType?: string | undefined;\r\n autofilled?: boolean | undefined;\r\n userAriaDescribedBy?: string | undefined;\r\n disableAutomaticLabeling?: boolean | undefined;\r\n setDescribedByIds(ids: string[]) {\r\n // Ensure the component view is initialized\r\n if (this._elementRef && this._elementRef.nativeElement) {\r\n const controlElement = this._elementRef.nativeElement.querySelector('.lib-form-input-selector');\r\n // Check if the controlElement exists before attempting to set its attribute\r\n if (controlElement) {\r\n controlElement.setAttribute('aria-describedby', ids.join(' '));\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 touched: boolean = false;\r\n onTouched = () => {};\r\n markAsTouched() {\r\n console.log('markAsTouched') \r\n if (!this.touched) {\r\n this.onTouched();\r\n this.touched = true;\r\n }\r\n } \r\n\r\n\r\n\r\n\r\n _value = new BehaviorSubject<string | undefined>(undefined)\r\n @Input() set value(value: string | undefined) {\r\n if (this._value.getValue() === value) {\r\n return\r\n }\r\n this._value.next(value)\r\n }\r\n get value() {\r\n return this._value.getValue()\r\n }\r\n get value$() {\r\n return this._value.asObservable()\r\n\r\n }\r\n @Input() formInputs: Array<FormColumnInputs> = []\r\n @Input() disabled: boolean = false\r\n @Output() change = new EventEmitter<any>()\r\n selectInput(id: string) {\r\n this.value$.pipe(\r\n take(1),\r\n tap((value) => {\r\n if (value === id) {\r\n this.change.emit(undefined)\r\n return;\r\n }\r\n this.change.emit(id)\r\n })\r\n ).subscribe()\r\n\r\n }\r\n get filteredInputs$():Observable<Array<IFormColumnUiList>> {\r\n return this.value$.pipe(\r\n map((value: string | undefined) => {\r\n const inputs = () => {\r\n const selectedInput = this.formInputs.find((input) => input.id === value)\r\n if (selectedInput) {\r\n return [{ ...selectedInput, selected: true , illustration: this.getInputIllustration(selectedInput) }]\r\n }\r\n return this.formInputs.map(input => ({ ...input, selected: false, illustration: this.getInputIllustration(input) }))\r\n }\r\n return inputs().map(\r\n (input) => {\r\n return {\r\n ...input,\r\n illustration: this.getInputIllustration(input)\r\n }\r\n\r\n })}\r\n\r\n )\r\n )\r\n }\r\n getInputIllustration(input: FormColumnInputs) {\r\n return getInputIllustration(input.element)\r\n }\r\n}\r\n","\r\n\r\n <mat-nav-list class=\"inputList\"> \r\n @for(input of filteredInputs$|async;track input.id){\r\n <mat-list-item \r\n [disabled]=\"disabled\"\r\n (click)=\"selectInput(input.id)\" \r\n [activated]=\"input.selected\"\r\n matRipple matTooltip=\"Select form input\">\r\n <img matListItemAvatar \r\n style=\"margin-left: 8px;\" [src]=\"input.illustration \"\r\n [alt]=\"input.label\">\r\n \r\n <span matListItemTitle >\r\n {{ input.label}}\r\n </span>\r\n <span *ngIf=\"input.multipleInputInEditId\" matListItemLine>\r\n Item List Input\r\n </span>\r\n <span matListItemMeta>\r\n <mat-icon [color]=\"input.selected?'primary':''\">\r\n \r\n {{input.selected?'check_circle':'radio_button_unchecked'}}\r\n \r\n </mat-icon>\r\n </span>\r\n \r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n @if((filteredInputs$|async)?.length===0){\r\n <mat-list-item>\r\n <span matLine>\r\n No form inputs found\r\n </span>\r\n </mat-list-item>\r\n }\r\n </mat-nav-list>\r\n\r\n"],"names":["i3","i4","i8"],"mappings":";;;;;;;;;;;;;;;;;MAuBa,0BAA0B,CAAA;aAE9B,IAAM,CAAA,MAAA,GAAG,CAAH,CAAK;IAMlB,WAAuC,CAAA,SAAoB,EAAU,WAAoC,EAAA;QAAlE,IAAS,CAAA,SAAA,GAAT,SAAS;QAAqB,IAAW,CAAA,WAAA,GAAX,WAAW;AALhF,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;QACvB,IAAM,CAAA,MAAA,GAAoC,EAAE;AACxC,QAAA,IAAA,CAAA,EAAE,GAAG,CAA2B,wBAAA,EAAA,0BAA0B,CAAE,MAAM,EAAE,EAAE;QAErF,IAAW,CAAA,WAAA,GAAW,EAAE;QAExB,IAAO,CAAA,OAAA,GAAY,KAAK;QAOxB,IAAQ,CAAA,QAAA,GAAY,KAAK;QAyBzB,IAAO,CAAA,OAAA,GAAY,KAAK;AACxB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAK,GAAG;AAYpB,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,eAAe,CAAqB,SAAS,CAAC;QAclD,IAAU,CAAA,UAAA,GAA4B,EAAE;QACxC,IAAQ,CAAA,QAAA,GAAY,KAAK;AACxB,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,YAAY,EAAO;;AA5D1C,IAAA,IAAI,KAAK,GAAA;AACP,QAAA,OAAO,CAAC,IAAI,CAAC,KAAK;;AAEpB,IAAA,IAAI,gBAAgB,GAAA;QAClB,OAAO,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK;;AAGtC,IAAA,IAAI,UAAU,GAAA;QACT,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI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A,QAAA,EAAA,yBAAyB,cACvB,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,gBAAgB,CAAC,EAAA,SAAA,EAG7B,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,0BAA4B,EAAE,CAAC,EAAA,QAAA,EAAA,m7CAAA,EAAA,MAAA,EAAA,CAAA,gDAAA,CAAA,EAAA;;0BAU1E;;0BAAY;kEAJd,MAAM,EAAA,CAAA;sBAAd;gBACY,EAAE,EAAA,CAAA;sBAAhB;gBAkDY,KAAK,EAAA,CAAA;sBAAjB;gBAaQ,UAAU,EAAA,CAAA;sBAAlB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACS,MAAM,EAAA,CAAA;sBAAf;;;;;"}
|
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Component } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { F as FormsStoreService, M as MatModulesModule, b as TDynamicDataViewComponent } from './ngx-t-forms-ngx-t-forms-
|
|
5
|
+
import { F as FormsStoreService, M as MatModulesModule, b as TDynamicDataViewComponent } from './ngx-t-forms-ngx-t-forms-B4C0NbAb.mjs';
|
|
6
6
|
import { map } from 'rxjs';
|
|
7
7
|
|
|
8
8
|
class FormJsonViewComponent {
|
|
@@ -19,4 +19,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
19
19
|
}], ctorParameters: () => [{ type: FormsStoreService }] });
|
|
20
20
|
|
|
21
21
|
export { FormJsonViewComponent };
|
|
22
|
-
//# sourceMappingURL=ngx-t-forms-form-json-view.component-
|
|
22
|
+
//# sourceMappingURL=ngx-t-forms-form-json-view.component-BAcSfl3f.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-form-json-view.component-
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-form-json-view.component-BAcSfl3f.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/form-json-view/form-json-view.component.ts","../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/form-json-view/form-json-view.component.html"],"sourcesContent":["import { Component } from '@angular/core';\r\n\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\n\r\nimport { FormsStoreService } from '../../../forms/store/forms-store.service';\r\nimport { TDynamicDataViewComponent } from '../../../t-dynamic-data-view/t-dynamic-data-view.component';\r\n\r\nimport { map } from 'rxjs';\r\n\r\n\r\n\r\n@Component({\r\n selector: 'app-form-json-view',\r\n standalone: true,\r\n imports: [CommonModule, MatModulesModule, TDynamicDataViewComponent],\r\n templateUrl: './form-json-view.component.html',\r\n styleUrl: './form-json-view.component.scss',\r\n})\r\nexport class FormJsonViewComponent {\r\n\r\n form$ = this.store.selectors.selectFormInEdit$.pipe(\r\n map(form => form?.form)\r\n )\r\n constructor(private store: FormsStoreService) {\r\n \r\n }\r\n\r\n\r\n}\r\n","\r\n<lib-t-dynamic-data-view [data]=\"form$|async\"></lib-t-dynamic-data-view>"],"names":["i1.FormsStoreService"],"mappings":";;;;;;;MAmBa,qBAAqB,CAAA;AAKhC,IAAA,WAAA,CAAoB,KAAwB,EAAA;QAAxB,IAAK,CAAA,KAAA,GAAL,KAAK;QAHzB,IAAK,CAAA,KAAA,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,IAAI,CACjD,GAAG,CAAC,IAAI,IAAI,IAAI,EAAE,IAAI,CAAC,CACxB;;8GAJU,qBAAqB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,8ECnBlC,gFACwE,EAAA,MAAA,EAAA,CAAA,mQAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDc5D,YAAY,EAAE,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,gBAAgB,+BAAE,yBAAyB,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAIxD,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;+BACE,oBAAoB,EAAA,UAAA,EAClB,IAAI,EACP,OAAA,EAAA,CAAC,YAAY,EAAE,gBAAgB,EAAE,yBAAyB,CAAC,EAAA,QAAA,EAAA,gFAAA,EAAA,MAAA,EAAA,CAAA,mQAAA,CAAA,EAAA;;;;;"}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import * as i2 from '@angular/common';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { inject, ChangeDetectorRef, ViewChild, HostListener, Component } from '@angular/core';
|
|
5
|
+
import { c as FormTowerControllerService, F as FormsStoreService, d as getSubmissionStatusFn, M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-B4C0NbAb.mjs';
|
|
6
|
+
import { take, filter, tap, map, Subject, timer, takeUntil } from 'rxjs';
|
|
7
|
+
import * as i1 from '@angular/forms';
|
|
8
|
+
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
9
|
+
import { validateFormColumnInputs } from 'ngx-t-forms-types';
|
|
10
|
+
import * as i7$1 from 'ngx-ui-tour-md-menu';
|
|
11
|
+
import { TourMatMenuModule } from 'ngx-ui-tour-md-menu';
|
|
12
|
+
import * as i2$1 from '@angular/cdk/drag-drop';
|
|
13
|
+
import * as i2$2 from '@angular/material/button';
|
|
14
|
+
import * as i3 from '@angular/material/card';
|
|
15
|
+
import * as i3$1 from '@angular/material/stepper';
|
|
16
|
+
import * as i5 from '@angular/material/icon';
|
|
17
|
+
import * as i6 from '@angular/material/menu';
|
|
18
|
+
import * as i7 from '@angular/material/progress-spinner';
|
|
19
|
+
import * as i4 from '@angular/material/tooltip';
|
|
20
|
+
import * as i9 from '@angular/material/toolbar';
|
|
21
|
+
|
|
22
|
+
;
|
|
23
|
+
class FormSectionStepperComponent extends FormTowerControllerService {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(...arguments);
|
|
26
|
+
this.store = inject(FormsStoreService);
|
|
27
|
+
this.loadingForm$ = this.store.selectors.selectLoadingForm$;
|
|
28
|
+
this.selectInputInEditId$ = this.store.selectors.selectInputInEditId$;
|
|
29
|
+
this.isEditable = true;
|
|
30
|
+
this.dragging = false;
|
|
31
|
+
this.drop = (event) => this.store.actionsFormBuilder.handleSectionDragDrop(event);
|
|
32
|
+
this.dropItems = (event, sectionId) => this.store.actionsFormBuilder.handleInputDragDrop(event, sectionId);
|
|
33
|
+
this.formDeleteSection = (sectionId) => this.store.actionsFormBuilder.formDeleteSection(sectionId);
|
|
34
|
+
this.addMultipleFormInput = (sectionId, multipleInputId) => this.store.actionsFormBuilder.addMultipleFormInput(sectionId, multipleInputId);
|
|
35
|
+
this.moveInputToSection = (inputId, targetSectionId) => this.store.actionsFormBuilder.moveInputToSection(inputId, targetSectionId);
|
|
36
|
+
this.reorderMultipleInputItems = (event, multipleInputId) => this.store.actionsFormBuilder.reorderMultipleInputItems(event, multipleInputId);
|
|
37
|
+
this.cloneCopyFormInput = (inputId) => this.store.actionsFormBuilder.cloneCopyFormInput(inputId);
|
|
38
|
+
this.multipleInputToggleLabel = (item) => this.store.actionsFormBuilder.multipleInputToggleLabel(item);
|
|
39
|
+
this.editInput = (item) => this.store.actionsFormBuilder.editInput(item);
|
|
40
|
+
this.addMultipleInputValueCalculationFunction = (item, multipleInputId) => this.store.actionsFormBuilder.addMultipleInputValueCalculationFunction(item, multipleInputId);
|
|
41
|
+
this.setActiveSection = ($event) => this.setMatActiveStepper($event.selectedIndex);
|
|
42
|
+
this.addInputToScoaSelection = (sectionId, scoaInputId) => this.store.actionsFormBuilder.addInputToScoaSelection(sectionId, scoaInputId);
|
|
43
|
+
this.addNewInput = (sectionId) => this.store.actionsFormBuilder.saveInput(sectionId);
|
|
44
|
+
this.addSection = () => this.store.actionsFormBuilder.handleAddSection();
|
|
45
|
+
this.setMatActiveStepper = (index) => setTimeout(() => {
|
|
46
|
+
if (this.stepper === undefined)
|
|
47
|
+
return;
|
|
48
|
+
this.stepper.selectedIndex = index;
|
|
49
|
+
}, 0);
|
|
50
|
+
this.mouseOverSection = null;
|
|
51
|
+
this.handleInput = (event, sectionId) => {
|
|
52
|
+
// Cast the event target to HTMLInputElement to access the value property
|
|
53
|
+
console.error('handleInput', event, sectionId);
|
|
54
|
+
const inputValue = event.target.value;
|
|
55
|
+
// Pass the input value to the store action
|
|
56
|
+
this.store.actionsFormBuilder?.stepTitleChangeStep(sectionId, inputValue);
|
|
57
|
+
event.stopPropagation();
|
|
58
|
+
event.preventDefault();
|
|
59
|
+
};
|
|
60
|
+
this.overId = null;
|
|
61
|
+
this.countdownSeconds = {};
|
|
62
|
+
this.inputWillBeRemovedIn = (id) => this.countdownSeconds[id]?.count;
|
|
63
|
+
this.getPlaceHolerForSection = (sectionId) => this.store.sectionPlaceholder[sectionId];
|
|
64
|
+
this.formDeleteInput = (item) => this.store.actionsFormBuilder.formDeleteInput(item);
|
|
65
|
+
this.openSectionReports = {};
|
|
66
|
+
this.toggleSectionReports = (sectionId) => this.openSectionReports[sectionId] = !this.openSectionReports[sectionId];
|
|
67
|
+
this.ref = inject(ChangeDetectorRef);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Handles the key down event and opens the application log if the key combination is pressed.
|
|
71
|
+
* @param event The keyboard event object.
|
|
72
|
+
*/
|
|
73
|
+
onKeyDown(event) {
|
|
74
|
+
if (event.ctrlKey && event.key === 'z') {
|
|
75
|
+
// Handle the key press combination here
|
|
76
|
+
this.revertBackHistory();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
ngOnInit() {
|
|
80
|
+
this.store.registerFormChangeFn(this.initialize);
|
|
81
|
+
this.store.selectors.selectFormInEdit$.pipe(take(1), filter(form => form !== null && form !== undefined), tap(form => this.initialize(form.form))).subscribe();
|
|
82
|
+
}
|
|
83
|
+
get formBuilderFunctions() {
|
|
84
|
+
return {
|
|
85
|
+
getLatestAccountTree: () => this.NGX_T_FORMS_CONFIG.formBuilder.getScoaTree(),
|
|
86
|
+
getSCOAAccount: (SCOAAccount) => this.NGX_T_FORMS_CONFIG.formBuilder.getSCOAAccount(SCOAAccount),
|
|
87
|
+
multipleInputToggleForm: this.toggleMultipleInput.bind(this),
|
|
88
|
+
multipleInputSaveForm: this.saveMultipleInputForm.bind(this),
|
|
89
|
+
editInput: this.editInput.bind(this),
|
|
90
|
+
deleteInput: this.formDeleteInput.bind(this),
|
|
91
|
+
addFunction: this.addMultipleInputValueCalculationFunction.bind(this),
|
|
92
|
+
reorderItems: this.reorderMultipleInputItems.bind(this),
|
|
93
|
+
multipleInputToggleLabel: this.multipleInputToggleLabel.bind(this),
|
|
94
|
+
multipleInputEditRow: this.multipleInputEditRow.bind(this),
|
|
95
|
+
multipleInputDuplicateRow: this.multipleInputDuplicateRow.bind(this),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
getPreviousStepLabel() {
|
|
99
|
+
if (this.stepper === undefined)
|
|
100
|
+
return '';
|
|
101
|
+
const currentIndex = this.stepper?.selectedIndex;
|
|
102
|
+
if (currentIndex > 0) {
|
|
103
|
+
return this.selectFormSteps()?.[currentIndex - 1]?.label;
|
|
104
|
+
}
|
|
105
|
+
return '';
|
|
106
|
+
}
|
|
107
|
+
getNextStepLabel() {
|
|
108
|
+
if (this.stepper === undefined)
|
|
109
|
+
return '';
|
|
110
|
+
const currentIndex = this.stepper?.selectedIndex;
|
|
111
|
+
const steps = this.selectFormSteps();
|
|
112
|
+
if (!steps)
|
|
113
|
+
return '';
|
|
114
|
+
if (currentIndex < steps.length - 1) {
|
|
115
|
+
return steps[currentIndex + 1]?.label;
|
|
116
|
+
}
|
|
117
|
+
return '';
|
|
118
|
+
}
|
|
119
|
+
getStepState(step, index) {
|
|
120
|
+
const activeStep = this.stepper?.selectedIndex === index;
|
|
121
|
+
if (activeStep)
|
|
122
|
+
return 'edit';
|
|
123
|
+
if (step.sectionForm?.touched && !step.sectionForm?.valid)
|
|
124
|
+
return 'error'; // Show error state for invalid touched forms
|
|
125
|
+
if (step.sectionForm?.valid)
|
|
126
|
+
return 'done'; // Show done state for valid forms
|
|
127
|
+
return 'number';
|
|
128
|
+
}
|
|
129
|
+
get getSubmissionStatus$() {
|
|
130
|
+
const progress = this.formProgress() || 0;
|
|
131
|
+
const steps = this.selectFormSteps();
|
|
132
|
+
return this.loadingForm$.pipe(map(loading => getSubmissionStatusFn(this.stepper, this.mainForm, progress, steps, loading)));
|
|
133
|
+
}
|
|
134
|
+
get selectFormStepsComputed() {
|
|
135
|
+
const steps = this.selectFormSteps().map((step) => ({
|
|
136
|
+
...step,
|
|
137
|
+
columns: step.columns.map((col) => {
|
|
138
|
+
const canReload = Object.keys(this._inputFunctionsCollection[col.id] || {}).length > 0;
|
|
139
|
+
return ({
|
|
140
|
+
...col,
|
|
141
|
+
canReload,
|
|
142
|
+
inputConfigErrors: validateFormColumnInputs(col)
|
|
143
|
+
});
|
|
144
|
+
})
|
|
145
|
+
}));
|
|
146
|
+
return steps;
|
|
147
|
+
}
|
|
148
|
+
stopDeletion(id) {
|
|
149
|
+
if (this.countdownSeconds[id]) {
|
|
150
|
+
this.countdownSeconds[id]?.stop$.next();
|
|
151
|
+
delete this.countdownSeconds[id];
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
removeInput(item) {
|
|
155
|
+
if (this.countdownSeconds[item.id]) {
|
|
156
|
+
this.stopDeletion(item.id);
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
this.countdownSeconds[item.id] = {
|
|
160
|
+
count: 5,
|
|
161
|
+
stop$: new Subject()
|
|
162
|
+
};
|
|
163
|
+
const countdown$ = timer(0, 1000).pipe(tap((secondsElapsed) => {
|
|
164
|
+
const data = this.countdownSeconds[item.id];
|
|
165
|
+
if (!data) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
const remainingTime = 5 - secondsElapsed;
|
|
169
|
+
if (remainingTime <= 0) {
|
|
170
|
+
this.formDeleteInput(item);
|
|
171
|
+
this.stopDeletion(item.id);
|
|
172
|
+
// Stop and remove timer
|
|
173
|
+
// Actual deletion logic here, e.g., remove the element by id
|
|
174
|
+
// document.getElementById(id)?.remove();
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
data.count = remainingTime;
|
|
178
|
+
}
|
|
179
|
+
}), takeUntil(this.countdownSeconds[item.id]?.stop$));
|
|
180
|
+
countdown$?.subscribe({
|
|
181
|
+
complete: () => {
|
|
182
|
+
console.log('Deletion stopped or completed');
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
deleteSection(sectionId) {
|
|
187
|
+
if (!sectionId) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
if (this.countdownSeconds[sectionId]) {
|
|
191
|
+
this.stopDeletion(sectionId);
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
this.countdownSeconds[sectionId] = {
|
|
195
|
+
count: 5,
|
|
196
|
+
stop$: new Subject()
|
|
197
|
+
};
|
|
198
|
+
const countdown$ = timer(0, 1000).pipe(tap((secondsElapsed) => {
|
|
199
|
+
const data = this.countdownSeconds[sectionId];
|
|
200
|
+
if (!data) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
const remainingTime = 5 - secondsElapsed;
|
|
204
|
+
if (remainingTime <= 0) {
|
|
205
|
+
this.formDeleteSection(sectionId);
|
|
206
|
+
this.stopDeletion(sectionId);
|
|
207
|
+
// Stop and remove timer
|
|
208
|
+
// Actual deletion logic here, e.g., remove the element by id
|
|
209
|
+
// document.getElementById(id)?.remove();
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
data.count = remainingTime;
|
|
213
|
+
}
|
|
214
|
+
}), takeUntil(this.countdownSeconds[sectionId]?.stop$));
|
|
215
|
+
countdown$?.subscribe({
|
|
216
|
+
complete: () => {
|
|
217
|
+
console.log('Deletion stopped or completed');
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
refresh() {
|
|
222
|
+
// trigger angular a change detection cycle manually
|
|
223
|
+
this.ref.markForCheck();
|
|
224
|
+
this.ref.detectChanges();
|
|
225
|
+
}
|
|
226
|
+
sectionIncludesDefault(columns) {
|
|
227
|
+
return columns.some((col) => col.systemDefault);
|
|
228
|
+
}
|
|
229
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FormSectionStepperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
230
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: FormSectionStepperComponent, isStandalone: true, selector: "app-form-section-stepper", host: { listeners: { "document:keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "stepper", first: true, predicate: ["stepper"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-card class=\"mainCard\" appearance=\"raised\">\r\n\r\n @if (loadingForm$|async) {\r\n <div class=\"loading-container\">\r\n <mat-spinner diameter=\"48\" aria-label=\"Loading form\" />\r\n </div>\r\n }\r\n <mat-stepper [style.display]=\"(loadingForm$|async)?'none':'block'\" #stepper class=\"form-stepper\"\r\n orientation=\"vertical\" [linear]=\"!isEditable\" aria-label=\"Form sections stepper\" [animationDuration]=\"'300'\"\r\n cdkDropList #formSections=\"cdkDropList\" [cdkDropListData]=\"selectFormStepsComputed\"\r\n (cdkDropListDropped)=\"drop($event)\" (selectionChange)=\"handleStepChange($event)\">\r\n\r\n @for (step of selectFormStepsComputed; track step.sectionId) {\r\n @if(step.sectionForm || getPlaceHolerForSection(step.sectionId)){\r\n <mat-step [stepControl]=\"step.sectionForm || getPlaceHolerForSection(step.sectionId) \"\r\n [completed]=\"step.sectionIsSeen && !step.sectionIsInvalid\" [editable]=\"isEditable\"\r\n [errorMessage]=\"step.sectionFormErrorMessage||''\" [state]=\"getStepState(step,$index)\"\r\n [hasError]=\"!step.sectionForm?.valid && !!step.sectionForm?.touched\">\r\n <ng-template matStepLabel>\r\n <div cdkDrag class=\"step-label-container \" [attr.aria-label]=\"'Section ' + step.label\">\r\n <span class=\"step-label-text\">\r\n\r\n <input (input)=\"handleInput($event,step.sectionId)\" class=\"section-title-input\"\r\n placeholder=\"Enter section title\" [value]=\"step.label \">\r\n </span>\r\n @if (step.sectionIsSeen) {\r\n <mat-icon [class.error]=\"step.sectionIsInvalid\"\r\n [attr.aria-label]=\"step.sectionIsInvalid ? 'Section has errors' : 'Section completed'\">\r\n {{step.sectionIsSeen}}\r\n </mat-icon>\r\n }\r\n <span class=\"tour-trigger \" *ngIf=\"(step)?.activeSectionHasTour&&!!step.isActive \">\r\n <button tourAnchor=\"Form-Tour-trigger\" matTooltip=\"Start section tour\" mat-flat-button>\r\n <mat-icon>tour</mat-icon>\r\n </button>\r\n </span>\r\n <span class=\"spacer\"></span>\r\n\r\n @if(!!inputWillBeRemovedIn(step.sectionId) ){\r\n <button (mouseover)=\"overId = step.sectionId\" (mouseout)=\"overId = null\"\r\n (click)=\"deleteSection(step.sectionId)\" color=\"warn\" mat-stroked-button>\r\n <div style=\"display: flex; align-items: center;gap:4px;padding:8px;\">\r\n <mat-progress-spinner style=\"margin-right: 5px;\" color=\"primary\" class=\"cancelProgress\"\r\n [value]=\"((inputWillBeRemovedIn(step.sectionId)||0)/5)*100\">\r\n </mat-progress-spinner>\r\n\r\n {{overId === step.sectionId ? 'Click to cancel':'Deleting in'}}\r\n {{inputWillBeRemovedIn(step.sectionId)}}\r\n </div>\r\n\r\n </button>\r\n }\r\n <button (click)=\"$event.stopPropagation();\"\r\n [matMenuTriggerData]=\"{sectionId:step.sectionId,columns: step.columns}\" [matMenuTriggerFor]=\"sectionMenu\"\r\n color=\"primary\" mat-icon-button>\r\n <mat-icon>\r\n <!-- {{section.sectionId === ( activeSectionId())? 'expand_circle_down':'more_horiz'}} -->\r\n more_horiz\r\n </mat-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n @defer (on viewport; prefetch on idle) {\r\n <div class=\"step-content\">\r\n @if(!openSectionReports[step.sectionId]){\r\n <div (cdkDropListDropped)=\"dropItems($event,step.sectionId)\" [cdkDropListData]=\"step.columns\" cdkDropList\r\n #InputList=\"cdkDropList\" class=\"row form-section\">\r\n @for (col of step.columns; track col.id) {\r\n <mat-card cdkDrag (cdkDragStarted)=\"dragging =true\" (cdkDragReleased)=\"dragging =false\"\r\n [class.inEditCol]=\"(selectInputInEditId$|async) === col.id\"\r\n [class]=\"'box inputCard col-md-'+(dragging?'12':col.colSize)\" (mouseover)=\"activeInput =col.id\">\r\n <div class=\"custom-placeholder\" *cdkDragPlaceholder></div>\r\n @if(step.sectionForm){\r\n <lib-t-form-input [editorMode]=\"true\" [tourAnchor]=\"col.id\" (valueChange)=\"updateValue(col.id,$event)\"\r\n [canReload]=\"col.canReload\"\r\n [formBuilderFunctions]=\"formBuilderFunctions\" [inputConfig]=\"col\" [formGroup]=\"step.sectionForm\"\r\n [attr.aria-label]=\"col?.label || ''\">\r\n </lib-t-form-input>\r\n }\r\n\r\n\r\n\r\n @if (col.inputConfigErrors.length > 0) {\r\n <div class=\"error\">\r\n\r\n <ul style=\"\r\n padding-left: 28px;\">\r\n @for(error of col.inputConfigErrors;track error.key+error.message){\r\n <li>{{error.message}}</li>\r\n }\r\n </ul>\r\n\r\n </div>\r\n }\r\n <mat-card-actions *ngIf=\"activeInput === col.id\">\r\n\r\n <button color=\"primary\" [matTooltip]=\"'Edit ' + col.label +' input'\" (click)=\"editInput(col)\"\r\n mat-icon-button>\r\n <mat-icon>\r\n edit\r\n </mat-icon>\r\n\r\n </button>\r\n\r\n <button [matTooltip]=\"'Move this input to another section'\" moveInput [matMenuTriggerFor]=\"moveInput\"\r\n [matMenuTriggerData]=\"col\" mat-icon-button>\r\n\r\n <mat-icon>\r\n drive_file_move\r\n </mat-icon>\r\n </button>\r\n\r\n <button [matTooltip]=\"'Clone/ copy form input'\" (click)=\"cloneCopyFormInput(col.id)\" moveInput\r\n mat-icon-button>\r\n\r\n <mat-icon>\r\n file_copy\r\n </mat-icon>\r\n </button>\r\n \r\n <span class=\"spacer\"></span>\r\n\r\n\r\n\r\n @if(!!inputWillBeRemovedIn(col.id) ){\r\n <button (mouseover)=\"overId = col.id\" (mouseout)=\"overId = null\" (click)=\"removeInput(col)\" color=\"warn\"\r\n mat-stroked-button>\r\n <div style=\"display: flex; align-items: center;\">\r\n <mat-progress-spinner style=\"margin-right: 5px;\" color=\"primary\" class=\"cancelProgress\"\r\n [value]=\"((inputWillBeRemovedIn(col.id)||0)/5)*100\">\r\n </mat-progress-spinner>\r\n\r\n {{overId === col.id ? 'Click to cancel':'Deleting in'}} {{inputWillBeRemovedIn(col.id)}}\r\n </div>\r\n\r\n </button>\r\n\r\n }@else if (col.systemDefault !==true) { <button color=\"warn\"\r\n [matTooltip]=\"'Delete '+ col.label + ' input'\" (click)=\"removeInput(col)\" mat-icon-button>\r\n\r\n <mat-icon>\r\n delete\r\n </mat-icon>\r\n </button>}\r\n\r\n\r\n @if (activeInput === col.id && col.element ==='multipleInput') {\r\n\r\n <button matTooltip=\"Add input to list control form\" (click)=\"addMultipleFormInput(col.sectionId,col.id)\"\r\n color=\"accent\" mat-flat-button>\r\n <mat-icon>add</mat-icon>\r\n Add Form Input\r\n </button>\r\n }\r\n @if (activeInput === col.id && col.element ==='mscoaSelection') {\r\n\r\n <button matTooltip=\"Extend SCOA Segments with additional inputs\"\r\n (click)=\"addInputToScoaSelection(col.sectionId,col.id)\" color=\"accent\" mat-flat-button>\r\n <mat-icon>add</mat-icon>\r\n Add Form Input\r\n </button>\r\n }\r\n\r\n </mat-card-actions>\r\n </mat-card>\r\n }\r\n </div>\r\n <section style=\"text-align: center;\">\r\n <br>\r\n Add form fields to this section to collect information.\r\n <br>\r\n Click the <strong>\"Add Input\"</strong> button below to create a new form field.\r\n <div>\r\n <button matTooltip=\"Add an input to this section\" (click)=\"addNewInput(step.sectionId)\" color=\"accent\"\r\n mat-flat-button>\r\n <mat-icon>add</mat-icon>\r\n Add Input\r\n </button>\r\n </div>\r\n </section>\r\n\r\n\r\n }@else {\r\n <app-section-report [sectionId]=\"step.sectionId \"></app-section-report>\r\n }\r\n <div class=\"step-actions\">\r\n @if(!$first) {\r\n <button mat-button matStepperPrevious type=\"button\" class=\"navigation-button\"\r\n [attr.aria-label]=\"'Go back to ' + getPreviousStepLabel()\">\r\n\r\n Back\r\n </button>\r\n }\r\n @if (!$last) {\r\n <button mat-flat-button matStepperNext color=\"primary\" type=\"button\" class=\"navigation-button\"\r\n matTooltip=\"Continue to next section\" [attr.aria-label]=\"'Continue to ' + getNextStepLabel()\">\r\n Next\r\n </button>\r\n }\r\n @if (!!$last) {\r\n <button mat-button (click)=\"stepper.reset()\">Reset</button>\r\n }\r\n\r\n </div>\r\n </div>\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=\"24\" />\r\n </div>\r\n }\r\n\r\n </mat-step>\r\n }\r\n }\r\n </mat-stepper>\r\n <section style=\"text-align: center;\">\r\n <br>\r\n A form section helps organize related input fields together.\r\n <br>\r\n Click the <strong>\"Add Section\"</strong> button below to create a new section.\r\n </section>\r\n <mat-card-actions style=\"position: sticky;bottom: 0;\">\r\n <span class=\"spacer\"></span>\r\n <button (click)=\"addSection()\" color=\"accent\" mat-flat-button>\r\n <mat-icon>add</mat-icon>\r\n Add Section\r\n </button>\r\n <span class=\"spacer\"></span>\r\n </mat-card-actions>\r\n <!-- Defer the footer toolbar until after the main form is loaded -->\r\n @defer (on idle; prefetch on viewport) {\r\n <footer><mat-toolbar class=\"submission-toolbar\" role=\"toolbar\" aria-label=\"Form submission actions\">\r\n <span class=\"submission-status\" role=\"status\">\r\n {{getSubmissionStatus$|async}}\r\n </span>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"true\" aria-label=\"Submit form\">\r\n <span>\r\n {{ formSubmissionMessage()}}\r\n </span>\r\n @if(submittingForm){\r\n <mat-spinner diameter=\"10\"></mat-spinner>\r\n }\r\n\r\n </button>\r\n </mat-toolbar>\r\n </footer>\r\n } @placeholder {\r\n <!-- Simple placeholder for the footer that maintains layout -->\r\n <footer>\r\n <div class=\"submission-toolbar-placeholder\"></div>\r\n </footer>\r\n }\r\n\r\n</mat-card>\r\n<mat-menu #sectionMenu=\"matMenu\">\r\n <ng-template matMenuContent let-sectionId=\"sectionId\" let-columns=\"columns\">\r\n <!-- <button mat-menu-item [matMenuTriggerFor]=\"sectionType\">\r\n <mat-icon> disabled_visible</mat-icon>\r\n Set visibility type</button> -->\r\n @if (sectionIncludesDefault(columns) === false) {\r\n <button (click)=\"deleteSection(sectionId)\" mat-menu-item>\r\n <mat-icon>delete</mat-icon>\r\n Delete section</button>\r\n }\r\n\r\n <button (click)=\"toggleSectionReports(sectionId)\" mat-menu-item>\r\n <mat-icon>leaderboard</mat-icon>\r\n {{openSectionReports[sectionId]?'Close report': 'Section report'}}</button>\r\n </ng-template>\r\n</mat-menu>\r\n<mat-menu #sectionType=\"matMenu\">\r\n <button mat-menu-item>\r\n <mat-icon>visibility</mat-icon>\r\n view only</button>\r\n <button mat-menu-item>\r\n <mat-icon>visibility_off</mat-icon>\r\n system</button>\r\n <button mat-menu-item>\r\n <mat-icon>edit</mat-icon>\r\n user edit</button>\r\n</mat-menu>\r\n<mat-menu #moveInput=\"matMenu\">\r\n <ng-template matMenuContent let-id=\"id\" let-sectionId=\"sectionId\">\r\n @for (section of ( selectFormStepsComputed); track section.sectionId) {\r\n <button [disabled]=\"section.sectionId === sectionId\" (click)=\"moveInputToSection(id,section.sectionId)\"\r\n mat-menu-item>\r\n <mat-icon>folder</mat-icon>\r\n {{section.label || 'Untitled section'}}\r\n </button>\r\n }\r\n\r\n </ng-template>\r\n</mat-menu>", styles: [".mainCard{margin-top:0;min-height:45vh;box-shadow:none;max-width:768px;margin-left:auto;padding:8px;left:0;margin-right:auto;border-radius:12px}.inEditCol{box-shadow:var(--mdc-elevated-card-container-elevation);border:solid 1px #243D91!important}.inputCard{box-shadow:none}.cancelProgress{height:24px!important;width:24px!important}.numbers{position:absolute!important;right:0}mat-vertical-stepper{margin:5px}.list{min-height:60px;display:block}.box{padding:5px;cursor:move}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.box:last-child{border:none}.list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.custom-placeholder{background:#ccc;border:dotted 3px #999;min-width:100%;min-height:60px;transition:transform .25s cubic-bezier(0,0,.2,1)}.section-title-input{border:none;background-color:transparent;font-size:14px;font-weight:600;color:#333;padding-top:12px;padding-bottom:12px;outline:none;width:calc(100% - 54px);transition:border-bottom-color .3s ease-in-out}.section-title-input:focus{border-bottom:1px solid #007bff}.inputElement:focus{box-shadow:0 0 0 .2rem #007bff40}.headerToolbar{position:sticky;top:0;min-width:100%;background:var(--mdc-elevated-card-container-color)}::ng-deep mat-step-header .mat-step-label{width:100%}.error{color:var(--mat-form-field-error-text-color, var(--mat-app-error));display:flex;align-items:center}.submission-toolbar{z-index:1000;background:#ffffff0d;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border-top:var(--mat-divider-width) solid var(--mat-divider-color);padding:8px 16px;display:flex;justify-content:flex-end;gap:16px}.submission-status{font-size:12px;opacity:.87;display:flex;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatModulesModule }, { kind: "directive", type: i2$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i2$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2$2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "component", type: i3$1.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i3$1.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i3$1.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i6.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i6.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: TourMatMenuModule }, { kind: "directive", type: i7$1.TourAnchorMatMenuDirective, selector: "[tourAnchor]", inputs: ["tourAnchor"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }], deferBlockDependencies: [() => [i2.NgIf, i2.AsyncPipe, i2$1.CdkDropList, i2$1.CdkDrag, i2$1.CdkDragPlaceholder, i2$2.MatButton, i2$2.MatIconButton, i3.MatCard, i3.MatCardActions, i3$1.MatStepperNext, i3$1.MatStepperPrevious, i5.MatIcon, i6.MatMenuTrigger, i7.MatProgressSpinner, i4.MatTooltip, import('./ngx-t-forms-ngx-t-forms-B4C0NbAb.mjs').then(function (n) { return n.H; }).then(m => m.TFormInputComponent), i7$1.TourAnchorMatMenuDirective, i1.NgControlStatusGroup, i1.FormGroupDirective, import('./ngx-t-forms-section-report.component-Cl3KWTOq.mjs').then(m => m.SectionReportComponent)], () => [i2.AsyncPipe, i2$2.MatButton, i7.MatProgressSpinner, i9.MatToolbar]] }); }
|
|
231
|
+
}
|
|
232
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.2.6", ngImport: i0, type: FormSectionStepperComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-ngx-t-forms-B4C0NbAb.mjs').then(function (n) { return n.H; }).then(m => m.TFormInputComponent), import('./ngx-t-forms-section-report.component-Cl3KWTOq.mjs').then(m => m.SectionReportComponent)], resolveMetadata: (TFormInputComponent, SectionReportComponent) => ({ decorators: [{
|
|
233
|
+
type: Component,
|
|
234
|
+
args: [{ selector: 'app-form-section-stepper', standalone: true, imports: [
|
|
235
|
+
CommonModule,
|
|
236
|
+
MatModulesModule,
|
|
237
|
+
TFormInputComponent,
|
|
238
|
+
TourMatMenuModule,
|
|
239
|
+
ReactiveFormsModule,
|
|
240
|
+
FormsModule,
|
|
241
|
+
SectionReportComponent
|
|
242
|
+
], template: "<mat-card class=\"mainCard\" appearance=\"raised\">\r\n\r\n @if (loadingForm$|async) {\r\n <div class=\"loading-container\">\r\n <mat-spinner diameter=\"48\" aria-label=\"Loading form\" />\r\n </div>\r\n }\r\n <mat-stepper [style.display]=\"(loadingForm$|async)?'none':'block'\" #stepper class=\"form-stepper\"\r\n orientation=\"vertical\" [linear]=\"!isEditable\" aria-label=\"Form sections stepper\" [animationDuration]=\"'300'\"\r\n cdkDropList #formSections=\"cdkDropList\" [cdkDropListData]=\"selectFormStepsComputed\"\r\n (cdkDropListDropped)=\"drop($event)\" (selectionChange)=\"handleStepChange($event)\">\r\n\r\n @for (step of selectFormStepsComputed; track step.sectionId) {\r\n @if(step.sectionForm || getPlaceHolerForSection(step.sectionId)){\r\n <mat-step [stepControl]=\"step.sectionForm || getPlaceHolerForSection(step.sectionId) \"\r\n [completed]=\"step.sectionIsSeen && !step.sectionIsInvalid\" [editable]=\"isEditable\"\r\n [errorMessage]=\"step.sectionFormErrorMessage||''\" [state]=\"getStepState(step,$index)\"\r\n [hasError]=\"!step.sectionForm?.valid && !!step.sectionForm?.touched\">\r\n <ng-template matStepLabel>\r\n <div cdkDrag class=\"step-label-container \" [attr.aria-label]=\"'Section ' + step.label\">\r\n <span class=\"step-label-text\">\r\n\r\n <input (input)=\"handleInput($event,step.sectionId)\" class=\"section-title-input\"\r\n placeholder=\"Enter section title\" [value]=\"step.label \">\r\n </span>\r\n @if (step.sectionIsSeen) {\r\n <mat-icon [class.error]=\"step.sectionIsInvalid\"\r\n [attr.aria-label]=\"step.sectionIsInvalid ? 'Section has errors' : 'Section completed'\">\r\n {{step.sectionIsSeen}}\r\n </mat-icon>\r\n }\r\n <span class=\"tour-trigger \" *ngIf=\"(step)?.activeSectionHasTour&&!!step.isActive \">\r\n <button tourAnchor=\"Form-Tour-trigger\" matTooltip=\"Start section tour\" mat-flat-button>\r\n <mat-icon>tour</mat-icon>\r\n </button>\r\n </span>\r\n <span class=\"spacer\"></span>\r\n\r\n @if(!!inputWillBeRemovedIn(step.sectionId) ){\r\n <button (mouseover)=\"overId = step.sectionId\" (mouseout)=\"overId = null\"\r\n (click)=\"deleteSection(step.sectionId)\" color=\"warn\" mat-stroked-button>\r\n <div style=\"display: flex; align-items: center;gap:4px;padding:8px;\">\r\n <mat-progress-spinner style=\"margin-right: 5px;\" color=\"primary\" class=\"cancelProgress\"\r\n [value]=\"((inputWillBeRemovedIn(step.sectionId)||0)/5)*100\">\r\n </mat-progress-spinner>\r\n\r\n {{overId === step.sectionId ? 'Click to cancel':'Deleting in'}}\r\n {{inputWillBeRemovedIn(step.sectionId)}}\r\n </div>\r\n\r\n </button>\r\n }\r\n <button (click)=\"$event.stopPropagation();\"\r\n [matMenuTriggerData]=\"{sectionId:step.sectionId,columns: step.columns}\" [matMenuTriggerFor]=\"sectionMenu\"\r\n color=\"primary\" mat-icon-button>\r\n <mat-icon>\r\n <!-- {{section.sectionId === ( activeSectionId())? 'expand_circle_down':'more_horiz'}} -->\r\n more_horiz\r\n </mat-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n @defer (on viewport; prefetch on idle) {\r\n <div class=\"step-content\">\r\n @if(!openSectionReports[step.sectionId]){\r\n <div (cdkDropListDropped)=\"dropItems($event,step.sectionId)\" [cdkDropListData]=\"step.columns\" cdkDropList\r\n #InputList=\"cdkDropList\" class=\"row form-section\">\r\n @for (col of step.columns; track col.id) {\r\n <mat-card cdkDrag (cdkDragStarted)=\"dragging =true\" (cdkDragReleased)=\"dragging =false\"\r\n [class.inEditCol]=\"(selectInputInEditId$|async) === col.id\"\r\n [class]=\"'box inputCard col-md-'+(dragging?'12':col.colSize)\" (mouseover)=\"activeInput =col.id\">\r\n <div class=\"custom-placeholder\" *cdkDragPlaceholder></div>\r\n @if(step.sectionForm){\r\n <lib-t-form-input [editorMode]=\"true\" [tourAnchor]=\"col.id\" (valueChange)=\"updateValue(col.id,$event)\"\r\n [canReload]=\"col.canReload\"\r\n [formBuilderFunctions]=\"formBuilderFunctions\" [inputConfig]=\"col\" [formGroup]=\"step.sectionForm\"\r\n [attr.aria-label]=\"col?.label || ''\">\r\n </lib-t-form-input>\r\n }\r\n\r\n\r\n\r\n @if (col.inputConfigErrors.length > 0) {\r\n <div class=\"error\">\r\n\r\n <ul style=\"\r\n padding-left: 28px;\">\r\n @for(error of col.inputConfigErrors;track error.key+error.message){\r\n <li>{{error.message}}</li>\r\n }\r\n </ul>\r\n\r\n </div>\r\n }\r\n <mat-card-actions *ngIf=\"activeInput === col.id\">\r\n\r\n <button color=\"primary\" [matTooltip]=\"'Edit ' + col.label +' input'\" (click)=\"editInput(col)\"\r\n mat-icon-button>\r\n <mat-icon>\r\n edit\r\n </mat-icon>\r\n\r\n </button>\r\n\r\n <button [matTooltip]=\"'Move this input to another section'\" moveInput [matMenuTriggerFor]=\"moveInput\"\r\n [matMenuTriggerData]=\"col\" mat-icon-button>\r\n\r\n <mat-icon>\r\n drive_file_move\r\n </mat-icon>\r\n </button>\r\n\r\n <button [matTooltip]=\"'Clone/ copy form input'\" (click)=\"cloneCopyFormInput(col.id)\" moveInput\r\n mat-icon-button>\r\n\r\n <mat-icon>\r\n file_copy\r\n </mat-icon>\r\n </button>\r\n \r\n <span class=\"spacer\"></span>\r\n\r\n\r\n\r\n @if(!!inputWillBeRemovedIn(col.id) ){\r\n <button (mouseover)=\"overId = col.id\" (mouseout)=\"overId = null\" (click)=\"removeInput(col)\" color=\"warn\"\r\n mat-stroked-button>\r\n <div style=\"display: flex; align-items: center;\">\r\n <mat-progress-spinner style=\"margin-right: 5px;\" color=\"primary\" class=\"cancelProgress\"\r\n [value]=\"((inputWillBeRemovedIn(col.id)||0)/5)*100\">\r\n </mat-progress-spinner>\r\n\r\n {{overId === col.id ? 'Click to cancel':'Deleting in'}} {{inputWillBeRemovedIn(col.id)}}\r\n </div>\r\n\r\n </button>\r\n\r\n }@else if (col.systemDefault !==true) { <button color=\"warn\"\r\n [matTooltip]=\"'Delete '+ col.label + ' input'\" (click)=\"removeInput(col)\" mat-icon-button>\r\n\r\n <mat-icon>\r\n delete\r\n </mat-icon>\r\n </button>}\r\n\r\n\r\n @if (activeInput === col.id && col.element ==='multipleInput') {\r\n\r\n <button matTooltip=\"Add input to list control form\" (click)=\"addMultipleFormInput(col.sectionId,col.id)\"\r\n color=\"accent\" mat-flat-button>\r\n <mat-icon>add</mat-icon>\r\n Add Form Input\r\n </button>\r\n }\r\n @if (activeInput === col.id && col.element ==='mscoaSelection') {\r\n\r\n <button matTooltip=\"Extend SCOA Segments with additional inputs\"\r\n (click)=\"addInputToScoaSelection(col.sectionId,col.id)\" color=\"accent\" mat-flat-button>\r\n <mat-icon>add</mat-icon>\r\n Add Form Input\r\n </button>\r\n }\r\n\r\n </mat-card-actions>\r\n </mat-card>\r\n }\r\n </div>\r\n <section style=\"text-align: center;\">\r\n <br>\r\n Add form fields to this section to collect information.\r\n <br>\r\n Click the <strong>\"Add Input\"</strong> button below to create a new form field.\r\n <div>\r\n <button matTooltip=\"Add an input to this section\" (click)=\"addNewInput(step.sectionId)\" color=\"accent\"\r\n mat-flat-button>\r\n <mat-icon>add</mat-icon>\r\n Add Input\r\n </button>\r\n </div>\r\n </section>\r\n\r\n\r\n }@else {\r\n <app-section-report [sectionId]=\"step.sectionId \"></app-section-report>\r\n }\r\n <div class=\"step-actions\">\r\n @if(!$first) {\r\n <button mat-button matStepperPrevious type=\"button\" class=\"navigation-button\"\r\n [attr.aria-label]=\"'Go back to ' + getPreviousStepLabel()\">\r\n\r\n Back\r\n </button>\r\n }\r\n @if (!$last) {\r\n <button mat-flat-button matStepperNext color=\"primary\" type=\"button\" class=\"navigation-button\"\r\n matTooltip=\"Continue to next section\" [attr.aria-label]=\"'Continue to ' + getNextStepLabel()\">\r\n Next\r\n </button>\r\n }\r\n @if (!!$last) {\r\n <button mat-button (click)=\"stepper.reset()\">Reset</button>\r\n }\r\n\r\n </div>\r\n </div>\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=\"24\" />\r\n </div>\r\n }\r\n\r\n </mat-step>\r\n }\r\n }\r\n </mat-stepper>\r\n <section style=\"text-align: center;\">\r\n <br>\r\n A form section helps organize related input fields together.\r\n <br>\r\n Click the <strong>\"Add Section\"</strong> button below to create a new section.\r\n </section>\r\n <mat-card-actions style=\"position: sticky;bottom: 0;\">\r\n <span class=\"spacer\"></span>\r\n <button (click)=\"addSection()\" color=\"accent\" mat-flat-button>\r\n <mat-icon>add</mat-icon>\r\n Add Section\r\n </button>\r\n <span class=\"spacer\"></span>\r\n </mat-card-actions>\r\n <!-- Defer the footer toolbar until after the main form is loaded -->\r\n @defer (on idle; prefetch on viewport) {\r\n <footer><mat-toolbar class=\"submission-toolbar\" role=\"toolbar\" aria-label=\"Form submission actions\">\r\n <span class=\"submission-status\" role=\"status\">\r\n {{getSubmissionStatus$|async}}\r\n </span>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"true\" aria-label=\"Submit form\">\r\n <span>\r\n {{ formSubmissionMessage()}}\r\n </span>\r\n @if(submittingForm){\r\n <mat-spinner diameter=\"10\"></mat-spinner>\r\n }\r\n\r\n </button>\r\n </mat-toolbar>\r\n </footer>\r\n } @placeholder {\r\n <!-- Simple placeholder for the footer that maintains layout -->\r\n <footer>\r\n <div class=\"submission-toolbar-placeholder\"></div>\r\n </footer>\r\n }\r\n\r\n</mat-card>\r\n<mat-menu #sectionMenu=\"matMenu\">\r\n <ng-template matMenuContent let-sectionId=\"sectionId\" let-columns=\"columns\">\r\n <!-- <button mat-menu-item [matMenuTriggerFor]=\"sectionType\">\r\n <mat-icon> disabled_visible</mat-icon>\r\n Set visibility type</button> -->\r\n @if (sectionIncludesDefault(columns) === false) {\r\n <button (click)=\"deleteSection(sectionId)\" mat-menu-item>\r\n <mat-icon>delete</mat-icon>\r\n Delete section</button>\r\n }\r\n\r\n <button (click)=\"toggleSectionReports(sectionId)\" mat-menu-item>\r\n <mat-icon>leaderboard</mat-icon>\r\n {{openSectionReports[sectionId]?'Close report': 'Section report'}}</button>\r\n </ng-template>\r\n</mat-menu>\r\n<mat-menu #sectionType=\"matMenu\">\r\n <button mat-menu-item>\r\n <mat-icon>visibility</mat-icon>\r\n view only</button>\r\n <button mat-menu-item>\r\n <mat-icon>visibility_off</mat-icon>\r\n system</button>\r\n <button mat-menu-item>\r\n <mat-icon>edit</mat-icon>\r\n user edit</button>\r\n</mat-menu>\r\n<mat-menu #moveInput=\"matMenu\">\r\n <ng-template matMenuContent let-id=\"id\" let-sectionId=\"sectionId\">\r\n @for (section of ( selectFormStepsComputed); track section.sectionId) {\r\n <button [disabled]=\"section.sectionId === sectionId\" (click)=\"moveInputToSection(id,section.sectionId)\"\r\n mat-menu-item>\r\n <mat-icon>folder</mat-icon>\r\n {{section.label || 'Untitled section'}}\r\n </button>\r\n }\r\n\r\n </ng-template>\r\n</mat-menu>", styles: [".mainCard{margin-top:0;min-height:45vh;box-shadow:none;max-width:768px;margin-left:auto;padding:8px;left:0;margin-right:auto;border-radius:12px}.inEditCol{box-shadow:var(--mdc-elevated-card-container-elevation);border:solid 1px #243D91!important}.inputCard{box-shadow:none}.cancelProgress{height:24px!important;width:24px!important}.numbers{position:absolute!important;right:0}mat-vertical-stepper{margin:5px}.list{min-height:60px;display:block}.box{padding:5px;cursor:move}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.box:last-child{border:none}.list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.custom-placeholder{background:#ccc;border:dotted 3px #999;min-width:100%;min-height:60px;transition:transform .25s cubic-bezier(0,0,.2,1)}.section-title-input{border:none;background-color:transparent;font-size:14px;font-weight:600;color:#333;padding-top:12px;padding-bottom:12px;outline:none;width:calc(100% - 54px);transition:border-bottom-color .3s ease-in-out}.section-title-input:focus{border-bottom:1px solid #007bff}.inputElement:focus{box-shadow:0 0 0 .2rem #007bff40}.headerToolbar{position:sticky;top:0;min-width:100%;background:var(--mdc-elevated-card-container-color)}::ng-deep mat-step-header .mat-step-label{width:100%}.error{color:var(--mat-form-field-error-text-color, var(--mat-app-error));display:flex;align-items:center}.submission-toolbar{z-index:1000;background:#ffffff0d;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border-top:var(--mat-divider-width) solid var(--mat-divider-color);padding:8px 16px;display:flex;justify-content:flex-end;gap:16px}.submission-status{font-size:12px;opacity:.87;display:flex;align-items:center}\n"] }]
|
|
243
|
+
}], ctorParameters: null, propDecorators: {
|
|
244
|
+
/**
|
|
245
|
+
* Handles the key down event and opens the application log if the key combination is pressed.
|
|
246
|
+
* @param event The keyboard event object.
|
|
247
|
+
*/
|
|
248
|
+
onKeyDown: [{
|
|
249
|
+
type: HostListener,
|
|
250
|
+
args: ['document:keydown', ['$event']]
|
|
251
|
+
}], stepper: [{
|
|
252
|
+
type: ViewChild,
|
|
253
|
+
args: ['stepper']
|
|
254
|
+
}] } }) });
|
|
255
|
+
|
|
256
|
+
export { FormSectionStepperComponent };
|
|
257
|
+
//# sourceMappingURL=ngx-t-forms-form-section-stepper.component-npSCBik4.mjs.map
|