@commercelayer/app-elements 0.0.66 → 0.0.68

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.
@@ -0,0 +1,253 @@
1
+ export declare const presetLineItems: {
2
+ oneLine: {
3
+ type: "line_items";
4
+ item_type: "skus";
5
+ id: string;
6
+ created_at: string;
7
+ updated_at: string;
8
+ sku_code: string;
9
+ image_url: string;
10
+ name: string;
11
+ quantity: number;
12
+ formatted_unit_amount: string;
13
+ formatted_total_amount: string;
14
+ total_amount_float: number;
15
+ tax_amount_float: number;
16
+ };
17
+ oneLine_2: {
18
+ type: "line_items";
19
+ item_type: "skus";
20
+ id: string;
21
+ created_at: string;
22
+ updated_at: string;
23
+ sku_code: string;
24
+ image_url: string;
25
+ name: string;
26
+ quantity: number;
27
+ formatted_total_amount: string;
28
+ formatted_unit_amount: string;
29
+ total_amount_float: number;
30
+ tax_amount_float: number;
31
+ };
32
+ twoLines: {
33
+ type: "line_items";
34
+ item_type: "skus";
35
+ id: string;
36
+ created_at: string;
37
+ updated_at: string;
38
+ sku_code: string;
39
+ image_url: string;
40
+ name: string;
41
+ quantity: number;
42
+ formatted_total_amount: string;
43
+ formatted_unit_amount: string;
44
+ total_amount_float: number;
45
+ tax_amount_float: number;
46
+ };
47
+ withOptions: {
48
+ type: "line_items";
49
+ item_type: "skus";
50
+ id: string;
51
+ created_at: string;
52
+ updated_at: string;
53
+ sku_code: string;
54
+ image_url: string;
55
+ name: string;
56
+ quantity: number;
57
+ formatted_total_amount: string;
58
+ formatted_unit_amount: string;
59
+ total_amount_float: number;
60
+ tax_amount_float: number;
61
+ line_item_options: ({
62
+ id: string;
63
+ type: "line_item_options";
64
+ name: string;
65
+ quantity: number;
66
+ currency_code: string;
67
+ unit_amount_cents: number;
68
+ unit_amount_float: number;
69
+ formatted_unit_amount: string;
70
+ total_amount_cents: number;
71
+ total_amount_float: number;
72
+ formatted_total_amount: string;
73
+ delay_hours: number;
74
+ delay_days: number;
75
+ options: {
76
+ line1: string;
77
+ line2: string;
78
+ name?: undefined;
79
+ team?: undefined;
80
+ logo_url?: undefined;
81
+ colors?: undefined;
82
+ position?: undefined;
83
+ };
84
+ created_at: string;
85
+ updated_at: string;
86
+ reference: null;
87
+ reference_origin: null;
88
+ metadata: {};
89
+ } | {
90
+ id: string;
91
+ type: "line_item_options";
92
+ name: string;
93
+ quantity: number;
94
+ currency_code: string;
95
+ unit_amount_cents: number;
96
+ unit_amount_float: number;
97
+ formatted_unit_amount: string;
98
+ total_amount_cents: number;
99
+ total_amount_float: number;
100
+ formatted_total_amount: string;
101
+ delay_hours: number;
102
+ delay_days: number;
103
+ options: {
104
+ name: string;
105
+ team: string;
106
+ line1?: undefined;
107
+ line2?: undefined;
108
+ logo_url?: undefined;
109
+ colors?: undefined;
110
+ position?: undefined;
111
+ };
112
+ created_at: string;
113
+ updated_at: string;
114
+ reference: null;
115
+ reference_origin: null;
116
+ metadata: {};
117
+ } | {
118
+ id: string;
119
+ type: "line_item_options";
120
+ name: string;
121
+ quantity: number;
122
+ currency_code: string;
123
+ unit_amount_cents: number;
124
+ unit_amount_float: number;
125
+ formatted_unit_amount: string;
126
+ total_amount_cents: number;
127
+ total_amount_float: number;
128
+ formatted_total_amount: string;
129
+ delay_hours: number;
130
+ delay_days: number;
131
+ options: {
132
+ logo_url: string;
133
+ colors: string[];
134
+ position: {
135
+ x: number;
136
+ y: number;
137
+ };
138
+ line1?: undefined;
139
+ line2?: undefined;
140
+ name?: undefined;
141
+ team?: undefined;
142
+ };
143
+ created_at: string;
144
+ updated_at: string;
145
+ reference: null;
146
+ reference_origin: null;
147
+ metadata: {};
148
+ })[];
149
+ };
150
+ withBundle: {
151
+ id: string;
152
+ type: "line_items";
153
+ item_type: "bundles";
154
+ sku_code: null;
155
+ bundle_code: string;
156
+ quantity: number;
157
+ currency_code: string;
158
+ unit_amount_cents: number;
159
+ unit_amount_float: number;
160
+ formatted_unit_amount: string;
161
+ formatted_options_amount: string;
162
+ formatted_discount: string;
163
+ total_amount_cents: number;
164
+ total_amount_float: number;
165
+ formatted_total_amount: string;
166
+ tax_amount_cents: number;
167
+ tax_amount_float: number;
168
+ name: string;
169
+ image_url: string;
170
+ created_at: string;
171
+ updated_at: string;
172
+ };
173
+ stockLineItem: {
174
+ id: string;
175
+ type: "stock_line_items";
176
+ sku_code: string;
177
+ bundle_code: null;
178
+ quantity: number;
179
+ created_at: string;
180
+ updated_at: string;
181
+ reference: null;
182
+ reference_origin: null;
183
+ metadata: {};
184
+ sku: {
185
+ id: string;
186
+ type: "skus";
187
+ code: string;
188
+ name: string;
189
+ description: string;
190
+ image_url: string;
191
+ weight: number;
192
+ unit_of_weight: "gr";
193
+ hs_tariff_number: string;
194
+ do_not_ship: false;
195
+ do_not_track: false;
196
+ inventory: null;
197
+ created_at: string;
198
+ updated_at: string;
199
+ reference: string;
200
+ reference_origin: string;
201
+ metadata: {};
202
+ };
203
+ };
204
+ parcelLineItem: {
205
+ id: string;
206
+ type: "parcel_line_items";
207
+ sku_code: string;
208
+ bundle_code: null;
209
+ quantity: number;
210
+ name: string;
211
+ image_url: string;
212
+ created_at: string;
213
+ updated_at: string;
214
+ reference: null;
215
+ reference_origin: null;
216
+ metadata: {};
217
+ };
218
+ giftCard: {
219
+ id: string;
220
+ type: "line_items";
221
+ sku_code: null;
222
+ bundle_code: null;
223
+ quantity: number;
224
+ currency_code: string;
225
+ unit_amount_cents: number;
226
+ unit_amount_float: number;
227
+ formatted_unit_amount: string;
228
+ options_amount_cents: number;
229
+ options_amount_float: number;
230
+ formatted_options_amount: string;
231
+ discount_cents: number;
232
+ discount_float: number;
233
+ formatted_discount: string;
234
+ total_amount_cents: number;
235
+ total_amount_float: number;
236
+ formatted_total_amount: string;
237
+ tax_amount_cents: number;
238
+ tax_amount_float: number;
239
+ formatted_tax_amount: string;
240
+ name: string;
241
+ image_url: null;
242
+ discount_breakdown: {};
243
+ tax_rate: number;
244
+ tax_breakdown: {};
245
+ item_type: "gift_cards";
246
+ frequency: null;
247
+ created_at: string;
248
+ updated_at: string;
249
+ reference: null;
250
+ reference_origin: null;
251
+ metadata: {};
252
+ };
253
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,13 +1,14 @@
1
1
  import type { Order } from '@commercelayer/sdk';
2
- declare const OrderSummary: import('../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
3
- order: Order;
2
+ export declare const OrderSummary: import('../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
3
+ editable?: boolean | undefined;
4
+ onChange?: (() => void) | undefined;
4
5
  footerActions?: {
5
6
  label: string;
6
7
  onClick: import("react").MouseEventHandler<HTMLButtonElement>;
7
8
  variant?: import("../atoms/Button").ButtonVariant | undefined;
8
9
  disabled?: boolean | undefined;
9
10
  }[] | undefined;
11
+ order: Order;
10
12
  delayMs?: number | undefined;
11
13
  isLoading?: boolean | undefined;
12
14
  }>;
13
- export { OrderSummary };
@@ -7,8 +7,9 @@ export interface CheckboxItem {
7
7
  }
8
8
  interface CheckboxProps extends Pick<InputCheckboxProps, 'checked' | 'onChange'> {
9
9
  item: CheckboxItem;
10
+ showIcon?: boolean;
10
11
  }
11
- export declare function Checkbox({ item, checked, onChange }: CheckboxProps): JSX.Element;
12
+ export declare function Checkbox({ item, showIcon, checked, onChange }: CheckboxProps): JSX.Element;
12
13
  type Resource = Awaited<ReturnType<CommerceLayerClient[ListableResourceType]['list']>>[number];
13
14
  export declare function prepareCheckboxItemOrMock({ resource, isLoading, fieldForLabel, fieldForValue }: {
14
15
  resource?: Resource;
@@ -14,9 +14,12 @@ export interface RelationshipSelectorProps extends Omit<FullListProps, 'totalCou
14
14
  * Hide the component when there is only one item.
15
15
  */
16
16
  hideWhenSingleItem?: boolean;
17
+ /**
18
+ * Show icon in checkbox selectors
19
+ */
20
+ showCheckboxIcon?: boolean;
17
21
  }
18
- declare function RelationshipSelector({ defaultValues, fieldForLabel, fieldForValue, previewLimit, onChange, resource, searchBy, sortBy, filters, hideWhenSingleItem, title }: RelationshipSelectorProps): JSX.Element;
19
- declare namespace RelationshipSelector {
22
+ export declare function RelationshipSelector({ defaultValues, fieldForLabel, fieldForValue, previewLimit, onChange, resource, searchBy, sortBy, filters, hideWhenSingleItem, showCheckboxIcon, title }: RelationshipSelectorProps): JSX.Element;
23
+ export declare namespace RelationshipSelector {
20
24
  var displayName: string;
21
25
  }
22
- export { RelationshipSelector };
@@ -1,4 +1,4 @@
1
- import { _ as i } from "./main-3df5f0c3.js";
1
+ import { _ as i } from "./main-c79de937.js";
2
2
  function p(e, t) {
3
3
  if (i(e) !== "object" || e === null)
4
4
  return e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercelayer/app-elements",
3
- "version": "0.0.66",
3
+ "version": "0.0.68",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"