@dropins/storefront-order 0.1.0-alpha12 → 0.1.0-alpha13
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/api/confirmCancelOrder/confirmCancelOrder.d.ts +16 -0
- package/api/confirmCancelOrder/graphql/ConfirmCancelOrder.d.ts +16 -0
- package/api/confirmCancelOrder/index.d.ts +16 -0
- package/api/getGuestOrder/graphql/index.d.ts +2 -0
- package/api/index.d.ts +2 -0
- package/api/requestGuestOrderCancel/graphql/requestGuestOrderCancelMutation.d.ts +2 -0
- package/api/requestGuestOrderCancel/index.d.ts +2 -0
- package/api/requestGuestOrderCancel/requestGuestOrderCancel.d.ts +2 -0
- package/api.js +5 -5
- package/chunks/getCustomer.js +2 -97
- package/chunks/getGuestOrder.graphql.js +150 -0
- package/chunks/requestGuestOrderCancel.js +97 -0
- package/chunks/useGetStoreConfig.js +1 -0
- package/containers/OrderCancel.js +1 -87
- package/containers/OrderSearch.js +1 -1
- package/containers/OrderStatus.js +20 -1
- package/hooks/containers/useConfirmCancelOrder.d.ts +9 -0
- package/i18n/en_US.json.d.ts +2 -1
- package/package.json +1 -1
- package/render.js +1 -1
- package/types/orderCancel.types.d.ts +5 -2
- package/chunks/customerAddressFragment.graphql.js +0 -55
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
*
|
|
3
|
+
* Copyright 2024 Adobe
|
|
4
|
+
* All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* NOTICE: All information contained herein is, and remains
|
|
7
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
8
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
9
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
10
|
+
* property laws, including trade secret and copyright laws.
|
|
11
|
+
* Dissemination of this information or reproduction of this material
|
|
12
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
13
|
+
* from Adobe.
|
|
14
|
+
*******************************************************************/
|
|
15
|
+
export declare const confirmCancelOrder: (orderId: string, confirmationKey: string) => Promise<any>;
|
|
16
|
+
//# sourceMappingURL=confirmCancelOrder.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
*
|
|
3
|
+
* Copyright 2024 Adobe
|
|
4
|
+
* All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* NOTICE: All information contained herein is, and remains
|
|
7
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
8
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
9
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
10
|
+
* property laws, including trade secret and copyright laws.
|
|
11
|
+
* Dissemination of this information or reproduction of this material
|
|
12
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
13
|
+
* from Adobe.
|
|
14
|
+
*******************************************************************/
|
|
15
|
+
export declare const CONFIRM_CANCEL_ORDER_MUTATION: string;
|
|
16
|
+
//# sourceMappingURL=ConfirmCancelOrder.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
*
|
|
3
|
+
* Copyright 2024 Adobe
|
|
4
|
+
* All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* NOTICE: All information contained herein is, and remains
|
|
7
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
8
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
9
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
10
|
+
* property laws, including trade secret and copyright laws.
|
|
11
|
+
* Dissemination of this information or reproduction of this material
|
|
12
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
13
|
+
* from Adobe.
|
|
14
|
+
*******************************************************************/
|
|
15
|
+
export * from './confirmCancelOrder';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
package/api/index.d.ts
CHANGED
package/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Initializer as E}from"@dropins/tools/lib.js";import{events as s}from"@dropins/tools/event-bus.js";import{f as i,h as n}from"./chunks/fetch-graphql.js";import{g as L,r as
|
|
1
|
+
import{Initializer as E}from"@dropins/tools/lib.js";import{events as s}from"@dropins/tools/event-bus.js";import{f as i,h as n}from"./chunks/fetch-graphql.js";import{g as L,r as x,s as P,a as U,b as Y}from"./chunks/fetch-graphql.js";import{h as m}from"./chunks/network-error.js";import{P as l,a as u,G as c,O as _,B as p,b as R}from"./chunks/transform-order-details.js";import{O as h,A as D}from"./chunks/getGuestOrder.graphql.js";import{t as f}from"./chunks/getCustomer.js";import{g as Q,a as z}from"./chunks/getCustomer.js";import{g as K}from"./chunks/getAttributesForm.js";import{g as J}from"./chunks/getStoreConfig.js";import{g as W}from"./chunks/getCustomerOrdersReturn.js";import{c as Z,r as ee}from"./chunks/requestGuestOrderCancel.js";import"@dropins/tools/fetch-graphql.js";import"./chunks/convertCase.js";const I=`
|
|
2
2
|
query ORDER_BY_NUMBER($orderNumber: String!) {
|
|
3
3
|
customer {
|
|
4
4
|
orders(
|
|
@@ -83,12 +83,12 @@ query ORDER_BY_NUMBER($orderNumber: String!) {
|
|
|
83
83
|
}
|
|
84
84
|
${l}
|
|
85
85
|
${u}
|
|
86
|
-
${_}
|
|
87
86
|
${c}
|
|
87
|
+
${_}
|
|
88
88
|
${p}
|
|
89
89
|
${h}
|
|
90
90
|
${D}
|
|
91
|
-
`,
|
|
91
|
+
`,G=async(e,r)=>await i(I,{method:"GET",cache:"force-cache",variables:{orderNumber:e}}).then(t=>{var a;return(a=t.errors)!=null&&a.length?n(t.errors):R(r??"orderData",t)}).catch(m),T=`
|
|
92
92
|
query ORDER_BY_TOKEN($token: String!) {
|
|
93
93
|
guestOrderByToken(input: { token: $token }) {
|
|
94
94
|
email
|
|
@@ -173,9 +173,9 @@ query ORDER_BY_TOKEN($token: String!) {
|
|
|
173
173
|
}
|
|
174
174
|
${l}
|
|
175
175
|
${u}
|
|
176
|
-
${_}
|
|
177
176
|
${c}
|
|
177
|
+
${_}
|
|
178
178
|
${p}
|
|
179
179
|
${h}
|
|
180
180
|
${D}
|
|
181
|
-
`,
|
|
181
|
+
`,b=async e=>await i(T,{method:"GET",cache:"no-cache",variables:{token:e}}).then(r=>{var t;return(t=r.errors)!=null&&t.length?n(r.errors):f(r)}).catch(m),g=async e=>{var d;const r=(e==null?void 0:e.orderRef)??"",t=r&&typeof(e==null?void 0:e.orderRef)=="string"&&((d=e==null?void 0:e.orderRef)==null?void 0:d.length)>20,a=(e==null?void 0:e.orderData)??null;if(a){s.emit("order/data",a);return}if(!r){console.error("Order Token or number not received.");return}const o=t?await b(r):await G(r);o?s.emit("order/data",o):s.emit("order/error",{source:"order",type:"network",error:"The data was not received."})},O=new E({init:async e=>{const r={};O.config.setConfig({...r,...e}),g(e).catch(console.error)},listeners:()=>[]}),F=O.config;export{Z as cancelOrder,F as config,i as fetchGraphQl,K as getAttributesForm,L as getConfig,Q as getCustomer,W as getCustomerOrdersReturn,z as getGuestOrder,G as getOrderDetailsById,J as getStoreConfig,b as guestOrderByToken,O as initialize,x as removeFetchGraphQlHeader,ee as requestGuestOrderCancel,P as setEndpoint,U as setFetchGraphQlHeader,Y as setFetchGraphQlHeaders};
|
package/chunks/getCustomer.js
CHANGED
|
@@ -1,99 +1,4 @@
|
|
|
1
|
-
import{h
|
|
2
|
-
fragment guestOrderData on CustomerOrder {
|
|
3
|
-
email
|
|
4
|
-
id
|
|
5
|
-
number
|
|
6
|
-
order_date
|
|
7
|
-
order_status_change_date
|
|
8
|
-
status
|
|
9
|
-
token
|
|
10
|
-
carrier
|
|
11
|
-
shipping_method
|
|
12
|
-
printed_card_included
|
|
13
|
-
gift_receipt_included
|
|
14
|
-
available_actions
|
|
15
|
-
is_virtual
|
|
16
|
-
payment_methods {
|
|
17
|
-
name
|
|
18
|
-
type
|
|
19
|
-
}
|
|
20
|
-
applied_coupons {
|
|
21
|
-
code
|
|
22
|
-
}
|
|
23
|
-
shipments {
|
|
24
|
-
id
|
|
25
|
-
tracking {
|
|
26
|
-
title
|
|
27
|
-
number
|
|
28
|
-
carrier
|
|
29
|
-
}
|
|
30
|
-
comments {
|
|
31
|
-
message
|
|
32
|
-
timestamp
|
|
33
|
-
}
|
|
34
|
-
items {
|
|
35
|
-
id
|
|
36
|
-
product_sku
|
|
37
|
-
product_name
|
|
38
|
-
order_item {
|
|
39
|
-
...OrderItemDetails
|
|
40
|
-
... on GiftCardOrderItem {
|
|
41
|
-
...GiftCardDetails
|
|
42
|
-
product {
|
|
43
|
-
...ProductDetails
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
payment_methods {
|
|
50
|
-
name
|
|
51
|
-
type
|
|
52
|
-
}
|
|
53
|
-
shipping_address {
|
|
54
|
-
...AddressesList
|
|
55
|
-
}
|
|
56
|
-
billing_address {
|
|
57
|
-
...AddressesList
|
|
58
|
-
}
|
|
59
|
-
items {
|
|
60
|
-
...OrderItemDetails
|
|
61
|
-
... on BundleOrderItem {
|
|
62
|
-
...BundleOrderItemDetails
|
|
63
|
-
}
|
|
64
|
-
... on GiftCardOrderItem {
|
|
65
|
-
...GiftCardDetails
|
|
66
|
-
product {
|
|
67
|
-
...ProductDetails
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
... on DownloadableOrderItem {
|
|
71
|
-
product_name
|
|
72
|
-
downloadable_links {
|
|
73
|
-
sort_order
|
|
74
|
-
title
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
total {
|
|
79
|
-
...OrderSummary
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
${l}
|
|
83
|
-
${o}
|
|
84
|
-
${E}
|
|
85
|
-
${O}
|
|
86
|
-
${T}
|
|
87
|
-
${s}
|
|
88
|
-
${D}
|
|
89
|
-
`,R=`
|
|
90
|
-
query GET_GUEST_ORDER($input: OrderInformationInput!) {
|
|
91
|
-
guestOrder(input:$input) {
|
|
92
|
-
...guestOrderData
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
${G}
|
|
96
|
-
`,M=async t=>await c(R,{method:"GET",cache:"no-cache",variables:{input:t}}).then(r=>{var a;return(a=r.errors)!=null&&a.length?n(r.errors):h(r)}).catch(u),g=`
|
|
1
|
+
import{h}from"./network-error.js";import{f,h as i}from"./fetch-graphql.js";import{a as O}from"./getGuestOrder.graphql.js";import{t as l}from"./transform-order-details.js";const T=t=>{var r,u;if(!((r=t==null?void 0:t.data)!=null&&r.guestOrder))return null;const a=(u=t==null?void 0:t.data)==null?void 0:u.guestOrder;return l(a)},k=t=>{var r,u;if(!((r=t==null?void 0:t.data)!=null&&r.guestOrderByToken))return null;const a=(u=t==null?void 0:t.data)==null?void 0:u.guestOrderByToken;return l(a)},g=t=>{var a,r,u,c,m,d;return{email:((r=(a=t==null?void 0:t.data)==null?void 0:a.customer)==null?void 0:r.email)||"",firstname:((c=(u=t==null?void 0:t.data)==null?void 0:u.customer)==null?void 0:c.firstname)||"",lastname:((d=(m=t==null?void 0:t.data)==null?void 0:m.customer)==null?void 0:d.lastname)||""}},B=async t=>await f(O,{method:"GET",cache:"no-cache",variables:{input:t}}).then(a=>{var r;return(r=a.errors)!=null&&r.length?i(a.errors):T(a)}).catch(h),E=`
|
|
97
2
|
query GET_CUSTOMER {
|
|
98
3
|
customer {
|
|
99
4
|
firstname
|
|
@@ -101,4 +6,4 @@ ${G}
|
|
|
101
6
|
email
|
|
102
7
|
}
|
|
103
8
|
}
|
|
104
|
-
|
|
9
|
+
`,C=async()=>await f(E,{method:"GET",cache:"force-cache"}).then(t=>{var a;return(a=t.errors)!=null&&a.length?i(t.errors):g(t)}).catch(h);export{B as a,C as g,k as t};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import{P as e,a as t,G as r,O as a,B as s}from"./transform-order-details.js";const d=`
|
|
2
|
+
fragment OrderSummary on OrderTotal {
|
|
3
|
+
grand_total {
|
|
4
|
+
value
|
|
5
|
+
currency
|
|
6
|
+
}
|
|
7
|
+
total_giftcard {
|
|
8
|
+
currency
|
|
9
|
+
value
|
|
10
|
+
}
|
|
11
|
+
subtotal {
|
|
12
|
+
currency
|
|
13
|
+
value
|
|
14
|
+
}
|
|
15
|
+
taxes {
|
|
16
|
+
amount {
|
|
17
|
+
currency
|
|
18
|
+
value
|
|
19
|
+
}
|
|
20
|
+
rate
|
|
21
|
+
title
|
|
22
|
+
}
|
|
23
|
+
total_tax {
|
|
24
|
+
currency
|
|
25
|
+
value
|
|
26
|
+
}
|
|
27
|
+
total_shipping {
|
|
28
|
+
currency
|
|
29
|
+
value
|
|
30
|
+
}
|
|
31
|
+
discounts {
|
|
32
|
+
amount {
|
|
33
|
+
currency
|
|
34
|
+
value
|
|
35
|
+
}
|
|
36
|
+
label
|
|
37
|
+
}
|
|
38
|
+
}`,n=`
|
|
39
|
+
fragment AddressesList on OrderAddress {
|
|
40
|
+
city
|
|
41
|
+
company
|
|
42
|
+
country_code
|
|
43
|
+
fax
|
|
44
|
+
firstname
|
|
45
|
+
lastname
|
|
46
|
+
middlename
|
|
47
|
+
postcode
|
|
48
|
+
prefix
|
|
49
|
+
region
|
|
50
|
+
region_id
|
|
51
|
+
street
|
|
52
|
+
suffix
|
|
53
|
+
telephone
|
|
54
|
+
vat_id
|
|
55
|
+
}`,i=`
|
|
56
|
+
fragment guestOrderData on CustomerOrder {
|
|
57
|
+
email
|
|
58
|
+
id
|
|
59
|
+
number
|
|
60
|
+
order_date
|
|
61
|
+
order_status_change_date
|
|
62
|
+
status
|
|
63
|
+
token
|
|
64
|
+
carrier
|
|
65
|
+
shipping_method
|
|
66
|
+
printed_card_included
|
|
67
|
+
gift_receipt_included
|
|
68
|
+
available_actions
|
|
69
|
+
is_virtual
|
|
70
|
+
payment_methods {
|
|
71
|
+
name
|
|
72
|
+
type
|
|
73
|
+
}
|
|
74
|
+
applied_coupons {
|
|
75
|
+
code
|
|
76
|
+
}
|
|
77
|
+
shipments {
|
|
78
|
+
id
|
|
79
|
+
tracking {
|
|
80
|
+
title
|
|
81
|
+
number
|
|
82
|
+
carrier
|
|
83
|
+
}
|
|
84
|
+
comments {
|
|
85
|
+
message
|
|
86
|
+
timestamp
|
|
87
|
+
}
|
|
88
|
+
items {
|
|
89
|
+
id
|
|
90
|
+
product_sku
|
|
91
|
+
product_name
|
|
92
|
+
order_item {
|
|
93
|
+
...OrderItemDetails
|
|
94
|
+
... on GiftCardOrderItem {
|
|
95
|
+
...GiftCardDetails
|
|
96
|
+
product {
|
|
97
|
+
...ProductDetails
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
payment_methods {
|
|
104
|
+
name
|
|
105
|
+
type
|
|
106
|
+
}
|
|
107
|
+
shipping_address {
|
|
108
|
+
...AddressesList
|
|
109
|
+
}
|
|
110
|
+
billing_address {
|
|
111
|
+
...AddressesList
|
|
112
|
+
}
|
|
113
|
+
items {
|
|
114
|
+
...OrderItemDetails
|
|
115
|
+
... on BundleOrderItem {
|
|
116
|
+
...BundleOrderItemDetails
|
|
117
|
+
}
|
|
118
|
+
... on GiftCardOrderItem {
|
|
119
|
+
...GiftCardDetails
|
|
120
|
+
product {
|
|
121
|
+
...ProductDetails
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
... on DownloadableOrderItem {
|
|
125
|
+
product_name
|
|
126
|
+
downloadable_links {
|
|
127
|
+
sort_order
|
|
128
|
+
title
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
total {
|
|
133
|
+
...OrderSummary
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
${e}
|
|
137
|
+
${t}
|
|
138
|
+
${r}
|
|
139
|
+
${a}
|
|
140
|
+
${s}
|
|
141
|
+
${d}
|
|
142
|
+
${n}
|
|
143
|
+
`,_=`
|
|
144
|
+
query GET_GUEST_ORDER($input: OrderInformationInput!) {
|
|
145
|
+
guestOrder(input:$input) {
|
|
146
|
+
...guestOrderData
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
${i}
|
|
150
|
+
`;export{n as A,i as G,d as O,_ as a};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import{P as _,a as l,G as E,O as c,B as m,t as d}from"./transform-order-details.js";import{O,A as D,G as R}from"./getGuestOrder.graphql.js";import{f as i,h as u}from"./fetch-graphql.js";const T=`
|
|
2
|
+
mutation CANCEL_ORDER_MUTATION($orderId: ID!, $reason: String!) {
|
|
3
|
+
cancelOrder(input: { order_id: $orderId, reason: $reason }) {
|
|
4
|
+
error
|
|
5
|
+
order {
|
|
6
|
+
email
|
|
7
|
+
available_actions
|
|
8
|
+
status
|
|
9
|
+
number
|
|
10
|
+
id
|
|
11
|
+
order_date
|
|
12
|
+
carrier
|
|
13
|
+
shipping_method
|
|
14
|
+
is_virtual
|
|
15
|
+
applied_coupons {
|
|
16
|
+
code
|
|
17
|
+
}
|
|
18
|
+
shipments {
|
|
19
|
+
id
|
|
20
|
+
number
|
|
21
|
+
tracking {
|
|
22
|
+
title
|
|
23
|
+
number
|
|
24
|
+
carrier
|
|
25
|
+
}
|
|
26
|
+
comments {
|
|
27
|
+
message
|
|
28
|
+
timestamp
|
|
29
|
+
}
|
|
30
|
+
items {
|
|
31
|
+
id
|
|
32
|
+
product_sku
|
|
33
|
+
product_name
|
|
34
|
+
order_item {
|
|
35
|
+
...OrderItemDetails
|
|
36
|
+
... on GiftCardOrderItem {
|
|
37
|
+
...GiftCardDetails
|
|
38
|
+
product {
|
|
39
|
+
...ProductDetails
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
payment_methods {
|
|
46
|
+
name
|
|
47
|
+
type
|
|
48
|
+
}
|
|
49
|
+
shipping_address {
|
|
50
|
+
...AddressesList
|
|
51
|
+
}
|
|
52
|
+
billing_address {
|
|
53
|
+
...AddressesList
|
|
54
|
+
}
|
|
55
|
+
items {
|
|
56
|
+
...OrderItemDetails
|
|
57
|
+
... on BundleOrderItem {
|
|
58
|
+
...BundleOrderItemDetails
|
|
59
|
+
}
|
|
60
|
+
... on GiftCardOrderItem {
|
|
61
|
+
...GiftCardDetails
|
|
62
|
+
product {
|
|
63
|
+
...ProductDetails
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
... on DownloadableOrderItem {
|
|
67
|
+
product_name
|
|
68
|
+
downloadable_links {
|
|
69
|
+
sort_order
|
|
70
|
+
title
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
total {
|
|
75
|
+
...OrderSummary
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
${_}
|
|
81
|
+
${l}
|
|
82
|
+
${E}
|
|
83
|
+
${c}
|
|
84
|
+
${m}
|
|
85
|
+
${O}
|
|
86
|
+
${D}
|
|
87
|
+
`,G=async(r,e,o,n)=>{if(!r)throw new Error("No order ID found");if(!e)throw new Error("No reason found");return i(T,{variables:{orderId:r,reason:e}}).then(({errors:t,data:a})=>{if(t)return u(t);if(a.cancelOrder.error!=null){n();return}const s=d(a.cancelOrder.order);o(s)})},A=`
|
|
88
|
+
mutation REQUEST_GUEST_ORDER_CANCEL_MUTATION($token: String!, $reason: String!) {
|
|
89
|
+
requestGuestOrderCancel(input: { token: $token, reason: $reason }) {
|
|
90
|
+
error
|
|
91
|
+
order {
|
|
92
|
+
...guestOrderData
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
${R}
|
|
97
|
+
`,C=async(r,e,o,n)=>{if(!r)throw new Error("No order token found");if(!e)throw new Error("No reason found");return i(A,{variables:{token:r,reason:e}}).then(({errors:t,data:a})=>{if(t)return u(t);if(a.requestGuestOrderCancel.error!=null)return n(),!1;const s=d(a.requestGuestOrderCancel.order);return o(s),!0})};export{G as c,C as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useState as i,useEffect as s}from"@dropins/tools/preact-hooks.js";import{g as f}from"./getStoreConfig.js";const c=()=>{const[n,e]=i(null);return s(()=>{const o=sessionStorage.getItem("orderStoreConfig"),r=o?JSON.parse(o):null;r?e(r):f().then(t=>{t&&(sessionStorage.setItem("orderStoreConfig",JSON.stringify(t)),e(t))})},[]),n};export{c as u};
|
|
@@ -1,87 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
mutation CANCEL_ORDER_MUTATION($orderId: ID!, $reason: String!) {
|
|
3
|
-
cancelOrder(input: { order_id: $orderId, reason: $reason }) {
|
|
4
|
-
error
|
|
5
|
-
order {
|
|
6
|
-
email
|
|
7
|
-
available_actions
|
|
8
|
-
status
|
|
9
|
-
number
|
|
10
|
-
id
|
|
11
|
-
order_date
|
|
12
|
-
carrier
|
|
13
|
-
shipping_method
|
|
14
|
-
is_virtual
|
|
15
|
-
applied_coupons {
|
|
16
|
-
code
|
|
17
|
-
}
|
|
18
|
-
shipments {
|
|
19
|
-
id
|
|
20
|
-
number
|
|
21
|
-
tracking {
|
|
22
|
-
title
|
|
23
|
-
number
|
|
24
|
-
carrier
|
|
25
|
-
}
|
|
26
|
-
comments {
|
|
27
|
-
message
|
|
28
|
-
timestamp
|
|
29
|
-
}
|
|
30
|
-
items {
|
|
31
|
-
id
|
|
32
|
-
product_sku
|
|
33
|
-
product_name
|
|
34
|
-
order_item {
|
|
35
|
-
...OrderItemDetails
|
|
36
|
-
... on GiftCardOrderItem {
|
|
37
|
-
...GiftCardDetails
|
|
38
|
-
product {
|
|
39
|
-
...ProductDetails
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
payment_methods {
|
|
46
|
-
name
|
|
47
|
-
type
|
|
48
|
-
}
|
|
49
|
-
shipping_address {
|
|
50
|
-
...AddressesList
|
|
51
|
-
}
|
|
52
|
-
billing_address {
|
|
53
|
-
...AddressesList
|
|
54
|
-
}
|
|
55
|
-
items {
|
|
56
|
-
...OrderItemDetails
|
|
57
|
-
... on BundleOrderItem {
|
|
58
|
-
...BundleOrderItemDetails
|
|
59
|
-
}
|
|
60
|
-
... on GiftCardOrderItem {
|
|
61
|
-
...GiftCardDetails
|
|
62
|
-
product {
|
|
63
|
-
...ProductDetails
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
... on DownloadableOrderItem {
|
|
67
|
-
product_name
|
|
68
|
-
downloadable_links {
|
|
69
|
-
sort_order
|
|
70
|
-
title
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
total {
|
|
75
|
-
...OrderSummary
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
${g}
|
|
81
|
-
${S}
|
|
82
|
-
${h}
|
|
83
|
-
${I}
|
|
84
|
-
${A}
|
|
85
|
-
${b}
|
|
86
|
-
${N}
|
|
87
|
-
`,U=async(a,r,e,s)=>{if(!a)throw new Error("No order ID found");if(!r)throw new Error("No reason found");return F(B,{variables:{orderId:a,reason:r}}).then(({errors:t,data:o})=>{if(t)return L(t);if(o.cancelOrder.error!=null){s();return}const i=T(o.cancelOrder.order);e(i)})},k=()=>{const[a,r]=c(null);return v(()=>{const e=sessionStorage.getItem("orderStoreConfig"),s=e?JSON.parse(e):null;s?r(s):G().then(t=>{t&&(sessionStorage.setItem("orderStoreConfig",JSON.stringify(t)),r(t))})},[]),a},nr=({orderId:a})=>{const r=k(),e=(r==null?void 0:r.orderCancellationReasons)??[];return n(f,{children:n(P,{orderId:a,cancelOrder:U,cancelReasons:(t=>t.map((o,i)=>({text:o==null?void 0:o.description,value:i.toString()})))(e)})})};export{nr as OrderCancel,nr as default};
|
|
1
|
+
import{jsxs as g,jsx as e}from"@dropins/tools/preact-jsx-runtime.js";import{u as h}from"../chunks/useGetStoreConfig.js";import{InLineAlert as v,Picker as x,Button as S}from"@dropins/tools/components.js";import{F}from"../chunks/OrderCancelReasonsForm.js";import"@dropins/tools/lib.js";import"@dropins/tools/preact-compat.js";import{useState as d}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/preact.js";import{events as u}from"@dropins/tools/event-bus.js";import{useText as E,Text as p}from"@dropins/tools/i18n.js";import{c as _,r as D}from"../chunks/requestGuestOrderCancel.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/transform-order-details.js";import"../chunks/convertCase.js";import"../chunks/getGuestOrder.graphql.js";const L=({pickerProps:s,submitButtonProps:o,cancelReasons:n,cancelOrder:i,orderRef:m})=>{const a=E({ErrorHeading:"Order.OrderCancellationReasonsForm.errorHeading",ErrorDescription:"Order.OrderCancellationReasonsForm.errorDescription",orderCancellationLabel:"Order.OrderCancellationReasonsForm.label"}),[r,c]=d(0),[f,C]=d(!1),[O,b]=d(!1);u.on("authenticated",t=>{t&&b(!0)},{eager:!0});const R=t=>{t.preventDefault();const l=Number(t.target.value);c(l)};return g(F,{onSubmit:async t=>(t.preventDefault(),i(m,n[r].text,l=>{O||(l.status="guest order cancellation requested"),u.emit("order/data",l)},()=>{C(!0)})),"data-testid":"order-order-cancel-reasons-form__text",children:[f&&e(v,{heading:a.ErrorHeading,description:a.ErrorDescription}),e("div",{className:"order-order-cancel-reasons-form__text",children:e(p,{id:"Order.OrderCancellationReasonsForm.description"})}),e(x,{name:"cancellationReasons",floatingLabel:a.orderCancellationLabel,defaultOption:n[0],variant:"primary",options:n,value:String(r),handleSelect:R,required:!0,"data-testid":"order-cancellation-reasons-selector",...s}),e("div",{className:"order-order-cancel-reasons-form__button-container",children:e(S,{variant:"primary","data-testid":"order-cancel-submit-button",...o,children:e(p,{id:"Order.OrderCancellationReasonsForm.button"})})})]})},Q=({orderRef:s})=>{const o=h(),n=(o==null?void 0:o.orderCancellationReasons)??[];let i=_;return s.length>20&&(i=D),e(L,{orderRef:s,cancelOrder:i,cancelReasons:(a=>a.map((r,c)=>({text:r==null?void 0:r.description,value:c.toString()})))(n)})};export{Q as OrderCancel,Q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as v,jsx as s}from"@dropins/tools/preact-jsx-runtime.js";import{classes as _}from"@dropins/tools/lib.js";import{Card as U,InLineAlert as C,Icon as x,Button as V}from"@dropins/tools/components.js";import{F as L}from"../chunks/OrderCancelReasonsForm.js";import*as R from"@dropins/tools/preact-compat.js";import{useState as D,useCallback as O,useEffect as g,useMemo as k}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/preact.js";import{events as w}from"@dropins/tools/event-bus.js";import{Text as S,useText as H}from"@dropins/tools/i18n.js";import{g as A,a as P}from"../chunks/getCustomer.js";import"../chunks/network-error.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/
|
|
1
|
+
import{jsxs as v,jsx as s}from"@dropins/tools/preact-jsx-runtime.js";import{classes as _}from"@dropins/tools/lib.js";import{Card as U,InLineAlert as C,Icon as x,Button as V}from"@dropins/tools/components.js";import{F as L}from"../chunks/OrderCancelReasonsForm.js";import*as R from"@dropins/tools/preact-compat.js";import{useState as D,useCallback as O,useEffect as g,useMemo as k}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/preact.js";import{events as w}from"@dropins/tools/event-bus.js";import{Text as S,useText as H}from"@dropins/tools/i18n.js";import{g as A,a as P}from"../chunks/getCustomer.js";import"../chunks/network-error.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/getGuestOrder.graphql.js";import"../chunks/transform-order-details.js";import"../chunks/convertCase.js";const X=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{vectorEffect:"non-scaling-stroke",fillRule:"evenodd",clipRule:"evenodd",d:"M1 20.8953L12.1922 1.5L23.395 20.8953H1ZM13.0278 13.9638L13.25 10.0377V9H11.25V10.0377L11.4722 13.9638H13.0278ZM11.2994 16V17.7509H13.2253V16H11.2994Z",fill:"currentColor"})),B=({onSubmit:e,loading:t,inLineAlert:o,fieldsConfig:a})=>v(U,{variant:"secondary",className:"order-order-search-form",children:[s("h2",{className:"order-order-search-form__title",children:s(S,{id:"Order.OrderSearchForm.title"})}),s("p",{children:s(S,{id:"Order.OrderSearchForm.description"})}),o.text?s(C,{"data-testid":"orderAlert",className:"order-order-search-form__alert",type:o.type,variant:"secondary",heading:o.text,icon:s(x,{source:X})}):null,s(L,{className:"order-order-search-form__wrapper",name:"orderSearchForm",loading:t,fieldsConfig:a,onSubmit:e,children:s("div",{className:"order-order-search-form__button-container",children:s(V,{className:"order-order-search-form__button",size:"medium",variant:"primary",type:"submit",disabled:t,children:s(S,{id:"Order.OrderSearchForm.button"})},"logIn")})})]});var T=(e=>(e.BOOLEAN="BOOLEAN",e.DATE="DATE",e.DATETIME="DATETIME",e.DROPDOWN="DROPDOWN",e.FILE="FILE",e.GALLERY="GALLERY",e.HIDDEN="HIDDEN",e.IMAGE="IMAGE",e.MEDIA_IMAGE="MEDIA_IMAGE",e.MULTILINE="MULTILINE",e.MULTISELECT="MULTISELECT",e.PRICE="PRICE",e.SELECT="SELECT",e.TEXT="TEXT",e.TEXTAREA="TEXTAREA",e.UNDEFINED="UNDEFINED",e.VISUAL="VISUAL",e.WEIGHT="WEIGHT",e.EMPTY="",e))(T||{});const j=e=>{if(!e)return null;const t=new FormData(e);if(e.querySelectorAll('input[type="checkbox"]').forEach(a=>{t.has(a.name)||t.set(a.name,"false"),a.checked&&t.set(a.name,"true")}),t&&typeof t.entries=="function"){const a=t.entries();if(a&&typeof a[Symbol.iterator]=="function")return JSON.parse(JSON.stringify(Object.fromEntries(a)))||{}}return{}},p=(e,t)=>{if(typeof e!="function")return;const o=e();if(!t||Object.keys(t).length===0){window.location.href=o;return}const a=new URLSearchParams;Object.entries(t).forEach(([u,d])=>{a.append(u,String(d))});const c=o.includes("?")?"&":"?";window.location.href=`${o}${c}${a.toString()}`},I=e=>{try{return new URL(window.location.href).searchParams.get(e)}catch{return null}},q=({onError:e,isAuth:t,renderSignIn:o,routeCustomerOrder:a,routeGuestOrder:c})=>{const[u,d]=D({text:"",type:"success"}),[E,h]=D(!1),m=H({invalidSearch:"Order.Errors.invalidSearch",email:"Order.OrderSearchForm.email",postcode:"Order.OrderSearchForm.postcode",number:"Order.OrderSearchForm.orderNumber"}),b=O(async r=>{const n=I("orderRef"),i=n&&n.length>20;if(!r&&!n||!(r!=null&&r.number)&&!(r!=null&&r.token)&&!n)return null;if(t){const f=await A();(f==null?void 0:f.email)===r.email?p(a,{orderRef:r==null?void 0:r.number}):i||p(c,{orderRef:r.token})}else i||p(c,{orderRef:r==null?void 0:r.token})},[t,a,c]);g(()=>{const r=w.on("order/data",n=>{b(n)},{eager:!0});return()=>{r==null||r.off()}},[b]),g(()=>{const r=I("orderRef"),n=r&&r.length>20?r:null;r&&(n?p(c,{orderRef:r}):t?p(a,{orderRef:r}):o==null||o({render:!0,formValues:{number:r}}))},[t,a,c,o]);const M=k(()=>[{entityType:"CUSTOMER_ADDRESS",is_unique:!1,label:m.email,options:[],defaultValue:"",fieldType:T.TEXT,className:"",required:!0,orderNumber:1,name:"email",id:"email",code:"email"},{entityType:"CUSTOMER_ADDRESS",is_unique:!1,label:m.postcode,options:[],defaultValue:"",fieldType:T.TEXT,className:"",required:!0,orderNumber:2,name:"postcode",id:"postcode",code:"postcode"},{entityType:"CUSTOMER_ADDRESS",is_unique:!1,label:m.number,options:[],defaultValue:"",fieldType:T.TEXT,className:"",required:!0,orderNumber:3,name:"number",id:"number",code:"number"}],[m]);return{onSubmit:O(async(r,n)=>{if(!n)return null;h(!0);const i=j(r.target);await P(i).then(l=>{l||d({text:m.invalidSearch,type:"warning"}),w.emit("order/data",l)}).catch(async l=>{var N;let f=!0;e==null||e({error:l.message});const y=t?await A():{email:""};(y==null?void 0:y.email)===(i==null?void 0:i.email)?(f=!1,p(a,{orderRef:i.number})):f=o==null?void 0:o({render:(N=l==null?void 0:l.message)==null?void 0:N.includes("Please login to view the order."),formValues:i}),f&&d({text:l.message,type:"warning"})}).finally(()=>{h(!1)})},[t,e,o,a,m.invalidSearch]),inLineAlert:u,loading:E,normalizeFieldsConfig:M}},ce=({className:e,isAuth:t,renderSignIn:o,routeCustomerOrder:a,routeGuestOrder:c,onError:u})=>{const{onSubmit:d,loading:E,inLineAlert:h,normalizeFieldsConfig:m}=q({onError:u,isAuth:t,renderSignIn:o,routeCustomerOrder:a,routeGuestOrder:c});return s("div",{className:_(["order-order-search",e]),children:s(B,{onSubmit:d,loading:E,inLineAlert:h,fieldsConfig:m})})};export{ce as OrderSearch,ce as default};
|
|
@@ -1 +1,20 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as i,jsxs as g,Fragment as v}from"@dropins/tools/preact-jsx-runtime.js";import{Card as A,Header as I,Button as p,InLineAlert as T}from"@dropins/tools/components.js";import"../chunks/OrderCancelReasonsForm.js";import{Slot as x,classes as S}from"@dropins/tools/lib.js";import{useMemo as L,useState as $}from"@dropins/tools/preact-compat.js";import{useText as u}from"@dropins/tools/i18n.js";import{useState as R,useEffect as E}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/preact.js";import{events as y}from"@dropins/tools/event-bus.js";import{C as U}from"../chunks/OrderLoaders.js";import{G as K}from"../chunks/getGuestOrder.graphql.js";import{f as M,h as F}from"../chunks/fetch-graphql.js";import{t as P}from"../chunks/transform-order-details.js";import{u as G}from"../chunks/useGetStoreConfig.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/convertCase.js";import"../chunks/getStoreConfig.js";const h={pending:"orderPending",shiping:"orderShipped",complete:"orderComplete",processing:"orderProcessing","on hold":"orderOnHold",canceled:"orderCanceled","suspected fraud":"orderSuspectedFraud","payment Review":"orderPaymentReview","order received":"orderReceived","guest order cancellation requested":"guestOrderCancellationRequested"},H=({slots:r,title:d,status:o,orderData:e})=>{const s=String(o).toLocaleLowerCase(),t=u(`Order.OrderStatusContent.${h[s]}.title`),n=u(`Order.OrderStatusContent.${h[s]}.message`),c=u(`Order.OrderStatusContent.${h[s]}.messageWithoutDate`);if(!o)return i("div",{});const a=e!=null&&e.orderStatusChangeDate?n==null?void 0:n.message.replace("{DATE}",e==null?void 0:e.orderStatusChangeDate):c.messageWithoutDate;return g(A,{className:"order-order-status-content",variant:"secondary",children:[i(I,{title:d??t.title}),g("div",{className:"order-order-status-content__wrapper",children:[i("div",{className:"order-order-status-content__wrapper-description",children:i("p",{children:a})}),i(V,{orderData:e,slots:r})]})]})};var C=(r=>(r.CANCEL="CANCEL",r.RETURN="RETURN",r.REORDER="REORDER",r))(C||{});const V=({className:r,children:d,orderData:o,slots:e,...s})=>{const t=u({cancel:"Order.OrderStatusContent.actions.cancel",return:"Order.OrderStatusContent.actions.return",reorder:"Order.OrderStatusContent.actions.reorder"}),n=L(()=>{const c=o==null?void 0:o.availableActions,a=!!(c!=null&&c.length);return i(v,{children:e!=null&&e.OrderActions?i(x,{"data-testid":"OrderActionsSlot",name:"OrderCanceledActions",slot:e==null?void 0:e.OrderActions,context:o}):i("div",{"data-testid":"availableActionsList",className:S(["order-order-actions__wrapper",["order-order-actions__wrapper--empty",!a]]),children:c==null?void 0:c.map(m=>{switch(m){case C.CANCEL:return i(p,{variant:"secondary",children:t.cancel});case C.RETURN:return i(p,{variant:"secondary",children:t.return});case C.REORDER:return i(p,{variant:"secondary",children:t.reorder})}})})})},[o,e==null?void 0:e.OrderActions,t]);return i("div",{...s,className:S(["order-order-actions",r]),children:n})},W=({orderData:r})=>{const[d,o]=R(r),[e,s]=R(r==null?void 0:r.status);return E(()=>{const t=y.on("order/data",n=>{o(n),s(n.status)},{eager:!0});return()=>{t==null||t.off()}},[]),{orderStatus:e,order:d}},j=`
|
|
2
|
+
mutation CONFIRM_CANCEL_ORDER_MUTATION(
|
|
3
|
+
$orderId: ID!,
|
|
4
|
+
$confirmationKey: String!
|
|
5
|
+
) {
|
|
6
|
+
confirmCancelOrder(input: {
|
|
7
|
+
order_id: $orderId,
|
|
8
|
+
confirmation_key: $confirmationKey
|
|
9
|
+
}) {
|
|
10
|
+
order {
|
|
11
|
+
...guestOrderData
|
|
12
|
+
}
|
|
13
|
+
errorV2 {
|
|
14
|
+
message
|
|
15
|
+
code
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
${K}
|
|
20
|
+
`,q=async(r,d)=>M(j,{variables:{orderId:r,confirmationKey:d}}).then(async({errors:o,data:e})=>{var n,c,a,m;const s=[...(n=e==null?void 0:e.confirmCancelOrder)!=null&&n.errorV2?[(c=e==null?void 0:e.confirmCancelOrder)==null?void 0:c.errorV2]:[],...o??[]];let t=null;return(a=e==null?void 0:e.confirmCancelOrder)!=null&&a.order&&(t=P((m=e==null?void 0:e.confirmCancelOrder)==null?void 0:m.order),y.emit("order/data",t)),s.length>0?F(s):t}),b=({enableOrderCancellation:r})=>{const d=u({orderCancelled:"Order.OrderStatusContent.orderCanceled.message"}),[o,e]=R({text:"",status:void 0});return E(()=>{if(!r)return;const s=new URLSearchParams(window.location.search),t=s.get("orderId"),n=s.get("confirmationKey");t&&n&&q(atob(t),n).then(()=>{e({text:d.orderCancelled,status:"success"})}).catch(c=>{e({text:c.message,status:"warning"})})},[r,d.orderCancelled]),{confirmOrderCancellation:o}},de=({slots:r,orderData:d,className:o,statusTitle:e,status:s})=>{const{orderStatus:t,order:n}=W({orderData:d}),[c,a]=$(!1),m=()=>{a(!0);const O=new URL(window.location.href),_=O.searchParams.get("orderId"),w=O.searchParams.get("confirmationKey");_&&w&&(O.searchParams.delete("orderId"),O.searchParams.delete("confirmationKey"),window.history.replaceState({},document.title,O.toString()))},N=u({cancelOrder:"Order.OrderStatusContent.actions.cancel"}),f=G(),{confirmOrderCancellation:l}=b({enableOrderCancellation:f==null?void 0:f.orderCancellationEnabled});return g("div",{className:S(["order-order-status",o]),children:[!c&&(l==null?void 0:l.status)!==void 0&&i(T,{heading:N.cancelOrder,onDismiss:m,description:l.text,type:l.status}),n?i(H,{title:e,status:s||t,slots:r,orderData:n}):i(U,{withCard:!1})]})};export{de as OrderStatus,de as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConfirmCancelOrderProps } from '../../types';
|
|
2
|
+
|
|
3
|
+
export declare const useConfirmCancelOrder: ({ enableOrderCancellation, }: ConfirmCancelOrderProps) => {
|
|
4
|
+
confirmOrderCancellation: {
|
|
5
|
+
text: string;
|
|
6
|
+
status: 'success' | 'error' | 'warning' | undefined;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useConfirmCancelOrder.d.ts.map
|
package/i18n/en_US.json.d.ts
CHANGED
|
@@ -118,7 +118,8 @@ declare const _default: {
|
|
|
118
118
|
},
|
|
119
119
|
"orderCanceled": {
|
|
120
120
|
"title": "Canceled",
|
|
121
|
-
"message": "This order was cancelled by you. You should see a refund to your original payment method with 5-7 business days."
|
|
121
|
+
"message": "This order was cancelled by you. You should see a refund to your original payment method with 5-7 business days.",
|
|
122
|
+
"messageWithoutDate": "This order was cancelled by you. You should see a refund to your original payment method with 5-7 business days."
|
|
122
123
|
},
|
|
123
124
|
"orderSuspectedFraud": {
|
|
124
125
|
"title": "Suspected fraud",
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name": "@dropins/storefront-order", "version": "0.1.0-
|
|
1
|
+
{"name": "@dropins/storefront-order", "version": "0.1.0-alpha13", "@dropins/elsie": "0.34.0"}
|
package/render.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
(function(n,e){try{if(typeof document<"u"){const r=document.createElement("style"),a=e.styleId;for(const t in e.attributes)r.setAttribute(t,e.attributes[t]);r.setAttribute("data-dropin",a),r.appendChild(document.createTextNode(n));const o=document.querySelector('style[data-dropin="sdk"]');if(o)o.after(r);else{const t=document.querySelector('link[rel="stylesheet"], style');t?t.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-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-empty-list{margin-bottom:var(--spacing-small);border:var(--shape-border-width-1) solid var(--color-neutral-400);border-radius:var(--shape-border-radius-1)}.order-empty-list.order-empty-list--minified,.order-empty-list .dropin-card{border:none}.order-empty-list .dropin-card__content{gap:0;padding:var(--spacing-xxbig)}.order-empty-list.order-empty-list--minified .dropin-card__content{flex-direction:row;align-items:center;padding:var(--spacing-big) var(--spacing-small)}.order-empty-list .dropin-card__content svg{width:64px;height:64px;margin-bottom:var(--spacing-medium)}.order-empty-list.order-empty-list--minified .dropin-card__content svg{margin:0 var(--spacing-small) 0 0;width:32px;height:32px}.order-empty-list .dropin-card__content svg path{fill:var(--color-neutral-800)}.order-empty-list.order-empty-list--minified .dropin-card__content svg path{fill:var(--color-neutral-500)}.order-empty-list--empty-box .dropin-card__content svg path{fill:var(--color-neutral-500)}.order-empty-list .dropin-card__content p{font:var(--type-headline-1-font);letter-spacing:var(--type-headline-1-letter-spacing);color:var(--color-neutral-800)}.order-empty-list.order-empty-list--minified .dropin-card__content p{font:var(--type-body-1-strong-font);color:var(--color-neutral-800)}.order-returns-list-content .dropin-header-container,.order-returns-list-content__cards-list{margin-bottom:var(--spacing-small)}.order-returns-list-content__cards-list .dropin-card__content{gap:0}.order-returns-list-content__cards-grid{display:grid;grid-template-columns:1fr 1fr auto;gap:0px 0px;grid-template-areas:"descriptions descriptions actions" "images images actions"}.order-returns-list-content__descriptions{grid-area:descriptions}.order-returns-list-content__descriptions p{margin:0;padding:0;margin-bottom:var(--spacing-xsmall);box-sizing:border-box;font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing);color:var(--color-neutral-800)}.order-returns-list-content__descriptions p a{display:inline-block;font:var(--type-button-2-font);letter-spacing:var(--type-button-2-letter-spacing);color:var(--color-brand-800);border-bottom:1px solid currentColor}.order-returns-list-content__descriptions p a:hover{text-decoration:none;color:var(--color-brand-800)}.order-returns-list-content .order-returns-list-content__actions{margin:0;padding:0;border:none;background-color:transparent;cursor:pointer;text-decoration:none}.order-returns-list-content .order-returns-list-content__actions:hover{text-decoration:none;color:var(--color-brand-500)}.order-returns-list-content__card .dropin-card__content{padding:var(--spacing-small) var(--spacing-medium)}.order-returns-list-content__card .order-returns-list-content__card-wrapper{display:flex;justify-content:space-between;align-items:center;color:var(--color-neutral-800);height:calc(88px - var(--spacing-small) * 2)}.order-returns-list-content__card-wrapper>p{font:var(--type-button-2-font);letter-spacing:var(--type-button-2-letter-spacing)}.order-returns-list-content__card-wrapper svg{color:var(--color-neutral-800)}.order-returns-list-content__images{grid-area:images}.order-returns-list-content__actions{grid-area:actions;align-self:center}.order-returns-list-content .order-returns-list-content__images{overflow:auto}.order-returns-list-content .order-returns-list-content__images .dropin-content-grid__content{grid-template-columns:repeat(6,max-content)!important}.order-returns-list-content .order-returns-list-content__images-3 .dropin-content-grid__content{grid-template-columns:repeat(3,max-content)!important}.order-returns-list-content .order-returns-list-content__images img{object-fit:contain;width:65px;height:65px}.order-order-product-list-content__items{display:grid;gap:var(--spacing-medium);list-style:none;margin:0;padding:0}.order-order-product-list-content__items .dropin-card__content{gap:var(--spacing-xsmall)}.order-order-product-list-content .dropin-cart-item__alert{margin-top:var(--spacing-xsmall)}.order-order-product-list-content .cart-summary-item__title--strikethrough{text-decoration:line-through;color:var(--color-neutral-500);font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing)}@media only screen and (min-width: 320px) and (max-width: 768px){.order-confirmation-cart-summary-item{margin-bottom:var(--spacing-medium)}}.order-cost-summary-content .dropin-card__content{gap:0}.order-cost-summary-content__description{margin-bottom:var(--spacing-xsmall)}.order-cost-summary-content__description .order-cost-summary-content__description--header,.order-cost-summary-content__description .order-cost-summary-content__description--subheader{display:flex;justify-content:space-between;align-items:center}.order-cost-summary-content__description .order-cost-summary-content__description--header span{color:var(--color-neutral-800);font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing)}.order-cost-summary-content__description--subheader{margin-top:var(--spacing-xxsmall)}.order-cost-summary-content__description--subheader span{font:var(--type-details-caption-2-font);letter-spacing:var(--type-details-caption-2-letter-spacing);color:var(--color-brand-700)}.order-cost-summary-content__description--subtotal .order-cost-summary-content__description--subheader,.order-cost-summary-content__description--shipping .order-cost-summary-content__description--subheader{display:flex;justify-content:flex-start;align-items:center;gap:0 var(--spacing-xxsmall)}.order-cost-summary-content__description--subtotal .order-cost-summary-content__description--subheader .dropin-price,.order-cost-summary-content__description--shipping .order-cost-summary-content__description--subheader .dropin-price{font:var(--type-details-overline-font)}.order-cost-summary-content__description--discount .order-cost-summary-content__description--header span:last-child{color:var(--color-alert-800)}.order-cost-summary-content__description--discount .order-cost-summary-content__description--subheader span:first-child{display:flex;justify-content:flex-start;align-items:flex-end;gap:0 var(--spacing-xsmall)}.order-cost-summary-content__description--discount .order-cost-summary-content__description--subheader span:first-child span{font:var(--type-details-caption-1-font);letter-spacing:var(--type-details-caption-1-letter-spacing);color:var(--color-neutral-700)}.order-cost-summary-content__description--discount .order-cost-summary-content__description--subheader .dropin-price{font:var(--type-details-caption-1-font);letter-spacing:var(--type-details-caption-1-letter-spacing);color:var(--color-alert-800)}.order-cost-summary-content__description--total{margin-top:var(--spacing-medium)}.order-cost-summary-content__description--total .order-cost-summary-content__description--header span{font:var(--type-body-1-emphasized-font);letter-spacing:var(--type-body-1-emphasized-letter-spacing)}.order-cost-summary-content__accordion .dropin-accordion-section .dropin-accordion-section__content-container{gap:var(--spacing-small);margin:var(--spacing-small) 0}.order-cost-summary-content__accordion-row{display:flex;justify-content:space-between;align-items:center}.order-cost-summary-content__accordion-row p{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing)}.order-cost-summary-content__accordion-row p:first-child{color:var(--color-neutral-700)}.order-cost-summary-content__accordion .order-cost-summary-content__accordion-row.order-cost-summary-content__accordion-total p:first-child{font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing)}.order-order-cancel-reasons-form__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-reasons-form__button-container{display:grid;margin-top:var(--spacing-xbig);justify-content:end}',{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 l}from"@dropins/tools/components.js";import{events as c}from"@dropins/tools/event-bus.js";const u={OrderCostSummary:{headerText:"Order summary",subtotal:{title:"Subtotal"},shipping:{title:"Shipping",freeShipping:"Free shipping"},tax:{accordionTitle:"Taxes",accordionTotalTax:"Tax Total",totalExcludingTaxes:"Total excluding taxes",title:"Tax",incl:"Including taxes",excl:"Excluding taxes"},discount:{title:"Discount",subtitle:"discounted"},total:{title:"Total"}},Returns:{minifiedView:{returnsList:{viewAllOrdersButton:"View all returns",ariaLabelLink:"Redirect to full order information",emptyOrdersListMessage:"No returns",minifiedViewTitle:"Recent returns",orderNumber:"Order Number:",carrier:"Carrier:",itemsText:"items"}},fullSizeView:{returnsList:{viewAllOrdersButton:"View all orders",ariaLabelLink:"Redirect to full order information",emptyOrdersListMessage:"No returns",minifiedViewTitle:"Returns",orderNumber:"Order Number:",carrier:"Carrier:",itemsText:"items"}}},OrderProductListContent:{cancelledTitle:"Cancelled",allOrdersTitle:"Your order",downloadableCount:"Files",stockStatus:{inStock:"In stock",outOfStock:"Out of stock"},GiftCard:{sender:"Sender",recipient:"Recipient",message:"Note"}},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 on {DATE}. Check your email for further instructions.",messageWithoutDate:"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"},OrderCancellationReasonsForm:{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."}},m={Order:u},p={default:m},h=({children:o})=>{const[t,i]=n("en_US");return d(()=>{const e=c.on("locale",s=>{i(s)},{eager:!0});return()=>{e==null||e.off()}},[]),r(l,{lang:t,langDefinitions:p,children:o})},k=new a(r(h,{}));export{k as render};
|
|
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 l}from"@dropins/tools/components.js";import{events as c}from"@dropins/tools/event-bus.js";const u={OrderCostSummary:{headerText:"Order summary",subtotal:{title:"Subtotal"},shipping:{title:"Shipping",freeShipping:"Free shipping"},tax:{accordionTitle:"Taxes",accordionTotalTax:"Tax Total",totalExcludingTaxes:"Total excluding taxes",title:"Tax",incl:"Including taxes",excl:"Excluding taxes"},discount:{title:"Discount",subtitle:"discounted"},total:{title:"Total"}},Returns:{minifiedView:{returnsList:{viewAllOrdersButton:"View all returns",ariaLabelLink:"Redirect to full order information",emptyOrdersListMessage:"No returns",minifiedViewTitle:"Recent returns",orderNumber:"Order Number:",carrier:"Carrier:",itemsText:"items"}},fullSizeView:{returnsList:{viewAllOrdersButton:"View all orders",ariaLabelLink:"Redirect to full order information",emptyOrdersListMessage:"No returns",minifiedViewTitle:"Returns",orderNumber:"Order Number:",carrier:"Carrier:",itemsText:"items"}}},OrderProductListContent:{cancelledTitle:"Cancelled",allOrdersTitle:"Your order",downloadableCount:"Files",stockStatus:{inStock:"In stock",outOfStock:"Out of stock"},GiftCard:{sender:"Sender",recipient:"Recipient",message:"Note"}},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.",messageWithoutDate:"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 on {DATE}. Check your email for further instructions.",messageWithoutDate:"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"},OrderCancellationReasonsForm:{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."}},m={Order:u},p={default:m},h=({children:o})=>{const[t,i]=n("en_US");return d(()=>{const e=c.on("locale",s=>{i(s)},{eager:!0});return()=>{e==null||e.off()}},[]),r(l,{lang:t,langDefinitions:p,children:o})},k=new a(r(h,{}));export{k as render};
|
|
@@ -2,13 +2,16 @@ import { ButtonProps, PickerProps } from '@dropins/tools/types/elsie/src/src/com
|
|
|
2
2
|
import { PickerOption } from '@dropins/tools/types/elsie/src/components';
|
|
3
3
|
|
|
4
4
|
export interface OrderCancelProps {
|
|
5
|
-
|
|
5
|
+
orderRef: string;
|
|
6
6
|
}
|
|
7
7
|
export interface OrderCancelReasonFormProps {
|
|
8
|
-
|
|
8
|
+
orderRef: string;
|
|
9
9
|
pickerProps?: PickerProps;
|
|
10
10
|
submitButtonProps?: ButtonProps;
|
|
11
11
|
cancelOrder: (orderId: string, reason: string, onSuccess: Function, onError: Function) => Promise<void | null | undefined>;
|
|
12
12
|
cancelReasons: PickerOption[];
|
|
13
13
|
}
|
|
14
|
+
export interface ConfirmCancelOrderProps {
|
|
15
|
+
enableOrderCancellation: boolean | undefined;
|
|
16
|
+
}
|
|
14
17
|
//# sourceMappingURL=orderCancel.types.d.ts.map
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
const e=`
|
|
2
|
-
fragment OrderSummary on OrderTotal {
|
|
3
|
-
grand_total {
|
|
4
|
-
value
|
|
5
|
-
currency
|
|
6
|
-
}
|
|
7
|
-
total_giftcard {
|
|
8
|
-
currency
|
|
9
|
-
value
|
|
10
|
-
}
|
|
11
|
-
subtotal {
|
|
12
|
-
currency
|
|
13
|
-
value
|
|
14
|
-
}
|
|
15
|
-
taxes {
|
|
16
|
-
amount {
|
|
17
|
-
currency
|
|
18
|
-
value
|
|
19
|
-
}
|
|
20
|
-
rate
|
|
21
|
-
title
|
|
22
|
-
}
|
|
23
|
-
total_tax {
|
|
24
|
-
currency
|
|
25
|
-
value
|
|
26
|
-
}
|
|
27
|
-
total_shipping {
|
|
28
|
-
currency
|
|
29
|
-
value
|
|
30
|
-
}
|
|
31
|
-
discounts {
|
|
32
|
-
amount {
|
|
33
|
-
currency
|
|
34
|
-
value
|
|
35
|
-
}
|
|
36
|
-
label
|
|
37
|
-
}
|
|
38
|
-
}`,r=`
|
|
39
|
-
fragment AddressesList on OrderAddress {
|
|
40
|
-
city
|
|
41
|
-
company
|
|
42
|
-
country_code
|
|
43
|
-
fax
|
|
44
|
-
firstname
|
|
45
|
-
lastname
|
|
46
|
-
middlename
|
|
47
|
-
postcode
|
|
48
|
-
prefix
|
|
49
|
-
region
|
|
50
|
-
region_id
|
|
51
|
-
street
|
|
52
|
-
suffix
|
|
53
|
-
telephone
|
|
54
|
-
vat_id
|
|
55
|
-
}`;export{r as A,e as O};
|