@commercelayer/app-elements 1.6.1 → 1.6.3
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/{InputDateComponent-a68809f7.js → InputDateComponent-e226c0f9.js} +1 -1
- package/dist/helpers/date.d.ts +12 -0
- package/dist/{main-843e8b0f.js → main-57d61542.js} +5370 -5309
- package/dist/main.d.ts +2 -1
- package/dist/main.js +96 -94
- package/dist/ui/atoms/RemoveButton.d.ts +8 -0
- package/dist/ui/atoms/RemoveButton.test.d.ts +1 -0
- package/dist/ui/forms/InputCurrency/InputCurrency.d.ts +8 -4
- package/dist/ui/forms/InputCurrency/utils.d.ts +1 -1
- package/dist/ui/resources/ResourceOrderSummary/AdjustTotalOverlay.d.ts +7 -1
- package/package.json +2 -2
package/dist/main.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { goBack, navigateTo } from './helpers/appsNavigation';
|
|
2
2
|
export { isAttachmentValidNote, referenceOrigins } from './helpers/attachments';
|
|
3
|
-
export { formatDate, getIsoDateAtDayEdge, getIsoDateAtDaysBefore, sortAndGroupByDate, timeSeparator } from './helpers/date';
|
|
3
|
+
export { formatDate, formatDateWithPredicate, getIsoDateAtDayEdge, getIsoDateAtDaysBefore, sortAndGroupByDate, timeSeparator } from './helpers/date';
|
|
4
4
|
export { downloadJsonAsFile } from './helpers/downloadJsonAsFile';
|
|
5
5
|
export { computeFullname, formatDisplayName } from './helpers/name';
|
|
6
6
|
export { formatResourceName, type TriggerAttribute } from './helpers/resources';
|
|
@@ -33,6 +33,7 @@ export { PageHeading, type PageHeadingProps } from './ui/atoms/PageHeading';
|
|
|
33
33
|
export { Pagination, type PaginationProps } from './ui/atoms/Pagination';
|
|
34
34
|
export { Progress, type ProgressProps } from './ui/atoms/Progress';
|
|
35
35
|
export { RadialProgress, type RadialProgressProps } from './ui/atoms/RadialProgress';
|
|
36
|
+
export { RemoveButton, type RemoveButtonProps } from './ui/atoms/RemoveButton';
|
|
36
37
|
export { Section, type SectionProps } from './ui/atoms/Section';
|
|
37
38
|
export { Skeleton, SkeletonItem, type SkeletonItemProps, type SkeletonProps } from './ui/atoms/Skeleton';
|
|
38
39
|
export { SkeletonTemplate, withSkeletonTemplate } from './ui/atoms/SkeletonTemplate';
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ar as i, b0 as b, as as c, at as p, au as l, av as d, aw as g, ax as m, ay as S, b1 as I, az as k, aA as T, ai as D, b2 as R, b3 as y, b4 as C, aB as h, al as H, am as P, aC as A, aD as f, bg as B, bh as F, bj as v, bl as L, bn as O, br as G, bt as N, by as V, bB as w, bD as x, bK as E, bM as M, bO as J, bR as W, bV as U, bW as Y, aE as Z, aF as $, bi as j, bk as q, bm as z, bo as K, bq as Q, bs as X, bu as _, bv as aa, bw as ea, bx as sa, bz as ta, bA as ra, bC as oa, bE as na, bL as ua, bN as ia, bP as ba, bQ as ca, bS as pa, bT as la, bU as da, b5 as ga, b6 as ma, b7 as Sa, b8 as Ia, ao as ka, b9 as Ta, aG as Da, ba as Ra, bb as ya, aH as Ca, aI as ha, aJ as Ha, aK as Pa, bc as Aa, bZ as fa, b_ as Ba, b$ as Fa, c0 as va, c1 as La, c2 as Oa, c3 as Ga, c4 as Na, c5 as Va, bd as wa, aL as xa, aM as Ea, aN as Ma, aO as Ja, aQ as Wa, aR as Ua, aS as Ya, aT as Za, aY as $a, aU as ja, be as qa, aZ as za, a_ as Ka, aV as Qa, a$ as Xa, aW as _a, bf as ae, ap as ee, aX as se, a3 as te, a2 as re, bF as oe, bp as ne, W as ue, Y as ie, a4 as be, a5 as ce, a6 as pe, c7 as le, c8 as de, bG as ge, Z as me, $ as Se, c9 as Ie, ca as ke, cb as Te, cc as De, cd as Re, ce as ye, a7 as Ce, a8 as he, cf as He, cg as Pe, a9 as Ae, aa as fe, ch as Be, ci as Fe, S as ve, ab as Le, ac as Oe, U as Ge, bH as Ne, bI as Ve, bJ as we, T as xe, V as Ee, bX as Me, a0 as Je, a1 as We, ad as Ue, aj as Ye, ak as Ze, ae as $e, af as je, ag as qe, ah as ze, c6 as Ke, an as Qe, aq as Xe, bY as _e, aP as as } from "./main-57d61542.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
import "@commercelayer/sdk";
|
|
@@ -8,8 +8,8 @@ import "query-string";
|
|
|
8
8
|
export {
|
|
9
9
|
i as A,
|
|
10
10
|
b as ActionButtons,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
c as Alert,
|
|
12
|
+
p as Avatar,
|
|
13
13
|
l as AvatarLetter,
|
|
14
14
|
d as Badge,
|
|
15
15
|
g as Button,
|
|
@@ -22,13 +22,13 @@ export {
|
|
|
22
22
|
R as Dropdown,
|
|
23
23
|
y as DropdownDivider,
|
|
24
24
|
C as DropdownItem,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
h as EmptyState,
|
|
26
|
+
H as ErrorBoundary,
|
|
27
|
+
P as GTMProvider,
|
|
28
|
+
A as Grid,
|
|
29
|
+
f as Hint,
|
|
30
|
+
B as HookedForm,
|
|
31
|
+
F as HookedInput,
|
|
32
32
|
v as HookedInputCheckbox,
|
|
33
33
|
L as HookedInputCheckboxGroup,
|
|
34
34
|
O as HookedInputCurrency,
|
|
@@ -40,8 +40,8 @@ export {
|
|
|
40
40
|
E as HookedInputSimpleSelect,
|
|
41
41
|
M as HookedInputSpinner,
|
|
42
42
|
J as HookedInputSwitch,
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
W as HookedInputToggleButton,
|
|
44
|
+
U as HookedValidationApiError,
|
|
45
45
|
Y as HookedValidationError,
|
|
46
46
|
Z as Hr,
|
|
47
47
|
$ as Icon,
|
|
@@ -62,8 +62,8 @@ export {
|
|
|
62
62
|
ua as InputSimpleSelect,
|
|
63
63
|
ia as InputSpinner,
|
|
64
64
|
ba as InputSwitch,
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
ca as InputTextArea,
|
|
66
|
+
pa as InputToggleButton,
|
|
67
67
|
la as Label,
|
|
68
68
|
da as Legend,
|
|
69
69
|
ga as List,
|
|
@@ -76,87 +76,89 @@ export {
|
|
|
76
76
|
Ra as PageLayout,
|
|
77
77
|
ya as PageSkeleton,
|
|
78
78
|
Ca as Pagination,
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
ha as Progress,
|
|
80
|
+
Ha as RadialProgress,
|
|
81
|
+
Pa as RemoveButton,
|
|
81
82
|
Aa as Report,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
83
|
+
fa as ResourceAddress,
|
|
84
|
+
Ba as ResourceLineItems,
|
|
85
|
+
Fa as ResourceList,
|
|
86
|
+
va as ResourceListItem,
|
|
87
|
+
La as ResourceMetadata,
|
|
88
|
+
Oa as ResourceOrderSummary,
|
|
89
|
+
Ga as ResourceOrderTimeline,
|
|
90
|
+
Na as ResourceShipmentParcels,
|
|
91
|
+
Va as ResourceTags,
|
|
92
|
+
wa as SearchBar,
|
|
93
|
+
xa as Section,
|
|
94
|
+
Ea as Skeleton,
|
|
95
|
+
Ma as SkeletonItem,
|
|
96
|
+
Ja as SkeletonTemplate,
|
|
97
|
+
Wa as Spacer,
|
|
97
98
|
Ua as Stack,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
pe as
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
He as
|
|
134
|
-
|
|
135
|
-
Ae as
|
|
136
|
-
|
|
99
|
+
Ya as StatusDot,
|
|
100
|
+
Za as Steps,
|
|
101
|
+
$a as Tab,
|
|
102
|
+
ja as Table,
|
|
103
|
+
qa as TableData,
|
|
104
|
+
za as Tabs,
|
|
105
|
+
Ka as Tag,
|
|
106
|
+
Qa as Td,
|
|
107
|
+
Xa as Text,
|
|
108
|
+
_a as Th,
|
|
109
|
+
ae as Timeline,
|
|
110
|
+
ee as TokenProvider,
|
|
111
|
+
se as Tr,
|
|
112
|
+
te as computeFullname,
|
|
113
|
+
re as downloadJsonAsFile,
|
|
114
|
+
oe as flatSelectValues,
|
|
115
|
+
ne as formatCentsToCurrency,
|
|
116
|
+
ue as formatDate,
|
|
117
|
+
ie as formatDateWithPredicate,
|
|
118
|
+
be as formatDisplayName,
|
|
119
|
+
ce as formatResourceName,
|
|
120
|
+
pe as getAvatarSrcFromRate,
|
|
121
|
+
le as getCustomerDisplayStatus,
|
|
122
|
+
de as getCustomerStatusName,
|
|
123
|
+
ge as getDefaultValueFromFlatten,
|
|
124
|
+
me as getIsoDateAtDayEdge,
|
|
125
|
+
Se as getIsoDateAtDaysBefore,
|
|
126
|
+
Ie as getOrderDisplayStatus,
|
|
127
|
+
ke as getOrderFulfillmentStatusName,
|
|
128
|
+
Te as getOrderPaymentStatusName,
|
|
129
|
+
De as getOrderStatusName,
|
|
130
|
+
Re as getOrderTransactionPastTense,
|
|
131
|
+
ye as getOrderTriggerAttributeName,
|
|
132
|
+
Ce as getParcelTrackingDetail,
|
|
133
|
+
he as getParcelTrackingDetails,
|
|
134
|
+
He as getReturnDisplayStatus,
|
|
135
|
+
Pe as getReturnStatusName,
|
|
136
|
+
Ae as getShipmentRate,
|
|
137
|
+
fe as getShipmentRates,
|
|
138
|
+
Be as getStockTransferDisplayStatus,
|
|
137
139
|
Fe as getStockTransferStatusName,
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
140
|
+
ve as goBack,
|
|
141
|
+
Le as hasBeenPurchased,
|
|
142
|
+
Oe as hasSingleTracking,
|
|
143
|
+
Ge as isAttachmentValidNote,
|
|
144
|
+
Ne as isGroupedSelectValues,
|
|
145
|
+
Ve as isMultiValueSelected,
|
|
146
|
+
we as isSingleValueSelected,
|
|
147
|
+
xe as navigateTo,
|
|
148
|
+
Ee as referenceOrigins,
|
|
149
|
+
Me as setApiFormErrors,
|
|
150
|
+
Je as sortAndGroupByDate,
|
|
151
|
+
We as timeSeparator,
|
|
152
|
+
Ue as useClickAway,
|
|
153
|
+
Ye as useCoreApi,
|
|
154
|
+
Ze as useCoreSdkProvider,
|
|
155
|
+
$e as useDelayShow,
|
|
156
|
+
je as useIsChanged,
|
|
157
|
+
qe as useOnBlurFromContainer,
|
|
158
|
+
ze as useOverlay,
|
|
159
|
+
Ke as useResourceFilters,
|
|
160
|
+
Qe as useTagManager,
|
|
161
|
+
Xe as useTokenProvider,
|
|
162
|
+
_e as useValidationFeedback,
|
|
163
|
+
as as withSkeletonTemplate
|
|
162
164
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface RemoveButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
}
|
|
4
|
+
/** Remove button is simply a button with attached an icon that highlight the functionality. */
|
|
5
|
+
export declare function RemoveButton({ children, className, ...rest }: RemoveButtonProps): JSX.Element;
|
|
6
|
+
export declare namespace RemoveButton {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -36,10 +36,14 @@ export interface InputCurrencyProps extends InputWrapperBaseProps, Pick<ReactCur
|
|
|
36
36
|
*/
|
|
37
37
|
hideCurrencySymbol?: boolean;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
* It defines which are the available signs.
|
|
40
|
+
*
|
|
41
|
+
* By default only `+` sign is allowed, but you can set it to `-` if you want to use only negative numbers.
|
|
42
|
+
*
|
|
43
|
+
* The signs `+-` and `-+` can accept both positive and negative numbers (first sign is the default).
|
|
44
|
+
* @default +
|
|
45
|
+
*/
|
|
46
|
+
sign?: '+' | '-' | '+-' | '-+';
|
|
43
47
|
/**
|
|
44
48
|
* Show (X) button to clear the input
|
|
45
49
|
*/
|
|
@@ -23,7 +23,7 @@ export declare function addCurrencySymbol({ formattedValue, currency }: {
|
|
|
23
23
|
* Example: JPY -> 0
|
|
24
24
|
* Example: CLF -> 0,0000
|
|
25
25
|
*/
|
|
26
|
-
export declare function makePlaceholder(currency: Currency): string;
|
|
26
|
+
export declare function makePlaceholder(currency: Currency, prefix?: string): string;
|
|
27
27
|
/**
|
|
28
28
|
* Format cents to currency.
|
|
29
29
|
* Useful to display the returned value from `<InputCurrency>` component.
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { Order } from '@commercelayer/sdk';
|
|
2
|
-
|
|
2
|
+
interface Props {
|
|
3
|
+
order: Order;
|
|
4
|
+
onChange?: () => void;
|
|
5
|
+
close: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function useAdjustTotalOverlay(order: Props['order'], onChange?: Props['onChange']): {
|
|
3
8
|
close: () => void;
|
|
4
9
|
open: () => void;
|
|
5
10
|
Overlay: () => import("react/jsx-runtime").JSX.Element;
|
|
6
11
|
};
|
|
12
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercelayer/app-elements",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
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.
|
|
25
|
+
"@commercelayer/sdk": "5.21.1",
|
|
26
26
|
"@types/lodash": "^4.14.200",
|
|
27
27
|
"@types/react": "^18.2.34",
|
|
28
28
|
"@types/react-datepicker": "^4.19.1",
|