@commercelayer/app-elements 1.22.1 → 1.22.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-VMIwGyWW.js +6884 -0
- package/dist/dictionaries/customers.d.ts +3 -2
- package/dist/dictionaries/orders.d.ts +4 -3
- package/dist/dictionaries/promotions.d.ts +3 -2
- package/dist/dictionaries/returns.d.ts +4 -3
- package/dist/dictionaries/shipments.d.ts +4 -3
- package/dist/dictionaries/stockTransfers.d.ts +4 -3
- package/dist/dictionaries/types.d.ts +2 -1
- package/dist/helpers/appsNavigation.d.ts +2 -2
- package/dist/helpers/attachments.d.ts +3 -2
- package/dist/helpers/date.d.ts +2 -1
- package/dist/helpers/resources.d.ts +3 -2
- package/dist/helpers/route.d.ts +3 -2
- package/dist/helpers/tracking.d.ts +4 -3
- package/dist/hooks/useClickAway.d.ts +2 -1
- package/dist/hooks/useEditMetadataOverlay.d.ts +2 -2
- package/dist/hooks/useOverlay.d.ts +2 -2
- package/dist/{main-DDo6Radk.js → main-B9GWvu3Z.js} +5005 -4970
- package/dist/main.d.ts +1 -0
- package/dist/main.js +1 -1
- package/dist/mocks/data/countries.d.ts +1 -1
- package/dist/mocks/data/customers.d.ts +1 -1
- package/dist/mocks/handlers.d.ts +1 -1
- package/dist/mocks/server.d.ts +1 -1
- package/dist/providers/CoreSdkProvider/CoreSdkProvider.d.ts +3 -2
- package/dist/providers/CoreSdkProvider/makeSdkClient.d.ts +2 -1
- package/dist/providers/CoreSdkProvider/useCoreApi.d.ts +5 -4
- package/dist/providers/ErrorBoundary.d.ts +2 -1
- package/dist/providers/GTMProvider.d.ts +2 -2
- package/dist/providers/TokenProvider/MockTokenProvider.d.ts +2 -2
- package/dist/providers/TokenProvider/TokenProvider.d.ts +7 -6
- package/dist/providers/TokenProvider/getAccessTokenFromUrl.d.ts +3 -2
- package/dist/providers/TokenProvider/getInfoFromJwt.d.ts +2 -1
- package/dist/providers/TokenProvider/getOrganization.d.ts +2 -1
- package/dist/providers/TokenProvider/makeSdkClient.d.ts +2 -1
- package/dist/providers/TokenProvider/reducer.d.ts +4 -3
- package/dist/providers/TokenProvider/storage.d.ts +2 -1
- package/dist/providers/TokenProvider/types.d.ts +2 -1
- package/dist/providers/TokenProvider/url.d.ts +2 -1
- package/dist/providers/TokenProvider/validateToken.d.ts +3 -2
- package/dist/providers/createApp.d.ts +4 -3
- package/dist/style.css +1 -1
- package/dist/ui/atoms/A.d.ts +3 -3
- package/dist/ui/atoms/Avatar.d.ts +1 -1
- package/dist/ui/atoms/Badge/Badge.d.ts +3 -2
- package/dist/ui/atoms/Button.d.ts +2 -2
- package/dist/ui/atoms/ButtonFilter.d.ts +2 -2
- package/dist/ui/atoms/Card.d.ts +337 -341
- package/dist/ui/atoms/EmptyState.d.ts +3 -2
- package/dist/ui/atoms/Grid.d.ts +2 -1
- package/dist/ui/atoms/Hint.d.ts +3 -2
- package/dist/ui/atoms/Icon/Icon.d.ts +2 -1
- package/dist/ui/atoms/PageHeading.d.ts +3 -2
- package/dist/ui/atoms/RadialProgress.d.ts +3 -2
- package/dist/ui/atoms/ScrollToTop.d.ts +2 -1
- package/dist/ui/atoms/Section.d.ts +2 -1
- package/dist/ui/atoms/Skeleton.d.ts +2 -1
- package/dist/ui/atoms/SkeletonTemplate.d.ts +3 -2
- package/dist/ui/atoms/Spacer.d.ts +2 -1
- package/dist/ui/atoms/Stack.d.ts +2 -1
- package/dist/ui/atoms/StatusIcon.d.ts +2 -2
- package/dist/ui/atoms/Table/Table.d.ts +2 -1
- package/dist/ui/atoms/Tabs.d.ts +2 -1
- package/dist/ui/atoms/Tag.d.ts +3 -2
- package/dist/ui/atoms/Text.d.ts +2 -1
- package/dist/ui/atoms/Tooltip.d.ts +4 -3
- package/dist/ui/composite/ActionButtons/ActionButtons.d.ts +3 -2
- package/dist/ui/composite/Dropdown/Dropdown.d.ts +2 -2
- package/dist/ui/composite/Dropdown/DropdownDivider.d.ts +2 -1
- package/dist/ui/composite/Dropdown/DropdownItem.d.ts +338 -343
- package/dist/ui/composite/Dropdown/DropdownMenu.d.ts +2 -1
- package/dist/ui/composite/Dropdown/DropdownSearch.d.ts +1 -1
- package/dist/ui/composite/HomePageLayout.d.ts +3 -2
- package/dist/ui/composite/List.d.ts +3 -2
- package/dist/ui/composite/ListDetails.d.ts +2 -1
- package/dist/ui/composite/ListDetailsItem.d.ts +2 -1
- package/dist/ui/composite/ListItem.d.ts +3 -2
- package/dist/ui/composite/PageError.d.ts +2 -2
- package/dist/ui/composite/PageLayout.d.ts +4 -3
- package/dist/ui/composite/Report.d.ts +2 -1
- package/dist/ui/composite/SearchBar.d.ts +1 -1
- package/dist/ui/composite/TableData.d.ts +2 -2
- package/dist/ui/composite/Timeline.d.ts +4 -3
- package/dist/ui/forms/Form/HookedForm.d.ts +2 -2
- package/dist/ui/forms/Input/HookedInput.d.ts +2 -2
- package/dist/ui/forms/Input/Input.d.ts +3 -3
- package/dist/ui/forms/InputCheckbox/HookedInputCheckbox.d.ts +2 -2
- package/dist/ui/forms/InputCheckbox/InputCheckbox.d.ts +3 -3
- package/dist/ui/forms/InputCheckboxGroup/HookedInputCheckboxGroup.d.ts +2 -2
- package/dist/ui/forms/InputCheckboxGroup/InputCheckboxGroup.d.ts +4 -3
- package/dist/ui/forms/InputCheckboxGroup/InputCheckboxGroupItem.d.ts +3 -2
- package/dist/ui/forms/InputCheckboxGroup/reducer.d.ts +3 -2
- package/dist/ui/forms/InputCurrency/HookedInputCurrency.d.ts +2 -2
- package/dist/ui/forms/InputCurrency/InputCurrency.d.ts +5 -5
- package/dist/ui/forms/InputCurrency/utils.d.ts +2 -1
- package/dist/ui/forms/InputCurrencyRange.d.ts +4 -4
- package/dist/ui/forms/InputDate/HookedInputDate.d.ts +2 -2
- package/dist/ui/forms/InputDate/InputDate.d.ts +4 -4
- package/dist/ui/forms/InputDate/InputDateComponent.d.ts +4 -4
- package/dist/ui/forms/InputDateRange/HookedInputDateRange.d.ts +2 -2
- package/dist/ui/forms/InputDateRange/InputDateRange.d.ts +4 -4
- package/dist/ui/forms/InputFile.d.ts +3 -3
- package/dist/ui/forms/InputJson.d.ts +2 -2
- package/dist/ui/forms/InputRadioGroup/HookedInputRadioGroup.d.ts +2 -2
- package/dist/ui/forms/InputRadioGroup/InputRadioGroup.d.ts +3 -2
- package/dist/ui/forms/InputReadonly.d.ts +4 -4
- package/dist/ui/forms/InputResourceGroup/FullList.d.ts +2 -2
- package/dist/ui/forms/InputResourceGroup/HookedInputResourceGroup.d.ts +2 -2
- package/dist/ui/forms/InputResourceGroup/InputResourceGroup.d.ts +3 -3
- package/dist/ui/forms/InputResourceGroup/utils.d.ts +3 -2
- package/dist/ui/forms/InputSelect/AsyncComponent.d.ts +5 -5
- package/dist/ui/forms/InputSelect/HookedInputSelect.d.ts +2 -2
- package/dist/ui/forms/InputSelect/InputSelect.d.ts +5 -4
- package/dist/ui/forms/InputSelect/SelectComponent.d.ts +4 -4
- package/dist/ui/forms/InputSelect/overrides.d.ts +3 -3
- package/dist/ui/forms/InputSelect/styles.d.ts +4 -3
- package/dist/ui/forms/InputSelect/utils.d.ts +2 -1
- package/dist/ui/forms/InputSimpleSelect/HookedInputSimpleSelect.d.ts +2 -2
- package/dist/ui/forms/InputSimpleSelect/InputSimpleSelect.d.ts +3 -3
- package/dist/ui/forms/InputSpinner/HookedInputSpinner.d.ts +2 -2
- package/dist/ui/forms/InputSpinner/InputSpinner.d.ts +3 -3
- package/dist/ui/forms/InputSwitch/HookedInputSwitch.d.ts +2 -2
- package/dist/ui/forms/InputSwitch/InputSwitch.d.ts +3 -3
- package/dist/ui/forms/InputTextArea/HookedInputTextArea.d.ts +2 -2
- package/dist/ui/forms/InputTextArea/InputTextArea.d.ts +3 -3
- package/dist/ui/forms/InputToggleButton/HookedInputToggleButton.d.ts +2 -2
- package/dist/ui/forms/InputToggleButton/InputToggleButton.d.ts +3 -3
- package/dist/ui/forms/ReactHookForm/setApiFormErrors.d.ts +2 -1
- package/dist/ui/forms/ReactHookForm/useValidationFeedback.d.ts +2 -1
- package/dist/ui/internals/FlexRow.d.ts +2 -1
- package/dist/ui/internals/InputWrapper.d.ts +3 -3
- package/dist/ui/resources/ResourceAddress/ResourceAddress.d.ts +2 -1
- package/dist/ui/resources/ResourceAddress/ResourceAddressForm.d.ts +2 -1
- package/dist/ui/resources/ResourceLineItems/ResourceLineItems.d.ts +4 -3
- package/dist/ui/resources/ResourceLineItems/types.d.ts +2 -1
- package/dist/ui/resources/ResourceList/ResourceList.d.ts +7 -7
- package/dist/ui/resources/ResourceList/VisibilityTrigger.d.ts +2 -1
- package/dist/ui/resources/ResourceList/infiniteFetcher.d.ts +4 -3
- package/dist/ui/resources/ResourceList/metricsApiClient.d.ts +6 -5
- package/dist/ui/resources/ResourceList/reducer.d.ts +3 -2
- package/dist/ui/resources/ResourceListItem/ResourceListItem.d.ts +3 -2
- package/dist/ui/resources/ResourceListItem/common.d.ts +2 -1
- package/dist/ui/resources/ResourceListItem/transformers/customers.d.ts +3 -2
- package/dist/ui/resources/ResourceListItem/transformers/orders.d.ts +3 -2
- package/dist/ui/resources/ResourceListItem/transformers/promotions.d.ts +3 -2
- package/dist/ui/resources/ResourceListItem/transformers/returns.d.ts +3 -2
- package/dist/ui/resources/ResourceListItem/transformers/shipments.d.ts +3 -2
- package/dist/ui/resources/ResourceListItem/transformers/stockTransfers.d.ts +3 -2
- package/dist/ui/resources/ResourceListItem/types.d.ts +3 -3
- package/dist/ui/resources/ResourceMetadata/ResourceMetadata.d.ts +2 -1
- package/dist/ui/resources/ResourceMetadata/ResourceMetadataForm.d.ts +3 -2
- package/dist/ui/resources/ResourceMetadata/utils.d.ts +9 -0
- package/dist/ui/resources/ResourceMetadata/utils.test.d.ts +1 -0
- package/dist/ui/resources/ResourceOrderTimeline.d.ts +2 -1
- package/dist/ui/resources/ResourceShipmentParcels.d.ts +2 -1
- package/dist/ui/resources/ResourceShipmentParcels.mocks.d.ts +18 -17
- package/dist/ui/resources/ResourceTags.d.ts +2 -1
- package/dist/ui/resources/useResourceFilters/FieldCurrencyRange.d.ts +2 -2
- package/dist/ui/resources/useResourceFilters/FieldOptions.d.ts +2 -2
- package/dist/ui/resources/useResourceFilters/FieldTextSearch.d.ts +2 -2
- package/dist/ui/resources/useResourceFilters/FieldTimeRange.d.ts +2 -2
- package/dist/ui/resources/useResourceFilters/FiltersForm.d.ts +2 -2
- package/dist/ui/resources/useResourceFilters/FiltersNav.d.ts +2 -2
- package/dist/ui/resources/useResourceFilters/FiltersSearchBar.d.ts +3 -3
- package/dist/ui/resources/useResourceFilters/adaptFormValuesToSdk.d.ts +3 -2
- package/dist/ui/resources/useResourceFilters/adaptFormValuesToUrlQuery.d.ts +2 -1
- package/dist/ui/resources/useResourceFilters/adaptSdkToMetrics.d.ts +4 -3
- package/dist/ui/resources/useResourceFilters/adaptSdkToUrlQuery.d.ts +3 -2
- package/dist/ui/resources/useResourceFilters/adaptUrlQueryToFormValues.d.ts +2 -1
- package/dist/ui/resources/useResourceFilters/adaptUrlQueryToSdk.d.ts +3 -2
- package/dist/ui/resources/useResourceFilters/adaptUrlQueryToUrlQuery.d.ts +2 -1
- package/dist/ui/resources/useResourceFilters/adapters.d.ts +2 -1
- package/dist/ui/resources/useResourceFilters/adapters.types.d.ts +10 -9
- package/dist/ui/resources/useResourceFilters/mockedInstructions.d.ts +2 -1
- package/dist/ui/resources/useResourceFilters/timeUtils.d.ts +2 -1
- package/dist/ui/resources/useResourceFilters/types.d.ts +3 -2
- package/dist/ui/resources/useResourceFilters/useResourceFilters.d.ts +8 -8
- package/dist/ui/resources/useResourceFilters/utils.d.ts +2 -1
- package/dist/utils/children.d.ts +2 -1
- package/dist/utils/extractHeaders.d.ts +2 -1
- package/dist/utils/text.d.ts +2 -1
- package/dist/vendor.css +1 -1
- package/package.json +24 -24
- package/dist/InputDateComponent-B8HvJdHg.js +0 -5363
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputWrapperBaseProps } from '../../internals/InputWrapper';
|
|
2
|
+
|
|
3
3
|
export interface InputSpinnerProps extends InputWrapperBaseProps, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'value' | 'onChange'> {
|
|
4
4
|
min?: number;
|
|
5
5
|
max?: number;
|
|
@@ -15,4 +15,4 @@ export interface InputSpinnerProps extends InputWrapperBaseProps, Omit<React.Inp
|
|
|
15
15
|
*/
|
|
16
16
|
disabled?: boolean;
|
|
17
17
|
}
|
|
18
|
-
export declare const InputSpinner: import(
|
|
18
|
+
export declare const InputSpinner: import('react').ForwardRefExoticComponent<InputSpinnerProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputWrapperBaseProps } from '../../internals/InputWrapper';
|
|
2
|
+
|
|
3
3
|
export interface InputSwitchProps extends InputWrapperBaseProps, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'value'> {
|
|
4
4
|
}
|
|
5
|
-
export declare const InputSwitch: import(
|
|
5
|
+
export declare const InputSwitch: import('react').ForwardRefExoticComponent<InputSwitchProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputTextAreaProps } from './InputTextArea';
|
|
2
|
+
|
|
3
3
|
export interface HookedInputTextAreaProps extends InputTextAreaProps {
|
|
4
4
|
/**
|
|
5
5
|
* field name to match hook-form state
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputWrapperBaseProps } from '../../internals/InputWrapper';
|
|
2
|
+
|
|
3
3
|
export interface InputTextAreaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, InputWrapperBaseProps {
|
|
4
4
|
}
|
|
5
|
-
export declare const InputTextArea: import(
|
|
5
|
+
export declare const InputTextArea: import('react').ForwardRefExoticComponent<InputTextAreaProps & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputToggleButtonProps } from './InputToggleButton';
|
|
2
|
+
|
|
3
3
|
export type HookedInputToggleButtonProps = Omit<InputToggleButtonProps, 'value' | 'onChange'> & {
|
|
4
4
|
/**
|
|
5
5
|
* field name to match hook-form state
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { Simplify } from 'type-fest';
|
|
2
|
+
import { InputWrapperBaseProps } from '../../internals/InputWrapper';
|
|
3
|
+
|
|
4
4
|
type ToggleButtonValue = string | boolean | number;
|
|
5
5
|
interface ToggleButtonOption {
|
|
6
6
|
label: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InputFeedbackProps } from '../InputFeedback';
|
|
2
|
+
|
|
2
3
|
type MaybeFeedback = Omit<InputFeedbackProps, 'className'> | undefined;
|
|
3
4
|
export declare function useValidationFeedback(name: string): MaybeFeedback;
|
|
4
5
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { InputFeedbackProps } from '../forms/InputFeedback';
|
|
2
|
+
import { HintProps } from '../atoms/Hint';
|
|
3
|
+
|
|
4
4
|
export interface InputWrapperBaseProps {
|
|
5
5
|
/**
|
|
6
6
|
* Optional input label
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type Address } from '@commercelayer/sdk';
|
|
2
1
|
import { z } from 'zod';
|
|
2
|
+
import { Address } from '@commercelayer/sdk';
|
|
3
|
+
|
|
3
4
|
declare const addressFormSchema: z.ZodObject<{
|
|
4
5
|
first_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5
6
|
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { StockLineItemWithStockTransfer } from './types';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { LineItem, ParcelLineItem, ReturnLineItem } from '@commercelayer/sdk';
|
|
4
|
+
|
|
4
5
|
type Item = LineItem | ParcelLineItem | StockLineItemWithStockTransfer | ReturnLineItem;
|
|
5
6
|
export type ResourceLineItemsProps = ComponentProps<typeof ResourceLineItems>;
|
|
6
7
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
|
|
3
|
+
import { QueryParamsList } from '@commercelayer/sdk';
|
|
4
|
+
import { FetcherResponse, Resource } from './infiniteFetcher';
|
|
5
|
+
import { SkeletonTemplateProps } from '../../atoms/SkeletonTemplate';
|
|
6
|
+
import { SectionProps } from '../../atoms/Section';
|
|
7
|
+
|
|
8
8
|
export interface ResourceListItemTemplateProps<TResource extends ListableResourceType> extends SkeletonTemplateProps<{
|
|
9
9
|
/**
|
|
10
10
|
* The fetched resource
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
|
|
2
|
+
import { CommerceLayerClient, QueryParamsList } from '@commercelayer/sdk';
|
|
3
|
+
import { MetricsApiClient } from './metricsApiClient';
|
|
4
|
+
|
|
4
5
|
type ListResource<TResource extends ListableResourceType> = Awaited<ReturnType<CommerceLayerClient[TResource]['list']>>;
|
|
5
6
|
export type Resource<TResource extends ListableResourceType> = ListResource<TResource>[number];
|
|
6
7
|
export interface FetcherResponse<TResource> {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { Writable } from 'type-fest';
|
|
2
|
+
import { ListMeta, ListResponse } from '@commercelayer/sdk/lib/cjs/resource';
|
|
3
|
+
import { ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
|
|
4
|
+
import { MetricsFilters } from '../useResourceFilters/adaptSdkToMetrics';
|
|
5
|
+
import { Resource } from './infiniteFetcher';
|
|
6
|
+
|
|
6
7
|
export type MetricsResources = 'orders' | 'returns';
|
|
7
8
|
type ListResponseWithoutMeta<ResourceType extends MetricsResources> = Omit<ListResponse<Resource<ResourceType>>, 'meta'>;
|
|
8
9
|
type ListMetaWithCursor = Writable<ListMeta> & {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { FetcherResponse, Resource } from './infiniteFetcher';
|
|
2
|
+
import { ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
|
|
3
|
+
|
|
3
4
|
interface ResourceListInternalState<TResource extends ListableResourceType> {
|
|
4
5
|
isLoading: boolean;
|
|
5
6
|
error?: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ResourceListItemType } from './types';
|
|
2
|
+
import { ListItemProps } from '../../composite/ListItem';
|
|
3
|
+
|
|
3
4
|
export interface ResourceListItemProps {
|
|
4
5
|
/**
|
|
5
6
|
* Resource object used to generate list item content depending on its own type
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { DisplayStatus } from '../../../dictionaries/types';
|
|
2
|
+
|
|
2
3
|
export declare const ListItemDescription: import('../../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
3
4
|
displayStatus: DisplayStatus;
|
|
4
5
|
date: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { ResourceToProps } from '../types';
|
|
2
|
+
import { Promotion } from '@commercelayer/sdk';
|
|
3
|
+
|
|
3
4
|
export declare const promotionToProps: ResourceToProps<Omit<Promotion, 'type'>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { ResourceToProps } from '../types';
|
|
2
|
+
import { StockTransfer } from '@commercelayer/sdk';
|
|
3
|
+
|
|
3
4
|
export declare const stockTransferToProps: ResourceToProps<StockTransfer>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { BuyXPayYPromotion, Customer, ExternalPromotion, FixedAmountPromotion, FixedPricePromotion, FreeGiftPromotion, FreeShippingPromotion, Order, PercentageDiscountPromotion, Return, Shipment, StockTransfer } from '@commercelayer/sdk';
|
|
2
|
+
import { TokenProviderAuthUser } from '../../../providers/TokenProvider/types';
|
|
3
|
+
|
|
4
4
|
export type ResourceListItemType = Order | Return | Customer | StockTransfer | Shipment | BuyXPayYPromotion | ExternalPromotion | FixedAmountPromotion | FixedPricePromotion | FreeGiftPromotion | FreeShippingPromotion | PercentageDiscountPromotion;
|
|
5
5
|
export interface ResourceListItemComponentProps {
|
|
6
6
|
name: React.ReactNode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ResourceMetadataProps } from './ResourceMetadata';
|
|
2
|
+
import { Metadata } from '@commercelayer/sdk/lib/cjs/resource';
|
|
3
|
+
|
|
3
4
|
interface ResourceMetadataFormValues {
|
|
4
5
|
metadata: Metadata;
|
|
5
6
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ResourceShipmentParcels } from './ResourceShipmentParcels';
|
|
2
|
+
|
|
2
3
|
type Shipment = Parameters<typeof ResourceShipmentParcels>[0]['shipment'];
|
|
3
4
|
type Parcel = NonNullable<Shipment['parcels']>[number];
|
|
4
|
-
export declare const parcelWithoutTracking1: import(
|
|
5
|
-
export declare const parcelWithoutTracking2: import(
|
|
6
|
-
export declare const parcelWithTracking1: import(
|
|
7
|
-
export declare const parcelWithTracking2: import(
|
|
8
|
-
export declare const parcelWithTracking3: import(
|
|
9
|
-
export declare const parcelWithoutTrackingDetails1: import(
|
|
5
|
+
export declare const parcelWithoutTracking1: import('@commercelayer/sdk').Parcel;
|
|
6
|
+
export declare const parcelWithoutTracking2: import('@commercelayer/sdk').Parcel;
|
|
7
|
+
export declare const parcelWithTracking1: import('@commercelayer/sdk').Parcel;
|
|
8
|
+
export declare const parcelWithTracking2: import('@commercelayer/sdk').Parcel;
|
|
9
|
+
export declare const parcelWithTracking3: import('@commercelayer/sdk').Parcel;
|
|
10
|
+
export declare const parcelWithoutTrackingDetails1: import('@commercelayer/sdk').Parcel;
|
|
10
11
|
export declare const parcelWithCustomsInfo: Parcel;
|
|
11
|
-
export declare const shipmentWithoutTracking: import(
|
|
12
|
-
export declare const shipmentWithStatusDifferentFromPacking: import(
|
|
13
|
-
export declare const shipmentHasBeenPurchased: import(
|
|
14
|
-
export declare const shipmentWithSingleParcelSingleTracking: import(
|
|
15
|
-
export declare const shipmentWithSingleParcelSingleTrackingNoCarrier: import(
|
|
16
|
-
export declare const shipmentWithMultipleParcelsSingleTracking: import(
|
|
17
|
-
export declare const shipmentWithMultipleParcelsMultipleTrackings: import(
|
|
18
|
-
export declare const shipmentWithoutTrackingDetails: import(
|
|
19
|
-
export declare const shipmentWithoutParcels: import(
|
|
20
|
-
export declare const shipmentWithCustomsInfo: import(
|
|
12
|
+
export declare const shipmentWithoutTracking: import('@commercelayer/sdk').Shipment;
|
|
13
|
+
export declare const shipmentWithStatusDifferentFromPacking: import('@commercelayer/sdk').Shipment;
|
|
14
|
+
export declare const shipmentHasBeenPurchased: import('@commercelayer/sdk').Shipment;
|
|
15
|
+
export declare const shipmentWithSingleParcelSingleTracking: import('@commercelayer/sdk').Shipment;
|
|
16
|
+
export declare const shipmentWithSingleParcelSingleTrackingNoCarrier: import('@commercelayer/sdk').Shipment;
|
|
17
|
+
export declare const shipmentWithMultipleParcelsSingleTracking: import('@commercelayer/sdk').Shipment;
|
|
18
|
+
export declare const shipmentWithMultipleParcelsMultipleTrackings: import('@commercelayer/sdk').Shipment;
|
|
19
|
+
export declare const shipmentWithoutTrackingDetails: import('@commercelayer/sdk').Shipment;
|
|
20
|
+
export declare const shipmentWithoutParcels: import('@commercelayer/sdk').Shipment;
|
|
21
|
+
export declare const shipmentWithCustomsInfo: import('@commercelayer/sdk').Shipment;
|
|
21
22
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
|
|
2
|
+
|
|
2
3
|
type TaggableResource = Extract<ListableResourceType, 'addresses' | 'bundles' | 'customers' | 'coupons' | 'gift_cards' | 'line_items' | 'orders' | 'returns' | 'sku_options' | 'skus' | 'shipments'>;
|
|
3
4
|
interface TagsOverlay {
|
|
4
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { FiltersInstructions } from './types';
|
|
2
|
+
import { SearchBarProps } from '../../composite/SearchBar';
|
|
3
|
+
|
|
4
4
|
export interface FilterSearchBarProps extends Pick<SearchBarProps, 'placeholder' | 'debounceMs'> {
|
|
5
5
|
/**
|
|
6
6
|
* Array of instruction items to build the filters behaviors
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { CurrencyRangeFieldValue, FiltersInstructions, UiFilterName, UiFilterValue } from './types';
|
|
2
|
+
import { QueryFilter } from '@commercelayer/sdk/lib/cjs/query';
|
|
3
|
+
|
|
3
4
|
export interface AdaptFormValuesToSdkParams<FilterFormValues> {
|
|
4
5
|
formValues: FilterFormValues;
|
|
5
6
|
timezone?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FiltersInstructions, FormFullValues } from './types';
|
|
2
|
+
|
|
2
3
|
export interface AdaptFormValuesToUrlQueryParams<FilterFormValues extends FormFullValues> {
|
|
3
4
|
formValues: FilterFormValues;
|
|
4
5
|
instructions: FiltersInstructions;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { QueryFilter } from '@commercelayer/sdk/lib/cjs/query';
|
|
2
|
+
import { ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
|
|
3
|
+
import { FiltersInstructions } from './types';
|
|
4
|
+
|
|
4
5
|
export type CoreResourceEnabledInMetrics = 'orders' | 'returns';
|
|
5
6
|
type MetricsResource = 'order' | 'return';
|
|
6
7
|
/** Record of core api filter operators with relative metrics operator */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { QueryFilter } from '@commercelayer/sdk/lib/cjs/query';
|
|
2
|
+
import { FiltersInstructions } from './types';
|
|
3
|
+
|
|
3
4
|
export interface AdaptSdkToUrlQueryParams {
|
|
4
5
|
sdkFilters: QueryFilter;
|
|
5
6
|
instructions: FiltersInstructions;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FiltersInstructions, FormFullValues, UiFilterName, UiFilterValue } from './types';
|
|
2
|
+
|
|
2
3
|
export interface AdaptUrlQueryToFormValuesParams {
|
|
3
4
|
queryString: string;
|
|
4
5
|
instructions: FiltersInstructions;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { FiltersInstructions } from './types';
|
|
2
|
+
import { QueryFilter } from '@commercelayer/sdk/lib/cjs/query';
|
|
3
|
+
|
|
3
4
|
export interface AdaptUrlQueryToSdkParams {
|
|
4
5
|
queryString: string;
|
|
5
6
|
instructions: FiltersInstructions;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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
|
+
import { QueryFilter } from '@commercelayer/sdk/lib/cjs/query';
|
|
10
|
+
|
|
10
11
|
interface MakeFilterAdaptersParams {
|
|
11
12
|
instructions: FiltersInstructions;
|
|
12
13
|
predicateWhitelist: string[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { InputResourceGroupProps } from '../../forms/InputResourceGroup';
|
|
2
|
+
import { InputCurrencyRangeProps } from '../../forms/InputCurrencyRange';
|
|
3
|
+
|
|
3
4
|
export declare const filterableTimeRangePreset: readonly ["today", "last7days", "last30days", "custom"];
|
|
4
5
|
export type UiFilterName = string;
|
|
5
6
|
export type UiFilterValue = string | string[] | boolean | Date | undefined;
|