@commercelayer/app-elements 0.0.30 → 0.0.31
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-e7969b12.js → Async-281227f9.js} +2 -2
- package/dist/{InputDateComponent-24a09743.js → InputDateComponent-46bccbbd.js} +1 -1
- package/dist/{Select-ff89c873.js → Select-d4f2a4fe.js} +2 -2
- package/dist/{main-24cb56be.js → main-1a232919.js} +9 -20
- package/dist/main.js +1 -1
- package/dist/{overrides-3d867abe.js → overrides-5c1474c7.js} +1 -1
- package/dist/providers/CoreSdkProvider/useCoreApi.d.ts +33 -6
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as de from "react";
|
|
2
2
|
import le, { useRef as W, useState as a, useEffect as z, useCallback as B, forwardRef as ce } from "react";
|
|
3
|
-
import { _ as ve, a as s, h as Oe, b as O, c as Se, u as _e, S as he, d as me, s as ge } from "./overrides-
|
|
3
|
+
import { _ as ve, a as s, h as Oe, b as O, c as Se, u as _e, S as he, d as me, s as ge } from "./overrides-5c1474c7.js";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
import "./main-
|
|
5
|
+
import "./main-1a232919.js";
|
|
6
6
|
import "@commercelayer/sdk";
|
|
7
7
|
var ye = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
|
|
8
8
|
function Ce(t) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as A from "react";
|
|
2
2
|
import h, { forwardRef as ou, createElement as Qu, Component as Ku, createRef as zu } from "react";
|
|
3
|
-
import { P as Zu, r as D, a as au, t as $, b as yt, c as Oe, d as E, g as Lo, s as Ne, e as hn, f as Xu, h as yn, i as iu, j as Gu, k as Ju, l as es, m as ca, n as ts, o as la, p as rs, q as ns, u as os, v as ee, w as ze, x as mn, y as uu, z as as, A as is, B as fa, C as us, D as ss, E as cs, F as fr, I as ls, G as fs, H as ps } from "./main-
|
|
3
|
+
import { P as Zu, r as D, a as au, t as $, b as yt, c as Oe, d as E, g as Lo, s as Ne, e as hn, f as Xu, h as yn, i as iu, j as Gu, k as Ju, l as es, m as ca, n as ts, o as la, p as rs, q as ns, u as os, v as ee, w as ze, x as mn, y as uu, z as as, A as is, B as fa, C as us, D as ss, E as cs, F as fr, I as ls, G as fs, H as ps } from "./main-1a232919.js";
|
|
4
4
|
import * as ds from "react-dom";
|
|
5
5
|
import hs, { findDOMNode as ys } from "react-dom";
|
|
6
6
|
import "@commercelayer/sdk";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as r from "react";
|
|
2
2
|
import a, { forwardRef as s } from "react";
|
|
3
|
-
import { u as m, S as p, d as c, s as i } from "./overrides-
|
|
3
|
+
import { u as m, S as p, d as c, s as i } from "./overrides-5c1474c7.js";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
import "./main-
|
|
5
|
+
import "./main-1a232919.js";
|
|
6
6
|
import "@commercelayer/sdk";
|
|
7
7
|
var l = /* @__PURE__ */ s(function(e, t) {
|
|
8
8
|
var o = m(e);
|
|
@@ -4981,23 +4981,12 @@ const ir = {
|
|
|
4981
4981
|
return K.isLoading = !0, R0;
|
|
4982
4982
|
}
|
|
4983
4983
|
};
|
|
4984
|
-
}, Wm = Ym(Km), Jm = (e, t, r, n
|
|
4985
|
-
const { sdkClient: A } = hm(), l = async (
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
l,
|
|
4991
|
-
{
|
|
4992
|
-
revalidateOnFocus: !1,
|
|
4993
|
-
...n
|
|
4994
|
-
}
|
|
4995
|
-
);
|
|
4996
|
-
return {
|
|
4997
|
-
data: o,
|
|
4998
|
-
isLoading: i,
|
|
4999
|
-
error: s
|
|
5000
|
-
};
|
|
4984
|
+
}, Wm = Ym(Km), Jm = (e, t, r, n) => {
|
|
4985
|
+
const { sdkClient: A } = hm(), l = async (o) => await A[e][t](...o);
|
|
4986
|
+
return Wm(r.length > 0 ? r : [{}], l, {
|
|
4987
|
+
revalidateOnFocus: !1,
|
|
4988
|
+
...n
|
|
4989
|
+
});
|
|
5001
4990
|
}, qm = {
|
|
5002
4991
|
small: "px-6 py-2",
|
|
5003
4992
|
regular: "px-6 py-3",
|
|
@@ -7327,7 +7316,7 @@ const Nv = H(
|
|
|
7327
7316
|
);
|
|
7328
7317
|
Nv.displayName = "InputCheckbox";
|
|
7329
7318
|
const zv = Lr(
|
|
7330
|
-
async () => await import("./InputDateComponent-
|
|
7319
|
+
async () => await import("./InputDateComponent-46bccbbd.js").then((e) => ({
|
|
7331
7320
|
default: e.InputDateComponent
|
|
7332
7321
|
}))
|
|
7333
7322
|
), Zr = H(
|
|
@@ -7615,11 +7604,11 @@ const UA = (e) => ({
|
|
|
7615
7604
|
opacity: 0
|
|
7616
7605
|
})
|
|
7617
7606
|
}), Jv = Lr(
|
|
7618
|
-
async () => await import("./Async-
|
|
7607
|
+
async () => await import("./Async-281227f9.js").then((e) => ({
|
|
7619
7608
|
default: e.AsyncSelectComponent
|
|
7620
7609
|
}))
|
|
7621
7610
|
), qv = Lr(
|
|
7622
|
-
async () => await import("./Select-
|
|
7611
|
+
async () => await import("./Select-d4f2a4fe.js").then((e) => ({
|
|
7623
7612
|
default: e.SelectComponent
|
|
7624
7613
|
}))
|
|
7625
7614
|
);
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { X as o, Y as r, Z as n, _ as i, $ as l, a0 as u, a1 as d, a2 as p, ar as g, a3 as S, R as T, al as D, am as I, an as m, a4 as k, U as c, a5 as B, a6 as y, a7 as C, ay as L, az as P, aA as b, aB as x, aC as A, aD as R, aE as f, aF as v, aG as w, aK as F, aL as h, aM as M, aN as E, a8 as V, aQ as J, aR as H, aS as N, aT as O, aU as G, as as K, a9 as Q, at as U, au as W, aa as X, ab as j, aO as q, av as z, aV as Y, aw as Z, ac as _, ad as $, af as aa, ag as sa, ah as ea, ai as ta, aW as oa, aX as ra, aj as na, ao as ia, ak as la, ap as ua, ax as da, aP as pa, V as ga, aq as Sa, N as Ta, aH as Da, J as Ia, O as ma, aI as ka, K as ca, L as Ba, aJ as ya, M as Ca, T as La, S as Pa, Q as ba, W as xa, ae as Aa } from "./main-
|
|
1
|
+
import { X as o, Y as r, Z as n, _ as i, $ as l, a0 as u, a1 as d, a2 as p, ar as g, a3 as S, R as T, al as D, am as I, an as m, a4 as k, U as c, a5 as B, a6 as y, a7 as C, ay as L, az as P, aA as b, aB as x, aC as A, aD as R, aE as f, aF as v, aG as w, aK as F, aL as h, aM as M, aN as E, a8 as V, aQ as J, aR as H, aS as N, aT as O, aU as G, as as K, a9 as Q, at as U, au as W, aa as X, ab as j, aO as q, av as z, aV as Y, aw as Z, ac as _, ad as $, af as aa, ag as sa, ah as ea, ai as ta, aW as oa, aX as ra, aj as na, ao as ia, ak as la, ap as ua, ax as da, aP as pa, V as ga, aq as Sa, N as Ta, aH as Da, J as Ia, O as ma, aI as ka, K as ca, L as Ba, aJ as ya, M as Ca, T as La, S as Pa, Q as ba, W as xa, ae as Aa } from "./main-1a232919.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "@commercelayer/sdk";
|
|
4
4
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as V from "react";
|
|
2
2
|
import fe, { useLayoutEffect as yn, createContext as Et, forwardRef as Cr, useContext as Te, createElement as pe, Fragment as Ne, useRef as ue, useState as me, useMemo as Ce, useCallback as Y, Component as Ar, useEffect as En } from "react";
|
|
3
|
-
import { H as yr } from "./main-
|
|
3
|
+
import { H as yr } from "./main-1a232919.js";
|
|
4
4
|
import { createPortal as Er } from "react-dom";
|
|
5
5
|
var Ue = {}, xr = {
|
|
6
6
|
get exports() {
|
|
@@ -1,8 +1,35 @@
|
|
|
1
1
|
import type { CommerceLayerClient } from '@commercelayer/sdk';
|
|
2
2
|
import type { ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
|
|
3
|
-
import { type BareFetcher
|
|
4
|
-
export declare const useCoreApi: <
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import { type BareFetcher } from 'swr';
|
|
4
|
+
export declare const useCoreApi: <Resource extends ListableResourceType, Action extends "list" | "retrieve", Method extends CommerceLayerClient[Resource][Action], Output extends Awaited<ReturnType<Method>>, SWRConfig extends Partial<import("swr/_internal").PublicConfiguration<Output, any, BareFetcher<Output>>>>(resource: Resource, action: Action, args: Parameters<Method>, config?: SWRConfig | undefined) => import("swr/_internal").SWRResponse<Output, any, {
|
|
5
|
+
errorRetryInterval?: number | undefined;
|
|
6
|
+
errorRetryCount?: number | undefined;
|
|
7
|
+
loadingTimeout?: number | undefined;
|
|
8
|
+
focusThrottleInterval?: number | undefined;
|
|
9
|
+
dedupingInterval?: number | undefined;
|
|
10
|
+
refreshInterval?: number | ((latestData: Output | undefined) => number) | undefined;
|
|
11
|
+
refreshWhenHidden?: boolean | undefined;
|
|
12
|
+
refreshWhenOffline?: boolean | undefined;
|
|
13
|
+
revalidateOnFocus: boolean;
|
|
14
|
+
revalidateOnReconnect?: boolean | undefined;
|
|
15
|
+
revalidateOnMount?: boolean | undefined;
|
|
16
|
+
revalidateIfStale?: boolean | undefined;
|
|
17
|
+
shouldRetryOnError?: boolean | ((err: any) => boolean) | undefined;
|
|
18
|
+
keepPreviousData?: boolean | undefined;
|
|
19
|
+
suspense?: boolean | undefined;
|
|
20
|
+
fallbackData?: Output | undefined;
|
|
21
|
+
fetcher?: BareFetcher<Output> | undefined;
|
|
22
|
+
use?: import("swr/_internal").Middleware[] | undefined;
|
|
23
|
+
fallback?: {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
} | undefined;
|
|
26
|
+
isPaused?: (() => boolean) | undefined;
|
|
27
|
+
onLoadingSlow?: ((key: string, config: Readonly<import("swr/_internal").PublicConfiguration<Output, any, BareFetcher<Output>>>) => void) | undefined;
|
|
28
|
+
onSuccess?: ((data: Output, key: string, config: Readonly<import("swr/_internal").PublicConfiguration<Output, any, BareFetcher<Output>>>) => void) | undefined;
|
|
29
|
+
onError?: ((err: any, key: string, config: Readonly<import("swr/_internal").PublicConfiguration<Output, any, BareFetcher<Output>>>) => void) | undefined;
|
|
30
|
+
onErrorRetry?: ((err: any, key: string, config: Readonly<import("swr/_internal").PublicConfiguration<Output, any, BareFetcher<Output>>>, revalidate: import("swr/_internal").Revalidator, revalidateOpts: Required<import("swr/_internal").RevalidatorOptions>) => void) | undefined;
|
|
31
|
+
onDiscarded?: ((key: string) => void) | undefined;
|
|
32
|
+
compare?: ((a: Output | undefined, b: Output | undefined) => boolean) | undefined;
|
|
33
|
+
isOnline?: (() => boolean) | undefined;
|
|
34
|
+
isVisible?: (() => boolean) | undefined;
|
|
35
|
+
}>;
|