@redneckz/wildless-cms-uni-blocks 0.14.933 → 0.14.934

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 (365) hide show
  1. package/bundle/ProjectSettings.d.ts +1 -0
  2. package/bundle/api/LeadServiceAPI.d.ts +3 -0
  3. package/bundle/api/getSubmitBody.d.ts +600 -0
  4. package/bundle/blocks.schema.json +1 -1
  5. package/bundle/bundle.umd.js +765 -551
  6. package/bundle/bundle.umd.min.js +1 -1
  7. package/bundle/components/ApplicationForm/ApplicationForm.d.ts +1 -0
  8. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
  9. package/bundle/components/ApplicationForm/handlers.d.ts +19 -0
  10. package/bundle/components/ApplicationForm/renderSections.d.ts +10 -0
  11. package/bundle/components/Header/DropdownMenu.d.ts +13 -3
  12. package/bundle/components/Header/HeaderQuickActionsMenu.d.ts +17 -0
  13. package/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -0
  14. package/bundle/components/Header/useDropdownSubMenu.d.ts +3 -2
  15. package/bundle/icons/IconName.d.ts +4 -2
  16. package/bundle/ui-kit/DialogManager/Dialog.d.ts +2 -0
  17. package/bundle/ui-kit/FormField/Fields/CallbackTimeField.d.ts +2 -0
  18. package/bundle/ui-kit/FormField/Fields/QuestionProductField.d.ts +2 -0
  19. package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  20. package/bundle/ui-kit/FormField/validators.d.ts +1 -0
  21. package/bundle/ui-kit/PhoneCallRequestDialog/PhoneCallRequestDialog.d.ts +6 -0
  22. package/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
  23. package/bundle/utils/getTimezone.d.ts +1 -0
  24. package/cosmos-static/icons/CallbackIcon.svg +1 -0
  25. package/cosmos-static/icons/sprites.svg +1 -0
  26. package/dist/ProjectSettings.d.ts +1 -0
  27. package/dist/ProjectSettings.js.map +1 -1
  28. package/dist/api/LeadServiceAPI.d.ts +3 -0
  29. package/dist/api/LeadServiceAPI.js +26 -0
  30. package/dist/api/LeadServiceAPI.js.map +1 -1
  31. package/dist/api/getSubmitBody.d.ts +600 -0
  32. package/dist/api/getSubmitBody.js +2 -1
  33. package/dist/api/getSubmitBody.js.map +1 -1
  34. package/dist/components/ApplicationForm/ApplicationForm.d.ts +1 -0
  35. package/dist/components/ApplicationForm/ApplicationForm.js +24 -36
  36. package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  37. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
  38. package/dist/components/ApplicationForm/handlers.d.ts +19 -0
  39. package/dist/components/ApplicationForm/handlers.js +55 -0
  40. package/dist/components/ApplicationForm/handlers.js.map +1 -0
  41. package/dist/components/ApplicationForm/renderSections.d.ts +10 -0
  42. package/dist/components/ApplicationForm/renderSections.js +10 -0
  43. package/dist/components/ApplicationForm/renderSections.js.map +1 -0
  44. package/dist/components/Header/DropdownMenu.d.ts +13 -3
  45. package/dist/components/Header/DropdownMenu.js +8 -2
  46. package/dist/components/Header/DropdownMenu.js.map +1 -1
  47. package/dist/components/Header/HeaderQuickActionsMenu.d.ts +17 -0
  48. package/dist/components/Header/HeaderQuickActionsMenu.js +82 -0
  49. package/dist/components/Header/HeaderQuickActionsMenu.js.map +1 -0
  50. package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -0
  51. package/dist/components/Header/HeaderSecondaryMenuButton.js +2 -2
  52. package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  53. package/dist/components/Header/HeaderSubMenu.js +2 -1
  54. package/dist/components/Header/HeaderSubMenu.js.map +1 -1
  55. package/dist/components/Header/HeaderTop.js +3 -1
  56. package/dist/components/Header/HeaderTop.js.map +1 -1
  57. package/dist/components/Header/useDropdownSubMenu.d.ts +3 -2
  58. package/dist/components/Header/useDropdownSubMenu.js +2 -2
  59. package/dist/components/Header/useDropdownSubMenu.js.map +1 -1
  60. package/dist/icons/IconName.d.ts +4 -2
  61. package/dist/icons/IconName.js +2 -0
  62. package/dist/icons/IconName.js.map +1 -1
  63. package/dist/ui-kit/DialogManager/Dialog.d.ts +2 -0
  64. package/dist/ui-kit/DialogManager/Dialog.js +9 -1
  65. package/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
  66. package/dist/ui-kit/FormField/Fields/CallbackTimeField.d.ts +2 -0
  67. package/dist/ui-kit/FormField/Fields/CallbackTimeField.js +25 -0
  68. package/dist/ui-kit/FormField/Fields/CallbackTimeField.js.map +1 -0
  69. package/dist/ui-kit/FormField/Fields/QuestionProductField.d.ts +2 -0
  70. package/dist/ui-kit/FormField/Fields/QuestionProductField.js +17 -0
  71. package/dist/ui-kit/FormField/Fields/QuestionProductField.js.map +1 -0
  72. package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  73. package/dist/ui-kit/FormField/getField.js +5 -0
  74. package/dist/ui-kit/FormField/getField.js.map +1 -1
  75. package/dist/ui-kit/FormField/getObjectValidator.js +3 -0
  76. package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  77. package/dist/ui-kit/FormField/validators.d.ts +1 -0
  78. package/dist/ui-kit/FormField/validators.js +4 -1
  79. package/dist/ui-kit/FormField/validators.js.map +1 -1
  80. package/dist/ui-kit/PhoneCallRequestDialog/PhoneCallRequestDialog.d.ts +6 -0
  81. package/dist/ui-kit/PhoneCallRequestDialog/PhoneCallRequestDialog.js +27 -0
  82. package/dist/ui-kit/PhoneCallRequestDialog/PhoneCallRequestDialog.js.map +1 -0
  83. package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
  84. package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +3 -2
  85. package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
  86. package/dist/ui-kit/Select/renderSelectContainer.js +2 -1
  87. package/dist/ui-kit/Select/renderSelectContainer.js.map +1 -1
  88. package/dist/utils/getTimezone.d.ts +1 -0
  89. package/dist/utils/getTimezone.js +12 -0
  90. package/dist/utils/getTimezone.js.map +1 -0
  91. package/lib/ProjectSettings.d.ts +1 -0
  92. package/lib/ProjectSettings.js.map +1 -1
  93. package/lib/api/LeadServiceAPI.d.ts +3 -0
  94. package/lib/api/LeadServiceAPI.js +26 -0
  95. package/lib/api/LeadServiceAPI.js.map +1 -1
  96. package/lib/api/getSubmitBody.d.ts +600 -0
  97. package/lib/api/getSubmitBody.js +2 -1
  98. package/lib/api/getSubmitBody.js.map +1 -1
  99. package/lib/common.css +1 -1
  100. package/lib/components/ApplicationForm/ApplicationForm.d.ts +1 -0
  101. package/lib/components/ApplicationForm/ApplicationForm.js +23 -35
  102. package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  103. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
  104. package/lib/components/ApplicationForm/handlers.d.ts +19 -0
  105. package/lib/components/ApplicationForm/handlers.js +50 -0
  106. package/lib/components/ApplicationForm/handlers.js.map +1 -0
  107. package/lib/components/ApplicationForm/renderSections.d.ts +10 -0
  108. package/lib/components/ApplicationForm/renderSections.js +7 -0
  109. package/lib/components/ApplicationForm/renderSections.js.map +1 -0
  110. package/lib/components/Header/DropdownMenu.d.ts +13 -3
  111. package/lib/components/Header/DropdownMenu.js +8 -2
  112. package/lib/components/Header/DropdownMenu.js.map +1 -1
  113. package/lib/components/Header/HeaderQuickActionsMenu.d.ts +17 -0
  114. package/lib/components/Header/HeaderQuickActionsMenu.js +79 -0
  115. package/lib/components/Header/HeaderQuickActionsMenu.js.map +1 -0
  116. package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -0
  117. package/lib/components/Header/HeaderSecondaryMenuButton.js +2 -2
  118. package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  119. package/lib/components/Header/HeaderSubMenu.js +2 -1
  120. package/lib/components/Header/HeaderSubMenu.js.map +1 -1
  121. package/lib/components/Header/HeaderTop.js +3 -1
  122. package/lib/components/Header/HeaderTop.js.map +1 -1
  123. package/lib/components/Header/useDropdownSubMenu.d.ts +3 -2
  124. package/lib/components/Header/useDropdownSubMenu.js +2 -2
  125. package/lib/components/Header/useDropdownSubMenu.js.map +1 -1
  126. package/lib/icons/IconName.d.ts +4 -2
  127. package/lib/icons/IconName.js +2 -0
  128. package/lib/icons/IconName.js.map +1 -1
  129. package/lib/ui-kit/DialogManager/Dialog.d.ts +2 -0
  130. package/lib/ui-kit/DialogManager/Dialog.js +9 -1
  131. package/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
  132. package/lib/ui-kit/FormField/Fields/CallbackTimeField.d.ts +2 -0
  133. package/lib/ui-kit/FormField/Fields/CallbackTimeField.js +23 -0
  134. package/lib/ui-kit/FormField/Fields/CallbackTimeField.js.map +1 -0
  135. package/lib/ui-kit/FormField/Fields/QuestionProductField.d.ts +2 -0
  136. package/lib/ui-kit/FormField/Fields/QuestionProductField.js +15 -0
  137. package/lib/ui-kit/FormField/Fields/QuestionProductField.js.map +1 -0
  138. package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  139. package/lib/ui-kit/FormField/getField.js +5 -0
  140. package/lib/ui-kit/FormField/getField.js.map +1 -1
  141. package/lib/ui-kit/FormField/getObjectValidator.js +4 -1
  142. package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  143. package/lib/ui-kit/FormField/validators.d.ts +1 -0
  144. package/lib/ui-kit/FormField/validators.js +2 -0
  145. package/lib/ui-kit/FormField/validators.js.map +1 -1
  146. package/lib/ui-kit/PhoneCallRequestDialog/PhoneCallRequestDialog.d.ts +6 -0
  147. package/lib/ui-kit/PhoneCallRequestDialog/PhoneCallRequestDialog.fixture.d.ts +5 -0
  148. package/lib/ui-kit/PhoneCallRequestDialog/PhoneCallRequestDialog.js +24 -0
  149. package/lib/ui-kit/PhoneCallRequestDialog/PhoneCallRequestDialog.js.map +1 -0
  150. package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
  151. package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +3 -2
  152. package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
  153. package/lib/ui-kit/Select/renderSelectContainer.js +2 -1
  154. package/lib/ui-kit/Select/renderSelectContainer.js.map +1 -1
  155. package/lib/utils/getTimezone.d.ts +1 -0
  156. package/lib/utils/getTimezone.js +9 -0
  157. package/lib/utils/getTimezone.js.map +1 -0
  158. package/mobile/bundle/ProjectSettings.d.ts +1 -0
  159. package/mobile/bundle/api/LeadServiceAPI.d.ts +3 -0
  160. package/mobile/bundle/api/getSubmitBody.d.ts +600 -0
  161. package/mobile/bundle/bundle.umd.js +806 -541
  162. package/mobile/bundle/bundle.umd.min.js +1 -1
  163. package/mobile/bundle/components/ApplicationForm/ApplicationForm.d.ts +1 -0
  164. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
  165. package/mobile/bundle/components/ApplicationForm/handlers.d.ts +19 -0
  166. package/mobile/bundle/components/ApplicationForm/renderSections.d.ts +10 -0
  167. package/mobile/bundle/components/Header/DropdownMenu.d.ts +13 -3
  168. package/mobile/bundle/components/Header/HeaderQuickActionsMenu.d.ts +17 -0
  169. package/mobile/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -0
  170. package/mobile/bundle/components/Header/useDropdownSubMenu.d.ts +3 -2
  171. package/mobile/bundle/icons/IconName.d.ts +4 -2
  172. package/mobile/bundle/ui-kit/DialogManager/Dialog.d.ts +2 -0
  173. package/mobile/bundle/ui-kit/FormField/Fields/CallbackTimeField.d.ts +2 -0
  174. package/mobile/bundle/ui-kit/FormField/Fields/QuestionProductField.d.ts +2 -0
  175. package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  176. package/mobile/bundle/ui-kit/FormField/validators.d.ts +1 -0
  177. package/mobile/bundle/ui-kit/PhoneCallRequestDialog/PhoneCallRequestDialog.d.ts +6 -0
  178. package/mobile/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
  179. package/mobile/bundle/utils/getTimezone.d.ts +1 -0
  180. package/mobile/dist/ProjectSettings.d.ts +1 -0
  181. package/mobile/dist/ProjectSettings.js.map +1 -1
  182. package/mobile/dist/api/LeadServiceAPI.d.ts +3 -0
  183. package/mobile/dist/api/LeadServiceAPI.js +26 -0
  184. package/mobile/dist/api/LeadServiceAPI.js.map +1 -1
  185. package/mobile/dist/api/getSubmitBody.d.ts +600 -0
  186. package/mobile/dist/api/getSubmitBody.js +2 -1
  187. package/mobile/dist/api/getSubmitBody.js.map +1 -1
  188. package/mobile/dist/components/ApplicationForm/ApplicationForm.d.ts +1 -0
  189. package/mobile/dist/components/ApplicationForm/ApplicationForm.js +24 -36
  190. package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  191. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
  192. package/mobile/dist/components/ApplicationForm/handlers.d.ts +19 -0
  193. package/mobile/dist/components/ApplicationForm/handlers.js +55 -0
  194. package/mobile/dist/components/ApplicationForm/handlers.js.map +1 -0
  195. package/mobile/dist/components/ApplicationForm/renderSections.d.ts +10 -0
  196. package/mobile/dist/components/ApplicationForm/renderSections.js +10 -0
  197. package/mobile/dist/components/ApplicationForm/renderSections.js.map +1 -0
  198. package/mobile/dist/components/Header/DropdownMenu.d.ts +13 -3
  199. package/mobile/dist/components/Header/DropdownMenu.js +8 -2
  200. package/mobile/dist/components/Header/DropdownMenu.js.map +1 -1
  201. package/mobile/dist/components/Header/HeaderQuickActionsMenu.d.ts +17 -0
  202. package/mobile/dist/components/Header/HeaderQuickActionsMenu.js +82 -0
  203. package/mobile/dist/components/Header/HeaderQuickActionsMenu.js.map +1 -0
  204. package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -0
  205. package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js +2 -2
  206. package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  207. package/mobile/dist/components/Header/HeaderSubMenu.js +2 -1
  208. package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
  209. package/mobile/dist/components/Header/HeaderTop.js +3 -1
  210. package/mobile/dist/components/Header/HeaderTop.js.map +1 -1
  211. package/mobile/dist/components/Header/useDropdownSubMenu.d.ts +3 -2
  212. package/mobile/dist/components/Header/useDropdownSubMenu.js +2 -2
  213. package/mobile/dist/components/Header/useDropdownSubMenu.js.map +1 -1
  214. package/mobile/dist/icons/IconName.d.ts +4 -2
  215. package/mobile/dist/icons/IconName.js +2 -0
  216. package/mobile/dist/icons/IconName.js.map +1 -1
  217. package/mobile/dist/ui-kit/DialogManager/Dialog.d.ts +2 -0
  218. package/mobile/dist/ui-kit/DialogManager/Dialog.js +9 -1
  219. package/mobile/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
  220. package/mobile/dist/ui-kit/FormField/Fields/CallbackTimeField.d.ts +2 -0
  221. package/mobile/dist/ui-kit/FormField/Fields/CallbackTimeField.js +25 -0
  222. package/mobile/dist/ui-kit/FormField/Fields/CallbackTimeField.js.map +1 -0
  223. package/mobile/dist/ui-kit/FormField/Fields/QuestionProductField.d.ts +2 -0
  224. package/mobile/dist/ui-kit/FormField/Fields/QuestionProductField.js +17 -0
  225. package/mobile/dist/ui-kit/FormField/Fields/QuestionProductField.js.map +1 -0
  226. package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  227. package/mobile/dist/ui-kit/FormField/getField.js +5 -0
  228. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  229. package/mobile/dist/ui-kit/FormField/getObjectValidator.js +3 -0
  230. package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  231. package/mobile/dist/ui-kit/FormField/validators.d.ts +1 -0
  232. package/mobile/dist/ui-kit/FormField/validators.js +4 -1
  233. package/mobile/dist/ui-kit/FormField/validators.js.map +1 -1
  234. package/mobile/dist/ui-kit/PhoneCallRequestDialog/PhoneCallRequestDialog.d.ts +6 -0
  235. package/mobile/dist/ui-kit/PhoneCallRequestDialog/PhoneCallRequestDialog.js +27 -0
  236. package/mobile/dist/ui-kit/PhoneCallRequestDialog/PhoneCallRequestDialog.js.map +1 -0
  237. package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
  238. package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +3 -2
  239. package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
  240. package/mobile/dist/ui-kit/Select/renderSelectContainer.js +2 -1
  241. package/mobile/dist/ui-kit/Select/renderSelectContainer.js.map +1 -1
  242. package/mobile/dist/utils/getTimezone.d.ts +1 -0
  243. package/mobile/dist/utils/getTimezone.js +12 -0
  244. package/mobile/dist/utils/getTimezone.js.map +1 -0
  245. package/mobile/lib/ProjectSettings.d.ts +1 -0
  246. package/mobile/lib/ProjectSettings.js.map +1 -1
  247. package/mobile/lib/api/LeadServiceAPI.d.ts +3 -0
  248. package/mobile/lib/api/LeadServiceAPI.js +26 -0
  249. package/mobile/lib/api/LeadServiceAPI.js.map +1 -1
  250. package/mobile/lib/api/getSubmitBody.d.ts +600 -0
  251. package/mobile/lib/api/getSubmitBody.js +2 -1
  252. package/mobile/lib/api/getSubmitBody.js.map +1 -1
  253. package/mobile/lib/common.css +1 -1
  254. package/mobile/lib/components/ApplicationForm/ApplicationForm.d.ts +1 -0
  255. package/mobile/lib/components/ApplicationForm/ApplicationForm.js +23 -35
  256. package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  257. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
  258. package/mobile/lib/components/ApplicationForm/handlers.d.ts +19 -0
  259. package/mobile/lib/components/ApplicationForm/handlers.js +50 -0
  260. package/mobile/lib/components/ApplicationForm/handlers.js.map +1 -0
  261. package/mobile/lib/components/ApplicationForm/renderSections.d.ts +10 -0
  262. package/mobile/lib/components/ApplicationForm/renderSections.js +7 -0
  263. package/mobile/lib/components/ApplicationForm/renderSections.js.map +1 -0
  264. package/mobile/lib/components/Header/DropdownMenu.d.ts +13 -3
  265. package/mobile/lib/components/Header/DropdownMenu.js +8 -2
  266. package/mobile/lib/components/Header/DropdownMenu.js.map +1 -1
  267. package/mobile/lib/components/Header/HeaderQuickActionsMenu.d.ts +17 -0
  268. package/mobile/lib/components/Header/HeaderQuickActionsMenu.js +79 -0
  269. package/mobile/lib/components/Header/HeaderQuickActionsMenu.js.map +1 -0
  270. package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -0
  271. package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js +2 -2
  272. package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  273. package/mobile/lib/components/Header/HeaderSubMenu.js +2 -1
  274. package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
  275. package/mobile/lib/components/Header/HeaderTop.js +3 -1
  276. package/mobile/lib/components/Header/HeaderTop.js.map +1 -1
  277. package/mobile/lib/components/Header/useDropdownSubMenu.d.ts +3 -2
  278. package/mobile/lib/components/Header/useDropdownSubMenu.js +2 -2
  279. package/mobile/lib/components/Header/useDropdownSubMenu.js.map +1 -1
  280. package/mobile/lib/icons/IconName.d.ts +4 -2
  281. package/mobile/lib/icons/IconName.js +2 -0
  282. package/mobile/lib/icons/IconName.js.map +1 -1
  283. package/mobile/lib/ui-kit/DialogManager/Dialog.d.ts +2 -0
  284. package/mobile/lib/ui-kit/DialogManager/Dialog.js +9 -1
  285. package/mobile/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
  286. package/mobile/lib/ui-kit/FormField/Fields/CallbackTimeField.d.ts +2 -0
  287. package/mobile/lib/ui-kit/FormField/Fields/CallbackTimeField.js +23 -0
  288. package/mobile/lib/ui-kit/FormField/Fields/CallbackTimeField.js.map +1 -0
  289. package/mobile/lib/ui-kit/FormField/Fields/QuestionProductField.d.ts +2 -0
  290. package/mobile/lib/ui-kit/FormField/Fields/QuestionProductField.js +15 -0
  291. package/mobile/lib/ui-kit/FormField/Fields/QuestionProductField.js.map +1 -0
  292. package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  293. package/mobile/lib/ui-kit/FormField/getField.js +5 -0
  294. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  295. package/mobile/lib/ui-kit/FormField/getObjectValidator.js +4 -1
  296. package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  297. package/mobile/lib/ui-kit/FormField/validators.d.ts +1 -0
  298. package/mobile/lib/ui-kit/FormField/validators.js +2 -0
  299. package/mobile/lib/ui-kit/FormField/validators.js.map +1 -1
  300. package/mobile/lib/ui-kit/PhoneCallRequestDialog/PhoneCallRequestDialog.d.ts +6 -0
  301. package/mobile/lib/ui-kit/PhoneCallRequestDialog/PhoneCallRequestDialog.js +24 -0
  302. package/mobile/lib/ui-kit/PhoneCallRequestDialog/PhoneCallRequestDialog.js.map +1 -0
  303. package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
  304. package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +3 -2
  305. package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
  306. package/mobile/lib/ui-kit/Select/renderSelectContainer.js +2 -1
  307. package/mobile/lib/ui-kit/Select/renderSelectContainer.js.map +1 -1
  308. package/mobile/lib/utils/getTimezone.d.ts +1 -0
  309. package/mobile/lib/utils/getTimezone.js +9 -0
  310. package/mobile/lib/utils/getTimezone.js.map +1 -0
  311. package/mobile/src/ProjectSettings.ts +1 -0
  312. package/mobile/src/api/LeadServiceAPI.ts +34 -1
  313. package/mobile/src/api/getSubmitBody.ts +2 -0
  314. package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +34 -60
  315. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +1 -1
  316. package/mobile/src/components/ApplicationForm/handlers.ts +97 -0
  317. package/mobile/src/components/ApplicationForm/renderSections.tsx +25 -0
  318. package/mobile/src/components/Header/DropdownMenu.tsx +37 -14
  319. package/mobile/src/components/Header/HeaderQuickActionsMenu.tsx +134 -0
  320. package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +3 -0
  321. package/mobile/src/components/Header/HeaderSubMenu.tsx +12 -1
  322. package/mobile/src/components/Header/HeaderTop.tsx +21 -6
  323. package/mobile/src/components/Header/useDropdownSubMenu.tsx +14 -3
  324. package/mobile/src/icons/CallbackIcon.svg +3 -0
  325. package/mobile/src/icons/IconName.ts +4 -4
  326. package/mobile/src/ui-kit/DialogManager/Dialog.tsx +34 -17
  327. package/mobile/src/ui-kit/FormField/Fields/CallbackTimeField.tsx +32 -0
  328. package/mobile/src/ui-kit/FormField/Fields/QuestionProductField.tsx +25 -0
  329. package/mobile/src/ui-kit/FormField/NameFieldDef.ts +4 -2
  330. package/mobile/src/ui-kit/FormField/getField.tsx +5 -0
  331. package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +4 -0
  332. package/mobile/src/ui-kit/FormField/validators.ts +6 -0
  333. package/mobile/src/ui-kit/PhoneCallRequestDialog/PhoneCallRequestDialog.tsx +49 -0
  334. package/mobile/src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx +29 -24
  335. package/mobile/src/ui-kit/Select/renderSelectContainer.tsx +2 -1
  336. package/mobile/src/utils/getTimezone.ts +9 -0
  337. package/package.json +2 -2
  338. package/src/ProjectSettings.ts +1 -0
  339. package/src/api/LeadServiceAPI.ts +34 -1
  340. package/src/api/getSubmitBody.ts +2 -0
  341. package/src/components/ApplicationForm/ApplicationForm.tsx +34 -60
  342. package/src/components/ApplicationForm/ApplicationFormContent.ts +1 -1
  343. package/src/components/ApplicationForm/handlers.ts +97 -0
  344. package/src/components/ApplicationForm/renderSections.tsx +25 -0
  345. package/src/components/Header/DropdownMenu.tsx +37 -14
  346. package/src/components/Header/Header.fixture.mobile.tsx +2 -0
  347. package/src/components/Header/HeaderQuickActionsMenu.tsx +134 -0
  348. package/src/components/Header/HeaderSecondaryMenuButton.tsx +3 -0
  349. package/src/components/Header/HeaderSubMenu.tsx +12 -1
  350. package/src/components/Header/HeaderTop.tsx +21 -6
  351. package/src/components/Header/useDropdownSubMenu.tsx +14 -3
  352. package/src/icons/CallbackIcon.svg +3 -0
  353. package/src/icons/IconName.ts +4 -4
  354. package/src/ui-kit/DialogManager/Dialog.tsx +34 -17
  355. package/src/ui-kit/FormField/Fields/CallbackTimeField.tsx +32 -0
  356. package/src/ui-kit/FormField/Fields/QuestionProductField.tsx +25 -0
  357. package/src/ui-kit/FormField/NameFieldDef.ts +4 -2
  358. package/src/ui-kit/FormField/getField.tsx +5 -0
  359. package/src/ui-kit/FormField/getObjectValidator.tsx +4 -0
  360. package/src/ui-kit/FormField/validators.ts +6 -0
  361. package/src/ui-kit/PhoneCallRequestDialog/PhoneCallRequestDialog.fixture.tsx +7 -0
  362. package/src/ui-kit/PhoneCallRequestDialog/PhoneCallRequestDialog.tsx +49 -0
  363. package/src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx +29 -24
  364. package/src/ui-kit/Select/renderSelectContainer.tsx +2 -1
  365. package/src/utils/getTimezone.ts +9 -0
@@ -8,33 +8,38 @@ import { Img } from '../Img/Img';
8
8
  export interface ResponseNotificationProps extends OnCloseProps {
9
9
  ok?: boolean;
10
10
  typeForm?: string;
11
+ errorMessage?: string;
11
12
  }
12
13
 
13
- export const ResponseTypeDialog = JSX<ResponseNotificationProps>(({ ok, typeForm, onClose }) => {
14
- const statusIcon = ok ? 'ResponseOKIcon' : 'ResponseFailIcon';
14
+ export const ResponseTypeDialog = JSX<ResponseNotificationProps>(
15
+ ({ ok, typeForm, onClose, errorMessage }) => {
16
+ const statusIcon = ok ? 'ResponseOKIcon' : 'ResponseFailIcon';
15
17
 
16
- const responseOKDescription =
17
- typeForm === 'ANTIFRAUD'
18
- ? `Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы
18
+ const responseOKDescription =
19
+ typeForm === 'ANTIFRAUD'
20
+ ? `Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы
19
21
  можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка
20
22
  не звонят с использованием мессенджеров.`
21
- : 'Совсем скоро мы с вами свяжемся';
23
+ : 'Совсем скоро мы с вами свяжемся';
22
24
 
23
- return (
24
- <Dialog maxWidth="lg" onClose={onClose}>
25
- <div className="flex flex-col gap-lg items-center rounded-md space-x-m">
26
- <Img image={{ icon: statusIcon, iconVersion: 'normal' }} width="136" height="136" />
27
- <Headline
28
- className="w-full"
29
- title={ok ? 'Ваша заявка отправлена' : 'Не удалось отправить заявку'}
30
- description={ok ? responseOKDescription : 'Пожалуйста, повторите позднее'}
31
- headlineVersion="XS"
32
- isEmbedded={true}
33
- />
34
- <Button type="button" onClick={onClose}>
35
- Хорошо
36
- </Button>
37
- </div>
38
- </Dialog>
39
- );
40
- });
25
+ const responseFailDescription = errorMessage || 'Пожалуйста, повторите позднее';
26
+
27
+ return (
28
+ <Dialog maxWidth="lg" onClose={onClose}>
29
+ <div className="flex flex-col gap-lg items-center rounded-md space-x-m">
30
+ <Img image={{ icon: statusIcon, iconVersion: 'normal' }} width="136" height="136" />
31
+ <Headline
32
+ className="w-full"
33
+ title={ok ? 'Ваша заявка отправлена' : 'Не удалось отправить заявку'}
34
+ description={ok ? responseOKDescription : responseFailDescription}
35
+ headlineVersion="XS"
36
+ isEmbedded={true}
37
+ />
38
+ <Button type="button" onClick={onClose}>
39
+ Хорошо
40
+ </Button>
41
+ </div>
42
+ </Dialog>
43
+ );
44
+ },
45
+ );
@@ -1,6 +1,7 @@
1
1
  import type { ControlProps } from '../../model/ControlProps';
2
2
  import { type IconVersion } from '../../model/IconVersion';
3
3
  import { type OnCloseProps } from '../../model/OnCloseProps';
4
+ import { noop } from '../../utils/noop';
4
5
  import { style } from '../../utils/style';
5
6
  import { type Option } from './Option';
6
7
  import { renderIcon } from './renderIcon';
@@ -21,7 +22,7 @@ export const renderSelectContainer = ({
21
22
  valid = true,
22
23
  isDisabled = false,
23
24
  isOpen = false,
24
- onOpen,
25
+ onOpen = noop,
25
26
  onClose,
26
27
  isManualInput = false,
27
28
  query = '',
@@ -0,0 +1,9 @@
1
+ export const getUserTimezoneOffset = (): string => {
2
+ const offset = new Date().getTimezoneOffset();
3
+ const absOffset = Math.abs(offset);
4
+ const hours = Math.floor(absOffset / 60);
5
+ const minutes = absOffset % 60;
6
+ const sign = offset < 0 ? '+' : '-';
7
+
8
+ return `GMT${sign}${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`;
9
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.933",
3
+ "version": "0.14.934",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -204,7 +204,7 @@
204
204
  "path": "lib/common.css"
205
205
  },
206
206
  {
207
- "limit": "100 kB",
207
+ "limit": "105 kB",
208
208
  "path": "bundle/bundle.umd.min.js"
209
209
  }
210
210
  ],
@@ -8,6 +8,7 @@ export interface ProjectSettings {
8
8
  BASE_PATH?: string; // Should ends with "/"
9
9
  YANDEX_MAP_API_KEY?: string;
10
10
  YANDEX_METRIKA_ID?: string;
11
+ QUICK_ACTIONS?: string[];
11
12
  }
12
13
 
13
14
  const URI_KEYS: Array<keyof ProjectSettings> = ['CDN', 'BASE_PATH'];
@@ -1,5 +1,6 @@
1
1
  import { type JSONRecord, type JSONScalar } from '@redneckz/json-op';
2
2
  import { type Router } from '../external/useRouter';
3
+ import { getUserTimezoneOffset } from '../utils/getTimezone';
3
4
  import { API_BASE_URI } from './apiBaseUrl';
4
5
  import { getPhoneBody, getSubmitBody } from './getSubmitBody';
5
6
 
@@ -14,6 +15,8 @@ export type LeadRequest = Record<string, JSONRecord | JSONScalar | null> & {
14
15
  secondaryPhoneNumber?: string;
15
16
  partnerSymbolCode?: string;
16
17
  partnerName?: string;
18
+ consentDataProcessing?: string;
19
+ russianPhone?: string;
17
20
  };
18
21
 
19
22
  export type CheckCodeProps = {
@@ -88,7 +91,6 @@ export function LeadServiceAPI() {
88
91
  confimationCode: code,
89
92
  leadRequest: getSubmitBody(body, false),
90
93
  };
91
-
92
94
  try {
93
95
  const response = await LeadServiceFetch(`${API_BASE_URI}/confirmCorporateLead`, submitBody);
94
96
 
@@ -98,10 +100,30 @@ export function LeadServiceAPI() {
98
100
  }
99
101
  }
100
102
 
103
+ async function sendPhoneCallRequest(body: LeadRequest, isNaturalPerson = false) {
104
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
105
+ const submitBody = getSubmitBody(body, isNaturalPerson);
106
+
107
+ const formatSubmitBody = getFormatCallbackSubmitBody(submitBody);
108
+
109
+ try {
110
+ const response = await LeadServiceFetch(`${API_BASE_URI}/callback`, formatSubmitBody);
111
+
112
+ if (!response?.ok) {
113
+ return null;
114
+ }
115
+
116
+ return await response.json();
117
+ } catch (e) {
118
+ return null;
119
+ }
120
+ }
121
+
101
122
  return {
102
123
  send,
103
124
  sendCode,
104
125
  checkCode,
126
+ sendPhoneCallRequest,
105
127
  };
106
128
  }
107
129
 
@@ -112,3 +134,14 @@ const LeadServiceFetch = (url: string, submitBody: SubmitBody) =>
112
134
  mode: 'cors',
113
135
  body: JSON.stringify(submitBody),
114
136
  });
137
+
138
+ const getFormatCallbackSubmitBody = (submitBody: Partial<LeadRequest>): SubmitBody => {
139
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
140
+ const { typeForm, consentDataProcessing, phone, ...rest } = submitBody;
141
+
142
+ return {
143
+ ...rest,
144
+ phone: phone?.startsWith('+') ? phone.slice(1) : phone,
145
+ clientTimezone: getUserTimezoneOffset(),
146
+ };
147
+ };
@@ -24,6 +24,7 @@ export const getSubmitBody = (body: LeadRequest, isNaturalPerson: boolean, route
24
24
  bankEmpolee,
25
25
  applicationDate,
26
26
  partnerName,
27
+ russianPhone,
27
28
  ...staticBody
28
29
  } = body;
29
30
 
@@ -32,6 +33,7 @@ export const getSubmitBody = (body: LeadRequest, isNaturalPerson: boolean, route
32
33
  ...getRegion(region, isNaturalPerson),
33
34
  ...getEmail(email, isNaturalPerson),
34
35
  ...getPhone(phone),
36
+ ...getPhone(russianPhone),
35
37
  ...getFormatDate(desiredMeetingDate as string, 'desiredMeetingDate'),
36
38
  ...(isNaturalPerson ? getFormatDate(birthday as string) : { inn }),
37
39
  ...(typeForm === 'FEEDBACK'
@@ -1,45 +1,43 @@
1
1
  import { useCallback, useMemo } from '@redneckz/uni-jsx/lib/hooks';
2
- import { LeadServiceAPI } from '../../api/LeadServiceAPI';
3
2
  import { useRouter } from '../../external/useRouter';
4
- import { handleAspects } from '../../hooks/useAspects/handleAspects';
5
3
  import { useAspects } from '../../hooks/useAspects/useAspects';
6
- import { useForm, type FormFieldRegisterer } from '../../hooks/useForm/useForm';
7
- import { type FormTypeFieldDef } from '../../model/FormTypeFieldDef';
8
- import { type SectionsProps } from '../../model/InputSectionsType';
4
+ import { useForm } from '../../hooks/useForm/useForm';
9
5
  import { ApplicationFormLayout } from '../../ui-kit/ApplicationFormLayout/ApplicationFormLayout';
10
6
  import { useDialog } from '../../ui-kit/DialogManager/useDialog';
11
7
  import { getConsentDataProcessing } from '../../ui-kit/FormField/getConsentDataProcessing';
12
- import { getField } from '../../ui-kit/FormField/getField';
13
8
  import { getFormValidator } from '../../ui-kit/FormField/getObjectValidator';
14
- import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle';
15
- import { renderTitle } from '../../ui-kit/FormField/renderTitle';
16
9
  import { type PreventableEventWithTarget } from '../../ui-kit/PreventableEvent';
17
10
  import { ResponseTypeDialog } from '../../ui-kit/ResponseTypeDialog/ResponseTypeDialog';
18
11
  import { UniBlock } from '../../UniBlock/UniBlock';
19
12
  import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
20
13
  import { style } from '../../utils/style';
21
- import {
22
- type additionalParamsType,
23
- type ApplicationFormContent,
24
- type FieldDef,
25
- } from './ApplicationFormContent';
14
+ import { type ApplicationFormContent, type FieldDef } from './ApplicationFormContent';
26
15
  import { getFormatData } from './getFormatData';
27
16
  import { getInitialFormState, type FormState } from './getInitialFormState';
17
+ import {
18
+ handleCallback,
19
+ handleDefault,
20
+ handleInitCorporateLead,
21
+ type HandlerProps,
22
+ } from './handlers';
28
23
  import { renderAgreementSubmit } from './renderAgreementSubmit';
29
24
  import { renderContacts } from './renderContacts';
25
+ import { renderSections } from './renderSections';
30
26
  import { VerifyPhoneDialog } from './VerifyPhoneDialog';
31
27
 
32
- export interface ApplicationFormProps extends ApplicationFormContent, UniBlockProps {}
28
+ export interface ApplicationFormProps extends ApplicationFormContent, UniBlockProps {
29
+ onSuccess?: () => void;
30
+ }
33
31
 
34
- type renderSectionsType = {
35
- typeForm: FormTypeFieldDef;
36
- additionalParams?: additionalParamsType;
37
- };
32
+ type Handler = (context: HandlerProps) => Promise<void>;
38
33
 
39
- const API = LeadServiceAPI();
34
+ const handlerMap: Record<string, Handler> = {
35
+ initcorporatelead: handleInitCorporateLead,
36
+ callback: handleCallback,
37
+ default: handleDefault,
38
+ };
40
39
 
41
40
  export const ApplicationForm = UniBlock<ApplicationFormProps>(
42
- // eslint-disable-next-line max-lines-per-function
43
41
  ({
44
42
  className,
45
43
  title,
@@ -51,6 +49,7 @@ export const ApplicationForm = UniBlock<ApplicationFormProps>(
51
49
  additionalParams,
52
50
  isContacts,
53
51
  data,
52
+ onSuccess,
54
53
  ...rest
55
54
  }) => {
56
55
  const inputs = useMemo(
@@ -71,35 +70,17 @@ export const ApplicationForm = UniBlock<ApplicationFormProps>(
71
70
  async (formData: FormState, ev: PreventableEventWithTarget) => {
72
71
  const formatData = getFormatData({ ...formData, ...additionalParams });
73
72
 
74
- if (endpoint === 'initcorporatelead') {
75
- const { phone } = formatData;
76
-
77
- const response = await API.sendCode({ phone: String(phone) });
78
-
79
- if (!response) {
80
- responseTypeDialog.open({ ok: Boolean(response), typeForm });
81
-
82
- return;
83
- }
84
-
85
- verifyPhoneDialog.open({
86
- phone,
87
- formatData,
88
- reqId: String(response),
89
- onSuccess: () => {
90
- verifyPhoneDialog.close();
91
- responseTypeDialog.open({ ok: true, typeForm });
92
- handleAspects({ aspectsAttributes: data, aspects, ev });
93
- },
94
- });
95
- } else {
96
- const ok = Boolean(await API.send(formatData, router, endpoint === 'lead'));
97
-
98
- responseTypeDialog.open({ ok, typeForm });
99
- if (ok) {
100
- handleAspects({ aspectsAttributes: data, aspects, ev });
101
- }
102
- }
73
+ await executeHandler(endpoint ?? 'default', {
74
+ formatData,
75
+ ev,
76
+ typeForm,
77
+ data,
78
+ aspects,
79
+ router,
80
+ responseTypeDialog,
81
+ verifyPhoneDialog,
82
+ onSuccess,
83
+ });
103
84
  },
104
85
  [typeForm],
105
86
  );
@@ -133,14 +114,7 @@ export const ApplicationForm = UniBlock<ApplicationFormProps>(
133
114
  },
134
115
  );
135
116
 
136
- const renderSections = (
137
- sections: SectionsProps[],
138
- field: FormFieldRegisterer<Record<string, any>>,
139
- { typeForm, additionalParams }: renderSectionsType,
140
- ) =>
141
- sections.map((_, i) => (
142
- <div key={`section-${i}`} className={style(inputColumnStyles(_.columns), 'grid')}>
143
- {renderTitle(_.title)}
144
- {(_?.inputs || [])?.map(getField<FieldDef>(field, { typeForm, ...additionalParams }))}
145
- </div>
146
- ));
117
+ const executeHandler = async (endpoint: string, context: HandlerProps): Promise<void> => {
118
+ const handler = handlerMap[endpoint] || handlerMap.default;
119
+ await handler(context);
120
+ };
@@ -43,7 +43,7 @@ export type FieldDef = Required &
43
43
  };
44
44
 
45
45
  /** @hidden */
46
- export type EndpointType = 'lead' | 'initcorporatelead' | 'sendcorporatelead';
46
+ export type EndpointType = 'lead' | 'initcorporatelead' | 'sendcorporatelead' | 'callback';
47
47
 
48
48
  /**
49
49
  * @title Секция полей ввода
@@ -0,0 +1,97 @@
1
+ import { LeadServiceAPI, type LeadRequest } from '../../api/LeadServiceAPI';
2
+ import { type Router } from '../../external/useRouter';
3
+ import { handleAspects } from '../../hooks/useAspects/handleAspects';
4
+ import { type Aspects } from '../../hooks/useAspects/useAspects';
5
+ import { type AspectsDef } from '../../model/AspectsProps';
6
+ import { type PreventableEventWithTarget } from '../../ui-kit/PreventableEvent';
7
+ import { noop } from '../../utils/noop';
8
+
9
+ export type HandlerProps = {
10
+ formatData: LeadRequest;
11
+ data?: AspectsDef[];
12
+ aspects?: Aspects;
13
+ ev: PreventableEventWithTarget;
14
+ typeForm?: string;
15
+ router: Router;
16
+ verifyPhoneDialog?: any;
17
+ responseTypeDialog?: any;
18
+ onSuccess?: () => void;
19
+ };
20
+
21
+ const API = LeadServiceAPI();
22
+
23
+ export const handleInitCorporateLead = async ({
24
+ formatData = {},
25
+ typeForm,
26
+ responseTypeDialog,
27
+ verifyPhoneDialog,
28
+ data = [],
29
+ aspects = {},
30
+ ev,
31
+ }: HandlerProps) => {
32
+ const { phone } = formatData;
33
+
34
+ const response = await API.sendCode({ phone: String(phone) });
35
+
36
+ if (!response) {
37
+ responseTypeDialog.open({ ok: Boolean(response), typeForm });
38
+
39
+ return;
40
+ }
41
+
42
+ verifyPhoneDialog.open({
43
+ phone,
44
+ formatData,
45
+ reqId: String(response),
46
+ onSuccess: () => {
47
+ verifyPhoneDialog.close();
48
+ responseTypeDialog.open({ ok: true, typeForm });
49
+ handleAspects({ aspectsAttributes: data, aspects, ev });
50
+ },
51
+ });
52
+ };
53
+
54
+ export const handleCallback = async ({
55
+ formatData,
56
+ data,
57
+ aspects = {},
58
+ ev,
59
+ typeForm,
60
+ responseTypeDialog,
61
+ onSuccess = noop,
62
+ }: HandlerProps) => {
63
+ const response = await API.sendPhoneCallRequest(formatData);
64
+
65
+ onSuccess();
66
+
67
+ if (response?.status === 'success') {
68
+ responseTypeDialog.open({ ok: true, typeForm });
69
+ handleAspects({ aspectsAttributes: data, aspects, ev });
70
+ } else if (response?.status === 'error') {
71
+ responseTypeDialog.open({
72
+ ok: false,
73
+ errorMessage: 'Ваша заявка уже в работе. Дождитесь звонка от сотрудника Банка',
74
+ });
75
+ } else {
76
+ responseTypeDialog.open({ ok: Boolean(response) });
77
+ if (response) {
78
+ handleAspects({ aspectsAttributes: data, aspects, ev });
79
+ }
80
+ }
81
+ };
82
+
83
+ export const handleDefault = async ({
84
+ formatData,
85
+ data,
86
+ aspects = {},
87
+ ev,
88
+ router,
89
+ responseTypeDialog,
90
+ }: HandlerProps) => {
91
+ const ok = Boolean(await API.send(formatData, router, false)); // или проверять endpoint === 'lead'
92
+
93
+ responseTypeDialog.open({ ok });
94
+ if (ok) {
95
+ handleAspects({ aspectsAttributes: data, aspects, ev });
96
+ }
97
+ };
@@ -0,0 +1,25 @@
1
+ import type { FormFieldRegisterer } from '../../hooks/useForm/useForm';
2
+ import type { FormTypeFieldDef } from '../../model/FormTypeFieldDef';
3
+ import type { SectionsProps } from '../../model/InputSectionsType';
4
+ import { getField } from '../../ui-kit/FormField/getField';
5
+ import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle';
6
+ import { renderTitle } from '../../ui-kit/FormField/renderTitle';
7
+ import { style } from '../../utils/style';
8
+ import type { additionalParamsType, FieldDef } from './ApplicationFormContent';
9
+
10
+ type renderSectionsType = {
11
+ typeForm: FormTypeFieldDef;
12
+ additionalParams?: additionalParamsType;
13
+ };
14
+
15
+ export const renderSections = (
16
+ sections: SectionsProps[],
17
+ field: FormFieldRegisterer<Record<string, any>>,
18
+ { typeForm, additionalParams }: renderSectionsType,
19
+ ) =>
20
+ sections.map((_, i) => (
21
+ <div key={`section-${i}`} className={style(inputColumnStyles(_.columns), 'grid')}>
22
+ {renderTitle(_.title)}
23
+ {(_?.inputs || [])?.map(getField<FieldDef>(field, { typeForm, ...additionalParams }))}
24
+ </div>
25
+ ));
@@ -1,31 +1,55 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useLink } from '../../hooks/useLink';
3
+ import { useMobileMode } from '../../hooks/useMobileMode';
3
4
  import { type ComponentType } from '../../model/ComponentType';
4
5
  import { type LinkProps } from '../../model/LinkProps';
6
+ import { type PreventableEventWithTarget } from '../../ui-kit/PreventableEvent';
5
7
  import { getAspectsAttributes } from '../../utils/dataAttributes';
6
8
  import { style } from '../../utils/style';
7
9
 
8
- interface DropdownMenuProps extends ComponentType {
10
+ export interface DropdownMenuProps extends ComponentType {
9
11
  dropdownRef?: { current: HTMLDivElement | null };
10
12
  items?: LinkProps[];
11
13
  activeItem?: LinkProps;
12
14
  ariaLabel?: string;
15
+ renderDropdownItem?: ({ item, i, activeItem, handlers }: renderDropdownItemProps) => void;
16
+ handlers?: Record<string, (ev?: PreventableEventWithTarget) => void>;
17
+ onItemClick?: () => void;
13
18
  }
14
19
 
20
+ export type renderDropdownItemProps = {
21
+ item?: LinkProps;
22
+ i?: number;
23
+ activeItem?: LinkProps;
24
+ handlers?: Record<string, (ev?: PreventableEventWithTarget) => void>;
25
+ closeDropdown?: () => void;
26
+ };
27
+
15
28
  export const DropdownMenu = ({
16
29
  dropdownRef,
17
30
  items = [],
18
31
  activeItem,
19
32
  ariaLabel,
20
- }: DropdownMenuProps) => (
21
- <div
22
- ref={dropdownRef}
23
- className="absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40"
24
- aria-label={ariaLabel}
25
- >
26
- {renderDropdownItems(items, activeItem)}
27
- </div>
28
- );
33
+ renderDropdownItem = renderDefaultDropdownItem,
34
+ handlers,
35
+ onItemClick,
36
+ }: DropdownMenuProps) => {
37
+ const isMobileMode = useMobileMode();
38
+
39
+ return (
40
+ <div
41
+ ref={dropdownRef}
42
+ className={style('absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40', {
43
+ 'max-w-max': isMobileMode,
44
+ })}
45
+ aria-label={ariaLabel}
46
+ >
47
+ {items?.map((item, i) =>
48
+ renderDropdownItem({ item, i, activeItem, handlers, closeDropdown: onItemClick }),
49
+ )}
50
+ </div>
51
+ );
52
+ };
29
53
 
30
54
  export const DropdownMenuItem = JSX<LinkProps & { isActive?: boolean }>(({ isActive, ...rest }) => {
31
55
  const link = useLink();
@@ -48,7 +72,6 @@ export const DropdownMenuItem = JSX<LinkProps & { isActive?: boolean }>(({ isAct
48
72
  );
49
73
  });
50
74
 
51
- const renderDropdownItems = (items: LinkProps[], activeItem?: LinkProps) =>
52
- items?.map((item, i) => (
53
- <DropdownMenuItem key={item?.text ?? String(i)} isActive={item === activeItem} {...item} />
54
- ));
75
+ const renderDefaultDropdownItem = ({ item, i, activeItem }: renderDropdownItemProps) => (
76
+ <DropdownMenuItem key={item?.text ?? String(i)} isActive={item === activeItem} {...item} />
77
+ );
@@ -2,6 +2,7 @@ import '../../setup-fixture';
2
2
 
3
3
  import { type BlockRendererOptions } from '../../BlockRenderer/BlockRendererOptions';
4
4
  import { DialogManager } from '../../ui-kit/DialogManager/DialogManager';
5
+ import { PopupManager } from '../../ui-kit/PopupManager/PopupManager';
5
6
  import { Header } from './Header';
6
7
  import { type HeaderProps } from './HeaderProps';
7
8
 
@@ -22,6 +23,7 @@ export default {
22
23
  <div>
23
24
  <Header options={options} {...props} />
24
25
  <DialogManager />
26
+ <PopupManager />
25
27
  </div>
26
28
  ),
27
29
  transparent: (