@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/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 { 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";
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
- p as Alert,
12
- c as Avatar,
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
- H as EmptyState,
26
- h as ErrorBoundary,
27
- A as GTMProvider,
28
- P as Grid,
29
- F as Hint,
30
- f as HookedForm,
31
- B as HookedInput,
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
- U as HookedInputToggleButton,
44
- W as HookedValidationApiError,
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
- pa as InputTextArea,
66
- ca as InputToggleButton,
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
- Ha as Progress,
80
- ha as RadialProgress,
79
+ ha as Progress,
80
+ Ha as RadialProgress,
81
+ Pa as RemoveButton,
81
82
  Aa as Report,
82
- Pa as ResourceAddress,
83
- Fa as ResourceLineItems,
84
- fa as ResourceList,
85
- Ba as ResourceListItem,
86
- va as ResourceMetadata,
87
- La as ResourceOrderSummary,
88
- Oa as ResourceOrderTimeline,
89
- Ga as ResourceShipmentParcels,
90
- Na as ResourceTags,
91
- Va as SearchBar,
92
- wa as Section,
93
- xa as Skeleton,
94
- Ea as SkeletonItem,
95
- Ma as SkeletonTemplate,
96
- Ja as Spacer,
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
- Wa as StatusDot,
99
- Ya as Steps,
100
- Za as Tab,
101
- $a as Table,
102
- ja as TableData,
103
- qa as Tabs,
104
- za as Tag,
105
- Ka as Td,
106
- Qa as Text,
107
- Xa as Th,
108
- _a as Timeline,
109
- ae as TokenProvider,
110
- ee as Tr,
111
- se as computeFullname,
112
- te as downloadJsonAsFile,
113
- re as flatSelectValues,
114
- oe as formatCentsToCurrency,
115
- ne as formatDate,
116
- ue as formatDisplayName,
117
- ie as formatResourceName,
118
- be as getAvatarSrcFromRate,
119
- pe as getCustomerDisplayStatus,
120
- ce as getCustomerStatusName,
121
- le as getDefaultValueFromFlatten,
122
- de as getIsoDateAtDayEdge,
123
- ge as getIsoDateAtDaysBefore,
124
- me as getOrderDisplayStatus,
125
- Se as getOrderFulfillmentStatusName,
126
- Ie as getOrderPaymentStatusName,
127
- ke as getOrderStatusName,
128
- Te as getOrderTransactionPastTense,
129
- De as getOrderTriggerAttributeName,
130
- Re as getParcelTrackingDetail,
131
- ye as getParcelTrackingDetails,
132
- Ce as getReturnDisplayStatus,
133
- He as getReturnStatusName,
134
- he as getShipmentRate,
135
- Ae as getShipmentRates,
136
- Pe as getStockTransferDisplayStatus,
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
- fe as goBack,
139
- Be as hasBeenPurchased,
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
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
- * Allow user to enter negative value
40
- * @default false
41
- */
42
- allowNegativeValue?: boolean;
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
- export declare function useAdjustTotalOverlay(order: Order, onChange?: () => void): {
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.1",
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.20.0",
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",