@commercelayer/app-elements 0.0.31 → 0.0.32

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.
@@ -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-5c1474c7.js";
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-ee1f8d12.js";
4
4
  import "react-dom";
5
- import "./main-1a232919.js";
5
+ import "./main-1470b053.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-1a232919.js";
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-1470b053.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-5c1474c7.js";
3
+ import { u as m, S as p, d as c, s as i } from "./overrides-ee1f8d12.js";
4
4
  import "react-dom";
5
- import "./main-1a232919.js";
5
+ import "./main-1470b053.js";
6
6
  import "@commercelayer/sdk";
7
7
  var l = /* @__PURE__ */ s(function(e, t) {
8
8
  var o = m(e);
@@ -4981,13 +4981,12 @@ const ir = {
4981
4981
  return K.isLoading = !0, R0;
4982
4982
  }
4983
4983
  };
4984
- }, Wm = Ym(Km), Jm = (e, t, r, n) => {
4984
+ }, Wm = Ym(Km);
4985
+ function Jm(e, t, r, n) {
4985
4986
  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
- });
4990
- }, qm = {
4987
+ return Wm(r.length > 0 ? r : [{}], l, n);
4988
+ }
4989
+ const qm = {
4991
4990
  small: "px-6 py-2",
4992
4991
  regular: "px-6 py-3",
4993
4992
  large: "px-8 py-4"
@@ -7316,7 +7315,7 @@ const Nv = H(
7316
7315
  );
7317
7316
  Nv.displayName = "InputCheckbox";
7318
7317
  const zv = Lr(
7319
- async () => await import("./InputDateComponent-46bccbbd.js").then((e) => ({
7318
+ async () => await import("./InputDateComponent-c0743881.js").then((e) => ({
7320
7319
  default: e.InputDateComponent
7321
7320
  }))
7322
7321
  ), Zr = H(
@@ -7604,11 +7603,11 @@ const UA = (e) => ({
7604
7603
  opacity: 0
7605
7604
  })
7606
7605
  }), Jv = Lr(
7607
- async () => await import("./Async-281227f9.js").then((e) => ({
7606
+ async () => await import("./Async-42d132c0.js").then((e) => ({
7608
7607
  default: e.AsyncSelectComponent
7609
7608
  }))
7610
7609
  ), qv = Lr(
7611
- async () => await import("./Select-d4f2a4fe.js").then((e) => ({
7610
+ async () => await import("./Select-b0af9f9e.js").then((e) => ({
7612
7611
  default: e.SelectComponent
7613
7612
  }))
7614
7613
  );
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-1a232919.js";
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-1470b053.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-1a232919.js";
3
+ import { H as yr } from "./main-1470b053.js";
4
4
  import { createPortal as Er } from "react-dom";
5
5
  var Ue = {}, xr = {
6
6
  get exports() {
@@ -1,35 +1,4 @@
1
1
  import type { CommerceLayerClient } from '@commercelayer/sdk';
2
2
  import type { ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
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
- }>;
3
+ import { type Fetcher, type SWRConfiguration, type SWRResponse } from 'swr';
4
+ export declare function useCoreApi<Resource extends ListableResourceType, Action extends 'list' | 'retrieve', Method extends CommerceLayerClient[Resource][Action], Output extends Awaited<ReturnType<Method>>, SWROptions extends SWRConfiguration<Output, any, Fetcher<Output>>>(resource: Resource, action: Action, args: Parameters<Method>, config?: SWROptions): SWRResponse<Output, any, SWROptions>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercelayer/app-elements",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"