ngx-t-forms 2.0.4 → 2.0.5
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-CZuOneM4.mjs → ngx-t-forms-api-value-access-rules.component-DVxjY46W.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-api-value-access-rules.component-CZuOneM4.mjs.map → ngx-t-forms-api-value-access-rules.component-DVxjY46W.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-CyI98qg-.mjs → ngx-t-forms-calculated-field-rules.component-CF0b2IAN.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-CyI98qg-.mjs.map → ngx-t-forms-calculated-field-rules.component-CF0b2IAN.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CqIs3vX5.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-DEDrjICX.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CqIs3vX5.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-DEDrjICX.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-input-selector.component-D4QnMgZV.mjs → ngx-t-forms-form-input-selector.component-BZLCiTEx.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-input-selector.component-D4QnMgZV.mjs.map → ngx-t-forms-form-input-selector.component-BZLCiTEx.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-json-view.component-Dmd0DIAm.mjs → ngx-t-forms-form-json-view.component-BbPsAiEG.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-json-view.component-Dmd0DIAm.mjs.map → ngx-t-forms-form-json-view.component-BbPsAiEG.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-DlvXkLBk.mjs → ngx-t-forms-form-section-stepper.component-BYli3qzy.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-DlvXkLBk.mjs.map → ngx-t-forms-form-section-stepper.component-BYli3qzy.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-CNNd7BqK.mjs → ngx-t-forms-forms-builder-menu.component-beIiFQyM.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-CNNd7BqK.mjs.map → ngx-t-forms-forms-builder-menu.component-beIiFQyM.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-input-editor.component-CItOFrvx.mjs +280 -0
- package/fesm2022/ngx-t-forms-input-editor.component-CItOFrvx.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-C4_iUWzY.mjs → ngx-t-forms-mat-chip-list-editor.component-D1jGY0Wp.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-C4_iUWzY.mjs.map → ngx-t-forms-mat-chip-list-editor.component-D1jGY0Wp.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-slider-editor.component-CapaodC5.mjs → ngx-t-forms-mat-slider-editor.component-bDCnls3E.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mat-slider-editor.component-CapaodC5.mjs.map → ngx-t-forms-mat-slider-editor.component-bDCnls3E.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-By2FAlH_.mjs → ngx-t-forms-mat-slider-toggle-editor.component-C7q7RAhA.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-By2FAlH_.mjs.map → ngx-t-forms-mat-slider-toggle-editor.component-C7q7RAhA.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-fAU-JAr1.mjs → ngx-t-forms-missing-form-configs.component-kdu_ar17.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-fAU-JAr1.mjs.map → ngx-t-forms-missing-form-configs.component-kdu_ar17.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-BR1ALZeD.mjs → ngx-t-forms-mscoa-segment-config.component-B80B7Y2g.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-BR1ALZeD.mjs.map → ngx-t-forms-mscoa-segment-config.component-B80B7Y2g.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-ngx-t-forms-DW5CqjCd.mjs → ngx-t-forms-ngx-t-forms-BIKaG6Gx.mjs} +28 -158
- package/fesm2022/ngx-t-forms-ngx-t-forms-BIKaG6Gx.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-BBQEFIyY.mjs → ngx-t-forms-pipeline-generator.component-CZRBVUb4.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-BBQEFIyY.mjs.map → ngx-t-forms-pipeline-generator.component-CZRBVUb4.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-required-inputs.component-Dm4DQOlu.mjs → ngx-t-forms-required-inputs.component-CnRGUtEj.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-required-inputs.component-Dm4DQOlu.mjs.map → ngx-t-forms-required-inputs.component-CnRGUtEj.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-C0lOrUPY.mjs → ngx-t-forms-rest-api-call-setup.component-C_zsy4Pr.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-C0lOrUPY.mjs.map → ngx-t-forms-rest-api-call-setup.component-C_zsy4Pr.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-section-report.component-CqtN0ffr.mjs → ngx-t-forms-section-report.component-y45ZmKLZ.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-section-report.component-CqtN0ffr.mjs.map → ngx-t-forms-section-report.component-y45ZmKLZ.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-DSundfcO.mjs → ngx-t-forms-selection-options-editor.component-CKdTcvyb.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-DSundfcO.mjs.map → ngx-t-forms-selection-options-editor.component-CKdTcvyb.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-validators-config.component-DSZO3LdN.mjs → ngx-t-forms-validators-config.component-CTUwEJKh.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-validators-config.component-DSZO3LdN.mjs.map → ngx-t-forms-validators-config.component-CTUwEJKh.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms.mjs +1 -1
- package/lib/components/form-builder/elements/input-element-editor/input-element-editor.component.d.ts +5 -3
- package/lib/components/forms/store/Form-selectors-FormBuilder.d.ts +0 -12
- package/lib/components/forms/store/forms-store.service.d.ts +0 -12
- package/package.json +1 -1
- package/fesm2022/ngx-t-forms-input-editor.component-hf6AapZI.mjs +0 -152
- package/fesm2022/ngx-t-forms-input-editor.component-hf6AapZI.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-DW5CqjCd.mjs.map +0 -1
package/fesm2022/{ngx-t-forms-ngx-t-forms-DW5CqjCd.mjs → ngx-t-forms-ngx-t-forms-BIKaG6Gx.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, Component, InjectionToken, makeEnvironmentProviders, inject, Inject, Directive, NgModule, Input, Pipe, EventEmitter, Output, ViewChild, Optional, Self, ChangeDetectionStrategy, ViewEncapsulation, forwardRef } from '@angular/core';
|
|
3
|
-
import { DataSources, formColumnInputsSchema, ElementTypes, validateCalculatedFieldRules, CalculationFunctions, MinInputTypes, InputDataTypes, FormSubmissionStatus, validateForm, FormListSection, FormStateErrors,
|
|
3
|
+
import { DataSources, formColumnInputsSchema, ElementTypes, validateCalculatedFieldRules, CalculationFunctions, MinInputTypes, InputDataTypes, FormSubmissionStatus, validateForm, FormListSection, FormStateErrors, DefaultInputConfig, validateFormSlide, validateFormColumnInputsWithRequired, BlurHandleTypes, AllFormInputPrimaryKeys, ElementEditorTypes, AllDocumentFileExtensions, AllImageFileExtensions, InputFileType, UploadTypes, InputTypes, AutocapitalizeOptions } from 'ngx-t-forms-types';
|
|
4
4
|
import * as i1$2 from '@angular/forms';
|
|
5
5
|
import { Validators, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
6
6
|
import ExpressionValidator from 'stringtoobjectvalidator';
|
|
@@ -3504,155 +3504,6 @@ function missingConfig(form) {
|
|
|
3504
3504
|
}
|
|
3505
3505
|
}
|
|
3506
3506
|
|
|
3507
|
-
function testAgainstItem(test, item) {
|
|
3508
|
-
try {
|
|
3509
|
-
const testValue = test.deepBind ? safeReturnDeepProperty(item, test.deepBind || [])?.value : item;
|
|
3510
|
-
const key = test.deepBind ? test.deepBind[test.deepBind.length - 1] : '';
|
|
3511
|
-
const objectValue = test.deepBind ? { [key || '']: testValue } : testValue;
|
|
3512
|
-
if (test.expression) {
|
|
3513
|
-
return ExpressionValidator(test.expression, objectValue);
|
|
3514
|
-
}
|
|
3515
|
-
if (test.testType === 'exists') {
|
|
3516
|
-
return test.testType === 'exists' && testValue !== '' && testValue !== undefined;
|
|
3517
|
-
}
|
|
3518
|
-
if (test.testType === 'equalTo') {
|
|
3519
|
-
return testValue === test.valueMatch;
|
|
3520
|
-
}
|
|
3521
|
-
return false;
|
|
3522
|
-
}
|
|
3523
|
-
catch (error) {
|
|
3524
|
-
return false;
|
|
3525
|
-
}
|
|
3526
|
-
}
|
|
3527
|
-
|
|
3528
|
-
;
|
|
3529
|
-
function inputElementEditorConfigs(form, inputInEdit, NGX_T_FORMS_CONFIG, utils) {
|
|
3530
|
-
try {
|
|
3531
|
-
// Get base configuration
|
|
3532
|
-
const config = getElementEditorConfig;
|
|
3533
|
-
// Get validation errors for the input being edited
|
|
3534
|
-
const errors = inputInEditValidationErrors(form, inputInEdit);
|
|
3535
|
-
// Create a completely new configuration object (for change detection)
|
|
3536
|
-
return {
|
|
3537
|
-
...config, // Copy all base properties
|
|
3538
|
-
// Create new array with new section objects
|
|
3539
|
-
editorSections: config.editorSections.map(section => {
|
|
3540
|
-
const elements = getSectionElements(section.elements, inputInEdit, NGX_T_FORMS_CONFIG, utils, errors);
|
|
3541
|
-
// Check if any element in this section has errors
|
|
3542
|
-
const hasErrors = section.elements.some(el => errors.some(err => err.key === el.deepBind?.join('.')));
|
|
3543
|
-
return ({
|
|
3544
|
-
...section,
|
|
3545
|
-
elements: [...[], ...elements],
|
|
3546
|
-
hasErrors
|
|
3547
|
-
});
|
|
3548
|
-
})
|
|
3549
|
-
};
|
|
3550
|
-
}
|
|
3551
|
-
catch (error) {
|
|
3552
|
-
const message = error instanceof Error ? error.message : 'Failed to configure columns';
|
|
3553
|
-
throw new Error(message);
|
|
3554
|
-
}
|
|
3555
|
-
}
|
|
3556
|
-
function getSectionElements(elements, inputInEdit, NGX_T_FORMS_CONFIG, utils, errors = []) {
|
|
3557
|
-
try {
|
|
3558
|
-
const defaultInputs = { ...DefaultInputConfig };
|
|
3559
|
-
if (!inputInEdit)
|
|
3560
|
-
return [];
|
|
3561
|
-
const defaultInput = defaultInputs[inputInEdit?.element];
|
|
3562
|
-
return elements
|
|
3563
|
-
.map(el => processElement(el, inputInEdit, NGX_T_FORMS_CONFIG, utils, errors))
|
|
3564
|
-
.filter(el => isElementApplicable(inputInEdit, defaultInput?.properties, el));
|
|
3565
|
-
}
|
|
3566
|
-
catch (err) {
|
|
3567
|
-
console.error('Error processing section elements:', err);
|
|
3568
|
-
return [];
|
|
3569
|
-
}
|
|
3570
|
-
}
|
|
3571
|
-
function processElement(element, inputInEdit, NGX_T_FORMS_CONFIG, utils, errors = []) {
|
|
3572
|
-
const defaultInputs = { ...DefaultInputConfig };
|
|
3573
|
-
if (!inputInEdit)
|
|
3574
|
-
return [];
|
|
3575
|
-
const defaultInput = defaultInputs[inputInEdit?.element];
|
|
3576
|
-
return {
|
|
3577
|
-
...element,
|
|
3578
|
-
computedErrors: computedErrors(element, errors),
|
|
3579
|
-
required: defaultInput?.requiredProperties?.includes(element.name),
|
|
3580
|
-
postmanCollectionConfig: getPostmanConfig(element, NGX_T_FORMS_CONFIG),
|
|
3581
|
-
httpGetDataFunction: utils.httpGetDataFunction.bind(utils),
|
|
3582
|
-
getWorkflowOptions: element.editType === ElementEditorTypes.MongoPipelineBuilder ?
|
|
3583
|
-
NGX_T_FORMS_CONFIG.formBuilder.workflows() :
|
|
3584
|
-
undefined,
|
|
3585
|
-
getMscoaTree: element.editType === ElementEditorTypes.ConfigMscoaSegments ?
|
|
3586
|
-
NGX_T_FORMS_CONFIG.formBuilder.getScoaTree() :
|
|
3587
|
-
undefined
|
|
3588
|
-
};
|
|
3589
|
-
}
|
|
3590
|
-
;
|
|
3591
|
-
function getPostmanConfig(element, NGX_T_FORMS_CONFIG) {
|
|
3592
|
-
if (![ElementEditorTypes.ApiCall, ElementEditorTypes.ApiValueAccessRules].includes(element.editType)) {
|
|
3593
|
-
return undefined;
|
|
3594
|
-
}
|
|
3595
|
-
return {
|
|
3596
|
-
collectionUrl: String(NGX_T_FORMS_CONFIG['POSTMAN_COLLECTION_URL'] || ''),
|
|
3597
|
-
collectionKey: String(NGX_T_FORMS_CONFIG['POSTMAN_COLLECTION_KEY'] || '')
|
|
3598
|
-
};
|
|
3599
|
-
}
|
|
3600
|
-
function isElementApplicable(input, inputProperties, element) {
|
|
3601
|
-
const { name, additionalTest } = element;
|
|
3602
|
-
const isDefault = name === SpecialElementKeys.Default;
|
|
3603
|
-
if (!!isDefault && !additionalTest)
|
|
3604
|
-
return true;
|
|
3605
|
-
// Check property inclusion
|
|
3606
|
-
const isInputProperty = inputProperties?.includes(name);
|
|
3607
|
-
if (!isInputProperty && !isDefault)
|
|
3608
|
-
return false;
|
|
3609
|
-
// Execute additional tests
|
|
3610
|
-
return additionalTest ?
|
|
3611
|
-
additionalTest.every(test => testAgainstItem(test, input)) :
|
|
3612
|
-
!!isInputProperty;
|
|
3613
|
-
}
|
|
3614
|
-
;
|
|
3615
|
-
function inputInEditValidationErrors(form, inputInEdit) {
|
|
3616
|
-
try {
|
|
3617
|
-
const defaultInputs = { ...DefaultInputConfig };
|
|
3618
|
-
let allInputs = form?.slides?.flatMap(slide => slide.columns) || [];
|
|
3619
|
-
const parentInput = allInputs.find(input => input.id === inputInEdit?.multipleInputInEditId);
|
|
3620
|
-
if (!inputInEdit || !inputInEdit.element)
|
|
3621
|
-
return [];
|
|
3622
|
-
const editingNewInput = !inputInEdit?.id;
|
|
3623
|
-
if (!editingNewInput) {
|
|
3624
|
-
return validateFormColumnInputsWithRequired({
|
|
3625
|
-
data: inputInEdit,
|
|
3626
|
-
requiredKeys: (defaultInputs[inputInEdit.element]?.requiredProperties || [])
|
|
3627
|
-
});
|
|
3628
|
-
}
|
|
3629
|
-
// Improved duplicate check logic
|
|
3630
|
-
const isDuplicateFormControl = () => {
|
|
3631
|
-
if (!inputInEdit.formControlName)
|
|
3632
|
-
return false;
|
|
3633
|
-
if (parentInput) {
|
|
3634
|
-
return parentInput.formInputs?.some(input => input.formControlName === inputInEdit.formControlName) || false;
|
|
3635
|
-
}
|
|
3636
|
-
return allInputs.some(input => input.formControlName === inputInEdit.formControlName);
|
|
3637
|
-
};
|
|
3638
|
-
const duplicateError = isDuplicateFormControl()
|
|
3639
|
-
? [{ key: 'formControlName', message: 'Form control name must be unique' }]
|
|
3640
|
-
: [];
|
|
3641
|
-
return [...duplicateError, ...validateFormColumnInputsWithRequired({
|
|
3642
|
-
data: inputInEdit,
|
|
3643
|
-
requiredKeys: (defaultInputs[inputInEdit.element]?.requiredProperties || [])
|
|
3644
|
-
})];
|
|
3645
|
-
}
|
|
3646
|
-
catch (error) {
|
|
3647
|
-
const msg = error instanceof Error ? error.message : 'Failed to check form config';
|
|
3648
|
-
throw new Error(msg);
|
|
3649
|
-
}
|
|
3650
|
-
}
|
|
3651
|
-
function computedErrors(element, allErrors) {
|
|
3652
|
-
const errors = allErrors?.filter(error => error.key === element.deepBind?.join('.'));
|
|
3653
|
-
return [...[], ...errors];
|
|
3654
|
-
}
|
|
3655
|
-
|
|
3656
3507
|
;
|
|
3657
3508
|
;
|
|
3658
3509
|
function formsFormBuilderStoreSelectors(store) {
|
|
@@ -3717,7 +3568,6 @@ function formsFormBuilderStoreSelectors(store) {
|
|
|
3717
3568
|
}));
|
|
3718
3569
|
const selectFormTitle$ = selectFormInEdit$.pipe(map((form) => form?.formTitle));
|
|
3719
3570
|
const getAllFormInputs$ = selectFormInEdit$.pipe(map((form) => form?.slides.flatMap(slide => slide.columns) || []));
|
|
3720
|
-
const inputElementEditorConfigs$ = inputInEdit$.pipe(switchMap((inputInEdit) => selectFormInEdit$.pipe(map(form => inputElementEditorConfigs(form, inputInEdit, store.NGX_T_FORMS_CONFIG, store.utils)))));
|
|
3721
3571
|
return {
|
|
3722
3572
|
selectFormSlides$,
|
|
3723
3573
|
missingConfig$,
|
|
@@ -3731,7 +3581,6 @@ function formsFormBuilderStoreSelectors(store) {
|
|
|
3731
3581
|
inputInEditValidationErrors$,
|
|
3732
3582
|
selectFormTitle$,
|
|
3733
3583
|
getAllFormInputs$,
|
|
3734
|
-
inputElementEditorConfigs$,
|
|
3735
3584
|
selectFormSlideSections$
|
|
3736
3585
|
};
|
|
3737
3586
|
}
|
|
@@ -4934,9 +4783,9 @@ class FormBuilderComponent {
|
|
|
4934
4783
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FormBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4935
4784
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: FormBuilderComponent, isStandalone: true, selector: "app-form-builder", inputs: { formId: "formId" }, providers: [
|
|
4936
4785
|
FormsStoreService
|
|
4937
|
-
], ngImport: i0, template: "<header>\r\n <mat-toolbar color=\"primary\">\r\n @if (closeButton) {\r\n <button mat-icon-button [style.color]=\"closeButton.color\" (click)=\"closeButton.onClick()\">\r\n <mat-icon>{{closeButton.icon}}</mat-icon>\r\n </button>\r\n }\r\n\r\n <!-- Navigation group -->\r\n <div class=\"nav-group\">\r\n <button mat-button routerLink=\"/\">Forms</button>\r\n <mat-icon>navigate_next</mat-icon>\r\n </div>\r\n\r\n <!-- Title input with optimized binding -->\r\n @if (selectHasFormId()) {\r\n <input [(ngModel)]=\"titleValue\" class=\"section-title-input\" placeholder=\"Enter Form Title\">\r\n }\r\n\r\n <span class=\"spacer\"></span>\r\n\r\n @defer (on viewport) {\r\n <app-forms-builder-menu />\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=\"20\" />\r\n </div>\r\n\r\n }\r\n\r\n <span class=\"divider\">|</span>\r\n\r\n <!-- Save/Update button with optimized reactive state -->\r\n <button mat-raised-button color=\"accent\" class=\"save-button\" [disabled]=\"!(canSaveForm())\"\r\n (click)=\"saveForm()\">\r\n\r\n <mat-icon>\r\n {{(isNewForm()) ? 'save' : 'update'}}\r\n </mat-icon>\r\n\r\n @if (selectFormBuilderIsBusy()) {\r\n {{(isNewForm()) ? '..Saving new form' : '..Updating Form'}}\r\n } @else {\r\n {{(isNewForm()) ? 'Save' : 'Update'}}\r\n }\r\n </button>\r\n\r\n <!-- Updated time info -->\r\n @if (!(isNewForm())) {\r\n <div class=\"updated-time\">\r\n <mat-icon>update</mat-icon>\r\n <span>Updated {{ selectFormUpdated() }}</span>\r\n </div>\r\n }\r\n </mat-toolbar>\r\n</header>\r\n\r\n<!-- Main content with optimized loading -->\r\n@defer (on viewport) {\r\n<div class=\"container\">\r\n <div class=\"middle\">\r\n <br>\r\n @if (selectLoadingForm()) {\r\n <div class=\"loading-container\">\r\n <mat-spinner />\r\n </div>\r\n } @else {\r\n <app-form-section-stepper />\r\n }\r\n <br>\r\n @if ((hasMissingConfigs()) && !(selectLoadingForm())) {\r\n <app-missing-form-configs />\r\n }\r\n </div>\r\n\r\n @if (elementEditorOpen()) {\r\n <app-input-editor style=\"max-width:480px;height:calc(100vh - 64px);z-index:1\" cdkDrag cdkDragBoundary=\"container\" class=\"middle editor-container\" />\r\n }\r\n <!-- Missing fields section -->`\r\n\r\n\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=\"50\" />\r\n </div>\r\n}", styles: [".container{display:flex;width:100%;height:calc(100% - 64px)}.side{width:100px;background-color:#f8d7da}.middle{flex-grow:1;height:100%;overflow:auto;background-color:none}.section-title-input{border:none;background-color:transparent;font-size:16px;font-weight:600;color:#fff;padding-top:12px;padding-bottom:12px;outline:none;min-width:268px;transition:border-bottom-color .3s ease-in-out}.section-title-input:focus{border-bottom:1px solid #ffffff}.missing-fields{position:fixed;bottom:0}.updated-time{display:flex;gap:8px;align-items:center;line-height:normal;font-size:14px;bottom:0;position:absolute;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);padding:8px;border-radius:4px}.nav-group{display:flex;align-items:center;gap:8px}.save-button{margin-left:8px;min-width:168px}.loading-container{display:flex;height:calc(100% - 150px);justify-content:center;align-items:center}.editor-container{max-width:500px}.divider{margin:0 8px;opacity:.5}app-missing-form-configs{position:absolute;bottom:0;right:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], deferBlockDependencies: [() => [import('./ngx-t-forms-forms-builder-menu.component-
|
|
4786
|
+
], ngImport: i0, template: "<header>\r\n <mat-toolbar color=\"primary\">\r\n @if (closeButton) {\r\n <button mat-icon-button [style.color]=\"closeButton.color\" (click)=\"closeButton.onClick()\">\r\n <mat-icon>{{closeButton.icon}}</mat-icon>\r\n </button>\r\n }\r\n\r\n <!-- Navigation group -->\r\n <div class=\"nav-group\">\r\n <button mat-button routerLink=\"/\">Forms</button>\r\n <mat-icon>navigate_next</mat-icon>\r\n </div>\r\n\r\n <!-- Title input with optimized binding -->\r\n @if (selectHasFormId()) {\r\n <input [(ngModel)]=\"titleValue\" class=\"section-title-input\" placeholder=\"Enter Form Title\">\r\n }\r\n\r\n <span class=\"spacer\"></span>\r\n\r\n @defer (on viewport) {\r\n <app-forms-builder-menu />\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=\"20\" />\r\n </div>\r\n\r\n }\r\n\r\n <span class=\"divider\">|</span>\r\n\r\n <!-- Save/Update button with optimized reactive state -->\r\n <button mat-raised-button color=\"accent\" class=\"save-button\" [disabled]=\"!(canSaveForm())\"\r\n (click)=\"saveForm()\">\r\n\r\n <mat-icon>\r\n {{(isNewForm()) ? 'save' : 'update'}}\r\n </mat-icon>\r\n\r\n @if (selectFormBuilderIsBusy()) {\r\n {{(isNewForm()) ? '..Saving new form' : '..Updating Form'}}\r\n } @else {\r\n {{(isNewForm()) ? 'Save' : 'Update'}}\r\n }\r\n </button>\r\n\r\n <!-- Updated time info -->\r\n @if (!(isNewForm())) {\r\n <div class=\"updated-time\">\r\n <mat-icon>update</mat-icon>\r\n <span>Updated {{ selectFormUpdated() }}</span>\r\n </div>\r\n }\r\n </mat-toolbar>\r\n</header>\r\n\r\n<!-- Main content with optimized loading -->\r\n@defer (on viewport) {\r\n<div class=\"container\">\r\n <div class=\"middle\">\r\n <br>\r\n @if (selectLoadingForm()) {\r\n <div class=\"loading-container\">\r\n <mat-spinner />\r\n </div>\r\n } @else {\r\n <app-form-section-stepper />\r\n }\r\n <br>\r\n @if ((hasMissingConfigs()) && !(selectLoadingForm())) {\r\n <app-missing-form-configs />\r\n }\r\n </div>\r\n\r\n @if (elementEditorOpen()) {\r\n <app-input-editor style=\"max-width:480px;height:calc(100vh - 64px);z-index:1\" cdkDrag cdkDragBoundary=\"container\" class=\"middle editor-container\" />\r\n }\r\n <!-- Missing fields section -->`\r\n\r\n\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=\"50\" />\r\n </div>\r\n}", styles: [".container{display:flex;width:100%;height:calc(100% - 64px)}.side{width:100px;background-color:#f8d7da}.middle{flex-grow:1;height:100%;overflow:auto;background-color:none}.section-title-input{border:none;background-color:transparent;font-size:16px;font-weight:600;color:#fff;padding-top:12px;padding-bottom:12px;outline:none;min-width:268px;transition:border-bottom-color .3s ease-in-out}.section-title-input:focus{border-bottom:1px solid #ffffff}.missing-fields{position:fixed;bottom:0}.updated-time{display:flex;gap:8px;align-items:center;line-height:normal;font-size:14px;bottom:0;position:absolute;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);padding:8px;border-radius:4px}.nav-group{display:flex;align-items:center;gap:8px}.save-button{margin-left:8px;min-width:168px}.loading-container{display:flex;height:calc(100% - 150px);justify-content:center;align-items:center}.editor-container{max-width:500px}.divider{margin:0 8px;opacity:.5}app-missing-form-configs{position:absolute;bottom:0;right:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], deferBlockDependencies: [() => [import('./ngx-t-forms-forms-builder-menu.component-beIiFQyM.mjs').then(m => m.FormsBuilderMenuComponent)], () => [i2$1.CdkDrag, i7.MatProgressSpinner, import('./ngx-t-forms-input-editor.component-CItOFrvx.mjs').then(m => m.InputEditorComponent), import('./ngx-t-forms-form-section-stepper.component-BYli3qzy.mjs').then(m => m.FormSectionStepperComponent), import('./ngx-t-forms-missing-form-configs.component-kdu_ar17.mjs').then(m => m.MissingFormConfigsComponent)]] }); }
|
|
4938
4787
|
}
|
|
4939
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.2.2", ngImport: i0, type: FormBuilderComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-forms-builder-menu.component-
|
|
4788
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.2.2", ngImport: i0, type: FormBuilderComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-forms-builder-menu.component-beIiFQyM.mjs').then(m => m.FormsBuilderMenuComponent), import('./ngx-t-forms-input-editor.component-CItOFrvx.mjs').then(m => m.InputEditorComponent), import('./ngx-t-forms-form-section-stepper.component-BYli3qzy.mjs').then(m => m.FormSectionStepperComponent), import('./ngx-t-forms-missing-form-configs.component-kdu_ar17.mjs').then(m => m.MissingFormConfigsComponent)], resolveMetadata: (FormsBuilderMenuComponent, InputEditorComponent, FormSectionStepperComponent, MissingFormConfigsComponent) => ({ decorators: [{
|
|
4940
4789
|
type: Component,
|
|
4941
4790
|
args: [{ selector: 'app-form-builder', standalone: true, imports: [CommonModule,
|
|
4942
4791
|
MatModulesModule,
|
|
@@ -5110,6 +4959,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
5110
4959
|
args: [DOCUMENT]
|
|
5111
4960
|
}] }] });
|
|
5112
4961
|
|
|
4962
|
+
function testAgainstItem(test, item) {
|
|
4963
|
+
try {
|
|
4964
|
+
const testValue = test.deepBind ? safeReturnDeepProperty(item, test.deepBind || [])?.value : item;
|
|
4965
|
+
const key = test.deepBind ? test.deepBind[test.deepBind.length - 1] : '';
|
|
4966
|
+
const objectValue = test.deepBind ? { [key || '']: testValue } : testValue;
|
|
4967
|
+
if (test.expression) {
|
|
4968
|
+
return ExpressionValidator(test.expression, objectValue);
|
|
4969
|
+
}
|
|
4970
|
+
if (test.testType === 'exists') {
|
|
4971
|
+
return test.testType === 'exists' && testValue !== '' && testValue !== undefined;
|
|
4972
|
+
}
|
|
4973
|
+
if (test.testType === 'equalTo') {
|
|
4974
|
+
return testValue === test.valueMatch;
|
|
4975
|
+
}
|
|
4976
|
+
return false;
|
|
4977
|
+
}
|
|
4978
|
+
catch (error) {
|
|
4979
|
+
return false;
|
|
4980
|
+
}
|
|
4981
|
+
}
|
|
4982
|
+
|
|
5113
4983
|
class TDynamicDataEditComponent {
|
|
5114
4984
|
constructor(ngZone) {
|
|
5115
4985
|
this.ngZone = ngZone;
|
|
@@ -5277,9 +5147,9 @@ class TDynamicDataEditComponent {
|
|
|
5277
5147
|
}
|
|
5278
5148
|
}
|
|
5279
5149
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TDynamicDataEditComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5280
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: TDynamicDataEditComponent, isStandalone: true, selector: "lib-t-dynamic-data-edit", inputs: { editorConfig: "editorConfig", formInputs: "formInputs", data: "data", validationErrors: "validationErrors" }, outputs: { valueChange: "valueChange", blur: "blur" }, ngImport: i0, template: "@defer {\r\n <ng-container *ngIf=\"( vm$ |async) as vm\" >\r\n\r\n <mat-form-field appearance=\"outline\"\r\n [color]=\"((validationErrors)||[]||[]).length>0 ? 'warn' : 'primary'\"\r\n [floatLabel]=\"'always'\" [subscriptSizing]=\"'dynamic'\"\r\n [hintLabel]=\"vm.editorConfigValue?.hint||''\">\r\n <mat-label> {{ (vm. editorConfigValue)?.label + ((vm. editorConfigValue)?.required ? '*' : '')}} </mat-label>\r\n \r\n @switch ((vm. editorConfigValue)?.editType) {\r\n @default {\r\n <input \r\n (blur)=\"elementBlur($event)\" \r\n (input)=\"inputChange($event)\" \r\n [disabled]=\"(vm.disabled)\"\r\n [value]=\"(vm.value)\" matInput \r\n \r\n [placeholder]=\"(vm. editorConfigValue)?.placeholder ||'Enter value'\">\r\n \r\n \r\n }\r\n @case ( elementEditorTypes.Toggle) {\r\n <lib-mat-slider-toggle-editor \r\n [name]=\"((vm. editorConfigValue)?.name||'') \" \r\n [label]=\"((vm. editorConfigValue)?.label||'')\"\r\n \r\n (valueChange)=\"valueChanged(!!$event)\" [value]=\"(vm.value)\" \r\n [errors]=\"(validationErrors)||[]\">\r\n </lib-mat-slider-toggle-editor>\r\n \r\n }\r\n \r\n @case (elementEditorTypes.Range) {\r\n \r\n \r\n <lib-mat-slider-editor [format]=\"( vm.editorConfigValue)?.format \" [formatLabel]=\" formatLabel\"\r\n [max]=\"( vm.editorConfigValue)?.max || 100\" [value]=\"(vm.value)\" [errors]=\"(validationErrors)||[]\"\r\n [min]=\"( vm.editorConfigValue)?.min || 0\" (valueChange)=\"inputChange($event)\"\r\n [step]=\"( vm.editorConfigValue)?.step || 1\" tickInterval=\"( vm.editorConfigValue)?.step || 1\">\r\n \r\n \r\n </lib-mat-slider-editor>\r\n \r\n \r\n \r\n }\r\n \r\n @case (elementEditorTypes.ChipSelect) {\r\n <lib-mat-chip-list-editor [options]=\"(vm.editorConfigValue)?.options\" [required]=\"!!( vm.editorConfigValue)?.required\"\r\n [value]=\"(vm.value)\" [errors]=\"(validationErrors)||[]\" (valueChange)=\" valueChanged($event)\"></lib-mat-chip-list-editor>\r\n \r\n }\r\n \r\n @case (elementEditorTypes.OptionSelect) {\r\n \r\n <mat-select [value]=\"(vm.value)\" (selectionChange)=\"valueChanged($event.value)\">\r\n @for(option of ( vm.editorConfigValue)?.options;track option.value){\r\n <mat-option [value]=\"option.value\">{{option.label}}</mat-option>\r\n }\r\n </mat-select>\r\n \r\n }\r\n <!--\r\n @case (elementEditorTypes.RichTextEditor) {\r\n <p>\r\n Not implemented yet\r\n </p>\r\n }\r\n --->\r\n \r\n @case (elementEditorTypes.SelectionOptions) {\r\n \r\n <app-selection-options-editor [errors]=\"(validationErrors)||[]\" [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\"\r\n [options]=\"(vm.value) || []\" (valueChanged)=\"valueChanged($event)\"></app-selection-options-editor>\r\n }\r\n \r\n @case (\r\n elementEditorTypes.ApiCall) {\r\n \r\n <lib-rest-api-call-setup \r\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\"\r\n [httpGetDataFunction]=\"(vm.editorConfigValue)?.httpGetDataFunction\"\r\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"(vm.value)\" [errors]=\"(validationErrors)||[]\"\r\n (valueChanged)=\"valueChanged($event)\">\r\n \r\n </lib-rest-api-call-setup>\r\n }\r\n \r\n @case (elementEditorTypes.MongoPipelineBuilder) {\r\n \r\n <app-pipeline-generator [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"(vm.value)\"\r\n [errors]=\"(validationErrors)||[]\" [getWorkflowOptions]=\"getWorkflowOptions$\"\r\n (valueChanged)=\"valueChanged($event)\"></app-pipeline-generator>\r\n \r\n }\r\n @case (elementEditorTypes.ApiValueAccessRules) {\r\n \r\n \r\n \r\n <app-api-value-access-rules \r\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"(vm.value)\"\r\n [errors]=\"(validationErrors)||[]\" [formInputs]=\"formInputs ||[]\" \r\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\"\r\n \r\n [mapToData]=\"vm.dataOptions\"\r\n (valueChanged)=\"valueChanged($event)\">\r\n </app-api-value-access-rules>\r\n \r\n }\r\n \r\n @case (elementEditorTypes.FormInputSelector)\r\n {\r\n \r\n <lib-form-input-selector [formInputs]=\"formInputs ||[]\" [errors]=\"(validationErrors)||[]\" [value]=\"(vm.value) || []\"\r\n (change)=\"valueChanged($event)\">\r\n </lib-form-input-selector>\r\n }\r\n \r\n @case (\r\n elementEditorTypes.RequiredInputs\r\n ){\r\n \r\n <app-required-inputs [formInputs]=\"formInputs ||[]\" [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\"\r\n [value]=\"(vm.value)\" [errors]=\"(validationErrors)||[]\" (valueChanged)=\"valueChanged($event)\">\r\n </app-required-inputs>\r\n }\r\n \r\n @case(elementEditorTypes.CalculatedFieldRules){\r\n \r\n <app-calculated-field-rules [formInputs]=\"formInputs ||[]\"\r\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"(vm.value)\" [errors]=\"(validationErrors)||[]\"\r\n (valueChanged)=\"valueChanged($event)\" [mapToData]=\"vm.dataOptions\"></app-calculated-field-rules>\r\n }\r\n \r\n @case(elementEditorTypes.Validators){\r\n \r\n <app-validators-config [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"(vm.value)\"\r\n [errors]=\"(validationErrors)||[]\" (valueChanged)=\"valueChanged($event)\" [formInputs]=\"formInputs ||[]\"\r\n [mapToData]=\"vm.dataOptions\">\r\n </app-validators-config>\r\n \r\n }\r\n @case(elementEditorTypes.ConfigMscoaSegments){\r\n \r\n <app-mscoa-segment-config [value]=\"(vm.value)\" [errors]=\"(validationErrors)||[]\" [getMscoaTree]=\"getMscoaTree$\"\r\n [showAllSegments]=\"vm.dataOptions\" (valueChanged)=\"valueChanged($event)\"></app-mscoa-segment-config>\r\n }\r\n @case(elementEditorTypes.ConfigMscoaAdditionalInputs){\r\n \r\n <app-config-mscoa-additional-inputs [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\"\r\n [value]=\"(vm.value)\" [errors]=\"(validationErrors)||[]\" [getMscoaTree]=\"getMscoaTree$\"\r\n (valueChanged)=\"valueChanged($event)\">\r\n </app-config-mscoa-additional-inputs>\r\n \r\n }\r\n }\r\n \r\n <button [matTooltip]=\"blurFunctionTooltip((vm.editorConfigValue)?.blurHandle)\" *ngIf=\"(vm.inputHasBlurFunction)\"\r\n [disabled]=\"(vm.disabled)\" [color]=\"blurOff?'':'primary'\" (click)=\"blurOff=!blurOff\" matSuffix\r\n mat-icon-button>\r\n <mat-icon>{{\r\n blurOff?'blur_off':'blur_on'\r\n }}\r\n \r\n \r\n </mat-icon>\r\n </button>\r\n </mat-form-field>\r\n\r\n \r\n <mat-error style=\" font-size: 12px;\r\n margin-left: 14px;\r\n \" *ngFor=\"let error of (validationErrors)||[]\">\r\n \r\n {{error.message}}</mat-error>\r\n \r\n </ng-container>\r\n \r\n}@error {\r\n <mat-card>\r\n <mat-card-content>\r\n \r\n <span> \r\n Failed to load form inputs\r\n </span>\r\n </mat-card-content>\r\n </mat-card>\r\n }\r\n\r\n\r\n\r\n<!-- - \r\n `TableConfigSetup`\r\n- `ConditionalInputConfig`\r\n- `MatrixTable`-->", styles: [".showItemValue{opacity:.6}mat-form-field{width:100%}mat-slider{width:100%}.range{display:flex;align-items:center}label{line-height:normal;margin-top:12px;font-weight:500;font-size:12px;color:var(--mdc-filled-text-field-focus-label-text-color, var(--mat-app-primary));display:flex;justify-content:space-between;align-items:center}.elementInfo{display:flex;align-items:center;justify-content:center;padding:0;height:24px;width:24px}.infoIcon{font-size:16px;height:16px;width:16px}.toggle-label{margin-left:5px;align-items:center;display:flex;font-weight:500;line-height:normal;justify-content:space-between;color:var(--mdc-filled-text-field-focus-label-text-color, var(--mat-app-primary))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.MatCardContent, selector: "mat-card-content" }], deferBlockDependencies: [() => [i2$2.NgForOf, i2$2.NgIf, i2$2.AsyncPipe, import('./ngx-t-forms-selection-options-editor.component-DSundfcO.mjs').then(m => m.SelectionOptionsEditorComponent), import('./ngx-t-forms-form-input-selector.component-D4QnMgZV.mjs').then(m => m.FormInputSelectorComponent), import('./ngx-t-forms-rest-api-call-setup.component-C0lOrUPY.mjs').then(m => m.RestApiCallSetupComponent), import('./ngx-t-forms-api-value-access-rules.component-CZuOneM4.mjs').then(m => m.ApiValueAccessRulesComponent), import('./ngx-t-forms-required-inputs.component-Dm4DQOlu.mjs').then(m => m.RequiredInputsComponent), import('./ngx-t-forms-pipeline-generator.component-BBQEFIyY.mjs').then(m => m.PipelineGeneratorComponent), import('./ngx-t-forms-calculated-field-rules.component-CyI98qg-.mjs').then(m => m.CalculatedFieldRulesComponent), import('./ngx-t-forms-validators-config.component-DSZO3LdN.mjs').then(m => m.ValidatorsConfigComponent), import('./ngx-t-forms-config-mscoa-additional-inputs.component-CqIs3vX5.mjs').then(m => m.ConfigMscoaAdditionalInputsComponent), import('./ngx-t-forms-mat-slider-editor.component-CapaodC5.mjs').then(m => m.MatSliderEditorComponent), import('./ngx-t-forms-mscoa-segment-config.component-BR1ALZeD.mjs').then(m => m.MscoaSegmentConfigComponent), import('./ngx-t-forms-mat-slider-toggle-editor.component-By2FAlH_.mjs').then(m => m.MatSliderToggleEditorComponent), import('./ngx-t-forms-mat-chip-list-editor.component-C4_iUWzY.mjs').then(m => m.MatChipListEditorComponent), i2$3.MatOption, i2.MatIconButton, i5.MatIcon, i4.MatFormField, i4.MatLabel, i4.MatError, i4.MatSuffix, i7$1.MatSelect, i8.MatTooltip, i5$1.MatInput]] }); }
|
|
5150
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: TDynamicDataEditComponent, isStandalone: true, selector: "lib-t-dynamic-data-edit", inputs: { editorConfig: "editorConfig", formInputs: "formInputs", data: "data", validationErrors: "validationErrors" }, outputs: { valueChange: "valueChange", blur: "blur" }, ngImport: i0, template: "@defer {\r\n <ng-container *ngIf=\"( vm$ |async) as vm\" >\r\n\r\n <mat-form-field appearance=\"outline\"\r\n [color]=\"((validationErrors)||[]||[]).length>0 ? 'warn' : 'primary'\"\r\n [floatLabel]=\"'always'\" [subscriptSizing]=\"'dynamic'\"\r\n [hintLabel]=\"vm.editorConfigValue?.hint||''\">\r\n <mat-label> {{ (vm. editorConfigValue)?.label + ((vm. editorConfigValue)?.required ? '*' : '')}} </mat-label>\r\n \r\n @switch ((vm. editorConfigValue)?.editType) {\r\n @default {\r\n <input \r\n (blur)=\"elementBlur($event)\" \r\n (input)=\"inputChange($event)\" \r\n [disabled]=\"(vm.disabled)\"\r\n [value]=\"(vm.value)\" matInput \r\n \r\n [placeholder]=\"(vm. editorConfigValue)?.placeholder ||'Enter value'\">\r\n \r\n \r\n }\r\n @case ( elementEditorTypes.Toggle) {\r\n <lib-mat-slider-toggle-editor \r\n [name]=\"((vm. editorConfigValue)?.name||'') \" \r\n [label]=\"((vm. editorConfigValue)?.label||'')\"\r\n \r\n (valueChange)=\"valueChanged(!!$event)\" [value]=\"(vm.value)\" \r\n [errors]=\"(validationErrors)||[]\">\r\n </lib-mat-slider-toggle-editor>\r\n \r\n }\r\n \r\n @case (elementEditorTypes.Range) {\r\n \r\n \r\n <lib-mat-slider-editor [format]=\"( vm.editorConfigValue)?.format \" [formatLabel]=\" formatLabel\"\r\n [max]=\"( vm.editorConfigValue)?.max || 100\" [value]=\"(vm.value)\" [errors]=\"(validationErrors)||[]\"\r\n [min]=\"( vm.editorConfigValue)?.min || 0\" (valueChange)=\"inputChange($event)\"\r\n [step]=\"( vm.editorConfigValue)?.step || 1\" tickInterval=\"( vm.editorConfigValue)?.step || 1\">\r\n \r\n \r\n </lib-mat-slider-editor>\r\n \r\n \r\n \r\n }\r\n \r\n @case (elementEditorTypes.ChipSelect) {\r\n <lib-mat-chip-list-editor [options]=\"(vm.editorConfigValue)?.options\" [required]=\"!!( vm.editorConfigValue)?.required\"\r\n [value]=\"(vm.value)\" [errors]=\"(validationErrors)||[]\" (valueChange)=\" valueChanged($event)\"></lib-mat-chip-list-editor>\r\n \r\n }\r\n \r\n @case (elementEditorTypes.OptionSelect) {\r\n \r\n <mat-select [value]=\"(vm.value)\" (selectionChange)=\"valueChanged($event.value)\">\r\n @for(option of ( vm.editorConfigValue)?.options;track option.value){\r\n <mat-option [value]=\"option.value\">{{option.label}}</mat-option>\r\n }\r\n </mat-select>\r\n \r\n }\r\n <!--\r\n @case (elementEditorTypes.RichTextEditor) {\r\n <p>\r\n Not implemented yet\r\n </p>\r\n }\r\n --->\r\n \r\n @case (elementEditorTypes.SelectionOptions) {\r\n \r\n <app-selection-options-editor [errors]=\"(validationErrors)||[]\" [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\"\r\n [options]=\"(vm.value) || []\" (valueChanged)=\"valueChanged($event)\"></app-selection-options-editor>\r\n }\r\n \r\n @case (\r\n elementEditorTypes.ApiCall) {\r\n \r\n <lib-rest-api-call-setup \r\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\"\r\n [httpGetDataFunction]=\"(vm.editorConfigValue)?.httpGetDataFunction\"\r\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"(vm.value)\" [errors]=\"(validationErrors)||[]\"\r\n (valueChanged)=\"valueChanged($event)\">\r\n \r\n </lib-rest-api-call-setup>\r\n }\r\n \r\n @case (elementEditorTypes.MongoPipelineBuilder) {\r\n \r\n <app-pipeline-generator [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"(vm.value)\"\r\n [errors]=\"(validationErrors)||[]\" [getWorkflowOptions]=\"getWorkflowOptions$\"\r\n (valueChanged)=\"valueChanged($event)\"></app-pipeline-generator>\r\n \r\n }\r\n @case (elementEditorTypes.ApiValueAccessRules) {\r\n \r\n \r\n \r\n <app-api-value-access-rules \r\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"(vm.value)\"\r\n [errors]=\"(validationErrors)||[]\" [formInputs]=\"formInputs ||[]\" \r\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\"\r\n \r\n [mapToData]=\"vm.dataOptions\"\r\n (valueChanged)=\"valueChanged($event)\">\r\n </app-api-value-access-rules>\r\n \r\n }\r\n \r\n @case (elementEditorTypes.FormInputSelector)\r\n {\r\n \r\n <lib-form-input-selector [formInputs]=\"formInputs ||[]\" [errors]=\"(validationErrors)||[]\" [value]=\"(vm.value) || []\"\r\n (change)=\"valueChanged($event)\">\r\n </lib-form-input-selector>\r\n }\r\n \r\n @case (\r\n elementEditorTypes.RequiredInputs\r\n ){\r\n \r\n <app-required-inputs [formInputs]=\"formInputs ||[]\" [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\"\r\n [value]=\"(vm.value)\" [errors]=\"(validationErrors)||[]\" (valueChanged)=\"valueChanged($event)\">\r\n </app-required-inputs>\r\n }\r\n \r\n @case(elementEditorTypes.CalculatedFieldRules){\r\n \r\n <app-calculated-field-rules [formInputs]=\"formInputs ||[]\"\r\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"(vm.value)\" [errors]=\"(validationErrors)||[]\"\r\n (valueChanged)=\"valueChanged($event)\" [mapToData]=\"vm.dataOptions\"></app-calculated-field-rules>\r\n }\r\n \r\n @case(elementEditorTypes.Validators){\r\n \r\n <app-validators-config [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"(vm.value)\"\r\n [errors]=\"(validationErrors)||[]\" (valueChanged)=\"valueChanged($event)\" [formInputs]=\"formInputs ||[]\"\r\n [mapToData]=\"vm.dataOptions\">\r\n </app-validators-config>\r\n \r\n }\r\n @case(elementEditorTypes.ConfigMscoaSegments){\r\n \r\n <app-mscoa-segment-config [value]=\"(vm.value)\" [errors]=\"(validationErrors)||[]\" [getMscoaTree]=\"getMscoaTree$\"\r\n [showAllSegments]=\"vm.dataOptions\" (valueChanged)=\"valueChanged($event)\"></app-mscoa-segment-config>\r\n }\r\n @case(elementEditorTypes.ConfigMscoaAdditionalInputs){\r\n \r\n <app-config-mscoa-additional-inputs [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\"\r\n [value]=\"(vm.value)\" [errors]=\"(validationErrors)||[]\" [getMscoaTree]=\"getMscoaTree$\"\r\n (valueChanged)=\"valueChanged($event)\">\r\n </app-config-mscoa-additional-inputs>\r\n \r\n }\r\n }\r\n \r\n <button [matTooltip]=\"blurFunctionTooltip((vm.editorConfigValue)?.blurHandle)\" *ngIf=\"(vm.inputHasBlurFunction)\"\r\n [disabled]=\"(vm.disabled)\" [color]=\"blurOff?'':'primary'\" (click)=\"blurOff=!blurOff\" matSuffix\r\n mat-icon-button>\r\n <mat-icon>{{\r\n blurOff?'blur_off':'blur_on'\r\n }}\r\n \r\n \r\n </mat-icon>\r\n </button>\r\n </mat-form-field>\r\n\r\n \r\n <mat-error style=\" font-size: 12px;\r\n margin-left: 14px;\r\n \" *ngFor=\"let error of (validationErrors)||[]\">\r\n \r\n {{error.message}}</mat-error>\r\n \r\n </ng-container>\r\n \r\n}@error {\r\n <mat-card>\r\n <mat-card-content>\r\n \r\n <span> \r\n Failed to load form inputs\r\n </span>\r\n </mat-card-content>\r\n </mat-card>\r\n }\r\n\r\n\r\n\r\n<!-- - \r\n `TableConfigSetup`\r\n- `ConditionalInputConfig`\r\n- `MatrixTable`-->", styles: [".showItemValue{opacity:.6}mat-form-field{width:100%}mat-slider{width:100%}.range{display:flex;align-items:center}label{line-height:normal;margin-top:12px;font-weight:500;font-size:12px;color:var(--mdc-filled-text-field-focus-label-text-color, var(--mat-app-primary));display:flex;justify-content:space-between;align-items:center}.elementInfo{display:flex;align-items:center;justify-content:center;padding:0;height:24px;width:24px}.infoIcon{font-size:16px;height:16px;width:16px}.toggle-label{margin-left:5px;align-items:center;display:flex;font-weight:500;line-height:normal;justify-content:space-between;color:var(--mdc-filled-text-field-focus-label-text-color, var(--mat-app-primary))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.MatCardContent, selector: "mat-card-content" }], deferBlockDependencies: [() => [i2$2.NgForOf, i2$2.NgIf, i2$2.AsyncPipe, import('./ngx-t-forms-selection-options-editor.component-CKdTcvyb.mjs').then(m => m.SelectionOptionsEditorComponent), import('./ngx-t-forms-form-input-selector.component-BZLCiTEx.mjs').then(m => m.FormInputSelectorComponent), import('./ngx-t-forms-rest-api-call-setup.component-C_zsy4Pr.mjs').then(m => m.RestApiCallSetupComponent), import('./ngx-t-forms-api-value-access-rules.component-DVxjY46W.mjs').then(m => m.ApiValueAccessRulesComponent), import('./ngx-t-forms-required-inputs.component-CnRGUtEj.mjs').then(m => m.RequiredInputsComponent), import('./ngx-t-forms-pipeline-generator.component-CZRBVUb4.mjs').then(m => m.PipelineGeneratorComponent), import('./ngx-t-forms-calculated-field-rules.component-CF0b2IAN.mjs').then(m => m.CalculatedFieldRulesComponent), import('./ngx-t-forms-validators-config.component-CTUwEJKh.mjs').then(m => m.ValidatorsConfigComponent), import('./ngx-t-forms-config-mscoa-additional-inputs.component-DEDrjICX.mjs').then(m => m.ConfigMscoaAdditionalInputsComponent), import('./ngx-t-forms-mat-slider-editor.component-bDCnls3E.mjs').then(m => m.MatSliderEditorComponent), import('./ngx-t-forms-mscoa-segment-config.component-B80B7Y2g.mjs').then(m => m.MscoaSegmentConfigComponent), import('./ngx-t-forms-mat-slider-toggle-editor.component-C7q7RAhA.mjs').then(m => m.MatSliderToggleEditorComponent), import('./ngx-t-forms-mat-chip-list-editor.component-D1jGY0Wp.mjs').then(m => m.MatChipListEditorComponent), i2$3.MatOption, i2.MatIconButton, i5.MatIcon, i4.MatFormField, i4.MatLabel, i4.MatError, i4.MatSuffix, i7$1.MatSelect, i8.MatTooltip, i5$1.MatInput]] }); }
|
|
5281
5151
|
}
|
|
5282
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.2.2", ngImport: i0, type: TDynamicDataEditComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-selection-options-editor.component-
|
|
5152
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.2.2", ngImport: i0, type: TDynamicDataEditComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-selection-options-editor.component-CKdTcvyb.mjs').then(m => m.SelectionOptionsEditorComponent), import('./ngx-t-forms-form-input-selector.component-BZLCiTEx.mjs').then(m => m.FormInputSelectorComponent), import('./ngx-t-forms-rest-api-call-setup.component-C_zsy4Pr.mjs').then(m => m.RestApiCallSetupComponent), import('./ngx-t-forms-api-value-access-rules.component-DVxjY46W.mjs').then(m => m.ApiValueAccessRulesComponent), import('./ngx-t-forms-required-inputs.component-CnRGUtEj.mjs').then(m => m.RequiredInputsComponent), import('./ngx-t-forms-pipeline-generator.component-CZRBVUb4.mjs').then(m => m.PipelineGeneratorComponent), import('./ngx-t-forms-calculated-field-rules.component-CF0b2IAN.mjs').then(m => m.CalculatedFieldRulesComponent), import('./ngx-t-forms-validators-config.component-CTUwEJKh.mjs').then(m => m.ValidatorsConfigComponent), import('./ngx-t-forms-config-mscoa-additional-inputs.component-DEDrjICX.mjs').then(m => m.ConfigMscoaAdditionalInputsComponent), import('./ngx-t-forms-mat-slider-editor.component-bDCnls3E.mjs').then(m => m.MatSliderEditorComponent), import('./ngx-t-forms-mscoa-segment-config.component-B80B7Y2g.mjs').then(m => m.MscoaSegmentConfigComponent), import('./ngx-t-forms-mat-slider-toggle-editor.component-C7q7RAhA.mjs').then(m => m.MatSliderToggleEditorComponent), import('./ngx-t-forms-mat-chip-list-editor.component-D1jGY0Wp.mjs').then(m => m.MatChipListEditorComponent)], resolveMetadata: (SelectionOptionsEditorComponent, FormInputSelectorComponent, RestApiCallSetupComponent, ApiValueAccessRulesComponent, RequiredInputsComponent, PipelineGeneratorComponent, CalculatedFieldRulesComponent, ValidatorsConfigComponent, ConfigMscoaAdditionalInputsComponent, MatSliderEditorComponent, MscoaSegmentConfigComponent, MatSliderToggleEditorComponent, MatChipListEditorComponent) => ({ decorators: [{
|
|
5283
5153
|
type: Component,
|
|
5284
5154
|
args: [{ selector: 'lib-t-dynamic-data-edit', standalone: true, imports: [CommonModule,
|
|
5285
5155
|
SelectionOptionsEditorComponent,
|
|
@@ -10395,5 +10265,5 @@ console.debug = () => { };
|
|
|
10395
10265
|
* Generated bundle index. Do not edit.
|
|
10396
10266
|
*/
|
|
10397
10267
|
|
|
10398
|
-
export {
|
|
10399
|
-
//# sourceMappingURL=ngx-t-forms-ngx-t-forms-
|
|
10268
|
+
export { returnDeepProperty as A, safeReturnDeepProperty as B, getUrl as C, DaysAgoPipe as D, textIconsForUserHints as E, FormsStoreService as F, index as G, MatModulesModule as M, NGX_T_FORMS_CONFIG_TOKEN as N, PropertyAccessError as P, SyncEditorComponent as S, TDynamicDataEditComponent as T, UTILS_OBJECT_TOKEN as U, _isEqual as _, assignDeepPropertyToObject as a, TDynamicDataViewComponent as b, FormTowerControllerService as c, getSubmissionStatusFn as d, TreeComponent as e, NgxTFormsService as f, getAvatar as g, NgxTFormsComponent as h, initFormConfigToV2 as i, formGenerator as j, FORM_ACTIONS_TOKEN as k, FORM_CONFIG_TOKEN as l, FORM_SLIDES_TOKEN as m, FORM_INPUTS_TOKEN as n, MULTIPLE_FORM_INPUT_TOKEN as o, provideNgxTForms as p, MSCOA_TREE_PROVIDER as q, returnAnyFormInputFromForm as r, FormsComponent as s, testAgainstItem as t, FormBuilderComponent as u, MscoaFormInputComponent as v, UserFormStepperComponent as w, TFormInputComponent as x, DialogTemplateComponent as y, SignatureInputElementComponent as z };
|
|
10269
|
+
//# sourceMappingURL=ngx-t-forms-ngx-t-forms-BIKaG6Gx.mjs.map
|