@redneckz/wildless-cms-uni-blocks 0.14.620 → 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 (84) hide show
  1. package/bundle/api/RetailAPI/feedbackById.d.ts +1 -1
  2. package/bundle/bundle.umd.js +20 -18
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/ui-kit/Checkbox/getDocument.d.ts +1 -1
  5. package/bundle/ui-kit/DialogManager/openDocument.d.ts +1 -1
  6. package/dist/api/RetailAPI/feedbackById.d.ts +1 -1
  7. package/dist/api/RetailAPI/feedbackById.js +2 -2
  8. package/dist/api/RetailAPI/feedbackById.js.map +1 -1
  9. package/dist/components/ApplicationLeadForm/consents.js +8 -8
  10. package/dist/components/ApplicationLeadForm/consents.js.map +1 -1
  11. package/dist/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
  12. package/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  13. package/dist/ui-kit/Checkbox/getDocument.d.ts +1 -1
  14. package/dist/ui-kit/Checkbox/getDocument.js +2 -2
  15. package/dist/ui-kit/Checkbox/getDocument.js.map +1 -1
  16. package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
  17. package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  18. package/dist/ui-kit/DialogManager/openDocument.d.ts +1 -1
  19. package/dist/ui-kit/DialogManager/openDocument.js +3 -3
  20. package/dist/ui-kit/DialogManager/openDocument.js.map +1 -1
  21. package/lib/api/RetailAPI/feedbackById.d.ts +1 -1
  22. package/lib/api/RetailAPI/feedbackById.js +2 -2
  23. package/lib/api/RetailAPI/feedbackById.js.map +1 -1
  24. package/lib/components/ApplicationLeadForm/consents.js +8 -8
  25. package/lib/components/ApplicationLeadForm/consents.js.map +1 -1
  26. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
  27. package/lib/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
  28. package/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  29. package/lib/ui-kit/Checkbox/getDocument.d.ts +1 -1
  30. package/lib/ui-kit/Checkbox/getDocument.js +2 -2
  31. package/lib/ui-kit/Checkbox/getDocument.js.map +1 -1
  32. package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
  33. package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  34. package/lib/ui-kit/DialogManager/openDocument.d.ts +1 -1
  35. package/lib/ui-kit/DialogManager/openDocument.js +3 -3
  36. package/lib/ui-kit/DialogManager/openDocument.js.map +1 -1
  37. package/mobile/bundle/api/RetailAPI/feedbackById.d.ts +1 -1
  38. package/mobile/bundle/bundle.umd.js +20 -18
  39. package/mobile/bundle/bundle.umd.min.js +1 -1
  40. package/mobile/bundle/ui-kit/Checkbox/getDocument.d.ts +1 -1
  41. package/mobile/bundle/ui-kit/DialogManager/openDocument.d.ts +1 -1
  42. package/mobile/dist/api/RetailAPI/feedbackById.d.ts +1 -1
  43. package/mobile/dist/api/RetailAPI/feedbackById.js +2 -2
  44. package/mobile/dist/api/RetailAPI/feedbackById.js.map +1 -1
  45. package/mobile/dist/components/ApplicationLeadForm/consents.js +8 -8
  46. package/mobile/dist/components/ApplicationLeadForm/consents.js.map +1 -1
  47. package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
  48. package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  49. package/mobile/dist/ui-kit/Checkbox/getDocument.d.ts +1 -1
  50. package/mobile/dist/ui-kit/Checkbox/getDocument.js +2 -2
  51. package/mobile/dist/ui-kit/Checkbox/getDocument.js.map +1 -1
  52. package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
  53. package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  54. package/mobile/dist/ui-kit/DialogManager/openDocument.d.ts +1 -1
  55. package/mobile/dist/ui-kit/DialogManager/openDocument.js +3 -3
  56. package/mobile/dist/ui-kit/DialogManager/openDocument.js.map +1 -1
  57. package/mobile/lib/api/RetailAPI/feedbackById.d.ts +1 -1
  58. package/mobile/lib/api/RetailAPI/feedbackById.js +2 -2
  59. package/mobile/lib/api/RetailAPI/feedbackById.js.map +1 -1
  60. package/mobile/lib/components/ApplicationLeadForm/consents.js +8 -8
  61. package/mobile/lib/components/ApplicationLeadForm/consents.js.map +1 -1
  62. package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
  63. package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  64. package/mobile/lib/ui-kit/Checkbox/getDocument.d.ts +1 -1
  65. package/mobile/lib/ui-kit/Checkbox/getDocument.js +2 -2
  66. package/mobile/lib/ui-kit/Checkbox/getDocument.js.map +1 -1
  67. package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
  68. package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  69. package/mobile/lib/ui-kit/DialogManager/openDocument.d.ts +1 -1
  70. package/mobile/lib/ui-kit/DialogManager/openDocument.js +3 -3
  71. package/mobile/lib/ui-kit/DialogManager/openDocument.js.map +1 -1
  72. package/mobile/src/api/RetailAPI/feedbackById.ts +5 -2
  73. package/mobile/src/components/ApplicationLeadForm/consents.ts +8 -8
  74. package/mobile/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +6 -1
  75. package/mobile/src/ui-kit/Checkbox/getDocument.ts +2 -2
  76. package/mobile/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +3 -1
  77. package/mobile/src/ui-kit/DialogManager/openDocument.tsx +11 -3
  78. package/package.json +2 -2
  79. package/src/api/RetailAPI/feedbackById.ts +5 -2
  80. package/src/components/ApplicationLeadForm/consents.ts +8 -8
  81. package/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +6 -1
  82. package/src/ui-kit/Checkbox/getDocument.ts +2 -2
  83. package/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +3 -1
  84. package/src/ui-kit/DialogManager/openDocument.tsx +11 -3
@@ -1 +1 @@
1
- export declare const feedbackById: (id: number) => Promise<Blob>;
1
+ export declare const feedbackById: (id: number, convertToPng?: boolean) => Promise<Blob>;
@@ -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);
@@ -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: 'Подписать' },
@@ -8247,7 +8249,7 @@
8247
8249
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
8248
8250
  });
8249
8251
 
8250
- const packageVersion = "0.14.619";
8252
+ const packageVersion = "0.14.620";
8251
8253
 
8252
8254
  exports.Blocks = Blocks;
8253
8255
  exports.ContentPage = ContentPage;