@commercelayer/app-elements 5.3.0 → 5.3.2
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/{CodeEditorComponent-CTNaTIZn.js → CodeEditorComponent-BlQAIoAq.js} +1 -1
- package/dist/{InputDateComponent-O0J0Np2a.js → InputDateComponent-3cktE7aY.js} +1 -1
- package/dist/{en-BmYJPi7w.js → en-BH0MKopU.js} +2 -1
- package/dist/helpers/transactions.d.ts +7 -0
- package/dist/helpers/transactions.test.d.ts +1 -0
- package/dist/{it-BG6oL8Br.js → it-CgBMZHQa.js} +2 -1
- package/dist/locales/en.d.ts +1 -0
- package/dist/{main-Du-FJA5W.js → main-IhWFRwNg.js} +4011 -3981
- package/dist/main.d.ts +1 -0
- package/dist/main.js +32 -31
- package/dist/ui/composite/PageLayout.d.ts +37 -11
- package/dist/ui/internals/useCountryList.d.ts +14 -0
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { downloadJsonAsFile } from './helpers/downloadJsonAsFile';
|
|
|
6
6
|
export { computeFullname, formatDisplayName } from './helpers/name';
|
|
7
7
|
export { formatResourceName, getResourceEndpoint, type TriggerAttribute } from './helpers/resources';
|
|
8
8
|
export { getAvatarSrcFromRate, getParcelTrackingDetail, getParcelTrackingDetails, getShipmentRate, getShipmentRates, hasBeenPurchased, hasSingleTracking, type Rate, type TrackingDetail } from './helpers/tracking';
|
|
9
|
+
export { orderTransactionIsAnAsyncCapture } from './helpers/transactions';
|
|
9
10
|
export { getUnitOfWeightName, getUnitsOfWeightForSelect, type UnitOfWeight } from './helpers/unitsOfWeight';
|
|
10
11
|
export { useAppLinking } from './helpers/useAppLinking';
|
|
11
12
|
export { useClickAway } from './hooks/useClickAway';
|
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { aM as s, bq as t, br as o, aN as r, aO as c, aP as n, aQ as u, aR as i, aS as d, aT as l, aU as p, bs as b, aV as g, bP as m, aW as S, aX as I, ax as k, bt as T, bu as R, bv as D, bw as y, aY as h, aB as A, aC as C, bI as P, aZ as H, a_ as F, bx as v, bQ as f, bR as B, bS as L, bU as O, bW as E, bZ as N, c0 as G, c2 as w, c7 as M, c9 as V, ce as x, cj as W, cl as J, cn as U, cp as Y, cr as X, cv as Z, cw as _, cx as $, a$ as j, aF as q, b0 as z, bT as K, bV as Q, bX as aa, b_ as ea, b$ as sa, c1 as ta, c3 as oa, c4 as ra, c5 as ca, c6 as na, c8 as ua, ca as ia, cf as da, ck as la, cm as pa, co as ba, cq as ga, cs as ma, ct as Sa, cu as Ia, by as ka, bz as Ta, bA as Ra, bB as Da, bJ as ya, aK as ha, bC as Aa, b1 as Ca, bD as Pa, bE as Ha, b2 as Fa, b3 as va, b4 as fa, b5 as Ba, bF as La, cB as Oa, cC as Ea, cE as Na, cF as Ga, cG as wa, cH as Ma, cI as Va, cJ as xa, cL as Wa, cM as Ja, cN as Ua, bK as Ya, b6 as Xa, bL as Za, b7 as _a, b8 as $a, b9 as ja, ba as qa, bc as za, bd as Ka, be as Qa, bf as ae, bg as ee, bl as se, bh as te, bM as oe, bm as re, bn as ce, bi as ne, bo as ue, bj as ie, bN as de, aL as le, bO as pe, bp as be, bk as ge, aH as me, ab as Se, aA as Ie, bG as ke, bH as Te, _ as Re, $ as De, aa as ye, aJ as he, cc as Ae, bY as Ce, a0 as Pe, a1 as He, a2 as Fe, ac as ve, ad as fe, af as Be, cQ as Le, cR as Oe, cd as Ee, a3 as Ne, a4 as Ge, a5 as we, cS as Me, cT as Ve, cU as xe, cV as We, cW as Je, ag as Ue, ah as Ye, cK as Xe, cX as Ze, cA as _e, ae as $e, cY as je, cZ as qe, c_ as ze, ai as Ke, aj as Qe, c$ as as, d0 as es, d1 as ss, an as ts, ao as os, W as rs, ak as cs, al as ns, aE as us, Y as is, R as ds, cg as ls, ch as ps, ci as bs, a6 as gs, X as ms, am as Ss, Z as Is, a7 as ks, cy as Ts, a8 as Rs, aG as Ds, a9 as ys, ap as hs, aq as As, ay as Cs, az as Ps, ar as Hs, as as Fs, at as vs, cb as fs, au as Bs, av as Ls, aw as Os, cD as Es, cO as Ns, cP as Gs, aD as ws, u as Ms, aI as Vs, cz as xs, bb as Ws } from "./main-IhWFRwNg.js";
|
|
3
3
|
export {
|
|
4
4
|
s as A,
|
|
5
5
|
t as ActionButtons,
|
|
@@ -23,8 +23,8 @@ export {
|
|
|
23
23
|
D as DropdownItem,
|
|
24
24
|
y as DropdownSearch,
|
|
25
25
|
h as EmptyState,
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
A as ErrorBoundary,
|
|
27
|
+
C as GTMProvider,
|
|
28
28
|
P as GenericPageNotFound,
|
|
29
29
|
H as Grid,
|
|
30
30
|
F as Hint,
|
|
@@ -77,8 +77,8 @@ export {
|
|
|
77
77
|
Da as ListItem,
|
|
78
78
|
ya as LoadingPage,
|
|
79
79
|
ha as MetaTags,
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
Aa as PageError,
|
|
81
|
+
Ca as PageHeading,
|
|
82
82
|
Pa as PageLayout,
|
|
83
83
|
Ha as PageSkeleton,
|
|
84
84
|
Fa as Pagination,
|
|
@@ -131,8 +131,8 @@ export {
|
|
|
131
131
|
De as currencyInputSelectOptions,
|
|
132
132
|
ye as downloadJsonAsFile,
|
|
133
133
|
he as encodeExtras,
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
Ae as flatSelectValues,
|
|
135
|
+
Ce as formatCentsToCurrency,
|
|
136
136
|
Pe as formatDate,
|
|
137
137
|
He as formatDateRange,
|
|
138
138
|
Fe as formatDateWithPredicate,
|
|
@@ -177,29 +177,30 @@ export {
|
|
|
177
177
|
bs as isSingleValueSelected,
|
|
178
178
|
gs as makeDateYearsRange,
|
|
179
179
|
ms as navigateTo,
|
|
180
|
-
Ss as
|
|
181
|
-
Is as
|
|
182
|
-
ks as
|
|
183
|
-
Ts as
|
|
184
|
-
Rs as
|
|
185
|
-
Ds as
|
|
186
|
-
ys as
|
|
187
|
-
hs as
|
|
180
|
+
Ss as orderTransactionIsAnAsyncCapture,
|
|
181
|
+
Is as referenceOrigins,
|
|
182
|
+
ks as removeMillisecondsFromIsoDate,
|
|
183
|
+
Ts as setApiFormErrors,
|
|
184
|
+
Rs as sortAndGroupByDate,
|
|
185
|
+
Ds as t,
|
|
186
|
+
ys as timeSeparator,
|
|
187
|
+
hs as useAppLinking,
|
|
188
|
+
As as useClickAway,
|
|
188
189
|
Cs as useCoreApi,
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
190
|
+
Ps as useCoreSdkProvider,
|
|
191
|
+
Hs as useDelayShow,
|
|
192
|
+
Fs as useEditMetadataOverlay,
|
|
193
|
+
vs as useEditTagsOverlay,
|
|
194
|
+
fs as useInputResourceGroupOverlay,
|
|
195
|
+
Bs as useIsChanged,
|
|
196
|
+
Ls as useOnBlurFromContainer,
|
|
197
|
+
Os as useOverlay,
|
|
198
|
+
Es as useResourceAddressOverlay,
|
|
199
|
+
Ns as useResourceFilters,
|
|
200
|
+
Gs as useResourceList,
|
|
201
|
+
ws as useTagManager,
|
|
202
|
+
Ms as useTokenProvider,
|
|
203
|
+
Vs as useTranslation,
|
|
204
|
+
xs as useValidationFeedback,
|
|
205
|
+
Ws as withSkeletonTemplate
|
|
205
206
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ContainerProps } from '../atoms/Container';
|
|
2
2
|
import { PageHeadingProps } from '../atoms/PageHeading';
|
|
3
|
+
import { OverlayProps } from '../internals/Overlay';
|
|
3
4
|
import { ReactNode } from 'react';
|
|
4
|
-
export
|
|
5
|
+
export type PageLayoutProps = Pick<PageHeadingProps, 'title' | 'description' | 'navigationButton' | 'toolbar' | 'gap'> & Pick<ContainerProps, 'minHeight'> & {
|
|
5
6
|
/**
|
|
6
7
|
* Page content
|
|
7
8
|
*/
|
|
@@ -11,28 +12,44 @@ export interface PageLayoutProps extends Pick<PageHeadingProps, 'title' | 'descr
|
|
|
11
12
|
* Only if app is standalone mode.
|
|
12
13
|
*/
|
|
13
14
|
mode?: 'test' | 'live';
|
|
14
|
-
/**
|
|
15
|
-
* Renders as overlay
|
|
16
|
-
*/
|
|
17
|
-
overlay?: boolean;
|
|
18
15
|
/**
|
|
19
16
|
* Optional prop to enable scroll to top behavior on location change
|
|
20
17
|
*/
|
|
21
18
|
scrollToTop?: boolean;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
mode?: "test" | "live"
|
|
19
|
+
} & ({
|
|
20
|
+
overlay?: false;
|
|
21
|
+
} | {
|
|
26
22
|
/**
|
|
27
23
|
* Renders as overlay
|
|
28
24
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
overlay: true;
|
|
26
|
+
/**
|
|
27
|
+
* Footer element to be rendered at the bottom of the overlay.
|
|
28
|
+
**/
|
|
29
|
+
overlayFooter?: OverlayProps['footer'];
|
|
30
|
+
});
|
|
31
|
+
export declare const PageLayout: import('../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
32
|
+
description?: ReactNode;
|
|
33
|
+
title: ReactNode;
|
|
34
|
+
toolbar?: import('../atoms/PageHeading/PageHeadingToolbar').PageHeadingToolbarProps | undefined;
|
|
35
|
+
gap?: "none" | "only-top" | "only-bottom" | "both" | undefined;
|
|
36
|
+
navigationButton?: {
|
|
37
|
+
label: string;
|
|
38
|
+
onClick: () => void;
|
|
39
|
+
icon?: "x" | "arrowLeft";
|
|
40
|
+
} | undefined;
|
|
41
|
+
minHeight?: boolean | undefined;
|
|
42
|
+
children: ReactNode;
|
|
43
|
+
mode?: "test" | "live"
|
|
31
44
|
/**
|
|
32
45
|
* Optional prop to enable scroll to top behavior on location change
|
|
33
46
|
*/
|
|
34
47
|
| undefined;
|
|
35
48
|
scrollToTop?: boolean | undefined;
|
|
49
|
+
overlay?: false | undefined;
|
|
50
|
+
delayMs?: number | undefined;
|
|
51
|
+
isLoading?: boolean | undefined;
|
|
52
|
+
} | {
|
|
36
53
|
description?: ReactNode;
|
|
37
54
|
title: ReactNode;
|
|
38
55
|
toolbar?: import('../atoms/PageHeading/PageHeadingToolbar').PageHeadingToolbarProps | undefined;
|
|
@@ -43,6 +60,15 @@ export declare const PageLayout: import('../atoms/SkeletonTemplate').SkeletonTem
|
|
|
43
60
|
icon?: "x" | "arrowLeft";
|
|
44
61
|
} | undefined;
|
|
45
62
|
minHeight?: boolean | undefined;
|
|
63
|
+
children: ReactNode;
|
|
64
|
+
mode?: "test" | "live"
|
|
65
|
+
/**
|
|
66
|
+
* Optional prop to enable scroll to top behavior on location change
|
|
67
|
+
*/
|
|
68
|
+
| undefined;
|
|
69
|
+
scrollToTop?: boolean | undefined;
|
|
70
|
+
overlay: true;
|
|
71
|
+
overlayFooter?: ReactNode;
|
|
46
72
|
delayMs?: number | undefined;
|
|
47
73
|
isLoading?: boolean | undefined;
|
|
48
74
|
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface CountryOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Custom hook to fetch and manage a static list of countries.
|
|
7
|
+
* Utilizes SWR for data fetching with disabled revalidation, as the country list is static.
|
|
8
|
+
* Returns an array of { value, label } objects suitable for use in select inputs.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useCountryList(): {
|
|
11
|
+
countries: CountryOption[] | undefined;
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
error: any;
|
|
14
|
+
};
|