@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.
Files changed (46) hide show
  1. package/bundle/bundle.umd.js +10 -6
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/dist/components/CreditCardForm/getDeliveryCreditCardData.js +6 -0
  4. package/dist/components/CreditCardForm/getDeliveryCreditCardData.js.map +1 -1
  5. package/dist/components/CreditCardForm/useCreditCardFormAPI.js +2 -1
  6. package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  7. package/dist/retail/components/Fields/DeliveryDateField.js +1 -5
  8. package/dist/retail/components/Fields/DeliveryDateField.js.map +1 -1
  9. package/dist/retail/components/Fields/DeliveryTimeField.js +1 -0
  10. package/dist/retail/components/Fields/DeliveryTimeField.js.map +1 -1
  11. package/lib/components/CreditCardForm/getDeliveryCreditCardData.js +6 -0
  12. package/lib/components/CreditCardForm/getDeliveryCreditCardData.js.map +1 -1
  13. package/lib/components/CreditCardForm/useCreditCardFormAPI.js +2 -1
  14. package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  15. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
  16. package/lib/retail/components/Fields/DeliveryDateField.js +1 -5
  17. package/lib/retail/components/Fields/DeliveryDateField.js.map +1 -1
  18. package/lib/retail/components/Fields/DeliveryTimeField.js +1 -0
  19. package/lib/retail/components/Fields/DeliveryTimeField.js.map +1 -1
  20. package/mobile/bundle/bundle.umd.js +10 -6
  21. package/mobile/bundle/bundle.umd.min.js +1 -1
  22. package/mobile/dist/components/CreditCardForm/getDeliveryCreditCardData.js +6 -0
  23. package/mobile/dist/components/CreditCardForm/getDeliveryCreditCardData.js.map +1 -1
  24. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js +2 -1
  25. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  26. package/mobile/dist/retail/components/Fields/DeliveryDateField.js +1 -5
  27. package/mobile/dist/retail/components/Fields/DeliveryDateField.js.map +1 -1
  28. package/mobile/dist/retail/components/Fields/DeliveryTimeField.js +1 -0
  29. package/mobile/dist/retail/components/Fields/DeliveryTimeField.js.map +1 -1
  30. package/mobile/lib/components/CreditCardForm/getDeliveryCreditCardData.js +6 -0
  31. package/mobile/lib/components/CreditCardForm/getDeliveryCreditCardData.js.map +1 -1
  32. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js +2 -1
  33. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  34. package/mobile/lib/retail/components/Fields/DeliveryDateField.js +1 -5
  35. package/mobile/lib/retail/components/Fields/DeliveryDateField.js.map +1 -1
  36. package/mobile/lib/retail/components/Fields/DeliveryTimeField.js +1 -0
  37. package/mobile/lib/retail/components/Fields/DeliveryTimeField.js.map +1 -1
  38. package/mobile/src/components/CreditCardForm/getDeliveryCreditCardData.ts +6 -0
  39. package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +2 -1
  40. package/mobile/src/retail/components/Fields/DeliveryDateField.tsx +2 -6
  41. package/mobile/src/retail/components/Fields/DeliveryTimeField.tsx +1 -0
  42. package/package.json +1 -1
  43. package/src/components/CreditCardForm/getDeliveryCreditCardData.ts +6 -0
  44. package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +2 -1
  45. package/src/retail/components/Fields/DeliveryDateField.tsx +2 -6
  46. package/src/retail/components/Fields/DeliveryTimeField.tsx +1 -0
@@ -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: minDate, weekends: isDebit ? weekends : [] }));
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
- retailFormStore.leadForm = initialState;
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.1064";
14852
+ const packageVersion = "0.14.1065";
14849
14853
 
14850
14854
  exports.Blocks = Blocks;
14851
14855
  exports.ContentPage = ContentPage;