ngx-t-forms 2.0.20 → 2.0.22
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-calculated-field-rules.component-Bfxttbln.mjs → ngx-t-forms-calculated-field-rules.component-C_64f1LO.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-Bfxttbln.mjs.map → ngx-t-forms-calculated-field-rules.component-C_64f1LO.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-DdJJ_42g.mjs → ngx-t-forms-chip-options-creator-editor.component-Bt3aFR_M.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-DdJJ_42g.mjs.map → ngx-t-forms-chip-options-creator-editor.component-Bt3aFR_M.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-kX-Om4Fk.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-D9ViNgwt.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-kX-Om4Fk.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-D9ViNgwt.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-data-source-picker.component-CMfslgTo.mjs → ngx-t-forms-data-source-picker.component-Dxwhl2-a.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-data-source-picker.component-CMfslgTo.mjs.map → ngx-t-forms-data-source-picker.component-Dxwhl2-a.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-C81MpbQk.mjs → ngx-t-forms-document-list-label-config-editor.component-GB_9b-4L.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-C81MpbQk.mjs.map → ngx-t-forms-document-list-label-config-editor.component-GB_9b-4L.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-input-selector.component-DKA3JT53.mjs → ngx-t-forms-form-input-selector.component-C5Amatf0.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-input-selector.component-DKA3JT53.mjs.map → ngx-t-forms-form-input-selector.component-C5Amatf0.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-json-view.component-D4B6gRiR.mjs → ngx-t-forms-form-json-view.component-CQg4E5ba.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-json-view.component-D4B6gRiR.mjs.map → ngx-t-forms-form-json-view.component-CQg4E5ba.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-form-section-stepper.component-C0kP-AiW.mjs +261 -0
- package/fesm2022/ngx-t-forms-form-section-stepper.component-C0kP-AiW.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-DYP-_7bZ.mjs → ngx-t-forms-forms-builder-menu.component-CbaZ8wSc.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-DYP-_7bZ.mjs.map → ngx-t-forms-forms-builder-menu.component-CbaZ8wSc.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-input-editor.component-KmUcZsa3.mjs → ngx-t-forms-input-editor.component-DyVAn2Pd.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-input-editor.component-KmUcZsa3.mjs.map → ngx-t-forms-input-editor.component-DyVAn2Pd.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-Bl1xoQAO.mjs +95 -0
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-Bl1xoQAO.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mat-slider-editor.component-Ip2A9KcV.mjs → ngx-t-forms-mat-slider-editor.component-CW5hzpi3.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mat-slider-editor.component-Ip2A9KcV.mjs.map → ngx-t-forms-mat-slider-editor.component-CW5hzpi3.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-gU5cXWEY.mjs → ngx-t-forms-mat-slider-toggle-editor.component-uh7fK-kw.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-gU5cXWEY.mjs.map → ngx-t-forms-mat-slider-toggle-editor.component-uh7fK-kw.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-DqfXze2Z.mjs → ngx-t-forms-missing-form-configs.component-DXauybu2.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-DqfXze2Z.mjs.map → ngx-t-forms-missing-form-configs.component-DXauybu2.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-Yp_xSVSu.mjs → ngx-t-forms-mscoa-segment-config.component-Cat-o3zD.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-Yp_xSVSu.mjs.map → ngx-t-forms-mscoa-segment-config.component-Cat-o3zD.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-ngx-t-forms--NcMk6t2.mjs → ngx-t-forms-ngx-t-forms-CHdFFTXs.mjs} +521 -55
- package/fesm2022/ngx-t-forms-ngx-t-forms-CHdFFTXs.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-DWJ_pzQQ.mjs → ngx-t-forms-pipeline-generator.component-bqBbOv1s.mjs} +9 -9
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-DWJ_pzQQ.mjs.map → ngx-t-forms-pipeline-generator.component-bqBbOv1s.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-required-inputs.component-U3LicAep.mjs → ngx-t-forms-required-inputs.component-pBuYge0L.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-required-inputs.component-U3LicAep.mjs.map → ngx-t-forms-required-inputs.component-pBuYge0L.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-D_ySLlQj.mjs → ngx-t-forms-rest-api-call-setup.component-o2RDNMBk.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-D_ySLlQj.mjs.map → ngx-t-forms-rest-api-call-setup.component-o2RDNMBk.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-section-report.component-D-jjE9pS.mjs → ngx-t-forms-section-report.component-5c0zmsRd.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-section-report.component-D-jjE9pS.mjs.map → ngx-t-forms-section-report.component-5c0zmsRd.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-C1d3tc9r.mjs → ngx-t-forms-selection-options-editor.component-B0mVpnCm.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-C1d3tc9r.mjs.map → ngx-t-forms-selection-options-editor.component-B0mVpnCm.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-t-workflow-picker.component-CdAo5d0s.mjs → ngx-t-forms-t-workflow-picker.component-CxUoYxE3.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-t-workflow-picker.component-CdAo5d0s.mjs.map → ngx-t-forms-t-workflow-picker.component-CxUoYxE3.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-validators-config.component-tcjhuqdU.mjs → ngx-t-forms-validators-config.component-OIfd1D8o.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-validators-config.component-tcjhuqdU.mjs.map → ngx-t-forms-validators-config.component-OIfd1D8o.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms.mjs +1 -1
- package/lib/components/form-builder/elements/form-section-stepper/form-section-stepper.component.d.ts +3 -0
- package/lib/components/t-dynamic-data-edit/elements/mat-chip-list-editor/mat-chip-list-editor.component.d.ts +1 -0
- package/lib/components/t-form-input/elements/editor-input-element/core/editor-js-input/editor-js-input.component.d.ts +6 -2
- package/lib/components/t-form-input/elements/workflow-adjudication/elements/submission-review/submission-review.component.d.ts +84 -0
- package/lib/components/t-form-input/elements/workflow-adjudication/elements/workflow-adjudication-reactive-input/workflow-adjudication-reactive-input.component.d.ts +2 -2
- package/lib/components/user-form-stepper/user-form-stepper.component.d.ts +3 -0
- package/lib/services/core/t-form-tower-controller/form-tower-controller.service.d.ts +1 -0
- package/lib/services/core/t-form-tower-controller/functions/selectFormSteps.d.ts +5 -0
- package/lib/services/core/tour/tour-manager.service.d.ts +10 -0
- package/lib/shared/functions/mapColors.d.ts +1 -0
- package/package.json +2 -2
- package/fesm2022/ngx-t-forms-form-section-stepper.component-DauM50Lq.mjs +0 -255
- package/fesm2022/ngx-t-forms-form-section-stepper.component-DauM50Lq.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-RLWcb-CD.mjs +0 -90
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-RLWcb-CD.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms--NcMk6t2.mjs.map +0 -1
|
@@ -2,6 +2,7 @@ import { StepState } from '@angular/cdk/stepper';
|
|
|
2
2
|
import { FormTowerControllerService } from '../../services/core/t-form-tower-controller/form-tower-controller.service';
|
|
3
3
|
import { MatStepper } from '@angular/material/stepper';
|
|
4
4
|
import { FormBuilderFunctions } from 'ngx-t-forms-types';
|
|
5
|
+
import { TourManagerService } from '../../services/core/tour/tour-manager.service';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class UserFormStepperComponent extends FormTowerControllerService {
|
|
7
8
|
/**
|
|
@@ -25,6 +26,8 @@ export declare class UserFormStepperComponent extends FormTowerControllerService
|
|
|
25
26
|
canProceedToNextStep(step: any): boolean;
|
|
26
27
|
get getSubmissionStatus(): string;
|
|
27
28
|
handleSubmit(): void;
|
|
29
|
+
tourManagerService: TourManagerService;
|
|
30
|
+
startTour(sectionId: string): void;
|
|
28
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<UserFormStepperComponent, never>;
|
|
29
32
|
static ɵcmp: i0.ɵɵComponentDeclaration<UserFormStepperComponent, "lib-user-form-stepper", never, { "formId": { "alias": "formId"; "required": false; }; "initialValues": { "alias": "initialValues"; "required": false; }; "passParamsOnSubmit": { "alias": "passParamsOnSubmit"; "required": false; }; }, {}, never, never, true, never>;
|
|
30
33
|
}
|
|
@@ -72,6 +72,7 @@ export declare abstract class FormTowerControllerService implements OnDestroy {
|
|
|
72
72
|
updateFormInputConfig: (inputId: string, config: FormColumnInputs) => void;
|
|
73
73
|
handleStepChange: (event: StepperSelectionEvent) => void;
|
|
74
74
|
selectFormSteps: () => import("ngx-t-forms-types").ITowerFormSteps[];
|
|
75
|
+
selectAllFormTours: () => import("./functions/selectFormSteps").IFormTour[];
|
|
75
76
|
setSectionAsSeen: (sectionId: string) => void;
|
|
76
77
|
setSectionAsActive: (sectionId: string) => void;
|
|
77
78
|
setInputAsTouchedAndDirty: (inputId: string) => void;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { FormTowerControllerService } from "../form-tower-controller.service";
|
|
2
2
|
import { ITowerFormSteps } from 'ngx-t-forms-types';
|
|
3
|
+
import { IStepOption } from "ngx-ui-tour-md-menu";
|
|
4
|
+
export interface IFormTour extends IStepOption {
|
|
5
|
+
sectionId: string;
|
|
6
|
+
}
|
|
3
7
|
export declare const sectionFormErrorMessage: (self: FormTowerControllerService, sectionId: string) => string;
|
|
4
8
|
export declare function selectFormSteps(self: FormTowerControllerService): ITowerFormSteps[];
|
|
9
|
+
export declare const selectAllFormTours: (self: FormTowerControllerService) => IFormTour[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IStepOption } from 'ngx-ui-tour-md-menu';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class TourManagerService {
|
|
4
|
+
private readonly tourService;
|
|
5
|
+
userProfile: this;
|
|
6
|
+
constructor();
|
|
7
|
+
startTourByOption(steps: IStepOption[]): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TourManagerService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TourManagerService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getColorForNumber(targetNumber: number, numbers: number[], asc?: boolean): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-t-forms",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.22",
|
|
4
4
|
"description": "Angular forms module for creating dynamic forms through configuration. Supports form validation, custom controls, and complex form structures.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"html5-qrcode": "^2.3.8",
|
|
39
39
|
"joi": "^17.13.3",
|
|
40
40
|
"mathjs": "^14.2.0",
|
|
41
|
-
"ngx-t-forms-types": "^0.0.
|
|
41
|
+
"ngx-t-forms-types": "^0.0.12",
|
|
42
42
|
"ngx-ui-tour-md-menu": "^14.0.1",
|
|
43
43
|
"qrcode": "^1.5.3",
|
|
44
44
|
"rxjs": "~7.8.0",
|
|
@@ -1,255 +0,0 @@
|
|
|
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--NcMk6t2.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 i6$1 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
|
-
return ({
|
|
139
|
-
...col,
|
|
140
|
-
inputConfigErrors: validateFormColumnInputs(col)
|
|
141
|
-
});
|
|
142
|
-
})
|
|
143
|
-
}));
|
|
144
|
-
return steps;
|
|
145
|
-
}
|
|
146
|
-
stopDeletion(id) {
|
|
147
|
-
if (this.countdownSeconds[id]) {
|
|
148
|
-
this.countdownSeconds[id]?.stop$.next();
|
|
149
|
-
delete this.countdownSeconds[id];
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
removeInput(item) {
|
|
153
|
-
if (this.countdownSeconds[item.id]) {
|
|
154
|
-
this.stopDeletion(item.id);
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
this.countdownSeconds[item.id] = {
|
|
158
|
-
count: 5,
|
|
159
|
-
stop$: new Subject()
|
|
160
|
-
};
|
|
161
|
-
const countdown$ = timer(0, 1000).pipe(tap((secondsElapsed) => {
|
|
162
|
-
const data = this.countdownSeconds[item.id];
|
|
163
|
-
if (!data) {
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
const remainingTime = 5 - secondsElapsed;
|
|
167
|
-
if (remainingTime <= 0) {
|
|
168
|
-
this.formDeleteInput(item);
|
|
169
|
-
this.stopDeletion(item.id);
|
|
170
|
-
// Stop and remove timer
|
|
171
|
-
// Actual deletion logic here, e.g., remove the element by id
|
|
172
|
-
// document.getElementById(id)?.remove();
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
data.count = remainingTime;
|
|
176
|
-
}
|
|
177
|
-
}), takeUntil(this.countdownSeconds[item.id]?.stop$));
|
|
178
|
-
countdown$?.subscribe({
|
|
179
|
-
complete: () => {
|
|
180
|
-
console.log('Deletion stopped or completed');
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
deleteSection(sectionId) {
|
|
185
|
-
if (!sectionId) {
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
if (this.countdownSeconds[sectionId]) {
|
|
189
|
-
this.stopDeletion(sectionId);
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
this.countdownSeconds[sectionId] = {
|
|
193
|
-
count: 5,
|
|
194
|
-
stop$: new Subject()
|
|
195
|
-
};
|
|
196
|
-
const countdown$ = timer(0, 1000).pipe(tap((secondsElapsed) => {
|
|
197
|
-
const data = this.countdownSeconds[sectionId];
|
|
198
|
-
if (!data) {
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
const remainingTime = 5 - secondsElapsed;
|
|
202
|
-
if (remainingTime <= 0) {
|
|
203
|
-
this.formDeleteSection(sectionId);
|
|
204
|
-
this.stopDeletion(sectionId);
|
|
205
|
-
// Stop and remove timer
|
|
206
|
-
// Actual deletion logic here, e.g., remove the element by id
|
|
207
|
-
// document.getElementById(id)?.remove();
|
|
208
|
-
}
|
|
209
|
-
else {
|
|
210
|
-
data.count = remainingTime;
|
|
211
|
-
}
|
|
212
|
-
}), takeUntil(this.countdownSeconds[sectionId]?.stop$));
|
|
213
|
-
countdown$?.subscribe({
|
|
214
|
-
complete: () => {
|
|
215
|
-
console.log('Deletion stopped or completed');
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
refresh() {
|
|
220
|
-
// trigger angular a change detection cycle manually
|
|
221
|
-
this.ref.markForCheck();
|
|
222
|
-
this.ref.detectChanges();
|
|
223
|
-
}
|
|
224
|
-
sectionIncludesDefault(columns) {
|
|
225
|
-
return columns.some((col) => col.systemDefault);
|
|
226
|
-
}
|
|
227
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FormSectionStepperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
228
|
-
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 \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: i6$1.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, i6$1.MatTooltip, import('./ngx-t-forms-ngx-t-forms--NcMk6t2.mjs').then(function (n) { return n.R; }).then(m => m.TFormInputComponent), i7$1.TourAnchorMatMenuDirective, i1.NgControlStatusGroup, i1.FormGroupDirective, import('./ngx-t-forms-section-report.component-D-jjE9pS.mjs').then(m => m.SectionReportComponent)], () => [i2.AsyncPipe, i2$2.MatButton, i7.MatProgressSpinner, i9.MatToolbar]] }); }
|
|
229
|
-
}
|
|
230
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.2.6", ngImport: i0, type: FormSectionStepperComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-ngx-t-forms--NcMk6t2.mjs').then(function (n) { return n.R; }).then(m => m.TFormInputComponent), import('./ngx-t-forms-section-report.component-D-jjE9pS.mjs').then(m => m.SectionReportComponent)], resolveMetadata: (TFormInputComponent, SectionReportComponent) => ({ decorators: [{
|
|
231
|
-
type: Component,
|
|
232
|
-
args: [{ selector: 'app-form-section-stepper', standalone: true, imports: [
|
|
233
|
-
CommonModule,
|
|
234
|
-
MatModulesModule,
|
|
235
|
-
TFormInputComponent,
|
|
236
|
-
TourMatMenuModule,
|
|
237
|
-
ReactiveFormsModule,
|
|
238
|
-
FormsModule,
|
|
239
|
-
SectionReportComponent
|
|
240
|
-
], 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 \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"] }]
|
|
241
|
-
}], ctorParameters: null, propDecorators: {
|
|
242
|
-
/**
|
|
243
|
-
* Handles the key down event and opens the application log if the key combination is pressed.
|
|
244
|
-
* @param event The keyboard event object.
|
|
245
|
-
*/
|
|
246
|
-
onKeyDown: [{
|
|
247
|
-
type: HostListener,
|
|
248
|
-
args: ['document:keydown', ['$event']]
|
|
249
|
-
}], stepper: [{
|
|
250
|
-
type: ViewChild,
|
|
251
|
-
args: ['stepper']
|
|
252
|
-
}] } }) });
|
|
253
|
-
|
|
254
|
-
export { FormSectionStepperComponent };
|
|
255
|
-
//# sourceMappingURL=ngx-t-forms-form-section-stepper.component-DauM50Lq.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-form-section-stepper.component-DauM50Lq.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/form-section-stepper/form-section-stepper.component.ts","../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/form-section-stepper/form-section-stepper.component.html"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { ChangeDetectorRef, Component, HostListener, inject, OnInit, ViewChild } from '@angular/core';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { filter, map, Observable, Subject, take, takeUntil, tap, timer } from 'rxjs';\r\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\r\nimport { StepperSelectionEvent, StepState } from '@angular/cdk/stepper';;\r\nimport { MatStepper } from '@angular/material/stepper';\r\n\r\nimport { FormsStoreService } from '../../../forms/store/forms-store.service';\r\nimport { TFormInputComponent } from '../../..';\r\n\r\nimport { FormTowerControllerService } from '../../../../services/core/t-form-tower-controller/form-tower-controller.service';\r\nimport { FormBuilderFunctions, FormColumnInputs, IMultipleInputCal, ITowerFormSteps, validateFormColumnInputs } from 'ngx-t-forms-types';\r\nimport { _isEqual } from '../../../../shared/functions/isEqual';\r\nimport { TourMatMenuModule } from 'ngx-ui-tour-md-menu';\r\nimport { getSubmissionStatusFn } from '../../../../services/core/t-form-tower-controller/functions/getSubmissionStatus';\r\nimport { CdkDragDrop } from '@angular/cdk/drag-drop';\r\nimport { SectionReportComponent } from '../section-report/section-report.component';\r\n\r\n\r\n@Component({\r\n selector: 'app-form-section-stepper',\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n MatModulesModule,\r\n TFormInputComponent,\r\n TourMatMenuModule,\r\n ReactiveFormsModule,\r\n FormsModule,\r\n SectionReportComponent\r\n ],\r\n templateUrl: './form-section-stepper.component.html',\r\n styleUrl: './form-section-stepper.component.scss',\r\n\r\n})\r\nexport class FormSectionStepperComponent extends FormTowerControllerService implements OnInit {\r\n @HostListener('document:keydown', ['$event'])\r\n\r\n /**\r\n * Handles the key down event and opens the application log if the key combination is pressed.\r\n * @param event The keyboard event object.\r\n */\r\n onKeyDown(event: KeyboardEvent) {\r\n if (event.ctrlKey && event.key === 'z') {\r\n // Handle the key press combination here\r\n this.revertBackHistory()\r\n }\r\n }\r\n\r\n\r\n ngOnInit(): void {\r\n this.store.registerFormChangeFn(this.initialize)\r\n this.store.selectors.selectFormInEdit$.pipe(\r\n take(1),\r\n filter(form => form !== null && form !== undefined),\r\n tap(form => this.initialize(form.form))\r\n ).subscribe()\r\n }\r\n\r\n private store: FormsStoreService = inject(FormsStoreService)\r\n loadingForm$ = this.store.selectors.selectLoadingForm$\r\n selectInputInEditId$ = this.store.selectors.selectInputInEditId$\r\n isEditable = true\r\n @ViewChild('stepper') stepper: MatStepper | undefined;\r\n\r\n\r\n\r\n get formBuilderFunctions() {\r\n return {\r\n getLatestAccountTree: () => this.NGX_T_FORMS_CONFIG.formBuilder.getScoaTree(),\r\n getSCOAAccount: (SCOAAccount: string) => this.NGX_T_FORMS_CONFIG.formBuilder.getSCOAAccount(SCOAAccount),\r\n multipleInputToggleForm: this.toggleMultipleInput.bind(this),\r\n multipleInputSaveForm: this.saveMultipleInputForm.bind(this),\r\n editInput: this.editInput.bind(this),\r\n deleteInput: this.formDeleteInput.bind(this),\r\n addFunction: this.addMultipleInputValueCalculationFunction.bind(this),\r\n reorderItems: this.reorderMultipleInputItems.bind(this),\r\n multipleInputToggleLabel: this.multipleInputToggleLabel.bind(this),\r\n multipleInputEditRow: this.multipleInputEditRow.bind(this),\r\n multipleInputDuplicateRow: this.multipleInputDuplicateRow.bind(this),\r\n\r\n } as unknown as FormBuilderFunctions\r\n }\r\n getPreviousStepLabel(): string | undefined {\r\n\r\n if (this.stepper === undefined) return ''\r\n const currentIndex = this.stepper?.selectedIndex;\r\n if (currentIndex > 0) {\r\n return this.selectFormSteps()?.[currentIndex - 1]?.label;\r\n }\r\n return '';\r\n }\r\n\r\n getNextStepLabel(): string | undefined {\r\n if (this.stepper === undefined) return ''\r\n const currentIndex = this.stepper?.selectedIndex;\r\n const steps = this.selectFormSteps();\r\n if (!steps) return ''\r\n if (currentIndex < steps.length - 1) {\r\n return steps[currentIndex + 1]?.label;\r\n }\r\n return '';\r\n }\r\n getStepState(step: any, index: number): StepState {\r\n const activeStep = this.stepper?.selectedIndex === index;\r\n if (activeStep) return 'edit';\r\n if (step.sectionForm?.touched && !step.sectionForm?.valid) return 'error'; // Show error state for invalid touched forms\r\n if (step.sectionForm?.valid) return 'done'; // Show done state for valid forms\r\n\r\n return 'number';\r\n }\r\n activeInput: string | undefined\r\n get getSubmissionStatus$(): Observable<string> {\r\n const progress = this.formProgress() || 0;\r\n const steps = this.selectFormSteps();\r\n return this.loadingForm$.pipe(\r\n map(loading =>\r\n getSubmissionStatusFn(this.stepper, this.mainForm, progress, steps, loading)\r\n )\r\n )\r\n }\r\n dragging: boolean = false\r\n\r\n drop = (event: any) => this.store.actionsFormBuilder.handleSectionDragDrop(event)\r\n dropItems = (event: any, sectionId: string) => this.store.actionsFormBuilder.handleInputDragDrop(event, sectionId)\r\n formDeleteSection = (sectionId: string) => this.store.actionsFormBuilder.formDeleteSection(sectionId)\r\n addMultipleFormInput = (sectionId: string, multipleInputId: string) => this.store.actionsFormBuilder.addMultipleFormInput(sectionId, multipleInputId)\r\n moveInputToSection = (inputId: string, targetSectionId: string) => this.store.actionsFormBuilder.moveInputToSection(inputId, targetSectionId)\r\n reorderMultipleInputItems = (event: CdkDragDrop<FormColumnInputs[], any, any>, multipleInputId: string) => this.store.actionsFormBuilder.reorderMultipleInputItems(event, multipleInputId)\r\n cloneCopyFormInput = (inputId: string) => this.store.actionsFormBuilder.cloneCopyFormInput(inputId)\r\n\r\n multipleInputToggleLabel = (item: FormColumnInputs) => this.store.actionsFormBuilder.multipleInputToggleLabel(item)\r\n editInput = (item: FormColumnInputs) => this.store.actionsFormBuilder.editInput(item)\r\n addMultipleInputValueCalculationFunction = (item: IMultipleInputCal, multipleInputId: string | undefined) => this.store.actionsFormBuilder.addMultipleInputValueCalculationFunction(item, multipleInputId)\r\n setActiveSection = ($event: StepperSelectionEvent) => this.setMatActiveStepper($event.selectedIndex)\r\n addInputToScoaSelection = (sectionId: string, scoaInputId: string) => this.store.actionsFormBuilder.addInputToScoaSelection(sectionId, scoaInputId)\r\n addNewInput = (sectionId: string) => this.store.actionsFormBuilder.saveInput(sectionId);\r\n\r\n addSection = (): void => this.store.actionsFormBuilder.handleAddSection()\r\n setMatActiveStepper = (index: number) => setTimeout(() => {\r\n if (this.stepper === undefined) return;\r\n this.stepper.selectedIndex = index\r\n }, 0);\r\n mouseOverSection: string | null = null\r\n handleInput = (event: Event, sectionId: string) => {\r\n // Cast the event target to HTMLInputElement to access the value property\r\n console.error('handleInput', event, sectionId)\r\n const inputValue = (event.target as HTMLInputElement).value;\r\n\r\n // Pass the input value to the store action\r\n this.store.actionsFormBuilder?.stepTitleChangeStep(sectionId, inputValue);\r\n event.stopPropagation();\r\n event.preventDefault();\r\n\r\n }\r\n get selectFormStepsComputed(): ITowerFormSteps[] {\r\n const steps = this.selectFormSteps().map(\r\n (step) => (\r\n {\r\n ...step,\r\n columns: step.columns.map(\r\n (col) => {\r\n return ({\r\n ...col,\r\n \r\n inputConfigErrors: validateFormColumnInputs(col)\r\n\r\n })\r\n }\r\n )\r\n\r\n }\r\n )\r\n )\r\n \r\n return steps\r\n }\r\n overId: string | null = null\r\n\r\n countdownSeconds: {\r\n [key: string]:\r\n {\r\n count: number | null,\r\n stop$: Subject<void>\r\n\r\n\r\n }\r\n } = {}\r\n stopDeletion(id: string) {\r\n if (this.countdownSeconds[id]) {\r\n this.countdownSeconds[id]?.stop$.next();\r\n delete this.countdownSeconds[id];\r\n }\r\n }\r\n inputWillBeRemovedIn = (id: string) => this.countdownSeconds[id]?.count\r\n removeInput(item: FormColumnInputs) {\r\n if (this.countdownSeconds[item.id]) {\r\n this.stopDeletion(item.id);\r\n return;\r\n }\r\n\r\n this.countdownSeconds[item.id] = {\r\n count: 5,\r\n stop$: new Subject<void>()\r\n };\r\n\r\n const countdown$ = timer(0, 1000).pipe(\r\n tap((secondsElapsed) => {\r\n const data = this.countdownSeconds[item.id];\r\n if (!data) {\r\n return;\r\n }\r\n\r\n const remainingTime = 5 - secondsElapsed;\r\n if (remainingTime <= 0) {\r\n this.formDeleteInput(item)\r\n this.stopDeletion(item.id);\r\n // Stop and remove timer\r\n // Actual deletion logic here, e.g., remove the element by id\r\n // document.getElementById(id)?.remove();\r\n } else {\r\n data.count = remainingTime;\r\n }\r\n }),\r\n takeUntil(this.countdownSeconds[item.id]?.stop$!)\r\n );\r\n\r\n countdown$?.subscribe({\r\n complete: () => {\r\n console.log('Deletion stopped or completed');\r\n }\r\n });\r\n }\r\n deleteSection(sectionId: string | null) {\r\n if (!sectionId) {\r\n return;\r\n }\r\n if (this.countdownSeconds[sectionId]) {\r\n this.stopDeletion(sectionId);\r\n return;\r\n }\r\n\r\n this.countdownSeconds[sectionId] = {\r\n count: 5,\r\n stop$: new Subject<void>()\r\n };\r\n\r\n const countdown$ = timer(0, 1000).pipe(\r\n tap((secondsElapsed) => {\r\n const data = this.countdownSeconds[sectionId];\r\n if (!data) {\r\n return;\r\n }\r\n\r\n const remainingTime = 5 - secondsElapsed;\r\n if (remainingTime <= 0) {\r\n this.formDeleteSection(sectionId)\r\n this.stopDeletion(sectionId);\r\n // Stop and remove timer\r\n // Actual deletion logic here, e.g., remove the element by id\r\n // document.getElementById(id)?.remove();\r\n } else {\r\n data.count = remainingTime;\r\n }\r\n }),\r\n takeUntil(this.countdownSeconds[sectionId]?.stop$!)\r\n );\r\n\r\n countdown$?.subscribe({\r\n complete: () => {\r\n console.log('Deletion stopped or completed');\r\n }\r\n });\r\n }\r\n getPlaceHolerForSection = (sectionId: string): any => this.store.sectionPlaceholder[sectionId]\r\n formDeleteInput = (item: FormColumnInputs) => this.store.actionsFormBuilder.formDeleteInput(item)\r\n openSectionReports: Record<string, boolean> = {}\r\n toggleSectionReports = (sectionId: string) => this.openSectionReports[sectionId] = !this.openSectionReports[sectionId]\r\nref = inject(ChangeDetectorRef)\r\n refresh() {\r\n // trigger angular a change detection cycle manually\r\n this.ref.markForCheck();\r\n this.ref.detectChanges();\r\n \r\n }\r\n sectionIncludesDefault(columns: FormColumnInputs[]): boolean {\r\n return columns.some((col) => col.systemDefault);\r\n }\r\n}\r\n","<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 \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>"],"names":["i1","i2","i3","i4","i5","i6","i7","i8","i9","i10","i11","i12"],"mappings":";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AA2B,EAAA,mBAAA,EAAA,MAAA,CAAA,OAAA,wCAAA,oCAAA,CAAA,IAAA,CAAA,CAAA,IAAA,CAAA,CAAA,mBAAA,CAAA,EAAA,OAAA,qDAAA,CAAA,CAAA,IAAA,CAAA,CAAA,IAAA,CAAA,CAAA,sBAAA,CAAA,CAAA,EAAA,eAAA,EAAA,CAAA,mBAAA,EAAA,sBAAA,MAAA,EAAA,UAAA,EAAA,CAAA;sBAhBvC,SAAS;mCACE,0BAA0B,EAAA,UAAA,EACxB,IAAI,EACP,OAAA,EAAA;4BACP,YAAY;4BACZ,gBAAgB;4BAChB,mBAAmB;4BACnB,iBAAiB;4BACjB,mBAAmB;4BACnB,WAAW;4BACX;AACD,yBAAA,EAAA,QAAA,EAAA,y2YAAA,EAAA,MAAA,EAAA,CAAA,u2DAAA,CAAA,EAAA;;AAQD;;;AAGG;YACH,SAAS,EAAA,CAAA;0BANR,YAAY;2BAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC;oBA2BtB,OAAO,EAAA,CAAA;0BAA5B,SAAS;2BAAC,SAAS;;;;;"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Output, Input, HostBinding, Optional, Self, Component } from '@angular/core';
|
|
3
|
-
import { M as MatModulesModule } from './ngx-t-forms-ngx-t-forms--NcMk6t2.mjs';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
6
|
-
import { Subject } from 'rxjs';
|
|
7
|
-
import * as i1 from '@angular/forms';
|
|
8
|
-
import * as i4 from '@angular/material/chips';
|
|
9
|
-
|
|
10
|
-
class MatChipListEditorComponent {
|
|
11
|
-
static { this.nextId = 0; }
|
|
12
|
-
constructor(ngControl, _elementRef) {
|
|
13
|
-
this.ngControl = ngControl;
|
|
14
|
-
this._elementRef = _elementRef;
|
|
15
|
-
this.stateChanges = new Subject();
|
|
16
|
-
this.id = `lib-mat-chip-list-editor-${MatChipListEditorComponent.nextId++}`;
|
|
17
|
-
this.placeholder = '';
|
|
18
|
-
this.focused = false;
|
|
19
|
-
this.disabled = false;
|
|
20
|
-
this.touched = false;
|
|
21
|
-
this.onTouched = () => { };
|
|
22
|
-
this.errors = [];
|
|
23
|
-
this.required = false;
|
|
24
|
-
this.options = [];
|
|
25
|
-
this.valueChange = new EventEmitter();
|
|
26
|
-
}
|
|
27
|
-
get empty() {
|
|
28
|
-
return !this.value;
|
|
29
|
-
}
|
|
30
|
-
get shouldLabelFloat() {
|
|
31
|
-
return this.focused || !this.empty;
|
|
32
|
-
}
|
|
33
|
-
get errorState() {
|
|
34
|
-
const hasError = !!this.ngControl?.control?.errors || (this.errors || []).length > 0 && this.touched;
|
|
35
|
-
return !this.value && !!this.required || hasError;
|
|
36
|
-
}
|
|
37
|
-
setDescribedByIds(ids) {
|
|
38
|
-
// Ensure the component view is initialized
|
|
39
|
-
if (this._elementRef && this._elementRef.nativeElement) {
|
|
40
|
-
const controlElement = this._elementRef.nativeElement.querySelector('.lib-mat-chip-list-editor');
|
|
41
|
-
// Check if the controlElement exists before attempting to set its attribute
|
|
42
|
-
if (controlElement) {
|
|
43
|
-
controlElement.setAttribute('aria-describedby', ids.join(' '));
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
onContainerClick(event) {
|
|
48
|
-
this.markAsTouched();
|
|
49
|
-
this.stateChanges.next();
|
|
50
|
-
}
|
|
51
|
-
markAsTouched() {
|
|
52
|
-
console.log('markAsTouched');
|
|
53
|
-
if (!this.touched) {
|
|
54
|
-
this.onTouched();
|
|
55
|
-
this.touched = true;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
valueListChanged($event) {
|
|
59
|
-
this.valueChange.emit($event.value);
|
|
60
|
-
}
|
|
61
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MatChipListEditorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
62
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: MatChipListEditorComponent, isStandalone: true, selector: "lib-mat-chip-list-editor", inputs: { disabled: "disabled", errors: "errors", value: "value", required: "required", options: "options" }, outputs: { valueChange: "valueChange" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl,
|
|
63
|
-
useExisting: MatChipListEditorComponent }], ngImport: i0, template: "<mat-chip-listbox [value]=\"value\"\r\n[disabled]=\"disabled\"\r\n(change)=\"valueListChanged($event)\" aria-l abel=\"Chip select options\">\r\n @for(option of options;track option.value){\r\n <mat-chip-option [value]=\"option.value\">{{option.label}}</mat-chip-option>\r\n }\r\n\r\n</mat-chip-listbox>", styles: [""], dependencies: [{ kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i4.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i4.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "ngmodule", type: CommonModule }] }); }
|
|
64
|
-
}
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MatChipListEditorComponent, decorators: [{
|
|
66
|
-
type: Component,
|
|
67
|
-
args: [{ selector: 'lib-mat-chip-list-editor', standalone: true, imports: [MatModulesModule, CommonModule], providers: [{ provide: MatFormFieldControl,
|
|
68
|
-
useExisting: MatChipListEditorComponent }], template: "<mat-chip-listbox [value]=\"value\"\r\n[disabled]=\"disabled\"\r\n(change)=\"valueListChanged($event)\" aria-l abel=\"Chip select options\">\r\n @for(option of options;track option.value){\r\n <mat-chip-option [value]=\"option.value\">{{option.label}}</mat-chip-option>\r\n }\r\n\r\n</mat-chip-listbox>" }]
|
|
69
|
-
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
70
|
-
type: Optional
|
|
71
|
-
}, {
|
|
72
|
-
type: Self
|
|
73
|
-
}] }, { type: i0.ElementRef }], propDecorators: { id: [{
|
|
74
|
-
type: HostBinding
|
|
75
|
-
}], disabled: [{
|
|
76
|
-
type: Input
|
|
77
|
-
}], errors: [{
|
|
78
|
-
type: Input
|
|
79
|
-
}], value: [{
|
|
80
|
-
type: Input
|
|
81
|
-
}], required: [{
|
|
82
|
-
type: Input
|
|
83
|
-
}], options: [{
|
|
84
|
-
type: Input
|
|
85
|
-
}], valueChange: [{
|
|
86
|
-
type: Output
|
|
87
|
-
}] } });
|
|
88
|
-
|
|
89
|
-
export { MatChipListEditorComponent };
|
|
90
|
-
//# sourceMappingURL=ngx-t-forms-mat-chip-list-editor.component-RLWcb-CD.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-mat-chip-list-editor.component-RLWcb-CD.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/mat-chip-list-editor/mat-chip-list-editor.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/mat-chip-list-editor/mat-chip-list-editor.component.html"],"sourcesContent":["import { Component, ElementRef, EventEmitter, HostBinding, Input, Optional, Output, Self } from '@angular/core';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { Subject } from 'rxjs';\r\nimport { NgControl } from '@angular/forms';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\nimport { MatChipListboxChange } from '@angular/material/chips';\r\n\r\n@Component({\r\n selector: 'lib-mat-chip-list-editor',\r\n standalone: true,\r\n imports: [MatModulesModule, CommonModule],\r\n templateUrl: './mat-chip-list-editor.component.html',\r\n styleUrl: './mat-chip-list-editor.component.css',\r\n providers: [{ provide: MatFormFieldControl,\r\n useExisting:MatChipListEditorComponent}],\r\n})\r\nexport class MatChipListEditorComponent implements MatFormFieldControl<{\r\n label: string,\r\n value: any\r\n}[]> {\r\n\r\n \r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n \r\n @HostBinding() id = `lib-mat-chip-list-editor-${MatChipListEditorComponent.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 \r\n @Input() disabled: 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-mat-chip-list-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 @Input() errors:IConfigElementError[] |undefined = [];\r\n @Input() value: any;\r\n @Input() required: boolean = false;\r\n @Input() options:{\r\n label: string,\r\n value: any\r\n }[] | undefined =[]\r\n @Output() valueChange = new EventEmitter<any>();\r\n\r\n valueListChanged($event: MatChipListboxChange) {\r\n this.valueChange.emit($event.value);\r\n }\r\n}\r\n","<mat-chip-listbox [value]=\"value\"\r\n[disabled]=\"disabled\"\r\n(change)=\"valueListChanged($event)\" aria-l abel=\"Chip select options\">\r\n @for(option of options;track option.value){\r\n <mat-chip-option [value]=\"option.value\">{{option.label}}</mat-chip-option>\r\n }\r\n\r\n</mat-chip-listbox>"],"names":["i2"],"mappings":";;;;;;;;;MAkBa,0BAA0B,CAAA;aAM5B,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;AAEnB,QAAA,IAAA,CAAA,EAAE,GAAG,CAA4B,yBAAA,EAAA,0BAA0B,CAAC,MAAM,EAAE,EAAE;QAErF,IAAW,CAAA,WAAA,GAAW,EAAE;QAExB,IAAO,CAAA,OAAA,GAAY,KAAK;QAQf,IAAQ,CAAA,QAAA,GAAY,KAAK;QAyBlC,IAAO,CAAA,OAAA,GAAY,KAAK;AACxB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAK,GAAI;QAYV,IAAM,CAAA,MAAA,GAAoC,EAAE;QAEhD,IAAQ,CAAA,QAAA,GAAY,KAAK;QACzB,IAAO,CAAA,OAAA,GAGC,EAAE;AACT,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAO;;AApD7C,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;;AAIpC,IAAA,IAAI,UAAU,GAAA;QACZ,MAAM,QAAQ,GAAG,CAAC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