@commercelayer/app-elements 0.0.79 → 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-2e9c3da2.js → Async-566ec3f7.js} +3 -3
- package/dist/{InputDateComponent-fe3ffd00.js → InputDateComponent-4461b3e6.js} +3 -3
- package/dist/{Select-be90391b.js → Select-89937223.js} +3 -3
- package/dist/helpers/appsNavigation.d.ts +1 -1
- package/dist/hooks/useOverlay.d.ts +36 -0
- package/dist/{main-bd408fbe.js → main-795be39b.js} +7405 -7297
- package/dist/main.d.ts +23 -40
- package/dist/main.js +99 -100
- package/dist/mocks/setup.d.ts +3 -0
- package/dist/{overrides-684ed062.js → overrides-346bb0f6.js} +2 -2
- 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/{hook-form → forms/Form}/HookedForm.d.ts +1 -1
- 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-a4407b22.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/hooks/useOverlayNavigation.d.ts +0 -27
- package/dist/ui/atoms/Legend.d.ts +0 -32
- package/dist/ui/atoms/Overlay.d.ts +0 -20
- 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 → hooks/useOverlay.test.d.ts} +0 -0
- /package/dist/ui/atoms/{Overlay.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/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,8 +1,8 @@
|
|
|
1
|
-
import { L as de, H as le } from "./main-
|
|
1
|
+
import { L as de, H as le } from "./main-795be39b.js";
|
|
2
2
|
import * as ce from "react";
|
|
3
3
|
import { useRef as F, useState as a, useEffect as x, useCallback as D, forwardRef as ve } from "react";
|
|
4
|
-
import { _ as Oe, a as s, h as Se, b as g, u as me, S as _e, c as he, s as ge } from "./overrides-
|
|
5
|
-
import { d as ye } from "./unsupportedIterableToArray-
|
|
4
|
+
import { _ as Oe, a as s, h as Se, b as g, u as me, S as _e, c as he, s as ge } from "./overrides-346bb0f6.js";
|
|
5
|
+
import { d as ye } from "./unsupportedIterableToArray-a3020d44.js";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
import "@commercelayer/sdk";
|
|
8
8
|
import "react-hook-form";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { P as Ma, r as E, a as Rn, t as H, b as Mt, c as Ee, d as _, g as Cr, _ as Qt, s as je, e as cr, f as xa, h as ur, i as Ln, j as Sa, k as Oa, l as Ea, m as qr, n as _a, o as Kr, p as Pa, q as Ta, u as Na, v as An, w as ae, x as nt, y as pr, z as Hn, A as Ya, B as lr, C as Zr, D as Ia, E as Ra, F as La, G as At, H as Ke, I as Aa, J as Ha, K as Fa } from "./main-
|
|
1
|
+
import { P as Ma, r as E, a as Rn, t as H, b as Mt, c as Ee, d as _, g as Cr, _ as Qt, s as je, e as cr, f as xa, h as ur, i as Ln, j as Sa, k as Oa, l as Ea, m as qr, n as _a, o as Kr, p as Pa, q as Ta, u as Na, v as An, w as ae, x as nt, y as pr, z as Hn, A as Ya, B as lr, C as Zr, D as Ia, E as Ra, F as La, G as At, H as Ke, I as Aa, J as Ha, K as Fa } from "./main-795be39b.js";
|
|
2
2
|
import * as B from "react";
|
|
3
3
|
import h, { forwardRef as Fn, createElement as ja, Component as Ua, createRef as Ba } from "react";
|
|
4
|
-
import { _ as Wa, a as I, b as R, c as N, d as D, e as b, f as Y } from "./unsupportedIterableToArray-
|
|
4
|
+
import { _ as Wa, a as I, b as R, c as N, d as D, e as b, f as Y } from "./unsupportedIterableToArray-a3020d44.js";
|
|
5
5
|
import * as Va from "react-dom";
|
|
6
6
|
import Qa, { findDOMNode as $a } from "react-dom";
|
|
7
7
|
import "@commercelayer/sdk";
|
|
@@ -5227,7 +5227,7 @@ const Lc = Fn(
|
|
|
5227
5227
|
hint: p,
|
|
5228
5228
|
feedback: f,
|
|
5229
5229
|
label: s,
|
|
5230
|
-
children: /* @__PURE__ */ Ke.jsxs("div", { className: "relative", children: [
|
|
5230
|
+
children: /* @__PURE__ */ Ke.jsxs("div", { className: "relative w-full", children: [
|
|
5231
5231
|
/* @__PURE__ */ Ke.jsx(
|
|
5232
5232
|
Ic,
|
|
5233
5233
|
{
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { H as n } from "./main-
|
|
2
|
-
import { u as s, S as m, c as p, s as i } from "./overrides-
|
|
1
|
+
import { H as n } from "./main-795be39b.js";
|
|
2
|
+
import { u as s, S as m, c as p, s as i } from "./overrides-346bb0f6.js";
|
|
3
3
|
import * as c from "react";
|
|
4
4
|
import { forwardRef as S } from "react";
|
|
5
5
|
import "react-dom";
|
|
6
6
|
import "@commercelayer/sdk";
|
|
7
7
|
import "react-hook-form";
|
|
8
8
|
import "query-string";
|
|
9
|
-
import "./unsupportedIterableToArray-
|
|
9
|
+
import "./unsupportedIterableToArray-a3020d44.js";
|
|
10
10
|
var f = /* @__PURE__ */ S(function(e, t) {
|
|
11
11
|
var o = s(e);
|
|
12
12
|
return /* @__PURE__ */ c.createElement(m, p({
|
|
@@ -68,5 +68,5 @@ interface NavigateToExternalDetailsParams {
|
|
|
68
68
|
export declare function navigateToDetail(params: NavigateToInternalDetailsParams | NavigateToExternalDetailsParams): {
|
|
69
69
|
href: string;
|
|
70
70
|
onClick: (e: React.MouseEvent<HTMLAnchorElement | HTMLDivElement, MouseEvent>) => void;
|
|
71
|
-
};
|
|
71
|
+
} | null;
|
|
72
72
|
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface OverlayProps {
|
|
3
|
+
/**
|
|
4
|
+
* The content of the overlay.
|
|
5
|
+
**/
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Footer element to be rendered at the bottom of the overlay.
|
|
9
|
+
**/
|
|
10
|
+
footer?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
interface OverlayOptions {
|
|
13
|
+
/**
|
|
14
|
+
* Optional query param to be used to control the overlay visibility.
|
|
15
|
+
* When set, the overlay will be opened when the query param is set to `true` (e.g. `?myOverlay=true`)
|
|
16
|
+
* and the `open` method will perform an history.push to add the query param as navigating to a new page.
|
|
17
|
+
* Otherwise, the overlay will be opened as a classic in-page modal.
|
|
18
|
+
**/
|
|
19
|
+
queryParam: string;
|
|
20
|
+
}
|
|
21
|
+
interface OverlayHook {
|
|
22
|
+
/**
|
|
23
|
+
* The overlay component.
|
|
24
|
+
**/
|
|
25
|
+
Overlay: React.FC<OverlayProps>;
|
|
26
|
+
/**
|
|
27
|
+
* Function to be used to open the overlay.
|
|
28
|
+
**/
|
|
29
|
+
open: () => void;
|
|
30
|
+
/**
|
|
31
|
+
* Function to be used to close the overlay.
|
|
32
|
+
**/
|
|
33
|
+
close: () => void;
|
|
34
|
+
}
|
|
35
|
+
export declare function useOverlay(options?: OverlayOptions): OverlayHook;
|
|
36
|
+
export {};
|