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.
Files changed (220) hide show
  1. package/README.md +27 -0
  2. package/fesm2022/ngx-t-forms-api-value-access-rules.component-4ZPgovTx.mjs +436 -0
  3. package/fesm2022/ngx-t-forms-api-value-access-rules.component-4ZPgovTx.mjs.map +1 -0
  4. package/fesm2022/ngx-t-forms-calculated-field-rules.component-tCsyuHd3.mjs +311 -0
  5. package/fesm2022/ngx-t-forms-calculated-field-rules.component-tCsyuHd3.mjs.map +1 -0
  6. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-C8jU6DUH.mjs +208 -0
  7. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-C8jU6DUH.mjs.map +1 -0
  8. package/fesm2022/ngx-t-forms-convertPostmanCollectionToTree-DktdVBeQ.mjs +29 -0
  9. package/fesm2022/ngx-t-forms-convertPostmanCollectionToTree-DktdVBeQ.mjs.map +1 -0
  10. package/fesm2022/ngx-t-forms-form-input-selector.component-6eGpxdN5.mjs +132 -0
  11. package/fesm2022/ngx-t-forms-form-input-selector.component-6eGpxdN5.mjs.map +1 -0
  12. package/fesm2022/ngx-t-forms-form-json-view.component-DwEXL85v.mjs +22 -0
  13. package/fesm2022/ngx-t-forms-form-json-view.component-DwEXL85v.mjs.map +1 -0
  14. package/fesm2022/ngx-t-forms-form-section-stepper.component-B5gtKLLC.mjs +220 -0
  15. package/fesm2022/ngx-t-forms-form-section-stepper.component-B5gtKLLC.mjs.map +1 -0
  16. package/fesm2022/ngx-t-forms-forms-builder-menu.component-Bo1CKQsC.mjs +347 -0
  17. package/fesm2022/ngx-t-forms-forms-builder-menu.component-Bo1CKQsC.mjs.map +1 -0
  18. package/fesm2022/ngx-t-forms-getInputIllustration-GCSKx5e5.mjs +9 -0
  19. package/fesm2022/ngx-t-forms-getInputIllustration-GCSKx5e5.mjs.map +1 -0
  20. package/fesm2022/ngx-t-forms-input-editor.component-C1kH_GDD.mjs +126 -0
  21. package/fesm2022/ngx-t-forms-input-editor.component-C1kH_GDD.mjs.map +1 -0
  22. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-DY7Tsn5l.mjs +88 -0
  23. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-DY7Tsn5l.mjs.map +1 -0
  24. package/fesm2022/ngx-t-forms-mat-slider-editor.component-Dgd5gyUu.mjs +108 -0
  25. package/fesm2022/ngx-t-forms-mat-slider-editor.component-Dgd5gyUu.mjs.map +1 -0
  26. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-ClM2gqVq.mjs +153 -0
  27. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-ClM2gqVq.mjs.map +1 -0
  28. package/fesm2022/ngx-t-forms-missing-form-configs.component-DubPFwTw.mjs +32 -0
  29. package/fesm2022/ngx-t-forms-missing-form-configs.component-DubPFwTw.mjs.map +1 -0
  30. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-DtmVJG6v.mjs +230 -0
  31. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-DtmVJG6v.mjs.map +1 -0
  32. package/fesm2022/ngx-t-forms-ngx-t-forms-B-w5W1gG.mjs +9292 -0
  33. package/fesm2022/ngx-t-forms-ngx-t-forms-B-w5W1gG.mjs.map +1 -0
  34. package/fesm2022/ngx-t-forms-pipeline-generator.component-DieETx2I.mjs +776 -0
  35. package/fesm2022/ngx-t-forms-pipeline-generator.component-DieETx2I.mjs.map +1 -0
  36. package/fesm2022/ngx-t-forms-required-inputs.component-Bi1wJdw3.mjs +188 -0
  37. package/fesm2022/ngx-t-forms-required-inputs.component-Bi1wJdw3.mjs.map +1 -0
  38. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-Cd59pfG7.mjs +292 -0
  39. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-Cd59pfG7.mjs.map +1 -0
  40. package/fesm2022/ngx-t-forms-section-report.component-CBXHr1qQ.mjs +156 -0
  41. package/fesm2022/ngx-t-forms-section-report.component-CBXHr1qQ.mjs.map +1 -0
  42. package/fesm2022/ngx-t-forms-selection-options-editor.component-DBlBUGkw.mjs +143 -0
  43. package/fesm2022/ngx-t-forms-selection-options-editor.component-DBlBUGkw.mjs.map +1 -0
  44. package/fesm2022/ngx-t-forms-validators-config.component-gtr6Ohn3.mjs +216 -0
  45. package/fesm2022/ngx-t-forms-validators-config.component-gtr6Ohn3.mjs.map +1 -0
  46. package/fesm2022/ngx-t-forms.mjs +2 -0
  47. package/fesm2022/ngx-t-forms.mjs.map +1 -0
  48. package/index.d.ts +5 -0
  49. package/lib/components/dialog-template/dialog-template.component.d.ts +10 -0
  50. package/lib/components/form-builder/elements/default-element/default-element.component.d.ts +12 -0
  51. package/lib/components/form-builder/elements/form-json-view/form-json-view.component.d.ts +9 -0
  52. package/lib/components/form-builder/elements/form-section-stepper/form-section-stepper.component.d.ts +146 -0
  53. package/lib/components/form-builder/elements/form-submissions-config/config.d.ts +18 -0
  54. package/lib/components/form-builder/elements/form-submissions-config/form-submissions-config.component.d.ts +61 -0
  55. package/lib/components/form-builder/elements/forms-builder-menu/forms-builder-menu.component.d.ts +35 -0
  56. package/lib/components/form-builder/elements/input-editor/input-editor.component.d.ts +18 -0
  57. package/lib/components/form-builder/elements/input-element-editor/input-element-editor.component.d.ts +42 -0
  58. package/lib/components/form-builder/elements/missing-form-configs/missing-form-configs.component.d.ts +12 -0
  59. package/lib/components/form-builder/elements/section-report/section-report.component.d.ts +23 -0
  60. package/lib/components/form-builder/elements/select-form-template/select-form-template.component.d.ts +17 -0
  61. package/lib/components/form-builder/form-builder.component.d.ts +29 -0
  62. package/lib/components/forms/forms.component.d.ts +44 -0
  63. package/lib/components/forms/functions/cloneCopyFormInput.d.ts +3 -0
  64. package/lib/components/forms/functions/elementBlur.d.ts +2 -0
  65. package/lib/components/forms/functions/elementConfigurationChanged.d.ts +2 -0
  66. package/lib/components/forms/functions/findFormInput.d.ts +2 -0
  67. package/lib/components/forms/functions/formHttpSubmissions.d.ts +6 -0
  68. package/lib/components/forms/functions/selectInputTemplate.d.ts +3 -0
  69. package/lib/components/forms/store/Form-actions-formBuilder.d.ts +34 -0
  70. package/lib/components/forms/store/Form-selectors-FormBuilder.d.ts +42 -0
  71. package/lib/components/forms/store/Forms-Actions.d.ts +75 -0
  72. package/lib/components/forms/store/Forms-Effects.d.ts +14 -0
  73. package/lib/components/forms/store/Forms-selectors.d.ts +24 -0
  74. package/lib/components/forms/store/forms-store.service.d.ts +246 -0
  75. package/lib/components/index.d.ts +11 -0
  76. package/lib/components/t-dynamic-data-edit/elements/api-value-access-rules/api-value-access-rules.component.d.ts +59 -0
  77. package/lib/components/t-dynamic-data-edit/elements/api-value-access-rules/elements/data-tree/data-tree.component.d.ts +60 -0
  78. package/lib/components/t-dynamic-data-edit/elements/api-value-access-rules/functions/convertDataToTree.d.ts +57 -0
  79. package/lib/components/t-dynamic-data-edit/elements/api-value-access-rules/functions/extractNodeFromTree.d.ts +3 -0
  80. package/lib/components/t-dynamic-data-edit/elements/calculated-field-rules/calculated-field-rules.component.d.ts +92 -0
  81. package/lib/components/t-dynamic-data-edit/elements/config-mscoa-additional-inputs/config-mscoa-additional-inputs.component.d.ts +73 -0
  82. package/lib/components/t-dynamic-data-edit/elements/form-input-selector/form-input-selector.component.d.ts +48 -0
  83. package/lib/components/t-dynamic-data-edit/elements/json-editor/json-editor.component.d.ts +26 -0
  84. package/lib/components/t-dynamic-data-edit/elements/mat-chip-list-editor/mat-chip-list-editor.component.d.ts +43 -0
  85. package/lib/components/t-dynamic-data-edit/elements/mat-slider-editor/mat-slider-editor.component.d.ts +44 -0
  86. package/lib/components/t-dynamic-data-edit/elements/mat-slider-toggle-editor/mat-slider-toggle-editor.component.d.ts +48 -0
  87. package/lib/components/t-dynamic-data-edit/elements/mscoa-segment-config/mscoa-segment-config.component.d.ts +75 -0
  88. package/lib/components/t-dynamic-data-edit/elements/pipeline-generator/elements/aggregate-stage-editor/aggregate-stage-editor.component.d.ts +33 -0
  89. package/lib/components/t-dynamic-data-edit/elements/pipeline-generator/pipeline-generator.component.d.ts +92 -0
  90. package/lib/components/t-dynamic-data-edit/elements/postman-collections/functions/convertPostmanCollectionToTree.d.ts +4 -0
  91. package/lib/components/t-dynamic-data-edit/elements/postman-collections/functions/filterCollectionItems.d.ts +3 -0
  92. package/lib/components/t-dynamic-data-edit/elements/postman-collections/functions/methodColors.d.ts +1 -0
  93. package/lib/components/t-dynamic-data-edit/elements/postman-collections/postman-collections.component.d.ts +28 -0
  94. package/lib/components/t-dynamic-data-edit/elements/required-inputs/required-inputs.component.d.ts +57 -0
  95. package/lib/components/t-dynamic-data-edit/elements/rest-api-call-setup/rest-api-call-setup.component.d.ts +46 -0
  96. package/lib/components/t-dynamic-data-edit/elements/selection-options-editor/selection-options-editor.component.d.ts +48 -0
  97. package/lib/components/t-dynamic-data-edit/elements/t-workflow-picker/t-workflow-picker.component.d.ts +19 -0
  98. package/lib/components/t-dynamic-data-edit/elements/validators-config/validators-config.component.d.ts +60 -0
  99. package/lib/components/t-dynamic-data-edit/functions/testData.d.ts +2 -0
  100. package/lib/components/t-dynamic-data-edit/t-dynamic-data-edit.component.d.ts +48 -0
  101. package/lib/components/t-dynamic-data-view/t-dynamic-data-view.component.d.ts +14 -0
  102. 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
  103. package/lib/components/t-form-input/elements/Geo-location-form-input/functions/getGeoLocation.d.ts +2 -0
  104. package/lib/components/t-form-input/elements/Geo-location-form-input/geo-location.component.d.ts +16 -0
  105. package/lib/components/t-form-input/elements/auto-complete-input-element/auto-complete-input-element.component.d.ts +14 -0
  106. package/lib/components/t-form-input/elements/basic-input-input-element/basic-input-input-element.component.d.ts +17 -0
  107. package/lib/components/t-form-input/elements/basic-input-input-element/core/input-custom/input-custom.component.d.ts +17 -0
  108. package/lib/components/t-form-input/elements/date-picker-input-element/date-picker-input-element.component.d.ts +14 -0
  109. package/lib/components/t-form-input/elements/date-range-picker-input-element/date-range-picker-input-element.component.d.ts +14 -0
  110. package/lib/components/t-form-input/elements/editor-input-element/core/editor-js-input/editor-js-input.component.d.ts +18 -0
  111. package/lib/components/t-form-input/elements/editor-input-element/core/form-input-rich-text-editor/config.d.ts +9 -0
  112. 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
  113. 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
  114. package/lib/components/t-form-input/elements/editor-input-element/editor-input-element.component.d.ts +14 -0
  115. package/lib/components/t-form-input/elements/file-upload-input-element/core/file-uploader/camera-functions.d.ts +3 -0
  116. package/lib/components/t-form-input/elements/file-upload-input-element/core/file-uploader/file-uploader.component.d.ts +30 -0
  117. package/lib/components/t-form-input/elements/file-upload-input-element/file-upload-input-element.component.d.ts +14 -0
  118. package/lib/components/t-form-input/elements/image-capture-input-element/core/camera-capture/camera-capture.component.d.ts +28 -0
  119. package/lib/components/t-form-input/elements/image-capture-input-element/image-capture-input-element.component.d.ts +13 -0
  120. package/lib/components/t-form-input/elements/mscoa-form-input/elements/account-value/account-value.component.d.ts +37 -0
  121. package/lib/components/t-form-input/elements/mscoa-form-input/elements/mscoa-chart/mscoa-chart.component.d.ts +93 -0
  122. package/lib/components/t-form-input/elements/mscoa-form-input/elements/mscoa-computation/mscoa-computation.component.d.ts +62 -0
  123. package/lib/components/t-form-input/elements/mscoa-form-input/elements/mscoa-reactive-form-field/mscoa-reactive-form-field.component.d.ts +21 -0
  124. package/lib/components/t-form-input/elements/mscoa-form-input/elements/scoa-account-table/scoa-account-table.component.d.ts +83 -0
  125. package/lib/components/t-form-input/elements/mscoa-form-input/elements/scoa-input/scoa-input.component.d.ts +27 -0
  126. package/lib/components/t-form-input/elements/mscoa-form-input/mscoa-form-input.component.d.ts +16 -0
  127. package/lib/components/t-form-input/elements/mscoa-form-input/store/accountConstants.d.ts +5 -0
  128. package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-actions.d.ts +19 -0
  129. package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-component-store.service.d.ts +61 -0
  130. package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-effects.d.ts +8 -0
  131. package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-selectors.d.ts +32 -0
  132. package/lib/components/t-form-input/elements/multiple-input-input-element/core/multiple-input-table/multiple-input-table.component.d.ts +37 -0
  133. 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
  134. 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
  135. package/lib/components/t-form-input/elements/multiple-input-input-element/functions/getListCalculated.d.ts +2 -0
  136. package/lib/components/t-form-input/elements/multiple-input-input-element/multiple-input-input-element.component.d.ts +16 -0
  137. package/lib/components/t-form-input/elements/section-title/section-title.component.d.ts +7 -0
  138. package/lib/components/t-form-input/elements/select-input-element/select-input-element.component.d.ts +23 -0
  139. package/lib/components/t-form-input/elements/select-table-input/elements/input-table/input-table.component.d.ts +29 -0
  140. package/lib/components/t-form-input/elements/select-table-input/select-table-input.component.d.ts +13 -0
  141. package/lib/components/t-form-input/elements/signature-input-element/config/signature.d.ts +2 -0
  142. package/lib/components/t-form-input/elements/signature-input-element/core/signature-pad-input/signature-pad-input.component.d.ts +40 -0
  143. package/lib/components/t-form-input/elements/signature-input-element/signature-input-element.component.d.ts +13 -0
  144. package/lib/components/t-form-input/elements/textarea-input-element/textarea-input-element.component.d.ts +13 -0
  145. package/lib/components/t-form-input/elements/toggle-input-element/core/toggle/toggle.component.d.ts +15 -0
  146. package/lib/components/t-form-input/elements/toggle-input-element/toggle-input-element.component.d.ts +13 -0
  147. package/lib/components/t-form-input/t-form-input.component.d.ts +24 -0
  148. package/lib/components/t-form-input-status/t-form-input-status.component.d.ts +10 -0
  149. package/lib/components/user-form-stepper/user-form-stepper.component.d.ts +23 -0
  150. package/lib/injection-tokens/index.d.ts +14 -0
  151. package/lib/ngx-t-forms.component.d.ts +5 -0
  152. package/lib/ngx-t-forms.service.d.ts +6 -0
  153. package/lib/services/core/t-form-builder/functions/addFormInputToForm.d.ts +8 -0
  154. package/lib/services/core/t-form-builder/functions/addMultipleInputFunction.d.ts +2 -0
  155. package/lib/services/core/t-form-builder/functions/addNewSection.d.ts +2 -0
  156. package/lib/services/core/t-form-builder/functions/deleteSection.d.ts +2 -0
  157. package/lib/services/core/t-form-builder/functions/formCanSave.d.ts +3 -0
  158. package/lib/services/core/t-form-builder/functions/inputElementEditorConfigs.d.ts +91 -0
  159. package/lib/services/core/t-form-builder/functions/moveFormInput.d.ts +4 -0
  160. package/lib/services/core/t-form-builder/functions/moveInputToDiffSection.d.ts +2 -0
  161. package/lib/services/core/t-form-builder/functions/multipleInputToggleLabel.d.ts +2 -0
  162. package/lib/services/core/t-form-builder/functions/removeItem.d.ts +7 -0
  163. package/lib/services/core/t-form-builder/functions/sectionDrop.d.ts +3 -0
  164. package/lib/services/core/t-form-builder/functions/stepTitleChangeStep.d.ts +14 -0
  165. package/lib/services/core/t-form-controller/function/calculateInputValue.d.ts +11 -0
  166. package/lib/services/core/t-form-controller/function/getApiDataFetching.d.ts +4 -0
  167. package/lib/services/core/t-form-controller/function/postApiDataFetching.d.ts +16 -0
  168. package/lib/services/core/t-form-controller/function/validateMinInputForPostRequest.d.ts +8 -0
  169. package/lib/services/core/t-form-environment-injection/functions/provideNgxTforms.d.ts +3 -0
  170. package/lib/services/core/t-form-section-controller/Functions/commonFormOperations.d.ts +21 -0
  171. package/lib/services/core/t-form-section-controller/Functions/errorResolver.d.ts +7 -0
  172. package/lib/services/core/t-form-section-controller/Functions/formGenerator.d.ts +29 -0
  173. package/lib/services/core/t-form-section-controller/Functions/getValueFromPathMap.d.ts +6 -0
  174. package/lib/services/core/t-form-tower-controller/form-tower-controller.service.d.ts +99 -0
  175. package/lib/services/core/t-form-tower-controller/functions/allFormInputs.d.ts +3 -0
  176. package/lib/services/core/t-form-tower-controller/functions/createEmptyForm.d.ts +2 -0
  177. package/lib/services/core/t-form-tower-controller/functions/extractInitFunctions.d.ts +8 -0
  178. package/lib/services/core/t-form-tower-controller/functions/getAllFunctionTypes.d.ts +12 -0
  179. package/lib/services/core/t-form-tower-controller/functions/getFormValue.d.ts +3 -0
  180. package/lib/services/core/t-form-tower-controller/functions/getSubmissionStatus.d.ts +7 -0
  181. package/lib/services/core/t-form-tower-controller/functions/handleStepChange.d.ts +3 -0
  182. package/lib/services/core/t-form-tower-controller/functions/multipleInputRowIDControllInput.d.ts +2 -0
  183. package/lib/services/core/t-form-tower-controller/functions/prePoPulateForm.d.ts +85 -0
  184. package/lib/services/core/t-form-tower-controller/functions/saveMultipleInputForm.d.ts +10 -0
  185. package/lib/services/core/t-form-tower-controller/functions/selectFormSteps.d.ts +4 -0
  186. package/lib/services/core/t-form-tower-controller/functions/setControlTempErrors.d.ts +3 -0
  187. package/lib/services/core/t-form-tower-controller/functions/setInputAsTouchedAndDirty.d.ts +2 -0
  188. package/lib/services/core/t-form-tower-controller/functions/setInputError.d.ts +5 -0
  189. package/lib/services/core/t-form-tower-controller/functions/setInputStatus.d.ts +3 -0
  190. package/lib/services/core/t-form-tower-controller/functions/setSectionAsSeen.d.ts +3 -0
  191. package/lib/services/core/t-form-tower-controller/functions/startTowerFormChangesEventListener.d.ts +10 -0
  192. package/lib/services/core/t-form-tower-controller/functions/toggleMultipleInput.d.ts +5 -0
  193. package/lib/services/core/t-form-tower-controller/functions/updateChangeHistory.d.ts +2 -0
  194. package/lib/services/core/t-form-tower-controller/functions/updateFormInputConfig.d.ts +6 -0
  195. package/lib/services/core/t-form-tower-controller/functions/updateValue.d.ts +2 -0
  196. package/lib/services/core/t-input-controller/functions/baseCustomInput.d.ts +104 -0
  197. package/lib/services/core/t-input-controller/functions/colorCoding.d.ts +24 -0
  198. package/lib/services/core/t-input-controller/functions/configureCols.d.ts +5 -0
  199. package/lib/services/core/t-input-controller/functions/generateInputSecret.d.ts +2 -0
  200. package/lib/services/core/t-input-controller/functions/inputErrorMessage.d.ts +3 -0
  201. package/lib/services/hhtpResources/Pipeline/pipeline.service.d.ts +80 -0
  202. package/lib/services/index.d.ts +5 -0
  203. package/lib/shared/functions/assignDeepPropertyToObject.d.ts +1 -0
  204. package/lib/shared/functions/camelize.d.ts +6 -0
  205. package/lib/shared/functions/daysAgoTransform.d.ts +1 -0
  206. package/lib/shared/functions/enryption.d.ts +9 -0
  207. package/lib/shared/functions/evaluateArrayAccessRules.d.ts +14 -0
  208. package/lib/shared/functions/getAvatar.d.ts +1 -0
  209. package/lib/shared/functions/getDeepObject.d.ts +138 -0
  210. package/lib/shared/functions/getInputIllustration.d.ts +2 -0
  211. package/lib/shared/functions/isEqual.d.ts +12 -0
  212. package/lib/shared/functions/migrationCheck.d.ts +3 -0
  213. package/lib/shared/functions/replaceUrlVariables.d.ts +2 -0
  214. package/lib/shared/functions/searchArray.d.ts +1 -0
  215. package/lib/shared/functions/textIconsForUserHints.d.ts +20 -0
  216. package/lib/shared/index.d.ts +6 -0
  217. package/lib/shared/modules/mat-modules.module.d.ts +50 -0
  218. package/lib/shared/pipes/date/days-ago.pipe.d.ts +7 -0
  219. package/package.json +67 -0
  220. package/public-api.d.ts +6 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-t-forms-mat-slider-toggle-editor.component-ClM2gqVq.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/mat-slider-toggle-editor/mat-slider-toggle-editor.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/mat-slider-toggle-editor/mat-slider-toggle-editor.component.html"],"sourcesContent":["import { Component, ElementRef, EventEmitter, HostBinding, Input, Optional, Output, Self } from '@angular/core';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { Subject } from 'rxjs/internal/Subject';\r\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\r\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\n\r\n@Component({\r\n selector: 'lib-mat-slider-toggle-editor',\r\n standalone: true,\r\n imports: [MatModulesModule,CommonModule],\r\n templateUrl: './mat-slider-toggle-editor.component.html',\r\n styleUrl: './mat-slider-toggle-editor.component.css',\r\n providers: [\r\n {\r\n provide: MatFormFieldControl,\r\n useExisting: MatSliderToggleEditorComponent\r\n }\r\n ],\r\n})\r\nexport class MatSliderToggleEditorComponent implements MatFormFieldControl<boolean>, ControlValueAccessor {\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n focused = false;\r\n touched = false;\r\n disabled = false;\r\n controlType = 'lib-mat-slider-toggle-editor';\r\n autofilled = false;\r\n\r\n @Input() name: string | undefined = undefined;\r\n @Input() label: string = '';\r\n @Input() errors:IConfigElementError[] | undefined = [];\r\n @Output() valueChange = new EventEmitter<boolean>();\r\n\r\n private _required = false;\r\n @Input()\r\n get required(): boolean {\r\n return this._required;\r\n }\r\n set required(value: boolean) {\r\n this._required = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n\r\n private _value: boolean = false;\r\n @Input()\r\n get value(): boolean {\r\n return this._value;\r\n }\r\n set value(val: boolean) {\r\n this._value = val;\r\n this.onChange(val);\r\n this.stateChanges.next();\r\n }\r\n\r\n @Input()\r\n get placeholder(): string {\r\n return this._placeholder;\r\n }\r\n set placeholder(value: string) {\r\n this._placeholder = value;\r\n this.stateChanges.next();\r\n }\r\n private _placeholder: string = '';\r\n\r\n @HostBinding() id = `lib-mat-slider-toggle-editor-${MatSliderToggleEditorComponent.nextId++}`;\r\n @HostBinding('attr.aria-describedby') describedBy = '';\r\n @HostBinding('class.floating') get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n get empty(): boolean {\r\n return this.value === false;\r\n }\r\n\r\n get errorState(): boolean {\r\n return !this.value && this.required && this.touched || !!this.ngControl?.errors || (this.errors||[]).length >0;\r\n }\r\n\r\n constructor(\r\n @Optional() @Self() public ngControl: NgControl,\r\n private _elementRef: ElementRef<HTMLElement>\r\n ) {\r\n if (this.ngControl != null) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n }\r\n\r\n // ControlValueAccessor methods\r\n onChange = (_: any) => {};\r\n onTouched = () => {};\r\n\r\n writeValue(value: boolean): void {\r\n this._value = value;\r\n this.stateChanges.next();\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n this.stateChanges.next();\r\n }\r\n\r\n // MatFormFieldControl methods\r\n setDescribedByIds(ids: string[]): void {\r\n const element = this._elementRef?.nativeElement;\r\n if (element) {\r\n element.setAttribute('aria-describedby', ids.join(' '));\r\n }\r\n }\r\n\r\n onContainerClick(event: MouseEvent): void {\r\n if (!this.focused) {\r\n this.focused = true;\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n markAsTouched(): void {\r\n if (!this.touched) {\r\n this.touched = true;\r\n this.onTouched();\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n valueToggleChanged(value: boolean): void {\r\n this.value = value;\r\n this.valueChange.emit(value);\r\n this.markAsTouched();\r\n }\r\n}","<mat-slide-toggle\r\n [disabled]=\"disabled\"\r\n [checked]=\"!!value\"\r\n (change)=\"valueToggleChanged($event.checked)\"\r\n (blur)=\"markAsTouched()\"\r\n>\r\n set <strong>on/off</strong> {{ label }}\r\n</mat-slide-toggle>"],"names":[],"mappings":";;;;;;;;;;MAsBa,8BAA8B,CAAA;aAClC,IAAM,CAAA,MAAA,GAAG,CAAH,CAAK;AAclB,IAAA,IACI,QAAQ,GAAA;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EAAE,mBAAmB;AAC5B,4BAAA,WAAW,EAAgC;AAC5C;AACF,qBAAA,EAAA,QAAA,EAAA,wOAAA,EAAA;;0BA8DE;;0BAAY;kEAnDN,IAAI,EAAA,CAAA;sBAAZ;gBACQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,MAAM,EAAA,CAAA;sBAAd;gBACS,WAAW,EAAA,CAAA;sBAApB;gBAIG,QAAQ,EAAA,CAAA;sBADX;gBAWG,KAAK,EAAA,CAAA;sBADR;gBAWG,WAAW,EAAA,CAAA;sBADd;gBAUc,EAAE,EAAA,CAAA;sBAAhB;gBACqC,WAAW,EAAA,CAAA;sBAAhD,WAAW;uBAAC,uBAAuB;gBACD,gBAAgB,EAAA,CAAA;sBAAlD,WAAW;uBAAC,gBAAgB;;;;;"}
@@ -0,0 +1,32 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component } from '@angular/core';
3
+ import { F as FormsStoreService, M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-B-w5W1gG.mjs';
4
+ import { CommonModule } from '@angular/common';
5
+ import { toSignal } from '@angular/core/rxjs-interop';
6
+ import * as i3 from '@angular/material/button';
7
+ import * as i5 from '@angular/material/icon';
8
+ import * as i9 from '@angular/material/toolbar';
9
+ import * as i8 from '@angular/material/tooltip';
10
+
11
+ class MissingFormConfigsComponent {
12
+ constructor(store) {
13
+ this.store = store;
14
+ this.errors = toSignal(this.store.formBuilderSelectors.formValidationErrorsMessages$, {
15
+ initialValue: []
16
+ });
17
+ this.missingConfigs = toSignal(this.store.formBuilderSelectors.missingConfig$, {
18
+ initialValue: []
19
+ });
20
+ this.hideDetails = true;
21
+ this.showAllErrors = false;
22
+ }
23
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MissingFormConfigsComponent, deps: [{ token: FormsStoreService }], target: i0.ɵɵFactoryTarget.Component }); }
24
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: MissingFormConfigsComponent, isStandalone: true, selector: "app-missing-form-configs", ngImport: i0, template: "@if (hideDetails) {\r\n<button \r\nmatTooltip=\"Click to view form configuration issues and validation errors\"\r\nstyle=\"margin: 16px;\" (click)=\"hideDetails = false\" mat-fab color=\"warn\" aria-label=\"Error icon\">\r\n <mat-icon>error</mat-icon>\r\n</button>\r\n}@else {\r\n<div style=\"margin: 8px;position:relative\" class=\"content \">\r\n <mat-toolbar color=\"warn\">\r\n <button (click)=\" hideDetails = true\" mat-icon-button>\r\n <mat-icon>\r\n close\r\n </mat-icon>\r\n </button>\r\n Missing configurations:\r\n <span class=\"spacer\"></span>\r\n <button [matTooltip]=\"showAllErrors?'Hide all errors':'Show all errors'\"\r\n (click)=\"showAllErrors = !showAllErrors\" mat-icon-button>\r\n\r\n <mat-icon>\r\n unfold_more\r\n </mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n <section style=\"padding: 16px;\" >\r\n <h5>\r\n <strong>\r\n Overall form issues:\r\n </strong>\r\n </h5>\r\n <ul>\r\n @for (issue of (missingConfigs());track issue) {\r\n <li>\r\n {{issue}}\r\n </li>\r\n }\r\n </ul>\r\n\r\n @if(showAllErrors){\r\n <h5>\r\n <strong>\r\n\r\n Form validationErrors :\r\n\r\n </strong>\r\n\r\n\r\n </h5>\r\n <ul>\r\n @for (error of errors(); track error) {\r\n\r\n <li>\r\n\r\n {{error}}\r\n\r\n </li>\r\n\r\n }\r\n </ul>\r\n }\r\n\r\n\r\n\r\n\r\n\r\n </section>\r\n\r\n</div>\r\n}", styles: [".content{width:400px;background:var(--mat-toolbar-container-background-color, var(--mat-app-surface));border:solid var(--mat-form-field-error-text-color, var(--mat-app-error)) 1px}ul{margin-top:0}h5{padding-left:16px;padding-right:16px;padding-top:8px}\n"], dependencies: [{ kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i3.MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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: "ngmodule", type: CommonModule }] }); }
25
+ }
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MissingFormConfigsComponent, decorators: [{
27
+ type: Component,
28
+ args: [{ selector: 'app-missing-form-configs', standalone: true, imports: [MatModulesModule, CommonModule], template: "@if (hideDetails) {\r\n<button \r\nmatTooltip=\"Click to view form configuration issues and validation errors\"\r\nstyle=\"margin: 16px;\" (click)=\"hideDetails = false\" mat-fab color=\"warn\" aria-label=\"Error icon\">\r\n <mat-icon>error</mat-icon>\r\n</button>\r\n}@else {\r\n<div style=\"margin: 8px;position:relative\" class=\"content \">\r\n <mat-toolbar color=\"warn\">\r\n <button (click)=\" hideDetails = true\" mat-icon-button>\r\n <mat-icon>\r\n close\r\n </mat-icon>\r\n </button>\r\n Missing configurations:\r\n <span class=\"spacer\"></span>\r\n <button [matTooltip]=\"showAllErrors?'Hide all errors':'Show all errors'\"\r\n (click)=\"showAllErrors = !showAllErrors\" mat-icon-button>\r\n\r\n <mat-icon>\r\n unfold_more\r\n </mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n <section style=\"padding: 16px;\" >\r\n <h5>\r\n <strong>\r\n Overall form issues:\r\n </strong>\r\n </h5>\r\n <ul>\r\n @for (issue of (missingConfigs());track issue) {\r\n <li>\r\n {{issue}}\r\n </li>\r\n }\r\n </ul>\r\n\r\n @if(showAllErrors){\r\n <h5>\r\n <strong>\r\n\r\n Form validationErrors :\r\n\r\n </strong>\r\n\r\n\r\n </h5>\r\n <ul>\r\n @for (error of errors(); track error) {\r\n\r\n <li>\r\n\r\n {{error}}\r\n\r\n </li>\r\n\r\n }\r\n </ul>\r\n }\r\n\r\n\r\n\r\n\r\n\r\n </section>\r\n\r\n</div>\r\n}", styles: [".content{width:400px;background:var(--mat-toolbar-container-background-color, var(--mat-app-surface));border:solid var(--mat-form-field-error-text-color, var(--mat-app-error)) 1px}ul{margin-top:0}h5{padding-left:16px;padding-right:16px;padding-top:8px}\n"] }]
29
+ }], ctorParameters: () => [{ type: FormsStoreService }] });
30
+
31
+ export { MissingFormConfigsComponent };
32
+ //# sourceMappingURL=ngx-t-forms-missing-form-configs.component-DubPFwTw.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-t-forms-missing-form-configs.component-DubPFwTw.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/missing-form-configs/missing-form-configs.component.ts","../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/missing-form-configs/missing-form-configs.component.html"],"sourcesContent":["import { Component } from '@angular/core';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\n\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsStoreService } from '../../../forms/store/forms-store.service';\r\nimport { toSignal } from '@angular/core/rxjs-interop';\r\n\r\n\r\n@Component({\r\n selector: 'app-missing-form-configs',\r\n standalone: true,\r\n imports: [MatModulesModule, CommonModule],\r\n templateUrl: './missing-form-configs.component.html',\r\n styleUrl: './missing-form-configs.component.scss'\r\n})\r\nexport class MissingFormConfigsComponent {\r\n errors = toSignal(this.store.formBuilderSelectors.formValidationErrorsMessages$,{\r\n initialValue:[]\r\n })\r\n missingConfigs = toSignal(\r\n this.store.formBuilderSelectors.missingConfig$ ,\r\n {\r\n initialValue: []\r\n }\r\n )\r\n constructor(private store:FormsStoreService) { }\r\n hideDetails: boolean = true;\r\n showAllErrors: boolean = false\r\n\r\n}\r\n","@if (hideDetails) {\r\n<button \r\nmatTooltip=\"Click to view form configuration issues and validation errors\"\r\nstyle=\"margin: 16px;\" (click)=\"hideDetails = false\" mat-fab color=\"warn\" aria-label=\"Error icon\">\r\n <mat-icon>error</mat-icon>\r\n</button>\r\n}@else {\r\n<div style=\"margin: 8px;position:relative\" class=\"content \">\r\n <mat-toolbar color=\"warn\">\r\n <button (click)=\" hideDetails = true\" mat-icon-button>\r\n <mat-icon>\r\n close\r\n </mat-icon>\r\n </button>\r\n Missing configurations:\r\n <span class=\"spacer\"></span>\r\n <button [matTooltip]=\"showAllErrors?'Hide all errors':'Show all errors'\"\r\n (click)=\"showAllErrors = !showAllErrors\" mat-icon-button>\r\n\r\n <mat-icon>\r\n unfold_more\r\n </mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n <section style=\"padding: 16px;\" >\r\n <h5>\r\n <strong>\r\n Overall form issues:\r\n </strong>\r\n </h5>\r\n <ul>\r\n @for (issue of (missingConfigs());track issue) {\r\n <li>\r\n {{issue}}\r\n </li>\r\n }\r\n </ul>\r\n\r\n @if(showAllErrors){\r\n <h5>\r\n <strong>\r\n\r\n Form validationErrors :\r\n\r\n </strong>\r\n\r\n\r\n </h5>\r\n <ul>\r\n @for (error of errors(); track error) {\r\n\r\n <li>\r\n\r\n {{error}}\r\n\r\n </li>\r\n\r\n }\r\n </ul>\r\n }\r\n\r\n\r\n\r\n\r\n\r\n </section>\r\n\r\n</div>\r\n}"],"names":["i1.FormsStoreService"],"mappings":";;;;;;;;;;MAea,2BAA2B,CAAA;AAUtC,IAAA,WAAA,CAAoB,KAAuB,EAAA;QAAvB,IAAK,CAAA,KAAA,GAAL,KAAK;QAT1B,IAAM,CAAA,MAAA,GAAK,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,6BAA6B,EAAC;AAC/E,YAAA,YAAY,EAAC;AACf,SAAA,CAAC;QACD,IAAc,CAAA,cAAA,GAAI,QAAQ,CACxB,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,cAAc,EAC9C;AACE,YAAA,YAAY,EAAE;AACf,SAAA,CACF;QAED,IAAW,CAAA,WAAA,GAAY,IAAI;QAC3B,IAAa,CAAA,aAAA,GAAY,KAAK;;8GAZnB,2BAA2B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,2BAA2B,ECfxC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,6qDAoEC,EDzDW,MAAA,EAAA,CAAA,gQAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,gBAAgB,0yBAAE,YAAY,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAI7B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAPvC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,cACxB,IAAI,EAAA,OAAA,EACP,CAAC,gBAAgB,EAAE,YAAY,CAAC,EAAA,QAAA,EAAA,6qDAAA,EAAA,MAAA,EAAA,CAAA,gQAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,230 @@
1
+ import * as i2 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { EventEmitter, Output, Input, HostBinding, Optional, Self, Component } from '@angular/core';
5
+ import * as i1 from '@angular/forms';
6
+ import { Validators, ReactiveFormsModule } from '@angular/forms';
7
+ import { Subject, BehaviorSubject, take, tap, catchError, takeUntil } from 'rxjs';
8
+ import { M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-B-w5W1gG.mjs';
9
+ import * as i4$1 from '@angular/material/form-field';
10
+ import { MatFormFieldControl } from '@angular/material/form-field';
11
+ import * as i2$1 from '@angular/material/core';
12
+ import * as i3 from '@angular/material/button';
13
+ import * as i3$1 from '@angular/material/card';
14
+ import * as i4 from '@angular/material/chips';
15
+ import * as i5 from '@angular/material/icon';
16
+ import * as i7 from '@angular/material/select';
17
+ import * as i2$2 from '@angular/material/slide-toggle';
18
+ import * as i9 from '@angular/material/toolbar';
19
+
20
+ class MscoaSegmentConfigComponent {
21
+ static { this.nextId = 0; }
22
+ constructor(fb, ngControl, _elementRef) {
23
+ this.fb = fb;
24
+ this.ngControl = ngControl;
25
+ this._elementRef = _elementRef;
26
+ this.stateChanges = new Subject();
27
+ this.id = `app-mscoa-segment-config'-${MscoaSegmentConfigComponent.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.errors = [];
35
+ this._showAllSegments = false;
36
+ this.valueChanged = new EventEmitter();
37
+ this._value = new BehaviorSubject([]);
38
+ this.destroy$ = new Subject();
39
+ this.error$ = new BehaviorSubject(null);
40
+ this.editingIndex = null;
41
+ this.isAddingNew = false;
42
+ this.getMscoaError = undefined;
43
+ this.segmentForm = this.createSegmentForm();
44
+ }
45
+ get empty() {
46
+ return !this.value;
47
+ }
48
+ get shouldLabelFloat() {
49
+ return this.focused || !this.empty;
50
+ }
51
+ get errorState() {
52
+ const hasError = !!this.ngControl?.control?.errors || (this.errors || []).length > 0 && this.touched;
53
+ return !this.value && !!this.required || hasError;
54
+ }
55
+ setDescribedByIds(ids) {
56
+ // Ensure the component view is initialized
57
+ if (this._elementRef && this._elementRef.nativeElement) {
58
+ const controlElement = this._elementRef.nativeElement.querySelector('.app-mscoa-segment-config');
59
+ // Check if the controlElement exists before attempting to set its attribute
60
+ if (controlElement) {
61
+ controlElement.setAttribute('aria-describedby', ids.join(' '));
62
+ }
63
+ }
64
+ }
65
+ onContainerClick(event) {
66
+ this.markAsTouched();
67
+ this.stateChanges.next();
68
+ }
69
+ markAsTouched() {
70
+ console.log('markAsTouched');
71
+ if (!this.touched) {
72
+ this.onTouched();
73
+ this.touched = true;
74
+ }
75
+ }
76
+ set value(val) {
77
+ this._value.next(val || []);
78
+ }
79
+ get value() {
80
+ return this._value.value;
81
+ }
82
+ set showAllSegments(val) {
83
+ if (!!val) {
84
+ this.checkShowAllSegments();
85
+ }
86
+ this._showAllSegments = !!val;
87
+ }
88
+ get showAllSegments() {
89
+ return this._showAllSegments;
90
+ }
91
+ set getMscoaTree(options$) {
92
+ if (!!options$ && this._getMscoaTree === undefined) {
93
+ this._getMscoaTree = options$;
94
+ this.loadMscoa();
95
+ }
96
+ }
97
+ ngOnInit() {
98
+ this.listenToFormChanges();
99
+ }
100
+ ngOnDestroy() {
101
+ this.destroy$.next();
102
+ this.destroy$.complete();
103
+ }
104
+ loadMscoa() {
105
+ this._getMscoaTree?.pipe(take(1), tap((options) => {
106
+ this.mscoaTree = options;
107
+ this.treeSegments = options?.accountTreeKeys?.map((treeKeys) => ({
108
+ segment: treeKeys,
109
+ singleSelect: true,
110
+ label: this.toTitleCase(treeKeys),
111
+ readOnly: this.value.find((v) => v.segment === treeKeys)?.readOnly || false,
112
+ })) || [];
113
+ }), catchError((error) => {
114
+ this.getMscoaError = 'Failed to fetch mscoa tree';
115
+ console.error('Error while fetching SCOA tree:', error);
116
+ return [null];
117
+ })).subscribe();
118
+ }
119
+ createSegmentForm(segment = {
120
+ segment: '', label: '',
121
+ singleSelect: true,
122
+ readOnly: false
123
+ }) {
124
+ return this.fb.group({
125
+ segment: [segment.segment, Validators.required],
126
+ readOnly: [segment.readOnly, Validators.required],
127
+ singleSelect: [segment.singleSelect, Validators.required]
128
+ });
129
+ }
130
+ listenToFormChanges() {
131
+ this.segmentForm.valueChanges
132
+ .pipe(takeUntil(this.destroy$))
133
+ .subscribe((v) => console.log(v));
134
+ }
135
+ startAddNew() {
136
+ this.isAddingNew = true;
137
+ this.editingIndex = null;
138
+ this.segmentForm = this.createSegmentForm();
139
+ }
140
+ startEdit(index) {
141
+ this.editingIndex = index;
142
+ this.isAddingNew = false;
143
+ this.segmentForm = this.createSegmentForm(this.value[index]);
144
+ }
145
+ cancelEdit() {
146
+ this.editingIndex = null;
147
+ this.isAddingNew = false;
148
+ this.segmentForm.reset();
149
+ }
150
+ saveSegment() {
151
+ if (this.segmentForm.valid) {
152
+ const newSegment = ({
153
+ segment: this.segmentForm.value.segment,
154
+ label: this.toTitleCase(this.segmentForm.value.segment),
155
+ singleSelect: this.segmentForm.value.singleSelect,
156
+ readOnly: this.segmentForm.value.readOnly
157
+ });
158
+ const updatedValue = [...this.value];
159
+ if (this.isAddingNew) {
160
+ updatedValue.push(newSegment);
161
+ }
162
+ else if (this.editingIndex !== null) {
163
+ updatedValue[this.editingIndex] = newSegment;
164
+ }
165
+ this._value.next(updatedValue);
166
+ this.valueChanged.emit(updatedValue);
167
+ this.cancelEdit();
168
+ }
169
+ }
170
+ readOnly(event) {
171
+ this.segmentForm.patchValue({ readOnly: event.checked });
172
+ }
173
+ singleSelectChange(event) {
174
+ this.segmentForm.patchValue({ singleSelect: event.checked });
175
+ }
176
+ removeSegment(index) {
177
+ const updatedValue = this.value.filter((_, i) => i !== index);
178
+ this._value.next(updatedValue);
179
+ this.valueChanged.emit(updatedValue);
180
+ }
181
+ toTitleCase(str) {
182
+ return str.replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase());
183
+ }
184
+ alreadyExists(segment) {
185
+ return this.value.find((v) => v.segment === segment);
186
+ }
187
+ checkShowAllSegments() {
188
+ if (!this._getMscoaTree || !this.treeSegments)
189
+ return;
190
+ const updatedValue = this.treeSegments.map(segment => ({
191
+ ...segment,
192
+ ...(this.value.find(v => v.segment === segment.segment) || {})
193
+ }));
194
+ if (JSON.stringify(updatedValue) !== JSON.stringify(this.value)) {
195
+ this.valueChanged.emit([{}]);
196
+ setTimeout(() => {
197
+ this.valueChanged.emit(updatedValue);
198
+ }, 0);
199
+ }
200
+ }
201
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MscoaSegmentConfigComponent, deps: [{ token: i1.FormBuilder }, { token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
202
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: MscoaSegmentConfigComponent, isStandalone: true, selector: "app-mscoa-segment-config", inputs: { errors: "errors", value: "value", showAllSegments: "showAllSegments", getMscoaTree: "getMscoaTree" }, outputs: { valueChanged: "valueChanged" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: MscoaSegmentConfigComponent }], ngImport: i0, template: "<div *ngIf=\"(value||[]).length>0\" class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span> Allowed segment configuration</span>\n</div>\n\n<mat-chip-listbox *ngIf=\"(value?.length || 0) > 0; else noSegments\" aria-label=\"Fish selection\">\n @for (segment of value||[]; track segment.segment) {\n <mat-chip-option (removed)=\"removeSegment($index)\" (click)=\"startEdit($index)\" color=\"accent\"\n [value]=\"segment?.segment\" [selected]=\"this.editingIndex === $index\">\n <div style=\" \n display: flex;\n align-items: center;\n gap: 1px;\">\n <span style=\"margin-right: 2px;\">\n {{ segment.label }}\n </span>\n <mat-icon class=\"icons\">\n {{ segment.singleSelect ? 'done' : ' done_all' }}\n </mat-icon>\n <mat-icon class=\"icons\">\n\n {{ segment.readOnly ? 'edit_off' : 'edit' }}\n </mat-icon>\n </div>\n\n @if ( showAllSegments === false) {\n <button matChipRemove [attr.aria-label]=\"'remove' \">\n <mat-icon>cancel</mat-icon>\n </button>\n }\n\n </mat-chip-option>\n }\n</mat-chip-listbox>\n\n\n\n\n\n<ng-template #noSegments>\n <div class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>No segment configuration available. Start by adding a segment below.</span>\n </div>\n</ng-template>\n\n<mat-toolbar *ngIf=\"!isAddingNew && editingIndex === null && showAllSegments === false\">\n <button style=\"width:100%\" mat-stroked-button (click)=\"startAddNew()\">\n Add New Segment <mat-icon>add</mat-icon>\n </button>\n</mat-toolbar>\n\n@if (!!getMscoaError) {\n<div class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>\n {{ getMscoaError }}\n </span>\n</div>\n}\n<mat-card *ngIf=\"isAddingNew || editingIndex !== null\">\n <mat-card-header>\n <mat-card-subtitle>\n {{ isAddingNew ? 'Add a new' : 'Update' }} Segment\n </mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <form [formGroup]=\"segmentForm\" (ngSubmit)=\"saveSegment()\">\n <mat-form-field appearance=\"outline\">\n <mat-label>Segment</mat-label>\n <mat-select matNativeControl formControlName=\"segment\" [value]=\"value\" placeholder=\"Select segment\">\n @for ( segment of treeSegments; track segment.segment) {\n <mat-option [disabled]=\"alreadyExists(segment.segment)\" [value]=\"segment.segment\"> {{ segment.label\n }}</mat-option>\n }\n </mat-select>\n <mat-hint>\n Choose a function to run on the array\n </mat-hint>\n </mat-form-field>\n <mat-toolbar>\n <mat-slide-toggle (change)=\"singleSelectChange($event)\" [checked]=\"segmentForm.value.singleSelect\">\n Single select segment\n </mat-slide-toggle>\n </mat-toolbar>\n <mat-toolbar>\n <mat-slide-toggle (change)=\"readOnly($event)\" [checked]=\"segmentForm.value.readOnly\">Read only\n segment</mat-slide-toggle>\n </mat-toolbar>\n\n <br>\n <mat-card-actions>\n <button mat-button type=\"submit\" [disabled]=\"!segmentForm.valid\">Save</button>\n <button mat-button (click)=\"cancelEdit()\">Cancel</button>\n </mat-card-actions>\n\n\n </form>\n </mat-card-content>\n</mat-card>\n\n<span color=\"danger\" *ngIf=\"error$ | async as error\">\n <p>{{ error }}</p>\n</span>", styles: [".info-icon{min-width:38px}.tree-instructions{display:flex;align-items:center;gap:8px;padding:12px;background:azure;border-radius:4px;margin-bottom:16px}.json-error{background:inherit;color:#e74c3c}mat-form-field{width:100%;margin-bottom:8px;background:azure}.icons{font-size:14px;height:14px;width:14px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i2$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { 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: "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: i7.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i2$2.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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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"] }] }); }
203
+ }
204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MscoaSegmentConfigComponent, decorators: [{
205
+ type: Component,
206
+ args: [{ selector: 'app-mscoa-segment-config', standalone: true, imports: [
207
+ CommonModule,
208
+ MatModulesModule,
209
+ ReactiveFormsModule
210
+ ], providers: [{ provide: MatFormFieldControl, useExisting: MscoaSegmentConfigComponent }], template: "<div *ngIf=\"(value||[]).length>0\" class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span> Allowed segment configuration</span>\n</div>\n\n<mat-chip-listbox *ngIf=\"(value?.length || 0) > 0; else noSegments\" aria-label=\"Fish selection\">\n @for (segment of value||[]; track segment.segment) {\n <mat-chip-option (removed)=\"removeSegment($index)\" (click)=\"startEdit($index)\" color=\"accent\"\n [value]=\"segment?.segment\" [selected]=\"this.editingIndex === $index\">\n <div style=\" \n display: flex;\n align-items: center;\n gap: 1px;\">\n <span style=\"margin-right: 2px;\">\n {{ segment.label }}\n </span>\n <mat-icon class=\"icons\">\n {{ segment.singleSelect ? 'done' : ' done_all' }}\n </mat-icon>\n <mat-icon class=\"icons\">\n\n {{ segment.readOnly ? 'edit_off' : 'edit' }}\n </mat-icon>\n </div>\n\n @if ( showAllSegments === false) {\n <button matChipRemove [attr.aria-label]=\"'remove' \">\n <mat-icon>cancel</mat-icon>\n </button>\n }\n\n </mat-chip-option>\n }\n</mat-chip-listbox>\n\n\n\n\n\n<ng-template #noSegments>\n <div class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>No segment configuration available. Start by adding a segment below.</span>\n </div>\n</ng-template>\n\n<mat-toolbar *ngIf=\"!isAddingNew && editingIndex === null && showAllSegments === false\">\n <button style=\"width:100%\" mat-stroked-button (click)=\"startAddNew()\">\n Add New Segment <mat-icon>add</mat-icon>\n </button>\n</mat-toolbar>\n\n@if (!!getMscoaError) {\n<div class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>\n {{ getMscoaError }}\n </span>\n</div>\n}\n<mat-card *ngIf=\"isAddingNew || editingIndex !== null\">\n <mat-card-header>\n <mat-card-subtitle>\n {{ isAddingNew ? 'Add a new' : 'Update' }} Segment\n </mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <form [formGroup]=\"segmentForm\" (ngSubmit)=\"saveSegment()\">\n <mat-form-field appearance=\"outline\">\n <mat-label>Segment</mat-label>\n <mat-select matNativeControl formControlName=\"segment\" [value]=\"value\" placeholder=\"Select segment\">\n @for ( segment of treeSegments; track segment.segment) {\n <mat-option [disabled]=\"alreadyExists(segment.segment)\" [value]=\"segment.segment\"> {{ segment.label\n }}</mat-option>\n }\n </mat-select>\n <mat-hint>\n Choose a function to run on the array\n </mat-hint>\n </mat-form-field>\n <mat-toolbar>\n <mat-slide-toggle (change)=\"singleSelectChange($event)\" [checked]=\"segmentForm.value.singleSelect\">\n Single select segment\n </mat-slide-toggle>\n </mat-toolbar>\n <mat-toolbar>\n <mat-slide-toggle (change)=\"readOnly($event)\" [checked]=\"segmentForm.value.readOnly\">Read only\n segment</mat-slide-toggle>\n </mat-toolbar>\n\n <br>\n <mat-card-actions>\n <button mat-button type=\"submit\" [disabled]=\"!segmentForm.valid\">Save</button>\n <button mat-button (click)=\"cancelEdit()\">Cancel</button>\n </mat-card-actions>\n\n\n </form>\n </mat-card-content>\n</mat-card>\n\n<span color=\"danger\" *ngIf=\"error$ | async as error\">\n <p>{{ error }}</p>\n</span>", styles: [".info-icon{min-width:38px}.tree-instructions{display:flex;align-items:center;gap:8px;padding:12px;background:azure;border-radius:4px;margin-bottom:16px}.json-error{background:inherit;color:#e74c3c}mat-form-field{width:100%;margin-bottom:8px;background:azure}.icons{font-size:14px;height:14px;width:14px}\n"] }]
211
+ }], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i1.NgControl, decorators: [{
212
+ type: Optional
213
+ }, {
214
+ type: Self
215
+ }] }, { type: i0.ElementRef }], propDecorators: { id: [{
216
+ type: HostBinding
217
+ }], errors: [{
218
+ type: Input
219
+ }], value: [{
220
+ type: Input
221
+ }], showAllSegments: [{
222
+ type: Input
223
+ }], getMscoaTree: [{
224
+ type: Input
225
+ }], valueChanged: [{
226
+ type: Output
227
+ }] } });
228
+
229
+ export { MscoaSegmentConfigComponent };
230
+ //# sourceMappingURL=ngx-t-forms-mscoa-segment-config.component-DtmVJG6v.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-t-forms-mscoa-segment-config.component-DtmVJG6v.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/mscoa-segment-config/mscoa-segment-config.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/mscoa-segment-config/mscoa-segment-config.component.html"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { Component, ElementRef, EventEmitter, HostBinding, Input, OnDestroy, OnInit, Optional, Output, Self } from '@angular/core';\r\nimport { FormGroup, FormBuilder, Validators, ReactiveFormsModule, NgControl } from '@angular/forms';\r\nimport { BehaviorSubject, catchError, Observable, Subject, take, takeUntil, tap } from 'rxjs';\r\n\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { IGetTreeResponse } from 'ngx-t-forms-types';\r\n\r\nimport { MatSlideToggleChange } from '@angular/material/slide-toggle';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\n\r\ninterface IIncludedSegmentConfig{\r\n segment:string,\r\n label:string,\r\n readOnly:boolean\r\n singleSelect:boolean\r\n\r\n}\r\n@Component({\r\n selector: 'app-mscoa-segment-config',\r\n templateUrl: './mscoa-segment-config.component.html',\r\n styleUrls: ['./mscoa-segment-config.component.scss'],\r\n standalone: true,\r\n imports:[\r\n CommonModule,\r\n MatModulesModule,\r\n ReactiveFormsModule\r\n ],\r\nproviders: [{ provide: MatFormFieldControl, useExisting:MscoaSegmentConfigComponent }],\r\n \r\n})\r\nexport class MscoaSegmentConfigComponent implements OnInit, OnDestroy,MatFormFieldControl<IIncludedSegmentConfig[]>{\r\n\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n \r\n @HostBinding() id = `app-mscoa-segment-config'-${MscoaSegmentConfigComponent.nextId++}`;\r\n \r\n placeholder: string = ''\r\n constructor(\r\n private fb: FormBuilder,\r\n @Optional() @Self() public ngControl: NgControl, private _elementRef: ElementRef<HTMLElement>,\r\n ) {\r\n this.segmentForm = this.createSegmentForm();\r\n \r\n }\r\n\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\n get errorState(): boolean {\r\n const hasError = !!this.ngControl?.control?.errors || (this.errors||[]).length > 0 && this.touched\r\n return !this.value && !!this.required || hasError\r\n }\r\n \r\n controlType?: string | undefined;\r\n autofilled?: boolean | undefined;\r\n userAriaDescribedBy?: string | undefined;\r\n disableAutomaticLabeling?: boolean | undefined;\r\n setDescribedByIds(ids: string[]) {\r\n // Ensure the component view is initialized\r\n if (this._elementRef && this._elementRef.nativeElement) {\r\n const controlElement = this._elementRef.nativeElement.querySelector('.app-mscoa-segment-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 \r\n touched: boolean = false;\r\n onTouched = () => {};\r\n markAsTouched() {\r\n console.log('markAsTouched') \r\n if (!this.touched) {\r\n this.onTouched();\r\n this.touched = true;\r\n }\r\n } \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n @Input() errors:IConfigElementError[] |undefined = [];\r\n \r\n @Input() set value(val: IIncludedSegmentConfig[]) {\r\n this._value.next(val || []);\r\n }\r\n \r\n get value(): IIncludedSegmentConfig[] {\r\n return this._value.value;\r\n }\r\n _getMscoaTree :Observable<IGetTreeResponse> | undefined;\r\n _showAllSegments:boolean = false;\r\n @Input() set showAllSegments(val:boolean){\r\n\r\n if(!!val){\r\n this.checkShowAllSegments()\r\n }\r\n this._showAllSegments = !!val\r\n \r\n }\r\n get showAllSegments(){\r\n return this._showAllSegments\r\n }\r\n @Input() set getMscoaTree(options$:Observable<IGetTreeResponse> | undefined){\r\n if(!!options$ && this._getMscoaTree === undefined){\r\n this._getMscoaTree = options$\r\n this.loadMscoa()\r\n }\r\n }\r\n@Output() valueChanged = new EventEmitter<IIncludedSegmentConfig[]>();\r\n private _value = new BehaviorSubject<IIncludedSegmentConfig[]>([]);\r\n private destroy$ = new Subject<void>();\r\n\r\n mscoaTree!:IGetTreeResponse | null;\r\n treeSegments!:IIncludedSegmentConfig[];\r\n error$ = new BehaviorSubject<string | null>(null);\r\n\r\n segmentForm: FormGroup;\r\n editingIndex: number | null = null;\r\n isAddingNew = false;\r\n\r\n\r\n\r\n ngOnInit() {\r\n this.listenToFormChanges();\r\n }\r\n\r\n ngOnDestroy() {\r\n this.destroy$.next();\r\n this.destroy$.complete();\r\n }\r\n getMscoaError:string|undefined = undefined\r\n private loadMscoa(){\r\n \r\n this._getMscoaTree?.pipe(\r\n take(1),\r\n tap((options) => {\r\n this.mscoaTree = options;\r\n this.treeSegments = options?.accountTreeKeys?.map((treeKeys) => ({\r\n segment:treeKeys,\r\n singleSelect:true,\r\n label: this.toTitleCase(treeKeys),\r\n readOnly: this.value.find((v) => v.segment === treeKeys)?.readOnly || false, \r\n })) || [];\r\n }),\r\n catchError((error) => {\r\n this.getMscoaError = 'Failed to fetch mscoa tree';\r\n console.error('Error while fetching SCOA tree:', error);\r\n return [null];\r\n })\r\n ).subscribe();\r\n }\r\n private createSegmentForm(segment: IIncludedSegmentConfig = {\r\n segment: '', label: '',\r\n singleSelect:true,\r\n readOnly:false}): FormGroup {\r\n return this.fb.group({\r\n segment: [segment.segment, Validators.required],\r\n readOnly: [segment.readOnly, Validators.required],\r\n singleSelect:[segment.singleSelect,Validators.required]\r\n });\r\n }\r\n\r\n private listenToFormChanges() {\r\n this.segmentForm.valueChanges\r\n .pipe(takeUntil(this.destroy$))\r\n .subscribe((v) => console.log(v));\r\n }\r\n\r\n startAddNew() {\r\n this.isAddingNew = true;\r\n this.editingIndex = null;\r\n this.segmentForm = this.createSegmentForm();\r\n }\r\n\r\n startEdit(index: number) {\r\n this.editingIndex = index;\r\n this.isAddingNew = false;\r\n this.segmentForm = this.createSegmentForm(this.value[index]);\r\n }\r\n\r\n cancelEdit() {\r\n this.editingIndex = null;\r\n this.isAddingNew = false;\r\n this.segmentForm.reset();\r\n }\r\n\r\n saveSegment() {\r\n if (this.segmentForm.valid) {\r\n const newSegment: IIncludedSegmentConfig = ({\r\n segment:this.segmentForm.value.segment,\r\n label:this.toTitleCase(this.segmentForm.value.segment),\r\n singleSelect:this.segmentForm.value.singleSelect,\r\n readOnly:this.segmentForm.value.readOnly\r\n })\r\n const updatedValue = [...this.value];\r\n\r\n if (this.isAddingNew) {\r\n updatedValue.push(newSegment);\r\n } else if (this.editingIndex !== null) {\r\n updatedValue[this.editingIndex] = newSegment;\r\n }\r\n\r\n \r\n this._value.next(updatedValue);\r\n this.valueChanged.emit(updatedValue);\r\n this.cancelEdit();\r\n }\r\n }\r\n readOnly(event:MatSlideToggleChange){\r\n this.segmentForm.patchValue({readOnly:event.checked}) \r\n }\r\n singleSelectChange(event:MatSlideToggleChange){\r\n this.segmentForm.patchValue({singleSelect:event.checked}) \r\n }\r\n removeSegment(index: number) {\r\n const updatedValue = this.value.filter((_, i) => i !== index);\r\n this._value.next(updatedValue);\r\n this.valueChanged.emit(updatedValue);\r\n }\r\n\r\n private toTitleCase(str: string): string {\r\n return str.replace(/\\w\\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase());\r\n }\r\n alreadyExists(segment:string){\r\n return this.value.find((v) => v.segment === segment)\r\n }\r\n checkShowAllSegments() {\r\n if (!this._getMscoaTree || !this.treeSegments) return;\r\n \r\n const updatedValue = this.treeSegments.map(segment => ({\r\n ...segment,\r\n ...(this.value.find(v => v.segment === segment.segment) || {})\r\n }));\r\n\r\n if (JSON.stringify(updatedValue) !== JSON.stringify(this.value)) {\r\n this.valueChanged.emit([{} as any]);\r\n setTimeout(() => {\r\n this.valueChanged.emit(updatedValue);\r\n }, 0);\r\n }\r\n }\r\n}","<div *ngIf=\"(value||[]).length>0\" class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span> Allowed segment configuration</span>\n</div>\n\n<mat-chip-listbox *ngIf=\"(value?.length || 0) > 0; else noSegments\" aria-label=\"Fish selection\">\n @for (segment of value||[]; track segment.segment) {\n <mat-chip-option (removed)=\"removeSegment($index)\" (click)=\"startEdit($index)\" color=\"accent\"\n [value]=\"segment?.segment\" [selected]=\"this.editingIndex === $index\">\n <div style=\" \n display: flex;\n align-items: center;\n gap: 1px;\">\n <span style=\"margin-right: 2px;\">\n {{ segment.label }}\n </span>\n <mat-icon class=\"icons\">\n {{ segment.singleSelect ? 'done' : ' done_all' }}\n </mat-icon>\n <mat-icon class=\"icons\">\n\n {{ segment.readOnly ? 'edit_off' : 'edit' }}\n </mat-icon>\n </div>\n\n @if ( showAllSegments === false) {\n <button matChipRemove [attr.aria-label]=\"'remove' \">\n <mat-icon>cancel</mat-icon>\n </button>\n }\n\n </mat-chip-option>\n }\n</mat-chip-listbox>\n\n\n\n\n\n<ng-template #noSegments>\n <div class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>No segment configuration available. Start by adding a segment below.</span>\n </div>\n</ng-template>\n\n<mat-toolbar *ngIf=\"!isAddingNew && editingIndex === null && showAllSegments === false\">\n <button style=\"width:100%\" mat-stroked-button (click)=\"startAddNew()\">\n Add New Segment <mat-icon>add</mat-icon>\n </button>\n</mat-toolbar>\n\n@if (!!getMscoaError) {\n<div class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>\n {{ getMscoaError }}\n </span>\n</div>\n}\n<mat-card *ngIf=\"isAddingNew || editingIndex !== null\">\n <mat-card-header>\n <mat-card-subtitle>\n {{ isAddingNew ? 'Add a new' : 'Update' }} Segment\n </mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <form [formGroup]=\"segmentForm\" (ngSubmit)=\"saveSegment()\">\n <mat-form-field appearance=\"outline\">\n <mat-label>Segment</mat-label>\n <mat-select matNativeControl formControlName=\"segment\" [value]=\"value\" placeholder=\"Select segment\">\n @for ( segment of treeSegments; track segment.segment) {\n <mat-option [disabled]=\"alreadyExists(segment.segment)\" [value]=\"segment.segment\"> {{ segment.label\n }}</mat-option>\n }\n </mat-select>\n <mat-hint>\n Choose a function to run on the array\n </mat-hint>\n </mat-form-field>\n <mat-toolbar>\n <mat-slide-toggle (change)=\"singleSelectChange($event)\" [checked]=\"segmentForm.value.singleSelect\">\n Single select segment\n </mat-slide-toggle>\n </mat-toolbar>\n <mat-toolbar>\n <mat-slide-toggle (change)=\"readOnly($event)\" [checked]=\"segmentForm.value.readOnly\">Read only\n segment</mat-slide-toggle>\n </mat-toolbar>\n\n <br>\n <mat-card-actions>\n <button mat-button type=\"submit\" [disabled]=\"!segmentForm.valid\">Save</button>\n <button mat-button (click)=\"cancelEdit()\">Cancel</button>\n </mat-card-actions>\n\n\n </form>\n </mat-card-content>\n</mat-card>\n\n<span color=\"danger\" *ngIf=\"error$ | async as error\">\n <p>{{ error }}</p>\n</span>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MAgCa,2BAA2B,CAAA;aAE7B,IAAM,CAAA,MAAA,GAAG,CAAH,CAAK;AAMlB,IAAA,WAAA,CACU,EAAe,EACI,SAAoB,EAAU,WAAoC,EAAA;QADrF,IAAE,CAAA,EAAA,GAAF,EAAE;QACiB,IAAS,CAAA,SAAA,GAAT,SAAS;QAAqB,IAAW,CAAA,WAAA,GAAX,WAAW;AAPtE,QAAA,IAAA,CA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