@commercelayer/app-elements 0.0.79 → 0.1.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/{Async-2e9c3da2.js → Async-566ec3f7.js} +3 -3
- package/dist/{InputDateComponent-fe3ffd00.js → InputDateComponent-4461b3e6.js} +3 -3
- package/dist/{Select-be90391b.js → Select-89937223.js} +3 -3
- package/dist/helpers/appsNavigation.d.ts +1 -1
- package/dist/hooks/useOverlay.d.ts +36 -0
- package/dist/{main-bd408fbe.js → main-795be39b.js} +7405 -7297
- package/dist/main.d.ts +23 -40
- package/dist/main.js +99 -100
- package/dist/mocks/setup.d.ts +3 -0
- package/dist/{overrides-684ed062.js → overrides-346bb0f6.js} +2 -2
- package/dist/providers/TokenProvider/TokenProvider.d.ts +15 -11
- package/dist/providers/TokenProvider/getInfoFromJwt.d.ts +3 -2
- package/dist/providers/TokenProvider/url.d.ts +3 -2
- package/dist/providers/TokenProvider/validateToken.d.ts +6 -1
- package/dist/style.css +1 -1
- package/dist/ui/atoms/Section.d.ts +31 -0
- package/dist/ui/atoms/Table/Table.d.ts +21 -0
- package/dist/ui/atoms/Table/Td.d.ts +8 -0
- package/dist/ui/atoms/{tables → Table}/index.d.ts +3 -2
- package/dist/ui/{lists → composite}/ListDetails.d.ts +1 -1
- package/dist/ui/composite/TableData.d.ts +23 -0
- package/dist/ui/{hook-form → forms/Form}/HookedForm.d.ts +1 -1
- package/dist/ui/forms/Form/index.d.ts +1 -0
- package/dist/ui/{hook-form → forms/Input}/HookedInput.d.ts +4 -4
- package/dist/ui/forms/{Input.d.ts → Input/Input.d.ts} +2 -3
- package/dist/ui/forms/Input/index.d.ts +2 -0
- package/dist/ui/{hook-form → forms/InputCheckbox}/HookedInputCheckbox.d.ts +4 -4
- package/dist/ui/forms/{InputCheckbox.d.ts → InputCheckbox/InputCheckbox.d.ts} +2 -2
- package/dist/ui/forms/InputCheckbox/index.d.ts +2 -0
- package/dist/ui/forms/InputCheckboxGroup.d.ts +2 -3
- package/dist/ui/{hook-form → forms/InputCurrency}/HookedInputCurrency.d.ts +4 -4
- package/dist/ui/forms/InputCurrency/InputCurrency.d.ts +48 -0
- package/dist/ui/forms/InputCurrency/index.d.ts +3 -58
- package/dist/ui/forms/InputCurrency/utils.d.ts +10 -0
- package/dist/ui/forms/InputCurrencyRange.d.ts +8 -5
- package/dist/ui/{hook-form → forms/InputDate}/HookedInputDate.d.ts +4 -4
- package/dist/ui/forms/InputDate/InputDate.d.ts +4 -0
- package/dist/ui/forms/InputDate/InputDateComponent.d.ts +1 -2
- package/dist/ui/forms/InputDate/index.d.ts +2 -5
- package/dist/ui/{hook-form → forms/InputDateRange}/HookedInputDateRange.d.ts +4 -4
- package/dist/ui/forms/{InputDateRange.d.ts → InputDateRange/InputDateRange.d.ts} +3 -4
- package/dist/ui/forms/InputDateRange/index.d.ts +2 -0
- package/dist/ui/forms/InputFeedback.d.ts +2 -3
- package/dist/ui/forms/InputFile.d.ts +6 -2
- package/dist/ui/forms/InputJson.d.ts +2 -3
- package/dist/ui/{hook-form → forms/InputMetadata}/HookedInputMetadata.d.ts +3 -3
- package/dist/ui/forms/InputMetadata/index.d.ts +1 -0
- package/dist/ui/forms/InputRadioGroup.d.ts +9 -4
- package/dist/ui/forms/InputReadonly.d.ts +3 -3
- package/dist/ui/{resources/RelationshipSelector → forms/InputResourceGroup}/Checkbox.d.ts +1 -1
- package/dist/ui/forms/InputResourceGroup/HookedInputResourceGroup.d.ts +15 -0
- package/dist/ui/forms/InputResourceGroup/InputResourceGroup.d.ts +28 -0
- package/dist/ui/forms/InputResourceGroup/index.d.ts +2 -0
- package/dist/ui/forms/InputSelect/Async.d.ts +1 -1
- package/dist/ui/{hook-form → forms/InputSelect}/HookedInputSelect.d.ts +4 -4
- package/dist/ui/forms/InputSelect/InputSelect.d.ts +91 -0
- package/dist/ui/forms/InputSelect/Select.d.ts +1 -1
- package/dist/ui/forms/InputSelect/index.d.ts +2 -91
- package/dist/ui/forms/InputSimpleSelect/HookedInputSimpleSelect.d.ts +21 -0
- package/dist/ui/forms/InputSimpleSelect/InputSimpleSelect.d.ts +12 -0
- package/dist/ui/forms/InputSimpleSelect/index.d.ts +2 -0
- package/dist/ui/{hook-form → forms/InputSpinner}/HookedInputSpinner.d.ts +4 -4
- package/dist/ui/forms/{InputSpinner.d.ts → InputSpinner/InputSpinner.d.ts} +2 -3
- package/dist/ui/forms/InputSpinner/index.d.ts +2 -0
- package/dist/ui/{hook-form/HookedInputToggleBox.d.ts → forms/InputSwitch/HookedInputSwitch.d.ts} +6 -6
- package/dist/ui/forms/InputSwitch/InputSwitch.d.ts +5 -0
- package/dist/ui/forms/InputSwitch/index.d.ts +2 -0
- package/dist/ui/forms/InputTextArea.d.ts +2 -2
- package/dist/ui/forms/InputToggleButton/HookedInputToggleButton.d.ts +18 -0
- package/dist/ui/forms/{ToggleButtons.d.ts → InputToggleButton/InputToggleButton.d.ts} +7 -6
- package/dist/ui/forms/InputToggleButton/index.d.ts +2 -0
- package/dist/ui/forms/Label.d.ts +6 -3
- package/dist/ui/forms/Legend.d.ts +14 -0
- package/dist/ui/{hook-form → forms/ReactHookForm}/HookedValidationApiError.d.ts +3 -3
- package/dist/ui/{hook-form → forms/ReactHookForm}/HookedValidationError.d.ts +3 -3
- package/dist/ui/forms/ReactHookForm/index.d.ts +4 -0
- package/dist/ui/{hook-form → forms/ReactHookForm}/useValidationFeedback.d.ts +1 -1
- package/dist/ui/internals/InputWrapper.d.ts +6 -1
- package/dist/ui/resources/Filters/types.d.ts +4 -4
- package/dist/ui/resources/Filters/useFilters.d.ts +2 -1
- package/dist/ui/resources/ResourceList/ResourceList.d.ts +64 -0
- package/dist/ui/resources/ResourceList/index.d.ts +1 -45
- package/dist/{unsupportedIterableToArray-a4407b22.js → unsupportedIterableToArray-a3020d44.js} +1 -1
- package/dist/utils/children.d.ts +4 -3
- package/dist/utils/extractHeaders.d.ts +2 -1
- package/dist/utils/text.d.ts +8 -1
- package/package.json +26 -26
- package/dist/hooks/useOverlayNavigation.d.ts +0 -27
- package/dist/ui/atoms/Legend.d.ts +0 -32
- package/dist/ui/atoms/Overlay.d.ts +0 -20
- package/dist/ui/atoms/tables/Td.d.ts +0 -9
- package/dist/ui/forms/InputToggleBox.d.ts +0 -9
- package/dist/ui/forms/InputToggleListBox.d.ts +0 -15
- package/dist/ui/forms/RadioButtons.d.ts +0 -19
- package/dist/ui/hook-form/HookedInputToggleListBox.d.ts +0 -21
- package/dist/ui/hook-form/HookedRelationshipSelector.d.ts +0 -18
- package/dist/ui/hook-form/HookedToggleButtons.d.ts +0 -18
- package/dist/ui/resources/RelationshipSelector/index.d.ts +0 -26
- package/dist/ui/resources/ResourceList/index.test.d.ts +0 -1
- package/dist/ui/tables/Table.d.ts +0 -10
- package/dist/ui/tables/TableData.d.ts +0 -14
- package/dist/utils/tests.d.ts +0 -1
- /package/dist/{ui/atoms/Legend.test.d.ts → hooks/useOverlay.test.d.ts} +0 -0
- /package/dist/ui/atoms/{Overlay.test.d.ts → Section.test.d.ts} +0 -0
- /package/dist/ui/{tables → atoms/Table}/Table.test.d.ts +0 -0
- /package/dist/ui/atoms/{tables → Table}/Th.d.ts +0 -0
- /package/dist/ui/atoms/{tables → Table}/Tr.d.ts +0 -0
- /package/dist/ui/{lists → composite}/List.d.ts +0 -0
- /package/dist/ui/{lists → composite}/List.test.d.ts +0 -0
- /package/dist/ui/{lists → composite}/ListDetails.test.d.ts +0 -0
- /package/dist/ui/{lists → composite}/ListDetailsItem.d.ts +0 -0
- /package/dist/ui/{lists → composite}/ListDetailsItem.test.d.ts +0 -0
- /package/dist/ui/{lists → composite}/ListItem.d.ts +0 -0
- /package/dist/ui/{lists → composite}/ListItem.test.d.ts +0 -0
- /package/dist/ui/{tables → composite}/TableData.test.d.ts +0 -0
- /package/dist/ui/forms/{Input.test.d.ts → Input/Input.test.d.ts} +0 -0
- /package/dist/ui/forms/{InputCheckbox.test.d.ts → InputCheckbox/InputCheckbox.test.d.ts} +0 -0
- /package/dist/ui/forms/InputCurrency/{index.test.d.ts → InputCurrency.test.d.ts} +0 -0
- /package/dist/ui/forms/InputDate/{InputDate.test.d.ts → InputDateComponent.test.d.ts} +0 -0
- /package/dist/ui/forms/{InputDateRange.test.d.ts → InputDateRange/InputDateRange.test.d.ts} +0 -0
- /package/dist/ui/{resources/RelationshipSelector → forms/InputResourceGroup}/FullList.d.ts +0 -0
- /package/dist/ui/{resources/RelationshipSelector → forms/InputResourceGroup}/utils.d.ts +0 -0
- /package/dist/ui/{resources/RelationshipSelector → forms/InputResourceGroup}/utils.test.d.ts +0 -0
- /package/dist/ui/forms/InputSelect/{index.test.d.ts → InputSelect.test.d.ts} +0 -0
- /package/dist/ui/forms/{InputSpinner.test.d.ts → InputSimpleSelect/InputSimpleSelect.test.d.ts} +0 -0
- /package/dist/ui/forms/{InputToggleBox.test.d.ts → InputSpinner/InputSpinner.test.d.ts} +0 -0
- /package/dist/ui/forms/{InputToggleListBox.test.d.ts → InputSwitch/InputSwitch.test.d.ts} +0 -0
- /package/dist/ui/forms/{RadioButtons.test.d.ts → InputToggleButton/InputToggleButton.test.d.ts} +0 -0
- /package/dist/ui/{hook-form → forms/ReactHookForm}/setApiFormErrors.d.ts +0 -0
- /package/dist/ui/{hook-form → forms/ReactHookForm}/setApiFormErrors.test.d.ts +0 -0
- /package/dist/ui/{forms/ToggleButtons.test.d.ts → resources/ResourceList/ResourceList.test.d.ts} +0 -0
package/dist/main.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { getAvatarSrcFromRate, getParcelTrackingDetail, getParcelTrackingDetails
|
|
|
8
8
|
export { useClickAway } from './hooks/useClickAway';
|
|
9
9
|
export { useDelayShow } from './hooks/useDelayShow';
|
|
10
10
|
export { useIsChanged } from './hooks/useIsChanged';
|
|
11
|
-
export {
|
|
11
|
+
export { useOverlay } from './hooks/useOverlay';
|
|
12
12
|
export { CoreSdkProvider, useCoreApi, useCoreSdkProvider } from './providers/CoreSdkProvider';
|
|
13
13
|
export { ErrorBoundary } from './providers/ErrorBoundary';
|
|
14
14
|
export { MetaTags, TokenProvider, useTokenProvider, type TokenProviderAllowedApp, type TokenProviderPermissionItem, type TokenProviderRoleActions, type TokenProviderRolePermissions, type TokenProviderTokenApplicationKind } from './providers/TokenProvider';
|
|
@@ -27,84 +27,67 @@ export { Grid } from './ui/atoms/Grid';
|
|
|
27
27
|
export { Hint } from './ui/atoms/Hint';
|
|
28
28
|
export { Hr } from './ui/atoms/Hr';
|
|
29
29
|
export { Icon, iconNames } from './ui/atoms/Icon';
|
|
30
|
-
export { Legend } from './ui/atoms/Legend';
|
|
31
|
-
export { Overlay } from './ui/atoms/Overlay';
|
|
32
30
|
export { PageHeading } from './ui/atoms/PageHeading';
|
|
33
31
|
export { Pagination } from './ui/atoms/Pagination';
|
|
34
32
|
export { Progress } from './ui/atoms/Progress';
|
|
35
33
|
export { RadialProgress } from './ui/atoms/RadialProgress';
|
|
34
|
+
export { Section } from './ui/atoms/Section';
|
|
36
35
|
export { Skeleton, SkeletonItem } from './ui/atoms/Skeleton';
|
|
37
36
|
export { SkeletonTemplate, withSkeletonTemplate } from './ui/atoms/SkeletonTemplate';
|
|
38
37
|
export { Spacer } from './ui/atoms/Spacer';
|
|
39
38
|
export { Stack } from './ui/atoms/Stack';
|
|
40
39
|
export { StatusDot } from './ui/atoms/StatusDot';
|
|
41
40
|
export { Steps } from './ui/atoms/Steps';
|
|
41
|
+
export { Table, Td, Th, Tr } from './ui/atoms/Table';
|
|
42
42
|
export { Tab, Tabs } from './ui/atoms/Tabs';
|
|
43
43
|
export { Tag } from './ui/atoms/Tag';
|
|
44
44
|
export { Text } from './ui/atoms/Text';
|
|
45
45
|
export { DropdownMenu, DropdownMenuDivider, DropdownMenuItem } from './ui/atoms/dropdown';
|
|
46
|
-
export { Td, Th, Tr } from './ui/atoms/tables';
|
|
47
46
|
export { ActionButtons } from './ui/composite/ActionButtons';
|
|
48
47
|
export { CardDialog } from './ui/composite/CardDialog';
|
|
49
48
|
export { ContextMenu } from './ui/composite/ContextMenu';
|
|
49
|
+
export { List } from './ui/composite/List';
|
|
50
|
+
export { ListDetails } from './ui/composite/ListDetails';
|
|
51
|
+
export { ListDetailsItem } from './ui/composite/ListDetailsItem';
|
|
52
|
+
export { ListItem } from './ui/composite/ListItem';
|
|
50
53
|
export { PageError } from './ui/composite/PageError';
|
|
51
54
|
export { PageLayout } from './ui/composite/PageLayout';
|
|
52
55
|
export { PageSkeleton } from './ui/composite/PageSkeleton';
|
|
53
56
|
export { Report } from './ui/composite/Report';
|
|
54
57
|
export { SearchBar } from './ui/composite/SearchBar';
|
|
58
|
+
export { TableData } from './ui/composite/TableData';
|
|
55
59
|
export { Timeline, type TimelineEvent } from './ui/composite/Timeline';
|
|
56
|
-
export {
|
|
57
|
-
export {
|
|
60
|
+
export { HookedForm } from './ui/forms/Form';
|
|
61
|
+
export { HookedInput, Input } from './ui/forms/Input';
|
|
62
|
+
export { HookedInputCheckbox, InputCheckbox } from './ui/forms/InputCheckbox';
|
|
58
63
|
export { InputCheckboxGroup } from './ui/forms/InputCheckboxGroup';
|
|
59
|
-
export { InputCurrency, formatCentsToCurrency } from './ui/forms/InputCurrency';
|
|
64
|
+
export { HookedInputCurrency, InputCurrency, formatCentsToCurrency, type InputCurrencyProps } from './ui/forms/InputCurrency';
|
|
60
65
|
export { InputCurrencyRange } from './ui/forms/InputCurrencyRange';
|
|
61
|
-
export { InputDate } from './ui/forms/InputDate';
|
|
62
|
-
export { InputDateRange } from './ui/forms/InputDateRange';
|
|
66
|
+
export { HookedInputDate, InputDate } from './ui/forms/InputDate';
|
|
67
|
+
export { HookedInputDateRange, InputDateRange } from './ui/forms/InputDateRange';
|
|
63
68
|
export { InputFeedback } from './ui/forms/InputFeedback';
|
|
64
69
|
export { InputFile } from './ui/forms/InputFile';
|
|
65
70
|
export { InputJson } from './ui/forms/InputJson';
|
|
71
|
+
export { HookedInputMetadata } from './ui/forms/InputMetadata';
|
|
66
72
|
export { InputRadioGroup } from './ui/forms/InputRadioGroup';
|
|
67
73
|
export { InputReadonly } from './ui/forms/InputReadonly';
|
|
68
|
-
export {
|
|
69
|
-
export type
|
|
70
|
-
export {
|
|
74
|
+
export { HookedInputResourceGroup, InputResourceGroup } from './ui/forms/InputResourceGroup';
|
|
75
|
+
export { HookedInputSelect, InputSelect, flatSelectValues, getDefaultValueFromFlatten, isGroupedSelectValues, isMultiValueSelected, isSingleValueSelected, type InputSelectProps, type SelectValue } from './ui/forms/InputSelect';
|
|
76
|
+
export { HookedInputSimpleSelect, InputSimpleSelect } from './ui/forms/InputSimpleSelect';
|
|
77
|
+
export { HookedInputSpinner, InputSpinner } from './ui/forms/InputSpinner';
|
|
78
|
+
export { HookedInputSwitch, InputSwitch } from './ui/forms/InputSwitch';
|
|
71
79
|
export { InputTextArea } from './ui/forms/InputTextArea';
|
|
72
|
-
export {
|
|
73
|
-
export { InputToggleListBox } from './ui/forms/InputToggleListBox';
|
|
80
|
+
export { HookedInputToggleButton, InputToggleButton, type InputToggleButtonProps, type ToggleButtonOption } from './ui/forms/InputToggleButton';
|
|
74
81
|
export { Label } from './ui/forms/Label';
|
|
75
|
-
export {
|
|
76
|
-
export {
|
|
77
|
-
export { HookedForm } from './ui/hook-form/HookedForm';
|
|
78
|
-
export { HookedInput } from './ui/hook-form/HookedInput';
|
|
79
|
-
export { HookedInputCheckbox } from './ui/hook-form/HookedInputCheckbox';
|
|
80
|
-
export { HookedInputCurrency } from './ui/hook-form/HookedInputCurrency';
|
|
81
|
-
export { HookedInputDate } from './ui/hook-form/HookedInputDate';
|
|
82
|
-
export { HookedInputDateRange } from './ui/hook-form/HookedInputDateRange';
|
|
83
|
-
export { HookedInputMetadata } from './ui/hook-form/HookedInputMetadata';
|
|
84
|
-
export { HookedInputSelect } from './ui/hook-form/HookedInputSelect';
|
|
85
|
-
export { HookedInputSpinner } from './ui/hook-form/HookedInputSpinner';
|
|
86
|
-
export { HookedInputToggleBox } from './ui/hook-form/HookedInputToggleBox';
|
|
87
|
-
export { HookedInputToggleListBox } from './ui/hook-form/HookedInputToggleListBox';
|
|
88
|
-
export { HookedRelationshipSelector } from './ui/hook-form/HookedRelationshipSelector';
|
|
89
|
-
export { HookedToggleButtons } from './ui/hook-form/HookedToggleButtons';
|
|
90
|
-
export { HookedValidationApiError } from './ui/hook-form/HookedValidationApiError';
|
|
91
|
-
export { HookedValidationError } from './ui/hook-form/HookedValidationError';
|
|
92
|
-
export { setApiFormErrors } from './ui/hook-form/setApiFormErrors';
|
|
93
|
-
export { useValidationFeedback } from './ui/hook-form/useValidationFeedback';
|
|
94
|
-
export { List } from './ui/lists/List';
|
|
95
|
-
export { ListDetails } from './ui/lists/ListDetails';
|
|
96
|
-
export { ListDetailsItem } from './ui/lists/ListDetailsItem';
|
|
97
|
-
export { ListItem } from './ui/lists/ListItem';
|
|
82
|
+
export { Legend } from './ui/forms/Legend';
|
|
83
|
+
export { HookedValidationApiError, HookedValidationError, setApiFormErrors, useValidationFeedback } from './ui/forms/ReactHookForm';
|
|
98
84
|
export { FiltersForm, FiltersNav, FiltersSearchBar, makeFilterAdapters, useFilters } from './ui/resources/Filters';
|
|
99
85
|
export { LineItems } from './ui/resources/LineItems';
|
|
100
86
|
export { ListItemOrder } from './ui/resources/ListItemOrder';
|
|
101
87
|
export { ListItemsMetadata } from './ui/resources/ListItemsMetadata';
|
|
102
88
|
export { OrderSummary } from './ui/resources/OrderSummary';
|
|
103
89
|
export { OrderTimeline } from './ui/resources/OrderTimeline';
|
|
104
|
-
export { RelationshipSelector } from './ui/resources/RelationshipSelector';
|
|
105
90
|
export { ResourceList } from './ui/resources/ResourceList';
|
|
106
91
|
export { ResourceTags } from './ui/resources/ResourceTags';
|
|
107
92
|
export { ShipmentParcels } from './ui/resources/ShipmentParcels';
|
|
108
|
-
export { Table } from './ui/tables/Table';
|
|
109
|
-
export { TableData } from './ui/tables/TableData';
|
|
110
93
|
export { getOrderDisplayStatus, getOrderFulfillmentStatusName, getOrderPaymentStatusName, getOrderStatusName, getOrderTransactionPastTense, getOrderTriggerAttributeName } from './dictionaries/orders';
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ah as i, aW as
|
|
1
|
+
import { ah as i, aW as u, ai as b, aj as l, ak as p, am as d, an as c, ao as g, ap as m, aX as S, aq as I, aY as k, ar as T, aa as D, aT as C, aU as y, aV as h, as as F, ad as H, bQ as A, bR as P, bS as R, at as B, au as L, b8 as O, b9 as v, bb as V, be as f, bi as N, bk as w, bp as M, bs as x, bu as E, bB as G, bD as J, bF as Q, bI as U, bM as W, bN as X, av as Y, aw as Z, ba as $, bc as j, bd as q, bf as z, bh as K, bj as _, bl as aa, bm as ea, bn as sa, bo as ta, bq as ra, br as oa, bt as na, bv as ia, bC as ua, bE as ba, bG as la, bH as pa, bJ as da, bK as ca, bL as ga, bV as ma, aZ as Sa, a_ as Ia, a$ as ka, b0 as Ta, bW as Da, bX as Ca, ae as ya, bY as ha, bZ as Fa, b1 as Ha, ay as Aa, b2 as Pa, b3 as Ra, az as Ba, aA as La, aB as Oa, b4 as va, b_ as Va, b$ as fa, b5 as Na, aC as wa, c0 as Ma, aD as xa, aE as Ea, aF as Ga, aH as Ja, aI as Qa, aJ as Ua, aK as Wa, aP as Xa, aL as Ya, b6 as Za, aQ as $a, aR as ja, aM as qa, aS as za, aN as Ka, b7 as _a, af as ae, aO as ee, al as se, X as te, W as re, bw as oe, bg as ne, R as ie, Y as ue, Z as be, $ as le, bx as pe, S as de, T as ce, c1 as ge, c2 as me, c3 as Se, c4 as Ie, c5 as ke, c6 as Te, a0 as De, a1 as Ce, a2 as ye, a3 as he, M as Fe, a4 as He, a5 as Ae, ax as Pe, O as Re, by as Be, bz as Le, bA as Oe, bT as ve, N as Ve, Q as fe, bO as Ne, U as we, V as Me, a6 as xe, ab as Ee, ac as Ge, a7 as Je, bU as Qe, a8 as Ue, a9 as We, ag as Xe, bP as Ye, aG as Ze } from "./main-795be39b.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
import "@commercelayer/sdk";
|
|
@@ -6,42 +6,42 @@ import "react-hook-form";
|
|
|
6
6
|
import "query-string";
|
|
7
7
|
export {
|
|
8
8
|
i as A,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
u as ActionButtons,
|
|
10
|
+
b as Avatar,
|
|
11
11
|
l as AvatarLetter,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
p as Badge,
|
|
13
|
+
d as BlockCode,
|
|
14
|
+
c as Button,
|
|
15
|
+
g as ButtonFilter,
|
|
16
16
|
m as Card,
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
S as CardDialog,
|
|
18
|
+
I as Container,
|
|
19
19
|
k as ContextMenu,
|
|
20
20
|
T as CopyToClipboard,
|
|
21
21
|
D as CoreSdkProvider,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
C as DropdownMenu,
|
|
23
|
+
y as DropdownMenuDivider,
|
|
24
|
+
h as DropdownMenuItem,
|
|
25
|
+
F as EmptyState,
|
|
26
|
+
H as ErrorBoundary,
|
|
27
|
+
A as FiltersForm,
|
|
28
|
+
P as FiltersNav,
|
|
29
|
+
R as FiltersSearchBar,
|
|
30
|
+
B as Grid,
|
|
31
31
|
L as Hint,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
O as HookedForm,
|
|
33
|
+
v as HookedInput,
|
|
34
|
+
V as HookedInputCheckbox,
|
|
35
|
+
f as HookedInputCurrency,
|
|
36
|
+
N as HookedInputDate,
|
|
37
|
+
w as HookedInputDateRange,
|
|
38
38
|
M as HookedInputMetadata,
|
|
39
|
-
|
|
40
|
-
E as
|
|
41
|
-
G as
|
|
42
|
-
J as
|
|
43
|
-
Q as
|
|
44
|
-
U as
|
|
39
|
+
x as HookedInputResourceGroup,
|
|
40
|
+
E as HookedInputSelect,
|
|
41
|
+
G as HookedInputSimpleSelect,
|
|
42
|
+
J as HookedInputSpinner,
|
|
43
|
+
Q as HookedInputSwitch,
|
|
44
|
+
U as HookedInputToggleButton,
|
|
45
45
|
W as HookedValidationApiError,
|
|
46
46
|
X as HookedValidationError,
|
|
47
47
|
Y as Hr,
|
|
@@ -56,41 +56,41 @@ export {
|
|
|
56
56
|
ea as InputFeedback,
|
|
57
57
|
sa as InputFile,
|
|
58
58
|
ta as InputJson,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
na as
|
|
62
|
-
ia as
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
la as
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
ma as
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
ka as
|
|
74
|
-
Ta as
|
|
75
|
-
Da as
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
La as
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
59
|
+
ra as InputRadioGroup,
|
|
60
|
+
oa as InputReadonly,
|
|
61
|
+
na as InputResourceGroup,
|
|
62
|
+
ia as InputSelect,
|
|
63
|
+
ua as InputSimpleSelect,
|
|
64
|
+
ba as InputSpinner,
|
|
65
|
+
la as InputSwitch,
|
|
66
|
+
pa as InputTextArea,
|
|
67
|
+
da as InputToggleButton,
|
|
68
|
+
ca as Label,
|
|
69
|
+
ga as Legend,
|
|
70
|
+
ma as LineItems,
|
|
71
|
+
Sa as List,
|
|
72
|
+
Ia as ListDetails,
|
|
73
|
+
ka as ListDetailsItem,
|
|
74
|
+
Ta as ListItem,
|
|
75
|
+
Da as ListItemOrder,
|
|
76
|
+
Ca as ListItemsMetadata,
|
|
77
|
+
ya as MetaTags,
|
|
78
|
+
ha as OrderSummary,
|
|
79
|
+
Fa as OrderTimeline,
|
|
80
|
+
Ha as PageError,
|
|
81
|
+
Aa as PageHeading,
|
|
82
|
+
Pa as PageLayout,
|
|
83
|
+
Ra as PageSkeleton,
|
|
84
|
+
Ba as Pagination,
|
|
85
|
+
La as Progress,
|
|
86
|
+
Oa as RadialProgress,
|
|
87
|
+
va as Report,
|
|
88
|
+
Va as ResourceList,
|
|
89
|
+
fa as ResourceTags,
|
|
90
|
+
Na as SearchBar,
|
|
91
|
+
wa as Section,
|
|
92
92
|
Ma as ShipmentParcels,
|
|
93
|
-
|
|
93
|
+
xa as Skeleton,
|
|
94
94
|
Ea as SkeletonItem,
|
|
95
95
|
Ga as SkeletonTemplate,
|
|
96
96
|
Ja as Spacer,
|
|
@@ -106,53 +106,52 @@ export {
|
|
|
106
106
|
za as Text,
|
|
107
107
|
Ka as Th,
|
|
108
108
|
_a as Timeline,
|
|
109
|
-
ae as
|
|
110
|
-
ee as
|
|
111
|
-
se as
|
|
112
|
-
te as
|
|
113
|
-
oe as computeFullname,
|
|
109
|
+
ae as TokenProvider,
|
|
110
|
+
ee as Tr,
|
|
111
|
+
se as badgeVariants,
|
|
112
|
+
te as computeFullname,
|
|
114
113
|
re as downloadJsonAsFile,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
oe as flatSelectValues,
|
|
115
|
+
ne as formatCentsToCurrency,
|
|
116
|
+
ie as formatDate,
|
|
118
117
|
ue as formatDisplayName,
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
be as formatResourceName,
|
|
119
|
+
le as getAvatarSrcFromRate,
|
|
121
120
|
pe as getDefaultValueFromFlatten,
|
|
122
|
-
|
|
121
|
+
de as getIsoDateAtDayEdge,
|
|
123
122
|
ce as getIsoDateAtDaysBefore,
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
ge as getOrderDisplayStatus,
|
|
124
|
+
me as getOrderFulfillmentStatusName,
|
|
126
125
|
Se as getOrderPaymentStatusName,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
Ie as getOrderStatusName,
|
|
127
|
+
ke as getOrderTransactionPastTense,
|
|
128
|
+
Te as getOrderTriggerAttributeName,
|
|
129
|
+
De as getParcelTrackingDetail,
|
|
131
130
|
Ce as getParcelTrackingDetails,
|
|
132
|
-
|
|
131
|
+
ye as getShipmentRate,
|
|
133
132
|
he as getShipmentRates,
|
|
134
133
|
Fe as goBack,
|
|
135
134
|
He as hasBeenPurchased,
|
|
136
135
|
Ae as hasSingleTracking,
|
|
137
136
|
Pe as iconNames,
|
|
138
137
|
Re as isAttachmentValidNote,
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
Be as isGroupedSelectValues,
|
|
139
|
+
Le as isMultiValueSelected,
|
|
141
140
|
Oe as isSingleValueSelected,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
141
|
+
ve as makeFilterAdapters,
|
|
142
|
+
Ve as navigateToDetail,
|
|
143
|
+
fe as referenceOrigins,
|
|
144
|
+
Ne as setApiFormErrors,
|
|
145
|
+
we as sortAndGroupByDate,
|
|
146
|
+
Me as timeSeparator,
|
|
147
|
+
xe as useClickAway,
|
|
148
|
+
Ee as useCoreApi,
|
|
149
|
+
Ge as useCoreSdkProvider,
|
|
150
|
+
Je as useDelayShow,
|
|
151
|
+
Qe as useFilters,
|
|
152
|
+
Ue as useIsChanged,
|
|
153
|
+
We as useOverlay,
|
|
154
|
+
Xe as useTokenProvider,
|
|
155
|
+
Ye as useValidationFeedback,
|
|
156
|
+
Ze as withSkeletonTemplate
|
|
158
157
|
};
|
package/dist/mocks/setup.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as Se, g as gr, _ as In, a as br, b as pr, c as fr, f as mr } from "./unsupportedIterableToArray-
|
|
1
|
+
import { d as Se, g as gr, _ as In, a as br, b as pr, c as fr, f as mr } from "./unsupportedIterableToArray-a3020d44.js";
|
|
2
2
|
import * as B from "react";
|
|
3
3
|
import { useLayoutEffect as vn, forwardRef as Ir, useContext as Te, createElement as me, Fragment as Be, createContext as Ct, useRef as oe, useState as Ie, useMemo as Ce, useCallback as Y, Component as vr, useEffect as hn } from "react";
|
|
4
|
-
import { _ as hr, H as se, K as Cn } from "./main-
|
|
4
|
+
import { _ as hr, H as se, K as Cn } from "./main-795be39b.js";
|
|
5
5
|
import { createPortal as Cr } from "react-dom";
|
|
6
6
|
function V() {
|
|
7
7
|
return V = Object.assign ? Object.assign.bind() : function(t) {
|
|
@@ -19,27 +19,34 @@ export interface TokenProviderProps {
|
|
|
19
19
|
*/
|
|
20
20
|
kind: TokenProviderTokenApplicationKind;
|
|
21
21
|
/**
|
|
22
|
-
* Slug of the current app.
|
|
22
|
+
* Slug of the current app. It needs to match one of the allowed app slugs enabled in the dashboard.
|
|
23
|
+
* Example: `orders`, `imports`, `exports`, `shipments`, `webhooks`, `returns`
|
|
23
24
|
* Will be used to persist token for current app only.
|
|
24
25
|
*/
|
|
25
26
|
appSlug: TokenProviderAllowedApp;
|
|
27
|
+
/**
|
|
28
|
+
* Required when application is forked or running as self-hosted.
|
|
29
|
+
* It's used to perform a security check to test the validity of token against current organization.
|
|
30
|
+
*/
|
|
31
|
+
organizationSlug?: string;
|
|
26
32
|
/**
|
|
27
33
|
* Base domain to be used for Commerce Layer API requests (eg. `commercelayer.io`)
|
|
28
34
|
*/
|
|
29
35
|
domain?: string;
|
|
30
36
|
/**
|
|
31
|
-
*
|
|
37
|
+
* Automatically redirect to dashboard to start re-authentication flow and return to app with fresh token
|
|
38
|
+
*/
|
|
39
|
+
reauthenticateOnInvalidAuth?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Callback invoked when token is not valid.
|
|
42
|
+
* Can be used to manually handle re-authentication flow when `reauthenticateOnInvalidAuth` is false.
|
|
32
43
|
*/
|
|
33
44
|
onInvalidAuth?: (info: {
|
|
34
45
|
dashboardUrl: string;
|
|
35
46
|
reason: string;
|
|
36
47
|
}) => void;
|
|
37
48
|
/**
|
|
38
|
-
*
|
|
39
|
-
*/
|
|
40
|
-
reauthenticateOnInvalidAuth?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Element to be used as loader (eg: skeleton or spinner icon)
|
|
49
|
+
* UI element to be used as loader (eg: skeleton or spinner icon)
|
|
43
50
|
*/
|
|
44
51
|
loadingElement?: ReactNode;
|
|
45
52
|
/**
|
|
@@ -62,7 +69,4 @@ export interface TokenProviderProps {
|
|
|
62
69
|
}
|
|
63
70
|
export declare const AuthContext: import("react").Context<TokenProviderValue>;
|
|
64
71
|
export declare const useTokenProvider: () => TokenProviderValue;
|
|
65
|
-
export declare
|
|
66
|
-
export declare namespace TokenProvider {
|
|
67
|
-
var displayName: string;
|
|
68
|
-
}
|
|
72
|
+
export declare const TokenProvider: React.FC<TokenProviderProps>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type Mode } from './types';
|
|
2
2
|
export declare function getOrgSlugFromCurrentUrl(): string;
|
|
3
|
-
export declare function makeDashboardUrl({ domain, mode }: {
|
|
3
|
+
export declare function makeDashboardUrl({ domain, mode, organizationSlug }: {
|
|
4
4
|
domain?: string;
|
|
5
5
|
mode?: Mode;
|
|
6
|
+
organizationSlug?: string;
|
|
6
7
|
}): string;
|
|
7
|
-
export declare function makeReAuthenticationUrl(dashboardUrl: string,
|
|
8
|
+
export declare function makeReAuthenticationUrl(dashboardUrl: string, appIdOrSlug?: string): string;
|
|
@@ -16,11 +16,16 @@ interface ValidToken {
|
|
|
16
16
|
interface InvalidToken {
|
|
17
17
|
isValidToken: false;
|
|
18
18
|
}
|
|
19
|
-
export declare function isValidTokenForCurrentApp({ accessToken, kind, domain, isProduction, currentMode }: {
|
|
19
|
+
export declare function isValidTokenForCurrentApp({ accessToken, kind, domain, isProduction, currentMode, organizationSlug }: {
|
|
20
20
|
accessToken: string;
|
|
21
21
|
kind: TokenProviderTokenApplicationKind;
|
|
22
22
|
domain: string;
|
|
23
23
|
isProduction: boolean;
|
|
24
24
|
currentMode: Mode;
|
|
25
|
+
/**
|
|
26
|
+
* only required when app is self-hosted, to check if the token is valid for the current organization.
|
|
27
|
+
* When app is hosted by Commerce Layer, the organization slug is retrieved from the url subdomain.
|
|
28
|
+
*/
|
|
29
|
+
organizationSlug?: string;
|
|
25
30
|
}): Promise<ValidToken | InvalidToken>;
|
|
26
31
|
export {};
|