@dropins/storefront-order 0.1.0-alpha10

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 (125) hide show
  1. package/api/cancelOrder/cancelOrder.d.ts +2 -0
  2. package/api/cancelOrder/graphql/cancelOrderMutation.d.ts +2 -0
  3. package/api/cancelOrder/index.d.ts +2 -0
  4. package/api/fetch-graphql/fetch-graphql.d.ts +8 -0
  5. package/api/fetch-graphql/index.d.ts +2 -0
  6. package/api/getAttributesForm/getAttributesForm.d.ts +4 -0
  7. package/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts +3 -0
  8. package/api/getAttributesForm/index.d.ts +2 -0
  9. package/api/getCustomer/getCustomer.d.ts +4 -0
  10. package/api/getCustomer/graphql/getCustomer.graphql.d.ts +2 -0
  11. package/api/getCustomer/index.d.ts +2 -0
  12. package/api/getGuestOrder/getGuestOrder.d.ts +8 -0
  13. package/api/getGuestOrder/graphql/getGuestOrder.graphql.d.ts +3 -0
  14. package/api/getGuestOrder/index.d.ts +2 -0
  15. package/api/getOrderDetailsById/getOrderDetailsById.d.ts +4 -0
  16. package/api/getOrderDetailsById/graphql/customerAddressFragment.graphql.d.ts +2 -0
  17. package/api/getOrderDetailsById/graphql/index.d.ts +5 -0
  18. package/api/getOrderDetailsById/graphql/orderByNumber.graphql.d.ts +2 -0
  19. package/api/getOrderDetailsById/graphql/orderItemsFragment.graphql.d.ts +2 -0
  20. package/api/getOrderDetailsById/graphql/orderSummaryFragment.graphql.d.ts +2 -0
  21. package/api/getOrderDetailsById/index.d.ts +2 -0
  22. package/api/getStoreConfig/getStoreConfig.d.ts +4 -0
  23. package/api/getStoreConfig/graphql/StoreConfigQuery.d.ts +2 -0
  24. package/api/getStoreConfig/index.d.ts +2 -0
  25. package/api/guestOrderByToken/graphql/guestOrderByToken.graphql.d.ts +2 -0
  26. package/api/guestOrderByToken/guestOrderByToken.d.ts +4 -0
  27. package/api/guestOrderByToken/index.d.ts +2 -0
  28. package/api/helpers/initializeOrderDetails.d.ts +4 -0
  29. package/api/index.d.ts +9 -0
  30. package/api/initialize/index.d.ts +2 -0
  31. package/api/initialize/initialize.d.ts +10 -0
  32. package/api.d.ts +1 -0
  33. package/api.js +167 -0
  34. package/chunks/CustomerDetailsContent.js +1 -0
  35. package/chunks/OrderLoaders.js +1 -0
  36. package/chunks/fetch-graphql.js +1 -0
  37. package/chunks/getAttributesForm.js +47 -0
  38. package/chunks/getCustomer.js +97 -0
  39. package/chunks/getStoreConfig.js +10 -0
  40. package/chunks/network-error.js +1 -0
  41. package/chunks/transform-order-details.js +90 -0
  42. package/components/CustomerDetailsContent/CustomerDetailsContent.d.ts +5 -0
  43. package/components/CustomerDetailsContent/index.d.ts +3 -0
  44. package/components/Form/Form.d.ts +5 -0
  45. package/components/Form/FormInputs/FormInputs.d.ts +5 -0
  46. package/components/Form/FormInputs/index.d.ts +3 -0
  47. package/components/Form/index.d.ts +3 -0
  48. package/components/OrderActions/OrderActions.d.ts +5 -0
  49. package/components/OrderActions/index.d.ts +3 -0
  50. package/components/OrderCancel/OrderCancel.d.ts +5 -0
  51. package/components/OrderCancel/index.d.ts +3 -0
  52. package/components/OrderLoaders/OrderLoaders.d.ts +7 -0
  53. package/components/OrderLoaders/index.d.ts +3 -0
  54. package/components/OrderSearchForm/OrderSearchForm.d.ts +5 -0
  55. package/components/OrderSearchForm/index.d.ts +3 -0
  56. package/components/OrderStatusContent/OrderStatusContent.d.ts +5 -0
  57. package/components/OrderStatusContent/index.d.ts +3 -0
  58. package/components/ShippingStatusCard/ShippingStatusCard.d.ts +5 -0
  59. package/components/ShippingStatusCard/index.d.ts +3 -0
  60. package/components/index.d.ts +9 -0
  61. package/configs/defaultAttributePreset.config.d.ts +2 -0
  62. package/configs/mock.config.d.ts +924 -0
  63. package/containers/CustomerDetails/CustomerDetails.d.ts +5 -0
  64. package/containers/CustomerDetails/index.d.ts +3 -0
  65. package/containers/CustomerDetails.d.ts +3 -0
  66. package/containers/CustomerDetails.js +1 -0
  67. package/containers/OrderSearch/OrderSearch.d.ts +5 -0
  68. package/containers/OrderSearch/index.d.ts +3 -0
  69. package/containers/OrderSearch.d.ts +3 -0
  70. package/containers/OrderSearch.js +1 -0
  71. package/containers/OrderStatus/OrderStatus.d.ts +5 -0
  72. package/containers/OrderStatus/index.d.ts +3 -0
  73. package/containers/OrderStatus.d.ts +3 -0
  74. package/containers/OrderStatus.js +80 -0
  75. package/containers/ShippingStatus/ShippingStatus.d.ts +5 -0
  76. package/containers/ShippingStatus/index.d.ts +3 -0
  77. package/containers/ShippingStatus.d.ts +3 -0
  78. package/containers/ShippingStatus.js +1 -0
  79. package/containers/index.d.ts +5 -0
  80. package/data/models/attributes-form.d.ts +46 -0
  81. package/data/models/customer.d.ts +6 -0
  82. package/data/models/index.d.ts +5 -0
  83. package/data/models/order-details.d.ts +117 -0
  84. package/data/models/store-config.d.ts +8 -0
  85. package/data/transforms/index.d.ts +6 -0
  86. package/data/transforms/transform-attributes-form.d.ts +6 -0
  87. package/data/transforms/transform-customer.d.ts +5 -0
  88. package/data/transforms/transform-guest-order.d.ts +6 -0
  89. package/data/transforms/transform-order-details.d.ts +7 -0
  90. package/data/transforms/transform-store-config.d.ts +4 -0
  91. package/hooks/api/useGetStoreConfig.d.ts +4 -0
  92. package/hooks/components/useForm.d.ts +11 -0
  93. package/hooks/containers/useCustomerDetails.d.ts +12 -0
  94. package/hooks/containers/useOrderSearch.d.ts +22 -0
  95. package/hooks/containers/useOrderStatus.d.ts +8 -0
  96. package/hooks/containers/useShippingStatus.d.ts +7 -0
  97. package/hooks/index.d.ts +5 -0
  98. package/i18n/en_US.json.d.ts +113 -0
  99. package/lib/checkIsFunction.d.ts +2 -0
  100. package/lib/convertCase.d.ts +4 -0
  101. package/lib/convertToInputDateFormat.d.ts +3 -0
  102. package/lib/fetch-error.d.ts +5 -0
  103. package/lib/formatAddressFields.d.ts +6 -0
  104. package/lib/getFormValues.d.ts +2 -0
  105. package/lib/getQueryParam.d.ts +2 -0
  106. package/lib/network-error.d.ts +6 -0
  107. package/lib/redirectTo.d.ts +3 -0
  108. package/package.json +1 -0
  109. package/render/Provider.d.ts +8 -0
  110. package/render/index.d.ts +2 -0
  111. package/render/render.d.ts +4 -0
  112. package/render.d.ts +1 -0
  113. package/render.js +2 -0
  114. package/types/api/getAttributesForm.types.d.ts +31 -0
  115. package/types/api/getCustomer.types.d.ts +13 -0
  116. package/types/api/getGuestOrder.types.d.ts +13 -0
  117. package/types/api/getOrderDetails.types.d.ts +213 -0
  118. package/types/api/guestOrderByToken.types.d.ts +13 -0
  119. package/types/customerDetails.types.d.ts +52 -0
  120. package/types/form.types.d.ts +60 -0
  121. package/types/index.d.ts +12 -0
  122. package/types/orderCancel.types.d.ts +10 -0
  123. package/types/orderSearch.types.d.ts +36 -0
  124. package/types/orderStatus.types.d.ts +41 -0
  125. package/types/shippingStatus.types.d.ts +18 -0
@@ -0,0 +1,113 @@
1
+ declare const _default: {
2
+ "Order": {
3
+ "OrderSearchForm": {
4
+ "title": "Enter your information to view order details",
5
+ "description": "You can find your order number in the receipt you received via email.",
6
+ "button": "View Order",
7
+ "email": "Email",
8
+ "postcode": "Zip Code",
9
+ "orderNumber": "Order Number"
10
+ },
11
+ "Form": {
12
+ "notifications": {
13
+ "requiredFieldError": "This is a required field."
14
+ }
15
+ },
16
+ "ShippingStatusCard": {
17
+ "trackButton": "Track package",
18
+ "carrier": "Carrier:",
19
+ "prepositionOf": "of",
20
+ "shippingCardTitle": "Package details",
21
+ "shippingInfoTitle": "Shipping info",
22
+ "notYetShippedTitle": "Not yet shipped",
23
+ "notYetShippedImagesTitle": "Package contents"
24
+ },
25
+ "OrderStatusContent": {
26
+ "noInfoTitle": "Check back later for more details.",
27
+ "actions": {
28
+ "cancel": "Cancel order",
29
+ "return": "Return or replace",
30
+ "reorder": "Reorder"
31
+ },
32
+ "orderPending": {
33
+ "title": "Pending",
34
+ "message": "The order was successfully placed on {DATE} and your order is processing. Check back for more details when your order ships.",
35
+ "messageWithoutDate": "Your order is processing. Check back for more details when your order ships."
36
+ },
37
+ "orderProcessing": {
38
+ "title": "Processing",
39
+ "message": "The order was successfully placed on {DATE} and your order is processing. Check back for more details when your order ships.",
40
+ "messageWithoutDate": "Your order is processing. Check back for more details when your order ships."
41
+ },
42
+ "orderOnHold": {
43
+ "title": "On hold",
44
+ "message": "We’ve run into an issue while processing your order on {DATE}. Please check back later or contact us at support@adobe.com for more information.",
45
+ "messageWithoutDate": "We’ve run into an issue while processing your order. Please check back later or contact us at support@adobe.com for more information."
46
+ },
47
+ "orderReceived": {
48
+ "title": "Order received",
49
+ "message": "The order was successfully placed on {DATE} and your order is processing. Check back for more details when your order ships.",
50
+ "messageWithoutDate": "Your order is processing. Check back for more details when your order ships."
51
+ },
52
+ "orderComplete": {
53
+ "title": "Complete",
54
+ "message": "Your order is complete. Need help with your order? Contact us at support@adobe.com"
55
+ },
56
+ "orderCanceled": {
57
+ "title": "Canceled",
58
+ "message": "This order was cancelled by you. You should see a refund to your original payment method with 5-7 business days."
59
+ },
60
+ "orderSuspectedFraud": {
61
+ "title": "Suspected fraud",
62
+ "message": "We’ve run into an issue while processing your order on {DATE}. Please check back later or contact us at support@adobe.com for more information.",
63
+ "messageWithoutDate": "We’ve run into an issue while processing your order. Please check back later or contact us at support@adobe.com for more information."
64
+ },
65
+ "orderPaymentReview": {
66
+ "title": "Payment Review",
67
+ "message": "The order was successfully placed on {DATE} and your order is processing. Check back for more details when your order ships.",
68
+ "messageWithoutDate": "Your order is processing. Check back for more details when your order ships."
69
+ },
70
+ "guestOrderCancellationRequested": {
71
+ "title": "cancellation requested",
72
+ "message": "The cancellation has been requested. Check your email for further instructions."
73
+ }
74
+ },
75
+ "CustomerDetails": {
76
+ "headerText": "Customer information",
77
+ "freeShipping": "Free shipping",
78
+ "email": {
79
+ "title": "Contact details"
80
+ },
81
+ "shippingAddress": {
82
+ "title": "Shipping address"
83
+ },
84
+ "shippingMethods": {
85
+ "title": "Shipping method"
86
+ },
87
+ "billingAddress": {
88
+ "title": "Billing address"
89
+ },
90
+ "billingMethods": {
91
+ "title": "Payment method"
92
+ }
93
+ },
94
+ "Errors": {
95
+ "invalidOrder": "Invalid order. Please try again.",
96
+ "invalidSearch": "No order found with these order details."
97
+ },
98
+ "OrderCancel": {
99
+ "buttonText": "Cancel Order"
100
+ },
101
+ "OrderCancellationReasonsModal": {
102
+ "title": "Cancel order",
103
+ "description": "Select a reason for canceling the order",
104
+ "label": "Reason for cancel",
105
+ "button": "Submit Cancellation",
106
+ "errorHeading": "Error",
107
+ "errorDescription": "There was an error processing your order cancellation."
108
+ }
109
+ }
110
+ }
111
+ ;
112
+
113
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export declare const checkIsFunction: (value: any) => value is Function;
2
+ //# sourceMappingURL=checkIsFunction.d.ts.map
@@ -0,0 +1,4 @@
1
+ export declare const convertToCamelCase: (key: string) => string;
2
+ export declare const convertToSnakeCase: (key: string) => string;
3
+ export declare const convertKeysCase: (data: any, type: 'snakeCase' | 'camelCase', dictionary?: Record<string, string>) => any;
4
+ //# sourceMappingURL=convertCase.d.ts.map
@@ -0,0 +1,3 @@
1
+ export declare const convertToInputDateFormat: (dateTimeString: string) => string;
2
+ export declare const converDeliveryOrderDate: (dateTimeString: string) => string;
3
+ //# sourceMappingURL=convertToInputDateFormat.d.ts.map
@@ -0,0 +1,5 @@
1
+ /** Actions */
2
+ export declare const handleFetchError: (errors: Array<{
3
+ message: string;
4
+ }>) => never;
5
+ //# sourceMappingURL=fetch-error.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { NormalizeAddressProps } from '../types';
2
+
3
+ type FormattedFields = NormalizeAddressProps[][];
4
+ export declare const formatAddressFields: (fields: NormalizeAddressProps[]) => FormattedFields;
5
+ export {};
6
+ //# sourceMappingURL=formatAddressFields.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const getFormValues: (form: HTMLFormElement) => any;
2
+ //# sourceMappingURL=getFormValues.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const getQueryParam: (param: string) => string | null;
2
+ //# sourceMappingURL=getQueryParam.d.ts.map
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A function which can be attached to fetchGraphQL to handle thrown errors in
3
+ * a generic way.
4
+ */
5
+ export declare const handleNetworkError: (error: Error) => never;
6
+ //# sourceMappingURL=network-error.d.ts.map
@@ -0,0 +1,3 @@
1
+ export type QueryParams = Record<string, string | number | boolean>;
2
+ export declare const redirectTo: (getUrl?: () => string, queryParams?: QueryParams) => void;
3
+ //# sourceMappingURL=redirectTo.d.ts.map
package/package.json ADDED
@@ -0,0 +1 @@
1
+ {"name": "@dropins/storefront-order", "version": "0.1.0-alpha10", "@dropins/elsie": "0.34.0"}
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent } from 'preact';
2
+
3
+ interface CartProviderProps {
4
+ children?: any;
5
+ }
6
+ export declare const Provider: FunctionComponent<CartProviderProps>;
7
+ export {};
8
+ //# sourceMappingURL=Provider.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './render';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { Render } from '@dropins/tools/types/elsie/src/lib';
2
+
3
+ export declare const render: Render;
4
+ //# sourceMappingURL=render.d.ts.map
package/render.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './render/index'
package/render.js ADDED
@@ -0,0 +1,2 @@
1
+ (function(a,t){try{if(typeof document<"u"){const r=document.createElement("style"),n=t.styleId;for(const e in t.attributes)r.setAttribute(e,t.attributes[e]);r.setAttribute("data-dropin",n),r.appendChild(document.createTextNode(a));const o=document.querySelector('style[data-dropin="sdk"]');if(o)o.after(r);else{const e=document.querySelector('link[rel="stylesheet"], style');e?e.before(r):document.head.append(r)}}}catch(r){console.error("dropin-styles (injectCodeFunction)",r)}})('.order-order-search-form{gap:var(--spacing-small);border-color:transparent}.order-order-search-form .dropin-card__content{padding:var(--spacing-big) var(--spacing-xxbig) var(--spacing-xxbig) var(--spacing-xxbig)}.order-order-search-form p{color:var(--color-neutral-700);font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);margin:0}.order-order-search-form__title{color:var(--color-neutral-800);font:var(--type-headline-2-strong-font);letter-spacing:var(--type-headline-2-strong-letter-spacing);margin:0}.order-order-search-form__wrapper{display:grid;grid-template-columns:1fr;grid-template-rows:auto;grid-template-areas:"email" "postcode" "number" "button";gap:var(--spacing-medium)}.order-order-search-form__wrapper__item--email{grid-area:email}.order-order-search-form__wrapper__item--postcode{grid-area:postcode}.order-order-search-form__wrapper__item--number{grid-area:number}.order-order-search-form__button-container{display:flex;justify-content:flex-end;grid-area:button}.order-order-search-form form button{align-self:flex-end;justify-self:flex-end;margin-top:var(--spacing-small)}@media (min-width: 768px){.order-order-search-form__wrapper{grid-template-columns:1fr 1fr;grid-template-rows:auto auto auto;grid-template-areas:"email postcode" "number number" "button button"}}.order-order-status-content{margin-bottom:var(--spacing-small)}.order-order-status-content.dropin-card--secondary{border:var(--shape-border-width-1) solid var(--color-neutral-400);border-radius:var(--shape-border-radius-1)}.order-order-status-content .dropin-card__content{gap:0}.order-order-status-content__wrapper p{padding:0;margin:0;box-sizing:border-box;font:var(--type-body-1-strong-font);letter-spacing:var(--type-body-1-default-letter-spacing)}.order-order-status-content__wrapper-description{margin-bottom:var(--spacing-medium)}.order-shipping-status-card{margin-bottom:var(--spacing-small)}.order-shipping-status-card .dropin-card__content{gap:0}.order-shipping-status-card.dropin-card--secondary{border:var(--shape-border-width-1) solid var(--color-neutral-400);border-radius:var(--shape-border-radius-1)}.order-shipping-status-card--count-steper{font:var(--type-headline-2-strong-font);letter-spacing:var(--type-headline-2-strong-letter-spacing)}.order-shipping-status-card__header{display:grid;grid-template-columns:1fr auto;justify-items:self-start;align-items:center;margin-bottom:var(--spacing-xsmall)}.order-shipping-status-card__header button{max-height:40px}.order-shipping-status-card__header--content p{margin:0;padding:0;margin-bottom:var(--spacing-xsmall)}.order-shipping-status-card .order-shipping-status-card__images .dropin-content-grid__content{grid-template-columns:repeat(6,max-content)!important;overflow:auto!important}.order-shipping-status-card .order-shipping-status-card__images img{object-fit:contain}.order-order-loaders--card-loader{margin-bottom:var(--spacing-small);border:var(--shape-border-width-1) solid var(--color-neutral-400);border-radius:var(--shape-border-radius-1)}.order-order-actions__wrapper{display:flex;justify-content:space-between;gap:0 var(--spacing-small);margin-bottom:var(--spacing-small);margin-top:var(--spacing-medium)}.order-order-actions__wrapper button{width:100%;font:var(--type-body-1-strong-font);letter-spacing:var(--type-body-1-default-letter-spacing)}.order-order-actions__wrapper--empty{display:none}.order-order-cancel__modal{margin:auto}.order-order-cancel__modal .dropin-modal__header{display:grid;grid-template-columns:1fr auto}.order-order-cancel__title{color:var(--color-neutral-900);font:var(--type-headline-2-strong-font);letter-spacing:var(--type-headline-2-strong-letter-spacing)}.order-order-cancel__text{color:var(--color-neutral-800);font:var(--type-details-caption-1-font);letter-spacing:var(--type-details-caption-1-letter-spacing);padding-bottom:var(--spacing-xsmall)}.order-order-cancel__modal .dropin-modal__header-close-button{align-self:center}.order-order-cancel__button-container{display:grid;margin-top:var(--spacing-xbig);justify-content:end}@media only screen and (min-width: 768px){.dropin-modal__body--medium.order-order-cancel__modal>.dropin-modal__header-title{margin:0 var(--spacing-xxbig) var(--spacing-medium)}}.order-customer-details-content .dropin-card__content{gap:0}.dropin-customer-details .dropin-card--secondary{border:var(--shape-border-width-1) solid var(--color-neutral-400);border-radius:var(--shape-border-radius-1)}.order-customer-details-content__container{display:grid;flex-direction:column;gap:var(--spacing-medium)}@media (min-width: 768px){.order-customer-details-content__container{display:grid;grid-template-columns:max-content max-content;grid-template-rows:auto auto auto;gap:var(--spacing-medium);grid-auto-flow:row}.order-customer-details-content__container-email{grid-area:1 / 1 / 2 / 2}.order-customer-details-content__container-shipping_address{grid-area:2 / 1 / 3 / 2}.order-customer-details-content__container-billing_address{grid-area:2 / 2 / 3 / 3}.order-customer-details-content__container-shipping_methods{grid-area:3 / 1 / 4 / 2}.order-customer-details-content__container-billing_methods{grid-area:3 / 2 / 4 / 3}}.order-customer-details-content__container-title{font:var(--type-body-1-strong-font);letter-spacing:var(--type-body-1-strong-letter-spacing);margin:0 0 var(--spacing-xsmall) 0}.order-customer-details-content__container p{color:var(--color-neutral-800);font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);margin-top:0}.order-customer-details-content__container-billing_methods p{display:grid;gap:0;grid-template-columns:auto 1fr}.order-customer-details-content__container-billing_methods p.order-customer-details-content__container-billing_methods--icon{gap:0 var(--spacing-xsmall)}.order-customer-details-content__container-description p{margin:0;padding:0;display:inline-flex;overflow:hidden}.order-customer-details-content__container-description p:nth-child(1),.order-customer-details-content__container-description p:nth-child(2){text-align:left;cursor:default;margin-bottom:var(--spacing-xsmall)}.order-customer-details-content__container-description p:nth-child(2){position:relative}.order-customer-details-content__container-description p:nth-child(2) span{position:absolute}.order-customer-details-content__container-description p:nth-child(1),.order-customer-details-content__container-description p:nth-child(7){float:left;width:auto;margin-right:var(--spacing-xsmall)}.order-customer-details-content__container-description p:nth-child(5){position:relative;margin-right:var(--spacing-xsmall)}.order-customer-details-content__container-description p:nth-child(5) span{position:absolute}.order-customer-details-content__container-description p:nth-child(2),.order-customer-details-content__container-description p:nth-child(6),.order-customer-details-content__container-description p:nth-child(8){display:inline;width:50%}.order-customer-details-content__container-description p:nth-child(2):after,.order-customer-details-content__container-description p:nth-child(6):after,.order-customer-details-content__container-description p:nth-child(8):after{content:"\\a";white-space:pre;display:block;height:var(--spacing-xsmall)}.order-customer-details-content__container-description p:nth-child(3),.order-customer-details-content__container-description p:nth-child(4),.order-customer-details-content__container-description p:nth-child(n+9){display:block;width:100%;margin-bottom:var(--spacing-xsmall)}',{styleId:"order"});
2
+ import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import{Render as a}from"@dropins/tools/lib.js";import{useState as n,useEffect as d}from"@dropins/tools/preact-hooks.js";import{UIProvider as c}from"@dropins/tools/components.js";import{events as l}from"@dropins/tools/event-bus.js";const u={OrderSearchForm:{title:"Enter your information to view order details",description:"You can find your order number in the receipt you received via email.",button:"View Order",email:"Email",postcode:"Zip Code",orderNumber:"Order Number"},Form:{notifications:{requiredFieldError:"This is a required field."}},ShippingStatusCard:{trackButton:"Track package",carrier:"Carrier:",prepositionOf:"of",shippingCardTitle:"Package details",shippingInfoTitle:"Shipping info",notYetShippedTitle:"Not yet shipped",notYetShippedImagesTitle:"Package contents"},OrderStatusContent:{noInfoTitle:"Check back later for more details.",actions:{cancel:"Cancel order",return:"Return or replace",reorder:"Reorder"},orderPending:{title:"Pending",message:"The order was successfully placed on {DATE} and your order is processing. Check back for more details when your order ships.",messageWithoutDate:"Your order is processing. Check back for more details when your order ships."},orderProcessing:{title:"Processing",message:"The order was successfully placed on {DATE} and your order is processing. Check back for more details when your order ships.",messageWithoutDate:"Your order is processing. Check back for more details when your order ships."},orderOnHold:{title:"On hold",message:"We’ve run into an issue while processing your order on {DATE}. Please check back later or contact us at support@adobe.com for more information.",messageWithoutDate:"We’ve run into an issue while processing your order. Please check back later or contact us at support@adobe.com for more information."},orderReceived:{title:"Order received",message:"The order was successfully placed on {DATE} and your order is processing. Check back for more details when your order ships.",messageWithoutDate:"Your order is processing. Check back for more details when your order ships."},orderComplete:{title:"Complete",message:"Your order is complete. Need help with your order? Contact us at support@adobe.com"},orderCanceled:{title:"Canceled",message:"This order was cancelled by you. You should see a refund to your original payment method with 5-7 business days."},orderSuspectedFraud:{title:"Suspected fraud",message:"We’ve run into an issue while processing your order on {DATE}. Please check back later or contact us at support@adobe.com for more information.",messageWithoutDate:"We’ve run into an issue while processing your order. Please check back later or contact us at support@adobe.com for more information."},orderPaymentReview:{title:"Payment Review",message:"The order was successfully placed on {DATE} and your order is processing. Check back for more details when your order ships.",messageWithoutDate:"Your order is processing. Check back for more details when your order ships."},guestOrderCancellationRequested:{title:"cancellation requested",message:"The cancellation has been requested. Check your email for further instructions."}},CustomerDetails:{headerText:"Customer information",freeShipping:"Free shipping",email:{title:"Contact details"},shippingAddress:{title:"Shipping address"},shippingMethods:{title:"Shipping method"},billingAddress:{title:"Billing address"},billingMethods:{title:"Payment method"}},Errors:{invalidOrder:"Invalid order. Please try again.",invalidSearch:"No order found with these order details."},OrderCancel:{buttonText:"Cancel Order"},OrderCancellationReasonsModal:{title:"Cancel order",description:"Select a reason for canceling the order",label:"Reason for cancel",button:"Submit Cancellation",errorHeading:"Error",errorDescription:"There was an error processing your order cancellation."}},p={Order:u},h={default:p},m=({children:o})=>{const[s,t]=n("en_US");return d(()=>{const e=l.on("locale",i=>{t(i)},{eager:!0});return()=>{e==null||e.off()}},[]),r(c,{lang:s,langDefinitions:h,children:o})},C=new a(r(m,{}));export{C as render};
@@ -0,0 +1,31 @@
1
+ export interface ResponseAttributesFormItemsProps {
2
+ code: string;
3
+ sort_order: string;
4
+ default_value: null | string;
5
+ entity_type: string;
6
+ frontend_class: null | string;
7
+ multiline_count: number;
8
+ frontend_input: string;
9
+ is_required: boolean;
10
+ is_unique: boolean;
11
+ label: string;
12
+ options: {
13
+ is_default: boolean;
14
+ label: string;
15
+ value: string;
16
+ }[];
17
+ }
18
+ export interface GetAttributesFormResponse {
19
+ data: {
20
+ attributesForm: {
21
+ errors?: {
22
+ message: string;
23
+ }[];
24
+ items?: ResponseAttributesFormItemsProps[];
25
+ };
26
+ };
27
+ errors?: {
28
+ message: string;
29
+ }[];
30
+ }
31
+ //# sourceMappingURL=getAttributesForm.types.d.ts.map
@@ -0,0 +1,13 @@
1
+ export interface getCustomerShortResponse {
2
+ data: {
3
+ customer: {
4
+ firstname: string;
5
+ lastname: string;
6
+ email: string;
7
+ };
8
+ };
9
+ errors?: {
10
+ message: string;
11
+ }[];
12
+ }
13
+ //# sourceMappingURL=getCustomer.types.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { OrderProps } from '..';
2
+
3
+ export interface GuestOrderProps extends OrderProps {
4
+ }
5
+ export interface GuestOrderResponse {
6
+ data: {
7
+ guestOrder?: GuestOrderProps;
8
+ };
9
+ errors?: {
10
+ message: string;
11
+ }[];
12
+ }
13
+ //# sourceMappingURL=getGuestOrder.types.d.ts.map
@@ -0,0 +1,213 @@
1
+ export type QueryType = 'orderData';
2
+ export interface UserAddressesProps {
3
+ city?: string;
4
+ company?: string;
5
+ country_code?: string;
6
+ fax?: string;
7
+ firstname?: string;
8
+ lastname?: string;
9
+ middlename?: string;
10
+ postcode?: string;
11
+ prefix?: string;
12
+ region?: string;
13
+ region_id?: number;
14
+ street?: string[];
15
+ suffix?: string;
16
+ telephone?: string;
17
+ vat_id?: string;
18
+ }
19
+ interface ThumbnailImageProps {
20
+ url?: string;
21
+ label?: string;
22
+ }
23
+ export interface ProductProps {
24
+ thumbnail?: ThumbnailImageProps;
25
+ image: ThumbnailImageProps;
26
+ canonical_url: string;
27
+ uid: string;
28
+ name: string;
29
+ __typename: string;
30
+ sku: string;
31
+ price_range: {
32
+ maximum_price: {
33
+ regular_price: MoneyProps;
34
+ };
35
+ };
36
+ }
37
+ export interface MoneyProps {
38
+ value?: number;
39
+ currency?: string;
40
+ }
41
+ interface GrandTotalProps extends MoneyProps {
42
+ }
43
+ interface SubtotalProps extends MoneyProps {
44
+ }
45
+ interface TotalTaxProps extends MoneyProps {
46
+ }
47
+ interface TaxAmountProps extends MoneyProps {
48
+ }
49
+ interface TotalShippingProps extends MoneyProps {
50
+ }
51
+ interface TaxDetailProps {
52
+ amount?: TaxAmountProps;
53
+ rate?: number;
54
+ title?: string;
55
+ }
56
+ export interface DiscountProps {
57
+ amount?: MoneyProps;
58
+ label?: string;
59
+ }
60
+ export interface TotalProps {
61
+ grand_total?: GrandTotalProps;
62
+ subtotal?: SubtotalProps;
63
+ taxes?: TaxDetailProps[];
64
+ total_tax?: TotalTaxProps;
65
+ total_shipping?: TotalShippingProps;
66
+ discounts?: DiscountProps[];
67
+ }
68
+ interface InvoiceItemInterface {
69
+ }
70
+ interface InvoiceProps {
71
+ id?: string;
72
+ number?: string;
73
+ total?: TotalProps;
74
+ items?: InvoiceItemInterface[];
75
+ comments?: {
76
+ message: string;
77
+ timestamp: string;
78
+ }[];
79
+ }
80
+ export interface GiftMessageProps {
81
+ gift_message: {
82
+ form: string;
83
+ message: string;
84
+ to: string;
85
+ };
86
+ }
87
+ export interface GiftWrappingProps {
88
+ gift_wrapping: {
89
+ design: string;
90
+ price: MoneyProps;
91
+ uid: string;
92
+ image: {
93
+ url: string;
94
+ label: string;
95
+ };
96
+ };
97
+ }
98
+ export interface giftCardProps {
99
+ sender_name: string;
100
+ sender_email: string;
101
+ recipient_email: string;
102
+ recipient_name: string;
103
+ }
104
+ export interface OrderItemProps {
105
+ __typename: string;
106
+ discounts: DiscountProps[];
107
+ eligible_for_return: boolean;
108
+ entered_options: {
109
+ label: string;
110
+ value: string;
111
+ }[];
112
+ gift_message: GiftMessageProps;
113
+ gift_wrapping: GiftWrappingProps;
114
+ id: string;
115
+ product: ProductProps;
116
+ product_name: string;
117
+ product_sale_price: MoneyProps;
118
+ product_sku: string;
119
+ product_type: string;
120
+ product_url_key: string;
121
+ quantity_canceled: number;
122
+ quantity_invoiced: number;
123
+ quantity_ordered: number;
124
+ quantity_refunded: number;
125
+ quantity_returned: number;
126
+ quantity_shipped: number;
127
+ selected_options: {
128
+ label: string;
129
+ value: string;
130
+ }[];
131
+ status: string;
132
+ gift_card?: giftCardProps;
133
+ }
134
+ export interface PaymentMethodsProps {
135
+ name: string;
136
+ type: string;
137
+ additional_data: {
138
+ name: string;
139
+ value: string;
140
+ }[];
141
+ }
142
+ export interface ShipmentsProps {
143
+ id: string;
144
+ number: string;
145
+ tracking: {
146
+ carrier: string;
147
+ number: string;
148
+ title: string;
149
+ }[];
150
+ comments: {
151
+ message: string;
152
+ timestamp: string;
153
+ }[];
154
+ items: {
155
+ id: string;
156
+ product_sku: string;
157
+ product_name: string;
158
+ };
159
+ }
160
+ export declare enum AvailableActionsProps {
161
+ CANCEL = "CANCEL",
162
+ RETURN = "RETURN",
163
+ REORDER = "REORDER"
164
+ }
165
+ export interface OrderProps {
166
+ available_actions: AvailableActionsProps[];
167
+ shipping_method: string;
168
+ status: string;
169
+ token: string;
170
+ carrier: string;
171
+ email: string;
172
+ gift_receipt_included: boolean;
173
+ id: string;
174
+ number: string;
175
+ order_date: string;
176
+ printed_card_included: boolean;
177
+ applied_coupons: {
178
+ code: string;
179
+ }[];
180
+ returns: {
181
+ pageSize: number;
182
+ currentPage: number;
183
+ };
184
+ shipments: ShipmentsProps[];
185
+ items_eligible_for_return: OrderItemProps[];
186
+ items: OrderItemProps[];
187
+ gift_wrapping: GiftWrappingProps;
188
+ gift_message: GiftMessageProps;
189
+ payment_methods: PaymentMethodsProps[];
190
+ invoices: InvoiceProps[];
191
+ shipping_address: UserAddressesProps;
192
+ billing_address: UserAddressesProps;
193
+ total?: TotalProps;
194
+ }
195
+ export interface ErrorProps {
196
+ errors?: {
197
+ message?: string;
198
+ }[];
199
+ }
200
+ export interface OrdersResponse extends ErrorProps {
201
+ data?: {
202
+ customer?: {
203
+ orders?: {
204
+ items?: OrderProps[];
205
+ };
206
+ };
207
+ };
208
+ }
209
+ export interface OrderByNumberResponse extends OrdersResponse {
210
+ }
211
+ export type ResponseData<T extends QueryType> = T extends 'orderData' | 'orderSummary' | 'orderStatus' ? OrderByNumberResponse : never;
212
+ export {};
213
+ //# sourceMappingURL=getOrderDetails.types.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { OrderProps } from '..';
2
+
3
+ export interface GuestOrderByTokenProps extends OrderProps {
4
+ }
5
+ export interface GuestOrderByTokenResponse {
6
+ data: {
7
+ guestOrderByToken?: GuestOrderByTokenProps;
8
+ };
9
+ errors?: {
10
+ message: string;
11
+ }[];
12
+ }
13
+ //# sourceMappingURL=guestOrderByToken.types.d.ts.map
@@ -0,0 +1,52 @@
1
+ import { OrderDataModel } from '../data/models';
2
+
3
+ export interface KeysSortOrderProps {
4
+ name: string;
5
+ orderNumber?: number;
6
+ label?: string | null;
7
+ }
8
+ export interface NormalizeAddressProps extends KeysSortOrderProps {
9
+ name: string;
10
+ orderNumber: number;
11
+ value?: string | string[];
12
+ label?: string | null;
13
+ }
14
+ export interface CustomerDetailsProps {
15
+ className?: string;
16
+ paymentIconsMap?: Record<string, string>;
17
+ orderData?: OrderDataModel;
18
+ withHeader?: boolean;
19
+ title?: string;
20
+ }
21
+ export interface UseCustomerDetails {
22
+ orderData?: OrderDataModel;
23
+ }
24
+ export interface CustomerDetailsContentProps extends Omit<CustomerDetailsProps, 'orderData' | 'className'> {
25
+ loading: boolean;
26
+ order?: OrderDataModel;
27
+ normalizeAddress?: {
28
+ billingAddress: NormalizeAddressProps[][];
29
+ shippingAddress: NormalizeAddressProps[][];
30
+ };
31
+ }
32
+ export interface CustomerAddressesModel {
33
+ firstname?: string;
34
+ lastname?: string;
35
+ city?: string;
36
+ company?: string;
37
+ countryCode?: string;
38
+ region?: {
39
+ region: string;
40
+ regionCode: string;
41
+ regionId: string | number;
42
+ };
43
+ telephone?: string;
44
+ id?: string;
45
+ vatId?: string;
46
+ postcode?: string;
47
+ street?: string;
48
+ street_2?: string;
49
+ defaultShipping?: boolean;
50
+ defaultBilling?: boolean;
51
+ }
52
+ //# sourceMappingURL=customerDetails.types.d.ts.map
@@ -0,0 +1,60 @@
1
+ export declare enum FieldEnumList {
2
+ BOOLEAN = "BOOLEAN",
3
+ DATE = "DATE",
4
+ DATETIME = "DATETIME",
5
+ DROPDOWN = "DROPDOWN",
6
+ FILE = "FILE",
7
+ GALLERY = "GALLERY",
8
+ HIDDEN = "HIDDEN",
9
+ IMAGE = "IMAGE",
10
+ MEDIA_IMAGE = "MEDIA_IMAGE",
11
+ MULTILINE = "MULTILINE",
12
+ MULTISELECT = "MULTISELECT",
13
+ PRICE = "PRICE",
14
+ SELECT = "SELECT",
15
+ TEXT = "TEXT",
16
+ TEXTAREA = "TEXTAREA",
17
+ UNDEFINED = "UNDEFINED",
18
+ VISUAL = "VISUAL",
19
+ WEIGHT = "WEIGHT",
20
+ EMPTY = ""
21
+ }
22
+ export interface FieldsProps {
23
+ className: string;
24
+ fieldType: FieldEnumList;
25
+ id: string;
26
+ code: string;
27
+ name: string;
28
+ defaultValue: string | boolean | number;
29
+ entityType: string;
30
+ required: boolean;
31
+ is_unique: boolean;
32
+ label: string;
33
+ orderNumber: number;
34
+ options?: {
35
+ is_default?: boolean;
36
+ label?: string;
37
+ value?: string;
38
+ }[];
39
+ }
40
+ export interface FormProps {
41
+ fieldsConfig?: FieldsProps[] | [];
42
+ name?: string;
43
+ className?: string;
44
+ children?: any;
45
+ loading?: boolean;
46
+ onSubmit?: (event: SubmitEvent, isValid: boolean) => Promise<void | null | undefined>;
47
+ }
48
+ export interface useFormProps extends Omit<FormProps, 'children' | 'className' | 'name'> {
49
+ }
50
+ export type FormValues = Record<string, string | number | boolean | undefined>;
51
+ export interface FormInputsProps {
52
+ className?: string;
53
+ errors?: Record<string, string>;
54
+ values?: FormValues;
55
+ fields?: FieldsProps[];
56
+ loading?: boolean;
57
+ onChange?: (event: Event) => void;
58
+ onBlur?: (event: Event) => void;
59
+ }
60
+ //# sourceMappingURL=form.types.d.ts.map
@@ -0,0 +1,12 @@
1
+ export * from './api/guestOrderByToken.types';
2
+ export * from './api/getOrderDetails.types';
3
+ export * from './api/getGuestOrder.types';
4
+ export * from './api/getAttributesForm.types';
5
+ export * from './api/getCustomer.types';
6
+ export * from './orderSearch.types';
7
+ export * from './form.types';
8
+ export * from './orderStatus.types';
9
+ export * from './shippingStatus.types';
10
+ export * from './customerDetails.types';
11
+ export * from './orderCancel.types';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { ModalProps, ButtonProps, PickerProps } from '@dropins/tools/types/elsie/src/src/components';
2
+
3
+ export interface OrderCancelProps {
4
+ cancelButtonProps?: ButtonProps;
5
+ modalProps?: ModalProps;
6
+ pickerProps?: PickerProps;
7
+ submitButtonProps?: ButtonProps;
8
+ orderId: string;
9
+ }
10
+ //# sourceMappingURL=orderCancel.types.d.ts.map