@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.
Files changed (127) hide show
  1. package/dist/{Async-a8cbdb5b.js → Async-566ec3f7.js} +3 -3
  2. package/dist/{InputDateComponent-a8c34dc1.js → InputDateComponent-4461b3e6.js} +3 -3
  3. package/dist/{Select-e581ae99.js → Select-89937223.js} +3 -3
  4. package/dist/helpers/appsNavigation.d.ts +1 -1
  5. package/dist/{main-dd440dc6.js → main-795be39b.js} +7119 -7022
  6. package/dist/main.d.ts +22 -38
  7. package/dist/main.js +97 -97
  8. package/dist/mocks/setup.d.ts +3 -0
  9. package/dist/{overrides-0673bab0.js → overrides-346bb0f6.js} +621 -618
  10. package/dist/providers/TokenProvider/TokenProvider.d.ts +15 -11
  11. package/dist/providers/TokenProvider/getInfoFromJwt.d.ts +3 -2
  12. package/dist/providers/TokenProvider/url.d.ts +3 -2
  13. package/dist/providers/TokenProvider/validateToken.d.ts +6 -1
  14. package/dist/style.css +1 -1
  15. package/dist/ui/atoms/Section.d.ts +31 -0
  16. package/dist/ui/atoms/Table/Table.d.ts +21 -0
  17. package/dist/ui/atoms/Table/Td.d.ts +8 -0
  18. package/dist/ui/atoms/{tables → Table}/index.d.ts +3 -2
  19. package/dist/ui/{lists → composite}/ListDetails.d.ts +1 -1
  20. package/dist/ui/composite/TableData.d.ts +23 -0
  21. package/dist/ui/forms/Form/index.d.ts +1 -0
  22. package/dist/ui/{hook-form → forms/Input}/HookedInput.d.ts +4 -4
  23. package/dist/ui/forms/{Input.d.ts → Input/Input.d.ts} +2 -3
  24. package/dist/ui/forms/Input/index.d.ts +2 -0
  25. package/dist/ui/{hook-form → forms/InputCheckbox}/HookedInputCheckbox.d.ts +4 -4
  26. package/dist/ui/forms/{InputCheckbox.d.ts → InputCheckbox/InputCheckbox.d.ts} +2 -2
  27. package/dist/ui/forms/InputCheckbox/index.d.ts +2 -0
  28. package/dist/ui/forms/InputCheckboxGroup.d.ts +2 -3
  29. package/dist/ui/{hook-form → forms/InputCurrency}/HookedInputCurrency.d.ts +4 -4
  30. package/dist/ui/forms/InputCurrency/InputCurrency.d.ts +48 -0
  31. package/dist/ui/forms/InputCurrency/index.d.ts +3 -58
  32. package/dist/ui/forms/InputCurrency/utils.d.ts +10 -0
  33. package/dist/ui/forms/InputCurrencyRange.d.ts +8 -5
  34. package/dist/ui/{hook-form → forms/InputDate}/HookedInputDate.d.ts +4 -4
  35. package/dist/ui/forms/InputDate/InputDate.d.ts +4 -0
  36. package/dist/ui/forms/InputDate/InputDateComponent.d.ts +1 -2
  37. package/dist/ui/forms/InputDate/index.d.ts +2 -5
  38. package/dist/ui/{hook-form → forms/InputDateRange}/HookedInputDateRange.d.ts +4 -4
  39. package/dist/ui/forms/{InputDateRange.d.ts → InputDateRange/InputDateRange.d.ts} +3 -4
  40. package/dist/ui/forms/InputDateRange/index.d.ts +2 -0
  41. package/dist/ui/forms/InputFeedback.d.ts +2 -3
  42. package/dist/ui/forms/InputFile.d.ts +6 -2
  43. package/dist/ui/forms/InputJson.d.ts +2 -3
  44. package/dist/ui/{hook-form → forms/InputMetadata}/HookedInputMetadata.d.ts +3 -3
  45. package/dist/ui/forms/InputMetadata/index.d.ts +1 -0
  46. package/dist/ui/forms/InputRadioGroup.d.ts +9 -4
  47. package/dist/ui/forms/InputReadonly.d.ts +3 -3
  48. package/dist/ui/{resources/RelationshipSelector → forms/InputResourceGroup}/Checkbox.d.ts +1 -1
  49. package/dist/ui/forms/InputResourceGroup/HookedInputResourceGroup.d.ts +15 -0
  50. package/dist/ui/forms/InputResourceGroup/InputResourceGroup.d.ts +28 -0
  51. package/dist/ui/forms/InputResourceGroup/index.d.ts +2 -0
  52. package/dist/ui/forms/InputSelect/Async.d.ts +1 -1
  53. package/dist/ui/{hook-form → forms/InputSelect}/HookedInputSelect.d.ts +4 -4
  54. package/dist/ui/forms/InputSelect/InputSelect.d.ts +91 -0
  55. package/dist/ui/forms/InputSelect/Select.d.ts +1 -1
  56. package/dist/ui/forms/InputSelect/index.d.ts +2 -91
  57. package/dist/ui/forms/InputSimpleSelect/HookedInputSimpleSelect.d.ts +21 -0
  58. package/dist/ui/forms/InputSimpleSelect/InputSimpleSelect.d.ts +12 -0
  59. package/dist/ui/forms/InputSimpleSelect/index.d.ts +2 -0
  60. package/dist/ui/{hook-form → forms/InputSpinner}/HookedInputSpinner.d.ts +4 -4
  61. package/dist/ui/forms/{InputSpinner.d.ts → InputSpinner/InputSpinner.d.ts} +2 -3
  62. package/dist/ui/forms/InputSpinner/index.d.ts +2 -0
  63. package/dist/ui/{hook-form/HookedInputToggleBox.d.ts → forms/InputSwitch/HookedInputSwitch.d.ts} +6 -6
  64. package/dist/ui/forms/InputSwitch/InputSwitch.d.ts +5 -0
  65. package/dist/ui/forms/InputSwitch/index.d.ts +2 -0
  66. package/dist/ui/forms/InputTextArea.d.ts +2 -2
  67. package/dist/ui/forms/InputToggleButton/HookedInputToggleButton.d.ts +18 -0
  68. package/dist/ui/forms/{ToggleButtons.d.ts → InputToggleButton/InputToggleButton.d.ts} +7 -6
  69. package/dist/ui/forms/InputToggleButton/index.d.ts +2 -0
  70. package/dist/ui/forms/Label.d.ts +6 -3
  71. package/dist/ui/forms/Legend.d.ts +14 -0
  72. package/dist/ui/{hook-form → forms/ReactHookForm}/HookedValidationApiError.d.ts +3 -3
  73. package/dist/ui/{hook-form → forms/ReactHookForm}/HookedValidationError.d.ts +3 -3
  74. package/dist/ui/forms/ReactHookForm/index.d.ts +4 -0
  75. package/dist/ui/{hook-form → forms/ReactHookForm}/useValidationFeedback.d.ts +1 -1
  76. package/dist/ui/internals/InputWrapper.d.ts +6 -1
  77. package/dist/ui/resources/Filters/types.d.ts +4 -4
  78. package/dist/ui/resources/Filters/useFilters.d.ts +2 -1
  79. package/dist/ui/resources/ResourceList/ResourceList.d.ts +64 -0
  80. package/dist/ui/resources/ResourceList/index.d.ts +1 -45
  81. package/dist/{unsupportedIterableToArray-0f93b40f.js → unsupportedIterableToArray-a3020d44.js} +1 -1
  82. package/dist/utils/children.d.ts +4 -3
  83. package/dist/utils/extractHeaders.d.ts +2 -1
  84. package/dist/utils/text.d.ts +8 -1
  85. package/package.json +26 -26
  86. package/dist/ui/atoms/Legend.d.ts +0 -32
  87. package/dist/ui/atoms/tables/Td.d.ts +0 -9
  88. package/dist/ui/forms/InputToggleBox.d.ts +0 -9
  89. package/dist/ui/forms/InputToggleListBox.d.ts +0 -15
  90. package/dist/ui/forms/RadioButtons.d.ts +0 -19
  91. package/dist/ui/hook-form/HookedInputToggleListBox.d.ts +0 -21
  92. package/dist/ui/hook-form/HookedRelationshipSelector.d.ts +0 -18
  93. package/dist/ui/hook-form/HookedToggleButtons.d.ts +0 -18
  94. package/dist/ui/resources/RelationshipSelector/index.d.ts +0 -26
  95. package/dist/ui/resources/ResourceList/index.test.d.ts +0 -1
  96. package/dist/ui/tables/Table.d.ts +0 -10
  97. package/dist/ui/tables/TableData.d.ts +0 -14
  98. package/dist/utils/tests.d.ts +0 -1
  99. /package/dist/ui/atoms/{Legend.test.d.ts → Section.test.d.ts} +0 -0
  100. /package/dist/ui/{tables → atoms/Table}/Table.test.d.ts +0 -0
  101. /package/dist/ui/atoms/{tables → Table}/Th.d.ts +0 -0
  102. /package/dist/ui/atoms/{tables → Table}/Tr.d.ts +0 -0
  103. /package/dist/ui/{lists → composite}/List.d.ts +0 -0
  104. /package/dist/ui/{lists → composite}/List.test.d.ts +0 -0
  105. /package/dist/ui/{lists → composite}/ListDetails.test.d.ts +0 -0
  106. /package/dist/ui/{lists → composite}/ListDetailsItem.d.ts +0 -0
  107. /package/dist/ui/{lists → composite}/ListDetailsItem.test.d.ts +0 -0
  108. /package/dist/ui/{lists → composite}/ListItem.d.ts +0 -0
  109. /package/dist/ui/{lists → composite}/ListItem.test.d.ts +0 -0
  110. /package/dist/ui/{tables → composite}/TableData.test.d.ts +0 -0
  111. /package/dist/ui/{hook-form → forms/Form}/HookedForm.d.ts +0 -0
  112. /package/dist/ui/forms/{Input.test.d.ts → Input/Input.test.d.ts} +0 -0
  113. /package/dist/ui/forms/{InputCheckbox.test.d.ts → InputCheckbox/InputCheckbox.test.d.ts} +0 -0
  114. /package/dist/ui/forms/InputCurrency/{index.test.d.ts → InputCurrency.test.d.ts} +0 -0
  115. /package/dist/ui/forms/InputDate/{InputDate.test.d.ts → InputDateComponent.test.d.ts} +0 -0
  116. /package/dist/ui/forms/{InputDateRange.test.d.ts → InputDateRange/InputDateRange.test.d.ts} +0 -0
  117. /package/dist/ui/{resources/RelationshipSelector → forms/InputResourceGroup}/FullList.d.ts +0 -0
  118. /package/dist/ui/{resources/RelationshipSelector → forms/InputResourceGroup}/utils.d.ts +0 -0
  119. /package/dist/ui/{resources/RelationshipSelector → forms/InputResourceGroup}/utils.test.d.ts +0 -0
  120. /package/dist/ui/forms/InputSelect/{index.test.d.ts → InputSelect.test.d.ts} +0 -0
  121. /package/dist/ui/forms/{InputSpinner.test.d.ts → InputSimpleSelect/InputSimpleSelect.test.d.ts} +0 -0
  122. /package/dist/ui/forms/{InputToggleBox.test.d.ts → InputSpinner/InputSpinner.test.d.ts} +0 -0
  123. /package/dist/ui/forms/{InputToggleListBox.test.d.ts → InputSwitch/InputSwitch.test.d.ts} +0 -0
  124. /package/dist/ui/forms/{RadioButtons.test.d.ts → InputToggleButton/InputToggleButton.test.d.ts} +0 -0
  125. /package/dist/ui/{hook-form → forms/ReactHookForm}/setApiFormErrors.d.ts +0 -0
  126. /package/dist/ui/{hook-form → forms/ReactHookForm}/setApiFormErrors.test.d.ts +0 -0
  127. /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 };
@@ -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