@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
|
@@ -22,4 +22,4 @@ export interface DropdownSearchProps {
|
|
|
22
22
|
/**
|
|
23
23
|
* This component renders an input as dropdown menu item with debounced `onSearch` callback.
|
|
24
24
|
*/
|
|
25
|
-
export declare const DropdownSearch: import(
|
|
25
|
+
export declare const DropdownSearch: import('react').ForwardRefExoticComponent<DropdownSearchProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PageHeadingProps } from '../atoms/PageHeading';
|
|
3
|
+
|
|
3
4
|
export interface HomePageLayoutProps extends Pick<PageHeadingProps, 'title'> {
|
|
4
5
|
/**
|
|
5
6
|
* Page content
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PaginationProps } from '../atoms/Pagination';
|
|
3
|
+
|
|
3
4
|
type ListPagination = {
|
|
4
5
|
recordsPerPage: number;
|
|
5
6
|
recordCount: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { FlexRowProps } from '../internals/FlexRow';
|
|
3
|
+
|
|
3
4
|
type ListItemVariant = 'list' | 'boxed';
|
|
4
5
|
export type ListItemProps = React.HTMLAttributes<HTMLElement> & Pick<FlexRowProps, 'alignItems' | 'children'> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'onClick' | 'href'> & {
|
|
5
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { PageHeadingProps } from '../atoms/PageHeading';
|
|
2
|
+
|
|
3
3
|
export interface PageErrorProps extends Pick<PageHeadingProps, 'navigationButton'> {
|
|
4
4
|
/**
|
|
5
5
|
* Main page title wrapped in a h1 element
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PageHeadingProps } from '../atoms/PageHeading';
|
|
3
|
+
import { ContainerProps } from '../atoms/Container';
|
|
4
|
+
|
|
4
5
|
export interface PageLayoutProps extends Pick<PageHeadingProps, 'title' | 'description' | 'navigationButton' | 'actionButton' | 'gap'>, Pick<ContainerProps, 'minHeight'> {
|
|
5
6
|
/**
|
|
6
7
|
* Page content
|
|
@@ -36,4 +36,4 @@ export interface SearchBarProps {
|
|
|
36
36
|
* <span type='info'>In this way the `onSearch` callback will be triggered only when the user stops typing
|
|
37
37
|
* for the specified value of `debounceMs` (default 500ms).</span>
|
|
38
38
|
*/
|
|
39
|
-
export declare const SearchBar: import(
|
|
39
|
+
export declare const SearchBar: import('react').ForwardRefExoticComponent<SearchBarProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
2
3
|
export interface TimelineEvent {
|
|
3
4
|
date: string;
|
|
4
5
|
author?: string;
|
|
@@ -16,8 +17,8 @@ export declare const Timeline: import('../atoms/SkeletonTemplate').SkeletonTempl
|
|
|
16
17
|
disabled?: boolean | undefined;
|
|
17
18
|
events: TimelineEvent[];
|
|
18
19
|
timezone?: string | undefined;
|
|
19
|
-
onChange?: import(
|
|
20
|
-
onKeyDown?: import(
|
|
20
|
+
onChange?: import('react').ChangeEventHandler<HTMLInputElement> | undefined;
|
|
21
|
+
onKeyDown?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
|
|
21
22
|
delayMs?: number | undefined;
|
|
22
23
|
isLoading?: boolean | undefined;
|
|
23
24
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { FieldValues, FormProviderProps } from 'react-hook-form';
|
|
2
|
+
|
|
3
3
|
interface FormProps<T extends FieldValues> extends FormProviderProps<T> {
|
|
4
4
|
/**
|
|
5
5
|
* Callback invoked on submit when form has been successfully validated
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputWrapperBaseProps } from '../../internals/InputWrapper';
|
|
2
|
+
|
|
3
3
|
export interface InputProps extends InputWrapperBaseProps, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
4
4
|
/**
|
|
5
5
|
* Controlled type
|
|
@@ -14,4 +14,4 @@ export interface InputProps extends InputWrapperBaseProps, Omit<React.InputHTMLA
|
|
|
14
14
|
*/
|
|
15
15
|
suffix?: React.ReactNode;
|
|
16
16
|
}
|
|
17
|
-
export declare const Input: import(
|
|
17
|
+
export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputCheckboxProps } from './InputCheckbox';
|
|
2
|
+
|
|
3
3
|
export interface HookedInputCheckboxProps extends Omit<InputCheckboxProps, 'onChange' | 'checked' | 'feedback' | 'defaultValue' | 'defaultChecked'> {
|
|
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 InputCheckboxProps extends Omit<InputWrapperBaseProps, 'label' | 'inline'>, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'value'> {
|
|
4
4
|
/**
|
|
5
5
|
* Icon component
|
|
@@ -12,4 +12,4 @@ export interface InputCheckboxProps extends Omit<InputWrapperBaseProps, 'label'
|
|
|
12
12
|
checkedElement?: JSX.Element;
|
|
13
13
|
children?: React.ReactNode;
|
|
14
14
|
}
|
|
15
|
-
export declare const InputCheckbox: import(
|
|
15
|
+
export declare const InputCheckbox: import('react').ForwardRefExoticComponent<InputCheckboxProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputCheckboxGroupProps } from './InputCheckboxGroup';
|
|
2
|
+
|
|
3
3
|
export interface HookedInputCheckboxGroupProps extends Omit<InputCheckboxGroupProps, 'onChange' | 'defaultValues'> {
|
|
4
4
|
/**
|
|
5
5
|
* field name to match hook-form state
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { InputCheckboxGroupOption } from './InputCheckboxGroupItem';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
|
|
3
4
|
export interface SelectedItem {
|
|
4
5
|
/**
|
|
5
6
|
* Item identifier, should be one of the options
|
|
@@ -24,7 +25,7 @@ export declare const InputCheckboxGroup: import('../../atoms/SkeletonTemplate').
|
|
|
24
25
|
options: InputCheckboxGroupOption[];
|
|
25
26
|
defaultValues?: SelectedItem[] | undefined;
|
|
26
27
|
onChange: (selected: SelectedItem[]) => void;
|
|
27
|
-
feedback?: Omit<import(
|
|
28
|
+
feedback?: Omit<import('../InputFeedback').InputFeedbackProps, "className"> | undefined;
|
|
28
29
|
delayMs?: number | undefined;
|
|
29
30
|
isLoading?: boolean | undefined;
|
|
30
31
|
}>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { InputCheckboxProps } from '../InputCheckbox';
|
|
3
|
+
|
|
3
4
|
export interface InputCheckboxGroupOption extends Pick<InputCheckboxProps, 'icon' | 'checked'> {
|
|
4
5
|
/**
|
|
5
6
|
* Input name, will be used to set the html name for checkbox and the quantity inputs.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { InputCheckboxGroupOption } from './InputCheckboxGroupItem';
|
|
2
|
+
import { SelectedItem } from './InputCheckboxGroup';
|
|
3
|
+
|
|
3
4
|
export type InternalState = Array<{
|
|
4
5
|
value: string;
|
|
5
6
|
quantity?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputCurrencyProps } from './InputCurrency';
|
|
2
|
+
|
|
3
3
|
export interface HookedInputCurrencyProps extends Omit<InputCurrencyProps, 'onChange' | 'onBlur' | 'cents'> {
|
|
4
4
|
/**
|
|
5
5
|
* field name to match hook-form state
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { CurrencyInputProps as ReactCurrencyInputFieldProps } from 'react-currency-input-field';
|
|
2
|
+
import { InputWrapperBaseProps } from '../../internals/InputWrapper';
|
|
3
|
+
import { CurrencyCode } from '../../../helpers/currencies';
|
|
4
|
+
|
|
5
5
|
export interface InputCurrencyProps extends InputWrapperBaseProps, Pick<ReactCurrencyInputFieldProps, 'onBlur' | 'onClick' | 'disabled'> {
|
|
6
6
|
/**
|
|
7
7
|
* HTML input id
|
|
@@ -49,4 +49,4 @@ export interface InputCurrencyProps extends InputWrapperBaseProps, Pick<ReactCur
|
|
|
49
49
|
*/
|
|
50
50
|
isClearable?: boolean;
|
|
51
51
|
}
|
|
52
|
-
export declare const InputCurrency: import(
|
|
52
|
+
export declare const InputCurrency: import('react').ForwardRefExoticComponent<InputCurrencyProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { InputWrapperBaseProps } from '../internals/InputWrapper';
|
|
2
|
+
import { InputCurrencyProps } from './InputCurrency';
|
|
3
|
+
import { CurrencyCode } from '../../helpers/currencies';
|
|
4
|
+
|
|
5
5
|
type Cents = InputCurrencyProps['cents'];
|
|
6
6
|
export interface InputCurrencyRangeProps extends InputWrapperBaseProps {
|
|
7
7
|
fromCents?: Cents;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputDateProps } from './InputDateComponent';
|
|
2
|
+
|
|
3
3
|
export interface HookedInputDateProps extends Omit<InputDateProps, 'onChange'> {
|
|
4
4
|
/**
|
|
5
5
|
* field name to match hook-form state
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export declare const InputDate: import(
|
|
1
|
+
import { InputDateProps } from './InputDateComponent';
|
|
2
|
+
import { default as DatePicker } from 'react-datepicker';
|
|
3
|
+
|
|
4
|
+
export declare const InputDate: import('react').ForwardRefExoticComponent<InputDateProps & import('react').RefAttributes<DatePicker<undefined, undefined>>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import DatePicker from 'react-datepicker';
|
|
3
|
-
|
|
1
|
+
import { InputWrapperBaseProps } from '../../internals/InputWrapper';
|
|
2
|
+
import { default as DatePicker } from 'react-datepicker';
|
|
3
|
+
|
|
4
4
|
export type MaybeDate = Date | null;
|
|
5
5
|
export interface InputDateProps extends InputWrapperBaseProps {
|
|
6
6
|
/**
|
|
@@ -51,4 +51,4 @@ export interface InputDateProps extends InputWrapperBaseProps {
|
|
|
51
51
|
*/
|
|
52
52
|
preventOpenOnFocus?: boolean;
|
|
53
53
|
}
|
|
54
|
-
export declare const InputDateComponent: import(
|
|
54
|
+
export declare const InputDateComponent: import('react').ForwardRefExoticComponent<InputDateProps & import('react').RefAttributes<DatePicker<undefined, undefined>>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputDateRangeProps } from './InputDateRange';
|
|
2
|
+
|
|
3
3
|
export interface HookedInputDateRangeProps extends Omit<InputDateRangeProps, 'onChange' | 'value'> {
|
|
4
4
|
/**
|
|
5
5
|
* field name to match hook-form state
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { InputDateProps, MaybeDate } from '../InputDate/InputDateComponent';
|
|
2
|
+
import { InputWrapperBaseProps } from '../../internals/InputWrapper';
|
|
3
|
+
|
|
4
4
|
export interface InputDateRangeProps extends Pick<InputDateProps, 'isClearable' | 'format' | 'autoPlaceholder'>, InputWrapperBaseProps {
|
|
5
5
|
/**
|
|
6
6
|
* a tuple that represents the [from, to] dates
|
|
@@ -19,4 +19,4 @@ export interface InputDateRangeProps extends Pick<InputDateProps, 'isClearable'
|
|
|
19
19
|
*/
|
|
20
20
|
toPlaceholder?: string;
|
|
21
21
|
}
|
|
22
|
-
export declare const InputDateRange: import(
|
|
22
|
+
export declare const InputDateRange: import('react').ForwardRefExoticComponent<InputDateRangeProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputWrapperBaseProps } from '../internals/InputWrapper';
|
|
2
|
+
|
|
3
3
|
export interface InputFileProps extends InputWrapperBaseProps, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
4
4
|
/**
|
|
5
5
|
* The title is shown within the input.
|
|
@@ -10,4 +10,4 @@ export interface InputFileProps extends InputWrapperBaseProps, Omit<React.InputH
|
|
|
10
10
|
*/
|
|
11
11
|
progress?: number;
|
|
12
12
|
}
|
|
13
|
-
export declare const InputFile: import(
|
|
13
|
+
export declare const InputFile: import('react').ForwardRefExoticComponent<InputFileProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputWrapperBaseProps } from '../internals/InputWrapper';
|
|
2
|
+
|
|
3
3
|
export interface InputJsonProps<JsonType> extends InputWrapperBaseProps {
|
|
4
4
|
placeholder: object;
|
|
5
5
|
validateFn: (json: any) => JsonType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputRadioGroupProps } from './InputRadioGroup';
|
|
2
|
+
|
|
3
3
|
export interface HookedInputRadioGroupProps extends Omit<InputRadioGroupProps, 'onChange' | 'defaultValues'> {
|
|
4
4
|
/**
|
|
5
5
|
* field name to match hook-form state
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
|
|
2
3
|
interface OptionItem {
|
|
3
4
|
/**
|
|
4
5
|
* Item identifier, must be unique and will be used for the onChange callback
|
|
@@ -29,7 +30,7 @@ export declare const InputRadioGroup: import('../../atoms/SkeletonTemplate').Ske
|
|
|
29
30
|
icon?: "download" | "package" | "tag" | "list" | "warning" | "info" | "x" | "appWindow" | "arrowBendDownRight" | "arrowCircleDown" | "arrowCircleUp" | "arrowClockwise" | "arrowDown" | "arrowLeft" | "arrowRight" | "arrowsLeftRight" | "arrowSquareOut" | "arrowUpRight" | "arrowUUpLeft" | "asteriskSimple" | "bookOpenText" | "bracketsCurly" | "buildings" | "calendarBlank" | "calendarCheck" | "camera" | "caretDown" | "caretRight" | "chat" | "chatCircle" | "check" | "clipboardText" | "cloudArrowUp" | "creditCard" | "currencyEur" | "dotsThree" | "eye" | "flag" | "folderOpen" | "funnelSimple" | "gearFine" | "gift" | "gitFork" | "githubLogo" | "globeSimple" | "googleLogo" | "hourglass" | "houseSimple" | "lifebuoy" | "lightbulbFilament" | "linkSimple" | "lockSimple" | "lockSimpleOpen" | "magnifyingGlass" | "megaphoneSimple" | "minus" | "minusCircle" | "pencilSimple" | "percent" | "plus" | "printer" | "pulse" | "pushPin" | "puzzlePiece" | "question" | "receipt" | "rocketLaunch" | "seal" | "shapes" | "shield" | "shoppingBag" | "signOut" | "slackLogo" | "sliders" | "squaresFour" | "stack" | "ticket" | "trash" | "treeStructure" | "truck" | "tShirt" | "upload" | "user" | "userCircle" | "userRectangle" | "users" | "warehouse" | "warningCircle" | "webhooksLogo" | "xCircle" | undefined;
|
|
30
31
|
text: ReactNode;
|
|
31
32
|
} | undefined;
|
|
32
|
-
feedback?: Omit<import(
|
|
33
|
+
feedback?: Omit<import('../InputFeedback').InputFeedbackProps, "className"> | undefined;
|
|
33
34
|
delayMs?: number | undefined;
|
|
34
35
|
isLoading?: boolean | undefined;
|
|
35
36
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputWrapperBaseProps } from '../internals/InputWrapper';
|
|
2
|
+
|
|
3
3
|
export type InputReadonlyProps = InputWrapperBaseProps & {
|
|
4
4
|
/**
|
|
5
5
|
* Optional CSS class names used for the outer wrapper/container element
|
|
@@ -27,9 +27,9 @@ export declare const InputReadonly: import('../atoms/SkeletonTemplate').Skeleton
|
|
|
27
27
|
label?: string | undefined;
|
|
28
28
|
hint?: {
|
|
29
29
|
icon?: "download" | "package" | "tag" | "list" | "warning" | "info" | "x" | "appWindow" | "arrowBendDownRight" | "arrowCircleDown" | "arrowCircleUp" | "arrowClockwise" | "arrowDown" | "arrowLeft" | "arrowRight" | "arrowsLeftRight" | "arrowSquareOut" | "arrowUpRight" | "arrowUUpLeft" | "asteriskSimple" | "bookOpenText" | "bracketsCurly" | "buildings" | "calendarBlank" | "calendarCheck" | "camera" | "caretDown" | "caretRight" | "chat" | "chatCircle" | "check" | "clipboardText" | "cloudArrowUp" | "creditCard" | "currencyEur" | "dotsThree" | "eye" | "flag" | "folderOpen" | "funnelSimple" | "gearFine" | "gift" | "gitFork" | "githubLogo" | "globeSimple" | "googleLogo" | "hourglass" | "houseSimple" | "lifebuoy" | "lightbulbFilament" | "linkSimple" | "lockSimple" | "lockSimpleOpen" | "magnifyingGlass" | "megaphoneSimple" | "minus" | "minusCircle" | "pencilSimple" | "percent" | "plus" | "printer" | "pulse" | "pushPin" | "puzzlePiece" | "question" | "receipt" | "rocketLaunch" | "seal" | "shapes" | "shield" | "shoppingBag" | "signOut" | "slackLogo" | "sliders" | "squaresFour" | "stack" | "ticket" | "trash" | "treeStructure" | "truck" | "tShirt" | "upload" | "user" | "userCircle" | "userRectangle" | "users" | "warehouse" | "warningCircle" | "webhooksLogo" | "xCircle" | undefined;
|
|
30
|
-
text: import(
|
|
30
|
+
text: import('react').ReactNode;
|
|
31
31
|
} | undefined;
|
|
32
|
-
feedback?: Omit<import(
|
|
32
|
+
feedback?: Omit<import('./InputFeedback').InputFeedbackProps, "className"> | undefined;
|
|
33
33
|
inline?: boolean | undefined;
|
|
34
34
|
wrapperClassName?: string | undefined;
|
|
35
35
|
inputClassName?: string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputResourceGroupProps } from './InputResourceGroup';
|
|
2
|
+
|
|
3
3
|
export interface HookedInputResourceGroupProps extends Omit<InputResourceGroupProps, 'onChange' | 'defaultValues'> {
|
|
4
4
|
/**
|
|
5
5
|
* field name to match hook-form state
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { FullListProps } from './FullList';
|
|
2
|
+
import { QueryFilter } from '@commercelayer/sdk/lib/cjs/query';
|
|
3
|
+
|
|
4
4
|
export interface InputResourceGroupProps extends Omit<FullListProps, 'totalCount'> {
|
|
5
5
|
/**
|
|
6
6
|
* Number of item to be shown in the preview list
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
|
|
2
|
+
import { CommerceLayerClient } from '@commercelayer/sdk';
|
|
3
|
+
|
|
3
4
|
export declare function useToggleCheckboxValues(defaultValues: string[]): {
|
|
4
5
|
values: string[];
|
|
5
6
|
toggleValue: (value: string) => void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { InputSelectProps, InputSelectValue } from './InputSelect';
|
|
2
|
+
import { SetRequired } from 'type-fest';
|
|
3
|
+
import { GroupBase, SelectInstance, StylesConfig } from 'react-select';
|
|
4
|
+
|
|
5
5
|
interface AsyncSelectComponentProps extends Omit<SetRequired<InputSelectProps, 'loadAsyncValues'>, 'label' | 'hint'> {
|
|
6
6
|
styles: StylesConfig<InputSelectValue>;
|
|
7
7
|
}
|
|
8
|
-
export declare const AsyncSelectComponent: import(
|
|
8
|
+
export declare const AsyncSelectComponent: import('react').ForwardRefExoticComponent<AsyncSelectComponentProps & import('react').RefAttributes<SelectInstance<InputSelectValue, boolean, GroupBase<InputSelectValue>>>>;
|
|
9
9
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputSelectProps } from './InputSelect';
|
|
2
|
+
|
|
3
3
|
export interface HookedInputSelectProps extends Omit<InputSelectProps, 'onSelect' | 'defaultValue'> {
|
|
4
4
|
/**
|
|
5
5
|
* field name to match hook-form state
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { GroupBase, MultiValue, Options, SelectInstance, SingleValue } from 'react-select';
|
|
2
|
+
import { FocusEventHandler } from 'react';
|
|
3
|
+
import { InputWrapperBaseProps } from '../../internals/InputWrapper';
|
|
4
|
+
|
|
4
5
|
export type GroupedSelectValues = Array<{
|
|
5
6
|
label: string;
|
|
6
7
|
options: InputSelectValue[];
|
|
@@ -102,4 +103,4 @@ export interface InputSelectProps extends InputWrapperBaseProps {
|
|
|
102
103
|
* On both standard and async mode it can be set to select a single single value or multiple values.
|
|
103
104
|
*
|
|
104
105
|
*/
|
|
105
|
-
export declare const InputSelect: import(
|
|
106
|
+
export declare const InputSelect: import('react').ForwardRefExoticComponent<InputSelectProps & import('react').RefAttributes<SelectInstance<InputSelectValue, boolean, GroupBase<InputSelectValue>>>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { InputSelectProps, InputSelectValue } from './InputSelect';
|
|
2
|
+
import { GroupBase, SelectInstance, StylesConfig } from 'react-select';
|
|
3
|
+
|
|
4
4
|
interface SelectComponentProps extends Omit<InputSelectProps, 'loadAsyncValues' | 'label' | 'hint'> {
|
|
5
5
|
styles: StylesConfig<InputSelectValue>;
|
|
6
6
|
}
|
|
7
|
-
export declare const SelectComponent: import(
|
|
7
|
+
export declare const SelectComponent: import('react').ForwardRefExoticComponent<SelectComponentProps & import('react').RefAttributes<SelectInstance<InputSelectValue, boolean, GroupBase<InputSelectValue>>>>;
|
|
8
8
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { InputSelectValue } from '.';
|
|
2
|
+
import { ClearIndicatorProps, DropdownIndicatorProps, GroupBase, MultiValueGenericProps } from 'react-select';
|
|
3
|
+
|
|
4
4
|
declare function DropdownIndicator(props: DropdownIndicatorProps<InputSelectValue>): JSX.Element;
|
|
5
5
|
declare function ClearIndicator(props: ClearIndicatorProps<InputSelectValue>): JSX.Element;
|
|
6
6
|
declare function MultiValueContainer(props: MultiValueGenericProps<MultiValueGenericProps<InputSelectValue, boolean, GroupBase<InputSelectValue>>>): JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { InputSelectValue } from '.';
|
|
2
|
+
import { StylesConfig } from 'react-select';
|
|
3
|
+
import { InputFeedbackProps } from '../InputFeedback';
|
|
4
|
+
|
|
4
5
|
export declare const getSelectStyles: (feedbackVariant?: InputFeedbackProps['variant']) => StylesConfig<InputSelectValue>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GroupedSelectValues, InputSelectValue, PossibleSelectValue } from './InputSelect';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* Helper function to understand and refine type of a single selected value
|
|
4
5
|
* @param selectedValue possible value returned from select component
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputSimpleSelectProps } from './InputSimpleSelect';
|
|
2
|
+
|
|
3
3
|
export interface HookedInputSimpleSelectProps extends InputSimpleSelectProps {
|
|
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
|
interface InputSimpleSelectOption {
|
|
4
4
|
value: string;
|
|
5
5
|
label: string;
|
|
@@ -9,5 +9,5 @@ export interface InputSimpleSelectProps extends InputWrapperBaseProps, Omit<Reac
|
|
|
9
9
|
options: InputSimpleSelectOption[];
|
|
10
10
|
className?: string;
|
|
11
11
|
}
|
|
12
|
-
export declare const InputSimpleSelect: import(
|
|
12
|
+
export declare const InputSimpleSelect: import('react').ForwardRefExoticComponent<InputSimpleSelectProps & import('react').RefAttributes<HTMLSelectElement>>;
|
|
13
13
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InputSpinnerProps } from './InputSpinner';
|
|
2
|
+
|
|
3
3
|
export interface HookedInputSpinnerProps extends Omit<InputSpinnerProps, 'onChange' | 'defaultValues'> {
|
|
4
4
|
/**
|
|
5
5
|
* field name to match hook-form state
|