@redneckz/wildless-cms-uni-blocks 0.14.600 → 0.14.602

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 (589) hide show
  1. package/bundle/EventBus/EventBus.d.ts +4 -17
  2. package/bundle/EventBus/defaultEventBus.d.ts +13 -2
  3. package/bundle/EventBus/useLatestEvent.d.ts +2 -0
  4. package/bundle/api/RetailApi/RetailApi.d.ts +1 -0
  5. package/bundle/blocks.schema.json +1 -1
  6. package/bundle/bundle.umd.js +243 -258
  7. package/bundle/bundle.umd.min.js +1 -1
  8. package/bundle/components/ApplicationLeadForm/consents.d.ts +7 -1
  9. package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +11 -9
  10. package/bundle/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +6 -0
  11. package/bundle/hooks/useLocation.d.ts +1 -2
  12. package/bundle/model/LinkProps.d.ts +3 -1
  13. package/bundle/ui-kit/Checkbox/CheckboxWithDoc.d.ts +6 -0
  14. package/bundle/ui-kit/Checkbox/getDocument.d.ts +1 -0
  15. package/bundle/ui-kit/Foldable/Foldable.d.ts +1 -11
  16. package/bundle/ui-kit/FormField/Fields/ConsentField.d.ts +2 -0
  17. package/dist/EventBus/EventBus.d.ts +4 -17
  18. package/dist/EventBus/EventBus.js +10 -29
  19. package/dist/EventBus/EventBus.js.map +1 -1
  20. package/dist/EventBus/defaultEventBus.d.ts +13 -2
  21. package/dist/EventBus/defaultEventBus.js.map +1 -1
  22. package/dist/EventBus/useLatestEvent.d.ts +2 -0
  23. package/dist/EventBus/useLatestEvent.js +11 -0
  24. package/dist/EventBus/useLatestEvent.js.map +1 -0
  25. package/dist/api/RetailApi/RetailApi.d.ts +1 -0
  26. package/dist/api/RetailApi/RetailApi.js +1 -0
  27. package/dist/api/RetailApi/RetailApi.js.map +1 -1
  28. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -2
  29. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  30. package/dist/components/ApplicationLeadForm/GroupedConsents.js +1 -1
  31. package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  32. package/dist/components/ApplicationLeadForm/consents.d.ts +7 -1
  33. package/dist/components/ApplicationLeadForm/consents.js +33 -10
  34. package/dist/components/ApplicationLeadForm/consents.js.map +1 -1
  35. package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +11 -9
  36. package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  37. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -7
  38. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  39. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +25 -11
  40. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  41. package/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +6 -0
  42. package/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.js +2 -0
  43. package/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +1 -0
  44. package/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  45. package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  46. package/dist/components/Header/HeaderSecondaryMenu.js +1 -1
  47. package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  48. package/dist/components/OfficesAtmsMap/AtmsMap.js +1 -1
  49. package/dist/components/OfficesAtmsMap/AtmsMap.js.map +1 -1
  50. package/dist/components/OfficesAtmsMap/OfficesMap.js +1 -1
  51. package/dist/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
  52. package/dist/components/StickyBottomMenu/BurgerMenuDialog.js +1 -1
  53. package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  54. package/dist/hooks/useLocation.d.ts +1 -2
  55. package/dist/hooks/useLocation.js +33 -27
  56. package/dist/hooks/useLocation.js.map +1 -1
  57. package/dist/hooks/useRegions.js +1 -3
  58. package/dist/hooks/useRegions.js.map +1 -1
  59. package/dist/model/LinkProps.d.ts +3 -1
  60. package/dist/ui-kit/Checkbox/CheckboxWithDoc.d.ts +6 -0
  61. package/dist/ui-kit/Checkbox/CheckboxWithDoc.js +21 -0
  62. package/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -0
  63. package/dist/ui-kit/Checkbox/getDocument.d.ts +1 -0
  64. package/dist/ui-kit/Checkbox/getDocument.js +9 -0
  65. package/dist/ui-kit/Checkbox/getDocument.js.map +1 -0
  66. package/dist/ui-kit/DialogManager/useDialogManager.js +3 -3
  67. package/dist/ui-kit/DialogManager/useDialogManager.js.map +1 -1
  68. package/dist/ui-kit/DialogManager/useDialogsList.js +1 -1
  69. package/dist/ui-kit/DialogManager/useDialogsList.js.map +1 -1
  70. package/dist/ui-kit/Foldable/Foldable.d.ts +1 -11
  71. package/dist/ui-kit/Foldable/Foldable.js +2 -10
  72. package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
  73. package/dist/ui-kit/FormField/Fields/ConsentField.d.ts +2 -0
  74. package/dist/ui-kit/FormField/Fields/ConsentField.js +10 -0
  75. package/dist/ui-kit/FormField/Fields/ConsentField.js.map +1 -0
  76. package/dist/ui-kit/FormField/constants.js +0 -1
  77. package/dist/ui-kit/FormField/constants.js.map +1 -1
  78. package/dist/ui-kit/FormField/getField.js +10 -17
  79. package/dist/ui-kit/FormField/getField.js.map +1 -1
  80. package/dist/ui-kit/FormField/getValidation.js +0 -1
  81. package/dist/ui-kit/FormField/getValidation.js.map +1 -1
  82. package/dist/ui-kit/LocationDialog/LocationDialog.js +12 -9
  83. package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  84. package/dist/ui-kit/PopupManager/PopupManager.js +1 -1
  85. package/dist/ui-kit/PopupManager/PopupManager.js.map +1 -1
  86. package/dist/ui-kit/PopupManager/usePopupManager.js +3 -3
  87. package/dist/ui-kit/PopupManager/usePopupManager.js.map +1 -1
  88. package/lib/EventBus/EventBus.d.ts +4 -17
  89. package/lib/EventBus/EventBus.js +10 -29
  90. package/lib/EventBus/EventBus.js.map +1 -1
  91. package/lib/EventBus/defaultEventBus.d.ts +13 -2
  92. package/lib/EventBus/defaultEventBus.js.map +1 -1
  93. package/lib/EventBus/useLatestEvent.d.ts +2 -0
  94. package/lib/EventBus/useLatestEvent.js +8 -0
  95. package/lib/EventBus/useLatestEvent.js.map +1 -0
  96. package/lib/api/RetailApi/RetailApi.d.ts +1 -0
  97. package/lib/api/RetailApi/RetailApi.js +1 -0
  98. package/lib/api/RetailApi/RetailApi.js.map +1 -1
  99. package/lib/common.css +1 -1
  100. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -2
  101. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  102. package/lib/components/ApplicationLeadForm/GroupedConsents.js +1 -1
  103. package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  104. package/lib/components/ApplicationLeadForm/consents.d.ts +7 -1
  105. package/lib/components/ApplicationLeadForm/consents.js +33 -10
  106. package/lib/components/ApplicationLeadForm/consents.js.map +1 -1
  107. package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +11 -9
  108. package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  109. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -7
  110. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  111. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +26 -12
  112. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  113. package/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +6 -0
  114. package/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js +2 -0
  115. package/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +1 -0
  116. package/lib/components/ExchangeRateTile/ExchangeRateTile.js +2 -2
  117. package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  118. package/lib/components/Header/HeaderSecondaryMenu.js +2 -2
  119. package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  120. package/lib/components/OfficesAtmsMap/AtmsMap.js +2 -2
  121. package/lib/components/OfficesAtmsMap/AtmsMap.js.map +1 -1
  122. package/lib/components/OfficesAtmsMap/OfficesMap.js +2 -2
  123. package/lib/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
  124. package/lib/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
  125. package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  126. package/lib/hooks/useLocation.d.ts +1 -2
  127. package/lib/hooks/useLocation.js +33 -26
  128. package/lib/hooks/useLocation.js.map +1 -1
  129. package/lib/hooks/useRegions.js +1 -3
  130. package/lib/hooks/useRegions.js.map +1 -1
  131. package/lib/model/LinkProps.d.ts +3 -1
  132. package/lib/ui-kit/Checkbox/CheckboxWithDoc.d.ts +6 -0
  133. package/lib/ui-kit/Checkbox/CheckboxWithDoc.js +19 -0
  134. package/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -0
  135. package/lib/ui-kit/Checkbox/getDocument.d.ts +1 -0
  136. package/lib/ui-kit/Checkbox/getDocument.js +6 -0
  137. package/lib/ui-kit/Checkbox/getDocument.js.map +1 -0
  138. package/lib/ui-kit/DialogManager/useDialogManager.js +3 -3
  139. package/lib/ui-kit/DialogManager/useDialogManager.js.map +1 -1
  140. package/lib/ui-kit/DialogManager/useDialogsList.js +1 -1
  141. package/lib/ui-kit/DialogManager/useDialogsList.js.map +1 -1
  142. package/lib/ui-kit/Foldable/Foldable.d.ts +1 -11
  143. package/lib/ui-kit/Foldable/Foldable.js +2 -10
  144. package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
  145. package/lib/ui-kit/FormField/Fields/ConsentField.d.ts +2 -0
  146. package/lib/ui-kit/FormField/Fields/ConsentField.js +8 -0
  147. package/lib/ui-kit/FormField/Fields/ConsentField.js.map +1 -0
  148. package/lib/ui-kit/FormField/constants.js +0 -1
  149. package/lib/ui-kit/FormField/constants.js.map +1 -1
  150. package/lib/ui-kit/FormField/getField.js +10 -17
  151. package/lib/ui-kit/FormField/getField.js.map +1 -1
  152. package/lib/ui-kit/FormField/getValidation.js +0 -1
  153. package/lib/ui-kit/FormField/getValidation.js.map +1 -1
  154. package/lib/ui-kit/LocationDialog/LocationDialog.js +13 -10
  155. package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  156. package/lib/ui-kit/PopupManager/PopupManager.js +1 -1
  157. package/lib/ui-kit/PopupManager/PopupManager.js.map +1 -1
  158. package/lib/ui-kit/PopupManager/usePopupManager.js +3 -3
  159. package/lib/ui-kit/PopupManager/usePopupManager.js.map +1 -1
  160. package/mobile/bundle/EventBus/EventBus.d.ts +4 -17
  161. package/mobile/bundle/EventBus/defaultEventBus.d.ts +13 -2
  162. package/mobile/bundle/EventBus/useLatestEvent.d.ts +2 -0
  163. package/mobile/bundle/api/RetailApi/RetailApi.d.ts +1 -0
  164. package/mobile/bundle/bundle.umd.js +243 -258
  165. package/mobile/bundle/bundle.umd.min.js +1 -1
  166. package/mobile/bundle/components/ApplicationLeadForm/consents.d.ts +7 -1
  167. package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +11 -9
  168. package/mobile/bundle/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +6 -0
  169. package/mobile/bundle/hooks/useLocation.d.ts +1 -2
  170. package/mobile/bundle/model/LinkProps.d.ts +3 -1
  171. package/mobile/bundle/ui-kit/Checkbox/CheckboxWithDoc.d.ts +6 -0
  172. package/mobile/bundle/ui-kit/Checkbox/getDocument.d.ts +1 -0
  173. package/mobile/bundle/ui-kit/Foldable/Foldable.d.ts +1 -11
  174. package/mobile/bundle/ui-kit/FormField/Fields/ConsentField.d.ts +2 -0
  175. package/mobile/dist/EventBus/EventBus.d.ts +4 -17
  176. package/mobile/dist/EventBus/EventBus.js +10 -29
  177. package/mobile/dist/EventBus/EventBus.js.map +1 -1
  178. package/mobile/dist/EventBus/defaultEventBus.d.ts +13 -2
  179. package/mobile/dist/EventBus/defaultEventBus.js.map +1 -1
  180. package/mobile/dist/EventBus/useLatestEvent.d.ts +2 -0
  181. package/mobile/dist/EventBus/useLatestEvent.js +11 -0
  182. package/mobile/dist/EventBus/useLatestEvent.js.map +1 -0
  183. package/mobile/dist/api/RetailApi/RetailApi.d.ts +1 -0
  184. package/mobile/dist/api/RetailApi/RetailApi.js +1 -0
  185. package/mobile/dist/api/RetailApi/RetailApi.js.map +1 -1
  186. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -2
  187. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  188. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js +1 -1
  189. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  190. package/mobile/dist/components/ApplicationLeadForm/consents.d.ts +7 -1
  191. package/mobile/dist/components/ApplicationLeadForm/consents.js +33 -10
  192. package/mobile/dist/components/ApplicationLeadForm/consents.js.map +1 -1
  193. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +11 -9
  194. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  195. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -7
  196. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  197. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +25 -11
  198. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  199. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +6 -0
  200. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.js +2 -0
  201. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +1 -0
  202. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  203. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  204. package/mobile/dist/components/Header/HeaderSecondaryMenu.js +1 -1
  205. package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  206. package/mobile/dist/components/OfficesAtmsMap/AtmsMap.js +1 -1
  207. package/mobile/dist/components/OfficesAtmsMap/AtmsMap.js.map +1 -1
  208. package/mobile/dist/components/OfficesAtmsMap/OfficesMap.js +1 -1
  209. package/mobile/dist/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
  210. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js +1 -1
  211. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  212. package/mobile/dist/hooks/useLocation.d.ts +1 -2
  213. package/mobile/dist/hooks/useLocation.js +33 -27
  214. package/mobile/dist/hooks/useLocation.js.map +1 -1
  215. package/mobile/dist/hooks/useRegions.js +1 -3
  216. package/mobile/dist/hooks/useRegions.js.map +1 -1
  217. package/mobile/dist/model/LinkProps.d.ts +3 -1
  218. package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.d.ts +6 -0
  219. package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js +21 -0
  220. package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -0
  221. package/mobile/dist/ui-kit/Checkbox/getDocument.d.ts +1 -0
  222. package/mobile/dist/ui-kit/Checkbox/getDocument.js +9 -0
  223. package/mobile/dist/ui-kit/Checkbox/getDocument.js.map +1 -0
  224. package/mobile/dist/ui-kit/DialogManager/useDialogManager.js +3 -3
  225. package/mobile/dist/ui-kit/DialogManager/useDialogManager.js.map +1 -1
  226. package/mobile/dist/ui-kit/DialogManager/useDialogsList.js +1 -1
  227. package/mobile/dist/ui-kit/DialogManager/useDialogsList.js.map +1 -1
  228. package/mobile/dist/ui-kit/Foldable/Foldable.d.ts +1 -11
  229. package/mobile/dist/ui-kit/Foldable/Foldable.js +2 -10
  230. package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
  231. package/mobile/dist/ui-kit/FormField/Fields/ConsentField.d.ts +2 -0
  232. package/mobile/dist/ui-kit/FormField/Fields/ConsentField.js +10 -0
  233. package/mobile/dist/ui-kit/FormField/Fields/ConsentField.js.map +1 -0
  234. package/mobile/dist/ui-kit/FormField/constants.js +0 -1
  235. package/mobile/dist/ui-kit/FormField/constants.js.map +1 -1
  236. package/mobile/dist/ui-kit/FormField/getField.js +10 -17
  237. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  238. package/mobile/dist/ui-kit/FormField/getValidation.js +0 -1
  239. package/mobile/dist/ui-kit/FormField/getValidation.js.map +1 -1
  240. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +12 -9
  241. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  242. package/mobile/dist/ui-kit/PopupManager/PopupManager.js +1 -1
  243. package/mobile/dist/ui-kit/PopupManager/PopupManager.js.map +1 -1
  244. package/mobile/dist/ui-kit/PopupManager/usePopupManager.js +3 -3
  245. package/mobile/dist/ui-kit/PopupManager/usePopupManager.js.map +1 -1
  246. package/mobile/lib/EventBus/EventBus.d.ts +4 -17
  247. package/mobile/lib/EventBus/EventBus.js +10 -29
  248. package/mobile/lib/EventBus/EventBus.js.map +1 -1
  249. package/mobile/lib/EventBus/defaultEventBus.d.ts +13 -2
  250. package/mobile/lib/EventBus/defaultEventBus.js.map +1 -1
  251. package/mobile/lib/EventBus/useLatestEvent.d.ts +2 -0
  252. package/mobile/lib/EventBus/useLatestEvent.js +8 -0
  253. package/mobile/lib/EventBus/useLatestEvent.js.map +1 -0
  254. package/mobile/lib/api/RetailApi/RetailApi.d.ts +1 -0
  255. package/mobile/lib/api/RetailApi/RetailApi.js +1 -0
  256. package/mobile/lib/api/RetailApi/RetailApi.js.map +1 -1
  257. package/mobile/lib/common.css +1 -1
  258. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -2
  259. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  260. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js +1 -1
  261. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  262. package/mobile/lib/components/ApplicationLeadForm/consents.d.ts +7 -1
  263. package/mobile/lib/components/ApplicationLeadForm/consents.js +33 -10
  264. package/mobile/lib/components/ApplicationLeadForm/consents.js.map +1 -1
  265. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +11 -9
  266. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  267. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -7
  268. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  269. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +26 -12
  270. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  271. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +6 -0
  272. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js +2 -0
  273. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +1 -0
  274. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +2 -2
  275. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  276. package/mobile/lib/components/Header/HeaderSecondaryMenu.js +2 -2
  277. package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  278. package/mobile/lib/components/OfficesAtmsMap/AtmsMap.js +2 -2
  279. package/mobile/lib/components/OfficesAtmsMap/AtmsMap.js.map +1 -1
  280. package/mobile/lib/components/OfficesAtmsMap/OfficesMap.js +2 -2
  281. package/mobile/lib/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
  282. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
  283. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  284. package/mobile/lib/hooks/useLocation.d.ts +1 -2
  285. package/mobile/lib/hooks/useLocation.js +33 -26
  286. package/mobile/lib/hooks/useLocation.js.map +1 -1
  287. package/mobile/lib/hooks/useRegions.js +1 -3
  288. package/mobile/lib/hooks/useRegions.js.map +1 -1
  289. package/mobile/lib/model/LinkProps.d.ts +3 -1
  290. package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.d.ts +6 -0
  291. package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js +19 -0
  292. package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -0
  293. package/mobile/lib/ui-kit/Checkbox/getDocument.d.ts +1 -0
  294. package/mobile/lib/ui-kit/Checkbox/getDocument.js +6 -0
  295. package/mobile/lib/ui-kit/Checkbox/getDocument.js.map +1 -0
  296. package/mobile/lib/ui-kit/DialogManager/useDialogManager.js +3 -3
  297. package/mobile/lib/ui-kit/DialogManager/useDialogManager.js.map +1 -1
  298. package/mobile/lib/ui-kit/DialogManager/useDialogsList.js +1 -1
  299. package/mobile/lib/ui-kit/DialogManager/useDialogsList.js.map +1 -1
  300. package/mobile/lib/ui-kit/Foldable/Foldable.d.ts +1 -11
  301. package/mobile/lib/ui-kit/Foldable/Foldable.js +2 -10
  302. package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
  303. package/mobile/lib/ui-kit/FormField/Fields/ConsentField.d.ts +2 -0
  304. package/mobile/lib/ui-kit/FormField/Fields/ConsentField.js +8 -0
  305. package/mobile/lib/ui-kit/FormField/Fields/ConsentField.js.map +1 -0
  306. package/mobile/lib/ui-kit/FormField/constants.js +0 -1
  307. package/mobile/lib/ui-kit/FormField/constants.js.map +1 -1
  308. package/mobile/lib/ui-kit/FormField/getField.js +10 -17
  309. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  310. package/mobile/lib/ui-kit/FormField/getValidation.js +0 -1
  311. package/mobile/lib/ui-kit/FormField/getValidation.js.map +1 -1
  312. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +13 -10
  313. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  314. package/mobile/lib/ui-kit/PopupManager/PopupManager.js +1 -1
  315. package/mobile/lib/ui-kit/PopupManager/PopupManager.js.map +1 -1
  316. package/mobile/lib/ui-kit/PopupManager/usePopupManager.js +3 -3
  317. package/mobile/lib/ui-kit/PopupManager/usePopupManager.js.map +1 -1
  318. package/mobile/src/EventBus/EventBus.ts +15 -51
  319. package/mobile/src/EventBus/defaultEventBus.ts +14 -2
  320. package/mobile/src/EventBus/useLatestEvent.ts +16 -0
  321. package/mobile/src/api/RetailApi/RetailApi.ts +1 -0
  322. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -2
  323. package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +1 -0
  324. package/mobile/src/components/ApplicationLeadForm/consents.ts +40 -10
  325. package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +12 -9
  326. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +14 -7
  327. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +66 -23
  328. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCardAction.ts +6 -0
  329. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +2 -2
  330. package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +2 -2
  331. package/mobile/src/components/OfficesAtmsMap/AtmsMap.tsx +3 -2
  332. package/mobile/src/components/OfficesAtmsMap/OfficesMap.tsx +2 -2
  333. package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +2 -2
  334. package/mobile/src/hooks/useLocation.ts +44 -30
  335. package/mobile/src/hooks/useRegions.ts +1 -4
  336. package/mobile/src/model/LinkProps.ts +4 -1
  337. package/mobile/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +48 -0
  338. package/mobile/src/ui-kit/Checkbox/getDocument.ts +7 -0
  339. package/mobile/src/ui-kit/DialogManager/useDialogManager.ts +3 -3
  340. package/mobile/src/ui-kit/DialogManager/useDialogsList.ts +1 -1
  341. package/mobile/src/ui-kit/Foldable/Foldable.tsx +5 -21
  342. package/mobile/src/ui-kit/FormField/Fields/ConsentField.tsx +16 -0
  343. package/mobile/src/ui-kit/FormField/constants.tsx +0 -1
  344. package/mobile/src/ui-kit/FormField/getField.tsx +11 -19
  345. package/mobile/src/ui-kit/FormField/getValidation.tsx +0 -1
  346. package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +25 -13
  347. package/mobile/src/ui-kit/PopupManager/PopupManager.tsx +1 -1
  348. package/mobile/src/ui-kit/PopupManager/usePopupManager.tsx +3 -3
  349. package/package.json +1 -1
  350. package/src/EventBus/EventBus.ts +15 -51
  351. package/src/EventBus/defaultEventBus.ts +14 -2
  352. package/src/EventBus/useLatestEvent.ts +16 -0
  353. package/src/api/RetailApi/RetailApi.ts +1 -0
  354. package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.tsx +1 -1
  355. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -2
  356. package/src/components/ApplicationLeadForm/GroupedConsents.tsx +1 -0
  357. package/src/components/ApplicationLeadForm/consents.ts +40 -10
  358. package/src/components/ApplicationLeadForm/getInitialFormState.tsx +12 -9
  359. package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +14 -7
  360. package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +66 -23
  361. package/src/components/CarouselTariffsCard/CarouselTariffsCardAction.ts +6 -0
  362. package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +2 -2
  363. package/src/components/Header/HeaderSecondaryMenu.tsx +2 -2
  364. package/src/components/OfficesAtmsMap/AtmsMap.tsx +3 -2
  365. package/src/components/OfficesAtmsMap/OfficesMap.tsx +2 -2
  366. package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +2 -2
  367. package/src/hooks/useLocation.ts +44 -30
  368. package/src/hooks/useRegions.ts +1 -4
  369. package/src/model/LinkProps.ts +4 -1
  370. package/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +48 -0
  371. package/src/ui-kit/Checkbox/getDocument.ts +7 -0
  372. package/src/ui-kit/DialogManager/useDialogManager.ts +3 -3
  373. package/src/ui-kit/DialogManager/useDialogsList.ts +1 -1
  374. package/src/ui-kit/Foldable/Foldable.tsx +5 -21
  375. package/src/ui-kit/FormField/Fields/ConsentField.tsx +16 -0
  376. package/src/ui-kit/FormField/constants.tsx +0 -1
  377. package/src/ui-kit/FormField/getField.tsx +11 -19
  378. package/src/ui-kit/FormField/getValidation.tsx +0 -1
  379. package/src/ui-kit/LocationDialog/LocationDialog.tsx +25 -13
  380. package/src/ui-kit/PopupManager/PopupManager.tsx +1 -1
  381. package/src/ui-kit/PopupManager/usePopupManager.tsx +3 -3
  382. package/bundle/EventBus/useSubject.d.ts +0 -2
  383. package/bundle/EventBus/useSubjectState.d.ts +0 -2
  384. package/bundle/components/CarouselTariffsCard/CardCellsSection.d.ts +0 -9
  385. package/bundle/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +0 -9
  386. package/bundle/hooks/useReducer.d.ts +0 -4
  387. package/bundle/ui-kit/FormField/Fields/ConsentAssignmentField.d.ts +0 -2
  388. package/bundle/ui-kit/FormField/Fields/ConsentCollectionField.d.ts +0 -2
  389. package/bundle/ui-kit/FormField/Fields/ConsentInformField.d.ts +0 -2
  390. package/bundle/ui-kit/FormField/Fields/ConsentPhotoField.d.ts +0 -2
  391. package/bundle/ui-kit/FormField/Fields/ConsentProviderField.d.ts +0 -2
  392. package/bundle/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.d.ts +0 -2
  393. package/bundle/ui-kit/FormField/Fields/ProcessPersonalDataField.d.ts +0 -2
  394. package/bundle/ui-kit/LocationDialog/SelectedLocation.d.ts +0 -5
  395. package/dist/EventBus/useSubject.d.ts +0 -2
  396. package/dist/EventBus/useSubject.js +0 -17
  397. package/dist/EventBus/useSubject.js.map +0 -1
  398. package/dist/EventBus/useSubjectState.d.ts +0 -2
  399. package/dist/EventBus/useSubjectState.js +0 -10
  400. package/dist/EventBus/useSubjectState.js.map +0 -1
  401. package/dist/components/CarouselTariffsCard/CardCellsSection.d.ts +0 -9
  402. package/dist/components/CarouselTariffsCard/CardCellsSection.js +0 -18
  403. package/dist/components/CarouselTariffsCard/CardCellsSection.js.map +0 -1
  404. package/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +0 -9
  405. package/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.js +0 -5
  406. package/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.js.map +0 -1
  407. package/dist/hooks/useReducer.d.ts +0 -4
  408. package/dist/hooks/useReducer.js +0 -12
  409. package/dist/hooks/useReducer.js.map +0 -1
  410. package/dist/ui-kit/FormField/Fields/ConsentAssignmentField.d.ts +0 -2
  411. package/dist/ui-kit/FormField/Fields/ConsentAssignmentField.js +0 -9
  412. package/dist/ui-kit/FormField/Fields/ConsentAssignmentField.js.map +0 -1
  413. package/dist/ui-kit/FormField/Fields/ConsentCollectionField.d.ts +0 -2
  414. package/dist/ui-kit/FormField/Fields/ConsentCollectionField.js +0 -9
  415. package/dist/ui-kit/FormField/Fields/ConsentCollectionField.js.map +0 -1
  416. package/dist/ui-kit/FormField/Fields/ConsentInformField.d.ts +0 -2
  417. package/dist/ui-kit/FormField/Fields/ConsentInformField.js +0 -9
  418. package/dist/ui-kit/FormField/Fields/ConsentInformField.js.map +0 -1
  419. package/dist/ui-kit/FormField/Fields/ConsentPhotoField.d.ts +0 -2
  420. package/dist/ui-kit/FormField/Fields/ConsentPhotoField.js +0 -9
  421. package/dist/ui-kit/FormField/Fields/ConsentPhotoField.js.map +0 -1
  422. package/dist/ui-kit/FormField/Fields/ConsentProviderField.d.ts +0 -2
  423. package/dist/ui-kit/FormField/Fields/ConsentProviderField.js +0 -9
  424. package/dist/ui-kit/FormField/Fields/ConsentProviderField.js.map +0 -1
  425. package/dist/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.d.ts +0 -2
  426. package/dist/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js +0 -9
  427. package/dist/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js.map +0 -1
  428. package/dist/ui-kit/FormField/Fields/ProcessPersonalDataField.d.ts +0 -2
  429. package/dist/ui-kit/FormField/Fields/ProcessPersonalDataField.js +0 -9
  430. package/dist/ui-kit/FormField/Fields/ProcessPersonalDataField.js.map +0 -1
  431. package/dist/ui-kit/LocationDialog/SelectedLocation.d.ts +0 -5
  432. package/dist/ui-kit/LocationDialog/SelectedLocation.js +0 -15
  433. package/dist/ui-kit/LocationDialog/SelectedLocation.js.map +0 -1
  434. package/lib/EventBus/useSubject.d.ts +0 -2
  435. package/lib/EventBus/useSubject.js +0 -14
  436. package/lib/EventBus/useSubject.js.map +0 -1
  437. package/lib/EventBus/useSubjectState.d.ts +0 -2
  438. package/lib/EventBus/useSubjectState.js +0 -7
  439. package/lib/EventBus/useSubjectState.js.map +0 -1
  440. package/lib/components/CarouselTariffsCard/CardCellsSection.d.ts +0 -9
  441. package/lib/components/CarouselTariffsCard/CardCellsSection.js +0 -16
  442. package/lib/components/CarouselTariffsCard/CardCellsSection.js.map +0 -1
  443. package/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +0 -9
  444. package/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.js +0 -3
  445. package/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.js.map +0 -1
  446. package/lib/hooks/useReducer.d.ts +0 -4
  447. package/lib/hooks/useReducer.js +0 -9
  448. package/lib/hooks/useReducer.js.map +0 -1
  449. package/lib/ui-kit/FormField/Fields/ConsentAssignmentField.d.ts +0 -2
  450. package/lib/ui-kit/FormField/Fields/ConsentAssignmentField.js +0 -7
  451. package/lib/ui-kit/FormField/Fields/ConsentAssignmentField.js.map +0 -1
  452. package/lib/ui-kit/FormField/Fields/ConsentCollectionField.d.ts +0 -2
  453. package/lib/ui-kit/FormField/Fields/ConsentCollectionField.js +0 -7
  454. package/lib/ui-kit/FormField/Fields/ConsentCollectionField.js.map +0 -1
  455. package/lib/ui-kit/FormField/Fields/ConsentInformField.d.ts +0 -2
  456. package/lib/ui-kit/FormField/Fields/ConsentInformField.js +0 -7
  457. package/lib/ui-kit/FormField/Fields/ConsentInformField.js.map +0 -1
  458. package/lib/ui-kit/FormField/Fields/ConsentPhotoField.d.ts +0 -2
  459. package/lib/ui-kit/FormField/Fields/ConsentPhotoField.js +0 -7
  460. package/lib/ui-kit/FormField/Fields/ConsentPhotoField.js.map +0 -1
  461. package/lib/ui-kit/FormField/Fields/ConsentProviderField.d.ts +0 -2
  462. package/lib/ui-kit/FormField/Fields/ConsentProviderField.js +0 -7
  463. package/lib/ui-kit/FormField/Fields/ConsentProviderField.js.map +0 -1
  464. package/lib/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.d.ts +0 -2
  465. package/lib/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js +0 -7
  466. package/lib/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js.map +0 -1
  467. package/lib/ui-kit/FormField/Fields/ProcessPersonalDataField.d.ts +0 -2
  468. package/lib/ui-kit/FormField/Fields/ProcessPersonalDataField.js +0 -7
  469. package/lib/ui-kit/FormField/Fields/ProcessPersonalDataField.js.map +0 -1
  470. package/lib/ui-kit/LocationDialog/SelectedLocation.d.ts +0 -5
  471. package/lib/ui-kit/LocationDialog/SelectedLocation.js +0 -13
  472. package/lib/ui-kit/LocationDialog/SelectedLocation.js.map +0 -1
  473. package/mobile/bundle/EventBus/useSubject.d.ts +0 -2
  474. package/mobile/bundle/EventBus/useSubjectState.d.ts +0 -2
  475. package/mobile/bundle/components/CarouselTariffsCard/CardCellsSection.d.ts +0 -9
  476. package/mobile/bundle/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +0 -9
  477. package/mobile/bundle/hooks/useReducer.d.ts +0 -4
  478. package/mobile/bundle/ui-kit/FormField/Fields/ConsentAssignmentField.d.ts +0 -2
  479. package/mobile/bundle/ui-kit/FormField/Fields/ConsentCollectionField.d.ts +0 -2
  480. package/mobile/bundle/ui-kit/FormField/Fields/ConsentInformField.d.ts +0 -2
  481. package/mobile/bundle/ui-kit/FormField/Fields/ConsentPhotoField.d.ts +0 -2
  482. package/mobile/bundle/ui-kit/FormField/Fields/ConsentProviderField.d.ts +0 -2
  483. package/mobile/bundle/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.d.ts +0 -2
  484. package/mobile/bundle/ui-kit/FormField/Fields/ProcessPersonalDataField.d.ts +0 -2
  485. package/mobile/bundle/ui-kit/LocationDialog/SelectedLocation.d.ts +0 -5
  486. package/mobile/dist/EventBus/useSubject.d.ts +0 -2
  487. package/mobile/dist/EventBus/useSubject.js +0 -17
  488. package/mobile/dist/EventBus/useSubject.js.map +0 -1
  489. package/mobile/dist/EventBus/useSubjectState.d.ts +0 -2
  490. package/mobile/dist/EventBus/useSubjectState.js +0 -10
  491. package/mobile/dist/EventBus/useSubjectState.js.map +0 -1
  492. package/mobile/dist/components/CarouselTariffsCard/CardCellsSection.d.ts +0 -9
  493. package/mobile/dist/components/CarouselTariffsCard/CardCellsSection.js +0 -18
  494. package/mobile/dist/components/CarouselTariffsCard/CardCellsSection.js.map +0 -1
  495. package/mobile/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +0 -9
  496. package/mobile/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.js +0 -5
  497. package/mobile/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.js.map +0 -1
  498. package/mobile/dist/hooks/useReducer.d.ts +0 -4
  499. package/mobile/dist/hooks/useReducer.js +0 -12
  500. package/mobile/dist/hooks/useReducer.js.map +0 -1
  501. package/mobile/dist/ui-kit/FormField/Fields/ConsentAssignmentField.d.ts +0 -2
  502. package/mobile/dist/ui-kit/FormField/Fields/ConsentAssignmentField.js +0 -9
  503. package/mobile/dist/ui-kit/FormField/Fields/ConsentAssignmentField.js.map +0 -1
  504. package/mobile/dist/ui-kit/FormField/Fields/ConsentCollectionField.d.ts +0 -2
  505. package/mobile/dist/ui-kit/FormField/Fields/ConsentCollectionField.js +0 -9
  506. package/mobile/dist/ui-kit/FormField/Fields/ConsentCollectionField.js.map +0 -1
  507. package/mobile/dist/ui-kit/FormField/Fields/ConsentInformField.d.ts +0 -2
  508. package/mobile/dist/ui-kit/FormField/Fields/ConsentInformField.js +0 -9
  509. package/mobile/dist/ui-kit/FormField/Fields/ConsentInformField.js.map +0 -1
  510. package/mobile/dist/ui-kit/FormField/Fields/ConsentPhotoField.d.ts +0 -2
  511. package/mobile/dist/ui-kit/FormField/Fields/ConsentPhotoField.js +0 -9
  512. package/mobile/dist/ui-kit/FormField/Fields/ConsentPhotoField.js.map +0 -1
  513. package/mobile/dist/ui-kit/FormField/Fields/ConsentProviderField.d.ts +0 -2
  514. package/mobile/dist/ui-kit/FormField/Fields/ConsentProviderField.js +0 -9
  515. package/mobile/dist/ui-kit/FormField/Fields/ConsentProviderField.js.map +0 -1
  516. package/mobile/dist/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.d.ts +0 -2
  517. package/mobile/dist/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js +0 -9
  518. package/mobile/dist/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js.map +0 -1
  519. package/mobile/dist/ui-kit/FormField/Fields/ProcessPersonalDataField.d.ts +0 -2
  520. package/mobile/dist/ui-kit/FormField/Fields/ProcessPersonalDataField.js +0 -9
  521. package/mobile/dist/ui-kit/FormField/Fields/ProcessPersonalDataField.js.map +0 -1
  522. package/mobile/dist/ui-kit/LocationDialog/SelectedLocation.d.ts +0 -5
  523. package/mobile/dist/ui-kit/LocationDialog/SelectedLocation.js +0 -15
  524. package/mobile/dist/ui-kit/LocationDialog/SelectedLocation.js.map +0 -1
  525. package/mobile/lib/EventBus/useSubject.d.ts +0 -2
  526. package/mobile/lib/EventBus/useSubject.js +0 -14
  527. package/mobile/lib/EventBus/useSubject.js.map +0 -1
  528. package/mobile/lib/EventBus/useSubjectState.d.ts +0 -2
  529. package/mobile/lib/EventBus/useSubjectState.js +0 -7
  530. package/mobile/lib/EventBus/useSubjectState.js.map +0 -1
  531. package/mobile/lib/components/CarouselTariffsCard/CardCellsSection.d.ts +0 -9
  532. package/mobile/lib/components/CarouselTariffsCard/CardCellsSection.js +0 -16
  533. package/mobile/lib/components/CarouselTariffsCard/CardCellsSection.js.map +0 -1
  534. package/mobile/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +0 -9
  535. package/mobile/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.js +0 -3
  536. package/mobile/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.js.map +0 -1
  537. package/mobile/lib/hooks/useReducer.d.ts +0 -4
  538. package/mobile/lib/hooks/useReducer.js +0 -9
  539. package/mobile/lib/hooks/useReducer.js.map +0 -1
  540. package/mobile/lib/ui-kit/FormField/Fields/ConsentAssignmentField.d.ts +0 -2
  541. package/mobile/lib/ui-kit/FormField/Fields/ConsentAssignmentField.js +0 -7
  542. package/mobile/lib/ui-kit/FormField/Fields/ConsentAssignmentField.js.map +0 -1
  543. package/mobile/lib/ui-kit/FormField/Fields/ConsentCollectionField.d.ts +0 -2
  544. package/mobile/lib/ui-kit/FormField/Fields/ConsentCollectionField.js +0 -7
  545. package/mobile/lib/ui-kit/FormField/Fields/ConsentCollectionField.js.map +0 -1
  546. package/mobile/lib/ui-kit/FormField/Fields/ConsentInformField.d.ts +0 -2
  547. package/mobile/lib/ui-kit/FormField/Fields/ConsentInformField.js +0 -7
  548. package/mobile/lib/ui-kit/FormField/Fields/ConsentInformField.js.map +0 -1
  549. package/mobile/lib/ui-kit/FormField/Fields/ConsentPhotoField.d.ts +0 -2
  550. package/mobile/lib/ui-kit/FormField/Fields/ConsentPhotoField.js +0 -7
  551. package/mobile/lib/ui-kit/FormField/Fields/ConsentPhotoField.js.map +0 -1
  552. package/mobile/lib/ui-kit/FormField/Fields/ConsentProviderField.d.ts +0 -2
  553. package/mobile/lib/ui-kit/FormField/Fields/ConsentProviderField.js +0 -7
  554. package/mobile/lib/ui-kit/FormField/Fields/ConsentProviderField.js.map +0 -1
  555. package/mobile/lib/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.d.ts +0 -2
  556. package/mobile/lib/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js +0 -7
  557. package/mobile/lib/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js.map +0 -1
  558. package/mobile/lib/ui-kit/FormField/Fields/ProcessPersonalDataField.d.ts +0 -2
  559. package/mobile/lib/ui-kit/FormField/Fields/ProcessPersonalDataField.js +0 -7
  560. package/mobile/lib/ui-kit/FormField/Fields/ProcessPersonalDataField.js.map +0 -1
  561. package/mobile/lib/ui-kit/LocationDialog/SelectedLocation.d.ts +0 -5
  562. package/mobile/lib/ui-kit/LocationDialog/SelectedLocation.js +0 -13
  563. package/mobile/lib/ui-kit/LocationDialog/SelectedLocation.js.map +0 -1
  564. package/mobile/src/EventBus/useSubject.ts +0 -19
  565. package/mobile/src/EventBus/useSubjectState.ts +0 -13
  566. package/mobile/src/components/CarouselTariffsCard/CardCellsSection.tsx +0 -54
  567. package/mobile/src/components/CarouselTariffsCard/carouselTariffsCardEventBus.ts +0 -11
  568. package/mobile/src/hooks/useReducer.ts +0 -21
  569. package/mobile/src/ui-kit/FormField/Fields/ConsentAssignmentField.tsx +0 -16
  570. package/mobile/src/ui-kit/FormField/Fields/ConsentCollectionField.tsx +0 -16
  571. package/mobile/src/ui-kit/FormField/Fields/ConsentInformField.tsx +0 -12
  572. package/mobile/src/ui-kit/FormField/Fields/ConsentPhotoField.tsx +0 -12
  573. package/mobile/src/ui-kit/FormField/Fields/ConsentProviderField.tsx +0 -16
  574. package/mobile/src/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.tsx +0 -16
  575. package/mobile/src/ui-kit/FormField/Fields/ProcessPersonalDataField.tsx +0 -16
  576. package/mobile/src/ui-kit/LocationDialog/SelectedLocation.tsx +0 -27
  577. package/src/EventBus/useSubject.ts +0 -19
  578. package/src/EventBus/useSubjectState.ts +0 -13
  579. package/src/components/CarouselTariffsCard/CardCellsSection.tsx +0 -54
  580. package/src/components/CarouselTariffsCard/carouselTariffsCardEventBus.ts +0 -11
  581. package/src/hooks/useReducer.ts +0 -21
  582. package/src/ui-kit/FormField/Fields/ConsentAssignmentField.tsx +0 -16
  583. package/src/ui-kit/FormField/Fields/ConsentCollectionField.tsx +0 -16
  584. package/src/ui-kit/FormField/Fields/ConsentInformField.tsx +0 -12
  585. package/src/ui-kit/FormField/Fields/ConsentPhotoField.tsx +0 -12
  586. package/src/ui-kit/FormField/Fields/ConsentProviderField.tsx +0 -16
  587. package/src/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.tsx +0 -16
  588. package/src/ui-kit/FormField/Fields/ProcessPersonalDataField.tsx +0 -16
  589. package/src/ui-kit/LocationDialog/SelectedLocation.tsx +0 -27
@@ -1,40 +1,54 @@
1
- import { useEffect } from '@redneckz/uni-jsx/lib/hooks';
1
+ import { useCallback, useEffect } from '@redneckz/uni-jsx/lib/hooks';
2
+ import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
2
3
  import { defaultEventBus } from '../EventBus/defaultEventBus';
3
- import { useSubject } from '../EventBus/useSubject';
4
- import { useSubjectState } from '../EventBus/useSubjectState';
5
- import { fetchJSON } from '../utils/fetchJSON';
4
+ import { useLatestEvent } from '../EventBus/useLatestEvent';
5
+ import { fetchJSONUnsafe, type FetchJSONUnsafeType } from '../utils/fetchJSON';
6
6
  import { type Region } from './useRegions';
7
7
 
8
8
  const REGION_URL = '/api/v1/region';
9
9
  const LOCATION_STORAGE_KEY = 'location';
10
10
 
11
- export function useLocation(defaultLocation = 'Москва'): (_: Region) => void {
12
- useEffect(() => defaultEventBus.subscribe('location', storeLocation), []);
13
-
14
- return useSubject(defaultEventBus.emitter, 'location', restoreLocation(defaultLocation));
15
- }
16
-
17
- export function useLocationState(defaultLocation = 'Москва'): Region {
18
- return useSubjectState(defaultEventBus.observable, 'location', { name: defaultLocation });
19
- }
20
-
21
- function restoreLocation(defaultLocation: string) {
22
- return async (): Promise<Region> => {
23
- if (!globalThis.localStorage?.hasItem(LOCATION_STORAGE_KEY)) {
24
- storeLocation(await fetchJSON<Region>(REGION_URL));
25
- }
26
-
27
- const storedLocation = globalThis.localStorage?.getItem(LOCATION_STORAGE_KEY);
28
- try {
29
- return storedLocation && JSON.parse(storedLocation);
30
- } catch (ex) {
31
- // Do nothing
11
+ export function useLocation(defaultLocation = 'Москва'): [Region, (_: Region) => void] {
12
+ const [currentLocation, fireCurrentLocation] = useLatestEvent(
13
+ defaultEventBus,
14
+ 'location',
15
+ restoreLocation() ?? { name: defaultLocation },
16
+ );
17
+
18
+ const selectCurrentLocation = useCallback((_: Region) => {
19
+ storeLocation(_);
20
+ fireCurrentLocation(_);
21
+ }, []);
22
+
23
+ const { data } = useAsyncData(
24
+ hasStoredLocation() ? null : REGION_URL,
25
+ fetchJSONUnsafe as FetchJSONUnsafeType<Region>,
26
+ );
27
+ useEffect(() => {
28
+ if (data && !hasStoredLocation()) {
29
+ fireCurrentLocation(data);
32
30
  }
31
+ }, [data]);
33
32
 
34
- return { name: defaultLocation };
35
- };
33
+ return [currentLocation ?? { name: defaultLocation }, selectCurrentLocation];
36
34
  }
37
35
 
38
- function storeLocation(_: Region | null | undefined) {
39
- _ && globalThis.localStorage?.setItem(LOCATION_STORAGE_KEY, JSON.stringify(_));
40
- }
36
+ const hasStoredLocation = () => Boolean(globalThis.localStorage?.getItem(LOCATION_STORAGE_KEY));
37
+
38
+ const restoreLocation = (): Region | null => {
39
+ try {
40
+ const data = globalThis.localStorage?.getItem(LOCATION_STORAGE_KEY);
41
+
42
+ return data && JSON.parse(data);
43
+ } catch (ex) {
44
+ return null;
45
+ }
46
+ };
47
+
48
+ const storeLocation = (_: Region) => {
49
+ try {
50
+ globalThis.localStorage?.setItem(LOCATION_STORAGE_KEY, JSON.stringify(_));
51
+ } catch (ex) {
52
+ // Do nothing
53
+ }
54
+ };
@@ -11,11 +11,8 @@ export interface Region {
11
11
  localities?: string[];
12
12
  }
13
13
 
14
- const EMPTY_REGIONS: Region[] = [];
15
-
16
- // TODO Почему url можно менять? Разве смысл не в инкапсуляции api url. Тоже под рефакторинг попадает
17
14
  export function useRegions(url: string = REGIONS_URL): Region[] {
18
15
  const { data } = useAsyncData(url, fetchJSONUnsafe as FetchJSONUnsafeType<Region[]>);
19
16
 
20
- return Array.isArray(data) ? data : EMPTY_REGIONS;
17
+ return Array.isArray(data) ? data : [];
21
18
  }
@@ -13,9 +13,12 @@ import { type TextProps } from './HeadlineType';
13
13
  */
14
14
  export type Target = '' | '_self' | '_blank' | '_parent' | '_top';
15
15
 
16
- export type LinkCommonProps = {
16
+ export type HrefProps = {
17
17
  /** @title URL (href) */
18
18
  href?: string;
19
+ };
20
+
21
+ export type LinkCommonProps = HrefProps & {
19
22
  /** @default "" */
20
23
  target?: Target;
21
24
  };
@@ -0,0 +1,48 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { type VNode } from '../../model/VNode';
3
+ import { Dialog } from '../DialogManager/Dialog';
4
+ import { useDialogManager } from '../DialogManager/useDialogManager';
5
+ import { renderErrorText } from '../Input/renderErrorText';
6
+ import { LinkButton } from '../LinkButton/LinkButton';
7
+ import { Text } from '../Text/Text';
8
+ import { Checkbox } from './Checkbox';
9
+ import { type CheckboxProps } from './CheckboxProps';
10
+ import { getDocument } from './getDocument';
11
+
12
+ const OPEN_DOC_BUTTON_TEXT = 'Ознакомиться';
13
+
14
+ interface CheckboxWithDocProps extends CheckboxProps {
15
+ docId?: number;
16
+ }
17
+
18
+ export const CheckboxWithDoc = JSX<CheckboxWithDocProps>(
19
+ ({ className, error, docId, ...props }) => {
20
+ const { open } = useDialogManager();
21
+
22
+ return (
23
+ <div className={className}>
24
+ <div className="flex flex-wrap gap-x-m">
25
+ <Checkbox {...props} />
26
+ {docId ? (
27
+ <LinkButton
28
+ className="text-primary-main"
29
+ onClick={() => handleOpenDocument(docId, open)}
30
+ >
31
+ <Text>{OPEN_DOC_BUTTON_TEXT}</Text>
32
+ </LinkButton>
33
+ ) : null}
34
+ </div>
35
+ {renderErrorText(error)}
36
+ </div>
37
+ );
38
+ },
39
+ );
40
+
41
+ const handleOpenDocument = async (id: number, open: (dialog: VNode) => void) => {
42
+ const document = await getDocument(id);
43
+ open(
44
+ <Dialog className="my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0">
45
+ <iframe src={`${document}#toolbar=0`} className="w-full h-[80vh]" id="iframe-dialog" />
46
+ </Dialog>,
47
+ );
48
+ };
@@ -0,0 +1,7 @@
1
+ import { RETAIL_API } from '../../api/RetailApi/RetailApi';
2
+
3
+ export const getDocument = async (id: number) => {
4
+ const response = await RETAIL_API.GetFileByID(id);
5
+
6
+ return URL.createObjectURL(await response.blob());
7
+ };
@@ -8,7 +8,7 @@ export interface DialogOptions {
8
8
 
9
9
  export const useDialogManager = () => ({
10
10
  open: (dialog: VNode, options: DialogOptions = {}) =>
11
- defaultEventBus.emitter.fire('dialog', { type: 'open', dialog, ...options }),
12
- close: () => defaultEventBus.emitter.fire('dialog', { type: 'close' }),
13
- closeAll: () => defaultEventBus.emitter.fire('dialog', { type: 'close', all: true }),
11
+ defaultEventBus.fire('dialog', { type: 'open', dialog, ...options }),
12
+ close: () => defaultEventBus.fire('dialog', { type: 'close' }),
13
+ closeAll: () => defaultEventBus.fire('dialog', { type: 'close', all: true }),
14
14
  });
@@ -27,7 +27,7 @@ export const useDialogsList = ({
27
27
 
28
28
  useEffect(
29
29
  () =>
30
- defaultEventBus.observable.subscribe('dialog', (action) => {
30
+ defaultEventBus.subscribe('dialog', (action) => {
31
31
  switch (action.type) {
32
32
  case 'open':
33
33
  push(action);
@@ -3,30 +3,14 @@ import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { type VNode } from '../../model/VNode';
4
4
  import { type FoldablePartProps } from './FoldablePartProps';
5
5
 
6
- export interface FoldableWrapperProps {
6
+ export interface FoldableProps {
7
7
  className?: string;
8
- }
9
-
10
- export interface FoldableProps extends FoldableWrapperProps {
11
8
  unfoldedByDefault?: boolean;
12
9
  isFoldButtonOnTop?: boolean;
13
10
  renderFoldableSection: (props: FoldablePartProps) => VNode;
14
11
  renderFoldButton?: ((props: FoldablePartProps) => VNode) | null;
15
12
  }
16
13
 
17
- export const FoldableWrapper = JSX<FoldableWrapperProps>(({ className, children }) => (
18
- <div className={className} role="group">
19
- {children}
20
- </div>
21
- ));
22
-
23
- /**
24
- * Какой то бесполезный компонент. Его можно заменить на useBool
25
- * Лучше оставить только обёрточный div с необходимой атрибутикой
26
- * и сделать пассивный компонент
27
- *
28
- * @deprecated
29
- */
30
14
  export const Foldable = JSX<FoldableProps>(
31
15
  ({
32
16
  className = '',
@@ -45,15 +29,15 @@ export const Foldable = JSX<FoldableProps>(
45
29
  const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
46
30
 
47
31
  return isFoldButtonOnTop ? (
48
- <FoldableWrapper className={className}>
32
+ <div className={className} role="group">
49
33
  {buttonNode}
50
34
  {sectionNode}
51
- </FoldableWrapper>
35
+ </div>
52
36
  ) : (
53
- <FoldableWrapper className={className}>
37
+ <div className={className} role="group">
54
38
  {sectionNode}
55
39
  {buttonNode}
56
- </FoldableWrapper>
40
+ </div>
57
41
  );
58
42
  },
59
43
  );
@@ -0,0 +1,16 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { CONSENTS } from '../../../components/ApplicationLeadForm/consents';
3
+ import { CheckboxWithDoc } from '../../Checkbox/CheckboxWithDoc';
4
+ import { type CustomFieldProps } from '../CustomFieldProps';
5
+ import { validatorObj } from '../getObjectValidator';
6
+ import { getValidation } from '../getValidation';
7
+
8
+ export const ConsentField = JSX<CustomFieldProps>(({ field, input }) =>
9
+ input && input.name ? (
10
+ <CheckboxWithDoc
11
+ text={CONSENTS[input.name]?.text}
12
+ docId={CONSENTS[input.name]?.docId}
13
+ {...getValidation(field(input.name), validatorObj[input.name], input?.required)}
14
+ />
15
+ ) : null,
16
+ );
@@ -26,5 +26,4 @@ export const FEEDBACK_METHOD: Option[] = [
26
26
  { key: 'email', text: 'Электронное сообщение' },
27
27
  ];
28
28
 
29
- // TODO Тоже надо рефакторить - файлик constants
30
29
  export const OUT_SERVICE_URL = '/api/v1/outservice/outserviceregions';
@@ -1,7 +1,6 @@
1
1
  import { type FieldDef } from '../../components/ApplicationForm/ApplicationFormContent';
2
2
  import { getRegionUrl } from '../../components/ApplicationForm/getRegionUrl';
3
3
  import { type FormFieldRegisterer } from '../../hooks/useForm';
4
- import { CheckboxWithError } from '../Checkbox/CheckboxWithError';
5
4
  import { InputControl } from '../Input/InputControl';
6
5
  import { AcquiringField } from './Fields/AcquiringField';
7
6
  import { AddressBranchField } from './Fields/AddressBranchField';
@@ -17,12 +16,7 @@ import { ChildrenField } from './Fields/ChildrenField';
17
16
  import { CollectionCountField } from './Fields/CollectionCountField';
18
17
  import { CommentField } from './Fields/CommentField';
19
18
  import { ConscriptionField } from './Fields/ConscriptionField';
20
- import { ConsentAssignmentField } from './Fields/ConsentAssignmentField';
21
- import { ConsentCollectionField } from './Fields/ConsentCollectionField';
22
- import { ConsentInformField } from './Fields/ConsentInformField';
23
- import { ConsentPhotoFlg } from './Fields/ConsentPhotoField';
24
- import { ConsentProviderField } from './Fields/ConsentProviderField';
25
- import { ConsentToReceiveMaterialsField } from './Fields/ConsentToReceiveMaterialsField';
19
+ import { ConsentField } from './Fields/ConsentField';
26
20
  import { DependentsField } from './Fields/DependentsField';
27
21
  import { DesiredMeetingDateField } from './Fields/DesiredMeetingDateField';
28
22
  import { DulIssueDateField } from './Fields/DulIssueDateField';
@@ -61,7 +55,6 @@ import { PartnerCommentsField } from './Fields/PartnerCommentsField';
61
55
  import { PhoneField } from './Fields/PhoneField';
62
56
  import { PositionOrganizationField } from './Fields/PositionOrganizationField';
63
57
  import { PosTerminalField } from './Fields/PosTerminalField';
64
- import { ProcessPersonalDataField } from './Fields/ProcessPersonalDataField';
65
58
  import { ProductField } from './Fields/ProductField';
66
59
  import { RegionField } from './Fields/RegionField';
67
60
  import { RegionPremiumField } from './Fields/RegionPremiumField';
@@ -124,19 +117,18 @@ export const getField =
124
117
  serviceDirection: <ServiceDirectionField field={field} input={input} />,
125
118
  bankEmpolee: <BankEmpoleeField field={field} />,
126
119
  secondaryPhone: <SecondaryPhoneField field={field} />,
127
- consentToReceiveMaterials: <ConsentToReceiveMaterialsField field={field} input={input} />,
128
- processPersonalDataLeadFlg: <ProcessPersonalDataField field={field} input={input} />,
129
- consentProviderFlg: <ConsentProviderField field={field} input={input} />,
130
- consentPhotoFlg: <ConsentPhotoFlg field={field} input={input} />,
131
- consentAssignmentClaimsFlg: <ConsentAssignmentField field={field} input={input} />,
132
- consentCollectionFlg: <ConsentCollectionField field={field} input={input} />,
133
- consentInformFlg: <ConsentInformField field={field} input={input} />,
120
+ consentToReceiveMaterials: <ConsentField field={field} input={input} />,
121
+ processPersonalDataLeadFlg: <ConsentField field={field} input={input} />,
122
+ consentProviderFlg: <ConsentField field={field} input={input} />,
123
+ consentPhotoFlg: <ConsentField field={field} input={input} />,
124
+ consentAssignmentClaimsFlg: <ConsentField field={field} input={input} />,
125
+ consentCollectionFlg: <ConsentField field={field} input={input} />,
126
+ consentInformFlg: <ConsentField field={field} input={input} />,
127
+ consentPfrFlg: <ConsentField field={field} input={input} />,
134
128
  applicationDate: (
135
129
  <InputControl label="Дата и время обращения в Банк" {...field('applicationDate')} />
136
130
  ),
137
- consentPfrFlg: (
138
- <CheckboxWithError text="Согласие на запрос в ПФР" {...field('consentPfrFlg')} />
139
- ),
131
+
140
132
  region: isPremium ? (
141
133
  <RegionPremiumField field={field} />
142
134
  ) : (
@@ -152,7 +144,6 @@ export const getField =
152
144
  positionOrganization: <PositionOrganizationField field={field} input={input} />,
153
145
  familyStatus: <FamilyStatusField field={field} input={input} />,
154
146
  children: <ChildrenField field={field} input={input} />,
155
- // eslint-disable-next-line max-lines
156
147
  familyMembers: <FamilyMembersField field={field} input={input} />,
157
148
  dependents: <DependentsField field={field} input={input} />,
158
149
  totalIncome: <TotalIncomeField field={field} input={input} />,
@@ -162,6 +153,7 @@ export const getField =
162
153
  armyIdFlg: <ArmyIdFlgField field={field} input={input} />,
163
154
  dulSerie: <DulSerieField field={field} input={input} />,
164
155
  dulNumber: <DulNumberField field={field} input={input} />,
156
+ // eslint-disable-next-line max-lines
165
157
  dulIssueDateField: <DulIssueDateField field={field} input={input} />,
166
158
  dulSubdivisionCode: <DulSubdivisionCodeField field={field} input={input} />,
167
159
  dulIssuedBy: <DulIssuedByField field={field} input={input} />,
@@ -2,6 +2,5 @@ import { type FieldProps } from '../../hooks/useForm';
2
2
  import { type Validator } from '../../validation/validator';
3
3
  import { withValidator } from '../../validation/withValidator';
4
4
 
5
- // TODO Зачем это?
6
5
  export const getValidation = (field: FieldProps<any>, validator: Validator, required = false) =>
7
6
  required ? withValidator(field, validator) : field;
@@ -1,18 +1,20 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { useCallback, useMemo, useState } from '@redneckz/uni-jsx/lib/hooks';
2
+ import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { type BranchesHeader, type ForeignOfficeProps } from '../../data/HeaderData';
4
+ import { useLink } from '../../hooks/useLink';
4
5
  import { useLocation } from '../../hooks/useLocation';
5
6
  import { useRegions, type Region } from '../../hooks/useRegions';
6
7
  import { groupBy } from '../../utils/groupBy';
7
8
  import { jaroWinklerDistance } from '../../utils/jaroWinklerDistance';
8
9
  import { Dialog } from '../DialogManager/Dialog';
9
10
  import { useDialogManager } from '../DialogManager/useDialogManager';
11
+ import { LinkWrapper } from '../LinkWrapper/LinkWrapper';
12
+ import { Paragraph } from '../Paragraph/Paragraph';
10
13
  import { Text } from '../Text/Text';
11
14
  import { renderForeignOffices } from './renderForeignOffices';
12
15
  import { renderRegion } from './renderRegion';
13
16
  import { renderRegionGroup } from './renderRegionGroup';
14
17
  import { SearchBar } from './SearchBar';
15
- import { SelectedLocation } from './SelectedLocation';
16
18
 
17
19
  const SEARCH_TERM_MIN_LENGTH = 3;
18
20
 
@@ -22,21 +24,22 @@ export interface LocationDialogProps {
22
24
  }
23
25
 
24
26
  export const LocationDialog = JSX<LocationDialogProps>(({ foreignOffices, branches }) => {
25
- const selectLocation = useLocation(branches?.default);
27
+ const [currentLocation, selectCurrentLocation] = useLocation(branches?.default);
28
+
29
+ const link = useLink();
30
+ const { href } = link({ href: `/branches/${currentLocation.slug}` });
26
31
 
27
32
  const [query, setQuery] = useState('');
28
33
 
29
- const rawRegions = useRegions();
30
- const regions = useMemo(
31
- () => cleanUpRegions(rawRegions).sort((a, b) => (a.name ?? '').localeCompare(b.name ?? '')),
32
- [rawRegions],
34
+ const regions: Region[] = cleanUpRegions(useRegions()).sort((a, b) =>
35
+ a.name.localeCompare(b.name),
33
36
  );
34
- const regionsGroupByLetter = useMemo(() => groupBy(regions, regionFirstLetter), [regions]);
37
+ const regionsGroupByLetter: Map<string, Region[]> = groupBy(regions, regionFirstLetter);
35
38
 
36
39
  const { close } = useDialogManager();
37
40
 
38
41
  const handleChangeLocation = useCallback((region: Region) => {
39
- selectLocation(region);
42
+ selectCurrentLocation(region);
40
43
  close();
41
44
  }, []);
42
45
 
@@ -48,7 +51,16 @@ export const LocationDialog = JSX<LocationDialogProps>(({ foreignOffices, branch
48
51
  <Text size="text-h4" color="text-primary-text">
49
52
  Выберите филиал
50
53
  </Text>
51
- <SelectedLocation defaultLocation={branches?.default} />
54
+ {currentLocation ? (
55
+ <div className="mb-s">
56
+ <Paragraph size="text-l" color="text-primary-text">
57
+ Сейчас выбран:
58
+ <LinkWrapper href={href} className="inline mx-2xs text-primary-main">
59
+ {currentLocation.name}
60
+ </LinkWrapper>
61
+ </Paragraph>
62
+ </div>
63
+ ) : null}
52
64
  <SearchBar onSearch={setQuery} searchTerm={query} />
53
65
  </div>
54
66
  }
@@ -74,10 +86,10 @@ export const LocationDialog = JSX<LocationDialogProps>(({ foreignOffices, branch
74
86
  );
75
87
  });
76
88
 
77
- const regionFirstLetter = (region: Region) => region.name?.charAt(0) ?? '';
89
+ const regionFirstLetter = (region: Region) => region.name?.charAt(0) || '';
78
90
 
79
- const cleanUpRegions = (regions: Region[]): Region[] =>
91
+ const cleanUpRegions = (regions: Region[]) =>
80
92
  regions.map((region) => ({
81
93
  ...region,
82
- name: region.name?.replace(/республика|область|край'/gi, '').trim() ?? '',
94
+ name: region.name?.replace(/республика|область|край'/gi, '').trim() || '',
83
95
  }));
@@ -15,7 +15,7 @@ export const PopupManager = JSX(() => {
15
15
 
16
16
  useEffect(
17
17
  () =>
18
- defaultEventBus.observable.subscribe('popup', (action) => {
18
+ defaultEventBus.subscribe('popup', (action) => {
19
19
  switch (action.type) {
20
20
  case 'open':
21
21
  case 'update':
@@ -4,8 +4,8 @@ import { type PopupOptions } from './PopupAction';
4
4
 
5
5
  export const usePopupManager = () => ({
6
6
  open: (popup: VNode, options: PopupOptions) =>
7
- defaultEventBus.emitter.fire('popup', { type: 'open', popup, ...options }),
7
+ defaultEventBus.fire('popup', { type: 'open', popup, ...options }),
8
8
  update: (popup: VNode, options: PopupOptions) =>
9
- defaultEventBus.emitter.fire('popup', { type: 'update', popup, ...options }),
10
- close: () => defaultEventBus.emitter.fire('popup', { type: 'close' }),
9
+ defaultEventBus.fire('popup', { type: 'update', popup, ...options }),
10
+ close: () => defaultEventBus.fire('popup', { type: 'close' }),
11
11
  });
@@ -1,2 +0,0 @@
1
- import type { EventBusEmitter } from './EventBus';
2
- export declare function useSubject<EM extends Record<string, any>, K extends keyof EM>(eventBus: EventBusEmitter<EM>, type: K, initialState: EM[K] | (() => EM[K] | Promise<EM[K]>)): (_: EM[K]) => void;
@@ -1,2 +0,0 @@
1
- import { type EventBusObservable } from './EventBus';
2
- export declare const useSubjectState: <EM extends Record<string, any>, K extends keyof EM>(eventBus: EventBusObservable<EM>, type: K, initialState: EM[K]) => EM[K];
@@ -1,9 +0,0 @@
1
- import type { AspectsProps } from '../../model/AspectsProps';
2
- import type { TariffsCardCellProps } from './CarouselTariffsCardContent';
3
- export interface CardCellsSectionProps extends AspectsProps {
4
- cardCells?: TariffsCardCellProps[];
5
- visibleCellsCount?: number;
6
- isUnfolded?: boolean;
7
- onToggle?: () => void;
8
- }
9
- export declare const CardCellsSection: import("@redneckz/uni-jsx").UNIComponent<CardCellsSectionProps, any, any>;
@@ -1,9 +0,0 @@
1
- import { EventBus } from '../../EventBus/EventBus';
2
- import { type Slot } from '../../model/ContentPageDef';
3
- export declare type CarouselTariffsCardFoldAction = {
4
- isUnfolded?: boolean;
5
- parent?: Slot;
6
- };
7
- export declare const carouselTariffsCardEventBus: EventBus<{
8
- fold: CarouselTariffsCardFoldAction;
9
- }>;
@@ -1,4 +0,0 @@
1
- export declare type NotUndefined = object | null;
2
- export declare type Reducer<S, A extends NotUndefined> = (state: S, action: A) => S;
3
- export declare type Dispatch<A extends NotUndefined> = (action: A) => void;
4
- export declare function useReducer<S, A extends NotUndefined>(reducer: Reducer<S, A>, initialArg: S): [state: S, dispatch: Dispatch<A>];
@@ -1,2 +0,0 @@
1
- import { type CustomFieldProps } from '../CustomFieldProps';
2
- export declare const ConsentAssignmentField: import("@redneckz/uni-jsx").UNIComponent<CustomFieldProps, any, any>;
@@ -1,2 +0,0 @@
1
- import { type CustomFieldProps } from '../CustomFieldProps';
2
- export declare const ConsentCollectionField: import("@redneckz/uni-jsx").UNIComponent<CustomFieldProps, any, any>;
@@ -1,2 +0,0 @@
1
- import { type CustomFieldProps } from '../CustomFieldProps';
2
- export declare const ConsentInformField: import("@redneckz/uni-jsx").UNIComponent<CustomFieldProps, any, any>;
@@ -1,2 +0,0 @@
1
- import { type CustomFieldProps } from '../CustomFieldProps';
2
- export declare const ConsentPhotoFlg: import("@redneckz/uni-jsx").UNIComponent<CustomFieldProps, any, any>;
@@ -1,2 +0,0 @@
1
- import { type CustomFieldProps } from '../CustomFieldProps';
2
- export declare const ConsentProviderField: import("@redneckz/uni-jsx").UNIComponent<CustomFieldProps, any, any>;
@@ -1,2 +0,0 @@
1
- import { type CustomFieldProps } from '../CustomFieldProps';
2
- export declare const ConsentToReceiveMaterialsField: import("@redneckz/uni-jsx").UNIComponent<CustomFieldProps, any, any>;
@@ -1,2 +0,0 @@
1
- import { type CustomFieldProps } from '../CustomFieldProps';
2
- export declare const ProcessPersonalDataField: import("@redneckz/uni-jsx").UNIComponent<CustomFieldProps, any, any>;
@@ -1,5 +0,0 @@
1
- interface SelectedLocationProps {
2
- defaultLocation?: string;
3
- }
4
- export declare const SelectedLocation: import("@redneckz/uni-jsx").UNIComponent<SelectedLocationProps, any, any>;
5
- export {};
@@ -1,2 +0,0 @@
1
- import type { EventBusEmitter } from './EventBus';
2
- export declare function useSubject<EM extends Record<string, any>, K extends keyof EM>(eventBus: EventBusEmitter<EM>, type: K, initialState: EM[K] | (() => EM[K] | Promise<EM[K]>)): (_: EM[K]) => void;
@@ -1,17 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.useSubject = void 0;
3
- const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
4
- function useSubject(eventBus, type, initialState) {
5
- (0, hooks_1.useEffect)(() => {
6
- const state = initialState instanceof Function ? initialState() : initialState;
7
- if (state instanceof Promise) {
8
- state.then((_) => eventBus.subject(type, _), console.warn);
9
- }
10
- else {
11
- eventBus.subject(type, state);
12
- }
13
- }, [eventBus, type]);
14
- return (0, hooks_1.useCallback)((_) => eventBus.fire(type, _), [eventBus, type]);
15
- }
16
- exports.useSubject = useSubject;
17
- //# sourceMappingURL=useSubject.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSubject.js","sourceRoot":"","sources":["../../src/EventBus/useSubject.ts"],"names":[],"mappings":";;AAAA,uDAAqE;AAGrE,SAAgB,UAAU,CACxB,QAA6B,EAC7B,IAAO,EACP,YAAoD;IAEpD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,KAAK,GAAG,YAAY,YAAY,QAAQ,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;QAC/E,IAAI,KAAK,YAAY,OAAO,EAAE;YAC5B,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;SAC5D;aAAM;YACL,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;SAC/B;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;IAErB,OAAO,IAAA,mBAAW,EAAC,CAAC,CAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;AAC7E,CAAC;AAfD,gCAeC"}
@@ -1,2 +0,0 @@
1
- import { type EventBusObservable } from './EventBus';
2
- export declare const useSubjectState: <EM extends Record<string, any>, K extends keyof EM>(eventBus: EventBusObservable<EM>, type: K, initialState: EM[K]) => EM[K];
@@ -1,10 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.useSubjectState = void 0;
3
- const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
4
- const useSubjectState = (eventBus, type, initialState) => {
5
- const [state, setState] = (0, hooks_1.useState)(initialState);
6
- (0, hooks_1.useEffect)(() => eventBus.subscribe(type, setState), [eventBus, type]);
7
- return state;
8
- };
9
- exports.useSubjectState = useSubjectState;
10
- //# sourceMappingURL=useSubjectState.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSubjectState.js","sourceRoot":"","sources":["../../src/EventBus/useSubjectState.ts"],"names":[],"mappings":";;AAAA,uDAAkE;AAG3D,MAAM,eAAe,GAAG,CAC7B,QAAgC,EAChC,IAAO,EACP,YAAmB,EACZ,EAAE;IACT,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,YAAY,CAAC,CAAC;IACjD,IAAA,iBAAS,EAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;IAEtE,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AATW,QAAA,eAAe,mBAS1B"}
@@ -1,9 +0,0 @@
1
- import type { AspectsProps } from '../../model/AspectsProps';
2
- import type { TariffsCardCellProps } from './CarouselTariffsCardContent';
3
- export interface CardCellsSectionProps extends AspectsProps {
4
- cardCells?: TariffsCardCellProps[];
5
- visibleCellsCount?: number;
6
- isUnfolded?: boolean;
7
- onToggle?: () => void;
8
- }
9
- export declare const CardCellsSection: import("@redneckz/uni-jsx").UNIComponent<CardCellsSectionProps, any, any>;
@@ -1,18 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.CardCellsSection = void 0;
3
- const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
- const uni_jsx_1 = require("@redneckz/uni-jsx");
5
- const Foldable_1 = require("../../ui-kit/Foldable/Foldable");
6
- const FoldableSection_1 = require("../../ui-kit/Foldable/FoldableSection");
7
- const Icon_1 = require("../../ui-kit/Icon/Icon");
8
- const dataAttributes_1 = require("../../utils/dataAttributes");
9
- const renderCardInfo_1 = require("./renderCardInfo");
10
- exports.CardCellsSection = (0, uni_jsx_1.JSX)((props) => {
11
- const { cardCells = [], visibleCellsCount = 1, isUnfolded } = props;
12
- const [visibleCells, hiddenCells] = visibleCellsCount > 0 && cardCells.length >= visibleCellsCount
13
- ? [cardCells.slice(0, visibleCellsCount), cardCells.slice(visibleCellsCount)]
14
- : [cardCells, []];
15
- return hiddenCells.length ? ((0, jsx_runtime_1.jsxs)(Foldable_1.FoldableWrapper, { children: [(0, jsx_runtime_1.jsxs)("div", { children: [visibleCells.map(renderCardInfo_1.renderCardInfo), (0, jsx_runtime_1.jsx)(FoldableSection_1.FoldableSection, { isUnfolded: isUnfolded, children: hiddenCells.map(renderCardInfo_1.renderCardInfo) })] }), (0, jsx_runtime_1.jsx)(FoldButton, { ...props })] })) : ((0, jsx_runtime_1.jsx)("div", { children: visibleCells.map(renderCardInfo_1.renderCardInfo) }));
16
- });
17
- const FoldButton = (0, uni_jsx_1.JSX)(({ isUnfolded, data, onToggle }) => ((0, jsx_runtime_1.jsxs)("button", { type: "button", className: "w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center", ...(isUnfolded ? (0, dataAttributes_1.getAspectsAttributes)(data) : {}), onClick: onToggle, children: [(0, jsx_runtime_1.jsx)("div", { children: isUnfolded ? 'Скрыть' : 'Подробнее о тарифе' }), (0, jsx_runtime_1.jsx)(Icon_1.Icon, { className: "text-primary-text", name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" })] })));
18
- //# sourceMappingURL=CardCellsSection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CardCellsSection.js","sourceRoot":"","sources":["../../../src/components/CarouselTariffsCard/CardCellsSection.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,6DAAiE;AACjE,2EAAwE;AACxE,iDAA8C;AAC9C,+DAAkE;AAElE,qDAAkD;AASrC,QAAA,gBAAgB,GAAG,IAAA,aAAG,EAAwB,CAAC,KAAK,EAAE,EAAE;IACnE,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,iBAAiB,GAAG,CAAC,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAEpE,MAAM,CAAC,YAAY,EAAE,WAAW,CAAC,GAC/B,iBAAiB,GAAG,CAAC,IAAI,SAAS,CAAC,MAAM,IAAI,iBAAiB;QAC5D,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,iBAAiB,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAC7E,CAAC,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAEtB,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAC1B,wBAAC,0BAAe,eACd,4CACG,YAAY,CAAC,GAAG,CAAC,+BAAc,CAAC,EACjC,uBAAC,iCAAe,IAAC,UAAU,EAAE,UAAU,YAAG,WAAW,CAAC,GAAG,CAAC,+BAAc,CAAC,GAAmB,IACxF,EACN,uBAAC,UAAU,OAAK,KAAK,GAAI,IACT,CACnB,CAAC,CAAC,CAAC,CACF,0CAAM,YAAY,CAAC,GAAG,CAAC,+BAAc,CAAC,GAAO,CAC9C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,IAAA,aAAG,EAAwB,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAChF,oCACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,iFAAiF,KAEvF,CAAC,UAAU,CAAC,CAAC,CAAC,IAAA,qCAAoB,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAClD,OAAO,EAAE,QAAQ,aAEjB,0CAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,oBAAoB,GAAO,EACzD,uBAAC,WAAI,IACH,SAAS,EAAC,mBAAmB,EAC7B,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,EAClD,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,GACX,IACK,CACV,CAAC,CAAC"}