@commercelayer/app-elements 1.11.3 → 1.12.0

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,9 +1,11 @@
1
1
  export { goBack, navigateTo } from './helpers/appsNavigation';
2
2
  export { isAttachmentValidNote, referenceOrigins } from './helpers/attachments';
3
+ export { currencies, type CurrencyCode } from './helpers/currencies';
3
4
  export { formatDate, formatDateRange, formatDateWithPredicate, getEventDateInfo, getIsoDateAtDayEdge, getIsoDateAtDaysBefore, sortAndGroupByDate, timeSeparator } from './helpers/date';
4
5
  export { downloadJsonAsFile } from './helpers/downloadJsonAsFile';
5
6
  export { computeFullname, formatDisplayName } from './helpers/name';
6
7
  export { formatResourceName, type TriggerAttribute } from './helpers/resources';
8
+ export { createRoute, createTypedRoute, type GetParams } from './helpers/route';
7
9
  export { getAvatarSrcFromRate, getParcelTrackingDetail, getParcelTrackingDetails, getShipmentRate, getShipmentRates, hasBeenPurchased, hasSingleTracking, type Rate, type TrackingDetail } from './helpers/tracking';
8
10
  export { getUnitOfWeightName, getUnitsOfWeightForSelect, type UnitOfWeight } from './helpers/unitsOfWeight';
9
11
  export { useClickAway } from './hooks/useClickAway';
@@ -62,14 +64,13 @@ export { PageLayout, type PageLayoutProps } from './ui/composite/PageLayout';
62
64
  export { PageSkeleton, type PageSkeletonProps } from './ui/composite/PageSkeleton';
63
65
  export { Report, type ReportProps } from './ui/composite/Report';
64
66
  export { SearchBar, type SearchBarProps } from './ui/composite/SearchBar';
65
- export { SwitchMode, type SwitchModeProps } from './ui/composite/SwitchMode';
66
67
  export { TableData, type TableDataProps } from './ui/composite/TableData';
67
68
  export { Timeline, type TimelineEvent, type TimelineProps } from './ui/composite/Timeline';
68
69
  export { HookedForm } from './ui/forms/Form';
69
70
  export { HookedInput, Input, type HookedInputProps, type InputProps } from './ui/forms/Input';
70
71
  export { HookedInputCheckbox, InputCheckbox, type HookedInputCheckboxProps, type InputCheckboxProps } from './ui/forms/InputCheckbox';
71
72
  export { HookedInputCheckboxGroup, InputCheckboxGroup, type HookedInputCheckboxGroupProps, type InputCheckboxGroupProps } from './ui/forms/InputCheckboxGroup';
72
- export { HookedInputCurrency, InputCurrency, formatCentsToCurrency, type CurrencyCode, type HookedInputCurrencyProps, type InputCurrencyProps } from './ui/forms/InputCurrency';
73
+ export { HookedInputCurrency, InputCurrency, formatCentsToCurrency, type HookedInputCurrencyProps, type InputCurrencyProps } from './ui/forms/InputCurrency';
73
74
  export { InputCurrencyRange, type InputCurrencyRangeProps } from './ui/forms/InputCurrencyRange';
74
75
  export { HookedInputDate, InputDate, type HookedInputDateProps, type InputDateProps } from './ui/forms/InputDate';
75
76
  export { HookedInputDateRange, InputDateRange, type HookedInputDateRangeProps, type InputDateRangeProps } from './ui/forms/InputDateRange';
package/dist/main.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ax as i, ba as c, ay as p, az as b, aA as l, aB as d, aC as g, aD as m, aE as S, aF as I, aG as k, bb as T, aH as D, aI as R, ao as h, bc as y, bd as C, be as H, bf as P, aJ as A, ar as f, as as B, aK as F, aL as v, bs as O, bt as w, bv as N, bx as L, bz as G, bD as V, bF as x, bK as E, bN as M, bP as W, bW as U, bY as J, b_ as j, c0 as q, c2 as Y, c6 as Z, c7 as $, aM as z, aN as K, bu as Q, bw as X, by as _, bA as aa, bC as ea, bE as sa, bG as ta, bH as oa, bI as ra, bJ as na, bL as ua, bM as ia, bO as ca, bQ as pa, bX as ba, bZ as la, b$ as da, c1 as ga, c3 as ma, c4 as Sa, c5 as Ia, bg as ka, bh as Ta, bi as Da, bj as Ra, au as ha, bk as ya, aO as Ca, bl as Ha, bm as Pa, aP as Aa, aQ as fa, aR as Ba, aS as Fa, bn as va, ca as Oa, cb as wa, cc as Na, cd as La, ce as Ga, cf as Va, cg as xa, ch as Ea, ci as Ma, aT as Wa, bo as Ua, aU as Ja, aV as ja, aW as qa, aX as Ya, aZ as Za, a_ as $a, a$ as za, b0 as Ka, b1 as Qa, bp as Xa, b6 as _a, b2 as ae, bq as ee, b7 as se, b8 as te, b3 as oe, b9 as re, b4 as ne, br as ue, av as ie, b5 as ce, a7 as pe, a6 as be, bR as le, bB as de, Z as ge, $ as me, a0 as Se, a8 as Ie, a9 as ke, aa as Te, ck as De, cl as Re, bS as he, a1 as ye, a2 as Ce, a3 as He, cm as Pe, cn as Ae, co as fe, cp as Be, cq as Fe, cr as ve, ab as Oe, ac as we, cs as Ne, ct as Le, cu as Ge, cv as Ve, ad as xe, ae as Ee, cw as Me, cx as We, cy as Ue, ah as Je, ai as je, U as qe, af as Ye, ag as Ze, W as $e, bT as ze, bU as Ke, bV as Qe, V as Xe, Y as _e, c8 as as, a4 as es, a5 as ss, aj as ts, ap as os, aq as rs, ak as ns, al as us, am as is, an as cs, cj as ps, at as bs, aw as ls, c9 as ds, aY as gs } from "./main-498587b4.js";
1
+ import { aA as c, bd as i, aB as p, aC as b, aD as l, aE as d, aF as g, aG as m, aH as S, aI as I, aJ as k, be as T, aK as D, aL as R, ar as y, bf as h, bg as C, bh as A, bi as H, aM as P, au as f, av as B, aN as F, aO as v, bu as O, bv as N, bx as w, bz as L, bB as G, bF as V, bH as x, bM as E, bP as M, bR as W, bY as U, b_ as J, c0 as j, c2 as q, c4 as z, c8 as Y, c9 as Z, aP as $, aQ as K, bw as Q, by as X, bA as _, bC as aa, bE as ea, bG as sa, bI as ta, bJ as oa, bK as ra, bL as na, bN as ua, bO as ca, bQ as ia, bS as pa, bZ as ba, b$ as la, c1 as da, c3 as ga, c5 as ma, c6 as Sa, c7 as Ia, bj as ka, bk as Ta, bl as Da, bm as Ra, ax as ya, bn as ha, aR as Ca, bo as Aa, bp as Ha, aS as Pa, aT as fa, aU as Ba, aV as Fa, bq as va, cc as Oa, cd as Na, ce as wa, cf as La, cg as Ga, ch as Va, ci as xa, cj as Ea, ck as Ma, aW as Wa, br as Ua, aX as Ja, aY as ja, aZ as qa, a_ as za, b0 as Ya, b1 as Za, b2 as $a, b3 as Ka, b4 as Qa, b9 as Xa, b5 as _a, bs as ae, ba as ee, bb as se, b6 as te, bc as oe, b7 as re, bt as ne, ay as ue, b8 as ce, a8 as ie, ab as pe, ac as be, Z as le, a7 as de, bT as ge, bD as me, $ as Se, a0 as Ie, a1 as ke, a9 as Te, aa as De, ad as Re, cm as ye, cn as he, bU as Ce, a2 as Ae, a3 as He, a4 as Pe, co as fe, cp as Be, cq as Fe, cr as ve, cs as Oe, ct as Ne, ae as we, af as Le, cu as Ge, cv as Ve, cw as xe, cx as Ee, ag as Me, ah as We, cy as Ue, cz as Je, cA as je, ak as qe, al as ze, U as Ye, ai as Ze, aj as $e, W as Ke, bV as Qe, bW as Xe, bX as _e, V as as, Y as es, ca as ss, a5 as ts, a6 as os, am as rs, as as ns, at as us, an as cs, ao as is, ap as ps, aq as bs, cl as ls, aw as ds, az as gs, cb as ms, a$ as Ss } from "./main-95daeba5.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  import "@commercelayer/sdk";
@@ -6,8 +6,8 @@ import "react-gtm-module";
6
6
  import "react-hook-form";
7
7
  import "query-string";
8
8
  export {
9
- i as A,
10
- c as ActionButtons,
9
+ c as A,
10
+ i as ActionButtons,
11
11
  p as Alert,
12
12
  b as Avatar,
13
13
  l as AvatarLetter,
@@ -20,19 +20,19 @@ export {
20
20
  T as CardDialog,
21
21
  D as Container,
22
22
  R as CopyToClipboard,
23
- h as CoreSdkProvider,
24
- y as Dropdown,
23
+ y as CoreSdkProvider,
24
+ h as Dropdown,
25
25
  C as DropdownDivider,
26
- H as DropdownItem,
27
- P as DropdownSearch,
28
- A as EmptyState,
26
+ A as DropdownItem,
27
+ H as DropdownSearch,
28
+ P as EmptyState,
29
29
  f as ErrorBoundary,
30
30
  B as GTMProvider,
31
31
  F as Grid,
32
32
  v as Hint,
33
33
  O as HookedForm,
34
- w as HookedInput,
35
- N as HookedInputCheckbox,
34
+ N as HookedInput,
35
+ w as HookedInputCheckbox,
36
36
  L as HookedInputCheckboxGroup,
37
37
  G as HookedInputCurrency,
38
38
  V as HookedInputDate,
@@ -44,10 +44,10 @@ export {
44
44
  J as HookedInputSpinner,
45
45
  j as HookedInputSwitch,
46
46
  q as HookedInputTextArea,
47
- Y as HookedInputToggleButton,
48
- Z as HookedValidationApiError,
49
- $ as HookedValidationError,
50
- z as Hr,
47
+ z as HookedInputToggleButton,
48
+ Y as HookedValidationApiError,
49
+ Z as HookedValidationError,
50
+ $ as Hr,
51
51
  K as Icon,
52
52
  Q as Input,
53
53
  X as InputCheckbox,
@@ -60,8 +60,8 @@ export {
60
60
  ra as InputFile,
61
61
  na as InputJson,
62
62
  ua as InputRadioGroup,
63
- ia as InputReadonly,
64
- ca as InputResourceGroup,
63
+ ca as InputReadonly,
64
+ ia as InputResourceGroup,
65
65
  pa as InputSelect,
66
66
  ba as InputSimpleSelect,
67
67
  la as InputSpinner,
@@ -74,19 +74,19 @@ export {
74
74
  Ta as ListDetails,
75
75
  Da as ListDetailsItem,
76
76
  Ra as ListItem,
77
- ha as MetaTags,
78
- ya as PageError,
77
+ ya as MetaTags,
78
+ ha as PageError,
79
79
  Ca as PageHeading,
80
- Ha as PageLayout,
81
- Pa as PageSkeleton,
82
- Aa as Pagination,
80
+ Aa as PageLayout,
81
+ Ha as PageSkeleton,
82
+ Pa as Pagination,
83
83
  fa as Progress,
84
84
  Ba as RadialProgress,
85
85
  Fa as RemoveButton,
86
86
  va as Report,
87
87
  Oa as ResourceAddress,
88
- wa as ResourceLineItems,
89
- Na as ResourceList,
88
+ Na as ResourceLineItems,
89
+ wa as ResourceList,
90
90
  La as ResourceListItem,
91
91
  Ga as ResourceMetadata,
92
92
  Va as ResourceOrderSummary,
@@ -98,81 +98,83 @@ export {
98
98
  Ja as Section,
99
99
  ja as Skeleton,
100
100
  qa as SkeletonItem,
101
- Ya as SkeletonTemplate,
102
- Za as Spacer,
103
- $a as Stack,
104
- za as StatusDot,
101
+ za as SkeletonTemplate,
102
+ Ya as Spacer,
103
+ Za as Stack,
104
+ $a as StatusDot,
105
105
  Ka as StatusIcon,
106
106
  Qa as Steps,
107
- Xa as SwitchMode,
108
- _a as Tab,
109
- ae as Table,
110
- ee as TableData,
111
- se as Tabs,
112
- te as Tag,
113
- oe as Td,
114
- re as Text,
115
- ne as Th,
116
- ue as Timeline,
117
- ie as TokenProvider,
107
+ Xa as Tab,
108
+ _a as Table,
109
+ ae as TableData,
110
+ ee as Tabs,
111
+ se as Tag,
112
+ te as Td,
113
+ oe as Text,
114
+ re as Th,
115
+ ne as Timeline,
116
+ ue as TokenProvider,
118
117
  ce as Tr,
119
- pe as computeFullname,
120
- be as downloadJsonAsFile,
121
- le as flatSelectValues,
122
- de as formatCentsToCurrency,
123
- ge as formatDate,
124
- me as formatDateRange,
125
- Se as formatDateWithPredicate,
126
- Ie as formatDisplayName,
127
- ke as formatResourceName,
128
- Te as getAvatarSrcFromRate,
129
- De as getCustomerDisplayStatus,
130
- Re as getCustomerStatusName,
131
- he as getDefaultValueFromFlatten,
132
- ye as getEventDateInfo,
133
- Ce as getIsoDateAtDayEdge,
134
- He as getIsoDateAtDaysBefore,
135
- Pe as getOrderDisplayStatus,
136
- Ae as getOrderFulfillmentStatusName,
137
- fe as getOrderPaymentStatusName,
138
- Be as getOrderStatusName,
139
- Fe as getOrderTransactionPastTense,
140
- ve as getOrderTriggerAttributeName,
141
- Oe as getParcelTrackingDetail,
142
- we as getParcelTrackingDetails,
143
- Ne as getPromotionDisplayStatus,
144
- Le as getReturnDisplayStatus,
145
- Ge as getReturnStatusName,
146
- Ve as getShipmentDisplayStatus,
147
- xe as getShipmentRate,
148
- Ee as getShipmentRates,
149
- Me as getShipmentStatusName,
150
- We as getStockTransferDisplayStatus,
151
- Ue as getStockTransferStatusName,
152
- Je as getUnitOfWeightName,
153
- je as getUnitsOfWeightForSelect,
154
- qe as goBack,
155
- Ye as hasBeenPurchased,
156
- Ze as hasSingleTracking,
157
- $e as isAttachmentValidNote,
158
- ze as isGroupedSelectValues,
159
- Ke as isMultiValueSelected,
160
- Qe as isSingleValueSelected,
161
- Xe as navigateTo,
162
- _e as referenceOrigins,
163
- as as setApiFormErrors,
164
- es as sortAndGroupByDate,
165
- ss as timeSeparator,
166
- ts as useClickAway,
167
- os as useCoreApi,
168
- rs as useCoreSdkProvider,
169
- ns as useDelayShow,
170
- us as useIsChanged,
171
- is as useOnBlurFromContainer,
172
- cs as useOverlay,
173
- ps as useResourceFilters,
174
- bs as useTagManager,
175
- ls as useTokenProvider,
176
- ds as useValidationFeedback,
177
- gs as withSkeletonTemplate
118
+ ie as computeFullname,
119
+ pe as createRoute,
120
+ be as createTypedRoute,
121
+ le as currencies,
122
+ de as downloadJsonAsFile,
123
+ ge as flatSelectValues,
124
+ me as formatCentsToCurrency,
125
+ Se as formatDate,
126
+ Ie as formatDateRange,
127
+ ke as formatDateWithPredicate,
128
+ Te as formatDisplayName,
129
+ De as formatResourceName,
130
+ Re as getAvatarSrcFromRate,
131
+ ye as getCustomerDisplayStatus,
132
+ he as getCustomerStatusName,
133
+ Ce as getDefaultValueFromFlatten,
134
+ Ae as getEventDateInfo,
135
+ He as getIsoDateAtDayEdge,
136
+ Pe as getIsoDateAtDaysBefore,
137
+ fe as getOrderDisplayStatus,
138
+ Be as getOrderFulfillmentStatusName,
139
+ Fe as getOrderPaymentStatusName,
140
+ ve as getOrderStatusName,
141
+ Oe as getOrderTransactionPastTense,
142
+ Ne as getOrderTriggerAttributeName,
143
+ we as getParcelTrackingDetail,
144
+ Le as getParcelTrackingDetails,
145
+ Ge as getPromotionDisplayStatus,
146
+ Ve as getReturnDisplayStatus,
147
+ xe as getReturnStatusName,
148
+ Ee as getShipmentDisplayStatus,
149
+ Me as getShipmentRate,
150
+ We as getShipmentRates,
151
+ Ue as getShipmentStatusName,
152
+ Je as getStockTransferDisplayStatus,
153
+ je as getStockTransferStatusName,
154
+ qe as getUnitOfWeightName,
155
+ ze as getUnitsOfWeightForSelect,
156
+ Ye as goBack,
157
+ Ze as hasBeenPurchased,
158
+ $e as hasSingleTracking,
159
+ Ke as isAttachmentValidNote,
160
+ Qe as isGroupedSelectValues,
161
+ Xe as isMultiValueSelected,
162
+ _e as isSingleValueSelected,
163
+ as as navigateTo,
164
+ es as referenceOrigins,
165
+ ss as setApiFormErrors,
166
+ ts as sortAndGroupByDate,
167
+ os as timeSeparator,
168
+ rs as useClickAway,
169
+ ns as useCoreApi,
170
+ us as useCoreSdkProvider,
171
+ cs as useDelayShow,
172
+ is as useIsChanged,
173
+ ps as useOnBlurFromContainer,
174
+ bs as useOverlay,
175
+ ls as useResourceFilters,
176
+ ds as useTagManager,
177
+ gs as useTokenProvider,
178
+ ms as useValidationFeedback,
179
+ Ss as withSkeletonTemplate
178
180
  };
@@ -1,6 +1,6 @@
1
1
  import { type ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
2
- export type TokenProviderTokenApplicationKind = 'integration' | 'sales_channel' | 'webapp' | ListableResourceType;
3
- export type TokenProviderAllowedApp = ListableResourceType | 'resources';
2
+ export type TokenProviderAllowedApp = 'bundles' | 'customers' | 'exports' | 'gift_cards' | 'imports' | 'inventory' | 'orders' | 'price_lists' | 'promotions' | 'returns' | 'shipments' | 'skus' | 'stock_transfers' | 'subscriptions' | 'tags' | 'webhooks';
3
+ export type TokenProviderTokenApplicationKind = 'integration' | 'sales_channel' | 'webapp' | 'resources' | TokenProviderAllowedApp;
4
4
  export type TokenProviderRoleActions = 'create' | 'destroy' | 'read' | 'update';
5
5
  export type TokenProviderPermissionItem = Record<TokenProviderRoleActions, boolean>;
6
6
  export type TokenProviderRolePermissions = Partial<Record<ListableResourceType | 'organizations', TokenProviderPermissionItem>>;
@@ -35,7 +35,7 @@ export interface TokenProviderTokenInfo {
35
35
  /**
36
36
  * Token application kind.
37
37
  */
38
- kind: 'integration' | 'sales_channel' | 'webapp' | ListableResourceType;
38
+ kind: TokenProviderTokenApplicationKind;
39
39
  /**
40
40
  * The name of the application.
41
41
  * When token is generated from the dashboard hub it could be 'Imports', 'Orders', etc...
@@ -67,7 +67,7 @@ export interface TokenProviderTokenInfo {
67
67
  */
68
68
  accessible_apps?: Array<{
69
69
  name: string;
70
- kind: ListableResourceType;
70
+ kind: TokenProviderAllowedApp;
71
71
  core: boolean;
72
72
  }>;
73
73
  }