@commercelayer/app-elements 0.1.0 → 0.2.0
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/README.md +14 -48
- package/dist/{InputDateComponent-4461b3e6.js → InputDateComponent-926e5e6d.js} +133 -134
- package/dist/dictionaries/customers.d.ts +6 -0
- package/dist/dictionaries/orders.d.ts +4 -3
- package/dist/dictionaries/returns.d.ts +16 -0
- package/dist/dictionaries/types.d.ts +7 -0
- package/dist/helpers/appsNavigation.d.ts +5 -5
- package/dist/main-d208b3aa.js +29029 -0
- package/dist/main.d.ts +10 -8
- package/dist/main.js +141 -140
- package/dist/style.css +1 -1
- package/dist/ui/forms/InputCurrencyRange.d.ts +1 -1
- package/dist/ui/forms/InputSelect/{Async.d.ts → AsyncComponent.d.ts} +1 -4
- package/dist/ui/forms/InputSelect/HookedInputSelect.d.ts +1 -4
- package/dist/ui/forms/InputSelect/InputSelect.d.ts +61 -52
- package/dist/ui/forms/InputSelect/{Select.d.ts → SelectComponent.d.ts} +1 -4
- package/dist/ui/forms/InputSelect/index.d.ts +2 -1
- package/dist/ui/forms/InputSelect/overrides.d.ts +5 -1
- package/dist/ui/forms/InputSelect/utils.d.ts +48 -0
- package/dist/ui/internals/InputWrapper.d.ts +16 -5
- package/dist/ui/resources/{LineItems.d.ts → ResourceLineItems.d.ts} +1 -1
- package/dist/ui/resources/ResourceList/ResourceList.d.ts +5 -5
- package/dist/ui/resources/ResourceListItem/ResourceListItem.d.ts +26 -0
- package/dist/ui/resources/ResourceListItem/ResourceListItem.mocks.d.ts +399 -0
- package/dist/ui/resources/ResourceListItem/common.d.ts +14 -0
- package/dist/ui/resources/ResourceListItem/index.d.ts +1 -0
- package/dist/ui/resources/ResourceListItem/transformers/customers.d.ts +3 -0
- package/dist/ui/resources/ResourceListItem/transformers/index.d.ts +3 -0
- package/dist/ui/resources/ResourceListItem/transformers/orders.d.ts +3 -0
- package/dist/ui/resources/ResourceListItem/transformers/returns.d.ts +3 -0
- package/dist/ui/resources/ResourceListItem/types.d.ts +15 -0
- package/dist/ui/resources/{ListItemsMetadata.d.ts → ResourceListItemsMetadata.d.ts} +1 -2
- package/dist/ui/resources/{OrderSummary.d.ts → ResourceOrderSummary.d.ts} +1 -1
- package/dist/ui/resources/{OrderTimeline.d.ts → ResourceOrderTimeline.d.ts} +1 -1
- package/dist/ui/resources/{ShipmentParcels.d.ts → ResourceShipmentParcels.d.ts} +1 -1
- package/dist/ui/resources/ResourceTags.d.ts +1 -0
- package/dist/ui/resources/useResourceFilters/index.d.ts +1 -0
- package/dist/ui/resources/{Filters/useFilters.d.ts → useResourceFilters/useResourceFilters.d.ts} +5 -5
- package/package.json +2 -1
- package/dist/Async-566ec3f7.js +0 -99
- package/dist/Select-89937223.js +0 -38
- package/dist/main-795be39b.js +0 -24377
- package/dist/overrides-346bb0f6.js +0 -4225
- package/dist/ui/resources/Filters/index.d.ts +0 -5
- package/dist/ui/resources/ListItemOrder.d.ts +0 -8
- package/dist/unsupportedIterableToArray-a3020d44.js +0 -126
- /package/dist/ui/{resources/Filters → forms/InputSelect}/utils.test.d.ts +0 -0
- /package/dist/ui/resources/{LineItems.mocks.d.ts → ResourceLineItems.mocks.d.ts} +0 -0
- /package/dist/ui/resources/{Filters/adaptFormValuesToSdk.test.d.ts → ResourceLineItems.test.d.ts} +0 -0
- /package/dist/ui/resources/{Filters/adaptFormValuesToUrlQuery.test.d.ts → ResourceListItemsMetadata.test.d.ts} +0 -0
- /package/dist/ui/resources/{Filters/adaptUrlQueryToFormValues.test.d.ts → ResourceOrderSummary.test.d.ts} +0 -0
- /package/dist/ui/resources/{ShipmentParcels.mocks.d.ts → ResourceShipmentParcels.mocks.d.ts} +0 -0
- /package/dist/ui/resources/{Filters/adaptUrlQueryToSdk.test.d.ts → ResourceShipmentParcels.test.d.ts} +0 -0
- /package/dist/ui/resources/{Filters → useResourceFilters}/FieldCurrencyRange.d.ts +0 -0
- /package/dist/ui/resources/{Filters → useResourceFilters}/FieldItem.d.ts +0 -0
- /package/dist/ui/resources/{Filters → useResourceFilters}/FieldTimeRange.d.ts +0 -0
- /package/dist/ui/resources/{Filters → useResourceFilters}/FiltersForm.d.ts +0 -0
- /package/dist/ui/resources/{Filters → useResourceFilters}/FiltersNav.d.ts +0 -0
- /package/dist/ui/resources/{Filters → useResourceFilters}/FiltersSearchBar.d.ts +0 -0
- /package/dist/ui/resources/{Filters → useResourceFilters}/adaptFormValuesToSdk.d.ts +0 -0
- /package/dist/ui/resources/{Filters/adaptUrlQueryToUrlQuery.test.d.ts → useResourceFilters/adaptFormValuesToSdk.test.d.ts} +0 -0
- /package/dist/ui/resources/{Filters → useResourceFilters}/adaptFormValuesToUrlQuery.d.ts +0 -0
- /package/dist/ui/resources/{Filters/timeUtils.test.d.ts → useResourceFilters/adaptFormValuesToUrlQuery.test.d.ts} +0 -0
- /package/dist/ui/resources/{Filters → useResourceFilters}/adaptUrlQueryToFormValues.d.ts +0 -0
- /package/dist/ui/resources/{LineItems.test.d.ts → useResourceFilters/adaptUrlQueryToFormValues.test.d.ts} +0 -0
- /package/dist/ui/resources/{Filters → useResourceFilters}/adaptUrlQueryToSdk.d.ts +0 -0
- /package/dist/ui/resources/{ListItemOrder.test.d.ts → useResourceFilters/adaptUrlQueryToSdk.test.d.ts} +0 -0
- /package/dist/ui/resources/{Filters → useResourceFilters}/adaptUrlQueryToUrlQuery.d.ts +0 -0
- /package/dist/ui/resources/{ListItemsMetadata.test.d.ts → useResourceFilters/adaptUrlQueryToUrlQuery.test.d.ts} +0 -0
- /package/dist/ui/resources/{Filters → useResourceFilters}/adapters.d.ts +0 -0
- /package/dist/ui/resources/{Filters → useResourceFilters}/adapters.types.d.ts +0 -0
- /package/dist/ui/resources/{Filters → useResourceFilters}/mockedInstructions.d.ts +0 -0
- /package/dist/ui/resources/{Filters → useResourceFilters}/timeUtils.d.ts +0 -0
- /package/dist/ui/resources/{OrderSummary.test.d.ts → useResourceFilters/timeUtils.test.d.ts} +0 -0
- /package/dist/ui/resources/{Filters → useResourceFilters}/types.d.ts +0 -0
- /package/dist/ui/resources/{Filters → useResourceFilters}/utils.d.ts +0 -0
- /package/dist/ui/resources/{ShipmentParcels.test.d.ts → useResourceFilters/utils.test.d.ts} +0 -0
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
export declare const presetResourceListItem: {
|
|
2
|
+
orderAwaitingApproval: {
|
|
3
|
+
readonly type: "orders";
|
|
4
|
+
readonly id: "";
|
|
5
|
+
readonly updated_at: "2023-06-10T06:38:44.964Z";
|
|
6
|
+
readonly placed_at: "2023-06-09T11:00:00.000Z";
|
|
7
|
+
readonly created_at: "";
|
|
8
|
+
readonly formatted_total_amount: "$650.00";
|
|
9
|
+
readonly fulfillment_status: "unfulfilled";
|
|
10
|
+
readonly number: 123456;
|
|
11
|
+
readonly payment_status: "authorized";
|
|
12
|
+
readonly status: "placed";
|
|
13
|
+
readonly market: {
|
|
14
|
+
readonly type: "markets";
|
|
15
|
+
readonly id: "";
|
|
16
|
+
readonly name: "Europe";
|
|
17
|
+
readonly created_at: "";
|
|
18
|
+
readonly updated_at: "";
|
|
19
|
+
readonly shared_secret: "";
|
|
20
|
+
};
|
|
21
|
+
readonly billing_address: {
|
|
22
|
+
readonly first_name: "Bruce";
|
|
23
|
+
readonly last_name: "Wayne";
|
|
24
|
+
readonly type: "addresses";
|
|
25
|
+
readonly id: "";
|
|
26
|
+
readonly updated_at: "";
|
|
27
|
+
readonly created_at: "";
|
|
28
|
+
readonly line_1: "";
|
|
29
|
+
readonly state_code: "";
|
|
30
|
+
readonly phone: "";
|
|
31
|
+
readonly city: "";
|
|
32
|
+
readonly country_code: "";
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
orderFulfilled: {
|
|
36
|
+
type: "orders";
|
|
37
|
+
id: string;
|
|
38
|
+
created_at: string;
|
|
39
|
+
updated_at: string;
|
|
40
|
+
placed_at: string;
|
|
41
|
+
number: number;
|
|
42
|
+
status: "approved";
|
|
43
|
+
payment_status: "paid";
|
|
44
|
+
fulfillment_status: "fulfilled";
|
|
45
|
+
formatted_total_amount: string;
|
|
46
|
+
market: {
|
|
47
|
+
readonly type: "markets";
|
|
48
|
+
readonly id: "";
|
|
49
|
+
readonly name: "Europe";
|
|
50
|
+
readonly created_at: "";
|
|
51
|
+
readonly updated_at: "";
|
|
52
|
+
readonly shared_secret: "";
|
|
53
|
+
};
|
|
54
|
+
billing_address: {
|
|
55
|
+
first_name: string;
|
|
56
|
+
last_name: string;
|
|
57
|
+
company: string;
|
|
58
|
+
type: "addresses";
|
|
59
|
+
id: string;
|
|
60
|
+
updated_at: string;
|
|
61
|
+
created_at: string;
|
|
62
|
+
line_1: string;
|
|
63
|
+
state_code: string;
|
|
64
|
+
phone: string;
|
|
65
|
+
city: string;
|
|
66
|
+
country_code: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
orderPending: {
|
|
70
|
+
type: "orders";
|
|
71
|
+
id: string;
|
|
72
|
+
created_at: string;
|
|
73
|
+
updated_at: string;
|
|
74
|
+
number: number;
|
|
75
|
+
status: "pending";
|
|
76
|
+
payment_status: "unpaid";
|
|
77
|
+
fulfillment_status: "unfulfilled";
|
|
78
|
+
formatted_total_amount: string;
|
|
79
|
+
market: {
|
|
80
|
+
readonly type: "markets";
|
|
81
|
+
readonly id: "";
|
|
82
|
+
readonly name: "Europe";
|
|
83
|
+
readonly created_at: "";
|
|
84
|
+
readonly updated_at: "";
|
|
85
|
+
readonly shared_secret: "";
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
orderEditing: {
|
|
89
|
+
type: "orders";
|
|
90
|
+
id: string;
|
|
91
|
+
created_at: string;
|
|
92
|
+
updated_at: string;
|
|
93
|
+
number: number;
|
|
94
|
+
status: "editing";
|
|
95
|
+
payment_status: "authorized";
|
|
96
|
+
fulfillment_status: "unfulfilled";
|
|
97
|
+
formatted_total_amount: string;
|
|
98
|
+
market: {
|
|
99
|
+
readonly type: "markets";
|
|
100
|
+
readonly id: "";
|
|
101
|
+
readonly name: "Europe";
|
|
102
|
+
readonly created_at: "";
|
|
103
|
+
readonly updated_at: "";
|
|
104
|
+
readonly shared_secret: "";
|
|
105
|
+
};
|
|
106
|
+
billing_address: {
|
|
107
|
+
first_name: string;
|
|
108
|
+
last_name: string;
|
|
109
|
+
type: "addresses";
|
|
110
|
+
id: string;
|
|
111
|
+
updated_at: string;
|
|
112
|
+
created_at: string;
|
|
113
|
+
line_1: string;
|
|
114
|
+
state_code: string;
|
|
115
|
+
phone: string;
|
|
116
|
+
city: string;
|
|
117
|
+
country_code: string;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
returnRequested: {
|
|
121
|
+
type: "returns";
|
|
122
|
+
id: string;
|
|
123
|
+
number: string;
|
|
124
|
+
updated_at: string;
|
|
125
|
+
created_at: string;
|
|
126
|
+
status: "requested";
|
|
127
|
+
order: {
|
|
128
|
+
readonly type: "orders";
|
|
129
|
+
readonly id: "";
|
|
130
|
+
readonly updated_at: "2023-06-10T06:38:44.964Z";
|
|
131
|
+
readonly placed_at: "2023-06-09T11:00:00.000Z";
|
|
132
|
+
readonly created_at: "";
|
|
133
|
+
readonly formatted_total_amount: "$650.00";
|
|
134
|
+
readonly fulfillment_status: "unfulfilled";
|
|
135
|
+
readonly number: 123456;
|
|
136
|
+
readonly payment_status: "authorized";
|
|
137
|
+
readonly status: "placed";
|
|
138
|
+
readonly market: {
|
|
139
|
+
readonly type: "markets";
|
|
140
|
+
readonly id: "";
|
|
141
|
+
readonly name: "Europe";
|
|
142
|
+
readonly created_at: "";
|
|
143
|
+
readonly updated_at: "";
|
|
144
|
+
readonly shared_secret: "";
|
|
145
|
+
};
|
|
146
|
+
readonly billing_address: {
|
|
147
|
+
readonly first_name: "Bruce";
|
|
148
|
+
readonly last_name: "Wayne";
|
|
149
|
+
readonly type: "addresses";
|
|
150
|
+
readonly id: "";
|
|
151
|
+
readonly updated_at: "";
|
|
152
|
+
readonly created_at: "";
|
|
153
|
+
readonly line_1: "";
|
|
154
|
+
readonly state_code: "";
|
|
155
|
+
readonly phone: "";
|
|
156
|
+
readonly city: "";
|
|
157
|
+
readonly country_code: "";
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
returnApproved: {
|
|
162
|
+
type: "returns";
|
|
163
|
+
id: string;
|
|
164
|
+
number: string;
|
|
165
|
+
updated_at: string;
|
|
166
|
+
created_at: string;
|
|
167
|
+
status: "approved";
|
|
168
|
+
order: {
|
|
169
|
+
readonly type: "orders";
|
|
170
|
+
readonly id: "";
|
|
171
|
+
readonly updated_at: "2023-06-10T06:38:44.964Z";
|
|
172
|
+
readonly placed_at: "2023-06-09T11:00:00.000Z";
|
|
173
|
+
readonly created_at: "";
|
|
174
|
+
readonly formatted_total_amount: "$650.00";
|
|
175
|
+
readonly fulfillment_status: "unfulfilled";
|
|
176
|
+
readonly number: 123456;
|
|
177
|
+
readonly payment_status: "authorized";
|
|
178
|
+
readonly status: "placed";
|
|
179
|
+
readonly market: {
|
|
180
|
+
readonly type: "markets";
|
|
181
|
+
readonly id: "";
|
|
182
|
+
readonly name: "Europe";
|
|
183
|
+
readonly created_at: "";
|
|
184
|
+
readonly updated_at: "";
|
|
185
|
+
readonly shared_secret: "";
|
|
186
|
+
};
|
|
187
|
+
readonly billing_address: {
|
|
188
|
+
readonly first_name: "Bruce";
|
|
189
|
+
readonly last_name: "Wayne";
|
|
190
|
+
readonly type: "addresses";
|
|
191
|
+
readonly id: "";
|
|
192
|
+
readonly updated_at: "";
|
|
193
|
+
readonly created_at: "";
|
|
194
|
+
readonly line_1: "";
|
|
195
|
+
readonly state_code: "";
|
|
196
|
+
readonly phone: "";
|
|
197
|
+
readonly city: "";
|
|
198
|
+
readonly country_code: "";
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
returnShipped: {
|
|
203
|
+
type: "returns";
|
|
204
|
+
id: string;
|
|
205
|
+
number: string;
|
|
206
|
+
updated_at: string;
|
|
207
|
+
created_at: string;
|
|
208
|
+
status: "shipped";
|
|
209
|
+
order: {
|
|
210
|
+
readonly type: "orders";
|
|
211
|
+
readonly id: "";
|
|
212
|
+
readonly updated_at: "2023-06-10T06:38:44.964Z";
|
|
213
|
+
readonly placed_at: "2023-06-09T11:00:00.000Z";
|
|
214
|
+
readonly created_at: "";
|
|
215
|
+
readonly formatted_total_amount: "$650.00";
|
|
216
|
+
readonly fulfillment_status: "unfulfilled";
|
|
217
|
+
readonly number: 123456;
|
|
218
|
+
readonly payment_status: "authorized";
|
|
219
|
+
readonly status: "placed";
|
|
220
|
+
readonly market: {
|
|
221
|
+
readonly type: "markets";
|
|
222
|
+
readonly id: "";
|
|
223
|
+
readonly name: "Europe";
|
|
224
|
+
readonly created_at: "";
|
|
225
|
+
readonly updated_at: "";
|
|
226
|
+
readonly shared_secret: "";
|
|
227
|
+
};
|
|
228
|
+
readonly billing_address: {
|
|
229
|
+
readonly first_name: "Bruce";
|
|
230
|
+
readonly last_name: "Wayne";
|
|
231
|
+
readonly type: "addresses";
|
|
232
|
+
readonly id: "";
|
|
233
|
+
readonly updated_at: "";
|
|
234
|
+
readonly created_at: "";
|
|
235
|
+
readonly line_1: "";
|
|
236
|
+
readonly state_code: "";
|
|
237
|
+
readonly phone: "";
|
|
238
|
+
readonly city: "";
|
|
239
|
+
readonly country_code: "";
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
returnReceived: {
|
|
244
|
+
type: "returns";
|
|
245
|
+
id: string;
|
|
246
|
+
number: string;
|
|
247
|
+
updated_at: string;
|
|
248
|
+
created_at: string;
|
|
249
|
+
status: "received";
|
|
250
|
+
order: {
|
|
251
|
+
readonly type: "orders";
|
|
252
|
+
readonly id: "";
|
|
253
|
+
readonly updated_at: "2023-06-10T06:38:44.964Z";
|
|
254
|
+
readonly placed_at: "2023-06-09T11:00:00.000Z";
|
|
255
|
+
readonly created_at: "";
|
|
256
|
+
readonly formatted_total_amount: "$650.00";
|
|
257
|
+
readonly fulfillment_status: "unfulfilled";
|
|
258
|
+
readonly number: 123456;
|
|
259
|
+
readonly payment_status: "authorized";
|
|
260
|
+
readonly status: "placed";
|
|
261
|
+
readonly market: {
|
|
262
|
+
readonly type: "markets";
|
|
263
|
+
readonly id: "";
|
|
264
|
+
readonly name: "Europe";
|
|
265
|
+
readonly created_at: "";
|
|
266
|
+
readonly updated_at: "";
|
|
267
|
+
readonly shared_secret: "";
|
|
268
|
+
};
|
|
269
|
+
readonly billing_address: {
|
|
270
|
+
readonly first_name: "Bruce";
|
|
271
|
+
readonly last_name: "Wayne";
|
|
272
|
+
readonly type: "addresses";
|
|
273
|
+
readonly id: "";
|
|
274
|
+
readonly updated_at: "";
|
|
275
|
+
readonly created_at: "";
|
|
276
|
+
readonly line_1: "";
|
|
277
|
+
readonly state_code: "";
|
|
278
|
+
readonly phone: "";
|
|
279
|
+
readonly city: "";
|
|
280
|
+
readonly country_code: "";
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
returnCancelled: {
|
|
285
|
+
type: "returns";
|
|
286
|
+
id: string;
|
|
287
|
+
number: string;
|
|
288
|
+
updated_at: string;
|
|
289
|
+
created_at: string;
|
|
290
|
+
status: "cancelled";
|
|
291
|
+
order: {
|
|
292
|
+
readonly type: "orders";
|
|
293
|
+
readonly id: "";
|
|
294
|
+
readonly updated_at: "2023-06-10T06:38:44.964Z";
|
|
295
|
+
readonly placed_at: "2023-06-09T11:00:00.000Z";
|
|
296
|
+
readonly created_at: "";
|
|
297
|
+
readonly formatted_total_amount: "$650.00";
|
|
298
|
+
readonly fulfillment_status: "unfulfilled";
|
|
299
|
+
readonly number: 123456;
|
|
300
|
+
readonly payment_status: "authorized";
|
|
301
|
+
readonly status: "placed";
|
|
302
|
+
readonly market: {
|
|
303
|
+
readonly type: "markets";
|
|
304
|
+
readonly id: "";
|
|
305
|
+
readonly name: "Europe";
|
|
306
|
+
readonly created_at: "";
|
|
307
|
+
readonly updated_at: "";
|
|
308
|
+
readonly shared_secret: "";
|
|
309
|
+
};
|
|
310
|
+
readonly billing_address: {
|
|
311
|
+
readonly first_name: "Bruce";
|
|
312
|
+
readonly last_name: "Wayne";
|
|
313
|
+
readonly type: "addresses";
|
|
314
|
+
readonly id: "";
|
|
315
|
+
readonly updated_at: "";
|
|
316
|
+
readonly created_at: "";
|
|
317
|
+
readonly line_1: "";
|
|
318
|
+
readonly state_code: "";
|
|
319
|
+
readonly phone: "";
|
|
320
|
+
readonly city: "";
|
|
321
|
+
readonly country_code: "";
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
returnRejected: {
|
|
326
|
+
type: "returns";
|
|
327
|
+
id: string;
|
|
328
|
+
number: string;
|
|
329
|
+
updated_at: string;
|
|
330
|
+
created_at: string;
|
|
331
|
+
status: "rejected";
|
|
332
|
+
order: {
|
|
333
|
+
readonly type: "orders";
|
|
334
|
+
readonly id: "";
|
|
335
|
+
readonly updated_at: "2023-06-10T06:38:44.964Z";
|
|
336
|
+
readonly placed_at: "2023-06-09T11:00:00.000Z";
|
|
337
|
+
readonly created_at: "";
|
|
338
|
+
readonly formatted_total_amount: "$650.00";
|
|
339
|
+
readonly fulfillment_status: "unfulfilled";
|
|
340
|
+
readonly number: 123456;
|
|
341
|
+
readonly payment_status: "authorized";
|
|
342
|
+
readonly status: "placed";
|
|
343
|
+
readonly market: {
|
|
344
|
+
readonly type: "markets";
|
|
345
|
+
readonly id: "";
|
|
346
|
+
readonly name: "Europe";
|
|
347
|
+
readonly created_at: "";
|
|
348
|
+
readonly updated_at: "";
|
|
349
|
+
readonly shared_secret: "";
|
|
350
|
+
};
|
|
351
|
+
readonly billing_address: {
|
|
352
|
+
readonly first_name: "Bruce";
|
|
353
|
+
readonly last_name: "Wayne";
|
|
354
|
+
readonly type: "addresses";
|
|
355
|
+
readonly id: "";
|
|
356
|
+
readonly updated_at: "";
|
|
357
|
+
readonly created_at: "";
|
|
358
|
+
readonly line_1: "";
|
|
359
|
+
readonly state_code: "";
|
|
360
|
+
readonly phone: "";
|
|
361
|
+
readonly city: "";
|
|
362
|
+
readonly country_code: "";
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
customerProspect: {
|
|
367
|
+
type: "customers";
|
|
368
|
+
id: string;
|
|
369
|
+
updated_at: string;
|
|
370
|
+
created_at: string;
|
|
371
|
+
status: "prospect";
|
|
372
|
+
email: string;
|
|
373
|
+
total_orders_count: number;
|
|
374
|
+
};
|
|
375
|
+
customerRepeat: {
|
|
376
|
+
type: "customers";
|
|
377
|
+
id: string;
|
|
378
|
+
updated_at: string;
|
|
379
|
+
created_at: string;
|
|
380
|
+
status: "repeat";
|
|
381
|
+
email: string;
|
|
382
|
+
total_orders_count: number;
|
|
383
|
+
};
|
|
384
|
+
customerAcquired: {
|
|
385
|
+
type: "customers";
|
|
386
|
+
id: string;
|
|
387
|
+
updated_at: string;
|
|
388
|
+
created_at: string;
|
|
389
|
+
status: "acquired";
|
|
390
|
+
email: string;
|
|
391
|
+
customer_group: {
|
|
392
|
+
type: "customer_groups";
|
|
393
|
+
id: string;
|
|
394
|
+
name: string;
|
|
395
|
+
updated_at: string;
|
|
396
|
+
created_at: string;
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DisplayStatus } from '../../../dictionaries/types';
|
|
2
|
+
export declare const ListItemDescription: import('../../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
3
|
+
displayStatus: DisplayStatus;
|
|
4
|
+
date: string;
|
|
5
|
+
additionalInfos?: string | undefined;
|
|
6
|
+
delayMs?: number | undefined;
|
|
7
|
+
isLoading?: boolean | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const ListItemIcon: import('../../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
10
|
+
color: "none" | "green" | "orange" | "red" | "gray" | "teal" | "white" | "black" | undefined;
|
|
11
|
+
icon: "download" | "package" | "arrowBendDownRight" | "arrowCircleDown" | "arrowClockwise" | "arrowDown" | "arrowLeft" | "arrowsLeftRight" | "arrowUpRight" | "asterisk" | "caretRight" | "chatCircle" | "check" | "cloud" | "creditCard" | "eye" | "flag" | "funnel" | "hourglass" | "magnifyingGlass" | "minus" | "pencilSimple" | "printer" | "shoppingBag" | "stack" | "truck" | "upload" | "user" | "warning" | "warningCircle" | "x";
|
|
12
|
+
delayMs?: number | undefined;
|
|
13
|
+
isLoading?: boolean | undefined;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ResourceListItem } from './ResourceListItem';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { TokenProviderAuthUser } from '../../../providers/TokenProvider/types';
|
|
3
|
+
import type { Customer, Order, Return } from '@commercelayer/sdk';
|
|
4
|
+
export type ResourceListItemType = Order | Return | Customer;
|
|
5
|
+
export interface ResourceListItemComponentProps {
|
|
6
|
+
name: string;
|
|
7
|
+
description: JSX.Element | string;
|
|
8
|
+
icon: JSX.Element;
|
|
9
|
+
rightContent?: JSX.Element;
|
|
10
|
+
showArrow?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type ResourceToProps<Resource> = (options: {
|
|
13
|
+
resource: Resource;
|
|
14
|
+
user: TokenProviderAuthUser | null;
|
|
15
|
+
}) => ResourceListItemComponentProps;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Metadata } from '@commercelayer/sdk/lib/cjs/resource';
|
|
2
|
-
declare const
|
|
2
|
+
export declare const ResourceListItemsMetadata: import('../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
3
3
|
metadata?: Metadata | undefined;
|
|
4
4
|
delayMs?: number | undefined;
|
|
5
5
|
isLoading?: boolean | undefined;
|
|
6
6
|
}>;
|
|
7
|
-
export { ListItemsMetadata };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Order } from '@commercelayer/sdk';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const ResourceOrderSummary: import('../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
4
4
|
editable?: boolean | undefined;
|
|
5
5
|
onChange?: (() => void) | undefined;
|
|
6
6
|
footerActions?: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { referenceOrigins } from '../../helpers/attachments';
|
|
2
2
|
import type { Attachment } from '@commercelayer/sdk';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const ResourceOrderTimeline: import('../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
4
4
|
orderId?: string | undefined;
|
|
5
5
|
refresh?: boolean | undefined;
|
|
6
6
|
attachmentOption?: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Shipment as ShipmentResource } from '@commercelayer/sdk';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const ResourceShipmentParcels: import('../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
3
3
|
shipment: ShipmentResource;
|
|
4
4
|
onRemoveParcel?: ((parcelId: string) => void) | undefined;
|
|
5
5
|
delayMs?: number | undefined;
|
|
@@ -3,6 +3,7 @@ type TaggableResource = Extract<ListableResourceType, 'addresses' | 'bundles' |
|
|
|
3
3
|
interface TagsOverlay {
|
|
4
4
|
title: string;
|
|
5
5
|
description?: string;
|
|
6
|
+
showManageAction?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare const ResourceTags: import('../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
8
9
|
resourceType: TaggableResource;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useResourceFilters } from './useResourceFilters';
|
package/dist/ui/resources/{Filters/useFilters.d.ts → useResourceFilters/useResourceFilters.d.ts}
RENAMED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type ResourceListProps } from '../../resources/ResourceList';
|
|
3
|
-
import { type
|
|
3
|
+
import { type ResourceListItemTemplate } from '../../resources/ResourceList/ResourceList';
|
|
4
4
|
import { type ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
|
|
5
5
|
import { type QueryFilter } from '@commercelayer/sdk/lib/cjs/query';
|
|
6
6
|
import { type FiltersFormProps } from './FiltersForm';
|
|
7
7
|
import { type FiltersNavProps } from './FiltersNav';
|
|
8
8
|
import { makeFilterAdapters } from './adapters';
|
|
9
9
|
import { type FiltersInstructions } from './types';
|
|
10
|
-
interface
|
|
10
|
+
interface UseResourceFiltersConfig {
|
|
11
11
|
/**
|
|
12
12
|
* Array of instruction items to build the filters behaviors
|
|
13
13
|
*/
|
|
14
14
|
instructions: FiltersInstructions;
|
|
15
15
|
}
|
|
16
|
-
interface
|
|
16
|
+
interface UseResourceFiltersHook {
|
|
17
17
|
/**
|
|
18
18
|
* Helper methods to transform filters from/to url query string, sdk and form values
|
|
19
19
|
*/
|
|
@@ -41,7 +41,7 @@ interface UseFiltersHook {
|
|
|
41
41
|
/**
|
|
42
42
|
* Filtered ResourceList component based on current active filters
|
|
43
43
|
*/
|
|
44
|
-
FilteredList: <TResource extends ListableResourceType>(props: Pick<ResourceListProps<TResource>, 'type' | 'query' | 'emptyState' | 'actionButton'> &
|
|
44
|
+
FilteredList: <TResource extends ListableResourceType>(props: Pick<ResourceListProps<TResource>, 'type' | 'query' | 'emptyState' | 'actionButton'> & ResourceListItemTemplate<TResource>) => JSX.Element;
|
|
45
45
|
/**
|
|
46
46
|
* SDK filters object to be used in the sdk query
|
|
47
47
|
*/
|
|
@@ -56,5 +56,5 @@ interface UseFiltersHook {
|
|
|
56
56
|
*/
|
|
57
57
|
viewTitle?: string;
|
|
58
58
|
}
|
|
59
|
-
export declare function
|
|
59
|
+
export declare function useResourceFilters({ instructions }: UseResourceFiltersConfig): UseResourceFiltersHook;
|
|
60
60
|
export {};
|
package/package.json
CHANGED
package/dist/Async-566ec3f7.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { L as de, H as le } from "./main-795be39b.js";
|
|
2
|
-
import * as ce from "react";
|
|
3
|
-
import { useRef as F, useState as a, useEffect as x, useCallback as D, forwardRef as ve } from "react";
|
|
4
|
-
import { _ as Oe, a as s, h as Se, b as g, u as me, S as _e, c as he, s as ge } from "./overrides-346bb0f6.js";
|
|
5
|
-
import { d as ye } from "./unsupportedIterableToArray-a3020d44.js";
|
|
6
|
-
import "react-dom";
|
|
7
|
-
import "@commercelayer/sdk";
|
|
8
|
-
import "react-hook-form";
|
|
9
|
-
import "query-string";
|
|
10
|
-
var Ce = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
|
|
11
|
-
function Ie(t) {
|
|
12
|
-
var o = t.defaultOptions, n = o === void 0 ? !1 : o, i = t.cacheOptions, u = i === void 0 ? !1 : i, r = t.loadOptions;
|
|
13
|
-
t.options;
|
|
14
|
-
var v = t.isLoading, O = v === void 0 ? !1 : v, S = t.onInputChange, m = t.filterOption, y = m === void 0 ? null : m, E = Oe(t, Ce), $ = E.inputValue, f = F(void 0), _ = F(!1), G = a(Array.isArray(n) ? n : void 0), j = s(G, 2), J = j[0], R = j[1], K = a(typeof $ < "u" ? $ : ""), w = s(K, 2), q = w[0], C = w[1], Q = a(n === !0), H = s(Q, 2), U = H[0], d = H[1], X = a(void 0), M = s(X, 2), I = M[0], L = M[1], Y = a([]), N = s(Y, 2), Z = N[0], A = N[1], k = a(!1), T = s(k, 2), ee = T[0], h = T[1], te = a({}), W = s(te, 2), l = W[0], b = W[1], ne = a(void 0), z = s(ne, 2), ae = z[0], se = z[1], re = a(void 0), B = s(re, 2), oe = B[0], ie = B[1];
|
|
15
|
-
u !== oe && (b({}), ie(u)), n !== ae && (R(Array.isArray(n) ? n : void 0), se(n)), x(function() {
|
|
16
|
-
return _.current = !0, function() {
|
|
17
|
-
_.current = !1;
|
|
18
|
-
};
|
|
19
|
-
}, []);
|
|
20
|
-
var P = D(function(c, p) {
|
|
21
|
-
if (!r)
|
|
22
|
-
return p();
|
|
23
|
-
var e = r(c, p);
|
|
24
|
-
e && typeof e.then == "function" && e.then(p, function() {
|
|
25
|
-
return p();
|
|
26
|
-
});
|
|
27
|
-
}, [r]);
|
|
28
|
-
x(function() {
|
|
29
|
-
n === !0 && P(q, function(c) {
|
|
30
|
-
_.current && (R(c || []), d(!!f.current));
|
|
31
|
-
});
|
|
32
|
-
}, []);
|
|
33
|
-
var ue = D(function(c, p) {
|
|
34
|
-
var e = Se(c, p, S);
|
|
35
|
-
if (!e) {
|
|
36
|
-
f.current = void 0, C(""), L(""), A([]), d(!1), h(!1);
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
if (u && l[e])
|
|
40
|
-
C(e), L(e), A(l[e]), d(!1), h(!1);
|
|
41
|
-
else {
|
|
42
|
-
var fe = f.current = {};
|
|
43
|
-
C(e), d(!0), h(!I), P(e, function(V) {
|
|
44
|
-
_ && fe === f.current && (f.current = void 0, d(!1), L(e), A(V || []), h(!1), b(V ? g(g({}, l), {}, ye({}, e, V)) : l));
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}, [u, P, I, l, S]), pe = ee ? [] : q && I ? Z : J || [];
|
|
48
|
-
return g(g({}, E), {}, {
|
|
49
|
-
options: pe,
|
|
50
|
-
isLoading: U || O,
|
|
51
|
-
onInputChange: ue,
|
|
52
|
-
filterOption: y
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
var Le = /* @__PURE__ */ ve(function(t, o) {
|
|
56
|
-
var n = Ie(t), i = me(n);
|
|
57
|
-
return /* @__PURE__ */ ce.createElement(_e, he({
|
|
58
|
-
ref: o
|
|
59
|
-
}, i));
|
|
60
|
-
}), Ae = Le;
|
|
61
|
-
function Pe({
|
|
62
|
-
onSelect: t,
|
|
63
|
-
noOptionsMessage: o,
|
|
64
|
-
initialValues: n,
|
|
65
|
-
isOptionDisabled: i,
|
|
66
|
-
loadAsyncValues: u,
|
|
67
|
-
debounceMs: r = 500,
|
|
68
|
-
...v
|
|
69
|
-
}) {
|
|
70
|
-
const O = D(
|
|
71
|
-
de((S, m) => {
|
|
72
|
-
u(S).then((y) => {
|
|
73
|
-
m(y);
|
|
74
|
-
});
|
|
75
|
-
}, r),
|
|
76
|
-
[r]
|
|
77
|
-
);
|
|
78
|
-
return x(() => () => {
|
|
79
|
-
O.cancel();
|
|
80
|
-
}, [r]), /* @__PURE__ */ le.jsx(
|
|
81
|
-
Ae,
|
|
82
|
-
{
|
|
83
|
-
...v,
|
|
84
|
-
defaultOptions: n,
|
|
85
|
-
onChange: t,
|
|
86
|
-
noOptionsMessage: () => o,
|
|
87
|
-
loadOptions: O,
|
|
88
|
-
components: {
|
|
89
|
-
...ge,
|
|
90
|
-
DropdownIndicator: null
|
|
91
|
-
},
|
|
92
|
-
isOptionDisabled: i
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
Pe.displayName = "AsyncSelectComponent";
|
|
97
|
-
export {
|
|
98
|
-
Pe as AsyncSelectComponent
|
|
99
|
-
};
|