@redneckz/wildless-cms-uni-blocks 0.14.190 → 0.14.192
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +38 -33
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +13 -0
- package/bundle/components/ExchangeRateTile/CurrencyProps.d.ts +2 -1
- package/bundle/icons/IconName.d.ts +4 -2
- package/cosmos-static/icons/ChineseYuanRenminbiIcon.svg +1 -0
- package/cosmos-static/icons/sprites.svg +1 -0
- package/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +13 -0
- package/dist/components/ApplicationForm/ApplicationFormFeedback.js +35 -3
- package/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrencyProps.d.ts +2 -1
- package/dist/components/ExchangeRateTile/CurrencyProps.js +1 -0
- package/dist/components/ExchangeRateTile/CurrencyProps.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrencyTable.js +1 -0
- package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/dist/components/ExchangeRateTile/callbackCurrencySelect.js +4 -0
- package/dist/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -1
- package/dist/icons/IconName.d.ts +4 -2
- package/dist/icons/IconName.js +2 -0
- package/dist/icons/IconName.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +13 -0
- package/lib/components/ApplicationForm/ApplicationFormFeedback.js +33 -2
- package/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrencyProps.d.ts +2 -1
- package/lib/components/ExchangeRateTile/CurrencyProps.js +1 -0
- package/lib/components/ExchangeRateTile/CurrencyProps.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrencyTable.js +1 -0
- package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/lib/components/ExchangeRateTile/callbackCurrencySelect.js +4 -0
- package/lib/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -1
- package/lib/icons/IconName.d.ts +4 -2
- package/lib/icons/IconName.js +2 -0
- package/lib/icons/IconName.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +38 -33
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +13 -0
- package/mobile/bundle/components/ExchangeRateTile/CurrencyProps.d.ts +2 -1
- package/mobile/bundle/icons/IconName.d.ts +4 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +13 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js +35 -3
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrencyProps.d.ts +2 -1
- package/mobile/dist/components/ExchangeRateTile/CurrencyProps.js +1 -0
- package/mobile/dist/components/ExchangeRateTile/CurrencyProps.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +1 -0
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.js +4 -0
- package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +4 -2
- package/mobile/dist/icons/IconName.js +2 -0
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +13 -0
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js +33 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrencyProps.d.ts +2 -1
- package/mobile/lib/components/ExchangeRateTile/CurrencyProps.js +1 -0
- package/mobile/lib/components/ExchangeRateTile/CurrencyProps.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +1 -0
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.js +4 -0
- package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +4 -2
- package/mobile/lib/icons/IconName.js +2 -0
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormFeedback.tsx +52 -2
- package/mobile/src/components/ExchangeRateTile/CurrencyProps.ts +1 -0
- package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +1 -0
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +1 -1
- package/mobile/src/components/ExchangeRateTile/callbackCurrencySelect.ts +4 -0
- package/mobile/src/icons/ChineseYuanRenminbiIcon.svg +11 -0
- package/mobile/src/icons/IconName.ts +4 -4
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationFormFeedback.tsx +52 -2
- package/src/components/ExchangeRateTile/CurrencyProps.ts +1 -0
- package/src/components/ExchangeRateTile/CurrencyTable.tsx +1 -0
- package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +2 -0
- package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +1 -1
- package/src/components/ExchangeRateTile/callbackCurrencySelect.ts +4 -0
- package/src/icons/ChineseYuanRenminbiIcon.svg +11 -0
- package/src/icons/IconName.ts +4 -1
- package/src/ui-kit/Select/Select.fixture.tsx +2 -1
- package/bundle/components/ApplicationForm/handleSubmitFeedback.d.ts +0 -15
- package/dist/components/ApplicationForm/handleSubmitFeedback.d.ts +0 -15
- package/dist/components/ApplicationForm/handleSubmitFeedback.js +0 -38
- package/dist/components/ApplicationForm/handleSubmitFeedback.js.map +0 -1
- package/lib/components/ApplicationForm/handleSubmitFeedback.d.ts +0 -15
- package/lib/components/ApplicationForm/handleSubmitFeedback.js +0 -35
- package/lib/components/ApplicationForm/handleSubmitFeedback.js.map +0 -1
- package/mobile/bundle/components/ApplicationForm/handleSubmitFeedback.d.ts +0 -15
- package/mobile/dist/components/ApplicationForm/handleSubmitFeedback.d.ts +0 -15
- package/mobile/dist/components/ApplicationForm/handleSubmitFeedback.js +0 -38
- package/mobile/dist/components/ApplicationForm/handleSubmitFeedback.js.map +0 -1
- package/mobile/lib/components/ApplicationForm/handleSubmitFeedback.d.ts +0 -15
- package/mobile/lib/components/ApplicationForm/handleSubmitFeedback.js +0 -35
- package/mobile/lib/components/ApplicationForm/handleSubmitFeedback.js.map +0 -1
- package/mobile/src/components/ApplicationForm/handleSubmitFeedback.tsx +0 -54
- package/src/components/ApplicationForm/handleSubmitFeedback.tsx +0 -54
package/bundle/bundle.umd.js
CHANGED
|
@@ -1453,37 +1453,6 @@
|
|
|
1453
1453
|
{ key: 'Юридическое лицо / ИП' },
|
|
1454
1454
|
];
|
|
1455
1455
|
|
|
1456
|
-
const feedbackValidatorDefaultObject = {
|
|
1457
|
-
typeForm: defaultValidator,
|
|
1458
|
-
region: defaultValidator,
|
|
1459
|
-
surname: defaultValidator,
|
|
1460
|
-
name: nameValidator,
|
|
1461
|
-
feedbackMethod: defaultValidator,
|
|
1462
|
-
phone: phoneValidator,
|
|
1463
|
-
email: defaultValidator,
|
|
1464
|
-
comment: defaultValidator,
|
|
1465
|
-
consentDataProcessing: checkboxValidator,
|
|
1466
|
-
};
|
|
1467
|
-
const handleSubmitFeedback = (formState, onSubmit) => {
|
|
1468
|
-
const isLegal = getLegalEntity(formState?.typeForm.key, formState?.serviceDirection?.key);
|
|
1469
|
-
const feedbackValidator = objectValidator({
|
|
1470
|
-
...feedbackValidatorDefaultObject,
|
|
1471
|
-
...getFeedbackValidationObject(formState, isLegal),
|
|
1472
|
-
});
|
|
1473
|
-
isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, !isLegal);
|
|
1474
|
-
};
|
|
1475
|
-
const getFeedbackValidationObject = (formState, isLegal) => {
|
|
1476
|
-
if (isLegal) {
|
|
1477
|
-
return { addressBranch: defaultValidator, inn: innValidator };
|
|
1478
|
-
}
|
|
1479
|
-
else if (formState.typeForm.key === 'FEEDBACK') {
|
|
1480
|
-
return { birthday: defaultValidator };
|
|
1481
|
-
}
|
|
1482
|
-
else {
|
|
1483
|
-
return { addressBranch: defaultValidator };
|
|
1484
|
-
}
|
|
1485
|
-
};
|
|
1486
|
-
|
|
1487
1456
|
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
1488
1457
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill: pathFill, ...options }, i) => {
|
|
1489
1458
|
const resultOptions = { ...commonOptions, ...options };
|
|
@@ -1689,6 +1658,17 @@
|
|
|
1689
1658
|
comment: '',
|
|
1690
1659
|
consentDataProcessing: false,
|
|
1691
1660
|
};
|
|
1661
|
+
const feedbackValidatorDefaultObject = {
|
|
1662
|
+
typeForm: defaultValidator,
|
|
1663
|
+
region: defaultValidator,
|
|
1664
|
+
surname: defaultValidator,
|
|
1665
|
+
name: nameValidator,
|
|
1666
|
+
feedbackMethod: defaultValidator,
|
|
1667
|
+
phone: phoneValidator,
|
|
1668
|
+
email: defaultValidator,
|
|
1669
|
+
comment: defaultValidator,
|
|
1670
|
+
consentDataProcessing: checkboxValidator,
|
|
1671
|
+
};
|
|
1692
1672
|
const ApplicationFormFeedback = JSX(({ button, link, onSubmit }) => {
|
|
1693
1673
|
const handleSubmit = useCallback((feedbackFormState) => {
|
|
1694
1674
|
handleSubmitFeedback(feedbackFormState, onSubmit);
|
|
@@ -1702,6 +1682,25 @@
|
|
|
1702
1682
|
? field('secondaryPhone')
|
|
1703
1683
|
: withValidator(field('secondaryPhone'), phoneValidator)) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) }), jsx(InputControl, { label: "\u0424\u0418\u041E \u0438\u043B\u0438 \u0434\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u0432\u0448\u0435\u0433\u043E \u0412\u0430\u0441 \u0441\u043E\u0442\u0440\u0443\u0434\u043D\u0438\u043A\u0430 \u0411\u0430\u043D\u043A\u0430", ...field('bankEmpolee') }), jsx(InputControl, { label: "\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u044F \u0432 \u0411\u0430\u043D\u043A", ...field('applicationDate') })] })) : (jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })), jsx(InputControl, { ...withValidator(field('comment'), defaultValidator), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435", isTextarea: true }), renderAgreementSubmit(field('consentDataProcessing'), link, button)] }) }) }));
|
|
1704
1684
|
});
|
|
1685
|
+
const handleSubmitFeedback = (formState, onSubmit) => {
|
|
1686
|
+
const isLegal = getLegalEntity(formState?.typeForm.key, formState?.serviceDirection?.key);
|
|
1687
|
+
const feedbackValidator = objectValidator({
|
|
1688
|
+
...feedbackValidatorDefaultObject,
|
|
1689
|
+
...getFeedbackValidationObject(formState, isLegal),
|
|
1690
|
+
});
|
|
1691
|
+
isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, !isLegal);
|
|
1692
|
+
};
|
|
1693
|
+
const getFeedbackValidationObject = (formState, isLegal) => {
|
|
1694
|
+
if (isLegal) {
|
|
1695
|
+
return { addressBranch: defaultValidator, inn: innValidator };
|
|
1696
|
+
}
|
|
1697
|
+
else if (formState.typeForm.key === 'FEEDBACK') {
|
|
1698
|
+
return { birthday: defaultValidator };
|
|
1699
|
+
}
|
|
1700
|
+
else {
|
|
1701
|
+
return { addressBranch: defaultValidator };
|
|
1702
|
+
}
|
|
1703
|
+
};
|
|
1705
1704
|
const getLegalEntity = (typeFormKey = '', serviceDirectionKey = '') => typeFormKey === 'FEEDBACK_QS' && serviceDirectionKey === 'Юридическое лицо / ИП';
|
|
1706
1705
|
|
|
1707
1706
|
const ApplicationFormGrantSupport = JSX((props) => {
|
|
@@ -3740,6 +3739,7 @@
|
|
|
3740
3739
|
Currency["RUB"] = "RUB";
|
|
3741
3740
|
Currency["EUR"] = "EUR";
|
|
3742
3741
|
Currency["USD"] = "USD";
|
|
3742
|
+
Currency["CNY"] = "CNY";
|
|
3743
3743
|
})(Currency || (Currency = {}));
|
|
3744
3744
|
|
|
3745
3745
|
const currencyNumberFormat = new Intl.NumberFormat('ru', {
|
|
@@ -3753,6 +3753,7 @@
|
|
|
3753
3753
|
const CURRENCY_ICONS_MAP = {
|
|
3754
3754
|
USD: 'DollarIcon',
|
|
3755
3755
|
EUR: 'EuroIcon',
|
|
3756
|
+
CNY: 'ChineseYuanRenminbiIcon',
|
|
3756
3757
|
};
|
|
3757
3758
|
const CurrencyTable = JSX(({ className, exchangeCurrencyItems }) => (jsxs("table", { className: `h-fit w-fit ${className}`, children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { className: TABLE_HEAD_STYLE, children: jsx(Text, { size: "text-m", children: "\u0412\u0430\u043B\u044E\u0442\u0430" }) }), jsx("th", { className: TABLE_HEAD_STYLE_WITH_PADDING, children: jsx(Text, { size: "text-m", children: "\u041A\u0443\u043F\u0438\u0442\u044C" }) }), jsx("th", { className: TABLE_HEAD_STYLE_WITH_PADDING, children: jsx(Text, { size: "text-m", children: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C" }) })] }) }), jsx("tbody", { children: exchangeCurrencyItems.map(renderCurrencyRow) })] })));
|
|
3758
3759
|
const renderCurrencyRow = (exchangeCurrencyItem) => {
|
|
@@ -3788,6 +3789,10 @@
|
|
|
3788
3789
|
(_) => _.value === Currency.RUB && _.oppositeValue === Currency.RUB,
|
|
3789
3790
|
() => props.handleConvert(props.value, Currency.USD),
|
|
3790
3791
|
],
|
|
3792
|
+
[
|
|
3793
|
+
(_) => _.value === Currency.RUB && _.oppositeValue === Currency.RUB,
|
|
3794
|
+
() => props.handleConvert(props.value, Currency.CNY),
|
|
3795
|
+
],
|
|
3791
3796
|
[() => true, () => props.handleConvert(props.value)],
|
|
3792
3797
|
])(props)?.();
|
|
3793
3798
|
|
|
@@ -3882,7 +3887,7 @@
|
|
|
3882
3887
|
return (jsx(BlockWrapper, { className: style('box-border min-h-80', className), ...rest, children: jsx(BaseTile, { className: "h-full", title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap" }), children: jsxs("div", { className: "flex gap-6xl flex-wrap", children: [jsxs("div", { children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-xl", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { address: exchangeRates?.address })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
|
|
3883
3888
|
});
|
|
3884
3889
|
const getCurrencyRates = (currencies) => {
|
|
3885
|
-
return currencies?.filter((_) =>
|
|
3890
|
+
return currencies?.filter((_) => [1, 2, 3].includes(_?.currency?.id)) || [];
|
|
3886
3891
|
};
|
|
3887
3892
|
|
|
3888
3893
|
const ICON_SIZE = { width: '40', height: '45' };
|
|
@@ -6028,7 +6033,7 @@
|
|
|
6028
6033
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6029
6034
|
});
|
|
6030
6035
|
|
|
6031
|
-
const packageVersion = "0.14.
|
|
6036
|
+
const packageVersion = "0.14.191";
|
|
6032
6037
|
|
|
6033
6038
|
exports.Blocks = Blocks;
|
|
6034
6039
|
exports.ContentPage = ContentPage;
|