@dropins/storefront-order 0.1.0-alpha16 → 0.1.0-alpha18

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 (60) hide show
  1. package/api/getOrderDetailsById/getOrderDetailsById.d.ts +1 -1
  2. package/api/getOrderDetailsById/graphql/returnsFragment.graphql.d.ts +1 -1
  3. package/api/guestOrderByToken/guestOrderByToken.d.ts +1 -1
  4. package/api/index.d.ts +1 -0
  5. package/api/reorderItems/graphql/reorderItems.graphql.d.ts +2 -0
  6. package/api/reorderItems/index.d.ts +2 -0
  7. package/api/reorderItems/reorderItems.d.ts +4 -0
  8. package/api.js +13 -11
  9. package/chunks/OrderCancel.js +2 -0
  10. package/chunks/OrderCancelForm.js +3 -1
  11. package/chunks/OrderLoaders.js +2 -0
  12. package/chunks/ReturnsListContent.js +3 -0
  13. package/chunks/convertCase.js +2 -0
  14. package/chunks/fetch-graphql.js +2 -0
  15. package/chunks/formatDateToLocale.js +3 -0
  16. package/chunks/getAttributesForm.js +2 -0
  17. package/chunks/getCustomer.js +3 -1
  18. package/chunks/getCustomerOrdersReturn.js +2 -0
  19. package/chunks/getGuestOrder.graphql.js +2 -0
  20. package/chunks/getStoreConfig.js +2 -0
  21. package/chunks/network-error.js +2 -0
  22. package/chunks/redirectTo.js +3 -0
  23. package/chunks/reorderItems.js +20 -0
  24. package/chunks/requestGuestOrderCancel.js +2 -0
  25. package/chunks/returnOrdersHelper.js +3 -0
  26. package/chunks/setTaxStatus.js +2 -0
  27. package/chunks/transform-order-details.js +4 -1
  28. package/chunks/useIsMobile.js +3 -1
  29. package/components/Reorder/Reorder.d.ts +5 -0
  30. package/components/Reorder/index.d.ts +3 -0
  31. package/components/ShippingStatusCard/ShippingStatusReturnCard.d.ts +5 -0
  32. package/components/ShippingStatusCard/index.d.ts +1 -0
  33. package/components/index.d.ts +1 -0
  34. package/configs/mock.config.d.ts +5 -0
  35. package/containers/CustomerDetails.js +3 -1
  36. package/containers/OrderCancelForm.js +3 -1
  37. package/containers/OrderCostSummary.js +3 -1
  38. package/containers/OrderProductList.js +3 -1
  39. package/containers/OrderReturns.js +3 -1
  40. package/containers/OrderSearch.js +3 -1
  41. package/containers/OrderStatus.js +5 -3
  42. package/containers/ReturnsList.js +3 -1
  43. package/containers/ShippingStatus.js +3 -1
  44. package/data/models/customer-orders-return.d.ts +2 -2
  45. package/data/models/order-details.d.ts +3 -0
  46. package/data/transforms/transform-guest-order.d.ts +2 -2
  47. package/data/transforms/transform-order-details.d.ts +2 -2
  48. package/i18n/en_US.json.d.ts +55 -7
  49. package/lib/formatDateToLocale.d.ts +31 -0
  50. package/lib/redirectTo.d.ts +1 -1
  51. package/package.json +1 -1
  52. package/render.js +4 -2
  53. package/types/api/getOrderDetails.types.d.ts +1 -0
  54. package/types/api/reorderItems.types.d.ts +27 -0
  55. package/types/customerDetails.types.d.ts +6 -1
  56. package/types/index.d.ts +2 -0
  57. package/types/orderStatus.types.d.ts +12 -4
  58. package/types/reorder.types.d.ts +9 -0
  59. package/types/shippingStatus.types.d.ts +16 -2
  60. package/lib/convertToInputDateFormat.d.ts +0 -3
@@ -0,0 +1,9 @@
1
+ import { OrderDataModel } from '../data/models';
2
+ import { UserInputErrorProps } from '.';
3
+
4
+ export interface ReorderProps {
5
+ orderData?: OrderDataModel;
6
+ routeOnSuccess?: () => string;
7
+ onError?: (errorInformation: UserInputErrorProps[] | string) => void;
8
+ }
9
+ //# sourceMappingURL=reorder.types.d.ts.map
@@ -1,19 +1,33 @@
1
1
  import { HTMLAttributes } from 'preact/compat';
2
2
  import { SlotProps } from '@dropins/tools/types/elsie/src/lib';
3
- import { OrderDataModel } from '../data/models';
3
+ import { OrderDataModel, OrdersReturnPropsModel, OrdersReturnTrackingProps } from '../data/models';
4
4
 
5
+ type routeTypes = {
6
+ returnNumber?: string;
7
+ token?: string;
8
+ orderNumber?: string;
9
+ };
5
10
  export interface ShippingStatusProps extends HTMLAttributes<HTMLDivElement> {
6
11
  orderData?: OrderDataModel;
7
12
  collapseThreshold?: number;
8
13
  slots?: {
9
14
  DeliveryTimeLine?: SlotProps;
10
15
  DeliveryTrackActions?: SlotProps;
16
+ ReturnItemsDetails?: SlotProps;
11
17
  };
12
- routeProductDetails?: (productData: any) => string;
18
+ routeOrderDetails?: ({ returnNumber, token, orderNumber, }: routeTypes) => string;
19
+ routeTracking?: (track: OrdersReturnTrackingProps) => string;
20
+ routeProductDetails?: (product: any) => string;
13
21
  }
14
22
  export interface UseShippingStatusProps {
15
23
  orderData?: OrderDataModel;
16
24
  }
17
25
  export interface ShippingStatusCardProps extends ShippingStatusProps {
26
+ translations: Record<string, string>;
18
27
  }
28
+ export interface ShippingStatusReturnCardProps extends ShippingStatusCardProps {
29
+ collapseThreshold: number;
30
+ returnData: OrdersReturnPropsModel;
31
+ }
32
+ export {};
19
33
  //# sourceMappingURL=shippingStatus.types.d.ts.map
@@ -1,3 +0,0 @@
1
- export declare const convertToInputDateFormat: (dateTimeString: string) => string;
2
- export declare const converDeliveryOrderDate: (dateTimeString: string) => string;
3
- //# sourceMappingURL=convertToInputDateFormat.d.ts.map