@commercelayer/app-elements 0.0.30 → 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-3d867abe.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-24cb56be.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-24cb56be.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-3d867abe.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-24cb56be.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,24 +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 (c) => {
4986
- if (A != null)
4987
- return await A[e][t](...c);
4988
- }, { data: o, isLoading: i, error: s } = Wm(
4989
- r.length > 0 ? r : [{}],
4990
- l,
4991
- {
4992
- revalidateOnFocus: !1,
4993
- ...n
4994
- }
4995
- );
4996
- return {
4997
- data: o,
4998
- isLoading: i,
4999
- error: s
5000
- };
5001
- }, qm = {
4984
+ }, Wm = Ym(Km);
4985
+ function Jm(e, t, r, n) {
4986
+ const { sdkClient: A } = hm(), l = async (o) => await A[e][t](...o);
4987
+ return Wm(r.length > 0 ? r : [{}], l, n);
4988
+ }
4989
+ const qm = {
5002
4990
  small: "px-6 py-2",
5003
4991
  regular: "px-6 py-3",
5004
4992
  large: "px-8 py-4"
@@ -7327,7 +7315,7 @@ const Nv = H(
7327
7315
  );
7328
7316
  Nv.displayName = "InputCheckbox";
7329
7317
  const zv = Lr(
7330
- async () => await import("./InputDateComponent-24a09743.js").then((e) => ({
7318
+ async () => await import("./InputDateComponent-c0743881.js").then((e) => ({
7331
7319
  default: e.InputDateComponent
7332
7320
  }))
7333
7321
  ), Zr = H(
@@ -7615,11 +7603,11 @@ const UA = (e) => ({
7615
7603
  opacity: 0
7616
7604
  })
7617
7605
  }), Jv = Lr(
7618
- async () => await import("./Async-e7969b12.js").then((e) => ({
7606
+ async () => await import("./Async-42d132c0.js").then((e) => ({
7619
7607
  default: e.AsyncSelectComponent
7620
7608
  }))
7621
7609
  ), qv = Lr(
7622
- async () => await import("./Select-ff89c873.js").then((e) => ({
7610
+ async () => await import("./Select-b0af9f9e.js").then((e) => ({
7623
7611
  default: e.SelectComponent
7624
7612
  }))
7625
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-24cb56be.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-24cb56be.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,8 +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, type SWRConfiguration } from 'swr';
4
- export declare const useCoreApi: <R extends ListableResourceType, A extends "list" | "retrieve", O extends CommerceLayerClient[R][A]>(resource: R, action: A, args: Parameters<O>, config?: Partial<import("swr/_internal").PublicConfiguration<Awaited<ReturnType<O>> | undefined, any, BareFetcher<Awaited<ReturnType<O>> | undefined>>>) => {
5
- data: Awaited<ReturnType<O>> | undefined;
6
- error: any;
7
- isLoading: boolean;
8
- };
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.30",
3
+ "version": "0.0.32",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"