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,208 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, inject, Output, Input, HostBinding, Optional, Self, Component } from '@angular/core';
3
+ import { Subject, BehaviorSubject, take, tap, catchError } from 'rxjs';
4
+ import { MatDialog } from '@angular/material/dialog';
5
+ import * as i2 from '@angular/common';
6
+ import { CommonModule } from '@angular/common';
7
+ import { M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-B-w5W1gG.mjs';
8
+ import * as i4 from '@angular/material/form-field';
9
+ import { MatFormFieldControl } from '@angular/material/form-field';
10
+ import * as i1 from '@angular/forms';
11
+ import * as i2$1 from '@angular/material/core';
12
+ import * as i3 from '@angular/material/button';
13
+ import * as i5 from '@angular/material/icon';
14
+ import * as i6 from '@angular/material/list';
15
+ import * as i7 from '@angular/material/select';
16
+ import * as i9 from '@angular/material/toolbar';
17
+
18
+ class ConfigMscoaAdditionalInputsComponent {
19
+ static { this.nextId = 0; }
20
+ constructor(ngControl, _elementRef) {
21
+ this.ngControl = ngControl;
22
+ this._elementRef = _elementRef;
23
+ this.stateChanges = new Subject();
24
+ this.id = `app-config-mscoa-additional-inputs-${ConfigMscoaAdditionalInputsComponent.nextId++}`;
25
+ this.placeholder = '';
26
+ this.focused = false;
27
+ this.required = false;
28
+ this.disabled = false;
29
+ this.touched = false;
30
+ this.onTouched = () => { };
31
+ this.mscoaInitiated = false;
32
+ this.errors = [];
33
+ this.mapToData = undefined;
34
+ this._inputInEdit = new BehaviorSubject(null);
35
+ this.inputInEdit = undefined;
36
+ this.valueChanged = new EventEmitter();
37
+ this._value = new BehaviorSubject([]);
38
+ this.editingIndex = null;
39
+ this.isAddingNew = false;
40
+ this.accountTreeKeys = [];
41
+ this.hovered = null;
42
+ this.hoveredIndex = null;
43
+ this.dialog = inject(MatDialog);
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-config-mscoa-additional-inputs');
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 getMscoaTree(options$) {
77
+ if (!!options$ && !this.mscoaInitiated) {
78
+ this.mscoaInitiated = true;
79
+ options$.pipe(take(1), tap((options) => {
80
+ this.accountTreeKeys = options.accountTreeKeys || [];
81
+ }), catchError((error) => {
82
+ console.error('Error while fetching SCOA tree:', error);
83
+ return [null];
84
+ })).subscribe();
85
+ }
86
+ }
87
+ set value(val) {
88
+ this._value.next(val || []);
89
+ }
90
+ get value() {
91
+ return this._value.value;
92
+ }
93
+ ngOnInit() {
94
+ }
95
+ startAddNew() {
96
+ this.isAddingNew = true;
97
+ this.editingIndex = null;
98
+ this.inputInEdit = undefined;
99
+ this.openElementEditor();
100
+ }
101
+ startEdit(index) {
102
+ this.editingIndex = index;
103
+ this.isAddingNew = false;
104
+ this.inputInEdit = this.value[index];
105
+ this.openElementEditor();
106
+ }
107
+ removeInput(index) {
108
+ const updatedValue = this.value.filter((_, i) => i !== index);
109
+ this._value.next(updatedValue);
110
+ this.valueChanged.emit(updatedValue);
111
+ }
112
+ cancelEdit() {
113
+ this.editingIndex = null;
114
+ this.isAddingNew = false;
115
+ }
116
+ saveSegment() {
117
+ // if (this.segmentForm.valid) {
118
+ // const newSegment = ({
119
+ // segment:this.segmentForm.value.segment,
120
+ // label:this.toTitleCase(this.segmentForm.value.segment),
121
+ // }) as IIncludedSegmentConfig;
122
+ // const updatedValue = [...this.value];
123
+ // if (this.isAddingNew) {
124
+ // updatedValue.push(newSegment);
125
+ // } else if (this.editingIndex !== null) {
126
+ // updatedValue[this.editingIndex] = newSegment;
127
+ // }
128
+ // this._value.next(updatedValue);
129
+ // this.valueChanged.emit(updatedValue);
130
+ // this.cancelEdit();
131
+ // }
132
+ }
133
+ removeSegment(index) {
134
+ const updatedValue = this.value.filter((_, i) => i !== index);
135
+ this._value.next(updatedValue);
136
+ this.valueChanged.emit(updatedValue);
137
+ }
138
+ async openElementEditor() {
139
+ this.openFormDialog();
140
+ }
141
+ inputSegmentChanged($event, i) {
142
+ if ($event.detail.value === 'None' && this.value[i] !== undefined) {
143
+ this.value[i].segment = undefined;
144
+ }
145
+ else if (this.value[i] !== undefined) {
146
+ this.value[i].segment = $event.detail.value;
147
+ }
148
+ this.valueChanged.emit(this.value);
149
+ }
150
+ openFormDialog() {
151
+ // const dialogRef = this.dialog.open(FormElementModalEditorComponent,{
152
+ // maxHeight:'95vh',
153
+ // panelClass:'form-element-modal-editor',
154
+ // data:{
155
+ // inputInEdit:this.inputInEdit
156
+ // }
157
+ // });
158
+ // dialogRef.afterClosed().pipe(take(1)).subscribe(result => {
159
+ // const {input,action} = result
160
+ // if(action === 'add'){
161
+ // this.value.push(input)
162
+ // this.valueChanged.emit(this.value)
163
+ // }
164
+ // if(action === 'edit'&& this.editingIndex !== null){
165
+ // this.value[this.editingIndex] = input
166
+ // this.valueChanged.emit(this.value)
167
+ // }
168
+ // this.cancelEdit()
169
+ // });
170
+ }
171
+ get limitInputTo() {
172
+ return [...this.accountTreeKeys.map((key) => ({
173
+ value: key,
174
+ label: key,
175
+ })), {
176
+ value: undefined,
177
+ label: 'None'
178
+ }];
179
+ }
180
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ConfigMscoaAdditionalInputsComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
181
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: ConfigMscoaAdditionalInputsComponent, isStandalone: true, selector: "app-config-mscoa-additional-inputs", inputs: { errors: "errors", getMscoaTree: "getMscoaTree", mapToData: "mapToData", value: "value" }, outputs: { valueChanged: "valueChanged" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: ConfigMscoaAdditionalInputsComponent }], ngImport: i0, template: "\n\n<mat-list *ngIf=\"(value?.length||0) > 0; else noInputs\">\n <mat-toolbar>\n Additional inputs configuration\n </mat-toolbar>\n <mat-form-field \n (mouseover)=\"hovered = i\"\n\n (mouseleave)=\"hovered = null\"\n *ngFor=\"let input of value; let i = index\" style=\" margin-bottom: 8px;\" appearance=\"outline\" >\n <mat-label>\n {{ input.label }}\n </mat-label>\n <mat-select matNativeControl \n \n [value]=\"input.segment\"\n\n placeholder=\"select segment\" (selectionChange)=\"inputSegmentChanged($event,i)\"\n >\n *ngFor=\"let of \"\n @for (segment of limitInputTo; track segment.value) {\n <mat-option [value]=\"segment.value\" >{{segment.label}}</mat-option>\n }\n\n\n </mat-select>\n <mat-hint>\n Link formula to an input value\n </mat-hint>\n </mat-form-field>\n\n</mat-list>\n\n<ng-template #noInputs>\n <div *ngIf=\"mapToData?.id\" class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span><strong>\n No input configuration available. \n </strong> <br>\n Start by adding inputs below.</span>\n </div>\n\n</ng-template>\n\n\n\n\n<section *ngIf=\"!isAddingNew && editingIndex === null && mapToData?.id\">\n <button (click)=\"startAddNew()\" mat-raised-button>\n Add New Input\n </button>\n</section>\n\n<ng-template #InputEditor>\n <h1>\n Not implemented yet\n </h1>\n <!-- <app-form-element-modal-editor></app-form-element-modal-editor> -->\n</ng-template>\n", styles: [".tree-instructions{display:flex;align-items:center;gap:8px;padding:12px;background:azure;border-radius:4px;margin-bottom:16px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: i5.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.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.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: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }] }); }
182
+ }
183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ConfigMscoaAdditionalInputsComponent, decorators: [{
184
+ type: Component,
185
+ args: [{ selector: 'app-config-mscoa-additional-inputs', standalone: true, imports: [
186
+ CommonModule,
187
+ MatModulesModule,
188
+ ], providers: [{ provide: MatFormFieldControl, useExisting: ConfigMscoaAdditionalInputsComponent }], template: "\n\n<mat-list *ngIf=\"(value?.length||0) > 0; else noInputs\">\n <mat-toolbar>\n Additional inputs configuration\n </mat-toolbar>\n <mat-form-field \n (mouseover)=\"hovered = i\"\n\n (mouseleave)=\"hovered = null\"\n *ngFor=\"let input of value; let i = index\" style=\" margin-bottom: 8px;\" appearance=\"outline\" >\n <mat-label>\n {{ input.label }}\n </mat-label>\n <mat-select matNativeControl \n \n [value]=\"input.segment\"\n\n placeholder=\"select segment\" (selectionChange)=\"inputSegmentChanged($event,i)\"\n >\n *ngFor=\"let of \"\n @for (segment of limitInputTo; track segment.value) {\n <mat-option [value]=\"segment.value\" >{{segment.label}}</mat-option>\n }\n\n\n </mat-select>\n <mat-hint>\n Link formula to an input value\n </mat-hint>\n </mat-form-field>\n\n</mat-list>\n\n<ng-template #noInputs>\n <div *ngIf=\"mapToData?.id\" class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span><strong>\n No input configuration available. \n </strong> <br>\n Start by adding inputs below.</span>\n </div>\n\n</ng-template>\n\n\n\n\n<section *ngIf=\"!isAddingNew && editingIndex === null && mapToData?.id\">\n <button (click)=\"startAddNew()\" mat-raised-button>\n Add New Input\n </button>\n</section>\n\n<ng-template #InputEditor>\n <h1>\n Not implemented yet\n </h1>\n <!-- <app-form-element-modal-editor></app-form-element-modal-editor> -->\n</ng-template>\n", styles: [".tree-instructions{display:flex;align-items:center;gap:8px;padding:12px;background:azure;border-radius:4px;margin-bottom:16px}\n"] }]
189
+ }], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
190
+ type: Optional
191
+ }, {
192
+ type: Self
193
+ }] }, { type: i0.ElementRef }], propDecorators: { id: [{
194
+ type: HostBinding
195
+ }], errors: [{
196
+ type: Input
197
+ }], getMscoaTree: [{
198
+ type: Input
199
+ }], mapToData: [{
200
+ type: Input
201
+ }], value: [{
202
+ type: Input
203
+ }], valueChanged: [{
204
+ type: Output
205
+ }] } });
206
+
207
+ export { ConfigMscoaAdditionalInputsComponent };
208
+ //# sourceMappingURL=ngx-t-forms-config-mscoa-additional-inputs.component-C8jU6DUH.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-t-forms-config-mscoa-additional-inputs.component-C8jU6DUH.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/config-mscoa-additional-inputs/config-mscoa-additional-inputs.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/config-mscoa-additional-inputs/config-mscoa-additional-inputs.component.html"],"sourcesContent":["import { Component, ElementRef, EventEmitter, HostBinding, inject, Input, OnInit, Optional, Output, Self } from '@angular/core';\r\nimport { BehaviorSubject, catchError, Observable, Subject, take, tap } from 'rxjs';\r\n\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { FormColumnInputs } from 'ngx-t-forms-types';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { IGetTreeResponse } from 'ngx-t-forms-types';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { NgControl } from '@angular/forms';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\n\r\n\r\n\r\n\r\ninterface ConfiguredMscoaInput extends FormColumnInputs {\r\n segment:string\r\n}\r\n@Component({\r\n selector: 'app-config-mscoa-additional-inputs',\r\n standalone: true,\r\n imports:[\r\n CommonModule,\r\n MatModulesModule,\r\n ],\r\n templateUrl: './config-mscoa-additional-inputs.component.html',\r\n styleUrls: ['./config-mscoa-additional-inputs.component.scss'],\r\n providers: [{ provide: MatFormFieldControl, useExisting: ConfigMscoaAdditionalInputsComponent}],\r\n})\r\nexport class ConfigMscoaAdditionalInputsComponent implements OnInit, MatFormFieldControl<ConfiguredMscoaInput[]> {\r\n\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n \r\n @HostBinding() id = `app-config-mscoa-additional-inputs-${ConfigMscoaAdditionalInputsComponent .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\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-config-mscoa-additional-inputs');\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 \r\n \r\n \r\n mscoaInitiated = false\r\n @Input() errors:IConfigElementError[] |undefined = [];\r\n @Input() set getMscoaTree(options$:Observable<IGetTreeResponse> | undefined){\r\n if(!!options$ &&!this.mscoaInitiated){\r\n this.mscoaInitiated = true\r\n options$.pipe(\r\n take(1),\r\n tap((options) => {\r\n this.accountTreeKeys = options.accountTreeKeys || []\r\n }),\r\n catchError((error) => {\r\n console.error('Error while fetching SCOA tree:', error);\r\n return [null];\r\n })\r\n ).subscribe();\r\n\r\n }\r\n }\r\n @Input() mapToData:FormColumnInputs | undefined = undefined;\r\n @Input() set value(val: ConfiguredMscoaInput[]) {\r\n this._value.next(val || []);\r\n }\r\n get value(): ConfiguredMscoaInput[] {\r\n return this._value.value;\r\n }\r\n _inputInEdit = new BehaviorSubject<ConfiguredMscoaInput|null>(null)\r\n inputInEdit:ConfiguredMscoaInput|undefined = undefined\r\n\r\n @Output() valueChanged = new EventEmitter<ConfiguredMscoaInput[]>();\r\n private _value = new BehaviorSubject<ConfiguredMscoaInput[]>([]);\r\n\r\n editingIndex: number | null = null;\r\n isAddingNew = false;\r\n accountTreeKeys: string[] = [];\r\n \r\n ngOnInit() {\r\n\r\n }\r\n hovered :null|number = null\r\n\r\n\r\n startAddNew() {\r\n this.isAddingNew = true;\r\n this.editingIndex = null;\r\n this.inputInEdit = undefined\r\n this.openElementEditor();\r\n }\r\n\r\n startEdit(index: number) {\r\n this.editingIndex = index;\r\n this.isAddingNew = false;\r\n this.inputInEdit = this.value[index]\r\n this.openElementEditor();\r\n }\r\n removeInput(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 cancelEdit() {\r\n this.editingIndex = null;\r\n this.isAddingNew = false;\r\n }\r\n\r\n saveSegment() {\r\n // if (this.segmentForm.valid) {\r\n // const newSegment = ({\r\n // segment:this.segmentForm.value.segment,\r\n // label:this.toTitleCase(this.segmentForm.value.segment),\r\n // }) as IIncludedSegmentConfig;\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 hoveredIndex:number|null = null\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 parentId:string|undefined \r\n async openElementEditor() {\r\n\r\n this.openFormDialog()\r\n }\r\n inputSegmentChanged($event:any,i:number){\r\n if($event.detail.value === 'None'&&this.value[i] !== undefined){\r\n this.value[i]!.segment = undefined as any\r\n }else if(this.value[i] !== undefined){\r\n this.value[i]!.segment = $event.detail.value\r\n }\r\n this.valueChanged.emit(this.value)\r\n }\r\nreadonly dialog = inject(MatDialog);\r\nopenFormDialog() {\r\n // const dialogRef = this.dialog.open(FormElementModalEditorComponent,{\r\n // maxHeight:'95vh',\r\n // panelClass:'form-element-modal-editor',\r\n // data:{\r\n // inputInEdit:this.inputInEdit\r\n // }\r\n // });\r\n\r\n // dialogRef.afterClosed().pipe(take(1)).subscribe(result => {\r\n // const {input,action} = result\r\n // if(action === 'add'){\r\n // this.value.push(input)\r\n // this.valueChanged.emit(this.value)\r\n // }\r\n // if(action === 'edit'&& this.editingIndex !== null){\r\n // this.value[this.editingIndex] = input\r\n // this.valueChanged.emit(this.value)\r\n // }\r\n // this.cancelEdit()\r\n // });\r\n}\r\nget limitInputTo(){\r\n return [...this.accountTreeKeys.map((key) => ({\r\n value: key,\r\n label: key,\r\n })),{\r\n value:undefined,\r\n label:'None'\r\n }]\r\n}\r\n\r\n}\r\n","\n\n<mat-list *ngIf=\"(value?.length||0) > 0; else noInputs\">\n <mat-toolbar>\n Additional inputs configuration\n </mat-toolbar>\n <mat-form-field \n (mouseover)=\"hovered = i\"\n\n (mouseleave)=\"hovered = null\"\n *ngFor=\"let input of value; let i = index\" style=\" margin-bottom: 8px;\" appearance=\"outline\" >\n <mat-label>\n {{ input.label }}\n </mat-label>\n <mat-select matNativeControl \n \n [value]=\"input.segment\"\n\n placeholder=\"select segment\" (selectionChange)=\"inputSegmentChanged($event,i)\"\n >\n *ngFor=\"let of \"\n @for (segment of limitInputTo; track segment.value) {\n <mat-option [value]=\"segment.value\" >{{segment.label}}</mat-option>\n }\n\n\n </mat-select>\n <mat-hint>\n Link formula to an input value\n </mat-hint>\n </mat-form-field>\n\n</mat-list>\n\n<ng-template #noInputs>\n <div *ngIf=\"mapToData?.id\" class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span><strong>\n No input configuration available. \n </strong> <br>\n Start by adding inputs below.</span>\n </div>\n\n</ng-template>\n\n\n\n\n<section *ngIf=\"!isAddingNew && editingIndex === null && mapToData?.id\">\n <button (click)=\"startAddNew()\" mat-raised-button>\n Add New Input\n </button>\n</section>\n\n<ng-template #InputEditor>\n <h1>\n Not implemented yet\n </h1>\n <!-- <app-form-element-modal-editor></app-form-element-modal-editor> -->\n</ng-template>\n"],"names":["i3","i4","i7","i8"],"mappings":";;;;;;;;;;;;;;;;;MA6Ba,oCAAoC,CAAA;aAEvC,IAAM,CAAA,MAAA,GAAG,CAAH,CAAK;IAMlB,WAAuC,CAAA,SAAoB,EAAU,WAAoC,EAAA;QAAlE,IAAS,CAAA,SAAA,GAAT,SAAS;QAAqB,IAAW,CAAA,WAAA,GAAX,WAAW;AALhF,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;AAEnB,QAAA,IAAA,CAAA,EAAE,GAAG,CAAsC,mCAAA,EAAA,oCAAoC,CAAE,MAAM,EAAE,EAAE;QAE1G,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;QAmBrB,IAAc,CAAA,cAAA,GAAG,KAAK;QACT,IAAM,CAAA,MAAA,GAAoC,EAAE;QAiBhD,IAAS,CAAA,SAAA,GAAgC,SAAS;AAO3D,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,eAAe,CAA4B,IAAI,CAAC;QACnE,IAAW,CAAA,WAAA,GAAkC,SAAS;AAE5C,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAA0B;AAC3D,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,eAAe,CAAyB,EAAE,CAAC;QAEhE,IAAY,CAAA,YAAA,GAAkB,IAAI;QAClC,IAAW,CAAA,WAAA,GAAG,KAAK;QACnB,IAAe,CAAA,eAAA,GAAa,EAAE;QAK9B,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,EAAA,QAAA,EAAA,iBAAA,EAAA,aAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAMP,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBAXhD,SAAS;+BACE,oCAAoC,EAAA,UAAA,EAClC,IAAI,EACR,OAAA,EAAA;wBACN,YAAY;wBACZ,gBAAgB;qBACjB,EAGU,SAAA,EAAA,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAsC,oCAAA,EAAC,CAAC,EAAA,QAAA,EAAA,4/CAAA,EAAA,MAAA,EAAA,CAAA,kIAAA,CAAA,EAAA;;0BAUjF;;0BAAY;kEAHV,EAAE,EAAA,CAAA;sBAAhB;gBA0DW,MAAM,EAAA,CAAA;sBAAd;gBACQ,YAAY,EAAA,CAAA;sBAAxB;gBAgBQ,SAAS,EAAA,CAAA;sBAAjB;gBACY,KAAK,EAAA,CAAA;sBAAjB;gBASS,YAAY,EAAA,CAAA;sBAArB;;;;;"}
@@ -0,0 +1,29 @@
1
+ function convertPostmanFolderItemsToTree(obj, parentPath = []) {
2
+ if (!obj) {
3
+ return [];
4
+ }
5
+ return obj.map((item) => {
6
+ const { name } = item;
7
+ const currentPath = [...parentPath, name];
8
+ const node = { key: name, name, value: item, path: currentPath, functions: [] };
9
+ if (item.item) {
10
+ node.children = convertPostmanFolderItemsToTree(item.item, currentPath);
11
+ }
12
+ return node;
13
+ });
14
+ }
15
+ function flatApiList(obj) {
16
+ if (!obj) {
17
+ return [];
18
+ }
19
+ return obj.reduce((acc, item) => {
20
+ acc.push(item);
21
+ if (item.item) {
22
+ acc.push(...flatApiList(item.item));
23
+ }
24
+ return acc;
25
+ }, []);
26
+ }
27
+
28
+ export { convertPostmanFolderItemsToTree as c, flatApiList as f };
29
+ //# sourceMappingURL=ngx-t-forms-convertPostmanCollectionToTree-DktdVBeQ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-t-forms-convertPostmanCollectionToTree-DktdVBeQ.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/postman-collections/functions/convertPostmanCollectionToTree.ts"],"sourcesContent":["import { IFolderItem } from 'ngx-t-forms-types';\r\nimport { TreeNode } from 'ngx-t-forms-types';\r\n\r\nexport function convertPostmanFolderItemsToTree(obj: IFolderItem[] | undefined, parentPath: string[] = [],): TreeNode[] {\r\n\r\n if (!obj) {\r\n return []\r\n }\r\n return obj.map((item) => {\r\n const { name } = item\r\n const currentPath = [...parentPath, name];\r\n const node: TreeNode = { key: name,name, value: item, path: currentPath, functions: [] as any };\r\n \r\n if (item.item) {\r\n node.children = convertPostmanFolderItemsToTree(item.item, currentPath)\r\n }\r\n return node;\r\n });\r\n }\r\n\r\n export function flatApiList(obj: IFolderItem[] | undefined):IFolderItem[] {\r\n if (!obj) {\r\n return []\r\n }\r\n return obj.reduce((acc, item) => {\r\n acc.push(item)\r\n if (item.item) {\r\n acc.push(...flatApiList(item.item))\r\n }\r\n return acc\r\n }, [] as IFolderItem[])\r\n\r\n }"],"names":[],"mappings":"SAGgB,+BAA+B,CAAC,GAA8B,EAAE,aAAuB,EAAE,EAAA;IAErG,IAAI,CAAC,GAAG,EAAE;AACR,QAAA,OAAO,EAAE;;AAEX,IAAA,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,KAAI;AACtB,QAAA,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI;QACrB,MAAM,WAAW,GAAG,CAAC,GAAG,UAAU,EAAE,IAAI,CAAC;QACzC,MAAM,IAAI,GAAa,EAAE,GAAG,EAAE,IAAI,EAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,EAAS,EAAE;AAE/F,QAAA,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,IAAI,CAAC,QAAQ,GAAG,+BAA+B,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC;;AAEzE,QAAA,OAAO,IAAI;AACb,KAAC,CAAC;AACJ;AAEM,SAAU,WAAW,CAAC,GAA8B,EAAA;IACxD,IAAI,CAAC,GAAG,EAAE;AACR,QAAA,OAAO,EAAE;;IAEX,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,KAAI;AAC9B,QAAA,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;AACd,QAAA,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,GAAG,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;AAErC,QAAA,OAAO,GAAG;KACX,EAAE,EAAmB,CAAC;AAEzB;;;;"}
@@ -0,0 +1,132 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, Output, Input, HostBinding, Optional, Self, Component } from '@angular/core';
3
+ import { Subject, BehaviorSubject, take, tap } from 'rxjs';
4
+ import * as i2 from '@angular/common';
5
+ import { CommonModule } from '@angular/common';
6
+ import { M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-B-w5W1gG.mjs';
7
+ import { map } from 'rxjs/operators';
8
+ import { g as getInputIllustration } from './ngx-t-forms-getInputIllustration-GCSKx5e5.mjs';
9
+ import { MatFormFieldControl } from '@angular/material/form-field';
10
+ import * as i1 from '@angular/forms';
11
+ import * as i5 from '@angular/material/divider';
12
+ import * as i2$1 from '@angular/material/core';
13
+ import * as i5$1 from '@angular/material/icon';
14
+ import * as i6 from '@angular/material/list';
15
+ import * as i8 from '@angular/material/tooltip';
16
+
17
+ class FormInputSelectorComponent {
18
+ static { this.nextId = 0; }
19
+ constructor(ngControl, _elementRef) {
20
+ this.ngControl = ngControl;
21
+ this._elementRef = _elementRef;
22
+ this.stateChanges = new Subject();
23
+ this.errors = [];
24
+ this.id = `lib-form-input-selector-${FormInputSelectorComponent.nextId++}`;
25
+ this.placeholder = '';
26
+ this.focused = false;
27
+ this.required = false;
28
+ this.touched = false;
29
+ this.onTouched = () => { };
30
+ this._value = new BehaviorSubject(undefined);
31
+ this.formInputs = [];
32
+ this.disabled = false;
33
+ this.change = new EventEmitter();
34
+ }
35
+ get empty() {
36
+ return !this.value;
37
+ }
38
+ get shouldLabelFloat() {
39
+ return this.focused || !this.empty;
40
+ }
41
+ get errorState() {
42
+ const hasError = !!this.ngControl?.control?.errors || (this.errors || []).length > 0 && this.touched;
43
+ return !this.value && !!this.required || hasError;
44
+ }
45
+ setDescribedByIds(ids) {
46
+ // Ensure the component view is initialized
47
+ if (this._elementRef && this._elementRef.nativeElement) {
48
+ const controlElement = this._elementRef.nativeElement.querySelector('.lib-form-input-selector');
49
+ // Check if the controlElement exists before attempting to set its attribute
50
+ if (controlElement) {
51
+ controlElement.setAttribute('aria-describedby', ids.join(' '));
52
+ }
53
+ }
54
+ }
55
+ onContainerClick(event) {
56
+ this.markAsTouched();
57
+ this.stateChanges.next();
58
+ }
59
+ markAsTouched() {
60
+ console.log('markAsTouched');
61
+ if (!this.touched) {
62
+ this.onTouched();
63
+ this.touched = true;
64
+ }
65
+ }
66
+ set value(value) {
67
+ if (this._value.getValue() === value) {
68
+ return;
69
+ }
70
+ this._value.next(value);
71
+ }
72
+ get value() {
73
+ return this._value.getValue();
74
+ }
75
+ get value$() {
76
+ return this._value.asObservable();
77
+ }
78
+ selectInput(id) {
79
+ this.value$.pipe(take(1), tap((value) => {
80
+ if (value === id) {
81
+ this.change.emit(undefined);
82
+ return;
83
+ }
84
+ this.change.emit(id);
85
+ })).subscribe();
86
+ }
87
+ get filteredInputs$() {
88
+ return this.value$.pipe(map((value) => {
89
+ const inputs = () => {
90
+ const selectedInput = this.formInputs.find((input) => input.id === value);
91
+ if (selectedInput) {
92
+ return [{ ...selectedInput, selected: true, illustration: this.getInputIllustration(selectedInput) }];
93
+ }
94
+ return this.formInputs.map(input => ({ ...input, selected: false, illustration: this.getInputIllustration(input) }));
95
+ };
96
+ return inputs().map((input) => {
97
+ return {
98
+ ...input,
99
+ illustration: this.getInputIllustration(input)
100
+ };
101
+ });
102
+ }));
103
+ }
104
+ getInputIllustration(input) {
105
+ return getInputIllustration(input.element);
106
+ }
107
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FormInputSelectorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
108
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: FormInputSelectorComponent, isStandalone: true, selector: "lib-form-input-selector", inputs: { errors: "errors", value: "value", formInputs: "formInputs", disabled: "disabled" }, outputs: { change: "change" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: FormInputSelectorComponent }], ngImport: i0, template: "\r\n\r\n <mat-nav-list class=\"inputList\"> \r\n @for(input of filteredInputs$|async;track input.id){\r\n <mat-list-item \r\n [disabled]=\"disabled\"\r\n (click)=\"selectInput(input.id)\" \r\n [activated]=\"input.selected\"\r\n matRipple matTooltip=\"Select form input\">\r\n <img matListItemAvatar \r\n style=\"margin-left: 8px;\" [src]=\"input.illustration \"\r\n [alt]=\"input.label\">\r\n \r\n <span matListItemTitle >\r\n {{ input.label}}\r\n </span>\r\n <span *ngIf=\"input.multipleInputInEditId\" matListItemLine>\r\n Item List Input\r\n </span>\r\n <span matListItemMeta>\r\n <mat-icon [color]=\"input.selected?'primary':''\">\r\n \r\n {{input.selected?'check_circle':'radio_button_unchecked'}}\r\n \r\n </mat-icon>\r\n </span>\r\n \r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n @if((filteredInputs$|async)?.length===0){\r\n <mat-list-item>\r\n <span matLine>\r\n No form inputs found\r\n </span>\r\n </mat-list-item>\r\n }\r\n </mat-nav-list>\r\n\r\n", styles: ["mat-nav-list{max-height:600px;overflow:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i2$1.MatLine, selector: "[mat-line], [matLine]" }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i6.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i6.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "directive", type: i6.MatListItemLine, selector: "[matListItemLine]" }, { kind: "directive", type: i6.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i6.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "directive", type: i2$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
109
+ }
110
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FormInputSelectorComponent, decorators: [{
111
+ type: Component,
112
+ args: [{ selector: 'lib-form-input-selector', standalone: true, imports: [CommonModule, MatModulesModule], providers: [{ provide: MatFormFieldControl, useExisting: FormInputSelectorComponent }], template: "\r\n\r\n <mat-nav-list class=\"inputList\"> \r\n @for(input of filteredInputs$|async;track input.id){\r\n <mat-list-item \r\n [disabled]=\"disabled\"\r\n (click)=\"selectInput(input.id)\" \r\n [activated]=\"input.selected\"\r\n matRipple matTooltip=\"Select form input\">\r\n <img matListItemAvatar \r\n style=\"margin-left: 8px;\" [src]=\"input.illustration \"\r\n [alt]=\"input.label\">\r\n \r\n <span matListItemTitle >\r\n {{ input.label}}\r\n </span>\r\n <span *ngIf=\"input.multipleInputInEditId\" matListItemLine>\r\n Item List Input\r\n </span>\r\n <span matListItemMeta>\r\n <mat-icon [color]=\"input.selected?'primary':''\">\r\n \r\n {{input.selected?'check_circle':'radio_button_unchecked'}}\r\n \r\n </mat-icon>\r\n </span>\r\n \r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n @if((filteredInputs$|async)?.length===0){\r\n <mat-list-item>\r\n <span matLine>\r\n No form inputs found\r\n </span>\r\n </mat-list-item>\r\n }\r\n </mat-nav-list>\r\n\r\n", styles: ["mat-nav-list{max-height:600px;overflow:auto}\n"] }]
113
+ }], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
114
+ type: Optional
115
+ }, {
116
+ type: Self
117
+ }] }, { type: i0.ElementRef }], propDecorators: { errors: [{
118
+ type: Input
119
+ }], id: [{
120
+ type: HostBinding
121
+ }], value: [{
122
+ type: Input
123
+ }], formInputs: [{
124
+ type: Input
125
+ }], disabled: [{
126
+ type: Input
127
+ }], change: [{
128
+ type: Output
129
+ }] } });
130
+
131
+ export { FormInputSelectorComponent };
132
+ //# sourceMappingURL=ngx-t-forms-form-input-selector.component-6eGpxdN5.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-t-forms-form-input-selector.component-6eGpxdN5.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/form-input-selector/form-input-selector.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/form-input-selector/form-input-selector.component.html"],"sourcesContent":["import { Component, ElementRef, EventEmitter, HostBinding, Input, Optional, Output, Self } from '@angular/core';\r\nimport { FormColumnInputs } from 'ngx-t-forms-types';\r\nimport { BehaviorSubject, Observable, Subject, take, tap } from 'rxjs';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { map } from 'rxjs/operators';\r\nimport { getInputIllustration } from '../../../../shared/functions/getInputIllustration';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { NgControl } from '@angular/forms';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\n\r\ninterface IFormColumnUiList extends FormColumnInputs {\r\n selected: boolean,\r\n illustration: string\r\n}\r\n@Component({\r\n selector: 'lib-form-input-selector',\r\n standalone: true,\r\n imports: [CommonModule, MatModulesModule],\r\n templateUrl: './form-input-selector.component.html',\r\n styleUrl: './form-input-selector.component.css',\r\n providers: [{ provide: MatFormFieldControl, useExisting: FormInputSelectorComponent }],\r\n})\r\nexport class FormInputSelectorComponent implements MatFormFieldControl<string | undefined> {\r\n\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n @Input() errors:IConfigElementError[] |undefined = [];\r\n @HostBinding() id = `lib-form-input-selector-${FormInputSelectorComponent .nextId++}`;\r\n \r\n placeholder: string = ''\r\n constructor(@Optional() @Self() public ngControl: NgControl, private _elementRef: ElementRef<HTMLElement>,) { }\r\n focused: boolean = false;\r\n get empty() {\r\n return !this.value\r\n }\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n required: boolean = false;\r\nget errorState(): boolean {\r\n const hasError = !!this.ngControl?.control?.errors || (this.errors||[]).length > 0 && this.touched\r\n return !this.value && !!this.required || hasError\r\n }\r\n\r\n controlType?: string | undefined;\r\n autofilled?: boolean | undefined;\r\n userAriaDescribedBy?: string | undefined;\r\n disableAutomaticLabeling?: boolean | undefined;\r\n setDescribedByIds(ids: string[]) {\r\n // Ensure the component view is initialized\r\n if (this._elementRef && this._elementRef.nativeElement) {\r\n const controlElement = this._elementRef.nativeElement.querySelector('.lib-form-input-selector');\r\n // Check if the controlElement exists before attempting to set its attribute\r\n if (controlElement) {\r\n controlElement.setAttribute('aria-describedby', ids.join(' '));\r\n }\r\n }\r\n }\r\n onContainerClick(event: MouseEvent): void {\r\n this.markAsTouched();\r\n this.stateChanges.next();\r\n }\r\n\r\n touched: boolean = false;\r\n onTouched = () => {};\r\n markAsTouched() {\r\n console.log('markAsTouched') \r\n if (!this.touched) {\r\n this.onTouched();\r\n this.touched = true;\r\n }\r\n } \r\n\r\n\r\n\r\n\r\n _value = new BehaviorSubject<string | undefined>(undefined)\r\n @Input() set value(value: string | undefined) {\r\n if (this._value.getValue() === value) {\r\n return\r\n }\r\n this._value.next(value)\r\n }\r\n get value() {\r\n return this._value.getValue()\r\n }\r\n get value$() {\r\n return this._value.asObservable()\r\n\r\n }\r\n @Input() formInputs: Array<FormColumnInputs> = []\r\n @Input() disabled: boolean = false\r\n @Output() change = new EventEmitter<any>()\r\n selectInput(id: string) {\r\n this.value$.pipe(\r\n take(1),\r\n tap((value) => {\r\n if (value === id) {\r\n this.change.emit(undefined)\r\n return;\r\n }\r\n this.change.emit(id)\r\n })\r\n ).subscribe()\r\n\r\n }\r\n get filteredInputs$():Observable<Array<IFormColumnUiList>> {\r\n return this.value$.pipe(\r\n map((value: string | undefined) => {\r\n const inputs = () => {\r\n const selectedInput = this.formInputs.find((input) => input.id === value)\r\n if (selectedInput) {\r\n return [{ ...selectedInput, selected: true , illustration: this.getInputIllustration(selectedInput) }]\r\n }\r\n return this.formInputs.map(input => ({ ...input, selected: false, illustration: this.getInputIllustration(input) }))\r\n }\r\n return inputs().map(\r\n (input) => {\r\n return {\r\n ...input,\r\n illustration: this.getInputIllustration(input)\r\n }\r\n\r\n })}\r\n\r\n )\r\n )\r\n }\r\n getInputIllustration(input: FormColumnInputs) {\r\n return getInputIllustration(input.element)\r\n }\r\n}\r\n","\r\n\r\n <mat-nav-list class=\"inputList\"> \r\n @for(input of filteredInputs$|async;track input.id){\r\n <mat-list-item \r\n [disabled]=\"disabled\"\r\n (click)=\"selectInput(input.id)\" \r\n [activated]=\"input.selected\"\r\n matRipple matTooltip=\"Select form input\">\r\n <img matListItemAvatar \r\n style=\"margin-left: 8px;\" [src]=\"input.illustration \"\r\n [alt]=\"input.label\">\r\n \r\n <span matListItemTitle >\r\n {{ input.label}}\r\n </span>\r\n <span *ngIf=\"input.multipleInputInEditId\" matListItemLine>\r\n Item List Input\r\n </span>\r\n <span matListItemMeta>\r\n <mat-icon [color]=\"input.selected?'primary':''\">\r\n \r\n {{input.selected?'check_circle':'radio_button_unchecked'}}\r\n \r\n </mat-icon>\r\n </span>\r\n \r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n @if((filteredInputs$|async)?.length===0){\r\n <mat-list-item>\r\n <span matLine>\r\n No form inputs found\r\n </span>\r\n </mat-list-item>\r\n }\r\n </mat-nav-list>\r\n\r\n"],"names":["i3","i4","i5","i7"],"mappings":";;;;;;;;;;;;;;;;MAuBa,0BAA0B,CAAA;aAE9B,IAAM,CAAA,MAAA,GAAG,CAAH,CAAK;IAMlB,WAAuC,CAAA,SAAoB,EAAU,WAAoC,EAAA;QAAlE,IAAS,CAAA,SAAA,GAAT,SAAS;QAAqB,IAAW,CAAA,WAAA,GAAX,WAAW;AALhF,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;QACvB,IAAM,CAAA,MAAA,GAAoC,EAAE;AACxC,QAAA,IAAA,CAAA,EAAE,GAAG,CAA2B,wBAAA,EAAA,0BAA0B,CAAE,MAAM,EAAE,EAAE;QAErF,IAAW,CAAA,WAAA,GAAW,EAAE;QAExB,IAAO,CAAA,OAAA,GAAY,KAAK;QAOxB,IAAQ,CAAA,QAAA,GAAY,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A,EAAA,MAAA,EAAA,CAAA,gBAAA,EAAA,oBAAA,EAAA,mBAAA,EAAA,iBAAA,EAAA,oBAAA,EAAA,mBAAA,EAAA,kBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAE,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,EAAA,4BAAA,EAAA,oBAAA,EAAA,qBAAA,EAAA,qBAAA,EAAA,yBAAA,EAAA,YAAA,EAAA,iBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAK7B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBARtC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,cACvB,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,gBAAgB,CAAC,EAAA,SAAA,EAG7B,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,0BAA4B,EAAE,CAAC,EAAA,QAAA,EAAA,m7CAAA,EAAA,MAAA,EAAA,CAAA,gDAAA,CAAA,EAAA;;0BAU1E;;0BAAY;kEAJd,MAAM,EAAA,CAAA;sBAAd;gBACY,EAAE,EAAA,CAAA;sBAAhB;gBAkDY,KAAK,EAAA,CAAA;sBAAjB;gBAaQ,UAAU,EAAA,CAAA;sBAAlB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACS,MAAM,EAAA,CAAA;sBAAf;;;;;"}
@@ -0,0 +1,22 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component } from '@angular/core';
3
+ import * as i2 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import { F as FormsStoreService, M as MatModulesModule, b as TDynamicDataViewComponent } from './ngx-t-forms-ngx-t-forms-B-w5W1gG.mjs';
6
+ import { map } from 'rxjs';
7
+
8
+ class FormJsonViewComponent {
9
+ constructor(store) {
10
+ this.store = store;
11
+ this.form$ = this.store.selectors.selectFormInEdit$.pipe(map(form => form?.form));
12
+ }
13
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FormJsonViewComponent, deps: [{ token: FormsStoreService }], target: i0.ɵɵFactoryTarget.Component }); }
14
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: FormJsonViewComponent, isStandalone: true, selector: "app-form-json-view", ngImport: i0, template: "\r\n<lib-t-dynamic-data-view [data]=\"form$|async\"></lib-t-dynamic-data-view>", styles: ["pre{margin:0;border:1px solid #ccc;background-color:#353535;padding:10px}code{color:#b0e0e6;font-size:14px}.token.punctuation{color:#999}.token.property{color:#905}.token.string{color:#690}.token.number,.token.boolean{color:#905}.token.keyword{color:#07a}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: TDynamicDataViewComponent, selector: "lib-t-dynamic-data-view", inputs: ["data"] }] }); }
15
+ }
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FormJsonViewComponent, decorators: [{
17
+ type: Component,
18
+ args: [{ selector: 'app-form-json-view', standalone: true, imports: [CommonModule, MatModulesModule, TDynamicDataViewComponent], template: "\r\n<lib-t-dynamic-data-view [data]=\"form$|async\"></lib-t-dynamic-data-view>", styles: ["pre{margin:0;border:1px solid #ccc;background-color:#353535;padding:10px}code{color:#b0e0e6;font-size:14px}.token.punctuation{color:#999}.token.property{color:#905}.token.string{color:#690}.token.number,.token.boolean{color:#905}.token.keyword{color:#07a}\n"] }]
19
+ }], ctorParameters: () => [{ type: FormsStoreService }] });
20
+
21
+ export { FormJsonViewComponent };
22
+ //# sourceMappingURL=ngx-t-forms-form-json-view.component-DwEXL85v.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-t-forms-form-json-view.component-DwEXL85v.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/form-json-view/form-json-view.component.ts","../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/form-json-view/form-json-view.component.html"],"sourcesContent":["import { Component } from '@angular/core';\r\n\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\n\r\nimport { FormsStoreService } from '../../../forms/store/forms-store.service';\r\nimport { TDynamicDataViewComponent } from '../../../t-dynamic-data-view/t-dynamic-data-view.component';\r\n\r\nimport { map } from 'rxjs';\r\n\r\n\r\n\r\n@Component({\r\n selector: 'app-form-json-view',\r\n standalone: true,\r\n imports: [CommonModule, MatModulesModule, TDynamicDataViewComponent],\r\n templateUrl: './form-json-view.component.html',\r\n styleUrl: './form-json-view.component.scss',\r\n})\r\nexport class FormJsonViewComponent {\r\n\r\n form$ = this.store.selectors.selectFormInEdit$.pipe(\r\n map(form => form?.form)\r\n )\r\n constructor(private store: FormsStoreService) {\r\n \r\n }\r\n\r\n\r\n}\r\n","\r\n<lib-t-dynamic-data-view [data]=\"form$|async\"></lib-t-dynamic-data-view>"],"names":["i1.FormsStoreService"],"mappings":";;;;;;;MAmBa,qBAAqB,CAAA;AAKhC,IAAA,WAAA,CAAoB,KAAwB,EAAA;QAAxB,IAAK,CAAA,KAAA,GAAL,KAAK;QAHzB,IAAK,CAAA,KAAA,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,IAAI,CACjD,GAAG,CAAC,IAAI,IAAI,IAAI,EAAE,IAAI,CAAC,CACxB;;8GAJU,qBAAqB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IA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