@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
@@ -1,8 +1,10 @@
1
1
  export interface CalculatorValueBlockProps {
2
+ className?: string;
2
3
  title?: string;
3
4
  value?: number;
4
- postfix?: string;
5
+ fractionDigits?: number;
6
+ fixed?: boolean;
5
7
  prefix?: string;
6
- className?: string;
8
+ postfix?: string;
7
9
  }
8
10
  export declare const CalculatorValueBlock: import("@redneckz/uni-jsx").UNIComponent<CalculatorValueBlockProps, any, any>;
@@ -1,9 +1,9 @@
1
1
  export interface RateProps {
2
- rate: number;
2
+ rate: number | undefined;
3
3
  title?: string;
4
4
  unit?: string;
5
+ fractionDigits?: number;
5
6
  depositeName?: string;
6
7
  isShowDepositeName?: boolean;
7
- fractionDigits?: number;
8
8
  }
9
9
  export declare const Rate: import("@redneckz/uni-jsx").UNIComponent<RateProps, any, any>;
@@ -1,4 +1,3 @@
1
1
  import type { CommonDefaultParams } from './CalculatorContent';
2
2
  export declare const getMoneyDefaultValue: (defaultParams?: CommonDefaultParams, defaultMoney?: number) => number;
3
3
  export declare const getMonthsDefaultValue: (defaultParams?: CommonDefaultParams, defaultMonth?: number) => number;
4
- export declare const getDaysDefaultValue: (defaultParams?: CommonDefaultParams, defaultDays?: number) => number;
@@ -4,5 +4,4 @@ export declare const getLimitRangeByKeys: <MinKey extends string, MaxKey extends
4
4
  export declare const getRangeByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>([minKey, maxKey]: [MinKey, MaxKey], rows?: T[]) => {
5
5
  [x: string]: number;
6
6
  };
7
- export declare const getMergeRangesByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>([minKey, maxKey]: [MinKey, MaxKey], rows?: T[]) => number[][];
8
7
  export declare const checkRangeByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>(value: number, [minKey, maxKey]: [MinKey, MaxKey], sourceBookRow: T) => boolean;
@@ -1,13 +1,8 @@
1
1
  /// <reference types="react" />
2
- interface RenderRateProps {
3
- rate: number;
4
- depositeName?: string;
5
- isUnavailableByTerm?: boolean;
6
- isShowDepositeName?: boolean;
7
- fractionDigits?: number;
2
+ import { type RateProps } from './Rate';
3
+ import { type UnknownRateProps } from './UnknownRate';
4
+ interface RenderRateProps extends RateProps, UnknownRateProps {
8
5
  isUnknownRateShown?: boolean;
9
- title?: string;
10
- unit?: string;
11
6
  }
12
- export declare const renderRate: ({ isUnknownRateShown, isUnavailableByTerm, title, unit, rate, ...rest }: RenderRateProps) => JSX.Element;
7
+ export declare const renderRate: ({ title, rate, unit, fractionDigits, isUnknownRateShown, ...rest }: RenderRateProps) => JSX.Element;
13
8
  export {};
@@ -1 +1,3 @@
1
- export declare const toLocalNumberFormat: (fractionDigits?: number) => (_?: string | number | undefined) => string;
1
+ export declare const toLocalNumberFormat: (fractionDigits?: number, { fixed }?: {
2
+ fixed?: boolean | undefined;
3
+ }) => (_?: string | number | undefined) => string;
@@ -1,8 +1,10 @@
1
1
  export interface CalculatorValueBlockProps {
2
+ className?: string;
2
3
  title?: string;
3
4
  value?: number;
4
- postfix?: string;
5
+ fractionDigits?: number;
6
+ fixed?: boolean;
5
7
  prefix?: string;
6
- className?: string;
8
+ postfix?: string;
7
9
  }
8
10
  export declare const CalculatorValueBlock: import("@redneckz/uni-jsx").UNIComponent<CalculatorValueBlockProps, any, any>;
@@ -6,5 +6,7 @@ const Text_1 = require("../../ui-kit/Text/Text");
6
6
  const style_1 = require("../../utils/style");
7
7
  const toLocalNumberFormat_1 = require("../../utils/toLocalNumberFormat");
8
8
  const calculatorValueBlockStyle = 'flex justify-between @xl:flex-col';
9
- exports.CalculatorValueBlock = (0, uni_jsx_1.JSX)(({ title, value, postfix = '', prefix, className = '' }) => ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)(calculatorValueBlockStyle, className), children: [title ? ((0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title })) : null, value ? ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)(Text_1.Text, { size: "text-h3", children: [prefix, " ", (0, toLocalNumberFormat_1.toLocalNumberFormat)(2)(Math.round(value)), " ", postfix] }) })) : ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-h3", children: "-" }) }))] })));
9
+ exports.CalculatorValueBlock = (0, uni_jsx_1.JSX)(({ className, title, value, fractionDigits, fixed, prefix, postfix }) => ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)(calculatorValueBlockStyle, className), children: [title ? ((0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title })) : null, value ? ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-h3", children: [prefix, (0, toLocalNumberFormat_1.toLocalNumberFormat)(fractionDigits, { fixed })(value), postfix]
10
+ .filter(Boolean)
11
+ .join(' ') }) })) : ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-h3", children: "-" }) }))] })));
10
12
  //# sourceMappingURL=CalculatorValueBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CalculatorValueBlock.js","sourceRoot":"","sources":["../../../src/components/Calculator/CalculatorValueBlock.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iDAA8C;AAC9C,6CAA0C;AAC1C,yEAAsE;AAEtE,MAAM,yBAAyB,GAAG,mCAAmC,CAAC;AAUzD,QAAA,oBAAoB,GAAG,IAAA,aAAG,EACrC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,EAAE,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAC1D,iCAAK,SAAS,EAAE,IAAA,aAAK,EAAC,yBAAyB,EAAE,SAAS,CAAC,aACxD,KAAK,CAAC,CAAC,CAAC,CACP,uBAAC,WAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,qBAAqB,YAC9D,KAAK,GACD,CACR,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,CAAC,CAAC,CACP,0CACE,wBAAC,WAAI,IAAC,IAAI,EAAC,SAAS,aACjB,MAAM,OAAG,IAAA,yCAAmB,EAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,OAAG,OAAO,IACxD,GACH,CACP,CAAC,CAAC,CAAC,CACF,0CACE,uBAAC,WAAI,IAAC,IAAI,EAAC,SAAS,kBAAS,GACzB,CACP,IACG,CACP,CACF,CAAC"}
1
+ {"version":3,"file":"CalculatorValueBlock.js","sourceRoot":"","sources":["../../../src/components/Calculator/CalculatorValueBlock.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iDAA8C;AAC9C,6CAA0C;AAC1C,yEAAsE;AAEtE,MAAM,yBAAyB,GAAG,mCAAmC,CAAC;AAYzD,QAAA,oBAAoB,GAAG,IAAA,aAAG,EACrC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CACvE,iCAAK,SAAS,EAAE,IAAA,aAAK,EAAC,yBAAyB,EAAE,SAAS,CAAC,aACxD,KAAK,CAAC,CAAC,CAAC,CACP,uBAAC,WAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,qBAAqB,YAC9D,KAAK,GACD,CACR,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,CAAC,CAAC,CACP,0CACE,uBAAC,WAAI,IAAC,IAAI,EAAC,SAAS,YACjB,CAAC,MAAM,EAAE,IAAA,yCAAmB,EAAC,cAAc,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;qBACtE,MAAM,CAAC,OAAO,CAAC;qBACf,IAAI,CAAC,GAAG,CAAC,GACP,GACH,CACP,CAAC,CAAC,CAAC,CACF,0CACE,uBAAC,WAAI,IAAC,IAAI,EAAC,SAAS,kBAAS,GACzB,CACP,IACG,CACP,CACF,CAAC"}
@@ -1,9 +1,9 @@
1
1
  export interface RateProps {
2
- rate: number;
2
+ rate: number | undefined;
3
3
  title?: string;
4
4
  unit?: string;
5
+ fractionDigits?: number;
5
6
  depositeName?: string;
6
7
  isShowDepositeName?: boolean;
7
- fractionDigits?: number;
8
8
  }
9
9
  export declare const Rate: import("@redneckz/uni-jsx").UNIComponent<RateProps, any, any>;
@@ -3,5 +3,6 @@ exports.Rate = void 0;
3
3
  const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
4
  const uni_jsx_1 = require("@redneckz/uni-jsx");
5
5
  const Text_1 = require("../../ui-kit/Text/Text");
6
- exports.Rate = (0, uni_jsx_1.JSX)(({ rate, title = 'Ставка', unit, depositeName, isShowDepositeName, fractionDigits = 2 }) => ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), (0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-start gradient-color-text", children: [(0, jsx_runtime_1.jsx)("span", { className: "font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]", children: String(rate.toFixed(fractionDigits)).replace('.', ',') }), unit ? (0, jsx_runtime_1.jsx)("span", { className: "text-7xl", children: unit }) : null] }), depositeName && isShowDepositeName ? ((0, jsx_runtime_1.jsx)("div", { className: "absolute bottom-2 w-full text-left whitespace-nowrap", children: depositeName })) : null] })] })));
6
+ const toLocalNumberFormat_1 = require("../../utils/toLocalNumberFormat");
7
+ exports.Rate = (0, uni_jsx_1.JSX)(({ rate = 0, title = 'Ставка', unit, fractionDigits = 2, depositeName, isShowDepositeName }) => ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), (0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-start gradient-color-text", children: [(0, jsx_runtime_1.jsx)("span", { className: "font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]", children: (0, toLocalNumberFormat_1.toLocalNumberFormat)(fractionDigits, { fixed: true })(rate) }), unit ? (0, jsx_runtime_1.jsx)("span", { className: "text-7xl", children: unit }) : null] }), depositeName && isShowDepositeName ? ((0, jsx_runtime_1.jsx)("div", { className: "absolute bottom-2 w-full text-left whitespace-nowrap", children: depositeName })) : null] })] })));
7
8
  //# sourceMappingURL=Rate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Rate.js","sourceRoot":"","sources":["../../../src/components/Calculator/Rate.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iDAA8C;AAWjC,QAAA,IAAI,GAAG,IAAA,a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,SAAS,EAAC,0DAA0D,YACvE,IAAA,yCAAmB,EAAC,cAAc,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,GACtD,EACN,IAAI,CAAC,CAAC,CAAC,iCAAM,SAAS,EAAC,UAAU,YAAE,IAAI,GAAQ,CAAC,CAAC,CAAC,IAAI,IACnD,EACL,YAAY,IAAI,kBAAkB,CAAC,CAAC,CAAC,CACpC,gCAAK,SAAS,EAAC,sDAAsD,YAAE,YAAY,GAAO,CAC3F,CAAC,CAAC,CAAC,IAAI,IACJ,IACF,CACP,CACF,CAAC"}
@@ -1,4 +1,3 @@
1
1
  import type { CommonDefaultParams } from './CalculatorContent';
2
2
  export declare const getMoneyDefaultValue: (defaultParams?: CommonDefaultParams, defaultMoney?: number) => number;
3
3
  export declare const getMonthsDefaultValue: (defaultParams?: CommonDefaultParams, defaultMonth?: number) => number;
4
- export declare const getDaysDefaultValue: (defaultParams?: CommonDefaultParams, defaultDays?: number) => number;
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.getDaysDefaultValue = exports.getMonthsDefaultValue = exports.getMoneyDefaultValue = void 0;
2
+ exports.getMonthsDefaultValue = exports.getMoneyDefaultValue = void 0;
3
3
  const constants_1 = require("./constants");
4
4
  const getMoneyDefaultValue = (defaultParams, defaultMoney = 0) => defaultParams?.sum && defaultParams.sum >= constants_1.DEFAULT_MIN_SUM && defaultParams.sum <= constants_1.DEFAULT_MAX_SUM
5
5
  ? defaultParams.sum
@@ -11,10 +11,4 @@ const getMonthsDefaultValue = (defaultParams, defaultMonth = 0) => defaultParams
11
11
  ? defaultParams.period
12
12
  : defaultMonth;
13
13
  exports.getMonthsDefaultValue = getMonthsDefaultValue;
14
- const getDaysDefaultValue = (defaultParams, defaultDays = 0) => defaultParams?.period &&
15
- defaultParams.period >= constants_1.BUSINESS_MIN_DAYS &&
16
- defaultParams.period <= constants_1.BUSINESS_MAX_DAYS
17
- ? defaultParams.period
18
- : defaultDays;
19
- exports.getDaysDefaultValue = getDaysDefaultValue;
20
14
  //# sourceMappingURL=getDefaultValues.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDefaultValues.js","sourceRoot":"","sources":["../../../src/components/Calculator/getDefaultValues.ts"],"names":[],"mappings":";;AACA,2CAOqB;AAEd,MAAM,oBAAoB,GAAG,CAAC,aAAmC,EAAE,YAAY,GAAG,CAAC,EAAE,EAAE,CAC5F,aAAa,EAAE,GAAG,IAAI,aAAa,CAAC,GAAG,IAAI,2BAAe,IAAI,aAAa,CAAC,GAAG,IAAI,2BAAe;IAChG,CAAC,CAAC,aAAa,CAAC,GAAG;IACnB,CAAC,CAAC,YAAY,CAAC;AAHN,QAAA,oBAAoB,wBAGd;AAEZ,MAAM,qBAAqB,GAAG,CAAC,aAAmC,EAAE,YAAY,GAAG,CAAC,EAAE,EAAE,CAC7F,aAAa,EAAE,MAAM;IACrB,aAAa,CAAC,MAAM,IAAI,8BAAkB;IAC1C,aAAa,CAAC,MAAM,IAAI,8BAAkB;IACxC,CAAC,CAAC,aAAa,CAAC,MAAM;IACtB,CAAC,CAAC,YAAY,CAAC;AALN,QAAA,qBAAqB,yBAKf;AAEZ,MAAM,mBAAmB,GAAG,CAAC,aAAmC,EAAE,WAAW,GAAG,CAAC,EAAE,EAAE,CAC1F,aAAa,EAAE,MAAM;IACrB,aAAa,CAAC,MAAM,IAAI,6BAAiB;IACzC,aAAa,CAAC,MAAM,IAAI,6BAAiB;IACvC,CAAC,CAAC,aAAa,CAAC,MAAM;IACtB,CAAC,CAAC,WAAW,CAAC;AALL,QAAA,mBAAmB,uBAKd"}
1
+ {"version":3,"file":"getDefaultValues.js","sourceRoot":"","sources":["../../../src/components/Calculator/getDefaultValues.ts"],"names":[],"mappings":";;AACA,2CAKqB;AAEd,MAAM,oBAAoB,GAAG,CAAC,aAAmC,EAAE,YAAY,GAAG,CAAC,EAAE,EAAE,CAC5F,aAAa,EAAE,GAAG,IAAI,aAAa,CAAC,GAAG,IAAI,2BAAe,IAAI,aAAa,CAAC,GAAG,IAAI,2BAAe;IAChG,CAAC,CAAC,aAAa,CAAC,GAAG;IACnB,CAAC,CAAC,YAAY,CAAC;AAHN,QAAA,oBAAoB,wBAGd;AAEZ,MAAM,qBAAqB,GAAG,CAAC,aAAmC,EAAE,YAAY,GAAG,CAAC,EAAE,EAAE,CAC7F,aAAa,EAAE,MAAM;IACrB,aAAa,CAAC,MAAM,IAAI,8BAAkB;IAC1C,aAAa,CAAC,MAAM,IAAI,8BAAkB;IACxC,CAAC,CAAC,aAAa,CAAC,MAAM;IACtB,CAAC,CAAC,YAAY,CAAC;AALN,QAAA,qBAAqB,yBAKf"}
@@ -4,5 +4,4 @@ export declare const getLimitRangeByKeys: <MinKey extends string, MaxKey extends
4
4
  export declare const getRangeByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>([minKey, maxKey]: [MinKey, MaxKey], rows?: T[]) => {
5
5
  [x: string]: number;
6
6
  };
7
- export declare const getMergeRangesByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>([minKey, maxKey]: [MinKey, MaxKey], rows?: T[]) => number[][];
8
7
  export declare const checkRangeByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>(value: number, [minKey, maxKey]: [MinKey, MaxKey], sourceBookRow: T) => boolean;
@@ -1,7 +1,6 @@
1
1
  Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.checkRangeByKeys = exports.getMergeRangesByKeys = exports.getRangeByKeys = exports.getLimitRangeByKeys = void 0;
2
+ exports.checkRangeByKeys = exports.getRangeByKeys = exports.getLimitRangeByKeys = void 0;
3
3
  const maxBy_1 = require("../../utils/maxBy");
4
- const mergeIntervals_1 = require("../../utils/mergeIntervals");
5
4
  const minBy_1 = require("../../utils/minBy");
6
5
  const getLimitRangeByKeys = ([minKey, maxKey], limitParams, rateRows = []) => limitParams && limitParams[minKey] && limitParams[maxKey]
7
6
  ? {
@@ -19,8 +18,6 @@ const getRangeByKeys = ([minKey, maxKey], rows = []) => ({
19
18
  : 0,
20
19
  });
21
20
  exports.getRangeByKeys = getRangeByKeys;
22
- const getMergeRangesByKeys = ([minKey, maxKey], rows = []) => (0, mergeIntervals_1.mergeIntervals)(rows.map((row) => [row[minKey], row[maxKey]]));
23
- exports.getMergeRangesByKeys = getMergeRangesByKeys;
24
21
  const checkRangeByKeys = (value, [minKey, maxKey], sourceBookRow) => value >= sourceBookRow[minKey] && value <= sourceBookRow[maxKey];
25
22
  exports.checkRangeByKeys = checkRangeByKeys;
26
23
  //# sourceMappingURL=rangeHelpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rangeHelpers.js","sourceRoot":"","sources":["../../../src/components/Calculator/rangeHelpers.ts"],"names":[],"mappings":";;AAAA,6CAAwC;AACxC,+DAA4D;AAC5D,6CAAwC;AAEjC,MAAM,mBAAmB,GAAG,CAKjC,CAAC,MAAM,EAAE,MAAM,CAAmB,EAClC,WAAe,EACf,WAAgB,EAAE,EAClB,EAAE,CACF,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC;IACvD,CAAC,CAAC;QACE,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC;QAC7B,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC;KAC9B;IACH,CAAC,CAAC,IAAA,sBAAc,EAAC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC;AAdpC,QAAA,mBAAmB,uBAciB;AAE1C,MAAM,cAAc,GAAG,CAK5B,CAAC,MAAM,EAAE,MAAM,CAAmB,EAClC,OAAY,EAAE,EACd,EAAE,CAAC,CAAC;IACJ,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM;QACnB,CAAC,CAAC,IAAA,WAAG,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OA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MAAM,CAAC,CAAC;AARlE,QAAA,gBAAgB,oBAQkD"}
@@ -1,13 +1,8 @@
1
1
  /// <reference types="react" />
2
- interface RenderRateProps {
3
- rate: number;
4
- depositeName?: string;
5
- isUnavailableByTerm?: boolean;
6
- isShowDepositeName?: boolean;
7
- fractionDigits?: number;
2
+ import { type RateProps } from './Rate';
3
+ import { type UnknownRateProps } from './UnknownRate';
4
+ interface RenderRateProps extends RateProps, UnknownRateProps {
8
5
  isUnknownRateShown?: boolean;
9
- title?: string;
10
- unit?: string;
11
6
  }
12
- export declare const renderRate: ({ isUnknownRateShown, isUnavailableByTerm, title, unit, rate, ...rest }: RenderRateProps) => JSX.Element;
7
+ export declare const renderRate: ({ title, rate, unit, fractionDigits, isUnknownRateShown, ...rest }: RenderRateProps) => JSX.Element;
13
8
  export {};
@@ -4,13 +4,6 @@ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
4
  const CalculatorValueBlock_1 = require("./CalculatorValueBlock");
5
5
  const Rate_1 = require("./Rate");
6
6
  const UnknownRate_1 = require("./UnknownRate");
7
- const renderDesktopRate = ({ rate, depositeName, fractionDigits, isShowDepositeName, title, unit, }) => ((0, jsx_runtime_1.jsx)(Rate_1.Rate, { rate: rate, depositeName: depositeName, fractionDigits: fractionDigits, isShowDepositeName: isShowDepositeName, unit: unit, title: title }));
8
- const renderMobileRate = ({ rate, title, unit }) => ((0, jsx_runtime_1.jsx)(CalculatorValueBlock_1.CalculatorValueBlock, { title: title, value: rate, postfix: unit }));
9
- const renderRate = ({ isUnknownRateShown = true, isUnavailableByTerm = false, title = 'Ставка', unit = '%', rate = 0, ...rest }) => {
10
- if (isUnknownRateShown && rate === 0) {
11
- return (0, jsx_runtime_1.jsx)(UnknownRate_1.UnknownRate, { isUnavailableByTerm: isUnavailableByTerm, title: title });
12
- }
13
- return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "hidden @xl:block", children: renderDesktopRate({ title, unit, rate, ...rest }) }), (0, jsx_runtime_1.jsx)("div", { className: "@xl:hidden", children: renderMobileRate({ title, unit, rate, ...rest }) })] }));
14
- };
7
+ const renderRate = ({ title = 'Ставка', rate = 0, unit = '%', fractionDigits = 2, isUnknownRateShown = true, ...rest }) => isUnknownRateShown && rate === 0 ? ((0, jsx_runtime_1.jsx)(UnknownRate_1.UnknownRate, { title: title, ...rest })) : ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "hidden @xl:block", children: (0, jsx_runtime_1.jsx)(Rate_1.Rate, { title: title, rate: rate, unit: unit, fractionDigits: fractionDigits, ...rest }) }), (0, jsx_runtime_1.jsx)("div", { className: "@xl:hidden", children: (0, jsx_runtime_1.jsx)(CalculatorValueBlock_1.CalculatorValueBlock, { title: title, value: rate, postfix: unit, fractionDigits: fractionDigits, fixed: true, ...rest }) })] }));
15
8
  exports.renderRate = renderRate;
16
9
  //# sourceMappingURL=renderRate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderRate.js","sourceRoot":"","sources":["../../../src/components/Calculator/renderRate.tsx"],"names":[],"mappings":";;;AAAA,iEAA8D;AAC9D,iCAA8B;AAC9B,+CAA4C;AAa5C,MAAM,iBAAiB,GAAG,CAAC,EACzB,IAAI,EACJ,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,KAAK,EACL,IAAI,GACY,EAAE,EAAE,CAAC,CACrB,uBAAC,WAAI,IACH,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,kBAAkB,EAAE,kBAAkB,EACtC,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,GACZ,CACH,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAmB,EAAE,EAAE,CAAC,CACnE,uBAAC,2CAAoB,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO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EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,cAAc,KAAM,IAAI,GAAI,GACpF,EACN,gCAAK,SAAS,EAAC,YAAY,YACzB,uBAAC,2CAAoB,IACnB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,IAAI,EACX,OAAO,EAAE,IAAI,EACb,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,IAAI,KACP,IAAI,GACR,GACE,IACF,CACP,CAAC;AA1BS,QAAA,UAAU,cA0BnB"}
@@ -1 +1,3 @@
1
- export declare const toLocalNumberFormat: (fractionDigits?: number) => (_?: string | number | undefined) => string;
1
+ export declare const toLocalNumberFormat: (fractionDigits?: number, { fixed }?: {
2
+ fixed?: boolean | undefined;
3
+ }) => (_?: string | number | undefined) => string;
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, "__esModule", { value: true });
2
2
  exports.toLocalNumberFormat = void 0;
3
- const toLocalNumberFormat = (fractionDigits = 0) => (_ = 0) => new Intl.NumberFormat('ru-RU', {
4
- minimumFractionDigits: 0,
3
+ const toLocalNumberFormat = (fractionDigits = 0, { fixed } = {}) => (_ = 0) => new Intl.NumberFormat('ru-RU', {
4
+ minimumFractionDigits: fixed ? fractionDigits : 0,
5
5
  maximumFractionDigits: fractionDigits,
6
6
  }).format(Number(_) || 0);
7
7
  exports.toLocalNumberFormat = toLocalNumberFormat;
@@ -1 +1 @@
1
- {"version":3,"file":"toLocalNumberFormat.js","sourceRoot":"","sources":["../../src/utils/toLocalNumberFormat.ts"],"names":[],"mappings":";;AAAO,MAAM,mBAAmB,GAC9B,CAAC,cAAc,GAAG,CAAC,EAAE,EAAE,CACvB,CAAC,IAAiC,CAAC,EAAU,EAAE,CAC7C,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;IAC7B,qBAAqB,EAAE,CAAC;IACxB,qBAAqB,EAAE,cAAc;CACtC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AANjB,QAAA,mBAAmB,uBAMF"}
1
+ {"version":3,"file":"toLocalNumberFormat.js","sourceRoot":"","sources":["../../src/utils/toLocalNumberFormat.ts"],"names":[],"mappings":";;AAAO,MAAM,mBAAmB,GAC9B,CAAC,cAAc,GAAG,CAAC,EAAE,EAAE,KAAK,KAA0B,EAAE,EAAE,EAAE,CAC5D,CAAC,IAAiC,CAAC,EAAU,EAAE,CAC7C,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;IAC7B,qBAAqB,EAAE,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IACjD,qBAAqB,EAAE,cAAc;CACtC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AANjB,QAAA,mBAAmB,uBAMF"}
@@ -1,8 +1,10 @@
1
1
  export interface CalculatorValueBlockProps {
2
+ className?: string;
2
3
  title?: string;
3
4
  value?: number;
4
- postfix?: string;
5
+ fractionDigits?: number;
6
+ fixed?: boolean;
5
7
  prefix?: string;
6
- className?: string;
8
+ postfix?: string;
7
9
  }
8
10
  export declare const CalculatorValueBlock: import("@redneckz/uni-jsx").UNIComponent<CalculatorValueBlockProps, any, any>;
@@ -4,5 +4,7 @@ import { Text } from '../../ui-kit/Text/Text.js';
4
4
  import { style } from '../../utils/style.js';
5
5
  import { toLocalNumberFormat } from '../../utils/toLocalNumberFormat.js';
6
6
  const calculatorValueBlockStyle = 'flex justify-between @xl:flex-col';
7
- export 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: "-" }) }))] })));
7
+ export 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]
8
+ .filter(Boolean)
9
+ .join(' ') }) })) : (_jsx("div", { children: _jsx(Text, { size: "text-h3", children: "-" }) }))] })));
8
10
  //# sourceMappingURL=CalculatorValueBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CalculatorValueBlock.js","sourceRoot":"","sources":["../../../src/components/Calculator/CalculatorValueBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,MAAM,yBAAyB,GAAG,mCAAmC,CAAC;AAUtE,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CACrC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,EAAE,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAC1D,eAAK,SAAS,EAAE,KAAK,CAAC,yBAAyB,EAAE,SAAS,CAAC,aACxD,KAAK,CAAC,CAAC,CAAC,CACP,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,qBAAqB,YAC9D,KAAK,GACD,CACR,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,CAAC,CAAC,CACP,wBACE,MAAC,IAAI,IAAC,IAAI,EAAC,SAAS,aACjB,MAAM,OAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,OAAG,OAAO,IACxD,GACH,CACP,CAAC,CAAC,CAAC,CACF,wBACE,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,kBAAS,GACzB,CACP,IACG,CACP,CACF,CAAC"}
1
+ {"version":3,"file":"CalculatorValueBlock.js","sourceRoot":"","sources":["../../../src/components/Calculator/CalculatorValueBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,MAAM,yBAAyB,GAAG,mCAAmC,CAAC;AAYtE,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CACrC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CACvE,eAAK,SAAS,EAAE,KAAK,CAAC,yBAAyB,EAAE,SAAS,CAAC,aACxD,KAAK,CAAC,CAAC,CAAC,CACP,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,qBAAqB,YAC9D,KAAK,GACD,CACR,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,CAAC,CAAC,CACP,wBACE,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,YACjB,CAAC,MAAM,EAAE,mBAAmB,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;qBACtE,MAAM,CAAC,OAAO,CAAC;qBACf,IAAI,CAAC,GAAG,CAAC,GACP,GACH,CACP,CAAC,CAAC,CAAC,CACF,wBACE,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,kBAAS,GACzB,CACP,IACG,CACP,CACF,CAAC"}
@@ -1,9 +1,9 @@
1
1
  export interface RateProps {
2
- rate: number;
2
+ rate: number | undefined;
3
3
  title?: string;
4
4
  unit?: string;
5
+ fractionDigits?: number;
5
6
  depositeName?: string;
6
7
  isShowDepositeName?: boolean;
7
- fractionDigits?: number;
8
8
  }
9
9
  export declare const Rate: import("@redneckz/uni-jsx").UNIComponent<RateProps, any, any>;
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
3
  import { Text } from '../../ui-kit/Text/Text.js';
4
- export 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] })] })));
4
+ import { toLocalNumberFormat } from '../../utils/toLocalNumberFormat.js';
5
+ export 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] })] })));
5
6
  //# sourceMappingURL=Rate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Rate.js","sourceRoot":"","sources":["../../../src/components/Calculator/Rate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAW9C,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CACrB,CAAC,EAAE,IAAI,EAAE,KAAK,GAAG,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,kBAAkB,EAAE,cAAc,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAC1F,0BACE,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,qBAAqB,YAC9D,KAAK,GACD,EACP,eAAK,SAAS,EAAC,UAAU,aACvB,eAAK,SAAS,EAAC,wCAAwC,aACrD,eAAM,SAAS,EAAC,0DAA0D,YACvE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,GAClD,EACN,IAAI,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,UAAU,YAAE,IAAI,GAAQ,CAAC,CAAC,CAAC,IAAI,IACnD,EACL,YAAY,IAAI,kBAAkB,CAAC,CAAC,CAAC,CACpC,cAAK,SAAS,EAAC,sDAAsD,YAAE,YAAY,GAAO,CAC3F,CAAC,CAAC,CAAC,IAAI,IACJ,IACF,CACP,CACF,CAAC"}
1
+ {"version":3,"file":"Rate.js","sourceRoot":"","sources":["../../../src/components/Calculator/Rate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAWtE,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CACrB,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,KAAK,GAAG,QAAQ,EAAE,IAAI,EAAE,cAAc,GAAG,CAAC,EAAE,YAAY,EAAE,kBAAkB,EAAE,EAAE,EAAE,CAAC,CAC9F,0BACE,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,qBAAqB,YAC9D,KAAK,GACD,EACP,eAAK,SAAS,EAAC,UAAU,aACvB,eAAK,SAAS,EAAC,wCAAwC,aACrD,eAAM,SAAS,EAAC,0DAA0D,YACvE,mBAAmB,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,GACtD,EACN,IAAI,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,UAAU,YAAE,IAAI,GAAQ,CAAC,CAAC,CAAC,IAAI,IACnD,EACL,YAAY,IAAI,kBAAkB,CAAC,CAAC,CAAC,CACpC,cAAK,SAAS,EAAC,sDAAsD,YAAE,YAAY,GAAO,CAC3F,CAAC,CAAC,CAAC,IAAI,IACJ,IACF,CACP,CACF,CAAC"}
@@ -1,4 +1,3 @@
1
1
  import type { CommonDefaultParams } from './CalculatorContent';
2
2
  export declare const getMoneyDefaultValue: (defaultParams?: CommonDefaultParams, defaultMoney?: number) => number;
3
3
  export declare const getMonthsDefaultValue: (defaultParams?: CommonDefaultParams, defaultMonth?: number) => number;
4
- export declare const getDaysDefaultValue: (defaultParams?: CommonDefaultParams, defaultDays?: number) => number;
@@ -1,4 +1,4 @@
1
- import { BUSINESS_MAX_DAYS, BUSINESS_MIN_DAYS, DEFAULT_MAX_MONTHS, DEFAULT_MAX_SUM, DEFAULT_MIN_MONTHS, DEFAULT_MIN_SUM, } from './constants.js';
1
+ import { DEFAULT_MAX_MONTHS, DEFAULT_MAX_SUM, DEFAULT_MIN_MONTHS, DEFAULT_MIN_SUM, } from './constants.js';
2
2
  export const getMoneyDefaultValue = (defaultParams, defaultMoney = 0) => defaultParams?.sum && defaultParams.sum >= DEFAULT_MIN_SUM && defaultParams.sum <= DEFAULT_MAX_SUM
3
3
  ? defaultParams.sum
4
4
  : defaultMoney;
@@ -7,9 +7,4 @@ export const getMonthsDefaultValue = (defaultParams, defaultMonth = 0) => defaul
7
7
  defaultParams.period <= DEFAULT_MAX_MONTHS
8
8
  ? defaultParams.period
9
9
  : defaultMonth;
10
- export const getDaysDefaultValue = (defaultParams, defaultDays = 0) => defaultParams?.period &&
11
- defaultParams.period >= BUSINESS_MIN_DAYS &&
12
- defaultParams.period <= BUSINESS_MAX_DAYS
13
- ? defaultParams.period
14
- : defaultDays;
15
10
  //# sourceMappingURL=getDefaultValues.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDefaultValues.js","sourceRoot":"","sources":["../../../src/components/Calculator/getDefaultValues.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,eAAe,GAChB,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,aAAmC,EAAE,YAAY,GAAG,CAAC,EAAE,EAAE,CAC5F,aAAa,EAAE,GAAG,IAAI,aAAa,CAAC,GAAG,IAAI,eAAe,IAAI,aAAa,CAAC,GAAG,IAAI,eAAe;IAChG,CAAC,CAAC,aAAa,CAAC,GAAG;IACnB,CAAC,CAAC,YAAY,CAAC;AAEnB,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,aAAmC,EAAE,YAAY,GAAG,CAAC,EAAE,EAAE,CAC7F,aAAa,EAAE,MAAM;IACrB,aAAa,CAAC,MAAM,IAAI,kBAAkB;IAC1C,aAAa,CAAC,MAAM,IAAI,kBAAkB;IACxC,CAAC,CAAC,aAAa,CAAC,MAAM;IACtB,CAAC,CAAC,YAAY,CAAC;AAEnB,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,aAAmC,EAAE,WAAW,GAAG,CAAC,EAAE,EAAE,CAC1F,aAAa,EAAE,MAAM;IACrB,aAAa,CAAC,MAAM,IAAI,iBAAiB;IACzC,aAAa,CAAC,MAAM,IAAI,iBAAiB;IACvC,CAAC,CAAC,aAAa,CAAC,MAAM;IACtB,CAAC,CAAC,WAAW,CAAC"}
1
+ {"version":3,"file":"getDefaultValues.js","sourceRoot":"","sources":["../../../src/components/Calculator/getDefaultValues.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,eAAe,GAChB,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,aAAmC,EAAE,YAAY,GAAG,CAAC,EAAE,EAAE,CAC5F,aAAa,EAAE,GAAG,IAAI,aAAa,CAAC,GAAG,IAAI,eAAe,IAAI,aAAa,CAAC,GAAG,IAAI,eAAe;IAChG,CAAC,CAAC,aAAa,CAAC,GAAG;IACnB,CAAC,CAAC,YAAY,CAAC;AAEnB,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,aAAmC,EAAE,YAAY,GAAG,CAAC,EAAE,EAAE,CAC7F,aAAa,EAAE,MAAM;IACrB,aAAa,CAAC,MAAM,IAAI,kBAAkB;IAC1C,aAAa,CAAC,MAAM,IAAI,kBAAkB;IACxC,CAAC,CAAC,aAAa,CAAC,MAAM;IACtB,CAAC,CAAC,YAAY,CAAC"}
@@ -4,5 +4,4 @@ export declare const getLimitRangeByKeys: <MinKey extends string, MaxKey extends
4
4
  export declare const getRangeByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>([minKey, maxKey]: [MinKey, MaxKey], rows?: T[]) => {
5
5
  [x: string]: number;
6
6
  };
7
- export declare const getMergeRangesByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>([minKey, maxKey]: [MinKey, MaxKey], rows?: T[]) => number[][];
8
7
  export declare const checkRangeByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>(value: number, [minKey, maxKey]: [MinKey, MaxKey], sourceBookRow: T) => boolean;
@@ -1,5 +1,4 @@
1
1
  import { max } from '../../utils/maxBy.js';
2
- import { mergeIntervals } from '../../utils/mergeIntervals.js';
3
2
  import { min } from '../../utils/minBy.js';
4
3
  export const getLimitRangeByKeys = ([minKey, maxKey], limitParams, rateRows = []) => limitParams && limitParams[minKey] && limitParams[maxKey]
5
4
  ? {
@@ -15,6 +14,5 @@ export const getRangeByKeys = ([minKey, maxKey], rows = []) => ({
15
14
  ? max(rows.filter((row) => typeof row[minKey] === 'number').map((row) => row[maxKey]))
16
15
  : 0,
17
16
  });
18
- export const getMergeRangesByKeys = ([minKey, maxKey], rows = []) => mergeIntervals(rows.map((row) => [row[minKey], row[maxKey]]));
19
17
  export const checkRangeByKeys = (value, [minKey, maxKey], sourceBookRow) => value >= sourceBookRow[minKey] && value <= sourceBookRow[maxKey];
20
18
  //# sourceMappingURL=rangeHelpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rangeHelpers.js","sourceRoot":"","sources":["../../../src/components/Calculator/rangeHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAKjC,CAAC,MAAM,EAAE,MAAM,CAAmB,EAClC,WAAe,EACf,WAAgB,EAAE,EAClB,EAAE,CACF,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC;IACvD,CAAC,CAAC;QACE,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC;QAC7B,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,CAAC,MAAM,CAAC,KAAK,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;QACtF,CAAC,CAAC,CAAC;CACN,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAK9B,KAAa,EACb,CAAC,MAAM,EAAE,MAAM,CAAmB,EAClC,aAAgB,EACP,EAAE,CAAC,KAAK,IAAI,aAAa,CAAC,MAAM,CAAC,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC"}
@@ -1,12 +1,7 @@
1
- interface RenderRateProps {
2
- rate: number;
3
- depositeName?: string;
4
- isUnavailableByTerm?: boolean;
5
- isShowDepositeName?: boolean;
6
- fractionDigits?: number;
1
+ import { type RateProps } from './Rate';
2
+ import { type UnknownRateProps } from './UnknownRate';
3
+ interface RenderRateProps extends RateProps, UnknownRateProps {
7
4
  isUnknownRateShown?: boolean;
8
- title?: string;
9
- unit?: string;
10
5
  }
11
- export declare const renderRate: ({ isUnknownRateShown, isUnavailableByTerm, title, unit, rate, ...rest }: RenderRateProps) => JSX.Element;
6
+ export declare const renderRate: ({ title, rate, unit, fractionDigits, isUnknownRateShown, ...rest }: RenderRateProps) => JSX.Element;
12
7
  export {};
@@ -2,12 +2,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { CalculatorValueBlock } from './CalculatorValueBlock.js';
3
3
  import { Rate } from './Rate.js';
4
4
  import { UnknownRate } from './UnknownRate.js';
5
- const renderDesktopRate = ({ rate, depositeName, fractionDigits, isShowDepositeName, title, unit, }) => (_jsx(Rate, { rate: rate, depositeName: depositeName, fractionDigits: fractionDigits, isShowDepositeName: isShowDepositeName, unit: unit, title: title }));
6
- const renderMobileRate = ({ rate, title, unit }) => (_jsx(CalculatorValueBlock, { title: title, value: rate, postfix: unit }));
7
- export const renderRate = ({ isUnknownRateShown = true, isUnavailableByTerm = false, title = 'Ставка', unit = '%', rate = 0, ...rest }) => {
8
- if (isUnknownRateShown && rate === 0) {
9
- return _jsx(UnknownRate, { isUnavailableByTerm: isUnavailableByTerm, title: title });
10
- }
11
- 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 }) })] }));
12
- };
5
+ export 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 }) })] }));
13
6
  //# sourceMappingURL=renderRate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderRate.js","sourceRoot":"","sources":["../../../src/components/Calculator/renderRate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAa5C,MAAM,iBAAiB,GAAG,CAAC,EACzB,IAAI,EACJ,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,KAAK,EACL,IAAI,GACY,EAAE,EAAE,CAAC,CACrB,KAAC,IAAI,IACH,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,kBAAkB,EAAE,kBAAkB,EACtC,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,GACZ,CACH,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,EAAE,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I,EACS,EAAE,EAAE,CACpB,kBAAkB,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CACjC,KAAC,WAAW,IAAC,KAAK,EAAE,KAAK,KAAM,IAAI,GAAI,CACxC,CAAC,CAAC,CAAC,CACF,0BACE,cAAK,SAAS,EAAC,kBAAkB,YAC/B,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,cAAc,KAAM,IAAI,GAAI,GACpF,EACN,cAAK,SAAS,EAAC,YAAY,YACzB,KAAC,oBAAoB,IACnB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,IAAI,EACX,OAAO,EAAE,IAAI,EACb,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,IAAI,KACP,IAAI,GACR,GACE,IACF,CACP,CAAC"}
@@ -1 +1,3 @@
1
- export declare const toLocalNumberFormat: (fractionDigits?: number) => (_?: string | number | undefined) => string;
1
+ export declare const toLocalNumberFormat: (fractionDigits?: number, { fixed }?: {
2
+ fixed?: boolean | undefined;
3
+ }) => (_?: string | number | undefined) => string;
@@ -1,5 +1,5 @@
1
- export const toLocalNumberFormat = (fractionDigits = 0) => (_ = 0) => new Intl.NumberFormat('ru-RU', {
2
- minimumFractionDigits: 0,
1
+ export const toLocalNumberFormat = (fractionDigits = 0, { fixed } = {}) => (_ = 0) => new Intl.NumberFormat('ru-RU', {
2
+ minimumFractionDigits: fixed ? fractionDigits : 0,
3
3
  maximumFractionDigits: fractionDigits,
4
4
  }).format(Number(_) || 0);
5
5
  //# sourceMappingURL=toLocalNumberFormat.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toLocalNumberFormat.js","sourceRoot":"","sources":["../../src/utils/toLocalNumberFormat.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAC9B,CAAC,cAAc,GAAG,CAAC,EAAE,EAAE,CACvB,CAAC,IAAiC,CAAC,EAAU,EAAE,CAC7C,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;IAC7B,qBAAqB,EAAE,CAAC;IACxB,qBAAqB,EAAE,cAAc;CACtC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"toLocalNumberFormat.js","sourceRoot":"","sources":["../../src/utils/toLocalNumberFormat.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAC9B,CAAC,cAAc,GAAG,CAAC,EAAE,EAAE,KAAK,KAA0B,EAAE,EAAE,EAAE,CAC5D,CAAC,IAAiC,CAAC,EAAU,EAAE,CAC7C,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;IAC7B,qBAAqB,EAAE,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IACjD,qBAAqB,EAAE,cAAc;CACtC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC"}
@@ -735,8 +735,8 @@
735
735
  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;
736
736
  });
737
737
 
738
- const toLocalNumberFormat = (fractionDigits = 0) => (_ = 0) => new Intl.NumberFormat('ru-RU', {
739
- minimumFractionDigits: 0,
738
+ const toLocalNumberFormat = (fractionDigits = 0, { fixed } = {}) => (_ = 0) => new Intl.NumberFormat('ru-RU', {
739
+ minimumFractionDigits: fixed ? fractionDigits : 0,
740
740
  maximumFractionDigits: fractionDigits,
741
741
  }).format(Number(_) || 0);
742
742
 
@@ -2054,7 +2054,9 @@
2054
2054
  });
2055
2055
 
2056
2056
  const calculatorValueBlockStyle = 'flex justify-between @xl:flex-col';
2057
- 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: "-" }) }))] })));
2057
+ 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]
2058
+ .filter(Boolean)
2059
+ .join(' ') }) })) : (jsx("div", { children: jsx(Text, { size: "text-h3", children: "-" }) }))] })));
2058
2060
 
2059
2061
  const DEFAULT_MIN_SUM$1 = 10000;
2060
2062
  const DEFAULT_MAX_SUM$1 = 5000000;
@@ -2148,18 +2150,11 @@
2148
2150
 
2149
2151
  const renderFootnote = (text) => text ? (jsx(Paragraph, { size: "text-s", font: "font-light", color: "text-secondary-text", children: text })) : null;
2150
2152
 
2151
- 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] })] })));
2153
+ 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] })] })));
2152
2154
 
2153
2155
  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" })) })] })));
2154
2156
 
2155
- const renderDesktopRate = ({ rate, depositeName, fractionDigits, isShowDepositeName, title, unit, }) => (jsx(Rate, { rate: rate, depositeName: depositeName, fractionDigits: fractionDigits, isShowDepositeName: isShowDepositeName, unit: unit, title: title }));
2156
- const renderMobileRate = ({ rate, title, unit }) => (jsx(CalculatorValueBlock, { title: title, value: rate, postfix: unit }));
2157
- const renderRate = ({ isUnknownRateShown = true, isUnavailableByTerm = false, title = 'Ставка', unit = '%', rate = 0, ...rest }) => {
2158
- if (isUnknownRateShown && rate === 0) {
2159
- return jsx(UnknownRate, { isUnavailableByTerm: isUnavailableByTerm, title: title });
2160
- }
2161
- 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 }) })] }));
2162
- };
2157
+ 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 }) })] }));
2163
2158
 
2164
2159
  const DEFAULT_MONEY_STEP = 1000;
2165
2160
  function renderWantedSumInput({ isShowItems = true, step = DEFAULT_MONEY_STEP, ...rest }) {
@@ -2260,23 +2255,6 @@
2260
2255
  ],
2261
2256
  });
2262
2257
 
2263
- const mergeIntervals = (intervals) => {
2264
- const result = [...intervals];
2265
- result.sort(([a], [c]) => a - c);
2266
- let i = 1;
2267
- while (i < result.length) {
2268
- const [a, b] = result[i - 1];
2269
- const [c, d] = result[i];
2270
- if (b >= c) {
2271
- result.splice(i - 1, 2, [a, Math.max(b, d)]);
2272
- }
2273
- else {
2274
- i++;
2275
- }
2276
- }
2277
- return result;
2278
- };
2279
-
2280
2258
  const getLimitRangeByKeys = ([minKey, maxKey], limitParams, rateRows = []) => limitParams && limitParams[minKey] && limitParams[maxKey]
2281
2259
  ? {
2282
2260
  [minKey]: limitParams[minKey],
@@ -2534,6 +2512,23 @@
2534
2512
 
2535
2513
  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);
2536
2514
 
2515
+ const mergeIntervals = (intervals) => {
2516
+ const result = [...intervals];
2517
+ result.sort(([a], [c]) => a - c);
2518
+ let i = 1;
2519
+ while (i < result.length) {
2520
+ const [a, b] = result[i - 1];
2521
+ const [c, d] = result[i];
2522
+ if (b >= c) {
2523
+ result.splice(i - 1, 2, [a, Math.max(b, d)]);
2524
+ }
2525
+ else {
2526
+ i++;
2527
+ }
2528
+ }
2529
+ return result;
2530
+ };
2531
+
2537
2532
  const useDepositCalculatorParams = (userInputParams, sourceBookDir, paramsViewSettings) => {
2538
2533
  const { moneyValue, monthsValue } = userInputParams;
2539
2534
  const data = useCalculatorParams(sourceBookDir || DEPOSIT_CALC_DEFAULT_DIR);
@@ -5410,7 +5405,7 @@
5410
5405
 
5411
5406
  const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
5412
5407
 
5413
- const packageVersion = "0.14.93";
5408
+ const packageVersion = "0.14.94";
5414
5409
 
5415
5410
  exports.Blocks = Blocks;
5416
5411
  exports.ContentPage = ContentPage;