@abpjs/ui 0.2.0-next.22 → 0.2.0-next.24
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 +23 -0
- package/dist/ai.js +6 -6
- package/dist/ai.js.map +1 -1
- package/dist/index.d.ts +54 -15
- package/dist/index.js +436 -398
- 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.24" : "0.0.0-dev";
|
|
1564
1564
|
|
|
1565
1565
|
// src/provider/time-zone.tsx
|
|
1566
1566
|
import { createContext, useContext } from "react";
|
|
@@ -1676,6 +1676,7 @@ var defaultQueryListLabels = {
|
|
|
1676
1676
|
next: "Next page",
|
|
1677
1677
|
pages: "Pages",
|
|
1678
1678
|
page: "Page {page}",
|
|
1679
|
+
pageOf: "Page {page} of {pages}",
|
|
1679
1680
|
empty: "Nothing matches this query.",
|
|
1680
1681
|
export: "Export",
|
|
1681
1682
|
exportCsv: "CSV (.csv)",
|
|
@@ -1751,6 +1752,7 @@ import {
|
|
|
1751
1752
|
Button as ChakraButton,
|
|
1752
1753
|
IconButton as ChakraIconButton
|
|
1753
1754
|
} from "@chakra-ui/react";
|
|
1755
|
+
import { Plus } from "lucide-react";
|
|
1754
1756
|
|
|
1755
1757
|
// src/skeleton/loading.tsx
|
|
1756
1758
|
import { createContext as createContext3, useContext as useContext3, useEffect, useRef, useState } from "react";
|
|
@@ -1861,7 +1863,7 @@ function boneWidth(index, min = 8, max = 20) {
|
|
|
1861
1863
|
}
|
|
1862
1864
|
|
|
1863
1865
|
// src/components/Button.tsx
|
|
1864
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
1866
|
+
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1865
1867
|
var chakraVariant = { primary: "solid", secondary: "outline", ghost: "ghost", link: "plain" };
|
|
1866
1868
|
function palette2(variant, danger) {
|
|
1867
1869
|
if (danger) return "danger";
|
|
@@ -1884,7 +1886,29 @@ var Button = forwardRef(function Button2({ variant = "secondary", size = "md", d
|
|
|
1884
1886
|
}
|
|
1885
1887
|
);
|
|
1886
1888
|
});
|
|
1887
|
-
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) {
|
|
1888
1912
|
const skeleton = useLoading();
|
|
1889
1913
|
return /* @__PURE__ */ jsx5(
|
|
1890
1914
|
ChakraIconButton,
|
|
@@ -1893,7 +1917,8 @@ var IconButton = forwardRef(function IconButton2({ variant = "ghost", size = "md
|
|
|
1893
1917
|
type,
|
|
1894
1918
|
size,
|
|
1895
1919
|
variant: chakraVariant[variant],
|
|
1896
|
-
colorPalette: palette2(variant, danger),
|
|
1920
|
+
colorPalette: palette2(variant, danger || remove),
|
|
1921
|
+
...remove && { color: "fg.muted", _hover: { bg: "colorPalette.subtle", color: "colorPalette.fg" } },
|
|
1897
1922
|
title: title ?? rest["aria-label"],
|
|
1898
1923
|
css: skeleton ? [ghostCss, css] : css,
|
|
1899
1924
|
tabIndex: skeleton ? -1 : void 0,
|
|
@@ -1904,7 +1929,7 @@ var IconButton = forwardRef(function IconButton2({ variant = "ghost", size = "md
|
|
|
1904
1929
|
});
|
|
1905
1930
|
|
|
1906
1931
|
// src/components/ConfirmDialog.tsx
|
|
1907
|
-
import { jsx as jsx6, jsxs as
|
|
1932
|
+
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1908
1933
|
function ConfirmDialog({
|
|
1909
1934
|
open,
|
|
1910
1935
|
onOpenChange,
|
|
@@ -1927,12 +1952,12 @@ function ConfirmDialog({
|
|
|
1927
1952
|
initialFocusEl: () => cancelRef.current,
|
|
1928
1953
|
size: "sm",
|
|
1929
1954
|
placement: "center",
|
|
1930
|
-
children: /* @__PURE__ */
|
|
1955
|
+
children: /* @__PURE__ */ jsxs3(Portal, { children: [
|
|
1931
1956
|
/* @__PURE__ */ jsx6(Dialog.Backdrop, {}),
|
|
1932
|
-
/* @__PURE__ */ jsx6(Dialog.Positioner, { children: /* @__PURE__ */
|
|
1957
|
+
/* @__PURE__ */ jsx6(Dialog.Positioner, { children: /* @__PURE__ */ jsxs3(Dialog.Content, { children: [
|
|
1933
1958
|
/* @__PURE__ */ jsx6(Dialog.Header, { children: /* @__PURE__ */ jsx6(Dialog.Title, { children: title }) }),
|
|
1934
1959
|
description != null && /* @__PURE__ */ jsx6(Dialog.Body, { children: /* @__PURE__ */ jsx6(Dialog.Description, { children: description }) }),
|
|
1935
|
-
/* @__PURE__ */
|
|
1960
|
+
/* @__PURE__ */ jsxs3(Dialog.Footer, { children: [
|
|
1936
1961
|
/* @__PURE__ */ jsx6(Dialog.ActionTrigger, { asChild: true, children: /* @__PURE__ */ jsx6(Button, { ref: cancelRef, variant: "secondary", children: cancelLabel ?? labels.cancel }) }),
|
|
1937
1962
|
/* @__PURE__ */ jsx6(Button, { variant: "primary", danger, loading: busy, onClick: () => void onConfirm(), children: confirmLabel ?? labels.confirm })
|
|
1938
1963
|
] }),
|
|
@@ -1958,7 +1983,7 @@ function ConfirmProvider({ children }) {
|
|
|
1958
1983
|
resolver.current = null;
|
|
1959
1984
|
setState((s) => s ? { ...s, open: false } : s);
|
|
1960
1985
|
}, []);
|
|
1961
|
-
return /* @__PURE__ */
|
|
1986
|
+
return /* @__PURE__ */ jsxs3(ConfirmContext.Provider, { value: confirm, children: [
|
|
1962
1987
|
children,
|
|
1963
1988
|
state && /* @__PURE__ */ jsx6(
|
|
1964
1989
|
ConfirmDialog,
|
|
@@ -2070,7 +2095,7 @@ var springs = {
|
|
|
2070
2095
|
};
|
|
2071
2096
|
|
|
2072
2097
|
// src/motion/Celebrate.tsx
|
|
2073
|
-
import { jsx as jsx7, jsxs as
|
|
2098
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2074
2099
|
var CelebrateContext = createContext6(() => {
|
|
2075
2100
|
});
|
|
2076
2101
|
function useCelebrate() {
|
|
@@ -2095,7 +2120,7 @@ function CelebrationLayer({ children }) {
|
|
|
2095
2120
|
},
|
|
2096
2121
|
[reduce]
|
|
2097
2122
|
);
|
|
2098
|
-
return /* @__PURE__ */
|
|
2123
|
+
return /* @__PURE__ */ jsxs4(CelebrateContext.Provider, { value: celebrate, children: [
|
|
2099
2124
|
children,
|
|
2100
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(
|
|
2101
2126
|
(b) => b.particles.map((p, i) => /* @__PURE__ */ jsx7(
|
|
@@ -2155,7 +2180,7 @@ function MotionProvider({ setting: initial = "system", children }) {
|
|
|
2155
2180
|
|
|
2156
2181
|
// src/components/Toaster.tsx
|
|
2157
2182
|
import { createToaster, Portal as Portal3, Spinner, Stack, Toast, Toaster as ChakraToaster } from "@chakra-ui/react";
|
|
2158
|
-
import { jsx as jsx9, jsxs as
|
|
2183
|
+
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2159
2184
|
var toaster = createToaster({ placement: "bottom-end", pauseOnPageIdle: true, max: 5 });
|
|
2160
2185
|
function toastDuration(type) {
|
|
2161
2186
|
return type === "error" || type === "loading" ? Infinity : 6e3;
|
|
@@ -2176,9 +2201,9 @@ var rtlPlacementFix = {
|
|
|
2176
2201
|
}
|
|
2177
2202
|
};
|
|
2178
2203
|
function Toaster() {
|
|
2179
|
-
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: [
|
|
2180
2205
|
toast.type === "loading" ? /* @__PURE__ */ jsx9(Spinner, { size: "sm", color: "fg.accent" }) : /* @__PURE__ */ jsx9(Toast.Indicator, {}),
|
|
2181
|
-
/* @__PURE__ */
|
|
2206
|
+
/* @__PURE__ */ jsxs5(Stack, { gap: "0.5", flex: "1", maxWidth: "full", children: [
|
|
2182
2207
|
toast.title && /* @__PURE__ */ jsx9(Toast.Title, { children: toast.title }),
|
|
2183
2208
|
toast.description && /* @__PURE__ */ jsx9(Toast.Description, { children: toast.description })
|
|
2184
2209
|
] }),
|
|
@@ -2226,7 +2251,7 @@ function ColorModeToggle({ size = "sm" }) {
|
|
|
2226
2251
|
import { useState as useState5 } from "react";
|
|
2227
2252
|
import createCache from "@emotion/cache";
|
|
2228
2253
|
import { CacheProvider } from "@emotion/react";
|
|
2229
|
-
import { Fragment as Fragment2, jsx as jsx11, jsxs as
|
|
2254
|
+
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2230
2255
|
function EmotionRegistry({ useServerInsertedHTML, children }) {
|
|
2231
2256
|
const [{ cache, flush }] = useState5(() => {
|
|
2232
2257
|
const cache2 = createCache({ key: "css" });
|
|
@@ -2260,7 +2285,7 @@ function EmotionRegistry({ useServerInsertedHTML, children }) {
|
|
|
2260
2285
|
attribute += ` ${name}`;
|
|
2261
2286
|
}
|
|
2262
2287
|
}
|
|
2263
|
-
return /* @__PURE__ */
|
|
2288
|
+
return /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
2264
2289
|
globals.map(({ name, style }) => (
|
|
2265
2290
|
// Emotion's own CSS, written by its serializer from the host's theme: no person's input.
|
|
2266
2291
|
/* @__PURE__ */ jsx11("style", { "data-emotion": `${cache.key}-global ${name}`, dangerouslySetInnerHTML: { __html: style } }, name)
|
|
@@ -2457,11 +2482,11 @@ import { chakra as chakra5, Dialog as Dialog2, Grid, HStack, Input, Portal as Po
|
|
|
2457
2482
|
// src/components/Field.tsx
|
|
2458
2483
|
import { forwardRef as forwardRef2 } from "react";
|
|
2459
2484
|
import { chakra as chakra4, Checkbox, Field as ChakraField, NativeSelect, Switch } from "@chakra-ui/react";
|
|
2460
|
-
import { jsx as jsx13, jsxs as
|
|
2485
|
+
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2461
2486
|
var Field = forwardRef2(function Field2({ label, helperText, errorText: errorText2, optionalText, invalid, loading: own, children, ...rest }, ref) {
|
|
2462
2487
|
const loading = useLoading(own);
|
|
2463
|
-
return /* @__PURE__ */
|
|
2464
|
-
label != null && /* @__PURE__ */
|
|
2488
|
+
return /* @__PURE__ */ jsxs7(ChakraField.Root, { ref, invalid: invalid ?? Boolean(errorText2), ...rest, children: [
|
|
2489
|
+
label != null && /* @__PURE__ */ jsxs7(ChakraField.Label, { children: [
|
|
2465
2490
|
label,
|
|
2466
2491
|
/* @__PURE__ */ jsx13(ChakraField.RequiredIndicator, { fallback: optionalText })
|
|
2467
2492
|
] }),
|
|
@@ -2473,14 +2498,14 @@ var Field = forwardRef2(function Field2({ label, helperText, errorText: errorTex
|
|
|
2473
2498
|
var FormField = Field;
|
|
2474
2499
|
var SelectField = forwardRef2(function SelectField2({ options, size = "md", width, disabled, loading: own, ...rest }, ref) {
|
|
2475
2500
|
const loading = useLoading(own);
|
|
2476
|
-
return /* @__PURE__ */
|
|
2501
|
+
return /* @__PURE__ */ jsxs7(NativeSelect.Root, { size, width, disabled, borderRadius: "l2", "aria-hidden": loading || void 0, css: loading ? ghostCss : void 0, children: [
|
|
2477
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)) }),
|
|
2478
2503
|
/* @__PURE__ */ jsx13(NativeSelect.Indicator, {})
|
|
2479
2504
|
] });
|
|
2480
2505
|
});
|
|
2481
2506
|
function CheckboxField({ label, checked, onCheckedChange, loading: own, ...rest }) {
|
|
2482
2507
|
const loading = useLoading(own);
|
|
2483
|
-
return /* @__PURE__ */
|
|
2508
|
+
return /* @__PURE__ */ jsxs7(Checkbox.Root, { checked, onCheckedChange: (e) => onCheckedChange(e.checked === true), ...rest, children: [
|
|
2484
2509
|
/* @__PURE__ */ jsx13(Checkbox.HiddenInput, {}),
|
|
2485
2510
|
/* @__PURE__ */ jsx13(Checkbox.Control, { css: loading ? ghostCss : void 0 }),
|
|
2486
2511
|
/* @__PURE__ */ jsx13(Checkbox.Label, { children: label })
|
|
@@ -2488,7 +2513,7 @@ function CheckboxField({ label, checked, onCheckedChange, loading: own, ...rest
|
|
|
2488
2513
|
}
|
|
2489
2514
|
function SwitchField({ label, checked, onCheckedChange, loading: own, ...rest }) {
|
|
2490
2515
|
const loading = useLoading(own);
|
|
2491
|
-
return /* @__PURE__ */
|
|
2516
|
+
return /* @__PURE__ */ jsxs7(Switch.Root, { checked, onCheckedChange: (e) => onCheckedChange(e.checked), ...rest, children: [
|
|
2492
2517
|
/* @__PURE__ */ jsx13(Switch.HiddenInput, {}),
|
|
2493
2518
|
/* @__PURE__ */ jsx13(Switch.Control, { css: loading ? ghostCss : void 0, children: /* @__PURE__ */ jsx13(Switch.Thumb, {}) }),
|
|
2494
2519
|
/* @__PURE__ */ jsx13(Switch.Label, { children: label })
|
|
@@ -2497,14 +2522,14 @@ function SwitchField({ label, checked, onCheckedChange, loading: own, ...rest })
|
|
|
2497
2522
|
|
|
2498
2523
|
// src/components/InlineAlert.tsx
|
|
2499
2524
|
import { Alert } from "@chakra-ui/react";
|
|
2500
|
-
import { jsx as jsx14, jsxs as
|
|
2525
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2501
2526
|
var statusOf = { neutral: "neutral", success: "success", warning: "warning", danger: "error", info: "info" };
|
|
2502
2527
|
function InlineAlert({ tone = "info", title, children, size = "md", ...rest }) {
|
|
2503
2528
|
const empty = (children == null || children === false || children === "") && title == null;
|
|
2504
2529
|
if (empty) return null;
|
|
2505
|
-
return /* @__PURE__ */
|
|
2530
|
+
return /* @__PURE__ */ jsxs8(Alert.Root, { status: statusOf[tone], size, role: tone === "danger" ? "alert" : "status", ...rest, children: [
|
|
2506
2531
|
/* @__PURE__ */ jsx14(Alert.Indicator, {}),
|
|
2507
|
-
/* @__PURE__ */
|
|
2532
|
+
/* @__PURE__ */ jsxs8(Alert.Content, { children: [
|
|
2508
2533
|
title != null && /* @__PURE__ */ jsx14(Alert.Title, { children: title }),
|
|
2509
2534
|
children != null && children !== false && /* @__PURE__ */ jsx14(Alert.Description, { children })
|
|
2510
2535
|
] })
|
|
@@ -2883,7 +2908,7 @@ async function getPasskey(options, signal) {
|
|
|
2883
2908
|
}
|
|
2884
2909
|
|
|
2885
2910
|
// src/host/StepUpDialog.tsx
|
|
2886
|
-
import { Fragment as Fragment3, jsx as jsx16, jsxs as
|
|
2911
|
+
import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2887
2912
|
var useStepUpTexts = createAreaTexts("stepUp", { en: en_default, ar: ar_default });
|
|
2888
2913
|
function looksLikeCode(value, recovery) {
|
|
2889
2914
|
return recovery ? value.replace(/[^A-Za-z0-9]/g, "").length === 10 : value.replace(/\D/g, "").length === 6 && !/[^\d\s]/.test(value);
|
|
@@ -3127,14 +3152,14 @@ function StepUpDialog() {
|
|
|
3127
3152
|
method
|
|
3128
3153
|
) });
|
|
3129
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) }) });
|
|
3130
|
-
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: [
|
|
3131
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") }),
|
|
3132
3157
|
submit && /* @__PURE__ */ jsx16(Button, { type: "submit", loading: busy, disabled, children: submit })
|
|
3133
3158
|
] }) });
|
|
3134
3159
|
let body;
|
|
3135
3160
|
if (stage === "passkey") {
|
|
3136
|
-
body = /* @__PURE__ */
|
|
3137
|
-
/* @__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: [
|
|
3138
3163
|
/* @__PURE__ */ jsx16(Text, { color: "fg.muted", children: t("strongWhy") }),
|
|
3139
3164
|
/* @__PURE__ */ jsx16(Button, { variant: "primary", onClick: () => void withPasskey(), loading: busy, "data-testid": "use-passkey", children: t("usePasskey") }),
|
|
3140
3165
|
busy && /* @__PURE__ */ jsx16(Text, { textStyle: "sm", color: "fg.muted", children: t("passkeyPrompt") }),
|
|
@@ -3144,12 +3169,12 @@ function StepUpDialog() {
|
|
|
3144
3169
|
footer(null)
|
|
3145
3170
|
] });
|
|
3146
3171
|
} else if (stage === "code") {
|
|
3147
|
-
body = /* @__PURE__ */
|
|
3148
|
-
/* @__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: [
|
|
3149
3174
|
/* @__PURE__ */ jsx16(Text, { color: "fg.muted", children: t("appCodeWhy") }),
|
|
3150
3175
|
codeInput(t("code")),
|
|
3151
3176
|
/* @__PURE__ */ jsx16(InlineAlert, { tone: "danger", children: error }),
|
|
3152
|
-
/* @__PURE__ */
|
|
3177
|
+
/* @__PURE__ */ jsxs9(Stack2, { gap: "0.5", align: "start", children: [
|
|
3153
3178
|
need?.methods.includes("passkey") && canPasskey && /* @__PURE__ */ jsx16(Button, { variant: "link", size: "sm", onClick: () => toStage("passkey"), children: t("usePasskey") }),
|
|
3154
3179
|
!strong && /* @__PURE__ */ jsx16(Button, { variant: "link", size: "sm", onClick: () => toStage("confirm"), "data-testid": "use-password", children: t("usePassword") })
|
|
3155
3180
|
] })
|
|
@@ -3157,8 +3182,8 @@ function StepUpDialog() {
|
|
|
3157
3182
|
footer(t("confirm"), !looksLikeCode(code, false))
|
|
3158
3183
|
] });
|
|
3159
3184
|
} else if (stage === "confirm" && strong && !settingUp) {
|
|
3160
|
-
body = /* @__PURE__ */
|
|
3161
|
-
/* @__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: [
|
|
3162
3187
|
/* @__PURE__ */ jsx16(Text, { color: "fg.muted", children: need?.methods.includes("passkey") ? t("strongWhy") : t("strongWhyApp") }),
|
|
3163
3188
|
passwordField(true),
|
|
3164
3189
|
codeInput(t("code")),
|
|
@@ -3171,19 +3196,19 @@ function StepUpDialog() {
|
|
|
3171
3196
|
footer(t("confirm"), !password || !looksLikeCode(code, false))
|
|
3172
3197
|
] });
|
|
3173
3198
|
} else if (stage === "confirm") {
|
|
3174
|
-
body = /* @__PURE__ */
|
|
3175
|
-
/* @__PURE__ */ jsx16(Dialog2.Body, { children: /* @__PURE__ */
|
|
3176
|
-
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: [
|
|
3177
3202
|
/* @__PURE__ */ jsx16(Text, { color: "fg.muted", children: t("setupWhy") }),
|
|
3178
3203
|
/* @__PURE__ */ jsx16(Text, { color: "fg.muted", children: t("setupPasswordWhy") })
|
|
3179
3204
|
] }) : /* @__PURE__ */ jsx16(Text, { color: "fg.muted", children: ways ? t("codeWhy") : t("why") }),
|
|
3180
3205
|
passwordField(!ways),
|
|
3181
|
-
ways && /* @__PURE__ */
|
|
3182
|
-
sender && !sentTo ? /* @__PURE__ */
|
|
3206
|
+
ways && /* @__PURE__ */ jsxs9(Stack2, { gap: "field", children: [
|
|
3207
|
+
sender && !sentTo ? /* @__PURE__ */ jsxs9(Stack2, { gap: "2", align: "start", children: [
|
|
3183
3208
|
/* @__PURE__ */ jsx16(Text, { children: t("sendTo", { to: sender.to }) }),
|
|
3184
3209
|
/* @__PURE__ */ jsx16(Button, { onClick: () => void sendCode(), loading: sending, loadingText: t("sending"), "data-testid": "send-code", children: t("send") })
|
|
3185
3210
|
] }) : codeInput(recovery ? t("recoveryCode") : sender ? t("sentCode") : t("code"), sentTo ? t("sent", { to: sentTo }) : void 0),
|
|
3186
|
-
/* @__PURE__ */
|
|
3211
|
+
/* @__PURE__ */ jsxs9(Stack2, { gap: "0.5", align: "start", children: [
|
|
3187
3212
|
sentTo && /* @__PURE__ */ jsx16(Button, { variant: "link", size: "sm", onClick: () => void sendCode(), disabled: sending, children: t("resend") }),
|
|
3188
3213
|
ways.hasApp && method !== "app" && /* @__PURE__ */ jsx16(Button, { variant: "link", size: "sm", onClick: () => switchTo("app"), children: t("useApp") }),
|
|
3189
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)),
|
|
@@ -3196,8 +3221,8 @@ function StepUpDialog() {
|
|
|
3196
3221
|
footer(settingUp ? t("continue") : t("confirm"), !password || !!ways && !looksLikeCode(code, recovery))
|
|
3197
3222
|
] });
|
|
3198
3223
|
} else if (stage === "setup") {
|
|
3199
|
-
body = /* @__PURE__ */
|
|
3200
|
-
/* @__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: [
|
|
3201
3226
|
/* @__PURE__ */ jsx16(Text, { color: "fg.muted", children: t("setupWhy") }),
|
|
3202
3227
|
canPasskey ? /* @__PURE__ */ jsx16(Button, { variant: "primary", onClick: () => {
|
|
3203
3228
|
setPasskeyName(t("passkeyNameDefault"));
|
|
@@ -3209,8 +3234,8 @@ function StepUpDialog() {
|
|
|
3209
3234
|
footer(null)
|
|
3210
3235
|
] });
|
|
3211
3236
|
} else if (stage === "setupPasskey") {
|
|
3212
|
-
body = /* @__PURE__ */
|
|
3213
|
-
/* @__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: [
|
|
3214
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" }) }),
|
|
3215
3240
|
busy && /* @__PURE__ */ jsx16(Text, { textStyle: "sm", color: "fg.muted", children: t("passkeyPrompt") }),
|
|
3216
3241
|
/* @__PURE__ */ jsx16(InlineAlert, { tone: "danger", children: error })
|
|
@@ -3221,11 +3246,11 @@ function StepUpDialog() {
|
|
|
3221
3246
|
})
|
|
3222
3247
|
] });
|
|
3223
3248
|
} else if (stage === "setupApp") {
|
|
3224
|
-
body = /* @__PURE__ */
|
|
3225
|
-
/* @__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: [
|
|
3226
3251
|
/* @__PURE__ */ jsx16(Text, { color: "fg.muted", children: t("appScan") }),
|
|
3227
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" }) }),
|
|
3228
|
-
/* @__PURE__ */
|
|
3253
|
+
/* @__PURE__ */ jsxs9(Stack2, { gap: "1", children: [
|
|
3229
3254
|
/* @__PURE__ */ jsx16(Text, { textStyle: "sm", color: "fg.muted", children: t("appCantScan") }),
|
|
3230
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() : " " })
|
|
3231
3256
|
] }),
|
|
@@ -3238,12 +3263,12 @@ function StepUpDialog() {
|
|
|
3238
3263
|
})
|
|
3239
3264
|
] });
|
|
3240
3265
|
} else {
|
|
3241
|
-
body = /* @__PURE__ */
|
|
3242
|
-
/* @__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: [
|
|
3243
3268
|
/* @__PURE__ */ jsx16(InlineAlert, { tone: "warning", children: t("recoveryHint") }),
|
|
3244
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)) })
|
|
3245
3270
|
] }) }),
|
|
3246
|
-
/* @__PURE__ */ jsx16(Dialog2.Footer, { children: /* @__PURE__ */
|
|
3271
|
+
/* @__PURE__ */ jsx16(Dialog2.Footer, { children: /* @__PURE__ */ jsxs9(HStack, { children: [
|
|
3247
3272
|
/* @__PURE__ */ jsx16(Button, { variant: "secondary", onClick: () => void copyCodes(), children: copied ? t("recoveryCopied") : t("recoveryCopy") }),
|
|
3248
3273
|
/* @__PURE__ */ jsx16(Button, { onClick: () => close(true), "data-testid": "recovery-codes-saved", children: t("recoverySaved") })
|
|
3249
3274
|
] }) })
|
|
@@ -3258,9 +3283,9 @@ function StepUpDialog() {
|
|
|
3258
3283
|
closeOnEscape: mayDismiss,
|
|
3259
3284
|
placement: "center",
|
|
3260
3285
|
role: "alertdialog",
|
|
3261
|
-
children: /* @__PURE__ */
|
|
3286
|
+
children: /* @__PURE__ */ jsxs9(Portal4, { children: [
|
|
3262
3287
|
/* @__PURE__ */ jsx16(Dialog2.Backdrop, {}),
|
|
3263
|
-
/* @__PURE__ */ jsx16(Dialog2.Positioner, { children: /* @__PURE__ */
|
|
3288
|
+
/* @__PURE__ */ jsx16(Dialog2.Positioner, { children: /* @__PURE__ */ jsxs9(Dialog2.Content, { "data-testid": "step-up", "data-stage": stage, children: [
|
|
3264
3289
|
/* @__PURE__ */ jsx16(Dialog2.Header, { children: /* @__PURE__ */ jsx16(Dialog2.Title, { children: title }) }),
|
|
3265
3290
|
body
|
|
3266
3291
|
] }) })
|
|
@@ -3286,14 +3311,14 @@ var AppLink = forwardRef3(function AppLink2({ href, children, ...rest }, ref) {
|
|
|
3286
3311
|
});
|
|
3287
3312
|
|
|
3288
3313
|
// src/provider/AbpProvider.tsx
|
|
3289
|
-
import { jsx as jsx18, jsxs as
|
|
3314
|
+
import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3290
3315
|
var defaultSystem = createAbpSystem();
|
|
3291
3316
|
function AbpProvider({ children, useServerInsertedHTML, ...props }) {
|
|
3292
3317
|
const tree = /* @__PURE__ */ jsx18(AbpTree, { ...props, children });
|
|
3293
3318
|
return useServerInsertedHTML ? /* @__PURE__ */ jsx18(EmotionRegistry, { useServerInsertedHTML, children: tree }) : tree;
|
|
3294
3319
|
}
|
|
3295
3320
|
function AbpTree({ children, system = defaultSystem, host, locale = "en", labels, linkComponent, defaultColorMode = "system", pluginTexts, productName, timeZone, motion }) {
|
|
3296
|
-
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: [
|
|
3297
3322
|
children,
|
|
3298
3323
|
host?.paths.guard !== void 0 && host.stepUpDialog !== false && /* @__PURE__ */ jsx18(StepUpDialog, {}),
|
|
3299
3324
|
/* @__PURE__ */ jsx18(Toaster, {})
|
|
@@ -3349,7 +3374,7 @@ function useFormatters() {
|
|
|
3349
3374
|
}
|
|
3350
3375
|
|
|
3351
3376
|
// src/components/TranslatedInput.tsx
|
|
3352
|
-
import { jsx as jsx19, jsxs as
|
|
3377
|
+
import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3353
3378
|
var MIN_QUERY = 2;
|
|
3354
3379
|
var LIST_MAX_HEIGHT = 288;
|
|
3355
3380
|
function TranslatedInput({
|
|
@@ -3450,7 +3475,7 @@ function TranslatedInput({
|
|
|
3450
3475
|
}
|
|
3451
3476
|
}
|
|
3452
3477
|
const shown = pickName(chain, value, fallback);
|
|
3453
|
-
return /* @__PURE__ */
|
|
3478
|
+
return /* @__PURE__ */ jsxs11(Group, { attached: true, w: "full", children: [
|
|
3454
3479
|
/* @__PURE__ */ jsx19(
|
|
3455
3480
|
Input2,
|
|
3456
3481
|
{
|
|
@@ -3502,7 +3527,7 @@ function TranslatedInput({
|
|
|
3502
3527
|
shadow: "lg",
|
|
3503
3528
|
py: "1",
|
|
3504
3529
|
style: place,
|
|
3505
|
-
children: suggestions.map((s, i) => /* @__PURE__ */
|
|
3530
|
+
children: suggestions.map((s, i) => /* @__PURE__ */ jsxs11(
|
|
3506
3531
|
Box,
|
|
3507
3532
|
{
|
|
3508
3533
|
as: "li",
|
|
@@ -3519,11 +3544,11 @@ function TranslatedInput({
|
|
|
3519
3544
|
pick(s);
|
|
3520
3545
|
},
|
|
3521
3546
|
children: [
|
|
3522
|
-
/* @__PURE__ */
|
|
3547
|
+
/* @__PURE__ */ jsxs11(HStack2, { justify: "space-between", gap: "3", align: "baseline", children: [
|
|
3523
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, "") }) }),
|
|
3524
3549
|
s.source && /* @__PURE__ */ jsx19(Text2, { fontSize: "xs", color: "fg.muted", flexShrink: 0, children: s.source })
|
|
3525
3550
|
] }),
|
|
3526
|
-
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: [
|
|
3527
3552
|
j > 0 && " \xB7 ",
|
|
3528
3553
|
/* @__PURE__ */ jsx19(chakra6.span, { lang: l.code, dir: dirOf(l), children: s.names[l.code] ?? EMPTY_VALUE })
|
|
3529
3554
|
] }, l.code)) })
|
|
@@ -3533,8 +3558,8 @@ function TranslatedInput({
|
|
|
3533
3558
|
))
|
|
3534
3559
|
}
|
|
3535
3560
|
) }),
|
|
3536
|
-
others.length > 0 && /* @__PURE__ */
|
|
3537
|
-
/* @__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(
|
|
3538
3563
|
Button,
|
|
3539
3564
|
{
|
|
3540
3565
|
variant: "secondary",
|
|
@@ -3545,7 +3570,7 @@ function TranslatedInput({
|
|
|
3545
3570
|
"data-testid": "translations",
|
|
3546
3571
|
children: [
|
|
3547
3572
|
/* @__PURE__ */ jsx19(Languages, {}),
|
|
3548
|
-
/* @__PURE__ */
|
|
3573
|
+
/* @__PURE__ */ jsxs11(Text2, { as: "span", fontVariantNumeric: "tabular-nums", color: filled < others.length ? "fg.muted" : void 0, children: [
|
|
3549
3574
|
filled,
|
|
3550
3575
|
"/",
|
|
3551
3576
|
others.length
|
|
@@ -3553,17 +3578,17 @@ function TranslatedInput({
|
|
|
3553
3578
|
]
|
|
3554
3579
|
}
|
|
3555
3580
|
) }),
|
|
3556
|
-
/* @__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: [
|
|
3557
3582
|
/* @__PURE__ */ jsx19(Popover.Arrow, {}),
|
|
3558
|
-
/* @__PURE__ */
|
|
3583
|
+
/* @__PURE__ */ jsxs11(Popover.Body, { children: [
|
|
3559
3584
|
/* @__PURE__ */ jsx19(Text2, { textStyle: "label", mb: "2", children: labels.title }),
|
|
3560
3585
|
/* @__PURE__ */ jsx19(Stack3, { gap: "3", children: others.map((l) => {
|
|
3561
3586
|
const own = value[l.code] ?? "";
|
|
3562
3587
|
const fallbackShown = pickName([l.code, ...chain.filter((c2) => c2 !== l.code)], { ...value, [l.code]: "" }, fallback);
|
|
3563
|
-
return /* @__PURE__ */
|
|
3564
|
-
/* @__PURE__ */
|
|
3588
|
+
return /* @__PURE__ */ jsxs11(Box, { children: [
|
|
3589
|
+
/* @__PURE__ */ jsxs11(chakra6.label, { htmlFor: `tr-${listId}-${l.code}`, textStyle: "body.sm", fontWeight: "medium", children: [
|
|
3565
3590
|
l.name,
|
|
3566
|
-
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: [
|
|
3567
3592
|
" \xB7 ",
|
|
3568
3593
|
l.englishName
|
|
3569
3594
|
] })
|
|
@@ -3592,10 +3617,10 @@ function TranslatedInput({
|
|
|
3592
3617
|
}
|
|
3593
3618
|
|
|
3594
3619
|
// src/components/ListFooter.tsx
|
|
3595
|
-
import { Flex, Text as
|
|
3620
|
+
import { Flex, Text as Text4 } from "@chakra-ui/react";
|
|
3596
3621
|
|
|
3597
3622
|
// src/components/Pagination.tsx
|
|
3598
|
-
import { chakra as chakra8, HStack as HStack3 } from "@chakra-ui/react";
|
|
3623
|
+
import { chakra as chakra8, HStack as HStack3, Text as Text3 } from "@chakra-ui/react";
|
|
3599
3624
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
3600
3625
|
|
|
3601
3626
|
// src/components/DirectionalIcon.tsx
|
|
@@ -3610,6 +3635,9 @@ var DirectionalIcon = chakra7("span", {
|
|
|
3610
3635
|
});
|
|
3611
3636
|
|
|
3612
3637
|
// src/components/pageList.ts
|
|
3638
|
+
function pagesShown(form, page, pages) {
|
|
3639
|
+
return form === "numbered" ? pageList(page, pages) : [];
|
|
3640
|
+
}
|
|
3613
3641
|
function pageList(page, pages) {
|
|
3614
3642
|
const want = /* @__PURE__ */ new Set([1, pages, page - 1, page, page + 1]);
|
|
3615
3643
|
if (page <= 3) [2, 3, 4].forEach((n) => want.add(n));
|
|
@@ -3624,7 +3652,7 @@ function pageList(page, pages) {
|
|
|
3624
3652
|
}
|
|
3625
3653
|
|
|
3626
3654
|
// src/components/Pagination.tsx
|
|
3627
|
-
import { jsx as jsx20, jsxs as
|
|
3655
|
+
import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3628
3656
|
var button = {
|
|
3629
3657
|
display: "inline-flex",
|
|
3630
3658
|
alignItems: "center",
|
|
@@ -3645,12 +3673,15 @@ var button = {
|
|
|
3645
3673
|
_icon: { boxSize: "3.5" },
|
|
3646
3674
|
"&[aria-current=page], &[aria-current=page]:hover": { bg: "accent.solid", color: "accent.contrast", fontWeight: "bold" }
|
|
3647
3675
|
};
|
|
3648
|
-
function Pagination({ page, pages, onPage, label, previous, next, pageLabel, disabled }) {
|
|
3649
|
-
|
|
3676
|
+
function Pagination({ page, pages, onPage, label, previous, next, pageLabel, disabled, form = "numbered", range, pageOf }) {
|
|
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;
|
|
3678
|
+
if (pages <= 1) return rangeText ? /* @__PURE__ */ jsx20(chakra8.nav, { "aria-label": label, display: "flex", justifyContent: "center", children: rangeText }) : null;
|
|
3650
3679
|
const go = (n) => onPage(Math.min(pages, Math.max(1, n)));
|
|
3651
|
-
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: [
|
|
3681
|
+
rangeText && /* @__PURE__ */ jsx20(chakra8.span, { marginEnd: "3", display: "inline-flex", children: rangeText }),
|
|
3652
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, {}) }) }),
|
|
3653
|
-
|
|
3683
|
+
form === "compact" && pageOf && /* @__PURE__ */ jsx20(Text3, { as: "span", textStyle: "sm", px: "1", fontVariantNumeric: "tabular-nums", whiteSpace: "nowrap", children: pageOf }),
|
|
3684
|
+
pagesShown(form, page, pages).map(
|
|
3654
3685
|
(n, i) => n === "gap" ? /* @__PURE__ */ jsx20(chakra8.span, { minW: "5", textAlign: "center", color: "fg.muted", "aria-hidden": "true", children: "\u2026" }, `gap-${i}`) : (
|
|
3655
3686
|
// Page buttons stay enabled while a page loads (a second click just asks again); the arrows wait.
|
|
3656
3687
|
/* @__PURE__ */ jsx20(
|
|
@@ -3672,8 +3703,8 @@ function Pagination({ page, pages, onPage, label, previous, next, pageLabel, dis
|
|
|
3672
3703
|
}
|
|
3673
3704
|
|
|
3674
3705
|
// src/components/ListFooter.tsx
|
|
3675
|
-
import { jsx as jsx21, jsxs as
|
|
3676
|
-
function ListFooter({ list }) {
|
|
3706
|
+
import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3707
|
+
function ListFooter({ list, form = "simple" }) {
|
|
3677
3708
|
const labels = useAbpLabels().queryList;
|
|
3678
3709
|
const { locale } = useAbpLocale();
|
|
3679
3710
|
const fmt = useFormatters();
|
|
@@ -3681,7 +3712,8 @@ function ListFooter({ list }) {
|
|
|
3681
3712
|
if (list.rows === void 0 || list.total === 0) return null;
|
|
3682
3713
|
const from = (page - 1) * pageSize + 1;
|
|
3683
3714
|
const to = Math.min(page * pageSize, list.total);
|
|
3684
|
-
|
|
3715
|
+
const range = formatMessage(locale, labels.range, { from: fmt.number(from), to: fmt.number(to), total: fmt.number(list.total) });
|
|
3716
|
+
return /* @__PURE__ */ jsxs13(Flex, { gap: "3", align: "center", justify: form === "simple" ? "center" : "space-between", wrap: "wrap", "data-testid": "list-footer", children: [
|
|
3685
3717
|
/* @__PURE__ */ jsx21(
|
|
3686
3718
|
Pagination,
|
|
3687
3719
|
{
|
|
@@ -3690,10 +3722,13 @@ function ListFooter({ list }) {
|
|
|
3690
3722
|
label: labels.pages,
|
|
3691
3723
|
previous: labels.previous,
|
|
3692
3724
|
next: labels.next,
|
|
3693
|
-
pageLabel: (n) => formatMessage(locale, labels.page, { page: fmt.number(n) })
|
|
3725
|
+
pageLabel: (n) => formatMessage(locale, labels.page, { page: fmt.number(n) }),
|
|
3726
|
+
form,
|
|
3727
|
+
range,
|
|
3728
|
+
pageOf: formatMessage(locale, labels.pageOf, { page: fmt.number(list.pagination.page), pages: fmt.number(list.pagination.pages) })
|
|
3694
3729
|
}
|
|
3695
3730
|
),
|
|
3696
|
-
/* @__PURE__ */ jsx21(
|
|
3731
|
+
form !== "simple" && /* @__PURE__ */ jsx21(Text4, { textStyle: "caption", color: "fg.muted", fontVariantNumeric: "tabular-nums", "aria-live": "polite", children: range })
|
|
3697
3732
|
] });
|
|
3698
3733
|
}
|
|
3699
3734
|
|
|
@@ -3710,9 +3745,9 @@ function useSettledValue(value, ms = 250) {
|
|
|
3710
3745
|
|
|
3711
3746
|
// src/components/SearchPicker.tsx
|
|
3712
3747
|
import { Fragment as Fragment4, useEffect as useEffect7, useId as useId2, useMemo as useMemo5, useState as useState10 } from "react";
|
|
3713
|
-
import { Box as Box2, chakra as chakra9, Input as Input3, Spinner as Spinner2, Text as
|
|
3714
|
-
import { Plus } from "lucide-react";
|
|
3715
|
-
import { Fragment as Fragment5, jsx as jsx22, jsxs as
|
|
3748
|
+
import { Box as Box2, chakra as chakra9, Input as Input3, Spinner as Spinner2, Text as Text5 } from "@chakra-ui/react";
|
|
3749
|
+
import { Plus as Plus2 } from "lucide-react";
|
|
3750
|
+
import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3716
3751
|
var CREATE = /* @__PURE__ */ Symbol("create");
|
|
3717
3752
|
var SHOWN2 = 8;
|
|
3718
3753
|
function Highlight({ text, query }) {
|
|
@@ -3828,7 +3863,7 @@ function SearchPicker({
|
|
|
3828
3863
|
setQuery("");
|
|
3829
3864
|
}
|
|
3830
3865
|
}
|
|
3831
|
-
return /* @__PURE__ */
|
|
3866
|
+
return /* @__PURE__ */ jsxs14(Box2, { position: "relative", width: "full", children: [
|
|
3832
3867
|
/* @__PURE__ */ jsx22(
|
|
3833
3868
|
Input3,
|
|
3834
3869
|
{
|
|
@@ -3859,7 +3894,7 @@ function SearchPicker({
|
|
|
3859
3894
|
onKeyDown
|
|
3860
3895
|
}
|
|
3861
3896
|
),
|
|
3862
|
-
open && /* @__PURE__ */
|
|
3897
|
+
open && /* @__PURE__ */ jsxs14(
|
|
3863
3898
|
chakra9.ul,
|
|
3864
3899
|
{
|
|
3865
3900
|
id: listId,
|
|
@@ -3879,8 +3914,8 @@ function SearchPicker({
|
|
|
3879
3914
|
py: "1",
|
|
3880
3915
|
listStyleType: "none",
|
|
3881
3916
|
children: [
|
|
3882
|
-
query.trim() && matches > 0 && /* @__PURE__ */ jsx22(
|
|
3883
|
-
options.length === 0 && /* @__PURE__ */ jsx22(
|
|
3917
|
+
query.trim() && matches > 0 && /* @__PURE__ */ jsx22(Text5, { as: "li", px: "3", pt: "1", pb: "1.5", textStyle: "caption", color: "fg.muted", "aria-live": "polite", "data-match-count": "", children: formatMessage(locale, canSearch && !failed && found != null && found.length >= SHOWN2 ? labels.firstMatches : labels.matches, { count: matches }) }),
|
|
3918
|
+
options.length === 0 && /* @__PURE__ */ jsx22(Text5, { as: "li", px: "3", py: "2", textStyle: "caption", color: "fg.muted", children: canSearch && !failed ? found == null ? messages.searching : messages.noMatches : messages.noKnown }),
|
|
3884
3919
|
options.map((item, i) => /* @__PURE__ */ jsx22(
|
|
3885
3920
|
chakra9.li,
|
|
3886
3921
|
{
|
|
@@ -3896,14 +3931,14 @@ function SearchPicker({
|
|
|
3896
3931
|
void choose(item);
|
|
3897
3932
|
},
|
|
3898
3933
|
"data-create": item === CREATE ? "" : void 0,
|
|
3899
|
-
children: item === CREATE ? /* @__PURE__ */
|
|
3900
|
-
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, {}),
|
|
3901
3936
|
create.label(query.trim())
|
|
3902
|
-
] }) : item ? renderOption ? renderOption(item, query) : /* @__PURE__ */ jsx22(
|
|
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 })
|
|
3903
3938
|
},
|
|
3904
3939
|
item === CREATE ? "create" : item ? getId(item) : "none"
|
|
3905
3940
|
)),
|
|
3906
|
-
!canSearch && messages.limitedHint && /* @__PURE__ */ jsx22(
|
|
3941
|
+
!canSearch && messages.limitedHint && /* @__PURE__ */ jsx22(Text5, { as: "li", px: "3", pt: "1.5", pb: "1", textStyle: "caption", color: "fg.subtle", borderTopWidth: "1px", borderColor: "border.muted", mt: "1", children: messages.limitedHint })
|
|
3907
3942
|
]
|
|
3908
3943
|
}
|
|
3909
3944
|
)
|
|
@@ -3922,10 +3957,10 @@ function PersonPicker({
|
|
|
3922
3957
|
...rest,
|
|
3923
3958
|
getId: (p) => p.id,
|
|
3924
3959
|
label: (p) => personLabel(p),
|
|
3925
|
-
renderOption: (p, typed) => /* @__PURE__ */
|
|
3926
|
-
/* @__PURE__ */ jsx22(
|
|
3960
|
+
renderOption: (p, typed) => /* @__PURE__ */ jsxs14(Fragment5, { children: [
|
|
3961
|
+
/* @__PURE__ */ jsx22(Text5, { as: "span", textStyle: "body.sm", fontWeight: "medium", children: /* @__PURE__ */ jsx22(Highlight, { text: p.displayName || p.username, query: typed }) }),
|
|
3927
3962
|
" ",
|
|
3928
|
-
/* @__PURE__ */
|
|
3963
|
+
/* @__PURE__ */ jsxs14(Text5, { as: "span", textStyle: "caption", color: "fg.muted", dir: "ltr", children: [
|
|
3929
3964
|
"@",
|
|
3930
3965
|
/* @__PURE__ */ jsx22(Highlight, { text: p.username, query: typed })
|
|
3931
3966
|
] }),
|
|
@@ -4026,7 +4061,7 @@ var TitleStore = class {
|
|
|
4026
4061
|
};
|
|
4027
4062
|
|
|
4028
4063
|
// src/provider/title.tsx
|
|
4029
|
-
import { jsx as jsx23, jsxs as
|
|
4064
|
+
import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4030
4065
|
var TitleContext = createContext10(null);
|
|
4031
4066
|
var EMPTY = { parts: [], site: void 0 };
|
|
4032
4067
|
var noSubscription = () => () => {
|
|
@@ -4036,7 +4071,7 @@ function PageTitleProvider({ site, children }) {
|
|
|
4036
4071
|
const { parts, site: claimed } = useSyncExternalStore2(store.subscribe, store.current, store.current);
|
|
4037
4072
|
const { isRtl } = useAbpLocale();
|
|
4038
4073
|
const text = composeTitle(parts, claimed ?? site, isRtl);
|
|
4039
|
-
return /* @__PURE__ */
|
|
4074
|
+
return /* @__PURE__ */ jsxs15(TitleContext.Provider, { value: store, children: [
|
|
4040
4075
|
text && /* @__PURE__ */ jsx23("title", { children: text }),
|
|
4041
4076
|
children
|
|
4042
4077
|
] });
|
|
@@ -4203,7 +4238,7 @@ function useSlideItems(container, token, options = {}) {
|
|
|
4203
4238
|
}
|
|
4204
4239
|
|
|
4205
4240
|
// src/motion/components.tsx
|
|
4206
|
-
import { Fragment as Fragment6, jsx as jsx24, jsxs as
|
|
4241
|
+
import { Fragment as Fragment6, jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4207
4242
|
var MotionDiv = chakra10(m2.div, {}, { forwardProps: ["transition"] });
|
|
4208
4243
|
var MotionSpan2 = chakra10(m2.span, {}, { forwardProps: ["transition"] });
|
|
4209
4244
|
var MotionLi = chakra10(m2.li, {}, { forwardProps: ["transition"] });
|
|
@@ -4252,7 +4287,7 @@ function PresenceList({ children }) {
|
|
|
4252
4287
|
parent.current = marker.current?.parentElement ?? null;
|
|
4253
4288
|
});
|
|
4254
4289
|
useSlideItems(parent, keys);
|
|
4255
|
-
return /* @__PURE__ */
|
|
4290
|
+
return /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
4256
4291
|
/* @__PURE__ */ jsx24(chakra10.span, { ref: marker, display: "none", "aria-hidden": "true" }),
|
|
4257
4292
|
/* @__PURE__ */ jsx24(AnimatePresence2, { initial: false, mode: "popLayout", children: Children.map(
|
|
4258
4293
|
children,
|
|
@@ -4413,17 +4448,17 @@ import { ChevronDown, Menu as MenuIcon, PanelLeftClose, PanelLeftOpen, X } from
|
|
|
4413
4448
|
// src/components/Tooltip.tsx
|
|
4414
4449
|
import { forwardRef as forwardRef4 } from "react";
|
|
4415
4450
|
import { Portal as Portal6, Tooltip as ChakraTooltip } from "@chakra-ui/react";
|
|
4416
|
-
import { jsx as jsx25, jsxs as
|
|
4451
|
+
import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4417
4452
|
var Tooltip = forwardRef4(function Tooltip2({ content, children, disabled, inactive, openDelay = 400, closeDelay = 0, ...rest }, ref) {
|
|
4418
4453
|
if (disabled) return children;
|
|
4419
|
-
return /* @__PURE__ */
|
|
4454
|
+
return /* @__PURE__ */ jsxs17(ChakraTooltip.Root, { openDelay, closeDelay, disabled: inactive, ...rest, children: [
|
|
4420
4455
|
/* @__PURE__ */ jsx25(ChakraTooltip.Trigger, { asChild: true, children }),
|
|
4421
4456
|
/* @__PURE__ */ jsx25(Portal6, { children: /* @__PURE__ */ jsx25(ChakraTooltip.Positioner, { children: /* @__PURE__ */ jsx25(ChakraTooltip.Content, { ref, children: content }) }) })
|
|
4422
4457
|
] });
|
|
4423
4458
|
});
|
|
4424
4459
|
|
|
4425
4460
|
// src/components/AppShell.tsx
|
|
4426
|
-
import { Fragment as Fragment8, jsx as jsx26, jsxs as
|
|
4461
|
+
import { Fragment as Fragment8, jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4427
4462
|
var MAIN_ID = "abp-main";
|
|
4428
4463
|
function AppShell({
|
|
4429
4464
|
brand,
|
|
@@ -4455,38 +4490,38 @@ function AppShell({
|
|
|
4455
4490
|
onCollapsedChange?.(next);
|
|
4456
4491
|
}, [collapsed, onCollapsedChange]);
|
|
4457
4492
|
const mark2 = brand.mark ?? (typeof brand.name === "string" ? brand.name.slice(0, 1) : null);
|
|
4458
|
-
const brandInner = /* @__PURE__ */
|
|
4493
|
+
const brandInner = /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
4459
4494
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.brandMark, "aria-hidden": "true", children: mark2 }),
|
|
4460
4495
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.brandText, children: /* @__PURE__ */ jsx26(chakra11.span, { css: styles.brandName, children: brand.name }) })
|
|
4461
4496
|
] });
|
|
4462
|
-
return /* @__PURE__ */
|
|
4497
|
+
return /* @__PURE__ */ jsxs18(chakra11.div, { css: styles.root, children: [
|
|
4463
4498
|
/* @__PURE__ */ jsx26(SkipNavLink, { id: MAIN_ID, children: labels.skipToContent }),
|
|
4464
|
-
/* @__PURE__ */
|
|
4499
|
+
/* @__PURE__ */ jsxs18(chakra11.header, { css: styles.topbar, children: [
|
|
4465
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, {}) }) }),
|
|
4466
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 }),
|
|
4467
4502
|
topbarStart != null && /* @__PURE__ */ jsx26(chakra11.div, { css: styles.topbarStart, children: topbarStart }),
|
|
4468
|
-
/* @__PURE__ */
|
|
4503
|
+
/* @__PURE__ */ jsxs18(chakra11.nav, { css: styles.topNav, "aria-label": labels.navigation, children: [
|
|
4469
4504
|
topNav.map((item) => /* @__PURE__ */ jsx26(TopNavItem, { item, styles }, item.id)),
|
|
4470
4505
|
topNavEnd
|
|
4471
4506
|
] }),
|
|
4472
4507
|
/* @__PURE__ */ jsx26(chakra11.div, { css: styles.topbarEnd, children: topbarEnd })
|
|
4473
4508
|
] }),
|
|
4474
|
-
/* @__PURE__ */
|
|
4475
|
-
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: [
|
|
4476
4511
|
/* @__PURE__ */ jsx26(FadeIn, { from: "start", display: "flex", flexDirection: "column", minH: "0", flex: "1", children: /* @__PURE__ */ jsx26(SidebarContents, { styles, sidebar, navFooter, collapsed }) }, sidebar.id),
|
|
4477
|
-
/* @__PURE__ */
|
|
4512
|
+
/* @__PURE__ */ jsxs18(chakra11.div, { css: styles.sidebarFooter, children: [
|
|
4478
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, {}) }) }) }),
|
|
4479
4514
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.sidebarFooterText, "aria-hidden": collapsed || void 0, children: sidebarFooter })
|
|
4480
4515
|
] })
|
|
4481
4516
|
] }),
|
|
4482
|
-
/* @__PURE__ */
|
|
4517
|
+
/* @__PURE__ */ jsxs18(chakra11.div, { css: styles.main, children: [
|
|
4483
4518
|
/* @__PURE__ */ jsx26(SkipNavContent, { id: MAIN_ID }),
|
|
4484
4519
|
/* @__PURE__ */ jsx26(chakra11.main, { css: styles.content, children: /* @__PURE__ */ jsx26(ArriveOnChange, { token: pageKey ?? "", css: styles.contentInner, children }) })
|
|
4485
4520
|
] })
|
|
4486
4521
|
] }),
|
|
4487
|
-
/* @__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: [
|
|
4488
4523
|
/* @__PURE__ */ jsx26(Drawer.Backdrop, {}),
|
|
4489
|
-
/* @__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(
|
|
4490
4525
|
chakra11.div,
|
|
4491
4526
|
{
|
|
4492
4527
|
css: mobileStyles.sidebar,
|
|
@@ -4495,7 +4530,7 @@ function AppShell({
|
|
|
4495
4530
|
if (e.target.closest("a")) setMobileOpen(false);
|
|
4496
4531
|
},
|
|
4497
4532
|
children: [
|
|
4498
|
-
/* @__PURE__ */
|
|
4533
|
+
/* @__PURE__ */ jsxs18(chakra11.div, { css: mobileStyles.drawerHeader, children: [
|
|
4499
4534
|
/* @__PURE__ */ jsx26(chakra11.span, { css: mobileStyles.brand, children: brandInner }),
|
|
4500
4535
|
/* @__PURE__ */ jsx26(Drawer.CloseTrigger, { asChild: true, position: "static", children: /* @__PURE__ */ jsx26(IconButton, { size: "sm", "aria-label": labels.close, children: /* @__PURE__ */ jsx26(X, {}) }) })
|
|
4501
4536
|
] }),
|
|
@@ -4524,7 +4559,7 @@ function AppShell({
|
|
|
4524
4559
|
}
|
|
4525
4560
|
function TopNavItem({ item, styles }) {
|
|
4526
4561
|
const Link = useLinkComponent();
|
|
4527
|
-
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: [
|
|
4528
4563
|
item.current && /* @__PURE__ */ jsx26(Indicator, { group: "abp-top-nav", css: styles.topNavIndicator }),
|
|
4529
4564
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.topNavLabel, children: item.label })
|
|
4530
4565
|
] }) });
|
|
@@ -4542,19 +4577,19 @@ function SidebarContents({
|
|
|
4542
4577
|
const loading = !!sidebar.loading;
|
|
4543
4578
|
const arrive = useArriving(loading) ? arriveCss : void 0;
|
|
4544
4579
|
const placeMark = place ? place.mark ?? place.name.slice(0, 1).toUpperCase() : null;
|
|
4545
|
-
const placeInner = place && /* @__PURE__ */
|
|
4580
|
+
const placeInner = place && /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
4546
4581
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.placeMark, "aria-hidden": "true", children: placeMark }),
|
|
4547
|
-
/* @__PURE__ */
|
|
4582
|
+
/* @__PURE__ */ jsxs18(chakra11.span, { css: styles.placeText, children: [
|
|
4548
4583
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.placeName, children: place.name }),
|
|
4549
4584
|
place.detail != null && /* @__PURE__ */ jsx26(chakra11.span, { css: styles.placeDetail, children: place.detail })
|
|
4550
4585
|
] })
|
|
4551
4586
|
] });
|
|
4552
4587
|
const headerCss = placeAfter === void 0 ? styles.placeHeader : { ...styles.placeHeader, px: "0" };
|
|
4553
|
-
const placeBlock = /* @__PURE__ */
|
|
4588
|
+
const placeBlock = /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
4554
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.
|
|
4555
|
-
/* @__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: [
|
|
4556
4591
|
/* @__PURE__ */ jsx26(chakra11.span, { css: [styles.placeMark, ghostCss], children: "\xA0" }),
|
|
4557
|
-
/* @__PURE__ */
|
|
4592
|
+
/* @__PURE__ */ jsxs18(chakra11.span, { css: styles.placeText, children: [
|
|
4558
4593
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.placeName, children: /* @__PURE__ */ jsx26(TextBone, { width: 14 }) }),
|
|
4559
4594
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.placeDetail, children: /* @__PURE__ */ jsx26(TextBone, { width: 4 }) })
|
|
4560
4595
|
] })
|
|
@@ -4562,15 +4597,15 @@ function SidebarContents({
|
|
|
4562
4597
|
sidebar.top != null && // Folded away in the rail (and out of reach of the keyboard there).
|
|
4563
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 }) }) })
|
|
4564
4599
|
] });
|
|
4565
|
-
return /* @__PURE__ */
|
|
4600
|
+
return /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
4566
4601
|
placeAfter === void 0 && placeBlock,
|
|
4567
|
-
/* @__PURE__ */
|
|
4568
|
-
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: [
|
|
4569
4604
|
/* @__PURE__ */ jsx26(NavSection, { section, styles, collapsed, group: sidebar.id }),
|
|
4570
4605
|
section.id === placeAfter && placeBlock
|
|
4571
4606
|
] }, section.id)),
|
|
4572
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).
|
|
4573
|
-
/* @__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: [
|
|
4574
4609
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.navItemIcon, children: /* @__PURE__ */ jsx26(Bone, { width: "4", height: "4" }) }),
|
|
4575
4610
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.navItemLabel, children: /* @__PURE__ */ jsx26(TextBone, { width: boneWidth(n, 6, 12) }) })
|
|
4576
4611
|
] }, n)) }) }) }),
|
|
@@ -4583,8 +4618,8 @@ function NavSection({ section, styles, collapsed, group }) {
|
|
|
4583
4618
|
const [open, setOpen] = useState12(holdsCurrent || !section.collapsible);
|
|
4584
4619
|
const shown = !section.collapsible || collapsed || open || holdsCurrent;
|
|
4585
4620
|
const items = section.items.map((item) => /* @__PURE__ */ jsx26(NavItem, { item, styles, collapsed, group }, item.id));
|
|
4586
|
-
return /* @__PURE__ */
|
|
4587
|
-
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: [
|
|
4588
4623
|
/* @__PURE__ */ jsx26(chakra11.span, { children: section.title }),
|
|
4589
4624
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.navSectionChevron, "data-open": shown || void 0, "aria-hidden": "true", children: /* @__PURE__ */ jsx26(ChevronDown, {}) })
|
|
4590
4625
|
] }) : /* @__PURE__ */ jsx26(chakra11.div, { css: styles.navSectionTitle, "aria-hidden": "true", children: section.title }) }) }),
|
|
@@ -4594,14 +4629,14 @@ function NavSection({ section, styles, collapsed, group }) {
|
|
|
4594
4629
|
function NavItem({ item, styles, collapsed, group, nested }) {
|
|
4595
4630
|
const Link = useLinkComponent();
|
|
4596
4631
|
const { isRtl } = useAbpLocale();
|
|
4597
|
-
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: [
|
|
4598
4633
|
item.current && /* @__PURE__ */ jsx26(Indicator, { group: `abp-side-${group}`, css: styles.navItemIndicator }),
|
|
4599
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) }) }),
|
|
4600
4635
|
/* @__PURE__ */ jsx26(chakra11.span, { css: styles.navItemLabel, children: item.label })
|
|
4601
4636
|
] }) });
|
|
4602
4637
|
const own = /* @__PURE__ */ jsx26(Tooltip, { content: item.label, inactive: !collapsed, positioning: { placement: isRtl ? "left" : "right" }, children: link });
|
|
4603
4638
|
if (!item.children?.length) return own;
|
|
4604
|
-
return /* @__PURE__ */
|
|
4639
|
+
return /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
4605
4640
|
own,
|
|
4606
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)) }) }) })
|
|
4607
4642
|
] });
|
|
@@ -4609,9 +4644,9 @@ function NavItem({ item, styles, collapsed, group, nested }) {
|
|
|
4609
4644
|
|
|
4610
4645
|
// src/components/CommandPalette.tsx
|
|
4611
4646
|
import { Fragment as Fragment9, useEffect as useEffect10, useId as useId3, useMemo as useMemo6, useRef as useRef10, useState as useState13 } from "react";
|
|
4612
|
-
import { chakra as chakra12, Dialog as Dialog3, HStack as HStack4, Portal as Portal8, Spinner as Spinner3, Stack as Stack4, Text as
|
|
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";
|
|
4613
4648
|
import { CornerDownLeft, Search } from "lucide-react";
|
|
4614
|
-
import { Fragment as Fragment10, jsx as jsx27, jsxs as
|
|
4649
|
+
import { Fragment as Fragment10, jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4615
4650
|
function HighlightText({ text, query }) {
|
|
4616
4651
|
const q = query.trim().toLowerCase();
|
|
4617
4652
|
if (!q) return /* @__PURE__ */ jsx27(Fragment10, { children: text });
|
|
@@ -4678,10 +4713,10 @@ function CommandPalette({ open, onOpenChange, search, labels }) {
|
|
|
4678
4713
|
document.getElementById(`${listId}-${active}`)?.scrollIntoView({ block: "nearest" });
|
|
4679
4714
|
}, [active, listId]);
|
|
4680
4715
|
let n = -1;
|
|
4681
|
-
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: [
|
|
4682
4717
|
/* @__PURE__ */ jsx27(Dialog3.Backdrop, {}),
|
|
4683
|
-
/* @__PURE__ */ jsx27(Dialog3.Positioner, { children: /* @__PURE__ */
|
|
4684
|
-
/* @__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: [
|
|
4685
4720
|
/* @__PURE__ */ jsx27(Search, { "aria-hidden": true }),
|
|
4686
4721
|
/* @__PURE__ */ jsx27(
|
|
4687
4722
|
chakra12.input,
|
|
@@ -4706,15 +4741,15 @@ function CommandPalette({ open, onOpenChange, search, labels }) {
|
|
|
4706
4741
|
),
|
|
4707
4742
|
groups == null && /* @__PURE__ */ jsx27(Spinner3, { size: "sm" })
|
|
4708
4743
|
] }),
|
|
4709
|
-
/* @__PURE__ */ jsx27(Dialog3.Body, { p: "2", maxH: "min(60vh, 32rem)", children: /* @__PURE__ */
|
|
4710
|
-
groups != null && items.length === 0 && /* @__PURE__ */ jsx27(
|
|
4711
|
-
(groups ?? []).map((g) => /* @__PURE__ */
|
|
4712
|
-
/* @__PURE__ */ jsx27(
|
|
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: [
|
|
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 }),
|
|
4746
|
+
(groups ?? []).map((g) => /* @__PURE__ */ jsxs19(Stack4, { gap: "0.5", role: "group", "aria-label": g.label, children: [
|
|
4747
|
+
/* @__PURE__ */ jsx27(Text6, { px: "3", pt: "1", pb: "0.5", textStyle: "xs", fontWeight: "bold", color: "fg.muted", children: g.label }),
|
|
4713
4748
|
g.items.map((item) => {
|
|
4714
4749
|
n += 1;
|
|
4715
4750
|
const i = n;
|
|
4716
4751
|
const on = i === active;
|
|
4717
|
-
return /* @__PURE__ */
|
|
4752
|
+
return /* @__PURE__ */ jsxs19(
|
|
4718
4753
|
HStack4,
|
|
4719
4754
|
{
|
|
4720
4755
|
id: `${listId}-${i}`,
|
|
@@ -4733,9 +4768,9 @@ function CommandPalette({ open, onOpenChange, search, labels }) {
|
|
|
4733
4768
|
onClick: () => choose(item),
|
|
4734
4769
|
children: [
|
|
4735
4770
|
item.icon,
|
|
4736
|
-
/* @__PURE__ */ jsx27(
|
|
4737
|
-
item.detail != null && /* @__PURE__ */ jsx27(
|
|
4738
|
-
on && /* @__PURE__ */
|
|
4771
|
+
/* @__PURE__ */ jsx27(Text6, { as: "span", textStyle: "sm", truncate: true, minW: "0", dir: "auto", children: /* @__PURE__ */ jsx27(HighlightText, { text: item.label, query: text }) }),
|
|
4772
|
+
item.detail != null && /* @__PURE__ */ jsx27(Text6, { as: "span", textStyle: "xs", color: "fg.muted", truncate: true, flexShrink: 1, minW: "0", children: item.detail }),
|
|
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: [
|
|
4739
4774
|
labels.open,
|
|
4740
4775
|
/* @__PURE__ */ jsx27(CornerDownLeft, {})
|
|
4741
4776
|
] })
|
|
@@ -4746,15 +4781,15 @@ function CommandPalette({ open, onOpenChange, search, labels }) {
|
|
|
4746
4781
|
})
|
|
4747
4782
|
] }, g.id))
|
|
4748
4783
|
] }) }),
|
|
4749
|
-
/* @__PURE__ */ jsx27(
|
|
4784
|
+
/* @__PURE__ */ jsx27(Text6, { px: "4", py: "2", borderTopWidth: "1px", borderColor: "border.muted", textStyle: "xs", color: "fg.muted", children: labels.hint })
|
|
4750
4785
|
] }) })
|
|
4751
4786
|
] }) });
|
|
4752
4787
|
}
|
|
4753
4788
|
|
|
4754
4789
|
// src/components/AvatarStack.tsx
|
|
4755
|
-
import { Avatar, Box as Box3, HStack as HStack5, Popover as Popover2, Portal as Portal9, Stack as Stack5, Text as
|
|
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";
|
|
4756
4791
|
import { Check } from "lucide-react";
|
|
4757
|
-
import { Fragment as Fragment11, jsx as jsx28, jsxs as
|
|
4792
|
+
import { Fragment as Fragment11, jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4758
4793
|
var PALETTES = ["blue", "teal", "purple", "orange", "pink", "cyan", "green", "red"];
|
|
4759
4794
|
function avatarPalette(id) {
|
|
4760
4795
|
let hash = 0;
|
|
@@ -4762,7 +4797,7 @@ function avatarPalette(id) {
|
|
|
4762
4797
|
return PALETTES[Math.abs(hash) % PALETTES.length];
|
|
4763
4798
|
}
|
|
4764
4799
|
function PersonAvatar({ person, selected, inButton }) {
|
|
4765
|
-
return /* @__PURE__ */
|
|
4800
|
+
return /* @__PURE__ */ jsxs20(
|
|
4766
4801
|
Avatar.Root,
|
|
4767
4802
|
{
|
|
4768
4803
|
colorPalette: avatarPalette(person.id),
|
|
@@ -4792,8 +4827,8 @@ function AvatarStack({ "aria-label": ariaLabel, people, max = 3, moreLabel, more
|
|
|
4792
4827
|
const rest = people.slice(max);
|
|
4793
4828
|
const picked = (p) => selected.includes(p.id);
|
|
4794
4829
|
const restPicked = rest.some(picked);
|
|
4795
|
-
return /* @__PURE__ */
|
|
4796
|
-
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: [
|
|
4797
4832
|
p.name,
|
|
4798
4833
|
" \xB7 ",
|
|
4799
4834
|
p.detail
|
|
@@ -4817,8 +4852,8 @@ function AvatarStack({ "aria-label": ariaLabel, people, max = 3, moreLabel, more
|
|
|
4817
4852
|
}
|
|
4818
4853
|
)
|
|
4819
4854
|
) : /* @__PURE__ */ jsx28(Box3, { display: "inline-flex", children: /* @__PURE__ */ jsx28(PersonAvatar, { person: p }) }) }, p.id)),
|
|
4820
|
-
rest.length > 0 && /* @__PURE__ */
|
|
4821
|
-
/* @__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(
|
|
4822
4857
|
Box3,
|
|
4823
4858
|
{
|
|
4824
4859
|
as: "button",
|
|
@@ -4847,14 +4882,14 @@ function AvatarStack({ "aria-label": ariaLabel, people, max = 3, moreLabel, more
|
|
|
4847
4882
|
]
|
|
4848
4883
|
}
|
|
4849
4884
|
) }),
|
|
4850
|
-
/* @__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: [
|
|
4851
4886
|
/* @__PURE__ */ jsx28(Popover2.Title, { textStyle: "label", children: moreTitle }),
|
|
4852
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) => {
|
|
4853
|
-
const row = /* @__PURE__ */
|
|
4888
|
+
const row = /* @__PURE__ */ jsxs20(Fragment11, { children: [
|
|
4854
4889
|
/* @__PURE__ */ jsx28(PersonAvatar, { person: p, selected: onToggle && picked(p), inButton: !!onToggle }),
|
|
4855
|
-
/* @__PURE__ */
|
|
4856
|
-
/* @__PURE__ */ jsx28(
|
|
4857
|
-
p.detail && /* @__PURE__ */ jsx28(
|
|
4890
|
+
/* @__PURE__ */ jsxs20(Stack5, { gap: "0", minW: "0", flex: "1", textAlign: "start", children: [
|
|
4891
|
+
/* @__PURE__ */ jsx28(Text7, { textStyle: "body", truncate: true, children: p.name }),
|
|
4892
|
+
p.detail && /* @__PURE__ */ jsx28(Text7, { textStyle: "caption", color: "fg.muted", children: p.detail })
|
|
4858
4893
|
] }),
|
|
4859
4894
|
onToggle && picked(p) && /* @__PURE__ */ jsx28(Box3, { as: "span", color: "accent.fg", flexShrink: 0, "aria-hidden": true, children: /* @__PURE__ */ jsx28(Check, { size: 16 }) })
|
|
4860
4895
|
] });
|
|
@@ -4888,10 +4923,10 @@ import { chakra as chakra16, Menu, Portal as Portal10, Table, useSlotRecipe as u
|
|
|
4888
4923
|
import { ArrowDown, ArrowUp, ChevronDown as ChevronDown2, ChevronRight as ChevronRight2, ChevronsUpDown, GripVertical } from "lucide-react";
|
|
4889
4924
|
|
|
4890
4925
|
// src/components/EmptyState.tsx
|
|
4891
|
-
import { chakra as chakra13, EmptyState as ChakraEmptyState, HStack as HStack6, Text as
|
|
4926
|
+
import { chakra as chakra13, EmptyState as ChakraEmptyState, HStack as HStack6, Text as Text8, VStack } from "@chakra-ui/react";
|
|
4892
4927
|
import { Inbox } from "lucide-react";
|
|
4893
4928
|
import { m as m3 } from "motion/react";
|
|
4894
|
-
import { jsx as jsx29, jsxs as
|
|
4929
|
+
import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4895
4930
|
var TONE = {
|
|
4896
4931
|
neutral: { border: "border.muted", bg: "bg.muted", fg: "fg.muted" },
|
|
4897
4932
|
accent: { border: "accent.muted", bg: "accent.subtle", fg: "accent.fg" },
|
|
@@ -4921,23 +4956,23 @@ function Drawing({ children, size, tone }) {
|
|
|
4921
4956
|
}
|
|
4922
4957
|
function EmptyState({ title, description, icon, action, secondaryAction, kind, size = "sm", tone: own }) {
|
|
4923
4958
|
const tone = own ?? (kind === "first-use" ? "accent" : kind === "error" ? "danger" : "neutral");
|
|
4924
|
-
const actions = action != null && secondaryAction != null ? /* @__PURE__ */
|
|
4959
|
+
const actions = action != null && secondaryAction != null ? /* @__PURE__ */ jsxs21(HStack6, { gap: "2", justify: "center", wrap: "wrap", children: [
|
|
4925
4960
|
action,
|
|
4926
4961
|
secondaryAction
|
|
4927
4962
|
] }) : action ?? secondaryAction;
|
|
4928
4963
|
if (size === "xs") {
|
|
4929
|
-
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: [
|
|
4930
4965
|
icon,
|
|
4931
|
-
/* @__PURE__ */
|
|
4932
|
-
/* @__PURE__ */ jsx29(
|
|
4933
|
-
description != null && /* @__PURE__ */ jsx29(
|
|
4966
|
+
/* @__PURE__ */ jsxs21(VStack, { gap: "0.5", children: [
|
|
4967
|
+
/* @__PURE__ */ jsx29(Text8, { as: "span", children: title }),
|
|
4968
|
+
description != null && /* @__PURE__ */ jsx29(Text8, { as: "span", textStyle: "caption", color: "fg.subtle", children: description }),
|
|
4934
4969
|
actions
|
|
4935
4970
|
] })
|
|
4936
4971
|
] });
|
|
4937
4972
|
}
|
|
4938
|
-
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: [
|
|
4939
4974
|
/* @__PURE__ */ jsx29(ChakraEmptyState.Indicator, { children: /* @__PURE__ */ jsx29(Drawing, { size, tone, children: icon ?? /* @__PURE__ */ jsx29(Inbox, {}) }) }),
|
|
4940
|
-
/* @__PURE__ */
|
|
4975
|
+
/* @__PURE__ */ jsxs21(VStack, { gap: "1.5", textAlign: "center", maxW: "md", children: [
|
|
4941
4976
|
/* @__PURE__ */ jsx29(ChakraEmptyState.Title, { textStyle: size === "md" ? "lg" : "md", fontWeight: "semibold", color: "fg", children: title }),
|
|
4942
4977
|
description != null && /* @__PURE__ */ jsx29(ChakraEmptyState.Description, { textStyle: "sm", color: "fg.muted", children: description })
|
|
4943
4978
|
] }),
|
|
@@ -4966,14 +5001,14 @@ var RecordKey = forwardRef5(function RecordKey2({ value, children, href, variant
|
|
|
4966
5001
|
// src/components/StatusPill.tsx
|
|
4967
5002
|
import { forwardRef as forwardRef6 } from "react";
|
|
4968
5003
|
import { chakra as chakra15, useSlotRecipe as useSlotRecipe2 } from "@chakra-ui/react";
|
|
4969
|
-
import { jsx as jsx31, jsxs as
|
|
5004
|
+
import { jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4970
5005
|
var StatusPill = forwardRef6(function StatusPill2({ tone = "neutral", category, variant = "subtle", size = "sm", dot = true, loading: own, skeletonWidth = 8, children, css, ...rest }, ref) {
|
|
4971
5006
|
const recipe = useSlotRecipe2({ key: "abpStatusPill" });
|
|
4972
5007
|
const styles = recipe({ tone: category ?? tone, variant, size });
|
|
4973
5008
|
const loading = useLoading(own);
|
|
4974
5009
|
const arriving = useArriving(loading);
|
|
4975
5010
|
const unknown = children == null || children === "";
|
|
4976
|
-
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: [
|
|
4977
5012
|
dot && /* @__PURE__ */ jsx31(chakra15.span, { css: styles.indicator, "aria-hidden": "true" }),
|
|
4978
5013
|
loading && unknown ? /* @__PURE__ */ jsx31(chakra15.span, { display: "inline-block", width: `${skeletonWidth}ch`, children: "\xA0" }) : children
|
|
4979
5014
|
] });
|
|
@@ -5137,7 +5172,7 @@ function visibleInTree(tree, folded) {
|
|
|
5137
5172
|
}
|
|
5138
5173
|
|
|
5139
5174
|
// src/components/DataTable.tsx
|
|
5140
|
-
import { jsx as jsx32, jsxs as
|
|
5175
|
+
import { jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5141
5176
|
function parentFoldKey(parent) {
|
|
5142
5177
|
return `${parent}`;
|
|
5143
5178
|
}
|
|
@@ -5293,7 +5328,7 @@ function DataTable({
|
|
|
5293
5328
|
const sub = renderSubRow?.(row);
|
|
5294
5329
|
const own2 = renderRow?.(row, index);
|
|
5295
5330
|
const selected = selection ? selection.selectedId === id : void 0;
|
|
5296
|
-
return /* @__PURE__ */
|
|
5331
|
+
return /* @__PURE__ */ jsxs23(Fragment12, { children: [
|
|
5297
5332
|
/* @__PURE__ */ jsx32(
|
|
5298
5333
|
Table.Row,
|
|
5299
5334
|
{
|
|
@@ -5353,7 +5388,7 @@ function DataTable({
|
|
|
5353
5388
|
}),
|
|
5354
5389
|
children: c2.cell(row, index)
|
|
5355
5390
|
}
|
|
5356
|
-
) : ci === 0 && grouping?.move ? /* @__PURE__ */
|
|
5391
|
+
) : ci === 0 && grouping?.move ? /* @__PURE__ */ jsxs23(chakra16.div, { display: "flex", alignItems: "center", gap: "1", children: [
|
|
5357
5392
|
/* @__PURE__ */ jsx32(
|
|
5358
5393
|
RowGrip,
|
|
5359
5394
|
{
|
|
@@ -5389,7 +5424,7 @@ function DataTable({
|
|
|
5389
5424
|
body = groups.map((g, gi) => {
|
|
5390
5425
|
const parent = parents?.of(g.key);
|
|
5391
5426
|
const parentFolded = parent != null && grouping.folded.has(parentFoldKey(parent));
|
|
5392
|
-
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: [
|
|
5393
5428
|
/* @__PURE__ */ jsx32(
|
|
5394
5429
|
chakra16.button,
|
|
5395
5430
|
{
|
|
@@ -5408,7 +5443,7 @@ function DataTable({
|
|
|
5408
5443
|
const footer = folded ? null : grouping.footer?.(g.key, g.rows);
|
|
5409
5444
|
const start = at;
|
|
5410
5445
|
if (!folded) at += g.rows.length;
|
|
5411
|
-
return /* @__PURE__ */
|
|
5446
|
+
return /* @__PURE__ */ jsxs23(Fragment12, { children: [
|
|
5412
5447
|
parentRow,
|
|
5413
5448
|
/* @__PURE__ */ jsx32(
|
|
5414
5449
|
Table.Row,
|
|
@@ -5435,7 +5470,7 @@ function DataTable({
|
|
|
5435
5470
|
if (row) grouping.move.onMove(row, g.key);
|
|
5436
5471
|
}
|
|
5437
5472
|
} : {},
|
|
5438
|
-
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: [
|
|
5439
5474
|
/* @__PURE__ */ jsx32(
|
|
5440
5475
|
chakra16.button,
|
|
5441
5476
|
{
|
|
@@ -5457,7 +5492,7 @@ function DataTable({
|
|
|
5457
5492
|
});
|
|
5458
5493
|
}
|
|
5459
5494
|
}
|
|
5460
|
-
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(
|
|
5461
5496
|
Table.Root,
|
|
5462
5497
|
{
|
|
5463
5498
|
size,
|
|
@@ -5475,7 +5510,7 @@ function DataTable({
|
|
|
5475
5510
|
textAlign: align(c2),
|
|
5476
5511
|
w: c2.width,
|
|
5477
5512
|
"aria-sort": sortable ? active === "asc" ? "ascending" : active === "desc" ? "descending" : "none" : void 0,
|
|
5478
|
-
children: sortable ? /* @__PURE__ */
|
|
5513
|
+
children: sortable ? /* @__PURE__ */ jsxs23(
|
|
5479
5514
|
chakra16.button,
|
|
5480
5515
|
{
|
|
5481
5516
|
type: "button",
|
|
@@ -5504,7 +5539,7 @@ function RowGrip({ move, row, dragging, group, prev, next, onDragStart, onDragEn
|
|
|
5504
5539
|
const targets = move.targets(row);
|
|
5505
5540
|
const place = move.place;
|
|
5506
5541
|
const steps = place ? [prev && { value: UP, label: place.up }, next && { value: DOWN, label: place.down }].filter((x) => Boolean(x)) : [];
|
|
5507
|
-
return /* @__PURE__ */
|
|
5542
|
+
return /* @__PURE__ */ jsxs23(
|
|
5508
5543
|
Menu.Root,
|
|
5509
5544
|
{
|
|
5510
5545
|
lazyMount: true,
|
|
@@ -5552,13 +5587,13 @@ function RowGrip({ move, row, dragging, group, prev, next, onDragStart, onDragEn
|
|
|
5552
5587
|
children: /* @__PURE__ */ jsx32(GripVertical, {})
|
|
5553
5588
|
}
|
|
5554
5589
|
) }),
|
|
5555
|
-
/* @__PURE__ */ jsx32(Portal10, { children: /* @__PURE__ */ jsx32(Menu.Positioner, { children: /* @__PURE__ */
|
|
5556
|
-
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: [
|
|
5557
5592
|
x.value === UP ? /* @__PURE__ */ jsx32(ArrowUp, {}) : /* @__PURE__ */ jsx32(ArrowDown, {}),
|
|
5558
5593
|
x.label
|
|
5559
5594
|
] }, x.value)) }),
|
|
5560
5595
|
steps.length > 0 && targets.length > 0 && /* @__PURE__ */ jsx32(Menu.Separator, {}),
|
|
5561
|
-
targets.length > 0 && /* @__PURE__ */
|
|
5596
|
+
targets.length > 0 && /* @__PURE__ */ jsxs23(Menu.ItemGroup, { children: [
|
|
5562
5597
|
/* @__PURE__ */ jsx32(Menu.ItemGroupLabel, { children: move.menuTitle }),
|
|
5563
5598
|
targets.map((x) => /* @__PURE__ */ jsx32(Menu.Item, { value: x.group, children: x.label }, x.group))
|
|
5564
5599
|
] })
|
|
@@ -5568,7 +5603,7 @@ function RowGrip({ move, row, dragging, group, prev, next, onDragStart, onDragEn
|
|
|
5568
5603
|
);
|
|
5569
5604
|
}
|
|
5570
5605
|
function TreeCell({ node, folded, label, contextLabel, onFold, children }) {
|
|
5571
|
-
return /* @__PURE__ */
|
|
5606
|
+
return /* @__PURE__ */ jsxs23(
|
|
5572
5607
|
chakra16.div,
|
|
5573
5608
|
{
|
|
5574
5609
|
display: "flex",
|
|
@@ -5612,9 +5647,9 @@ function TreeCell({ node, folded, label, contextLabel, onFold, children }) {
|
|
|
5612
5647
|
|
|
5613
5648
|
// src/components/CalendarGrid.tsx
|
|
5614
5649
|
import { useEffect as useEffect11, useMemo as useMemo8, useRef as useRef12, useState as useState15 } from "react";
|
|
5615
|
-
import { Box as Box4, chakra as chakra17, Grid as Grid2, Stack as Stack6, Text as
|
|
5650
|
+
import { Box as Box4, chakra as chakra17, Grid as Grid2, Stack as Stack6, Text as Text9 } from "@chakra-ui/react";
|
|
5616
5651
|
import { DndContext, DragOverlay, PointerSensor, useDraggable, useDroppable, useSensor, useSensors } from "@dnd-kit/core";
|
|
5617
|
-
import { jsx as jsx33, jsxs as
|
|
5652
|
+
import { jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5618
5653
|
var addDays = (day, n) => {
|
|
5619
5654
|
const d = /* @__PURE__ */ new Date(`${day}T00:00:00Z`);
|
|
5620
5655
|
d.setUTCDate(d.getUTCDate() + n);
|
|
@@ -5675,7 +5710,7 @@ function CalendarGrid({
|
|
|
5675
5710
|
const rtl = getComputedStyle(e.currentTarget).direction === "rtl";
|
|
5676
5711
|
onMove(item, addDays(item.start, rtl && Math.abs(step) === 1 ? -step : step));
|
|
5677
5712
|
}
|
|
5678
|
-
return /* @__PURE__ */
|
|
5713
|
+
return /* @__PURE__ */ jsxs24(
|
|
5679
5714
|
DndContext,
|
|
5680
5715
|
{
|
|
5681
5716
|
sensors,
|
|
@@ -5683,12 +5718,12 @@ function CalendarGrid({
|
|
|
5683
5718
|
onDragEnd: end,
|
|
5684
5719
|
onDragCancel: () => setActive(null),
|
|
5685
5720
|
children: [
|
|
5686
|
-
/* @__PURE__ */
|
|
5687
|
-
/* @__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(
|
|
5721
|
+
/* @__PURE__ */ jsxs24(Box4, { ref: root, role: "grid", "aria-label": ariaLabel, borderWidth: "1px", borderColor: "border", rounded: "l3", overflow: "hidden", children: [
|
|
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)) }),
|
|
5688
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) => {
|
|
5689
5724
|
const list = byDay.get(day) ?? [];
|
|
5690
5725
|
const shown = tall ? list : list.slice(0, maxPerDay);
|
|
5691
|
-
return /* @__PURE__ */
|
|
5726
|
+
return /* @__PURE__ */ jsxs24(
|
|
5692
5727
|
DayCell,
|
|
5693
5728
|
{
|
|
5694
5729
|
day,
|
|
@@ -5719,7 +5754,7 @@ function CalendarGrid({
|
|
|
5719
5754
|
"data-more": "",
|
|
5720
5755
|
children: more(list.length - shown.length)
|
|
5721
5756
|
}
|
|
5722
|
-
) : /* @__PURE__ */ jsx33(
|
|
5757
|
+
) : /* @__PURE__ */ jsx33(Text9, { textStyle: "caption", color: "fg.muted", px: "1", children: more(list.length - shown.length) }))
|
|
5723
5758
|
]
|
|
5724
5759
|
},
|
|
5725
5760
|
day
|
|
@@ -5733,7 +5768,7 @@ function CalendarGrid({
|
|
|
5733
5768
|
}
|
|
5734
5769
|
function DayCell({ day, name, dim, today, tall, last, label, dragging, children }) {
|
|
5735
5770
|
const { setNodeRef, isOver } = useDroppable({ id: `day:${day}` });
|
|
5736
|
-
return /* @__PURE__ */
|
|
5771
|
+
return /* @__PURE__ */ jsxs24(
|
|
5737
5772
|
Stack6,
|
|
5738
5773
|
{
|
|
5739
5774
|
ref: setNodeRef,
|
|
@@ -5752,7 +5787,7 @@ function DayCell({ day, name, dim, today, tall, last, label, dragging, children
|
|
|
5752
5787
|
"data-day": day,
|
|
5753
5788
|
children: [
|
|
5754
5789
|
/* @__PURE__ */ jsx33(
|
|
5755
|
-
|
|
5790
|
+
Text9,
|
|
5756
5791
|
{
|
|
5757
5792
|
textStyle: "caption",
|
|
5758
5793
|
fontWeight: "semibold",
|
|
@@ -5798,10 +5833,10 @@ function Chip({ item, continued, onKeyDown, children }) {
|
|
|
5798
5833
|
}
|
|
5799
5834
|
|
|
5800
5835
|
// src/components/Chart.tsx
|
|
5801
|
-
import { Box as Box5, Flex as Flex2, Text as
|
|
5836
|
+
import { Box as Box5, Flex as Flex2, Text as Text10 } from "@chakra-ui/react";
|
|
5802
5837
|
import { Chart as ChakraChart, useChart } from "@chakra-ui/charts";
|
|
5803
5838
|
import { Area, AreaChart, Bar, BarChart, CartesianGrid, Legend, Line, LineChart, ResponsiveContainer, Tooltip as Tooltip3, XAxis, YAxis } from "recharts";
|
|
5804
|
-
import { jsx as jsx34, jsxs as
|
|
5839
|
+
import { jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5805
5840
|
var PALETTE = ["teal.solid", "blue.solid", "orange.solid", "purple.solid", "green.solid", "pink.solid", "cyan.solid", "yellow.solid", "red.solid"];
|
|
5806
5841
|
function Chart({ kind, stacked, data, x, series, "aria-label": ariaLabel, height = 280, formatX, formatValue, loading: own }) {
|
|
5807
5842
|
const { isRtl: rtl } = useAbpLocale();
|
|
@@ -5820,15 +5855,15 @@ function Chart({ kind, stacked, data, x, series, "aria-label": ariaLabel, height
|
|
|
5820
5855
|
if (loading) {
|
|
5821
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)) }) });
|
|
5822
5857
|
}
|
|
5823
|
-
return /* @__PURE__ */
|
|
5824
|
-
/* @__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: [
|
|
5825
5860
|
grid,
|
|
5826
5861
|
xAxis,
|
|
5827
5862
|
yAxis,
|
|
5828
5863
|
tooltip,
|
|
5829
5864
|
legend,
|
|
5830
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))
|
|
5831
|
-
] }) : kind === "area" ? /* @__PURE__ */
|
|
5866
|
+
] }) : kind === "area" ? /* @__PURE__ */ jsxs25(AreaChart, { data: chart.data, children: [
|
|
5832
5867
|
grid,
|
|
5833
5868
|
xAxis,
|
|
5834
5869
|
yAxis,
|
|
@@ -5848,7 +5883,7 @@ function Chart({ kind, stacked, data, x, series, "aria-label": ariaLabel, height
|
|
|
5848
5883
|
},
|
|
5849
5884
|
s.name
|
|
5850
5885
|
))
|
|
5851
|
-
] }) : /* @__PURE__ */
|
|
5886
|
+
] }) : /* @__PURE__ */ jsxs25(LineChart, { data: chart.data, children: [
|
|
5852
5887
|
grid,
|
|
5853
5888
|
xAxis,
|
|
5854
5889
|
yAxis,
|
|
@@ -5869,18 +5904,18 @@ function Chart({ kind, stacked, data, x, series, "aria-label": ariaLabel, height
|
|
|
5869
5904
|
s.name
|
|
5870
5905
|
))
|
|
5871
5906
|
] }) }) }),
|
|
5872
|
-
/* @__PURE__ */
|
|
5907
|
+
/* @__PURE__ */ jsxs25(Box5, { as: "table", srOnly: true, children: [
|
|
5873
5908
|
/* @__PURE__ */ jsx34("caption", { children: ariaLabel }),
|
|
5874
|
-
/* @__PURE__ */ jsx34("thead", { children: /* @__PURE__ */
|
|
5909
|
+
/* @__PURE__ */ jsx34("thead", { children: /* @__PURE__ */ jsxs25("tr", { children: [
|
|
5875
5910
|
/* @__PURE__ */ jsx34("th", { scope: "col", children: "" }),
|
|
5876
5911
|
series.map((s) => /* @__PURE__ */ jsx34("th", { scope: "col", children: s.label }, s.key))
|
|
5877
5912
|
] }) }),
|
|
5878
|
-
/* @__PURE__ */ jsx34("tbody", { children: data.map((row, i) => /* @__PURE__ */
|
|
5913
|
+
/* @__PURE__ */ jsx34("tbody", { children: data.map((row, i) => /* @__PURE__ */ jsxs25("tr", { children: [
|
|
5879
5914
|
/* @__PURE__ */ jsx34("th", { scope: "row", children: formatX ? formatX(String(row[x])) : String(row[x]) }),
|
|
5880
5915
|
series.map((s) => /* @__PURE__ */ jsx34("td", { children: row[s.key] == null ? "" : formatValue ? formatValue(Number(row[s.key])) : String(row[s.key]) }, s.key))
|
|
5881
5916
|
] }, i)) })
|
|
5882
5917
|
] }),
|
|
5883
|
-
data.length === 0 && /* @__PURE__ */ jsx34(
|
|
5918
|
+
data.length === 0 && /* @__PURE__ */ jsx34(Text10, { textStyle: "caption", color: "fg.muted", children: "\u2014" })
|
|
5884
5919
|
] });
|
|
5885
5920
|
}
|
|
5886
5921
|
|
|
@@ -5888,7 +5923,7 @@ function Chart({ kind, stacked, data, x, series, "aria-label": ariaLabel, height
|
|
|
5888
5923
|
import { useRef as useRef13, useState as useState16 } from "react";
|
|
5889
5924
|
import { Box as Box6, chakra as chakra18 } from "@chakra-ui/react";
|
|
5890
5925
|
import { GripVertical as GripVertical2, MoveDiagonal2 } from "lucide-react";
|
|
5891
|
-
import { Fragment as Fragment13, jsx as jsx35, jsxs as
|
|
5926
|
+
import { Fragment as Fragment13, jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5892
5927
|
var GAP = 16;
|
|
5893
5928
|
var PLACEHOLDER_TILES = [
|
|
5894
5929
|
{ id: "skeleton-1", x: 0, y: 0, w: 6, h: 3 },
|
|
@@ -6009,9 +6044,9 @@ function DashboardGrid({
|
|
|
6009
6044
|
_hover: { color: "fg", bg: "bg.muted" },
|
|
6010
6045
|
_focusVisible: { outline: "2px solid", outlineColor: "colorPalette.focusRing", outlineOffset: "1px" }
|
|
6011
6046
|
};
|
|
6012
|
-
return /* @__PURE__ */
|
|
6047
|
+
return /* @__PURE__ */ jsxs26(Box6, { children: [
|
|
6013
6048
|
editing && /* @__PURE__ */ jsx35(chakra18.p, { id: instructionsId, srOnly: true, children: labels.instructions }),
|
|
6014
|
-
/* @__PURE__ */
|
|
6049
|
+
/* @__PURE__ */ jsxs26(
|
|
6015
6050
|
Box6,
|
|
6016
6051
|
{
|
|
6017
6052
|
ref,
|
|
@@ -6043,7 +6078,7 @@ function DashboardGrid({
|
|
|
6043
6078
|
if (!item) return null;
|
|
6044
6079
|
const shown = { ...item, ...place };
|
|
6045
6080
|
const moving = active === item.id;
|
|
6046
|
-
return /* @__PURE__ */
|
|
6081
|
+
return /* @__PURE__ */ jsxs26(
|
|
6047
6082
|
Box6,
|
|
6048
6083
|
{
|
|
6049
6084
|
role: "listitem",
|
|
@@ -6056,7 +6091,7 @@ function DashboardGrid({
|
|
|
6056
6091
|
transition: moving ? void 0 : "all 120ms ease",
|
|
6057
6092
|
children: [
|
|
6058
6093
|
renderItem(shown),
|
|
6059
|
-
editing && /* @__PURE__ */
|
|
6094
|
+
editing && /* @__PURE__ */ jsxs26(Fragment13, { children: [
|
|
6060
6095
|
/* @__PURE__ */ jsx35(
|
|
6061
6096
|
chakra18.button,
|
|
6062
6097
|
{
|
|
@@ -6157,10 +6192,10 @@ function CountBadge({ value, tone = "neutral", size = "sm", loading: own, ...res
|
|
|
6157
6192
|
}
|
|
6158
6193
|
|
|
6159
6194
|
// src/components/AttentionChip.tsx
|
|
6160
|
-
import { jsx as jsx38, jsxs as
|
|
6195
|
+
import { jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6161
6196
|
function AttentionChip({ count, children, tone = "neutral", pressed, onClick, disabled, loading: own }) {
|
|
6162
6197
|
const loading = useLoading(own);
|
|
6163
|
-
return /* @__PURE__ */
|
|
6198
|
+
return /* @__PURE__ */ jsxs27(
|
|
6164
6199
|
chakra20.button,
|
|
6165
6200
|
{
|
|
6166
6201
|
type: "button",
|
|
@@ -6223,16 +6258,16 @@ function IconTile({ children, size = "md", active = false, palette: palette3 })
|
|
|
6223
6258
|
|
|
6224
6259
|
// src/components/PersonChip.tsx
|
|
6225
6260
|
import { Avatar as Avatar2, chakra as chakra22 } from "@chakra-ui/react";
|
|
6226
|
-
import { jsx as jsx40, jsxs as
|
|
6261
|
+
import { jsx as jsx40, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6227
6262
|
var SIZES2 = { xs: "5", sm: "6", md: "8" };
|
|
6228
6263
|
function PersonChip({ id, name, picture, compact = false, size = "sm", loading: own }) {
|
|
6229
6264
|
if (useLoading(own)) {
|
|
6230
|
-
return /* @__PURE__ */
|
|
6265
|
+
return /* @__PURE__ */ jsxs28(chakra22.span, { display: "inline-flex", alignItems: "center", gap: "2", "aria-hidden": true, children: [
|
|
6231
6266
|
/* @__PURE__ */ jsx40(Bone, { circle: true, height: SIZES2[size] }),
|
|
6232
6267
|
!compact && /* @__PURE__ */ jsx40(TextBone, { width: 12 })
|
|
6233
6268
|
] });
|
|
6234
6269
|
}
|
|
6235
|
-
const avatar = /* @__PURE__ */
|
|
6270
|
+
const avatar = /* @__PURE__ */ jsxs28(
|
|
6236
6271
|
Avatar2.Root,
|
|
6237
6272
|
{
|
|
6238
6273
|
colorPalette: avatarPalette(id),
|
|
@@ -6251,7 +6286,7 @@ function PersonChip({ id, name, picture, compact = false, size = "sm", loading:
|
|
|
6251
6286
|
}
|
|
6252
6287
|
);
|
|
6253
6288
|
if (compact) return avatar;
|
|
6254
|
-
return /* @__PURE__ */
|
|
6289
|
+
return /* @__PURE__ */ jsxs28(chakra22.span, { display: "inline-flex", alignItems: "center", gap: "2", minW: "0", maxW: "full", children: [
|
|
6255
6290
|
avatar,
|
|
6256
6291
|
/* @__PURE__ */ jsx40(chakra22.span, { truncate: true, children: name })
|
|
6257
6292
|
] });
|
|
@@ -6270,11 +6305,11 @@ function priorityLevel(rank, of) {
|
|
|
6270
6305
|
}
|
|
6271
6306
|
|
|
6272
6307
|
// src/components/PriorityMark.tsx
|
|
6273
|
-
import { jsx as jsx41, jsxs as
|
|
6308
|
+
import { jsx as jsx41, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6274
6309
|
function PriorityMark({ rank, of, children, title, loading }) {
|
|
6275
6310
|
if (useLoading(loading)) return /* @__PURE__ */ jsx41(TextBone, { width: 7 });
|
|
6276
6311
|
const { bars, palette: palette3 } = priorityLevel(rank, of);
|
|
6277
|
-
return /* @__PURE__ */
|
|
6312
|
+
return /* @__PURE__ */ jsxs29(
|
|
6278
6313
|
chakra23.span,
|
|
6279
6314
|
{
|
|
6280
6315
|
display: "inline-flex",
|
|
@@ -6540,7 +6575,7 @@ function useAreaListSource(area, path, options = {}) {
|
|
|
6540
6575
|
// src/components/FormDialog.tsx
|
|
6541
6576
|
import { useRef as useRef16, useState as useState18 } from "react";
|
|
6542
6577
|
import { chakra as chakra24, CloseButton as CloseButton2, Dialog as Dialog4, Portal as Portal11, Stack as Stack7 } from "@chakra-ui/react";
|
|
6543
|
-
import { jsx as jsx42, jsxs as
|
|
6578
|
+
import { jsx as jsx42, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6544
6579
|
var isControl = (el) => el instanceof HTMLInputElement || el instanceof HTMLSelectElement || el instanceof HTMLTextAreaElement;
|
|
6545
6580
|
function invalidControls(form) {
|
|
6546
6581
|
return [...form.elements].filter((el) => isControl(el) && !el.disabled && el.willValidate && !el.checkValidity());
|
|
@@ -6588,9 +6623,9 @@ function FormDialog({ open, onOpenChange, title, description, submitLabel, onSub
|
|
|
6588
6623
|
mark(e.target, wrong);
|
|
6589
6624
|
if (problems.length > 0) setProblems(invalidControls(e.currentTarget).map(describe2));
|
|
6590
6625
|
}
|
|
6591
|
-
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: [
|
|
6592
6627
|
/* @__PURE__ */ jsx42(Dialog4.Backdrop, {}),
|
|
6593
|
-
/* @__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(
|
|
6594
6629
|
"form",
|
|
6595
6630
|
{
|
|
6596
6631
|
onSubmit: hideSubmit ? (e) => e.preventDefault() : submit,
|
|
@@ -6599,7 +6634,7 @@ function FormDialog({ open, onOpenChange, title, description, submitLabel, onSub
|
|
|
6599
6634
|
noValidate: true,
|
|
6600
6635
|
children: [
|
|
6601
6636
|
/* @__PURE__ */ jsx42(Dialog4.Header, { children: /* @__PURE__ */ jsx42(Dialog4.Title, { children: title }) }),
|
|
6602
|
-
/* @__PURE__ */ jsx42(Dialog4.Body, { children: /* @__PURE__ */
|
|
6637
|
+
/* @__PURE__ */ jsx42(Dialog4.Body, { children: /* @__PURE__ */ jsxs30(Stack7, { gap: "field", children: [
|
|
6603
6638
|
description != null && /* @__PURE__ */ jsx42(Dialog4.Description, { children: description }),
|
|
6604
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(
|
|
6605
6640
|
chakra24.button,
|
|
@@ -6618,7 +6653,7 @@ function FormDialog({ open, onOpenChange, title, description, submitLabel, onSub
|
|
|
6618
6653
|
children,
|
|
6619
6654
|
/* @__PURE__ */ jsx42(InlineAlert, { tone: "danger", children: error })
|
|
6620
6655
|
] }) }),
|
|
6621
|
-
/* @__PURE__ */
|
|
6656
|
+
/* @__PURE__ */ jsxs30(Dialog4.Footer, { children: [
|
|
6622
6657
|
/* @__PURE__ */ jsx42(Dialog4.ActionTrigger, { asChild: true, children: /* @__PURE__ */ jsx42(Button, { variant: "secondary", children: labels.cancel }) }),
|
|
6623
6658
|
!hideSubmit && /* @__PURE__ */ jsx42(Button, { type: "submit", variant: "primary", loading: busy, disabled: submitDisabled, children: submitLabel })
|
|
6624
6659
|
] }),
|
|
@@ -6631,7 +6666,7 @@ function FormDialog({ open, onOpenChange, title, description, submitLabel, onSub
|
|
|
6631
6666
|
|
|
6632
6667
|
// src/settings/SettingsLayout.tsx
|
|
6633
6668
|
import { useState as useState19 } from "react";
|
|
6634
|
-
import { Text as
|
|
6669
|
+
import { Text as Text11 } from "@chakra-ui/react";
|
|
6635
6670
|
|
|
6636
6671
|
// src/components/SearchInput.tsx
|
|
6637
6672
|
import { forwardRef as forwardRef7 } from "react";
|
|
@@ -6677,7 +6712,7 @@ function SettingsLayout({ area, pathname, sidebarId = "settings", labels, topNav
|
|
|
6677
6712
|
top: /* @__PURE__ */ jsx44(SearchInput, { size: "sm", value: find, onChange: (e) => setFind(e.target.value), placeholder: labels.find, "aria-label": labels.find }),
|
|
6678
6713
|
sections
|
|
6679
6714
|
},
|
|
6680
|
-
navFooter: !found ? /* @__PURE__ */ jsx44(
|
|
6715
|
+
navFooter: !found ? /* @__PURE__ */ jsx44(Text11, { textStyle: "caption", color: "fg.muted", px: "2", children: labels.noSetting }) : void 0,
|
|
6681
6716
|
children
|
|
6682
6717
|
}
|
|
6683
6718
|
);
|
|
@@ -6685,7 +6720,7 @@ function SettingsLayout({ area, pathname, sidebarId = "settings", labels, topNav
|
|
|
6685
6720
|
|
|
6686
6721
|
// src/components/SegmentedControl.tsx
|
|
6687
6722
|
import { SegmentGroup } from "@chakra-ui/react";
|
|
6688
|
-
import { jsx as jsx45, jsxs as
|
|
6723
|
+
import { jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6689
6724
|
function SegmentedControl({
|
|
6690
6725
|
"aria-label": ariaLabel,
|
|
6691
6726
|
items,
|
|
@@ -6697,7 +6732,7 @@ function SegmentedControl({
|
|
|
6697
6732
|
}) {
|
|
6698
6733
|
const loading = useLoading(own);
|
|
6699
6734
|
const h = size === "sm" ? "7" : "8";
|
|
6700
|
-
return /* @__PURE__ */
|
|
6735
|
+
return /* @__PURE__ */ jsxs31(
|
|
6701
6736
|
SegmentGroup.Root,
|
|
6702
6737
|
{
|
|
6703
6738
|
size: size === "sm" ? "sm" : "md",
|
|
@@ -6715,7 +6750,7 @@ function SegmentedControl({
|
|
|
6715
6750
|
"data-segmented": "",
|
|
6716
6751
|
children: [
|
|
6717
6752
|
/* @__PURE__ */ jsx45(SegmentGroup.Indicator, {}),
|
|
6718
|
-
items.map((item) => /* @__PURE__ */
|
|
6753
|
+
items.map((item) => /* @__PURE__ */ jsxs31(
|
|
6719
6754
|
SegmentGroup.Item,
|
|
6720
6755
|
{
|
|
6721
6756
|
value: item.value,
|
|
@@ -6750,7 +6785,7 @@ function SegmentedControl({
|
|
|
6750
6785
|
|
|
6751
6786
|
// src/components/KanbanBoard.tsx
|
|
6752
6787
|
import { useEffect as useEffect13, useLayoutEffect as useLayoutEffect3, useMemo as useMemo10, useRef as useRef17, useState as useState20 } from "react";
|
|
6753
|
-
import { Box as Box8, chakra as chakra25, HStack as HStack8, Stack as Stack8, Text as
|
|
6788
|
+
import { Box as Box8, chakra as chakra25, HStack as HStack8, Stack as Stack8, Text as Text12 } from "@chakra-ui/react";
|
|
6754
6789
|
import { Check as Check2, ChevronsLeft, ChevronsRight, GripVertical as GripVertical3 } from "lucide-react";
|
|
6755
6790
|
import {
|
|
6756
6791
|
DndContext as DndContext2,
|
|
@@ -6786,12 +6821,12 @@ function between(cell, from, to) {
|
|
|
6786
6821
|
}
|
|
6787
6822
|
|
|
6788
6823
|
// src/components/KanbanBoard.tsx
|
|
6789
|
-
import { Fragment as Fragment14, jsx as jsx46, jsxs as
|
|
6824
|
+
import { Fragment as Fragment14, jsx as jsx46, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6790
6825
|
var SKELETON_CARDS = [3, 2, 4, 1, 2];
|
|
6791
6826
|
function PlaceholderCard({ index }) {
|
|
6792
|
-
return /* @__PURE__ */
|
|
6827
|
+
return /* @__PURE__ */ jsxs32(Box8, { bg: "bg.panel", borderWidth: "1px", borderColor: "border", rounded: "l2", p: "2.5", children: [
|
|
6793
6828
|
/* @__PURE__ */ jsx46(Box8, { mb: "1", children: /* @__PURE__ */ jsx46(RecordKey, { loading: true }) }),
|
|
6794
|
-
/* @__PURE__ */ jsx46(
|
|
6829
|
+
/* @__PURE__ */ jsx46(Text12, { textStyle: "body.sm", children: /* @__PURE__ */ jsx46(TextBone, { width: boneWidth(index, 14, 34) }) }),
|
|
6795
6830
|
/* @__PURE__ */ jsx46(HStack8, { mt: "2", children: /* @__PURE__ */ jsx46(StatusPill, { loading: true, skeletonWidth: boneWidth(index, 5, 9) }) })
|
|
6796
6831
|
] });
|
|
6797
6832
|
}
|
|
@@ -6950,7 +6985,7 @@ function KanbanBoard({
|
|
|
6950
6985
|
document.addEventListener("keydown", key);
|
|
6951
6986
|
return () => document.removeEventListener("keydown", key);
|
|
6952
6987
|
}, [onSelect, selected, active]);
|
|
6953
|
-
return /* @__PURE__ */
|
|
6988
|
+
return /* @__PURE__ */ jsxs32(
|
|
6954
6989
|
DndContext2,
|
|
6955
6990
|
{
|
|
6956
6991
|
sensors,
|
|
@@ -6976,7 +7011,7 @@ function KanbanBoard({
|
|
|
6976
7011
|
if (Date.now() - draggedAt.current < 300) return;
|
|
6977
7012
|
if (e.target instanceof Element && !e.target.closest("[data-card], a, button, input, select, textarea")) clear();
|
|
6978
7013
|
},
|
|
6979
|
-
children: /* @__PURE__ */ jsx46(Loading, { when: loading, children: /* @__PURE__ */
|
|
7014
|
+
children: /* @__PURE__ */ jsx46(Loading, { when: loading, children: /* @__PURE__ */ jsxs32(
|
|
6980
7015
|
Box8,
|
|
6981
7016
|
{
|
|
6982
7017
|
display: "grid",
|
|
@@ -6987,7 +7022,7 @@ function KanbanBoard({
|
|
|
6987
7022
|
shownColumns.map((c2) => {
|
|
6988
7023
|
const isFolded = folded.has(c2.id);
|
|
6989
7024
|
const name = c2.name ?? (typeof c2.title === "string" ? c2.title : c2.id);
|
|
6990
|
-
return /* @__PURE__ */
|
|
7025
|
+
return /* @__PURE__ */ jsxs32(
|
|
6991
7026
|
Box8,
|
|
6992
7027
|
{
|
|
6993
7028
|
position: "sticky",
|
|
@@ -7029,7 +7064,7 @@ function KanbanBoard({
|
|
|
7029
7064
|
roundedTop: "l3",
|
|
7030
7065
|
bg: "bg.panel",
|
|
7031
7066
|
"data-drop-column": "",
|
|
7032
|
-
children: /* @__PURE__ */ jsx46(
|
|
7067
|
+
children: /* @__PURE__ */ jsx46(Text12, { textStyle: "caption", fontWeight: "bold", color: "fg.accent", truncate: true, children: dropColumnLabel(movingName) })
|
|
7033
7068
|
}
|
|
7034
7069
|
),
|
|
7035
7070
|
isFolded ? /* @__PURE__ */ jsx46(
|
|
@@ -7047,7 +7082,7 @@ function KanbanBoard({
|
|
|
7047
7082
|
h: "full",
|
|
7048
7083
|
children: /* @__PURE__ */ jsx46(FoldButton, { folded: true, label: foldLabel(name, true), onClick: () => fold(c2.id) })
|
|
7049
7084
|
}
|
|
7050
|
-
) : /* @__PURE__ */
|
|
7085
|
+
) : /* @__PURE__ */ jsxs32(
|
|
7051
7086
|
HStack8,
|
|
7052
7087
|
{
|
|
7053
7088
|
justify: "space-between",
|
|
@@ -7064,7 +7099,7 @@ function KanbanBoard({
|
|
|
7064
7099
|
h: "full",
|
|
7065
7100
|
align: "start",
|
|
7066
7101
|
children: [
|
|
7067
|
-
/* @__PURE__ */
|
|
7102
|
+
/* @__PURE__ */ jsxs32(HStack8, { gap: "2", minW: "0", children: [
|
|
7068
7103
|
onReorderColumns && !loading && /* @__PURE__ */ jsx46(
|
|
7069
7104
|
ColumnGrip,
|
|
7070
7105
|
{
|
|
@@ -7078,9 +7113,9 @@ function KanbanBoard({
|
|
|
7078
7113
|
onStep: (by) => reorder(c2.id, columns.findIndex((x) => x.id === c2.id) + by)
|
|
7079
7114
|
}
|
|
7080
7115
|
),
|
|
7081
|
-
/* @__PURE__ */ jsx46(
|
|
7116
|
+
/* @__PURE__ */ jsx46(Text12, { as: "span", textStyle: "label", truncate: true, display: "inline-flex", minW: "0", children: c2.title }),
|
|
7082
7117
|
c2.count != null && /* @__PURE__ */ jsx46(CountBadge, { value: c2.count }),
|
|
7083
|
-
c2.meta && /* @__PURE__ */ jsx46(
|
|
7118
|
+
c2.meta && /* @__PURE__ */ jsx46(Text12, { textStyle: "caption", color: c2.over ? "fg.error" : "fg.muted", flexShrink: 0, children: c2.meta })
|
|
7084
7119
|
] }),
|
|
7085
7120
|
!loading && /* @__PURE__ */ jsx46(FoldButton, { folded: false, label: foldLabel(name, false), onClick: () => fold(c2.id) })
|
|
7086
7121
|
]
|
|
@@ -7097,13 +7132,13 @@ function KanbanBoard({
|
|
|
7097
7132
|
const allowed = active ? canDrop?.(active, c2.id, lane.id) !== false : true;
|
|
7098
7133
|
const last = lane.id === rows[rows.length - 1].id;
|
|
7099
7134
|
if (folded.has(c2.id)) {
|
|
7100
|
-
return /* @__PURE__ */
|
|
7135
|
+
return /* @__PURE__ */ jsxs32(Cell, { id, allowed, dragging: !!active, items: [], column: c2.id, lane: lane.id, folded: true, last, children: [
|
|
7101
7136
|
lane.id === rows[0].id && c2.count != null && /* @__PURE__ */ jsx46(Box8, { alignSelf: "center", children: /* @__PURE__ */ jsx46(CountBadge, { value: c2.count }) }),
|
|
7102
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 })
|
|
7103
7138
|
] }, id);
|
|
7104
7139
|
}
|
|
7105
7140
|
const footer = last && !loading ? columnFooter?.(c2.id) : null;
|
|
7106
|
-
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: [
|
|
7107
7142
|
list.map((item) => /* @__PURE__ */ jsx46(
|
|
7108
7143
|
SortableCard,
|
|
7109
7144
|
{
|
|
@@ -7132,10 +7167,10 @@ function KanbanBoard({
|
|
|
7132
7167
|
);
|
|
7133
7168
|
}
|
|
7134
7169
|
function LaneRow({ lane, showTitle, span, children }) {
|
|
7135
|
-
return /* @__PURE__ */
|
|
7136
|
-
showTitle && /* @__PURE__ */
|
|
7137
|
-
/* @__PURE__ */ jsx46(
|
|
7138
|
-
lane.meta && /* @__PURE__ */ jsx46(
|
|
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: [
|
|
7172
|
+
/* @__PURE__ */ jsx46(Text12, { textStyle: "label", children: lane.title }),
|
|
7173
|
+
lane.meta && /* @__PURE__ */ jsx46(Text12, { textStyle: "caption", color: "fg.muted", children: lane.meta })
|
|
7139
7174
|
] }),
|
|
7140
7175
|
children
|
|
7141
7176
|
] });
|
|
@@ -7171,7 +7206,7 @@ function SortableCard({
|
|
|
7171
7206
|
children
|
|
7172
7207
|
}) {
|
|
7173
7208
|
const { attributes, listeners: listeners2, setNodeRef, transform, transition, isDragging } = useSortable({ id, animateLayoutChanges: () => false });
|
|
7174
|
-
return /* @__PURE__ */
|
|
7209
|
+
return /* @__PURE__ */ jsxs32(
|
|
7175
7210
|
Box8,
|
|
7176
7211
|
{
|
|
7177
7212
|
ref: setNodeRef,
|
|
@@ -7219,7 +7254,7 @@ function Lifted({ carried, count, reduce, children }) {
|
|
|
7219
7254
|
held.current?.animate?.([{ transform: "none", boxShadow: tv("shadows.sm") }, { transform: HELD, boxShadow: tv("shadows.xl") }], { duration: 160, easing: OUT2 });
|
|
7220
7255
|
}, []);
|
|
7221
7256
|
const layers = Math.min(2, Math.max(0, carried - 1));
|
|
7222
|
-
return /* @__PURE__ */
|
|
7257
|
+
return /* @__PURE__ */ jsxs32(Box8, { position: "relative", cursor: "grabbing", "data-testid": "drag-preview", children: [
|
|
7223
7258
|
Array.from({ length: layers }, (_, i) => /* @__PURE__ */ jsx46(
|
|
7224
7259
|
Box8,
|
|
7225
7260
|
{
|
|
@@ -7386,10 +7421,10 @@ function ColumnGrip({ label, moving, onDragStart, onDragEnd, onStep }) {
|
|
|
7386
7421
|
|
|
7387
7422
|
// src/components/LoadingState.tsx
|
|
7388
7423
|
import { Box as Box9, VisuallyHidden as VisuallyHidden2 } from "@chakra-ui/react";
|
|
7389
|
-
import { jsx as jsx47, jsxs as
|
|
7424
|
+
import { jsx as jsx47, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
7390
7425
|
function LoadingState({ lines = 3, label }) {
|
|
7391
7426
|
const labels = useAbpLabels();
|
|
7392
|
-
return /* @__PURE__ */
|
|
7427
|
+
return /* @__PURE__ */ jsxs33(Box9, { "aria-busy": "true", role: "status", children: [
|
|
7393
7428
|
/* @__PURE__ */ jsx47(VisuallyHidden2, { children: label ?? labels.loading }),
|
|
7394
7429
|
/* @__PURE__ */ jsx47(TextBone, { lines, width: "full" })
|
|
7395
7430
|
] });
|
|
@@ -7399,7 +7434,7 @@ function LoadingState({ lines = 3, label }) {
|
|
|
7399
7434
|
import { Fragment as Fragment15 } from "react";
|
|
7400
7435
|
import { Breadcrumb, chakra as chakra26, Menu as Menu2, Portal as Portal12, useSlotRecipe as useSlotRecipe4 } from "@chakra-ui/react";
|
|
7401
7436
|
import { ChevronRight as ChevronRight3 } from "lucide-react";
|
|
7402
|
-
import { jsx as jsx48, jsxs as
|
|
7437
|
+
import { jsx as jsx48, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
7403
7438
|
var textOf = (label) => typeof label === "string" || typeof label === "number" ? String(label) : void 0;
|
|
7404
7439
|
function PageHeader({ title, description, breadcrumbs, meta, count, adornments, actions, loading: own, titleWidth = 24, documentTitle }) {
|
|
7405
7440
|
const recipe = useSlotRecipe4({ key: "abpPageHeader" });
|
|
@@ -7408,11 +7443,11 @@ function PageHeader({ title, description, breadcrumbs, meta, count, adornments,
|
|
|
7408
7443
|
usePageTitle(documentTitle !== void 0 ? documentTitle : text ? [text, where] : null);
|
|
7409
7444
|
const styles = recipe({});
|
|
7410
7445
|
const loading = useLoading(own);
|
|
7411
|
-
return /* @__PURE__ */
|
|
7446
|
+
return /* @__PURE__ */ jsxs34(chakra26.div, { css: styles.root, children: [
|
|
7412
7447
|
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx48(Breadcrumbs, { items: breadcrumbs }),
|
|
7413
|
-
/* @__PURE__ */
|
|
7414
|
-
/* @__PURE__ */
|
|
7415
|
-
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: [
|
|
7416
7451
|
/* @__PURE__ */ jsx48(chakra26.h1, { css: styles.title, children: loading && title == null ? /* @__PURE__ */ jsx48(TextBone, { width: titleWidth }) : title }),
|
|
7417
7452
|
count != null && /* @__PURE__ */ jsx48(CountBadge, { value: count, size: "md" }),
|
|
7418
7453
|
adornments
|
|
@@ -7430,9 +7465,9 @@ function Breadcrumbs({ items, loading: own }) {
|
|
|
7430
7465
|
const label = (item, i) => loading && item.label == null ? /* @__PURE__ */ jsx48(TextBone, { width: 8 + i % 3 * 3 }) : item.label;
|
|
7431
7466
|
const Link = useLinkComponent();
|
|
7432
7467
|
const { shown, hidden } = foldBreadcrumbs(items);
|
|
7433
|
-
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: [
|
|
7434
7469
|
n > 0 && /* @__PURE__ */ jsx48(Breadcrumb.Separator, { children: /* @__PURE__ */ jsx48(ChevronRight3, {}) }),
|
|
7435
|
-
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: [
|
|
7436
7471
|
/* @__PURE__ */ jsx48(Menu2.Trigger, { asChild: true, children: /* @__PURE__ */ jsx48(
|
|
7437
7472
|
chakra26.button,
|
|
7438
7473
|
{
|
|
@@ -7456,7 +7491,7 @@ function Breadcrumbs({ items, loading: own }) {
|
|
|
7456
7491
|
// src/components/Panel.tsx
|
|
7457
7492
|
import { createContext as createContext11, forwardRef as forwardRef8, useContext as useContext11 } from "react";
|
|
7458
7493
|
import { chakra as chakra27, useSlotRecipe as useSlotRecipe5 } from "@chakra-ui/react";
|
|
7459
|
-
import { jsx as jsx49, jsxs as
|
|
7494
|
+
import { jsx as jsx49, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
7460
7495
|
var ToneContext = createContext11("card");
|
|
7461
7496
|
function PanelTone({ tone, children }) {
|
|
7462
7497
|
return /* @__PURE__ */ jsx49(ToneContext.Provider, { value: tone, children });
|
|
@@ -7466,9 +7501,9 @@ var Panel = forwardRef8(function Panel2({ title, description, actions, footer, f
|
|
|
7466
7501
|
const inherited = useContext11(ToneContext);
|
|
7467
7502
|
const styles = recipe({ flush, tone: tone ?? inherited });
|
|
7468
7503
|
const hasHeader = title != null || actions != null || description != null;
|
|
7469
|
-
return /* @__PURE__ */
|
|
7470
|
-
hasHeader && /* @__PURE__ */
|
|
7471
|
-
/* @__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: [
|
|
7472
7507
|
title != null && /* @__PURE__ */ jsx49(chakra27.h2, { as: headingAs, css: styles.title, children: title }),
|
|
7473
7508
|
description != null && /* @__PURE__ */ jsx49(chakra27.p, { css: styles.description, children: description })
|
|
7474
7509
|
] }),
|
|
@@ -7482,14 +7517,14 @@ var Panel = forwardRef8(function Panel2({ title, description, actions, footer, f
|
|
|
7482
7517
|
// src/components/PathChips.tsx
|
|
7483
7518
|
import { chakra as chakra28, useSlotRecipe as useSlotRecipe6 } from "@chakra-ui/react";
|
|
7484
7519
|
import { ChevronRight as ChevronRight4 } from "lucide-react";
|
|
7485
|
-
import { jsx as jsx50, jsxs as
|
|
7520
|
+
import { jsx as jsx50, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
7486
7521
|
function PathChips({ path, highlightLast = true, loading: own, skeletonCount = 3, css, ...rest }) {
|
|
7487
7522
|
const labels = useAbpLabels();
|
|
7488
7523
|
const recipe = useSlotRecipe6({ key: "abpPathChips" });
|
|
7489
7524
|
const styles = recipe({});
|
|
7490
7525
|
const loading = useLoading(own) && path.length === 0;
|
|
7491
7526
|
const segments = loading ? Array.from({ length: skeletonCount }, (_, i) => "\xA0".repeat(boneWidth(i, 6, 12))) : path;
|
|
7492
|
-
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: [
|
|
7493
7528
|
i > 0 && /* @__PURE__ */ jsx50(chakra28.span, { css: styles.separator, "aria-hidden": "true", children: /* @__PURE__ */ jsx50(ChevronRight4, {}) }),
|
|
7494
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 })
|
|
7495
7530
|
] }, `${i}:${segment}`)) });
|
|
@@ -7497,11 +7532,11 @@ function PathChips({ path, highlightLast = true, loading: own, skeletonCount = 3
|
|
|
7497
7532
|
|
|
7498
7533
|
// src/components/PropertyList.tsx
|
|
7499
7534
|
import { chakra as chakra29, DataList } from "@chakra-ui/react";
|
|
7500
|
-
import { jsx as jsx51, jsxs as
|
|
7535
|
+
import { jsx as jsx51, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
7501
7536
|
function PropertyList({ items, size = "md", loading: own }) {
|
|
7502
7537
|
const loading = useLoading(own);
|
|
7503
7538
|
const arriving = useArriving(loading);
|
|
7504
|
-
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: [
|
|
7505
7540
|
/* @__PURE__ */ jsx51(DataList.ItemLabel, { children: item.label }),
|
|
7506
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 })
|
|
7507
7542
|
] }, item.id ?? i)) });
|
|
@@ -7510,12 +7545,12 @@ function PropertyList({ items, size = "md", loading: own }) {
|
|
|
7510
7545
|
// src/components/QueryableList.tsx
|
|
7511
7546
|
import { useEffect as useEffect15, useId as useId5, useMemo as useMemo12, useRef as useRef19, useState as useState22 } from "react";
|
|
7512
7547
|
import { createPortal } from "react-dom";
|
|
7513
|
-
import { Box as Box10, chakra as chakra31, HStack as HStack11, Input as Input6, Menu as Menu3, Portal as Portal15, Stack as Stack11, Text as
|
|
7514
|
-
import { ArrowDownWideNarrow, ArrowUpNarrowWide, ChevronDown as ChevronDown3, Download, Filter,
|
|
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";
|
|
7549
|
+
import { ArrowDownWideNarrow, ArrowUpNarrowWide, ChevronDown as ChevronDown3, Download, Filter, Rows3, Save, Trash2 as Trash22, X as X2 } from "lucide-react";
|
|
7515
7550
|
|
|
7516
7551
|
// src/components/query/ColumnsPopover.tsx
|
|
7517
7552
|
import { useMemo as useMemo11 } from "react";
|
|
7518
|
-
import { chakra as chakra30, HStack as HStack9, Popover as Popover3, Portal as Portal13, Stack as Stack9, Switch as Switch2, Text as
|
|
7553
|
+
import { chakra as chakra30, HStack as HStack9, Popover as Popover3, Portal as Portal13, Stack as Stack9, Switch as Switch2, Text as Text13 } from "@chakra-ui/react";
|
|
7519
7554
|
import {
|
|
7520
7555
|
closestCenter,
|
|
7521
7556
|
DndContext as DndContext3,
|
|
@@ -7527,7 +7562,7 @@ import {
|
|
|
7527
7562
|
import { arrayMove, SortableContext as SortableContext2, sortableKeyboardCoordinates as sortableKeyboardCoordinates2, useSortable as useSortable2, verticalListSortingStrategy as verticalListSortingStrategy2 } from "@dnd-kit/sortable";
|
|
7528
7563
|
import { CSS as CSS3 } from "@dnd-kit/utilities";
|
|
7529
7564
|
import { Columns3, GripVertical as GripVertical4 } from "lucide-react";
|
|
7530
|
-
import { jsx as jsx52, jsxs as
|
|
7565
|
+
import { jsx as jsx52, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
7531
7566
|
function fill(template, values) {
|
|
7532
7567
|
return template.replace(/\{(\w+)\}/g, (_, k) => values[k] ?? `{${k}}`);
|
|
7533
7568
|
}
|
|
@@ -7544,18 +7579,18 @@ function ColumnsPopover({ fields, columns, onChange }) {
|
|
|
7544
7579
|
if (from < 0 || to < 0) return;
|
|
7545
7580
|
onChange(arrayMove(columns, from, to));
|
|
7546
7581
|
}
|
|
7547
|
-
return /* @__PURE__ */
|
|
7548
|
-
/* @__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: [
|
|
7549
7584
|
/* @__PURE__ */ jsx52(Columns3, {}),
|
|
7550
7585
|
labels.columns
|
|
7551
7586
|
] }) }),
|
|
7552
|
-
/* @__PURE__ */ jsx52(Portal13, { children: /* @__PURE__ */ jsx52(Popover3.Positioner, { children: /* @__PURE__ */ jsx52(Popover3.Content, { w: "80", maxW: "calc(100vw - 2rem)", children: /* @__PURE__ */
|
|
7553
|
-
/* @__PURE__ */
|
|
7554
|
-
/* @__PURE__ */ jsx52(
|
|
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: [
|
|
7589
|
+
/* @__PURE__ */ jsx52(Text13, { textStyle: "sm", fontWeight: "semibold", children: labels.visibleColumns }),
|
|
7555
7590
|
/* @__PURE__ */ jsx52(Button, { size: "xs", variant: "ghost", disabled: hidden.length === 0, onClick: () => onChange([...columns, ...hidden.map((f) => f.id)]), children: labels.showAllColumns })
|
|
7556
7591
|
] }),
|
|
7557
|
-
/* @__PURE__ */ jsx52(
|
|
7558
|
-
/* @__PURE__ */
|
|
7592
|
+
/* @__PURE__ */ jsx52(Text13, { textStyle: "caption", color: "fg.muted", px: "3.5", pb: "2", children: labels.columnsHint }),
|
|
7593
|
+
/* @__PURE__ */ jsxs38(chakra30.div, { maxH: "80", overflowY: "auto", pb: "2", children: [
|
|
7559
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(
|
|
7560
7595
|
ColumnRow,
|
|
7561
7596
|
{
|
|
@@ -7576,7 +7611,7 @@ function ColumnRow({ id, label, checked, disabled, onCheckedChange }) {
|
|
|
7576
7611
|
const labels = useAbpLabels().queryList;
|
|
7577
7612
|
const sortable = useSortable2({ id, disabled: !checked });
|
|
7578
7613
|
const { attributes, listeners: listeners2, setNodeRef, transform, transition, isDragging } = sortable;
|
|
7579
|
-
return /* @__PURE__ */
|
|
7614
|
+
return /* @__PURE__ */ jsxs38(
|
|
7580
7615
|
HStack9,
|
|
7581
7616
|
{
|
|
7582
7617
|
ref: setNodeRef,
|
|
@@ -7609,8 +7644,8 @@ function ColumnRow({ id, label, checked, disabled, onCheckedChange }) {
|
|
|
7609
7644
|
children: /* @__PURE__ */ jsx52(GripVertical4, { size: 16 })
|
|
7610
7645
|
}
|
|
7611
7646
|
) : /* @__PURE__ */ jsx52(chakra30.span, { w: "4", flexShrink: 0 }),
|
|
7612
|
-
/* @__PURE__ */ jsx52(
|
|
7613
|
-
/* @__PURE__ */
|
|
7647
|
+
/* @__PURE__ */ jsx52(Text13, { as: "span", flex: "1", textStyle: "sm", truncate: true, color: checked ? "fg" : "fg.muted", children: label }),
|
|
7648
|
+
/* @__PURE__ */ jsxs38(Switch2.Root, { size: "sm", colorPalette: "accent", checked, disabled, onCheckedChange, "aria-label": label, children: [
|
|
7614
7649
|
/* @__PURE__ */ jsx52(Switch2.HiddenInput, {}),
|
|
7615
7650
|
/* @__PURE__ */ jsx52(Switch2.Control, { children: /* @__PURE__ */ jsx52(Switch2.Thumb, {}) })
|
|
7616
7651
|
] })
|
|
@@ -7621,9 +7656,9 @@ function ColumnRow({ id, label, checked, disabled, onCheckedChange }) {
|
|
|
7621
7656
|
|
|
7622
7657
|
// src/components/query/FilterBuilder.tsx
|
|
7623
7658
|
import { useEffect as useEffect14, useId as useId4, useRef as useRef18, useState as useState21 } from "react";
|
|
7624
|
-
import { CloseButton as CloseButton3, Dialog as Dialog5, HStack as HStack10, Input as Input5, Portal as Portal14, Stack as Stack10, Text as
|
|
7625
|
-
import {
|
|
7626
|
-
import { Fragment as Fragment16, jsx as jsx53, jsxs as
|
|
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";
|
|
7660
|
+
import { Trash2 } from "lucide-react";
|
|
7661
|
+
import { Fragment as Fragment16, jsx as jsx53, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
7627
7662
|
function fill2(template, values) {
|
|
7628
7663
|
return template.replace(/\{(\w+)\}/g, (_, k) => String(values[k] ?? `{${k}}`));
|
|
7629
7664
|
}
|
|
@@ -7679,22 +7714,22 @@ function FilterBuilderDialog({ fields, initial, suggest, renderValueEditor, coun
|
|
|
7679
7714
|
setSeq((n) => n + 1);
|
|
7680
7715
|
};
|
|
7681
7716
|
const change = (id, patch) => setRows((r) => r.map((d) => d.id === id ? { ...d, ...patch, dirty: true } : d));
|
|
7682
|
-
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: [
|
|
7683
7718
|
/* @__PURE__ */ jsx53(Dialog5.Backdrop, {}),
|
|
7684
|
-
/* @__PURE__ */ jsx53(Dialog5.Positioner, { children: /* @__PURE__ */
|
|
7685
|
-
/* @__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: [
|
|
7686
7721
|
/* @__PURE__ */ jsx53(Dialog5.Title, { children: labels.buildFilters }),
|
|
7687
7722
|
/* @__PURE__ */ jsx53(Button, { size: "xs", variant: "ghost", onClick: () => setRows([]), disabled: rows.length === 0, children: labels.clearAll })
|
|
7688
7723
|
] }) }),
|
|
7689
|
-
/* @__PURE__ */ jsx53(Dialog5.Body, { children: /* @__PURE__ */
|
|
7690
|
-
/* @__PURE__ */
|
|
7724
|
+
/* @__PURE__ */ jsx53(Dialog5.Body, { children: /* @__PURE__ */ jsxs39(Stack10, { gap: "3", children: [
|
|
7725
|
+
/* @__PURE__ */ jsxs39(Text14, { textStyle: "sm", color: "fg.muted", children: [
|
|
7691
7726
|
labels.matchAll,
|
|
7692
|
-
repeats && /* @__PURE__ */
|
|
7727
|
+
repeats && /* @__PURE__ */ jsxs39(Fragment16, { children: [
|
|
7693
7728
|
" ",
|
|
7694
7729
|
labels.sameFieldAny
|
|
7695
7730
|
] })
|
|
7696
7731
|
] }),
|
|
7697
|
-
rows.length === 0 && /* @__PURE__ */ jsx53(
|
|
7732
|
+
rows.length === 0 && /* @__PURE__ */ jsx53(Text14, { textStyle: "sm", color: "fg.muted", py: "2", children: labels.noConditions }),
|
|
7698
7733
|
rows.map((d) => /* @__PURE__ */ jsx53(
|
|
7699
7734
|
ConditionRow,
|
|
7700
7735
|
{
|
|
@@ -7708,24 +7743,21 @@ function FilterBuilderDialog({ fields, initial, suggest, renderValueEditor, coun
|
|
|
7708
7743
|
},
|
|
7709
7744
|
d.id
|
|
7710
7745
|
)),
|
|
7711
|
-
/* @__PURE__ */ jsx53(HStack10, { children: /* @__PURE__ */
|
|
7712
|
-
|
|
7713
|
-
labels.
|
|
7714
|
-
|
|
7715
|
-
/* @__PURE__ */ jsxs38(Stack10, { gap: "1", borderTopWidth: "1px", borderColor: "border.muted", pt: "3", children: [
|
|
7716
|
-
/* @__PURE__ */ jsx53(Text13, { textStyle: "xs", fontWeight: "bold", color: "fg.muted", children: labels.activeFilters }),
|
|
7717
|
-
/* @__PURE__ */ jsx53(Text13, { textStyle: "sm", "data-active-filters": "", children: complete.length === 0 ? labels.noneActive : complete.map((c2) => describe(c2, fields, labels)).join(" \xB7 ") })
|
|
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: [
|
|
7748
|
+
/* @__PURE__ */ jsx53(Text14, { textStyle: "xs", fontWeight: "bold", color: "fg.muted", children: labels.activeFilters }),
|
|
7749
|
+
/* @__PURE__ */ jsx53(Text14, { textStyle: "sm", "data-active-filters": "", children: complete.length === 0 ? labels.noneActive : complete.map((c2) => describe(c2, fields, labels)).join(" \xB7 ") })
|
|
7718
7750
|
] })
|
|
7719
7751
|
] }) }),
|
|
7720
|
-
/* @__PURE__ */ jsx53(Dialog5.Footer, { children: /* @__PURE__ */
|
|
7721
|
-
/* @__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: [
|
|
7722
7754
|
count != null && fill2(total != null ? labels.matchCount : labels.matchCountOnly, { count, total: total ?? "" }),
|
|
7723
|
-
incomplete > 0 && /* @__PURE__ */
|
|
7755
|
+
incomplete > 0 && /* @__PURE__ */ jsxs39(Fragment16, { children: [
|
|
7724
7756
|
" \xB7 ",
|
|
7725
7757
|
labels.incompleteSkipped
|
|
7726
7758
|
] })
|
|
7727
7759
|
] }),
|
|
7728
|
-
/* @__PURE__ */
|
|
7760
|
+
/* @__PURE__ */ jsxs39(HStack10, { gap: "2", children: [
|
|
7729
7761
|
/* @__PURE__ */ jsx53(Button, { size: "sm", variant: "ghost", onClick: onClose, children: labels.cancel }),
|
|
7730
7762
|
/* @__PURE__ */ jsx53(Button, { size: "sm", variant: "primary", onClick: () => {
|
|
7731
7763
|
setTouched(true);
|
|
@@ -7762,8 +7794,8 @@ function ConditionRow({ draft, fields, suggest, renderValueEditor, warn, onChang
|
|
|
7762
7794
|
clearTimeout(timer);
|
|
7763
7795
|
};
|
|
7764
7796
|
}, [suggest, field, op, text, own]);
|
|
7765
|
-
return /* @__PURE__ */
|
|
7766
|
-
/* @__PURE__ */
|
|
7797
|
+
return /* @__PURE__ */ jsxs39(Stack10, { gap: "1", "data-condition": "", children: [
|
|
7798
|
+
/* @__PURE__ */ jsxs39(HStack10, { gap: "1.5", wrap: "wrap", align: "start", children: [
|
|
7767
7799
|
/* @__PURE__ */ jsx53(
|
|
7768
7800
|
SelectField,
|
|
7769
7801
|
{
|
|
@@ -7790,7 +7822,7 @@ function ConditionRow({ draft, fields, suggest, renderValueEditor, warn, onChang
|
|
|
7790
7822
|
}
|
|
7791
7823
|
),
|
|
7792
7824
|
own,
|
|
7793
|
-
!NO_VALUE_OPS.has(op) && own == null && /* @__PURE__ */
|
|
7825
|
+
!NO_VALUE_OPS.has(op) && own == null && /* @__PURE__ */ jsxs39(Fragment16, { children: [
|
|
7794
7826
|
/* @__PURE__ */ jsx53(
|
|
7795
7827
|
Input5,
|
|
7796
7828
|
{
|
|
@@ -7807,14 +7839,14 @@ function ConditionRow({ draft, fields, suggest, renderValueEditor, warn, onChang
|
|
|
7807
7839
|
),
|
|
7808
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)) })
|
|
7809
7841
|
] }),
|
|
7810
|
-
/* @__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, {}) })
|
|
7811
7843
|
] }),
|
|
7812
|
-
warn && /* @__PURE__ */ jsx53(
|
|
7844
|
+
warn && /* @__PURE__ */ jsx53(Text14, { textStyle: "xs", color: "fg.error", children: labels.incomplete })
|
|
7813
7845
|
] });
|
|
7814
7846
|
}
|
|
7815
7847
|
|
|
7816
7848
|
// src/components/QueryableList.tsx
|
|
7817
|
-
import { Fragment as Fragment17, jsx as jsx54, jsxs as
|
|
7849
|
+
import { Fragment as Fragment17, jsx as jsx54, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
7818
7850
|
var PAIR = "";
|
|
7819
7851
|
var pairKey = (first, second) => `${first}${PAIR}${second}`;
|
|
7820
7852
|
var condition = (field, value) => value == null ? { field, op: "isEmpty" } : { field, op: "eq", value };
|
|
@@ -7850,6 +7882,7 @@ function QueryableList({
|
|
|
7850
7882
|
skip,
|
|
7851
7883
|
take,
|
|
7852
7884
|
onSkipChange,
|
|
7885
|
+
pagination = "simple",
|
|
7853
7886
|
views,
|
|
7854
7887
|
activeViewId,
|
|
7855
7888
|
onSelectView,
|
|
@@ -7957,14 +7990,14 @@ function QueryableList({
|
|
|
7957
7990
|
}
|
|
7958
7991
|
const sortable = (fields ?? []).filter((f) => f.sortable);
|
|
7959
7992
|
const groupLabel = groupField ? thenField ? `${label(groupField)} \xB7 ${label(thenField)}` : label(groupField) : null;
|
|
7960
|
-
return /* @__PURE__ */
|
|
7961
|
-
/* @__PURE__ */
|
|
7962
|
-
/* @__PURE__ */
|
|
7963
|
-
/* @__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: [
|
|
7964
7997
|
leading,
|
|
7965
7998
|
leading != null && views && onSelectView && /* @__PURE__ */ jsx54(chakra31.span, { w: "1px", h: "6", bg: "border", mx: "1", "aria-hidden": true }),
|
|
7966
|
-
views && onSelectView && /* @__PURE__ */
|
|
7967
|
-
/* @__PURE__ */ jsx54(
|
|
7999
|
+
views && onSelectView && /* @__PURE__ */ jsxs40(HStack11, { gap: "2", children: [
|
|
8000
|
+
/* @__PURE__ */ jsx54(Text15, { as: "span", textStyle: "xs", fontWeight: "semibold", color: "fg.muted", whiteSpace: "nowrap", hideBelow: "2xl", children: labels.savedView }),
|
|
7968
8001
|
/* @__PURE__ */ jsx54(
|
|
7969
8002
|
SelectField,
|
|
7970
8003
|
{
|
|
@@ -7977,10 +8010,10 @@ function QueryableList({
|
|
|
7977
8010
|
}
|
|
7978
8011
|
)
|
|
7979
8012
|
] }),
|
|
7980
|
-
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: [
|
|
7981
8014
|
/* @__PURE__ */ jsx54(Save, {}),
|
|
7982
8015
|
labels.saveView
|
|
7983
|
-
] }) : /* @__PURE__ */
|
|
8016
|
+
] }) : /* @__PURE__ */ jsxs40(HStack11, { gap: "1", as: "form", onSubmit: (e) => {
|
|
7984
8017
|
e.preventDefault();
|
|
7985
8018
|
if (naming.trim()) onSaveView(naming.trim(), activeView?.isOwner && naming.trim() === activeView.name ? activeView.id : null);
|
|
7986
8019
|
setNaming(null);
|
|
@@ -7991,46 +8024,46 @@ function QueryableList({
|
|
|
7991
8024
|
] })),
|
|
7992
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, {}) })
|
|
7993
8026
|
] }),
|
|
7994
|
-
/* @__PURE__ */
|
|
7995
|
-
/* @__PURE__ */
|
|
7996
|
-
/* @__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: [
|
|
7997
8030
|
/* @__PURE__ */ jsx54(Rows3, {}),
|
|
7998
|
-
/* @__PURE__ */ jsx54(
|
|
8031
|
+
/* @__PURE__ */ jsx54(Text15, { as: "span", color: "fg.muted", fontWeight: "normal", children: labels.group }),
|
|
7999
8032
|
groupLabel ?? labels.noGrouping,
|
|
8000
8033
|
/* @__PURE__ */ jsx54(ChevronDown3, {})
|
|
8001
8034
|
] }) }),
|
|
8002
|
-
/* @__PURE__ */ jsx54(Portal15, { children: /* @__PURE__ */ jsx54(Menu3.Positioner, { children: /* @__PURE__ */
|
|
8003
|
-
/* @__PURE__ */
|
|
8035
|
+
/* @__PURE__ */ jsx54(Portal15, { children: /* @__PURE__ */ jsx54(Menu3.Positioner, { children: /* @__PURE__ */ jsxs40(Menu3.Content, { minW: "48", children: [
|
|
8036
|
+
/* @__PURE__ */ jsxs40(
|
|
8004
8037
|
Menu3.RadioItemGroup,
|
|
8005
8038
|
{
|
|
8006
8039
|
value: groupField ?? "",
|
|
8007
8040
|
onValueChange: (d) => change({ ...query, groupBy: d.value ? { field: d.value, aggregates: [] } : null }),
|
|
8008
8041
|
children: [
|
|
8009
|
-
/* @__PURE__ */
|
|
8042
|
+
/* @__PURE__ */ jsxs40(Menu3.RadioItem, { value: "", children: [
|
|
8010
8043
|
labels.noGrouping,
|
|
8011
8044
|
/* @__PURE__ */ jsx54(Menu3.ItemIndicator, {})
|
|
8012
8045
|
] }),
|
|
8013
|
-
groupable.map((f) => /* @__PURE__ */
|
|
8046
|
+
groupable.map((f) => /* @__PURE__ */ jsxs40(Menu3.RadioItem, { value: f.id, children: [
|
|
8014
8047
|
f.label,
|
|
8015
8048
|
/* @__PURE__ */ jsx54(Menu3.ItemIndicator, {})
|
|
8016
8049
|
] }, f.id))
|
|
8017
8050
|
]
|
|
8018
8051
|
}
|
|
8019
8052
|
),
|
|
8020
|
-
groupField && groupable.length > 1 && /* @__PURE__ */
|
|
8053
|
+
groupField && groupable.length > 1 && /* @__PURE__ */ jsxs40(Fragment17, { children: [
|
|
8021
8054
|
/* @__PURE__ */ jsx54(Menu3.Separator, {}),
|
|
8022
|
-
/* @__PURE__ */
|
|
8055
|
+
/* @__PURE__ */ jsxs40(
|
|
8023
8056
|
Menu3.RadioItemGroup,
|
|
8024
8057
|
{
|
|
8025
8058
|
value: thenField ?? "",
|
|
8026
8059
|
onValueChange: (d) => change({ ...query, groupBy: { ...query.groupBy, then: d.value ? { field: d.value } : null } }),
|
|
8027
8060
|
children: [
|
|
8028
8061
|
/* @__PURE__ */ jsx54(Menu3.ItemGroupLabel, { children: labels.thenBy }),
|
|
8029
|
-
/* @__PURE__ */
|
|
8062
|
+
/* @__PURE__ */ jsxs40(Menu3.RadioItem, { value: "", children: [
|
|
8030
8063
|
labels.noSecondGrouping,
|
|
8031
8064
|
/* @__PURE__ */ jsx54(Menu3.ItemIndicator, {})
|
|
8032
8065
|
] }),
|
|
8033
|
-
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: [
|
|
8034
8067
|
f.label,
|
|
8035
8068
|
/* @__PURE__ */ jsx54(Menu3.ItemIndicator, {})
|
|
8036
8069
|
] }, f.id))
|
|
@@ -8046,8 +8079,8 @@ function QueryableList({
|
|
|
8046
8079
|
actions
|
|
8047
8080
|
] })
|
|
8048
8081
|
] }),
|
|
8049
|
-
/* @__PURE__ */
|
|
8050
|
-
/* @__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: [
|
|
8051
8084
|
/* @__PURE__ */ jsx54(
|
|
8052
8085
|
SegmentedControl,
|
|
8053
8086
|
{
|
|
@@ -8061,14 +8094,13 @@ function QueryableList({
|
|
|
8061
8094
|
]
|
|
8062
8095
|
}
|
|
8063
8096
|
),
|
|
8064
|
-
mode === "basic" && conditions !== null ? /* @__PURE__ */
|
|
8097
|
+
mode === "basic" && conditions !== null ? /* @__PURE__ */ jsxs40(HStack11, { gap: "2", wrap: "wrap", flex: "1", minW: "0", children: [
|
|
8065
8098
|
search && /* @__PURE__ */ jsx54(QuickSearch, { initial: searchText, placeholder: search.placeholder ?? labels.searchPlaceholder, onRun: runSearch }, searchText),
|
|
8066
|
-
/* @__PURE__ */
|
|
8067
|
-
/* @__PURE__ */ jsx54(Plus3, {}),
|
|
8099
|
+
/* @__PURE__ */ jsxs40(AddButton, { onClick: () => setAdding(true), disabled: !fields, "data-add-filter": "", children: [
|
|
8068
8100
|
labels.addFilter,
|
|
8069
8101
|
chips.length > 0 && /* @__PURE__ */ jsx54(CountBadge, { value: chips.length, tone: "accent" })
|
|
8070
8102
|
] }),
|
|
8071
|
-
sortable.length > 0 && /* @__PURE__ */
|
|
8103
|
+
sortable.length > 0 && /* @__PURE__ */ jsxs40(HStack11, { gap: "1", flexShrink: 0, children: [
|
|
8072
8104
|
/* @__PURE__ */ jsx54(
|
|
8073
8105
|
SelectField,
|
|
8074
8106
|
{
|
|
@@ -8109,8 +8141,8 @@ function QueryableList({
|
|
|
8109
8141
|
] }),
|
|
8110
8142
|
attention != null && /* @__PURE__ */ jsx54(HStack11, { gap: "2", wrap: "wrap", flexShrink: 0, children: attention })
|
|
8111
8143
|
] }),
|
|
8112
|
-
mode === "basic" && conditions !== null && chips.length > 0 && /* @__PURE__ */
|
|
8113
|
-
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(
|
|
8114
8146
|
chakra31.span,
|
|
8115
8147
|
{
|
|
8116
8148
|
display: "inline-flex",
|
|
@@ -8125,9 +8157,9 @@ function QueryableList({
|
|
|
8125
8157
|
bg: "bg.selected",
|
|
8126
8158
|
textStyle: "sm",
|
|
8127
8159
|
children: [
|
|
8128
|
-
/* @__PURE__ */ jsx54(
|
|
8129
|
-
/* @__PURE__ */ jsx54(
|
|
8130
|
-
!NO_VALUE_OPS.has(c2.op) && /* @__PURE__ */ jsx54(
|
|
8160
|
+
/* @__PURE__ */ jsx54(Text15, { as: "span", fontWeight: "medium", children: label(c2.field) }),
|
|
8161
|
+
/* @__PURE__ */ jsx54(Text15, { as: "span", color: "fg.muted", children: opLabel(c2.op, c2.field) }),
|
|
8162
|
+
!NO_VALUE_OPS.has(c2.op) && /* @__PURE__ */ jsx54(Text15, { as: "span", children: valueText(c2.value) }),
|
|
8131
8163
|
/* @__PURE__ */ jsx54(IconButton, { size: "xs", variant: "ghost", "aria-label": fill3(labels.removeFilter, { field: label(c2.field) }), onClick: () => setConditions(conditions.filter((_, j) => j !== i)), children: /* @__PURE__ */ jsx54(X2, {}) })
|
|
8132
8164
|
]
|
|
8133
8165
|
},
|
|
@@ -8153,8 +8185,8 @@ function QueryableList({
|
|
|
8153
8185
|
toolbarFooter != null && /* @__PURE__ */ jsx54(chakra31.div, { borderTopWidth: "1px", borderColor: "border.muted", "data-toolbar-footer": "", children: toolbarFooter })
|
|
8154
8186
|
] }),
|
|
8155
8187
|
mode === "basic" && error && !(loadFailed != null && error.failed && !result) && /* @__PURE__ */ jsx54(InlineAlert, { tone: "danger", children: error.message }),
|
|
8156
|
-
exported && /* @__PURE__ */ jsx54(InlineAlert, { tone: exported.tone, title: exported.tone === "danger" ? labels.exportFailed : void 0, children: /* @__PURE__ */
|
|
8157
|
-
/* @__PURE__ */ jsx54(
|
|
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: [
|
|
8189
|
+
/* @__PURE__ */ jsx54(Text15, { as: "span", children: exported.message }),
|
|
8158
8190
|
/* @__PURE__ */ jsx54(IconButton, { size: "xs", variant: "ghost", "aria-label": labels.dismiss, onClick: () => setExported(null), children: /* @__PURE__ */ jsx54(X2, {}) })
|
|
8159
8191
|
] }) }),
|
|
8160
8192
|
/* @__PURE__ */ jsx54(
|
|
@@ -8162,9 +8194,10 @@ function QueryableList({
|
|
|
8162
8194
|
{
|
|
8163
8195
|
flush: true,
|
|
8164
8196
|
footer: (
|
|
8165
|
-
// Expand and collapse at the start, the pages in the middle (the canvas's v12, UI round 9 step 67
|
|
8166
|
-
|
|
8167
|
-
|
|
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),
|
|
8198
|
+
// the range at the end, or with the arrows in the simple form.
|
|
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: [
|
|
8168
8201
|
/* @__PURE__ */ jsx54(Button, { size: "xs", variant: "ghost", color: "fg.accent", disabled: folded.size === 0, onClick: () => setFolded(/* @__PURE__ */ new Set()), children: labels.expandAll }),
|
|
8169
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 })
|
|
8170
8203
|
] }) }),
|
|
@@ -8178,10 +8211,13 @@ function QueryableList({
|
|
|
8178
8211
|
label: labels.pages,
|
|
8179
8212
|
previous: labels.previous,
|
|
8180
8213
|
next: labels.next,
|
|
8181
|
-
pageLabel: (n) => fill3(labels.page, { page: fmt.number(n) })
|
|
8214
|
+
pageLabel: (n) => fill3(labels.page, { page: fmt.number(n) }),
|
|
8215
|
+
form: pagination,
|
|
8216
|
+
range: result ? fill3(labels.range, { from: fmt.number(from), to: fmt.number(to), total: fmt.number(total) }) : void 0,
|
|
8217
|
+
pageOf: fill3(labels.pageOf, { page: fmt.number(Math.floor(skip / take) + 1), pages: fmt.number(Math.max(1, Math.ceil(total / take))) })
|
|
8182
8218
|
}
|
|
8183
8219
|
),
|
|
8184
|
-
/* @__PURE__ */ jsx54(
|
|
8220
|
+
/* @__PURE__ */ jsx54(Text15, { textStyle: "caption", color: "fg.muted", textAlign: { md: "end" }, fontVariantNumeric: "tabular-nums", "aria-live": "polite", children: result && pagination !== "simple" ? fill3(labels.range, { from: fmt.number(from), to: fmt.number(to), total: fmt.number(total) }) : " " })
|
|
8185
8221
|
] })
|
|
8186
8222
|
),
|
|
8187
8223
|
children: /* @__PURE__ */ jsx54(
|
|
@@ -8230,11 +8266,11 @@ function QueryableList({
|
|
|
8230
8266
|
const label2 = thenField ? info?.then?.label : info?.label;
|
|
8231
8267
|
const value = thenField ? info?.then?.value ?? null : info?.value ?? null;
|
|
8232
8268
|
const period = thenField ? query.groupBy?.then?.period : query.groupBy?.period;
|
|
8233
|
-
return /* @__PURE__ */
|
|
8269
|
+
return /* @__PURE__ */ jsxs40(HStack11, { gap: "2.5", flex: "1", minW: "0", children: [
|
|
8234
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) }),
|
|
8235
8271
|
/* @__PURE__ */ jsx54(CountBadge, { value: info?.count ?? rows.length }),
|
|
8236
8272
|
!thenField && renderGroupAside?.({ field: groupField, value: info?.value ?? null, label: info?.label ?? "" }),
|
|
8237
|
-
conditions !== null && !period && /* @__PURE__ */
|
|
8273
|
+
conditions !== null && !period && /* @__PURE__ */ jsxs40(
|
|
8238
8274
|
Button,
|
|
8239
8275
|
{
|
|
8240
8276
|
size: "xs",
|
|
@@ -8272,7 +8308,7 @@ function QueryableList({
|
|
|
8272
8308
|
const first = groups[0]?.rows[0];
|
|
8273
8309
|
const raw = first?.values[groupField];
|
|
8274
8310
|
const count = (result?.groups ?? []).filter((g) => groupKey(g.value) === parent).reduce((n, g) => n + g.count, 0);
|
|
8275
|
-
return /* @__PURE__ */
|
|
8311
|
+
return /* @__PURE__ */ jsxs40(HStack11, { gap: "2.5", flex: "1", minW: "0", children: [
|
|
8276
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) }),
|
|
8277
8313
|
/* @__PURE__ */ jsx54(CountBadge, { value: count }),
|
|
8278
8314
|
renderGroupAside?.({ field: groupField, value: info?.value ?? null, label: info?.label ?? "" })
|
|
@@ -8371,12 +8407,12 @@ function placeholderOf(id, kind) {
|
|
|
8371
8407
|
}
|
|
8372
8408
|
function ExportMenu({ busy, disabled, onExport }) {
|
|
8373
8409
|
const labels = useAbpLabels().queryList;
|
|
8374
|
-
return /* @__PURE__ */
|
|
8375
|
-
/* @__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: [
|
|
8376
8412
|
/* @__PURE__ */ jsx54(Download, {}),
|
|
8377
8413
|
labels.export
|
|
8378
8414
|
] }) }),
|
|
8379
|
-
/* @__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: [
|
|
8380
8416
|
/* @__PURE__ */ jsx54(Menu3.Item, { value: "csv", children: labels.exportCsv }),
|
|
8381
8417
|
/* @__PURE__ */ jsx54(Menu3.Item, { value: "xlsx", children: labels.exportExcel })
|
|
8382
8418
|
] }) }) })
|
|
@@ -8458,8 +8494,8 @@ function RqlBox({
|
|
|
8458
8494
|
}
|
|
8459
8495
|
}
|
|
8460
8496
|
const hasSpan = error?.start != null && error.end != null && error.end >= error.start && error.end <= text.length;
|
|
8461
|
-
return /* @__PURE__ */
|
|
8462
|
-
/* @__PURE__ */
|
|
8497
|
+
return /* @__PURE__ */ jsxs40(Stack11, { gap: "1.5", flex: "1", minW: "0", position: "relative", children: [
|
|
8498
|
+
/* @__PURE__ */ jsxs40(HStack11, { gap: "2", children: [
|
|
8463
8499
|
/* @__PURE__ */ jsx54(
|
|
8464
8500
|
Input6,
|
|
8465
8501
|
{
|
|
@@ -8507,7 +8543,7 @@ function RqlBox({
|
|
|
8507
8543
|
borderRadius: "md",
|
|
8508
8544
|
boxShadow: "md",
|
|
8509
8545
|
py: "1",
|
|
8510
|
-
children: found.items.map((item, i) => /* @__PURE__ */
|
|
8546
|
+
children: found.items.map((item, i) => /* @__PURE__ */ jsxs40(
|
|
8511
8547
|
HStack11,
|
|
8512
8548
|
{
|
|
8513
8549
|
id: `${listId}-${i}`,
|
|
@@ -8525,17 +8561,17 @@ function RqlBox({
|
|
|
8525
8561
|
},
|
|
8526
8562
|
onMouseEnter: () => setActive(i),
|
|
8527
8563
|
children: [
|
|
8528
|
-
/* @__PURE__ */ jsx54(
|
|
8529
|
-
/* @__PURE__ */ jsx54(
|
|
8564
|
+
/* @__PURE__ */ jsx54(Text15, { as: "span", textStyle: "sm", fontFamily: item.kind === "person" || item.kind === "value" ? void 0 : "mono", truncate: true, children: item.kind === "field" || item.kind === "person" ? item.label : item.text }),
|
|
8565
|
+
/* @__PURE__ */ jsx54(Text15, { as: "span", textStyle: "xs", color: "fg.muted", truncate: true, children: item.kind === "field" || item.kind === "person" ? item.text : item.label !== item.text ? item.label : labels.kinds[item.kind] ?? item.kind })
|
|
8530
8566
|
]
|
|
8531
8567
|
},
|
|
8532
8568
|
`${item.kind}-${item.text}`
|
|
8533
8569
|
))
|
|
8534
8570
|
}
|
|
8535
8571
|
),
|
|
8536
|
-
error && /* @__PURE__ */
|
|
8572
|
+
error && /* @__PURE__ */ jsxs40(InlineAlert, { tone: "danger", size: "sm", children: [
|
|
8537
8573
|
error.message,
|
|
8538
|
-
hasSpan && /* @__PURE__ */
|
|
8574
|
+
hasSpan && /* @__PURE__ */ jsxs40(chakra31.code, { display: "block", mt: "1", fontFamily: "mono", whiteSpace: "pre-wrap", children: [
|
|
8539
8575
|
text.slice(0, error.start),
|
|
8540
8576
|
/* @__PURE__ */ jsx54(chakra31.mark, { bg: "red.subtle", color: "fg", textDecoration: "underline wavy", textDecorationColor: "fg.error", children: text.slice(error.start, error.end) || " " }),
|
|
8541
8577
|
text.slice(error.end)
|
|
@@ -8546,14 +8582,14 @@ function RqlBox({
|
|
|
8546
8582
|
|
|
8547
8583
|
// src/components/FileDrop.tsx
|
|
8548
8584
|
import { forwardRef as forwardRef9, useLayoutEffect as useLayoutEffect4, useRef as useRef20 } from "react";
|
|
8549
|
-
import { Box as Box11, HStack as HStack12, Portal as Portal16, Text as
|
|
8585
|
+
import { Box as Box11, HStack as HStack12, Portal as Portal16, Text as Text16 } from "@chakra-ui/react";
|
|
8550
8586
|
import { ArrowDownToLine } from "lucide-react";
|
|
8551
|
-
import { jsx as jsx55, jsxs as
|
|
8587
|
+
import { jsx as jsx55, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
8552
8588
|
var OUT3 = `cubic-bezier(${curves.out.join(", ")})`;
|
|
8553
8589
|
var FileDropArea = forwardRef9(function FileDropArea2({ awake = false, over: over2 = false, hint, children, ...rest }, ref) {
|
|
8554
8590
|
const { reduce } = useMotionSetting();
|
|
8555
8591
|
const lit = awake || over2;
|
|
8556
|
-
return /* @__PURE__ */
|
|
8592
|
+
return /* @__PURE__ */ jsxs41(
|
|
8557
8593
|
Box11,
|
|
8558
8594
|
{
|
|
8559
8595
|
ref,
|
|
@@ -8572,7 +8608,7 @@ var FileDropArea = forwardRef9(function FileDropArea2({ awake = false, over: ove
|
|
|
8572
8608
|
...rest,
|
|
8573
8609
|
children: [
|
|
8574
8610
|
children,
|
|
8575
|
-
/* @__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(
|
|
8576
8612
|
HStack12,
|
|
8577
8613
|
{
|
|
8578
8614
|
h: "full",
|
|
@@ -8587,7 +8623,7 @@ var FileDropArea = forwardRef9(function FileDropArea2({ awake = false, over: ove
|
|
|
8587
8623
|
style: { transition: "background-color 160ms ease" },
|
|
8588
8624
|
children: [
|
|
8589
8625
|
/* @__PURE__ */ jsx55(Bob, { active: over2 && !reduce }),
|
|
8590
|
-
/* @__PURE__ */ jsx55(
|
|
8626
|
+
/* @__PURE__ */ jsx55(Text16, { as: "span", truncate: true, children: hint })
|
|
8591
8627
|
]
|
|
8592
8628
|
}
|
|
8593
8629
|
) })
|
|
@@ -8609,23 +8645,23 @@ function Bob({ active }) {
|
|
|
8609
8645
|
return /* @__PURE__ */ jsx55(Box11, { as: "span", ref, display: "inline-flex", flexShrink: 0, _icon: { boxSize: "4" }, children: /* @__PURE__ */ jsx55(ArrowDownToLine, {}) });
|
|
8610
8646
|
}
|
|
8611
8647
|
function DropHint({ show, children }) {
|
|
8612
|
-
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: [
|
|
8613
8649
|
/* @__PURE__ */ jsx55(ArrowDownToLine, {}),
|
|
8614
|
-
/* @__PURE__ */ jsx55(
|
|
8650
|
+
/* @__PURE__ */ jsx55(Text16, { as: "span", truncate: true, children })
|
|
8615
8651
|
] }) }) }) });
|
|
8616
8652
|
}
|
|
8617
8653
|
|
|
8618
8654
|
// src/components/UploadList.tsx
|
|
8619
8655
|
import { useLayoutEffect as useLayoutEffect5, useRef as useRef21 } from "react";
|
|
8620
|
-
import { Box as Box12, chakra as chakra32, HStack as HStack13, Stack as Stack12, Text as
|
|
8656
|
+
import { Box as Box12, chakra as chakra32, HStack as HStack13, Stack as Stack12, Text as Text17 } from "@chakra-ui/react";
|
|
8621
8657
|
import { Check as Check3, File as FileIcon, RotateCcw, TriangleAlert, X as X3 } from "lucide-react";
|
|
8622
|
-
import { jsx as jsx56, jsxs as
|
|
8658
|
+
import { jsx as jsx56, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
8623
8659
|
var OUT4 = `cubic-bezier(${curves.out.join(", ")})`;
|
|
8624
8660
|
function UploadList({ rows, summary, fraction, announce, labels, onCancel, onRetry, onDismiss }) {
|
|
8625
|
-
return /* @__PURE__ */
|
|
8661
|
+
return /* @__PURE__ */ jsxs42(Stack12, { gap: "2", "data-testid": "upload-list", children: [
|
|
8626
8662
|
/* @__PURE__ */ jsx56(chakra32.span, { srOnly: true, "aria-live": "polite", children: announce }),
|
|
8627
|
-
rows.length > 0 && summary != null && /* @__PURE__ */
|
|
8628
|
-
/* @__PURE__ */ jsx56(
|
|
8663
|
+
rows.length > 0 && summary != null && /* @__PURE__ */ jsxs42(Stack12, { gap: "1", children: [
|
|
8664
|
+
/* @__PURE__ */ jsx56(Text17, { textStyle: "caption", color: "fg.muted", children: summary }),
|
|
8629
8665
|
fraction != null && /* @__PURE__ */ jsx56(Bar2, { fraction, tone: "accent", label: typeof summary === "string" ? summary : void 0 })
|
|
8630
8666
|
] }),
|
|
8631
8667
|
/* @__PURE__ */ jsx56(Stack12, { gap: "1.5", position: "relative", children: /* @__PURE__ */ jsx56(PresenceList, { children: rows.map((row) => /* @__PURE__ */ jsx56(PresenceItem, { children: /* @__PURE__ */ jsx56(Row, { row, labels, onCancel, onRetry, onDismiss }) }, row.id)) }) })
|
|
@@ -8634,15 +8670,15 @@ function UploadList({ rows, summary, fraction, announce, labels, onCancel, onRet
|
|
|
8634
8670
|
function Row({ row, labels, onCancel, onRetry, onDismiss }) {
|
|
8635
8671
|
const going = row.state === "waiting" || row.state === "sending";
|
|
8636
8672
|
const trouble = row.state === "failed" || row.state === "refused";
|
|
8637
|
-
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: [
|
|
8638
8674
|
/* @__PURE__ */ jsx56(Preview, { src: row.preview }),
|
|
8639
|
-
/* @__PURE__ */
|
|
8640
|
-
/* @__PURE__ */
|
|
8641
|
-
/* @__PURE__ */ jsx56(
|
|
8642
|
-
/* @__PURE__ */ jsx56(
|
|
8675
|
+
/* @__PURE__ */ jsxs42(Stack12, { gap: "1", flex: "1", minW: "0", children: [
|
|
8676
|
+
/* @__PURE__ */ jsxs42(HStack13, { gap: "2", justify: "space-between", children: [
|
|
8677
|
+
/* @__PURE__ */ jsx56(Text17, { as: "span", fontWeight: "medium", truncate: true, children: /* @__PURE__ */ jsx56("bdi", { children: row.name }) }),
|
|
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 })
|
|
8643
8679
|
] }),
|
|
8644
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" }),
|
|
8645
|
-
row.detail != null && /* @__PURE__ */
|
|
8681
|
+
row.detail != null && /* @__PURE__ */ jsxs42(Text17, { as: "span", textStyle: "caption", color: trouble ? "fg.error" : "fg.muted", truncate: true, children: [
|
|
8646
8682
|
trouble && /* @__PURE__ */ jsx56(Box12, { as: "span", display: "inline-flex", verticalAlign: "-0.15em", me: "1", _icon: { boxSize: "3.5" }, children: /* @__PURE__ */ jsx56(TriangleAlert, {}) }),
|
|
8647
8683
|
row.detail
|
|
8648
8684
|
] })
|
|
@@ -8956,7 +8992,7 @@ function usePastedFiles({ enabled = true, onFiles }) {
|
|
|
8956
8992
|
|
|
8957
8993
|
// src/components/SortableSections.tsx
|
|
8958
8994
|
import { useMemo as useMemo13, useState as useState24 } from "react";
|
|
8959
|
-
import { Box as Box13, Stack as Stack13, Text as
|
|
8995
|
+
import { Box as Box13, Stack as Stack13, Text as Text18 } from "@chakra-ui/react";
|
|
8960
8996
|
import {
|
|
8961
8997
|
DndContext as DndContext4,
|
|
8962
8998
|
DragOverlay as DragOverlay3,
|
|
@@ -8969,7 +9005,7 @@ import {
|
|
|
8969
9005
|
} from "@dnd-kit/core";
|
|
8970
9006
|
import { SortableContext as SortableContext3, sortableKeyboardCoordinates as sortableKeyboardCoordinates3, useSortable as useSortable3, verticalListSortingStrategy as verticalListSortingStrategy3 } from "@dnd-kit/sortable";
|
|
8971
9007
|
import { CSS as CSS4 } from "@dnd-kit/utilities";
|
|
8972
|
-
import { jsx as jsx57, jsxs as
|
|
9008
|
+
import { jsx as jsx57, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
8973
9009
|
var sectionId = (id) => `section:${id}`;
|
|
8974
9010
|
function SortableSections({
|
|
8975
9011
|
"aria-label": ariaLabel,
|
|
@@ -9019,7 +9055,7 @@ function SortableSections({
|
|
|
9019
9055
|
if (from === target && !move.before && !move.after) return;
|
|
9020
9056
|
onMove(item, move);
|
|
9021
9057
|
}
|
|
9022
|
-
return /* @__PURE__ */
|
|
9058
|
+
return /* @__PURE__ */ jsxs43(
|
|
9023
9059
|
DndContext4,
|
|
9024
9060
|
{
|
|
9025
9061
|
sensors,
|
|
@@ -9029,13 +9065,13 @@ function SortableSections({
|
|
|
9029
9065
|
onDragCancel: () => setActive(null),
|
|
9030
9066
|
accessibility: { announcements, screenReaderInstructions: screenReaderInstructions ? { draggable: screenReaderInstructions } : void 0 },
|
|
9031
9067
|
children: [
|
|
9032
|
-
/* @__PURE__ */ jsx57(Stack13, { role: "region", "aria-label": ariaLabel, gap: "4", children: shown.map((s) => /* @__PURE__ */
|
|
9033
|
-
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: [
|
|
9034
9070
|
/* @__PURE__ */ jsx57(Bone, { width: "14", height: "4" }),
|
|
9035
9071
|
/* @__PURE__ */ jsx57(TextBone, { width: boneWidth(n, 16, 36) })
|
|
9036
9072
|
] }, n)),
|
|
9037
9073
|
s.items.map((item) => /* @__PURE__ */ jsx57(SortableItem, { id: item.id, children: (dragging) => renderItem(item, { dragging }) }, item.id)),
|
|
9038
|
-
!loading && s.items.length === 0 && s.empty && /* @__PURE__ */ jsx57(
|
|
9074
|
+
!loading && s.items.length === 0 && s.empty && /* @__PURE__ */ jsx57(Text18, { textStyle: "caption", color: "fg.subtle", textAlign: "center", py: "4", children: s.empty }),
|
|
9039
9075
|
!loading && s.footer
|
|
9040
9076
|
] }, s.id)) }),
|
|
9041
9077
|
/* @__PURE__ */ jsx57(DragOverlay3, { children: active ? /* @__PURE__ */ jsx57(Box13, { shadow: "lg", rounded: "l2", bg: "bg.panel", children: renderItem(active, { dragging: true }) }) : null })
|
|
@@ -9046,7 +9082,7 @@ function SortableSections({
|
|
|
9046
9082
|
function Section({ section, dragging, children }) {
|
|
9047
9083
|
const id = sectionId(section.id);
|
|
9048
9084
|
const { setNodeRef, isOver } = useDroppable3({ id });
|
|
9049
|
-
return /* @__PURE__ */
|
|
9085
|
+
return /* @__PURE__ */ jsxs43(Box13, { as: "section", borderWidth: "1px", borderColor: "border", rounded: "l3", bg: "bg.panel", "data-section": section.id, children: [
|
|
9050
9086
|
/* @__PURE__ */ jsx57(Box13, { px: "3", py: "2", borderBottomWidth: "1px", borderColor: "border.muted", children: section.header }),
|
|
9051
9087
|
/* @__PURE__ */ jsx57(SortableContext3, { id, items: section.items.map((i) => i.id), strategy: verticalListSortingStrategy3, children: /* @__PURE__ */ jsx57(
|
|
9052
9088
|
Stack13,
|
|
@@ -9083,9 +9119,9 @@ function SortableItem({ id, children }) {
|
|
|
9083
9119
|
|
|
9084
9120
|
// src/components/TimelineChart.tsx
|
|
9085
9121
|
import { Fragment as Fragment18, useEffect as useEffect17, useLayoutEffect as useLayoutEffect6, useRef as useRef23, useState as useState25 } from "react";
|
|
9086
|
-
import { Box as Box14, HStack as HStack14, Popover as Popover4, Portal as Portal17, Stack as Stack14, Text as
|
|
9122
|
+
import { Box as Box14, HStack as HStack14, Popover as Popover4, Portal as Portal17, Stack as Stack14, Text as Text19 } from "@chakra-ui/react";
|
|
9087
9123
|
import { Flag, Trash2 as Trash23 } from "lucide-react";
|
|
9088
|
-
import { jsx as jsx58, jsxs as
|
|
9124
|
+
import { jsx as jsx58, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
9089
9125
|
var DAY2 = 864e5;
|
|
9090
9126
|
var toDay = (day) => Math.round(Date.parse(`${day}T00:00:00Z`) / DAY2);
|
|
9091
9127
|
var fromDay = (n) => new Date(n * DAY2).toISOString().slice(0, 10);
|
|
@@ -9354,7 +9390,7 @@ function TimelineChart({
|
|
|
9354
9390
|
const bandsTop = tickHeight, markersTop = tickHeight + (shownBands.length ? STRIP : 0);
|
|
9355
9391
|
const headerHeight = markersTop + (shownMarkers.length ? STRIP : 0);
|
|
9356
9392
|
const todayAt = today ? toDay(today) - origin : -1;
|
|
9357
|
-
return /* @__PURE__ */
|
|
9393
|
+
return /* @__PURE__ */ jsxs44(
|
|
9358
9394
|
Box14,
|
|
9359
9395
|
{
|
|
9360
9396
|
ref: root,
|
|
@@ -9372,8 +9408,8 @@ function TimelineChart({
|
|
|
9372
9408
|
},
|
|
9373
9409
|
onKeyDown: zoomKey,
|
|
9374
9410
|
children: [
|
|
9375
|
-
instructions && /* @__PURE__ */ jsx58(
|
|
9376
|
-
/* @__PURE__ */
|
|
9411
|
+
instructions && /* @__PURE__ */ jsx58(Text19, { srOnly: true, children: instructions }),
|
|
9412
|
+
/* @__PURE__ */ jsxs44(Box14, { display: "grid", gridTemplateColumns: fill4 ? `${labelWidth}px minmax(${width}px, 1fr)` : `${labelWidth}px ${width}px`, minW: "fit-content", children: [
|
|
9377
9413
|
/* @__PURE__ */ jsx58(
|
|
9378
9414
|
Box14,
|
|
9379
9415
|
{
|
|
@@ -9393,7 +9429,7 @@ function TimelineChart({
|
|
|
9393
9429
|
children: corner
|
|
9394
9430
|
}
|
|
9395
9431
|
),
|
|
9396
|
-
/* @__PURE__ */
|
|
9432
|
+
/* @__PURE__ */ jsxs44(Box14, { position: "sticky", top: "0", zIndex: "2", bg: "bg.muted", borderBottomWidth: "1px", borderColor: "border", h: `${headerHeight}px`, overflow: "clip", children: [
|
|
9397
9433
|
ticks.map((t, i) => /* @__PURE__ */ jsx58(
|
|
9398
9434
|
Box14,
|
|
9399
9435
|
{
|
|
@@ -9406,7 +9442,7 @@ function TimelineChart({
|
|
|
9406
9442
|
borderColor: "border",
|
|
9407
9443
|
"aria-hidden": true,
|
|
9408
9444
|
children: /* @__PURE__ */ jsx58(
|
|
9409
|
-
|
|
9445
|
+
Text19,
|
|
9410
9446
|
{
|
|
9411
9447
|
position: "sticky",
|
|
9412
9448
|
insetStart: `${labelWidth}px`,
|
|
@@ -9425,7 +9461,7 @@ function TimelineChart({
|
|
|
9425
9461
|
t.day
|
|
9426
9462
|
)),
|
|
9427
9463
|
subTicks.map((t) => /* @__PURE__ */ jsx58(
|
|
9428
|
-
|
|
9464
|
+
Text19,
|
|
9429
9465
|
{
|
|
9430
9466
|
position: "absolute",
|
|
9431
9467
|
insetStart: `${t.day * dayWidth}px`,
|
|
@@ -9477,7 +9513,7 @@ function TimelineChart({
|
|
|
9477
9513
|
overflow: "clip",
|
|
9478
9514
|
"aria-label": b.label,
|
|
9479
9515
|
children: /* @__PURE__ */ jsx58(
|
|
9480
|
-
|
|
9516
|
+
Text19,
|
|
9481
9517
|
{
|
|
9482
9518
|
position: "sticky",
|
|
9483
9519
|
insetStart: `${labelWidth}px`,
|
|
@@ -9494,7 +9530,7 @@ function TimelineChart({
|
|
|
9494
9530
|
)
|
|
9495
9531
|
}
|
|
9496
9532
|
) }, b.id)),
|
|
9497
|
-
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(
|
|
9498
9534
|
Box14,
|
|
9499
9535
|
{
|
|
9500
9536
|
position: "absolute",
|
|
@@ -9526,7 +9562,7 @@ function TimelineChart({
|
|
|
9526
9562
|
) }, m4.id))
|
|
9527
9563
|
] }),
|
|
9528
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)) }),
|
|
9529
|
-
/* @__PURE__ */
|
|
9565
|
+
/* @__PURE__ */ jsxs44(Box14, { ref: layer, position: "relative", zIndex: "0", h: `${shown.length * rowHeight}px`, children: [
|
|
9530
9566
|
offRuns.map((o) => /* @__PURE__ */ jsx58(
|
|
9531
9567
|
Box14,
|
|
9532
9568
|
{
|
|
@@ -9683,8 +9719,8 @@ function TimelineChart({
|
|
|
9683
9719
|
const thin = tone === "rollup" && !single;
|
|
9684
9720
|
const diamond = single ? { w: `${DIAMOND}px`, h: `${DIAMOND}px`, top: `${i * rowHeight + rowHeight / 2 - DIAMOND / 2}px`, transform: "rotate(45deg)", rounded: "l1" } : null;
|
|
9685
9721
|
const canLink = !!onLink && item.linkable !== false && !drag;
|
|
9686
|
-
return /* @__PURE__ */
|
|
9687
|
-
/* @__PURE__ */
|
|
9722
|
+
return /* @__PURE__ */ jsxs44(Fragment18, { children: [
|
|
9723
|
+
/* @__PURE__ */ jsxs44(
|
|
9688
9724
|
Box14,
|
|
9689
9725
|
{
|
|
9690
9726
|
role: "button",
|
|
@@ -9819,7 +9855,7 @@ function TimelineChart({
|
|
|
9819
9855
|
zIndex: "1",
|
|
9820
9856
|
_rtl: { transform: "scaleX(-1)" },
|
|
9821
9857
|
"aria-hidden": !onUnlink,
|
|
9822
|
-
children: /* @__PURE__ */
|
|
9858
|
+
children: /* @__PURE__ */ jsxs44("svg", { width, height: rows.length * rowHeight, style: { position: "absolute", left: 0, top: 0 }, children: [
|
|
9823
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" }) }) }),
|
|
9824
9860
|
links.map((l) => {
|
|
9825
9861
|
const f = ys.get(l.from), t = ys.get(l.to);
|
|
@@ -9831,7 +9867,7 @@ function TimelineChart({
|
|
|
9831
9867
|
const picked = menu?.from === l.from && menu.to === l.to;
|
|
9832
9868
|
const faint = !l.strong && links.some((x) => x.strong);
|
|
9833
9869
|
const open = (x, y) => setMenu({ from: l.from, to: l.to, x, y });
|
|
9834
|
-
return /* @__PURE__ */
|
|
9870
|
+
return /* @__PURE__ */ jsxs44("g", { children: [
|
|
9835
9871
|
/* @__PURE__ */ jsx58(
|
|
9836
9872
|
"path",
|
|
9837
9873
|
{
|
|
@@ -9869,7 +9905,7 @@ function TimelineChart({
|
|
|
9869
9905
|
] })
|
|
9870
9906
|
}
|
|
9871
9907
|
),
|
|
9872
|
-
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: [
|
|
9873
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" }),
|
|
9874
9910
|
/* @__PURE__ */ jsx58("circle", { cx: linking.x, cy: linking.y, r: 4, fill: tv("colors.accent.solid") })
|
|
9875
9911
|
] })
|
|
@@ -9908,9 +9944,9 @@ function TimelineChart({
|
|
|
9908
9944
|
unmountOnExit: true,
|
|
9909
9945
|
autoFocus: true,
|
|
9910
9946
|
positioning: { placement: "bottom", getAnchorRect: () => menu ? { x: menu.x, y: menu.y, width: 1, height: 1 } : null },
|
|
9911
|
-
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__ */
|
|
9912
|
-
/* @__PURE__ */ jsx58(
|
|
9913
|
-
/* @__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: [
|
|
9948
|
+
/* @__PURE__ */ jsx58(Text19, { textStyle: "label", children: linkTexts?.arrow(menu.from, menu.to) }),
|
|
9949
|
+
/* @__PURE__ */ jsxs44(Button, { size: "sm", variant: "secondary", onClick: () => {
|
|
9914
9950
|
onUnlink(menu);
|
|
9915
9951
|
setMenu(null);
|
|
9916
9952
|
}, children: [
|
|
@@ -9927,7 +9963,7 @@ function TimelineChart({
|
|
|
9927
9963
|
|
|
9928
9964
|
// src/components/TimelineCards.tsx
|
|
9929
9965
|
import { useEffect as useEffect18, useMemo as useMemo14, useRef as useRef24, useState as useState26 } from "react";
|
|
9930
|
-
import { Box as Box15, chakra as chakra33, Grid as Grid3, Stack as Stack15, Text as
|
|
9966
|
+
import { Box as Box15, chakra as chakra33, Grid as Grid3, Stack as Stack15, Text as Text20 } from "@chakra-ui/react";
|
|
9931
9967
|
|
|
9932
9968
|
// src/components/timeline-cards-math.ts
|
|
9933
9969
|
var DAY3 = 864e5;
|
|
@@ -9979,7 +10015,7 @@ function placeCards(items, first, days, scale, colW = columnWidth(scale)) {
|
|
|
9979
10015
|
}
|
|
9980
10016
|
|
|
9981
10017
|
// src/components/TimelineCards.tsx
|
|
9982
|
-
import { jsx as jsx59, jsxs as
|
|
10018
|
+
import { jsx as jsx59, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
9983
10019
|
var LANE = 60;
|
|
9984
10020
|
var KEYS = { d: "day", w: "week", m: "month" };
|
|
9985
10021
|
function TimelineCards(props) {
|
|
@@ -9993,7 +10029,7 @@ function TimelineCards(props) {
|
|
|
9993
10029
|
onScale(next);
|
|
9994
10030
|
}
|
|
9995
10031
|
};
|
|
9996
|
-
return /* @__PURE__ */
|
|
10032
|
+
return /* @__PURE__ */ jsxs45(
|
|
9997
10033
|
chakra33.div,
|
|
9998
10034
|
{
|
|
9999
10035
|
role: "region",
|
|
@@ -10011,7 +10047,7 @@ function TimelineCards(props) {
|
|
|
10011
10047
|
);
|
|
10012
10048
|
}
|
|
10013
10049
|
function Card({ item, p, range, cutStart, cutEnd, style }) {
|
|
10014
|
-
const card = /* @__PURE__ */
|
|
10050
|
+
const card = /* @__PURE__ */ jsxs45(
|
|
10015
10051
|
chakra33.button,
|
|
10016
10052
|
{
|
|
10017
10053
|
type: "button",
|
|
@@ -10063,11 +10099,11 @@ function Lanes(p) {
|
|
|
10063
10099
|
const gridW = days.length * colW;
|
|
10064
10100
|
const placeholders = useLoading(p.loading) && items.length === 0;
|
|
10065
10101
|
const height = (placeholders ? 4 : Math.max(lanes, 1)) * LANE + 16;
|
|
10066
|
-
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: [
|
|
10067
10103
|
/* @__PURE__ */ jsx59(chakra33.div, { display: "flex", borderBottomWidth: "1px", borderColor: "border", bg: "bg.subtle", position: "sticky", top: "0", zIndex: "1", children: days.map((d) => {
|
|
10068
10104
|
const isToday = d === today;
|
|
10069
10105
|
const weekStart = new Date(dayNumber(d) * 864e5).getUTCDay() === 0;
|
|
10070
|
-
return /* @__PURE__ */
|
|
10106
|
+
return /* @__PURE__ */ jsxs45(
|
|
10071
10107
|
chakra33.div,
|
|
10072
10108
|
{
|
|
10073
10109
|
w: `${colW}px`,
|
|
@@ -10084,9 +10120,9 @@ function Lanes(p) {
|
|
|
10084
10120
|
borderInlineStartWidth: weekStart && scale === "month" ? "1px" : "0",
|
|
10085
10121
|
borderColor: "border",
|
|
10086
10122
|
children: [
|
|
10087
|
-
/* @__PURE__ */ jsx59(
|
|
10123
|
+
/* @__PURE__ */ jsx59(Text20, { as: "span", children: p.weekday(d) }),
|
|
10088
10124
|
/* @__PURE__ */ jsx59(
|
|
10089
|
-
|
|
10125
|
+
Text20,
|
|
10090
10126
|
{
|
|
10091
10127
|
as: "span",
|
|
10092
10128
|
fontVariantNumeric: "tabular-nums",
|
|
@@ -10165,6 +10201,7 @@ export {
|
|
|
10165
10201
|
ABP_UI_VERSION,
|
|
10166
10202
|
AbpApiError,
|
|
10167
10203
|
AbpProvider,
|
|
10204
|
+
AddButton,
|
|
10168
10205
|
AppLink,
|
|
10169
10206
|
AppShell,
|
|
10170
10207
|
ArriveOnChange,
|
|
@@ -10305,6 +10342,7 @@ export {
|
|
|
10305
10342
|
notify,
|
|
10306
10343
|
pageCount,
|
|
10307
10344
|
pageList,
|
|
10345
|
+
pagesShown,
|
|
10308
10346
|
partsOf,
|
|
10309
10347
|
passkeysSupported,
|
|
10310
10348
|
pastedName,
|