@commercelayer/app-elements 1.5.1 → 1.6.1

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/dist/main.d.ts CHANGED
@@ -93,4 +93,5 @@ export { ResourceTags, type ResourceTagsProps } from './ui/resources/ResourceTag
93
93
  export { useResourceFilters, type FiltersInstructions } from './ui/resources/useResourceFilters';
94
94
  export { getCustomerDisplayStatus, getCustomerStatusName } from './dictionaries/customers';
95
95
  export { getOrderDisplayStatus, getOrderFulfillmentStatusName, getOrderPaymentStatusName, getOrderStatusName, getOrderTransactionPastTense, getOrderTriggerAttributeName } from './dictionaries/orders';
96
- export { getReturnDisplayStatus, getReturnStatusName, getReturnTriggerAttributeName } from './dictionaries/returns';
96
+ export { getReturnDisplayStatus, getReturnStatusName } from './dictionaries/returns';
97
+ export { getStockTransferDisplayStatus, getStockTransferStatusName } from './dictionaries/stockTransfers';
package/dist/main.js CHANGED
@@ -1,4 +1,4 @@
1
- import { aq as i, a_ as b, ar as p, as as c, at as l, au as d, av as g, aw as m, ax as S, a$ as I, ay as k, az as T, ah as D, b0 as R, b1 as C, b2 as y, aA as A, ak as H, al as h, aB as P, aC as F, be as B, bf as f, bh as v, bj as L, bl as O, bp as G, br as N, bw as V, bz as w, bB as x, bI as E, bK as M, bM as J, bP as U, bT as W, bU as Y, aD as Z, aE as $, bg as j, bi as q, bk as z, bm as K, bo as Q, bq as X, bs as _, bt as aa, bu as ea, bv as sa, bx as ta, by as ra, bA as oa, bC as na, bJ as ua, bL as ia, bN as ba, bO as pa, bQ as ca, bR as la, bS as da, b3 as ga, b4 as ma, b5 as Sa, b6 as Ia, an as ka, b7 as Ta, aF as Da, b8 as Ra, b9 as Ca, aG as ya, aH as Aa, aI as Ha, ba as ha, bX as Pa, bY as Fa, bZ as Ba, b_ as fa, b$ as va, c0 as La, c1 as Oa, c2 as Ga, c3 as Na, bb as Va, aJ as wa, aK as xa, aL as Ea, aM as Ma, aO as Ja, aP as Ua, aQ as Wa, aR as Ya, aW as Za, aS as $a, bc as ja, aX as qa, aY as za, aT as Ka, aZ as Qa, aU as Xa, bd as _a, ao as ae, aV as ee, a2 as se, a1 as te, bD as re, bn as oe, W as ne, a3 as ue, a4 as ie, a5 as be, c5 as pe, c6 as ce, bE as le, Y as de, Z as ge, c7 as me, c8 as Se, c9 as Ie, ca as ke, cb as Te, cc as De, a6 as Re, a7 as Ce, cd as ye, ce as Ae, cf as He, a8 as he, a9 as Pe, S as Fe, aa as Be, ab as fe, U as ve, bF as Le, bG as Oe, bH as Ge, T as Ne, V as Ve, bV as we, $ as xe, a0 as Ee, ac as Me, ai as Je, aj as Ue, ad as We, ae as Ye, af as Ze, ag as $e, c4 as je, am as qe, ap as ze, bW as Ke, aN as Qe } from "./main-e00db212.js";
1
+ import { aq as i, a_ as b, ar as p, as as c, at as l, au as d, av as g, aw as m, ax as S, a$ as I, ay as k, az as T, ah as D, b0 as R, b1 as y, b2 as C, aA as H, ak as h, al as A, aB as P, aC as F, be as f, bf as B, bh as v, bj as L, bl as O, bp as G, br as N, bw as V, bz as w, bB as x, bI as E, bK as M, bM as J, bP as U, bT as W, bU as Y, aD as Z, aE as $, bg as j, bi as q, bk as z, bm as K, bo as Q, bq as X, bs as _, bt as aa, bu as ea, bv as sa, bx as ta, by as ra, bA as oa, bC as na, bJ as ua, bL as ia, bN as ba, bO as pa, bQ as ca, bR as la, bS as da, b3 as ga, b4 as ma, b5 as Sa, b6 as Ia, an as ka, b7 as Ta, aF as Da, b8 as Ra, b9 as ya, aG as Ca, aH as Ha, aI as ha, ba as Aa, bX as Pa, bY as Fa, bZ as fa, b_ as Ba, b$ as va, c0 as La, c1 as Oa, c2 as Ga, c3 as Na, bb as Va, aJ as wa, aK as xa, aL as Ea, aM as Ma, aO as Ja, aP as Ua, aQ as Wa, aR as Ya, aW as Za, aS as $a, bc as ja, aX as qa, aY as za, aT as Ka, aZ as Qa, aU as Xa, bd as _a, ao as ae, aV as ee, a2 as se, a1 as te, bD as re, bn as oe, W as ne, a3 as ue, a4 as ie, a5 as be, c5 as pe, c6 as ce, bE as le, Y as de, Z as ge, c7 as me, c8 as Se, c9 as Ie, ca as ke, cb as Te, cc as De, a6 as Re, a7 as ye, cd as Ce, ce as He, a8 as he, a9 as Ae, cf as Pe, cg as Fe, S as fe, aa as Be, ab as ve, U as Le, bF as Oe, bG as Ge, bH as Ne, T as Ve, V as we, bV as xe, $ as Ee, a0 as Me, ac as Je, ai as Ue, aj as We, ad as Ye, ae as Ze, af as $e, ag as je, c4 as qe, am as ze, ap as Ke, bW as Qe, aN as Xe } from "./main-843e8b0f.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  import "@commercelayer/sdk";
@@ -20,15 +20,15 @@ export {
20
20
  T as CopyToClipboard,
21
21
  D as CoreSdkProvider,
22
22
  R as Dropdown,
23
- C as DropdownDivider,
24
- y as DropdownItem,
25
- A as EmptyState,
26
- H as ErrorBoundary,
27
- h as GTMProvider,
23
+ y as DropdownDivider,
24
+ C as DropdownItem,
25
+ H as EmptyState,
26
+ h as ErrorBoundary,
27
+ A as GTMProvider,
28
28
  P as Grid,
29
29
  F as Hint,
30
- B as HookedForm,
31
- f as HookedInput,
30
+ f as HookedForm,
31
+ B as HookedInput,
32
32
  v as HookedInputCheckbox,
33
33
  L as HookedInputCheckboxGroup,
34
34
  O as HookedInputCurrency,
@@ -74,15 +74,15 @@ export {
74
74
  Ta as PageError,
75
75
  Da as PageHeading,
76
76
  Ra as PageLayout,
77
- Ca as PageSkeleton,
78
- ya as Pagination,
79
- Aa as Progress,
80
- Ha as RadialProgress,
81
- ha as Report,
77
+ ya as PageSkeleton,
78
+ Ca as Pagination,
79
+ Ha as Progress,
80
+ ha as RadialProgress,
81
+ Aa as Report,
82
82
  Pa as ResourceAddress,
83
83
  Fa as ResourceLineItems,
84
- Ba as ResourceList,
85
- fa as ResourceListItem,
84
+ fa as ResourceList,
85
+ Ba as ResourceListItem,
86
86
  va as ResourceMetadata,
87
87
  La as ResourceOrderSummary,
88
88
  Oa as ResourceOrderTimeline,
@@ -128,34 +128,35 @@ export {
128
128
  Te as getOrderTransactionPastTense,
129
129
  De as getOrderTriggerAttributeName,
130
130
  Re as getParcelTrackingDetail,
131
- Ce as getParcelTrackingDetails,
132
- ye as getReturnDisplayStatus,
133
- Ae as getReturnStatusName,
134
- He as getReturnTriggerAttributeName,
131
+ ye as getParcelTrackingDetails,
132
+ Ce as getReturnDisplayStatus,
133
+ He as getReturnStatusName,
135
134
  he as getShipmentRate,
136
- Pe as getShipmentRates,
137
- Fe as goBack,
135
+ Ae as getShipmentRates,
136
+ Pe as getStockTransferDisplayStatus,
137
+ Fe as getStockTransferStatusName,
138
+ fe as goBack,
138
139
  Be as hasBeenPurchased,
139
- fe as hasSingleTracking,
140
- ve as isAttachmentValidNote,
141
- Le as isGroupedSelectValues,
142
- Oe as isMultiValueSelected,
143
- Ge as isSingleValueSelected,
144
- Ne as navigateTo,
145
- Ve as referenceOrigins,
146
- we as setApiFormErrors,
147
- xe as sortAndGroupByDate,
148
- Ee as timeSeparator,
149
- Me as useClickAway,
150
- Je as useCoreApi,
151
- Ue as useCoreSdkProvider,
152
- We as useDelayShow,
153
- Ye as useIsChanged,
154
- Ze as useOnBlurFromContainer,
155
- $e as useOverlay,
156
- je as useResourceFilters,
157
- qe as useTagManager,
158
- ze as useTokenProvider,
159
- Ke as useValidationFeedback,
160
- Qe as withSkeletonTemplate
140
+ ve as hasSingleTracking,
141
+ Le as isAttachmentValidNote,
142
+ Oe as isGroupedSelectValues,
143
+ Ge as isMultiValueSelected,
144
+ Ne as isSingleValueSelected,
145
+ Ve as navigateTo,
146
+ we as referenceOrigins,
147
+ xe as setApiFormErrors,
148
+ Ee as sortAndGroupByDate,
149
+ Me as timeSeparator,
150
+ Je as useClickAway,
151
+ Ue as useCoreApi,
152
+ We as useCoreSdkProvider,
153
+ Ye as useDelayShow,
154
+ Ze as useIsChanged,
155
+ $e as useOnBlurFromContainer,
156
+ je as useOverlay,
157
+ qe as useResourceFilters,
158
+ ze as useTagManager,
159
+ Ke as useTokenProvider,
160
+ Qe as useValidationFeedback,
161
+ Xe as withSkeletonTemplate
161
162
  };
@@ -14,11 +14,22 @@ export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
14
14
  * Footer will render in a dedicated section below the main content.
15
15
  */
16
16
  footer?: React.ReactNode;
17
+ /**
18
+ * Set the overflow behavior. In most of the cases you might want to keep overflow visible,
19
+ * but when you have inner content with hover effects you might want to set overflow to hidden.
20
+ */
21
+ overflow: 'visible' | 'hidden';
22
+ /**
23
+ * Set a gray background color
24
+ */
25
+ backgroundColor?: 'light';
17
26
  }
18
27
  /** Card is a flexible component used to group and display content in a clear and concise format. */
19
28
  export declare const Card: import("./SkeletonTemplate").SkeletonTemplateComponent<{
20
29
  gap?: "1" | "4" | "6" | undefined;
21
30
  footer?: React.ReactNode;
31
+ overflow: 'visible' | 'hidden';
32
+ backgroundColor?: "light" | undefined;
22
33
  defaultChecked?: boolean | undefined;
23
34
  defaultValue?: string | number | readonly string[] | undefined;
24
35
  suppressContentEditableWarning?: boolean | undefined;
@@ -1,5 +1,11 @@
1
1
  /// <reference types="react" />
2
- export type HrProps = Omit<React.HTMLProps<HTMLHRElement>, 'children'>;
2
+ export type HrProps = Omit<React.HTMLProps<HTMLHRElement>, 'children'> & {
3
+ /**
4
+ * The variant of the horizontal rule.
5
+ * @default solid
6
+ */
7
+ variant?: 'solid' | 'dashed';
8
+ };
3
9
  /**
4
10
  * This component wraps an [`<hr>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr) HTML element.
5
11
  * <span type='info'>All the props are directly sent to the horizontal rule element.</span>
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { type InputCheckboxProps } from './InputCheckbox';
3
- export interface HookedInputCheckboxProps extends InputCheckboxProps {
3
+ export interface HookedInputCheckboxProps extends Omit<InputCheckboxProps, 'onChange' | 'checked' | 'feedback' | 'defaultValue' | 'defaultChecked'> {
4
4
  /**
5
5
  * field name to match hook-form state
6
6
  */
@@ -13,6 +13,9 @@ export declare const presetLineItems: {
13
13
  formatted_total_amount: string;
14
14
  total_amount_float: number;
15
15
  tax_amount_float: number;
16
+ compare_at_amount_cents: number;
17
+ compare_at_amount_float: number;
18
+ formatted_compare_at_amount: string;
16
19
  };
17
20
  oneLine_2: {
18
21
  type: "line_items";
@@ -28,6 +31,9 @@ export declare const presetLineItems: {
28
31
  formatted_unit_amount: string;
29
32
  total_amount_float: number;
30
33
  tax_amount_float: number;
34
+ compare_at_amount_cents: number;
35
+ compare_at_amount_float: number;
36
+ formatted_compare_at_amount: string;
31
37
  };
32
38
  twoLines: {
33
39
  type: "line_items";
@@ -43,6 +49,9 @@ export declare const presetLineItems: {
43
49
  formatted_unit_amount: string;
44
50
  total_amount_float: number;
45
51
  tax_amount_float: number;
52
+ compare_at_amount_cents: number;
53
+ compare_at_amount_float: number;
54
+ formatted_compare_at_amount: string;
46
55
  };
47
56
  withOptions: {
48
57
  type: "line_items";
@@ -58,6 +67,9 @@ export declare const presetLineItems: {
58
67
  formatted_unit_amount: string;
59
68
  total_amount_float: number;
60
69
  tax_amount_float: number;
70
+ compare_at_amount_cents: number;
71
+ compare_at_amount_float: number;
72
+ formatted_compare_at_amount: string;
61
73
  line_item_options: ({
62
74
  id: string;
63
75
  type: "line_item_options";
@@ -165,6 +177,9 @@ export declare const presetLineItems: {
165
177
  formatted_total_amount: string;
166
178
  tax_amount_cents: number;
167
179
  tax_amount_float: number;
180
+ compare_at_amount_cents: number;
181
+ compare_at_amount_float: number;
182
+ formatted_compare_at_amount: string;
168
183
  name: string;
169
184
  image_url: string;
170
185
  created_at: string;
@@ -253,6 +268,9 @@ export declare const presetLineItems: {
253
268
  formatted_total_amount: string;
254
269
  tax_amount_cents: number;
255
270
  tax_amount_float: number;
271
+ compare_at_amount_cents: number;
272
+ compare_at_amount_float: number;
273
+ formatted_compare_at_amount: string;
256
274
  formatted_tax_amount: string;
257
275
  name: string;
258
276
  image_url: string;
@@ -289,6 +307,9 @@ export declare const presetLineItems: {
289
307
  tax_amount_cents: number;
290
308
  tax_amount_float: number;
291
309
  formatted_tax_amount: string;
310
+ compare_at_amount_cents: number;
311
+ compare_at_amount_float: number;
312
+ formatted_compare_at_amount: string;
292
313
  name: string;
293
314
  image_url: null;
294
315
  discount_breakdown: {};
@@ -324,6 +345,9 @@ export declare const presetLineItems: {
324
345
  tax_amount_cents: number;
325
346
  tax_amount_float: number;
326
347
  formatted_tax_amount: string;
348
+ compare_at_amount_cents: number;
349
+ compare_at_amount_float: number;
350
+ formatted_compare_at_amount: string;
327
351
  name: string;
328
352
  image_url: null;
329
353
  discount_breakdown: {};
@@ -360,6 +384,9 @@ export declare const presetLineItems: {
360
384
  tax_amount_cents: number;
361
385
  tax_amount_float: number;
362
386
  formatted_tax_amount: string;
387
+ compare_at_amount_cents: number;
388
+ compare_at_amount_float: number;
389
+ formatted_compare_at_amount: string;
363
390
  name: string;
364
391
  image_url: null;
365
392
  discount_breakdown: {};
@@ -395,6 +422,9 @@ export declare const presetLineItems: {
395
422
  tax_amount_cents: number;
396
423
  tax_amount_float: number;
397
424
  formatted_tax_amount: string;
425
+ compare_at_amount_cents: number;
426
+ compare_at_amount_float: number;
427
+ formatted_compare_at_amount: string;
398
428
  name: string;
399
429
  image_url: null;
400
430
  discount_breakdown: {};
@@ -430,6 +460,9 @@ export declare const presetLineItems: {
430
460
  tax_amount_cents: number;
431
461
  tax_amount_float: number;
432
462
  formatted_tax_amount: string;
463
+ compare_at_amount_cents: number;
464
+ compare_at_amount_float: number;
465
+ formatted_compare_at_amount: string;
433
466
  name: string;
434
467
  image_url: null;
435
468
  discount_breakdown: {};
@@ -466,6 +499,9 @@ export declare const presetLineItems: {
466
499
  tax_amount_cents: number;
467
500
  tax_amount_float: number;
468
501
  formatted_tax_amount: string;
502
+ compare_at_amount_cents: number;
503
+ compare_at_amount_float: number;
504
+ formatted_compare_at_amount: string;
469
505
  name: string;
470
506
  image_url: null;
471
507
  discount_breakdown: {};
@@ -502,6 +538,9 @@ export declare const presetLineItems: {
502
538
  tax_amount_cents: number;
503
539
  tax_amount_float: number;
504
540
  formatted_tax_amount: string;
541
+ compare_at_amount_cents: number;
542
+ compare_at_amount_float: number;
543
+ formatted_compare_at_amount: string;
505
544
  name: string;
506
545
  image_url: null;
507
546
  discount_breakdown: {};
@@ -538,6 +577,9 @@ export declare const presetLineItems: {
538
577
  tax_amount_cents: number;
539
578
  tax_amount_float: number;
540
579
  formatted_tax_amount: string;
580
+ compare_at_amount_cents: number;
581
+ compare_at_amount_float: number;
582
+ formatted_compare_at_amount: string;
541
583
  name: string;
542
584
  image_url: null;
543
585
  discount_breakdown: {};
@@ -396,4 +396,74 @@ export declare const presetResourceListItem: {
396
396
  created_at: string;
397
397
  };
398
398
  };
399
+ stockTransferUpcoming: {
400
+ type: "stock_transfers";
401
+ id: string;
402
+ number: number;
403
+ quantity: number;
404
+ updated_at: string;
405
+ created_at: string;
406
+ status: "upcoming";
407
+ origin_stock_location: {
408
+ readonly type: "stock_locations";
409
+ readonly id: "";
410
+ readonly name: "US Warehouse";
411
+ readonly created_at: "";
412
+ readonly updated_at: "";
413
+ };
414
+ destination_stock_location: {
415
+ readonly type: "stock_locations";
416
+ readonly id: "";
417
+ readonly name: "NY Store";
418
+ readonly created_at: "";
419
+ readonly updated_at: "";
420
+ };
421
+ };
422
+ stockTransferPicking: {
423
+ type: "stock_transfers";
424
+ id: string;
425
+ number: number;
426
+ quantity: number;
427
+ updated_at: string;
428
+ created_at: string;
429
+ status: "picking";
430
+ origin_stock_location: {
431
+ readonly type: "stock_locations";
432
+ readonly id: "";
433
+ readonly name: "US Warehouse";
434
+ readonly created_at: "";
435
+ readonly updated_at: "";
436
+ };
437
+ destination_stock_location: {
438
+ readonly type: "stock_locations";
439
+ readonly id: "";
440
+ readonly name: "NY Store";
441
+ readonly created_at: "";
442
+ readonly updated_at: "";
443
+ };
444
+ };
445
+ stockTransferCompleted: {
446
+ type: "stock_transfers";
447
+ id: string;
448
+ number: number;
449
+ quantity: number;
450
+ updated_at: string;
451
+ created_at: string;
452
+ completed_at: string;
453
+ status: "completed";
454
+ origin_stock_location: {
455
+ readonly type: "stock_locations";
456
+ readonly id: "";
457
+ readonly name: "US Warehouse";
458
+ readonly created_at: "";
459
+ readonly updated_at: "";
460
+ };
461
+ destination_stock_location: {
462
+ readonly type: "stock_locations";
463
+ readonly id: "";
464
+ readonly name: "NY Store";
465
+ readonly created_at: "";
466
+ readonly updated_at: "";
467
+ };
468
+ };
399
469
  };
@@ -1,3 +1,4 @@
1
1
  export { customerToProps } from './customers';
2
2
  export { orderToProps } from './orders';
3
3
  export { returnToProps } from './returns';
4
+ export { stockTransferToProps } from './stockTransfers';
@@ -0,0 +1,3 @@
1
+ import type { StockTransfer } from '@commercelayer/sdk';
2
+ import { type ResourceToProps } from '../types';
3
+ export declare const stockTransferToProps: ResourceToProps<StockTransfer>;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import type { TokenProviderAuthUser } from '../../../providers/TokenProvider/types';
3
- import type { Customer, Order, Return } from '@commercelayer/sdk';
4
- export type ResourceListItemType = Order | Return | Customer;
3
+ import type { Customer, Order, Return, StockTransfer } from '@commercelayer/sdk';
4
+ export type ResourceListItemType = Order | Return | Customer | StockTransfer;
5
5
  export interface ResourceListItemComponentProps {
6
6
  name: string;
7
7
  description: JSX.Element | string;
@@ -1,9 +1,13 @@
1
+ import { type ResourceShipmentParcels } from '../resources/ResourceShipmentParcels';
2
+ type Shipment = Parameters<typeof ResourceShipmentParcels>[0]['shipment'];
3
+ type Parcel = NonNullable<Shipment['parcels']>[number];
1
4
  export declare const parcelWithoutTracking1: import("@commercelayer/sdk/lib/cjs/resources/parcels").Parcel;
2
5
  export declare const parcelWithoutTracking2: import("@commercelayer/sdk/lib/cjs/resources/parcels").Parcel;
3
6
  export declare const parcelWithTracking1: import("@commercelayer/sdk/lib/cjs/resources/parcels").Parcel;
4
7
  export declare const parcelWithTracking2: import("@commercelayer/sdk/lib/cjs/resources/parcels").Parcel;
5
8
  export declare const parcelWithTracking3: import("@commercelayer/sdk/lib/cjs/resources/parcels").Parcel;
6
9
  export declare const parcelWithoutTrackingDetails1: import("@commercelayer/sdk/lib/cjs/resources/parcels").Parcel;
10
+ export declare const parcelWithCustomsInfo: Parcel;
7
11
  export declare const shipmentWithoutTracking: import("@commercelayer/sdk/lib/cjs/resources/shipments").Shipment;
8
12
  export declare const shipmentWithStatusDifferentFromPacking: import("@commercelayer/sdk/lib/cjs/resources/shipments").Shipment;
9
13
  export declare const shipmentHasBeenPurchased: import("@commercelayer/sdk/lib/cjs/resources/shipments").Shipment;
@@ -13,3 +17,5 @@ export declare const shipmentWithMultipleParcelsSingleTracking: import("@commerc
13
17
  export declare const shipmentWithMultipleParcelsMultipleTrackings: import("@commercelayer/sdk/lib/cjs/resources/shipments").Shipment;
14
18
  export declare const shipmentWithoutTrackingDetails: import("@commercelayer/sdk/lib/cjs/resources/shipments").Shipment;
15
19
  export declare const shipmentWithoutParcels: import("@commercelayer/sdk/lib/cjs/resources/shipments").Shipment;
20
+ export declare const shipmentWithCustomsInfo: import("@commercelayer/sdk/lib/cjs/resources/shipments").Shipment;
21
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercelayer/app-elements",
3
- "version": "1.5.1",
3
+ "version": "1.6.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@ac-dev/countries-service": "^1.2.0",
25
- "@commercelayer/sdk": "5.19.2",
25
+ "@commercelayer/sdk": "5.20.0",
26
26
  "@types/lodash": "^4.14.200",
27
27
  "@types/react": "^18.2.34",
28
28
  "@types/react-datepicker": "^4.19.1",