@commercelayer/app-elements 2.1.1 → 2.2.1
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-Db8BHZkN.js +5026 -0
- package/dist/dictionaries/customers.d.ts +1 -1
- package/dist/dictionaries/orders.d.ts +2 -2
- package/dist/dictionaries/promotions.d.ts +1 -1
- package/dist/dictionaries/returns.d.ts +2 -2
- package/dist/dictionaries/shipments.d.ts +2 -2
- package/dist/dictionaries/stockTransfers.d.ts +2 -2
- package/dist/helpers/attachments.d.ts +1 -1
- package/dist/helpers/route.d.ts +1 -1
- package/dist/helpers/tracking.d.ts +3 -3
- package/dist/hooks/useDelayShow.d.ts +1 -3
- package/dist/hooks/useOnBlurFromContainer.d.ts +0 -1
- package/dist/{main-CE4P5Pj6.js → main-BU0KeCiu.js} +12949 -12944
- package/dist/main.js +25 -25
- package/dist/providers/CoreSdkProvider/CoreSdkProvider.d.ts +1 -1
- package/dist/providers/CoreSdkProvider/useCoreApi.d.ts +2 -2
- package/dist/providers/TokenProvider/TokenProvider.d.ts +18 -9
- package/dist/providers/TokenProvider/reducer.d.ts +2 -2
- package/dist/providers/TokenProvider/storage.d.ts +2 -2
- package/dist/providers/TokenProvider/types.d.ts +9 -0
- package/dist/providers/TokenProvider/url.d.ts +2 -7
- package/dist/providers/TokenProvider/validateToken.d.ts +1 -1
- package/dist/providers/createApp.d.ts +4 -20
- package/dist/style.css +1 -1
- package/dist/ui/atoms/A.d.ts +1 -1
- package/dist/ui/atoms/Alert.d.ts +0 -1
- package/dist/ui/atoms/AvatarLetter/AvatarLetter.d.ts +0 -1
- package/dist/ui/atoms/Badge/Badge.d.ts +2 -2
- package/dist/ui/atoms/ButtonImageSelect.d.ts +0 -1
- package/dist/ui/atoms/Card.d.ts +59 -61
- package/dist/ui/atoms/Container.d.ts +0 -1
- package/dist/ui/atoms/CopyToClipboard.d.ts +0 -1
- package/dist/ui/atoms/EmptyState.d.ts +1 -1
- package/dist/ui/atoms/Hint.d.ts +1 -1
- package/dist/ui/atoms/Hr.d.ts +0 -1
- package/dist/ui/atoms/Icon/Icon.d.ts +1 -1
- package/dist/ui/atoms/Icon/icons.d.ts +3 -0
- package/dist/ui/atoms/PageHeading/PageHeading.d.ts +10 -10
- package/dist/ui/atoms/PageHeading/PageHeadingToolbar.d.ts +5 -5
- package/dist/ui/atoms/Pagination.d.ts +0 -1
- package/dist/ui/atoms/Progress.d.ts +0 -1
- package/dist/ui/atoms/RadialProgress.d.ts +1 -1
- package/dist/ui/atoms/RemoveButton.d.ts +0 -1
- package/dist/ui/atoms/Section.d.ts +5 -5
- package/dist/ui/atoms/SkeletonTemplate.d.ts +1 -1
- package/dist/ui/atoms/StatusDot.d.ts +0 -1
- package/dist/ui/atoms/Steps.d.ts +0 -1
- package/dist/ui/atoms/Table/Td.d.ts +0 -1
- package/dist/ui/atoms/Table/Th.d.ts +0 -1
- package/dist/ui/atoms/Table/Tr.d.ts +0 -1
- package/dist/ui/atoms/Tag.d.ts +1 -1
- package/dist/ui/atoms/Tooltip.d.ts +1 -1
- package/dist/ui/composite/ActionButtons/ActionButtons.d.ts +4 -4
- package/dist/ui/composite/CardDialog.d.ts +5 -6
- package/dist/ui/composite/Dropdown/DropdownItem.d.ts +58 -58
- package/dist/ui/composite/Dropdown/DropdownSearch.d.ts +0 -1
- package/dist/ui/composite/HomePageLayout.d.ts +1 -1
- package/dist/ui/composite/List.d.ts +1 -1
- package/dist/ui/composite/ListItem.d.ts +1 -1
- package/dist/ui/composite/PageLayout.d.ts +12 -12
- package/dist/ui/composite/PageSkeleton.d.ts +0 -1
- package/dist/ui/composite/Timeline.d.ts +6 -6
- package/dist/ui/composite/Toolbar.d.ts +4 -4
- package/dist/ui/forms/InputCheckboxGroup/InputCheckboxGroup.d.ts +6 -6
- package/dist/ui/forms/InputCheckboxGroup/InputCheckboxGroupItem.d.ts +7 -7
- package/dist/ui/forms/InputCheckboxGroup/reducer.d.ts +1 -1
- package/dist/ui/forms/InputCurrency/InputCurrency.d.ts +2 -2
- package/dist/ui/forms/InputCurrencyRange.d.ts +2 -2
- package/dist/ui/forms/InputDate/InputDate.d.ts +2 -2
- package/dist/ui/forms/InputDate/InputDateComponent.d.ts +2 -2
- package/dist/ui/forms/InputDateRange/InputDateRange.d.ts +1 -1
- package/dist/ui/forms/InputFeedback.d.ts +0 -1
- package/dist/ui/forms/InputRadioGroup/InputRadioGroup.d.ts +11 -11
- package/dist/ui/forms/InputReadonly.d.ts +14 -14
- package/dist/ui/forms/InputResourceGroup/FullList.d.ts +2 -2
- package/dist/ui/forms/InputResourceGroup/InputResourceGroup.d.ts +1 -1
- package/dist/ui/forms/InputSelect/AsyncComponent.d.ts +2 -2
- package/dist/ui/forms/InputSelect/CreatableComponent.d.ts +1 -1
- package/dist/ui/forms/InputSelect/InputSelect.d.ts +3 -3
- package/dist/ui/forms/InputSelect/SelectComponent.d.ts +1 -1
- package/dist/ui/forms/InputSelect/overrides.d.ts +1 -1
- package/dist/ui/forms/InputSelect/styles.d.ts +3 -3
- package/dist/ui/forms/InputToggleButton/InputToggleButton.d.ts +1 -1
- package/dist/ui/forms/Label.d.ts +0 -1
- package/dist/ui/forms/Legend.d.ts +0 -1
- package/dist/ui/forms/ReactHookForm/HookedValidationApiError.d.ts +0 -1
- package/dist/ui/forms/ReactHookForm/HookedValidationError.d.ts +0 -1
- package/dist/ui/internals/InputWrapper.d.ts +12 -12
- package/dist/ui/internals/InteractiveElement.className.d.ts +0 -1
- package/dist/ui/internals/Overlay.d.ts +0 -1
- package/dist/ui/resources/ResourceAddress/ResourceAddress.d.ts +6 -6
- package/dist/ui/resources/ResourceAddress/ResourceAddressForm.d.ts +5 -5
- package/dist/ui/resources/ResourceAddress/ResourceAddressFormFields.d.ts +6 -6
- package/dist/ui/resources/ResourceLineItems/ResourceLineItems.d.ts +10 -10
- package/dist/ui/resources/ResourceLineItems/ResourceLineItems.mocks.d.ts +1 -0
- package/dist/ui/resources/ResourceList/ResourceList.d.ts +4 -4
- package/dist/ui/resources/ResourceList/infiniteFetcher.d.ts +1 -1
- package/dist/ui/resources/ResourceList/metricsApiClient.d.ts +3 -3
- package/dist/ui/resources/ResourceList/reducer.d.ts +1 -1
- package/dist/ui/resources/ResourceList/utils.d.ts +0 -1
- package/dist/ui/resources/ResourceListItem/ResourceListItem.d.ts +6 -6
- package/dist/ui/resources/ResourceListItem/common.d.ts +7 -7
- package/dist/ui/resources/ResourceListItem/transformers/customers.d.ts +1 -1
- package/dist/ui/resources/ResourceListItem/transformers/orders.d.ts +1 -1
- package/dist/ui/resources/ResourceListItem/transformers/promotions.d.ts +1 -1
- package/dist/ui/resources/ResourceListItem/transformers/returns.d.ts +1 -1
- package/dist/ui/resources/ResourceListItem/transformers/shipments.d.ts +1 -1
- package/dist/ui/resources/ResourceListItem/transformers/stockTransfers.d.ts +1 -1
- package/dist/ui/resources/ResourceListItem/types.d.ts +1 -1
- package/dist/ui/resources/ResourceMetadata/ResourceMetadata.d.ts +4 -4
- package/dist/ui/resources/ResourceMetadata/ResourceMetadataForm.d.ts +4 -4
- package/dist/ui/resources/ResourceOrderTimeline.d.ts +7 -7
- package/dist/ui/resources/ResourceShipmentParcels.d.ts +3 -3
- package/dist/ui/resources/ResourceTags.d.ts +3 -3
- package/dist/ui/resources/useResourceFilters/FiltersSearchBar.d.ts +1 -1
- package/dist/ui/resources/useResourceFilters/adaptFormValuesToSdk.d.ts +1 -1
- package/dist/ui/resources/useResourceFilters/adaptSdkToMetrics.d.ts +1 -1
- package/dist/ui/resources/useResourceFilters/adaptSdkToUrlQuery.d.ts +1 -1
- package/dist/ui/resources/useResourceFilters/adaptUrlQueryToSdk.d.ts +1 -1
- package/dist/ui/resources/useResourceFilters/adapters.types.d.ts +8 -8
- package/dist/ui/resources/useResourceFilters/timeUtils.d.ts +1 -1
- package/dist/ui/resources/useResourceFilters/types.d.ts +1 -1
- package/dist/ui/resources/useResourceFilters/useResourceFilters.d.ts +6 -6
- package/dist/utils/htmltags.d.ts +0 -1
- package/dist/vendor.css +1 -1
- package/package.json +28 -28
- package/dist/InputDateComponent-CsDDo7_f.js +0 -5681
- package/dist/providers/TokenProvider/makeSdkClient.d.ts +0 -8
- package/dist/providers/TokenProvider/makeSdkClient.test.d.ts +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InputSelectProps, InputSelectValue } from './InputSelect';
|
|
2
1
|
import { GroupBase, SelectInstance, StylesConfig } from 'react-select';
|
|
2
|
+
import { InputSelectProps, InputSelectValue } from './InputSelect';
|
|
3
3
|
|
|
4
4
|
interface SelectComponentProps extends Omit<InputSelectProps, 'loadAsyncValues' | 'label' | 'hint'> {
|
|
5
5
|
styles: StylesConfig<InputSelectValue>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InputSelectValue } from '.';
|
|
2
1
|
import { ClearIndicatorProps, DropdownIndicatorProps, GroupBase, GroupHeadingProps, MenuListProps, MultiValueGenericProps } from 'react-select';
|
|
2
|
+
import { InputSelectValue } from '.';
|
|
3
3
|
|
|
4
4
|
declare function DropdownIndicator(props: DropdownIndicatorProps<InputSelectValue>): JSX.Element;
|
|
5
5
|
declare function ClearIndicator(props: ClearIndicatorProps<InputSelectValue>): JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InputSelectValue } from '.';
|
|
2
|
-
import { StylesConfig } from 'react-select';
|
|
3
1
|
import { InputFeedbackProps } from '../InputFeedback';
|
|
2
|
+
import { StylesConfig } from 'react-select';
|
|
3
|
+
import { InputSelectValue } from '.';
|
|
4
4
|
|
|
5
|
-
export declare const getSelectStyles: (feedbackVariant?: InputFeedbackProps[
|
|
5
|
+
export declare const getSelectStyles: (feedbackVariant?: InputFeedbackProps["variant"]) => StylesConfig<InputSelectValue>;
|
package/dist/ui/forms/Label.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InputFeedbackProps } from '../forms/InputFeedback';
|
|
2
1
|
import { HintProps } from '../atoms/Hint';
|
|
2
|
+
import { InputFeedbackProps } from '../forms/InputFeedback';
|
|
3
3
|
|
|
4
4
|
export interface InputWrapperBaseProps {
|
|
5
5
|
/**
|
|
@@ -33,19 +33,19 @@ export interface InputWrapperProps extends InputWrapperBaseProps {
|
|
|
33
33
|
fieldset?: boolean;
|
|
34
34
|
}
|
|
35
35
|
export declare const InputWrapper: import('../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
36
|
-
className?: string
|
|
37
|
-
name?: string
|
|
36
|
+
className?: string;
|
|
37
|
+
name?: string;
|
|
38
38
|
children: React.ReactNode;
|
|
39
|
-
fieldset?: boolean
|
|
40
|
-
label?: string
|
|
39
|
+
fieldset?: boolean;
|
|
40
|
+
label?: string;
|
|
41
41
|
hint?: {
|
|
42
|
-
icon?: HintProps[
|
|
43
|
-
text: HintProps[
|
|
44
|
-
}
|
|
45
|
-
feedback?: Omit<InputFeedbackProps, "className"
|
|
46
|
-
inline?: boolean
|
|
47
|
-
delayMs?: number
|
|
48
|
-
isLoading?: boolean
|
|
42
|
+
icon?: HintProps["icon"];
|
|
43
|
+
text: HintProps["children"];
|
|
44
|
+
};
|
|
45
|
+
feedback?: Omit<InputFeedbackProps, "className">;
|
|
46
|
+
inline?: boolean;
|
|
47
|
+
delayMs?: number;
|
|
48
|
+
isLoading?: boolean;
|
|
49
49
|
}>;
|
|
50
50
|
export declare function getFeedbackStyle(feedback?: Omit<InputFeedbackProps, 'className'>): Record<string, boolean>;
|
|
51
51
|
export declare function getFeedbackCssInJs(variant?: InputFeedbackProps['variant']): Pick<CSSStyleDeclaration, 'boxShadow'> & {
|
|
@@ -31,10 +31,10 @@ export interface ResourceAddressProps {
|
|
|
31
31
|
*/
|
|
32
32
|
export declare const ResourceAddress: import('../../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
33
33
|
resource: Address;
|
|
34
|
-
title?: string
|
|
35
|
-
editable?: boolean
|
|
36
|
-
showBillingInfo?: boolean
|
|
37
|
-
showNotes?: boolean
|
|
38
|
-
delayMs?: number
|
|
39
|
-
isLoading?: boolean
|
|
34
|
+
title?: string;
|
|
35
|
+
editable?: boolean;
|
|
36
|
+
showBillingInfo?: boolean;
|
|
37
|
+
showNotes?: boolean;
|
|
38
|
+
delayMs?: number;
|
|
39
|
+
isLoading?: boolean;
|
|
40
40
|
}>;
|
|
@@ -3,9 +3,9 @@ import { Address } from '@commercelayer/sdk';
|
|
|
3
3
|
export declare const ResourceAddressForm: import('../../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
4
4
|
address: Address;
|
|
5
5
|
onChange: (updatedAddress: Address) => void;
|
|
6
|
-
showBillingInfo?: boolean
|
|
7
|
-
showNotes?: boolean
|
|
8
|
-
showNameOrCompany?: boolean
|
|
9
|
-
delayMs?: number
|
|
10
|
-
isLoading?: boolean
|
|
6
|
+
showBillingInfo?: boolean;
|
|
7
|
+
showNotes?: boolean;
|
|
8
|
+
showNameOrCompany?: boolean;
|
|
9
|
+
delayMs?: number;
|
|
10
|
+
isLoading?: boolean;
|
|
11
11
|
}>;
|
|
@@ -98,10 +98,10 @@ export interface ResourceAddressFormFieldsProps {
|
|
|
98
98
|
showNameOrCompany?: boolean;
|
|
99
99
|
}
|
|
100
100
|
export declare const ResourceAddressFormFields: import('../../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
101
|
-
name?: string
|
|
102
|
-
showBillingInfo?: boolean
|
|
103
|
-
showNotes?: boolean
|
|
104
|
-
showNameOrCompany?: boolean
|
|
105
|
-
delayMs?: number
|
|
106
|
-
isLoading?: boolean
|
|
101
|
+
name?: string;
|
|
102
|
+
showBillingInfo?: boolean;
|
|
103
|
+
showNotes?: boolean;
|
|
104
|
+
showNameOrCompany?: boolean;
|
|
105
|
+
delayMs?: number;
|
|
106
|
+
isLoading?: boolean;
|
|
107
107
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { StockLineItemWithStockTransfer } from './types';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
1
|
import { LineItem, ParcelLineItem, ReturnLineItem } from '@commercelayer/sdk';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { StockLineItemWithStockTransfer } from './types';
|
|
4
4
|
|
|
5
5
|
type Item = LineItem | ParcelLineItem | StockLineItemWithStockTransfer | ReturnLineItem;
|
|
6
6
|
export type ResourceLineItemsProps = ComponentProps<typeof ResourceLineItems>;
|
|
@@ -9,15 +9,15 @@ export type ResourceLineItemsProps = ComponentProps<typeof ResourceLineItems>;
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const ResourceLineItems: import('../../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
11
11
|
items: Item[];
|
|
12
|
-
size?: "small" | "normal"
|
|
13
|
-
footer?: {
|
|
12
|
+
size?: "small" | "normal";
|
|
13
|
+
footer?: Array<{
|
|
14
14
|
key: string;
|
|
15
15
|
element: React.ReactNode;
|
|
16
|
-
fullWidth?: boolean
|
|
17
|
-
}
|
|
18
|
-
editable?: boolean
|
|
19
|
-
onChange?: (
|
|
20
|
-
delayMs?: number
|
|
21
|
-
isLoading?: boolean
|
|
16
|
+
fullWidth?: boolean;
|
|
17
|
+
}>;
|
|
18
|
+
editable?: boolean;
|
|
19
|
+
onChange?: () => void;
|
|
20
|
+
delayMs?: number;
|
|
21
|
+
isLoading?: boolean;
|
|
22
22
|
}>;
|
|
23
23
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { default as React, FC } from 'react';
|
|
2
|
-
import { ListableResourceType, QueryParamsList } from '@commercelayer/sdk';
|
|
3
|
-
import { FetcherResponse, Resource } from './infiniteFetcher';
|
|
4
|
-
import { SkeletonTemplateProps } from '../../atoms/SkeletonTemplate';
|
|
5
1
|
import { SectionProps } from '../../atoms/Section';
|
|
2
|
+
import { SkeletonTemplateProps } from '../../atoms/SkeletonTemplate';
|
|
3
|
+
import { FetcherResponse, Resource } from './infiniteFetcher';
|
|
4
|
+
import { ListableResourceType, QueryParamsList } from '@commercelayer/sdk';
|
|
5
|
+
import { default as React, FC } from 'react';
|
|
6
6
|
|
|
7
7
|
export interface ResourceListItemTemplateProps<TResource extends ListableResourceType> extends SkeletonTemplateProps<{
|
|
8
8
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CommerceLayerClient, ListableResourceType, QueryParamsList } from '@commercelayer/sdk';
|
|
2
1
|
import { MetricsApiClient } from './metricsApiClient';
|
|
2
|
+
import { CommerceLayerClient, ListableResourceType, QueryParamsList } from '@commercelayer/sdk';
|
|
3
3
|
|
|
4
4
|
type ListResource<TResource extends ListableResourceType> = Awaited<ReturnType<CommerceLayerClient[TResource]['list']>>;
|
|
5
5
|
export type Resource<TResource extends ListableResourceType> = ListResource<TResource>[number];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Writable } from 'type-fest';
|
|
2
|
-
import { ListableResourceType, ListMeta, ListResponse } from '@commercelayer/sdk';
|
|
3
|
-
import { MetricsFilters } from '../useResourceFilters/adaptSdkToMetrics';
|
|
4
1
|
import { Resource } from './infiniteFetcher';
|
|
2
|
+
import { MetricsFilters } from '../useResourceFilters/adaptSdkToMetrics';
|
|
3
|
+
import { ListableResourceType, ListMeta, ListResponse } from '@commercelayer/sdk';
|
|
4
|
+
import { Writable } from 'type-fest';
|
|
5
5
|
|
|
6
6
|
export type MetricsResources = 'orders' | 'returns';
|
|
7
7
|
type ListResponseWithoutMeta<ResourceType extends MetricsResources> = Omit<ListResponse<Resource<ResourceType>>, 'meta'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FetcherResponse, Resource } from './infiniteFetcher';
|
|
2
1
|
import { ListableResourceType } from '@commercelayer/sdk';
|
|
2
|
+
import { FetcherResponse, Resource } from './infiniteFetcher';
|
|
3
3
|
|
|
4
4
|
interface ResourceListInternalState<TResource extends ListableResourceType> {
|
|
5
5
|
isLoading: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ResourceListItemType } from './types';
|
|
2
1
|
import { ListItemProps } from '../../composite/ListItem';
|
|
2
|
+
import { ResourceListItemType } from './types';
|
|
3
3
|
|
|
4
4
|
export interface ResourceListItemProps {
|
|
5
5
|
/**
|
|
@@ -24,9 +24,9 @@ export interface ResourceListItemProps {
|
|
|
24
24
|
*/
|
|
25
25
|
export declare const ResourceListItem: import('../../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
26
26
|
resource: ResourceListItemType;
|
|
27
|
-
href?: ListItemProps[
|
|
28
|
-
onClick?: ListItemProps[
|
|
29
|
-
showRightContent?: boolean
|
|
30
|
-
delayMs?: number
|
|
31
|
-
isLoading?: boolean
|
|
27
|
+
href?: ListItemProps["href"];
|
|
28
|
+
onClick?: ListItemProps["onClick"];
|
|
29
|
+
showRightContent?: boolean;
|
|
30
|
+
delayMs?: number;
|
|
31
|
+
isLoading?: boolean;
|
|
32
32
|
}>;
|
|
@@ -3,13 +3,13 @@ import { DisplayStatus } from '../../../dictionaries/types';
|
|
|
3
3
|
export declare const ListItemDescription: import('../../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
4
4
|
displayStatus: DisplayStatus;
|
|
5
5
|
date: string;
|
|
6
|
-
additionalInfos?: string
|
|
7
|
-
delayMs?: number
|
|
8
|
-
isLoading?: boolean
|
|
6
|
+
additionalInfos?: string;
|
|
7
|
+
delayMs?: number;
|
|
8
|
+
isLoading?: boolean;
|
|
9
9
|
}>;
|
|
10
10
|
export declare const ListItemIcon: import('../../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
11
|
-
color: "
|
|
12
|
-
icon: "
|
|
13
|
-
delayMs?: number
|
|
14
|
-
isLoading?: boolean
|
|
11
|
+
color: import('../../atoms/StatusIcon').StatusIconProps["background"];
|
|
12
|
+
icon: import('../../atoms/StatusIcon').StatusIconProps["name"];
|
|
13
|
+
delayMs?: number;
|
|
14
|
+
isLoading?: boolean;
|
|
15
15
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BuyXPayYPromotion, Customer, ExternalPromotion, FixedAmountPromotion, FixedPricePromotion, FreeGiftPromotion, FreeShippingPromotion, Order, PercentageDiscountPromotion, Return, Shipment, StockTransfer } from '@commercelayer/sdk';
|
|
2
1
|
import { TokenProviderAuthUser } from '../../../providers/TokenProvider/types';
|
|
2
|
+
import { BuyXPayYPromotion, Customer, ExternalPromotion, FixedAmountPromotion, FixedPricePromotion, FreeGiftPromotion, FreeShippingPromotion, Order, PercentageDiscountPromotion, Return, Shipment, StockTransfer } from '@commercelayer/sdk';
|
|
3
3
|
|
|
4
4
|
export type ResourceListItemType = Order | Return | Customer | StockTransfer | Shipment | BuyXPayYPromotion | ExternalPromotion | FixedAmountPromotion | FixedPricePromotion | FreeGiftPromotion | FreeShippingPromotion | PercentageDiscountPromotion;
|
|
5
5
|
export interface ResourceListItemComponentProps {
|
|
@@ -28,7 +28,7 @@ export interface ResourceMetadataProps {
|
|
|
28
28
|
}
|
|
29
29
|
export declare const updatableTypes: readonly ["string", "number", "boolean"];
|
|
30
30
|
export type UpdatableType = (typeof updatableTypes)[number];
|
|
31
|
-
export declare const isUpdatableType: (value: any) => value is
|
|
31
|
+
export declare const isUpdatableType: (value: any) => value is UpdatableType;
|
|
32
32
|
/**
|
|
33
33
|
* This component provides an all-in-one visualization and editing interface for the `metadata` attribute of a given resource.
|
|
34
34
|
* More in detail the `metadata` attribute is a JSON object, customizable for several purposes, and this component will allow to show and manage its keys with a simple (string kind) values.
|
|
@@ -36,8 +36,8 @@ export declare const isUpdatableType: (value: any) => value is "string" | "numbe
|
|
|
36
36
|
export declare const ResourceMetadata: import('../../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
37
37
|
resourceType: ListableResourceType;
|
|
38
38
|
resourceId: string;
|
|
39
|
-
mode?: ResourceMetadataMode
|
|
39
|
+
mode?: ResourceMetadataMode;
|
|
40
40
|
overlay: ResourceMetadataOverlay;
|
|
41
|
-
delayMs?: number
|
|
42
|
-
isLoading?: boolean
|
|
41
|
+
delayMs?: number;
|
|
42
|
+
isLoading?: boolean;
|
|
43
43
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ResourceMetadataProps } from './ResourceMetadata';
|
|
2
1
|
import { Metadata } from '@commercelayer/sdk';
|
|
2
|
+
import { ResourceMetadataProps } from './ResourceMetadata';
|
|
3
3
|
|
|
4
4
|
interface ResourceMetadataFormValues {
|
|
5
5
|
metadata: Metadata;
|
|
@@ -7,11 +7,11 @@ interface ResourceMetadataFormValues {
|
|
|
7
7
|
export declare const ResourceMetadataForm: import('../../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
8
8
|
resourceId: string;
|
|
9
9
|
defaultValues: ResourceMetadataFormValues;
|
|
10
|
-
mode: ResourceMetadataProps[
|
|
10
|
+
mode: ResourceMetadataProps["mode"];
|
|
11
11
|
onSubmit: (formValues: ResourceMetadataFormValues) => void;
|
|
12
12
|
isSubmitting: boolean;
|
|
13
13
|
apiError?: any;
|
|
14
|
-
delayMs?: number
|
|
15
|
-
isLoading?: boolean
|
|
14
|
+
delayMs?: number;
|
|
15
|
+
isLoading?: boolean;
|
|
16
16
|
}>;
|
|
17
17
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Attachment } from '@commercelayer/sdk';
|
|
2
1
|
import { referenceOrigins } from '../../helpers/attachments';
|
|
2
|
+
import { Attachment } from '@commercelayer/sdk';
|
|
3
3
|
|
|
4
4
|
export interface ResourceOrderTimelineProps {
|
|
5
5
|
orderId?: string;
|
|
@@ -10,12 +10,12 @@ export interface ResourceOrderTimelineProps {
|
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
export declare const ResourceOrderTimeline: import('../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
13
|
-
orderId?: string
|
|
14
|
-
refresh?: boolean
|
|
13
|
+
orderId?: string;
|
|
14
|
+
refresh?: boolean;
|
|
15
15
|
attachmentOption?: {
|
|
16
|
-
onMessage?: (
|
|
16
|
+
onMessage?: (attachment: Attachment) => void;
|
|
17
17
|
referenceOrigin: typeof referenceOrigins.appOrdersNote | typeof referenceOrigins.appShipmentsNote;
|
|
18
|
-
}
|
|
19
|
-
delayMs?: number
|
|
20
|
-
isLoading?: boolean
|
|
18
|
+
};
|
|
19
|
+
delayMs?: number;
|
|
20
|
+
isLoading?: boolean;
|
|
21
21
|
}>;
|
|
@@ -6,7 +6,7 @@ export interface ResourceShipmentParcelsProps {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const ResourceShipmentParcels: import('../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
8
8
|
shipment: ShipmentResource;
|
|
9
|
-
onRemoveParcel?: (
|
|
10
|
-
delayMs?: number
|
|
11
|
-
isLoading?: boolean
|
|
9
|
+
onRemoveParcel?: (parcelId: string) => void;
|
|
10
|
+
delayMs?: number;
|
|
11
|
+
isLoading?: boolean;
|
|
12
12
|
}>;
|
|
@@ -34,8 +34,8 @@ export declare const ResourceTags: import('../atoms/SkeletonTemplate').SkeletonT
|
|
|
34
34
|
resourceType: TaggableResource;
|
|
35
35
|
resourceId: string;
|
|
36
36
|
overlay: TagsOverlay;
|
|
37
|
-
onTagClick?: (
|
|
38
|
-
delayMs?: number
|
|
39
|
-
isLoading?: boolean
|
|
37
|
+
onTagClick?: (tagId: string) => void;
|
|
38
|
+
delayMs?: number;
|
|
39
|
+
isLoading?: boolean;
|
|
40
40
|
}>;
|
|
41
41
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CurrencyRangeFieldValue, FiltersInstructions, UiFilterName, UiFilterValue } from './types';
|
|
2
1
|
import { QueryFilter } from '@commercelayer/sdk';
|
|
2
|
+
import { CurrencyRangeFieldValue, FiltersInstructions, UiFilterName, UiFilterValue } from './types';
|
|
3
3
|
|
|
4
4
|
export interface AdaptFormValuesToSdkParams<FilterFormValues> {
|
|
5
5
|
formValues: FilterFormValues;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ListableResourceType, QueryFilter } from '@commercelayer/sdk';
|
|
2
1
|
import { FiltersInstructions } from './types';
|
|
2
|
+
import { ListableResourceType, QueryFilter } from '@commercelayer/sdk';
|
|
3
3
|
|
|
4
4
|
export type CoreResourceEnabledInMetrics = 'orders' | 'returns';
|
|
5
5
|
type MetricsResource = 'order' | 'return';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { FiltersInstructions, FormFullValues, PageInfoFormValues, TimeRangeFormValues, UiFilterName, UiFilterValue } from './types';
|
|
2
|
-
import { AdaptUrlQueryToUrlQueryParams } from './adaptUrlQueryToUrlQuery';
|
|
3
|
-
import { AdaptUrlQueryToSdkParams } from './adaptUrlQueryToSdk';
|
|
4
|
-
import { AdaptUrlQueryToFormValuesParams } from './adaptUrlQueryToFormValues';
|
|
5
|
-
import { AdaptSdkToUrlQueryParams } from './adaptSdkToUrlQuery';
|
|
6
|
-
import { AdaptSdkToMetricsParams, MetricsFilters } from './adaptSdkToMetrics';
|
|
7
|
-
import { AdaptFormValuesToUrlQueryParams } from './adaptFormValuesToUrlQuery';
|
|
8
|
-
import { AdaptFormValuesToSdkParams } from './adaptFormValuesToSdk';
|
|
9
1
|
import { QueryFilter } from '@commercelayer/sdk';
|
|
2
|
+
import { AdaptFormValuesToSdkParams } from './adaptFormValuesToSdk';
|
|
3
|
+
import { AdaptFormValuesToUrlQueryParams } from './adaptFormValuesToUrlQuery';
|
|
4
|
+
import { AdaptSdkToMetricsParams, MetricsFilters } from './adaptSdkToMetrics';
|
|
5
|
+
import { AdaptSdkToUrlQueryParams } from './adaptSdkToUrlQuery';
|
|
6
|
+
import { AdaptUrlQueryToFormValuesParams } from './adaptUrlQueryToFormValues';
|
|
7
|
+
import { AdaptUrlQueryToSdkParams } from './adaptUrlQueryToSdk';
|
|
8
|
+
import { AdaptUrlQueryToUrlQueryParams } from './adaptUrlQueryToUrlQuery';
|
|
9
|
+
import { FiltersInstructions, FormFullValues, PageInfoFormValues, TimeRangeFormValues, UiFilterName, UiFilterValue } from './types';
|
|
10
10
|
|
|
11
11
|
interface MakeFilterAdaptersParams {
|
|
12
12
|
instructions: FiltersInstructions;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InputResourceGroupProps } from '../../forms/InputResourceGroup';
|
|
2
1
|
import { InputCurrencyRangeProps } from '../../forms/InputCurrencyRange';
|
|
2
|
+
import { InputResourceGroupProps } from '../../forms/InputResourceGroup';
|
|
3
3
|
|
|
4
4
|
export declare const filterableTimeRangePreset: readonly ["today", "last7days", "last30days", "custom"];
|
|
5
5
|
export type UiFilterName = string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { FiltersInstructions } from './types';
|
|
2
|
-
import { makeFilterAdapters } from './adapters';
|
|
3
|
-
import { FiltersNavProps } from './FiltersNav';
|
|
4
|
-
import { FiltersFormProps } from './FiltersForm';
|
|
5
|
-
import { ListableResourceType, QueryFilter } from '@commercelayer/sdk';
|
|
6
|
-
import { ResourceListItemTemplate } from '../ResourceList/ResourceList';
|
|
7
1
|
import { ResourceListProps } from '../ResourceList';
|
|
2
|
+
import { ResourceListItemTemplate } from '../ResourceList/ResourceList';
|
|
3
|
+
import { ListableResourceType, QueryFilter } from '@commercelayer/sdk';
|
|
4
|
+
import { FiltersFormProps } from './FiltersForm';
|
|
5
|
+
import { FiltersNavProps } from './FiltersNav';
|
|
6
|
+
import { makeFilterAdapters } from './adapters';
|
|
7
|
+
import { FiltersInstructions } from './types';
|
|
8
8
|
|
|
9
9
|
interface UseResourceFiltersConfig {
|
|
10
10
|
/**
|
package/dist/utils/htmltags.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare function enforceAllowedTags<AllowedTags extends ReadonlyArray<keyof JSX.IntrinsicElements>, Tag extends AllowedTags[number], DefaultTag extends AllowedTags[number]>({ tag, allowedTags, defaultTag }: {
|
|
3
2
|
tag?: Tag;
|
|
4
3
|
allowedTags: AllowedTags;
|