ngx-t-forms 0.0.1
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/README.md +27 -0
- package/fesm2022/ngx-t-forms-api-value-access-rules.component-4ZPgovTx.mjs +436 -0
- package/fesm2022/ngx-t-forms-api-value-access-rules.component-4ZPgovTx.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-tCsyuHd3.mjs +311 -0
- package/fesm2022/ngx-t-forms-calculated-field-rules.component-tCsyuHd3.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-C8jU6DUH.mjs +208 -0
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-C8jU6DUH.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-convertPostmanCollectionToTree-DktdVBeQ.mjs +29 -0
- package/fesm2022/ngx-t-forms-convertPostmanCollectionToTree-DktdVBeQ.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-form-input-selector.component-6eGpxdN5.mjs +132 -0
- package/fesm2022/ngx-t-forms-form-input-selector.component-6eGpxdN5.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-form-json-view.component-DwEXL85v.mjs +22 -0
- package/fesm2022/ngx-t-forms-form-json-view.component-DwEXL85v.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-form-section-stepper.component-B5gtKLLC.mjs +220 -0
- package/fesm2022/ngx-t-forms-form-section-stepper.component-B5gtKLLC.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-Bo1CKQsC.mjs +347 -0
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-Bo1CKQsC.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-getInputIllustration-GCSKx5e5.mjs +9 -0
- package/fesm2022/ngx-t-forms-getInputIllustration-GCSKx5e5.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-input-editor.component-C1kH_GDD.mjs +126 -0
- package/fesm2022/ngx-t-forms-input-editor.component-C1kH_GDD.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-DY7Tsn5l.mjs +88 -0
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-DY7Tsn5l.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-mat-slider-editor.component-Dgd5gyUu.mjs +108 -0
- package/fesm2022/ngx-t-forms-mat-slider-editor.component-Dgd5gyUu.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-ClM2gqVq.mjs +153 -0
- package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-ClM2gqVq.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-missing-form-configs.component-DubPFwTw.mjs +32 -0
- package/fesm2022/ngx-t-forms-missing-form-configs.component-DubPFwTw.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-DtmVJG6v.mjs +230 -0
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-DtmVJG6v.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-ngx-t-forms-B-w5W1gG.mjs +9292 -0
- package/fesm2022/ngx-t-forms-ngx-t-forms-B-w5W1gG.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-pipeline-generator.component-DieETx2I.mjs +776 -0
- package/fesm2022/ngx-t-forms-pipeline-generator.component-DieETx2I.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-required-inputs.component-Bi1wJdw3.mjs +188 -0
- package/fesm2022/ngx-t-forms-required-inputs.component-Bi1wJdw3.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-Cd59pfG7.mjs +292 -0
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-Cd59pfG7.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-section-report.component-CBXHr1qQ.mjs +156 -0
- package/fesm2022/ngx-t-forms-section-report.component-CBXHr1qQ.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-selection-options-editor.component-DBlBUGkw.mjs +143 -0
- package/fesm2022/ngx-t-forms-selection-options-editor.component-DBlBUGkw.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-validators-config.component-gtr6Ohn3.mjs +216 -0
- package/fesm2022/ngx-t-forms-validators-config.component-gtr6Ohn3.mjs.map +1 -0
- package/fesm2022/ngx-t-forms.mjs +2 -0
- package/fesm2022/ngx-t-forms.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/dialog-template/dialog-template.component.d.ts +10 -0
- package/lib/components/form-builder/elements/default-element/default-element.component.d.ts +12 -0
- package/lib/components/form-builder/elements/form-json-view/form-json-view.component.d.ts +9 -0
- package/lib/components/form-builder/elements/form-section-stepper/form-section-stepper.component.d.ts +146 -0
- package/lib/components/form-builder/elements/form-submissions-config/config.d.ts +18 -0
- package/lib/components/form-builder/elements/form-submissions-config/form-submissions-config.component.d.ts +61 -0
- package/lib/components/form-builder/elements/forms-builder-menu/forms-builder-menu.component.d.ts +35 -0
- package/lib/components/form-builder/elements/input-editor/input-editor.component.d.ts +18 -0
- package/lib/components/form-builder/elements/input-element-editor/input-element-editor.component.d.ts +42 -0
- package/lib/components/form-builder/elements/missing-form-configs/missing-form-configs.component.d.ts +12 -0
- package/lib/components/form-builder/elements/section-report/section-report.component.d.ts +23 -0
- package/lib/components/form-builder/elements/select-form-template/select-form-template.component.d.ts +17 -0
- package/lib/components/form-builder/form-builder.component.d.ts +29 -0
- package/lib/components/forms/forms.component.d.ts +44 -0
- package/lib/components/forms/functions/cloneCopyFormInput.d.ts +3 -0
- package/lib/components/forms/functions/elementBlur.d.ts +2 -0
- package/lib/components/forms/functions/elementConfigurationChanged.d.ts +2 -0
- package/lib/components/forms/functions/findFormInput.d.ts +2 -0
- package/lib/components/forms/functions/formHttpSubmissions.d.ts +6 -0
- package/lib/components/forms/functions/selectInputTemplate.d.ts +3 -0
- package/lib/components/forms/store/Form-actions-formBuilder.d.ts +34 -0
- package/lib/components/forms/store/Form-selectors-FormBuilder.d.ts +42 -0
- package/lib/components/forms/store/Forms-Actions.d.ts +75 -0
- package/lib/components/forms/store/Forms-Effects.d.ts +14 -0
- package/lib/components/forms/store/Forms-selectors.d.ts +24 -0
- package/lib/components/forms/store/forms-store.service.d.ts +246 -0
- package/lib/components/index.d.ts +11 -0
- package/lib/components/t-dynamic-data-edit/elements/api-value-access-rules/api-value-access-rules.component.d.ts +59 -0
- package/lib/components/t-dynamic-data-edit/elements/api-value-access-rules/elements/data-tree/data-tree.component.d.ts +60 -0
- package/lib/components/t-dynamic-data-edit/elements/api-value-access-rules/functions/convertDataToTree.d.ts +57 -0
- package/lib/components/t-dynamic-data-edit/elements/api-value-access-rules/functions/extractNodeFromTree.d.ts +3 -0
- package/lib/components/t-dynamic-data-edit/elements/calculated-field-rules/calculated-field-rules.component.d.ts +92 -0
- package/lib/components/t-dynamic-data-edit/elements/config-mscoa-additional-inputs/config-mscoa-additional-inputs.component.d.ts +73 -0
- package/lib/components/t-dynamic-data-edit/elements/form-input-selector/form-input-selector.component.d.ts +48 -0
- package/lib/components/t-dynamic-data-edit/elements/json-editor/json-editor.component.d.ts +26 -0
- package/lib/components/t-dynamic-data-edit/elements/mat-chip-list-editor/mat-chip-list-editor.component.d.ts +43 -0
- package/lib/components/t-dynamic-data-edit/elements/mat-slider-editor/mat-slider-editor.component.d.ts +44 -0
- package/lib/components/t-dynamic-data-edit/elements/mat-slider-toggle-editor/mat-slider-toggle-editor.component.d.ts +48 -0
- package/lib/components/t-dynamic-data-edit/elements/mscoa-segment-config/mscoa-segment-config.component.d.ts +75 -0
- package/lib/components/t-dynamic-data-edit/elements/pipeline-generator/elements/aggregate-stage-editor/aggregate-stage-editor.component.d.ts +33 -0
- package/lib/components/t-dynamic-data-edit/elements/pipeline-generator/pipeline-generator.component.d.ts +92 -0
- package/lib/components/t-dynamic-data-edit/elements/postman-collections/functions/convertPostmanCollectionToTree.d.ts +4 -0
- package/lib/components/t-dynamic-data-edit/elements/postman-collections/functions/filterCollectionItems.d.ts +3 -0
- package/lib/components/t-dynamic-data-edit/elements/postman-collections/functions/methodColors.d.ts +1 -0
- package/lib/components/t-dynamic-data-edit/elements/postman-collections/postman-collections.component.d.ts +28 -0
- package/lib/components/t-dynamic-data-edit/elements/required-inputs/required-inputs.component.d.ts +57 -0
- package/lib/components/t-dynamic-data-edit/elements/rest-api-call-setup/rest-api-call-setup.component.d.ts +46 -0
- package/lib/components/t-dynamic-data-edit/elements/selection-options-editor/selection-options-editor.component.d.ts +48 -0
- package/lib/components/t-dynamic-data-edit/elements/t-workflow-picker/t-workflow-picker.component.d.ts +19 -0
- package/lib/components/t-dynamic-data-edit/elements/validators-config/validators-config.component.d.ts +60 -0
- package/lib/components/t-dynamic-data-edit/functions/testData.d.ts +2 -0
- package/lib/components/t-dynamic-data-edit/t-dynamic-data-edit.component.d.ts +48 -0
- package/lib/components/t-dynamic-data-view/t-dynamic-data-view.component.d.ts +14 -0
- package/lib/components/t-form-input/elements/Geo-location-form-input/elements/geo-location-form-input/geo-location-form-input.component.d.ts +18 -0
- package/lib/components/t-form-input/elements/Geo-location-form-input/functions/getGeoLocation.d.ts +2 -0
- package/lib/components/t-form-input/elements/Geo-location-form-input/geo-location.component.d.ts +16 -0
- package/lib/components/t-form-input/elements/auto-complete-input-element/auto-complete-input-element.component.d.ts +14 -0
- package/lib/components/t-form-input/elements/basic-input-input-element/basic-input-input-element.component.d.ts +17 -0
- package/lib/components/t-form-input/elements/basic-input-input-element/core/input-custom/input-custom.component.d.ts +17 -0
- package/lib/components/t-form-input/elements/date-picker-input-element/date-picker-input-element.component.d.ts +14 -0
- package/lib/components/t-form-input/elements/date-range-picker-input-element/date-range-picker-input-element.component.d.ts +14 -0
- package/lib/components/t-form-input/elements/editor-input-element/core/editor-js-input/editor-js-input.component.d.ts +18 -0
- package/lib/components/t-form-input/elements/editor-input-element/core/form-input-rich-text-editor/config.d.ts +9 -0
- package/lib/components/t-form-input/elements/editor-input-element/core/form-input-rich-text-editor/form-input-rich-text-editor.component.d.ts +14 -0
- package/lib/components/t-form-input/elements/editor-input-element/core/form-input-rich-text-editor/sync-editor/sync-editor.component.d.ts +10 -0
- package/lib/components/t-form-input/elements/editor-input-element/editor-input-element.component.d.ts +14 -0
- package/lib/components/t-form-input/elements/file-upload-input-element/core/file-uploader/camera-functions.d.ts +3 -0
- package/lib/components/t-form-input/elements/file-upload-input-element/core/file-uploader/file-uploader.component.d.ts +30 -0
- package/lib/components/t-form-input/elements/file-upload-input-element/file-upload-input-element.component.d.ts +14 -0
- package/lib/components/t-form-input/elements/image-capture-input-element/core/camera-capture/camera-capture.component.d.ts +28 -0
- package/lib/components/t-form-input/elements/image-capture-input-element/image-capture-input-element.component.d.ts +13 -0
- package/lib/components/t-form-input/elements/mscoa-form-input/elements/account-value/account-value.component.d.ts +37 -0
- package/lib/components/t-form-input/elements/mscoa-form-input/elements/mscoa-chart/mscoa-chart.component.d.ts +93 -0
- package/lib/components/t-form-input/elements/mscoa-form-input/elements/mscoa-computation/mscoa-computation.component.d.ts +62 -0
- package/lib/components/t-form-input/elements/mscoa-form-input/elements/mscoa-reactive-form-field/mscoa-reactive-form-field.component.d.ts +21 -0
- package/lib/components/t-form-input/elements/mscoa-form-input/elements/scoa-account-table/scoa-account-table.component.d.ts +83 -0
- package/lib/components/t-form-input/elements/mscoa-form-input/elements/scoa-input/scoa-input.component.d.ts +27 -0
- package/lib/components/t-form-input/elements/mscoa-form-input/mscoa-form-input.component.d.ts +16 -0
- package/lib/components/t-form-input/elements/mscoa-form-input/store/accountConstants.d.ts +5 -0
- package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-actions.d.ts +19 -0
- package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-component-store.service.d.ts +61 -0
- package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-effects.d.ts +8 -0
- package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-selectors.d.ts +32 -0
- package/lib/components/t-form-input/elements/multiple-input-input-element/core/multiple-input-table/multiple-input-table.component.d.ts +37 -0
- package/lib/components/t-form-input/elements/multiple-input-input-element/core/multiple-input-table-edit/multiple-input-table-edit.component.d.ts +52 -0
- package/lib/components/t-form-input/elements/multiple-input-input-element/core/multiple-input-table-view/multiple-input-table-view.component.d.ts +39 -0
- package/lib/components/t-form-input/elements/multiple-input-input-element/functions/getListCalculated.d.ts +2 -0
- package/lib/components/t-form-input/elements/multiple-input-input-element/multiple-input-input-element.component.d.ts +16 -0
- package/lib/components/t-form-input/elements/section-title/section-title.component.d.ts +7 -0
- package/lib/components/t-form-input/elements/select-input-element/select-input-element.component.d.ts +23 -0
- package/lib/components/t-form-input/elements/select-table-input/elements/input-table/input-table.component.d.ts +29 -0
- package/lib/components/t-form-input/elements/select-table-input/select-table-input.component.d.ts +13 -0
- package/lib/components/t-form-input/elements/signature-input-element/config/signature.d.ts +2 -0
- package/lib/components/t-form-input/elements/signature-input-element/core/signature-pad-input/signature-pad-input.component.d.ts +40 -0
- package/lib/components/t-form-input/elements/signature-input-element/signature-input-element.component.d.ts +13 -0
- package/lib/components/t-form-input/elements/textarea-input-element/textarea-input-element.component.d.ts +13 -0
- package/lib/components/t-form-input/elements/toggle-input-element/core/toggle/toggle.component.d.ts +15 -0
- package/lib/components/t-form-input/elements/toggle-input-element/toggle-input-element.component.d.ts +13 -0
- package/lib/components/t-form-input/t-form-input.component.d.ts +24 -0
- package/lib/components/t-form-input-status/t-form-input-status.component.d.ts +10 -0
- package/lib/components/user-form-stepper/user-form-stepper.component.d.ts +23 -0
- package/lib/injection-tokens/index.d.ts +14 -0
- package/lib/ngx-t-forms.component.d.ts +5 -0
- package/lib/ngx-t-forms.service.d.ts +6 -0
- package/lib/services/core/t-form-builder/functions/addFormInputToForm.d.ts +8 -0
- package/lib/services/core/t-form-builder/functions/addMultipleInputFunction.d.ts +2 -0
- package/lib/services/core/t-form-builder/functions/addNewSection.d.ts +2 -0
- package/lib/services/core/t-form-builder/functions/deleteSection.d.ts +2 -0
- package/lib/services/core/t-form-builder/functions/formCanSave.d.ts +3 -0
- package/lib/services/core/t-form-builder/functions/inputElementEditorConfigs.d.ts +91 -0
- package/lib/services/core/t-form-builder/functions/moveFormInput.d.ts +4 -0
- package/lib/services/core/t-form-builder/functions/moveInputToDiffSection.d.ts +2 -0
- package/lib/services/core/t-form-builder/functions/multipleInputToggleLabel.d.ts +2 -0
- package/lib/services/core/t-form-builder/functions/removeItem.d.ts +7 -0
- package/lib/services/core/t-form-builder/functions/sectionDrop.d.ts +3 -0
- package/lib/services/core/t-form-builder/functions/stepTitleChangeStep.d.ts +14 -0
- package/lib/services/core/t-form-controller/function/calculateInputValue.d.ts +11 -0
- package/lib/services/core/t-form-controller/function/getApiDataFetching.d.ts +4 -0
- package/lib/services/core/t-form-controller/function/postApiDataFetching.d.ts +16 -0
- package/lib/services/core/t-form-controller/function/validateMinInputForPostRequest.d.ts +8 -0
- package/lib/services/core/t-form-environment-injection/functions/provideNgxTforms.d.ts +3 -0
- package/lib/services/core/t-form-section-controller/Functions/commonFormOperations.d.ts +21 -0
- package/lib/services/core/t-form-section-controller/Functions/errorResolver.d.ts +7 -0
- package/lib/services/core/t-form-section-controller/Functions/formGenerator.d.ts +29 -0
- package/lib/services/core/t-form-section-controller/Functions/getValueFromPathMap.d.ts +6 -0
- package/lib/services/core/t-form-tower-controller/form-tower-controller.service.d.ts +99 -0
- package/lib/services/core/t-form-tower-controller/functions/allFormInputs.d.ts +3 -0
- package/lib/services/core/t-form-tower-controller/functions/createEmptyForm.d.ts +2 -0
- package/lib/services/core/t-form-tower-controller/functions/extractInitFunctions.d.ts +8 -0
- package/lib/services/core/t-form-tower-controller/functions/getAllFunctionTypes.d.ts +12 -0
- package/lib/services/core/t-form-tower-controller/functions/getFormValue.d.ts +3 -0
- package/lib/services/core/t-form-tower-controller/functions/getSubmissionStatus.d.ts +7 -0
- package/lib/services/core/t-form-tower-controller/functions/handleStepChange.d.ts +3 -0
- package/lib/services/core/t-form-tower-controller/functions/multipleInputRowIDControllInput.d.ts +2 -0
- package/lib/services/core/t-form-tower-controller/functions/prePoPulateForm.d.ts +85 -0
- package/lib/services/core/t-form-tower-controller/functions/saveMultipleInputForm.d.ts +10 -0
- package/lib/services/core/t-form-tower-controller/functions/selectFormSteps.d.ts +4 -0
- package/lib/services/core/t-form-tower-controller/functions/setControlTempErrors.d.ts +3 -0
- package/lib/services/core/t-form-tower-controller/functions/setInputAsTouchedAndDirty.d.ts +2 -0
- package/lib/services/core/t-form-tower-controller/functions/setInputError.d.ts +5 -0
- package/lib/services/core/t-form-tower-controller/functions/setInputStatus.d.ts +3 -0
- package/lib/services/core/t-form-tower-controller/functions/setSectionAsSeen.d.ts +3 -0
- package/lib/services/core/t-form-tower-controller/functions/startTowerFormChangesEventListener.d.ts +10 -0
- package/lib/services/core/t-form-tower-controller/functions/toggleMultipleInput.d.ts +5 -0
- package/lib/services/core/t-form-tower-controller/functions/updateChangeHistory.d.ts +2 -0
- package/lib/services/core/t-form-tower-controller/functions/updateFormInputConfig.d.ts +6 -0
- package/lib/services/core/t-form-tower-controller/functions/updateValue.d.ts +2 -0
- package/lib/services/core/t-input-controller/functions/baseCustomInput.d.ts +104 -0
- package/lib/services/core/t-input-controller/functions/colorCoding.d.ts +24 -0
- package/lib/services/core/t-input-controller/functions/configureCols.d.ts +5 -0
- package/lib/services/core/t-input-controller/functions/generateInputSecret.d.ts +2 -0
- package/lib/services/core/t-input-controller/functions/inputErrorMessage.d.ts +3 -0
- package/lib/services/hhtpResources/Pipeline/pipeline.service.d.ts +80 -0
- package/lib/services/index.d.ts +5 -0
- package/lib/shared/functions/assignDeepPropertyToObject.d.ts +1 -0
- package/lib/shared/functions/camelize.d.ts +6 -0
- package/lib/shared/functions/daysAgoTransform.d.ts +1 -0
- package/lib/shared/functions/enryption.d.ts +9 -0
- package/lib/shared/functions/evaluateArrayAccessRules.d.ts +14 -0
- package/lib/shared/functions/getAvatar.d.ts +1 -0
- package/lib/shared/functions/getDeepObject.d.ts +138 -0
- package/lib/shared/functions/getInputIllustration.d.ts +2 -0
- package/lib/shared/functions/isEqual.d.ts +12 -0
- package/lib/shared/functions/migrationCheck.d.ts +3 -0
- package/lib/shared/functions/replaceUrlVariables.d.ts +2 -0
- package/lib/shared/functions/searchArray.d.ts +1 -0
- package/lib/shared/functions/textIconsForUserHints.d.ts +20 -0
- package/lib/shared/index.d.ts +6 -0
- package/lib/shared/modules/mat-modules.module.d.ts +50 -0
- package/lib/shared/pipes/date/days-ago.pipe.d.ts +7 -0
- package/package.json +67 -0
- package/public-api.d.ts +6 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Output, Input, HostBinding, Optional, Self, Component } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i1 from '@angular/forms';
|
|
6
|
+
import { FormGroup, FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import { v4 } from 'uuid';
|
|
8
|
+
import _ from 'lodash';
|
|
9
|
+
import { M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-B-w5W1gG.mjs';
|
|
10
|
+
import * as i4$1 from '@angular/material/form-field';
|
|
11
|
+
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
12
|
+
import { Subject } from 'rxjs';
|
|
13
|
+
import * as i3 from '@angular/material/button';
|
|
14
|
+
import * as i3$1 from '@angular/material/card';
|
|
15
|
+
import * as i4 from '@angular/material/chips';
|
|
16
|
+
import * as i5 from '@angular/material/icon';
|
|
17
|
+
import * as i9 from '@angular/material/toolbar';
|
|
18
|
+
import * as i5$1 from '@angular/material/input';
|
|
19
|
+
|
|
20
|
+
class SelectionOptionsEditorComponent {
|
|
21
|
+
static { this.nextId = 0; }
|
|
22
|
+
constructor(ngControl, _elementRef) {
|
|
23
|
+
this.ngControl = ngControl;
|
|
24
|
+
this._elementRef = _elementRef;
|
|
25
|
+
this.stateChanges = new Subject();
|
|
26
|
+
this.errors = [];
|
|
27
|
+
this.id = `app-selection-options-editor-${SelectionOptionsEditorComponent.nextId++}`;
|
|
28
|
+
this.placeholder = '';
|
|
29
|
+
this.focused = false;
|
|
30
|
+
this.required = false;
|
|
31
|
+
this.disabled = false;
|
|
32
|
+
this.touched = false;
|
|
33
|
+
this.onTouched = () => { };
|
|
34
|
+
this._options = [];
|
|
35
|
+
this.valueChanged = new EventEmitter();
|
|
36
|
+
}
|
|
37
|
+
get empty() {
|
|
38
|
+
return !this.value;
|
|
39
|
+
}
|
|
40
|
+
get shouldLabelFloat() {
|
|
41
|
+
return this.focused || !this.empty;
|
|
42
|
+
}
|
|
43
|
+
get errorState() {
|
|
44
|
+
const hasError = !!this.ngControl?.control?.errors || (this.errors || []).length > 0 && this.touched;
|
|
45
|
+
return !this.value && !!this.required || hasError;
|
|
46
|
+
}
|
|
47
|
+
setDescribedByIds(ids) {
|
|
48
|
+
// Ensure the component view is initialized
|
|
49
|
+
if (this._elementRef && this._elementRef.nativeElement) {
|
|
50
|
+
const controlElement = this._elementRef.nativeElement.querySelector('.app-selection-options-editor');
|
|
51
|
+
// Check if the controlElement exists before attempting to set its attribute
|
|
52
|
+
if (controlElement) {
|
|
53
|
+
controlElement.setAttribute('aria-describedby', ids.join(' '));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
onContainerClick(event) {
|
|
58
|
+
this.markAsTouched();
|
|
59
|
+
this.stateChanges.next();
|
|
60
|
+
}
|
|
61
|
+
markAsTouched() {
|
|
62
|
+
console.log('markAsTouched');
|
|
63
|
+
if (!this.touched) {
|
|
64
|
+
this.onTouched();
|
|
65
|
+
this.touched = true;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
get options() {
|
|
69
|
+
return this._options || [];
|
|
70
|
+
}
|
|
71
|
+
set options(val) {
|
|
72
|
+
if (!!Array.isArray(val)) {
|
|
73
|
+
this._options = val;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
add() {
|
|
77
|
+
this.inEdit = {};
|
|
78
|
+
this.createForm(this.inEdit);
|
|
79
|
+
}
|
|
80
|
+
remove(option) {
|
|
81
|
+
this.options = this.removeObjectById(this.options, option.id);
|
|
82
|
+
this.valueChanged.emit(this.options);
|
|
83
|
+
}
|
|
84
|
+
createForm(inEdit) {
|
|
85
|
+
this.form = new FormGroup({
|
|
86
|
+
label: new FormControl(inEdit.label || '', Validators.required),
|
|
87
|
+
value: new FormControl(inEdit.value || '', Validators.required),
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
closeEdit() {
|
|
91
|
+
this.inEdit = null;
|
|
92
|
+
}
|
|
93
|
+
save() {
|
|
94
|
+
const id = this.inEdit?.id;
|
|
95
|
+
if (!!id) {
|
|
96
|
+
this.options = this.overrideObjectById(this.options, { ...this.inEdit, ...this.form.value });
|
|
97
|
+
this.closeEdit();
|
|
98
|
+
this.valueChanged.emit(this.options);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
this.options = this.addObjectToArray(this.options, { ...this.inEdit, ...this.form.value, id: v4() });
|
|
102
|
+
this.closeEdit();
|
|
103
|
+
console.log(this.options);
|
|
104
|
+
this.valueChanged.emit(this.options);
|
|
105
|
+
}
|
|
106
|
+
overrideObjectById(array, newObj) {
|
|
107
|
+
const index = _.findIndex(array, { id: newObj.id });
|
|
108
|
+
if (index !== -1) {
|
|
109
|
+
array[index] = newObj;
|
|
110
|
+
}
|
|
111
|
+
return array;
|
|
112
|
+
}
|
|
113
|
+
addObjectToArray(array, newObj) {
|
|
114
|
+
if (!_.some(array, { id: newObj.id })) {
|
|
115
|
+
array.push(newObj);
|
|
116
|
+
}
|
|
117
|
+
return array;
|
|
118
|
+
}
|
|
119
|
+
removeObjectById(array, id) {
|
|
120
|
+
return _.reject(array, { id: id });
|
|
121
|
+
}
|
|
122
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SelectionOptionsEditorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
123
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: SelectionOptionsEditorComponent, isStandalone: true, selector: "app-selection-options-editor", inputs: { errors: "errors", options: "options" }, outputs: { valueChanged: "valueChanged" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: SelectionOptionsEditorComponent }], ngImport: i0, template: "\r\n <mat-chip-listbox aria-label=\"Fish selection\">\r\n @for (option of options||[]; track option.id) {\r\n <mat-chip-option \r\n (removed)=\"remove(option)\"\r\n (click)=\"this.inEdit?.id === option?.id? this.inEdit = undefined :this.inEdit = option\"\r\n color=\"accent\" \r\n [value]=\"option?.value\"\r\n [selected]=\"this.inEdit?.id === option?.id\">{{option?.label}}\r\n <button matChipRemove [attr.aria-label]=\"'remove ' \">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-option>\r\n }\r\n </mat-chip-listbox>\r\n <mat-toolbar *ngIf=\"!inEdit\">\r\n <button style=\"width:100%\" mat-stroked-button (click)=\"add()\">\r\n Add an option <mat-icon>add</mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n <mat-card *ngIf=\"!!inEdit\">\r\n <mat-card-header>\r\n <mat-card-title>Edit Option</mat-card-title>\r\n <mat-card-subtitle>Modify Option Details</mat-card-subtitle>\r\n </mat-card-header>\r\n\r\n <mat-card-content style=\"padding-top:16px ;\" >\r\n \r\n <form *ngIf=\"!!form\" [formGroup]=\"form\">\r\n <mat-form-field >\r\n <mat-label>label</mat-label>\r\n <input type=\"text\" matInput formControlName=\"label\" \r\n placeholder=\"enter option label\">\r\n <mat-hint>Label is required!</mat-hint>\r\n </mat-form-field>\r\n <mat-form-field >\r\n <mat-label>value</mat-label>\r\n <input type=\"text\" matInput formControlName=\"value\" \r\n placeholder=\"enter option value\">\r\n <mat-hint>value is required!</mat-hint>\r\n </mat-form-field>\r\n \r\n </form>\r\n \r\n </mat-card-content>\r\n <mat-card-actions>\r\n <button mat-button (click)=\"closeEdit()\">close</button>\r\n <button mat-button [disabled]=\"form.invalid\" (click)=\"save()\">Save</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n ", styles: ["mat-form-field{width:100%!important;background:azure}\n"], dependencies: [{ kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$1.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i3$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i3$1.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i3$1.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "directive", type: i3$1.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { 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: "directive", type: i4.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i5$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
124
|
+
}
|
|
125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SelectionOptionsEditorComponent, decorators: [{
|
|
126
|
+
type: Component,
|
|
127
|
+
args: [{ selector: 'app-selection-options-editor', standalone: true, imports: [MatModulesModule, ReactiveFormsModule, CommonModule], providers: [{ provide: MatFormFieldControl, useExisting: SelectionOptionsEditorComponent }], template: "\r\n <mat-chip-listbox aria-label=\"Fish selection\">\r\n @for (option of options||[]; track option.id) {\r\n <mat-chip-option \r\n (removed)=\"remove(option)\"\r\n (click)=\"this.inEdit?.id === option?.id? this.inEdit = undefined :this.inEdit = option\"\r\n color=\"accent\" \r\n [value]=\"option?.value\"\r\n [selected]=\"this.inEdit?.id === option?.id\">{{option?.label}}\r\n <button matChipRemove [attr.aria-label]=\"'remove ' \">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-option>\r\n }\r\n </mat-chip-listbox>\r\n <mat-toolbar *ngIf=\"!inEdit\">\r\n <button style=\"width:100%\" mat-stroked-button (click)=\"add()\">\r\n Add an option <mat-icon>add</mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n <mat-card *ngIf=\"!!inEdit\">\r\n <mat-card-header>\r\n <mat-card-title>Edit Option</mat-card-title>\r\n <mat-card-subtitle>Modify Option Details</mat-card-subtitle>\r\n </mat-card-header>\r\n\r\n <mat-card-content style=\"padding-top:16px ;\" >\r\n \r\n <form *ngIf=\"!!form\" [formGroup]=\"form\">\r\n <mat-form-field >\r\n <mat-label>label</mat-label>\r\n <input type=\"text\" matInput formControlName=\"label\" \r\n placeholder=\"enter option label\">\r\n <mat-hint>Label is required!</mat-hint>\r\n </mat-form-field>\r\n <mat-form-field >\r\n <mat-label>value</mat-label>\r\n <input type=\"text\" matInput formControlName=\"value\" \r\n placeholder=\"enter option value\">\r\n <mat-hint>value is required!</mat-hint>\r\n </mat-form-field>\r\n \r\n </form>\r\n \r\n </mat-card-content>\r\n <mat-card-actions>\r\n <button mat-button (click)=\"closeEdit()\">close</button>\r\n <button mat-button [disabled]=\"form.invalid\" (click)=\"save()\">Save</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n ", styles: ["mat-form-field{width:100%!important;background:azure}\n"] }]
|
|
128
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
129
|
+
type: Optional
|
|
130
|
+
}, {
|
|
131
|
+
type: Self
|
|
132
|
+
}] }, { type: i0.ElementRef }], propDecorators: { errors: [{
|
|
133
|
+
type: Input
|
|
134
|
+
}], id: [{
|
|
135
|
+
type: HostBinding
|
|
136
|
+
}], options: [{
|
|
137
|
+
type: Input
|
|
138
|
+
}], valueChanged: [{
|
|
139
|
+
type: Output
|
|
140
|
+
}] } });
|
|
141
|
+
|
|
142
|
+
export { SelectionOptionsEditorComponent };
|
|
143
|
+
//# sourceMappingURL=ngx-t-forms-selection-options-editor.component-DBlBUGkw.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-selection-options-editor.component-DBlBUGkw.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/selection-options-editor/selection-options-editor.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/selection-options-editor/selection-options-editor.component.html"],"sourcesContent":["import { Component, ElementRef, EventEmitter, HostBinding, Input, Optional, Output, Self } from '@angular/core';\r\n\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormControl, FormGroup, NgControl, ReactiveFormsModule, Validators } from '@angular/forms';\r\nimport { v4 as uuidv4 } from 'uuid';\r\nimport _ from 'lodash';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { Subject } from 'rxjs';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\n\r\n@Component({\r\n selector: 'app-selection-options-editor',\r\n standalone: true,\r\n imports: [MatModulesModule, ReactiveFormsModule, CommonModule],\r\n providers: [{ provide: MatFormFieldControl, useExisting:SelectionOptionsEditorComponent }],\r\n templateUrl: './selection-options-editor.component.html',\r\n styleUrl: './selection-options-editor.component.scss'\r\n})\r\nexport class SelectionOptionsEditorComponent implements MatFormFieldControl<any> {\r\n value: any;\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n @Input() errors:IConfigElementError[] |undefined = [];\r\n @HostBinding() id = `app-selection-options-editor-${SelectionOptionsEditorComponent.nextId++}`;\r\n \r\n placeholder: string = ''\r\n constructor(@Optional() @Self() public ngControl: NgControl, private _elementRef: ElementRef<HTMLElement>,) { }\r\n focused: boolean = false;\r\n get empty() {\r\n return !this.value\r\n }\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n required: boolean = false;\r\n disabled: boolean = false;\r\nget errorState(): boolean {\r\n const hasError = !!this.ngControl?.control?.errors || (this.errors||[]).length > 0 && this.touched\r\n return !this.value && !!this.required || hasError\r\n }\r\n\r\n controlType?: string | undefined;\r\n autofilled?: boolean | undefined;\r\n userAriaDescribedBy?: string | undefined;\r\n disableAutomaticLabeling?: boolean | undefined;\r\n setDescribedByIds(ids: string[]) {\r\n // Ensure the component view is initialized\r\n if (this._elementRef && this._elementRef.nativeElement) {\r\n const controlElement = this._elementRef.nativeElement.querySelector('.app-selection-options-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 private _options: any = []\r\n @Input() get options(){\r\n return this._options || []\r\n }\r\n\r\n set options(val){\r\n if(!!Array.isArray(val)){\r\n this._options = val\r\n }\r\n }\r\n\r\n@Output() valueChanged = new EventEmitter<any>()\r\n\r\n inEdit:any\r\n\r\n form!:FormGroup\r\n add(){\r\n this.inEdit = {}\r\n this.createForm(this.inEdit)\r\n\r\n }\r\n remove(option:any){\r\n this.options = this.removeObjectById(this.options, option.id)\r\n this.valueChanged.emit(this.options)\r\n }\r\n createForm(inEdit:any){\r\n\r\n this.form = new FormGroup({\r\n label: new FormControl( inEdit.label||'', Validators.required),\r\n value: new FormControl(inEdit.value||'', Validators.required),\r\n\r\n });\r\n }\r\n closeEdit(){\r\n this.inEdit = null\r\n }\r\n\r\n save(){\r\n const id = this.inEdit?.id\r\n if(!!id){\r\n this.options = this.overrideObjectById(this.options, {...this.inEdit, ...this.form.value})\r\n this.closeEdit()\r\n this.valueChanged.emit(this.options)\r\n return\r\n }\r\n this.options = this.addObjectToArray(this.options, {...this.inEdit, ...this.form.value, id: uuidv4()})\r\n this.closeEdit()\r\n console.log(this.options)\r\n this.valueChanged.emit(this.options)\r\n\r\n }\r\n\r\n overrideObjectById(array: any[], newObj: any): any[] {\r\n const index = _.findIndex(array, { id: newObj.id });\r\n if (index !== -1) {\r\n array[index] = newObj;\r\n }\r\n return array;\r\n }\r\n \r\n addObjectToArray(array: any[], newObj: any): any[] {\r\n if (!_.some(array, { id: newObj.id })) {\r\n array.push(newObj);\r\n }\r\n return array;\r\n }\r\n \r\n removeObjectById(array: any[], id: number): any[] {\r\n return _.reject(array, { id: id });\r\n }\r\n}","\r\n <mat-chip-listbox aria-label=\"Fish selection\">\r\n @for (option of options||[]; track option.id) {\r\n <mat-chip-option \r\n (removed)=\"remove(option)\"\r\n (click)=\"this.inEdit?.id === option?.id? this.inEdit = undefined :this.inEdit = option\"\r\n color=\"accent\" \r\n [value]=\"option?.value\"\r\n [selected]=\"this.inEdit?.id === option?.id\">{{option?.label}}\r\n <button matChipRemove [attr.aria-label]=\"'remove ' \">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-option>\r\n }\r\n </mat-chip-listbox>\r\n <mat-toolbar *ngIf=\"!inEdit\">\r\n <button style=\"width:100%\" mat-stroked-button (click)=\"add()\">\r\n Add an option <mat-icon>add</mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n <mat-card *ngIf=\"!!inEdit\">\r\n <mat-card-header>\r\n <mat-card-title>Edit Option</mat-card-title>\r\n <mat-card-subtitle>Modify Option Details</mat-card-subtitle>\r\n </mat-card-header>\r\n\r\n <mat-card-content style=\"padding-top:16px ;\" >\r\n \r\n <form *ngIf=\"!!form\" [formGroup]=\"form\">\r\n <mat-form-field >\r\n <mat-label>label</mat-label>\r\n <input type=\"text\" matInput formControlName=\"label\" \r\n placeholder=\"enter option label\">\r\n <mat-hint>Label is required!</mat-hint>\r\n </mat-form-field>\r\n <mat-form-field >\r\n <mat-label>value</mat-label>\r\n <input type=\"text\" matInput formControlName=\"value\" \r\n placeholder=\"enter option value\">\r\n <mat-hint>value is required!</mat-hint>\r\n </mat-form-field>\r\n \r\n </form>\r\n \r\n </mat-card-content>\r\n <mat-card-actions>\r\n <button mat-button (click)=\"closeEdit()\">close</button>\r\n <button mat-button [disabled]=\"form.invalid\" (click)=\"save()\">Save</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n "],"names":["uuidv4","i2","i3","i6","i7","i8","i9"],"mappings":";;;;;;;;;;;;;;;;;;;MAmBa,+BAA+B,CAAA;aAEnC,IAAM,CAAA,MAAA,GAAG,CAAH,CAAK;IAMlB,WAAuC,CAAA,SAAoB,EAAU,WAAoC,EAAA;QAAlE,IAAS,CAAA,SAAA,GAAT,SAAS;QAAqB,IAAW,CAAA,WAAA,GAAX,WAAW;AALhF,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;QACzB,IAAM,CAAA,MAAA,GAAoC,EAAE;AACtC,QAAA,IAAA,CAAA,EAAE,GAAG,CAAgC,6BAAA,EAAA,+BAA+B,CAAC,MAAM,EAAE,EAAE;QAE9F,IAAW,CAAA,WAAA,GAAW,EAAE;QAExB,IAAO,CAAA,OAAA,GAAY,KAAK;QAOxB,IAAQ,CAAA,QAAA,GAAY,KAAK;QACzB,IAAQ,CAAA,QAAA,GAAY,KAAK;QAyBzB,IAAO,CAAA,OAAA,GAAY,KAAK;AACxB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAK,GAAG;QAWZ,IAAQ,CAAA,QAAA,GAAQ,EAAE;AAWlB,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAO;;AAvD9C,IAAA,I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
2
|
+
import { EventEmitter, Output, Input, HostBinding, Optional, Self, Component } from '@angular/core';
|
|
3
|
+
import { v4 } from 'uuid';
|
|
4
|
+
import { ElementTypes } from 'ngx-t-forms-types';
|
|
5
|
+
import { g as getInputIllustration } from './ngx-t-forms-getInputIllustration-GCSKx5e5.mjs';
|
|
6
|
+
import * as i2$1 from '@angular/common';
|
|
7
|
+
import { CommonModule } from '@angular/common';
|
|
8
|
+
import { FormInputSelectorComponent } from './ngx-t-forms-form-input-selector.component-6eGpxdN5.mjs';
|
|
9
|
+
import * as i1 from '@angular/forms';
|
|
10
|
+
import { FormsModule } from '@angular/forms';
|
|
11
|
+
import { M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-B-w5W1gG.mjs';
|
|
12
|
+
import * as i4$1 from '@angular/material/form-field';
|
|
13
|
+
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
14
|
+
import { Subject } from 'rxjs';
|
|
15
|
+
import * as i3 from '@angular/material/button';
|
|
16
|
+
import * as i3$1 from '@angular/material/card';
|
|
17
|
+
import * as i4 from '@angular/material/chips';
|
|
18
|
+
import * as i5 from '@angular/material/divider';
|
|
19
|
+
import * as i5$1 from '@angular/material/icon';
|
|
20
|
+
import * as i6 from '@angular/material/list';
|
|
21
|
+
import * as i2 from '@angular/material/slide-toggle';
|
|
22
|
+
import * as i9 from '@angular/material/toolbar';
|
|
23
|
+
import * as i8 from '@angular/material/tooltip';
|
|
24
|
+
import * as i5$2 from '@angular/material/input';
|
|
25
|
+
|
|
26
|
+
class ValidatorsConfigComponent {
|
|
27
|
+
static { this.nextId = 0; }
|
|
28
|
+
constructor(ngControl, _elementRef) {
|
|
29
|
+
this.ngControl = ngControl;
|
|
30
|
+
this._elementRef = _elementRef;
|
|
31
|
+
this.stateChanges = new Subject();
|
|
32
|
+
this.id = `app-validators-config-${ValidatorsConfigComponent.nextId++}`;
|
|
33
|
+
this.placeholder = '';
|
|
34
|
+
this.focused = false;
|
|
35
|
+
this.required = false;
|
|
36
|
+
this.disabled = false;
|
|
37
|
+
this.errors = [];
|
|
38
|
+
this.touched = false;
|
|
39
|
+
this.onTouched = () => { };
|
|
40
|
+
this.mapToData = undefined;
|
|
41
|
+
this.formInputs = [];
|
|
42
|
+
this.valueChanged = new EventEmitter();
|
|
43
|
+
this.showVariables = false;
|
|
44
|
+
this.search = '';
|
|
45
|
+
}
|
|
46
|
+
get empty() {
|
|
47
|
+
return !this.value;
|
|
48
|
+
}
|
|
49
|
+
get shouldLabelFloat() {
|
|
50
|
+
return this.focused || !this.empty;
|
|
51
|
+
}
|
|
52
|
+
get errorState() {
|
|
53
|
+
const hasError = !!this.ngControl?.control?.errors || (this.errors || []).length > 0 && this.touched;
|
|
54
|
+
return !this.value && !!this.required || hasError;
|
|
55
|
+
}
|
|
56
|
+
setDescribedByIds(ids) {
|
|
57
|
+
// Ensure the component view is initialized
|
|
58
|
+
if (this._elementRef && this._elementRef.nativeElement) {
|
|
59
|
+
const controlElement = this._elementRef.nativeElement.querySelector('.app-validators-config');
|
|
60
|
+
// Check if the controlElement exists before attempting to set its attribute
|
|
61
|
+
if (controlElement) {
|
|
62
|
+
controlElement.setAttribute('aria-describedby', ids.join(' '));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
onContainerClick(event) {
|
|
67
|
+
this.markAsTouched();
|
|
68
|
+
this.stateChanges.next();
|
|
69
|
+
}
|
|
70
|
+
markAsTouched() {
|
|
71
|
+
console.log('markAsTouched');
|
|
72
|
+
if (!this.touched) {
|
|
73
|
+
this.onTouched();
|
|
74
|
+
this.touched = true;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
ngOnInit() { }
|
|
78
|
+
menuClosed(event) {
|
|
79
|
+
if (this.edit) {
|
|
80
|
+
const editIndex = this.value.findIndex((item) => {
|
|
81
|
+
if (typeof item === 'string') {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
return item.id === this.edit?.id;
|
|
85
|
+
});
|
|
86
|
+
if (editIndex !== -1) {
|
|
87
|
+
this.value[editIndex] = this.edit;
|
|
88
|
+
}
|
|
89
|
+
this.valueChanged.emit([...this.value]);
|
|
90
|
+
}
|
|
91
|
+
this.edit = undefined;
|
|
92
|
+
}
|
|
93
|
+
editV(validator) {
|
|
94
|
+
if (this.edit?.id === validator.id) {
|
|
95
|
+
this.edit = undefined;
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
this.edit = validator;
|
|
99
|
+
}
|
|
100
|
+
remove(validator) {
|
|
101
|
+
const indexOfV = this.value.findIndex((item) => {
|
|
102
|
+
if (typeof item === 'string') {
|
|
103
|
+
return item === validator;
|
|
104
|
+
}
|
|
105
|
+
return item.id === validator.id;
|
|
106
|
+
});
|
|
107
|
+
this.value = [...this.value].filter((item, i) => indexOfV !== i);
|
|
108
|
+
this.valueChanged.emit([...this.value]);
|
|
109
|
+
}
|
|
110
|
+
getInputIcon(element) {
|
|
111
|
+
return getInputIllustration(element);
|
|
112
|
+
}
|
|
113
|
+
selectInput(inputId) {
|
|
114
|
+
const input = this.formInputs.find((input) => input.id === inputId);
|
|
115
|
+
if (!input) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
if (input?.multipleInputInEditId) {
|
|
119
|
+
throw new Error('multipleInputInEditId is not supported');
|
|
120
|
+
}
|
|
121
|
+
if (!!this.edit) {
|
|
122
|
+
this.edit.expression = (this.edit?.expression || '').concat(input?.formControlName || '');
|
|
123
|
+
if (!this.edit.inputsObservedForChanges.find((i) => i.inputId === (input?.originalId || input?.id))) {
|
|
124
|
+
this.edit.inputsObservedForChanges.push({
|
|
125
|
+
inputId: input?.originalId || input?.id,
|
|
126
|
+
variable: input?.formControlName
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
this.showVariables = false;
|
|
131
|
+
}
|
|
132
|
+
addVariable(event) {
|
|
133
|
+
this.showVariables = true;
|
|
134
|
+
event.stopPropagation();
|
|
135
|
+
event.preventDefault();
|
|
136
|
+
}
|
|
137
|
+
getMultipleFormInputs(input) {
|
|
138
|
+
if (input.element === ElementTypes.MultipleInput &&
|
|
139
|
+
this.mapToData?.multipleInputInEditId === input.id) {
|
|
140
|
+
return input.formInputs;
|
|
141
|
+
}
|
|
142
|
+
return [];
|
|
143
|
+
}
|
|
144
|
+
returnExpression() {
|
|
145
|
+
return this.edit?.expression.replace(/(word)/g, '<span style=\'color: blue\'>$1</span>');
|
|
146
|
+
}
|
|
147
|
+
addValidator() {
|
|
148
|
+
this.edit = {
|
|
149
|
+
message: '',
|
|
150
|
+
expression: '',
|
|
151
|
+
canOverride: false,
|
|
152
|
+
inputsObservedForChanges: []
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
onTextChange(event, key) {
|
|
156
|
+
if (!this.edit) {
|
|
157
|
+
this.edit = {};
|
|
158
|
+
}
|
|
159
|
+
this.edit[key] = event.target.value;
|
|
160
|
+
}
|
|
161
|
+
saveVariable(event) {
|
|
162
|
+
console.log(this.edit);
|
|
163
|
+
if (!this.edit)
|
|
164
|
+
return;
|
|
165
|
+
const id = v4();
|
|
166
|
+
const val = { ...this.edit, id };
|
|
167
|
+
this.value = [...this.value, val];
|
|
168
|
+
this.valueChanged.emit([...this.value]);
|
|
169
|
+
this.edit = undefined;
|
|
170
|
+
}
|
|
171
|
+
removeObserved(event, item) {
|
|
172
|
+
const i = this.edit?.inputsObservedForChanges.findIndex((i) => i === item);
|
|
173
|
+
if (i !== undefined && i !== -1 && this.edit) {
|
|
174
|
+
this.edit?.inputsObservedForChanges.splice(i, 1);
|
|
175
|
+
this.edit.expression = this.edit?.expression.replace(new RegExp(`\\b${item}\\b`, 'g'), '');
|
|
176
|
+
}
|
|
177
|
+
event.stopPropagation();
|
|
178
|
+
event.preventDefault();
|
|
179
|
+
}
|
|
180
|
+
isFormControlCustomValidator(validator) {
|
|
181
|
+
if (typeof validator == 'string') {
|
|
182
|
+
return validator;
|
|
183
|
+
}
|
|
184
|
+
return validator.message;
|
|
185
|
+
}
|
|
186
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ValidatorsConfigComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
187
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: ValidatorsConfigComponent, isStandalone: true, selector: "app-validators-config", inputs: { errors: "errors", mapToData: "mapToData", value: "value", formInputs: "formInputs" }, outputs: { valueChanged: "valueChanged" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: ValidatorsConfigComponent }], ngImport: i0, template: "<div class=\"tree-instructions\">\r\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\r\n <span>\r\n Custom validators are functions that take a form control as an argument and return an object of errors if the\r\n validation fails.\r\n </span>\r\n</div>\r\n\r\n<mat-list>\r\n<h5>\r\n Custom Validators\r\n</h5>\r\n <mat-chip-listbox aria-label=\"Chip select options\">\r\n @for (validator of value; track $index) {\r\n <mat-chip-option\r\n style=\"height: fit-content;padding: 8px;\"\r\n [selected]=\"edit?.id === validator.id\"\r\n (click)=\"editV(validator)\"> \r\n <span style=\"white-space: normal;\">\r\n {{isFormControlCustomValidator(validator) | titlecase}}\r\n </span>\r\n \r\n <button *ngIf=\"this.edit?.id !== validator.id\" (click)=\"remove(validator)\" matChipRemove \r\n [attr.aria-label]=\"'remove ' \">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n <mat-icon *ngIf=\"this.edit?.id === validator.id\" matChipTrailingIcon>\r\n check_circle\r\n </mat-icon>\r\n \r\n \r\n </mat-chip-option>\r\n }\r\n <mat-chip-option\r\n matTooltip=\"Add a new custom validator\"\r\n selectable=\"false\"\r\n style=\"cursor: pointer !important;\"\r\n highlighted=\"true\" color=\"accent\" (click)=\"addValidator()\" *ngIf=\"!edit\">\r\n <span >\r\n\r\n </span>\r\n Add validator\r\n <mat-icon matChipTrailingIcon >add</mat-icon>\r\n\r\n \r\n </mat-chip-option>\r\n </mat-chip-listbox>\r\n\r\n \r\n \r\n\r\n\r\n</mat-list>\r\n<mat-card style=\"padding: 8px;background:var(--mat-toolbar-container-background-color, var(--mat-app-surface))\"\r\n *ngIf=\"edit\">\r\n <ng-container *ngIf=\"edit && !showVariables; then validatorEditor\"></ng-container>\r\n <mat-toolbar *ngIf=\"!showVariables\" >\r\n <span class=\"spacer\"></span>\r\n <button (click)=\"edit=undefined\" mat-button>\r\n close\r\n </button>\r\n <button mat-raised-button [disabled]=\"!edit.expression ||!edit.message\"\r\n (click)=\"saveVariable($event)\" color=\"accent\">\r\n Save Validation\r\n </button>\r\n </mat-toolbar>\r\n <ng-container *ngIf=\"edit && !!showVariables; then variables\"></ng-container>\r\n</mat-card>\r\n\r\n\r\n\r\n\r\n<ng-template #validatorEditor>\r\n <div class=\"tree-instructions\">\r\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\r\n <span>\r\n The expression is checked on value change. The message shows if it fails.\r\n <br>\r\n You can observe inputs for changes to re-evaluate the expression.\r\n </span>\r\n </div>\r\n <mat-list *ngIf=\"edit\">\r\n\r\n <mat-form-field style=\"margin-bottom: 16px;\" (click)=\"$event.stopPropagation();\" appearance=\"outline\">\r\n <mat-label >Validation Message</mat-label>\r\n <textarea matInput #textarea [value]=\"edit.message\"\r\n (input)=\"onTextChange($event,'message')\"\r\n placeholder=\"\r\n Enter message\r\n \"></textarea>\r\n\r\n <mat-hint>\r\n The message to display when the validation fails\r\n </mat-hint>\r\n\r\n </mat-form-field>\r\n\r\n\r\n\r\n\r\n <mat-form-field (click)=\"$event.stopPropagation();\" appearance=\"outline\">\r\n <mat-label >Expression</mat-label>\r\n <textarea matInput #textarea \r\n (input)=\"onTextChange($event,'expression')\"\r\n [value]=\"edit.expression\" placeholder=\"\r\n enter expression\r\n \"></textarea>\r\n\r\n <mat-hint>\r\n The expression to evaluate the validation\r\n </mat-hint>\r\n\r\n </mat-form-field>\r\n <mat-toolbar>\r\n <mat-slide-toggle (click)=\"$event.stopPropagation();\" name=\"CanOveride\" ngDefaultControl\r\n (change)=\"edit.canOverride = $event.checked\" [checked]=\"edit.canOverride\">\r\n <span style=\"margin-left: 5px;\"> Users can override this validation</span>\r\n\r\n </mat-slide-toggle>\r\n </mat-toolbar>\r\n <label >\r\n Observe inputs for changes\r\n </label>\r\n <mat-chip-listbox aria-label=\"Chip select options\">\r\n @for(input of edit.inputsObservedForChanges;track input){\r\n <mat-chip>input\r\n <button (click)=\"removeObserved($event,input)\" matChipRemove [attr.aria-label]=\"'remove ' \">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip>\r\n }\r\n <mat-chip (click)=\"addVariable($event)\" color=\"primary\">\r\n Variable\r\n <mat-icon matChipTrailingIcon>\r\n add\r\n </mat-icon>\r\n </mat-chip>\r\n </mat-chip-listbox>\r\n\r\n <br>\r\n <mat-divider></mat-divider>\r\n\r\n\r\n </mat-list>\r\n</ng-template>\r\n\r\n<ng-template #variables>\r\n\r\n <section style=\"max-height: 360px; overflow-y: auto\">\r\n <lib-form-input-selector (change)=\"selectInput($event)\" [formInputs]=\"formInputs\">\r\n\r\n </lib-form-input-selector>\r\n\r\n <div class=\"contentBackground\" *ngIf=\"formInputs.length === 0\">\r\n <span style=\"\r\n display: block;\r\n text-align: center;\r\n font-style: italic;\r\n padding: 16px;\r\n \">No form inputs</span>\r\n </div>\r\n </section>\r\n <mat-toolbar>\r\n <span class=\"spacer\"></span>\r\n <button (click)=\"showVariables = !showVariables\" mat-flat-button>\r\n Close\r\n <mat-icon>\r\n close\r\n </mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n</ng-template>\r\n", styles: [".mat-mdc-menu-panel.mat-mdc-menu-panel{min-width:500px!important}mat-form-field{width:100%;background:azure}.tree-instructions{display:flex;align-items:center;gap:8px;padding:12px;background:azure;border-radius:4px;margin-bottom:16px}.info-icon{min-width:38px}mat-chip{cursor:pointer!important}\n"], dependencies: [{ kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i4.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { 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: "directive", type: i4.MatChipRemove, selector: "[matChipRemove]" }, { kind: "directive", type: i4.MatChipTrailingIcon, selector: "mat-chip-trailing-icon, [matChipTrailingIcon]" }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i5$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2$1.TitleCasePipe, name: "titlecase" }, { kind: "component", type: FormInputSelectorComponent, selector: "lib-form-input-selector", inputs: ["errors", "value", "formInputs", "disabled"], outputs: ["change"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }] }); }
|
|
188
|
+
}
|
|
189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ValidatorsConfigComponent, decorators: [{
|
|
190
|
+
type: Component,
|
|
191
|
+
args: [{ selector: 'app-validators-config', standalone: true, imports: [
|
|
192
|
+
MatModulesModule,
|
|
193
|
+
CommonModule,
|
|
194
|
+
FormInputSelectorComponent,
|
|
195
|
+
FormsModule
|
|
196
|
+
], providers: [{ provide: MatFormFieldControl, useExisting: ValidatorsConfigComponent }], template: "<div class=\"tree-instructions\">\r\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\r\n <span>\r\n Custom validators are functions that take a form control as an argument and return an object of errors if the\r\n validation fails.\r\n </span>\r\n</div>\r\n\r\n<mat-list>\r\n<h5>\r\n Custom Validators\r\n</h5>\r\n <mat-chip-listbox aria-label=\"Chip select options\">\r\n @for (validator of value; track $index) {\r\n <mat-chip-option\r\n style=\"height: fit-content;padding: 8px;\"\r\n [selected]=\"edit?.id === validator.id\"\r\n (click)=\"editV(validator)\"> \r\n <span style=\"white-space: normal;\">\r\n {{isFormControlCustomValidator(validator) | titlecase}}\r\n </span>\r\n \r\n <button *ngIf=\"this.edit?.id !== validator.id\" (click)=\"remove(validator)\" matChipRemove \r\n [attr.aria-label]=\"'remove ' \">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n <mat-icon *ngIf=\"this.edit?.id === validator.id\" matChipTrailingIcon>\r\n check_circle\r\n </mat-icon>\r\n \r\n \r\n </mat-chip-option>\r\n }\r\n <mat-chip-option\r\n matTooltip=\"Add a new custom validator\"\r\n selectable=\"false\"\r\n style=\"cursor: pointer !important;\"\r\n highlighted=\"true\" color=\"accent\" (click)=\"addValidator()\" *ngIf=\"!edit\">\r\n <span >\r\n\r\n </span>\r\n Add validator\r\n <mat-icon matChipTrailingIcon >add</mat-icon>\r\n\r\n \r\n </mat-chip-option>\r\n </mat-chip-listbox>\r\n\r\n \r\n \r\n\r\n\r\n</mat-list>\r\n<mat-card style=\"padding: 8px;background:var(--mat-toolbar-container-background-color, var(--mat-app-surface))\"\r\n *ngIf=\"edit\">\r\n <ng-container *ngIf=\"edit && !showVariables; then validatorEditor\"></ng-container>\r\n <mat-toolbar *ngIf=\"!showVariables\" >\r\n <span class=\"spacer\"></span>\r\n <button (click)=\"edit=undefined\" mat-button>\r\n close\r\n </button>\r\n <button mat-raised-button [disabled]=\"!edit.expression ||!edit.message\"\r\n (click)=\"saveVariable($event)\" color=\"accent\">\r\n Save Validation\r\n </button>\r\n </mat-toolbar>\r\n <ng-container *ngIf=\"edit && !!showVariables; then variables\"></ng-container>\r\n</mat-card>\r\n\r\n\r\n\r\n\r\n<ng-template #validatorEditor>\r\n <div class=\"tree-instructions\">\r\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\r\n <span>\r\n The expression is checked on value change. The message shows if it fails.\r\n <br>\r\n You can observe inputs for changes to re-evaluate the expression.\r\n </span>\r\n </div>\r\n <mat-list *ngIf=\"edit\">\r\n\r\n <mat-form-field style=\"margin-bottom: 16px;\" (click)=\"$event.stopPropagation();\" appearance=\"outline\">\r\n <mat-label >Validation Message</mat-label>\r\n <textarea matInput #textarea [value]=\"edit.message\"\r\n (input)=\"onTextChange($event,'message')\"\r\n placeholder=\"\r\n Enter message\r\n \"></textarea>\r\n\r\n <mat-hint>\r\n The message to display when the validation fails\r\n </mat-hint>\r\n\r\n </mat-form-field>\r\n\r\n\r\n\r\n\r\n <mat-form-field (click)=\"$event.stopPropagation();\" appearance=\"outline\">\r\n <mat-label >Expression</mat-label>\r\n <textarea matInput #textarea \r\n (input)=\"onTextChange($event,'expression')\"\r\n [value]=\"edit.expression\" placeholder=\"\r\n enter expression\r\n \"></textarea>\r\n\r\n <mat-hint>\r\n The expression to evaluate the validation\r\n </mat-hint>\r\n\r\n </mat-form-field>\r\n <mat-toolbar>\r\n <mat-slide-toggle (click)=\"$event.stopPropagation();\" name=\"CanOveride\" ngDefaultControl\r\n (change)=\"edit.canOverride = $event.checked\" [checked]=\"edit.canOverride\">\r\n <span style=\"margin-left: 5px;\"> Users can override this validation</span>\r\n\r\n </mat-slide-toggle>\r\n </mat-toolbar>\r\n <label >\r\n Observe inputs for changes\r\n </label>\r\n <mat-chip-listbox aria-label=\"Chip select options\">\r\n @for(input of edit.inputsObservedForChanges;track input){\r\n <mat-chip>input\r\n <button (click)=\"removeObserved($event,input)\" matChipRemove [attr.aria-label]=\"'remove ' \">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip>\r\n }\r\n <mat-chip (click)=\"addVariable($event)\" color=\"primary\">\r\n Variable\r\n <mat-icon matChipTrailingIcon>\r\n add\r\n </mat-icon>\r\n </mat-chip>\r\n </mat-chip-listbox>\r\n\r\n <br>\r\n <mat-divider></mat-divider>\r\n\r\n\r\n </mat-list>\r\n</ng-template>\r\n\r\n<ng-template #variables>\r\n\r\n <section style=\"max-height: 360px; overflow-y: auto\">\r\n <lib-form-input-selector (change)=\"selectInput($event)\" [formInputs]=\"formInputs\">\r\n\r\n </lib-form-input-selector>\r\n\r\n <div class=\"contentBackground\" *ngIf=\"formInputs.length === 0\">\r\n <span style=\"\r\n display: block;\r\n text-align: center;\r\n font-style: italic;\r\n padding: 16px;\r\n \">No form inputs</span>\r\n </div>\r\n </section>\r\n <mat-toolbar>\r\n <span class=\"spacer\"></span>\r\n <button (click)=\"showVariables = !showVariables\" mat-flat-button>\r\n Close\r\n <mat-icon>\r\n close\r\n </mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n</ng-template>\r\n", styles: [".mat-mdc-menu-panel.mat-mdc-menu-panel{min-width:500px!important}mat-form-field{width:100%;background:azure}.tree-instructions{display:flex;align-items:center;gap:8px;padding:12px;background:azure;border-radius:4px;margin-bottom:16px}.info-icon{min-width:38px}mat-chip{cursor:pointer!important}\n"] }]
|
|
197
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
198
|
+
type: Optional
|
|
199
|
+
}, {
|
|
200
|
+
type: Self
|
|
201
|
+
}] }, { type: i0.ElementRef }], propDecorators: { id: [{
|
|
202
|
+
type: HostBinding
|
|
203
|
+
}], errors: [{
|
|
204
|
+
type: Input
|
|
205
|
+
}], mapToData: [{
|
|
206
|
+
type: Input
|
|
207
|
+
}], value: [{
|
|
208
|
+
type: Input
|
|
209
|
+
}], formInputs: [{
|
|
210
|
+
type: Input
|
|
211
|
+
}], valueChanged: [{
|
|
212
|
+
type: Output
|
|
213
|
+
}] } });
|
|
214
|
+
|
|
215
|
+
export { ValidatorsConfigComponent };
|
|
216
|
+
//# sourceMappingURL=ngx-t-forms-validators-config.component-gtr6Ohn3.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-validators-config.component-gtr6Ohn3.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/validators-config/validators-config.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/validators-config/validators-config.component.html"],"sourcesContent":["import { Component, ElementRef, EventEmitter, HostBinding, Input, OnInit, Optional, Output, Self } from '@angular/core';\r\nimport { MenuCloseReason } from '@angular/material/menu';\r\n\r\nimport { v4 as uuidv4 } from 'uuid';\r\n\r\nimport { ElementTypes, FormControlCustomValidatorsInterface, IMultiple } from 'ngx-t-forms-types';\r\nimport { FormColumnInputs } from 'ngx-t-forms-types';\r\nimport { getInputIllustration } from '../../../../shared/functions/getInputIllustration';\r\n\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormInputSelectorComponent } from '../form-input-selector/form-input-selector.component';\r\n\r\nimport { FormsModule, NgControl } from '@angular/forms';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { Subject } from 'rxjs';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\n\r\n@Component({\r\n selector: 'app-validators-config',\r\n templateUrl: './validators-config.component.html',\r\n styleUrls: ['./validators-config.component.scss'],\r\n standalone: true,\r\n imports:[\r\n MatModulesModule,\r\n CommonModule,\r\n FormInputSelectorComponent,\r\n FormsModule\r\n ],\r\n providers: [{ provide: MatFormFieldControl, useExisting: ValidatorsConfigComponent}],\r\n})\r\nexport class ValidatorsConfigComponent implements OnInit,MatFormFieldControl<FormControlCustomValidatorsInterface []> {\r\n \r\n\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n \r\n @HostBinding() id = `app-validators-config-${ValidatorsConfigComponent.nextId++}`;\r\n \r\n placeholder: string = ''\r\n constructor(@Optional() @Self() public ngControl: NgControl, private _elementRef: ElementRef<HTMLElement>,) { }\r\n focused: boolean = false;\r\n get empty() {\r\n return !this.value\r\n }\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n required: boolean = false;\r\n disabled: boolean = false;\r\nget errorState(): boolean {\r\n const hasError = !!this.ngControl?.control?.errors || (this.errors||[]).length > 0 && this.touched\r\n return !this.value && !!this.required || hasError\r\n }\r\n \r\n controlType?: string | undefined;\r\n autofilled?: boolean | undefined;\r\n userAriaDescribedBy?: string | undefined;\r\n disableAutomaticLabeling?: boolean | undefined;\r\n setDescribedByIds(ids: string[]) {\r\n // Ensure the component view is initialized\r\n if (this._elementRef && this._elementRef.nativeElement) {\r\n const controlElement = this._elementRef.nativeElement.querySelector('.app-validators-config');\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 @Input() errors:IConfigElementError[] |undefined = [];\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 @Input() mapToData:FormColumnInputs | undefined = undefined;\r\n @Input() value!: (FormControlCustomValidatorsInterface )[];\r\n @Input() formInputs: Array<FormColumnInputs> = []\r\n @Output() valueChanged = new EventEmitter<any>();\r\n\r\n\r\n ngOnInit() {}\r\n\r\n edit:FormControlCustomValidatorsInterface | undefined\r\n menuClosed(event:MenuCloseReason){\r\n\r\n if (this.edit) {\r\n const editIndex = this.value.findIndex((item) => {\r\n if (typeof item === 'string') {\r\n return false;\r\n }\r\n return item.id === this.edit?.id;\r\n });\r\n\r\n if (editIndex !== -1) {\r\n this.value[editIndex] = this.edit;\r\n } \r\n this.valueChanged.emit([...this.value])\r\n\r\n\r\n }\r\n\r\n this.edit = undefined\r\n }\r\n showVariables :boolean = false\r\n editV(validator:string | FormControlCustomValidatorsInterface){\r\n if(this.edit?.id === (validator as FormControlCustomValidatorsInterface).id){\r\n this.edit = undefined\r\n return\r\n }\r\n this.edit = validator as any\r\n }\r\n remove(validator:FormControlCustomValidatorsInterface|string){\r\n const indexOfV = this.value.findIndex((item) => {\r\n if (typeof item === 'string') {\r\n return item === validator;\r\n }\r\n return item.id === (validator as FormControlCustomValidatorsInterface).id;\r\n }\r\n )\r\n\r\n\r\n this.value = [...this.value].filter((item,i)=>indexOfV !== i)\r\n this.valueChanged.emit([...this.value])\r\n\r\n }\r\n search: string = '';\r\n\r\n getInputIcon(element: ElementTypes) {\r\n\r\n return getInputIllustration(element)\r\n }\r\n \r\n selectInput(inputId: string) {\r\n const input = this.formInputs.find((input) => input.id === inputId)\r\n if(!input){\r\n return\r\n }\r\n if(input?.multipleInputInEditId){\r\n throw new Error('multipleInputInEditId is not supported')\r\n }\r\n if(!!this.edit){\r\n this.edit.expression = (this.edit?.expression || '' ).concat(input?.formControlName || '')\r\n if(!this.edit.inputsObservedForChanges.find((i)=>i.inputId === (input?.originalId || input?.id))){\r\n this.edit.inputsObservedForChanges.push({\r\n inputId: input?.originalId || input?.id,\r\n variable: input?.formControlName\r\n })\r\n }\r\n \r\n }\r\n \r\n\r\n this.showVariables = false\r\n\r\n }\r\n\r\n addVariable(event:any){\r\n this.showVariables = true\r\n event.stopPropagation()\r\n event.preventDefault()\r\n\r\n }\r\n getMultipleFormInputs(input: IMultiple) {\r\n if (\r\n input.element === ElementTypes.MultipleInput&&\r\n this.mapToData?.multipleInputInEditId === input.id\r\n ) {\r\n return input.formInputs;\r\n }\r\n return [];\r\n }\r\n returnExpression(){\r\n return this.edit?.expression.replace(/(word)/g, '<span style=\\'color: blue\\'>$1</span>')\r\n }\r\n addValidator(){\r\n this.edit = {\r\n message: '',\r\n expression: '',\r\n canOverride: false,\r\n inputsObservedForChanges: []\r\n } as any\r\n }\r\n\r\n onTextChange(event:Event,key:string){\r\n if(!this.edit) {\r\n this.edit = {} as any\r\n }\r\n (this.edit as any)[key] = (event.target as HTMLInputElement).value\r\n }\r\n saveVariable(event:any){\r\n console.log(this.edit)\r\n if(!this.edit) return;\r\n const id = uuidv4()\r\n const val = {...this.edit, id}\r\n this.value = [...this.value, val]\r\n this.valueChanged.emit([...this.value])\r\n this.edit = undefined\r\n \r\n \r\n\r\n\r\n \r\n }\r\n removeObserved(event:any,item:{ inputId: string; variable: string; }){\r\n const i = this.edit?.inputsObservedForChanges.findIndex((i:any)=>i === item)\r\n if(i !== undefined && i !== -1 && this.edit){\r\n this.edit?.inputsObservedForChanges.splice(i, 1);\r\n this.edit.expression = this.edit?.expression.replace(new RegExp(`\\\\b${item}\\\\b`, 'g'), '')\r\n\r\n }\r\n\r\n event.stopPropagation()\r\n event.preventDefault()\r\n }\r\n isFormControlCustomValidator(validator: string |FormControlCustomValidatorsInterface ){\r\n if(typeof validator == 'string'){\r\n return validator\r\n }\r\n return validator.message\r\n\r\n }\r\n}\r\n\r\n\r\n\r\n","<div class=\"tree-instructions\">\r\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\r\n <span>\r\n Custom validators are functions that take a form control as an argument and return an object of errors if the\r\n validation fails.\r\n </span>\r\n</div>\r\n\r\n<mat-list>\r\n<h5>\r\n Custom Validators\r\n</h5>\r\n <mat-chip-listbox aria-label=\"Chip select options\">\r\n @for (validator of value; track $index) {\r\n <mat-chip-option\r\n style=\"height: fit-content;padding: 8px;\"\r\n [selected]=\"edit?.id === validator.id\"\r\n (click)=\"editV(validator)\"> \r\n <span style=\"white-space: normal;\">\r\n {{isFormControlCustomValidator(validator) | titlecase}}\r\n </span>\r\n \r\n <button *ngIf=\"this.edit?.id !== validator.id\" (click)=\"remove(validator)\" matChipRemove \r\n [attr.aria-label]=\"'remove ' \">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n <mat-icon *ngIf=\"this.edit?.id === validator.id\" matChipTrailingIcon>\r\n check_circle\r\n </mat-icon>\r\n \r\n \r\n </mat-chip-option>\r\n }\r\n <mat-chip-option\r\n matTooltip=\"Add a new custom validator\"\r\n selectable=\"false\"\r\n style=\"cursor: pointer !important;\"\r\n highlighted=\"true\" color=\"accent\" (click)=\"addValidator()\" *ngIf=\"!edit\">\r\n <span >\r\n\r\n </span>\r\n Add validator\r\n <mat-icon matChipTrailingIcon >add</mat-icon>\r\n\r\n \r\n </mat-chip-option>\r\n </mat-chip-listbox>\r\n\r\n \r\n \r\n\r\n\r\n</mat-list>\r\n<mat-card style=\"padding: 8px;background:var(--mat-toolbar-container-background-color, var(--mat-app-surface))\"\r\n *ngIf=\"edit\">\r\n <ng-container *ngIf=\"edit && !showVariables; then validatorEditor\"></ng-container>\r\n <mat-toolbar *ngIf=\"!showVariables\" >\r\n <span class=\"spacer\"></span>\r\n <button (click)=\"edit=undefined\" mat-button>\r\n close\r\n </button>\r\n <button mat-raised-button [disabled]=\"!edit.expression ||!edit.message\"\r\n (click)=\"saveVariable($event)\" color=\"accent\">\r\n Save Validation\r\n </button>\r\n </mat-toolbar>\r\n <ng-container *ngIf=\"edit && !!showVariables; then variables\"></ng-container>\r\n</mat-card>\r\n\r\n\r\n\r\n\r\n<ng-template #validatorEditor>\r\n <div class=\"tree-instructions\">\r\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\r\n <span>\r\n The expression is checked on value change. The message shows if it fails.\r\n <br>\r\n You can observe inputs for changes to re-evaluate the expression.\r\n </span>\r\n </div>\r\n <mat-list *ngIf=\"edit\">\r\n\r\n <mat-form-field style=\"margin-bottom: 16px;\" (click)=\"$event.stopPropagation();\" appearance=\"outline\">\r\n <mat-label >Validation Message</mat-label>\r\n <textarea matInput #textarea [value]=\"edit.message\"\r\n (input)=\"onTextChange($event,'message')\"\r\n placeholder=\"\r\n Enter message\r\n \"></textarea>\r\n\r\n <mat-hint>\r\n The message to display when the validation fails\r\n </mat-hint>\r\n\r\n </mat-form-field>\r\n\r\n\r\n\r\n\r\n <mat-form-field (click)=\"$event.stopPropagation();\" appearance=\"outline\">\r\n <mat-label >Expression</mat-label>\r\n <textarea matInput #textarea \r\n (input)=\"onTextChange($event,'expression')\"\r\n [value]=\"edit.expression\" placeholder=\"\r\n enter expression\r\n \"></textarea>\r\n\r\n <mat-hint>\r\n The expression to evaluate the validation\r\n </mat-hint>\r\n\r\n </mat-form-field>\r\n <mat-toolbar>\r\n <mat-slide-toggle (click)=\"$event.stopPropagation();\" name=\"CanOveride\" ngDefaultControl\r\n (change)=\"edit.canOverride = $event.checked\" [checked]=\"edit.canOverride\">\r\n <span style=\"margin-left: 5px;\"> Users can override this validation</span>\r\n\r\n </mat-slide-toggle>\r\n </mat-toolbar>\r\n <label >\r\n Observe inputs for changes\r\n </label>\r\n <mat-chip-listbox aria-label=\"Chip select options\">\r\n @for(input of edit.inputsObservedForChanges;track input){\r\n <mat-chip>input\r\n <button (click)=\"removeObserved($event,input)\" matChipRemove [attr.aria-label]=\"'remove ' \">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip>\r\n }\r\n <mat-chip (click)=\"addVariable($event)\" color=\"primary\">\r\n Variable\r\n <mat-icon matChipTrailingIcon>\r\n add\r\n </mat-icon>\r\n </mat-chip>\r\n </mat-chip-listbox>\r\n\r\n <br>\r\n <mat-divider></mat-divider>\r\n\r\n\r\n </mat-list>\r\n</ng-template>\r\n\r\n<ng-template #variables>\r\n\r\n <section style=\"max-height: 360px; overflow-y: auto\">\r\n <lib-form-input-selector (change)=\"selectInput($event)\" [formInputs]=\"formInputs\">\r\n\r\n </lib-form-input-selector>\r\n\r\n <div class=\"contentBackground\" *ngIf=\"formInputs.length === 0\">\r\n <span style=\"\r\n display: block;\r\n text-align: center;\r\n font-style: italic;\r\n padding: 16px;\r\n \">No form inputs</span>\r\n </div>\r\n </section>\r\n <mat-toolbar>\r\n <span class=\"spacer\"></span>\r\n <button (click)=\"showVariables = !showVariables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ormTowerControllerService, r as FormsComponent, q as MSCOA_TREE_PROVIDER, o as MULTIPLE_FORM_INPUT_TOKEN, u as MscoaFormInputComponent, N as NGX_T_FORMS_CONFIG_TOKEN, h as NgxTFormsComponent, f as NgxTFormsService, P as PropertyAccessError, y as SignatureInputElementComponent, S as SyncEditorComponent, T as TDynamicDataEditComponent, b as TDynamicDataViewComponent, w as TFormInputComponent, U as UTILS_OBJECT_TOKEN, v as UserFormStepperComponent, a as assignDeepPropertyToObject, j as formGenerator, B as getUrl, i as initFormConfigToV2, p as provideNgxTForms, z as returnDeepProperty, A as safeReturnDeepProperty, C as textIconsForUserHints } from './ngx-t-forms-ngx-t-forms-B-w5W1gG.mjs';
|
|
2
|
+
//# sourceMappingURL=ngx-t-forms.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-t-forms.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import { DialogConfig } from "ngx-t-forms-types";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DialogTemplateComponent {
|
|
5
|
+
readonly dialogRef: MatDialogRef<any, any>;
|
|
6
|
+
readonly data: DialogConfig;
|
|
7
|
+
proceed(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogTemplateComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DialogTemplateComponent, "lib-dialog-template", never, {}, {}, never, never, true, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FormsStoreService } from '../../../forms/store/forms-store.service';
|
|
2
|
+
import { ElementTypes } from 'ngx-t-forms-types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DefaultElementComponent {
|
|
5
|
+
inputs: import("ngx-t-forms-types").DefaultInputConfigInterface;
|
|
6
|
+
store: FormsStoreService;
|
|
7
|
+
constructor();
|
|
8
|
+
getDefaultInputs(): ElementTypes[];
|
|
9
|
+
selectInputTemplate(input: ElementTypes): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DefaultElementComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DefaultElementComponent, "app-default-element", never, {}, {}, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FormsStoreService } from '../../../forms/store/forms-store.service';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class FormJsonViewComponent {
|
|
4
|
+
private store;
|
|
5
|
+
form$: import("rxjs").Observable<import("ngx-t-forms-types").FormInterface | undefined>;
|
|
6
|
+
constructor(store: FormsStoreService);
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormJsonViewComponent, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormJsonViewComponent, "app-form-json-view", never, {}, {}, never, never, true, never>;
|
|
9
|
+
}
|