@commercelayer/app-elements 7.1.1 → 7.2.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/{CodeEditorComponent-CEHHl0E0.js → CodeEditorComponent-BKK6JTv2.js} +2 -2
- package/dist/{InputDateComponent-Dn2bat0T.js → InputDateComponent-CRQC4H-u.js} +2 -2
- package/dist/{RuleEngineComponent-CKKwzAzL.js → RuleEngineComponent-fsxIH2K2.js} +3 -3
- package/dist/{fetchCoreResourcesSuggestions-uX0pFjE7.js → fetchCoreResourcesSuggestions-5NTlinRi.js} +1 -1
- package/dist/helpers/errors.d.ts +7 -0
- package/dist/helpers/errors.test.d.ts +1 -0
- package/dist/hooks/useConfirmDialog.d.ts +61 -0
- package/dist/{main-DgrjVlV3.js → main-BhIzgOdi.js} +12793 -12710
- package/dist/main.d.ts +2 -0
- package/dist/main.js +50 -48
- package/dist/{parseISO-DGGtp4Hn.js → parseISO-DArOeVXC.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/tailwind.global.css +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { u as Pe, j as le, I as Se } from "./main-
|
|
2
|
+
import { u as Pe, j as le, I as Se } from "./main-BhIzgOdi.js";
|
|
3
3
|
import $, { memo as ie, useState as N, useRef as h, useCallback as ne, useEffect as S, forwardRef as Ce } from "react";
|
|
4
|
-
import { f as Ee, a as Ie } from "./fetchCoreResourcesSuggestions-
|
|
4
|
+
import { f as Ee, a as Ie } from "./fetchCoreResourcesSuggestions-5NTlinRi.js";
|
|
5
5
|
function se(e, t) {
|
|
6
6
|
(t == null || t > e.length) && (t = e.length);
|
|
7
7
|
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { c as z, t as M, m as dr, a as pr, b as me, d as ve, n as ht, e as Be, g as fr, f as Kr, h as Ur, s as ot, i as hr, k as Vr, l as vr, o as mr, p as qr, q as jr, r as Yt, v as $r, w as Gr, x as zr, y as Lt, z as Ae, A as Xr, j as ae, B as G, C as pe, D as be, E as bt, F as xt, G as Dr, H as Et, J as gr, K as Zr, L as Ft, M as Te, N as Jr, O as en, P as tn, Q as st, R as rn, S as nn, I as an, T as on, U as sn, V as ln, W as cn } from "./main-
|
|
2
|
+
import { c as z, t as M, m as dr, a as pr, b as me, d as ve, n as ht, e as Be, g as fr, f as Kr, h as Ur, s as ot, i as hr, k as Vr, l as vr, o as mr, p as qr, q as jr, r as Yt, v as $r, w as Gr, x as zr, y as Lt, z as Ae, A as Xr, j as ae, B as G, C as pe, D as be, E as bt, F as xt, G as Dr, H as Et, J as gr, K as Zr, L as Ft, M as Te, N as Jr, O as en, P as tn, Q as st, R as rn, S as nn, I as an, T as on, U as sn, V as ln, W as cn } from "./main-BhIzgOdi.js";
|
|
3
3
|
import * as k from "react";
|
|
4
4
|
import v, { useLayoutEffect as yr, cloneElement as wr, createRef as Me, Component as X, useRef as _t, useEffect as At, useCallback as un, createElement as dn, forwardRef as pn, useMemo as fn } from "react";
|
|
5
5
|
import * as hn from "react-dom";
|
|
6
6
|
import vn from "react-dom";
|
|
7
|
-
import { p as mn } from "./parseISO-
|
|
7
|
+
import { p as mn } from "./parseISO-DArOeVXC.js";
|
|
8
8
|
function br(o, n, t) {
|
|
9
9
|
return z(o, +M(o) + n);
|
|
10
10
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as B, X as Oe, Y as Re, Z as Ve, j as t, _ as R, $ as U, a0 as j, a1 as S, E as L, a2 as Ae, a3 as Me, a4 as Ee, a5 as Y, a6 as ae, a7 as x, T as k, a8 as C, a9 as $, aa as _, ab as y, ac as re, ad as E, ae as z, af as O, ag as X, ah as Ie, u as oe, ai as qe, aj as De, ak as H, I as Le, al as Fe } from "./main-
|
|
2
|
+
import { t as B, X as Oe, Y as Re, Z as Ve, j as t, _ as R, $ as U, a0 as j, a1 as S, E as L, a2 as Ae, a3 as Me, a4 as Ee, a5 as Y, a6 as ae, a7 as x, T as k, a8 as C, a9 as $, aa as _, ab as y, ac as re, ad as E, ae as z, af as O, ag as X, ah as Ie, u as oe, ai as qe, aj as De, ak as H, I as Le, al as Fe } from "./main-BhIzgOdi.js";
|
|
3
3
|
import K, { useReducer as ze, useCallback as A, useMemo as ie, createContext as Ge, useContext as Ue, useState as v, useEffect as T, useRef as ue } from "react";
|
|
4
4
|
import "react-hook-form";
|
|
5
|
-
import { b as Je, e as ce, a as We, c as de, f as Be } from "./fetchCoreResourcesSuggestions-
|
|
5
|
+
import { b as Je, e as ce, a as We, c as de, f as Be } from "./fetchCoreResourcesSuggestions-5NTlinRi.js";
|
|
6
6
|
import "wouter";
|
|
7
|
-
import { p as Q } from "./parseISO-
|
|
7
|
+
import { p as Q } from "./parseISO-DArOeVXC.js";
|
|
8
8
|
function Z(e, s) {
|
|
9
9
|
const n = e.match(
|
|
10
10
|
/(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ButtonProps } from '../ui/atoms/Button';
|
|
3
|
+
import { IconProps } from '../ui/atoms/Icon';
|
|
4
|
+
interface ConfirmDialogConfirmProps {
|
|
5
|
+
/** Label for the confirm button */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Button variant. Use `"danger"` for destructive actions and `"primary"` for generic confirmations. */
|
|
8
|
+
variant?: ButtonProps["variant"];
|
|
9
|
+
/** Async action to execute on confirm */
|
|
10
|
+
onClick: () => Promise<unknown>;
|
|
11
|
+
}
|
|
12
|
+
interface ConfirmDialogProps {
|
|
13
|
+
/** Controls visibility of the dialog */
|
|
14
|
+
show: boolean;
|
|
15
|
+
/** Called when the dialog should close */
|
|
16
|
+
onClose: () => void;
|
|
17
|
+
/** Icon name to display at the top of the dialog (from the Icon component set) */
|
|
18
|
+
icon: IconProps["name"];
|
|
19
|
+
/** Main title shown in the dialog body. */
|
|
20
|
+
title: string;
|
|
21
|
+
/** Optional extra content rendered below the title. */
|
|
22
|
+
description?: React.ReactNode;
|
|
23
|
+
/** Configuration for the confirm (primary action) button */
|
|
24
|
+
confirm: ConfirmDialogConfirmProps;
|
|
25
|
+
/**
|
|
26
|
+
* Message shown in the error toast when `confirm.onClick` rejects and overrides the API errors.
|
|
27
|
+
*/
|
|
28
|
+
errorMessage?: string;
|
|
29
|
+
/** Optional success message shown when the action completes successfully */
|
|
30
|
+
successMessage?: string;
|
|
31
|
+
}
|
|
32
|
+
type ConfirmDialogRendererProps = Omit<ConfirmDialogProps, "show" | "onClose">;
|
|
33
|
+
interface ConfirmDialogHook {
|
|
34
|
+
/**
|
|
35
|
+
* Opens the dialog.
|
|
36
|
+
*/
|
|
37
|
+
show: () => void;
|
|
38
|
+
/**
|
|
39
|
+
* The dialog renderer. Mount it in your component tree and pass it the
|
|
40
|
+
* `icon`, `title`, `description`, `confirm` (and optional `errorMessage`) props.
|
|
41
|
+
* Visibility is fully managed by the hook — you only need to call `show()`.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* const { show, ConfirmDialog } = useConfirmDialog()
|
|
45
|
+
*
|
|
46
|
+
* return (
|
|
47
|
+
* <>
|
|
48
|
+
* <Button onClick={show}>Delete</Button>
|
|
49
|
+
* <ConfirmDialog
|
|
50
|
+
* icon="trash"
|
|
51
|
+
* title="Delete item"
|
|
52
|
+
* description="Are you sure you want to delete this item?"
|
|
53
|
+
* confirm={{ label: "Delete", variant: "danger", onClick: handleDelete }}
|
|
54
|
+
* />
|
|
55
|
+
* </>
|
|
56
|
+
* )
|
|
57
|
+
*/
|
|
58
|
+
ConfirmDialog: FC<ConfirmDialogRendererProps>;
|
|
59
|
+
}
|
|
60
|
+
export declare function useConfirmDialog(): ConfirmDialogHook;
|
|
61
|
+
export {};
|