@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.
- package/bundle/bundle.umd.js +25 -30
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Calculator/CalculatorValueBlock.d.ts +4 -2
- package/bundle/components/Calculator/Rate.d.ts +2 -2
- package/bundle/components/Calculator/getDefaultValues.d.ts +0 -1
- package/bundle/components/Calculator/rangeHelpers.d.ts +0 -1
- package/bundle/components/Calculator/renderRate.d.ts +4 -9
- package/bundle/utils/toLocalNumberFormat.d.ts +3 -1
- package/dist/components/Calculator/CalculatorValueBlock.d.ts +4 -2
- package/dist/components/Calculator/CalculatorValueBlock.js +3 -1
- package/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/dist/components/Calculator/Rate.d.ts +2 -2
- package/dist/components/Calculator/Rate.js +2 -1
- package/dist/components/Calculator/Rate.js.map +1 -1
- package/dist/components/Calculator/getDefaultValues.d.ts +0 -1
- package/dist/components/Calculator/getDefaultValues.js +1 -7
- package/dist/components/Calculator/getDefaultValues.js.map +1 -1
- package/dist/components/Calculator/rangeHelpers.d.ts +0 -1
- package/dist/components/Calculator/rangeHelpers.js +1 -4
- package/dist/components/Calculator/rangeHelpers.js.map +1 -1
- package/dist/components/Calculator/renderRate.d.ts +4 -9
- package/dist/components/Calculator/renderRate.js +1 -8
- package/dist/components/Calculator/renderRate.js.map +1 -1
- package/dist/utils/toLocalNumberFormat.d.ts +3 -1
- package/dist/utils/toLocalNumberFormat.js +2 -2
- package/dist/utils/toLocalNumberFormat.js.map +1 -1
- package/lib/components/Calculator/CalculatorValueBlock.d.ts +4 -2
- package/lib/components/Calculator/CalculatorValueBlock.js +3 -1
- package/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/lib/components/Calculator/Rate.d.ts +2 -2
- package/lib/components/Calculator/Rate.js +2 -1
- package/lib/components/Calculator/Rate.js.map +1 -1
- package/lib/components/Calculator/getDefaultValues.d.ts +0 -1
- package/lib/components/Calculator/getDefaultValues.js +1 -6
- package/lib/components/Calculator/getDefaultValues.js.map +1 -1
- package/lib/components/Calculator/rangeHelpers.d.ts +0 -1
- package/lib/components/Calculator/rangeHelpers.js +0 -2
- package/lib/components/Calculator/rangeHelpers.js.map +1 -1
- package/lib/components/Calculator/renderRate.d.ts +4 -9
- package/lib/components/Calculator/renderRate.js +1 -8
- package/lib/components/Calculator/renderRate.js.map +1 -1
- package/lib/utils/toLocalNumberFormat.d.ts +3 -1
- package/lib/utils/toLocalNumberFormat.js +2 -2
- package/lib/utils/toLocalNumberFormat.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +25 -30
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Calculator/CalculatorValueBlock.d.ts +4 -2
- package/mobile/bundle/components/Calculator/Rate.d.ts +2 -2
- package/mobile/bundle/components/Calculator/getDefaultValues.d.ts +0 -1
- package/mobile/bundle/components/Calculator/rangeHelpers.d.ts +0 -1
- package/mobile/bundle/components/Calculator/renderRate.d.ts +4 -9
- package/mobile/bundle/utils/toLocalNumberFormat.d.ts +3 -1
- package/mobile/dist/components/Calculator/CalculatorValueBlock.d.ts +4 -2
- package/mobile/dist/components/Calculator/CalculatorValueBlock.js +3 -1
- package/mobile/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/Rate.d.ts +2 -2
- package/mobile/dist/components/Calculator/Rate.js +2 -1
- package/mobile/dist/components/Calculator/Rate.js.map +1 -1
- package/mobile/dist/components/Calculator/getDefaultValues.d.ts +0 -1
- package/mobile/dist/components/Calculator/getDefaultValues.js +1 -7
- package/mobile/dist/components/Calculator/getDefaultValues.js.map +1 -1
- package/mobile/dist/components/Calculator/rangeHelpers.d.ts +0 -1
- package/mobile/dist/components/Calculator/rangeHelpers.js +1 -4
- package/mobile/dist/components/Calculator/rangeHelpers.js.map +1 -1
- package/mobile/dist/components/Calculator/renderRate.d.ts +4 -9
- package/mobile/dist/components/Calculator/renderRate.js +1 -8
- package/mobile/dist/components/Calculator/renderRate.js.map +1 -1
- package/mobile/dist/utils/toLocalNumberFormat.d.ts +3 -1
- package/mobile/dist/utils/toLocalNumberFormat.js +2 -2
- package/mobile/dist/utils/toLocalNumberFormat.js.map +1 -1
- package/mobile/lib/components/Calculator/CalculatorValueBlock.d.ts +4 -2
- package/mobile/lib/components/Calculator/CalculatorValueBlock.js +3 -1
- package/mobile/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/Rate.d.ts +2 -2
- package/mobile/lib/components/Calculator/Rate.js +2 -1
- package/mobile/lib/components/Calculator/Rate.js.map +1 -1
- package/mobile/lib/components/Calculator/getDefaultValues.d.ts +0 -1
- package/mobile/lib/components/Calculator/getDefaultValues.js +1 -6
- package/mobile/lib/components/Calculator/getDefaultValues.js.map +1 -1
- package/mobile/lib/components/Calculator/rangeHelpers.d.ts +0 -1
- package/mobile/lib/components/Calculator/rangeHelpers.js +0 -2
- package/mobile/lib/components/Calculator/rangeHelpers.js.map +1 -1
- package/mobile/lib/components/Calculator/renderRate.d.ts +4 -9
- package/mobile/lib/components/Calculator/renderRate.js +1 -8
- package/mobile/lib/components/Calculator/renderRate.js.map +1 -1
- package/mobile/lib/utils/toLocalNumberFormat.d.ts +3 -1
- package/mobile/lib/utils/toLocalNumberFormat.js +2 -2
- package/mobile/lib/utils/toLocalNumberFormat.js.map +1 -1
- package/mobile/src/components/Calculator/CalculatorValueBlock.tsx +8 -4
- package/mobile/src/components/Calculator/Rate.tsx +5 -4
- package/mobile/src/components/Calculator/getDefaultValues.ts +0 -9
- package/mobile/src/components/Calculator/rangeHelpers.ts +0 -10
- package/mobile/src/components/Calculator/renderRate.tsx +23 -44
- package/mobile/src/utils/toLocalNumberFormat.ts +2 -2
- package/package.json +1 -1
- package/src/components/Calculator/CalculatorValueBlock.tsx +8 -4
- package/src/components/Calculator/Rate.tsx +5 -4
- package/src/components/Calculator/getDefaultValues.ts +0 -9
- package/src/components/Calculator/rangeHelpers.ts +0 -10
- package/src/components/Calculator/renderRate.tsx +23 -44
- package/src/utils/toLocalNumberFormat.ts +2 -2
- package/bundle/components/Calculator/getCreditRate.d.ts +0 -7
- package/bundle/components/Calculator/getDefaultMonths.d.ts +0 -1
- package/bundle/components/Calculator/renderInitialFeeInput.d.ts +0 -6
- package/bundle/components/Calculator/renderRealEstateValue.d.ts +0 -6
- package/dist/components/Calculator/getCreditRate.d.ts +0 -7
- package/dist/components/Calculator/getCreditRate.js +0 -14
- package/dist/components/Calculator/getCreditRate.js.map +0 -1
- package/dist/components/Calculator/getDefaultMonths.d.ts +0 -1
- package/dist/components/Calculator/getDefaultMonths.js +0 -5
- package/dist/components/Calculator/getDefaultMonths.js.map +0 -1
- package/dist/components/Calculator/renderInitialFeeInput.d.ts +0 -6
- package/dist/components/Calculator/renderInitialFeeInput.js +0 -19
- package/dist/components/Calculator/renderInitialFeeInput.js.map +0 -1
- package/dist/components/Calculator/renderRealEstateValue.d.ts +0 -6
- package/dist/components/Calculator/renderRealEstateValue.js +0 -16
- package/dist/components/Calculator/renderRealEstateValue.js.map +0 -1
- package/lib/components/Calculator/getCreditRate.d.ts +0 -7
- package/lib/components/Calculator/getCreditRate.js +0 -11
- package/lib/components/Calculator/getCreditRate.js.map +0 -1
- package/lib/components/Calculator/getDefaultMonths.d.ts +0 -1
- package/lib/components/Calculator/getDefaultMonths.js +0 -2
- package/lib/components/Calculator/getDefaultMonths.js.map +0 -1
- package/lib/components/Calculator/renderInitialFeeInput.d.ts +0 -6
- package/lib/components/Calculator/renderInitialFeeInput.js +0 -16
- package/lib/components/Calculator/renderInitialFeeInput.js.map +0 -1
- package/lib/components/Calculator/renderRealEstateValue.d.ts +0 -6
- package/lib/components/Calculator/renderRealEstateValue.js +0 -13
- package/lib/components/Calculator/renderRealEstateValue.js.map +0 -1
- package/mobile/bundle/components/Calculator/getCreditRate.d.ts +0 -7
- package/mobile/bundle/components/Calculator/getDefaultMonths.d.ts +0 -1
- package/mobile/bundle/components/Calculator/renderInitialFeeInput.d.ts +0 -6
- package/mobile/bundle/components/Calculator/renderRealEstateValue.d.ts +0 -6
- package/mobile/dist/components/Calculator/getCreditRate.d.ts +0 -7
- package/mobile/dist/components/Calculator/getCreditRate.js +0 -14
- package/mobile/dist/components/Calculator/getCreditRate.js.map +0 -1
- package/mobile/dist/components/Calculator/getDefaultMonths.d.ts +0 -1
- package/mobile/dist/components/Calculator/getDefaultMonths.js +0 -5
- package/mobile/dist/components/Calculator/getDefaultMonths.js.map +0 -1
- package/mobile/dist/components/Calculator/renderInitialFeeInput.d.ts +0 -6
- package/mobile/dist/components/Calculator/renderInitialFeeInput.js +0 -19
- package/mobile/dist/components/Calculator/renderInitialFeeInput.js.map +0 -1
- package/mobile/dist/components/Calculator/renderRealEstateValue.d.ts +0 -6
- package/mobile/dist/components/Calculator/renderRealEstateValue.js +0 -16
- package/mobile/dist/components/Calculator/renderRealEstateValue.js.map +0 -1
- package/mobile/lib/components/Calculator/getCreditRate.d.ts +0 -7
- package/mobile/lib/components/Calculator/getCreditRate.js +0 -11
- package/mobile/lib/components/Calculator/getCreditRate.js.map +0 -1
- package/mobile/lib/components/Calculator/getDefaultMonths.d.ts +0 -1
- package/mobile/lib/components/Calculator/getDefaultMonths.js +0 -2
- package/mobile/lib/components/Calculator/getDefaultMonths.js.map +0 -1
- package/mobile/lib/components/Calculator/renderInitialFeeInput.d.ts +0 -6
- package/mobile/lib/components/Calculator/renderInitialFeeInput.js +0 -16
- package/mobile/lib/components/Calculator/renderInitialFeeInput.js.map +0 -1
- package/mobile/lib/components/Calculator/renderRealEstateValue.d.ts +0 -6
- package/mobile/lib/components/Calculator/renderRealEstateValue.js +0 -13
- package/mobile/lib/components/Calculator/renderRealEstateValue.js.map +0 -1
- package/mobile/src/components/Calculator/getCreditRate.ts +0 -20
- package/mobile/src/components/Calculator/getDefaultMonths.ts +0 -2
- package/mobile/src/components/Calculator/renderInitialFeeInput.tsx +0 -36
- package/mobile/src/components/Calculator/renderRealEstateValue.tsx +0 -33
- package/src/components/Calculator/getCreditRate.ts +0 -20
- package/src/components/Calculator/getDefaultMonths.ts +0 -2
- package/src/components/Calculator/renderInitialFeeInput.tsx +0 -36
- package/src/components/Calculator/renderRealEstateValue.tsx +0 -33
package/bundle/bundle.umd.js
CHANGED
|
@@ -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,
|
|
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,
|
|
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
|
|
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.
|
|
5794
|
+
const packageVersion = "0.14.94";
|
|
5800
5795
|
|
|
5801
5796
|
exports.Blocks = Blocks;
|
|
5802
5797
|
exports.ContentPage = ContentPage;
|