@abpjs/ui 0.2.0-next.23 → 0.2.0-next.25
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/CHANGELOG.md +18 -0
- package/dist/agent.js +1 -1
- package/dist/agent.js.map +1 -1
- package/dist/ai.js +6 -6
- package/dist/ai.js.map +1 -1
- package/dist/index.d.ts +16 -2
- package/dist/index.js +339 -318
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1560,7 +1560,7 @@ function useTokenVar() {
|
|
|
1560
1560
|
}
|
|
1561
1561
|
|
|
1562
1562
|
// src/version.ts
|
|
1563
|
-
var ABP_UI_VERSION = true ? "0.2.0-next.
|
|
1563
|
+
var ABP_UI_VERSION = true ? "0.2.0-next.25" : "0.0.0-dev";
|
|
1564
1564
|
|
|
1565
1565
|
// src/provider/time-zone.tsx
|
|
1566
1566
|
import { createContext, useContext } from "react";
|
|
@@ -1752,6 +1752,7 @@ import {
|
|
|
1752
1752
|
Button as ChakraButton,
|
|
1753
1753
|
IconButton as ChakraIconButton
|
|
1754
1754
|
} from "@chakra-ui/react";
|
|
1755
|
+
import { Plus } from "lucide-react";
|
|
1755
1756
|
|
|
1756
1757
|
// src/skeleton/loading.tsx
|
|
1757
1758
|
import { createContext as createContext3, useContext as useContext3, useEffect, useRef, useState } from "react";
|
|
@@ -1862,7 +1863,7 @@ function boneWidth(index, min = 8, max = 20) {
|
|
|
1862
1863
|
}
|
|
1863
1864
|
|
|
1864
1865
|
// src/components/Button.tsx
|
|
1865
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
1866
|
+
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1866
1867
|
var chakraVariant = { primary: "solid", secondary: "outline", ghost: "ghost", link: "plain" };
|
|
1867
1868
|
function palette2(variant, danger) {
|
|
1868
1869
|
if (danger) return "danger";
|
|
@@ -1885,7 +1886,29 @@ var Button = forwardRef(function Button2({ variant = "secondary", size = "md", d
|
|
|
1885
1886
|
}
|
|
1886
1887
|
);
|
|
1887
1888
|
});
|
|
1888
|
-
var
|
|
1889
|
+
var AddButton = forwardRef(function AddButton2({ size = "sm", children, ...rest }, ref) {
|
|
1890
|
+
return /* @__PURE__ */ jsxs2(
|
|
1891
|
+
Button,
|
|
1892
|
+
{
|
|
1893
|
+
ref,
|
|
1894
|
+
variant: "link",
|
|
1895
|
+
size,
|
|
1896
|
+
color: "fg.link",
|
|
1897
|
+
fontWeight: "bold",
|
|
1898
|
+
px: "2",
|
|
1899
|
+
minH: "8",
|
|
1900
|
+
textStyle: "sm",
|
|
1901
|
+
_icon: { width: "4", height: "4" },
|
|
1902
|
+
"data-add": "",
|
|
1903
|
+
...rest,
|
|
1904
|
+
children: [
|
|
1905
|
+
/* @__PURE__ */ jsx5(Plus, { "aria-hidden": true }),
|
|
1906
|
+
children
|
|
1907
|
+
]
|
|
1908
|
+
}
|
|
1909
|
+
);
|
|
1910
|
+
});
|
|
1911
|
+
var IconButton = forwardRef(function IconButton2({ variant = "ghost", size = "md", danger, remove, type = "button", title, css, ...rest }, ref) {
|
|
1889
1912
|
const skeleton = useLoading();
|
|
1890
1913
|
return /* @__PURE__ */ jsx5(
|
|
1891
1914
|
ChakraIconButton,
|
|
@@ -1894,7 +1917,8 @@ var IconButton = forwardRef(function IconButton2({ variant = "ghost", size = "md
|
|
|
1894
1917
|
type,
|
|
1895
1918
|
size,
|
|
1896
1919
|
variant: chakraVariant[variant],
|
|
1897
|
-
colorPalette: palette2(variant, danger),
|
|
1920
|
+
colorPalette: palette2(variant, danger || remove),
|
|
1921
|
+
...remove && { color: "fg.muted", _hover: { bg: "colorPalette.subtle", color: "colorPalette.fg" } },
|
|
1898
1922
|
title: title ?? rest["aria-label"],
|
|
1899
1923
|
css: skeleton ? [ghostCss, css] : css,
|
|
1900
1924
|
tabIndex: skeleton ? -1 : void 0,
|
|
@@ -1905,7 +1929,7 @@ var IconButton = forwardRef(function IconButton2({ variant = "ghost", size = "md
|
|
|
1905
1929
|
});
|
|
1906
1930
|
|
|
1907
1931
|
// src/components/ConfirmDialog.tsx
|
|
1908
|
-
import { jsx as jsx6, jsxs as
|
|
1932
|
+
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1909
1933
|
function ConfirmDialog({
|
|
1910
1934
|
open,
|
|
1911
1935
|
onOpenChange,
|
|
@@ -1928,12 +1952,12 @@ function ConfirmDialog({
|
|
|
1928
1952
|
initialFocusEl: () => cancelRef.current,
|
|
1929
1953
|
size: "sm",
|
|
1930
1954
|
placement: "center",
|
|
1931
|
-
children: /* @__PURE__ */
|
|
1955
|
+
children: /* @__PURE__ */ jsxs3(Portal, { children: [
|
|
1932
1956
|
/* @__PURE__ */ jsx6(Dialog.Backdrop, {}),
|
|
1933
|
-
/* @__PURE__ */ jsx6(Dialog.Positioner, { children: /* @__PURE__ */
|
|
1957
|
+
/* @__PURE__ */ jsx6(Dialog.Positioner, { children: /* @__PURE__ */ jsxs3(Dialog.Content, { children: [
|
|
1934
1958
|
/* @__PURE__ */ jsx6(Dialog.Header, { children: /* @__PURE__ */ jsx6(Dialog.Title, { children: title }) }),
|
|
1935
1959
|
description != null && /* @__PURE__ */ jsx6(Dialog.Body, { children: /* @__PURE__ */ jsx6(Dialog.Description, { children: description }) }),
|
|
1936
|
-
/* @__PURE__ */
|
|
1960
|
+
/* @__PURE__ */ jsxs3(Dialog.Footer, { children: [
|
|
1937
1961
|
/* @__PURE__ */ jsx6(Dialog.ActionTrigger, { asChild: true, children: /* @__PURE__ */ jsx6(Button, { ref: cancelRef, variant: "secondary", children: cancelLabel ?? labels.cancel }) }),
|
|
1938
1962
|
/* @__PURE__ */ jsx6(Button, { variant: "primary", danger, loading: busy, onClick: () => void onConfirm(), children: confirmLabel ?? labels.confirm })
|
|
1939
1963
|
] }),
|
|
@@ -1959,7 +1983,7 @@ function ConfirmProvider({ children }) {
|
|
|
1959
1983
|
resolver.current = null;
|
|
1960
1984
|
setState((s) => s ? { ...s, open: false } : s);
|
|
1961
1985
|
}, []);
|
|
1962
|
-
return /* @__PURE__ */
|
|
1986
|
+
return /* @__PURE__ */ jsxs3(ConfirmContext.Provider, { value: confirm, children: [
|
|
1963
1987
|
children,
|
|
1964
1988
|
state && /* @__PURE__ */ jsx6(
|
|
1965
1989
|
ConfirmDialog,
|
|
@@ -2071,7 +2095,7 @@ var springs = {
|
|
|
2071
2095
|
};
|
|
2072
2096
|
|
|
2073
2097
|
// src/motion/Celebrate.tsx
|
|
2074
|
-
import { jsx as jsx7, jsxs as
|
|
2098
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2075
2099
|
var CelebrateContext = createContext6(() => {
|
|
2076
2100
|
});
|
|
2077
2101
|
function useCelebrate() {
|
|
@@ -2096,7 +2120,7 @@ function CelebrationLayer({ children }) {
|
|
|
2096
2120
|
},
|
|
2097
2121
|
[reduce]
|
|
2098
2122
|
);
|
|
2099
|
-
return /* @__PURE__ */
|
|
2123
|
+
return /* @__PURE__ */ jsxs4(CelebrateContext.Provider, { value: celebrate, children: [
|
|
2100
2124
|
children,
|
|
2101
2125
|
bursts.length > 0 && /* @__PURE__ */ jsx7(Portal2, { children: /* @__PURE__ */ jsx7(chakra3.div, { position: "fixed", inset: "0", pointerEvents: "none", zIndex: "toast", "aria-hidden": "true", children: /* @__PURE__ */ jsx7(AnimatePresence, { children: bursts.map(
|
|
2102
2126
|
(b) => b.particles.map((p, i) => /* @__PURE__ */ jsx7(
|
|
@@ -2156,7 +2180,7 @@ function MotionProvider({ setting: initial = "system", children }) {
|
|
|
2156
2180
|
|
|
2157
2181
|
// src/components/Toaster.tsx
|
|
2158
2182
|
import { createToaster, Portal as Portal3, Spinner, Stack, Toast, Toaster as ChakraToaster } from "@chakra-ui/react";
|
|
2159
|
-
import { jsx as jsx9, jsxs as
|
|
2183
|
+
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2160
2184
|
var toaster = createToaster({ placement: "bottom-end", pauseOnPageIdle: true, max: 5 });
|
|
2161
2185
|
function toastDuration(type) {
|
|
2162
2186
|
return type === "error" || type === "loading" ? Infinity : 6e3;
|
|
@@ -2177,9 +2201,9 @@ var rtlPlacementFix = {
|
|
|
2177
2201
|
}
|
|
2178
2202
|
};
|
|
2179
2203
|
function Toaster() {
|
|
2180
|
-
return /* @__PURE__ */ jsx9(Portal3, { children: /* @__PURE__ */ jsx9(ChakraToaster, { toaster, insetInline: { mdDown: "4" }, css: rtlPlacementFix, children: (toast) => /* @__PURE__ */
|
|
2204
|
+
return /* @__PURE__ */ jsx9(Portal3, { children: /* @__PURE__ */ jsx9(ChakraToaster, { toaster, insetInline: { mdDown: "4" }, css: rtlPlacementFix, children: (toast) => /* @__PURE__ */ jsxs5(Toast.Root, { width: { md: "sm" }, children: [
|
|
2181
2205
|
toast.type === "loading" ? /* @__PURE__ */ jsx9(Spinner, { size: "sm", color: "fg.accent" }) : /* @__PURE__ */ jsx9(Toast.Indicator, {}),
|
|
2182
|
-
/* @__PURE__ */
|
|
2206
|
+
/* @__PURE__ */ jsxs5(Stack, { gap: "0.5", flex: "1", maxWidth: "full", children: [
|
|
2183
2207
|
toast.title && /* @__PURE__ */ jsx9(Toast.Title, { children: toast.title }),
|
|
2184
2208
|
toast.description && /* @__PURE__ */ jsx9(Toast.Description, { children: toast.description })
|
|
2185
2209
|
] }),
|
|
@@ -2227,7 +2251,7 @@ function ColorModeToggle({ size = "sm" }) {
|
|
|
2227
2251
|
import { useState as useState5 } from "react";
|
|
2228
2252
|
import createCache from "@emotion/cache";
|
|
2229
2253
|
import { CacheProvider } from "@emotion/react";
|
|
2230
|
-
import { Fragment as Fragment2, jsx as jsx11, jsxs as
|
|
2254
|
+
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2231
2255
|
function EmotionRegistry({ useServerInsertedHTML, children }) {
|
|
2232
2256
|
const [{ cache, flush }] = useState5(() => {
|
|
2233
2257
|
const cache2 = createCache({ key: "css" });
|
|
@@ -2261,7 +2285,7 @@ function EmotionRegistry({ useServerInsertedHTML, children }) {
|
|
|
2261
2285
|
attribute += ` ${name}`;
|
|
2262
2286
|
}
|
|
2263
2287
|
}
|
|
2264
|
-
return /* @__PURE__ */
|
|
2288
|
+
return /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
2265
2289
|
globals.map(({ name, style }) => (
|
|
2266
2290
|
// Emotion's own CSS, written by its serializer from the host's theme: no person's input.
|
|
2267
2291
|
/* @__PURE__ */ jsx11("style", { "data-emotion": `${cache.key}-global ${name}`, dangerouslySetInnerHTML: { __html: style } }, name)
|
|
@@ -2458,11 +2482,11 @@ import { chakra as chakra5, Dialog as Dialog2, Grid, HStack, Input, Portal as Po
|
|
|
2458
2482
|
// src/components/Field.tsx
|
|
2459
2483
|
import { forwardRef as forwardRef2 } from "react";
|
|
2460
2484
|
import { chakra as chakra4, Checkbox, Field as ChakraField, NativeSelect, Switch } from "@chakra-ui/react";
|
|
2461
|
-
import { jsx as jsx13, jsxs as
|
|
2485
|
+
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2462
2486
|
var Field = forwardRef2(function Field2({ label, helperText, errorText: errorText2, optionalText, invalid, loading: own, children, ...rest }, ref) {
|
|
2463
2487
|
const loading = useLoading(own);
|
|
2464
|
-
return /* @__PURE__ */
|
|
2465
|
-
label != null && /* @__PURE__ */
|
|
2488
|
+
return /* @__PURE__ */ jsxs7(ChakraField.Root, { ref, invalid: invalid ?? Boolean(errorText2), ...rest, children: [
|
|
2489
|
+
label != null && /* @__PURE__ */ jsxs7(ChakraField.Label, { children: [
|
|
2466
2490
|
label,
|
|
2467
2491
|
/* @__PURE__ */ jsx13(ChakraField.RequiredIndicator, { fallback: optionalText })
|
|
2468
2492
|
] }),
|
|
@@ -2474,14 +2498,14 @@ var Field = forwardRef2(function Field2({ label, helperText, errorText: errorTex
|
|
|
2474
2498
|
var FormField = Field;
|
|
2475
2499
|
var SelectField = forwardRef2(function SelectField2({ options, size = "md", width, disabled, loading: own, ...rest }, ref) {
|
|
2476
2500
|
const loading = useLoading(own);
|
|
2477
|
-
return /* @__PURE__ */
|
|
2501
|
+
return /* @__PURE__ */ jsxs7(NativeSelect.Root, { size, width, disabled, borderRadius: "l2", "aria-hidden": loading || void 0, css: loading ? ghostCss : void 0, children: [
|
|
2478
2502
|
/* @__PURE__ */ jsx13(NativeSelect.Field, { ref, ...rest, children: options.map((o) => /* @__PURE__ */ jsx13("option", { value: o.value, disabled: o.disabled, children: o.label }, o.value)) }),
|
|
2479
2503
|
/* @__PURE__ */ jsx13(NativeSelect.Indicator, {})
|
|
2480
2504
|
] });
|
|
2481
2505
|
});
|
|
2482
2506
|
function CheckboxField({ label, checked, onCheckedChange, loading: own, ...rest }) {
|
|
2483
2507
|
const loading = useLoading(own);
|
|
2484
|
-
return /* @__PURE__ */
|
|
2508
|
+
return /* @__PURE__ */ jsxs7(Checkbox.Root, { checked, onCheckedChange: (e) => onCheckedChange(e.checked === true), ...rest, children: [
|
|
2485
2509
|
/* @__PURE__ */ jsx13(Checkbox.HiddenInput, {}),
|
|
2486
2510
|
/* @__PURE__ */ jsx13(Checkbox.Control, { css: loading ? ghostCss : void 0 }),
|
|
2487
2511
|
/* @__PURE__ */ jsx13(Checkbox.Label, { children: label })
|
|
@@ -2489,7 +2513,7 @@ function CheckboxField({ label, checked, onCheckedChange, loading: own, ...rest
|
|
|
2489
2513
|
}
|
|
2490
2514
|
function SwitchField({ label, checked, onCheckedChange, loading: own, ...rest }) {
|
|
2491
2515
|
const loading = useLoading(own);
|
|
2492
|
-
return /* @__PURE__ */
|
|
2516
|
+
return /* @__PURE__ */ jsxs7(Switch.Root, { checked, onCheckedChange: (e) => onCheckedChange(e.checked), ...rest, children: [
|
|
2493
2517
|
/* @__PURE__ */ jsx13(Switch.HiddenInput, {}),
|
|
2494
2518
|
/* @__PURE__ */ jsx13(Switch.Control, { css: loading ? ghostCss : void 0, children: /* @__PURE__ */ jsx13(Switch.Thumb, {}) }),
|
|
2495
2519
|
/* @__PURE__ */ jsx13(Switch.Label, { children: label })
|
|
@@ -2498,14 +2522,14 @@ function SwitchField({ label, checked, onCheckedChange, loading: own, ...rest })
|
|
|
2498
2522
|
|
|
2499
2523
|
// src/components/InlineAlert.tsx
|
|
2500
2524
|
import { Alert } from "@chakra-ui/react";
|
|
2501
|
-
import { jsx as jsx14, jsxs as
|
|
2525
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2502
2526
|
var statusOf = { neutral: "neutral", success: "success", warning: "warning", danger: "error", info: "info" };
|
|
2503
2527
|
function InlineAlert({ tone = "info", title, children, size = "md", ...rest }) {
|
|
2504
2528
|
const empty = (children == null || children === false || children === "") && title == null;
|
|
2505
2529
|
if (empty) return null;
|
|
2506
|
-
return /* @__PURE__ */
|
|
2530
|
+
return /* @__PURE__ */ jsxs8(Alert.Root, { status: statusOf[tone], size, role: tone === "danger" ? "alert" : "status", ...rest, children: [
|
|
2507
2531
|
/* @__PURE__ */ jsx14(Alert.Indicator, {}),
|
|
2508
|
-
/* @__PURE__ */
|
|
2532
|
+
/* @__PURE__ */ jsxs8(Alert.Content, { children: [
|
|
2509
2533
|
title != null && /* @__PURE__ */ jsx14(Alert.Title, { children: title }),
|
|
2510
2534
|
children != null && children !== false && /* @__PURE__ */ jsx14(Alert.Description, { children })
|
|
2511
2535
|
] })
|
|
@@ -2884,7 +2908,7 @@ async function getPasskey(options, signal) {
|
|
|
2884
2908
|
}
|
|
2885
2909
|
|
|
2886
2910
|
// src/host/StepUpDialog.tsx
|
|
2887
|
-
import { Fragment as Fragment3, jsx as jsx16, jsxs as
|
|
2911
|
+
import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2888
2912
|
var useStepUpTexts = createAreaTexts("stepUp", { en: en_default, ar: ar_default });
|
|
2889
2913
|
function looksLikeCode(value, recovery) {
|
|
2890
2914
|
return recovery ? value.replace(/[^A-Za-z0-9]/g, "").length === 10 : value.replace(/\D/g, "").length === 6 && !/[^\d\s]/.test(value);
|
|
@@ -3128,14 +3152,14 @@ function StepUpDialog() {
|
|
|
3128
3152
|
method
|
|
3129
3153
|
) });
|
|
3130
3154
|
const passwordField = (focus) => /* @__PURE__ */ jsx16(Field, { label: t("password"), children: /* @__PURE__ */ jsx16(Input, { type: "password", autoComplete: "current-password", autoFocus: focus, value: password, onChange: (e) => setPassword(e.target.value) }) });
|
|
3131
|
-
const footer = (submit, disabled = false, onBack) => /* @__PURE__ */ jsx16(Dialog2.Footer, { children: /* @__PURE__ */
|
|
3155
|
+
const footer = (submit, disabled = false, onBack) => /* @__PURE__ */ jsx16(Dialog2.Footer, { children: /* @__PURE__ */ jsxs9(HStack, { children: [
|
|
3132
3156
|
onBack ? /* @__PURE__ */ jsx16(Button, { variant: "secondary", onClick: onBack, disabled: busy, children: t("back") }) : /* @__PURE__ */ jsx16(Button, { variant: "secondary", onClick: () => close(false), disabled: busy, children: t("cancel") }),
|
|
3133
3157
|
submit && /* @__PURE__ */ jsx16(Button, { type: "submit", loading: busy, disabled, children: submit })
|
|
3134
3158
|
] }) });
|
|
3135
3159
|
let body;
|
|
3136
3160
|
if (stage === "passkey") {
|
|
3137
|
-
body = /* @__PURE__ */
|
|
3138
|
-
/* @__PURE__ */ jsx16(Dialog2.Body, { children: /* @__PURE__ */
|
|
3161
|
+
body = /* @__PURE__ */ jsxs9(Fragment3, { children: [
|
|
3162
|
+
/* @__PURE__ */ jsx16(Dialog2.Body, { children: /* @__PURE__ */ jsxs9(Stack2, { gap: "field", align: "start", children: [
|
|
3139
3163
|
/* @__PURE__ */ jsx16(Text, { color: "fg.muted", children: t("strongWhy") }),
|
|
3140
3164
|
/* @__PURE__ */ jsx16(Button, { variant: "primary", onClick: () => void withPasskey(), loading: busy, "data-testid": "use-passkey", children: t("usePasskey") }),
|
|
3141
3165
|
busy && /* @__PURE__ */ jsx16(Text, { textStyle: "sm", color: "fg.muted", children: t("passkeyPrompt") }),
|
|
@@ -3145,12 +3169,12 @@ function StepUpDialog() {
|
|
|
3145
3169
|
footer(null)
|
|
3146
3170
|
] });
|
|
3147
3171
|
} else if (stage === "code") {
|
|
3148
|
-
body = /* @__PURE__ */
|
|
3149
|
-
/* @__PURE__ */ jsx16(Dialog2.Body, { children: /* @__PURE__ */
|
|
3172
|
+
body = /* @__PURE__ */ jsxs9("form", { onSubmit: (e) => void confirmCode(e), children: [
|
|
3173
|
+
/* @__PURE__ */ jsx16(Dialog2.Body, { children: /* @__PURE__ */ jsxs9(Stack2, { gap: "field", children: [
|
|
3150
3174
|
/* @__PURE__ */ jsx16(Text, { color: "fg.muted", children: t("appCodeWhy") }),
|
|
3151
3175
|
codeInput(t("code")),
|
|
3152
3176
|
/* @__PURE__ */ jsx16(InlineAlert, { tone: "danger", children: error }),
|
|
3153
|
-
/* @__PURE__ */
|
|
3177
|
+
/* @__PURE__ */ jsxs9(Stack2, { gap: "0.5", align: "start", children: [
|
|
3154
3178
|
need?.methods.includes("passkey") && canPasskey && /* @__PURE__ */ jsx16(Button, { variant: "link", size: "sm", onClick: () => toStage("passkey"), children: t("usePasskey") }),
|
|
3155
3179
|
!strong && /* @__PURE__ */ jsx16(Button, { variant: "link", size: "sm", onClick: () => toStage("confirm"), "data-testid": "use-password", children: t("usePassword") })
|
|
3156
3180
|
] })
|
|
@@ -3158,8 +3182,8 @@ function StepUpDialog() {
|
|
|
3158
3182
|
footer(t("confirm"), !looksLikeCode(code, false))
|
|
3159
3183
|
] });
|
|
3160
3184
|
} else if (stage === "confirm" && strong && !settingUp) {
|
|
3161
|
-
body = /* @__PURE__ */
|
|
3162
|
-
/* @__PURE__ */ jsx16(Dialog2.Body, { children: /* @__PURE__ */
|
|
3185
|
+
body = /* @__PURE__ */ jsxs9("form", { onSubmit: (e) => void confirm(e), children: [
|
|
3186
|
+
/* @__PURE__ */ jsx16(Dialog2.Body, { children: /* @__PURE__ */ jsxs9(Stack2, { gap: "field", children: [
|
|
3163
3187
|
/* @__PURE__ */ jsx16(Text, { color: "fg.muted", children: need?.methods.includes("passkey") ? t("strongWhy") : t("strongWhyApp") }),
|
|
3164
3188
|
passwordField(true),
|
|
3165
3189
|
codeInput(t("code")),
|
|
@@ -3172,19 +3196,19 @@ function StepUpDialog() {
|
|
|
3172
3196
|
footer(t("confirm"), !password || !looksLikeCode(code, false))
|
|
3173
3197
|
] });
|
|
3174
3198
|
} else if (stage === "confirm") {
|
|
3175
|
-
body = /* @__PURE__ */
|
|
3176
|
-
/* @__PURE__ */ jsx16(Dialog2.Body, { children: /* @__PURE__ */
|
|
3177
|
-
settingUp ? /* @__PURE__ */
|
|
3199
|
+
body = /* @__PURE__ */ jsxs9("form", { onSubmit: (e) => void confirm(e), children: [
|
|
3200
|
+
/* @__PURE__ */ jsx16(Dialog2.Body, { children: /* @__PURE__ */ jsxs9(Stack2, { gap: "field", children: [
|
|
3201
|
+
settingUp ? /* @__PURE__ */ jsxs9(Stack2, { gap: "2", children: [
|
|
3178
3202
|
/* @__PURE__ */ jsx16(Text, { color: "fg.muted", children: t("setupWhy") }),
|
|
3179
3203
|
/* @__PURE__ */ jsx16(Text, { color: "fg.muted", children: t("setupPasswordWhy") })
|
|
3180
3204
|
] }) : /* @__PURE__ */ jsx16(Text, { color: "fg.muted", children: ways ? t("codeWhy") : t("why") }),
|
|
3181
3205
|
passwordField(!ways),
|
|
3182
|
-
ways && /* @__PURE__ */
|
|
3183
|
-
sender && !sentTo ? /* @__PURE__ */
|
|
3206
|
+
ways && /* @__PURE__ */ jsxs9(Stack2, { gap: "field", children: [
|
|
3207
|
+
sender && !sentTo ? /* @__PURE__ */ jsxs9(Stack2, { gap: "2", align: "start", children: [
|
|
3184
3208
|
/* @__PURE__ */ jsx16(Text, { children: t("sendTo", { to: sender.to }) }),
|
|
3185
3209
|
/* @__PURE__ */ jsx16(Button, { onClick: () => void sendCode(), loading: sending, loadingText: t("sending"), "data-testid": "send-code", children: t("send") })
|
|
3186
3210
|
] }) : codeInput(recovery ? t("recoveryCode") : sender ? t("sentCode") : t("code"), sentTo ? t("sent", { to: sentTo }) : void 0),
|
|
3187
|
-
/* @__PURE__ */
|
|
3211
|
+
/* @__PURE__ */ jsxs9(Stack2, { gap: "0.5", align: "start", children: [
|
|
3188
3212
|
sentTo && /* @__PURE__ */ jsx16(Button, { variant: "link", size: "sm", onClick: () => void sendCode(), disabled: sending, children: t("resend") }),
|
|
3189
3213
|
ways.hasApp && method !== "app" && /* @__PURE__ */ jsx16(Button, { variant: "link", size: "sm", onClick: () => switchTo("app"), children: t("useApp") }),
|
|
3190
3214
|
ways.senders.filter((s) => s.method !== method).map((s) => /* @__PURE__ */ jsx16(Button, { variant: "link", size: "sm", onClick: () => switchTo(s.method), "data-testid": `use-${s.method}`, children: t("byMethod", { name: nameOf(s) }) }, s.method)),
|
|
@@ -3197,8 +3221,8 @@ function StepUpDialog() {
|
|
|
3197
3221
|
footer(settingUp ? t("continue") : t("confirm"), !password || !!ways && !looksLikeCode(code, recovery))
|
|
3198
3222
|
] });
|
|
3199
3223
|
} else if (stage === "setup") {
|
|
3200
|
-
body = /* @__PURE__ */
|
|
3201
|
-
/* @__PURE__ */ jsx16(Dialog2.Body, { children: /* @__PURE__ */
|
|
3224
|
+
body = /* @__PURE__ */ jsxs9(Fragment3, { children: [
|
|
3225
|
+
/* @__PURE__ */ jsx16(Dialog2.Body, { children: /* @__PURE__ */ jsxs9(Stack2, { gap: "field", align: "start", children: [
|
|
3202
3226
|
/* @__PURE__ */ jsx16(Text, { color: "fg.muted", children: t("setupWhy") }),
|
|
3203
3227
|
canPasskey ? /* @__PURE__ */ jsx16(Button, { variant: "primary", onClick: () => {
|
|
3204
3228
|
setPasskeyName(t("passkeyNameDefault"));
|
|
@@ -3210,8 +3234,8 @@ function StepUpDialog() {
|
|
|
3210
3234
|
footer(null)
|
|
3211
3235
|
] });
|
|
3212
3236
|
} else if (stage === "setupPasskey") {
|
|
3213
|
-
body = /* @__PURE__ */
|
|
3214
|
-
/* @__PURE__ */ jsx16(Dialog2.Body, { children: /* @__PURE__ */
|
|
3237
|
+
body = /* @__PURE__ */ jsxs9("form", { onSubmit: (e) => void addPasskey(e), children: [
|
|
3238
|
+
/* @__PURE__ */ jsx16(Dialog2.Body, { children: /* @__PURE__ */ jsxs9(Stack2, { gap: "field", children: [
|
|
3215
3239
|
/* @__PURE__ */ jsx16(Field, { label: t("passkeyName"), children: /* @__PURE__ */ jsx16(Input, { value: passkeyName, maxLength: 64, autoFocus: true, onChange: (e) => setPasskeyName(e.target.value), "data-testid": "passkey-name" }) }),
|
|
3216
3240
|
busy && /* @__PURE__ */ jsx16(Text, { textStyle: "sm", color: "fg.muted", children: t("passkeyPrompt") }),
|
|
3217
3241
|
/* @__PURE__ */ jsx16(InlineAlert, { tone: "danger", children: error })
|
|
@@ -3222,11 +3246,11 @@ function StepUpDialog() {
|
|
|
3222
3246
|
})
|
|
3223
3247
|
] });
|
|
3224
3248
|
} else if (stage === "setupApp") {
|
|
3225
|
-
body = /* @__PURE__ */
|
|
3226
|
-
/* @__PURE__ */ jsx16(Dialog2.Body, { children: /* @__PURE__ */
|
|
3249
|
+
body = /* @__PURE__ */ jsxs9("form", { onSubmit: (e) => void confirmApp(e), children: [
|
|
3250
|
+
/* @__PURE__ */ jsx16(Dialog2.Body, { children: /* @__PURE__ */ jsxs9(Stack2, { gap: "field", children: [
|
|
3227
3251
|
/* @__PURE__ */ jsx16(Text, { color: "fg.muted", children: t("appScan") }),
|
|
3228
3252
|
/* @__PURE__ */ jsx16(chakra5.div, { bg: "white", p: "2", rounded: "l2", borderWidth: "1px", w: "fit-content", children: enrolment ? /* @__PURE__ */ jsx16(chakra5.img, { src: enrolment.qr, alt: t("appQrAlt"), width: "44", height: "44", "data-testid": "app-setup-qr" }) : /* @__PURE__ */ jsx16(chakra5.div, { width: "44", height: "44" }) }),
|
|
3229
|
-
/* @__PURE__ */
|
|
3253
|
+
/* @__PURE__ */ jsxs9(Stack2, { gap: "1", children: [
|
|
3230
3254
|
/* @__PURE__ */ jsx16(Text, { textStyle: "sm", color: "fg.muted", children: t("appCantScan") }),
|
|
3231
3255
|
/* @__PURE__ */ jsx16(chakra5.code, { dir: "ltr", textAlign: "start", fontFamily: "mono", fontSize: "sm", bg: "bg.muted", p: "2", rounded: "l2", wordBreak: "break-all", "data-testid": "app-setup-secret", children: enrolment ? enrolment.secret.replace(/(.{4})/g, "$1 ").trim() : " " })
|
|
3232
3256
|
] }),
|
|
@@ -3239,12 +3263,12 @@ function StepUpDialog() {
|
|
|
3239
3263
|
})
|
|
3240
3264
|
] });
|
|
3241
3265
|
} else {
|
|
3242
|
-
body = /* @__PURE__ */
|
|
3243
|
-
/* @__PURE__ */ jsx16(Dialog2.Body, { children: /* @__PURE__ */
|
|
3266
|
+
body = /* @__PURE__ */ jsxs9(Fragment3, { children: [
|
|
3267
|
+
/* @__PURE__ */ jsx16(Dialog2.Body, { children: /* @__PURE__ */ jsxs9(Stack2, { gap: "field", "data-testid": "recovery-codes", children: [
|
|
3244
3268
|
/* @__PURE__ */ jsx16(InlineAlert, { tone: "warning", children: t("recoveryHint") }),
|
|
3245
3269
|
/* @__PURE__ */ jsx16(Grid, { templateColumns: "repeat(2, max-content)", columnGap: "6", rowGap: "1.5", dir: "ltr", bg: "bg.muted", p: "3", rounded: "l2", w: "fit-content", children: recoveryCodes.map((c2) => /* @__PURE__ */ jsx16(chakra5.code, { fontFamily: "mono", fontSize: "sm", children: c2 }, c2)) })
|
|
3246
3270
|
] }) }),
|
|
3247
|
-
/* @__PURE__ */ jsx16(Dialog2.Footer, { children: /* @__PURE__ */
|
|
3271
|
+
/* @__PURE__ */ jsx16(Dialog2.Footer, { children: /* @__PURE__ */ jsxs9(HStack, { children: [
|
|
3248
3272
|
/* @__PURE__ */ jsx16(Button, { variant: "secondary", onClick: () => void copyCodes(), children: copied ? t("recoveryCopied") : t("recoveryCopy") }),
|
|
3249
3273
|
/* @__PURE__ */ jsx16(Button, { onClick: () => close(true), "data-testid": "recovery-codes-saved", children: t("recoverySaved") })
|
|
3250
3274
|
] }) })
|
|
@@ -3259,9 +3283,9 @@ function StepUpDialog() {
|
|
|
3259
3283
|
closeOnEscape: mayDismiss,
|
|
3260
3284
|
placement: "center",
|
|
3261
3285
|
role: "alertdialog",
|
|
3262
|
-
children: /* @__PURE__ */
|
|
3286
|
+
children: /* @__PURE__ */ jsxs9(Portal4, { children: [
|
|
3263
3287
|
/* @__PURE__ */ jsx16(Dialog2.Backdrop, {}),
|
|
3264
|
-
/* @__PURE__ */ jsx16(Dialog2.Positioner, { children: /* @__PURE__ */
|
|
3288
|
+
/* @__PURE__ */ jsx16(Dialog2.Positioner, { children: /* @__PURE__ */ jsxs9(Dialog2.Content, { "data-testid": "step-up", "data-stage": stage, children: [
|
|
3265
3289
|
/* @__PURE__ */ jsx16(Dialog2.Header, { children: /* @__PURE__ */ jsx16(Dialog2.Title, { children: title }) }),
|
|
3266
3290
|
body
|
|
3267
3291
|
] }) })
|
|
@@ -3287,14 +3311,14 @@ var AppLink = forwardRef3(function AppLink2({ href, children, ...rest }, ref) {
|
|
|
3287
3311
|
});
|
|
3288
3312
|
|
|
3289
3313
|
// src/provider/AbpProvider.tsx
|
|
3290
|
-
import { jsx as jsx18, jsxs as
|
|
3314
|
+
import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3291
3315
|
var defaultSystem = createAbpSystem();
|
|
3292
3316
|
function AbpProvider({ children, useServerInsertedHTML, ...props }) {
|
|
3293
3317
|
const tree = /* @__PURE__ */ jsx18(AbpTree, { ...props, children });
|
|
3294
3318
|
return useServerInsertedHTML ? /* @__PURE__ */ jsx18(EmotionRegistry, { useServerInsertedHTML, children: tree }) : tree;
|
|
3295
3319
|
}
|
|
3296
3320
|
function AbpTree({ children, system = defaultSystem, host, locale = "en", labels, linkComponent, defaultColorMode = "system", pluginTexts, productName, timeZone, motion }) {
|
|
3297
|
-
return /* @__PURE__ */ jsx18(ChakraProvider, { value: system, children: /* @__PURE__ */ jsx18(ColorModeProvider, { defaultTheme: defaultColorMode, children: /* @__PURE__ */ jsx18(LocaleProvider, { locale, children: /* @__PURE__ */ jsx18(TimeZoneProvider, { value: timeZone, children: /* @__PURE__ */ jsx18(HostProvider, { value: host, children: /* @__PURE__ */ jsx18(LabelsProvider, { value: labels, children: /* @__PURE__ */ jsx18(LinkComponentProvider, { value: linkComponent, children: /* @__PURE__ */ jsx18(PluginTextsProvider, { value: pluginTexts, product: productName, children: /* @__PURE__ */ jsx18(MotionProvider, { setting: motion, children: /* @__PURE__ */
|
|
3321
|
+
return /* @__PURE__ */ jsx18(ChakraProvider, { value: system, children: /* @__PURE__ */ jsx18(ColorModeProvider, { defaultTheme: defaultColorMode, children: /* @__PURE__ */ jsx18(LocaleProvider, { locale, children: /* @__PURE__ */ jsx18(TimeZoneProvider, { value: timeZone, children: /* @__PURE__ */ jsx18(HostProvider, { value: host, children: /* @__PURE__ */ jsx18(LabelsProvider, { value: labels, children: /* @__PURE__ */ jsx18(LinkComponentProvider, { value: linkComponent, children: /* @__PURE__ */ jsx18(PluginTextsProvider, { value: pluginTexts, product: productName, children: /* @__PURE__ */ jsx18(MotionProvider, { setting: motion, children: /* @__PURE__ */ jsxs10(ConfirmProvider, { children: [
|
|
3298
3322
|
children,
|
|
3299
3323
|
host?.paths.guard !== void 0 && host.stepUpDialog !== false && /* @__PURE__ */ jsx18(StepUpDialog, {}),
|
|
3300
3324
|
/* @__PURE__ */ jsx18(Toaster, {})
|
|
@@ -3350,7 +3374,7 @@ function useFormatters() {
|
|
|
3350
3374
|
}
|
|
3351
3375
|
|
|
3352
3376
|
// src/components/TranslatedInput.tsx
|
|
3353
|
-
import { jsx as jsx19, jsxs as
|
|
3377
|
+
import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3354
3378
|
var MIN_QUERY = 2;
|
|
3355
3379
|
var LIST_MAX_HEIGHT = 288;
|
|
3356
3380
|
function TranslatedInput({
|
|
@@ -3451,7 +3475,7 @@ function TranslatedInput({
|
|
|
3451
3475
|
}
|
|
3452
3476
|
}
|
|
3453
3477
|
const shown = pickName(chain, value, fallback);
|
|
3454
|
-
return /* @__PURE__ */
|
|
3478
|
+
return /* @__PURE__ */ jsxs11(Group, { attached: true, w: "full", children: [
|
|
3455
3479
|
/* @__PURE__ */ jsx19(
|
|
3456
3480
|
Input2,
|
|
3457
3481
|
{
|
|
@@ -3503,7 +3527,7 @@ function TranslatedInput({
|
|
|
3503
3527
|
shadow: "lg",
|
|
3504
3528
|
py: "1",
|
|
3505
3529
|
style: place,
|
|
3506
|
-
children: suggestions.map((s, i) => /* @__PURE__ */
|
|
3530
|
+
children: suggestions.map((s, i) => /* @__PURE__ */ jsxs11(
|
|
3507
3531
|
Box,
|
|
3508
3532
|
{
|
|
3509
3533
|
as: "li",
|
|
@@ -3520,11 +3544,11 @@ function TranslatedInput({
|
|
|
3520
3544
|
pick(s);
|
|
3521
3545
|
},
|
|
3522
3546
|
children: [
|
|
3523
|
-
/* @__PURE__ */
|
|
3547
|
+
/* @__PURE__ */ jsxs11(HStack2, { justify: "space-between", gap: "3", align: "baseline", children: [
|
|
3524
3548
|
/* @__PURE__ */ jsx19(Text2, { textStyle: "body.sm", fontWeight: "medium", lang: current.code, dir: dirOf(current), children: s.names[current.code] ?? /* @__PURE__ */ jsx19(chakra6.span, { color: "fg.muted", children: pickName(chain, s.names, "") }) }),
|
|
3525
3549
|
s.source && /* @__PURE__ */ jsx19(Text2, { fontSize: "xs", color: "fg.muted", flexShrink: 0, children: s.source })
|
|
3526
3550
|
] }),
|
|
3527
|
-
others.length > 0 && /* @__PURE__ */ jsx19(Text2, { fontSize: "xs", color: "fg.muted", children: others.map((l, j) => /* @__PURE__ */
|
|
3551
|
+
others.length > 0 && /* @__PURE__ */ jsx19(Text2, { fontSize: "xs", color: "fg.muted", children: others.map((l, j) => /* @__PURE__ */ jsxs11(chakra6.span, { children: [
|
|
3528
3552
|
j > 0 && " \xB7 ",
|
|
3529
3553
|
/* @__PURE__ */ jsx19(chakra6.span, { lang: l.code, dir: dirOf(l), children: s.names[l.code] ?? EMPTY_VALUE })
|
|
3530
3554
|
] }, l.code)) })
|
|
@@ -3534,8 +3558,8 @@ function TranslatedInput({
|
|
|
3534
3558
|
))
|
|
3535
3559
|
}
|
|
3536
3560
|
) }),
|
|
3537
|
-
others.length > 0 && /* @__PURE__ */
|
|
3538
|
-
/* @__PURE__ */ jsx19(Popover.Trigger, { asChild: true, children: /* @__PURE__ */
|
|
3561
|
+
others.length > 0 && /* @__PURE__ */ jsxs11(Popover.Root, { positioning: { placement: "bottom-end" }, lazyMount: true, unmountOnExit: true, children: [
|
|
3562
|
+
/* @__PURE__ */ jsx19(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs11(
|
|
3539
3563
|
Button,
|
|
3540
3564
|
{
|
|
3541
3565
|
variant: "secondary",
|
|
@@ -3546,7 +3570,7 @@ function TranslatedInput({
|
|
|
3546
3570
|
"data-testid": "translations",
|
|
3547
3571
|
children: [
|
|
3548
3572
|
/* @__PURE__ */ jsx19(Languages, {}),
|
|
3549
|
-
/* @__PURE__ */
|
|
3573
|
+
/* @__PURE__ */ jsxs11(Text2, { as: "span", fontVariantNumeric: "tabular-nums", color: filled < others.length ? "fg.muted" : void 0, children: [
|
|
3550
3574
|
filled,
|
|
3551
3575
|
"/",
|
|
3552
3576
|
others.length
|
|
@@ -3554,17 +3578,17 @@ function TranslatedInput({
|
|
|
3554
3578
|
]
|
|
3555
3579
|
}
|
|
3556
3580
|
) }),
|
|
3557
|
-
/* @__PURE__ */ jsx19(Portal5, { children: /* @__PURE__ */ jsx19(Popover.Positioner, { children: /* @__PURE__ */
|
|
3581
|
+
/* @__PURE__ */ jsx19(Portal5, { children: /* @__PURE__ */ jsx19(Popover.Positioner, { children: /* @__PURE__ */ jsxs11(Popover.Content, { w: "sm", maxW: "calc(100vw - 32px)", children: [
|
|
3558
3582
|
/* @__PURE__ */ jsx19(Popover.Arrow, {}),
|
|
3559
|
-
/* @__PURE__ */
|
|
3583
|
+
/* @__PURE__ */ jsxs11(Popover.Body, { children: [
|
|
3560
3584
|
/* @__PURE__ */ jsx19(Text2, { textStyle: "label", mb: "2", children: labels.title }),
|
|
3561
3585
|
/* @__PURE__ */ jsx19(Stack3, { gap: "3", children: others.map((l) => {
|
|
3562
3586
|
const own = value[l.code] ?? "";
|
|
3563
3587
|
const fallbackShown = pickName([l.code, ...chain.filter((c2) => c2 !== l.code)], { ...value, [l.code]: "" }, fallback);
|
|
3564
|
-
return /* @__PURE__ */
|
|
3565
|
-
/* @__PURE__ */
|
|
3588
|
+
return /* @__PURE__ */ jsxs11(Box, { children: [
|
|
3589
|
+
/* @__PURE__ */ jsxs11(chakra6.label, { htmlFor: `tr-${listId}-${l.code}`, textStyle: "body.sm", fontWeight: "medium", children: [
|
|
3566
3590
|
l.name,
|
|
3567
|
-
l.englishName && l.englishName !== l.name && /* @__PURE__ */
|
|
3591
|
+
l.englishName && l.englishName !== l.name && /* @__PURE__ */ jsxs11(Text2, { as: "span", color: "fg.muted", fontWeight: "normal", children: [
|
|
3568
3592
|
" \xB7 ",
|
|
3569
3593
|
l.englishName
|
|
3570
3594
|
] })
|
|
@@ -3628,7 +3652,7 @@ function pageList(page, pages) {
|
|
|
3628
3652
|
}
|
|
3629
3653
|
|
|
3630
3654
|
// src/components/Pagination.tsx
|
|
3631
|
-
import { jsx as jsx20, jsxs as
|
|
3655
|
+
import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3632
3656
|
var button = {
|
|
3633
3657
|
display: "inline-flex",
|
|
3634
3658
|
alignItems: "center",
|
|
@@ -3653,7 +3677,7 @@ function Pagination({ page, pages, onPage, label, previous, next, pageLabel, dis
|
|
|
3653
3677
|
const rangeText = form === "simple" && range ? /* @__PURE__ */ jsx20(Text3, { as: "span", textStyle: "caption", color: "fg.muted", fontVariantNumeric: "tabular-nums", whiteSpace: "nowrap", "aria-live": "polite", children: range }) : null;
|
|
3654
3678
|
if (pages <= 1) return rangeText ? /* @__PURE__ */ jsx20(chakra8.nav, { "aria-label": label, display: "flex", justifyContent: "center", children: rangeText }) : null;
|
|
3655
3679
|
const go = (n) => onPage(Math.min(pages, Math.max(1, n)));
|
|
3656
|
-
return /* @__PURE__ */ jsx20(chakra8.nav, { "aria-label": label, children: /* @__PURE__ */
|
|
3680
|
+
return /* @__PURE__ */ jsx20(chakra8.nav, { "aria-label": label, children: /* @__PURE__ */ jsxs12(HStack3, { gap: "1", justify: "center", wrap: "wrap", children: [
|
|
3657
3681
|
rangeText && /* @__PURE__ */ jsx20(chakra8.span, { marginEnd: "3", display: "inline-flex", children: rangeText }),
|
|
3658
3682
|
/* @__PURE__ */ jsx20(chakra8.button, { type: "button", css: button, "aria-label": previous, title: previous, disabled: disabled || page <= 1, onClick: () => go(page - 1), children: /* @__PURE__ */ jsx20(DirectionalIcon, { children: /* @__PURE__ */ jsx20(ChevronLeft, {}) }) }),
|
|
3659
3683
|
form === "compact" && pageOf && /* @__PURE__ */ jsx20(Text3, { as: "span", textStyle: "sm", px: "1", fontVariantNumeric: "tabular-nums", whiteSpace: "nowrap", children: pageOf }),
|
|
@@ -3679,7 +3703,7 @@ function Pagination({ page, pages, onPage, label, previous, next, pageLabel, dis
|
|
|
3679
3703
|
}
|
|
3680
3704
|
|
|
3681
3705
|
// src/components/ListFooter.tsx
|
|
3682
|
-
import { jsx as jsx21, jsxs as
|
|
3706
|
+
import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3683
3707
|
function ListFooter({ list, form = "simple" }) {
|
|
3684
3708
|
const labels = useAbpLabels().queryList;
|
|
3685
3709
|
const { locale } = useAbpLocale();
|
|
@@ -3689,7 +3713,7 @@ function ListFooter({ list, form = "simple" }) {
|
|
|
3689
3713
|
const from = (page - 1) * pageSize + 1;
|
|
3690
3714
|
const to = Math.min(page * pageSize, list.total);
|
|
3691
3715
|
const range = formatMessage(locale, labels.range, { from: fmt.number(from), to: fmt.number(to), total: fmt.number(list.total) });
|
|
3692
|
-
return /* @__PURE__ */
|
|
3716
|
+
return /* @__PURE__ */ jsxs13(Flex, { gap: "3", align: "center", justify: form === "simple" ? "center" : "space-between", wrap: "wrap", "data-testid": "list-footer", children: [
|
|
3693
3717
|
/* @__PURE__ */ jsx21(
|
|
3694
3718
|
Pagination,
|
|
3695
3719
|
{
|
|
@@ -3722,8 +3746,8 @@ function useSettledValue(value, ms = 250) {
|
|
|
3722
3746
|
// src/components/SearchPicker.tsx
|
|
3723
3747
|
import { Fragment as Fragment4, useEffect as useEffect7, useId as useId2, useMemo as useMemo5, useState as useState10 } from "react";
|
|
3724
3748
|
import { Box as Box2, chakra as chakra9, Input as Input3, Spinner as Spinner2, Text as Text5 } from "@chakra-ui/react";
|
|
3725
|
-
import { Plus } from "lucide-react";
|
|
3726
|
-
import { Fragment as Fragment5, jsx as jsx22, jsxs as
|
|
3749
|
+
import { Plus as Plus2 } from "lucide-react";
|
|
3750
|
+
import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3727
3751
|
var CREATE = /* @__PURE__ */ Symbol("create");
|
|
3728
3752
|
var SHOWN2 = 8;
|
|
3729
3753
|
function Highlight({ text, query }) {
|
|
@@ -3839,7 +3863,7 @@ function SearchPicker({
|
|
|
3839
3863
|
setQuery("");
|
|
3840
3864
|
}
|
|
3841
3865
|
}
|
|
3842
|
-
return /* @__PURE__ */
|
|
3866
|
+
return /* @__PURE__ */ jsxs14(Box2, { position: "relative", width: "full", children: [
|
|
3843
3867
|
/* @__PURE__ */ jsx22(
|
|
3844
3868
|
Input3,
|
|
3845
3869
|
{
|
|
@@ -3870,7 +3894,7 @@ function SearchPicker({
|
|
|
3870
3894
|
onKeyDown
|
|
3871
3895
|
}
|
|
3872
3896
|
),
|
|
3873
|
-
open && /* @__PURE__ */
|
|
3897
|
+
open && /* @__PURE__ */ jsxs14(
|
|
3874
3898
|
chakra9.ul,
|
|
3875
3899
|
{
|
|
3876
3900
|
id: listId,
|
|
@@ -3907,8 +3931,8 @@ function SearchPicker({
|
|
|
3907
3931
|
void choose(item);
|
|
3908
3932
|
},
|
|
3909
3933
|
"data-create": item === CREATE ? "" : void 0,
|
|
3910
|
-
children: item === CREATE ? /* @__PURE__ */
|
|
3911
|
-
creating ? /* @__PURE__ */ jsx22(Spinner2, { size: "xs" }) : /* @__PURE__ */ jsx22(
|
|
3934
|
+
children: item === CREATE ? /* @__PURE__ */ jsxs14(Text5, { as: "span", display: "inline-flex", alignItems: "center", gap: "1.5", textStyle: "body.sm", color: "fg.accent", _icon: { boxSize: "3.5" }, children: [
|
|
3935
|
+
creating ? /* @__PURE__ */ jsx22(Spinner2, { size: "xs" }) : /* @__PURE__ */ jsx22(Plus2, {}),
|
|
3912
3936
|
create.label(query.trim())
|
|
3913
3937
|
] }) : item ? renderOption ? renderOption(item, query) : /* @__PURE__ */ jsx22(Text5, { as: "span", textStyle: "body.sm", children: /* @__PURE__ */ jsx22(Highlight, { text: label(item), query }) }) : /* @__PURE__ */ jsx22(Text5, { as: "span", textStyle: "body.sm", color: "fg.muted", children: clearLabel })
|
|
3914
3938
|
},
|
|
@@ -3933,10 +3957,10 @@ function PersonPicker({
|
|
|
3933
3957
|
...rest,
|
|
3934
3958
|
getId: (p) => p.id,
|
|
3935
3959
|
label: (p) => personLabel(p),
|
|
3936
|
-
renderOption: (p, typed) => /* @__PURE__ */
|
|
3960
|
+
renderOption: (p, typed) => /* @__PURE__ */ jsxs14(Fragment5, { children: [
|
|
3937
3961
|
/* @__PURE__ */ jsx22(Text5, { as: "span", textStyle: "body.sm", fontWeight: "medium", children: /* @__PURE__ */ jsx22(Highlight, { text: p.displayName || p.username, query: typed }) }),
|
|
3938
3962
|
" ",
|
|
3939
|
-
/* @__PURE__ */
|
|
3963
|
+
/* @__PURE__ */ jsxs14(Text5, { as: "span", textStyle: "caption", color: "fg.muted", dir: "ltr", children: [
|
|
3940
3964
|
"@",
|
|
3941
3965
|
/* @__PURE__ */ jsx22(Highlight, { text: p.username, query: typed })
|
|
3942
3966
|
] }),
|
|
@@ -4037,7 +4061,7 @@ var TitleStore = class {
|
|
|
4037
4061
|
};
|
|
4038
4062
|
|
|
4039
4063
|
// src/provider/title.tsx
|
|
4040
|
-
import { jsx as jsx23, jsxs as
|
|
4064
|
+
import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4041
4065
|
var TitleContext = createContext10(null);
|
|
4042
4066
|
var EMPTY = { parts: [], site: void 0 };
|
|
4043
4067
|
var noSubscription = () => () => {
|
|
@@ -4047,7 +4071,7 @@ function PageTitleProvider({ site, children }) {
|
|
|
4047
4071
|
const { parts, site: claimed } = useSyncExternalStore2(store.subscribe, store.current, store.current);
|
|
4048
4072
|
const { isRtl } = useAbpLocale();
|
|
4049
4073
|
const text = composeTitle(parts, claimed ?? site, isRtl);
|
|
4050
|
-
return /* @__PURE__ */
|
|
4074
|
+
return /* @__PURE__ */ jsxs15(TitleContext.Provider, { value: store, children: [
|
|
4051
4075
|
text && /* @__PURE__ */ jsx23("title", { children: text }),
|
|
4052
4076
|
children
|
|
4053
4077
|
] });
|
|
@@ -4214,7 +4238,7 @@ function useSlideItems(container, token, options = {}) {
|
|
|
4214
4238
|
}
|
|
4215
4239
|
|
|
4216
4240
|
// src/motion/components.tsx
|
|
4217
|
-
import { Fragment as Fragment6, jsx as jsx24, jsxs as
|
|
4241
|
+
import { Fragment as Fragment6, jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4218
4242
|
var MotionDiv = chakra10(m2.div, {}, { forwardProps: ["transition"] });
|
|
4219
4243
|
var MotionSpan2 = chakra10(m2.span, {}, { forwardProps: ["transition"] });
|
|
4220
4244
|
var MotionLi = chakra10(m2.li, {}, { forwardProps: ["transition"] });
|
|
@@ -4263,7 +4287,7 @@ function PresenceList({ children }) {
|
|
|
4263
4287
|
parent.current = marker.current?.parentElement ?? null;
|
|
4264
4288
|
});
|
|
4265
4289
|
useSlideItems(parent, keys);
|
|
4266
|
-
return /* @__PURE__ */
|
|
4290
|
+
return /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
4267
4291
|
/* @__PURE__ */ jsx24(chakra10.span, { ref: marker, display: "none", "aria-hidden": "true" }),
|
|
4268
4292
|
/* @__PURE__ */ jsx24(AnimatePresence2, { initial: false, mode: "popLayout", children: Children.map(
|
|
4269
4293
|
children,
|
|
@@ -4424,17 +4448,17 @@ import { ChevronDown, Menu as MenuIcon, PanelLeftClose, PanelLeftOpen, X } from
|
|
|
4424
4448
|
// src/components/Tooltip.tsx
|
|
4425
4449
|
import { forwardRef as forwardRef4 } from "react";
|
|
4426
4450
|
import { Portal as Portal6, Tooltip as ChakraTooltip } from "@chakra-ui/react";
|
|
4427
|
-
import { jsx as jsx25, jsxs as
|
|
4451
|
+
import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4428
4452
|
var Tooltip = forwardRef4(function Tooltip2({ content, children, disabled, inactive, openDelay = 400, closeDelay = 0, ...rest }, ref) {
|
|
4429
4453
|
if (disabled) return children;
|
|
4430
|
-
return /* @__PURE__ */
|
|
4454
|
+
return /* @__PURE__ */ jsxs17(ChakraTooltip.Root, { openDelay, closeDelay, disabled: inactive, ...rest, children: [
|
|
4431
4455
|
/* @__PURE__ */ jsx25(ChakraTooltip.Trigger, { asChild: true, children }),
|
|
4432
4456
|
/* @__PURE__ */ jsx25(Portal6, { children: /* @__PURE__ */ jsx25(ChakraTooltip.Positioner, { children: /* @__PURE__ */ jsx25(ChakraTooltip.Content, { ref, children: content }) }) })
|
|
4433
4457
|
] });
|
|
4434
4458
|
});
|
|
4435
4459
|
|
|
4436
4460
|
// src/components/AppShell.tsx
|
|
4437
|
-
import { Fragment as Fragment8, jsx as jsx26, jsxs as
|
|
4461
|
+
import { Fragment as Fragment8, jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4438
4462
|
var MAIN_ID = "abp-main";
|
|
4439
4463
|
function AppShell({
|
|
4440
4464
|
brand,
|
|
@@ -4466,38 +4490,38 @@ function AppShell({
|
|
|
4466
4490
|
onCollapsedChange?.(next);
|
|
4467
4491
|
}, [collapsed, onCollapsedChange]);
|
|
4468
4492
|
const mark2 = brand.mark ?? (typeof brand.name === "string" ? brand.name.slice(0, 1) : null);
|
|
4469
|
-
const brandInner = /* @__PURE__ */
|
|
4493
|
+
const brandInner = /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
4470
4494
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.brandMark, "aria-hidden": "true", children: mark2 }),
|
|
4471
4495
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.brandText, children: /* @__PURE__ */ jsx26(chakra11.span, { css: styles.brandName, children: brand.name }) })
|
|
4472
4496
|
] });
|
|
4473
|
-
return /* @__PURE__ */
|
|
4497
|
+
return /* @__PURE__ */ jsxs18(chakra11.div, { css: styles.root, children: [
|
|
4474
4498
|
/* @__PURE__ */ jsx26(SkipNavLink, { id: MAIN_ID, children: labels.skipToContent }),
|
|
4475
|
-
/* @__PURE__ */
|
|
4499
|
+
/* @__PURE__ */ jsxs18(chakra11.header, { css: styles.topbar, children: [
|
|
4476
4500
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.mobileToggle, children: /* @__PURE__ */ jsx26(IconButton, { size: "sm", "aria-label": labels.openNavigation, onClick: () => setMobileOpen(true), children: /* @__PURE__ */ jsx26(MenuIcon, {}) }) }),
|
|
4477
4501
|
brand.href ? /* @__PURE__ */ jsx26(chakra11.span, { asChild: true, css: styles.brand, children: /* @__PURE__ */ jsx26(Link, { href: brand.href, children: brandInner }) }) : /* @__PURE__ */ jsx26(chakra11.span, { css: styles.brand, children: brandInner }),
|
|
4478
4502
|
topbarStart != null && /* @__PURE__ */ jsx26(chakra11.div, { css: styles.topbarStart, children: topbarStart }),
|
|
4479
|
-
/* @__PURE__ */
|
|
4503
|
+
/* @__PURE__ */ jsxs18(chakra11.nav, { css: styles.topNav, "aria-label": labels.navigation, children: [
|
|
4480
4504
|
topNav.map((item) => /* @__PURE__ */ jsx26(TopNavItem, { item, styles }, item.id)),
|
|
4481
4505
|
topNavEnd
|
|
4482
4506
|
] }),
|
|
4483
4507
|
/* @__PURE__ */ jsx26(chakra11.div, { css: styles.topbarEnd, children: topbarEnd })
|
|
4484
4508
|
] }),
|
|
4485
|
-
/* @__PURE__ */
|
|
4486
|
-
hasSidebar && /* @__PURE__ */
|
|
4509
|
+
/* @__PURE__ */ jsxs18(chakra11.div, { css: styles.body, children: [
|
|
4510
|
+
hasSidebar && /* @__PURE__ */ jsxs18(chakra11.aside, { css: styles.sidebar, "aria-label": sidebar.place?.name ?? labels.navigation, "data-collapsed": collapsed || void 0, children: [
|
|
4487
4511
|
/* @__PURE__ */ jsx26(FadeIn, { from: "start", display: "flex", flexDirection: "column", minH: "0", flex: "1", children: /* @__PURE__ */ jsx26(SidebarContents, { styles, sidebar, navFooter, collapsed }) }, sidebar.id),
|
|
4488
|
-
/* @__PURE__ */
|
|
4512
|
+
/* @__PURE__ */ jsxs18(chakra11.div, { css: styles.sidebarFooter, children: [
|
|
4489
4513
|
/* @__PURE__ */ jsx26(IconButton, { size: "sm", "aria-label": collapsed ? labels.expandSidebar : labels.collapseSidebar, "aria-expanded": !collapsed, onClick: toggle, children: /* @__PURE__ */ jsx26(Swap, { swapKey: collapsed ? "open" : "close", from: "fade", children: /* @__PURE__ */ jsx26(DirectionalIcon, { children: collapsed ? /* @__PURE__ */ jsx26(PanelLeftOpen, {}) : /* @__PURE__ */ jsx26(PanelLeftClose, {}) }) }) }),
|
|
4490
4514
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.sidebarFooterText, "aria-hidden": collapsed || void 0, children: sidebarFooter })
|
|
4491
4515
|
] })
|
|
4492
4516
|
] }),
|
|
4493
|
-
/* @__PURE__ */
|
|
4517
|
+
/* @__PURE__ */ jsxs18(chakra11.div, { css: styles.main, children: [
|
|
4494
4518
|
/* @__PURE__ */ jsx26(SkipNavContent, { id: MAIN_ID }),
|
|
4495
4519
|
/* @__PURE__ */ jsx26(chakra11.main, { css: styles.content, children: /* @__PURE__ */ jsx26(ArriveOnChange, { token: pageKey ?? "", css: styles.contentInner, children }) })
|
|
4496
4520
|
] })
|
|
4497
4521
|
] }),
|
|
4498
|
-
/* @__PURE__ */ jsx26(Drawer.Root, { open: mobileOpen, onOpenChange: (e) => setMobileOpen(e.open), placement: "start", size: "xs", children: /* @__PURE__ */
|
|
4522
|
+
/* @__PURE__ */ jsx26(Drawer.Root, { open: mobileOpen, onOpenChange: (e) => setMobileOpen(e.open), placement: "start", size: "xs", children: /* @__PURE__ */ jsxs18(Portal7, { children: [
|
|
4499
4523
|
/* @__PURE__ */ jsx26(Drawer.Backdrop, {}),
|
|
4500
|
-
/* @__PURE__ */ jsx26(Drawer.Positioner, { children: /* @__PURE__ */ jsx26(Drawer.Content, { "aria-label": labels.navigation, children: /* @__PURE__ */
|
|
4524
|
+
/* @__PURE__ */ jsx26(Drawer.Positioner, { children: /* @__PURE__ */ jsx26(Drawer.Content, { "aria-label": labels.navigation, children: /* @__PURE__ */ jsxs18(
|
|
4501
4525
|
chakra11.div,
|
|
4502
4526
|
{
|
|
4503
4527
|
css: mobileStyles.sidebar,
|
|
@@ -4506,7 +4530,7 @@ function AppShell({
|
|
|
4506
4530
|
if (e.target.closest("a")) setMobileOpen(false);
|
|
4507
4531
|
},
|
|
4508
4532
|
children: [
|
|
4509
|
-
/* @__PURE__ */
|
|
4533
|
+
/* @__PURE__ */ jsxs18(chakra11.div, { css: mobileStyles.drawerHeader, children: [
|
|
4510
4534
|
/* @__PURE__ */ jsx26(chakra11.span, { css: mobileStyles.brand, children: brandInner }),
|
|
4511
4535
|
/* @__PURE__ */ jsx26(Drawer.CloseTrigger, { asChild: true, position: "static", children: /* @__PURE__ */ jsx26(IconButton, { size: "sm", "aria-label": labels.close, children: /* @__PURE__ */ jsx26(X, {}) }) })
|
|
4512
4536
|
] }),
|
|
@@ -4535,7 +4559,7 @@ function AppShell({
|
|
|
4535
4559
|
}
|
|
4536
4560
|
function TopNavItem({ item, styles }) {
|
|
4537
4561
|
const Link = useLinkComponent();
|
|
4538
|
-
return /* @__PURE__ */ jsx26(chakra11.a, { asChild: true, css: styles.topNavItem, children: /* @__PURE__ */
|
|
4562
|
+
return /* @__PURE__ */ jsx26(chakra11.a, { asChild: true, css: styles.topNavItem, children: /* @__PURE__ */ jsxs18(Link, { href: item.href, "aria-current": item.current ? "page" : void 0, children: [
|
|
4539
4563
|
item.current && /* @__PURE__ */ jsx26(Indicator, { group: "abp-top-nav", css: styles.topNavIndicator }),
|
|
4540
4564
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.topNavLabel, children: item.label })
|
|
4541
4565
|
] }) });
|
|
@@ -4553,19 +4577,19 @@ function SidebarContents({
|
|
|
4553
4577
|
const loading = !!sidebar.loading;
|
|
4554
4578
|
const arrive = useArriving(loading) ? arriveCss : void 0;
|
|
4555
4579
|
const placeMark = place ? place.mark ?? place.name.slice(0, 1).toUpperCase() : null;
|
|
4556
|
-
const placeInner = place && /* @__PURE__ */
|
|
4580
|
+
const placeInner = place && /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
4557
4581
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.placeMark, "aria-hidden": "true", children: placeMark }),
|
|
4558
|
-
/* @__PURE__ */
|
|
4582
|
+
/* @__PURE__ */ jsxs18(chakra11.span, { css: styles.placeText, children: [
|
|
4559
4583
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.placeName, children: place.name }),
|
|
4560
4584
|
place.detail != null && /* @__PURE__ */ jsx26(chakra11.span, { css: styles.placeDetail, children: place.detail })
|
|
4561
4585
|
] })
|
|
4562
4586
|
] });
|
|
4563
4587
|
const headerCss = placeAfter === void 0 ? styles.placeHeader : { ...styles.placeHeader, px: "0" };
|
|
4564
|
-
const placeBlock = /* @__PURE__ */
|
|
4588
|
+
const placeBlock = /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
4565
4589
|
place ? /* @__PURE__ */ jsx26(chakra11.div, { css: [headerCss, arrive], children: place.href ? /* @__PURE__ */ jsx26(chakra11.span, { asChild: true, css: styles.place, children: /* @__PURE__ */ jsx26(Link, { href: place.href, children: placeInner }) }) : /* @__PURE__ */ jsx26(chakra11.span, { css: styles.place, children: placeInner }) }) : loading && // The place's card, its name and key coming: the same elements, so it's as tall as the real one.
|
|
4566
|
-
/* @__PURE__ */ jsx26(chakra11.div, { css: headerCss, "aria-hidden": "true", children: /* @__PURE__ */
|
|
4590
|
+
/* @__PURE__ */ jsx26(chakra11.div, { css: headerCss, "aria-hidden": "true", children: /* @__PURE__ */ jsxs18(chakra11.span, { css: styles.place, pointerEvents: "none", children: [
|
|
4567
4591
|
/* @__PURE__ */ jsx26(chakra11.span, { css: [styles.placeMark, ghostCss], children: "\xA0" }),
|
|
4568
|
-
/* @__PURE__ */
|
|
4592
|
+
/* @__PURE__ */ jsxs18(chakra11.span, { css: styles.placeText, children: [
|
|
4569
4593
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.placeName, children: /* @__PURE__ */ jsx26(TextBone, { width: 14 }) }),
|
|
4570
4594
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.placeDetail, children: /* @__PURE__ */ jsx26(TextBone, { width: 4 }) })
|
|
4571
4595
|
] })
|
|
@@ -4573,15 +4597,15 @@ function SidebarContents({
|
|
|
4573
4597
|
sidebar.top != null && // Folded away in the rail (and out of reach of the keyboard there).
|
|
4574
4598
|
/* @__PURE__ */ jsx26(chakra11.div, { css: styles.fold, inert: collapsed || void 0, children: /* @__PURE__ */ jsx26(chakra11.div, { css: styles.foldInner, children: /* @__PURE__ */ jsx26(chakra11.div, { css: styles.sidebarTop, children: sidebar.top }) }) })
|
|
4575
4599
|
] });
|
|
4576
|
-
return /* @__PURE__ */
|
|
4600
|
+
return /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
4577
4601
|
placeAfter === void 0 && placeBlock,
|
|
4578
|
-
/* @__PURE__ */
|
|
4579
|
-
sidebar.sections.filter((section) => section.items.length > 0).map((section) => /* @__PURE__ */
|
|
4602
|
+
/* @__PURE__ */ jsxs18(chakra11.nav, { css: [styles.nav, arrive], "aria-label": place?.name ?? labels.navigation, children: [
|
|
4603
|
+
sidebar.sections.filter((section) => section.items.length > 0).map((section) => /* @__PURE__ */ jsxs18(Fragment7, { children: [
|
|
4580
4604
|
/* @__PURE__ */ jsx26(NavSection, { section, styles, collapsed, group: sidebar.id }),
|
|
4581
4605
|
section.id === placeAfter && placeBlock
|
|
4582
4606
|
] }, section.id)),
|
|
4583
4607
|
loading && // The place's pages, coming: rows of the nav's own items, the same in the rail and out of it (ADR 0061).
|
|
4584
|
-
/* @__PURE__ */ jsx26(Loading, { when: true, children: /* @__PURE__ */ jsx26(chakra11.div, { css: styles.navSection, "aria-hidden": "true", children: /* @__PURE__ */ jsx26(chakra11.div, { css: styles.navSectionItems, children: Array.from({ length: sidebar.skeletonItems ?? 5 }, (_, n) => /* @__PURE__ */
|
|
4608
|
+
/* @__PURE__ */ jsx26(Loading, { when: true, children: /* @__PURE__ */ jsx26(chakra11.div, { css: styles.navSection, "aria-hidden": "true", children: /* @__PURE__ */ jsx26(chakra11.div, { css: styles.navSectionItems, children: Array.from({ length: sidebar.skeletonItems ?? 5 }, (_, n) => /* @__PURE__ */ jsxs18(chakra11.span, { css: styles.navItem, pointerEvents: "none", children: [
|
|
4585
4609
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.navItemIcon, children: /* @__PURE__ */ jsx26(Bone, { width: "4", height: "4" }) }),
|
|
4586
4610
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.navItemLabel, children: /* @__PURE__ */ jsx26(TextBone, { width: boneWidth(n, 6, 12) }) })
|
|
4587
4611
|
] }, n)) }) }) }),
|
|
@@ -4594,8 +4618,8 @@ function NavSection({ section, styles, collapsed, group }) {
|
|
|
4594
4618
|
const [open, setOpen] = useState12(holdsCurrent || !section.collapsible);
|
|
4595
4619
|
const shown = !section.collapsible || collapsed || open || holdsCurrent;
|
|
4596
4620
|
const items = section.items.map((item) => /* @__PURE__ */ jsx26(NavItem, { item, styles, collapsed, group }, item.id));
|
|
4597
|
-
return /* @__PURE__ */
|
|
4598
|
-
section.title && /* @__PURE__ */ jsx26(chakra11.div, { css: styles.fold, inert: collapsed || void 0, children: /* @__PURE__ */ jsx26(chakra11.div, { css: styles.foldInner, children: section.collapsible ? /* @__PURE__ */
|
|
4621
|
+
return /* @__PURE__ */ jsxs18(chakra11.div, { css: styles.navSection, role: "group", "aria-label": section.title, children: [
|
|
4622
|
+
section.title && /* @__PURE__ */ jsx26(chakra11.div, { css: styles.fold, inert: collapsed || void 0, children: /* @__PURE__ */ jsx26(chakra11.div, { css: styles.foldInner, children: section.collapsible ? /* @__PURE__ */ jsxs18(chakra11.button, { type: "button", css: styles.navSectionToggle, "aria-expanded": shown, onClick: () => setOpen(!shown), children: [
|
|
4599
4623
|
/* @__PURE__ */ jsx26(chakra11.span, { children: section.title }),
|
|
4600
4624
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.navSectionChevron, "data-open": shown || void 0, "aria-hidden": "true", children: /* @__PURE__ */ jsx26(ChevronDown, {}) })
|
|
4601
4625
|
] }) : /* @__PURE__ */ jsx26(chakra11.div, { css: styles.navSectionTitle, "aria-hidden": "true", children: section.title }) }) }),
|
|
@@ -4605,14 +4629,14 @@ function NavSection({ section, styles, collapsed, group }) {
|
|
|
4605
4629
|
function NavItem({ item, styles, collapsed, group, nested }) {
|
|
4606
4630
|
const Link = useLinkComponent();
|
|
4607
4631
|
const { isRtl } = useAbpLocale();
|
|
4608
|
-
const link = /* @__PURE__ */ jsx26(chakra11.a, { asChild: true, css: styles.navItem, children: /* @__PURE__ */
|
|
4632
|
+
const link = /* @__PURE__ */ jsx26(chakra11.a, { asChild: true, css: styles.navItem, children: /* @__PURE__ */ jsxs18(Link, { href: item.href, "aria-current": item.current ? "page" : void 0, "data-nested": nested || void 0, children: [
|
|
4609
4633
|
item.current && /* @__PURE__ */ jsx26(Indicator, { group: `abp-side-${group}`, css: styles.navItemIndicator }),
|
|
4610
4634
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.navItemIcon, "aria-hidden": "true", children: item.icon ?? /* @__PURE__ */ jsx26(chakra11.span, { textStyle: "label", children: item.label.slice(0, 1) }) }),
|
|
4611
4635
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.navItemLabel, children: item.label })
|
|
4612
4636
|
] }) });
|
|
4613
4637
|
const own = /* @__PURE__ */ jsx26(Tooltip, { content: item.label, inactive: !collapsed, positioning: { placement: isRtl ? "left" : "right" }, children: link });
|
|
4614
4638
|
if (!item.children?.length) return own;
|
|
4615
|
-
return /* @__PURE__ */
|
|
4639
|
+
return /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
4616
4640
|
own,
|
|
4617
4641
|
/* @__PURE__ */ jsx26(chakra11.div, { css: styles.fold, inert: collapsed || void 0, children: /* @__PURE__ */ jsx26(chakra11.div, { css: styles.foldInner, children: /* @__PURE__ */ jsx26(chakra11.div, { css: styles.navChildren, role: "group", "aria-label": item.label, children: item.children.map((child) => /* @__PURE__ */ jsx26(NavItem, { item: child, styles, collapsed, group, nested: true }, child.id)) }) }) })
|
|
4618
4642
|
] });
|
|
@@ -4622,7 +4646,7 @@ function NavItem({ item, styles, collapsed, group, nested }) {
|
|
|
4622
4646
|
import { Fragment as Fragment9, useEffect as useEffect10, useId as useId3, useMemo as useMemo6, useRef as useRef10, useState as useState13 } from "react";
|
|
4623
4647
|
import { chakra as chakra12, Dialog as Dialog3, HStack as HStack4, Portal as Portal8, Spinner as Spinner3, Stack as Stack4, Text as Text6 } from "@chakra-ui/react";
|
|
4624
4648
|
import { CornerDownLeft, Search } from "lucide-react";
|
|
4625
|
-
import { Fragment as Fragment10, jsx as jsx27, jsxs as
|
|
4649
|
+
import { Fragment as Fragment10, jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4626
4650
|
function HighlightText({ text, query }) {
|
|
4627
4651
|
const q = query.trim().toLowerCase();
|
|
4628
4652
|
if (!q) return /* @__PURE__ */ jsx27(Fragment10, { children: text });
|
|
@@ -4689,10 +4713,10 @@ function CommandPalette({ open, onOpenChange, search, labels }) {
|
|
|
4689
4713
|
document.getElementById(`${listId}-${active}`)?.scrollIntoView({ block: "nearest" });
|
|
4690
4714
|
}, [active, listId]);
|
|
4691
4715
|
let n = -1;
|
|
4692
|
-
return /* @__PURE__ */ jsx27(Dialog3.Root, { open, onOpenChange: (e) => !e.open && close(), placement: "top", size: "lg", scrollBehavior: "inside", children: /* @__PURE__ */
|
|
4716
|
+
return /* @__PURE__ */ jsx27(Dialog3.Root, { open, onOpenChange: (e) => !e.open && close(), placement: "top", size: "lg", scrollBehavior: "inside", children: /* @__PURE__ */ jsxs19(Portal8, { children: [
|
|
4693
4717
|
/* @__PURE__ */ jsx27(Dialog3.Backdrop, {}),
|
|
4694
|
-
/* @__PURE__ */ jsx27(Dialog3.Positioner, { children: /* @__PURE__ */
|
|
4695
|
-
/* @__PURE__ */
|
|
4718
|
+
/* @__PURE__ */ jsx27(Dialog3.Positioner, { children: /* @__PURE__ */ jsxs19(Dialog3.Content, { mt: "16", "data-command-palette": "", children: [
|
|
4719
|
+
/* @__PURE__ */ jsxs19(HStack4, { gap: "2.5", px: "4", borderBottomWidth: "1px", borderColor: "border.muted", color: "fg.muted", _icon: { boxSize: "4.5", flexShrink: 0 }, children: [
|
|
4696
4720
|
/* @__PURE__ */ jsx27(Search, { "aria-hidden": true }),
|
|
4697
4721
|
/* @__PURE__ */ jsx27(
|
|
4698
4722
|
chakra12.input,
|
|
@@ -4717,15 +4741,15 @@ function CommandPalette({ open, onOpenChange, search, labels }) {
|
|
|
4717
4741
|
),
|
|
4718
4742
|
groups == null && /* @__PURE__ */ jsx27(Spinner3, { size: "sm" })
|
|
4719
4743
|
] }),
|
|
4720
|
-
/* @__PURE__ */ jsx27(Dialog3.Body, { p: "2", maxH: "min(60vh, 32rem)", children: /* @__PURE__ */
|
|
4744
|
+
/* @__PURE__ */ jsx27(Dialog3.Body, { p: "2", maxH: "min(60vh, 32rem)", children: /* @__PURE__ */ jsxs19(Stack4, { gap: "2", role: "listbox", id: listId, "aria-label": labels.placeholder, children: [
|
|
4721
4745
|
groups != null && items.length === 0 && /* @__PURE__ */ jsx27(Text6, { px: "3", py: "6", textAlign: "center", color: "fg.muted", textStyle: "sm", children: text ? labels.noResults : labels.searching }),
|
|
4722
|
-
(groups ?? []).map((g) => /* @__PURE__ */
|
|
4746
|
+
(groups ?? []).map((g) => /* @__PURE__ */ jsxs19(Stack4, { gap: "0.5", role: "group", "aria-label": g.label, children: [
|
|
4723
4747
|
/* @__PURE__ */ jsx27(Text6, { px: "3", pt: "1", pb: "0.5", textStyle: "xs", fontWeight: "bold", color: "fg.muted", children: g.label }),
|
|
4724
4748
|
g.items.map((item) => {
|
|
4725
4749
|
n += 1;
|
|
4726
4750
|
const i = n;
|
|
4727
4751
|
const on = i === active;
|
|
4728
|
-
return /* @__PURE__ */
|
|
4752
|
+
return /* @__PURE__ */ jsxs19(
|
|
4729
4753
|
HStack4,
|
|
4730
4754
|
{
|
|
4731
4755
|
id: `${listId}-${i}`,
|
|
@@ -4746,7 +4770,7 @@ function CommandPalette({ open, onOpenChange, search, labels }) {
|
|
|
4746
4770
|
item.icon,
|
|
4747
4771
|
/* @__PURE__ */ jsx27(Text6, { as: "span", textStyle: "sm", truncate: true, minW: "0", dir: "auto", children: /* @__PURE__ */ jsx27(HighlightText, { text: item.label, query: text }) }),
|
|
4748
4772
|
item.detail != null && /* @__PURE__ */ jsx27(Text6, { as: "span", textStyle: "xs", color: "fg.muted", truncate: true, flexShrink: 1, minW: "0", children: item.detail }),
|
|
4749
|
-
on && /* @__PURE__ */
|
|
4773
|
+
on && /* @__PURE__ */ jsxs19(HStack4, { as: "span", gap: "1", ms: "auto", flexShrink: 0, textStyle: "xs", color: "fg.muted", _icon: { boxSize: "3.5" }, "aria-hidden": true, children: [
|
|
4750
4774
|
labels.open,
|
|
4751
4775
|
/* @__PURE__ */ jsx27(CornerDownLeft, {})
|
|
4752
4776
|
] })
|
|
@@ -4765,7 +4789,7 @@ function CommandPalette({ open, onOpenChange, search, labels }) {
|
|
|
4765
4789
|
// src/components/AvatarStack.tsx
|
|
4766
4790
|
import { Avatar, Box as Box3, HStack as HStack5, Popover as Popover2, Portal as Portal9, Stack as Stack5, Text as Text7 } from "@chakra-ui/react";
|
|
4767
4791
|
import { Check } from "lucide-react";
|
|
4768
|
-
import { Fragment as Fragment11, jsx as jsx28, jsxs as
|
|
4792
|
+
import { Fragment as Fragment11, jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4769
4793
|
var PALETTES = ["blue", "teal", "purple", "orange", "pink", "cyan", "green", "red"];
|
|
4770
4794
|
function avatarPalette(id) {
|
|
4771
4795
|
let hash = 0;
|
|
@@ -4773,7 +4797,7 @@ function avatarPalette(id) {
|
|
|
4773
4797
|
return PALETTES[Math.abs(hash) % PALETTES.length];
|
|
4774
4798
|
}
|
|
4775
4799
|
function PersonAvatar({ person, selected, inButton }) {
|
|
4776
|
-
return /* @__PURE__ */
|
|
4800
|
+
return /* @__PURE__ */ jsxs20(
|
|
4777
4801
|
Avatar.Root,
|
|
4778
4802
|
{
|
|
4779
4803
|
colorPalette: avatarPalette(person.id),
|
|
@@ -4803,8 +4827,8 @@ function AvatarStack({ "aria-label": ariaLabel, people, max = 3, moreLabel, more
|
|
|
4803
4827
|
const rest = people.slice(max);
|
|
4804
4828
|
const picked = (p) => selected.includes(p.id);
|
|
4805
4829
|
const restPicked = rest.some(picked);
|
|
4806
|
-
return /* @__PURE__ */
|
|
4807
|
-
shown.map((p) => /* @__PURE__ */ jsx28(Tooltip, { content: p.detail ? /* @__PURE__ */
|
|
4830
|
+
return /* @__PURE__ */ jsxs20(HStack5, { gap: "1", role: "group", "aria-label": ariaLabel, children: [
|
|
4831
|
+
shown.map((p) => /* @__PURE__ */ jsx28(Tooltip, { content: p.detail ? /* @__PURE__ */ jsxs20(Fragment11, { children: [
|
|
4808
4832
|
p.name,
|
|
4809
4833
|
" \xB7 ",
|
|
4810
4834
|
p.detail
|
|
@@ -4828,8 +4852,8 @@ function AvatarStack({ "aria-label": ariaLabel, people, max = 3, moreLabel, more
|
|
|
4828
4852
|
}
|
|
4829
4853
|
)
|
|
4830
4854
|
) : /* @__PURE__ */ jsx28(Box3, { display: "inline-flex", children: /* @__PURE__ */ jsx28(PersonAvatar, { person: p }) }) }, p.id)),
|
|
4831
|
-
rest.length > 0 && /* @__PURE__ */
|
|
4832
|
-
/* @__PURE__ */ jsx28(Popover2.Trigger, { asChild: true, children: /* @__PURE__ */
|
|
4855
|
+
rest.length > 0 && /* @__PURE__ */ jsxs20(Popover2.Root, { positioning: { placement: "bottom-end" }, lazyMount: true, unmountOnExit: true, children: [
|
|
4856
|
+
/* @__PURE__ */ jsx28(Popover2.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs20(
|
|
4833
4857
|
Box3,
|
|
4834
4858
|
{
|
|
4835
4859
|
as: "button",
|
|
@@ -4858,12 +4882,12 @@ function AvatarStack({ "aria-label": ariaLabel, people, max = 3, moreLabel, more
|
|
|
4858
4882
|
]
|
|
4859
4883
|
}
|
|
4860
4884
|
) }),
|
|
4861
|
-
/* @__PURE__ */ jsx28(Portal9, { children: /* @__PURE__ */ jsx28(Popover2.Positioner, { children: /* @__PURE__ */ jsx28(Popover2.Content, { w: "64", maxW: "calc(100vw - 32px)", children: /* @__PURE__ */ jsx28(Popover2.Body, { children: /* @__PURE__ */
|
|
4885
|
+
/* @__PURE__ */ jsx28(Portal9, { children: /* @__PURE__ */ jsx28(Popover2.Positioner, { children: /* @__PURE__ */ jsx28(Popover2.Content, { w: "64", maxW: "calc(100vw - 32px)", children: /* @__PURE__ */ jsx28(Popover2.Body, { children: /* @__PURE__ */ jsxs20(Stack5, { gap: "3", children: [
|
|
4862
4886
|
/* @__PURE__ */ jsx28(Popover2.Title, { textStyle: "label", children: moreTitle }),
|
|
4863
4887
|
/* @__PURE__ */ jsx28(Stack5, { as: "ul", gap: onToggle ? "0.5" : "2", maxH: "64", overflowY: "auto", listStyleType: "none", mx: onToggle ? "-2" : void 0, children: rest.map((p) => {
|
|
4864
|
-
const row = /* @__PURE__ */
|
|
4888
|
+
const row = /* @__PURE__ */ jsxs20(Fragment11, { children: [
|
|
4865
4889
|
/* @__PURE__ */ jsx28(PersonAvatar, { person: p, selected: onToggle && picked(p), inButton: !!onToggle }),
|
|
4866
|
-
/* @__PURE__ */
|
|
4890
|
+
/* @__PURE__ */ jsxs20(Stack5, { gap: "0", minW: "0", flex: "1", textAlign: "start", children: [
|
|
4867
4891
|
/* @__PURE__ */ jsx28(Text7, { textStyle: "body", truncate: true, children: p.name }),
|
|
4868
4892
|
p.detail && /* @__PURE__ */ jsx28(Text7, { textStyle: "caption", color: "fg.muted", children: p.detail })
|
|
4869
4893
|
] }),
|
|
@@ -4902,7 +4926,7 @@ import { ArrowDown, ArrowUp, ChevronDown as ChevronDown2, ChevronRight as Chevro
|
|
|
4902
4926
|
import { chakra as chakra13, EmptyState as ChakraEmptyState, HStack as HStack6, Text as Text8, VStack } from "@chakra-ui/react";
|
|
4903
4927
|
import { Inbox } from "lucide-react";
|
|
4904
4928
|
import { m as m3 } from "motion/react";
|
|
4905
|
-
import { jsx as jsx29, jsxs as
|
|
4929
|
+
import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4906
4930
|
var TONE = {
|
|
4907
4931
|
neutral: { border: "border.muted", bg: "bg.muted", fg: "fg.muted" },
|
|
4908
4932
|
accent: { border: "accent.muted", bg: "accent.subtle", fg: "accent.fg" },
|
|
@@ -4932,23 +4956,23 @@ function Drawing({ children, size, tone }) {
|
|
|
4932
4956
|
}
|
|
4933
4957
|
function EmptyState({ title, description, icon, action, secondaryAction, kind, size = "sm", tone: own }) {
|
|
4934
4958
|
const tone = own ?? (kind === "first-use" ? "accent" : kind === "error" ? "danger" : "neutral");
|
|
4935
|
-
const actions = action != null && secondaryAction != null ? /* @__PURE__ */
|
|
4959
|
+
const actions = action != null && secondaryAction != null ? /* @__PURE__ */ jsxs21(HStack6, { gap: "2", justify: "center", wrap: "wrap", children: [
|
|
4936
4960
|
action,
|
|
4937
4961
|
secondaryAction
|
|
4938
4962
|
] }) : action ?? secondaryAction;
|
|
4939
4963
|
if (size === "xs") {
|
|
4940
|
-
return /* @__PURE__ */
|
|
4964
|
+
return /* @__PURE__ */ jsxs21(HStack6, { gap: "2", justify: "center", py: "4", px: "3", color: "fg.muted", textStyle: "sm", textAlign: "center", _icon: { boxSize: "4", flexShrink: 0 }, children: [
|
|
4941
4965
|
icon,
|
|
4942
|
-
/* @__PURE__ */
|
|
4966
|
+
/* @__PURE__ */ jsxs21(VStack, { gap: "0.5", children: [
|
|
4943
4967
|
/* @__PURE__ */ jsx29(Text8, { as: "span", children: title }),
|
|
4944
4968
|
description != null && /* @__PURE__ */ jsx29(Text8, { as: "span", textStyle: "caption", color: "fg.subtle", children: description }),
|
|
4945
4969
|
actions
|
|
4946
4970
|
] })
|
|
4947
4971
|
] });
|
|
4948
4972
|
}
|
|
4949
|
-
return /* @__PURE__ */ jsx29(ChakraEmptyState.Root, { size, py: size === "md" ? "16" : "10", px: "6", children: /* @__PURE__ */
|
|
4973
|
+
return /* @__PURE__ */ jsx29(ChakraEmptyState.Root, { size, py: size === "md" ? "16" : "10", px: "6", children: /* @__PURE__ */ jsxs21(ChakraEmptyState.Content, { gap: "4", "data-empty-kind": kind, children: [
|
|
4950
4974
|
/* @__PURE__ */ jsx29(ChakraEmptyState.Indicator, { children: /* @__PURE__ */ jsx29(Drawing, { size, tone, children: icon ?? /* @__PURE__ */ jsx29(Inbox, {}) }) }),
|
|
4951
|
-
/* @__PURE__ */
|
|
4975
|
+
/* @__PURE__ */ jsxs21(VStack, { gap: "1.5", textAlign: "center", maxW: "md", children: [
|
|
4952
4976
|
/* @__PURE__ */ jsx29(ChakraEmptyState.Title, { textStyle: size === "md" ? "lg" : "md", fontWeight: "semibold", color: "fg", children: title }),
|
|
4953
4977
|
description != null && /* @__PURE__ */ jsx29(ChakraEmptyState.Description, { textStyle: "sm", color: "fg.muted", children: description })
|
|
4954
4978
|
] }),
|
|
@@ -4977,14 +5001,14 @@ var RecordKey = forwardRef5(function RecordKey2({ value, children, href, variant
|
|
|
4977
5001
|
// src/components/StatusPill.tsx
|
|
4978
5002
|
import { forwardRef as forwardRef6 } from "react";
|
|
4979
5003
|
import { chakra as chakra15, useSlotRecipe as useSlotRecipe2 } from "@chakra-ui/react";
|
|
4980
|
-
import { jsx as jsx31, jsxs as
|
|
5004
|
+
import { jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4981
5005
|
var StatusPill = forwardRef6(function StatusPill2({ tone = "neutral", category, variant = "subtle", size = "sm", dot = true, loading: own, skeletonWidth = 8, children, css, ...rest }, ref) {
|
|
4982
5006
|
const recipe = useSlotRecipe2({ key: "abpStatusPill" });
|
|
4983
5007
|
const styles = recipe({ tone: category ?? tone, variant, size });
|
|
4984
5008
|
const loading = useLoading(own);
|
|
4985
5009
|
const arriving = useArriving(loading);
|
|
4986
5010
|
const unknown = children == null || children === "";
|
|
4987
|
-
return /* @__PURE__ */
|
|
5011
|
+
return /* @__PURE__ */ jsxs22(chakra15.span, { ref, css: [styles.root, loading ? ghostCss : arriving ? arriveCss : void 0, css], "aria-hidden": loading || void 0, ...rest, children: [
|
|
4988
5012
|
dot && /* @__PURE__ */ jsx31(chakra15.span, { css: styles.indicator, "aria-hidden": "true" }),
|
|
4989
5013
|
loading && unknown ? /* @__PURE__ */ jsx31(chakra15.span, { display: "inline-block", width: `${skeletonWidth}ch`, children: "\xA0" }) : children
|
|
4990
5014
|
] });
|
|
@@ -5148,7 +5172,7 @@ function visibleInTree(tree, folded) {
|
|
|
5148
5172
|
}
|
|
5149
5173
|
|
|
5150
5174
|
// src/components/DataTable.tsx
|
|
5151
|
-
import { jsx as jsx32, jsxs as
|
|
5175
|
+
import { jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5152
5176
|
function parentFoldKey(parent) {
|
|
5153
5177
|
return `${parent}`;
|
|
5154
5178
|
}
|
|
@@ -5304,7 +5328,7 @@ function DataTable({
|
|
|
5304
5328
|
const sub = renderSubRow?.(row);
|
|
5305
5329
|
const own2 = renderRow?.(row, index);
|
|
5306
5330
|
const selected = selection ? selection.selectedId === id : void 0;
|
|
5307
|
-
return /* @__PURE__ */
|
|
5331
|
+
return /* @__PURE__ */ jsxs23(Fragment12, { children: [
|
|
5308
5332
|
/* @__PURE__ */ jsx32(
|
|
5309
5333
|
Table.Row,
|
|
5310
5334
|
{
|
|
@@ -5364,7 +5388,7 @@ function DataTable({
|
|
|
5364
5388
|
}),
|
|
5365
5389
|
children: c2.cell(row, index)
|
|
5366
5390
|
}
|
|
5367
|
-
) : ci === 0 && grouping?.move ? /* @__PURE__ */
|
|
5391
|
+
) : ci === 0 && grouping?.move ? /* @__PURE__ */ jsxs23(chakra16.div, { display: "flex", alignItems: "center", gap: "1", children: [
|
|
5368
5392
|
/* @__PURE__ */ jsx32(
|
|
5369
5393
|
RowGrip,
|
|
5370
5394
|
{
|
|
@@ -5400,7 +5424,7 @@ function DataTable({
|
|
|
5400
5424
|
body = groups.map((g, gi) => {
|
|
5401
5425
|
const parent = parents?.of(g.key);
|
|
5402
5426
|
const parentFolded = parent != null && grouping.folded.has(parentFoldKey(parent));
|
|
5403
|
-
const parentRow = parents && parent != null && (gi === 0 || parents.of(groups[gi - 1].key) !== parent) ? /* @__PURE__ */ jsx32(Table.Row, { css: styles.groupRow, "data-group-parent": parent, "data-folded": parentFolded ? "" : void 0, children: /* @__PURE__ */ jsx32(Table.Cell, { colSpan: colCount, css: styles.groupCell, children: /* @__PURE__ */
|
|
5427
|
+
const parentRow = parents && parent != null && (gi === 0 || parents.of(groups[gi - 1].key) !== parent) ? /* @__PURE__ */ jsx32(Table.Row, { css: styles.groupRow, "data-group-parent": parent, "data-folded": parentFolded ? "" : void 0, children: /* @__PURE__ */ jsx32(Table.Cell, { colSpan: colCount, css: styles.groupCell, children: /* @__PURE__ */ jsxs23(chakra16.div, { css: styles.groupHeader, children: [
|
|
5404
5428
|
/* @__PURE__ */ jsx32(
|
|
5405
5429
|
chakra16.button,
|
|
5406
5430
|
{
|
|
@@ -5419,7 +5443,7 @@ function DataTable({
|
|
|
5419
5443
|
const footer = folded ? null : grouping.footer?.(g.key, g.rows);
|
|
5420
5444
|
const start = at;
|
|
5421
5445
|
if (!folded) at += g.rows.length;
|
|
5422
|
-
return /* @__PURE__ */
|
|
5446
|
+
return /* @__PURE__ */ jsxs23(Fragment12, { children: [
|
|
5423
5447
|
parentRow,
|
|
5424
5448
|
/* @__PURE__ */ jsx32(
|
|
5425
5449
|
Table.Row,
|
|
@@ -5446,7 +5470,7 @@ function DataTable({
|
|
|
5446
5470
|
if (row) grouping.move.onMove(row, g.key);
|
|
5447
5471
|
}
|
|
5448
5472
|
} : {},
|
|
5449
|
-
children: /* @__PURE__ */ jsx32(Table.Cell, { colSpan: colCount, css: styles.groupCell, children: /* @__PURE__ */
|
|
5473
|
+
children: /* @__PURE__ */ jsx32(Table.Cell, { colSpan: colCount, css: styles.groupCell, children: /* @__PURE__ */ jsxs23(chakra16.div, { css: styles.groupHeader, ps: parents ? "6" : void 0, children: [
|
|
5450
5474
|
/* @__PURE__ */ jsx32(
|
|
5451
5475
|
chakra16.button,
|
|
5452
5476
|
{
|
|
@@ -5468,7 +5492,7 @@ function DataTable({
|
|
|
5468
5492
|
});
|
|
5469
5493
|
}
|
|
5470
5494
|
}
|
|
5471
|
-
return /* @__PURE__ */ jsx32(chakra16.div, { css: styles.root, "aria-busy": loading || void 0, children: /* @__PURE__ */ jsx32(chakra16.div, { css: [styles.scrollArea, maxHeight ? { maxH: maxHeight } : void 0], children: /* @__PURE__ */
|
|
5495
|
+
return /* @__PURE__ */ jsx32(chakra16.div, { css: styles.root, "aria-busy": loading || void 0, children: /* @__PURE__ */ jsx32(chakra16.div, { css: [styles.scrollArea, maxHeight ? { maxH: maxHeight } : void 0], children: /* @__PURE__ */ jsxs23(
|
|
5472
5496
|
Table.Root,
|
|
5473
5497
|
{
|
|
5474
5498
|
size,
|
|
@@ -5486,7 +5510,7 @@ function DataTable({
|
|
|
5486
5510
|
textAlign: align(c2),
|
|
5487
5511
|
w: c2.width,
|
|
5488
5512
|
"aria-sort": sortable ? active === "asc" ? "ascending" : active === "desc" ? "descending" : "none" : void 0,
|
|
5489
|
-
children: sortable ? /* @__PURE__ */
|
|
5513
|
+
children: sortable ? /* @__PURE__ */ jsxs23(
|
|
5490
5514
|
chakra16.button,
|
|
5491
5515
|
{
|
|
5492
5516
|
type: "button",
|
|
@@ -5515,7 +5539,7 @@ function RowGrip({ move, row, dragging, group, prev, next, onDragStart, onDragEn
|
|
|
5515
5539
|
const targets = move.targets(row);
|
|
5516
5540
|
const place = move.place;
|
|
5517
5541
|
const steps = place ? [prev && { value: UP, label: place.up }, next && { value: DOWN, label: place.down }].filter((x) => Boolean(x)) : [];
|
|
5518
|
-
return /* @__PURE__ */
|
|
5542
|
+
return /* @__PURE__ */ jsxs23(
|
|
5519
5543
|
Menu.Root,
|
|
5520
5544
|
{
|
|
5521
5545
|
lazyMount: true,
|
|
@@ -5563,13 +5587,13 @@ function RowGrip({ move, row, dragging, group, prev, next, onDragStart, onDragEn
|
|
|
5563
5587
|
children: /* @__PURE__ */ jsx32(GripVertical, {})
|
|
5564
5588
|
}
|
|
5565
5589
|
) }),
|
|
5566
|
-
/* @__PURE__ */ jsx32(Portal10, { children: /* @__PURE__ */ jsx32(Menu.Positioner, { children: /* @__PURE__ */
|
|
5567
|
-
steps.length > 0 && /* @__PURE__ */ jsx32(Menu.ItemGroup, { children: steps.map((x) => /* @__PURE__ */
|
|
5590
|
+
/* @__PURE__ */ jsx32(Portal10, { children: /* @__PURE__ */ jsx32(Menu.Positioner, { children: /* @__PURE__ */ jsxs23(Menu.Content, { minW: "44", onClick: (e) => e.stopPropagation(), children: [
|
|
5591
|
+
steps.length > 0 && /* @__PURE__ */ jsx32(Menu.ItemGroup, { children: steps.map((x) => /* @__PURE__ */ jsxs23(Menu.Item, { value: x.value, children: [
|
|
5568
5592
|
x.value === UP ? /* @__PURE__ */ jsx32(ArrowUp, {}) : /* @__PURE__ */ jsx32(ArrowDown, {}),
|
|
5569
5593
|
x.label
|
|
5570
5594
|
] }, x.value)) }),
|
|
5571
5595
|
steps.length > 0 && targets.length > 0 && /* @__PURE__ */ jsx32(Menu.Separator, {}),
|
|
5572
|
-
targets.length > 0 && /* @__PURE__ */
|
|
5596
|
+
targets.length > 0 && /* @__PURE__ */ jsxs23(Menu.ItemGroup, { children: [
|
|
5573
5597
|
/* @__PURE__ */ jsx32(Menu.ItemGroupLabel, { children: move.menuTitle }),
|
|
5574
5598
|
targets.map((x) => /* @__PURE__ */ jsx32(Menu.Item, { value: x.group, children: x.label }, x.group))
|
|
5575
5599
|
] })
|
|
@@ -5579,7 +5603,7 @@ function RowGrip({ move, row, dragging, group, prev, next, onDragStart, onDragEn
|
|
|
5579
5603
|
);
|
|
5580
5604
|
}
|
|
5581
5605
|
function TreeCell({ node, folded, label, contextLabel, onFold, children }) {
|
|
5582
|
-
return /* @__PURE__ */
|
|
5606
|
+
return /* @__PURE__ */ jsxs23(
|
|
5583
5607
|
chakra16.div,
|
|
5584
5608
|
{
|
|
5585
5609
|
display: "flex",
|
|
@@ -5625,7 +5649,7 @@ function TreeCell({ node, folded, label, contextLabel, onFold, children }) {
|
|
|
5625
5649
|
import { useEffect as useEffect11, useMemo as useMemo8, useRef as useRef12, useState as useState15 } from "react";
|
|
5626
5650
|
import { Box as Box4, chakra as chakra17, Grid as Grid2, Stack as Stack6, Text as Text9 } from "@chakra-ui/react";
|
|
5627
5651
|
import { DndContext, DragOverlay, PointerSensor, useDraggable, useDroppable, useSensor, useSensors } from "@dnd-kit/core";
|
|
5628
|
-
import { jsx as jsx33, jsxs as
|
|
5652
|
+
import { jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5629
5653
|
var addDays = (day, n) => {
|
|
5630
5654
|
const d = /* @__PURE__ */ new Date(`${day}T00:00:00Z`);
|
|
5631
5655
|
d.setUTCDate(d.getUTCDate() + n);
|
|
@@ -5686,7 +5710,7 @@ function CalendarGrid({
|
|
|
5686
5710
|
const rtl = getComputedStyle(e.currentTarget).direction === "rtl";
|
|
5687
5711
|
onMove(item, addDays(item.start, rtl && Math.abs(step) === 1 ? -step : step));
|
|
5688
5712
|
}
|
|
5689
|
-
return /* @__PURE__ */
|
|
5713
|
+
return /* @__PURE__ */ jsxs24(
|
|
5690
5714
|
DndContext,
|
|
5691
5715
|
{
|
|
5692
5716
|
sensors,
|
|
@@ -5694,12 +5718,12 @@ function CalendarGrid({
|
|
|
5694
5718
|
onDragEnd: end,
|
|
5695
5719
|
onDragCancel: () => setActive(null),
|
|
5696
5720
|
children: [
|
|
5697
|
-
/* @__PURE__ */
|
|
5721
|
+
/* @__PURE__ */ jsxs24(Box4, { ref: root, role: "grid", "aria-label": ariaLabel, borderWidth: "1px", borderColor: "border", rounded: "l3", overflow: "hidden", children: [
|
|
5698
5722
|
/* @__PURE__ */ jsx33(Grid2, { role: "row", templateColumns: "repeat(7, minmax(0, 1fr))", bg: "bg.muted", borderBottomWidth: "1px", borderColor: "border", children: weekdays.map((w, i) => /* @__PURE__ */ jsx33(Text9, { role: "columnheader", textStyle: "caption", fontWeight: "medium", color: "fg.muted", px: "2", py: "1.5", truncate: true, children: w }, i)) }),
|
|
5699
5723
|
Array.from({ length: Math.ceil(days.length / 7) }, (_, week) => /* @__PURE__ */ jsx33(Grid2, { role: "row", templateColumns: "repeat(7, minmax(0, 1fr))", borderBottomWidth: week < days.length / 7 - 1 ? "1px" : 0, borderColor: "border", children: days.slice(week * 7, week * 7 + 7).map((day, i) => {
|
|
5700
5724
|
const list = byDay.get(day) ?? [];
|
|
5701
5725
|
const shown = tall ? list : list.slice(0, maxPerDay);
|
|
5702
|
-
return /* @__PURE__ */
|
|
5726
|
+
return /* @__PURE__ */ jsxs24(
|
|
5703
5727
|
DayCell,
|
|
5704
5728
|
{
|
|
5705
5729
|
day,
|
|
@@ -5744,7 +5768,7 @@ function CalendarGrid({
|
|
|
5744
5768
|
}
|
|
5745
5769
|
function DayCell({ day, name, dim, today, tall, last, label, dragging, children }) {
|
|
5746
5770
|
const { setNodeRef, isOver } = useDroppable({ id: `day:${day}` });
|
|
5747
|
-
return /* @__PURE__ */
|
|
5771
|
+
return /* @__PURE__ */ jsxs24(
|
|
5748
5772
|
Stack6,
|
|
5749
5773
|
{
|
|
5750
5774
|
ref: setNodeRef,
|
|
@@ -5812,7 +5836,7 @@ function Chip({ item, continued, onKeyDown, children }) {
|
|
|
5812
5836
|
import { Box as Box5, Flex as Flex2, Text as Text10 } from "@chakra-ui/react";
|
|
5813
5837
|
import { Chart as ChakraChart, useChart } from "@chakra-ui/charts";
|
|
5814
5838
|
import { Area, AreaChart, Bar, BarChart, CartesianGrid, Legend, Line, LineChart, ResponsiveContainer, Tooltip as Tooltip3, XAxis, YAxis } from "recharts";
|
|
5815
|
-
import { jsx as jsx34, jsxs as
|
|
5839
|
+
import { jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5816
5840
|
var PALETTE = ["teal.solid", "blue.solid", "orange.solid", "purple.solid", "green.solid", "pink.solid", "cyan.solid", "yellow.solid", "red.solid"];
|
|
5817
5841
|
function Chart({ kind, stacked, data, x, series, "aria-label": ariaLabel, height = 280, formatX, formatValue, loading: own }) {
|
|
5818
5842
|
const { isRtl: rtl } = useAbpLocale();
|
|
@@ -5831,15 +5855,15 @@ function Chart({ kind, stacked, data, x, series, "aria-label": ariaLabel, height
|
|
|
5831
5855
|
if (loading) {
|
|
5832
5856
|
return /* @__PURE__ */ jsx34(Box5, { "aria-hidden": "true", children: /* @__PURE__ */ jsx34(Flex2, { h: typeof height === "number" ? `${height}px` : height, align: "flex-end", gap: kind === "bar" ? "2" : "0.5", ps: "12", pe: "2", pb: "8", pt: "2", children: Array.from({ length: 12 }, (_, i) => /* @__PURE__ */ jsx34(Bone, { flex: "1", width: "auto", height: `${28 + i * 37 % 60}%`, borderRadius: kind === "bar" ? "l1" : "0" }, i)) }) });
|
|
5833
5857
|
}
|
|
5834
|
-
return /* @__PURE__ */
|
|
5835
|
-
/* @__PURE__ */ jsx34(ChakraChart.Root, { h: typeof height === "number" ? `${height}px` : height, aspectRatio: "auto", chart, "aria-hidden": true, children: /* @__PURE__ */ jsx34(ResponsiveContainer, { width: "100%", height: "100%", children: kind === "bar" ? /* @__PURE__ */
|
|
5858
|
+
return /* @__PURE__ */ jsxs25(Box5, { children: [
|
|
5859
|
+
/* @__PURE__ */ jsx34(ChakraChart.Root, { h: typeof height === "number" ? `${height}px` : height, aspectRatio: "auto", chart, "aria-hidden": true, children: /* @__PURE__ */ jsx34(ResponsiveContainer, { width: "100%", height: "100%", children: kind === "bar" ? /* @__PURE__ */ jsxs25(BarChart, { data: chart.data, children: [
|
|
5836
5860
|
grid,
|
|
5837
5861
|
xAxis,
|
|
5838
5862
|
yAxis,
|
|
5839
5863
|
tooltip,
|
|
5840
5864
|
legend,
|
|
5841
5865
|
chart.series.map((s) => /* @__PURE__ */ jsx34(Bar, { isAnimationActive: false, dataKey: chart.key(s.name), fill: chart.color(s.color), stackId: s.stackId, radius: stacked ? 0 : 3 }, s.name))
|
|
5842
|
-
] }) : kind === "area" ? /* @__PURE__ */
|
|
5866
|
+
] }) : kind === "area" ? /* @__PURE__ */ jsxs25(AreaChart, { data: chart.data, children: [
|
|
5843
5867
|
grid,
|
|
5844
5868
|
xAxis,
|
|
5845
5869
|
yAxis,
|
|
@@ -5859,7 +5883,7 @@ function Chart({ kind, stacked, data, x, series, "aria-label": ariaLabel, height
|
|
|
5859
5883
|
},
|
|
5860
5884
|
s.name
|
|
5861
5885
|
))
|
|
5862
|
-
] }) : /* @__PURE__ */
|
|
5886
|
+
] }) : /* @__PURE__ */ jsxs25(LineChart, { data: chart.data, children: [
|
|
5863
5887
|
grid,
|
|
5864
5888
|
xAxis,
|
|
5865
5889
|
yAxis,
|
|
@@ -5880,13 +5904,13 @@ function Chart({ kind, stacked, data, x, series, "aria-label": ariaLabel, height
|
|
|
5880
5904
|
s.name
|
|
5881
5905
|
))
|
|
5882
5906
|
] }) }) }),
|
|
5883
|
-
/* @__PURE__ */
|
|
5907
|
+
/* @__PURE__ */ jsxs25(Box5, { as: "table", srOnly: true, children: [
|
|
5884
5908
|
/* @__PURE__ */ jsx34("caption", { children: ariaLabel }),
|
|
5885
|
-
/* @__PURE__ */ jsx34("thead", { children: /* @__PURE__ */
|
|
5909
|
+
/* @__PURE__ */ jsx34("thead", { children: /* @__PURE__ */ jsxs25("tr", { children: [
|
|
5886
5910
|
/* @__PURE__ */ jsx34("th", { scope: "col", children: "" }),
|
|
5887
5911
|
series.map((s) => /* @__PURE__ */ jsx34("th", { scope: "col", children: s.label }, s.key))
|
|
5888
5912
|
] }) }),
|
|
5889
|
-
/* @__PURE__ */ jsx34("tbody", { children: data.map((row, i) => /* @__PURE__ */
|
|
5913
|
+
/* @__PURE__ */ jsx34("tbody", { children: data.map((row, i) => /* @__PURE__ */ jsxs25("tr", { children: [
|
|
5890
5914
|
/* @__PURE__ */ jsx34("th", { scope: "row", children: formatX ? formatX(String(row[x])) : String(row[x]) }),
|
|
5891
5915
|
series.map((s) => /* @__PURE__ */ jsx34("td", { children: row[s.key] == null ? "" : formatValue ? formatValue(Number(row[s.key])) : String(row[s.key]) }, s.key))
|
|
5892
5916
|
] }, i)) })
|
|
@@ -5899,7 +5923,7 @@ function Chart({ kind, stacked, data, x, series, "aria-label": ariaLabel, height
|
|
|
5899
5923
|
import { useRef as useRef13, useState as useState16 } from "react";
|
|
5900
5924
|
import { Box as Box6, chakra as chakra18 } from "@chakra-ui/react";
|
|
5901
5925
|
import { GripVertical as GripVertical2, MoveDiagonal2 } from "lucide-react";
|
|
5902
|
-
import { Fragment as Fragment13, jsx as jsx35, jsxs as
|
|
5926
|
+
import { Fragment as Fragment13, jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5903
5927
|
var GAP = 16;
|
|
5904
5928
|
var PLACEHOLDER_TILES = [
|
|
5905
5929
|
{ id: "skeleton-1", x: 0, y: 0, w: 6, h: 3 },
|
|
@@ -6020,9 +6044,9 @@ function DashboardGrid({
|
|
|
6020
6044
|
_hover: { color: "fg", bg: "bg.muted" },
|
|
6021
6045
|
_focusVisible: { outline: "2px solid", outlineColor: "colorPalette.focusRing", outlineOffset: "1px" }
|
|
6022
6046
|
};
|
|
6023
|
-
return /* @__PURE__ */
|
|
6047
|
+
return /* @__PURE__ */ jsxs26(Box6, { children: [
|
|
6024
6048
|
editing && /* @__PURE__ */ jsx35(chakra18.p, { id: instructionsId, srOnly: true, children: labels.instructions }),
|
|
6025
|
-
/* @__PURE__ */
|
|
6049
|
+
/* @__PURE__ */ jsxs26(
|
|
6026
6050
|
Box6,
|
|
6027
6051
|
{
|
|
6028
6052
|
ref,
|
|
@@ -6054,7 +6078,7 @@ function DashboardGrid({
|
|
|
6054
6078
|
if (!item) return null;
|
|
6055
6079
|
const shown = { ...item, ...place };
|
|
6056
6080
|
const moving = active === item.id;
|
|
6057
|
-
return /* @__PURE__ */
|
|
6081
|
+
return /* @__PURE__ */ jsxs26(
|
|
6058
6082
|
Box6,
|
|
6059
6083
|
{
|
|
6060
6084
|
role: "listitem",
|
|
@@ -6067,7 +6091,7 @@ function DashboardGrid({
|
|
|
6067
6091
|
transition: moving ? void 0 : "all 120ms ease",
|
|
6068
6092
|
children: [
|
|
6069
6093
|
renderItem(shown),
|
|
6070
|
-
editing && /* @__PURE__ */
|
|
6094
|
+
editing && /* @__PURE__ */ jsxs26(Fragment13, { children: [
|
|
6071
6095
|
/* @__PURE__ */ jsx35(
|
|
6072
6096
|
chakra18.button,
|
|
6073
6097
|
{
|
|
@@ -6168,10 +6192,10 @@ function CountBadge({ value, tone = "neutral", size = "sm", loading: own, ...res
|
|
|
6168
6192
|
}
|
|
6169
6193
|
|
|
6170
6194
|
// src/components/AttentionChip.tsx
|
|
6171
|
-
import { jsx as jsx38, jsxs as
|
|
6195
|
+
import { jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6172
6196
|
function AttentionChip({ count, children, tone = "neutral", pressed, onClick, disabled, loading: own }) {
|
|
6173
6197
|
const loading = useLoading(own);
|
|
6174
|
-
return /* @__PURE__ */
|
|
6198
|
+
return /* @__PURE__ */ jsxs27(
|
|
6175
6199
|
chakra20.button,
|
|
6176
6200
|
{
|
|
6177
6201
|
type: "button",
|
|
@@ -6234,16 +6258,16 @@ function IconTile({ children, size = "md", active = false, palette: palette3 })
|
|
|
6234
6258
|
|
|
6235
6259
|
// src/components/PersonChip.tsx
|
|
6236
6260
|
import { Avatar as Avatar2, chakra as chakra22 } from "@chakra-ui/react";
|
|
6237
|
-
import { jsx as jsx40, jsxs as
|
|
6261
|
+
import { jsx as jsx40, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6238
6262
|
var SIZES2 = { xs: "5", sm: "6", md: "8" };
|
|
6239
6263
|
function PersonChip({ id, name, picture, compact = false, size = "sm", loading: own }) {
|
|
6240
6264
|
if (useLoading(own)) {
|
|
6241
|
-
return /* @__PURE__ */
|
|
6265
|
+
return /* @__PURE__ */ jsxs28(chakra22.span, { display: "inline-flex", alignItems: "center", gap: "2", "aria-hidden": true, children: [
|
|
6242
6266
|
/* @__PURE__ */ jsx40(Bone, { circle: true, height: SIZES2[size] }),
|
|
6243
6267
|
!compact && /* @__PURE__ */ jsx40(TextBone, { width: 12 })
|
|
6244
6268
|
] });
|
|
6245
6269
|
}
|
|
6246
|
-
const avatar = /* @__PURE__ */
|
|
6270
|
+
const avatar = /* @__PURE__ */ jsxs28(
|
|
6247
6271
|
Avatar2.Root,
|
|
6248
6272
|
{
|
|
6249
6273
|
colorPalette: avatarPalette(id),
|
|
@@ -6262,7 +6286,7 @@ function PersonChip({ id, name, picture, compact = false, size = "sm", loading:
|
|
|
6262
6286
|
}
|
|
6263
6287
|
);
|
|
6264
6288
|
if (compact) return avatar;
|
|
6265
|
-
return /* @__PURE__ */
|
|
6289
|
+
return /* @__PURE__ */ jsxs28(chakra22.span, { display: "inline-flex", alignItems: "center", gap: "2", minW: "0", maxW: "full", children: [
|
|
6266
6290
|
avatar,
|
|
6267
6291
|
/* @__PURE__ */ jsx40(chakra22.span, { truncate: true, children: name })
|
|
6268
6292
|
] });
|
|
@@ -6281,11 +6305,11 @@ function priorityLevel(rank, of) {
|
|
|
6281
6305
|
}
|
|
6282
6306
|
|
|
6283
6307
|
// src/components/PriorityMark.tsx
|
|
6284
|
-
import { jsx as jsx41, jsxs as
|
|
6308
|
+
import { jsx as jsx41, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6285
6309
|
function PriorityMark({ rank, of, children, title, loading }) {
|
|
6286
6310
|
if (useLoading(loading)) return /* @__PURE__ */ jsx41(TextBone, { width: 7 });
|
|
6287
6311
|
const { bars, palette: palette3 } = priorityLevel(rank, of);
|
|
6288
|
-
return /* @__PURE__ */
|
|
6312
|
+
return /* @__PURE__ */ jsxs29(
|
|
6289
6313
|
chakra23.span,
|
|
6290
6314
|
{
|
|
6291
6315
|
display: "inline-flex",
|
|
@@ -6551,7 +6575,7 @@ function useAreaListSource(area, path, options = {}) {
|
|
|
6551
6575
|
// src/components/FormDialog.tsx
|
|
6552
6576
|
import { useRef as useRef16, useState as useState18 } from "react";
|
|
6553
6577
|
import { chakra as chakra24, CloseButton as CloseButton2, Dialog as Dialog4, Portal as Portal11, Stack as Stack7 } from "@chakra-ui/react";
|
|
6554
|
-
import { jsx as jsx42, jsxs as
|
|
6578
|
+
import { jsx as jsx42, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6555
6579
|
var isControl = (el) => el instanceof HTMLInputElement || el instanceof HTMLSelectElement || el instanceof HTMLTextAreaElement;
|
|
6556
6580
|
function invalidControls(form) {
|
|
6557
6581
|
return [...form.elements].filter((el) => isControl(el) && !el.disabled && el.willValidate && !el.checkValidity());
|
|
@@ -6599,9 +6623,9 @@ function FormDialog({ open, onOpenChange, title, description, submitLabel, onSub
|
|
|
6599
6623
|
mark(e.target, wrong);
|
|
6600
6624
|
if (problems.length > 0) setProblems(invalidControls(e.currentTarget).map(describe2));
|
|
6601
6625
|
}
|
|
6602
|
-
return /* @__PURE__ */ jsx42(Dialog4.Root, { open, onOpenChange: (e) => onOpenChange(e.open), size, placement: "center", scrollBehavior: "inside", children: /* @__PURE__ */
|
|
6626
|
+
return /* @__PURE__ */ jsx42(Dialog4.Root, { open, onOpenChange: (e) => onOpenChange(e.open), size, placement: "center", scrollBehavior: "inside", children: /* @__PURE__ */ jsxs30(Portal11, { children: [
|
|
6603
6627
|
/* @__PURE__ */ jsx42(Dialog4.Backdrop, {}),
|
|
6604
|
-
/* @__PURE__ */ jsx42(Dialog4.Positioner, { children: /* @__PURE__ */ jsx42(Dialog4.Content, { asChild: true, children: /* @__PURE__ */
|
|
6628
|
+
/* @__PURE__ */ jsx42(Dialog4.Positioner, { children: /* @__PURE__ */ jsx42(Dialog4.Content, { asChild: true, children: /* @__PURE__ */ jsxs30(
|
|
6605
6629
|
"form",
|
|
6606
6630
|
{
|
|
6607
6631
|
onSubmit: hideSubmit ? (e) => e.preventDefault() : submit,
|
|
@@ -6610,7 +6634,7 @@ function FormDialog({ open, onOpenChange, title, description, submitLabel, onSub
|
|
|
6610
6634
|
noValidate: true,
|
|
6611
6635
|
children: [
|
|
6612
6636
|
/* @__PURE__ */ jsx42(Dialog4.Header, { children: /* @__PURE__ */ jsx42(Dialog4.Title, { children: title }) }),
|
|
6613
|
-
/* @__PURE__ */ jsx42(Dialog4.Body, { children: /* @__PURE__ */
|
|
6637
|
+
/* @__PURE__ */ jsx42(Dialog4.Body, { children: /* @__PURE__ */ jsxs30(Stack7, { gap: "field", children: [
|
|
6614
6638
|
description != null && /* @__PURE__ */ jsx42(Dialog4.Description, { children: description }),
|
|
6615
6639
|
problems.length > 0 && /* @__PURE__ */ jsx42(chakra24.div, { ref: summary, tabIndex: -1, outline: "none", "data-form-problems": "", children: /* @__PURE__ */ jsx42(InlineAlert, { tone: "danger", title: formatMessage(locale, labels.formFix, { count: problems.length }), children: /* @__PURE__ */ jsx42(chakra24.ul, { ps: "4", listStyleType: "disc", children: problems.map((p, i) => /* @__PURE__ */ jsx42("li", { children: /* @__PURE__ */ jsx42(
|
|
6616
6640
|
chakra24.button,
|
|
@@ -6629,7 +6653,7 @@ function FormDialog({ open, onOpenChange, title, description, submitLabel, onSub
|
|
|
6629
6653
|
children,
|
|
6630
6654
|
/* @__PURE__ */ jsx42(InlineAlert, { tone: "danger", children: error })
|
|
6631
6655
|
] }) }),
|
|
6632
|
-
/* @__PURE__ */
|
|
6656
|
+
/* @__PURE__ */ jsxs30(Dialog4.Footer, { children: [
|
|
6633
6657
|
/* @__PURE__ */ jsx42(Dialog4.ActionTrigger, { asChild: true, children: /* @__PURE__ */ jsx42(Button, { variant: "secondary", children: labels.cancel }) }),
|
|
6634
6658
|
!hideSubmit && /* @__PURE__ */ jsx42(Button, { type: "submit", variant: "primary", loading: busy, disabled: submitDisabled, children: submitLabel })
|
|
6635
6659
|
] }),
|
|
@@ -6696,7 +6720,7 @@ function SettingsLayout({ area, pathname, sidebarId = "settings", labels, topNav
|
|
|
6696
6720
|
|
|
6697
6721
|
// src/components/SegmentedControl.tsx
|
|
6698
6722
|
import { SegmentGroup } from "@chakra-ui/react";
|
|
6699
|
-
import { jsx as jsx45, jsxs as
|
|
6723
|
+
import { jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6700
6724
|
function SegmentedControl({
|
|
6701
6725
|
"aria-label": ariaLabel,
|
|
6702
6726
|
items,
|
|
@@ -6708,7 +6732,7 @@ function SegmentedControl({
|
|
|
6708
6732
|
}) {
|
|
6709
6733
|
const loading = useLoading(own);
|
|
6710
6734
|
const h = size === "sm" ? "7" : "8";
|
|
6711
|
-
return /* @__PURE__ */
|
|
6735
|
+
return /* @__PURE__ */ jsxs31(
|
|
6712
6736
|
SegmentGroup.Root,
|
|
6713
6737
|
{
|
|
6714
6738
|
size: size === "sm" ? "sm" : "md",
|
|
@@ -6726,7 +6750,7 @@ function SegmentedControl({
|
|
|
6726
6750
|
"data-segmented": "",
|
|
6727
6751
|
children: [
|
|
6728
6752
|
/* @__PURE__ */ jsx45(SegmentGroup.Indicator, {}),
|
|
6729
|
-
items.map((item) => /* @__PURE__ */
|
|
6753
|
+
items.map((item) => /* @__PURE__ */ jsxs31(
|
|
6730
6754
|
SegmentGroup.Item,
|
|
6731
6755
|
{
|
|
6732
6756
|
value: item.value,
|
|
@@ -6797,10 +6821,10 @@ function between(cell, from, to) {
|
|
|
6797
6821
|
}
|
|
6798
6822
|
|
|
6799
6823
|
// src/components/KanbanBoard.tsx
|
|
6800
|
-
import { Fragment as Fragment14, jsx as jsx46, jsxs as
|
|
6824
|
+
import { Fragment as Fragment14, jsx as jsx46, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6801
6825
|
var SKELETON_CARDS = [3, 2, 4, 1, 2];
|
|
6802
6826
|
function PlaceholderCard({ index }) {
|
|
6803
|
-
return /* @__PURE__ */
|
|
6827
|
+
return /* @__PURE__ */ jsxs32(Box8, { bg: "bg.panel", borderWidth: "1px", borderColor: "border", rounded: "l2", p: "2.5", children: [
|
|
6804
6828
|
/* @__PURE__ */ jsx46(Box8, { mb: "1", children: /* @__PURE__ */ jsx46(RecordKey, { loading: true }) }),
|
|
6805
6829
|
/* @__PURE__ */ jsx46(Text12, { textStyle: "body.sm", children: /* @__PURE__ */ jsx46(TextBone, { width: boneWidth(index, 14, 34) }) }),
|
|
6806
6830
|
/* @__PURE__ */ jsx46(HStack8, { mt: "2", children: /* @__PURE__ */ jsx46(StatusPill, { loading: true, skeletonWidth: boneWidth(index, 5, 9) }) })
|
|
@@ -6961,7 +6985,7 @@ function KanbanBoard({
|
|
|
6961
6985
|
document.addEventListener("keydown", key);
|
|
6962
6986
|
return () => document.removeEventListener("keydown", key);
|
|
6963
6987
|
}, [onSelect, selected, active]);
|
|
6964
|
-
return /* @__PURE__ */
|
|
6988
|
+
return /* @__PURE__ */ jsxs32(
|
|
6965
6989
|
DndContext2,
|
|
6966
6990
|
{
|
|
6967
6991
|
sensors,
|
|
@@ -6987,7 +7011,7 @@ function KanbanBoard({
|
|
|
6987
7011
|
if (Date.now() - draggedAt.current < 300) return;
|
|
6988
7012
|
if (e.target instanceof Element && !e.target.closest("[data-card], a, button, input, select, textarea")) clear();
|
|
6989
7013
|
},
|
|
6990
|
-
children: /* @__PURE__ */ jsx46(Loading, { when: loading, children: /* @__PURE__ */
|
|
7014
|
+
children: /* @__PURE__ */ jsx46(Loading, { when: loading, children: /* @__PURE__ */ jsxs32(
|
|
6991
7015
|
Box8,
|
|
6992
7016
|
{
|
|
6993
7017
|
display: "grid",
|
|
@@ -6998,7 +7022,7 @@ function KanbanBoard({
|
|
|
6998
7022
|
shownColumns.map((c2) => {
|
|
6999
7023
|
const isFolded = folded.has(c2.id);
|
|
7000
7024
|
const name = c2.name ?? (typeof c2.title === "string" ? c2.title : c2.id);
|
|
7001
|
-
return /* @__PURE__ */
|
|
7025
|
+
return /* @__PURE__ */ jsxs32(
|
|
7002
7026
|
Box8,
|
|
7003
7027
|
{
|
|
7004
7028
|
position: "sticky",
|
|
@@ -7058,7 +7082,7 @@ function KanbanBoard({
|
|
|
7058
7082
|
h: "full",
|
|
7059
7083
|
children: /* @__PURE__ */ jsx46(FoldButton, { folded: true, label: foldLabel(name, true), onClick: () => fold(c2.id) })
|
|
7060
7084
|
}
|
|
7061
|
-
) : /* @__PURE__ */
|
|
7085
|
+
) : /* @__PURE__ */ jsxs32(
|
|
7062
7086
|
HStack8,
|
|
7063
7087
|
{
|
|
7064
7088
|
justify: "space-between",
|
|
@@ -7075,7 +7099,7 @@ function KanbanBoard({
|
|
|
7075
7099
|
h: "full",
|
|
7076
7100
|
align: "start",
|
|
7077
7101
|
children: [
|
|
7078
|
-
/* @__PURE__ */
|
|
7102
|
+
/* @__PURE__ */ jsxs32(HStack8, { gap: "2", minW: "0", children: [
|
|
7079
7103
|
onReorderColumns && !loading && /* @__PURE__ */ jsx46(
|
|
7080
7104
|
ColumnGrip,
|
|
7081
7105
|
{
|
|
@@ -7108,13 +7132,13 @@ function KanbanBoard({
|
|
|
7108
7132
|
const allowed = active ? canDrop?.(active, c2.id, lane.id) !== false : true;
|
|
7109
7133
|
const last = lane.id === rows[rows.length - 1].id;
|
|
7110
7134
|
if (folded.has(c2.id)) {
|
|
7111
|
-
return /* @__PURE__ */
|
|
7135
|
+
return /* @__PURE__ */ jsxs32(Cell, { id, allowed, dragging: !!active, items: [], column: c2.id, lane: lane.id, folded: true, last, children: [
|
|
7112
7136
|
lane.id === rows[0].id && c2.count != null && /* @__PURE__ */ jsx46(Box8, { alignSelf: "center", children: /* @__PURE__ */ jsx46(CountBadge, { value: c2.count }) }),
|
|
7113
7137
|
lane.id === rows[0].id && /* @__PURE__ */ jsx46(Box8, { css: { writingMode: "vertical-rl" }, alignSelf: "center", maxH: "56", overflow: "hidden", textStyle: "sm", title: c2.name, children: c2.title })
|
|
7114
7138
|
] }, id);
|
|
7115
7139
|
}
|
|
7116
7140
|
const footer = last && !loading ? columnFooter?.(c2.id) : null;
|
|
7117
|
-
return /* @__PURE__ */
|
|
7141
|
+
return /* @__PURE__ */ jsxs32(Cell, { id, allowed, dragging: !!active, items: list.map((i) => i.id), column: c2.id, lane: lane.id, last, children: [
|
|
7118
7142
|
list.map((item) => /* @__PURE__ */ jsx46(
|
|
7119
7143
|
SortableCard,
|
|
7120
7144
|
{
|
|
@@ -7143,8 +7167,8 @@ function KanbanBoard({
|
|
|
7143
7167
|
);
|
|
7144
7168
|
}
|
|
7145
7169
|
function LaneRow({ lane, showTitle, span, children }) {
|
|
7146
|
-
return /* @__PURE__ */
|
|
7147
|
-
showTitle && /* @__PURE__ */
|
|
7170
|
+
return /* @__PURE__ */ jsxs32(Fragment14, { children: [
|
|
7171
|
+
showTitle && /* @__PURE__ */ jsxs32(HStack8, { gridColumn: `1 / span ${span}`, gap: "2", pt: "2", borderTopWidth: "1px", borderColor: "border.muted", "data-lane": lane.id, children: [
|
|
7148
7172
|
/* @__PURE__ */ jsx46(Text12, { textStyle: "label", children: lane.title }),
|
|
7149
7173
|
lane.meta && /* @__PURE__ */ jsx46(Text12, { textStyle: "caption", color: "fg.muted", children: lane.meta })
|
|
7150
7174
|
] }),
|
|
@@ -7182,7 +7206,7 @@ function SortableCard({
|
|
|
7182
7206
|
children
|
|
7183
7207
|
}) {
|
|
7184
7208
|
const { attributes, listeners: listeners2, setNodeRef, transform, transition, isDragging } = useSortable({ id, animateLayoutChanges: () => false });
|
|
7185
|
-
return /* @__PURE__ */
|
|
7209
|
+
return /* @__PURE__ */ jsxs32(
|
|
7186
7210
|
Box8,
|
|
7187
7211
|
{
|
|
7188
7212
|
ref: setNodeRef,
|
|
@@ -7230,7 +7254,7 @@ function Lifted({ carried, count, reduce, children }) {
|
|
|
7230
7254
|
held.current?.animate?.([{ transform: "none", boxShadow: tv("shadows.sm") }, { transform: HELD, boxShadow: tv("shadows.xl") }], { duration: 160, easing: OUT2 });
|
|
7231
7255
|
}, []);
|
|
7232
7256
|
const layers = Math.min(2, Math.max(0, carried - 1));
|
|
7233
|
-
return /* @__PURE__ */
|
|
7257
|
+
return /* @__PURE__ */ jsxs32(Box8, { position: "relative", cursor: "grabbing", "data-testid": "drag-preview", children: [
|
|
7234
7258
|
Array.from({ length: layers }, (_, i) => /* @__PURE__ */ jsx46(
|
|
7235
7259
|
Box8,
|
|
7236
7260
|
{
|
|
@@ -7397,10 +7421,10 @@ function ColumnGrip({ label, moving, onDragStart, onDragEnd, onStep }) {
|
|
|
7397
7421
|
|
|
7398
7422
|
// src/components/LoadingState.tsx
|
|
7399
7423
|
import { Box as Box9, VisuallyHidden as VisuallyHidden2 } from "@chakra-ui/react";
|
|
7400
|
-
import { jsx as jsx47, jsxs as
|
|
7424
|
+
import { jsx as jsx47, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
7401
7425
|
function LoadingState({ lines = 3, label }) {
|
|
7402
7426
|
const labels = useAbpLabels();
|
|
7403
|
-
return /* @__PURE__ */
|
|
7427
|
+
return /* @__PURE__ */ jsxs33(Box9, { "aria-busy": "true", role: "status", children: [
|
|
7404
7428
|
/* @__PURE__ */ jsx47(VisuallyHidden2, { children: label ?? labels.loading }),
|
|
7405
7429
|
/* @__PURE__ */ jsx47(TextBone, { lines, width: "full" })
|
|
7406
7430
|
] });
|
|
@@ -7410,7 +7434,7 @@ function LoadingState({ lines = 3, label }) {
|
|
|
7410
7434
|
import { Fragment as Fragment15 } from "react";
|
|
7411
7435
|
import { Breadcrumb, chakra as chakra26, Menu as Menu2, Portal as Portal12, useSlotRecipe as useSlotRecipe4 } from "@chakra-ui/react";
|
|
7412
7436
|
import { ChevronRight as ChevronRight3 } from "lucide-react";
|
|
7413
|
-
import { jsx as jsx48, jsxs as
|
|
7437
|
+
import { jsx as jsx48, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
7414
7438
|
var textOf = (label) => typeof label === "string" || typeof label === "number" ? String(label) : void 0;
|
|
7415
7439
|
function PageHeader({ title, description, breadcrumbs, meta, count, adornments, actions, loading: own, titleWidth = 24, documentTitle }) {
|
|
7416
7440
|
const recipe = useSlotRecipe4({ key: "abpPageHeader" });
|
|
@@ -7419,11 +7443,11 @@ function PageHeader({ title, description, breadcrumbs, meta, count, adornments,
|
|
|
7419
7443
|
usePageTitle(documentTitle !== void 0 ? documentTitle : text ? [text, where] : null);
|
|
7420
7444
|
const styles = recipe({});
|
|
7421
7445
|
const loading = useLoading(own);
|
|
7422
|
-
return /* @__PURE__ */
|
|
7446
|
+
return /* @__PURE__ */ jsxs34(chakra26.div, { css: styles.root, children: [
|
|
7423
7447
|
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx48(Breadcrumbs, { items: breadcrumbs }),
|
|
7424
|
-
/* @__PURE__ */
|
|
7425
|
-
/* @__PURE__ */
|
|
7426
|
-
count != null || adornments != null ? /* @__PURE__ */
|
|
7448
|
+
/* @__PURE__ */ jsxs34(chakra26.div, { css: styles.row, children: [
|
|
7449
|
+
/* @__PURE__ */ jsxs34(chakra26.div, { css: styles.titleGroup, children: [
|
|
7450
|
+
count != null || adornments != null ? /* @__PURE__ */ jsxs34(chakra26.div, { display: "flex", alignItems: "center", gap: "2.5", flexWrap: "wrap", minW: "0", children: [
|
|
7427
7451
|
/* @__PURE__ */ jsx48(chakra26.h1, { css: styles.title, children: loading && title == null ? /* @__PURE__ */ jsx48(TextBone, { width: titleWidth }) : title }),
|
|
7428
7452
|
count != null && /* @__PURE__ */ jsx48(CountBadge, { value: count, size: "md" }),
|
|
7429
7453
|
adornments
|
|
@@ -7441,9 +7465,9 @@ function Breadcrumbs({ items, loading: own }) {
|
|
|
7441
7465
|
const label = (item, i) => loading && item.label == null ? /* @__PURE__ */ jsx48(TextBone, { width: 8 + i % 3 * 3 }) : item.label;
|
|
7442
7466
|
const Link = useLinkComponent();
|
|
7443
7467
|
const { shown, hidden } = foldBreadcrumbs(items);
|
|
7444
|
-
return /* @__PURE__ */ jsx48(Breadcrumb.Root, { "aria-label": labels.breadcrumb, children: /* @__PURE__ */ jsx48(Breadcrumb.List, { children: shown.map((entry, n) => /* @__PURE__ */
|
|
7468
|
+
return /* @__PURE__ */ jsx48(Breadcrumb.Root, { "aria-label": labels.breadcrumb, children: /* @__PURE__ */ jsx48(Breadcrumb.List, { children: shown.map((entry, n) => /* @__PURE__ */ jsxs34(Fragment15, { children: [
|
|
7445
7469
|
n > 0 && /* @__PURE__ */ jsx48(Breadcrumb.Separator, { children: /* @__PURE__ */ jsx48(ChevronRight3, {}) }),
|
|
7446
|
-
entry == null ? /* @__PURE__ */ jsx48(Breadcrumb.Item, { children: /* @__PURE__ */
|
|
7470
|
+
entry == null ? /* @__PURE__ */ jsx48(Breadcrumb.Item, { children: /* @__PURE__ */ jsxs34(Menu2.Root, { positioning: { placement: "bottom-start" }, children: [
|
|
7447
7471
|
/* @__PURE__ */ jsx48(Menu2.Trigger, { asChild: true, children: /* @__PURE__ */ jsx48(
|
|
7448
7472
|
chakra26.button,
|
|
7449
7473
|
{
|
|
@@ -7467,7 +7491,7 @@ function Breadcrumbs({ items, loading: own }) {
|
|
|
7467
7491
|
// src/components/Panel.tsx
|
|
7468
7492
|
import { createContext as createContext11, forwardRef as forwardRef8, useContext as useContext11 } from "react";
|
|
7469
7493
|
import { chakra as chakra27, useSlotRecipe as useSlotRecipe5 } from "@chakra-ui/react";
|
|
7470
|
-
import { jsx as jsx49, jsxs as
|
|
7494
|
+
import { jsx as jsx49, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
7471
7495
|
var ToneContext = createContext11("card");
|
|
7472
7496
|
function PanelTone({ tone, children }) {
|
|
7473
7497
|
return /* @__PURE__ */ jsx49(ToneContext.Provider, { value: tone, children });
|
|
@@ -7477,9 +7501,9 @@ var Panel = forwardRef8(function Panel2({ title, description, actions, footer, f
|
|
|
7477
7501
|
const inherited = useContext11(ToneContext);
|
|
7478
7502
|
const styles = recipe({ flush, tone: tone ?? inherited });
|
|
7479
7503
|
const hasHeader = title != null || actions != null || description != null;
|
|
7480
|
-
return /* @__PURE__ */
|
|
7481
|
-
hasHeader && /* @__PURE__ */
|
|
7482
|
-
/* @__PURE__ */
|
|
7504
|
+
return /* @__PURE__ */ jsxs35(chakra27.section, { ref, css: [styles.root, css], ...rest, children: [
|
|
7505
|
+
hasHeader && /* @__PURE__ */ jsxs35(chakra27.header, { css: styles.header, children: [
|
|
7506
|
+
/* @__PURE__ */ jsxs35(chakra27.div, { css: styles.titleGroup, children: [
|
|
7483
7507
|
title != null && /* @__PURE__ */ jsx49(chakra27.h2, { as: headingAs, css: styles.title, children: title }),
|
|
7484
7508
|
description != null && /* @__PURE__ */ jsx49(chakra27.p, { css: styles.description, children: description })
|
|
7485
7509
|
] }),
|
|
@@ -7493,14 +7517,14 @@ var Panel = forwardRef8(function Panel2({ title, description, actions, footer, f
|
|
|
7493
7517
|
// src/components/PathChips.tsx
|
|
7494
7518
|
import { chakra as chakra28, useSlotRecipe as useSlotRecipe6 } from "@chakra-ui/react";
|
|
7495
7519
|
import { ChevronRight as ChevronRight4 } from "lucide-react";
|
|
7496
|
-
import { jsx as jsx50, jsxs as
|
|
7520
|
+
import { jsx as jsx50, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
7497
7521
|
function PathChips({ path, highlightLast = true, loading: own, skeletonCount = 3, css, ...rest }) {
|
|
7498
7522
|
const labels = useAbpLabels();
|
|
7499
7523
|
const recipe = useSlotRecipe6({ key: "abpPathChips" });
|
|
7500
7524
|
const styles = recipe({});
|
|
7501
7525
|
const loading = useLoading(own) && path.length === 0;
|
|
7502
7526
|
const segments = loading ? Array.from({ length: skeletonCount }, (_, i) => "\xA0".repeat(boneWidth(i, 6, 12))) : path;
|
|
7503
|
-
return /* @__PURE__ */ jsx50(chakra28.ol, { "aria-label": rest["aria-label"] ?? labels.path, "aria-hidden": loading || void 0, css: [styles.root, css], ...rest, children: segments.map((segment, i) => /* @__PURE__ */
|
|
7527
|
+
return /* @__PURE__ */ jsx50(chakra28.ol, { "aria-label": rest["aria-label"] ?? labels.path, "aria-hidden": loading || void 0, css: [styles.root, css], ...rest, children: segments.map((segment, i) => /* @__PURE__ */ jsxs36(chakra28.li, { css: styles.item, children: [
|
|
7504
7528
|
i > 0 && /* @__PURE__ */ jsx50(chakra28.span, { css: styles.separator, "aria-hidden": "true", children: /* @__PURE__ */ jsx50(ChevronRight4, {}) }),
|
|
7505
7529
|
/* @__PURE__ */ jsx50(chakra28.span, { css: loading ? [styles.chip, ghostCss] : styles.chip, "aria-current": !loading && highlightLast && i === path.length - 1 ? true : void 0, children: segment })
|
|
7506
7530
|
] }, `${i}:${segment}`)) });
|
|
@@ -7508,11 +7532,11 @@ function PathChips({ path, highlightLast = true, loading: own, skeletonCount = 3
|
|
|
7508
7532
|
|
|
7509
7533
|
// src/components/PropertyList.tsx
|
|
7510
7534
|
import { chakra as chakra29, DataList } from "@chakra-ui/react";
|
|
7511
|
-
import { jsx as jsx51, jsxs as
|
|
7535
|
+
import { jsx as jsx51, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
7512
7536
|
function PropertyList({ items, size = "md", loading: own }) {
|
|
7513
7537
|
const loading = useLoading(own);
|
|
7514
7538
|
const arriving = useArriving(loading);
|
|
7515
|
-
return /* @__PURE__ */ jsx51(DataList.Root, { orientation: "horizontal", size, children: items.map((item, i) => /* @__PURE__ */
|
|
7539
|
+
return /* @__PURE__ */ jsx51(DataList.Root, { orientation: "horizontal", size, children: items.map((item, i) => /* @__PURE__ */ jsxs37(DataList.Item, { children: [
|
|
7516
7540
|
/* @__PURE__ */ jsx51(DataList.ItemLabel, { children: item.label }),
|
|
7517
7541
|
/* @__PURE__ */ jsx51(DataList.ItemValue, { children: loading && item.value == null ? /* @__PURE__ */ jsx51(TextBone, { width: item.skeletonWidth ?? boneWidth(i, 8, 16) }) : arriving ? /* @__PURE__ */ jsx51(chakra29.span, { css: arriveCss, children: item.value }) : item.value })
|
|
7518
7542
|
] }, item.id ?? i)) });
|
|
@@ -7522,7 +7546,7 @@ function PropertyList({ items, size = "md", loading: own }) {
|
|
|
7522
7546
|
import { useEffect as useEffect15, useId as useId5, useMemo as useMemo12, useRef as useRef19, useState as useState22 } from "react";
|
|
7523
7547
|
import { createPortal } from "react-dom";
|
|
7524
7548
|
import { Box as Box10, chakra as chakra31, HStack as HStack11, Input as Input6, Menu as Menu3, Portal as Portal15, Stack as Stack11, Text as Text15 } from "@chakra-ui/react";
|
|
7525
|
-
import { ArrowDownWideNarrow, ArrowUpNarrowWide, ChevronDown as ChevronDown3, Download, Filter,
|
|
7549
|
+
import { ArrowDownWideNarrow, ArrowUpNarrowWide, ChevronDown as ChevronDown3, Download, Filter, Rows3, Save, Trash2 as Trash22, X as X2 } from "lucide-react";
|
|
7526
7550
|
|
|
7527
7551
|
// src/components/query/ColumnsPopover.tsx
|
|
7528
7552
|
import { useMemo as useMemo11 } from "react";
|
|
@@ -7538,7 +7562,7 @@ import {
|
|
|
7538
7562
|
import { arrayMove, SortableContext as SortableContext2, sortableKeyboardCoordinates as sortableKeyboardCoordinates2, useSortable as useSortable2, verticalListSortingStrategy as verticalListSortingStrategy2 } from "@dnd-kit/sortable";
|
|
7539
7563
|
import { CSS as CSS3 } from "@dnd-kit/utilities";
|
|
7540
7564
|
import { Columns3, GripVertical as GripVertical4 } from "lucide-react";
|
|
7541
|
-
import { jsx as jsx52, jsxs as
|
|
7565
|
+
import { jsx as jsx52, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
7542
7566
|
function fill(template, values) {
|
|
7543
7567
|
return template.replace(/\{(\w+)\}/g, (_, k) => values[k] ?? `{${k}}`);
|
|
7544
7568
|
}
|
|
@@ -7555,18 +7579,18 @@ function ColumnsPopover({ fields, columns, onChange }) {
|
|
|
7555
7579
|
if (from < 0 || to < 0) return;
|
|
7556
7580
|
onChange(arrayMove(columns, from, to));
|
|
7557
7581
|
}
|
|
7558
|
-
return /* @__PURE__ */
|
|
7559
|
-
/* @__PURE__ */ jsx52(Popover3.Trigger, { asChild: true, children: /* @__PURE__ */
|
|
7582
|
+
return /* @__PURE__ */ jsxs38(Popover3.Root, { positioning: { placement: "bottom-end" }, lazyMount: true, unmountOnExit: true, children: [
|
|
7583
|
+
/* @__PURE__ */ jsx52(Popover3.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs38(Button, { size: "sm", variant: "secondary", disabled: fields.length === 0, children: [
|
|
7560
7584
|
/* @__PURE__ */ jsx52(Columns3, {}),
|
|
7561
7585
|
labels.columns
|
|
7562
7586
|
] }) }),
|
|
7563
|
-
/* @__PURE__ */ jsx52(Portal13, { children: /* @__PURE__ */ jsx52(Popover3.Positioner, { children: /* @__PURE__ */ jsx52(Popover3.Content, { w: "80", maxW: "calc(100vw - 2rem)", children: /* @__PURE__ */
|
|
7564
|
-
/* @__PURE__ */
|
|
7587
|
+
/* @__PURE__ */ jsx52(Portal13, { children: /* @__PURE__ */ jsx52(Popover3.Positioner, { children: /* @__PURE__ */ jsx52(Popover3.Content, { w: "80", maxW: "calc(100vw - 2rem)", children: /* @__PURE__ */ jsxs38(Popover3.Body, { p: "0", children: [
|
|
7588
|
+
/* @__PURE__ */ jsxs38(HStack9, { justify: "space-between", px: "3.5", pt: "3", pb: "1", children: [
|
|
7565
7589
|
/* @__PURE__ */ jsx52(Text13, { textStyle: "sm", fontWeight: "semibold", children: labels.visibleColumns }),
|
|
7566
7590
|
/* @__PURE__ */ jsx52(Button, { size: "xs", variant: "ghost", disabled: hidden.length === 0, onClick: () => onChange([...columns, ...hidden.map((f) => f.id)]), children: labels.showAllColumns })
|
|
7567
7591
|
] }),
|
|
7568
7592
|
/* @__PURE__ */ jsx52(Text13, { textStyle: "caption", color: "fg.muted", px: "3.5", pb: "2", children: labels.columnsHint }),
|
|
7569
|
-
/* @__PURE__ */
|
|
7593
|
+
/* @__PURE__ */ jsxs38(chakra30.div, { maxH: "80", overflowY: "auto", pb: "2", children: [
|
|
7570
7594
|
/* @__PURE__ */ jsx52(DndContext3, { sensors, collisionDetection: closestCenter, onDragEnd, children: /* @__PURE__ */ jsx52(SortableContext2, { items: shown, strategy: verticalListSortingStrategy2, children: /* @__PURE__ */ jsx52(Stack9, { gap: "0", role: "list", "aria-label": labels.visibleColumns, children: shown.map((id) => /* @__PURE__ */ jsx52(
|
|
7571
7595
|
ColumnRow,
|
|
7572
7596
|
{
|
|
@@ -7587,7 +7611,7 @@ function ColumnRow({ id, label, checked, disabled, onCheckedChange }) {
|
|
|
7587
7611
|
const labels = useAbpLabels().queryList;
|
|
7588
7612
|
const sortable = useSortable2({ id, disabled: !checked });
|
|
7589
7613
|
const { attributes, listeners: listeners2, setNodeRef, transform, transition, isDragging } = sortable;
|
|
7590
|
-
return /* @__PURE__ */
|
|
7614
|
+
return /* @__PURE__ */ jsxs38(
|
|
7591
7615
|
HStack9,
|
|
7592
7616
|
{
|
|
7593
7617
|
ref: setNodeRef,
|
|
@@ -7621,7 +7645,7 @@ function ColumnRow({ id, label, checked, disabled, onCheckedChange }) {
|
|
|
7621
7645
|
}
|
|
7622
7646
|
) : /* @__PURE__ */ jsx52(chakra30.span, { w: "4", flexShrink: 0 }),
|
|
7623
7647
|
/* @__PURE__ */ jsx52(Text13, { as: "span", flex: "1", textStyle: "sm", truncate: true, color: checked ? "fg" : "fg.muted", children: label }),
|
|
7624
|
-
/* @__PURE__ */
|
|
7648
|
+
/* @__PURE__ */ jsxs38(Switch2.Root, { size: "sm", colorPalette: "accent", checked, disabled, onCheckedChange, "aria-label": label, children: [
|
|
7625
7649
|
/* @__PURE__ */ jsx52(Switch2.HiddenInput, {}),
|
|
7626
7650
|
/* @__PURE__ */ jsx52(Switch2.Control, { children: /* @__PURE__ */ jsx52(Switch2.Thumb, {}) })
|
|
7627
7651
|
] })
|
|
@@ -7633,8 +7657,8 @@ function ColumnRow({ id, label, checked, disabled, onCheckedChange }) {
|
|
|
7633
7657
|
// src/components/query/FilterBuilder.tsx
|
|
7634
7658
|
import { useEffect as useEffect14, useId as useId4, useRef as useRef18, useState as useState21 } from "react";
|
|
7635
7659
|
import { CloseButton as CloseButton3, Dialog as Dialog5, HStack as HStack10, Input as Input5, Portal as Portal14, Stack as Stack10, Text as Text14 } from "@chakra-ui/react";
|
|
7636
|
-
import {
|
|
7637
|
-
import { Fragment as Fragment16, jsx as jsx53, jsxs as
|
|
7660
|
+
import { Trash2 } from "lucide-react";
|
|
7661
|
+
import { Fragment as Fragment16, jsx as jsx53, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
7638
7662
|
function fill2(template, values) {
|
|
7639
7663
|
return template.replace(/\{(\w+)\}/g, (_, k) => String(values[k] ?? `{${k}}`));
|
|
7640
7664
|
}
|
|
@@ -7690,17 +7714,17 @@ function FilterBuilderDialog({ fields, initial, suggest, renderValueEditor, coun
|
|
|
7690
7714
|
setSeq((n) => n + 1);
|
|
7691
7715
|
};
|
|
7692
7716
|
const change = (id, patch) => setRows((r) => r.map((d) => d.id === id ? { ...d, ...patch, dirty: true } : d));
|
|
7693
|
-
return /* @__PURE__ */ jsx53(Dialog5.Root, { open: true, onOpenChange: (e) => !e.open && onClose(), size: "lg", placement: "center", scrollBehavior: "inside", children: /* @__PURE__ */
|
|
7717
|
+
return /* @__PURE__ */ jsx53(Dialog5.Root, { open: true, onOpenChange: (e) => !e.open && onClose(), size: "lg", placement: "center", scrollBehavior: "inside", children: /* @__PURE__ */ jsxs39(Portal14, { children: [
|
|
7694
7718
|
/* @__PURE__ */ jsx53(Dialog5.Backdrop, {}),
|
|
7695
|
-
/* @__PURE__ */ jsx53(Dialog5.Positioner, { children: /* @__PURE__ */
|
|
7696
|
-
/* @__PURE__ */ jsx53(Dialog5.Header, { children: /* @__PURE__ */
|
|
7719
|
+
/* @__PURE__ */ jsx53(Dialog5.Positioner, { children: /* @__PURE__ */ jsxs39(Dialog5.Content, { "data-filter-builder": "", children: [
|
|
7720
|
+
/* @__PURE__ */ jsx53(Dialog5.Header, { children: /* @__PURE__ */ jsxs39(HStack10, { justify: "space-between", w: "full", gap: "3", children: [
|
|
7697
7721
|
/* @__PURE__ */ jsx53(Dialog5.Title, { children: labels.buildFilters }),
|
|
7698
7722
|
/* @__PURE__ */ jsx53(Button, { size: "xs", variant: "ghost", onClick: () => setRows([]), disabled: rows.length === 0, children: labels.clearAll })
|
|
7699
7723
|
] }) }),
|
|
7700
|
-
/* @__PURE__ */ jsx53(Dialog5.Body, { children: /* @__PURE__ */
|
|
7701
|
-
/* @__PURE__ */
|
|
7724
|
+
/* @__PURE__ */ jsx53(Dialog5.Body, { children: /* @__PURE__ */ jsxs39(Stack10, { gap: "3", children: [
|
|
7725
|
+
/* @__PURE__ */ jsxs39(Text14, { textStyle: "sm", color: "fg.muted", children: [
|
|
7702
7726
|
labels.matchAll,
|
|
7703
|
-
repeats && /* @__PURE__ */
|
|
7727
|
+
repeats && /* @__PURE__ */ jsxs39(Fragment16, { children: [
|
|
7704
7728
|
" ",
|
|
7705
7729
|
labels.sameFieldAny
|
|
7706
7730
|
] })
|
|
@@ -7719,24 +7743,21 @@ function FilterBuilderDialog({ fields, initial, suggest, renderValueEditor, coun
|
|
|
7719
7743
|
},
|
|
7720
7744
|
d.id
|
|
7721
7745
|
)),
|
|
7722
|
-
/* @__PURE__ */ jsx53(HStack10, { children: /* @__PURE__ */
|
|
7723
|
-
|
|
7724
|
-
labels.addCondition
|
|
7725
|
-
] }) }),
|
|
7726
|
-
/* @__PURE__ */ jsxs38(Stack10, { gap: "1", borderTopWidth: "1px", borderColor: "border.muted", pt: "3", children: [
|
|
7746
|
+
/* @__PURE__ */ jsx53(HStack10, { children: /* @__PURE__ */ jsx53(AddButton, { onClick: add, disabled: fields.length === 0, children: labels.addCondition }) }),
|
|
7747
|
+
/* @__PURE__ */ jsxs39(Stack10, { gap: "1", borderTopWidth: "1px", borderColor: "border.muted", pt: "3", children: [
|
|
7727
7748
|
/* @__PURE__ */ jsx53(Text14, { textStyle: "xs", fontWeight: "bold", color: "fg.muted", children: labels.activeFilters }),
|
|
7728
7749
|
/* @__PURE__ */ jsx53(Text14, { textStyle: "sm", "data-active-filters": "", children: complete.length === 0 ? labels.noneActive : complete.map((c2) => describe(c2, fields, labels)).join(" \xB7 ") })
|
|
7729
7750
|
] })
|
|
7730
7751
|
] }) }),
|
|
7731
|
-
/* @__PURE__ */ jsx53(Dialog5.Footer, { children: /* @__PURE__ */
|
|
7732
|
-
/* @__PURE__ */
|
|
7752
|
+
/* @__PURE__ */ jsx53(Dialog5.Footer, { children: /* @__PURE__ */ jsxs39(HStack10, { justify: "space-between", w: "full", wrap: "wrap", gap: "2", children: [
|
|
7753
|
+
/* @__PURE__ */ jsxs39(Text14, { textStyle: "sm", color: "fg.muted", "aria-live": "polite", "data-filter-count": "", children: [
|
|
7733
7754
|
count != null && fill2(total != null ? labels.matchCount : labels.matchCountOnly, { count, total: total ?? "" }),
|
|
7734
|
-
incomplete > 0 && /* @__PURE__ */
|
|
7755
|
+
incomplete > 0 && /* @__PURE__ */ jsxs39(Fragment16, { children: [
|
|
7735
7756
|
" \xB7 ",
|
|
7736
7757
|
labels.incompleteSkipped
|
|
7737
7758
|
] })
|
|
7738
7759
|
] }),
|
|
7739
|
-
/* @__PURE__ */
|
|
7760
|
+
/* @__PURE__ */ jsxs39(HStack10, { gap: "2", children: [
|
|
7740
7761
|
/* @__PURE__ */ jsx53(Button, { size: "sm", variant: "ghost", onClick: onClose, children: labels.cancel }),
|
|
7741
7762
|
/* @__PURE__ */ jsx53(Button, { size: "sm", variant: "primary", onClick: () => {
|
|
7742
7763
|
setTouched(true);
|
|
@@ -7773,8 +7794,8 @@ function ConditionRow({ draft, fields, suggest, renderValueEditor, warn, onChang
|
|
|
7773
7794
|
clearTimeout(timer);
|
|
7774
7795
|
};
|
|
7775
7796
|
}, [suggest, field, op, text, own]);
|
|
7776
|
-
return /* @__PURE__ */
|
|
7777
|
-
/* @__PURE__ */
|
|
7797
|
+
return /* @__PURE__ */ jsxs39(Stack10, { gap: "1", "data-condition": "", children: [
|
|
7798
|
+
/* @__PURE__ */ jsxs39(HStack10, { gap: "1.5", wrap: "wrap", align: "start", children: [
|
|
7778
7799
|
/* @__PURE__ */ jsx53(
|
|
7779
7800
|
SelectField,
|
|
7780
7801
|
{
|
|
@@ -7801,7 +7822,7 @@ function ConditionRow({ draft, fields, suggest, renderValueEditor, warn, onChang
|
|
|
7801
7822
|
}
|
|
7802
7823
|
),
|
|
7803
7824
|
own,
|
|
7804
|
-
!NO_VALUE_OPS.has(op) && own == null && /* @__PURE__ */
|
|
7825
|
+
!NO_VALUE_OPS.has(op) && own == null && /* @__PURE__ */ jsxs39(Fragment16, { children: [
|
|
7805
7826
|
/* @__PURE__ */ jsx53(
|
|
7806
7827
|
Input5,
|
|
7807
7828
|
{
|
|
@@ -7818,14 +7839,14 @@ function ConditionRow({ draft, fields, suggest, renderValueEditor, warn, onChang
|
|
|
7818
7839
|
),
|
|
7819
7840
|
/* @__PURE__ */ jsx53("datalist", { id: listId, children: options.filter((o) => o.kind !== "keyword").map((o) => /* @__PURE__ */ jsx53("option", { value: o.text.replace(/^"|"$/g, ""), children: o.label }, o.text)) })
|
|
7820
7841
|
] }),
|
|
7821
|
-
/* @__PURE__ */ jsx53(IconButton, { size: "sm", variant: "ghost", "aria-label": fill2(labels.removeFilter, { field: field?.label ?? draft.field }), onClick: onRemove, children: /* @__PURE__ */ jsx53(Trash2, {}) })
|
|
7842
|
+
/* @__PURE__ */ jsx53(IconButton, { size: "sm", variant: "ghost", remove: true, "aria-label": fill2(labels.removeFilter, { field: field?.label ?? draft.field }), onClick: onRemove, children: /* @__PURE__ */ jsx53(Trash2, {}) })
|
|
7822
7843
|
] }),
|
|
7823
7844
|
warn && /* @__PURE__ */ jsx53(Text14, { textStyle: "xs", color: "fg.error", children: labels.incomplete })
|
|
7824
7845
|
] });
|
|
7825
7846
|
}
|
|
7826
7847
|
|
|
7827
7848
|
// src/components/QueryableList.tsx
|
|
7828
|
-
import { Fragment as Fragment17, jsx as jsx54, jsxs as
|
|
7849
|
+
import { Fragment as Fragment17, jsx as jsx54, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
7829
7850
|
var PAIR = "";
|
|
7830
7851
|
var pairKey = (first, second) => `${first}${PAIR}${second}`;
|
|
7831
7852
|
var condition = (field, value) => value == null ? { field, op: "isEmpty" } : { field, op: "eq", value };
|
|
@@ -7969,13 +7990,13 @@ function QueryableList({
|
|
|
7969
7990
|
}
|
|
7970
7991
|
const sortable = (fields ?? []).filter((f) => f.sortable);
|
|
7971
7992
|
const groupLabel = groupField ? thenField ? `${label(groupField)} \xB7 ${label(thenField)}` : label(groupField) : null;
|
|
7972
|
-
return /* @__PURE__ */
|
|
7973
|
-
/* @__PURE__ */
|
|
7974
|
-
/* @__PURE__ */
|
|
7975
|
-
/* @__PURE__ */
|
|
7993
|
+
return /* @__PURE__ */ jsxs40(Stack11, { gap: "3", children: [
|
|
7994
|
+
/* @__PURE__ */ jsxs40(chakra31.div, { layerStyle: "panel", borderRadius: "l3", "data-query-toolbar": "", children: [
|
|
7995
|
+
/* @__PURE__ */ jsxs40(HStack11, { gap: "2", wrap: "wrap", justify: "space-between", px: "2.5", py: "2", borderBottomWidth: "1px", borderColor: "border.muted", children: [
|
|
7996
|
+
/* @__PURE__ */ jsxs40(HStack11, { gap: "2", wrap: "wrap", minW: "0", children: [
|
|
7976
7997
|
leading,
|
|
7977
7998
|
leading != null && views && onSelectView && /* @__PURE__ */ jsx54(chakra31.span, { w: "1px", h: "6", bg: "border", mx: "1", "aria-hidden": true }),
|
|
7978
|
-
views && onSelectView && /* @__PURE__ */
|
|
7999
|
+
views && onSelectView && /* @__PURE__ */ jsxs40(HStack11, { gap: "2", children: [
|
|
7979
8000
|
/* @__PURE__ */ jsx54(Text15, { as: "span", textStyle: "xs", fontWeight: "semibold", color: "fg.muted", whiteSpace: "nowrap", hideBelow: "2xl", children: labels.savedView }),
|
|
7980
8001
|
/* @__PURE__ */ jsx54(
|
|
7981
8002
|
SelectField,
|
|
@@ -7989,10 +8010,10 @@ function QueryableList({
|
|
|
7989
8010
|
}
|
|
7990
8011
|
)
|
|
7991
8012
|
] }),
|
|
7992
|
-
onSaveView && (naming === null ? /* @__PURE__ */
|
|
8013
|
+
onSaveView && (naming === null ? /* @__PURE__ */ jsxs40(Button, { size: "sm", variant: "ghost", color: "fg.accent", onClick: () => setNaming(activeView?.isOwner ? activeView.name : ""), children: [
|
|
7993
8014
|
/* @__PURE__ */ jsx54(Save, {}),
|
|
7994
8015
|
labels.saveView
|
|
7995
|
-
] }) : /* @__PURE__ */
|
|
8016
|
+
] }) : /* @__PURE__ */ jsxs40(HStack11, { gap: "1", as: "form", onSubmit: (e) => {
|
|
7996
8017
|
e.preventDefault();
|
|
7997
8018
|
if (naming.trim()) onSaveView(naming.trim(), activeView?.isOwner && naming.trim() === activeView.name ? activeView.id : null);
|
|
7998
8019
|
setNaming(null);
|
|
@@ -8003,46 +8024,46 @@ function QueryableList({
|
|
|
8003
8024
|
] })),
|
|
8004
8025
|
activeView?.isOwner && onDeleteView && naming === null && /* @__PURE__ */ jsx54(IconButton, { size: "sm", variant: "ghost", "aria-label": labels.deleteView, onClick: () => onDeleteView(activeView.id), children: /* @__PURE__ */ jsx54(Trash22, {}) })
|
|
8005
8026
|
] }),
|
|
8006
|
-
/* @__PURE__ */
|
|
8007
|
-
/* @__PURE__ */
|
|
8008
|
-
/* @__PURE__ */ jsx54(Menu3.Trigger, { asChild: true, children: /* @__PURE__ */
|
|
8027
|
+
/* @__PURE__ */ jsxs40(HStack11, { gap: "2", wrap: "wrap", children: [
|
|
8028
|
+
/* @__PURE__ */ jsxs40(Menu3.Root, { positioning: { placement: "bottom-end" }, children: [
|
|
8029
|
+
/* @__PURE__ */ jsx54(Menu3.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs40(Button, { size: "sm", variant: "secondary", "aria-label": labels.groupBy, disabled: groupable.length === 0, children: [
|
|
8009
8030
|
/* @__PURE__ */ jsx54(Rows3, {}),
|
|
8010
8031
|
/* @__PURE__ */ jsx54(Text15, { as: "span", color: "fg.muted", fontWeight: "normal", children: labels.group }),
|
|
8011
8032
|
groupLabel ?? labels.noGrouping,
|
|
8012
8033
|
/* @__PURE__ */ jsx54(ChevronDown3, {})
|
|
8013
8034
|
] }) }),
|
|
8014
|
-
/* @__PURE__ */ jsx54(Portal15, { children: /* @__PURE__ */ jsx54(Menu3.Positioner, { children: /* @__PURE__ */
|
|
8015
|
-
/* @__PURE__ */
|
|
8035
|
+
/* @__PURE__ */ jsx54(Portal15, { children: /* @__PURE__ */ jsx54(Menu3.Positioner, { children: /* @__PURE__ */ jsxs40(Menu3.Content, { minW: "48", children: [
|
|
8036
|
+
/* @__PURE__ */ jsxs40(
|
|
8016
8037
|
Menu3.RadioItemGroup,
|
|
8017
8038
|
{
|
|
8018
8039
|
value: groupField ?? "",
|
|
8019
8040
|
onValueChange: (d) => change({ ...query, groupBy: d.value ? { field: d.value, aggregates: [] } : null }),
|
|
8020
8041
|
children: [
|
|
8021
|
-
/* @__PURE__ */
|
|
8042
|
+
/* @__PURE__ */ jsxs40(Menu3.RadioItem, { value: "", children: [
|
|
8022
8043
|
labels.noGrouping,
|
|
8023
8044
|
/* @__PURE__ */ jsx54(Menu3.ItemIndicator, {})
|
|
8024
8045
|
] }),
|
|
8025
|
-
groupable.map((f) => /* @__PURE__ */
|
|
8046
|
+
groupable.map((f) => /* @__PURE__ */ jsxs40(Menu3.RadioItem, { value: f.id, children: [
|
|
8026
8047
|
f.label,
|
|
8027
8048
|
/* @__PURE__ */ jsx54(Menu3.ItemIndicator, {})
|
|
8028
8049
|
] }, f.id))
|
|
8029
8050
|
]
|
|
8030
8051
|
}
|
|
8031
8052
|
),
|
|
8032
|
-
groupField && groupable.length > 1 && /* @__PURE__ */
|
|
8053
|
+
groupField && groupable.length > 1 && /* @__PURE__ */ jsxs40(Fragment17, { children: [
|
|
8033
8054
|
/* @__PURE__ */ jsx54(Menu3.Separator, {}),
|
|
8034
|
-
/* @__PURE__ */
|
|
8055
|
+
/* @__PURE__ */ jsxs40(
|
|
8035
8056
|
Menu3.RadioItemGroup,
|
|
8036
8057
|
{
|
|
8037
8058
|
value: thenField ?? "",
|
|
8038
8059
|
onValueChange: (d) => change({ ...query, groupBy: { ...query.groupBy, then: d.value ? { field: d.value } : null } }),
|
|
8039
8060
|
children: [
|
|
8040
8061
|
/* @__PURE__ */ jsx54(Menu3.ItemGroupLabel, { children: labels.thenBy }),
|
|
8041
|
-
/* @__PURE__ */
|
|
8062
|
+
/* @__PURE__ */ jsxs40(Menu3.RadioItem, { value: "", children: [
|
|
8042
8063
|
labels.noSecondGrouping,
|
|
8043
8064
|
/* @__PURE__ */ jsx54(Menu3.ItemIndicator, {})
|
|
8044
8065
|
] }),
|
|
8045
|
-
groupable.filter((f) => f.id !== groupField).map((f) => /* @__PURE__ */
|
|
8066
|
+
groupable.filter((f) => f.id !== groupField).map((f) => /* @__PURE__ */ jsxs40(Menu3.RadioItem, { value: f.id, children: [
|
|
8046
8067
|
f.label,
|
|
8047
8068
|
/* @__PURE__ */ jsx54(Menu3.ItemIndicator, {})
|
|
8048
8069
|
] }, f.id))
|
|
@@ -8058,8 +8079,8 @@ function QueryableList({
|
|
|
8058
8079
|
actions
|
|
8059
8080
|
] })
|
|
8060
8081
|
] }),
|
|
8061
|
-
/* @__PURE__ */
|
|
8062
|
-
/* @__PURE__ */
|
|
8082
|
+
/* @__PURE__ */ jsxs40(HStack11, { gap: "2", align: "start", wrap: "wrap", justify: "space-between", px: "2.5", py: "2", children: [
|
|
8083
|
+
/* @__PURE__ */ jsxs40(HStack11, { gap: "2", align: "start", wrap: "wrap", flex: "1", minW: { base: "full", md: "0" }, children: [
|
|
8063
8084
|
/* @__PURE__ */ jsx54(
|
|
8064
8085
|
SegmentedControl,
|
|
8065
8086
|
{
|
|
@@ -8073,14 +8094,13 @@ function QueryableList({
|
|
|
8073
8094
|
]
|
|
8074
8095
|
}
|
|
8075
8096
|
),
|
|
8076
|
-
mode === "basic" && conditions !== null ? /* @__PURE__ */
|
|
8097
|
+
mode === "basic" && conditions !== null ? /* @__PURE__ */ jsxs40(HStack11, { gap: "2", wrap: "wrap", flex: "1", minW: "0", children: [
|
|
8077
8098
|
search && /* @__PURE__ */ jsx54(QuickSearch, { initial: searchText, placeholder: search.placeholder ?? labels.searchPlaceholder, onRun: runSearch }, searchText),
|
|
8078
|
-
/* @__PURE__ */
|
|
8079
|
-
/* @__PURE__ */ jsx54(Plus3, {}),
|
|
8099
|
+
/* @__PURE__ */ jsxs40(AddButton, { onClick: () => setAdding(true), disabled: !fields, "data-add-filter": "", children: [
|
|
8080
8100
|
labels.addFilter,
|
|
8081
8101
|
chips.length > 0 && /* @__PURE__ */ jsx54(CountBadge, { value: chips.length, tone: "accent" })
|
|
8082
8102
|
] }),
|
|
8083
|
-
sortable.length > 0 && /* @__PURE__ */
|
|
8103
|
+
sortable.length > 0 && /* @__PURE__ */ jsxs40(HStack11, { gap: "1", flexShrink: 0, children: [
|
|
8084
8104
|
/* @__PURE__ */ jsx54(
|
|
8085
8105
|
SelectField,
|
|
8086
8106
|
{
|
|
@@ -8121,8 +8141,8 @@ function QueryableList({
|
|
|
8121
8141
|
] }),
|
|
8122
8142
|
attention != null && /* @__PURE__ */ jsx54(HStack11, { gap: "2", wrap: "wrap", flexShrink: 0, children: attention })
|
|
8123
8143
|
] }),
|
|
8124
|
-
mode === "basic" && conditions !== null && chips.length > 0 && /* @__PURE__ */
|
|
8125
|
-
chips.map(({ c: c2, i }) => /* @__PURE__ */
|
|
8144
|
+
mode === "basic" && conditions !== null && chips.length > 0 && /* @__PURE__ */ jsxs40(HStack11, { gap: "2", wrap: "wrap", px: "2.5", py: "2", borderTopWidth: "1px", borderColor: "border.muted", "data-filter-chips": "", children: [
|
|
8145
|
+
chips.map(({ c: c2, i }) => /* @__PURE__ */ jsxs40(
|
|
8126
8146
|
chakra31.span,
|
|
8127
8147
|
{
|
|
8128
8148
|
display: "inline-flex",
|
|
@@ -8165,7 +8185,7 @@ function QueryableList({
|
|
|
8165
8185
|
toolbarFooter != null && /* @__PURE__ */ jsx54(chakra31.div, { borderTopWidth: "1px", borderColor: "border.muted", "data-toolbar-footer": "", children: toolbarFooter })
|
|
8166
8186
|
] }),
|
|
8167
8187
|
mode === "basic" && error && !(loadFailed != null && error.failed && !result) && /* @__PURE__ */ jsx54(InlineAlert, { tone: "danger", children: error.message }),
|
|
8168
|
-
exported && /* @__PURE__ */ jsx54(InlineAlert, { tone: exported.tone, title: exported.tone === "danger" ? labels.exportFailed : void 0, children: /* @__PURE__ */
|
|
8188
|
+
exported && /* @__PURE__ */ jsx54(InlineAlert, { tone: exported.tone, title: exported.tone === "danger" ? labels.exportFailed : void 0, children: /* @__PURE__ */ jsxs40(HStack11, { justify: "space-between", gap: "2", align: "start", children: [
|
|
8169
8189
|
/* @__PURE__ */ jsx54(Text15, { as: "span", children: exported.message }),
|
|
8170
8190
|
/* @__PURE__ */ jsx54(IconButton, { size: "xs", variant: "ghost", "aria-label": labels.dismiss, onClick: () => setExported(null), children: /* @__PURE__ */ jsx54(X2, {}) })
|
|
8171
8191
|
] }) }),
|
|
@@ -8176,8 +8196,8 @@ function QueryableList({
|
|
|
8176
8196
|
footer: (
|
|
8177
8197
|
// Expand and collapse at the start, the pages in the middle (the canvas's v12, UI round 9 step 67, round 10 step 73),
|
|
8178
8198
|
// the range at the end, or with the arrows in the simple form.
|
|
8179
|
-
/* @__PURE__ */
|
|
8180
|
-
/* @__PURE__ */ jsx54(HStack11, { gap: "3", children: grouped && /* @__PURE__ */
|
|
8199
|
+
/* @__PURE__ */ jsxs40(chakra31.div, { display: "grid", w: "full", gridTemplateColumns: { base: "1fr", md: "1fr auto 1fr" }, alignItems: "center", gap: "3", children: [
|
|
8200
|
+
/* @__PURE__ */ jsx54(HStack11, { gap: "3", children: grouped && /* @__PURE__ */ jsxs40(Fragment17, { children: [
|
|
8181
8201
|
/* @__PURE__ */ jsx54(Button, { size: "xs", variant: "ghost", color: "fg.accent", disabled: folded.size === 0, onClick: () => setFolded(/* @__PURE__ */ new Set()), children: labels.expandAll }),
|
|
8182
8202
|
/* @__PURE__ */ jsx54(Button, { size: "xs", variant: "ghost", color: "fg.accent", disabled: groupKeys.every((k) => folded.has(k)), onClick: () => setFolded(new Set(groupKeys)), children: labels.collapseAll })
|
|
8183
8203
|
] }) }),
|
|
@@ -8246,11 +8266,11 @@ function QueryableList({
|
|
|
8246
8266
|
const label2 = thenField ? info?.then?.label : info?.label;
|
|
8247
8267
|
const value = thenField ? info?.then?.value ?? null : info?.value ?? null;
|
|
8248
8268
|
const period = thenField ? query.groupBy?.then?.period : query.groupBy?.period;
|
|
8249
|
-
return /* @__PURE__ */
|
|
8269
|
+
return /* @__PURE__ */ jsxs40(HStack11, { gap: "2.5", flex: "1", minW: "0", children: [
|
|
8250
8270
|
/* @__PURE__ */ jsx54(chakra31.span, { display: "inline-flex", alignItems: "center", fontWeight: "medium", textStyle: "sm", minW: "0", children: raw == null || period || value == null ? groupName(value, label2, period) : renderCell(field, raw, first) }),
|
|
8251
8271
|
/* @__PURE__ */ jsx54(CountBadge, { value: info?.count ?? rows.length }),
|
|
8252
8272
|
!thenField && renderGroupAside?.({ field: groupField, value: info?.value ?? null, label: info?.label ?? "" }),
|
|
8253
|
-
conditions !== null && !period && /* @__PURE__ */
|
|
8273
|
+
conditions !== null && !period && /* @__PURE__ */ jsxs40(
|
|
8254
8274
|
Button,
|
|
8255
8275
|
{
|
|
8256
8276
|
size: "xs",
|
|
@@ -8288,7 +8308,7 @@ function QueryableList({
|
|
|
8288
8308
|
const first = groups[0]?.rows[0];
|
|
8289
8309
|
const raw = first?.values[groupField];
|
|
8290
8310
|
const count = (result?.groups ?? []).filter((g) => groupKey(g.value) === parent).reduce((n, g) => n + g.count, 0);
|
|
8291
|
-
return /* @__PURE__ */
|
|
8311
|
+
return /* @__PURE__ */ jsxs40(HStack11, { gap: "2.5", flex: "1", minW: "0", children: [
|
|
8292
8312
|
/* @__PURE__ */ jsx54(chakra31.span, { display: "inline-flex", alignItems: "center", fontWeight: "bold", textStyle: "sm", minW: "0", children: raw == null || query.groupBy?.period || info?.value == null ? groupName(info?.value, info?.label, query.groupBy?.period) : renderCell(groupField, raw, first) }),
|
|
8293
8313
|
/* @__PURE__ */ jsx54(CountBadge, { value: count }),
|
|
8294
8314
|
renderGroupAside?.({ field: groupField, value: info?.value ?? null, label: info?.label ?? "" })
|
|
@@ -8387,12 +8407,12 @@ function placeholderOf(id, kind) {
|
|
|
8387
8407
|
}
|
|
8388
8408
|
function ExportMenu({ busy, disabled, onExport }) {
|
|
8389
8409
|
const labels = useAbpLabels().queryList;
|
|
8390
|
-
return /* @__PURE__ */
|
|
8391
|
-
/* @__PURE__ */ jsx54(Menu3.Trigger, { asChild: true, children: /* @__PURE__ */
|
|
8410
|
+
return /* @__PURE__ */ jsxs40(Menu3.Root, { positioning: { placement: "bottom-end" }, onSelect: (d) => onExport(d.value), children: [
|
|
8411
|
+
/* @__PURE__ */ jsx54(Menu3.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs40(Button, { size: "sm", variant: "secondary", disabled: disabled || busy, loading: busy, loadingText: labels.exporting, children: [
|
|
8392
8412
|
/* @__PURE__ */ jsx54(Download, {}),
|
|
8393
8413
|
labels.export
|
|
8394
8414
|
] }) }),
|
|
8395
|
-
/* @__PURE__ */ jsx54(Portal15, { children: /* @__PURE__ */ jsx54(Menu3.Positioner, { children: /* @__PURE__ */
|
|
8415
|
+
/* @__PURE__ */ jsx54(Portal15, { children: /* @__PURE__ */ jsx54(Menu3.Positioner, { children: /* @__PURE__ */ jsxs40(Menu3.Content, { minW: "48", children: [
|
|
8396
8416
|
/* @__PURE__ */ jsx54(Menu3.Item, { value: "csv", children: labels.exportCsv }),
|
|
8397
8417
|
/* @__PURE__ */ jsx54(Menu3.Item, { value: "xlsx", children: labels.exportExcel })
|
|
8398
8418
|
] }) }) })
|
|
@@ -8474,8 +8494,8 @@ function RqlBox({
|
|
|
8474
8494
|
}
|
|
8475
8495
|
}
|
|
8476
8496
|
const hasSpan = error?.start != null && error.end != null && error.end >= error.start && error.end <= text.length;
|
|
8477
|
-
return /* @__PURE__ */
|
|
8478
|
-
/* @__PURE__ */
|
|
8497
|
+
return /* @__PURE__ */ jsxs40(Stack11, { gap: "1.5", flex: "1", minW: "0", position: "relative", children: [
|
|
8498
|
+
/* @__PURE__ */ jsxs40(HStack11, { gap: "2", children: [
|
|
8479
8499
|
/* @__PURE__ */ jsx54(
|
|
8480
8500
|
Input6,
|
|
8481
8501
|
{
|
|
@@ -8523,7 +8543,7 @@ function RqlBox({
|
|
|
8523
8543
|
borderRadius: "md",
|
|
8524
8544
|
boxShadow: "md",
|
|
8525
8545
|
py: "1",
|
|
8526
|
-
children: found.items.map((item, i) => /* @__PURE__ */
|
|
8546
|
+
children: found.items.map((item, i) => /* @__PURE__ */ jsxs40(
|
|
8527
8547
|
HStack11,
|
|
8528
8548
|
{
|
|
8529
8549
|
id: `${listId}-${i}`,
|
|
@@ -8549,9 +8569,9 @@ function RqlBox({
|
|
|
8549
8569
|
))
|
|
8550
8570
|
}
|
|
8551
8571
|
),
|
|
8552
|
-
error && /* @__PURE__ */
|
|
8572
|
+
error && /* @__PURE__ */ jsxs40(InlineAlert, { tone: "danger", size: "sm", children: [
|
|
8553
8573
|
error.message,
|
|
8554
|
-
hasSpan && /* @__PURE__ */
|
|
8574
|
+
hasSpan && /* @__PURE__ */ jsxs40(chakra31.code, { display: "block", mt: "1", fontFamily: "mono", whiteSpace: "pre-wrap", children: [
|
|
8555
8575
|
text.slice(0, error.start),
|
|
8556
8576
|
/* @__PURE__ */ jsx54(chakra31.mark, { bg: "red.subtle", color: "fg", textDecoration: "underline wavy", textDecorationColor: "fg.error", children: text.slice(error.start, error.end) || " " }),
|
|
8557
8577
|
text.slice(error.end)
|
|
@@ -8564,12 +8584,12 @@ function RqlBox({
|
|
|
8564
8584
|
import { forwardRef as forwardRef9, useLayoutEffect as useLayoutEffect4, useRef as useRef20 } from "react";
|
|
8565
8585
|
import { Box as Box11, HStack as HStack12, Portal as Portal16, Text as Text16 } from "@chakra-ui/react";
|
|
8566
8586
|
import { ArrowDownToLine } from "lucide-react";
|
|
8567
|
-
import { jsx as jsx55, jsxs as
|
|
8587
|
+
import { jsx as jsx55, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
8568
8588
|
var OUT3 = `cubic-bezier(${curves.out.join(", ")})`;
|
|
8569
8589
|
var FileDropArea = forwardRef9(function FileDropArea2({ awake = false, over: over2 = false, hint, children, ...rest }, ref) {
|
|
8570
8590
|
const { reduce } = useMotionSetting();
|
|
8571
8591
|
const lit = awake || over2;
|
|
8572
|
-
return /* @__PURE__ */
|
|
8592
|
+
return /* @__PURE__ */ jsxs41(
|
|
8573
8593
|
Box11,
|
|
8574
8594
|
{
|
|
8575
8595
|
ref,
|
|
@@ -8588,7 +8608,7 @@ var FileDropArea = forwardRef9(function FileDropArea2({ awake = false, over: ove
|
|
|
8588
8608
|
...rest,
|
|
8589
8609
|
children: [
|
|
8590
8610
|
children,
|
|
8591
|
-
/* @__PURE__ */ jsx55(Presence, { show: lit, from: "fade", position: "absolute", inset: "0", rounded: "l2", zIndex: "1", pointerEvents: "none", children: /* @__PURE__ */
|
|
8611
|
+
/* @__PURE__ */ jsx55(Presence, { show: lit, from: "fade", position: "absolute", inset: "0", rounded: "l2", zIndex: "1", pointerEvents: "none", children: /* @__PURE__ */ jsxs41(
|
|
8592
8612
|
HStack12,
|
|
8593
8613
|
{
|
|
8594
8614
|
h: "full",
|
|
@@ -8625,7 +8645,7 @@ function Bob({ active }) {
|
|
|
8625
8645
|
return /* @__PURE__ */ jsx55(Box11, { as: "span", ref, display: "inline-flex", flexShrink: 0, _icon: { boxSize: "4" }, children: /* @__PURE__ */ jsx55(ArrowDownToLine, {}) });
|
|
8626
8646
|
}
|
|
8627
8647
|
function DropHint({ show, children }) {
|
|
8628
|
-
return /* @__PURE__ */ jsx55(Portal16, { children: /* @__PURE__ */ jsx55(Box11, { position: "fixed", insetInline: "0", bottom: "6", display: "flex", justifyContent: "center", pointerEvents: "none", zIndex: "toast", px: "4", children: /* @__PURE__ */ jsx55(Presence, { show, from: "rise", children: /* @__PURE__ */
|
|
8648
|
+
return /* @__PURE__ */ jsx55(Portal16, { children: /* @__PURE__ */ jsx55(Box11, { position: "fixed", insetInline: "0", bottom: "6", display: "flex", justifyContent: "center", pointerEvents: "none", zIndex: "toast", px: "4", children: /* @__PURE__ */ jsx55(Presence, { show, from: "rise", children: /* @__PURE__ */ jsxs41(HStack12, { gap: "2", px: "4", py: "2", rounded: "full", bg: "bg.inverted", color: "fg.inverted", shadow: "lg", textStyle: "body.sm", fontWeight: "medium", maxW: "lg", "data-testid": "drop-hint", _icon: { boxSize: "4" }, children: [
|
|
8629
8649
|
/* @__PURE__ */ jsx55(ArrowDownToLine, {}),
|
|
8630
8650
|
/* @__PURE__ */ jsx55(Text16, { as: "span", truncate: true, children })
|
|
8631
8651
|
] }) }) }) });
|
|
@@ -8635,12 +8655,12 @@ function DropHint({ show, children }) {
|
|
|
8635
8655
|
import { useLayoutEffect as useLayoutEffect5, useRef as useRef21 } from "react";
|
|
8636
8656
|
import { Box as Box12, chakra as chakra32, HStack as HStack13, Stack as Stack12, Text as Text17 } from "@chakra-ui/react";
|
|
8637
8657
|
import { Check as Check3, File as FileIcon, RotateCcw, TriangleAlert, X as X3 } from "lucide-react";
|
|
8638
|
-
import { jsx as jsx56, jsxs as
|
|
8658
|
+
import { jsx as jsx56, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
8639
8659
|
var OUT4 = `cubic-bezier(${curves.out.join(", ")})`;
|
|
8640
8660
|
function UploadList({ rows, summary, fraction, announce, labels, onCancel, onRetry, onDismiss }) {
|
|
8641
|
-
return /* @__PURE__ */
|
|
8661
|
+
return /* @__PURE__ */ jsxs42(Stack12, { gap: "2", "data-testid": "upload-list", children: [
|
|
8642
8662
|
/* @__PURE__ */ jsx56(chakra32.span, { srOnly: true, "aria-live": "polite", children: announce }),
|
|
8643
|
-
rows.length > 0 && summary != null && /* @__PURE__ */
|
|
8663
|
+
rows.length > 0 && summary != null && /* @__PURE__ */ jsxs42(Stack12, { gap: "1", children: [
|
|
8644
8664
|
/* @__PURE__ */ jsx56(Text17, { textStyle: "caption", color: "fg.muted", children: summary }),
|
|
8645
8665
|
fraction != null && /* @__PURE__ */ jsx56(Bar2, { fraction, tone: "accent", label: typeof summary === "string" ? summary : void 0 })
|
|
8646
8666
|
] }),
|
|
@@ -8650,15 +8670,15 @@ function UploadList({ rows, summary, fraction, announce, labels, onCancel, onRet
|
|
|
8650
8670
|
function Row({ row, labels, onCancel, onRetry, onDismiss }) {
|
|
8651
8671
|
const going = row.state === "waiting" || row.state === "sending";
|
|
8652
8672
|
const trouble = row.state === "failed" || row.state === "refused";
|
|
8653
|
-
return /* @__PURE__ */
|
|
8673
|
+
return /* @__PURE__ */ jsxs42(HStack13, { gap: "3", px: "3", py: "2", rounded: "l2", bg: "bg.subtle", borderWidth: "1px", borderColor: trouble ? "border.error" : "border.muted", "data-upload": row.name, "data-state": row.state, children: [
|
|
8654
8674
|
/* @__PURE__ */ jsx56(Preview, { src: row.preview }),
|
|
8655
|
-
/* @__PURE__ */
|
|
8656
|
-
/* @__PURE__ */
|
|
8675
|
+
/* @__PURE__ */ jsxs42(Stack12, { gap: "1", flex: "1", minW: "0", children: [
|
|
8676
|
+
/* @__PURE__ */ jsxs42(HStack13, { gap: "2", justify: "space-between", children: [
|
|
8657
8677
|
/* @__PURE__ */ jsx56(Text17, { as: "span", fontWeight: "medium", truncate: true, children: /* @__PURE__ */ jsx56("bdi", { children: row.name }) }),
|
|
8658
8678
|
/* @__PURE__ */ jsx56(Text17, { as: "span", textStyle: "caption", color: trouble ? "fg.error" : "fg.muted", flexShrink: 0, fontVariantNumeric: "tabular-nums", children: row.state === "done" ? /* @__PURE__ */ jsx56(Done, {}) : row.status })
|
|
8659
8679
|
] }),
|
|
8660
8680
|
(going || row.state === "done") && /* @__PURE__ */ jsx56(Bar2, { fraction: row.state === "done" ? 1 : row.fraction, tone: row.state === "done" ? "success" : "accent", label: row.name, quiet: row.state === "waiting" }),
|
|
8661
|
-
row.detail != null && /* @__PURE__ */
|
|
8681
|
+
row.detail != null && /* @__PURE__ */ jsxs42(Text17, { as: "span", textStyle: "caption", color: trouble ? "fg.error" : "fg.muted", truncate: true, children: [
|
|
8662
8682
|
trouble && /* @__PURE__ */ jsx56(Box12, { as: "span", display: "inline-flex", verticalAlign: "-0.15em", me: "1", _icon: { boxSize: "3.5" }, children: /* @__PURE__ */ jsx56(TriangleAlert, {}) }),
|
|
8663
8683
|
row.detail
|
|
8664
8684
|
] })
|
|
@@ -8985,7 +9005,7 @@ import {
|
|
|
8985
9005
|
} from "@dnd-kit/core";
|
|
8986
9006
|
import { SortableContext as SortableContext3, sortableKeyboardCoordinates as sortableKeyboardCoordinates3, useSortable as useSortable3, verticalListSortingStrategy as verticalListSortingStrategy3 } from "@dnd-kit/sortable";
|
|
8987
9007
|
import { CSS as CSS4 } from "@dnd-kit/utilities";
|
|
8988
|
-
import { jsx as jsx57, jsxs as
|
|
9008
|
+
import { jsx as jsx57, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
8989
9009
|
var sectionId = (id) => `section:${id}`;
|
|
8990
9010
|
function SortableSections({
|
|
8991
9011
|
"aria-label": ariaLabel,
|
|
@@ -9035,7 +9055,7 @@ function SortableSections({
|
|
|
9035
9055
|
if (from === target && !move.before && !move.after) return;
|
|
9036
9056
|
onMove(item, move);
|
|
9037
9057
|
}
|
|
9038
|
-
return /* @__PURE__ */
|
|
9058
|
+
return /* @__PURE__ */ jsxs43(
|
|
9039
9059
|
DndContext4,
|
|
9040
9060
|
{
|
|
9041
9061
|
sensors,
|
|
@@ -9045,8 +9065,8 @@ function SortableSections({
|
|
|
9045
9065
|
onDragCancel: () => setActive(null),
|
|
9046
9066
|
accessibility: { announcements, screenReaderInstructions: screenReaderInstructions ? { draggable: screenReaderInstructions } : void 0 },
|
|
9047
9067
|
children: [
|
|
9048
|
-
/* @__PURE__ */ jsx57(Stack13, { role: "region", "aria-label": ariaLabel, gap: "4", children: shown.map((s) => /* @__PURE__ */
|
|
9049
|
-
loading && s.items.length === 0 && Array.from({ length: skeletonItems }, (_, n) => /* @__PURE__ */
|
|
9068
|
+
/* @__PURE__ */ jsx57(Stack13, { role: "region", "aria-label": ariaLabel, gap: "4", children: shown.map((s) => /* @__PURE__ */ jsxs43(Section, { section: s, dragging: !!active, children: [
|
|
9069
|
+
loading && s.items.length === 0 && Array.from({ length: skeletonItems }, (_, n) => /* @__PURE__ */ jsxs43(Box13, { h: skeletonItemHeight, px: "2", display: "flex", alignItems: "center", gap: "3", "aria-hidden": "true", children: [
|
|
9050
9070
|
/* @__PURE__ */ jsx57(Bone, { width: "14", height: "4" }),
|
|
9051
9071
|
/* @__PURE__ */ jsx57(TextBone, { width: boneWidth(n, 16, 36) })
|
|
9052
9072
|
] }, n)),
|
|
@@ -9062,7 +9082,7 @@ function SortableSections({
|
|
|
9062
9082
|
function Section({ section, dragging, children }) {
|
|
9063
9083
|
const id = sectionId(section.id);
|
|
9064
9084
|
const { setNodeRef, isOver } = useDroppable3({ id });
|
|
9065
|
-
return /* @__PURE__ */
|
|
9085
|
+
return /* @__PURE__ */ jsxs43(Box13, { as: "section", borderWidth: "1px", borderColor: "border", rounded: "l3", bg: "bg.panel", "data-section": section.id, children: [
|
|
9066
9086
|
/* @__PURE__ */ jsx57(Box13, { px: "3", py: "2", borderBottomWidth: "1px", borderColor: "border.muted", children: section.header }),
|
|
9067
9087
|
/* @__PURE__ */ jsx57(SortableContext3, { id, items: section.items.map((i) => i.id), strategy: verticalListSortingStrategy3, children: /* @__PURE__ */ jsx57(
|
|
9068
9088
|
Stack13,
|
|
@@ -9101,7 +9121,7 @@ function SortableItem({ id, children }) {
|
|
|
9101
9121
|
import { Fragment as Fragment18, useEffect as useEffect17, useLayoutEffect as useLayoutEffect6, useRef as useRef23, useState as useState25 } from "react";
|
|
9102
9122
|
import { Box as Box14, HStack as HStack14, Popover as Popover4, Portal as Portal17, Stack as Stack14, Text as Text19 } from "@chakra-ui/react";
|
|
9103
9123
|
import { Flag, Trash2 as Trash23 } from "lucide-react";
|
|
9104
|
-
import { jsx as jsx58, jsxs as
|
|
9124
|
+
import { jsx as jsx58, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
9105
9125
|
var DAY2 = 864e5;
|
|
9106
9126
|
var toDay = (day) => Math.round(Date.parse(`${day}T00:00:00Z`) / DAY2);
|
|
9107
9127
|
var fromDay = (n) => new Date(n * DAY2).toISOString().slice(0, 10);
|
|
@@ -9370,7 +9390,7 @@ function TimelineChart({
|
|
|
9370
9390
|
const bandsTop = tickHeight, markersTop = tickHeight + (shownBands.length ? STRIP : 0);
|
|
9371
9391
|
const headerHeight = markersTop + (shownMarkers.length ? STRIP : 0);
|
|
9372
9392
|
const todayAt = today ? toDay(today) - origin : -1;
|
|
9373
|
-
return /* @__PURE__ */
|
|
9393
|
+
return /* @__PURE__ */ jsxs44(
|
|
9374
9394
|
Box14,
|
|
9375
9395
|
{
|
|
9376
9396
|
ref: root,
|
|
@@ -9389,7 +9409,7 @@ function TimelineChart({
|
|
|
9389
9409
|
onKeyDown: zoomKey,
|
|
9390
9410
|
children: [
|
|
9391
9411
|
instructions && /* @__PURE__ */ jsx58(Text19, { srOnly: true, children: instructions }),
|
|
9392
|
-
/* @__PURE__ */
|
|
9412
|
+
/* @__PURE__ */ jsxs44(Box14, { display: "grid", gridTemplateColumns: fill4 ? `${labelWidth}px minmax(${width}px, 1fr)` : `${labelWidth}px ${width}px`, minW: "fit-content", children: [
|
|
9393
9413
|
/* @__PURE__ */ jsx58(
|
|
9394
9414
|
Box14,
|
|
9395
9415
|
{
|
|
@@ -9409,7 +9429,7 @@ function TimelineChart({
|
|
|
9409
9429
|
children: corner
|
|
9410
9430
|
}
|
|
9411
9431
|
),
|
|
9412
|
-
/* @__PURE__ */
|
|
9432
|
+
/* @__PURE__ */ jsxs44(Box14, { position: "sticky", top: "0", zIndex: "2", bg: "bg.muted", borderBottomWidth: "1px", borderColor: "border", h: `${headerHeight}px`, overflow: "clip", children: [
|
|
9413
9433
|
ticks.map((t, i) => /* @__PURE__ */ jsx58(
|
|
9414
9434
|
Box14,
|
|
9415
9435
|
{
|
|
@@ -9510,7 +9530,7 @@ function TimelineChart({
|
|
|
9510
9530
|
)
|
|
9511
9531
|
}
|
|
9512
9532
|
) }, b.id)),
|
|
9513
|
-
shownMarkers.map((m4) => /* @__PURE__ */ jsx58(Tooltip, { content: m4.detail ?? m4.label, children: /* @__PURE__ */
|
|
9533
|
+
shownMarkers.map((m4) => /* @__PURE__ */ jsx58(Tooltip, { content: m4.detail ?? m4.label, children: /* @__PURE__ */ jsxs44(
|
|
9514
9534
|
Box14,
|
|
9515
9535
|
{
|
|
9516
9536
|
position: "absolute",
|
|
@@ -9542,7 +9562,7 @@ function TimelineChart({
|
|
|
9542
9562
|
) }, m4.id))
|
|
9543
9563
|
] }),
|
|
9544
9564
|
/* @__PURE__ */ jsx58(Box14, { position: "sticky", insetStart: "0", zIndex: "1", bg: "bg.panel", borderInlineEndWidth: "1px", borderColor: "border", children: shown.map((r, i) => /* @__PURE__ */ jsx58(HStack14, { h: `${rowHeight}px`, px: "3", gap: "2", borderBottomWidth: "1px", borderColor: "border.muted", bg: r.heading && !r.lane ? "bg.subtle" : void 0, minW: "0", children: placeholders ? /* @__PURE__ */ jsx58(TextBone, { width: boneWidth(i, 12, 26) }) : r.heading ?? (r.item && renderLabel(r.item)) }, r.id)) }),
|
|
9545
|
-
/* @__PURE__ */
|
|
9565
|
+
/* @__PURE__ */ jsxs44(Box14, { ref: layer, position: "relative", zIndex: "0", h: `${shown.length * rowHeight}px`, children: [
|
|
9546
9566
|
offRuns.map((o) => /* @__PURE__ */ jsx58(
|
|
9547
9567
|
Box14,
|
|
9548
9568
|
{
|
|
@@ -9699,8 +9719,8 @@ function TimelineChart({
|
|
|
9699
9719
|
const thin = tone === "rollup" && !single;
|
|
9700
9720
|
const diamond = single ? { w: `${DIAMOND}px`, h: `${DIAMOND}px`, top: `${i * rowHeight + rowHeight / 2 - DIAMOND / 2}px`, transform: "rotate(45deg)", rounded: "l1" } : null;
|
|
9701
9721
|
const canLink = !!onLink && item.linkable !== false && !drag;
|
|
9702
|
-
return /* @__PURE__ */
|
|
9703
|
-
/* @__PURE__ */
|
|
9722
|
+
return /* @__PURE__ */ jsxs44(Fragment18, { children: [
|
|
9723
|
+
/* @__PURE__ */ jsxs44(
|
|
9704
9724
|
Box14,
|
|
9705
9725
|
{
|
|
9706
9726
|
role: "button",
|
|
@@ -9835,7 +9855,7 @@ function TimelineChart({
|
|
|
9835
9855
|
zIndex: "1",
|
|
9836
9856
|
_rtl: { transform: "scaleX(-1)" },
|
|
9837
9857
|
"aria-hidden": !onUnlink,
|
|
9838
|
-
children: /* @__PURE__ */
|
|
9858
|
+
children: /* @__PURE__ */ jsxs44("svg", { width, height: rows.length * rowHeight, style: { position: "absolute", left: 0, top: 0 }, children: [
|
|
9839
9859
|
/* @__PURE__ */ jsx58("defs", { children: /* @__PURE__ */ jsx58("marker", { id: "abp-arrow", viewBox: "0 0 8 8", refX: "7", refY: "4", markerWidth: "7", markerHeight: "7", orient: "auto-start-reverse", children: /* @__PURE__ */ jsx58("path", { d: "M 0 0 L 8 4 L 0 8 z", fill: "context-stroke" }) }) }),
|
|
9840
9860
|
links.map((l) => {
|
|
9841
9861
|
const f = ys.get(l.from), t = ys.get(l.to);
|
|
@@ -9847,7 +9867,7 @@ function TimelineChart({
|
|
|
9847
9867
|
const picked = menu?.from === l.from && menu.to === l.to;
|
|
9848
9868
|
const faint = !l.strong && links.some((x) => x.strong);
|
|
9849
9869
|
const open = (x, y) => setMenu({ from: l.from, to: l.to, x, y });
|
|
9850
|
-
return /* @__PURE__ */
|
|
9870
|
+
return /* @__PURE__ */ jsxs44("g", { children: [
|
|
9851
9871
|
/* @__PURE__ */ jsx58(
|
|
9852
9872
|
"path",
|
|
9853
9873
|
{
|
|
@@ -9885,7 +9905,7 @@ function TimelineChart({
|
|
|
9885
9905
|
] })
|
|
9886
9906
|
}
|
|
9887
9907
|
),
|
|
9888
|
-
linking && /* @__PURE__ */
|
|
9908
|
+
linking && /* @__PURE__ */ jsxs44("svg", { width: "100%", height: shown.length * rowHeight, style: { position: "absolute", left: 0, top: 0, pointerEvents: "none", zIndex: 3 }, "aria-hidden": true, children: [
|
|
9889
9909
|
/* @__PURE__ */ jsx58("line", { x1: linking.x0, y1: linking.y0, x2: linking.x, y2: linking.y, stroke: tv("colors.accent.solid"), strokeWidth: 2, strokeDasharray: "5 4" }),
|
|
9890
9910
|
/* @__PURE__ */ jsx58("circle", { cx: linking.x, cy: linking.y, r: 4, fill: tv("colors.accent.solid") })
|
|
9891
9911
|
] })
|
|
@@ -9924,9 +9944,9 @@ function TimelineChart({
|
|
|
9924
9944
|
unmountOnExit: true,
|
|
9925
9945
|
autoFocus: true,
|
|
9926
9946
|
positioning: { placement: "bottom", getAnchorRect: () => menu ? { x: menu.x, y: menu.y, width: 1, height: 1 } : null },
|
|
9927
|
-
children: /* @__PURE__ */ jsx58(Portal17, { children: /* @__PURE__ */ jsx58(Popover4.Positioner, { children: /* @__PURE__ */ jsx58(Popover4.Content, { w: "auto", maxW: "calc(100vw - 32px)", children: /* @__PURE__ */ jsx58(Popover4.Body, { children: menu && /* @__PURE__ */
|
|
9947
|
+
children: /* @__PURE__ */ jsx58(Portal17, { children: /* @__PURE__ */ jsx58(Popover4.Positioner, { children: /* @__PURE__ */ jsx58(Popover4.Content, { w: "auto", maxW: "calc(100vw - 32px)", children: /* @__PURE__ */ jsx58(Popover4.Body, { children: menu && /* @__PURE__ */ jsxs44(Stack14, { gap: "2", children: [
|
|
9928
9948
|
/* @__PURE__ */ jsx58(Text19, { textStyle: "label", children: linkTexts?.arrow(menu.from, menu.to) }),
|
|
9929
|
-
/* @__PURE__ */
|
|
9949
|
+
/* @__PURE__ */ jsxs44(Button, { size: "sm", variant: "secondary", onClick: () => {
|
|
9930
9950
|
onUnlink(menu);
|
|
9931
9951
|
setMenu(null);
|
|
9932
9952
|
}, children: [
|
|
@@ -9995,7 +10015,7 @@ function placeCards(items, first, days, scale, colW = columnWidth(scale)) {
|
|
|
9995
10015
|
}
|
|
9996
10016
|
|
|
9997
10017
|
// src/components/TimelineCards.tsx
|
|
9998
|
-
import { jsx as jsx59, jsxs as
|
|
10018
|
+
import { jsx as jsx59, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
9999
10019
|
var LANE = 60;
|
|
10000
10020
|
var KEYS = { d: "day", w: "week", m: "month" };
|
|
10001
10021
|
function TimelineCards(props) {
|
|
@@ -10009,7 +10029,7 @@ function TimelineCards(props) {
|
|
|
10009
10029
|
onScale(next);
|
|
10010
10030
|
}
|
|
10011
10031
|
};
|
|
10012
|
-
return /* @__PURE__ */
|
|
10032
|
+
return /* @__PURE__ */ jsxs45(
|
|
10013
10033
|
chakra33.div,
|
|
10014
10034
|
{
|
|
10015
10035
|
role: "region",
|
|
@@ -10027,7 +10047,7 @@ function TimelineCards(props) {
|
|
|
10027
10047
|
);
|
|
10028
10048
|
}
|
|
10029
10049
|
function Card({ item, p, range, cutStart, cutEnd, style }) {
|
|
10030
|
-
const card = /* @__PURE__ */
|
|
10050
|
+
const card = /* @__PURE__ */ jsxs45(
|
|
10031
10051
|
chakra33.button,
|
|
10032
10052
|
{
|
|
10033
10053
|
type: "button",
|
|
@@ -10079,11 +10099,11 @@ function Lanes(p) {
|
|
|
10079
10099
|
const gridW = days.length * colW;
|
|
10080
10100
|
const placeholders = useLoading(p.loading) && items.length === 0;
|
|
10081
10101
|
const height = (placeholders ? 4 : Math.max(lanes, 1)) * LANE + 16;
|
|
10082
|
-
return /* @__PURE__ */ jsx59(chakra33.div, { overflowX: "auto", ref: box, children: /* @__PURE__ */
|
|
10102
|
+
return /* @__PURE__ */ jsx59(chakra33.div, { overflowX: "auto", ref: box, children: /* @__PURE__ */ jsxs45(chakra33.div, { position: "relative", minW: "full", w: `${gridW}px`, children: [
|
|
10083
10103
|
/* @__PURE__ */ jsx59(chakra33.div, { display: "flex", borderBottomWidth: "1px", borderColor: "border", bg: "bg.subtle", position: "sticky", top: "0", zIndex: "1", children: days.map((d) => {
|
|
10084
10104
|
const isToday = d === today;
|
|
10085
10105
|
const weekStart = new Date(dayNumber(d) * 864e5).getUTCDay() === 0;
|
|
10086
|
-
return /* @__PURE__ */
|
|
10106
|
+
return /* @__PURE__ */ jsxs45(
|
|
10087
10107
|
chakra33.div,
|
|
10088
10108
|
{
|
|
10089
10109
|
w: `${colW}px`,
|
|
@@ -10181,6 +10201,7 @@ export {
|
|
|
10181
10201
|
ABP_UI_VERSION,
|
|
10182
10202
|
AbpApiError,
|
|
10183
10203
|
AbpProvider,
|
|
10204
|
+
AddButton,
|
|
10184
10205
|
AppLink,
|
|
10185
10206
|
AppShell,
|
|
10186
10207
|
ArriveOnChange,
|