@myrtex-org/form 1.0.0

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 (290) hide show
  1. package/README.md +15 -0
  2. package/esm2022/lib/modules/core/enums/component-size.enum.mjs +7 -0
  3. package/esm2022/lib/modules/core/enums/component-type.enum.mjs +46 -0
  4. package/esm2022/lib/modules/core/enums/condition-operator-type.enum.mjs +15 -0
  5. package/esm2022/lib/modules/core/enums/date-format.enum.mjs +12 -0
  6. package/esm2022/lib/modules/core/enums/date-type.enum.mjs +10 -0
  7. package/esm2022/lib/modules/core/enums/dependence-action-type.enum.mjs +12 -0
  8. package/esm2022/lib/modules/core/enums/index.mjs +13 -0
  9. package/esm2022/lib/modules/core/enums/inn-type.enum.mjs +12 -0
  10. package/esm2022/lib/modules/core/enums/input-state.enum.mjs +18 -0
  11. package/esm2022/lib/modules/core/enums/logical-operator-type.enum.mjs +7 -0
  12. package/esm2022/lib/modules/core/enums/template-components-group-type.enum.mjs +10 -0
  13. package/esm2022/lib/modules/core/enums/template-status.enum.mjs +15 -0
  14. package/esm2022/lib/modules/core/enums/value-type.enum.mjs +18 -0
  15. package/esm2022/lib/modules/core/helpers/common.helpers.mjs +11 -0
  16. package/esm2022/lib/modules/core/helpers/index.mjs +2 -0
  17. package/esm2022/lib/modules/core/interceptors/concurrency.interceptor.mjs +32 -0
  18. package/esm2022/lib/modules/core/interceptors/index.mjs +2 -0
  19. package/esm2022/lib/modules/core/models/component-model-base.model.mjs +2 -0
  20. package/esm2022/lib/modules/core/models/concurrency-info.model.mjs +2 -0
  21. package/esm2022/lib/modules/core/models/file.model.mjs +2 -0
  22. package/esm2022/lib/modules/core/models/index.mjs +8 -0
  23. package/esm2022/lib/modules/core/models/navigation-tabs.model.mjs +2 -0
  24. package/esm2022/lib/modules/core/models/options-base.model.mjs +2 -0
  25. package/esm2022/lib/modules/core/models/select-list-item.model.mjs +2 -0
  26. package/esm2022/lib/modules/core/models/user/index.mjs +3 -0
  27. package/esm2022/lib/modules/core/models/user/policy.type.mjs +2 -0
  28. package/esm2022/lib/modules/core/models/user/route-data-model.mjs +2 -0
  29. package/esm2022/lib/modules/core/services/concurrency-store.service.mjs +63 -0
  30. package/esm2022/lib/modules/core/services/index.mjs +2 -0
  31. package/esm2022/lib/modules/object-form/components/elements/base/base-element/base-element.component.mjs +35 -0
  32. package/esm2022/lib/modules/object-form/components/elements/base/base-field/base-field.component.mjs +128 -0
  33. package/esm2022/lib/modules/object-form/components/elements/base/index.mjs +3 -0
  34. package/esm2022/lib/modules/object-form/components/elements/content/divider/content-divider.component.mjs +20 -0
  35. package/esm2022/lib/modules/object-form/components/elements/content/divider/index.mjs +2 -0
  36. package/esm2022/lib/modules/object-form/components/elements/content/file/content-file.component.mjs +20 -0
  37. package/esm2022/lib/modules/object-form/components/elements/content/file/index.mjs +2 -0
  38. package/esm2022/lib/modules/object-form/components/elements/content/text/content-text.component.mjs +17 -0
  39. package/esm2022/lib/modules/object-form/components/elements/content/text/index.mjs +2 -0
  40. package/esm2022/lib/modules/object-form/components/elements/content/title/content-title.component.mjs +20 -0
  41. package/esm2022/lib/modules/object-form/components/elements/content/title/index.mjs +2 -0
  42. package/esm2022/lib/modules/object-form/components/elements/content/tooltip/content-tooltip.component.mjs +18 -0
  43. package/esm2022/lib/modules/object-form/components/elements/content/tooltip/index.mjs +2 -0
  44. package/esm2022/lib/modules/object-form/components/elements/index.mjs +19 -0
  45. package/esm2022/lib/modules/object-form/components/elements/input/checkbox-group/index.mjs +2 -0
  46. package/esm2022/lib/modules/object-form/components/elements/input/checkbox-group/input-checkbox-group.component.mjs +49 -0
  47. package/esm2022/lib/modules/object-form/components/elements/input/date/index.mjs +2 -0
  48. package/esm2022/lib/modules/object-form/components/elements/input/date/input-date.component.mjs +100 -0
  49. package/esm2022/lib/modules/object-form/components/elements/input/file/index.mjs +2 -0
  50. package/esm2022/lib/modules/object-form/components/elements/input/file/input-file.component.mjs +85 -0
  51. package/esm2022/lib/modules/object-form/components/elements/input/inn/index.mjs +2 -0
  52. package/esm2022/lib/modules/object-form/components/elements/input/inn/input-inn.component.mjs +34 -0
  53. package/esm2022/lib/modules/object-form/components/elements/input/link/index.mjs +2 -0
  54. package/esm2022/lib/modules/object-form/components/elements/input/link/input-link.component.mjs +19 -0
  55. package/esm2022/lib/modules/object-form/components/elements/input/number/index.mjs +2 -0
  56. package/esm2022/lib/modules/object-form/components/elements/input/number/input-number.component.mjs +22 -0
  57. package/esm2022/lib/modules/object-form/components/elements/input/phone/index.mjs +2 -0
  58. package/esm2022/lib/modules/object-form/components/elements/input/phone/input-phone.component.mjs +35 -0
  59. package/esm2022/lib/modules/object-form/components/elements/input/radio-group/index.mjs +2 -0
  60. package/esm2022/lib/modules/object-form/components/elements/input/radio-group/input-radio-group.component.mjs +48 -0
  61. package/esm2022/lib/modules/object-form/components/elements/input/select/index.mjs +2 -0
  62. package/esm2022/lib/modules/object-form/components/elements/input/select/input-select.component.mjs +60 -0
  63. package/esm2022/lib/modules/object-form/components/elements/input/switch/index.mjs +2 -0
  64. package/esm2022/lib/modules/object-form/components/elements/input/switch/input-switch.component.mjs +19 -0
  65. package/esm2022/lib/modules/object-form/components/elements/input/table/components/index.mjs +3 -0
  66. package/esm2022/lib/modules/object-form/components/elements/input/table/components/input-table-modal/form-dispenser-modal/form-dispenser-modal.component.mjs +69 -0
  67. package/esm2022/lib/modules/object-form/components/elements/input/table/components/input-table-modal/input-table-modal.component.mjs +61 -0
  68. package/esm2022/lib/modules/object-form/components/elements/input/table/helpers/get-row-model.helper.mjs +19 -0
  69. package/esm2022/lib/modules/object-form/components/elements/input/table/index.mjs +3 -0
  70. package/esm2022/lib/modules/object-form/components/elements/input/table/input-table.component.mjs +158 -0
  71. package/esm2022/lib/modules/object-form/components/elements/input/text/index.mjs +2 -0
  72. package/esm2022/lib/modules/object-form/components/elements/input/text/input-text.component.mjs +19 -0
  73. package/esm2022/lib/modules/object-form/components/elements/input/textarea/index.mjs +2 -0
  74. package/esm2022/lib/modules/object-form/components/elements/input/textarea/input-textarea.component.mjs +45 -0
  75. package/esm2022/lib/modules/object-form/components/form-dispenser/form-dispenser.component.mjs +69 -0
  76. package/esm2022/lib/modules/object-form/components/object-form-content/object-form-content.component.mjs +33 -0
  77. package/esm2022/lib/modules/object-form/constants.mjs +2 -0
  78. package/esm2022/lib/modules/object-form/factories/component-factory/component-factory.directive.mjs +79 -0
  79. package/esm2022/lib/modules/object-form/factories/component-factory/enums/component.enum.mjs +23 -0
  80. package/esm2022/lib/modules/object-form/factories/component-factory/index.mjs +4 -0
  81. package/esm2022/lib/modules/object-form/factories/component-factory/models/component.model.mjs +8 -0
  82. package/esm2022/lib/modules/object-form/helpers/check-dependence-rule.helper.mjs +92 -0
  83. package/esm2022/lib/modules/object-form/helpers/get-menu-model.mjs +27 -0
  84. package/esm2022/lib/modules/object-form/helpers/get-percent-for-section.helper.mjs +4 -0
  85. package/esm2022/lib/modules/object-form/helpers/get-updated-values.mjs +25 -0
  86. package/esm2022/lib/modules/object-form/helpers/get-value-model.helper.mjs +39 -0
  87. package/esm2022/lib/modules/object-form/helpers/index.mjs +6 -0
  88. package/esm2022/lib/modules/object-form/models/dependence-rules/dependence-condition.model.mjs +2 -0
  89. package/esm2022/lib/modules/object-form/models/dependence-rules/field-dependence-check-result.model.mjs +2 -0
  90. package/esm2022/lib/modules/object-form/models/dependence-rules/field-dependence.model.mjs +2 -0
  91. package/esm2022/lib/modules/object-form/models/dependence-rules/index.mjs +5 -0
  92. package/esm2022/lib/modules/object-form/models/dependence-rules/template-field-simple.model.mjs +2 -0
  93. package/esm2022/lib/modules/object-form/models/dropdown-button.model.mjs +2 -0
  94. package/esm2022/lib/modules/object-form/models/elemets/group-options.model.mjs +30 -0
  95. package/esm2022/lib/modules/object-form/models/elemets/index.mjs +3 -0
  96. package/esm2022/lib/modules/object-form/models/elemets/inputs/content-divider.model.mjs +2 -0
  97. package/esm2022/lib/modules/object-form/models/elemets/inputs/content-file.model.mjs +2 -0
  98. package/esm2022/lib/modules/object-form/models/elemets/inputs/content-text.model.mjs +2 -0
  99. package/esm2022/lib/modules/object-form/models/elemets/inputs/content-title.model.mjs +2 -0
  100. package/esm2022/lib/modules/object-form/models/elemets/inputs/content-tooltip.model.mjs +2 -0
  101. package/esm2022/lib/modules/object-form/models/elemets/inputs/index.mjs +19 -0
  102. package/esm2022/lib/modules/object-form/models/elemets/inputs/input-checkbox-group.model.mjs +2 -0
  103. package/esm2022/lib/modules/object-form/models/elemets/inputs/input-date.model.mjs +2 -0
  104. package/esm2022/lib/modules/object-form/models/elemets/inputs/input-file.model.mjs +2 -0
  105. package/esm2022/lib/modules/object-form/models/elemets/inputs/input-inn.model.mjs +2 -0
  106. package/esm2022/lib/modules/object-form/models/elemets/inputs/input-link.model.mjs +2 -0
  107. package/esm2022/lib/modules/object-form/models/elemets/inputs/input-number.model.mjs +2 -0
  108. package/esm2022/lib/modules/object-form/models/elemets/inputs/input-phone.model.mjs +2 -0
  109. package/esm2022/lib/modules/object-form/models/elemets/inputs/input-radio-group.model.mjs +2 -0
  110. package/esm2022/lib/modules/object-form/models/elemets/inputs/input-select.model.mjs +2 -0
  111. package/esm2022/lib/modules/object-form/models/elemets/inputs/input-switch.model.mjs +2 -0
  112. package/esm2022/lib/modules/object-form/models/elemets/inputs/input-table.model.mjs +2 -0
  113. package/esm2022/lib/modules/object-form/models/elemets/inputs/input-text.model.mjs +2 -0
  114. package/esm2022/lib/modules/object-form/models/elemets/inputs/input-textarea.model.mjs +2 -0
  115. package/esm2022/lib/modules/object-form/models/elemets/section-options.model.mjs +26 -0
  116. package/esm2022/lib/modules/object-form/models/index.mjs +10 -0
  117. package/esm2022/lib/modules/object-form/models/object-property.model.mjs +2 -0
  118. package/esm2022/lib/modules/object-form/models/object-values-dto.model.mjs +2 -0
  119. package/esm2022/lib/modules/object-form/models/object-values.model.mjs +2 -0
  120. package/esm2022/lib/modules/object-form/models/section-fillness.model.mjs +2 -0
  121. package/esm2022/lib/modules/object-form/models/template-component.model.mjs +2 -0
  122. package/esm2022/lib/modules/object-form/models/template.model.mjs +2 -0
  123. package/esm2022/lib/modules/object-form/models/update-value.model.mjs +2 -0
  124. package/esm2022/lib/modules/object-form/models/value.model.mjs +2 -0
  125. package/esm2022/lib/modules/object-form/object-form-routing.module.mjs +41 -0
  126. package/esm2022/lib/modules/object-form/object-form.component.mjs +43 -0
  127. package/esm2022/lib/modules/object-form/object-form.module.mjs +194 -0
  128. package/esm2022/lib/modules/object-form/services/index.mjs +2 -0
  129. package/esm2022/lib/modules/object-form/services/object-form.service.mjs +57 -0
  130. package/esm2022/lib/modules/object-form/store/index.mjs +7 -0
  131. package/esm2022/lib/modules/object-form/store/object-form.actions.mjs +59 -0
  132. package/esm2022/lib/modules/object-form/store/object-form.effects.mjs +133 -0
  133. package/esm2022/lib/modules/object-form/store/object-form.reducers.mjs +82 -0
  134. package/esm2022/lib/modules/object-form/store/object-form.selector.mjs +20 -0
  135. package/esm2022/lib/modules/object-form/store/object-form.state.mjs +15 -0
  136. package/esm2022/lib/modules/shared-store/constants/index.mjs +2 -0
  137. package/esm2022/lib/modules/shared-store/shared-store.module.mjs +27 -0
  138. package/esm2022/lib/modules/shared-store/store/index.mjs +5 -0
  139. package/esm2022/lib/modules/shared-store/store/shared-store.effects.mjs +2 -0
  140. package/esm2022/lib/modules/shared-store/store/shared-store.reducer.mjs +6 -0
  141. package/esm2022/lib/modules/shared-store/store/shared-store.selector.mjs +27 -0
  142. package/esm2022/lib/modules/shared-store/store/shared-store.state.mjs +3 -0
  143. package/esm2022/myrtex-org-form.mjs +5 -0
  144. package/esm2022/public-api.mjs +14 -0
  145. package/fesm2022/myrtex-org-form.mjs +891 -0
  146. package/fesm2022/myrtex-org-form.mjs.map +1 -0
  147. package/index.d.ts +5 -0
  148. package/lib/modules/core/enums/component-size.enum.d.ts +5 -0
  149. package/lib/modules/core/enums/component-type.enum.d.ts +23 -0
  150. package/lib/modules/core/enums/condition-operator-type.enum.d.ts +9 -0
  151. package/lib/modules/core/enums/date-format.enum.d.ts +6 -0
  152. package/lib/modules/core/enums/date-type.enum.d.ts +5 -0
  153. package/lib/modules/core/enums/dependence-action-type.enum.d.ts +8 -0
  154. package/lib/modules/core/enums/index.d.ts +12 -0
  155. package/lib/modules/core/enums/inn-type.enum.d.ts +6 -0
  156. package/lib/modules/core/enums/input-state.enum.d.ts +11 -0
  157. package/lib/modules/core/enums/logical-operator-type.enum.d.ts +5 -0
  158. package/lib/modules/core/enums/template-components-group-type.enum.d.ts +5 -0
  159. package/lib/modules/core/enums/template-status.enum.d.ts +6 -0
  160. package/lib/modules/core/enums/value-type.enum.d.ts +16 -0
  161. package/lib/modules/core/helpers/common.helpers.d.ts +2 -0
  162. package/lib/modules/core/helpers/index.d.ts +1 -0
  163. package/lib/modules/core/interceptors/concurrency.interceptor.d.ts +12 -0
  164. package/lib/modules/core/interceptors/index.d.ts +1 -0
  165. package/lib/modules/core/models/component-model-base.model.d.ts +12 -0
  166. package/lib/modules/core/models/concurrency-info.model.d.ts +4 -0
  167. package/lib/modules/core/models/file.model.d.ts +7 -0
  168. package/lib/modules/core/models/index.d.ts +7 -0
  169. package/lib/modules/core/models/navigation-tabs.model.d.ts +7 -0
  170. package/lib/modules/core/models/options-base.model.d.ts +15 -0
  171. package/lib/modules/core/models/select-list-item.model.d.ts +5 -0
  172. package/lib/modules/core/models/user/index.d.ts +2 -0
  173. package/lib/modules/core/models/user/policy.type.d.ts +1 -0
  174. package/lib/modules/core/models/user/route-data-model.d.ts +4 -0
  175. package/lib/modules/core/services/concurrency-store.service.d.ts +18 -0
  176. package/lib/modules/core/services/index.d.ts +1 -0
  177. package/lib/modules/object-form/components/elements/base/base-element/base-element.component.d.ts +18 -0
  178. package/lib/modules/object-form/components/elements/base/base-field/base-field.component.d.ts +39 -0
  179. package/lib/modules/object-form/components/elements/base/index.d.ts +2 -0
  180. package/lib/modules/object-form/components/elements/content/divider/content-divider.component.d.ts +10 -0
  181. package/lib/modules/object-form/components/elements/content/divider/index.d.ts +1 -0
  182. package/lib/modules/object-form/components/elements/content/file/content-file.component.d.ts +11 -0
  183. package/lib/modules/object-form/components/elements/content/file/index.d.ts +1 -0
  184. package/lib/modules/object-form/components/elements/content/text/content-text.component.d.ts +9 -0
  185. package/lib/modules/object-form/components/elements/content/text/index.d.ts +1 -0
  186. package/lib/modules/object-form/components/elements/content/title/content-title.component.d.ts +10 -0
  187. package/lib/modules/object-form/components/elements/content/title/index.d.ts +1 -0
  188. package/lib/modules/object-form/components/elements/content/tooltip/content-tooltip.component.d.ts +9 -0
  189. package/lib/modules/object-form/components/elements/content/tooltip/index.d.ts +1 -0
  190. package/lib/modules/object-form/components/elements/index.d.ts +18 -0
  191. package/lib/modules/object-form/components/elements/input/checkbox-group/index.d.ts +1 -0
  192. package/lib/modules/object-form/components/elements/input/checkbox-group/input-checkbox-group.component.d.ts +26 -0
  193. package/lib/modules/object-form/components/elements/input/date/index.d.ts +1 -0
  194. package/lib/modules/object-form/components/elements/input/date/input-date.component.d.ts +22 -0
  195. package/lib/modules/object-form/components/elements/input/file/index.d.ts +1 -0
  196. package/lib/modules/object-form/components/elements/input/file/input-file.component.d.ts +30 -0
  197. package/lib/modules/object-form/components/elements/input/inn/index.d.ts +1 -0
  198. package/lib/modules/object-form/components/elements/input/inn/input-inn.component.d.ts +13 -0
  199. package/lib/modules/object-form/components/elements/input/link/index.d.ts +1 -0
  200. package/lib/modules/object-form/components/elements/input/link/input-link.component.d.ts +11 -0
  201. package/lib/modules/object-form/components/elements/input/number/index.d.ts +1 -0
  202. package/lib/modules/object-form/components/elements/input/number/input-number.component.d.ts +12 -0
  203. package/lib/modules/object-form/components/elements/input/phone/index.d.ts +1 -0
  204. package/lib/modules/object-form/components/elements/input/phone/input-phone.component.d.ts +14 -0
  205. package/lib/modules/object-form/components/elements/input/radio-group/index.d.ts +1 -0
  206. package/lib/modules/object-form/components/elements/input/radio-group/input-radio-group.component.d.ts +17 -0
  207. package/lib/modules/object-form/components/elements/input/select/index.d.ts +1 -0
  208. package/lib/modules/object-form/components/elements/input/select/input-select.component.d.ts +17 -0
  209. package/lib/modules/object-form/components/elements/input/switch/index.d.ts +1 -0
  210. package/lib/modules/object-form/components/elements/input/switch/input-switch.component.d.ts +11 -0
  211. package/lib/modules/object-form/components/elements/input/table/components/index.d.ts +2 -0
  212. package/lib/modules/object-form/components/elements/input/table/components/input-table-modal/form-dispenser-modal/form-dispenser-modal.component.d.ts +22 -0
  213. package/lib/modules/object-form/components/elements/input/table/components/input-table-modal/input-table-modal.component.d.ts +26 -0
  214. package/lib/modules/object-form/components/elements/input/table/helpers/get-row-model.helper.d.ts +3 -0
  215. package/lib/modules/object-form/components/elements/input/table/index.d.ts +2 -0
  216. package/lib/modules/object-form/components/elements/input/table/input-table.component.d.ts +38 -0
  217. package/lib/modules/object-form/components/elements/input/text/index.d.ts +1 -0
  218. package/lib/modules/object-form/components/elements/input/text/input-text.component.d.ts +11 -0
  219. package/lib/modules/object-form/components/elements/input/textarea/index.d.ts +1 -0
  220. package/lib/modules/object-form/components/elements/input/textarea/input-textarea.component.d.ts +13 -0
  221. package/lib/modules/object-form/components/form-dispenser/form-dispenser.component.d.ts +21 -0
  222. package/lib/modules/object-form/components/object-form-content/object-form-content.component.d.ts +15 -0
  223. package/lib/modules/object-form/constants.d.ts +1 -0
  224. package/lib/modules/object-form/factories/component-factory/component-factory.directive.d.ts +25 -0
  225. package/lib/modules/object-form/factories/component-factory/enums/component.enum.d.ts +4 -0
  226. package/lib/modules/object-form/factories/component-factory/index.d.ts +3 -0
  227. package/lib/modules/object-form/factories/component-factory/models/component.model.d.ts +17 -0
  228. package/lib/modules/object-form/helpers/check-dependence-rule.helper.d.ts +4 -0
  229. package/lib/modules/object-form/helpers/get-menu-model.d.ts +5 -0
  230. package/lib/modules/object-form/helpers/get-percent-for-section.helper.d.ts +3 -0
  231. package/lib/modules/object-form/helpers/get-updated-values.d.ts +3 -0
  232. package/lib/modules/object-form/helpers/get-value-model.helper.d.ts +11 -0
  233. package/lib/modules/object-form/helpers/index.d.ts +5 -0
  234. package/lib/modules/object-form/models/dependence-rules/dependence-condition.model.d.ts +12 -0
  235. package/lib/modules/object-form/models/dependence-rules/field-dependence-check-result.model.d.ts +6 -0
  236. package/lib/modules/object-form/models/dependence-rules/field-dependence.model.d.ts +8 -0
  237. package/lib/modules/object-form/models/dependence-rules/index.d.ts +4 -0
  238. package/lib/modules/object-form/models/dependence-rules/template-field-simple.model.d.ts +6 -0
  239. package/lib/modules/object-form/models/dropdown-button.model.d.ts +6 -0
  240. package/lib/modules/object-form/models/elemets/group-options.model.d.ts +13 -0
  241. package/lib/modules/object-form/models/elemets/index.d.ts +2 -0
  242. package/lib/modules/object-form/models/elemets/inputs/content-divider.model.d.ts +10 -0
  243. package/lib/modules/object-form/models/elemets/inputs/content-file.model.d.ts +11 -0
  244. package/lib/modules/object-form/models/elemets/inputs/content-text.model.d.ts +9 -0
  245. package/lib/modules/object-form/models/elemets/inputs/content-title.model.d.ts +11 -0
  246. package/lib/modules/object-form/models/elemets/inputs/content-tooltip.model.d.ts +12 -0
  247. package/lib/modules/object-form/models/elemets/inputs/index.d.ts +18 -0
  248. package/lib/modules/object-form/models/elemets/inputs/input-checkbox-group.model.d.ts +17 -0
  249. package/lib/modules/object-form/models/elemets/inputs/input-date.model.d.ts +15 -0
  250. package/lib/modules/object-form/models/elemets/inputs/input-file.model.d.ts +13 -0
  251. package/lib/modules/object-form/models/elemets/inputs/input-inn.model.d.ts +11 -0
  252. package/lib/modules/object-form/models/elemets/inputs/input-link.model.d.ts +10 -0
  253. package/lib/modules/object-form/models/elemets/inputs/input-number.model.d.ts +13 -0
  254. package/lib/modules/object-form/models/elemets/inputs/input-phone.model.d.ts +11 -0
  255. package/lib/modules/object-form/models/elemets/inputs/input-radio-group.model.d.ts +17 -0
  256. package/lib/modules/object-form/models/elemets/inputs/input-select.model.d.ts +17 -0
  257. package/lib/modules/object-form/models/elemets/inputs/input-switch.model.d.ts +11 -0
  258. package/lib/modules/object-form/models/elemets/inputs/input-table.model.d.ts +13 -0
  259. package/lib/modules/object-form/models/elemets/inputs/input-text.model.d.ts +13 -0
  260. package/lib/modules/object-form/models/elemets/inputs/input-textarea.model.d.ts +29 -0
  261. package/lib/modules/object-form/models/elemets/section-options.model.d.ts +20 -0
  262. package/lib/modules/object-form/models/index.d.ts +9 -0
  263. package/lib/modules/object-form/models/object-property.model.d.ts +6 -0
  264. package/lib/modules/object-form/models/object-values-dto.model.d.ts +5 -0
  265. package/lib/modules/object-form/models/object-values.model.d.ts +4 -0
  266. package/lib/modules/object-form/models/section-fillness.model.d.ts +4 -0
  267. package/lib/modules/object-form/models/template-component.model.d.ts +12 -0
  268. package/lib/modules/object-form/models/template.model.d.ts +12 -0
  269. package/lib/modules/object-form/models/update-value.model.d.ts +7 -0
  270. package/lib/modules/object-form/models/value.model.d.ts +26 -0
  271. package/lib/modules/object-form/object-form-routing.module.d.ts +7 -0
  272. package/lib/modules/object-form/object-form.component.d.ts +16 -0
  273. package/lib/modules/object-form/object-form.module.d.ts +19 -0
  274. package/lib/modules/object-form/services/index.d.ts +1 -0
  275. package/lib/modules/object-form/services/object-form.service.d.ts +29 -0
  276. package/lib/modules/object-form/store/index.d.ts +6 -0
  277. package/lib/modules/object-form/store/object-form.actions.d.ts +115 -0
  278. package/lib/modules/object-form/store/object-form.effects.d.ts +50 -0
  279. package/lib/modules/object-form/store/object-form.reducers.d.ts +3 -0
  280. package/lib/modules/object-form/store/object-form.selector.d.ts +14 -0
  281. package/lib/modules/object-form/store/object-form.state.d.ts +17 -0
  282. package/lib/modules/shared-store/constants/index.d.ts +1 -0
  283. package/lib/modules/shared-store/shared-store.module.d.ts +9 -0
  284. package/lib/modules/shared-store/store/index.d.ts +4 -0
  285. package/lib/modules/shared-store/store/shared-store.effects.d.ts +1 -0
  286. package/lib/modules/shared-store/store/shared-store.reducer.d.ts +3 -0
  287. package/lib/modules/shared-store/store/shared-store.selector.d.ts +6 -0
  288. package/lib/modules/shared-store/store/shared-store.state.d.ts +6 -0
  289. package/package.json +25 -0
  290. package/public-api.d.ts +10 -0
@@ -0,0 +1,891 @@
1
+ import * as i0 from '@angular/core';
2
+ import { NgModule, inject, Injectable } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+ import { ObjectFormRoutingModule } from '@object-form/object-form-routing.module';
5
+ import { ObjectFormComponent } from '@object-form/object-form.component';
6
+ import * as i2 from '@ngrx/store';
7
+ import { StoreModule, createAction, props, createFeatureSelector, createSelector, createReducer, on } from '@ngrx/store';
8
+ import * as i1 from '@ngrx/effects';
9
+ import { EffectsModule, createEffect, ofType } from '@ngrx/effects';
10
+ import { objectReducer as objectReducer$1, ObjectFormEffects as ObjectFormEffects$1, initialObjectFormState as initialObjectFormState$1, objectFormActions as objectFormActions$1, EApplicationActions as EApplicationActions$1, objectFormSelectors as objectFormSelectors$1 } from '@object-form/store';
11
+ import { STATE_NAME } from '@object-form/constants';
12
+ import * as i4 from '@object-form/services';
13
+ import { ObjectFormService } from '@object-form/services';
14
+ import { ApplicationContent } from '@object-form/components/object-form-content/object-form-content.component';
15
+ import { FormHeaderModule, MenuAdminModule } from '@myrtex-org/templates';
16
+ import { FormsModule } from '@angular/forms';
17
+ import { InputTextComponent, InputTextareaComponent, InputLinkComponent, InputSwitchComponent, InputNumberComponent, InputSelectComponent, InputDateComponent, InputInnComponent, InputFileComponent, InputPhoneComponent, InputCheckboxGroupComponent, InputRadioGroupComponent, InputTableComponent, ContentTitleComponent, ContentTextComponent, ContentTooltipComponent, ContentFileComponent, ContentDividerComponent } from '@object-form/components/elements';
18
+ import * as i5 from '@myrtex-org/ui';
19
+ import { LoaderModule, InputTextModule, LabelModule, ContentWrapperModule, EditorModule, InputTextareaModule, ButtonModule, CheckboxModule, SwitchModule, InputNumberModule, InputSelectModule, InputDateTimeModule, InputTimepickerModule, InputFileModule, AlertModule, CheckboxGroupModule, RadioGroupModule, DropdownModule, InputTelModule, LinkModule, ErrorMessageModule, ModalModule, ToasterServiceModule, AutoSaveStore, ToasterType } from '@myrtex-org/ui';
20
+ import { HTTP_INTERCEPTORS, HttpHeaders } from '@angular/common/http';
21
+ import { DxDataGridModule } from 'devextreme-angular';
22
+ import { DxiColumnModule, DxiItemModule, DxoToolbarModule } from 'devextreme-angular/ui/nested';
23
+ import { ConcurrencyInterceptor as ConcurrencyInterceptor$1 } from '@core/interceptors';
24
+ import { ConcurrencyStoreService as ConcurrencyStoreService$1 } from '@core/services';
25
+ import { FormDispenser } from '@object-form/components/form-dispenser/form-dispenser.component';
26
+ import { sharedSelectors as sharedSelectors$1, EFFECTS as EFFECTS$1, sharedStoreReducer as sharedStoreReducer$1 } from '@shared-store/store';
27
+ import * as fromHelpers from '@object-form/helpers';
28
+ import { getValueModel } from '@object-form/helpers';
29
+ import { withLatestFrom, switchMap, catchError, map, distinctUntilChanged, tap, debounceTime } from 'rxjs/operators';
30
+ import { of, forkJoin, throwError } from 'rxjs';
31
+ import * as i3 from '@angular/router';
32
+ import { FORM_SHARED_STORE_MODULE_NAME } from '@shared-store/constants';
33
+ import { routerReducer } from '@ngrx/router-store';
34
+ import { ROUTER_STATE_NAME, selectRouter, selectQueryParam, selectRouteParam } from '@myrtex-org/ui-composite';
35
+
36
+ class ObjectFormModule {
37
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
38
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormModule, declarations: [ObjectFormComponent,
39
+ ApplicationContent,
40
+ InputTextComponent,
41
+ InputTextareaComponent,
42
+ InputLinkComponent,
43
+ InputSwitchComponent,
44
+ InputNumberComponent,
45
+ InputSelectComponent,
46
+ InputDateComponent,
47
+ InputInnComponent,
48
+ InputFileComponent,
49
+ InputPhoneComponent,
50
+ InputCheckboxGroupComponent,
51
+ InputRadioGroupComponent,
52
+ InputTableComponent,
53
+ ContentTitleComponent,
54
+ ContentTextComponent,
55
+ ContentTooltipComponent,
56
+ ContentFileComponent,
57
+ ContentDividerComponent], imports: [CommonModule,
58
+ ObjectFormRoutingModule, i2.StoreFeatureModule, i1.EffectsFeatureModule, FormDispenser,
59
+ FormHeaderModule,
60
+ MenuAdminModule,
61
+ LoaderModule,
62
+ InputTextModule,
63
+ LabelModule,
64
+ ContentWrapperModule,
65
+ EditorModule,
66
+ InputTextareaModule,
67
+ ButtonModule,
68
+ FormsModule,
69
+ CheckboxModule,
70
+ SwitchModule,
71
+ InputNumberModule,
72
+ InputSelectModule,
73
+ InputDateTimeModule,
74
+ InputTimepickerModule,
75
+ InputFileModule,
76
+ AlertModule,
77
+ CheckboxGroupModule,
78
+ RadioGroupModule,
79
+ DropdownModule,
80
+ InputTelModule,
81
+ LinkModule,
82
+ ErrorMessageModule,
83
+ DxDataGridModule,
84
+ DxiColumnModule,
85
+ DxiItemModule,
86
+ DxoToolbarModule,
87
+ ModalModule,
88
+ ToasterServiceModule] }); }
89
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormModule, providers: [
90
+ ObjectFormService,
91
+ ConcurrencyStoreService$1,
92
+ {
93
+ provide: HTTP_INTERCEPTORS,
94
+ useClass: ConcurrencyInterceptor$1,
95
+ multi: true
96
+ }
97
+ ], imports: [CommonModule,
98
+ ObjectFormRoutingModule,
99
+ StoreModule.forFeature(STATE_NAME, objectReducer$1),
100
+ EffectsModule.forFeature([ObjectFormEffects$1]),
101
+ FormDispenser,
102
+ FormHeaderModule,
103
+ MenuAdminModule,
104
+ LoaderModule,
105
+ InputTextModule,
106
+ LabelModule,
107
+ ContentWrapperModule,
108
+ EditorModule,
109
+ InputTextareaModule,
110
+ ButtonModule,
111
+ FormsModule,
112
+ CheckboxModule,
113
+ SwitchModule,
114
+ InputNumberModule,
115
+ InputSelectModule,
116
+ InputDateTimeModule,
117
+ InputTimepickerModule,
118
+ InputFileModule,
119
+ AlertModule,
120
+ CheckboxGroupModule,
121
+ RadioGroupModule,
122
+ DropdownModule,
123
+ InputTelModule,
124
+ LinkModule,
125
+ ErrorMessageModule,
126
+ DxDataGridModule,
127
+ DxiColumnModule,
128
+ DxiItemModule,
129
+ DxoToolbarModule,
130
+ ModalModule,
131
+ ToasterServiceModule] }); }
132
+ }
133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormModule, decorators: [{
134
+ type: NgModule,
135
+ args: [{
136
+ declarations: [
137
+ ObjectFormComponent,
138
+ ApplicationContent,
139
+ InputTextComponent,
140
+ InputTextareaComponent,
141
+ InputLinkComponent,
142
+ InputSwitchComponent,
143
+ InputNumberComponent,
144
+ InputSelectComponent,
145
+ InputDateComponent,
146
+ InputInnComponent,
147
+ InputFileComponent,
148
+ InputPhoneComponent,
149
+ InputCheckboxGroupComponent,
150
+ InputRadioGroupComponent,
151
+ InputTableComponent,
152
+ ContentTitleComponent,
153
+ ContentTextComponent,
154
+ ContentTooltipComponent,
155
+ ContentFileComponent,
156
+ ContentDividerComponent,
157
+ ],
158
+ imports: [
159
+ CommonModule,
160
+ ObjectFormRoutingModule,
161
+ StoreModule.forFeature(STATE_NAME, objectReducer$1),
162
+ EffectsModule.forFeature([ObjectFormEffects$1]),
163
+ FormDispenser,
164
+ FormHeaderModule,
165
+ MenuAdminModule,
166
+ LoaderModule,
167
+ InputTextModule,
168
+ LabelModule,
169
+ ContentWrapperModule,
170
+ EditorModule,
171
+ InputTextareaModule,
172
+ ButtonModule,
173
+ FormsModule,
174
+ CheckboxModule,
175
+ SwitchModule,
176
+ InputNumberModule,
177
+ InputSelectModule,
178
+ InputDateTimeModule,
179
+ InputTimepickerModule,
180
+ InputFileModule,
181
+ AlertModule,
182
+ CheckboxGroupModule,
183
+ RadioGroupModule,
184
+ DropdownModule,
185
+ InputTelModule,
186
+ LinkModule,
187
+ ErrorMessageModule,
188
+ DxDataGridModule,
189
+ DxiColumnModule,
190
+ DxiItemModule,
191
+ DxoToolbarModule,
192
+ ModalModule,
193
+ ToasterServiceModule
194
+ ],
195
+ providers: [
196
+ ObjectFormService,
197
+ ConcurrencyStoreService$1,
198
+ {
199
+ provide: HTTP_INTERCEPTORS,
200
+ useClass: ConcurrencyInterceptor$1,
201
+ multi: true
202
+ }
203
+ ]
204
+ }]
205
+ }] });
206
+
207
+ var EApplicationActions;
208
+ (function (EApplicationActions) {
209
+ EApplicationActions["LoadTemplatePending"] = "[Application] Load Template Pending";
210
+ EApplicationActions["LoadTemplateSuccess"] = "[Application] Load Template Success";
211
+ EApplicationActions["LoadTemplateError"] = "[Application] Load Template Error";
212
+ EApplicationActions["LoadApplicationPending"] = "[Application] Load Application Pending";
213
+ EApplicationActions["LoadApplicationSuccess"] = "[Application] Load Application Success";
214
+ EApplicationActions["LoadApplicationError"] = "[Application] Load Application Error";
215
+ EApplicationActions["SaveApplicationPending"] = "[Application] Save Application Pending";
216
+ EApplicationActions["SaveApplicationSuccess"] = "[Application] Save Application Success";
217
+ EApplicationActions["SaveApplicationError"] = "[Application] Save Application Error";
218
+ EApplicationActions["CopyApplicationPending"] = "[Application] Copy Application Pending";
219
+ EApplicationActions["CopyApplicationSuccess"] = "[Application] Copy Application Success";
220
+ EApplicationActions["CopyApplicationError"] = "[Application] Copy Application Error";
221
+ EApplicationActions["UpdateValues"] = "[Application] Update Application Values";
222
+ EApplicationActions["AccessUpdateValues"] = "[Application] Access Update Application Values";
223
+ EApplicationActions["SaveValuesPending"] = "[Application] Save Application Values Pending";
224
+ EApplicationActions["SaveValuesSuccess"] = "[Application] Save Application Values Success";
225
+ EApplicationActions["SaveValuesError"] = "[Application] Save Application Values Error";
226
+ EApplicationActions["UpdateSelectedSectionSysName"] = "[Application] Update Selected Section SysName";
227
+ EApplicationActions["LoadSectionFilesPending"] = "[Application] Load Section Files Pending";
228
+ EApplicationActions["LoadSectionFilesSuccess"] = "[Application] Load Section Files Success";
229
+ EApplicationActions["LoadSectionFilesError"] = "[Application] Load Section Files Error";
230
+ EApplicationActions["ToggleCheckRequired"] = "[Application] Toggle Check Required";
231
+ EApplicationActions["UpdateCheckRequired"] = "[Application] Update Check Required";
232
+ EApplicationActions["LoadPreviewTemplatePending"] = "[Application] Load Preview Template Pending";
233
+ EApplicationActions["LoadPreviewTemplateSuccess"] = "[Application] Load Preview Template Success";
234
+ EApplicationActions["LoadPreviewTemplateError"] = "[Application] Load Preview Template Error";
235
+ EApplicationActions["CheckAllDependencyRules"] = "[Application] Check All Dependency Rule";
236
+ })(EApplicationActions || (EApplicationActions = {}));
237
+ const loadTemplatePending = createAction(EApplicationActions.LoadTemplatePending);
238
+ const loadTemplateSuccess = createAction(EApplicationActions.LoadTemplateSuccess, props());
239
+ const loadTemplateError = createAction(EApplicationActions.LoadTemplateError);
240
+ const loadApplicationPending = createAction(EApplicationActions.LoadApplicationPending, props());
241
+ const loadApplicationSuccess = createAction(EApplicationActions.LoadApplicationSuccess, props());
242
+ const loadApplicationError = createAction(EApplicationActions.LoadApplicationError);
243
+ const saveApplicationPending = createAction(EApplicationActions.SaveApplicationPending);
244
+ const saveApplicationSuccess = createAction(EApplicationActions.SaveApplicationSuccess);
245
+ const saveApplicationError = createAction(EApplicationActions.SaveApplicationError);
246
+ const copyApplicationPending = createAction(EApplicationActions.CopyApplicationPending, props());
247
+ const copyApplicationSuccess = createAction(EApplicationActions.CopyApplicationSuccess);
248
+ const copyApplicationError = createAction(EApplicationActions.CopyApplicationError);
249
+ const updateValues = createAction(EApplicationActions.UpdateValues, props());
250
+ const accessUpdateValues = createAction(EApplicationActions.AccessUpdateValues);
251
+ const saveValuesPending = createAction(EApplicationActions.SaveValuesPending);
252
+ const saveValuesSuccess = createAction(EApplicationActions.SaveValuesSuccess, props());
253
+ const saveValuesError = createAction(EApplicationActions.SaveValuesError);
254
+ const updateSelectedSectionSysName = createAction(EApplicationActions.UpdateSelectedSectionSysName, props());
255
+ const loadSectionFilesPending = createAction(EApplicationActions.LoadSectionFilesPending);
256
+ const loadSectionFilesSuccess = createAction(EApplicationActions.LoadSectionFilesSuccess, props());
257
+ const loadSectionFilesError = createAction(EApplicationActions.LoadSectionFilesError);
258
+ const toggleCheckRequired = createAction(EApplicationActions.ToggleCheckRequired);
259
+ const updateCheckRequired = createAction(EApplicationActions.UpdateCheckRequired, props());
260
+ const loadPreviewTemplatePending = createAction(EApplicationActions.LoadPreviewTemplatePending, props());
261
+ const loadPreviewTemplateSuccess = createAction(EApplicationActions.LoadPreviewTemplateSuccess, props());
262
+ const loadPreviewTemplateError = createAction(EApplicationActions.LoadPreviewTemplateError);
263
+ const checkAllDependencyRules = createAction(EApplicationActions.CheckAllDependencyRules);
264
+
265
+ var objectForm_actions = /*#__PURE__*/Object.freeze({
266
+ __proto__: null,
267
+ get EApplicationActions () { return EApplicationActions; },
268
+ accessUpdateValues: accessUpdateValues,
269
+ checkAllDependencyRules: checkAllDependencyRules,
270
+ copyApplicationError: copyApplicationError,
271
+ copyApplicationPending: copyApplicationPending,
272
+ copyApplicationSuccess: copyApplicationSuccess,
273
+ loadApplicationError: loadApplicationError,
274
+ loadApplicationPending: loadApplicationPending,
275
+ loadApplicationSuccess: loadApplicationSuccess,
276
+ loadPreviewTemplateError: loadPreviewTemplateError,
277
+ loadPreviewTemplatePending: loadPreviewTemplatePending,
278
+ loadPreviewTemplateSuccess: loadPreviewTemplateSuccess,
279
+ loadSectionFilesError: loadSectionFilesError,
280
+ loadSectionFilesPending: loadSectionFilesPending,
281
+ loadSectionFilesSuccess: loadSectionFilesSuccess,
282
+ loadTemplateError: loadTemplateError,
283
+ loadTemplatePending: loadTemplatePending,
284
+ loadTemplateSuccess: loadTemplateSuccess,
285
+ saveApplicationError: saveApplicationError,
286
+ saveApplicationPending: saveApplicationPending,
287
+ saveApplicationSuccess: saveApplicationSuccess,
288
+ saveValuesError: saveValuesError,
289
+ saveValuesPending: saveValuesPending,
290
+ saveValuesSuccess: saveValuesSuccess,
291
+ toggleCheckRequired: toggleCheckRequired,
292
+ updateCheckRequired: updateCheckRequired,
293
+ updateSelectedSectionSysName: updateSelectedSectionSysName,
294
+ updateValues: updateValues
295
+ });
296
+
297
+ const objectFeature = createFeatureSelector(STATE_NAME);
298
+ const selectIsLoading = createSelector(objectFeature, (state) => state.isLoading);
299
+ const selectIsObjectSaveLoading = createSelector(objectFeature, (state) => state.isObjectSaveLoading);
300
+ const selectIsEdited = createSelector(objectFeature, (state) => state.isEdited);
301
+ const selectIsCheckRequired = createSelector(objectFeature, (state) => state.isCheckRequired);
302
+ const selectMenuModel = createSelector(objectFeature, (state) => state.menuModel);
303
+ const selectSectionSettings = createSelector(objectFeature, sharedSelectors$1.selectRouteNestedParam('sectionSysName'), (state, sectionSysName) => {
304
+ return state.settings?.sections.find(s => s.sysName === sectionSysName) || null;
305
+ });
306
+ const selectSectionValues = createSelector(objectFeature, (state) => state.sectionValues);
307
+ const selectObjectId = createSelector(sharedSelectors$1.selectRouteNestedParam('objectId'), (applicationId) => applicationId);
308
+ const selectSectionFiles = createSelector(objectFeature, (state) => state.sectionFiles);
309
+ const selectTemplateSysName$1 = createSelector(objectFeature, (state) => state.settings?.sysName);
310
+ const selectValueModel = (settings) => createSelector(objectFeature, (state) => getValueModel(settings, state.sectionValues));
311
+ const selectDependencyRulesResults = createSelector(objectFeature, state => state.dependencyRuleCheckResults);
312
+
313
+ var objectForm_selector = /*#__PURE__*/Object.freeze({
314
+ __proto__: null,
315
+ selectDependencyRulesResults: selectDependencyRulesResults,
316
+ selectIsCheckRequired: selectIsCheckRequired,
317
+ selectIsEdited: selectIsEdited,
318
+ selectIsLoading: selectIsLoading,
319
+ selectIsObjectSaveLoading: selectIsObjectSaveLoading,
320
+ selectMenuModel: selectMenuModel,
321
+ selectObjectId: selectObjectId,
322
+ selectSectionFiles: selectSectionFiles,
323
+ selectSectionSettings: selectSectionSettings,
324
+ selectSectionValues: selectSectionValues,
325
+ selectTemplateSysName: selectTemplateSysName$1,
326
+ selectValueModel: selectValueModel
327
+ });
328
+
329
+ const objectReducerCreator = createReducer(initialObjectFormState$1, on(objectFormActions$1.loadApplicationPending, (state) => {
330
+ return { ...state, isLoading: true };
331
+ }), on(objectFormActions$1.loadApplicationSuccess, (state, { templateSettings, sectionValues, applicationId, isDraft }) => {
332
+ return {
333
+ ...state,
334
+ isLoading: false,
335
+ settings: templateSettings,
336
+ sectionValues: sectionValues,
337
+ isEdited: isDraft,
338
+ menuModel: fromHelpers.getMenuModel(templateSettings, sectionValues, applicationId)
339
+ };
340
+ }), on(objectFormActions$1.loadApplicationError, (state) => {
341
+ return { ...state, isLoading: false };
342
+ }), on(objectFormActions$1.updateValues, (state, { value }) => {
343
+ const dependenceRulesResults = fromHelpers.getDependenceRulesResults(state.dependencyRuleCheckResults, state.sectionValues, value, state.settings?.dependenceRules.rules);
344
+ const selectedSectionValues = state.sectionValues.map((sectionValue) => {
345
+ // пришлось отказаться от условия проверки выбранной секции,
346
+ // т.к. зависимые поля могут находиться в других секциях, а их необходимо обнулять.
347
+ return fromHelpers.getUpdatedValues(sectionValue, Array.isArray(value) ? value : [value], fromHelpers.getValuesToClean(dependenceRulesResults));
348
+ });
349
+ return {
350
+ ...state,
351
+ sectionValues: selectedSectionValues,
352
+ isEdited: true,
353
+ dependencyRuleCheckResults: dependenceRulesResults
354
+ };
355
+ }), on(objectFormActions$1.saveValuesSuccess, (state, { result, applicationId }) => {
356
+ const updatedSectionValues = state.sectionValues.map((sectionValue) => {
357
+ const section = {
358
+ ...sectionValue,
359
+ percent: result.fillness.find(x => x.name === sectionValue.sysName)?.percent || 0
360
+ };
361
+ return fromHelpers.getUpdatedValues(section, result.values);
362
+ });
363
+ return {
364
+ ...state,
365
+ sectionValues: updatedSectionValues,
366
+ isEdited: true,
367
+ menuModel: fromHelpers.getMenuModel(state.settings, updatedSectionValues, applicationId)
368
+ };
369
+ }), on(objectFormActions$1.saveValuesError, (state) => {
370
+ return { ...state };
371
+ }), on(objectFormActions$1.saveApplicationPending, (state) => {
372
+ return { ...state, isApplicationSaveLoading: true };
373
+ }), on(objectFormActions$1.saveApplicationSuccess, (state) => {
374
+ return { ...state, isApplicationSaveLoading: false, isEdited: false };
375
+ }), on(objectFormActions$1.saveApplicationError, (state) => {
376
+ return { ...state, isApplicationSaveLoading: false };
377
+ }), on(objectFormActions$1.updateSelectedSectionSysName, (state, { sectionSysName }) => {
378
+ return { ...state, selectedSectionSysName: sectionSysName };
379
+ }), on(objectFormActions$1.loadSectionFilesPending, (state) => {
380
+ return { ...state, sectionFiles: [] };
381
+ }), on(objectFormActions$1.loadSectionFilesSuccess, (state, { sectionFiles }) => {
382
+ return { ...state, sectionFiles: sectionFiles };
383
+ }), on(objectFormActions$1.toggleCheckRequired, (state) => {
384
+ return { ...state, isCheckRequired: !state.isCheckRequired };
385
+ }), on(objectFormActions$1.updateCheckRequired, (state, { isCheckRequired }) => {
386
+ return { ...state, isCheckRequired: isCheckRequired };
387
+ }), on(objectFormActions$1.loadPreviewTemplatePending, (state) => {
388
+ return { ...state, isLoading: true };
389
+ }), on(objectFormActions$1.loadPreviewTemplateSuccess, (state, { templateSettings, templateSysName }) => {
390
+ return {
391
+ ...state,
392
+ isLoading: false,
393
+ settings: templateSettings,
394
+ menuModel: fromHelpers.getPreviewMenuModel(templateSettings, templateSysName)
395
+ };
396
+ }), on(objectFormActions$1.loadPreviewTemplateError, (state) => {
397
+ return { ...state, isLoading: false };
398
+ }), on(objectFormActions$1.checkAllDependencyRules, (state) => {
399
+ const dependenceResults = state.settings?.dependenceRules.rules
400
+ .map(rule => (fromHelpers.checkDependenceRule(rule, state.sectionValues)))
401
+ .flat() || [];
402
+ return { ...state, dependencyRuleCheckResults: dependenceResults };
403
+ }));
404
+ function objectReducer(state, action) {
405
+ return objectReducerCreator(state, action);
406
+ }
407
+
408
+ class ObjectFormEffects {
409
+ constructor(_actions$, _store, _router, _applicationService, _toasterService) {
410
+ this._actions$ = _actions$;
411
+ this._store = _store;
412
+ this._router = _router;
413
+ this._applicationService = _applicationService;
414
+ this._toasterService = _toasterService;
415
+ this._autoSaveStore = inject(AutoSaveStore);
416
+ this.loadTemplatePending$ = createEffect(() => this._actions$.pipe(ofType(EApplicationActions$1.LoadTemplatePending), withLatestFrom(this._store.select(sharedSelectors$1.selectRouteNestedParam('objectId')), this._store.select(sharedSelectors$1.selectRouteNestedParam('templateSysName'))), switchMap(([_, applicationId, templateSysName]) => {
417
+ if (applicationId) {
418
+ return this._applicationService.getTemplate(applicationId).pipe(switchMap(({ templateSysName }) => ([
419
+ objectFormActions$1.loadTemplateSuccess({ templateSysName }),
420
+ objectFormActions$1.loadApplicationPending({ templateSysName })
421
+ ])), catchError(() => {
422
+ return of(objectFormActions$1.loadTemplateError());
423
+ }));
424
+ }
425
+ else {
426
+ return of(objectFormActions$1.loadPreviewTemplatePending({ templateSysName }));
427
+ }
428
+ })));
429
+ this.loadPreviewTemplatePending = createEffect(() => this._actions$.pipe(ofType(EApplicationActions$1.LoadPreviewTemplatePending), map((props) => props.templateSysName), withLatestFrom(this._store.select(sharedSelectors$1.selectRouteNestedParam('sectionSysName'))), switchMap(([templateSysName, sectionSysName]) => {
430
+ return this._applicationService.getTemplateSettings(templateSysName).pipe(map((templateSettings) => {
431
+ const activeSection = templateSettings.sections.find((s) => s.sysName === sectionSysName);
432
+ if (!activeSection && templateSettings.sections.length) {
433
+ this._router.navigate([`/form/application/preview/${templateSysName}/${templateSettings.sections[0].sysName}`]);
434
+ }
435
+ return objectFormActions$1.loadPreviewTemplateSuccess({ templateSettings, templateSysName });
436
+ }), catchError((error) => {
437
+ return of(objectFormActions$1.loadPreviewTemplateError());
438
+ }));
439
+ })));
440
+ this.loadApplicationPending$ = createEffect(() => this._actions$.pipe(ofType(EApplicationActions$1.LoadApplicationPending), map((props) => props.templateSysName), withLatestFrom(this._store.select(sharedSelectors$1.selectRouteNestedParam('objectId')), this._store.select(sharedSelectors$1.selectRouteNestedParam('sectionSysName'))), switchMap(([templateSysName, applicationId, sectionSysName]) => {
441
+ const requests = [
442
+ this._applicationService.getTemplateSettings(templateSysName),
443
+ this._applicationService.getSectionValues(applicationId)
444
+ ];
445
+ return forkJoin(requests).pipe(switchMap(([templateSettings, valueDto]) => {
446
+ const activeSection = templateSettings.sections.find((s) => s.sysName === sectionSysName);
447
+ if (!activeSection && templateSettings.sections.length) {
448
+ this._router.navigate([`/form/application/${applicationId}/${templateSettings.sections[0].sysName}`]);
449
+ }
450
+ return [
451
+ objectFormActions$1.loadApplicationSuccess({
452
+ templateSettings: templateSettings,
453
+ sectionValues: valueDto.value.sectionValues,
454
+ applicationId: applicationId,
455
+ isDraft: valueDto.isDraft
456
+ }),
457
+ objectFormActions$1.checkAllDependencyRules()
458
+ ];
459
+ }), catchError(() => {
460
+ return of(objectFormActions$1.loadApplicationError());
461
+ }));
462
+ })));
463
+ this.checkCanUpdateValues$ = createEffect(() => this._actions$.pipe(ofType(EApplicationActions$1.UpdateValues), map((props) => props.value), distinctUntilChanged(), withLatestFrom(this._store.select(sharedSelectors$1.selectRouteNestedParam('templateSysName'))), tap(([value, templateSysName]) => {
464
+ if (templateSysName) {
465
+ return;
466
+ }
467
+ this._store.dispatch(objectFormActions$1.accessUpdateValues());
468
+ })), { dispatch: false });
469
+ this.saveValuesDebounced$ = createEffect(() => this._actions$.pipe(ofType(EApplicationActions$1.AccessUpdateValues), distinctUntilChanged(), debounceTime(1500), tap(() => {
470
+ this._autoSaveStore.start();
471
+ this._store.dispatch(objectFormActions$1.saveValuesPending());
472
+ })), { dispatch: false });
473
+ this.updateApplicationValues$ = createEffect(() => this._actions$.pipe(ofType(EApplicationActions$1.SaveValuesPending), withLatestFrom(this._store.select(sharedSelectors$1.selectRouteNestedParam('objectId')), this._store.select(objectFormSelectors$1.selectSectionValues)), switchMap(([_, applicationId, sectionValues]) => {
474
+ return this._applicationService.updateApplicationValues(applicationId, sectionValues).pipe(map((result) => {
475
+ this._autoSaveStore.success();
476
+ return objectFormActions$1.saveValuesSuccess({ result, applicationId });
477
+ }), catchError((error) => {
478
+ this._autoSaveStore.error();
479
+ return of(objectFormActions$1.saveValuesError());
480
+ }));
481
+ })));
482
+ this.saveApplicationPending$ = createEffect(() => this._actions$.pipe(ofType(EApplicationActions$1.SaveApplicationPending), withLatestFrom(this._store.select(sharedSelectors$1.selectRouteNestedParam('objectId'))), switchMap(([_, applicationId]) => {
483
+ return this._applicationService.saveApplication(applicationId).pipe(map(() => {
484
+ this._toasterService.show({
485
+ title: 'Сохранено успешно',
486
+ type: ToasterType.Positive
487
+ });
488
+ return objectFormActions$1.saveApplicationSuccess();
489
+ }), catchError(() => {
490
+ this._toasterService.show({
491
+ title: 'Возникли ошибки при сохранении, повторите',
492
+ type: ToasterType.Negative
493
+ });
494
+ return of(objectFormActions$1.saveApplicationError());
495
+ }));
496
+ })));
497
+ this.copyApplicationPending$ = createEffect(() => this._actions$.pipe(ofType(EApplicationActions$1.CopyApplicationPending), map((action) => action), switchMap((action) => {
498
+ return this._applicationService.copyApplication(action).pipe(map((result) => {
499
+ this._toasterService.show({
500
+ title: 'Копировнаие прошло успешно',
501
+ type: ToasterType.Positive
502
+ });
503
+ window.open('/form/application/' + result.id, '_blank');
504
+ return objectFormActions$1.copyApplicationSuccess();
505
+ }), catchError(() => {
506
+ this._toasterService.show({
507
+ title: 'Возникли ошибки при копировании заявки, повторите',
508
+ type: ToasterType.Negative
509
+ });
510
+ return of(objectFormActions$1.copyApplicationError());
511
+ }));
512
+ })), { dispatch: false });
513
+ this.loadSectionFilesPending$ = createEffect(() => this._actions$.pipe(ofType(EApplicationActions$1.LoadSectionFilesPending), withLatestFrom(this._store.select(sharedSelectors$1.selectRouteNestedParam('objectId')), this._store.select(sharedSelectors$1.selectRouteNestedParam('sectionSysName'))), switchMap(([_, applicationId, sectionSysName]) => {
514
+ return this._applicationService.getSectionFiles(applicationId, sectionSysName).pipe(map((sectionFiles) => {
515
+ return objectFormActions$1.loadSectionFilesSuccess({ sectionFiles: sectionFiles });
516
+ }), catchError(() => {
517
+ return of(objectFormActions$1.loadSectionFilesError());
518
+ }));
519
+ })));
520
+ }
521
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormEffects, deps: [{ token: i1.Actions }, { token: i2.Store }, { token: i3.Router }, { token: i4.ObjectFormService }, { token: i5.ToasterService }], target: i0.ɵɵFactoryTarget.Injectable }); }
522
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormEffects }); }
523
+ }
524
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ObjectFormEffects, decorators: [{
525
+ type: Injectable
526
+ }], ctorParameters: () => [{ type: i1.Actions }, { type: i2.Store }, { type: i3.Router }, { type: i4.ObjectFormService }, { type: i5.ToasterService }] });
527
+
528
+ const initialObjectFormState = {
529
+ isLoading: false,
530
+ isEdited: false,
531
+ isCheckRequired: false,
532
+ isObjectSaveLoading: false,
533
+ settings: null,
534
+ selectedSectionSysName: null,
535
+ sectionValues: [],
536
+ menuModel: {
537
+ items: []
538
+ },
539
+ sectionFiles: [],
540
+ dependencyRuleCheckResults: []
541
+ };
542
+
543
+ class SharedStoreModule {
544
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SharedStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
545
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: SharedStoreModule, imports: [CommonModule, i1.EffectsFeatureModule, i2.StoreFeatureModule] }); }
546
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SharedStoreModule, imports: [CommonModule,
547
+ EffectsModule.forFeature(EFFECTS$1),
548
+ StoreModule.forFeature(FORM_SHARED_STORE_MODULE_NAME, sharedStoreReducer$1)] }); }
549
+ }
550
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SharedStoreModule, decorators: [{
551
+ type: NgModule,
552
+ args: [{
553
+ imports: [
554
+ CommonModule,
555
+ EffectsModule.forFeature(EFFECTS$1),
556
+ StoreModule.forFeature(FORM_SHARED_STORE_MODULE_NAME, sharedStoreReducer$1),
557
+ ]
558
+ }]
559
+ }] });
560
+
561
+ const EFFECTS = [];
562
+
563
+ const sharedStoreReducer = {
564
+ [ROUTER_STATE_NAME]: routerReducer
565
+ };
566
+
567
+ const initialSharedStoreState = {};
568
+
569
+ const selectRouteNestedParams = createSelector(selectRouter, (router) => {
570
+ let currentRoute = router?.state?.root;
571
+ let params = {};
572
+ while (currentRoute?.firstChild) {
573
+ currentRoute = currentRoute.firstChild;
574
+ params = {
575
+ ...params,
576
+ ...currentRoute.params,
577
+ };
578
+ }
579
+ return params;
580
+ });
581
+ const selectRouteNestedParam = (param) => createSelector(selectRouteNestedParams, (params) => {
582
+ return params && params[param];
583
+ });
584
+ const selectTemplateSysName = createSelector(selectRouteNestedParam('templateSysName'), (rparam) => {
585
+ return rparam || null;
586
+ });
587
+ const selectIdFromQuery = createSelector(selectQueryParam('id'), (rparam) => {
588
+ return rparam || null;
589
+ });
590
+ const selectSectionSysName = createSelector(selectRouteParam('sectionSysName'), (rparam) => {
591
+ return rparam || null;
592
+ });
593
+
594
+ var sharedStore_selector = /*#__PURE__*/Object.freeze({
595
+ __proto__: null,
596
+ selectIdFromQuery: selectIdFromQuery,
597
+ selectRouteNestedParam: selectRouteNestedParam,
598
+ selectRouteNestedParams: selectRouteNestedParams,
599
+ selectSectionSysName: selectSectionSysName,
600
+ selectTemplateSysName: selectTemplateSysName
601
+ });
602
+
603
+ var TemplateStatus;
604
+ (function (TemplateStatus) {
605
+ TemplateStatus[TemplateStatus["draft"] = 0] = "draft";
606
+ TemplateStatus[TemplateStatus["active"] = 1] = "active";
607
+ TemplateStatus[TemplateStatus["archived"] = 2] = "archived";
608
+ })(TemplateStatus || (TemplateStatus = {}));
609
+ const templateStatusCaption = {
610
+ [TemplateStatus.draft]: 'черновик',
611
+ [TemplateStatus.active]: 'активен',
612
+ [TemplateStatus.archived]: 'архив',
613
+ };
614
+ const getTemplateStatusText = (status) => {
615
+ return templateStatusCaption[status];
616
+ };
617
+
618
+ var ComponentSizeEnum;
619
+ (function (ComponentSizeEnum) {
620
+ ComponentSizeEnum["Large"] = "large";
621
+ ComponentSizeEnum["Medium"] = "medium";
622
+ ComponentSizeEnum["Small"] = "small";
623
+ })(ComponentSizeEnum || (ComponentSizeEnum = {}));
624
+
625
+ var DateFormatEnum;
626
+ (function (DateFormatEnum) {
627
+ DateFormatEnum["Day"] = "\u0434\u0434.\u043C\u043C.\u0433\u0433\u0433\u0433";
628
+ DateFormatEnum["Month"] = "\u043C\u043C.\u0433\u0433\u0433\u0433";
629
+ DateFormatEnum["Year"] = "\u0433\u0433\u0433\u0433";
630
+ })(DateFormatEnum || (DateFormatEnum = {}));
631
+ const DateFormatLabelEnum = {
632
+ [DateFormatEnum.Day]: 'дд.мм.гггг',
633
+ [DateFormatEnum.Month]: 'мм.гггг',
634
+ [DateFormatEnum.Year]: 'гггг',
635
+ };
636
+
637
+ var DateTypeEnum;
638
+ (function (DateTypeEnum) {
639
+ DateTypeEnum["Date"] = "date";
640
+ DateTypeEnum["DateTime"] = "date-time";
641
+ })(DateTypeEnum || (DateTypeEnum = {}));
642
+ const DateTypeLabelEnum = {
643
+ [DateTypeEnum.Date]: 'Дата',
644
+ [DateTypeEnum.DateTime]: 'Дата и время',
645
+ };
646
+
647
+ var InnTypeEnum;
648
+ (function (InnTypeEnum) {
649
+ InnTypeEnum["Personal"] = "personal";
650
+ InnTypeEnum["Legal"] = "legal";
651
+ InnTypeEnum["ForeignLegal"] = "foreign-legal";
652
+ })(InnTypeEnum || (InnTypeEnum = {}));
653
+ const InnTypeLabelEnum = {
654
+ [InnTypeEnum.Personal]: 'ФЛ/ИП',
655
+ [InnTypeEnum.Legal]: 'ЮЛ',
656
+ [InnTypeEnum.ForeignLegal]: 'Иностранное ЮЛ',
657
+ };
658
+
659
+ var InputState;
660
+ (function (InputState) {
661
+ InputState["Edit"] = "edit";
662
+ InputState["Auto"] = "auto";
663
+ InputState["Formula"] = "formula";
664
+ })(InputState || (InputState = {}));
665
+ var CustomInputStateEnum;
666
+ (function (CustomInputStateEnum) {
667
+ CustomInputStateEnum[CustomInputStateEnum["Edit"] = 0] = "Edit";
668
+ CustomInputStateEnum[CustomInputStateEnum["Auto"] = 1] = "Auto";
669
+ CustomInputStateEnum[CustomInputStateEnum["Formula"] = 2] = "Formula";
670
+ })(CustomInputStateEnum || (CustomInputStateEnum = {}));
671
+ const CustomInputStateEnumLabel = {
672
+ [CustomInputStateEnum.Edit]: InputState.Edit,
673
+ [CustomInputStateEnum.Auto]: InputState.Auto,
674
+ [CustomInputStateEnum.Formula]: InputState.Formula,
675
+ };
676
+
677
+ var ComponentType;
678
+ (function (ComponentType) {
679
+ ComponentType["Section"] = "section";
680
+ ComponentType["Group"] = "group";
681
+ ComponentType["InputText"] = "inputText";
682
+ ComponentType["InputTextarea"] = "inputTextarea";
683
+ ComponentType["InputSwitch"] = "inputSwitch";
684
+ ComponentType["InputLink"] = "inputLink";
685
+ ComponentType["InputSelect"] = "inputSelect";
686
+ ComponentType["InputNumber"] = "inputNumber";
687
+ ComponentType["InputDate"] = "inputDate";
688
+ ComponentType["InputINN"] = "inputINN";
689
+ ComponentType["InputFile"] = "inputFile";
690
+ ComponentType["InputPhone"] = "inputPhone";
691
+ ComponentType["InputCheckboxGroup"] = "inputCheckboxGroup";
692
+ ComponentType["InputRadioGroup"] = "inputRadioGroup";
693
+ ComponentType["InputTable"] = "inputTable";
694
+ ComponentType["ContentTitle"] = "title";
695
+ ComponentType["ContentText"] = "text";
696
+ ComponentType["ContentTooltip"] = "tooltip";
697
+ ComponentType["ContentFile"] = "file";
698
+ ComponentType["ContentDivider"] = "divider";
699
+ })(ComponentType || (ComponentType = {}));
700
+ const ComponentShortType = {
701
+ [ComponentType.Section]: 's',
702
+ [ComponentType.Group]: 'g',
703
+ [ComponentType.InputText]: 'itt',
704
+ [ComponentType.InputTextarea]: 'ita',
705
+ [ComponentType.InputSwitch]: 'isw',
706
+ [ComponentType.InputLink]: 'il',
707
+ [ComponentType.InputSelect]: 'ist',
708
+ [ComponentType.InputNumber]: 'in',
709
+ [ComponentType.InputDate]: 'id',
710
+ [ComponentType.InputINN]: 'inn',
711
+ [ComponentType.InputFile]: 'if',
712
+ [ComponentType.InputPhone]: 'ip',
713
+ [ComponentType.InputCheckboxGroup]: 'icg',
714
+ [ComponentType.InputRadioGroup]: 'irg',
715
+ [ComponentType.InputTable]: 'itb',
716
+ [ComponentType.ContentTitle]: 'ct',
717
+ [ComponentType.ContentText]: 'ctt',
718
+ [ComponentType.ContentTooltip]: 'ctp',
719
+ [ComponentType.ContentFile]: 'cf',
720
+ [ComponentType.ContentDivider]: 'cd',
721
+ };
722
+
723
+ var ValueType;
724
+ (function (ValueType) {
725
+ ValueType["Undefined"] = "undefined";
726
+ ValueType["Short"] = "short";
727
+ ValueType["Int"] = "int";
728
+ ValueType["Long"] = "long";
729
+ ValueType["Float"] = "float";
730
+ ValueType["Double"] = "double";
731
+ ValueType["Decimal"] = "decimal";
732
+ ValueType["String"] = "string";
733
+ ValueType["Guid"] = "guid";
734
+ ValueType["DateTime"] = "dateTime";
735
+ ValueType["Boolean"] = "boolean";
736
+ ValueType["IntArray"] = "int[]";
737
+ ValueType["StringArray"] = "string[]";
738
+ ValueType["GuidArray"] = "guid[]";
739
+ })(ValueType || (ValueType = {}));
740
+
741
+ var ConditionOperatorType;
742
+ (function (ConditionOperatorType) {
743
+ ConditionOperatorType["undefined"] = "undefined";
744
+ ConditionOperatorType["filled"] = "filled";
745
+ })(ConditionOperatorType || (ConditionOperatorType = {}));
746
+ const getConditionOperatorsList = () => {
747
+ return [{
748
+ value: ConditionOperatorType.filled,
749
+ text: conditionOperatorTypeLabel[ConditionOperatorType.filled]
750
+ }];
751
+ };
752
+ const conditionOperatorTypeLabel = {
753
+ [ConditionOperatorType.filled]: 'заполнено'
754
+ };
755
+
756
+ var LogicalOperatorType;
757
+ (function (LogicalOperatorType) {
758
+ LogicalOperatorType["undefined"] = "undefined";
759
+ LogicalOperatorType["or"] = "or";
760
+ LogicalOperatorType["and"] = "and";
761
+ })(LogicalOperatorType || (LogicalOperatorType = {}));
762
+
763
+ var DependenceActionType;
764
+ (function (DependenceActionType) {
765
+ DependenceActionType["undefined"] = "undefined";
766
+ DependenceActionType["show"] = "show";
767
+ })(DependenceActionType || (DependenceActionType = {}));
768
+ const getDependenceActionsList = () => {
769
+ return [{
770
+ value: DependenceActionType.show,
771
+ text: 'показать'
772
+ }];
773
+ };
774
+
775
+ var TemplateComponentsGroupTypeEnum;
776
+ (function (TemplateComponentsGroupTypeEnum) {
777
+ TemplateComponentsGroupTypeEnum[TemplateComponentsGroupTypeEnum["Components"] = 1] = "Components";
778
+ TemplateComponentsGroupTypeEnum[TemplateComponentsGroupTypeEnum["Content"] = 2] = "Content";
779
+ })(TemplateComponentsGroupTypeEnum || (TemplateComponentsGroupTypeEnum = {}));
780
+ const TemplateComponentsGroupTypeLabels = {
781
+ [TemplateComponentsGroupTypeEnum.Components]: 'Поля',
782
+ [TemplateComponentsGroupTypeEnum.Content]: 'Контент',
783
+ };
784
+
785
+ function isNumeric(str) {
786
+ if (typeof str != 'string') {
787
+ return false; // we only process strings!
788
+ }
789
+ return !isNaN(str) && !isNaN(parseInt(str)) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...
790
+ !isNaN(parseFloat(str)); // ...and ensure strings of whitespace fail
791
+ }
792
+ const isNullOrUndefined = (model) => {
793
+ return model === null || typeof model === 'undefined';
794
+ };
795
+
796
+ class ConcurrencyInterceptor {
797
+ constructor(_toasterService) {
798
+ this._toasterService = _toasterService;
799
+ }
800
+ intercept(req, next) {
801
+ return next.handle(req).pipe(catchError(error => {
802
+ return this.handleError(error);
803
+ }));
804
+ }
805
+ handleError(error) {
806
+ if (error.status === 409) {
807
+ this._toasterService.show({
808
+ title: 'Данные были изменены.',
809
+ message: 'Для продолжения работы обновите страницу.',
810
+ type: ToasterType.Negative
811
+ });
812
+ }
813
+ return throwError(error);
814
+ }
815
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConcurrencyInterceptor, deps: [{ token: i5.ToasterService }], target: i0.ɵɵFactoryTarget.Injectable }); }
816
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConcurrencyInterceptor }); }
817
+ }
818
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConcurrencyInterceptor, decorators: [{
819
+ type: Injectable
820
+ }], ctorParameters: () => [{ type: i5.ToasterService }] });
821
+
822
+ const tokenKey = 'Csy-Token';
823
+ const eTag = "ETag";
824
+ const ifMatch = "If-Match";
825
+ class ConcurrencyStoreService {
826
+ constructor() {
827
+ this._store = {};
828
+ }
829
+ get(key) {
830
+ const info = this._store[key];
831
+ if (!info) {
832
+ return null;
833
+ }
834
+ return info;
835
+ }
836
+ set(key, info) {
837
+ this._store[key] = info;
838
+ }
839
+ getHeaders(key) {
840
+ let headers = new HttpHeaders();
841
+ if (key) {
842
+ const info = this.get(key);
843
+ if (info?.token) {
844
+ headers = headers.append(tokenKey, info.token);
845
+ }
846
+ if (info?.eTag) {
847
+ headers = headers.append(ifMatch, info.eTag);
848
+ }
849
+ }
850
+ return { headers: headers, observe: 'response' };
851
+ }
852
+ appendHeaders(key, headers) {
853
+ if (key) {
854
+ const info = this.get(key);
855
+ if (info?.token) {
856
+ headers = headers.set(tokenKey, info.token);
857
+ }
858
+ if (info?.eTag) {
859
+ headers = headers.set(ifMatch, info.eTag);
860
+ }
861
+ }
862
+ return headers;
863
+ }
864
+ fromHeaders(key, response) {
865
+ if (key) {
866
+ const info = {
867
+ token: response.headers.get(tokenKey),
868
+ eTag: response.headers.get(eTag)
869
+ };
870
+ if (info.token || info.eTag) {
871
+ this.set(key, info);
872
+ }
873
+ }
874
+ }
875
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConcurrencyStoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
876
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConcurrencyStoreService }); }
877
+ }
878
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConcurrencyStoreService, decorators: [{
879
+ type: Injectable
880
+ }] });
881
+
882
+ /*
883
+ * Public API Surface of myrtex-form
884
+ */
885
+
886
+ /**
887
+ * Generated bundle index. Do not edit.
888
+ */
889
+
890
+ export { ComponentShortType, ComponentSizeEnum, ComponentType, ConcurrencyInterceptor, ConcurrencyStoreService, ConditionOperatorType, CustomInputStateEnum, CustomInputStateEnumLabel, DateFormatEnum, DateFormatLabelEnum, DateTypeEnum, DateTypeLabelEnum, DependenceActionType, EApplicationActions, EFFECTS, InnTypeEnum, InnTypeLabelEnum, InputState, LogicalOperatorType, ObjectFormEffects, ObjectFormModule, SharedStoreModule, TemplateComponentsGroupTypeEnum, TemplateComponentsGroupTypeLabels, TemplateStatus, ValueType, conditionOperatorTypeLabel, getConditionOperatorsList, getDependenceActionsList, getTemplateStatusText, initialObjectFormState, initialSharedStoreState, isNullOrUndefined, isNumeric, objectForm_actions as objectFormActions, objectForm_selector as objectFormSelectors, objectReducer, sharedStore_selector as sharedSelectors, sharedStoreReducer };
891
+ //# sourceMappingURL=myrtex-org-form.mjs.map