@redneckz/wildless-cms-uni-blocks 0.14.694 → 0.14.695
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 +7 -10
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/ui-kit/FormField/Fields/CurrencyField.d.ts +0 -7
- package/dist/components/CreditCardForm/formStateMap.js +1 -1
- package/dist/ui-kit/FormField/Fields/CurrencyField.d.ts +0 -7
- package/dist/ui-kit/FormField/Fields/CurrencyField.js +6 -9
- package/dist/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
- package/dist/ui-kit/FormField/getObjectValidator.js +1 -0
- package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/lib/components/CreditCardForm/formStateMap.js +1 -1
- package/lib/ui-kit/FormField/Fields/CurrencyField.d.ts +0 -7
- package/lib/ui-kit/FormField/Fields/CurrencyField.js +5 -8
- package/lib/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
- package/lib/ui-kit/FormField/getObjectValidator.js +1 -0
- package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +7 -10
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/ui-kit/FormField/Fields/CurrencyField.d.ts +0 -7
- package/mobile/dist/components/CreditCardForm/formStateMap.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/CurrencyField.d.ts +0 -7
- package/mobile/dist/ui-kit/FormField/Fields/CurrencyField.js +6 -9
- package/mobile/dist/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js +1 -0
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/formStateMap.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/CurrencyField.d.ts +0 -7
- package/mobile/lib/ui-kit/FormField/Fields/CurrencyField.js +5 -8
- package/mobile/lib/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js +1 -0
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/src/components/CreditCardForm/formStateMap.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/CurrencyField.tsx +8 -8
- package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +1 -0
- package/package.json +1 -1
- package/src/components/CreditCardForm/formStateMap.tsx +1 -1
- package/src/ui-kit/FormField/Fields/CurrencyField.tsx +8 -8
- package/src/ui-kit/FormField/getObjectValidator.tsx +1 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -1701,6 +1701,7 @@
|
|
|
1701
1701
|
addressCourier: addressDaDataValidator(),
|
|
1702
1702
|
cardCategory: defaultValidator('Укажите категорию карты'),
|
|
1703
1703
|
paymentSystem: defaultValidator('Укажите тип платежной системы'),
|
|
1704
|
+
currency: defaultValidator('Укажите валюту'),
|
|
1704
1705
|
};
|
|
1705
1706
|
const getObjectValidator = (inputs) => {
|
|
1706
1707
|
const requiredInputs = getNamesFromInput(inputs.filter((_) => Boolean(_?.required)));
|
|
@@ -3428,16 +3429,12 @@
|
|
|
3428
3429
|
|
|
3429
3430
|
const RadioButtonGroupControl = JSX(({ className, label, onChange, error, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(RadioButtonGroup, { label: getRequiredLabel({ label, errors: rest?.errors }), onChange: (_) => onChange && onChange(_), ...rest }), renderErrorText(error)] })));
|
|
3430
3431
|
|
|
3431
|
-
|
|
3432
|
-
(function (CurrencyCode) {
|
|
3433
|
-
CurrencyCode["rub"] = "810";
|
|
3434
|
-
CurrencyCode["dollar"] = "840";
|
|
3435
|
-
CurrencyCode["euro"] = "978";
|
|
3436
|
-
})(CurrencyCode || (CurrencyCode = {}));
|
|
3437
|
-
const CURRENCY_TYPES = [{ id: CurrencyCode.rub, text: 'Рубль' }];
|
|
3432
|
+
const DEFAULT_CURRENCY_TYPES = [{ id: '810', text: 'Рубли' }];
|
|
3438
3433
|
const CurrencyField = JSX(({ field, input }) => {
|
|
3439
3434
|
const { value, onChange } = field('currency');
|
|
3440
|
-
|
|
3435
|
+
const { data } = useLeadFormData('CURRENCY');
|
|
3436
|
+
const currencyTypes = data?.map((_) => ({ id: _.key, text: _.value })) ?? DEFAULT_CURRENCY_TYPES;
|
|
3437
|
+
return (jsx(RadioButtonGroupControl, { label: "\u0412\u0430\u043B\u044E\u0442\u0430", orientation: "horizontal", items: currencyTypes, value: value, onChange: (_) => onChange?.(_), ...getValidation(field('currency'), validatorObj.currency, input?.required) }));
|
|
3441
3438
|
});
|
|
3442
3439
|
|
|
3443
3440
|
const DeliveryDateFiels = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...getValidation(field('deliveryDate'), validatorObj.deliveryDate, input?.required) })));
|
|
@@ -6392,7 +6389,7 @@
|
|
|
6392
6389
|
const formStateMap$1 = [
|
|
6393
6390
|
{
|
|
6394
6391
|
paymentSystem: '',
|
|
6395
|
-
currency: '
|
|
6392
|
+
currency: '810',
|
|
6396
6393
|
codeWord: '',
|
|
6397
6394
|
},
|
|
6398
6395
|
{
|
|
@@ -10386,7 +10383,7 @@
|
|
|
10386
10383
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10387
10384
|
});
|
|
10388
10385
|
|
|
10389
|
-
const packageVersion = "0.14.
|
|
10386
|
+
const packageVersion = "0.14.694";
|
|
10390
10387
|
|
|
10391
10388
|
exports.Blocks = Blocks;
|
|
10392
10389
|
exports.ContentPage = ContentPage;
|