@redneckz/wildless-cms-uni-blocks 0.14.1065 → 0.14.1066
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 +10 -6
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/CreditCardForm/getDeliveryCreditCardData.js +6 -0
- package/dist/components/CreditCardForm/getDeliveryCreditCardData.js.map +1 -1
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js +2 -1
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/dist/retail/components/Fields/DeliveryDateField.js +1 -5
- package/dist/retail/components/Fields/DeliveryDateField.js.map +1 -1
- package/dist/retail/components/Fields/DeliveryTimeField.js +1 -0
- package/dist/retail/components/Fields/DeliveryTimeField.js.map +1 -1
- package/lib/components/CreditCardForm/getDeliveryCreditCardData.js +6 -0
- package/lib/components/CreditCardForm/getDeliveryCreditCardData.js.map +1 -1
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js +2 -1
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
- package/lib/retail/components/Fields/DeliveryDateField.js +1 -5
- package/lib/retail/components/Fields/DeliveryDateField.js.map +1 -1
- package/lib/retail/components/Fields/DeliveryTimeField.js +1 -0
- package/lib/retail/components/Fields/DeliveryTimeField.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +10 -6
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/CreditCardForm/getDeliveryCreditCardData.js +6 -0
- package/mobile/dist/components/CreditCardForm/getDeliveryCreditCardData.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js +2 -1
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/dist/retail/components/Fields/DeliveryDateField.js +1 -5
- package/mobile/dist/retail/components/Fields/DeliveryDateField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/DeliveryTimeField.js +1 -0
- package/mobile/dist/retail/components/Fields/DeliveryTimeField.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/getDeliveryCreditCardData.js +6 -0
- package/mobile/lib/components/CreditCardForm/getDeliveryCreditCardData.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js +2 -1
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/lib/retail/components/Fields/DeliveryDateField.js +1 -5
- package/mobile/lib/retail/components/Fields/DeliveryDateField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/DeliveryTimeField.js +1 -0
- package/mobile/lib/retail/components/Fields/DeliveryTimeField.js.map +1 -1
- package/mobile/src/components/CreditCardForm/getDeliveryCreditCardData.ts +6 -0
- package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +2 -1
- package/mobile/src/retail/components/Fields/DeliveryDateField.tsx +2 -6
- package/mobile/src/retail/components/Fields/DeliveryTimeField.tsx +1 -0
- package/package.json +1 -1
- package/src/components/CreditCardForm/getDeliveryCreditCardData.ts +6 -0
- package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +2 -1
- package/src/retail/components/Fields/DeliveryDateField.tsx +2 -6
- package/src/retail/components/Fields/DeliveryTimeField.tsx +1 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -6243,9 +6243,6 @@
|
|
|
6243
6243
|
|
|
6244
6244
|
const MIN_DATE = new Date(Date.now() + 1 * 24 * 60 * 60 * 1000);
|
|
6245
6245
|
const DeliveryDateField = JSX(({ field, input }) => {
|
|
6246
|
-
const { productType } = useRetailFormStore();
|
|
6247
|
-
const isDebit = productType === 'debitCard';
|
|
6248
|
-
const minDate = isDebit ? MIN_DATE : new Date();
|
|
6249
6246
|
const { data } = useLeadFormData('DAYS_DELIVERY_SETTINGS');
|
|
6250
6247
|
const weekends = useMemo(() => {
|
|
6251
6248
|
const weekendItem = data?.find((item) => item.key === 'WEEKEND');
|
|
@@ -6254,7 +6251,7 @@
|
|
|
6254
6251
|
}
|
|
6255
6252
|
return [];
|
|
6256
6253
|
}, [data]);
|
|
6257
|
-
return (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...field(input?.name ?? ''), ...input, minDate:
|
|
6254
|
+
return (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...field(input?.name ?? ''), ...input, minDate: MIN_DATE, weekends: weekends }));
|
|
6258
6255
|
});
|
|
6259
6256
|
|
|
6260
6257
|
const DeliveryTimeField = JSX(({ field, input }) => {
|
|
@@ -6267,6 +6264,7 @@
|
|
|
6267
6264
|
const allowedTimes = isDebit ? debitDeliveryTime : creditDeliveryTime;
|
|
6268
6265
|
return (data || [])
|
|
6269
6266
|
.filter((item) => item.key && allowedTimes.includes(item.key))
|
|
6267
|
+
.sort((a, b) => (a.displayOrder || 0) - (b.displayOrder || 0))
|
|
6270
6268
|
.map((item) => ({
|
|
6271
6269
|
id: item.key,
|
|
6272
6270
|
text: item.value,
|
|
@@ -10828,12 +10826,17 @@
|
|
|
10828
10826
|
|
|
10829
10827
|
const getDeliveryData$1 = (formData) => {
|
|
10830
10828
|
const { methodObtain, deliveryDate = '', deliveryTime } = formData;
|
|
10829
|
+
const isNewMicroservice = checkNewMicroservice();
|
|
10830
|
+
//TODO временный хардкод для тестирования, требуется чтобы отработал ЕФР
|
|
10831
|
+
const oficeId = isNewMicroservice ? { id: '92fc8b67-2648-43ad-a441-5ca827021186' } : { id: '3' };
|
|
10831
10832
|
const isCourierDelivery = methodObtain === 'courier';
|
|
10832
10833
|
const deliveryTimeCd = deliveryTime ? { deliveryTimeCd: { key: deliveryTime } } : {};
|
|
10833
10834
|
return isCourierDelivery
|
|
10834
10835
|
? {
|
|
10835
10836
|
courierDeliveryFlg: isCourierDelivery,
|
|
10836
10837
|
deliveryDate: dateToISO(deliveryDate.toString().replace(/(GMT)[+-]\d{4}/, 'GMT+0000')),
|
|
10838
|
+
//TODO временный хардкод для тестирования, не забыть удалить
|
|
10839
|
+
office: oficeId,
|
|
10837
10840
|
...deliveryTimeCd,
|
|
10838
10841
|
}
|
|
10839
10842
|
: {};
|
|
@@ -10929,7 +10932,8 @@
|
|
|
10929
10932
|
cardCategory: leadForm?.cardCategory?.text,
|
|
10930
10933
|
deliveryDate: leadForm?.deliveryDate,
|
|
10931
10934
|
};
|
|
10932
|
-
|
|
10935
|
+
const resetState = { ...initialState, methodObtain: undefined };
|
|
10936
|
+
retailFormStore.leadForm = resetState;
|
|
10933
10937
|
}
|
|
10934
10938
|
}, [isFinalStep, initialState]);
|
|
10935
10939
|
const handleSubmit = useCallback(async (formData) => {
|
|
@@ -14845,7 +14849,7 @@
|
|
|
14845
14849
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
14846
14850
|
});
|
|
14847
14851
|
|
|
14848
|
-
const packageVersion = "0.14.
|
|
14852
|
+
const packageVersion = "0.14.1065";
|
|
14849
14853
|
|
|
14850
14854
|
exports.Blocks = Blocks;
|
|
14851
14855
|
exports.ContentPage = ContentPage;
|