@redneckz/wildless-cms-uni-blocks 0.14.353 → 0.14.355

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 (38) hide show
  1. package/bin/migration-scripts/0.14.169.js +24 -39
  2. package/bundle/bundle.umd.js +7 -7
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/Footer/SocialMedia.js +1 -1
  5. package/dist/components/Footer/SocialMedia.js.map +1 -1
  6. package/dist/components/InvestmentInfo/InvestmentInfo.js +3 -3
  7. package/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  8. package/dist/ui-kit/Checkbox/Checkbox.js +2 -2
  9. package/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
  10. package/lib/common.css +1 -1
  11. package/lib/components/Footer/SocialMedia.js +1 -1
  12. package/lib/components/Footer/SocialMedia.js.map +1 -1
  13. package/lib/components/InvestmentInfo/InvestmentInfo.js +3 -3
  14. package/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  15. package/lib/ui-kit/Checkbox/Checkbox.js +2 -2
  16. package/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
  17. package/mobile/bundle/bundle.umd.js +4 -4
  18. package/mobile/bundle/bundle.umd.min.js +1 -1
  19. package/mobile/dist/components/Footer/SocialMedia.js +1 -1
  20. package/mobile/dist/components/Footer/SocialMedia.js.map +1 -1
  21. package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js +3 -3
  22. package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  23. package/mobile/dist/ui-kit/Checkbox/Checkbox.js +2 -2
  24. package/mobile/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
  25. package/mobile/lib/common.css +1 -1
  26. package/mobile/lib/components/Footer/SocialMedia.js +1 -1
  27. package/mobile/lib/components/Footer/SocialMedia.js.map +1 -1
  28. package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js +3 -3
  29. package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  30. package/mobile/lib/ui-kit/Checkbox/Checkbox.js +2 -2
  31. package/mobile/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
  32. package/mobile/src/components/Footer/SocialMedia.tsx +1 -1
  33. package/mobile/src/components/InvestmentInfo/InvestmentInfo.tsx +8 -3
  34. package/mobile/src/ui-kit/Checkbox/Checkbox.tsx +2 -2
  35. package/package.json +1 -1
  36. package/src/components/Footer/SocialMedia.tsx +1 -1
  37. package/src/components/InvestmentInfo/InvestmentInfo.tsx +8 -3
  38. package/src/ui-kit/Checkbox/Checkbox.tsx +2 -2
@@ -4,21 +4,11 @@ export const description = 'v0.14.169';
4
4
 
5
5
  export default traversePageBlocks(
6
6
  adjustClearBlock,
7
- adjustApplicationFormCorruptionBlock,
8
- adjustApplicationFormAntiFraudBlock,
9
- );
10
-
11
- function adjustApplicationFormCorruptionBlock(block) {
12
- if (isMigrateForm(block, 'ApplicationFormCorruption')) {
13
- block.type = 'ApplicationFormCustom';
14
- const formBlock = block.content?.formBlock;
15
- block.content = {
16
- title: formBlock?.title,
17
- typeForm: 'CORRUPTION',
18
- endpoint: 'lead',
19
- formColumns: 1,
20
- inputs: [
21
- ...userInputs,
7
+ (block) =>
8
+ adjustApplicationFormBlock(block, {
9
+ type: 'ApplicationFormCorruption',
10
+ newType: 'CORRUPTION',
11
+ inputEntries: [
22
12
  {
23
13
  name: 'region',
24
14
  required: true,
@@ -26,29 +16,13 @@ function adjustApplicationFormCorruptionBlock(block) {
26
16
  {
27
17
  name: 'email',
28
18
  },
29
- comment,
30
- consentDataProcessing,
31
19
  ],
32
- button: formBlock?.button || { text: 'Отправить заявку' },
33
- link: formBlock?.link || {
34
- text: 'обработкой персональных данных',
35
- href: 'https://beta.rshb.ru/natural/privacy-policy',
36
- },
37
- };
38
- }
39
- }
40
-
41
- function adjustApplicationFormAntiFraudBlock(block) {
42
- if (isMigrateForm(block, 'ApplicationFormAntiFraud')) {
43
- block.type = 'ApplicationFormCorruption';
44
- const formBlock = block.content?.formBlock;
45
- block.content = {
46
- title: formBlock?.title,
47
- typeForm: 'ANTIFRAUD',
48
- endpoint: 'lead',
49
- formColumns: 1,
50
- inputs: [
51
- ...userInputs,
20
+ }),
21
+ (block) =>
22
+ adjustApplicationFormBlock(block, {
23
+ type: 'ApplicationFormAntiFraud',
24
+ newType: 'ANTIFRAUD',
25
+ inputEntries: [
52
26
  {
53
27
  name: 'birthday',
54
28
  required: true,
@@ -56,9 +30,20 @@ function adjustApplicationFormAntiFraudBlock(block) {
56
30
  {
57
31
  name: 'client',
58
32
  },
59
- comment,
60
- consentDataProcessing,
61
33
  ],
34
+ }),
35
+ );
36
+
37
+ function adjustApplicationFormBlock(block, { type, newType, inputEntries }) {
38
+ if (isMigrateForm(block, type)) {
39
+ block.type = type;
40
+ const formBlock = block.content?.formBlock;
41
+ block.content = {
42
+ endpoint: 'lead',
43
+ formColumns: 1,
44
+ title: formBlock?.title,
45
+ typeForm: newType,
46
+ inputs: [...userInputs, ...inputEntries, comment, consentDataProcessing].push(inputEntries),
62
47
  button: formBlock?.button || { text: 'Отправить заявку' },
63
48
  link: formBlock?.link || {
64
49
  text: 'обработкой персональных данных',
@@ -1097,8 +1097,8 @@
1097
1097
  const icon = isRadio ? (jsx("div", { className: "absolute left-1 w-3 h-3 rounded-full bg-primary-main" })) : (jsx(SVG, { paths: CHECK_PATHS, className: "absolute left-1 ml-px block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" }));
1098
1098
  return (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center relative cursor-pointer group/box", onClick: handleChange, children: [jsx("div", { className: style('appearance-none w-5 h-5 border-solid cursor-pointer m-0', isRadio ? 'rounded-full border-2' : checkboxStyle(value), value ? 'border-primary-main' : 'border-gray', disabled ? 'bg-main-disabled' : 'group-hover/box:border-primary-hover'), role: role(isRadio), "aria-checked": Boolean(value), "aria-disabled": Boolean(disabled) }), value ? icon : null, text ? (jsx("div", { className: "ml-s", children: jsx(Text, { size: "text-l", font: "font-light", children: text }) })) : null] }) }));
1099
1099
  });
1100
- const role = (isRadio) => (isRadio ? 'radio' : 'checkbox');
1101
- const checkboxStyle = (value) => style('rounded border', value ? 'bg-primary-main' : '');
1100
+ const role = (isRadio = false) => (isRadio ? 'radio' : 'checkbox');
1101
+ const checkboxStyle = (value = false) => style('rounded border', value ? 'bg-primary-main' : '');
1102
1102
 
1103
1103
  const CheckboxWithError = JSX(({ className, text, value, key, disabled, error, onChange }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(Checkbox, { text: text, value: value, disabled: disabled, onChange: onChange }, key), renderErrorText(error)] })));
1104
1104
 
@@ -3401,7 +3401,7 @@
3401
3401
  buttonClassName,
3402
3402
  }) }), children ? (jsx(Text, { size: "text-s", font: "font-light", color: "text-secondary-text", children: children })) : null] }));
3403
3403
  });
3404
- const getStretchedStyle = (stretched) => (stretched ? 'flex-1 justify-center' : '');
3404
+ const getStretchedStyle = (stretched = false) => (stretched ? 'flex-1 justify-center' : '');
3405
3405
 
3406
3406
  const ImageAlwaysOnRight = true;
3407
3407
 
@@ -4590,12 +4590,12 @@
4590
4590
  if (investmentZeroColumn) {
4591
4591
  columns.unshift(investmentZeroColumn);
4592
4592
  }
4593
- return (jsx(BlockWrapper, { className: className, defaultPadding: "p-4xl", ...rest, children: jsxs("div", { className: "container text-m font-light space-y-4xl", children: [columns?.length ? (jsxs("div", { children: [jsxs("div", { className: "flex items-end relative pl-3xl pr-lg text-white", children: [joinList(jsx("div", { className: "w-px h-4 bg-gray" }))(columns.map(renderInvestmentColumn)), jsx("div", { className: "absolute right-3xl w-px h-4 bg-gray" })] }), jsx("div", { className: "border-t border-gray -mt-xs mx-3xl" }), jsx("div", { className: "flex justify-between text-primary-text mt-s -mx-5xl", children: columns.map(renderInvestmentColumnTitle) })] })) : null, items?.length ? (jsx(List, { className: "max-w-[657px]", items: items, isDotted: isDotted, listItemSize: "M" })) : null] }) }));
4593
+ return (jsx(BlockWrapper, { className: className, defaultPadding: "p-4xl", ...rest, children: jsxs("div", { className: "container text-m font-light space-y-4xl", children: [columns?.length ? (jsxs("div", { children: [jsxs("div", { className: "flex items-end relative pl-3xl pr-lg text-white", children: [joinList(jsx("div", { className: "w-px h-4 bg-gray" }))(columns.map(renderInvestmentColumn)), jsx("div", { className: "absolute right-3xl w-px h-4 bg-gray" })] }), jsx("div", { className: "border-t border-gray -mt-xs mx-3xl" }), jsx("div", { className: "flex justify-between text-primary-text mt-s -mx-5xl", children: columns.map(renderInvestmentColumnTitle) })] })) : null, items?.length ? (jsx(List, { className: "max-w-2xl font-light text-base", items: items, isDotted: isDotted, listItemSize: "M" })) : null] }) }));
4594
4594
  });
4595
4595
  const renderInvestmentColumn = (column, i, arr) => {
4596
4596
  const isSecondColumn = i === 1;
4597
4597
  const isLastColumn = i === arr.length - 1;
4598
- return (jsx("div", { className: `${getColumnClasses(isSecondColumn, isLastColumn, column.cells)}`, children: column.cells?.length ? (jsx("div", { className: `w-full ${isLastColumn ? 'border-4 border-green-more-dark p-2xs min-w-72' : ''}`, children: column.cells.reverse().map(renderInvestmentCell) })) : null }, `column_${i}`));
4598
+ return (jsx("div", { className: `${getColumnClasses(isSecondColumn, isLastColumn, column.cells)}`, children: column.cells?.length ? (jsx("div", { className: `w-full ${isLastColumn ? 'border-4 border-green-more-dark p-1.5 min-w-72' : ''}`, children: column.cells.reverse().map(renderInvestmentCell) })) : null }, `column_${i}`));
4599
4599
  };
4600
4600
  const getColumnClasses = (isSecondColumn, isLastColumn, cells = []) => [
4601
4601
  cells.length ? 'flex-1' : 'flex-0',
@@ -4607,7 +4607,7 @@
4607
4607
  const cellColor = cell.cellColor || 'green';
4608
4608
  return cell.text ? (jsx("div", { className: `flex-1 flex items-center justify-center relative py-xs ${investmentCellSizeMap[cellSize]} ${investmentCellColorMap[cellColor]} ${cellSize === 'XS' ? 'px-s' : 'px-5xl'}`, children: jsx(Text, { align: "text-center", children: cell.text }) }, `cell_${i}`)) : null;
4609
4609
  };
4610
- const renderInvestmentColumnTitle = (column, i) => column?.title ? (jsx("div", { className: `flex-1 max-w-[180px] text-center px-xs last:pr-3xl`, children: column.title }, `title_${i}`)) : null;
4610
+ const renderInvestmentColumnTitle = (column, i) => column?.title ? (jsx("div", { className: "flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52", children: column.title }, `title_${i}`)) : null;
4611
4611
 
4612
4612
  const KILO = 1024;
4613
4613
  const KILO_SIZES = ['байт', 'Кб', 'Мб', 'Гб', 'Тб', 'Пб'];
@@ -6254,7 +6254,7 @@
6254
6254
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6255
6255
  });
6256
6256
 
6257
- const packageVersion = "0.14.352";
6257
+ const packageVersion = "0.14.354";
6258
6258
 
6259
6259
  exports.Blocks = Blocks;
6260
6260
  exports.ContentPage = ContentPage;