@redneckz/wildless-cms-uni-blocks 0.14.619 → 0.14.621

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 (238) hide show
  1. package/bundle/api/RetailAPI/feedbackById.d.ts +1 -1
  2. package/bundle/api/RetailAPI/getLink.d.ts +7 -0
  3. package/bundle/api/RetailAPI/updateProfileEsia.d.ts +66 -0
  4. package/bundle/blocks.schema.json +1 -1
  5. package/bundle/bundle.umd.js +119 -56
  6. package/bundle/bundle.umd.min.js +1 -1
  7. package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
  8. package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  9. package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
  10. package/bundle/icons/IconName.d.ts +4 -2
  11. package/bundle/ui-kit/Checkbox/getDocument.d.ts +1 -1
  12. package/bundle/ui-kit/ConsentBkiDialog/useConsentBkiDialog.d.ts +1 -1
  13. package/bundle/ui-kit/DialogManager/openDocument.d.ts +1 -1
  14. package/bundle/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +4 -0
  15. package/bundle/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +9 -0
  16. package/cosmos-static/icons/GosUslugiIcon.svg +1 -0
  17. package/dist/api/RetailAPI/feedbackById.d.ts +1 -1
  18. package/dist/api/RetailAPI/feedbackById.js +2 -2
  19. package/dist/api/RetailAPI/feedbackById.js.map +1 -1
  20. package/dist/api/RetailAPI/getLink.d.ts +7 -0
  21. package/dist/api/RetailAPI/getLink.js +6 -0
  22. package/dist/api/RetailAPI/getLink.js.map +1 -0
  23. package/dist/api/RetailAPI/updateProfileEsia.d.ts +66 -0
  24. package/dist/api/RetailAPI/updateProfileEsia.js +6 -0
  25. package/dist/api/RetailAPI/updateProfileEsia.js.map +1 -0
  26. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +5 -3
  27. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  28. package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
  29. package/dist/components/ApplicationLeadForm/consents.js +8 -8
  30. package/dist/components/ApplicationLeadForm/consents.js.map +1 -1
  31. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  32. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +28 -21
  33. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  34. package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
  35. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +34 -3
  36. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  37. package/dist/icons/IconName.d.ts +4 -2
  38. package/dist/icons/IconName.js +3 -1
  39. package/dist/icons/IconName.js.map +1 -1
  40. package/dist/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
  41. package/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  42. package/dist/ui-kit/Checkbox/getDocument.d.ts +1 -1
  43. package/dist/ui-kit/Checkbox/getDocument.js +2 -2
  44. package/dist/ui-kit/Checkbox/getDocument.js.map +1 -1
  45. package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
  46. package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  47. package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.d.ts +1 -1
  48. package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +4 -7
  49. package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  50. package/dist/ui-kit/DialogManager/openDocument.d.ts +1 -1
  51. package/dist/ui-kit/DialogManager/openDocument.js +3 -3
  52. package/dist/ui-kit/DialogManager/openDocument.js.map +1 -1
  53. package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +4 -0
  54. package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +21 -0
  55. package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -0
  56. package/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +9 -0
  57. package/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js +19 -0
  58. package/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -0
  59. package/lib/api/RetailAPI/feedbackById.d.ts +1 -1
  60. package/lib/api/RetailAPI/feedbackById.js +2 -2
  61. package/lib/api/RetailAPI/feedbackById.js.map +1 -1
  62. package/lib/api/RetailAPI/getLink.d.ts +7 -0
  63. package/lib/api/RetailAPI/getLink.js +3 -0
  64. package/lib/api/RetailAPI/getLink.js.map +1 -0
  65. package/lib/api/RetailAPI/updateProfileEsia.d.ts +66 -0
  66. package/lib/api/RetailAPI/updateProfileEsia.js +3 -0
  67. package/lib/api/RetailAPI/updateProfileEsia.js.map +1 -0
  68. package/lib/common.css +1 -1
  69. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +6 -4
  70. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  71. package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
  72. package/lib/components/ApplicationLeadForm/consents.js +8 -8
  73. package/lib/components/ApplicationLeadForm/consents.js.map +1 -1
  74. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  75. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +28 -21
  76. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  77. package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
  78. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +35 -4
  79. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  80. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
  81. package/lib/icons/IconName.d.ts +4 -2
  82. package/lib/icons/IconName.js +3 -1
  83. package/lib/icons/IconName.js.map +1 -1
  84. package/lib/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
  85. package/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  86. package/lib/ui-kit/Checkbox/getDocument.d.ts +1 -1
  87. package/lib/ui-kit/Checkbox/getDocument.js +2 -2
  88. package/lib/ui-kit/Checkbox/getDocument.js.map +1 -1
  89. package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
  90. package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  91. package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.d.ts +1 -1
  92. package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +4 -7
  93. package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  94. package/lib/ui-kit/DialogManager/openDocument.d.ts +1 -1
  95. package/lib/ui-kit/DialogManager/openDocument.js +3 -3
  96. package/lib/ui-kit/DialogManager/openDocument.js.map +1 -1
  97. package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +4 -0
  98. package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.fixture.d.ts +6 -0
  99. package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +19 -0
  100. package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -0
  101. package/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +9 -0
  102. package/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js +16 -0
  103. package/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -0
  104. package/mobile/bundle/api/RetailAPI/feedbackById.d.ts +1 -1
  105. package/mobile/bundle/api/RetailAPI/getLink.d.ts +7 -0
  106. package/mobile/bundle/api/RetailAPI/updateProfileEsia.d.ts +66 -0
  107. package/mobile/bundle/bundle.umd.js +119 -56
  108. package/mobile/bundle/bundle.umd.min.js +1 -1
  109. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
  110. package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  111. package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
  112. package/mobile/bundle/icons/IconName.d.ts +4 -2
  113. package/mobile/bundle/ui-kit/Checkbox/getDocument.d.ts +1 -1
  114. package/mobile/bundle/ui-kit/ConsentBkiDialog/useConsentBkiDialog.d.ts +1 -1
  115. package/mobile/bundle/ui-kit/DialogManager/openDocument.d.ts +1 -1
  116. package/mobile/bundle/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +4 -0
  117. package/mobile/bundle/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +9 -0
  118. package/mobile/dist/api/RetailAPI/feedbackById.d.ts +1 -1
  119. package/mobile/dist/api/RetailAPI/feedbackById.js +2 -2
  120. package/mobile/dist/api/RetailAPI/feedbackById.js.map +1 -1
  121. package/mobile/dist/api/RetailAPI/getLink.d.ts +7 -0
  122. package/mobile/dist/api/RetailAPI/getLink.js +6 -0
  123. package/mobile/dist/api/RetailAPI/getLink.js.map +1 -0
  124. package/mobile/dist/api/RetailAPI/updateProfileEsia.d.ts +66 -0
  125. package/mobile/dist/api/RetailAPI/updateProfileEsia.js +6 -0
  126. package/mobile/dist/api/RetailAPI/updateProfileEsia.js.map +1 -0
  127. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +5 -3
  128. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  129. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
  130. package/mobile/dist/components/ApplicationLeadForm/consents.js +8 -8
  131. package/mobile/dist/components/ApplicationLeadForm/consents.js.map +1 -1
  132. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  133. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +28 -21
  134. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  135. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
  136. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +34 -3
  137. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  138. package/mobile/dist/icons/IconName.d.ts +4 -2
  139. package/mobile/dist/icons/IconName.js +3 -1
  140. package/mobile/dist/icons/IconName.js.map +1 -1
  141. package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
  142. package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  143. package/mobile/dist/ui-kit/Checkbox/getDocument.d.ts +1 -1
  144. package/mobile/dist/ui-kit/Checkbox/getDocument.js +2 -2
  145. package/mobile/dist/ui-kit/Checkbox/getDocument.js.map +1 -1
  146. package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
  147. package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  148. package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.d.ts +1 -1
  149. package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +4 -7
  150. package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  151. package/mobile/dist/ui-kit/DialogManager/openDocument.d.ts +1 -1
  152. package/mobile/dist/ui-kit/DialogManager/openDocument.js +3 -3
  153. package/mobile/dist/ui-kit/DialogManager/openDocument.js.map +1 -1
  154. package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +4 -0
  155. package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +21 -0
  156. package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -0
  157. package/mobile/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +9 -0
  158. package/mobile/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js +19 -0
  159. package/mobile/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -0
  160. package/mobile/lib/api/RetailAPI/feedbackById.d.ts +1 -1
  161. package/mobile/lib/api/RetailAPI/feedbackById.js +2 -2
  162. package/mobile/lib/api/RetailAPI/feedbackById.js.map +1 -1
  163. package/mobile/lib/api/RetailAPI/getLink.d.ts +7 -0
  164. package/mobile/lib/api/RetailAPI/getLink.js +3 -0
  165. package/mobile/lib/api/RetailAPI/getLink.js.map +1 -0
  166. package/mobile/lib/api/RetailAPI/updateProfileEsia.d.ts +66 -0
  167. package/mobile/lib/api/RetailAPI/updateProfileEsia.js +3 -0
  168. package/mobile/lib/api/RetailAPI/updateProfileEsia.js.map +1 -0
  169. package/mobile/lib/common.css +1 -1
  170. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +6 -4
  171. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  172. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
  173. package/mobile/lib/components/ApplicationLeadForm/consents.js +8 -8
  174. package/mobile/lib/components/ApplicationLeadForm/consents.js.map +1 -1
  175. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  176. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +28 -21
  177. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  178. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
  179. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +35 -4
  180. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  181. package/mobile/lib/icons/IconName.d.ts +4 -2
  182. package/mobile/lib/icons/IconName.js +3 -1
  183. package/mobile/lib/icons/IconName.js.map +1 -1
  184. package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
  185. package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  186. package/mobile/lib/ui-kit/Checkbox/getDocument.d.ts +1 -1
  187. package/mobile/lib/ui-kit/Checkbox/getDocument.js +2 -2
  188. package/mobile/lib/ui-kit/Checkbox/getDocument.js.map +1 -1
  189. package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
  190. package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  191. package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.d.ts +1 -1
  192. package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +4 -7
  193. package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  194. package/mobile/lib/ui-kit/DialogManager/openDocument.d.ts +1 -1
  195. package/mobile/lib/ui-kit/DialogManager/openDocument.js +3 -3
  196. package/mobile/lib/ui-kit/DialogManager/openDocument.js.map +1 -1
  197. package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +4 -0
  198. package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +19 -0
  199. package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -0
  200. package/mobile/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +9 -0
  201. package/mobile/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js +16 -0
  202. package/mobile/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -0
  203. package/mobile/src/api/RetailAPI/feedbackById.ts +5 -2
  204. package/mobile/src/api/RetailAPI/getLink.ts +12 -0
  205. package/mobile/src/api/RetailAPI/updateProfileEsia.ts +71 -0
  206. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +16 -3
  207. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -0
  208. package/mobile/src/components/ApplicationLeadForm/consents.ts +8 -8
  209. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +53 -26
  210. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +40 -4
  211. package/mobile/src/icons/GosUslugiIcon.svg +11 -0
  212. package/mobile/src/icons/IconName.ts +5 -5
  213. package/mobile/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +6 -1
  214. package/mobile/src/ui-kit/Checkbox/getDocument.ts +2 -2
  215. package/mobile/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +3 -1
  216. package/mobile/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +4 -8
  217. package/mobile/src/ui-kit/DialogManager/openDocument.tsx +11 -3
  218. package/mobile/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +44 -0
  219. package/mobile/src/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.tsx +23 -0
  220. package/package.json +2 -2
  221. package/src/api/RetailAPI/feedbackById.ts +5 -2
  222. package/src/api/RetailAPI/getLink.ts +12 -0
  223. package/src/api/RetailAPI/updateProfileEsia.ts +71 -0
  224. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +16 -3
  225. package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -0
  226. package/src/components/ApplicationLeadForm/consents.ts +8 -8
  227. package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +53 -26
  228. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +40 -4
  229. package/src/icons/GosUslugiIcon.svg +11 -0
  230. package/src/icons/IconName.ts +360 -6
  231. package/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +6 -1
  232. package/src/ui-kit/Checkbox/getDocument.ts +2 -2
  233. package/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +3 -1
  234. package/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +4 -8
  235. package/src/ui-kit/DialogManager/openDocument.tsx +11 -3
  236. package/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.fixture.tsx +7 -0
  237. package/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +44 -0
  238. package/src/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.tsx +23 -0
@@ -2084,25 +2084,25 @@
2084
2084
  text: 'Согласие на обработку персональных данных',
2085
2085
  docId: 4,
2086
2086
  },
2087
+ consentInformFlg: {
2088
+ text: 'Согласие на информирование о продуктах и услугах Банка',
2089
+ docId: 14,
2090
+ },
2087
2091
  consentProviderFlg: {
2088
2092
  text: 'Согласие об использовании простой электронной подписи',
2089
2093
  docId: 5,
2090
2094
  },
2095
+ consentOthersFlg: {
2096
+ text: 'Прочие согласия',
2097
+ docId: 1,
2098
+ },
2091
2099
  consentPfrFlg: {
2092
2100
  text: 'Согласие на запрос в ПФР',
2093
2101
  docId: 3,
2094
2102
  },
2095
- consentInformFlg: {
2096
- text: 'Согласие на информирование о продуктах и услугах Банка',
2097
- docId: 14,
2098
- },
2099
2103
  consentToReceiveMaterials: {
2100
2104
  text: 'Согласен на получение информационных и аналитических материалов по электронной почте',
2101
2105
  },
2102
- consentOthersFlg: {
2103
- text: 'Прочие согласия',
2104
- docId: 1,
2105
- },
2106
2106
  };
2107
2107
 
2108
2108
  async function doRequest(url, method, body) {
@@ -2124,13 +2124,13 @@
2124
2124
  return token ? { Authorization: `Bearer ${token}` } : null;
2125
2125
  };
2126
2126
 
2127
- const feedbackById = async (id) => {
2128
- const response = await doRequest(`/feedback/file?id=${encodeURIComponent(id)}`, 'GET');
2127
+ const feedbackById = async (id, convertToPng = false) => {
2128
+ const response = await doRequest(`/feedback/file?id=${encodeURIComponent(id)}&convertToPngFlg=${convertToPng}`, 'GET');
2129
2129
  return await response.blob();
2130
2130
  };
2131
2131
 
2132
- const getDocument = async (id) => {
2133
- const response = await feedbackById(id);
2132
+ const getDocument = async (id, convertToPng = false) => {
2133
+ const response = await feedbackById(id, convertToPng);
2134
2134
  return URL.createObjectURL(response);
2135
2135
  };
2136
2136
 
@@ -2145,15 +2145,16 @@
2145
2145
  return (jsxs("div", { onClick: onClick, className: style('relative min-h-full bg-white pt-0 p-lg', className), role: "dialog", children: [jsxs("div", { className: "sticky py-xl top-0 bg-white z-10", children: [jsx(CloseButton, { className: "absolute top-0 right-0", onClose: handleClose }), jsx("div", { className: "container", children: head })] }), jsx("div", { className: "container pb-6xl", children: children })] }));
2146
2146
  });
2147
2147
 
2148
- const openDocument = async (id, open) => {
2149
- const document = await getDocument(id);
2150
- open(jsx(Dialog, { className: "my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0", children: jsx("iframe", { src: `${document}#toolbar=0`, className: "w-full h-[80vh]", id: "iframe-dialog" }) }));
2148
+ const openDocument = async (open, id, convertToPng = false) => {
2149
+ const document = await getDocument(id, convertToPng);
2150
+ open(jsx(Dialog, { className: "my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0", children: convertToPng ? (jsx("img", { src: document })) : (jsx("iframe", { src: `${document}#toolbar=0`, className: "w-full h-[80vh]", id: "iframe-dialog" })) }));
2151
2151
  };
2152
2152
 
2153
2153
  const OPEN_DOC_BUTTON_TEXT = 'Ознакомиться';
2154
2154
  const CheckboxWithDoc = JSX(({ className, error, docId, ...props }) => {
2155
2155
  const { open } = useDialogManager();
2156
- return (jsxs("div", { className: className, children: [jsxs("div", { className: "flex flex-wrap gap-x-m", children: [jsx(Checkbox, { ...props }), docId ? (jsx(LinkButton, { className: "text-primary-main", onClick: () => openDocument(docId, open), children: jsx(Text, { children: OPEN_DOC_BUTTON_TEXT }) })) : null] }), renderErrorText(error)] }));
2156
+ const isMobile = useMobileMode();
2157
+ return (jsxs("div", { className: className, children: [jsxs("div", { className: "flex flex-wrap gap-x-m", children: [jsx(Checkbox, { ...props }), docId ? (jsx(LinkButton, { className: "text-primary-main", onClick: () => openDocument(open, docId, isMobile), children: jsx(Text, { children: OPEN_DOC_BUTTON_TEXT }) })) : null] }), renderErrorText(error)] }));
2157
2158
  });
2158
2159
 
2159
2160
  const ConsentField = JSX(({ field, input }) => input && input.name ? (jsx(CheckboxWithDoc, { text: CONSENTS[input.name]?.text, docId: CONSENTS[input.name]?.docId, ...getValidation(field(input.name), validatorObj[input.name], input?.required) })) : null);
@@ -2756,6 +2757,10 @@
2756
2757
  return [storedValue, setValue];
2757
2758
  }
2758
2759
 
2760
+ const Loader = JSX(({ color = 'text-primary-main', position = 'absolute', blur = true }) => (jsx("div", { className: style('flex justify-center items-center h-full w-full z-50', position, {
2761
+ 'backdrop-blur': blur,
2762
+ }), children: jsx("div", { className: style('inline-block h-28 w-28', 'animate-spin rounded-full', 'border-8 border-solid border-current', 'border-r-transparent', color), role: "status" }) })));
2763
+
2759
2764
  const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
2760
2765
  const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
2761
2766
  const onToggle = useCallback(() => {
@@ -3011,10 +3016,6 @@
3011
3016
  };
3012
3017
  };
3013
3018
 
3014
- const Loader = JSX(({ color = 'text-primary-main', position = 'absolute', blur = true }) => (jsx("div", { className: style('flex justify-center items-center h-full w-full z-50', position, {
3015
- 'backdrop-blur': blur,
3016
- }), children: jsx("div", { className: style('inline-block h-28 w-28', 'animate-spin rounded-full', 'border-8 border-solid border-current', 'border-r-transparent', color), role: "status" }) })));
3017
-
3018
3019
  const Timer = JSX(({ time, setTime, className }) => {
3019
3020
  useEffect(() => {
3020
3021
  const timer = setInterval(() => {
@@ -3199,6 +3200,7 @@
3199
3200
  const [confirmStatus, setConfirmStatus] = useState('');
3200
3201
  const [showRefuceContent, setShowRefuceContent] = useState(false);
3201
3202
  const { open, close } = useDialogManager();
3203
+ const isMobile = useMobileMode();
3202
3204
  const handleClose = useCallback(() => {
3203
3205
  close();
3204
3206
  handleSubmit(confirmStatus);
@@ -3210,7 +3212,7 @@
3210
3212
  }
3211
3213
  }, []);
3212
3214
  const consentText = showRefuceContent ? refuseConsentText : defaultConsentText;
3213
- return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center", children: [jsx("div", { role: "button", onClick: () => openDocument(CONSENT_BKI_ID, open), children: jsx(Heading, { className: "text-center text-balance", title: consentText.title }) }), jsx(Paragraph, { align: "text-center", children: consentText.description }), jsx(RadioButtonGroup, { className: "whitespace-normal", orientation: "horizontal", items: ITEMS$1, value: confirmStatus, onChange: handleConfirmChange }), jsx(Button, { disabled: !confirmStatus, type: "button", onClick: handleClose, children: "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C" })] }) }));
3215
+ return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center", children: [jsx("div", { role: "button", onClick: () => openDocument(open, CONSENT_BKI_ID, isMobile), children: jsx(Heading, { className: "text-center text-balance", title: consentText.title }) }), jsx(Paragraph, { align: "text-center", children: consentText.description }), jsx(RadioButtonGroup, { className: "whitespace-normal", orientation: "horizontal", items: ITEMS$1, value: confirmStatus, onChange: handleConfirmChange }), jsx(Button, { disabled: !confirmStatus, type: "button", onClick: handleClose, children: "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C" })] }) }));
3214
3216
  });
3215
3217
  const ITEMS$1 = [
3216
3218
  { id: 'SIGNED', text: 'Подписать' },
@@ -3218,12 +3220,9 @@
3218
3220
  ];
3219
3221
  const CONSENT_BKI_ID = 2;
3220
3222
 
3221
- const useConsentBkiDialog = () => {
3223
+ const useConsentBkiDialog = (onClose) => {
3222
3224
  const { open, closeAll } = useDialogManager();
3223
3225
  const verifyPhoneDialog = useVerifyPhoneDialog();
3224
- const redirectToCreditForm = () => {
3225
- globalThis.location.href = '/credit-lead';
3226
- };
3227
3226
  const handleSuccessVerify = (profileId) => async (smsCode) => {
3228
3227
  if (profileId) {
3229
3228
  await updateUserProfile({
@@ -3234,7 +3233,7 @@
3234
3233
  },
3235
3234
  });
3236
3235
  }
3237
- redirectToCreditForm();
3236
+ onClose();
3238
3237
  };
3239
3238
  const handleSubmitBkiConstent = (phone, profileId) => async (confirmStatus) => {
3240
3239
  await closeAll();
@@ -3242,11 +3241,11 @@
3242
3241
  verifyPhoneDialog.open(handleSuccessVerify(profileId), verifyPhoneContent$1(phone));
3243
3242
  }
3244
3243
  else {
3245
- redirectToCreditForm();
3244
+ onClose();
3246
3245
  }
3247
3246
  };
3248
3247
  return {
3249
- open: (phone, profileId) => open(jsx(ConsentBkiDialog, { handleSubmit: handleSubmitBkiConstent(phone, profileId), onClose: redirectToCreditForm })),
3248
+ open: (phone, profileId) => open(jsx(ConsentBkiDialog, { handleSubmit: handleSubmitBkiConstent(phone, profileId), onClose: onClose })),
3250
3249
  };
3251
3250
  };
3252
3251
  const verifyPhoneContent$1 = (phone) => ({
@@ -3258,12 +3257,39 @@
3258
3257
  <ul><li>согласие на запрос информации в БКИ</li></ul>`,
3259
3258
  });
3260
3259
 
3261
- const useApplicationLeadApi = ({ inputs, programId, saveForm }) => {
3260
+ const getLink = (body) => doRequest('/esia/getLink', 'POST', body);
3261
+
3262
+ const EsiaLoginDialog = JSX(function ({ handleClose }) {
3263
+ const handleAuth = useCallback(async () => {
3264
+ const resp = await getLink({
3265
+ redirectUri: globalThis.location.href + '&esiaAuth=true',
3266
+ });
3267
+ if (resp) {
3268
+ globalThis.location.href = resp.link;
3269
+ }
3270
+ }, []);
3271
+ return (jsx(Dialog, { className: "my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg", onClose: handleClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md", children: [jsxs("div", { className: "flex items-center justify-around w-full", children: [jsxs("ul", { className: "list-disc", children: [jsx("li", { children: "\u0412\u0435\u0440\u043E\u044F\u0442\u043D\u043E\u0441\u0442\u044C \u043E\u0434\u043E\u0431\u0440\u0435\u043D\u0438\u044F \u0432\u044B\u0448\u0435" }), jsx("li", { children: "\u0411\u0435\u0437 \u0441\u043F\u0440\u0430\u0432\u043E\u043A \u043E \u0434\u043E\u0445\u043E\u0434\u0430\u0445 \u0438 \u0442\u0440\u0443\u0434\u043E\u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0435" }), jsx("li", { children: "\u0421 \u0437\u0430\u0449\u0438\u0442\u043E\u0439 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043D\u043D\u044B\u0445" })] }), jsx(Img, { image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "70" })] }), jsxs("div", { className: "flex items-center justify-between w-full m-0", children: [jsx(Button, { type: "button", onClick: handleAuth, children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0447\u0435\u0440\u0435\u0437 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }), jsx(Button, { type: "button", version: "secondary", onClick: handleClose, children: "\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C" })] })] }) }));
3272
+ });
3273
+
3274
+ const useEsiaLoginDialog = (nextStepLink) => {
3275
+ const { open, close } = useDialogManager();
3276
+ const handleClose = useCallback(() => {
3277
+ close();
3278
+ globalThis.location.href = nextStepLink;
3279
+ }, []);
3280
+ return {
3281
+ open: (options = {}) => open(jsx(EsiaLoginDialog, { handleClose: handleClose }), options),
3282
+ close,
3283
+ };
3284
+ };
3285
+
3286
+ const useApplicationLeadApi = ({ inputs, programId, nextStepLink, saveForm, }) => {
3262
3287
  const [responseStatus, setResponseStatus] = useState('');
3263
3288
  const [, setTaskId] = useLocalStorage('taskId');
3264
3289
  const [, setProfileId] = useLocalStorage('profileId');
3265
3290
  const [, setParticipantId] = useLocalStorage('participantId');
3266
- const consentBkiDialog = useConsentBkiDialog();
3291
+ const esiaLoginDialog = useEsiaLoginDialog(nextStepLink);
3292
+ const consentBkiDialog = useConsentBkiDialog(esiaLoginDialog.open);
3267
3293
  const verifyPhoneDialog = useVerifyPhoneDialog();
3268
3294
  const saveUserData = useCallback((participantId, taskId, profileId) => {
3269
3295
  setParticipantId(participantId);
@@ -3277,40 +3303,29 @@
3277
3303
  return 'Fail';
3278
3304
  }
3279
3305
  try {
3280
- const { profile } = await createUserProfile({
3306
+ const { profile: { id: profileId }, } = await createUserProfile({
3281
3307
  profile: { phone: formatPhone(formData.phone) },
3282
3308
  });
3283
- const profileId = profile?.id;
3284
- const transformedForm = transformOtherConsentsField(formData);
3285
3309
  if (profileId && formData?.phone) {
3286
3310
  const handleSuccessVerify = async () => {
3287
3311
  try {
3288
- await updateUserProfile(getUpdateUserProfileData(profileId, transformedForm));
3289
- const { taskId, participantId } = await createDraftTask({
3290
- profileId,
3312
+ await updateUserData({
3291
3313
  programId,
3292
- });
3293
- await updateUserTask(getUpdateUserTaskData({
3294
- participantId,
3295
- taskId,
3296
3314
  profileId,
3297
- formData: transformedForm,
3298
- }));
3299
- saveUserData(participantId, taskId, profileId);
3300
- saveForm(formData);
3315
+ formData,
3316
+ saveUserData,
3317
+ saveForm,
3318
+ });
3319
+ consentBkiDialog.open(formData.phone, profileId);
3301
3320
  }
3302
3321
  catch {
3303
3322
  setResponseStatus('Fail');
3304
3323
  }
3305
3324
  };
3306
- const handleCloseVerify = async () => {
3307
- await handleSuccessVerify();
3308
- consentBkiDialog.open(formData.phone, profileId);
3309
- };
3310
3325
  const acceptedConsents = Object.keys(CONSENTS)
3311
3326
  .filter((_) => formData[_])
3312
3327
  .map((_) => CONSENTS[_]?.text);
3313
- verifyPhoneDialog.open(handleCloseVerify, verifyPhoneContent(formData?.phone, acceptedConsents));
3328
+ verifyPhoneDialog.open(handleSuccessVerify, verifyPhoneContent(formData?.phone, acceptedConsents));
3314
3329
  }
3315
3330
  }
3316
3331
  catch {
@@ -3322,6 +3337,22 @@
3322
3337
  responseStatus,
3323
3338
  };
3324
3339
  };
3340
+ const updateUserData = async ({ programId, profileId, formData, saveUserData, saveForm, }) => {
3341
+ const transformedForm = transformOtherConsentsField(formData);
3342
+ await updateUserProfile(getUpdateUserProfileData(profileId, transformedForm));
3343
+ const { taskId, participantId } = await createDraftTask({
3344
+ profileId,
3345
+ programId,
3346
+ });
3347
+ await updateUserTask(getUpdateUserTaskData({
3348
+ participantId,
3349
+ taskId,
3350
+ profileId,
3351
+ formData: transformedForm,
3352
+ }));
3353
+ saveUserData(participantId, taskId, profileId);
3354
+ saveForm(formData);
3355
+ };
3325
3356
  const verifyPhoneContent = (phone, consents) => ({
3326
3357
  title: 'Подтвердите номер телефона',
3327
3358
  description: `Мы отправили код на ${phone}`,
@@ -3340,22 +3371,54 @@
3340
3371
  };
3341
3372
  };
3342
3373
 
3343
- const useInitApplicationLead = () => {
3374
+ const updateProfileEsia = (body) => doRequest('/esia/updateProfileEsia', 'POST', body);
3375
+
3376
+ const useInitApplicationLead = (nextStepLink) => {
3377
+ const [isLoading, setIsLoading] = useState(false);
3378
+ const [profileId] = useLocalStorage('profileId');
3379
+ const [, setEsiaData] = useLocalStorage('esiaData');
3380
+ const params = new URLSearchParams(decodeURIComponent(window.location.search));
3381
+ const esiaAuth = params.get('esiaAuth');
3382
+ const updateEsiaProfile = useCallback(async () => {
3383
+ const code = params.get('code');
3384
+ const state = params.get('state');
3385
+ if (profileId && code && state) {
3386
+ const data = await updateProfileEsia({
3387
+ profileId: profileId,
3388
+ code,
3389
+ state,
3390
+ redirectUri: globalThis.location.href,
3391
+ });
3392
+ setEsiaData(JSON.stringify(data));
3393
+ globalThis.location.href = nextStepLink;
3394
+ }
3395
+ }, []);
3344
3396
  useEffect(() => {
3345
- sessionStorage.removeItem('accessToken');
3346
- sessionStorage.removeItem('refreshToken');
3397
+ if (esiaAuth) {
3398
+ setIsLoading(true);
3399
+ updateEsiaProfile();
3400
+ }
3401
+ else {
3402
+ setEsiaData('');
3403
+ sessionStorage.removeItem('accessToken');
3404
+ sessionStorage.removeItem('refreshToken');
3405
+ }
3347
3406
  }, []);
3407
+ return {
3408
+ isLoading,
3409
+ };
3348
3410
  };
3349
3411
 
3350
- const ApplicationLeadForm = JSX(({ className, title, programId = '', typeForm = '', sections = [], button, ...rest }) => {
3412
+ const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', typeForm = '', sections = [], button, ...rest }) => {
3351
3413
  const inputs = (sections?.flatMap((_) => _?.inputs) || []);
3352
3414
  const [responseType, setResponseType] = useState('');
3353
- useInitApplicationLead();
3415
+ const { isLoading } = useInitApplicationLead(nextStepLink);
3354
3416
  const [leadForm, setLeadForm] = useLocalStorage('leadForm');
3355
3417
  const initialFormState = getInitialFormState$1(inputs, leadForm, typeForm);
3356
3418
  const { handleSubmit, responseStatus } = useApplicationLeadApi({
3357
3419
  inputs,
3358
3420
  programId,
3421
+ nextStepLink,
3359
3422
  saveForm: setLeadForm,
3360
3423
  });
3361
3424
  if (responseStatus) {
@@ -3369,7 +3432,7 @@
3369
3432
  reset();
3370
3433
  }
3371
3434
  }, [responseType]);
3372
- return (jsx(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: jsxs("form", { onSubmit: onSubmit, className: "space-y-m", children: [sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs })] }, `section-${i}`))), renderSubmitButton(button)] }) }));
3435
+ return (jsx(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", children: [isLoading ? jsx(Loader, { blur: false }) : null, sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs })] }, `section-${i}`))), renderSubmitButton(button)] }) }));
3373
3436
  });
3374
3437
 
3375
3438
  const InfoCard = JSX(({ __html, icon = 'InfoCircleIcon', iconVersion = 'black', link }) => (jsxs("div", { className: "flex flex-row items-center w-full min-h-14 bg-main-gray rounded-lg gap-m p-m", children: [jsx("div", { className: "rounded-full bg-white p-xs", children: jsx(Icon, { name: icon, width: "24", height: "24", iconVersion: iconVersion }) }), jsxs("div", { className: "", children: [jsx(RichText, { __html: __html }), link?.text ? jsx(LinkButton, { className: "text-primary-main", children: link.text }) : null] })] })));
@@ -8186,7 +8249,7 @@
8186
8249
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
8187
8250
  });
8188
8251
 
8189
- const packageVersion = "0.14.618";
8252
+ const packageVersion = "0.14.620";
8190
8253
 
8191
8254
  exports.Blocks = Blocks;
8192
8255
  exports.ContentPage = ContentPage;