@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.
Files changed (184) hide show
  1. package/dist/InputDateComponent-VMIwGyWW.js +6884 -0
  2. package/dist/dictionaries/customers.d.ts +3 -2
  3. package/dist/dictionaries/orders.d.ts +4 -3
  4. package/dist/dictionaries/promotions.d.ts +3 -2
  5. package/dist/dictionaries/returns.d.ts +4 -3
  6. package/dist/dictionaries/shipments.d.ts +4 -3
  7. package/dist/dictionaries/stockTransfers.d.ts +4 -3
  8. package/dist/dictionaries/types.d.ts +2 -1
  9. package/dist/helpers/appsNavigation.d.ts +2 -2
  10. package/dist/helpers/attachments.d.ts +3 -2
  11. package/dist/helpers/date.d.ts +2 -1
  12. package/dist/helpers/resources.d.ts +3 -2
  13. package/dist/helpers/route.d.ts +3 -2
  14. package/dist/helpers/tracking.d.ts +4 -3
  15. package/dist/hooks/useClickAway.d.ts +2 -1
  16. package/dist/hooks/useEditMetadataOverlay.d.ts +2 -2
  17. package/dist/hooks/useOverlay.d.ts +2 -2
  18. package/dist/{main-DDo6Radk.js → main-B9GWvu3Z.js} +5005 -4970
  19. package/dist/main.d.ts +1 -0
  20. package/dist/main.js +1 -1
  21. package/dist/mocks/data/countries.d.ts +1 -1
  22. package/dist/mocks/data/customers.d.ts +1 -1
  23. package/dist/mocks/handlers.d.ts +1 -1
  24. package/dist/mocks/server.d.ts +1 -1
  25. package/dist/providers/CoreSdkProvider/CoreSdkProvider.d.ts +3 -2
  26. package/dist/providers/CoreSdkProvider/makeSdkClient.d.ts +2 -1
  27. package/dist/providers/CoreSdkProvider/useCoreApi.d.ts +5 -4
  28. package/dist/providers/ErrorBoundary.d.ts +2 -1
  29. package/dist/providers/GTMProvider.d.ts +2 -2
  30. package/dist/providers/TokenProvider/MockTokenProvider.d.ts +2 -2
  31. package/dist/providers/TokenProvider/TokenProvider.d.ts +7 -6
  32. package/dist/providers/TokenProvider/getAccessTokenFromUrl.d.ts +3 -2
  33. package/dist/providers/TokenProvider/getInfoFromJwt.d.ts +2 -1
  34. package/dist/providers/TokenProvider/getOrganization.d.ts +2 -1
  35. package/dist/providers/TokenProvider/makeSdkClient.d.ts +2 -1
  36. package/dist/providers/TokenProvider/reducer.d.ts +4 -3
  37. package/dist/providers/TokenProvider/storage.d.ts +2 -1
  38. package/dist/providers/TokenProvider/types.d.ts +2 -1
  39. package/dist/providers/TokenProvider/url.d.ts +2 -1
  40. package/dist/providers/TokenProvider/validateToken.d.ts +3 -2
  41. package/dist/providers/createApp.d.ts +4 -3
  42. package/dist/style.css +1 -1
  43. package/dist/ui/atoms/A.d.ts +3 -3
  44. package/dist/ui/atoms/Avatar.d.ts +1 -1
  45. package/dist/ui/atoms/Badge/Badge.d.ts +3 -2
  46. package/dist/ui/atoms/Button.d.ts +2 -2
  47. package/dist/ui/atoms/ButtonFilter.d.ts +2 -2
  48. package/dist/ui/atoms/Card.d.ts +337 -341
  49. package/dist/ui/atoms/EmptyState.d.ts +3 -2
  50. package/dist/ui/atoms/Grid.d.ts +2 -1
  51. package/dist/ui/atoms/Hint.d.ts +3 -2
  52. package/dist/ui/atoms/Icon/Icon.d.ts +2 -1
  53. package/dist/ui/atoms/PageHeading.d.ts +3 -2
  54. package/dist/ui/atoms/RadialProgress.d.ts +3 -2
  55. package/dist/ui/atoms/ScrollToTop.d.ts +2 -1
  56. package/dist/ui/atoms/Section.d.ts +2 -1
  57. package/dist/ui/atoms/Skeleton.d.ts +2 -1
  58. package/dist/ui/atoms/SkeletonTemplate.d.ts +3 -2
  59. package/dist/ui/atoms/Spacer.d.ts +2 -1
  60. package/dist/ui/atoms/Stack.d.ts +2 -1
  61. package/dist/ui/atoms/StatusIcon.d.ts +2 -2
  62. package/dist/ui/atoms/Table/Table.d.ts +2 -1
  63. package/dist/ui/atoms/Tabs.d.ts +2 -1
  64. package/dist/ui/atoms/Tag.d.ts +3 -2
  65. package/dist/ui/atoms/Text.d.ts +2 -1
  66. package/dist/ui/atoms/Tooltip.d.ts +4 -3
  67. package/dist/ui/composite/ActionButtons/ActionButtons.d.ts +3 -2
  68. package/dist/ui/composite/Dropdown/Dropdown.d.ts +2 -2
  69. package/dist/ui/composite/Dropdown/DropdownDivider.d.ts +2 -1
  70. package/dist/ui/composite/Dropdown/DropdownItem.d.ts +338 -343
  71. package/dist/ui/composite/Dropdown/DropdownMenu.d.ts +2 -1
  72. package/dist/ui/composite/Dropdown/DropdownSearch.d.ts +1 -1
  73. package/dist/ui/composite/HomePageLayout.d.ts +3 -2
  74. package/dist/ui/composite/List.d.ts +3 -2
  75. package/dist/ui/composite/ListDetails.d.ts +2 -1
  76. package/dist/ui/composite/ListDetailsItem.d.ts +2 -1
  77. package/dist/ui/composite/ListItem.d.ts +3 -2
  78. package/dist/ui/composite/PageError.d.ts +2 -2
  79. package/dist/ui/composite/PageLayout.d.ts +4 -3
  80. package/dist/ui/composite/Report.d.ts +2 -1
  81. package/dist/ui/composite/SearchBar.d.ts +1 -1
  82. package/dist/ui/composite/TableData.d.ts +2 -2
  83. package/dist/ui/composite/Timeline.d.ts +4 -3
  84. package/dist/ui/forms/Form/HookedForm.d.ts +2 -2
  85. package/dist/ui/forms/Input/HookedInput.d.ts +2 -2
  86. package/dist/ui/forms/Input/Input.d.ts +3 -3
  87. package/dist/ui/forms/InputCheckbox/HookedInputCheckbox.d.ts +2 -2
  88. package/dist/ui/forms/InputCheckbox/InputCheckbox.d.ts +3 -3
  89. package/dist/ui/forms/InputCheckboxGroup/HookedInputCheckboxGroup.d.ts +2 -2
  90. package/dist/ui/forms/InputCheckboxGroup/InputCheckboxGroup.d.ts +4 -3
  91. package/dist/ui/forms/InputCheckboxGroup/InputCheckboxGroupItem.d.ts +3 -2
  92. package/dist/ui/forms/InputCheckboxGroup/reducer.d.ts +3 -2
  93. package/dist/ui/forms/InputCurrency/HookedInputCurrency.d.ts +2 -2
  94. package/dist/ui/forms/InputCurrency/InputCurrency.d.ts +5 -5
  95. package/dist/ui/forms/InputCurrency/utils.d.ts +2 -1
  96. package/dist/ui/forms/InputCurrencyRange.d.ts +4 -4
  97. package/dist/ui/forms/InputDate/HookedInputDate.d.ts +2 -2
  98. package/dist/ui/forms/InputDate/InputDate.d.ts +4 -4
  99. package/dist/ui/forms/InputDate/InputDateComponent.d.ts +4 -4
  100. package/dist/ui/forms/InputDateRange/HookedInputDateRange.d.ts +2 -2
  101. package/dist/ui/forms/InputDateRange/InputDateRange.d.ts +4 -4
  102. package/dist/ui/forms/InputFile.d.ts +3 -3
  103. package/dist/ui/forms/InputJson.d.ts +2 -2
  104. package/dist/ui/forms/InputRadioGroup/HookedInputRadioGroup.d.ts +2 -2
  105. package/dist/ui/forms/InputRadioGroup/InputRadioGroup.d.ts +3 -2
  106. package/dist/ui/forms/InputReadonly.d.ts +4 -4
  107. package/dist/ui/forms/InputResourceGroup/FullList.d.ts +2 -2
  108. package/dist/ui/forms/InputResourceGroup/HookedInputResourceGroup.d.ts +2 -2
  109. package/dist/ui/forms/InputResourceGroup/InputResourceGroup.d.ts +3 -3
  110. package/dist/ui/forms/InputResourceGroup/utils.d.ts +3 -2
  111. package/dist/ui/forms/InputSelect/AsyncComponent.d.ts +5 -5
  112. package/dist/ui/forms/InputSelect/HookedInputSelect.d.ts +2 -2
  113. package/dist/ui/forms/InputSelect/InputSelect.d.ts +5 -4
  114. package/dist/ui/forms/InputSelect/SelectComponent.d.ts +4 -4
  115. package/dist/ui/forms/InputSelect/overrides.d.ts +3 -3
  116. package/dist/ui/forms/InputSelect/styles.d.ts +4 -3
  117. package/dist/ui/forms/InputSelect/utils.d.ts +2 -1
  118. package/dist/ui/forms/InputSimpleSelect/HookedInputSimpleSelect.d.ts +2 -2
  119. package/dist/ui/forms/InputSimpleSelect/InputSimpleSelect.d.ts +3 -3
  120. package/dist/ui/forms/InputSpinner/HookedInputSpinner.d.ts +2 -2
  121. package/dist/ui/forms/InputSpinner/InputSpinner.d.ts +3 -3
  122. package/dist/ui/forms/InputSwitch/HookedInputSwitch.d.ts +2 -2
  123. package/dist/ui/forms/InputSwitch/InputSwitch.d.ts +3 -3
  124. package/dist/ui/forms/InputTextArea/HookedInputTextArea.d.ts +2 -2
  125. package/dist/ui/forms/InputTextArea/InputTextArea.d.ts +3 -3
  126. package/dist/ui/forms/InputToggleButton/HookedInputToggleButton.d.ts +2 -2
  127. package/dist/ui/forms/InputToggleButton/InputToggleButton.d.ts +3 -3
  128. package/dist/ui/forms/ReactHookForm/setApiFormErrors.d.ts +2 -1
  129. package/dist/ui/forms/ReactHookForm/useValidationFeedback.d.ts +2 -1
  130. package/dist/ui/internals/FlexRow.d.ts +2 -1
  131. package/dist/ui/internals/InputWrapper.d.ts +3 -3
  132. package/dist/ui/resources/ResourceAddress/ResourceAddress.d.ts +2 -1
  133. package/dist/ui/resources/ResourceAddress/ResourceAddressForm.d.ts +2 -1
  134. package/dist/ui/resources/ResourceLineItems/ResourceLineItems.d.ts +4 -3
  135. package/dist/ui/resources/ResourceLineItems/types.d.ts +2 -1
  136. package/dist/ui/resources/ResourceList/ResourceList.d.ts +7 -7
  137. package/dist/ui/resources/ResourceList/VisibilityTrigger.d.ts +2 -1
  138. package/dist/ui/resources/ResourceList/infiniteFetcher.d.ts +4 -3
  139. package/dist/ui/resources/ResourceList/metricsApiClient.d.ts +6 -5
  140. package/dist/ui/resources/ResourceList/reducer.d.ts +3 -2
  141. package/dist/ui/resources/ResourceListItem/ResourceListItem.d.ts +3 -2
  142. package/dist/ui/resources/ResourceListItem/common.d.ts +2 -1
  143. package/dist/ui/resources/ResourceListItem/transformers/customers.d.ts +3 -2
  144. package/dist/ui/resources/ResourceListItem/transformers/orders.d.ts +3 -2
  145. package/dist/ui/resources/ResourceListItem/transformers/promotions.d.ts +3 -2
  146. package/dist/ui/resources/ResourceListItem/transformers/returns.d.ts +3 -2
  147. package/dist/ui/resources/ResourceListItem/transformers/shipments.d.ts +3 -2
  148. package/dist/ui/resources/ResourceListItem/transformers/stockTransfers.d.ts +3 -2
  149. package/dist/ui/resources/ResourceListItem/types.d.ts +3 -3
  150. package/dist/ui/resources/ResourceMetadata/ResourceMetadata.d.ts +2 -1
  151. package/dist/ui/resources/ResourceMetadata/ResourceMetadataForm.d.ts +3 -2
  152. package/dist/ui/resources/ResourceMetadata/utils.d.ts +9 -0
  153. package/dist/ui/resources/ResourceMetadata/utils.test.d.ts +1 -0
  154. package/dist/ui/resources/ResourceOrderTimeline.d.ts +2 -1
  155. package/dist/ui/resources/ResourceShipmentParcels.d.ts +2 -1
  156. package/dist/ui/resources/ResourceShipmentParcels.mocks.d.ts +18 -17
  157. package/dist/ui/resources/ResourceTags.d.ts +2 -1
  158. package/dist/ui/resources/useResourceFilters/FieldCurrencyRange.d.ts +2 -2
  159. package/dist/ui/resources/useResourceFilters/FieldOptions.d.ts +2 -2
  160. package/dist/ui/resources/useResourceFilters/FieldTextSearch.d.ts +2 -2
  161. package/dist/ui/resources/useResourceFilters/FieldTimeRange.d.ts +2 -2
  162. package/dist/ui/resources/useResourceFilters/FiltersForm.d.ts +2 -2
  163. package/dist/ui/resources/useResourceFilters/FiltersNav.d.ts +2 -2
  164. package/dist/ui/resources/useResourceFilters/FiltersSearchBar.d.ts +3 -3
  165. package/dist/ui/resources/useResourceFilters/adaptFormValuesToSdk.d.ts +3 -2
  166. package/dist/ui/resources/useResourceFilters/adaptFormValuesToUrlQuery.d.ts +2 -1
  167. package/dist/ui/resources/useResourceFilters/adaptSdkToMetrics.d.ts +4 -3
  168. package/dist/ui/resources/useResourceFilters/adaptSdkToUrlQuery.d.ts +3 -2
  169. package/dist/ui/resources/useResourceFilters/adaptUrlQueryToFormValues.d.ts +2 -1
  170. package/dist/ui/resources/useResourceFilters/adaptUrlQueryToSdk.d.ts +3 -2
  171. package/dist/ui/resources/useResourceFilters/adaptUrlQueryToUrlQuery.d.ts +2 -1
  172. package/dist/ui/resources/useResourceFilters/adapters.d.ts +2 -1
  173. package/dist/ui/resources/useResourceFilters/adapters.types.d.ts +10 -9
  174. package/dist/ui/resources/useResourceFilters/mockedInstructions.d.ts +2 -1
  175. package/dist/ui/resources/useResourceFilters/timeUtils.d.ts +2 -1
  176. package/dist/ui/resources/useResourceFilters/types.d.ts +3 -2
  177. package/dist/ui/resources/useResourceFilters/useResourceFilters.d.ts +8 -8
  178. package/dist/ui/resources/useResourceFilters/utils.d.ts +2 -1
  179. package/dist/utils/children.d.ts +2 -1
  180. package/dist/utils/extractHeaders.d.ts +2 -1
  181. package/dist/utils/text.d.ts +2 -1
  182. package/dist/vendor.css +1 -1
  183. package/package.json +24 -24
  184. package/dist/InputDateComponent-B8HvJdHg.js +0 -5363
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- import { type InputWrapperBaseProps } from '../../internals/InputWrapper';
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("react").ForwardRefExoticComponent<InputSpinnerProps & import("react").RefAttributes<HTMLInputElement>>;
18
+ export declare const InputSpinner: import('react').ForwardRefExoticComponent<InputSpinnerProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- import { type InputSwitchProps } from './InputSwitch';
1
+ import { InputSwitchProps } from './InputSwitch';
2
+
3
3
  export interface HookedInputSwitchProps extends InputSwitchProps {
4
4
  /**
5
5
  * field name to match hook-form state
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- import { type InputWrapperBaseProps } from '../../internals/InputWrapper';
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("react").ForwardRefExoticComponent<InputSwitchProps & import("react").RefAttributes<HTMLInputElement>>;
5
+ export declare const InputSwitch: import('react').ForwardRefExoticComponent<InputSwitchProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- import { type InputTextAreaProps } from './InputTextArea';
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
- /// <reference types="react" />
2
- import { type InputWrapperBaseProps } from '../../internals/InputWrapper';
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("react").ForwardRefExoticComponent<InputTextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
5
+ export declare const InputTextArea: import('react').ForwardRefExoticComponent<InputTextAreaProps & import('react').RefAttributes<HTMLTextAreaElement>>;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- import { type InputToggleButtonProps } from './InputToggleButton';
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
- /// <reference types="react" />
2
- import { type InputWrapperBaseProps } from '../../internals/InputWrapper';
3
- import { type Simplify } from 'type-fest';
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 { type UseFormSetError } from 'react-hook-form';
1
+ import { UseFormSetError } from 'react-hook-form';
2
+
2
3
  export declare function setApiFormErrors({ apiError, setError, fieldMap, formFields }: {
3
4
  /**
4
5
  * Error response from API
@@ -1,4 +1,5 @@
1
- import { type InputFeedbackProps } from '../InputFeedback';
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,4 +1,5 @@
1
- import { type ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
+
2
3
  export type FlexRowAlignItems = 'top' | 'bottom' | 'center';
3
4
  export interface FlexRowProps extends React.HTMLAttributes<HTMLDivElement> {
4
5
  children: ReactNode;
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
- import { type HintProps } from '../atoms/Hint';
3
- import { type InputFeedbackProps } from '../forms/InputFeedback';
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,4 +1,5 @@
1
- import { type Address } from '@commercelayer/sdk';
1
+ import { Address } from '@commercelayer/sdk';
2
+
2
3
  export interface ResourceAddressProps {
3
4
  /**
4
5
  * Resource of type `Address`
@@ -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 type { LineItem, ParcelLineItem, ReturnLineItem } from '@commercelayer/sdk';
2
- import { type ComponentProps } from 'react';
3
- import { type StockLineItemWithStockTransfer } from './types';
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,4 +1,5 @@
1
- import { type StockLineItem, type StockTransfer } from '@commercelayer/sdk';
1
+ import { StockLineItem, StockTransfer } from '@commercelayer/sdk';
2
+
2
3
  export type StockLineItemWithStockTransfer = StockLineItem & {
3
4
  stockTransfer?: StockTransfer;
4
5
  };
@@ -1,10 +1,10 @@
1
- import { type SectionProps } from '../../atoms/Section';
2
- import { type SkeletonTemplateProps } from '../../atoms/SkeletonTemplate';
3
- import { type FetcherResponse } from './infiniteFetcher';
4
- import { type QueryParamsList } from '@commercelayer/sdk';
5
- import { type ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
6
- import { type FC } from 'react';
7
- import { type Resource } from './infiniteFetcher';
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,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
2
3
  interface VisibilityTriggerProps extends React.HTMLAttributes<HTMLDivElement> {
3
4
  rootMargin?: string;
4
5
  callback: (entry: IntersectionObserverEntry) => void;
@@ -1,6 +1,7 @@
1
- import { type MetricsApiClient } from './metricsApiClient';
2
- import type { CommerceLayerClient, QueryParamsList } from '@commercelayer/sdk';
3
- import { type ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
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 { type Resource } from './infiniteFetcher';
2
- import { type MetricsFilters } from '../useResourceFilters/adaptSdkToMetrics';
3
- import { type ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
4
- import { type ListMeta, type ListResponse } from '@commercelayer/sdk/lib/cjs/resource';
5
- import { type Writable } from 'type-fest';
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 { type ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
2
- import { type FetcherResponse, type Resource } from './infiniteFetcher';
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 { type ListItemProps } from '../../composite/ListItem';
2
- import { type ResourceListItemType } from './types';
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 type { DisplayStatus } from '../../../dictionaries/types';
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 type { Customer } from '@commercelayer/sdk';
2
- import { type ResourceToProps } from '../types';
1
+ import { ResourceToProps } from '../types';
2
+ import { Customer } from '@commercelayer/sdk';
3
+
3
4
  export declare const customerToProps: ResourceToProps<Customer>;
@@ -1,3 +1,4 @@
1
- import type { Order } from '@commercelayer/sdk';
2
- import { type ResourceToProps } from '../types';
1
+ import { ResourceToProps } from '../types';
2
+ import { Order } from '@commercelayer/sdk';
3
+
3
4
  export declare const orderToProps: ResourceToProps<Order>;
@@ -1,3 +1,4 @@
1
- import type { Promotion } from '@commercelayer/sdk';
2
- import { type ResourceToProps } from '../types';
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 type { Return } from '@commercelayer/sdk';
2
- import { type ResourceToProps } from '../types';
1
+ import { ResourceToProps } from '../types';
2
+ import { Return } from '@commercelayer/sdk';
3
+
3
4
  export declare const returnToProps: ResourceToProps<Return>;
@@ -1,3 +1,4 @@
1
- import type { Shipment } from '@commercelayer/sdk';
2
- import { type ResourceToProps } from '../types';
1
+ import { ResourceToProps } from '../types';
2
+ import { Shipment } from '@commercelayer/sdk';
3
+
3
4
  export declare const shipmentToProps: ResourceToProps<Shipment>;
@@ -1,3 +1,4 @@
1
- import type { StockTransfer } from '@commercelayer/sdk';
2
- import { type ResourceToProps } from '../types';
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
- /// <reference types="react" />
2
- import type { TokenProviderAuthUser } from '../../../providers/TokenProvider/types';
3
- import type { BuyXPayYPromotion, Customer, ExternalPromotion, FixedAmountPromotion, FixedPricePromotion, FreeGiftPromotion, FreeShippingPromotion, Order, PercentageDiscountPromotion, Return, Shipment, StockTransfer } from '@commercelayer/sdk';
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,4 +1,5 @@
1
- import { type ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
1
+ import { ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
2
+
2
3
  export interface ResourceMetadataOverlay {
3
4
  /**
4
5
  * Title shown as first line in edit overlay heading
@@ -1,5 +1,6 @@
1
- import { type Metadata } from '@commercelayer/sdk/lib/cjs/resource';
2
- import { type ResourceMetadataProps } from './ResourceMetadata';
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,9 @@
1
+ export declare function groupMetadataKeys(data: Array<{
2
+ key: string;
3
+ value?: unknown;
4
+ }>): GroupedMetadataKeys;
5
+ type GroupedMetadataKeys = Record<string, {
6
+ count: number;
7
+ indexes: number[];
8
+ }>;
9
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,6 @@
1
+ import { Attachment } from '@commercelayer/sdk';
1
2
  import { referenceOrigins } from '../../helpers/attachments';
2
- import type { Attachment } from '@commercelayer/sdk';
3
+
3
4
  export interface ResourceOrderTimelineProps {
4
5
  orderId?: string;
5
6
  refresh?: boolean;
@@ -1,4 +1,5 @@
1
- import { type Shipment as ShipmentResource } from '@commercelayer/sdk';
1
+ import { Shipment as ShipmentResource } from '@commercelayer/sdk';
2
+
2
3
  export interface ResourceShipmentParcelsProps {
3
4
  shipment: ShipmentResource;
4
5
  onRemoveParcel?: (parcelId: string) => void;
@@ -1,21 +1,22 @@
1
- import { type ResourceShipmentParcels } from './ResourceShipmentParcels';
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("@commercelayer/sdk/lib/cjs/resources/parcels").Parcel;
5
- export declare const parcelWithoutTracking2: import("@commercelayer/sdk/lib/cjs/resources/parcels").Parcel;
6
- export declare const parcelWithTracking1: import("@commercelayer/sdk/lib/cjs/resources/parcels").Parcel;
7
- export declare const parcelWithTracking2: import("@commercelayer/sdk/lib/cjs/resources/parcels").Parcel;
8
- export declare const parcelWithTracking3: import("@commercelayer/sdk/lib/cjs/resources/parcels").Parcel;
9
- export declare const parcelWithoutTrackingDetails1: import("@commercelayer/sdk/lib/cjs/resources/parcels").Parcel;
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("@commercelayer/sdk/lib/cjs/resources/shipments").Shipment;
12
- export declare const shipmentWithStatusDifferentFromPacking: import("@commercelayer/sdk/lib/cjs/resources/shipments").Shipment;
13
- export declare const shipmentHasBeenPurchased: import("@commercelayer/sdk/lib/cjs/resources/shipments").Shipment;
14
- export declare const shipmentWithSingleParcelSingleTracking: import("@commercelayer/sdk/lib/cjs/resources/shipments").Shipment;
15
- export declare const shipmentWithSingleParcelSingleTrackingNoCarrier: import("@commercelayer/sdk/lib/cjs/resources/shipments").Shipment;
16
- export declare const shipmentWithMultipleParcelsSingleTracking: import("@commercelayer/sdk/lib/cjs/resources/shipments").Shipment;
17
- export declare const shipmentWithMultipleParcelsMultipleTrackings: import("@commercelayer/sdk/lib/cjs/resources/shipments").Shipment;
18
- export declare const shipmentWithoutTrackingDetails: import("@commercelayer/sdk/lib/cjs/resources/shipments").Shipment;
19
- export declare const shipmentWithoutParcels: import("@commercelayer/sdk/lib/cjs/resources/shipments").Shipment;
20
- export declare const shipmentWithCustomsInfo: import("@commercelayer/sdk/lib/cjs/resources/shipments").Shipment;
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 { type ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
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,5 +1,5 @@
1
- /// <reference types="react" />
2
- import { type FilterItemCurrencyRange } from './types';
1
+ import { FilterItemCurrencyRange } from './types';
2
+
3
3
  interface FieldCurrencyRangeProps {
4
4
  item: FilterItemCurrencyRange;
5
5
  }
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- import { type FilterItemOptions } from './types';
1
+ import { FilterItemOptions } from './types';
2
+
3
3
  interface FieldProps {
4
4
  item: FilterItemOptions;
5
5
  }
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- import { type FilterItemTextSearch } from './types';
1
+ import { FilterItemTextSearch } from './types';
2
+
3
3
  interface FieldProps {
4
4
  item: FilterItemTextSearch;
5
5
  }
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- import { type FilterItemTime } from './types';
1
+ import { FilterItemTime } from './types';
2
+
3
3
  interface FieldTimeRangeProps {
4
4
  item: FilterItemTime;
5
5
  }
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- import type { FiltersInstructions } from './types';
1
+ import { FiltersInstructions } from './types';
2
+
3
3
  export interface FiltersFormProps {
4
4
  /**
5
5
  * Array of instruction items to build the filters behaviors
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- import { type FiltersInstructions } from './types';
1
+ import { FiltersInstructions } from './types';
2
+
3
3
  export interface FiltersNavProps {
4
4
  /**
5
5
  * Array of instruction items to build the filters behaviors
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
- import { type SearchBarProps } from '../../composite/SearchBar';
3
- import { type FiltersInstructions } from './types';
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 { type QueryFilter } from '@commercelayer/sdk/lib/cjs/query';
2
- import { type CurrencyRangeFieldValue, type FiltersInstructions, type UiFilterName, type UiFilterValue } from './types';
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 { type FiltersInstructions, type FormFullValues } from './types';
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 { type FiltersInstructions } from './types';
2
- import { type ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
3
- import { type QueryFilter } from '@commercelayer/sdk/lib/cjs/query';
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 { type FiltersInstructions } from './types';
2
- import { type QueryFilter } from '@commercelayer/sdk/lib/cjs/query';
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 { type FiltersInstructions, type FormFullValues, type UiFilterName, type UiFilterValue } from './types';
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 { type QueryFilter } from '@commercelayer/sdk/lib/cjs/query';
2
- import { type FiltersInstructions } from './types';
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,4 +1,5 @@
1
- import { type FiltersInstructions } from './types';
1
+ import { FiltersInstructions } from './types';
2
+
2
3
  export interface AdaptUrlQueryToUrlQueryParams {
3
4
  queryString: string;
4
5
  instructions: FiltersInstructions;
@@ -1,2 +1,3 @@
1
- import type { MakeFiltersAdapters } from './adapters.types';
1
+ import { MakeFiltersAdapters } from './adapters.types';
2
+
2
3
  export declare const makeFilterAdapters: MakeFiltersAdapters;
@@ -1,12 +1,13 @@
1
- import { type QueryFilter } from '@commercelayer/sdk/lib/cjs/query';
2
- import { type AdaptFormValuesToSdkParams } from './adaptFormValuesToSdk';
3
- import { type AdaptFormValuesToUrlQueryParams } from './adaptFormValuesToUrlQuery';
4
- import { type AdaptSdkToMetricsParams, type MetricsFilters } from './adaptSdkToMetrics';
5
- import { type AdaptSdkToUrlQueryParams } from './adaptSdkToUrlQuery';
6
- import { type AdaptUrlQueryToFormValuesParams } from './adaptUrlQueryToFormValues';
7
- import { type AdaptUrlQueryToSdkParams } from './adaptUrlQueryToSdk';
8
- import { type AdaptUrlQueryToUrlQueryParams } from './adaptUrlQueryToUrlQuery';
9
- import { type FiltersInstructions, type FormFullValues, type PageInfoFormValues, type TimeRangeFormValues, type UiFilterName, type UiFilterValue } from './types';
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,2 +1,3 @@
1
- import { type FiltersInstructions } from './types';
1
+ import { FiltersInstructions } from './types';
2
+
2
3
  export declare const instructions: FiltersInstructions;
@@ -1,5 +1,6 @@
1
+ import { TimeRangeFormValues, TimeRangePreset } from './types';
1
2
  import { z } from 'zod';
2
- import type { TimeRangeFormValues, TimeRangePreset } from './types';
3
+
3
4
  interface MakerSdkFilterTimeParams {
4
5
  timePreset?: TimeRangePreset;
5
6
  timeFrom?: Date | null;
@@ -1,5 +1,6 @@
1
- import { type InputCurrencyRangeProps } from '../../forms/InputCurrencyRange';
2
- import { type InputResourceGroupProps } from '../../forms/InputResourceGroup';
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;