@commercelayer/app-elements 0.0.80 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Async-a8cbdb5b.js → Async-566ec3f7.js} +3 -3
- package/dist/{InputDateComponent-a8c34dc1.js → InputDateComponent-4461b3e6.js} +3 -3
- package/dist/{Select-e581ae99.js → Select-89937223.js} +3 -3
- package/dist/helpers/appsNavigation.d.ts +1 -1
- package/dist/{main-dd440dc6.js → main-795be39b.js} +7119 -7022
- package/dist/main.d.ts +22 -38
- package/dist/main.js +97 -97
- package/dist/mocks/setup.d.ts +3 -0
- package/dist/{overrides-0673bab0.js → overrides-346bb0f6.js} +621 -618
- package/dist/providers/TokenProvider/TokenProvider.d.ts +15 -11
- package/dist/providers/TokenProvider/getInfoFromJwt.d.ts +3 -2
- package/dist/providers/TokenProvider/url.d.ts +3 -2
- package/dist/providers/TokenProvider/validateToken.d.ts +6 -1
- package/dist/style.css +1 -1
- package/dist/ui/atoms/Section.d.ts +31 -0
- package/dist/ui/atoms/Table/Table.d.ts +21 -0
- package/dist/ui/atoms/Table/Td.d.ts +8 -0
- package/dist/ui/atoms/{tables → Table}/index.d.ts +3 -2
- package/dist/ui/{lists → composite}/ListDetails.d.ts +1 -1
- package/dist/ui/composite/TableData.d.ts +23 -0
- package/dist/ui/forms/Form/index.d.ts +1 -0
- package/dist/ui/{hook-form → forms/Input}/HookedInput.d.ts +4 -4
- package/dist/ui/forms/{Input.d.ts → Input/Input.d.ts} +2 -3
- package/dist/ui/forms/Input/index.d.ts +2 -0
- package/dist/ui/{hook-form → forms/InputCheckbox}/HookedInputCheckbox.d.ts +4 -4
- package/dist/ui/forms/{InputCheckbox.d.ts → InputCheckbox/InputCheckbox.d.ts} +2 -2
- package/dist/ui/forms/InputCheckbox/index.d.ts +2 -0
- package/dist/ui/forms/InputCheckboxGroup.d.ts +2 -3
- package/dist/ui/{hook-form → forms/InputCurrency}/HookedInputCurrency.d.ts +4 -4
- package/dist/ui/forms/InputCurrency/InputCurrency.d.ts +48 -0
- package/dist/ui/forms/InputCurrency/index.d.ts +3 -58
- package/dist/ui/forms/InputCurrency/utils.d.ts +10 -0
- package/dist/ui/forms/InputCurrencyRange.d.ts +8 -5
- package/dist/ui/{hook-form → forms/InputDate}/HookedInputDate.d.ts +4 -4
- package/dist/ui/forms/InputDate/InputDate.d.ts +4 -0
- package/dist/ui/forms/InputDate/InputDateComponent.d.ts +1 -2
- package/dist/ui/forms/InputDate/index.d.ts +2 -5
- package/dist/ui/{hook-form → forms/InputDateRange}/HookedInputDateRange.d.ts +4 -4
- package/dist/ui/forms/{InputDateRange.d.ts → InputDateRange/InputDateRange.d.ts} +3 -4
- package/dist/ui/forms/InputDateRange/index.d.ts +2 -0
- package/dist/ui/forms/InputFeedback.d.ts +2 -3
- package/dist/ui/forms/InputFile.d.ts +6 -2
- package/dist/ui/forms/InputJson.d.ts +2 -3
- package/dist/ui/{hook-form → forms/InputMetadata}/HookedInputMetadata.d.ts +3 -3
- package/dist/ui/forms/InputMetadata/index.d.ts +1 -0
- package/dist/ui/forms/InputRadioGroup.d.ts +9 -4
- package/dist/ui/forms/InputReadonly.d.ts +3 -3
- package/dist/ui/{resources/RelationshipSelector → forms/InputResourceGroup}/Checkbox.d.ts +1 -1
- package/dist/ui/forms/InputResourceGroup/HookedInputResourceGroup.d.ts +15 -0
- package/dist/ui/forms/InputResourceGroup/InputResourceGroup.d.ts +28 -0
- package/dist/ui/forms/InputResourceGroup/index.d.ts +2 -0
- package/dist/ui/forms/InputSelect/Async.d.ts +1 -1
- package/dist/ui/{hook-form → forms/InputSelect}/HookedInputSelect.d.ts +4 -4
- package/dist/ui/forms/InputSelect/InputSelect.d.ts +91 -0
- package/dist/ui/forms/InputSelect/Select.d.ts +1 -1
- package/dist/ui/forms/InputSelect/index.d.ts +2 -91
- package/dist/ui/forms/InputSimpleSelect/HookedInputSimpleSelect.d.ts +21 -0
- package/dist/ui/forms/InputSimpleSelect/InputSimpleSelect.d.ts +12 -0
- package/dist/ui/forms/InputSimpleSelect/index.d.ts +2 -0
- package/dist/ui/{hook-form → forms/InputSpinner}/HookedInputSpinner.d.ts +4 -4
- package/dist/ui/forms/{InputSpinner.d.ts → InputSpinner/InputSpinner.d.ts} +2 -3
- package/dist/ui/forms/InputSpinner/index.d.ts +2 -0
- package/dist/ui/{hook-form/HookedInputToggleBox.d.ts → forms/InputSwitch/HookedInputSwitch.d.ts} +6 -6
- package/dist/ui/forms/InputSwitch/InputSwitch.d.ts +5 -0
- package/dist/ui/forms/InputSwitch/index.d.ts +2 -0
- package/dist/ui/forms/InputTextArea.d.ts +2 -2
- package/dist/ui/forms/InputToggleButton/HookedInputToggleButton.d.ts +18 -0
- package/dist/ui/forms/{ToggleButtons.d.ts → InputToggleButton/InputToggleButton.d.ts} +7 -6
- package/dist/ui/forms/InputToggleButton/index.d.ts +2 -0
- package/dist/ui/forms/Label.d.ts +6 -3
- package/dist/ui/forms/Legend.d.ts +14 -0
- package/dist/ui/{hook-form → forms/ReactHookForm}/HookedValidationApiError.d.ts +3 -3
- package/dist/ui/{hook-form → forms/ReactHookForm}/HookedValidationError.d.ts +3 -3
- package/dist/ui/forms/ReactHookForm/index.d.ts +4 -0
- package/dist/ui/{hook-form → forms/ReactHookForm}/useValidationFeedback.d.ts +1 -1
- package/dist/ui/internals/InputWrapper.d.ts +6 -1
- package/dist/ui/resources/Filters/types.d.ts +4 -4
- package/dist/ui/resources/Filters/useFilters.d.ts +2 -1
- package/dist/ui/resources/ResourceList/ResourceList.d.ts +64 -0
- package/dist/ui/resources/ResourceList/index.d.ts +1 -45
- package/dist/{unsupportedIterableToArray-0f93b40f.js → unsupportedIterableToArray-a3020d44.js} +1 -1
- package/dist/utils/children.d.ts +4 -3
- package/dist/utils/extractHeaders.d.ts +2 -1
- package/dist/utils/text.d.ts +8 -1
- package/package.json +26 -26
- package/dist/ui/atoms/Legend.d.ts +0 -32
- package/dist/ui/atoms/tables/Td.d.ts +0 -9
- package/dist/ui/forms/InputToggleBox.d.ts +0 -9
- package/dist/ui/forms/InputToggleListBox.d.ts +0 -15
- package/dist/ui/forms/RadioButtons.d.ts +0 -19
- package/dist/ui/hook-form/HookedInputToggleListBox.d.ts +0 -21
- package/dist/ui/hook-form/HookedRelationshipSelector.d.ts +0 -18
- package/dist/ui/hook-form/HookedToggleButtons.d.ts +0 -18
- package/dist/ui/resources/RelationshipSelector/index.d.ts +0 -26
- package/dist/ui/resources/ResourceList/index.test.d.ts +0 -1
- package/dist/ui/tables/Table.d.ts +0 -10
- package/dist/ui/tables/TableData.d.ts +0 -14
- package/dist/utils/tests.d.ts +0 -1
- /package/dist/ui/atoms/{Legend.test.d.ts → Section.test.d.ts} +0 -0
- /package/dist/ui/{tables → atoms/Table}/Table.test.d.ts +0 -0
- /package/dist/ui/atoms/{tables → Table}/Th.d.ts +0 -0
- /package/dist/ui/atoms/{tables → Table}/Tr.d.ts +0 -0
- /package/dist/ui/{lists → composite}/List.d.ts +0 -0
- /package/dist/ui/{lists → composite}/List.test.d.ts +0 -0
- /package/dist/ui/{lists → composite}/ListDetails.test.d.ts +0 -0
- /package/dist/ui/{lists → composite}/ListDetailsItem.d.ts +0 -0
- /package/dist/ui/{lists → composite}/ListDetailsItem.test.d.ts +0 -0
- /package/dist/ui/{lists → composite}/ListItem.d.ts +0 -0
- /package/dist/ui/{lists → composite}/ListItem.test.d.ts +0 -0
- /package/dist/ui/{tables → composite}/TableData.test.d.ts +0 -0
- /package/dist/ui/{hook-form → forms/Form}/HookedForm.d.ts +0 -0
- /package/dist/ui/forms/{Input.test.d.ts → Input/Input.test.d.ts} +0 -0
- /package/dist/ui/forms/{InputCheckbox.test.d.ts → InputCheckbox/InputCheckbox.test.d.ts} +0 -0
- /package/dist/ui/forms/InputCurrency/{index.test.d.ts → InputCurrency.test.d.ts} +0 -0
- /package/dist/ui/forms/InputDate/{InputDate.test.d.ts → InputDateComponent.test.d.ts} +0 -0
- /package/dist/ui/forms/{InputDateRange.test.d.ts → InputDateRange/InputDateRange.test.d.ts} +0 -0
- /package/dist/ui/{resources/RelationshipSelector → forms/InputResourceGroup}/FullList.d.ts +0 -0
- /package/dist/ui/{resources/RelationshipSelector → forms/InputResourceGroup}/utils.d.ts +0 -0
- /package/dist/ui/{resources/RelationshipSelector → forms/InputResourceGroup}/utils.test.d.ts +0 -0
- /package/dist/ui/forms/InputSelect/{index.test.d.ts → InputSelect.test.d.ts} +0 -0
- /package/dist/ui/forms/{InputSpinner.test.d.ts → InputSimpleSelect/InputSimpleSelect.test.d.ts} +0 -0
- /package/dist/ui/forms/{InputToggleBox.test.d.ts → InputSpinner/InputSpinner.test.d.ts} +0 -0
- /package/dist/ui/forms/{InputToggleListBox.test.d.ts → InputSwitch/InputSwitch.test.d.ts} +0 -0
- /package/dist/ui/forms/{RadioButtons.test.d.ts → InputToggleButton/InputToggleButton.test.d.ts} +0 -0
- /package/dist/ui/{hook-form → forms/ReactHookForm}/setApiFormErrors.d.ts +0 -0
- /package/dist/ui/{hook-form → forms/ReactHookForm}/setApiFormErrors.test.d.ts +0 -0
- /package/dist/ui/{forms/ToggleButtons.test.d.ts → resources/ResourceList/ResourceList.test.d.ts} +0 -0
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type InputWrapperBaseProps } from '../internals/InputWrapper';
|
|
2
|
-
import { type InputHTMLAttributes } from 'react';
|
|
3
|
-
export type RadioOptionValue = string | number | boolean;
|
|
4
|
-
export interface RadioOption {
|
|
5
|
-
value: RadioOptionValue;
|
|
6
|
-
label: string;
|
|
7
|
-
}
|
|
8
|
-
export interface RadioButtonsProps extends InputWrapperBaseProps {
|
|
9
|
-
id: string;
|
|
10
|
-
options: RadioOption[];
|
|
11
|
-
value?: RadioOptionValue;
|
|
12
|
-
onChange: (value: RadioOptionValue) => void;
|
|
13
|
-
className?: string;
|
|
14
|
-
onBlur?: InputHTMLAttributes<HTMLInputElement>['onBlur'];
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated
|
|
18
|
-
*/
|
|
19
|
-
export declare const RadioButtons: import("react").ForwardRefExoticComponent<RadioButtonsProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { type InputToggleListBoxProps } from '../forms/InputToggleListBox';
|
|
3
|
-
interface Props extends InputToggleListBoxProps {
|
|
4
|
-
/**
|
|
5
|
-
* field name to match hook-form state
|
|
6
|
-
*/
|
|
7
|
-
name: string;
|
|
8
|
-
/**
|
|
9
|
-
* show validation error message underneath
|
|
10
|
-
*/
|
|
11
|
-
showValidation?: boolean;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* `InputToggleListBox` component ready to be used with the `react-hook-form` context.
|
|
15
|
-
* @see InputToggleListBox
|
|
16
|
-
*/
|
|
17
|
-
declare function HookedInputToggleListBox({ name, showValidation, ...props }: Props): JSX.Element;
|
|
18
|
-
declare namespace HookedInputToggleListBox {
|
|
19
|
-
var displayName: string;
|
|
20
|
-
}
|
|
21
|
-
export { HookedInputToggleListBox };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { type RelationshipSelectorProps } from '../resources/RelationshipSelector';
|
|
3
|
-
interface Props extends Omit<RelationshipSelectorProps, 'onChange' | 'defaultValues'> {
|
|
4
|
-
/**
|
|
5
|
-
* field name to match hook-form state
|
|
6
|
-
*/
|
|
7
|
-
name: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* `RelationshipSelector` component ready to be used with the `react-hook-form` context.
|
|
11
|
-
* Since it will perform api requests to fetch list of options, it also needs to access `CoreSdkProvider` context.
|
|
12
|
-
* @see RelationshipSelector
|
|
13
|
-
*/
|
|
14
|
-
declare function HookedRelationshipSelector({ name, ...props }: Props): JSX.Element;
|
|
15
|
-
declare namespace HookedRelationshipSelector {
|
|
16
|
-
var displayName: string;
|
|
17
|
-
}
|
|
18
|
-
export { HookedRelationshipSelector };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { type ToggleButtonsProps } from '../forms/ToggleButtons';
|
|
3
|
-
type Props = Omit<ToggleButtonsProps, 'value' | 'onChange'> & {
|
|
4
|
-
/**
|
|
5
|
-
* field name to match hook-form state
|
|
6
|
-
*/
|
|
7
|
-
name: string;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* `ToggleButtons` component ready to be used with the `react-hook-form` context.
|
|
11
|
-
* Stored value will be a string when used as `mode="single"` or an array of strings when `mode="multiple"`.
|
|
12
|
-
* @see ToggleButtons
|
|
13
|
-
*/
|
|
14
|
-
declare function HookedToggleButtons({ name, ...props }: Props): JSX.Element;
|
|
15
|
-
declare namespace HookedToggleButtons {
|
|
16
|
-
var displayName: string;
|
|
17
|
-
}
|
|
18
|
-
export { HookedToggleButtons };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { type QueryFilter } from '@commercelayer/sdk/lib/cjs/query';
|
|
3
|
-
import { type FullListProps } from './FullList';
|
|
4
|
-
export interface RelationshipSelectorProps extends Omit<FullListProps, 'totalCount'> {
|
|
5
|
-
/**
|
|
6
|
-
* Number of item to be shown in the preview list
|
|
7
|
-
* @default 5
|
|
8
|
-
*/
|
|
9
|
-
previewLimit?: number;
|
|
10
|
-
/**
|
|
11
|
-
* SDK filter query to be applied when fetching the list of resources
|
|
12
|
-
*/
|
|
13
|
-
filters?: QueryFilter;
|
|
14
|
-
/**
|
|
15
|
-
* Hide the component when there is only one item.
|
|
16
|
-
*/
|
|
17
|
-
hideWhenSingleItem?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Show icon in checkbox selectors
|
|
20
|
-
*/
|
|
21
|
-
showCheckboxIcon?: boolean;
|
|
22
|
-
}
|
|
23
|
-
export declare function RelationshipSelector({ defaultValues, fieldForLabel, fieldForValue, previewLimit, onChange, resource, searchBy, sortBy, filters, hideWhenSingleItem, showCheckboxIcon, title }: RelationshipSelectorProps): JSX.Element;
|
|
24
|
-
export declare namespace RelationshipSelector {
|
|
25
|
-
var displayName: string;
|
|
26
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface Props extends React.TableHTMLAttributes<HTMLTableElement> {
|
|
3
|
-
thead?: React.ReactNode;
|
|
4
|
-
tbody?: React.ReactNode;
|
|
5
|
-
}
|
|
6
|
-
declare function Table({ thead, tbody, className, ...rest }: Props): JSX.Element;
|
|
7
|
-
declare namespace Table {
|
|
8
|
-
var displayName: string;
|
|
9
|
-
}
|
|
10
|
-
export { Table };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface TableDataProps {
|
|
3
|
-
data: Array<Record<string, string | Record<string, unknown>>>;
|
|
4
|
-
className?: string;
|
|
5
|
-
limit?: number;
|
|
6
|
-
title?: string;
|
|
7
|
-
showTotal?: boolean;
|
|
8
|
-
showOthers?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare function TableData({ data, className, limit, title, showTotal, showOthers, ...rest }: TableDataProps): JSX.Element;
|
|
11
|
-
declare namespace TableData {
|
|
12
|
-
var displayName: string;
|
|
13
|
-
}
|
|
14
|
-
export { TableData };
|
package/dist/utils/tests.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function testInvariant(testFn: () => void, expectedInvariant: string): void;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/ui/{resources/RelationshipSelector → forms/InputResourceGroup}/utils.test.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/ui/forms/{InputSpinner.test.d.ts → InputSimpleSelect/InputSimpleSelect.test.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/ui/forms/{RadioButtons.test.d.ts → InputToggleButton/InputToggleButton.test.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/ui/{forms/ToggleButtons.test.d.ts → resources/ResourceList/ResourceList.test.d.ts}
RENAMED
|
File without changes
|