@redneckz/wildless-cms-uni-blocks 0.14.835 → 0.14.837

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 (69) hide show
  1. package/bundle/bundle.umd.js +41 -43
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
  4. package/bundle/components/GalleryLayout/utils.d.ts +29 -0
  5. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  6. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  7. package/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
  8. package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +12 -6
  9. package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
  10. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js +3 -13
  11. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  12. package/dist/components/GalleryLayout/GalleryLayout.js +3 -24
  13. package/dist/components/GalleryLayout/GalleryLayout.js.map +1 -1
  14. package/dist/components/GalleryLayout/utils.d.ts +29 -0
  15. package/dist/components/GalleryLayout/utils.js +29 -0
  16. package/dist/components/GalleryLayout/utils.js.map +1 -0
  17. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  18. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  19. package/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
  20. package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +12 -6
  21. package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
  22. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js +3 -13
  23. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  24. package/lib/components/GalleryLayout/GalleryLayout.js +1 -22
  25. package/lib/components/GalleryLayout/GalleryLayout.js.map +1 -1
  26. package/lib/components/GalleryLayout/utils.d.ts +29 -0
  27. package/lib/components/GalleryLayout/utils.js +25 -0
  28. package/lib/components/GalleryLayout/utils.js.map +1 -0
  29. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
  30. package/mobile/bundle/bundle.umd.js +41 -43
  31. package/mobile/bundle/bundle.umd.min.js +1 -1
  32. package/mobile/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
  33. package/mobile/bundle/components/GalleryLayout/utils.d.ts +29 -0
  34. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  35. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  36. package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
  37. package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +12 -6
  38. package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
  39. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js +3 -13
  40. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  41. package/mobile/dist/components/GalleryLayout/GalleryLayout.js +3 -24
  42. package/mobile/dist/components/GalleryLayout/GalleryLayout.js.map +1 -1
  43. package/mobile/dist/components/GalleryLayout/utils.d.ts +29 -0
  44. package/mobile/dist/components/GalleryLayout/utils.js +29 -0
  45. package/mobile/dist/components/GalleryLayout/utils.js.map +1 -0
  46. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  47. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  48. package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
  49. package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +12 -6
  50. package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
  51. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js +3 -13
  52. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  53. package/mobile/lib/components/GalleryLayout/GalleryLayout.js +1 -22
  54. package/mobile/lib/components/GalleryLayout/GalleryLayout.js.map +1 -1
  55. package/mobile/lib/components/GalleryLayout/utils.d.ts +29 -0
  56. package/mobile/lib/components/GalleryLayout/utils.js +25 -0
  57. package/mobile/lib/components/GalleryLayout/utils.js.map +1 -0
  58. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -1
  59. package/mobile/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +12 -7
  60. package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +3 -13
  61. package/mobile/src/components/GalleryLayout/GalleryLayout.tsx +1 -32
  62. package/mobile/src/components/GalleryLayout/utils.ts +35 -0
  63. package/package.json +1 -1
  64. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -1
  65. package/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +12 -7
  66. package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +3 -13
  67. package/src/components/GalleryLayout/GalleryLayout.tsx +1 -32
  68. package/src/components/GalleryLayout/utils.ts +35 -0
  69. package/src/icons/IconName.ts +4 -4
@@ -2733,14 +2733,19 @@
2733
2733
 
2734
2734
  const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
2735
2735
 
2736
- const EsiaLoginBanner = JSX(() => {
2736
+ const EsiaLoginBanner = JSX(({ setEsiaStatus }) => {
2737
2737
  const navigator = locationNavigator();
2738
2738
  const handleAuth = useCallback(async () => {
2739
- const resp = await getLink({
2740
- redirectUri: globalThis.location.origin + globalThis.location.pathname,
2741
- });
2742
- if (resp?.link) {
2743
- navigator.assign(resp.link);
2739
+ try {
2740
+ const resp = await getLink({
2741
+ redirectUri: globalThis.location.origin + globalThis.location.pathname,
2742
+ });
2743
+ if (resp?.link) {
2744
+ navigator.assign(resp.link);
2745
+ }
2746
+ }
2747
+ catch {
2748
+ setEsiaStatus(EsiaStatuses.Error);
2744
2749
  }
2745
2750
  }, []);
2746
2751
  return (jsxs("div", { className: "flex gap-lg items-center rounded-md bg-main-gray p-4xl", children: [jsxs("div", { className: "flex flex-col justify-around w-full", children: [jsx("p", { className: "mb-m text-xl", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u0435 \u0434\u0430\u043D\u043D\u044B\u0435 \u0447\u0435\u0440\u0435\u0437 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }), jsxs("ul", { className: "list-disc list-inside mb-4xl", 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, { className: "block mb-xl self-center @md:hidden", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "80", width: "80" }), jsx(Button, { type: "button", onClick: handleAuth, className: "w-full @md:w-fit", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C" })] }), jsx(Img, { className: "hidden @md:block", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "164" })] }));
@@ -5990,8 +5995,10 @@
5990
5995
  dulSubdivisionCode: document.dulSubdivisionCode,
5991
5996
  birthPlace: addInfo.birthPlace,
5992
5997
  addressRegistration: buildAddress(addressRegistration),
5993
- addressFact: buildAddress(addressFact),
5994
5998
  esiaAccountTypeCd: isDebit ? profile.esiaAccountType : { key: '' },
5999
+ ...(addressFact && {
6000
+ addressFact: buildAddress(addressFact),
6001
+ }),
5995
6002
  };
5996
6003
  return {
5997
6004
  ...mainData,
@@ -6070,16 +6077,6 @@
6070
6077
  category: 'CONFIRMING_INCOME_DOC',
6071
6078
  isPDF: false,
6072
6079
  },
6073
- {
6074
- file: esiaAdditionalDocument.pdfFileSigWorkbook,
6075
- category: 'CONFIRMING_INCOME_DOC',
6076
- isPDF: true,
6077
- },
6078
- {
6079
- file: esiaAdditionalDocument.xmlFileSigWorkbook,
6080
- category: 'CONFIRMING_INCOME_DOC',
6081
- isPDF: false,
6082
- },
6083
6080
  ];
6084
6081
  for (const doc of documents) {
6085
6082
  const contentType = doc.isPDF ? 'data:application/pdf;base64' : 'data:application/xml;base64';
@@ -6126,8 +6123,6 @@
6126
6123
  esiaAdditionalDocument?.xmlFilePayout,
6127
6124
  esiaAdditionalDocument?.xmlFileSigPayout,
6128
6125
  esiaAdditionalDocument?.xmlFileWorkbook,
6129
- esiaAdditionalDocument?.pdfFileSigWorkbook,
6130
- esiaAdditionalDocument?.xmlFileSigWorkbook,
6131
6126
  ];
6132
6127
  return data.every(Boolean);
6133
6128
  };
@@ -6214,7 +6209,7 @@
6214
6209
  reset();
6215
6210
  }
6216
6211
  }, [leadForm?.current, esiaStatus]);
6217
- return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [!esiaStatus ? jsx(EsiaLoginBanner, {}) : null, jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", ref: leadForm, children: [esiaStatus === EsiaStatuses.Pending ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaStatus === EsiaStatuses.Error ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] })] }));
6212
+ return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [!esiaStatus ? jsx(EsiaLoginBanner, { setEsiaStatus: setEsiaStatus }) : null, jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", ref: leadForm, children: [esiaStatus === EsiaStatuses.Pending ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaStatus === EsiaStatuses.Error ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] })] }));
6218
6213
  });
6219
6214
  const getInputs = (applicationFormData) => (applicationFormData?.flatMap((_) => _?.inputs) || []);
6220
6215
  const getExtendedValidatorObj = (productType) => ({
@@ -9443,8 +9438,32 @@
9443
9438
  return blocks;
9444
9439
  };
9445
9440
 
9446
- const MIN_LENGTH_CHILD = 5;
9447
9441
  const SHORT_TILE_INDEXES = [1, 2, 3, 4];
9442
+ const getChildStyle = (index) => SHORT_TILE_INDEXES.includes(index)
9443
+ ? 'lg:col-span-1 lg:row-span-1'
9444
+ : 'lg:col-span-2 lg:row-span-2';
9445
+ const modifyBlock = (block, i) => {
9446
+ const content = { ...block.content };
9447
+ const isSmallTile = SHORT_TILE_INDEXES.includes(i);
9448
+ if (isSmallTile) {
9449
+ delete content.description;
9450
+ delete content.benefits;
9451
+ if (content.link?.href) {
9452
+ delete content.buttons;
9453
+ }
9454
+ content.imageOptions = { ...content.imageOptions, className: 'max-w-max !h-auto' };
9455
+ content.headlineVersion = 'S';
9456
+ }
9457
+ else {
9458
+ if ((content.buttons ?? []).length) {
9459
+ delete content.link;
9460
+ }
9461
+ content.headlineVersion = 'L';
9462
+ }
9463
+ return { ...block, content };
9464
+ };
9465
+
9466
+ const MIN_LENGTH_CHILD = 5;
9448
9467
  const LINK_SCHEMA = {
9449
9468
  link: {
9450
9469
  allOf: [
@@ -9495,27 +9514,6 @@
9495
9514
  block: modifiedBlock,
9496
9515
  }) }, String(i)));
9497
9516
  };
9498
- const getChildStyle = (index) => SHORT_TILE_INDEXES.includes(index)
9499
- ? 'lg:col-span-1 lg:row-span-1'
9500
- : 'lg:col-span-2 lg:row-span-2';
9501
- const modifyBlock = (block, i) => {
9502
- const content = { ...block.content };
9503
- const isSmallTile = SHORT_TILE_INDEXES.includes(i);
9504
- if (isSmallTile) {
9505
- delete content.description;
9506
- delete content.benefits;
9507
- if (content.link?.href) {
9508
- delete content.buttons;
9509
- }
9510
- content.imageOptions = { ...content.imageOptions, className: 'max-w-max !h-auto' };
9511
- }
9512
- else {
9513
- if ((content.buttons ?? []).length) {
9514
- delete content.link;
9515
- }
9516
- }
9517
- return { ...block, content };
9518
- };
9519
9517
 
9520
9518
  const GrantSupport = UniBlock(({ className, title, button, regionSource, data, ...rest }) => {
9521
9519
  const [region, setRegion] = useState({ key: '' });
@@ -10783,7 +10781,7 @@
10783
10781
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
10784
10782
  });
10785
10783
 
10786
- const packageVersion = "0.14.834";
10784
+ const packageVersion = "0.14.836";
10787
10785
 
10788
10786
  exports.Blocks = Blocks;
10789
10787
  exports.ContentPage = ContentPage;