@commercelayer/app-elements 7.8.0 → 7.9.1

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/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { an as s, ao as t, ap as o, aq as r, ar as n, as as c, at as u, af as i, au as d, av as l, aw as p, ax as b, ay as g, al as m, az as S, aA as I, aB as k, a1 as T, ae as D, a9 as R, aC as y, aD as C, aE as h, aF as A, aG as P, aH as H, aI as f, aJ as F, aK as v, aL as O, aM as B, aN as E, aO as L, aP as N, aQ as G, aR as M, aS as w, aT as V, aU as x, aV as W, aW as J, aX as U, aY as j, aZ as q, a_ as Y, a$ as z, b0 as K, ah as Q, b1 as X, a0 as Z, ab as _, b2 as $, b3 as aa, b4 as ea, b5 as sa, aj as ta, ai as oa, b6 as ra, b7 as na, b8 as ca, b9 as ua, ba as ia, a7 as da, bb as la, bc as pa, bd as ba, be as ga, bf as ma, bg as Sa, bh as Ia, bi as ka, bj as Ta, bk as Da, bl as Ra, bm as ya, bn as Ca, bo as ha, bp as Aa, bq as Pa, br as Ha, bs as fa, bt as Fa, bu as va, bv as Oa, bw as Ba, bx as Ea, by as La, bz as Na, bA as Ga, bB as Ma, bC as wa, bD as Va, bE as xa, bF as Wa, bG as Ja, bH as Ua, bI as ja, bJ as qa, bK as Ya, bL as za, bM as Ka, bN as Qa, bO as Xa, bP as Za, bQ as _a, ag as $a, bR as ae, bS as ee, bT as se, bU as te, bV as oe, bW as re, bX as ne, bY as ce, bZ as ue, b_ as ie, a8 as de, b$ as le, c0 as pe, c1 as be, c2 as ge, c3 as me, c4 as Se, c5 as Ie, c6 as ke, c7 as Te, c8 as De, c9 as Re, ca as ye, cb as Ce, cc as he, cd as Ae, ce as Pe, cf as He, cg as fe, ch as Fe, ci as ve, cj as Oe, ck as Be, cl as Ee, cm as Le, cn as Ne, co as Ge, cp as Me, cq as we, cr as Ve, cs as xe, ct as We, cu as Je, cv as Ue, cw as je, cx as qe, cy as Ye, cz as ze, cA as Ke, cB as Qe, cC as Xe, cD as Ze, cE as _e, cF as $e, cG as as, cH as es, cI as ss, cJ as ts, cK as os, cL as rs, cM as ns, cN as cs, cO as us, cP as is, cQ as ds, cR as ls, cS as ps, cT as bs, cU as gs, S as ms, cV as Ss, cW as Is, cX as ks, ad as Ts, aa as Ds, cY as Rs, cZ as ys, c_ as Cs, c$ as hs, d0 as As, d1 as Ps, d2 as Hs, d3 as fs, d4 as Fs, d5 as vs, d6 as Os, d7 as Bs, d8 as Es, d9 as Ls, da as Ns, a5 as Gs, a4 as Ms, db as ws, dc as Vs, dd as xs, de as Ws, df as Js, dg as Us, dh as js, di as qs, dj as Ys, dk as zs, dl as Ks, u as Qs, dm as Xs, ac as Zs, dn as _s, dp as $s, dq as at } from "./main-Dvwj3-yx.js";
2
+ import { an as s, ao as t, ap as o, aq as r, ar as n, as as c, at as u, af as i, au as d, av as l, aw as p, ax as b, ay as g, al as m, az as S, aA as I, aB as k, a1 as T, ae as D, a9 as R, aC as y, aD as C, aE as h, aF as A, aG as P, aH as H, aI as f, aJ as F, aK as v, aL as O, aM as B, aN as E, aO as L, aP as N, aQ as G, aR as M, aS as w, aT as V, aU as x, aV as W, aW as J, aX as U, aY as j, aZ as q, a_ as Y, a$ as z, b0 as K, ah as Q, b1 as X, a0 as Z, ab as _, b2 as $, b3 as aa, b4 as ea, b5 as sa, aj as ta, ai as oa, b6 as ra, b7 as na, b8 as ca, b9 as ua, ba as ia, a7 as da, bb as la, bc as pa, bd as ba, be as ga, bf as ma, bg as Sa, bh as Ia, bi as ka, bj as Ta, bk as Da, bl as Ra, bm as ya, bn as Ca, bo as ha, bp as Aa, bq as Pa, br as Ha, bs as fa, bt as Fa, bu as va, bv as Oa, bw as Ba, bx as Ea, by as La, bz as Na, bA as Ga, bB as Ma, bC as wa, bD as Va, bE as xa, bF as Wa, bG as Ja, bH as Ua, bI as ja, bJ as qa, bK as Ya, bL as za, bM as Ka, bN as Qa, bO as Xa, bP as Za, bQ as _a, ag as $a, bR as ae, bS as ee, bT as se, bU as te, bV as oe, bW as re, bX as ne, bY as ce, bZ as ue, b_ as ie, a8 as de, b$ as le, c0 as pe, c1 as be, c2 as ge, c3 as me, c4 as Se, c5 as Ie, c6 as ke, c7 as Te, c8 as De, c9 as Re, ca as ye, cb as Ce, cc as he, cd as Ae, ce as Pe, cf as He, cg as fe, ch as Fe, ci as ve, cj as Oe, ck as Be, cl as Ee, cm as Le, cn as Ne, co as Ge, cp as Me, cq as we, cr as Ve, cs as xe, ct as We, cu as Je, cv as Ue, cw as je, cx as qe, cy as Ye, cz as ze, cA as Ke, cB as Qe, cC as Xe, cD as Ze, cE as _e, cF as $e, cG as as, cH as es, cI as ss, cJ as ts, cK as os, cL as rs, cM as ns, cN as cs, cO as us, cP as is, cQ as ds, cR as ls, cS as ps, cT as bs, cU as gs, S as ms, cV as Ss, cW as Is, cX as ks, ad as Ts, aa as Ds, cY as Rs, cZ as ys, c_ as Cs, c$ as hs, d0 as As, d1 as Ps, d2 as Hs, d3 as fs, d4 as Fs, d5 as vs, d6 as Os, d7 as Bs, d8 as Es, d9 as Ls, da as Ns, a5 as Gs, a4 as Ms, db as ws, dc as Vs, dd as xs, de as Ws, df as Js, dg as Us, dh as js, di as qs, dj as Ys, dk as zs, dl as Ks, u as Qs, dm as Xs, ac as Zs, dn as _s, dp as $s, dq as at } from "./main-8YJiBYbZ.js";
3
3
  export {
4
4
  s as A,
5
5
  t as ActionButtons,
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as D, c as T, m as p, a as N } from "./main-Dvwj3-yx.js";
2
+ import { t as D, c as T, m as p, a as N } from "./main-8YJiBYbZ.js";
3
3
  function W(t, e) {
4
4
  const n = () => T(e?.in, NaN), a = I(t);
5
5
  let s;
@@ -1,10 +1,10 @@
1
- import { CommerceLayerClient } from '@commercelayer/sdk';
1
+ import { CommerceLayerBundle } from '@commercelayer/sdk';
2
2
  import { JSX, ReactNode } from 'react';
3
3
  interface CoreSdkProviderValue {
4
4
  /**
5
5
  * Valid SDK client
6
6
  */
7
- sdkClient: CommerceLayerClient;
7
+ sdkClient: CommerceLayerBundle;
8
8
  }
9
9
  interface CoreSdkProviderProps {
10
10
  /**
@@ -1,7 +1,7 @@
1
- import { CommerceLayerClient } from '@commercelayer/sdk';
1
+ import { CommerceLayerBundle } from '@commercelayer/sdk';
2
2
  export declare function makeSdkClient({ accessToken, organization, domain, onInvalidToken, }: {
3
3
  accessToken: string;
4
4
  organization: string;
5
5
  domain?: string;
6
6
  onInvalidToken: () => void;
7
- }): CommerceLayerClient;
7
+ }): CommerceLayerBundle;
@@ -1,4 +1,4 @@
1
- import { CommerceLayerClient } from '@commercelayer/sdk';
1
+ import { CommerceLayerBundle } from '@commercelayer/sdk';
2
2
  import { Fetcher, SWRConfiguration, SWRResponse } from 'swr';
3
3
  import { ResourceEndpoint } from '../../helpers/resources';
4
4
  type GenericMethod = (...args: any) => Promise<any>;
@@ -29,5 +29,5 @@ type MethodKeys<T> = {
29
29
  * @param config SWR options
30
30
  * @returns SWR response
31
31
  */
32
- export declare function useCoreApi<Resource extends ResourceEndpoint, Action extends MethodKeys<CommerceLayerClient[Resource]>, Method extends ForceToBeMethod<CommerceLayerClient[Resource][Action]>, Args extends Parameters<Method>, Output extends Awaited<ReturnType<Method>>, SWROptions extends SWRConfiguration<Output, any, Fetcher<Output>>>(resource: Resource, action: Action, args: Args | null, config?: SWROptions): SWRResponse<Output, any, SWROptions>;
32
+ export declare function useCoreApi<Resource extends ResourceEndpoint, Action extends MethodKeys<CommerceLayerBundle[Resource]>, Method extends ForceToBeMethod<CommerceLayerBundle[Resource][Action]>, Args extends Parameters<Method>, Output extends Awaited<ReturnType<Method>>, SWROptions extends SWRConfiguration<Output, any, Fetcher<Output>>>(resource: Resource, action: Action, args: Args | null, config?: SWROptions): SWRResponse<Output, any, SWROptions>;
33
33
  export {};
@@ -1,4 +1,4 @@
1
- import { CommerceLayerClient, ListableResourceType } from '@commercelayer/sdk';
1
+ import { CommerceLayerBundle, ListableResourceType } from '@commercelayer/sdk';
2
2
  export declare function useToggleCheckboxValues(defaultValues: string[]): {
3
3
  values: string[];
4
4
  toggleValue: (value: string) => void;
@@ -19,7 +19,7 @@ export declare function computeLabelWithSelected({ label, selectedCount, totalCo
19
19
  selectedCount: number;
20
20
  totalCount?: number;
21
21
  }): string;
22
- type Resource = Awaited<ReturnType<CommerceLayerClient[ListableResourceType]["list"]>>[number];
22
+ type Resource = Awaited<ReturnType<CommerceLayerBundle[ListableResourceType]["list"]>>[number];
23
23
  /**
24
24
  * Helper to prepare the options for the checkbox group or mocked info to be used for skeleton.
25
25
  */
@@ -1,7 +1,7 @@
1
1
  import { atPath } from '../../CodeEditor/fetchCoreResourcesSuggestions';
2
2
  import { SchemaConditionItem } from '../utils';
3
3
  import { matcherDictionary } from './utils';
4
- export declare function getResourceType(resourceId: string | undefined): "bundles" | "markets" | "sku_lists" | "skus" | "tags";
4
+ export declare function getResourceType(resourceId: string | undefined): "bundles" | "markets" | "skus" | "sku_lists" | "tags";
5
5
  export declare function useResourcePathInfos(item: SchemaConditionItem | null): {
6
6
  infos: (Awaited<ReturnType<typeof atPath>> & {
7
7
  /** Information about the matcher used in the condition. */
@@ -1,6 +1,6 @@
1
- import { CommerceLayerClient, ListableResourceType, QueryParamsList, ResourceFields } from '@commercelayer/sdk';
1
+ import { CommerceLayerBundle, ListableResourceType, QueryParamsList, ResourceFields } from '@commercelayer/sdk';
2
2
  import { MetricsApiClient } from './metricsApiClient';
3
- type ListResource<TResource extends ListableResourceType> = Awaited<ReturnType<CommerceLayerClient[TResource]["list"]>>;
3
+ type ListResource<TResource extends ListableResourceType> = Awaited<ReturnType<CommerceLayerBundle[TResource]["list"]>>;
4
4
  export type Resource<TResource extends ListableResourceType> = ListResource<TResource>[number];
5
5
  export interface FetcherResponse<TResource> {
6
6
  list: TResource[];
@@ -18,7 +18,7 @@ export declare function listFetcher<TResource extends ListableResourceType>({ cu
18
18
  mode?: "infinite" | "pagination";
19
19
  pageNumber?: number;
20
20
  } & ({
21
- client: CommerceLayerClient;
21
+ client: CommerceLayerBundle;
22
22
  clientType: "coreSdkClient";
23
23
  query?: Omit<QueryParamsList<ResourceFields[TResource]>, "pageNumber">;
24
24
  } | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercelayer/app-elements",
3
- "version": "7.8.0",
3
+ "version": "7.9.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -34,9 +34,9 @@
34
34
  "node": ">=22.22"
35
35
  },
36
36
  "dependencies": {
37
- "@commercelayer/js-auth": "^7.4.1",
38
- "@commercelayer/sdk": "^6.57.0",
39
- "@date-fns/tz": "^1.4.1",
37
+ "@commercelayer/js-auth": "^7.4.2",
38
+ "@commercelayer/sdk": "v8.0.0-beta.9",
39
+ "@date-fns/tz": "^1.5.0",
40
40
  "@monaco-editor/react": "~4.7.0",
41
41
  "@types/lodash-es": "^4.17.12",
42
42
  "@types/react": "19.2.13",
@@ -45,12 +45,12 @@
45
45
  "classnames": "^2.5.1",
46
46
  "i18next": "^25.10.10",
47
47
  "i18next-resources-to-backend": "^1.2.1",
48
- "js-cookie": "^3.0.5",
48
+ "js-cookie": "^3.0.8",
49
49
  "jwt-decode": "^4.0.0",
50
50
  "lodash-es": "^4.18.1",
51
51
  "monaco-editor": "~0.53.0",
52
52
  "pluralize": "^8.0.0",
53
- "query-string": "^9.3.1",
53
+ "query-string": "^9.4.1",
54
54
  "react": "19.2.4",
55
55
  "react-currency-input-field": "^3.10.0",
56
56
  "react-datepicker": "^8.10.0",
@@ -60,39 +60,38 @@
60
60
  "react-select": "^5.10.2",
61
61
  "react-toastify": "^11.1.0",
62
62
  "react-tooltip": "^5.30.1",
63
- "swr": "^2.4.1",
63
+ "swr": "^2.4.2",
64
64
  "ts-invariant": "^0.10.3",
65
- "type-fest": "^5.6.0",
65
+ "type-fest": "^5.7.0",
66
66
  "zod": "^3.25.76"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@hookform/resolvers": "^3.10.0",
70
70
  "@phosphor-icons/react": "^2.1.10",
71
71
  "@tailwindcss/forms": "^0.5.11",
72
- "@tailwindcss/postcss": "^4.2.2",
72
+ "@tailwindcss/postcss": "^4.3.2",
73
73
  "@testing-library/jest-dom": "^6.9.1",
74
74
  "@testing-library/react": "^16.3.2",
75
75
  "@types/js-cookie": "^3.0.6",
76
- "@types/node": "^22.19.17",
76
+ "@types/node": "^22.20.0",
77
77
  "@types/pluralize": "^0.0.33",
78
78
  "@types/react-gtm-module": "^2.0.4",
79
79
  "@vitejs/plugin-react": "^5.2.0",
80
80
  "cross-fetch": "^4.1.0",
81
- "date-fns": "^4.1.0",
81
+ "date-fns": "^4.4.0",
82
82
  "date-fns-tz": "^3.2.0",
83
83
  "jsdom": "^27.4.0",
84
- "msw": "^2.14.5",
85
- "postcss": "^8.5.10",
84
+ "msw": "^2.14.6",
85
+ "postcss": "^8.5.16",
86
86
  "react-gtm-module": "^2.0.11",
87
- "tailwindcss": "^4.2.2",
87
+ "tailwindcss": "^4.3.2",
88
88
  "typescript": "^5.9.3",
89
- "vite": "^7.3.2",
89
+ "vite": "^7.3.6",
90
90
  "vite-plugin-dts": "^4.5.4",
91
- "vitest": "^3.2.4",
92
- "wouter": "^3.9.0"
91
+ "vitest": "^3.2.6",
92
+ "wouter": "^3.10.0"
93
93
  },
94
94
  "peerDependencies": {
95
- "@commercelayer/sdk": "^6.x",
96
95
  "query-string": "^9.x",
97
96
  "react": "^19.1.x",
98
97
  "react-dom": "^19.1.x",