@redneckz/wildless-cms-uni-blocks 0.14.94 → 0.14.95

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 (165) hide show
  1. package/bundle/bundle.umd.js +25 -30
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/Calculator/CalculatorValueBlock.d.ts +4 -2
  4. package/bundle/components/Calculator/Rate.d.ts +2 -2
  5. package/bundle/components/Calculator/getDefaultValues.d.ts +0 -1
  6. package/bundle/components/Calculator/rangeHelpers.d.ts +0 -1
  7. package/bundle/components/Calculator/renderRate.d.ts +4 -9
  8. package/bundle/utils/toLocalNumberFormat.d.ts +3 -1
  9. package/dist/components/Calculator/CalculatorValueBlock.d.ts +4 -2
  10. package/dist/components/Calculator/CalculatorValueBlock.js +3 -1
  11. package/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
  12. package/dist/components/Calculator/Rate.d.ts +2 -2
  13. package/dist/components/Calculator/Rate.js +2 -1
  14. package/dist/components/Calculator/Rate.js.map +1 -1
  15. package/dist/components/Calculator/getDefaultValues.d.ts +0 -1
  16. package/dist/components/Calculator/getDefaultValues.js +1 -7
  17. package/dist/components/Calculator/getDefaultValues.js.map +1 -1
  18. package/dist/components/Calculator/rangeHelpers.d.ts +0 -1
  19. package/dist/components/Calculator/rangeHelpers.js +1 -4
  20. package/dist/components/Calculator/rangeHelpers.js.map +1 -1
  21. package/dist/components/Calculator/renderRate.d.ts +4 -9
  22. package/dist/components/Calculator/renderRate.js +1 -8
  23. package/dist/components/Calculator/renderRate.js.map +1 -1
  24. package/dist/utils/toLocalNumberFormat.d.ts +3 -1
  25. package/dist/utils/toLocalNumberFormat.js +2 -2
  26. package/dist/utils/toLocalNumberFormat.js.map +1 -1
  27. package/lib/components/Calculator/CalculatorValueBlock.d.ts +4 -2
  28. package/lib/components/Calculator/CalculatorValueBlock.js +3 -1
  29. package/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
  30. package/lib/components/Calculator/Rate.d.ts +2 -2
  31. package/lib/components/Calculator/Rate.js +2 -1
  32. package/lib/components/Calculator/Rate.js.map +1 -1
  33. package/lib/components/Calculator/getDefaultValues.d.ts +0 -1
  34. package/lib/components/Calculator/getDefaultValues.js +1 -6
  35. package/lib/components/Calculator/getDefaultValues.js.map +1 -1
  36. package/lib/components/Calculator/rangeHelpers.d.ts +0 -1
  37. package/lib/components/Calculator/rangeHelpers.js +0 -2
  38. package/lib/components/Calculator/rangeHelpers.js.map +1 -1
  39. package/lib/components/Calculator/renderRate.d.ts +4 -9
  40. package/lib/components/Calculator/renderRate.js +1 -8
  41. package/lib/components/Calculator/renderRate.js.map +1 -1
  42. package/lib/utils/toLocalNumberFormat.d.ts +3 -1
  43. package/lib/utils/toLocalNumberFormat.js +2 -2
  44. package/lib/utils/toLocalNumberFormat.js.map +1 -1
  45. package/mobile/bundle/bundle.umd.js +25 -30
  46. package/mobile/bundle/bundle.umd.min.js +1 -1
  47. package/mobile/bundle/components/Calculator/CalculatorValueBlock.d.ts +4 -2
  48. package/mobile/bundle/components/Calculator/Rate.d.ts +2 -2
  49. package/mobile/bundle/components/Calculator/getDefaultValues.d.ts +0 -1
  50. package/mobile/bundle/components/Calculator/rangeHelpers.d.ts +0 -1
  51. package/mobile/bundle/components/Calculator/renderRate.d.ts +4 -9
  52. package/mobile/bundle/utils/toLocalNumberFormat.d.ts +3 -1
  53. package/mobile/dist/components/Calculator/CalculatorValueBlock.d.ts +4 -2
  54. package/mobile/dist/components/Calculator/CalculatorValueBlock.js +3 -1
  55. package/mobile/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
  56. package/mobile/dist/components/Calculator/Rate.d.ts +2 -2
  57. package/mobile/dist/components/Calculator/Rate.js +2 -1
  58. package/mobile/dist/components/Calculator/Rate.js.map +1 -1
  59. package/mobile/dist/components/Calculator/getDefaultValues.d.ts +0 -1
  60. package/mobile/dist/components/Calculator/getDefaultValues.js +1 -7
  61. package/mobile/dist/components/Calculator/getDefaultValues.js.map +1 -1
  62. package/mobile/dist/components/Calculator/rangeHelpers.d.ts +0 -1
  63. package/mobile/dist/components/Calculator/rangeHelpers.js +1 -4
  64. package/mobile/dist/components/Calculator/rangeHelpers.js.map +1 -1
  65. package/mobile/dist/components/Calculator/renderRate.d.ts +4 -9
  66. package/mobile/dist/components/Calculator/renderRate.js +1 -8
  67. package/mobile/dist/components/Calculator/renderRate.js.map +1 -1
  68. package/mobile/dist/utils/toLocalNumberFormat.d.ts +3 -1
  69. package/mobile/dist/utils/toLocalNumberFormat.js +2 -2
  70. package/mobile/dist/utils/toLocalNumberFormat.js.map +1 -1
  71. package/mobile/lib/components/Calculator/CalculatorValueBlock.d.ts +4 -2
  72. package/mobile/lib/components/Calculator/CalculatorValueBlock.js +3 -1
  73. package/mobile/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
  74. package/mobile/lib/components/Calculator/Rate.d.ts +2 -2
  75. package/mobile/lib/components/Calculator/Rate.js +2 -1
  76. package/mobile/lib/components/Calculator/Rate.js.map +1 -1
  77. package/mobile/lib/components/Calculator/getDefaultValues.d.ts +0 -1
  78. package/mobile/lib/components/Calculator/getDefaultValues.js +1 -6
  79. package/mobile/lib/components/Calculator/getDefaultValues.js.map +1 -1
  80. package/mobile/lib/components/Calculator/rangeHelpers.d.ts +0 -1
  81. package/mobile/lib/components/Calculator/rangeHelpers.js +0 -2
  82. package/mobile/lib/components/Calculator/rangeHelpers.js.map +1 -1
  83. package/mobile/lib/components/Calculator/renderRate.d.ts +4 -9
  84. package/mobile/lib/components/Calculator/renderRate.js +1 -8
  85. package/mobile/lib/components/Calculator/renderRate.js.map +1 -1
  86. package/mobile/lib/utils/toLocalNumberFormat.d.ts +3 -1
  87. package/mobile/lib/utils/toLocalNumberFormat.js +2 -2
  88. package/mobile/lib/utils/toLocalNumberFormat.js.map +1 -1
  89. package/mobile/src/components/Calculator/CalculatorValueBlock.tsx +8 -4
  90. package/mobile/src/components/Calculator/Rate.tsx +5 -4
  91. package/mobile/src/components/Calculator/getDefaultValues.ts +0 -9
  92. package/mobile/src/components/Calculator/rangeHelpers.ts +0 -10
  93. package/mobile/src/components/Calculator/renderRate.tsx +23 -44
  94. package/mobile/src/utils/toLocalNumberFormat.ts +2 -2
  95. package/package.json +1 -1
  96. package/src/components/Calculator/CalculatorValueBlock.tsx +8 -4
  97. package/src/components/Calculator/Rate.tsx +5 -4
  98. package/src/components/Calculator/getDefaultValues.ts +0 -9
  99. package/src/components/Calculator/rangeHelpers.ts +0 -10
  100. package/src/components/Calculator/renderRate.tsx +23 -44
  101. package/src/utils/toLocalNumberFormat.ts +2 -2
  102. package/bundle/components/Calculator/getCreditRate.d.ts +0 -7
  103. package/bundle/components/Calculator/getDefaultMonths.d.ts +0 -1
  104. package/bundle/components/Calculator/renderInitialFeeInput.d.ts +0 -6
  105. package/bundle/components/Calculator/renderRealEstateValue.d.ts +0 -6
  106. package/dist/components/Calculator/getCreditRate.d.ts +0 -7
  107. package/dist/components/Calculator/getCreditRate.js +0 -14
  108. package/dist/components/Calculator/getCreditRate.js.map +0 -1
  109. package/dist/components/Calculator/getDefaultMonths.d.ts +0 -1
  110. package/dist/components/Calculator/getDefaultMonths.js +0 -5
  111. package/dist/components/Calculator/getDefaultMonths.js.map +0 -1
  112. package/dist/components/Calculator/renderInitialFeeInput.d.ts +0 -6
  113. package/dist/components/Calculator/renderInitialFeeInput.js +0 -19
  114. package/dist/components/Calculator/renderInitialFeeInput.js.map +0 -1
  115. package/dist/components/Calculator/renderRealEstateValue.d.ts +0 -6
  116. package/dist/components/Calculator/renderRealEstateValue.js +0 -16
  117. package/dist/components/Calculator/renderRealEstateValue.js.map +0 -1
  118. package/lib/components/Calculator/getCreditRate.d.ts +0 -7
  119. package/lib/components/Calculator/getCreditRate.js +0 -11
  120. package/lib/components/Calculator/getCreditRate.js.map +0 -1
  121. package/lib/components/Calculator/getDefaultMonths.d.ts +0 -1
  122. package/lib/components/Calculator/getDefaultMonths.js +0 -2
  123. package/lib/components/Calculator/getDefaultMonths.js.map +0 -1
  124. package/lib/components/Calculator/renderInitialFeeInput.d.ts +0 -6
  125. package/lib/components/Calculator/renderInitialFeeInput.js +0 -16
  126. package/lib/components/Calculator/renderInitialFeeInput.js.map +0 -1
  127. package/lib/components/Calculator/renderRealEstateValue.d.ts +0 -6
  128. package/lib/components/Calculator/renderRealEstateValue.js +0 -13
  129. package/lib/components/Calculator/renderRealEstateValue.js.map +0 -1
  130. package/mobile/bundle/components/Calculator/getCreditRate.d.ts +0 -7
  131. package/mobile/bundle/components/Calculator/getDefaultMonths.d.ts +0 -1
  132. package/mobile/bundle/components/Calculator/renderInitialFeeInput.d.ts +0 -6
  133. package/mobile/bundle/components/Calculator/renderRealEstateValue.d.ts +0 -6
  134. package/mobile/dist/components/Calculator/getCreditRate.d.ts +0 -7
  135. package/mobile/dist/components/Calculator/getCreditRate.js +0 -14
  136. package/mobile/dist/components/Calculator/getCreditRate.js.map +0 -1
  137. package/mobile/dist/components/Calculator/getDefaultMonths.d.ts +0 -1
  138. package/mobile/dist/components/Calculator/getDefaultMonths.js +0 -5
  139. package/mobile/dist/components/Calculator/getDefaultMonths.js.map +0 -1
  140. package/mobile/dist/components/Calculator/renderInitialFeeInput.d.ts +0 -6
  141. package/mobile/dist/components/Calculator/renderInitialFeeInput.js +0 -19
  142. package/mobile/dist/components/Calculator/renderInitialFeeInput.js.map +0 -1
  143. package/mobile/dist/components/Calculator/renderRealEstateValue.d.ts +0 -6
  144. package/mobile/dist/components/Calculator/renderRealEstateValue.js +0 -16
  145. package/mobile/dist/components/Calculator/renderRealEstateValue.js.map +0 -1
  146. package/mobile/lib/components/Calculator/getCreditRate.d.ts +0 -7
  147. package/mobile/lib/components/Calculator/getCreditRate.js +0 -11
  148. package/mobile/lib/components/Calculator/getCreditRate.js.map +0 -1
  149. package/mobile/lib/components/Calculator/getDefaultMonths.d.ts +0 -1
  150. package/mobile/lib/components/Calculator/getDefaultMonths.js +0 -2
  151. package/mobile/lib/components/Calculator/getDefaultMonths.js.map +0 -1
  152. package/mobile/lib/components/Calculator/renderInitialFeeInput.d.ts +0 -6
  153. package/mobile/lib/components/Calculator/renderInitialFeeInput.js +0 -16
  154. package/mobile/lib/components/Calculator/renderInitialFeeInput.js.map +0 -1
  155. package/mobile/lib/components/Calculator/renderRealEstateValue.d.ts +0 -6
  156. package/mobile/lib/components/Calculator/renderRealEstateValue.js +0 -13
  157. package/mobile/lib/components/Calculator/renderRealEstateValue.js.map +0 -1
  158. package/mobile/src/components/Calculator/getCreditRate.ts +0 -20
  159. package/mobile/src/components/Calculator/getDefaultMonths.ts +0 -2
  160. package/mobile/src/components/Calculator/renderInitialFeeInput.tsx +0 -36
  161. package/mobile/src/components/Calculator/renderRealEstateValue.tsx +0 -33
  162. package/src/components/Calculator/getCreditRate.ts +0 -20
  163. package/src/components/Calculator/getDefaultMonths.ts +0 -2
  164. package/src/components/Calculator/renderInitialFeeInput.tsx +0 -36
  165. package/src/components/Calculator/renderRealEstateValue.tsx +0 -33
@@ -727,8 +727,8 @@
727
727
  return items?.length ? (jsx("section", { className: style('flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text', versionStyle.textSize, className), role: "list", children: items.map((item, i) => (jsx(ListItem, { isDotted: isDotted, dotClassName: style(dotClassName || 'bg-primary-text', versionStyle.dotStyle), children: item }, String(i)))) })) : null;
728
728
  });
729
729
 
730
- const toLocalNumberFormat = (fractionDigits = 0) => (_ = 0) => new Intl.NumberFormat('ru-RU', {
731
- minimumFractionDigits: 0,
730
+ const toLocalNumberFormat = (fractionDigits = 0, { fixed } = {}) => (_ = 0) => new Intl.NumberFormat('ru-RU', {
731
+ minimumFractionDigits: fixed ? fractionDigits : 0,
732
732
  maximumFractionDigits: fractionDigits,
733
733
  }).format(Number(_) || 0);
734
734
 
@@ -1848,7 +1848,9 @@
1848
1848
  }
1849
1849
 
1850
1850
  const calculatorValueBlockStyle = 'flex justify-between @xl:flex-col';
1851
- const CalculatorValueBlock = JSX(({ title, value, postfix = '', prefix, className = '' }) => (jsxs("div", { className: style(calculatorValueBlockStyle, className), children: [title ? (jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title })) : null, value ? (jsx("div", { children: jsxs(Text, { size: "text-h3", children: [prefix, " ", toLocalNumberFormat(2)(Math.round(value)), " ", postfix] }) })) : (jsx("div", { children: jsx(Text, { size: "text-h3", children: "-" }) }))] })));
1851
+ const CalculatorValueBlock = JSX(({ className, title, value, fractionDigits, fixed, prefix, postfix }) => (jsxs("div", { className: style(calculatorValueBlockStyle, className), children: [title ? (jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title })) : null, value ? (jsx("div", { children: jsx(Text, { size: "text-h3", children: [prefix, toLocalNumberFormat(fractionDigits, { fixed })(value), postfix]
1852
+ .filter(Boolean)
1853
+ .join(' ') }) })) : (jsx("div", { children: jsx(Text, { size: "text-h3", children: "-" }) }))] })));
1852
1854
 
1853
1855
  const DEFAULT_MIN_SUM$1 = 10000;
1854
1856
  const DEFAULT_MAX_SUM$1 = 5000000;
@@ -1942,18 +1944,11 @@
1942
1944
 
1943
1945
  const renderFootnote = (text) => text ? (jsx(Paragraph, { size: "text-s", font: "font-light", color: "text-secondary-text", children: text })) : null;
1944
1946
 
1945
- const Rate = JSX(({ rate, title = 'Ставка', unit, depositeName, isShowDepositeName, fractionDigits = 2 }) => (jsxs("div", { children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsxs("div", { className: "relative", children: [jsxs("div", { className: "flex justify-start gradient-color-text", children: [jsx("span", { className: "font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]", children: String(rate.toFixed(fractionDigits)).replace('.', ',') }), unit ? jsx("span", { className: "text-7xl", children: unit }) : null] }), depositeName && isShowDepositeName ? (jsx("div", { className: "absolute bottom-2 w-full text-left whitespace-nowrap", children: depositeName })) : null] })] })));
1947
+ const Rate = JSX(({ rate = 0, title = 'Ставка', unit, fractionDigits = 2, depositeName, isShowDepositeName }) => (jsxs("div", { children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsxs("div", { className: "relative", children: [jsxs("div", { className: "flex justify-start gradient-color-text", children: [jsx("span", { className: "font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]", children: toLocalNumberFormat(fractionDigits, { fixed: true })(rate) }), unit ? jsx("span", { className: "text-7xl", children: unit }) : null] }), depositeName && isShowDepositeName ? (jsx("div", { className: "absolute bottom-2 w-full text-left whitespace-nowrap", children: depositeName })) : null] })] })));
1946
1948
 
1947
1949
  const UnknownRate = JSX(({ title = 'Ставка', isUnavailableByTerm = false }) => (jsxs("div", { className: "space-y-s", children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsx(Icon, { className: "w-10 h-10 @5xl:h-auto @5xl:w-40", name: "PercentIcon" }), jsx("div", { className: "w-64", children: isUnavailableByTerm ? (jsxs(Paragraph, { size: "text-xl", font: "font-light", color: "text-primary-text", children: ["\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u043D\u0430\u044F \u0441\u0442\u0430\u0432\u043A\u0430 \u0434\u043B\u044F \u0441\u0440\u043E\u043A\u0430 ", jsx("strong", { children: "1-30 \u0434\u043D\u0435\u0439" }), " \u0443\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u043F\u0440\u0438 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0438 \u0432 \u0411\u0430\u043D\u043A"] })) : (jsx(Paragraph, { size: "text-xl", font: "font-light", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E \u0441\u0443\u043C\u043C\u0443 \u0438\u043B\u0438 \u0441\u0440\u043E\u043A" })) })] })));
1948
1950
 
1949
- const renderDesktopRate = ({ rate, depositeName, fractionDigits, isShowDepositeName, title, unit, }) => (jsx(Rate, { rate: rate, depositeName: depositeName, fractionDigits: fractionDigits, isShowDepositeName: isShowDepositeName, unit: unit, title: title }));
1950
- const renderMobileRate = ({ rate, title, unit }) => (jsx(CalculatorValueBlock, { title: title, value: rate, postfix: unit }));
1951
- const renderRate = ({ isUnknownRateShown = true, isUnavailableByTerm = false, title = 'Ставка', unit = '%', rate = 0, ...rest }) => {
1952
- if (isUnknownRateShown && rate === 0) {
1953
- return jsx(UnknownRate, { isUnavailableByTerm: isUnavailableByTerm, title: title });
1954
- }
1955
- return (jsxs("div", { children: [jsx("div", { className: "hidden @xl:block", children: renderDesktopRate({ title, unit, rate, ...rest }) }), jsx("div", { className: "@xl:hidden", children: renderMobileRate({ title, unit, rate, ...rest }) })] }));
1956
- };
1951
+ const renderRate = ({ title = 'Ставка', rate = 0, unit = '%', fractionDigits = 2, isUnknownRateShown = true, ...rest }) => isUnknownRateShown && rate === 0 ? (jsx(UnknownRate, { title: title, ...rest })) : (jsxs("div", { children: [jsx("div", { className: "hidden @xl:block", children: jsx(Rate, { title: title, rate: rate, unit: unit, fractionDigits: fractionDigits, ...rest }) }), jsx("div", { className: "@xl:hidden", children: jsx(CalculatorValueBlock, { title: title, value: rate, postfix: unit, fractionDigits: fractionDigits, fixed: true, ...rest }) })] }));
1957
1952
 
1958
1953
  const DEFAULT_MONEY_STEP = 1000;
1959
1954
  function renderWantedSumInput({ isShowItems = true, step = DEFAULT_MONEY_STEP, ...rest }) {
@@ -2058,23 +2053,6 @@
2058
2053
  const maxBy = (discriminator = defaultDiscriminator) => (list) => list.reduceRight((a, b) => (discriminator(a) > discriminator(b) ? a : b));
2059
2054
  const max = maxBy();
2060
2055
 
2061
- const mergeIntervals = (intervals) => {
2062
- const result = [...intervals];
2063
- result.sort(([a], [c]) => a - c);
2064
- let i = 1;
2065
- while (i < result.length) {
2066
- const [a, b] = result[i - 1];
2067
- const [c, d] = result[i];
2068
- if (b >= c) {
2069
- result.splice(i - 1, 2, [a, Math.max(b, d)]);
2070
- }
2071
- else {
2072
- i++;
2073
- }
2074
- }
2075
- return result;
2076
- };
2077
-
2078
2056
  const minBy = (discriminator = defaultDiscriminator) => maxBy((_) => -discriminator(_));
2079
2057
  const min = minBy();
2080
2058
 
@@ -2335,6 +2313,23 @@
2335
2313
 
2336
2314
  const arrayByRange = (start, stop, step = 1) => Array.from({ length: Math.abs(stop - start) / step + 1 }, (value, index) => stop >= start ? start + index * step : start - index * step);
2337
2315
 
2316
+ const mergeIntervals = (intervals) => {
2317
+ const result = [...intervals];
2318
+ result.sort(([a], [c]) => a - c);
2319
+ let i = 1;
2320
+ while (i < result.length) {
2321
+ const [a, b] = result[i - 1];
2322
+ const [c, d] = result[i];
2323
+ if (b >= c) {
2324
+ result.splice(i - 1, 2, [a, Math.max(b, d)]);
2325
+ }
2326
+ else {
2327
+ i++;
2328
+ }
2329
+ }
2330
+ return result;
2331
+ };
2332
+
2338
2333
  const useDepositCalculatorParams = (userInputParams, sourceBookDir, paramsViewSettings) => {
2339
2334
  const { moneyValue, monthsValue } = userInputParams;
2340
2335
  const data = useCalculatorParams(sourceBookDir || DEPOSIT_CALC_DEFAULT_DIR);
@@ -5796,7 +5791,7 @@
5796
5791
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-3xl sticky bottom-0 pointer-events-auto" }) }));
5797
5792
  }
5798
5793
 
5799
- const packageVersion = "0.14.93";
5794
+ const packageVersion = "0.14.94";
5800
5795
 
5801
5796
  exports.Blocks = Blocks;
5802
5797
  exports.ContentPage = ContentPage;