@abpjs/ui 0.2.0-next.41 → 0.2.0-next.42
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 +14 -0
- package/dist/index.d.ts +106 -1
- package/dist/index.js +756 -591
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1603,7 +1603,7 @@ function useTokenVar() {
|
|
|
1603
1603
|
}
|
|
1604
1604
|
|
|
1605
1605
|
// src/version.ts
|
|
1606
|
-
var ABP_UI_VERSION = true ? "0.2.0-next.
|
|
1606
|
+
var ABP_UI_VERSION = true ? "0.2.0-next.42" : "0.0.0-dev";
|
|
1607
1607
|
|
|
1608
1608
|
// src/provider/time-zone.tsx
|
|
1609
1609
|
import { createContext, useContext } from "react";
|
|
@@ -6819,9 +6819,168 @@ async function readTable(file) {
|
|
|
6819
6819
|
throw new Error(kind === "old" ? "old" : "type");
|
|
6820
6820
|
}
|
|
6821
6821
|
|
|
6822
|
+
// src/files/columns.ts
|
|
6823
|
+
var PATTERNS = [
|
|
6824
|
+
["integer", /^[-+]?\d+$/],
|
|
6825
|
+
["decimal", /^[-+]?(\d+[.,]\d*|\d*[.,]\d+)([eE][-+]?\d+)?$/],
|
|
6826
|
+
["boolean", /^(true|false|yes|no)$/i],
|
|
6827
|
+
["date", /^\d{4}-\d{2}-\d{2}$/],
|
|
6828
|
+
["timestamp", /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:?\d{2})?$/],
|
|
6829
|
+
["uuid", /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i]
|
|
6830
|
+
];
|
|
6831
|
+
function guessType(values) {
|
|
6832
|
+
const filled = values.map((v) => v.trim()).filter((v) => v !== "");
|
|
6833
|
+
if (filled.length === 0) return "text";
|
|
6834
|
+
const fits = (re) => filled.every((v) => re.test(v));
|
|
6835
|
+
for (const [kind, re] of PATTERNS) {
|
|
6836
|
+
if (kind === "decimal" ? filled.every((v) => PATTERNS[0][1].test(v) || re.test(v)) : fits(re)) return kind;
|
|
6837
|
+
}
|
|
6838
|
+
return "text";
|
|
6839
|
+
}
|
|
6840
|
+
var headerKey = (text) => text.normalize("NFKC").toLowerCase().replace(/[\s_\-.]+/g, "");
|
|
6841
|
+
function guessTargets(headers, samples, fields, options = {}) {
|
|
6842
|
+
const allowNew = options.allowNew ?? !(fields && fields.length > 0);
|
|
6843
|
+
const used = /* @__PURE__ */ new Set();
|
|
6844
|
+
return headers.map((header, i) => {
|
|
6845
|
+
const key = headerKey(header);
|
|
6846
|
+
const field = (fields ?? []).find((f) => !used.has(f.name) && key !== "" && (headerKey(f.name) === key || f.label != null && headerKey(f.label) === key));
|
|
6847
|
+
if (field) {
|
|
6848
|
+
used.add(field.name);
|
|
6849
|
+
return { kind: "field", name: field.name };
|
|
6850
|
+
}
|
|
6851
|
+
if (!allowNew) return { kind: "skip" };
|
|
6852
|
+
const kind = guessType(samples.map((row) => row[i] ?? ""));
|
|
6853
|
+
return { kind: "new", name: options.nameOf ? options.nameOf(header, i) : header.trim() || `column${i + 1}`, type: options.typeOf ? options.typeOf(kind) : kind };
|
|
6854
|
+
});
|
|
6855
|
+
}
|
|
6856
|
+
function columnCounts(targets) {
|
|
6857
|
+
return {
|
|
6858
|
+
total: targets.length,
|
|
6859
|
+
created: targets.filter((t) => t.kind === "new").length,
|
|
6860
|
+
matched: targets.filter((t) => t.kind === "field").length,
|
|
6861
|
+
skipped: targets.filter((t) => t.kind === "skip").length
|
|
6862
|
+
};
|
|
6863
|
+
}
|
|
6864
|
+
function columnProblems(targets) {
|
|
6865
|
+
const fields = targets.flatMap((t) => t.kind === "field" ? [t.name] : []);
|
|
6866
|
+
const names = targets.flatMap((t) => t.kind === "new" && t.name.trim() ? [t.name.trim().toLowerCase()] : []);
|
|
6867
|
+
const dupes = (list) => [...new Set(list.filter((x, i) => list.indexOf(x) !== i))];
|
|
6868
|
+
return {
|
|
6869
|
+
twice: dupes(fields),
|
|
6870
|
+
unnamed: targets.flatMap((t, i) => t.kind === "new" && !t.name.trim() ? [i] : []),
|
|
6871
|
+
sameName: dupes(names)
|
|
6872
|
+
};
|
|
6873
|
+
}
|
|
6874
|
+
|
|
6875
|
+
// src/components/ColumnMatcher.tsx
|
|
6876
|
+
import { useId as useId5 } from "react";
|
|
6877
|
+
import { Box as Box8, chakra as chakra21, HStack as HStack7, Input as Input5, Stack as Stack8, Table as Table2, Text as Text12 } from "@chakra-ui/react";
|
|
6878
|
+
import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6879
|
+
var DEFAULT_LABELS = {
|
|
6880
|
+
title: "Match columns",
|
|
6881
|
+
column: "Column in your file",
|
|
6882
|
+
samples: "First values",
|
|
6883
|
+
target: "Goes to",
|
|
6884
|
+
targetFor: "Field for {column}",
|
|
6885
|
+
newField: "New field\u2026",
|
|
6886
|
+
skip: "Don\u2019t import",
|
|
6887
|
+
newName: "New field\u2019s name",
|
|
6888
|
+
newType: "New field\u2019s type",
|
|
6889
|
+
summary: "{total, plural, one {# column} other {# columns}}: {created} new, {matched} matched, {skipped} skipped",
|
|
6890
|
+
twice: "{field} is picked for more than one column",
|
|
6891
|
+
unnamed: "Name the new field",
|
|
6892
|
+
sameName: "Two new fields are called {name}"
|
|
6893
|
+
};
|
|
6894
|
+
function ColumnMatcher({ headers, samples, fields, allowNew, types, typeOf, value, onChange, renderExtra, extraHeader, disabled, labels: given }) {
|
|
6895
|
+
const labels = { ...DEFAULT_LABELS, ...given };
|
|
6896
|
+
const { locale } = useAbpLocale();
|
|
6897
|
+
const titleId = useId5();
|
|
6898
|
+
const canNew = allowNew ?? !(fields && fields.length > 0);
|
|
6899
|
+
const counts = columnCounts(value);
|
|
6900
|
+
const problems = columnProblems(value);
|
|
6901
|
+
const named = (name) => fields?.find((f) => f.name === name)?.label ?? name;
|
|
6902
|
+
const set2 = (i, target) => onChange(value.map((t, j) => j === i ? target : t));
|
|
6903
|
+
const options = [
|
|
6904
|
+
...(fields ?? []).map((f) => ({ value: `field:${f.name}`, label: f.label ?? f.name })),
|
|
6905
|
+
...canNew ? [{ value: "new", label: labels.newField }] : [],
|
|
6906
|
+
{ value: "skip", label: labels.skip }
|
|
6907
|
+
];
|
|
6908
|
+
const lines = [
|
|
6909
|
+
...problems.twice.map((f) => formatMessage(locale, labels.twice, { field: named(f) })),
|
|
6910
|
+
...problems.unnamed.length ? [labels.unnamed] : [],
|
|
6911
|
+
...problems.sameName.map((n) => formatMessage(locale, labels.sameName, { name: n }))
|
|
6912
|
+
];
|
|
6913
|
+
return /* @__PURE__ */ jsxs29(Stack8, { gap: "2", minW: "0", children: [
|
|
6914
|
+
/* @__PURE__ */ jsx38(Text12, { id: titleId, textStyle: "label", children: labels.title }),
|
|
6915
|
+
/* @__PURE__ */ jsx38(Box8, { overflowX: "auto", borderWidth: "1px", borderColor: "border", borderRadius: "l2", children: /* @__PURE__ */ jsxs29(Table2.Root, { size: "sm", "aria-labelledby": titleId, children: [
|
|
6916
|
+
/* @__PURE__ */ jsx38(Table2.Header, { children: /* @__PURE__ */ jsxs29(Table2.Row, { bg: "bg.muted", children: [
|
|
6917
|
+
/* @__PURE__ */ jsx38(Table2.ColumnHeader, { children: labels.column }),
|
|
6918
|
+
/* @__PURE__ */ jsx38(Table2.ColumnHeader, { children: labels.samples }),
|
|
6919
|
+
/* @__PURE__ */ jsx38(Table2.ColumnHeader, { children: labels.target }),
|
|
6920
|
+
renderExtra && /* @__PURE__ */ jsx38(Table2.ColumnHeader, { children: extraHeader })
|
|
6921
|
+
] }) }),
|
|
6922
|
+
/* @__PURE__ */ jsx38(Table2.Body, { children: headers.map((header, i) => {
|
|
6923
|
+
const target = value[i] ?? { kind: "skip" };
|
|
6924
|
+
const picked = target.kind === "field" ? `field:${target.name}` : target.kind;
|
|
6925
|
+
const shown = samples.map((row) => row[i] ?? "").filter((v) => v.trim() !== "").slice(0, 3);
|
|
6926
|
+
return /* @__PURE__ */ jsxs29(Table2.Row, { opacity: target.kind === "skip" ? 0.7 : void 0, children: [
|
|
6927
|
+
/* @__PURE__ */ jsx38(Table2.Cell, { fontWeight: "semibold", maxW: "48", truncate: true, title: header, children: header }),
|
|
6928
|
+
/* @__PURE__ */ jsx38(Table2.Cell, { color: "fg.muted", maxW: "56", children: /* @__PURE__ */ jsx38(Stack8, { gap: "0", children: shown.map((v, k) => /* @__PURE__ */ jsx38(Text12, { as: "span", textStyle: "caption", truncate: true, title: v, children: v }, k)) }) }),
|
|
6929
|
+
/* @__PURE__ */ jsx38(Table2.Cell, { minW: "56", children: /* @__PURE__ */ jsxs29(Stack8, { gap: "1.5", children: [
|
|
6930
|
+
/* @__PURE__ */ jsx38(
|
|
6931
|
+
SelectField,
|
|
6932
|
+
{
|
|
6933
|
+
size: "sm",
|
|
6934
|
+
"aria-label": formatMessage(locale, labels.targetFor, { column: header }),
|
|
6935
|
+
value: picked,
|
|
6936
|
+
disabled,
|
|
6937
|
+
onChange: (e) => {
|
|
6938
|
+
const v = e.target.value;
|
|
6939
|
+
const guessed = typeOf?.(guessType(samples.map((row) => row[i] ?? "")));
|
|
6940
|
+
const type = guessed && types.some((x) => x.value === guessed) ? guessed : types[0]?.value ?? "text";
|
|
6941
|
+
set2(i, v === "skip" ? { kind: "skip" } : v === "new" ? { kind: "new", name: header.trim(), type } : { kind: "field", name: v.slice(6) });
|
|
6942
|
+
},
|
|
6943
|
+
options
|
|
6944
|
+
}
|
|
6945
|
+
),
|
|
6946
|
+
target.kind === "new" && /* @__PURE__ */ jsxs29(HStack7, { gap: "1.5", align: "stretch", children: [
|
|
6947
|
+
/* @__PURE__ */ jsx38(
|
|
6948
|
+
Input5,
|
|
6949
|
+
{
|
|
6950
|
+
size: "sm",
|
|
6951
|
+
"aria-label": labels.newName,
|
|
6952
|
+
value: target.name,
|
|
6953
|
+
disabled,
|
|
6954
|
+
"aria-invalid": !target.name.trim() || void 0,
|
|
6955
|
+
onChange: (e) => set2(i, { ...target, name: e.target.value })
|
|
6956
|
+
}
|
|
6957
|
+
),
|
|
6958
|
+
/* @__PURE__ */ jsx38(
|
|
6959
|
+
SelectField,
|
|
6960
|
+
{
|
|
6961
|
+
size: "sm",
|
|
6962
|
+
"aria-label": labels.newType,
|
|
6963
|
+
value: target.type,
|
|
6964
|
+
disabled,
|
|
6965
|
+
maxW: "10rem",
|
|
6966
|
+
onChange: (e) => set2(i, { ...target, type: e.target.value }),
|
|
6967
|
+
options: types
|
|
6968
|
+
}
|
|
6969
|
+
)
|
|
6970
|
+
] })
|
|
6971
|
+
] }) }),
|
|
6972
|
+
renderExtra && /* @__PURE__ */ jsx38(Table2.Cell, { children: renderExtra(i, target) })
|
|
6973
|
+
] }, i);
|
|
6974
|
+
}) })
|
|
6975
|
+
] }) }),
|
|
6976
|
+
/* @__PURE__ */ jsx38(Text12, { textStyle: "caption", color: "fg.muted", "aria-live": "polite", children: formatMessage(locale, labels.summary, { total: counts.total, created: counts.created, matched: counts.matched, skipped: counts.skipped }) }),
|
|
6977
|
+
lines.length > 0 && /* @__PURE__ */ jsx38(chakra21.ul, { ps: "4", listStyleType: "disc", color: "fg.error", textStyle: "caption", role: "alert", children: lines.map((l) => /* @__PURE__ */ jsx38("li", { children: l }, l)) })
|
|
6978
|
+
] });
|
|
6979
|
+
}
|
|
6980
|
+
|
|
6822
6981
|
// src/components/WidgetBoard.tsx
|
|
6823
6982
|
import { useEffect as useEffect13, useLayoutEffect as useLayoutEffect3, useMemo as useMemo9, useRef as useRef14, useState as useState17 } from "react";
|
|
6824
|
-
import { Box as
|
|
6983
|
+
import { Box as Box9, chakra as chakra22, HStack as HStack8, Text as Text13 } from "@chakra-ui/react";
|
|
6825
6984
|
import { ArrowDown as ArrowDown2, ArrowUp as ArrowUp2, GripVertical as GripVertical3, Maximize2, Minimize2 } from "lucide-react";
|
|
6826
6985
|
|
|
6827
6986
|
// src/components/widget-board/layout.ts
|
|
@@ -6911,7 +7070,7 @@ function fromTwelve(items) {
|
|
|
6911
7070
|
}
|
|
6912
7071
|
|
|
6913
7072
|
// src/components/WidgetBoard.tsx
|
|
6914
|
-
import { jsx as
|
|
7073
|
+
import { jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6915
7074
|
var strip = (i) => ({ id: i.id, x: i.x, y: i.y, w: i.w });
|
|
6916
7075
|
function WidgetBoard({
|
|
6917
7076
|
items,
|
|
@@ -7102,11 +7261,11 @@ function WidgetBoard({
|
|
|
7102
7261
|
const moving = gesture?.mode === "move" ? gesture : null;
|
|
7103
7262
|
const slot = moving ? at.get(moving.id) : null;
|
|
7104
7263
|
const reveal = { opacity: 0 };
|
|
7105
|
-
return /* @__PURE__ */
|
|
7106
|
-
can && /* @__PURE__ */
|
|
7107
|
-
/* @__PURE__ */
|
|
7108
|
-
/* @__PURE__ */
|
|
7109
|
-
|
|
7264
|
+
return /* @__PURE__ */ jsxs30(Box9, { children: [
|
|
7265
|
+
can && /* @__PURE__ */ jsx39(chakra22.p, { id: help, srOnly: true, children: labels.instructions }),
|
|
7266
|
+
/* @__PURE__ */ jsx39(chakra22.p, { srOnly: true, role: "status", "aria-live": "polite", children: said }),
|
|
7267
|
+
/* @__PURE__ */ jsxs30(
|
|
7268
|
+
Box9,
|
|
7110
7269
|
{
|
|
7111
7270
|
ref: board,
|
|
7112
7271
|
role: "list",
|
|
@@ -7118,8 +7277,8 @@ function WidgetBoard({
|
|
|
7118
7277
|
onPointerCancel: cancel,
|
|
7119
7278
|
css: { "@media (prefers-reduced-motion: reduce)": { "& [data-widget-slot]": { transition: "none !important" } } },
|
|
7120
7279
|
children: [
|
|
7121
|
-
waiting && [[0, 30, 0], [30, 30, 0], [0, 20, 1], [20, 20, 1], [40, 20, 1]].map(([x, w, row], i) => /* @__PURE__ */
|
|
7122
|
-
|
|
7280
|
+
waiting && [[0, 30, 0], [30, 30, 0], [0, 20, 1], [20, 20, 1], [40, 20, 1]].map(([x, w, row], i) => /* @__PURE__ */ jsx39(
|
|
7281
|
+
Box9,
|
|
7123
7282
|
{
|
|
7124
7283
|
"aria-hidden": true,
|
|
7125
7284
|
position: "absolute",
|
|
@@ -7132,8 +7291,8 @@ function WidgetBoard({
|
|
|
7132
7291
|
},
|
|
7133
7292
|
i
|
|
7134
7293
|
)),
|
|
7135
|
-
slot && /* @__PURE__ */
|
|
7136
|
-
|
|
7294
|
+
slot && /* @__PURE__ */ jsx39(
|
|
7295
|
+
Box9,
|
|
7137
7296
|
{
|
|
7138
7297
|
"aria-hidden": true,
|
|
7139
7298
|
position: "absolute",
|
|
@@ -7165,14 +7324,14 @@ function WidgetBoard({
|
|
|
7165
7324
|
{ id: "two", label: labels.twoThirds, onSelect: () => setWidthOf(item, PRESETS.two) },
|
|
7166
7325
|
{ id: "full", label: labels.full, onSelect: () => setWidthOf(item, PRESETS.full) },
|
|
7167
7326
|
{ separator: true },
|
|
7168
|
-
{ id: "up", label: labels.moveUp, icon: /* @__PURE__ */
|
|
7169
|
-
{ id: "down", label: labels.moveDown, icon: /* @__PURE__ */
|
|
7327
|
+
{ id: "up", label: labels.moveUp, icon: /* @__PURE__ */ jsx39(ArrowUp2, {}), onSelect: () => moveBy(item, { vertical: "up" }) },
|
|
7328
|
+
{ id: "down", label: labels.moveDown, icon: /* @__PURE__ */ jsx39(ArrowDown2, {}), onSelect: () => moveBy(item, { vertical: "down" }) }
|
|
7170
7329
|
] : [];
|
|
7171
7330
|
const own2 = menu?.(item) ?? [];
|
|
7172
7331
|
const red = own2.filter((e) => "danger" in e && e.danger);
|
|
7173
7332
|
const entries2 = [...own2.filter((e) => !red.includes(e)), ...presets, ...red.length ? [{ separator: true }, ...red] : []].filter((e, i, all) => !("separator" in e) || i > 0 && i < all.length - 1 && !("separator" in all[i - 1]));
|
|
7174
|
-
return /* @__PURE__ */
|
|
7175
|
-
|
|
7333
|
+
return /* @__PURE__ */ jsx39(
|
|
7334
|
+
Box9,
|
|
7176
7335
|
{
|
|
7177
7336
|
role: "listitem",
|
|
7178
7337
|
"data-widget-slot": "",
|
|
@@ -7183,8 +7342,8 @@ function WidgetBoard({
|
|
|
7183
7342
|
zIndex: dragging ? 3 : sizing ? 2 : void 0,
|
|
7184
7343
|
visibility: width ? void 0 : "hidden",
|
|
7185
7344
|
transition: dragging || sizing ? void 0 : "top 200ms ease, inset-inline-start 200ms ease, width 150ms ease",
|
|
7186
|
-
children: /* @__PURE__ */
|
|
7187
|
-
|
|
7345
|
+
children: /* @__PURE__ */ jsxs30(
|
|
7346
|
+
chakra22.section,
|
|
7188
7347
|
{
|
|
7189
7348
|
"data-widget": p.id,
|
|
7190
7349
|
ref: measure(p.id),
|
|
@@ -7205,10 +7364,10 @@ function WidgetBoard({
|
|
|
7205
7364
|
"@media (hover: none)": { "& [data-reveal]": { opacity: 1 } }
|
|
7206
7365
|
},
|
|
7207
7366
|
children: [
|
|
7208
|
-
/* @__PURE__ */
|
|
7209
|
-
/* @__PURE__ */
|
|
7210
|
-
/* @__PURE__ */
|
|
7211
|
-
can && /* @__PURE__ */
|
|
7367
|
+
/* @__PURE__ */ jsxs30(HStack8, { gap: "1", ps: "4", pe: "2", pt: "2", minH: "11", children: [
|
|
7368
|
+
/* @__PURE__ */ jsx39(Text13, { as: "h3", flex: "1", minW: "0", truncate: true, fontWeight: "semibold", textStyle: "body.sm", children: name }),
|
|
7369
|
+
/* @__PURE__ */ jsxs30(HStack8, { gap: "0.5", flexShrink: 0, children: [
|
|
7370
|
+
can && /* @__PURE__ */ jsx39(chakra22.span, { "data-reveal": "", display: "inline-flex", children: /* @__PURE__ */ jsx39(
|
|
7212
7371
|
IconButton,
|
|
7213
7372
|
{
|
|
7214
7373
|
size: "xs",
|
|
@@ -7220,16 +7379,16 @@ function WidgetBoard({
|
|
|
7220
7379
|
css: { touchAction: "none" },
|
|
7221
7380
|
onPointerDown: (e) => grab(e, item),
|
|
7222
7381
|
onKeyDown: (e) => gripKey(e, item),
|
|
7223
|
-
children: /* @__PURE__ */
|
|
7382
|
+
children: /* @__PURE__ */ jsx39(GripVertical3, {})
|
|
7224
7383
|
}
|
|
7225
7384
|
) }),
|
|
7226
|
-
!narrow && /* @__PURE__ */
|
|
7227
|
-
entries2.length > 0 && /* @__PURE__ */
|
|
7385
|
+
!narrow && /* @__PURE__ */ jsx39(chakra22.span, { "data-reveal": "", display: "inline-flex", children: /* @__PURE__ */ jsx39(Tooltip, { content: isOpen ? labels.restore : labels.expand, children: /* @__PURE__ */ jsx39(IconButton, { size: "xs", variant: "ghost", color: "fg.muted", "aria-label": isOpen ? labels.restore : labels.expand, "aria-pressed": isOpen, onClick: () => toggle(p.id), children: isOpen ? /* @__PURE__ */ jsx39(Minimize2, {}) : /* @__PURE__ */ jsx39(Maximize2, {}) }) }) }),
|
|
7386
|
+
entries2.length > 0 && /* @__PURE__ */ jsx39(RowMenu, { label: labels.actions(name), items: entries2, size: "xs" })
|
|
7228
7387
|
] })
|
|
7229
7388
|
] }),
|
|
7230
|
-
/* @__PURE__ */
|
|
7231
|
-
can && !isOpen && /* @__PURE__ */
|
|
7232
|
-
|
|
7389
|
+
/* @__PURE__ */ jsx39(Box9, { px: "4", pb: "4", pt: "1", minW: "0", overflowX: "auto", children: renderItem(item, { expanded: isOpen }) }),
|
|
7390
|
+
can && !isOpen && /* @__PURE__ */ jsx39(
|
|
7391
|
+
chakra22.span,
|
|
7233
7392
|
{
|
|
7234
7393
|
role: "slider",
|
|
7235
7394
|
tabIndex: 0,
|
|
@@ -7253,7 +7412,7 @@ function WidgetBoard({
|
|
|
7253
7412
|
_focusVisible: { outline: "2px solid", outlineColor: "colorPalette.focusRing", outlineOffset: "1px", borderRadius: "full" },
|
|
7254
7413
|
onPointerDown: (e) => resizeStart(e, item),
|
|
7255
7414
|
onKeyDown: (e) => handleKey(e, item),
|
|
7256
|
-
children: /* @__PURE__ */
|
|
7415
|
+
children: /* @__PURE__ */ jsx39(chakra22.span, { w: "1", h: "8", borderRadius: "full", bg: "border.emphasized" })
|
|
7257
7416
|
}
|
|
7258
7417
|
)
|
|
7259
7418
|
]
|
|
@@ -7273,8 +7432,8 @@ function draftWidth(p, draft) {
|
|
|
7273
7432
|
}
|
|
7274
7433
|
|
|
7275
7434
|
// src/components/CategoryProgress.tsx
|
|
7276
|
-
import { Box as
|
|
7277
|
-
import { jsx as
|
|
7435
|
+
import { Box as Box10, HStack as HStack9 } from "@chakra-ui/react";
|
|
7436
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
7278
7437
|
function CategoryProgress({ todo, inProgress, done, size = "md", loading: own, "aria-label": ariaLabel }) {
|
|
7279
7438
|
const loading = useLoading(own);
|
|
7280
7439
|
const total = loading ? 0 : todo + inProgress + done;
|
|
@@ -7283,15 +7442,15 @@ function CategoryProgress({ todo, inProgress, done, size = "md", loading: own, "
|
|
|
7283
7442
|
{ key: "inProgress", value: inProgress },
|
|
7284
7443
|
{ key: "todo", value: todo }
|
|
7285
7444
|
];
|
|
7286
|
-
return /* @__PURE__ */
|
|
7445
|
+
return /* @__PURE__ */ jsx40(HStack9, { role: "img", "aria-label": ariaLabel, gap: "0", h: size === "sm" ? "1.5" : "2", w: "full", minW: "16", rounded: "full", overflow: "hidden", bg: "bg.muted", css: loading ? shineCss : void 0, children: total > 0 && parts.filter((p) => p.value > 0).map((p) => /* @__PURE__ */ jsx40(Box10, { h: "full", flexBasis: `${p.value / total * 100}%`, flexShrink: 0, bg: `statusCategory.${p.key}.solid` }, p.key)) });
|
|
7287
7446
|
}
|
|
7288
7447
|
|
|
7289
7448
|
// src/components/AttentionChip.tsx
|
|
7290
|
-
import { chakra as
|
|
7449
|
+
import { chakra as chakra24 } from "@chakra-ui/react";
|
|
7291
7450
|
|
|
7292
7451
|
// src/components/CountBadge.tsx
|
|
7293
|
-
import { chakra as
|
|
7294
|
-
import { jsx as
|
|
7452
|
+
import { chakra as chakra23 } from "@chakra-ui/react";
|
|
7453
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
7295
7454
|
var TONES2 = {
|
|
7296
7455
|
neutral: { bg: "bg.emphasized", color: "fg" },
|
|
7297
7456
|
accent: { bg: "accent.subtle", color: "accent.fg" },
|
|
@@ -7301,8 +7460,8 @@ var TONES2 = {
|
|
|
7301
7460
|
function CountBadge({ value, tone = "neutral", size = "sm", loading: own, ...rest }) {
|
|
7302
7461
|
const fmt = useFormatters();
|
|
7303
7462
|
const loading = useLoading(own);
|
|
7304
|
-
return /* @__PURE__ */
|
|
7305
|
-
|
|
7463
|
+
return /* @__PURE__ */ jsx41(
|
|
7464
|
+
chakra23.span,
|
|
7306
7465
|
{
|
|
7307
7466
|
display: "inline-flex",
|
|
7308
7467
|
alignItems: "center",
|
|
@@ -7326,11 +7485,11 @@ function CountBadge({ value, tone = "neutral", size = "sm", loading: own, ...res
|
|
|
7326
7485
|
}
|
|
7327
7486
|
|
|
7328
7487
|
// src/components/AttentionChip.tsx
|
|
7329
|
-
import { jsx as
|
|
7488
|
+
import { jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
7330
7489
|
function AttentionChip({ count, children, tone = "neutral", pressed, onClick, disabled, loading: own }) {
|
|
7331
7490
|
const loading = useLoading(own);
|
|
7332
|
-
return /* @__PURE__ */
|
|
7333
|
-
|
|
7491
|
+
return /* @__PURE__ */ jsxs31(
|
|
7492
|
+
chakra24.button,
|
|
7334
7493
|
{
|
|
7335
7494
|
type: "button",
|
|
7336
7495
|
display: "inline-flex",
|
|
@@ -7355,7 +7514,7 @@ function AttentionChip({ count, children, tone = "neutral", pressed, onClick, di
|
|
|
7355
7514
|
disabled: disabled || loading,
|
|
7356
7515
|
onClick,
|
|
7357
7516
|
children: [
|
|
7358
|
-
/* @__PURE__ */
|
|
7517
|
+
/* @__PURE__ */ jsx42(CountBadge, { loading, value: count, tone: count === 0 ? "neutral" : tone === "neutral" ? "neutral" : tone }),
|
|
7359
7518
|
children
|
|
7360
7519
|
]
|
|
7361
7520
|
}
|
|
@@ -7363,13 +7522,13 @@ function AttentionChip({ count, children, tone = "neutral", pressed, onClick, di
|
|
|
7363
7522
|
}
|
|
7364
7523
|
|
|
7365
7524
|
// src/components/IconTile.tsx
|
|
7366
|
-
import { chakra as
|
|
7367
|
-
import { jsx as
|
|
7525
|
+
import { chakra as chakra25 } from "@chakra-ui/react";
|
|
7526
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
7368
7527
|
var SIZES = { sm: { box: "6", icon: "3.5" }, md: { box: "8", icon: "4" }, lg: { box: "10", icon: "5" } };
|
|
7369
7528
|
function IconTile({ children, size = "md", active = false, palette: palette3 }) {
|
|
7370
7529
|
const s = SIZES[size];
|
|
7371
|
-
return /* @__PURE__ */
|
|
7372
|
-
|
|
7530
|
+
return /* @__PURE__ */ jsx43(
|
|
7531
|
+
chakra25.span,
|
|
7373
7532
|
{
|
|
7374
7533
|
display: "inline-flex",
|
|
7375
7534
|
alignItems: "center",
|
|
@@ -7391,17 +7550,17 @@ function IconTile({ children, size = "md", active = false, palette: palette3 })
|
|
|
7391
7550
|
}
|
|
7392
7551
|
|
|
7393
7552
|
// src/components/PersonChip.tsx
|
|
7394
|
-
import { Avatar as Avatar2, chakra as
|
|
7395
|
-
import { jsx as
|
|
7553
|
+
import { Avatar as Avatar2, chakra as chakra26 } from "@chakra-ui/react";
|
|
7554
|
+
import { jsx as jsx44, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
7396
7555
|
var SIZES2 = { xs: "5", sm: "6", md: "8" };
|
|
7397
7556
|
function PersonChip({ id, name, picture, compact = false, size = "sm", loading: own }) {
|
|
7398
7557
|
if (useLoading(own)) {
|
|
7399
|
-
return /* @__PURE__ */
|
|
7400
|
-
/* @__PURE__ */
|
|
7401
|
-
!compact && /* @__PURE__ */
|
|
7558
|
+
return /* @__PURE__ */ jsxs32(chakra26.span, { display: "inline-flex", alignItems: "center", gap: "2", "aria-hidden": true, children: [
|
|
7559
|
+
/* @__PURE__ */ jsx44(Bone, { circle: true, height: SIZES2[size] }),
|
|
7560
|
+
!compact && /* @__PURE__ */ jsx44(TextBone, { width: 12 })
|
|
7402
7561
|
] });
|
|
7403
7562
|
}
|
|
7404
|
-
const avatar = /* @__PURE__ */
|
|
7563
|
+
const avatar = /* @__PURE__ */ jsxs32(
|
|
7405
7564
|
Avatar2.Root,
|
|
7406
7565
|
{
|
|
7407
7566
|
colorPalette: avatarPalette(id),
|
|
@@ -7414,20 +7573,20 @@ function PersonChip({ id, name, picture, compact = false, size = "sm", loading:
|
|
|
7414
7573
|
flexShrink: 0,
|
|
7415
7574
|
...compact ? { role: "img", "aria-label": name, title: name } : { "aria-hidden": true },
|
|
7416
7575
|
children: [
|
|
7417
|
-
/* @__PURE__ */
|
|
7418
|
-
picture && /* @__PURE__ */
|
|
7576
|
+
/* @__PURE__ */ jsx44(Avatar2.Fallback, { name }),
|
|
7577
|
+
picture && /* @__PURE__ */ jsx44(Avatar2.Image, { src: picture, alt: "" })
|
|
7419
7578
|
]
|
|
7420
7579
|
}
|
|
7421
7580
|
);
|
|
7422
7581
|
if (compact) return avatar;
|
|
7423
|
-
return /* @__PURE__ */
|
|
7582
|
+
return /* @__PURE__ */ jsxs32(chakra26.span, { display: "inline-flex", alignItems: "center", gap: "2", minW: "0", maxW: "full", children: [
|
|
7424
7583
|
avatar,
|
|
7425
|
-
/* @__PURE__ */
|
|
7584
|
+
/* @__PURE__ */ jsx44(chakra26.span, { truncate: true, children: name })
|
|
7426
7585
|
] });
|
|
7427
7586
|
}
|
|
7428
7587
|
|
|
7429
7588
|
// src/components/PriorityMark.tsx
|
|
7430
|
-
import { chakra as
|
|
7589
|
+
import { chakra as chakra27 } from "@chakra-ui/react";
|
|
7431
7590
|
|
|
7432
7591
|
// src/components/priority-level.ts
|
|
7433
7592
|
function priorityLevel(rank, of) {
|
|
@@ -7439,12 +7598,12 @@ function priorityLevel(rank, of) {
|
|
|
7439
7598
|
}
|
|
7440
7599
|
|
|
7441
7600
|
// src/components/PriorityMark.tsx
|
|
7442
|
-
import { jsx as
|
|
7601
|
+
import { jsx as jsx45, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
7443
7602
|
function PriorityMark({ rank, of, children, title, loading }) {
|
|
7444
|
-
if (useLoading(loading)) return /* @__PURE__ */
|
|
7603
|
+
if (useLoading(loading)) return /* @__PURE__ */ jsx45(TextBone, { width: 7 });
|
|
7445
7604
|
const { bars, palette: palette3 } = priorityLevel(rank, of);
|
|
7446
|
-
return /* @__PURE__ */
|
|
7447
|
-
|
|
7605
|
+
return /* @__PURE__ */ jsxs33(
|
|
7606
|
+
chakra27.span,
|
|
7448
7607
|
{
|
|
7449
7608
|
display: "inline-flex",
|
|
7450
7609
|
alignItems: "center",
|
|
@@ -7455,8 +7614,8 @@ function PriorityMark({ rank, of, children, title, loading }) {
|
|
|
7455
7614
|
"aria-label": children == null ? title : void 0,
|
|
7456
7615
|
whiteSpace: "nowrap",
|
|
7457
7616
|
children: [
|
|
7458
|
-
/* @__PURE__ */
|
|
7459
|
-
|
|
7617
|
+
/* @__PURE__ */ jsx45(chakra27.svg, { viewBox: "0 0 12 12", w: "3", h: "3", flexShrink: 0, "aria-hidden": "true", children: [0, 1, 2, 3].map((i) => /* @__PURE__ */ jsx45(
|
|
7618
|
+
chakra27.rect,
|
|
7460
7619
|
{
|
|
7461
7620
|
x: i * 3 + 0.5,
|
|
7462
7621
|
y: 9 - i * 3,
|
|
@@ -7467,7 +7626,7 @@ function PriorityMark({ rank, of, children, title, loading }) {
|
|
|
7467
7626
|
},
|
|
7468
7627
|
i
|
|
7469
7628
|
)) }),
|
|
7470
|
-
children != null && /* @__PURE__ */
|
|
7629
|
+
children != null && /* @__PURE__ */ jsx45(chakra27.span, { color: palette3 === "blue" || palette3 === "gray" ? "fg.muted" : "colorPalette.fg", fontWeight: "medium", children })
|
|
7471
7630
|
]
|
|
7472
7631
|
}
|
|
7473
7632
|
);
|
|
@@ -7707,9 +7866,9 @@ function useAreaListSource(area, path, options = {}) {
|
|
|
7707
7866
|
}
|
|
7708
7867
|
|
|
7709
7868
|
// src/components/FormDialog.tsx
|
|
7710
|
-
import { Fragment as Fragment15, useId as
|
|
7711
|
-
import { chakra as
|
|
7712
|
-
import { Fragment as Fragment16, jsx as
|
|
7869
|
+
import { Fragment as Fragment15, useId as useId6, useRef as useRef17, useState as useState19 } from "react";
|
|
7870
|
+
import { chakra as chakra28, CloseButton as CloseButton2, Dialog as Dialog4, Grid as Grid3, HStack as HStack10, Portal as Portal12, Stack as Stack9, Text as Text14 } from "@chakra-ui/react";
|
|
7871
|
+
import { Fragment as Fragment16, jsx as jsx46, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
7713
7872
|
var isControl = (el) => el instanceof HTMLInputElement || el instanceof HTMLSelectElement || el instanceof HTMLTextAreaElement;
|
|
7714
7873
|
function invalidControls(form) {
|
|
7715
7874
|
return [...form.elements].filter((el) => isControl(el) && !el.disabled && el.willValidate && !el.checkValidity());
|
|
@@ -7746,7 +7905,7 @@ function FormDialog({
|
|
|
7746
7905
|
children
|
|
7747
7906
|
}) {
|
|
7748
7907
|
const shape = size ?? (preview != null ? "wide" : "md");
|
|
7749
|
-
const previewHeading =
|
|
7908
|
+
const previewHeading = useId6();
|
|
7750
7909
|
const labels = useAbpLabels();
|
|
7751
7910
|
const { locale } = useAbpLocale();
|
|
7752
7911
|
const summary = useRef17(null);
|
|
@@ -7781,9 +7940,9 @@ function FormDialog({
|
|
|
7781
7940
|
mark(el, false);
|
|
7782
7941
|
if (problems.length > 0) setProblems(invalidControls(e.currentTarget).map(describe2));
|
|
7783
7942
|
}
|
|
7784
|
-
return /* @__PURE__ */
|
|
7785
|
-
/* @__PURE__ */
|
|
7786
|
-
/* @__PURE__ */
|
|
7943
|
+
return /* @__PURE__ */ jsx46(Dialog4.Root, { open, onOpenChange: (e) => onOpenChange(e.open), size: shape === "wide" ? "xl" : shape, placement: "center", scrollBehavior: "inside", children: /* @__PURE__ */ jsxs34(Portal12, { children: [
|
|
7944
|
+
/* @__PURE__ */ jsx46(Dialog4.Backdrop, {}),
|
|
7945
|
+
/* @__PURE__ */ jsx46(Dialog4.Positioner, { children: /* @__PURE__ */ jsx46(Dialog4.Content, { asChild: true, ...shape === "wide" ? { maxW: "min(57.5rem, calc(100vw - 2rem))", w: "full" } : {}, children: /* @__PURE__ */ jsxs34(
|
|
7787
7946
|
"form",
|
|
7788
7947
|
{
|
|
7789
7948
|
onSubmit: hideSubmit ? (e) => e.preventDefault() : submit,
|
|
@@ -7792,18 +7951,18 @@ function FormDialog({
|
|
|
7792
7951
|
onInput: (e) => typed.current.add(e.target),
|
|
7793
7952
|
noValidate: true,
|
|
7794
7953
|
children: [
|
|
7795
|
-
/* @__PURE__ */
|
|
7796
|
-
/* @__PURE__ */
|
|
7954
|
+
/* @__PURE__ */ jsx46(Dialog4.Header, { children: /* @__PURE__ */ jsx46(Dialog4.Title, { children: title }) }),
|
|
7955
|
+
/* @__PURE__ */ jsx46(Dialog4.Body, { children: /* @__PURE__ */ jsxs34(
|
|
7797
7956
|
Grid3,
|
|
7798
7957
|
{
|
|
7799
7958
|
templateColumns: preview != null ? { base: "minmax(0, 1fr)", md: "minmax(0, 1.35fr) minmax(0, 1fr)" } : "minmax(0, 1fr)",
|
|
7800
7959
|
gap: "6",
|
|
7801
7960
|
alignItems: "start",
|
|
7802
7961
|
children: [
|
|
7803
|
-
/* @__PURE__ */
|
|
7804
|
-
description != null && /* @__PURE__ */
|
|
7805
|
-
problems.length > 0 && /* @__PURE__ */
|
|
7806
|
-
|
|
7962
|
+
/* @__PURE__ */ jsxs34(Stack9, { gap: "field", minW: "0", children: [
|
|
7963
|
+
description != null && /* @__PURE__ */ jsx46(Dialog4.Description, { children: description }),
|
|
7964
|
+
problems.length > 0 && /* @__PURE__ */ jsx46(chakra28.div, { ref: summary, tabIndex: -1, outline: "none", "data-form-problems": "", children: /* @__PURE__ */ jsx46(InlineAlert, { tone: "danger", title: formatMessage(locale, labels.formFix, { count: problems.length }), children: /* @__PURE__ */ jsx46(chakra28.ul, { ps: "4", listStyleType: "disc", children: problems.map((p, i) => /* @__PURE__ */ jsx46("li", { children: /* @__PURE__ */ jsx46(
|
|
7965
|
+
chakra28.button,
|
|
7807
7966
|
{
|
|
7808
7967
|
type: "button",
|
|
7809
7968
|
textDecoration: "underline",
|
|
@@ -7817,10 +7976,10 @@ function FormDialog({
|
|
|
7817
7976
|
}
|
|
7818
7977
|
) }, i)) }) }) }),
|
|
7819
7978
|
children,
|
|
7820
|
-
/* @__PURE__ */
|
|
7979
|
+
/* @__PURE__ */ jsx46(InlineAlert, { tone: "danger", children: error })
|
|
7821
7980
|
] }),
|
|
7822
|
-
preview != null && /* @__PURE__ */
|
|
7823
|
-
|
|
7981
|
+
preview != null && /* @__PURE__ */ jsxs34(
|
|
7982
|
+
chakra28.aside,
|
|
7824
7983
|
{
|
|
7825
7984
|
"aria-labelledby": previewHeading,
|
|
7826
7985
|
display: "flex",
|
|
@@ -7833,7 +7992,7 @@ function FormDialog({
|
|
|
7833
7992
|
position: { md: "sticky" },
|
|
7834
7993
|
top: "0",
|
|
7835
7994
|
children: [
|
|
7836
|
-
/* @__PURE__ */
|
|
7995
|
+
/* @__PURE__ */ jsx46(Text14, { id: previewHeading, textStyle: "label", children: previewTitle ?? labels.preview ?? "Preview" }),
|
|
7837
7996
|
preview
|
|
7838
7997
|
]
|
|
7839
7998
|
}
|
|
@@ -7841,48 +8000,48 @@ function FormDialog({
|
|
|
7841
8000
|
]
|
|
7842
8001
|
}
|
|
7843
8002
|
) }),
|
|
7844
|
-
/* @__PURE__ */
|
|
7845
|
-
dangerAction && /* @__PURE__ */
|
|
7846
|
-
/* @__PURE__ */
|
|
7847
|
-
/* @__PURE__ */
|
|
8003
|
+
/* @__PURE__ */ jsxs34(Dialog4.Footer, { children: [
|
|
8004
|
+
dangerAction && /* @__PURE__ */ jsxs34(Fragment16, { children: [
|
|
8005
|
+
/* @__PURE__ */ jsx46(Button, { variant: "link", danger: true, onClick: dangerAction.onClick, disabled: dangerAction.disabled, children: dangerAction.label }),
|
|
8006
|
+
/* @__PURE__ */ jsx46(chakra28.span, { flex: "1", "aria-hidden": true })
|
|
7848
8007
|
] }),
|
|
7849
|
-
/* @__PURE__ */
|
|
7850
|
-
!hideSubmit && /* @__PURE__ */
|
|
8008
|
+
/* @__PURE__ */ jsx46(Dialog4.ActionTrigger, { asChild: true, children: /* @__PURE__ */ jsx46(Button, { variant: "cancel", children: labels.cancel }) }),
|
|
8009
|
+
!hideSubmit && /* @__PURE__ */ jsx46(Button, { type: "submit", variant: "primary", loading: busy, disabled: submitDisabled, children: submitLabel })
|
|
7851
8010
|
] }),
|
|
7852
|
-
/* @__PURE__ */
|
|
8011
|
+
/* @__PURE__ */ jsx46(Dialog4.CloseTrigger, { asChild: true, children: /* @__PURE__ */ jsx46(CloseButton2, { size: "sm", "aria-label": labels.close }) })
|
|
7853
8012
|
]
|
|
7854
8013
|
}
|
|
7855
8014
|
) }) })
|
|
7856
8015
|
] }) });
|
|
7857
8016
|
}
|
|
7858
8017
|
function PreviewCard({ media, title, subtitle, items = [] }) {
|
|
7859
|
-
return /* @__PURE__ */
|
|
7860
|
-
/* @__PURE__ */
|
|
8018
|
+
return /* @__PURE__ */ jsxs34(Stack9, { gap: "4", p: "4", bg: "bg.panel", borderRadius: "l2", minW: "0", children: [
|
|
8019
|
+
/* @__PURE__ */ jsxs34(HStack10, { gap: "3", minW: "0", children: [
|
|
7861
8020
|
media,
|
|
7862
|
-
/* @__PURE__ */
|
|
7863
|
-
/* @__PURE__ */
|
|
7864
|
-
subtitle != null && /* @__PURE__ */
|
|
8021
|
+
/* @__PURE__ */ jsxs34(Stack9, { gap: "0.5", minW: "0", children: [
|
|
8022
|
+
/* @__PURE__ */ jsx46(Text14, { textStyle: "lg", fontWeight: "semibold", truncate: true, children: title }),
|
|
8023
|
+
subtitle != null && /* @__PURE__ */ jsx46(Text14, { as: "div", textStyle: "caption", color: "fg.muted", truncate: true, children: subtitle })
|
|
7865
8024
|
] })
|
|
7866
8025
|
] }),
|
|
7867
|
-
items.length > 0 && /* @__PURE__ */
|
|
7868
|
-
/* @__PURE__ */
|
|
7869
|
-
/* @__PURE__ */
|
|
8026
|
+
items.length > 0 && /* @__PURE__ */ jsx46(chakra28.dl, { display: "grid", gridTemplateColumns: "auto minmax(0, 1fr)", columnGap: "4", rowGap: "2", textStyle: "body.sm", m: "0", children: items.map((item, i) => /* @__PURE__ */ jsxs34(Fragment15, { children: [
|
|
8027
|
+
/* @__PURE__ */ jsx46(chakra28.dt, { color: "fg.muted", children: item.label }),
|
|
8028
|
+
/* @__PURE__ */ jsx46(chakra28.dd, { m: "0", minW: "0", ...item.wrap ? { lineClamp: 3 } : { truncate: true }, children: item.value ?? EMPTY_VALUE })
|
|
7870
8029
|
] }, i)) })
|
|
7871
8030
|
] });
|
|
7872
8031
|
}
|
|
7873
8032
|
|
|
7874
8033
|
// src/components/SaveBar.tsx
|
|
7875
|
-
import { useId as
|
|
7876
|
-
import { Box as
|
|
8034
|
+
import { useId as useId7 } from "react";
|
|
8035
|
+
import { Box as Box11, chakra as chakra29, Stack as Stack10, Text as Text15 } from "@chakra-ui/react";
|
|
7877
8036
|
import { FilePen } from "lucide-react";
|
|
7878
|
-
import { jsx as
|
|
8037
|
+
import { jsx as jsx47, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
7879
8038
|
var UNSAVED = "{count, plural, one {# change isn't saved yet} other {# changes aren't saved yet}}";
|
|
7880
8039
|
function SaveBar({ open, onSave, onDiscard, count = 1, message, title, saveLabel, busy, saveDisabled }) {
|
|
7881
8040
|
const labels = useAbpLabels();
|
|
7882
8041
|
const { locale } = useAbpLocale();
|
|
7883
|
-
const heading =
|
|
7884
|
-
return /* @__PURE__ */
|
|
7885
|
-
|
|
8042
|
+
const heading = useId7();
|
|
8043
|
+
return /* @__PURE__ */ jsx47(Box11, { position: "fixed", insetInline: "0", bottom: "6", zIndex: "sticky", display: "flex", justifyContent: "center", px: "4", pointerEvents: "none", children: /* @__PURE__ */ jsx47(Presence, { show: open, from: "rise", maxW: "full", children: /* @__PURE__ */ jsxs35(
|
|
8044
|
+
chakra29.section,
|
|
7886
8045
|
{
|
|
7887
8046
|
"aria-labelledby": heading,
|
|
7888
8047
|
"data-testid": "save-bar",
|
|
@@ -7896,13 +8055,13 @@ function SaveBar({ open, onSave, onDiscard, count = 1, message, title, saveLabel
|
|
|
7896
8055
|
bg: "bg.selected",
|
|
7897
8056
|
color: "accent.fg",
|
|
7898
8057
|
children: [
|
|
7899
|
-
/* @__PURE__ */
|
|
7900
|
-
/* @__PURE__ */
|
|
7901
|
-
/* @__PURE__ */
|
|
7902
|
-
/* @__PURE__ */
|
|
8058
|
+
/* @__PURE__ */ jsx47(Box11, { flex: "none", display: "inline-flex", alignItems: "center", justifyContent: "center", boxSize: "8", borderRadius: "l2", bg: "bg.panel", "aria-hidden": true, children: /* @__PURE__ */ jsx47(FilePen, { size: 18, strokeWidth: 1.75 }) }),
|
|
8059
|
+
/* @__PURE__ */ jsxs35(Stack10, { gap: "0", flex: "1", minW: { base: "0", sm: "11.25rem" }, me: { sm: "4" }, "aria-live": "polite", children: [
|
|
8060
|
+
/* @__PURE__ */ jsx47(Text15, { id: heading, textStyle: "body.sm", fontWeight: "bold", color: "fg", children: title ?? labels.saveBar ?? "Save your changes?" }),
|
|
8061
|
+
/* @__PURE__ */ jsx47(Text15, { textStyle: "caption", children: message ?? formatMessage(locale, labels.unsavedChanges ?? UNSAVED, { count }) })
|
|
7903
8062
|
] }),
|
|
7904
|
-
/* @__PURE__ */
|
|
7905
|
-
/* @__PURE__ */
|
|
8063
|
+
/* @__PURE__ */ jsx47(Button, { variant: "ghost", color: "accent.fg", fontWeight: "bold", _hover: { bg: "accent.emphasized" }, onClick: onDiscard, disabled: busy, children: labels.discard ?? "Discard" }),
|
|
8064
|
+
/* @__PURE__ */ jsx47(Button, { variant: "primary", onClick: onSave, loading: busy, disabled: saveDisabled, children: saveLabel ?? labels.save ?? "Save" })
|
|
7906
8065
|
]
|
|
7907
8066
|
}
|
|
7908
8067
|
) }) });
|
|
@@ -7910,32 +8069,32 @@ function SaveBar({ open, onSave, onDiscard, count = 1, message, title, saveLabel
|
|
|
7910
8069
|
|
|
7911
8070
|
// src/settings/SettingsLayout.tsx
|
|
7912
8071
|
import { useState as useState20 } from "react";
|
|
7913
|
-
import { Text as
|
|
8072
|
+
import { Text as Text16 } from "@chakra-ui/react";
|
|
7914
8073
|
|
|
7915
8074
|
// src/components/SearchInput.tsx
|
|
7916
8075
|
import { forwardRef as forwardRef7 } from "react";
|
|
7917
|
-
import { Input as
|
|
8076
|
+
import { Input as Input6, InputGroup } from "@chakra-ui/react";
|
|
7918
8077
|
import { Search as Search3 } from "lucide-react";
|
|
7919
|
-
import { jsx as
|
|
8078
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
7920
8079
|
var SearchInput = forwardRef7(function SearchInput2({ size = "md", maxW, ...rest }, ref) {
|
|
7921
8080
|
const skeleton = useLoading();
|
|
7922
|
-
return /* @__PURE__ */
|
|
8081
|
+
return /* @__PURE__ */ jsx48(
|
|
7923
8082
|
InputGroup,
|
|
7924
8083
|
{
|
|
7925
|
-
startElement: /* @__PURE__ */
|
|
8084
|
+
startElement: /* @__PURE__ */ jsx48(Search3, {}),
|
|
7926
8085
|
startOffset: "-0.25rem",
|
|
7927
8086
|
startElementProps: { color: "fg.subtle", _icon: { boxSize: "4" } },
|
|
7928
8087
|
maxW,
|
|
7929
8088
|
borderRadius: "l2",
|
|
7930
8089
|
"aria-hidden": skeleton || void 0,
|
|
7931
8090
|
css: skeleton ? ghostCss : void 0,
|
|
7932
|
-
children: /* @__PURE__ */
|
|
8091
|
+
children: /* @__PURE__ */ jsx48(Input6, { ref, type: "search", size, ...rest })
|
|
7933
8092
|
}
|
|
7934
8093
|
);
|
|
7935
8094
|
});
|
|
7936
8095
|
|
|
7937
8096
|
// src/settings/SettingsLayout.tsx
|
|
7938
|
-
import { jsx as
|
|
8097
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
7939
8098
|
var isCurrent = (pathname, href) => pathname === href || pathname.startsWith(`${href}/`);
|
|
7940
8099
|
function SettingsLayout({ area, pathname, sidebarId = "settings", labels, topNav = [], children, ...shell }) {
|
|
7941
8100
|
const [find, setFind] = useState20("");
|
|
@@ -7946,17 +8105,17 @@ function SettingsLayout({ area, pathname, sidebarId = "settings", labels, topNav
|
|
|
7946
8105
|
items: pages.map((p) => ({ id: p.id, href: p.href, icon: p.icon, label: p.title, current: isCurrent(pathname, p.href) })).filter((i) => !q || i.label.toLocaleLowerCase().includes(q) || section.title.toLocaleLowerCase().includes(q))
|
|
7947
8106
|
}));
|
|
7948
8107
|
const found = !q || sections.some((s) => s.items.length > 0);
|
|
7949
|
-
return /* @__PURE__ */
|
|
8108
|
+
return /* @__PURE__ */ jsx49(
|
|
7950
8109
|
AppShell,
|
|
7951
8110
|
{
|
|
7952
8111
|
...shell,
|
|
7953
8112
|
topNav,
|
|
7954
8113
|
sidebar: {
|
|
7955
8114
|
id: sidebarId,
|
|
7956
|
-
top: /* @__PURE__ */
|
|
8115
|
+
top: /* @__PURE__ */ jsx49(SearchInput, { size: "sm", value: find, onChange: (e) => setFind(e.target.value), placeholder: labels.find, "aria-label": labels.find }),
|
|
7957
8116
|
sections
|
|
7958
8117
|
},
|
|
7959
|
-
navFooter: !found ? /* @__PURE__ */
|
|
8118
|
+
navFooter: !found ? /* @__PURE__ */ jsx49(Text16, { textStyle: "caption", color: "fg.muted", px: "2", children: labels.noSetting }) : void 0,
|
|
7960
8119
|
children
|
|
7961
8120
|
}
|
|
7962
8121
|
);
|
|
@@ -7964,7 +8123,7 @@ function SettingsLayout({ area, pathname, sidebarId = "settings", labels, topNav
|
|
|
7964
8123
|
|
|
7965
8124
|
// src/components/SegmentedControl.tsx
|
|
7966
8125
|
import { SegmentGroup } from "@chakra-ui/react";
|
|
7967
|
-
import { jsx as
|
|
8126
|
+
import { jsx as jsx50, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
7968
8127
|
function SegmentedControl({
|
|
7969
8128
|
"aria-label": ariaLabel,
|
|
7970
8129
|
items,
|
|
@@ -7976,7 +8135,7 @@ function SegmentedControl({
|
|
|
7976
8135
|
}) {
|
|
7977
8136
|
const loading = useLoading(own);
|
|
7978
8137
|
const h = size === "sm" ? "7" : "8";
|
|
7979
|
-
return /* @__PURE__ */
|
|
8138
|
+
return /* @__PURE__ */ jsxs36(
|
|
7980
8139
|
SegmentGroup.Root,
|
|
7981
8140
|
{
|
|
7982
8141
|
size: size === "sm" ? "sm" : "md",
|
|
@@ -7993,8 +8152,8 @@ function SegmentedControl({
|
|
|
7993
8152
|
w: fitted ? "full" : void 0,
|
|
7994
8153
|
"data-segmented": "",
|
|
7995
8154
|
children: [
|
|
7996
|
-
/* @__PURE__ */
|
|
7997
|
-
items.map((item) => /* @__PURE__ */
|
|
8155
|
+
/* @__PURE__ */ jsx50(SegmentGroup.Indicator, {}),
|
|
8156
|
+
items.map((item) => /* @__PURE__ */ jsxs36(
|
|
7998
8157
|
SegmentGroup.Item,
|
|
7999
8158
|
{
|
|
8000
8159
|
value: item.value,
|
|
@@ -8015,9 +8174,9 @@ function SegmentedControl({
|
|
|
8015
8174
|
_icon: { boxSize: "4", flexShrink: 0 },
|
|
8016
8175
|
children: [
|
|
8017
8176
|
item.icon,
|
|
8018
|
-
/* @__PURE__ */
|
|
8019
|
-
item.count != null && /* @__PURE__ */
|
|
8020
|
-
/* @__PURE__ */
|
|
8177
|
+
/* @__PURE__ */ jsx50(SegmentGroup.ItemText, { children: item.label }),
|
|
8178
|
+
item.count != null && /* @__PURE__ */ jsx50(CountBadge, { value: item.count, tone: item.value === value ? "accent" : "neutral" }),
|
|
8179
|
+
/* @__PURE__ */ jsx50(SegmentGroup.ItemHiddenInput, {})
|
|
8021
8180
|
]
|
|
8022
8181
|
},
|
|
8023
8182
|
item.value
|
|
@@ -8029,7 +8188,7 @@ function SegmentedControl({
|
|
|
8029
8188
|
|
|
8030
8189
|
// src/components/KanbanBoard.tsx
|
|
8031
8190
|
import { useEffect as useEffect15, useLayoutEffect as useLayoutEffect4, useMemo as useMemo11, useRef as useRef18, useState as useState21 } from "react";
|
|
8032
|
-
import { Box as
|
|
8191
|
+
import { Box as Box12, chakra as chakra30, HStack as HStack11, Stack as Stack11, Text as Text17 } from "@chakra-ui/react";
|
|
8033
8192
|
import { Check as Check2, ChevronsLeft, ChevronsRight, GripVertical as GripVertical4 } from "lucide-react";
|
|
8034
8193
|
import {
|
|
8035
8194
|
DndContext as DndContext2,
|
|
@@ -8065,13 +8224,13 @@ function between(cell, from, to) {
|
|
|
8065
8224
|
}
|
|
8066
8225
|
|
|
8067
8226
|
// src/components/KanbanBoard.tsx
|
|
8068
|
-
import { Fragment as Fragment17, jsx as
|
|
8227
|
+
import { Fragment as Fragment17, jsx as jsx51, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
8069
8228
|
var SKELETON_CARDS = [3, 2, 4, 1, 2];
|
|
8070
8229
|
function PlaceholderCard({ index }) {
|
|
8071
|
-
return /* @__PURE__ */
|
|
8072
|
-
/* @__PURE__ */
|
|
8073
|
-
/* @__PURE__ */
|
|
8074
|
-
/* @__PURE__ */
|
|
8230
|
+
return /* @__PURE__ */ jsxs37(Box12, { bg: "bg.panel", borderWidth: "1px", borderColor: "border", rounded: "l2", p: "2.5", children: [
|
|
8231
|
+
/* @__PURE__ */ jsx51(Box12, { mb: "1", children: /* @__PURE__ */ jsx51(RecordKey, { loading: true }) }),
|
|
8232
|
+
/* @__PURE__ */ jsx51(Text17, { textStyle: "body.sm", children: /* @__PURE__ */ jsx51(TextBone, { width: boneWidth(index, 14, 34) }) }),
|
|
8233
|
+
/* @__PURE__ */ jsx51(HStack11, { mt: "2", children: /* @__PURE__ */ jsx51(StatusPill, { loading: true, skeletonWidth: boneWidth(index, 5, 9) }) })
|
|
8075
8234
|
] });
|
|
8076
8235
|
}
|
|
8077
8236
|
var cellId = (lane, column) => `cell:${lane}::${column}`;
|
|
@@ -8117,7 +8276,7 @@ function KanbanBoard({
|
|
|
8117
8276
|
ids.splice(to, 0, id);
|
|
8118
8277
|
onReorderColumns(ids);
|
|
8119
8278
|
};
|
|
8120
|
-
const shownColumns = loading && columns.length === 0 ? Array.from({ length: skeletonColumns }, (_, n) => ({ id: `skeleton-${n}`, title: /* @__PURE__ */
|
|
8279
|
+
const shownColumns = loading && columns.length === 0 ? Array.from({ length: skeletonColumns }, (_, n) => ({ id: `skeleton-${n}`, title: /* @__PURE__ */ jsx51(TextBone, { width: boneWidth(n, 6, 12) }) })) : columns;
|
|
8121
8280
|
const rows2 = lanes && lanes.length > 0 ? lanes : [{ id: "", title: null }];
|
|
8122
8281
|
const sensors = useSensors2(
|
|
8123
8282
|
useSensor2(PointerSensor2, { activationConstraint: { distance: 6 } }),
|
|
@@ -8229,7 +8388,7 @@ function KanbanBoard({
|
|
|
8229
8388
|
document.addEventListener("keydown", key);
|
|
8230
8389
|
return () => document.removeEventListener("keydown", key);
|
|
8231
8390
|
}, [onSelect, selected, active]);
|
|
8232
|
-
return /* @__PURE__ */
|
|
8391
|
+
return /* @__PURE__ */ jsxs37(
|
|
8233
8392
|
DndContext2,
|
|
8234
8393
|
{
|
|
8235
8394
|
sensors,
|
|
@@ -8242,8 +8401,8 @@ function KanbanBoard({
|
|
|
8242
8401
|
},
|
|
8243
8402
|
accessibility: { announcements, screenReaderInstructions: screenReaderInstructions ? { draggable: screenReaderInstructions } : void 0 },
|
|
8244
8403
|
children: [
|
|
8245
|
-
/* @__PURE__ */
|
|
8246
|
-
|
|
8404
|
+
/* @__PURE__ */ jsx51(
|
|
8405
|
+
Box12,
|
|
8247
8406
|
{
|
|
8248
8407
|
ref: region,
|
|
8249
8408
|
role: "region",
|
|
@@ -8255,8 +8414,8 @@ function KanbanBoard({
|
|
|
8255
8414
|
if (Date.now() - draggedAt.current < 300) return;
|
|
8256
8415
|
if (e.target instanceof Element && !e.target.closest("[data-card], a, button, input, select, textarea")) clear();
|
|
8257
8416
|
},
|
|
8258
|
-
children: /* @__PURE__ */
|
|
8259
|
-
|
|
8417
|
+
children: /* @__PURE__ */ jsx51(Loading, { when: loading, children: /* @__PURE__ */ jsxs37(
|
|
8418
|
+
Box12,
|
|
8260
8419
|
{
|
|
8261
8420
|
display: "grid",
|
|
8262
8421
|
gridTemplateColumns: shownColumns.map((c2) => folded.has(c2.id) ? "3rem" : "minmax(288px, 1fr)").join(" "),
|
|
@@ -8266,8 +8425,8 @@ function KanbanBoard({
|
|
|
8266
8425
|
shownColumns.map((c2) => {
|
|
8267
8426
|
const isFolded = folded.has(c2.id);
|
|
8268
8427
|
const name = c2.name ?? (typeof c2.title === "string" ? c2.title : c2.id);
|
|
8269
|
-
return /* @__PURE__ */
|
|
8270
|
-
|
|
8428
|
+
return /* @__PURE__ */ jsxs37(
|
|
8429
|
+
Box12,
|
|
8271
8430
|
{
|
|
8272
8431
|
position: "sticky",
|
|
8273
8432
|
top: "0",
|
|
@@ -8291,8 +8450,8 @@ function KanbanBoard({
|
|
|
8291
8450
|
}
|
|
8292
8451
|
} : {},
|
|
8293
8452
|
children: [
|
|
8294
|
-
overColumn === c2.id && movingColumn && movingColumn !== c2.id && /* @__PURE__ */
|
|
8295
|
-
|
|
8453
|
+
overColumn === c2.id && movingColumn && movingColumn !== c2.id && /* @__PURE__ */ jsx51(
|
|
8454
|
+
Box12,
|
|
8296
8455
|
{
|
|
8297
8456
|
position: "absolute",
|
|
8298
8457
|
inset: "0",
|
|
@@ -8308,11 +8467,11 @@ function KanbanBoard({
|
|
|
8308
8467
|
roundedTop: "l3",
|
|
8309
8468
|
bg: "bg.panel",
|
|
8310
8469
|
"data-drop-column": "",
|
|
8311
|
-
children: /* @__PURE__ */
|
|
8470
|
+
children: /* @__PURE__ */ jsx51(Text17, { textStyle: "caption", fontWeight: "bold", color: "fg.accent", truncate: true, children: dropColumnLabel(movingName) })
|
|
8312
8471
|
}
|
|
8313
8472
|
),
|
|
8314
|
-
isFolded ? /* @__PURE__ */
|
|
8315
|
-
|
|
8473
|
+
isFolded ? /* @__PURE__ */ jsx51(
|
|
8474
|
+
Stack11,
|
|
8316
8475
|
{
|
|
8317
8476
|
align: "center",
|
|
8318
8477
|
gap: "2",
|
|
@@ -8324,10 +8483,10 @@ function KanbanBoard({
|
|
|
8324
8483
|
roundedTop: "l3",
|
|
8325
8484
|
bg: c2.over ? "red.subtle" : "bg.subtle",
|
|
8326
8485
|
h: "full",
|
|
8327
|
-
children: /* @__PURE__ */
|
|
8486
|
+
children: /* @__PURE__ */ jsx51(FoldButton, { folded: true, label: foldLabel(name, true), onClick: () => fold(c2.id) })
|
|
8328
8487
|
}
|
|
8329
|
-
) : /* @__PURE__ */
|
|
8330
|
-
|
|
8488
|
+
) : /* @__PURE__ */ jsxs37(
|
|
8489
|
+
HStack11,
|
|
8331
8490
|
{
|
|
8332
8491
|
justify: "space-between",
|
|
8333
8492
|
gap: "2",
|
|
@@ -8343,8 +8502,8 @@ function KanbanBoard({
|
|
|
8343
8502
|
h: "full",
|
|
8344
8503
|
align: "start",
|
|
8345
8504
|
children: [
|
|
8346
|
-
/* @__PURE__ */
|
|
8347
|
-
onReorderColumns && !loading && /* @__PURE__ */
|
|
8505
|
+
/* @__PURE__ */ jsxs37(HStack11, { gap: "2", minW: "0", children: [
|
|
8506
|
+
onReorderColumns && !loading && /* @__PURE__ */ jsx51(
|
|
8348
8507
|
ColumnGrip,
|
|
8349
8508
|
{
|
|
8350
8509
|
label: reorderLabel(name, columns.findIndex((x) => x.id === c2.id) + 1, columns.length),
|
|
@@ -8357,11 +8516,11 @@ function KanbanBoard({
|
|
|
8357
8516
|
onStep: (by) => reorder(c2.id, columns.findIndex((x) => x.id === c2.id) + by)
|
|
8358
8517
|
}
|
|
8359
8518
|
),
|
|
8360
|
-
/* @__PURE__ */
|
|
8361
|
-
c2.count != null && /* @__PURE__ */
|
|
8362
|
-
c2.meta && /* @__PURE__ */
|
|
8519
|
+
/* @__PURE__ */ jsx51(Text17, { as: "span", textStyle: "label", truncate: true, display: "inline-flex", minW: "0", children: c2.title }),
|
|
8520
|
+
c2.count != null && /* @__PURE__ */ jsx51(CountBadge, { value: c2.count }),
|
|
8521
|
+
c2.meta && /* @__PURE__ */ jsx51(Text17, { textStyle: "caption", color: c2.over ? "fg.error" : "fg.muted", flexShrink: 0, children: c2.meta })
|
|
8363
8522
|
] }),
|
|
8364
|
-
!loading && /* @__PURE__ */
|
|
8523
|
+
!loading && /* @__PURE__ */ jsx51(FoldButton, { folded: false, label: foldLabel(name, false), onClick: () => fold(c2.id) })
|
|
8365
8524
|
]
|
|
8366
8525
|
}
|
|
8367
8526
|
)
|
|
@@ -8370,20 +8529,20 @@ function KanbanBoard({
|
|
|
8370
8529
|
c2.id
|
|
8371
8530
|
);
|
|
8372
8531
|
}),
|
|
8373
|
-
rows2.map((lane) => /* @__PURE__ */
|
|
8532
|
+
rows2.map((lane) => /* @__PURE__ */ jsx51(LaneRow, { lane, showTitle: !!lanes && lanes.length > 0, columns: shownColumns, span: shownColumns.length, children: shownColumns.map((c2, ci2) => {
|
|
8374
8533
|
const id = cellId(lane.id, c2.id);
|
|
8375
8534
|
const list = byCell.get(id) ?? [];
|
|
8376
8535
|
const allowed = active ? canDrop?.(active, c2.id, lane.id) !== false : true;
|
|
8377
8536
|
const last = lane.id === rows2[rows2.length - 1].id;
|
|
8378
8537
|
if (folded.has(c2.id)) {
|
|
8379
|
-
return /* @__PURE__ */
|
|
8380
|
-
lane.id === rows2[0].id && c2.count != null && /* @__PURE__ */
|
|
8381
|
-
lane.id === rows2[0].id && /* @__PURE__ */
|
|
8538
|
+
return /* @__PURE__ */ jsxs37(Cell, { id, allowed, dragging: !!active, items: [], column: c2.id, lane: lane.id, folded: true, last, children: [
|
|
8539
|
+
lane.id === rows2[0].id && c2.count != null && /* @__PURE__ */ jsx51(Box12, { alignSelf: "center", children: /* @__PURE__ */ jsx51(CountBadge, { value: c2.count }) }),
|
|
8540
|
+
lane.id === rows2[0].id && /* @__PURE__ */ jsx51(Box12, { css: { writingMode: "vertical-rl" }, alignSelf: "center", maxH: "56", overflow: "hidden", textStyle: "sm", title: c2.name, children: c2.title })
|
|
8382
8541
|
] }, id);
|
|
8383
8542
|
}
|
|
8384
8543
|
const footer = last && !loading ? columnFooter?.(c2.id) : null;
|
|
8385
|
-
return /* @__PURE__ */
|
|
8386
|
-
list.map((item) => /* @__PURE__ */
|
|
8544
|
+
return /* @__PURE__ */ jsxs37(Cell, { id, allowed, dragging: !!active, items: list.map((i) => i.id), column: c2.id, lane: lane.id, last, children: [
|
|
8545
|
+
list.map((item) => /* @__PURE__ */ jsx51(
|
|
8387
8546
|
SortableCard,
|
|
8388
8547
|
{
|
|
8389
8548
|
id: item.id,
|
|
@@ -8395,8 +8554,8 @@ function KanbanBoard({
|
|
|
8395
8554
|
item.id
|
|
8396
8555
|
)),
|
|
8397
8556
|
loading && list.length === 0 && // Not the board's cards: no data-slide, and not in its placement (ADR 0058's slides skip them).
|
|
8398
|
-
Array.from({ length: SKELETON_CARDS[ci2 % SKELETON_CARDS.length] }, (_, n) => /* @__PURE__ */
|
|
8399
|
-
!loading && list.length === 0 && empty && (typeof empty === "function" ? /* @__PURE__ */
|
|
8557
|
+
Array.from({ length: SKELETON_CARDS[ci2 % SKELETON_CARDS.length] }, (_, n) => /* @__PURE__ */ jsx51(Box12, { "aria-hidden": "true", children: skeletonCard ? skeletonCard(ci2 * 5 + n) : /* @__PURE__ */ jsx51(PlaceholderCard, { index: ci2 * 5 + n }) }, `skeleton-${n}`)),
|
|
8558
|
+
!loading && list.length === 0 && empty && (typeof empty === "function" ? /* @__PURE__ */ jsx51(EmptyState, { size: "xs", ...empty(c2.id) }) : /* @__PURE__ */ jsx51(EmptyState, { size: "xs", title: empty })),
|
|
8400
8559
|
footer
|
|
8401
8560
|
] }, id);
|
|
8402
8561
|
}) }, lane.id))
|
|
@@ -8405,24 +8564,24 @@ function KanbanBoard({
|
|
|
8405
8564
|
) })
|
|
8406
8565
|
}
|
|
8407
8566
|
),
|
|
8408
|
-
/* @__PURE__ */
|
|
8567
|
+
/* @__PURE__ */ jsx51(DragOverlay2, { dropAnimation: reduce ? null : landing, children: active ? /* @__PURE__ */ jsx51(Lifted, { carried: carried.length, reduce, count: carried.length > 1 ? carrying ? carrying(carried.length) : String(carried.length) : void 0, children: renderCard(active, { dragging: true }) }) : null })
|
|
8409
8568
|
]
|
|
8410
8569
|
}
|
|
8411
8570
|
);
|
|
8412
8571
|
}
|
|
8413
8572
|
function LaneRow({ lane, showTitle, span, children }) {
|
|
8414
|
-
return /* @__PURE__ */
|
|
8415
|
-
showTitle && /* @__PURE__ */
|
|
8416
|
-
/* @__PURE__ */
|
|
8417
|
-
lane.meta && /* @__PURE__ */
|
|
8573
|
+
return /* @__PURE__ */ jsxs37(Fragment17, { children: [
|
|
8574
|
+
showTitle && /* @__PURE__ */ jsxs37(HStack11, { gridColumn: `1 / span ${span}`, gap: "2", pt: "2", borderTopWidth: "1px", borderColor: "border.muted", "data-lane": lane.id, children: [
|
|
8575
|
+
/* @__PURE__ */ jsx51(Text17, { textStyle: "label", children: lane.title }),
|
|
8576
|
+
lane.meta && /* @__PURE__ */ jsx51(Text17, { textStyle: "caption", color: "fg.muted", children: lane.meta })
|
|
8418
8577
|
] }),
|
|
8419
8578
|
children
|
|
8420
8579
|
] });
|
|
8421
8580
|
}
|
|
8422
8581
|
function Cell({ id, items, allowed, dragging, column, lane, folded = false, last = true, children }) {
|
|
8423
8582
|
const { setNodeRef, isOver } = useDroppable2({ id, disabled: !allowed });
|
|
8424
|
-
return /* @__PURE__ */
|
|
8425
|
-
|
|
8583
|
+
return /* @__PURE__ */ jsx51(SortableContext, { id, items, strategy: verticalListSortingStrategy, children: /* @__PURE__ */ jsx51(
|
|
8584
|
+
Stack11,
|
|
8426
8585
|
{
|
|
8427
8586
|
ref: setNodeRef,
|
|
8428
8587
|
gap: "2",
|
|
@@ -8450,8 +8609,8 @@ function SortableCard({
|
|
|
8450
8609
|
children
|
|
8451
8610
|
}) {
|
|
8452
8611
|
const { attributes, listeners: listeners2, setNodeRef, transform, transition, isDragging } = useSortable({ id, animateLayoutChanges: () => false });
|
|
8453
|
-
return /* @__PURE__ */
|
|
8454
|
-
|
|
8612
|
+
return /* @__PURE__ */ jsxs37(
|
|
8613
|
+
Box12,
|
|
8455
8614
|
{
|
|
8456
8615
|
ref: setNodeRef,
|
|
8457
8616
|
position: "relative",
|
|
@@ -8469,8 +8628,8 @@ function SortableCard({
|
|
|
8469
8628
|
cursor: "grab",
|
|
8470
8629
|
_focusVisible: { outline: "2px solid", outlineColor: "colorPalette.focusRing", rounded: "l2" },
|
|
8471
8630
|
children: [
|
|
8472
|
-
/* @__PURE__ */
|
|
8473
|
-
selected && !isDragging && !riding && /* @__PURE__ */
|
|
8631
|
+
/* @__PURE__ */ jsx51(Box12, { "data-slide": id, children: children(isDragging) }),
|
|
8632
|
+
selected && !isDragging && !riding && /* @__PURE__ */ jsx51(Mark, {})
|
|
8474
8633
|
]
|
|
8475
8634
|
}
|
|
8476
8635
|
);
|
|
@@ -8498,9 +8657,9 @@ function Lifted({ carried, count, reduce, children }) {
|
|
|
8498
8657
|
held.current?.animate?.([{ transform: "none", boxShadow: tv("shadows.sm") }, { transform: HELD, boxShadow: tv("shadows.xl") }], { duration: 160, easing: OUT2 });
|
|
8499
8658
|
}, []);
|
|
8500
8659
|
const layers = Math.min(2, Math.max(0, carried - 1));
|
|
8501
|
-
return /* @__PURE__ */
|
|
8502
|
-
Array.from({ length: layers }, (_, i) => /* @__PURE__ */
|
|
8503
|
-
|
|
8660
|
+
return /* @__PURE__ */ jsxs37(Box12, { position: "relative", cursor: "grabbing", "data-testid": "drag-preview", children: [
|
|
8661
|
+
Array.from({ length: layers }, (_, i) => /* @__PURE__ */ jsx51(
|
|
8662
|
+
Box12,
|
|
8504
8663
|
{
|
|
8505
8664
|
"data-layer": true,
|
|
8506
8665
|
position: "absolute",
|
|
@@ -8514,8 +8673,8 @@ function Lifted({ carried, count, reduce, children }) {
|
|
|
8514
8673
|
},
|
|
8515
8674
|
i
|
|
8516
8675
|
)),
|
|
8517
|
-
/* @__PURE__ */
|
|
8518
|
-
count != null && /* @__PURE__ */
|
|
8676
|
+
/* @__PURE__ */ jsx51(Box12, { ref: held, "data-held": true, rounded: "l2", shadow: reduce ? "lg" : "xl", style: { transform: reduce ? void 0 : HELD, transformOrigin: "50% 40%" }, children }),
|
|
8677
|
+
count != null && /* @__PURE__ */ jsx51(Count, { children: count })
|
|
8519
8678
|
] });
|
|
8520
8679
|
}
|
|
8521
8680
|
function Mark() {
|
|
@@ -8528,8 +8687,8 @@ function Mark() {
|
|
|
8528
8687
|
easing: OUT2
|
|
8529
8688
|
});
|
|
8530
8689
|
}, []);
|
|
8531
|
-
return /* @__PURE__ */
|
|
8532
|
-
|
|
8690
|
+
return /* @__PURE__ */ jsx51(
|
|
8691
|
+
chakra30.span,
|
|
8533
8692
|
{
|
|
8534
8693
|
ref,
|
|
8535
8694
|
position: "absolute",
|
|
@@ -8545,13 +8704,13 @@ function Mark() {
|
|
|
8545
8704
|
pointerEvents: "none",
|
|
8546
8705
|
"aria-hidden": "true",
|
|
8547
8706
|
_icon: { boxSize: "3" },
|
|
8548
|
-
children: /* @__PURE__ */
|
|
8707
|
+
children: /* @__PURE__ */ jsx51(Check2, { strokeWidth: 3 })
|
|
8549
8708
|
}
|
|
8550
8709
|
);
|
|
8551
8710
|
}
|
|
8552
8711
|
function Count({ children }) {
|
|
8553
|
-
return /* @__PURE__ */
|
|
8554
|
-
|
|
8712
|
+
return /* @__PURE__ */ jsx51(
|
|
8713
|
+
chakra30.span,
|
|
8555
8714
|
{
|
|
8556
8715
|
position: "absolute",
|
|
8557
8716
|
top: "-3.5",
|
|
@@ -8573,8 +8732,8 @@ function Count({ children }) {
|
|
|
8573
8732
|
);
|
|
8574
8733
|
}
|
|
8575
8734
|
function FoldButton({ folded, label, onClick }) {
|
|
8576
|
-
return /* @__PURE__ */
|
|
8577
|
-
|
|
8735
|
+
return /* @__PURE__ */ jsx51(
|
|
8736
|
+
chakra30.button,
|
|
8578
8737
|
{
|
|
8579
8738
|
type: "button",
|
|
8580
8739
|
display: "inline-flex",
|
|
@@ -8594,7 +8753,7 @@ function FoldButton({ folded, label, onClick }) {
|
|
|
8594
8753
|
title: label,
|
|
8595
8754
|
"aria-expanded": !folded,
|
|
8596
8755
|
onClick,
|
|
8597
|
-
children: /* @__PURE__ */
|
|
8756
|
+
children: /* @__PURE__ */ jsx51(DirectionalIcon, { children: folded ? /* @__PURE__ */ jsx51(ChevronsRight, { size: 16 }) : /* @__PURE__ */ jsx51(ChevronsLeft, { size: 16 }) })
|
|
8598
8757
|
}
|
|
8599
8758
|
);
|
|
8600
8759
|
}
|
|
@@ -8624,8 +8783,8 @@ function useFolded(key) {
|
|
|
8624
8783
|
return [folded, fold];
|
|
8625
8784
|
}
|
|
8626
8785
|
function ColumnGrip({ label, moving, onDragStart, onDragEnd, onStep }) {
|
|
8627
|
-
return /* @__PURE__ */
|
|
8628
|
-
|
|
8786
|
+
return /* @__PURE__ */ jsx51(
|
|
8787
|
+
chakra30.button,
|
|
8629
8788
|
{
|
|
8630
8789
|
type: "button",
|
|
8631
8790
|
draggable: true,
|
|
@@ -8658,27 +8817,27 @@ function ColumnGrip({ label, moving, onDragStart, onDragEnd, onStep }) {
|
|
|
8658
8817
|
onDragStart();
|
|
8659
8818
|
},
|
|
8660
8819
|
onDragEnd,
|
|
8661
|
-
children: /* @__PURE__ */
|
|
8820
|
+
children: /* @__PURE__ */ jsx51(GripVertical4, {})
|
|
8662
8821
|
}
|
|
8663
8822
|
);
|
|
8664
8823
|
}
|
|
8665
8824
|
|
|
8666
8825
|
// src/components/LoadingState.tsx
|
|
8667
|
-
import { Box as
|
|
8668
|
-
import { jsx as
|
|
8826
|
+
import { Box as Box13, VisuallyHidden as VisuallyHidden2 } from "@chakra-ui/react";
|
|
8827
|
+
import { jsx as jsx52, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
8669
8828
|
function LoadingState({ lines = 3, label }) {
|
|
8670
8829
|
const labels = useAbpLabels();
|
|
8671
|
-
return /* @__PURE__ */
|
|
8672
|
-
/* @__PURE__ */
|
|
8673
|
-
/* @__PURE__ */
|
|
8830
|
+
return /* @__PURE__ */ jsxs38(Box13, { "aria-busy": "true", role: "status", children: [
|
|
8831
|
+
/* @__PURE__ */ jsx52(VisuallyHidden2, { children: label ?? labels.loading }),
|
|
8832
|
+
/* @__PURE__ */ jsx52(TextBone, { lines, width: "full" })
|
|
8674
8833
|
] });
|
|
8675
8834
|
}
|
|
8676
8835
|
|
|
8677
8836
|
// src/components/PageHeader.tsx
|
|
8678
8837
|
import { Fragment as Fragment18 } from "react";
|
|
8679
|
-
import { Breadcrumb, chakra as
|
|
8838
|
+
import { Breadcrumb, chakra as chakra31, Menu as Menu4, Portal as Portal13, useSlotRecipe as useSlotRecipe4 } from "@chakra-ui/react";
|
|
8680
8839
|
import { ChevronRight as ChevronRight3 } from "lucide-react";
|
|
8681
|
-
import { jsx as
|
|
8840
|
+
import { jsx as jsx53, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
8682
8841
|
var textOf = (label) => typeof label === "string" || typeof label === "number" ? String(label) : void 0;
|
|
8683
8842
|
function PageHeader({ title, description, breadcrumbs, meta, count, adornments, actions, loading: own, titleWidth = 24, documentTitle }) {
|
|
8684
8843
|
const recipe = useSlotRecipe4({ key: "abpPageHeader" });
|
|
@@ -8687,33 +8846,33 @@ function PageHeader({ title, description, breadcrumbs, meta, count, adornments,
|
|
|
8687
8846
|
usePageTitle(documentTitle !== void 0 ? documentTitle : text ? [text, where] : null);
|
|
8688
8847
|
const styles = recipe({});
|
|
8689
8848
|
const loading = useLoading(own);
|
|
8690
|
-
return /* @__PURE__ */
|
|
8691
|
-
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */
|
|
8692
|
-
/* @__PURE__ */
|
|
8693
|
-
/* @__PURE__ */
|
|
8694
|
-
count != null || adornments != null ? /* @__PURE__ */
|
|
8695
|
-
/* @__PURE__ */
|
|
8696
|
-
count != null && /* @__PURE__ */
|
|
8849
|
+
return /* @__PURE__ */ jsxs39(chakra31.div, { css: styles.root, children: [
|
|
8850
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx53(Breadcrumbs, { items: breadcrumbs }),
|
|
8851
|
+
/* @__PURE__ */ jsxs39(chakra31.div, { css: styles.row, children: [
|
|
8852
|
+
/* @__PURE__ */ jsxs39(chakra31.div, { css: styles.titleGroup, children: [
|
|
8853
|
+
count != null || adornments != null ? /* @__PURE__ */ jsxs39(chakra31.div, { display: "flex", alignItems: "center", gap: "2.5", flexWrap: "wrap", minW: "0", children: [
|
|
8854
|
+
/* @__PURE__ */ jsx53(chakra31.h1, { css: styles.title, children: loading && title == null ? /* @__PURE__ */ jsx53(TextBone, { width: titleWidth }) : title }),
|
|
8855
|
+
count != null && /* @__PURE__ */ jsx53(CountBadge, { value: count, size: "md" }),
|
|
8697
8856
|
adornments
|
|
8698
|
-
] }) : /* @__PURE__ */
|
|
8699
|
-
meta != null && /* @__PURE__ */
|
|
8700
|
-
description != null && /* @__PURE__ */
|
|
8857
|
+
] }) : /* @__PURE__ */ jsx53(chakra31.h1, { css: styles.title, children: loading && title == null ? /* @__PURE__ */ jsx53(TextBone, { width: titleWidth }) : title }),
|
|
8858
|
+
meta != null && /* @__PURE__ */ jsx53(chakra31.div, { css: styles.meta, children: meta }),
|
|
8859
|
+
description != null && /* @__PURE__ */ jsx53(chakra31.p, { css: styles.description, children: description })
|
|
8701
8860
|
] }),
|
|
8702
|
-
actions != null && /* @__PURE__ */
|
|
8861
|
+
actions != null && /* @__PURE__ */ jsx53(chakra31.div, { css: styles.actions, children: actions })
|
|
8703
8862
|
] })
|
|
8704
8863
|
] });
|
|
8705
8864
|
}
|
|
8706
8865
|
function Breadcrumbs({ items, loading: own }) {
|
|
8707
8866
|
const labels = useAbpLabels();
|
|
8708
8867
|
const loading = useLoading(own);
|
|
8709
|
-
const label = (item, i) => loading && item.label == null ? /* @__PURE__ */
|
|
8868
|
+
const label = (item, i) => loading && item.label == null ? /* @__PURE__ */ jsx53(TextBone, { width: 8 + i % 3 * 3 }) : item.label;
|
|
8710
8869
|
const Link = useLinkComponent();
|
|
8711
8870
|
const { shown, hidden } = foldBreadcrumbs(items);
|
|
8712
|
-
return /* @__PURE__ */
|
|
8713
|
-
n > 0 && /* @__PURE__ */
|
|
8714
|
-
entry == null ? /* @__PURE__ */
|
|
8715
|
-
/* @__PURE__ */
|
|
8716
|
-
|
|
8871
|
+
return /* @__PURE__ */ jsx53(Breadcrumb.Root, { "aria-label": labels.breadcrumb, children: /* @__PURE__ */ jsx53(Breadcrumb.List, { children: shown.map((entry, n) => /* @__PURE__ */ jsxs39(Fragment18, { children: [
|
|
8872
|
+
n > 0 && /* @__PURE__ */ jsx53(Breadcrumb.Separator, { children: /* @__PURE__ */ jsx53(ChevronRight3, {}) }),
|
|
8873
|
+
entry == null ? /* @__PURE__ */ jsx53(Breadcrumb.Item, { children: /* @__PURE__ */ jsxs39(Menu4.Root, { positioning: { placement: "bottom-start" }, children: [
|
|
8874
|
+
/* @__PURE__ */ jsx53(Menu4.Trigger, { asChild: true, children: /* @__PURE__ */ jsx53(
|
|
8875
|
+
chakra31.button,
|
|
8717
8876
|
{
|
|
8718
8877
|
type: "button",
|
|
8719
8878
|
px: "1",
|
|
@@ -8727,19 +8886,19 @@ function Breadcrumbs({ items, loading: own }) {
|
|
|
8727
8886
|
children: "\u2026"
|
|
8728
8887
|
}
|
|
8729
8888
|
) }),
|
|
8730
|
-
/* @__PURE__ */
|
|
8731
|
-
] }) }) : /* @__PURE__ */
|
|
8889
|
+
/* @__PURE__ */ jsx53(Portal13, { children: /* @__PURE__ */ jsx53(Menu4.Positioner, { children: /* @__PURE__ */ jsx53(Menu4.Content, { minW: "40", children: hidden.map((h, k) => /* @__PURE__ */ jsx53(Menu4.Item, { value: String(k), asChild: Boolean(h.href), children: h.href ? /* @__PURE__ */ jsx53(Link, { href: h.href, children: h.label }) : /* @__PURE__ */ jsx53("span", { children: h.label }) }, k)) }) }) })
|
|
8890
|
+
] }) }) : /* @__PURE__ */ jsx53(Breadcrumb.Item, { children: entry.item.href && entry.index < items.length - 1 ? /* @__PURE__ */ jsx53(Breadcrumb.Link, { asChild: true, children: /* @__PURE__ */ jsx53(Link, { href: entry.item.href, children: label(entry.item, entry.index) }) }) : /* @__PURE__ */ jsx53(Breadcrumb.CurrentLink, { children: label(entry.item, entry.index) }) })
|
|
8732
8891
|
] }, entry ? entry.index : "more")) }) });
|
|
8733
8892
|
}
|
|
8734
8893
|
|
|
8735
8894
|
// src/components/Panel.tsx
|
|
8736
|
-
import { createContext as createContext11, forwardRef as forwardRef8, useContext as useContext11, useId as
|
|
8737
|
-
import { chakra as
|
|
8895
|
+
import { createContext as createContext11, forwardRef as forwardRef8, useContext as useContext11, useId as useId8, useState as useState22 } from "react";
|
|
8896
|
+
import { chakra as chakra32, useSlotRecipe as useSlotRecipe5 } from "@chakra-ui/react";
|
|
8738
8897
|
import { ChevronRight as ChevronRight4 } from "lucide-react";
|
|
8739
|
-
import { Fragment as Fragment19, jsx as
|
|
8898
|
+
import { Fragment as Fragment19, jsx as jsx54, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
8740
8899
|
var ToneContext = createContext11("card");
|
|
8741
8900
|
function PanelTone({ tone, children }) {
|
|
8742
|
-
return /* @__PURE__ */
|
|
8901
|
+
return /* @__PURE__ */ jsx54(ToneContext.Provider, { value: tone, children });
|
|
8743
8902
|
}
|
|
8744
8903
|
var Panel = forwardRef8(function Panel2({
|
|
8745
8904
|
title,
|
|
@@ -8764,71 +8923,71 @@ var Panel = forwardRef8(function Panel2({
|
|
|
8764
8923
|
const [ownCollapsed, setOwnCollapsed] = useState22(defaultCollapsed);
|
|
8765
8924
|
const folded = collapsible && (collapsedProp ?? ownCollapsed);
|
|
8766
8925
|
const styles = recipe({ flush, tone: tone ?? inherited, collapsed: folded });
|
|
8767
|
-
const bodyId =
|
|
8926
|
+
const bodyId = useId8();
|
|
8768
8927
|
const hasHeader = title != null || actions != null || description != null;
|
|
8769
8928
|
const toggle = () => {
|
|
8770
8929
|
const next = !folded;
|
|
8771
8930
|
if (collapsedProp === void 0) setOwnCollapsed(next);
|
|
8772
8931
|
onCollapsedChange?.(next);
|
|
8773
8932
|
};
|
|
8774
|
-
const heading = /* @__PURE__ */
|
|
8775
|
-
title != null && /* @__PURE__ */
|
|
8776
|
-
description != null && !folded && /* @__PURE__ */
|
|
8933
|
+
const heading = /* @__PURE__ */ jsxs40(chakra32.div, { css: styles.titleGroup, children: [
|
|
8934
|
+
title != null && /* @__PURE__ */ jsx54(chakra32.h2, { as: headingAs, css: styles.title, children: title }),
|
|
8935
|
+
description != null && !folded && /* @__PURE__ */ jsx54(chakra32.p, { css: styles.description, children: description })
|
|
8777
8936
|
] });
|
|
8778
|
-
const content = /* @__PURE__ */
|
|
8779
|
-
/* @__PURE__ */
|
|
8780
|
-
footer != null && /* @__PURE__ */
|
|
8937
|
+
const content = /* @__PURE__ */ jsxs40(Fragment19, { children: [
|
|
8938
|
+
/* @__PURE__ */ jsx54(chakra32.div, { css: styles.body, children: loading === void 0 ? children : /* @__PURE__ */ jsx54(Loading, { when: loading, children }) }),
|
|
8939
|
+
footer != null && /* @__PURE__ */ jsx54(chakra32.footer, { css: styles.footer, children: footer })
|
|
8781
8940
|
] });
|
|
8782
|
-
return /* @__PURE__ */
|
|
8783
|
-
hasHeader && /* @__PURE__ */
|
|
8784
|
-
collapsible ? /* @__PURE__ */
|
|
8785
|
-
/* @__PURE__ */
|
|
8941
|
+
return /* @__PURE__ */ jsxs40(chakra32.section, { ref, css: [styles.root, css], "data-collapsed": folded ? "" : void 0, ...rest, children: [
|
|
8942
|
+
hasHeader && /* @__PURE__ */ jsxs40(chakra32.header, { css: styles.header, children: [
|
|
8943
|
+
collapsible ? /* @__PURE__ */ jsxs40(chakra32.button, { type: "button", css: styles.toggle, "aria-expanded": !folded, "aria-controls": bodyId, onClick: toggle, children: [
|
|
8944
|
+
/* @__PURE__ */ jsx54(chakra32.span, { css: styles.chevron, "data-open": folded ? void 0 : "", "aria-hidden": true, children: /* @__PURE__ */ jsx54(ChevronRight4, { size: 16 }) }),
|
|
8786
8945
|
heading,
|
|
8787
|
-
folded && summary != null && /* @__PURE__ */
|
|
8946
|
+
folded && summary != null && /* @__PURE__ */ jsx54(chakra32.span, { css: styles.summary, children: summary })
|
|
8788
8947
|
] }) : heading,
|
|
8789
|
-
actions != null && /* @__PURE__ */
|
|
8948
|
+
actions != null && /* @__PURE__ */ jsx54(chakra32.div, { css: styles.actions, children: actions })
|
|
8790
8949
|
] }),
|
|
8791
|
-
collapsible ? /* @__PURE__ */
|
|
8950
|
+
collapsible ? /* @__PURE__ */ jsx54(Collapse, { open: !folded, id: bodyId, display: "flex", flexDirection: "column", flex: "1", minW: "0", children: content }) : content
|
|
8792
8951
|
] });
|
|
8793
8952
|
});
|
|
8794
8953
|
|
|
8795
8954
|
// src/components/PathChips.tsx
|
|
8796
|
-
import { chakra as
|
|
8955
|
+
import { chakra as chakra33, useSlotRecipe as useSlotRecipe6 } from "@chakra-ui/react";
|
|
8797
8956
|
import { ChevronRight as ChevronRight5 } from "lucide-react";
|
|
8798
|
-
import { jsx as
|
|
8957
|
+
import { jsx as jsx55, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
8799
8958
|
function PathChips({ path, highlightLast = true, loading: own, skeletonCount = 3, css, ...rest }) {
|
|
8800
8959
|
const labels = useAbpLabels();
|
|
8801
8960
|
const recipe = useSlotRecipe6({ key: "abpPathChips" });
|
|
8802
8961
|
const styles = recipe({});
|
|
8803
8962
|
const loading = useLoading(own) && path.length === 0;
|
|
8804
8963
|
const segments = loading ? Array.from({ length: skeletonCount }, (_, i) => "\xA0".repeat(boneWidth(i, 6, 12))) : path;
|
|
8805
|
-
return /* @__PURE__ */
|
|
8806
|
-
i > 0 && /* @__PURE__ */
|
|
8807
|
-
/* @__PURE__ */
|
|
8964
|
+
return /* @__PURE__ */ jsx55(chakra33.ol, { "aria-label": rest["aria-label"] ?? labels.path, "aria-hidden": loading || void 0, css: [styles.root, css], ...rest, children: segments.map((segment, i) => /* @__PURE__ */ jsxs41(chakra33.li, { css: styles.item, children: [
|
|
8965
|
+
i > 0 && /* @__PURE__ */ jsx55(chakra33.span, { css: styles.separator, "aria-hidden": "true", children: /* @__PURE__ */ jsx55(ChevronRight5, {}) }),
|
|
8966
|
+
/* @__PURE__ */ jsx55(chakra33.span, { css: loading ? [styles.chip, ghostCss] : styles.chip, "aria-current": !loading && highlightLast && i === path.length - 1 ? true : void 0, children: segment })
|
|
8808
8967
|
] }, `${i}:${segment}`)) });
|
|
8809
8968
|
}
|
|
8810
8969
|
|
|
8811
8970
|
// src/components/PropertyList.tsx
|
|
8812
|
-
import { chakra as
|
|
8813
|
-
import { jsx as
|
|
8971
|
+
import { chakra as chakra34, DataList } from "@chakra-ui/react";
|
|
8972
|
+
import { jsx as jsx56, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
8814
8973
|
function PropertyList({ items, size = "md", loading: own }) {
|
|
8815
8974
|
const loading = useLoading(own);
|
|
8816
8975
|
const arriving = useArriving(loading);
|
|
8817
|
-
return /* @__PURE__ */
|
|
8818
|
-
/* @__PURE__ */
|
|
8819
|
-
/* @__PURE__ */
|
|
8976
|
+
return /* @__PURE__ */ jsx56(DataList.Root, { orientation: "horizontal", size, children: items.map((item, i) => /* @__PURE__ */ jsxs42(DataList.Item, { children: [
|
|
8977
|
+
/* @__PURE__ */ jsx56(DataList.ItemLabel, { children: item.label }),
|
|
8978
|
+
/* @__PURE__ */ jsx56(DataList.ItemValue, { children: loading && item.value == null ? /* @__PURE__ */ jsx56(TextBone, { width: item.skeletonWidth ?? boneWidth(i, 8, 16) }) : arriving ? /* @__PURE__ */ jsx56(chakra34.span, { css: arriveCss, children: item.value }) : item.value })
|
|
8820
8979
|
] }, item.id ?? i)) });
|
|
8821
8980
|
}
|
|
8822
8981
|
|
|
8823
8982
|
// src/components/QueryableList.tsx
|
|
8824
|
-
import { useEffect as useEffect18, useId as
|
|
8983
|
+
import { useEffect as useEffect18, useId as useId10, useMemo as useMemo14, useRef as useRef20, useState as useState25 } from "react";
|
|
8825
8984
|
import { createPortal } from "react-dom";
|
|
8826
|
-
import { Box as
|
|
8985
|
+
import { Box as Box14, chakra as chakra37, HStack as HStack14, Input as Input8, Menu as Menu5, Portal as Portal17, Stack as Stack15, Text as Text21 } from "@chakra-ui/react";
|
|
8827
8986
|
import { ArrowDownWideNarrow, ArrowUpNarrowWide, ChevronDown as ChevronDown3, Download, Filter, Rows3, Save, Trash2 as Trash22, X as X2 } from "lucide-react";
|
|
8828
8987
|
|
|
8829
8988
|
// src/components/query/ColumnsPopover.tsx
|
|
8830
8989
|
import { useMemo as useMemo12 } from "react";
|
|
8831
|
-
import { chakra as
|
|
8990
|
+
import { chakra as chakra35, HStack as HStack12, Popover as Popover3, Portal as Portal14, Stack as Stack12, Switch as Switch2, Text as Text18 } from "@chakra-ui/react";
|
|
8832
8991
|
import {
|
|
8833
8992
|
closestCenter,
|
|
8834
8993
|
DndContext as DndContext3,
|
|
@@ -8840,7 +8999,7 @@ import {
|
|
|
8840
8999
|
import { arrayMove, SortableContext as SortableContext2, sortableKeyboardCoordinates as sortableKeyboardCoordinates2, useSortable as useSortable2, verticalListSortingStrategy as verticalListSortingStrategy2 } from "@dnd-kit/sortable";
|
|
8841
9000
|
import { CSS as CSS3 } from "@dnd-kit/utilities";
|
|
8842
9001
|
import { Columns3, GripVertical as GripVertical5 } from "lucide-react";
|
|
8843
|
-
import { jsx as
|
|
9002
|
+
import { jsx as jsx57, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
8844
9003
|
function fill2(template, values) {
|
|
8845
9004
|
return template.replace(/\{(\w+)\}/g, (_, k) => values[k] ?? `{${k}}`);
|
|
8846
9005
|
}
|
|
@@ -8857,19 +9016,19 @@ function ColumnsPopover({ fields, columns, onChange }) {
|
|
|
8857
9016
|
if (from < 0 || to < 0) return;
|
|
8858
9017
|
onChange(arrayMove(columns, from, to));
|
|
8859
9018
|
}
|
|
8860
|
-
return /* @__PURE__ */
|
|
8861
|
-
/* @__PURE__ */
|
|
8862
|
-
/* @__PURE__ */
|
|
9019
|
+
return /* @__PURE__ */ jsxs43(Popover3.Root, { positioning: { placement: "bottom-end" }, lazyMount: true, unmountOnExit: true, children: [
|
|
9020
|
+
/* @__PURE__ */ jsx57(Popover3.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs43(Button, { size: "sm", variant: "secondary", disabled: fields.length === 0, children: [
|
|
9021
|
+
/* @__PURE__ */ jsx57(Columns3, {}),
|
|
8863
9022
|
labels.columns
|
|
8864
9023
|
] }) }),
|
|
8865
|
-
/* @__PURE__ */
|
|
8866
|
-
/* @__PURE__ */
|
|
8867
|
-
/* @__PURE__ */
|
|
8868
|
-
/* @__PURE__ */
|
|
9024
|
+
/* @__PURE__ */ jsx57(Portal14, { children: /* @__PURE__ */ jsx57(Popover3.Positioner, { children: /* @__PURE__ */ jsx57(Popover3.Content, { w: "80", maxW: "calc(100vw - 2rem)", children: /* @__PURE__ */ jsxs43(Popover3.Body, { p: "0", children: [
|
|
9025
|
+
/* @__PURE__ */ jsxs43(HStack12, { justify: "space-between", px: "3.5", pt: "3", pb: "1", children: [
|
|
9026
|
+
/* @__PURE__ */ jsx57(Text18, { textStyle: "sm", fontWeight: "semibold", children: labels.visibleColumns }),
|
|
9027
|
+
/* @__PURE__ */ jsx57(Button, { size: "xs", variant: "ghost", disabled: hidden.length === 0, onClick: () => onChange([...columns, ...hidden.map((f) => f.id)]), children: labels.showAllColumns })
|
|
8869
9028
|
] }),
|
|
8870
|
-
/* @__PURE__ */
|
|
8871
|
-
/* @__PURE__ */
|
|
8872
|
-
/* @__PURE__ */
|
|
9029
|
+
/* @__PURE__ */ jsx57(Text18, { textStyle: "caption", color: "fg.muted", px: "3.5", pb: "2", children: labels.columnsHint }),
|
|
9030
|
+
/* @__PURE__ */ jsxs43(chakra35.div, { maxH: "80", overflowY: "auto", pb: "2", children: [
|
|
9031
|
+
/* @__PURE__ */ jsx57(DndContext3, { sensors, collisionDetection: closestCenter, onDragEnd, children: /* @__PURE__ */ jsx57(SortableContext2, { items: shown, strategy: verticalListSortingStrategy2, children: /* @__PURE__ */ jsx57(Stack12, { gap: "0", role: "list", "aria-label": labels.visibleColumns, children: shown.map((id) => /* @__PURE__ */ jsx57(
|
|
8873
9032
|
ColumnRow,
|
|
8874
9033
|
{
|
|
8875
9034
|
id,
|
|
@@ -8880,7 +9039,7 @@ function ColumnsPopover({ fields, columns, onChange }) {
|
|
|
8880
9039
|
},
|
|
8881
9040
|
id
|
|
8882
9041
|
)) }) }) }),
|
|
8883
|
-
hidden.length > 0 && /* @__PURE__ */
|
|
9042
|
+
hidden.length > 0 && /* @__PURE__ */ jsx57(Stack12, { gap: "0", borderTopWidth: "1px", borderColor: "border.muted", mt: "1", pt: "1", role: "list", "aria-label": labels.hiddenColumns, children: hidden.map((f) => /* @__PURE__ */ jsx57(ColumnRow, { id: f.id, label: f.label, checked: false, onCheckedChange: () => onChange([...columns, f.id]) }, f.id)) })
|
|
8884
9043
|
] })
|
|
8885
9044
|
] }) }) }) })
|
|
8886
9045
|
] });
|
|
@@ -8889,8 +9048,8 @@ function ColumnRow({ id, label, checked, disabled, onCheckedChange }) {
|
|
|
8889
9048
|
const labels = useAbpLabels().queryList;
|
|
8890
9049
|
const sortable = useSortable2({ id, disabled: !checked });
|
|
8891
9050
|
const { attributes, listeners: listeners2, setNodeRef, transform, transition, isDragging } = sortable;
|
|
8892
|
-
return /* @__PURE__ */
|
|
8893
|
-
|
|
9051
|
+
return /* @__PURE__ */ jsxs43(
|
|
9052
|
+
HStack12,
|
|
8894
9053
|
{
|
|
8895
9054
|
ref: setNodeRef,
|
|
8896
9055
|
role: "listitem",
|
|
@@ -8906,8 +9065,8 @@ function ColumnRow({ id, label, checked, disabled, onCheckedChange }) {
|
|
|
8906
9065
|
style: { transform: CSS3.Transform.toString(transform), transition },
|
|
8907
9066
|
_hover: { bg: "bg.subtle" },
|
|
8908
9067
|
children: [
|
|
8909
|
-
checked ? /* @__PURE__ */
|
|
8910
|
-
|
|
9068
|
+
checked ? /* @__PURE__ */ jsx57(
|
|
9069
|
+
chakra35.button,
|
|
8911
9070
|
{
|
|
8912
9071
|
type: "button",
|
|
8913
9072
|
display: "inline-flex",
|
|
@@ -8919,13 +9078,13 @@ function ColumnRow({ id, label, checked, disabled, onCheckedChange }) {
|
|
|
8919
9078
|
"aria-label": fill2(labels.dragColumn, { field: label }),
|
|
8920
9079
|
...attributes,
|
|
8921
9080
|
...listeners2,
|
|
8922
|
-
children: /* @__PURE__ */
|
|
9081
|
+
children: /* @__PURE__ */ jsx57(GripVertical5, { size: 16 })
|
|
8923
9082
|
}
|
|
8924
|
-
) : /* @__PURE__ */
|
|
8925
|
-
/* @__PURE__ */
|
|
8926
|
-
/* @__PURE__ */
|
|
8927
|
-
/* @__PURE__ */
|
|
8928
|
-
/* @__PURE__ */
|
|
9083
|
+
) : /* @__PURE__ */ jsx57(chakra35.span, { w: "4", flexShrink: 0 }),
|
|
9084
|
+
/* @__PURE__ */ jsx57(Text18, { as: "span", flex: "1", textStyle: "sm", truncate: true, color: checked ? "fg" : "fg.muted", children: label }),
|
|
9085
|
+
/* @__PURE__ */ jsxs43(Switch2.Root, { size: "sm", colorPalette: "accent", checked, disabled, onCheckedChange, "aria-label": label, children: [
|
|
9086
|
+
/* @__PURE__ */ jsx57(Switch2.HiddenInput, {}),
|
|
9087
|
+
/* @__PURE__ */ jsx57(Switch2.Control, { children: /* @__PURE__ */ jsx57(Switch2.Thumb, {}) })
|
|
8929
9088
|
] })
|
|
8930
9089
|
]
|
|
8931
9090
|
}
|
|
@@ -8933,10 +9092,10 @@ function ColumnRow({ id, label, checked, disabled, onCheckedChange }) {
|
|
|
8933
9092
|
}
|
|
8934
9093
|
|
|
8935
9094
|
// src/components/query/FilterBuilder.tsx
|
|
8936
|
-
import { useEffect as useEffect16, useId as
|
|
8937
|
-
import { CloseButton as CloseButton3, Dialog as Dialog5, HStack as
|
|
9095
|
+
import { useEffect as useEffect16, useId as useId9, useRef as useRef19, useState as useState23 } from "react";
|
|
9096
|
+
import { CloseButton as CloseButton3, Dialog as Dialog5, HStack as HStack13, Input as Input7, Portal as Portal15, Stack as Stack13, Text as Text19 } from "@chakra-ui/react";
|
|
8938
9097
|
import { Trash2 } from "lucide-react";
|
|
8939
|
-
import { Fragment as Fragment20, jsx as
|
|
9098
|
+
import { Fragment as Fragment20, jsx as jsx58, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
8940
9099
|
function fill3(template, values) {
|
|
8941
9100
|
return template.replace(/\{(\w+)\}/g, (_, k) => String(values[k] ?? `{${k}}`));
|
|
8942
9101
|
}
|
|
@@ -8992,23 +9151,23 @@ function FilterBuilderDialog({ fields, initial, suggest, renderValueEditor, coun
|
|
|
8992
9151
|
setSeq((n) => n + 1);
|
|
8993
9152
|
};
|
|
8994
9153
|
const change = (id, patch) => setRows((r) => r.map((d) => d.id === id ? { ...d, ...patch, dirty: true } : d));
|
|
8995
|
-
return /* @__PURE__ */
|
|
8996
|
-
/* @__PURE__ */
|
|
8997
|
-
/* @__PURE__ */
|
|
8998
|
-
/* @__PURE__ */
|
|
8999
|
-
/* @__PURE__ */
|
|
9000
|
-
/* @__PURE__ */
|
|
9154
|
+
return /* @__PURE__ */ jsx58(Dialog5.Root, { open: true, onOpenChange: (e) => !e.open && onClose(), size: "lg", placement: "center", scrollBehavior: "inside", children: /* @__PURE__ */ jsxs44(Portal15, { children: [
|
|
9155
|
+
/* @__PURE__ */ jsx58(Dialog5.Backdrop, {}),
|
|
9156
|
+
/* @__PURE__ */ jsx58(Dialog5.Positioner, { children: /* @__PURE__ */ jsxs44(Dialog5.Content, { "data-filter-builder": "", children: [
|
|
9157
|
+
/* @__PURE__ */ jsx58(Dialog5.Header, { children: /* @__PURE__ */ jsxs44(HStack13, { justify: "space-between", w: "full", gap: "3", children: [
|
|
9158
|
+
/* @__PURE__ */ jsx58(Dialog5.Title, { children: labels.buildFilters }),
|
|
9159
|
+
/* @__PURE__ */ jsx58(Button, { size: "xs", variant: "ghost", onClick: () => setRows([]), disabled: rows2.length === 0, children: labels.clearAll })
|
|
9001
9160
|
] }) }),
|
|
9002
|
-
/* @__PURE__ */
|
|
9003
|
-
/* @__PURE__ */
|
|
9161
|
+
/* @__PURE__ */ jsx58(Dialog5.Body, { children: /* @__PURE__ */ jsxs44(Stack13, { gap: "3", children: [
|
|
9162
|
+
/* @__PURE__ */ jsxs44(Text19, { textStyle: "sm", color: "fg.muted", children: [
|
|
9004
9163
|
labels.matchAll,
|
|
9005
|
-
repeats && /* @__PURE__ */
|
|
9164
|
+
repeats && /* @__PURE__ */ jsxs44(Fragment20, { children: [
|
|
9006
9165
|
" ",
|
|
9007
9166
|
labels.sameFieldAny
|
|
9008
9167
|
] })
|
|
9009
9168
|
] }),
|
|
9010
|
-
rows2.length === 0 && /* @__PURE__ */
|
|
9011
|
-
rows2.map((d) => /* @__PURE__ */
|
|
9169
|
+
rows2.length === 0 && /* @__PURE__ */ jsx58(Text19, { textStyle: "sm", color: "fg.muted", py: "2", children: labels.noConditions }),
|
|
9170
|
+
rows2.map((d) => /* @__PURE__ */ jsx58(
|
|
9012
9171
|
ConditionRow,
|
|
9013
9172
|
{
|
|
9014
9173
|
draft: d,
|
|
@@ -9021,29 +9180,29 @@ function FilterBuilderDialog({ fields, initial, suggest, renderValueEditor, coun
|
|
|
9021
9180
|
},
|
|
9022
9181
|
d.id
|
|
9023
9182
|
)),
|
|
9024
|
-
/* @__PURE__ */
|
|
9025
|
-
/* @__PURE__ */
|
|
9026
|
-
/* @__PURE__ */
|
|
9027
|
-
/* @__PURE__ */
|
|
9183
|
+
/* @__PURE__ */ jsx58(HStack13, { children: /* @__PURE__ */ jsx58(AddButton, { onClick: add, disabled: fields.length === 0, children: labels.addCondition }) }),
|
|
9184
|
+
/* @__PURE__ */ jsxs44(Stack13, { gap: "1", borderTopWidth: "1px", borderColor: "border.muted", pt: "3", children: [
|
|
9185
|
+
/* @__PURE__ */ jsx58(Text19, { textStyle: "xs", fontWeight: "bold", color: "fg.muted", children: labels.activeFilters }),
|
|
9186
|
+
/* @__PURE__ */ jsx58(Text19, { textStyle: "sm", "data-active-filters": "", children: complete.length === 0 ? labels.noneActive : complete.map((c2) => describe(c2, fields, labels)).join(" \xB7 ") })
|
|
9028
9187
|
] })
|
|
9029
9188
|
] }) }),
|
|
9030
|
-
/* @__PURE__ */
|
|
9031
|
-
/* @__PURE__ */
|
|
9189
|
+
/* @__PURE__ */ jsx58(Dialog5.Footer, { children: /* @__PURE__ */ jsxs44(HStack13, { justify: "space-between", w: "full", wrap: "wrap", gap: "2", children: [
|
|
9190
|
+
/* @__PURE__ */ jsxs44(Text19, { textStyle: "sm", color: "fg.muted", "aria-live": "polite", "data-filter-count": "", children: [
|
|
9032
9191
|
count != null && fill3(total != null ? labels.matchCount : labels.matchCountOnly, { count, total: total ?? "" }),
|
|
9033
|
-
incomplete > 0 && /* @__PURE__ */
|
|
9192
|
+
incomplete > 0 && /* @__PURE__ */ jsxs44(Fragment20, { children: [
|
|
9034
9193
|
" \xB7 ",
|
|
9035
9194
|
labels.incompleteSkipped
|
|
9036
9195
|
] })
|
|
9037
9196
|
] }),
|
|
9038
|
-
/* @__PURE__ */
|
|
9039
|
-
/* @__PURE__ */
|
|
9040
|
-
/* @__PURE__ */
|
|
9197
|
+
/* @__PURE__ */ jsxs44(HStack13, { gap: "2", children: [
|
|
9198
|
+
/* @__PURE__ */ jsx58(Button, { size: "sm", variant: "ghost", onClick: onClose, children: labels.cancel }),
|
|
9199
|
+
/* @__PURE__ */ jsx58(Button, { size: "sm", variant: "primary", onClick: () => {
|
|
9041
9200
|
setTouched(true);
|
|
9042
9201
|
onApply(mergeSameField(complete, fields));
|
|
9043
9202
|
}, children: labels.applyFilters })
|
|
9044
9203
|
] })
|
|
9045
9204
|
] }) }),
|
|
9046
|
-
/* @__PURE__ */
|
|
9205
|
+
/* @__PURE__ */ jsx58(Dialog5.CloseTrigger, { asChild: true, children: /* @__PURE__ */ jsx58(CloseButton3, { size: "sm" }) })
|
|
9047
9206
|
] }) })
|
|
9048
9207
|
] }) });
|
|
9049
9208
|
}
|
|
@@ -9054,7 +9213,7 @@ function describe(c2, fields, labels) {
|
|
|
9054
9213
|
}
|
|
9055
9214
|
function ConditionRow({ draft, fields, suggest, renderValueEditor, warn, onChange, onRemove }) {
|
|
9056
9215
|
const labels = useAbpLabels().queryList;
|
|
9057
|
-
const listId =
|
|
9216
|
+
const listId = useId9();
|
|
9058
9217
|
const field = fields.find((f) => f.id === draft.field);
|
|
9059
9218
|
const { op, text } = draft;
|
|
9060
9219
|
const [options, setOptions] = useState23([]);
|
|
@@ -9072,9 +9231,9 @@ function ConditionRow({ draft, fields, suggest, renderValueEditor, warn, onChang
|
|
|
9072
9231
|
clearTimeout(timer);
|
|
9073
9232
|
};
|
|
9074
9233
|
}, [suggest, field, op, text, own]);
|
|
9075
|
-
return /* @__PURE__ */
|
|
9076
|
-
/* @__PURE__ */
|
|
9077
|
-
/* @__PURE__ */
|
|
9234
|
+
return /* @__PURE__ */ jsxs44(Stack13, { gap: "1", "data-condition": "", children: [
|
|
9235
|
+
/* @__PURE__ */ jsxs44(HStack13, { gap: "1.5", wrap: "wrap", align: "start", children: [
|
|
9236
|
+
/* @__PURE__ */ jsx58(
|
|
9078
9237
|
SelectField,
|
|
9079
9238
|
{
|
|
9080
9239
|
width: "auto",
|
|
@@ -9088,7 +9247,7 @@ function ConditionRow({ draft, fields, suggest, renderValueEditor, warn, onChang
|
|
|
9088
9247
|
options: fields.map((f) => ({ value: f.id, label: f.label }))
|
|
9089
9248
|
}
|
|
9090
9249
|
),
|
|
9091
|
-
/* @__PURE__ */
|
|
9250
|
+
/* @__PURE__ */ jsx58(
|
|
9092
9251
|
SelectField,
|
|
9093
9252
|
{
|
|
9094
9253
|
width: "auto",
|
|
@@ -9100,9 +9259,9 @@ function ConditionRow({ draft, fields, suggest, renderValueEditor, warn, onChang
|
|
|
9100
9259
|
}
|
|
9101
9260
|
),
|
|
9102
9261
|
own,
|
|
9103
|
-
!NO_VALUE_OPS.has(op) && own == null && /* @__PURE__ */
|
|
9104
|
-
/* @__PURE__ */
|
|
9105
|
-
|
|
9262
|
+
!NO_VALUE_OPS.has(op) && own == null && /* @__PURE__ */ jsxs44(Fragment20, { children: [
|
|
9263
|
+
/* @__PURE__ */ jsx58(
|
|
9264
|
+
Input7,
|
|
9106
9265
|
{
|
|
9107
9266
|
size: "sm",
|
|
9108
9267
|
flex: "1",
|
|
@@ -9115,17 +9274,17 @@ function ConditionRow({ draft, fields, suggest, renderValueEditor, warn, onChang
|
|
|
9115
9274
|
onChange: (e) => onChange({ text: e.target.value })
|
|
9116
9275
|
}
|
|
9117
9276
|
),
|
|
9118
|
-
/* @__PURE__ */
|
|
9277
|
+
/* @__PURE__ */ jsx58("datalist", { id: listId, children: options.filter((o) => o.kind !== "keyword").map((o) => /* @__PURE__ */ jsx58("option", { value: o.text.replace(/^"|"$/g, ""), children: o.label }, o.text)) })
|
|
9119
9278
|
] }),
|
|
9120
|
-
/* @__PURE__ */
|
|
9279
|
+
/* @__PURE__ */ jsx58(IconButton, { size: "sm", variant: "ghost", remove: true, "aria-label": fill3(labels.removeFilter, { field: field?.label ?? draft.field }), onClick: onRemove, children: /* @__PURE__ */ jsx58(Trash2, {}) })
|
|
9121
9280
|
] }),
|
|
9122
|
-
warn && /* @__PURE__ */
|
|
9281
|
+
warn && /* @__PURE__ */ jsx58(Text19, { textStyle: "xs", color: "fg.error", children: labels.incomplete })
|
|
9123
9282
|
] });
|
|
9124
9283
|
}
|
|
9125
9284
|
|
|
9126
9285
|
// src/components/query/ExportDialog.tsx
|
|
9127
9286
|
import { useEffect as useEffect17, useMemo as useMemo13, useState as useState24 } from "react";
|
|
9128
|
-
import { chakra as
|
|
9287
|
+
import { chakra as chakra36, CloseButton as CloseButton4, Dialog as Dialog6, Portal as Portal16, Stack as Stack14, Text as Text20 } from "@chakra-ui/react";
|
|
9129
9288
|
|
|
9130
9289
|
// src/components/query/exportText.ts
|
|
9131
9290
|
function exportText(value) {
|
|
@@ -9143,7 +9302,7 @@ function csvField(text, separator) {
|
|
|
9143
9302
|
}
|
|
9144
9303
|
|
|
9145
9304
|
// src/components/query/ExportDialog.tsx
|
|
9146
|
-
import { jsx as
|
|
9305
|
+
import { jsx as jsx59, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
9147
9306
|
var SEPARATORS = { comma: ",", semicolon: ";", tab: " " };
|
|
9148
9307
|
function ExportDialog({ format, onClose, fields, shown, columnLabels, found, filtered, sample, onExport }) {
|
|
9149
9308
|
const labels = useAbpLabels();
|
|
@@ -9172,14 +9331,14 @@ function ExportDialog({ format, onClose, fields, shown, columnLabels, found, fil
|
|
|
9172
9331
|
const rows2 = sample.slice(0, 3);
|
|
9173
9332
|
const sep = SEPARATORS[separator];
|
|
9174
9333
|
const csv = [columns.map((id) => csvField(name(id), sep)), ...rows2.map((r) => columns.map((id) => csvField(exportText(r.values[id]), sep)))].map((cells) => cells.join(sep === " " ? " " : sep)).join("\n");
|
|
9175
|
-
return /* @__PURE__ */
|
|
9176
|
-
/* @__PURE__ */
|
|
9177
|
-
/* @__PURE__ */
|
|
9178
|
-
/* @__PURE__ */
|
|
9179
|
-
/* @__PURE__ */
|
|
9180
|
-
filtered && /* @__PURE__ */
|
|
9181
|
-
/* @__PURE__ */
|
|
9182
|
-
/* @__PURE__ */
|
|
9334
|
+
return /* @__PURE__ */ jsx59(Dialog6.Root, { open: format != null, onOpenChange: (e) => !e.open && onClose(), size: "lg", placement: "center", scrollBehavior: "inside", children: /* @__PURE__ */ jsxs45(Portal16, { children: [
|
|
9335
|
+
/* @__PURE__ */ jsx59(Dialog6.Backdrop, {}),
|
|
9336
|
+
/* @__PURE__ */ jsx59(Dialog6.Positioner, { children: /* @__PURE__ */ jsxs45(Dialog6.Content, { "data-export-dialog": "", children: [
|
|
9337
|
+
/* @__PURE__ */ jsx59(Dialog6.Header, { children: /* @__PURE__ */ jsx59(Dialog6.Title, { children: format === "xlsx" ? q.exportTitleExcel ?? "Export to Excel" : q.exportTitleCsv ?? "Export to CSV" }) }),
|
|
9338
|
+
/* @__PURE__ */ jsx59(Dialog6.Body, { children: /* @__PURE__ */ jsxs45(Stack14, { gap: "5", children: [
|
|
9339
|
+
filtered && /* @__PURE__ */ jsxs45(Stack14, { gap: "1.5", children: [
|
|
9340
|
+
/* @__PURE__ */ jsx59(Text20, { textStyle: "label", children: q.exportRows ?? "Rows" }),
|
|
9341
|
+
/* @__PURE__ */ jsx59(
|
|
9183
9342
|
SegmentedControl,
|
|
9184
9343
|
{
|
|
9185
9344
|
size: "sm",
|
|
@@ -9193,9 +9352,9 @@ function ExportDialog({ format, onClose, fields, shown, columnLabels, found, fil
|
|
|
9193
9352
|
}
|
|
9194
9353
|
)
|
|
9195
9354
|
] }),
|
|
9196
|
-
/* @__PURE__ */
|
|
9197
|
-
/* @__PURE__ */
|
|
9198
|
-
/* @__PURE__ */
|
|
9355
|
+
/* @__PURE__ */ jsxs45(Stack14, { gap: "1.5", role: "group", "aria-labelledby": "export-columns", children: [
|
|
9356
|
+
/* @__PURE__ */ jsx59(Text20, { id: "export-columns", textStyle: "label", children: q.exportColumns ?? "Columns" }),
|
|
9357
|
+
/* @__PURE__ */ jsx59(chakra36.div, { display: "grid", gridTemplateColumns: { base: "1fr", sm: "repeat(2, minmax(0, 1fr))" }, gap: "2", children: ordered.map((id) => /* @__PURE__ */ jsx59(
|
|
9199
9358
|
CheckboxField,
|
|
9200
9359
|
{
|
|
9201
9360
|
label: name(id),
|
|
@@ -9210,9 +9369,9 @@ function ExportDialog({ format, onClose, fields, shown, columnLabels, found, fil
|
|
|
9210
9369
|
id
|
|
9211
9370
|
)) })
|
|
9212
9371
|
] }),
|
|
9213
|
-
format === "csv" && /* @__PURE__ */
|
|
9214
|
-
/* @__PURE__ */
|
|
9215
|
-
/* @__PURE__ */
|
|
9372
|
+
format === "csv" && /* @__PURE__ */ jsxs45(Stack14, { gap: "1.5", children: [
|
|
9373
|
+
/* @__PURE__ */ jsx59(chakra36.label, { textStyle: "label", htmlFor: "export-separator", children: q.exportSeparator ?? "Separator" }),
|
|
9374
|
+
/* @__PURE__ */ jsx59(
|
|
9216
9375
|
SelectField,
|
|
9217
9376
|
{
|
|
9218
9377
|
id: "export-separator",
|
|
@@ -9227,25 +9386,25 @@ function ExportDialog({ format, onClose, fields, shown, columnLabels, found, fil
|
|
|
9227
9386
|
}
|
|
9228
9387
|
)
|
|
9229
9388
|
] }),
|
|
9230
|
-
columns.length > 0 && rows2.length > 0 && /* @__PURE__ */
|
|
9231
|
-
/* @__PURE__ */
|
|
9232
|
-
format === "csv" ? /* @__PURE__ */
|
|
9233
|
-
/* @__PURE__ */
|
|
9234
|
-
/* @__PURE__ */
|
|
9389
|
+
columns.length > 0 && rows2.length > 0 && /* @__PURE__ */ jsxs45(Stack14, { gap: "1.5", children: [
|
|
9390
|
+
/* @__PURE__ */ jsx59(Text20, { textStyle: "label", children: q.exportPreview ?? "Preview" }),
|
|
9391
|
+
format === "csv" ? /* @__PURE__ */ jsx59(chakra36.pre, { dir: "ltr", textAlign: "start", m: "0", p: "3", bg: "bg.subtle", borderRadius: "l2", textStyle: "code", overflowX: "auto", whiteSpace: "pre", "data-export-preview": "", children: csv }) : /* @__PURE__ */ jsx59(chakra36.div, { overflowX: "auto", bg: "bg.subtle", borderRadius: "l2", "data-export-preview": "", children: /* @__PURE__ */ jsxs45(chakra36.table, { textStyle: "body.sm", borderCollapse: "collapse", w: "full", children: [
|
|
9392
|
+
/* @__PURE__ */ jsx59("thead", { children: /* @__PURE__ */ jsx59("tr", { children: columns.map((id) => /* @__PURE__ */ jsx59(chakra36.th, { textAlign: "start", fontWeight: "bold", px: "3", py: "1.5", borderBottomWidth: "1px", whiteSpace: "nowrap", children: name(id) }, id)) }) }),
|
|
9393
|
+
/* @__PURE__ */ jsx59("tbody", { children: rows2.map((r) => /* @__PURE__ */ jsx59("tr", { children: columns.map((id) => /* @__PURE__ */ jsx59(chakra36.td, { px: "3", py: "1.5", whiteSpace: "nowrap", maxW: "16rem", truncate: true, children: exportText(r.values[id]) }, id)) }, r.id)) })
|
|
9235
9394
|
] }) })
|
|
9236
9395
|
] })
|
|
9237
9396
|
] }) }),
|
|
9238
|
-
/* @__PURE__ */
|
|
9239
|
-
/* @__PURE__ */
|
|
9240
|
-
/* @__PURE__ */
|
|
9397
|
+
/* @__PURE__ */ jsxs45(Dialog6.Footer, { children: [
|
|
9398
|
+
/* @__PURE__ */ jsx59(Dialog6.ActionTrigger, { asChild: true, children: /* @__PURE__ */ jsx59(Button, { variant: "cancel", children: labels.cancel }) }),
|
|
9399
|
+
/* @__PURE__ */ jsx59(Button, { variant: "primary", disabled: columns.length === 0, onClick: () => onExport({ columns, all, separator }), children: q.exportRun ?? "Export" })
|
|
9241
9400
|
] }),
|
|
9242
|
-
/* @__PURE__ */
|
|
9401
|
+
/* @__PURE__ */ jsx59(Dialog6.CloseTrigger, { asChild: true, children: /* @__PURE__ */ jsx59(CloseButton4, { size: "sm" }) })
|
|
9243
9402
|
] }) })
|
|
9244
9403
|
] }) });
|
|
9245
9404
|
}
|
|
9246
9405
|
|
|
9247
9406
|
// src/components/QueryableList.tsx
|
|
9248
|
-
import { Fragment as Fragment21, jsx as
|
|
9407
|
+
import { Fragment as Fragment21, jsx as jsx60, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
9249
9408
|
var PAIR = "";
|
|
9250
9409
|
var pairKey = (first, second) => `${first}${PAIR}${second}`;
|
|
9251
9410
|
var condition = (field, value) => value == null ? { field, op: "isEmpty" } : { field, op: "eq", value };
|
|
@@ -9406,15 +9565,15 @@ function QueryableList({
|
|
|
9406
9565
|
}
|
|
9407
9566
|
const sortable = (fields ?? []).filter((f) => f.sortable);
|
|
9408
9567
|
const groupLabel = groupField ? thenField ? `${label(groupField)} \xB7 ${label(thenField)}` : label(groupField) : null;
|
|
9409
|
-
return /* @__PURE__ */
|
|
9410
|
-
/* @__PURE__ */
|
|
9411
|
-
/* @__PURE__ */
|
|
9412
|
-
/* @__PURE__ */
|
|
9568
|
+
return /* @__PURE__ */ jsxs46(Stack15, { gap: "3", children: [
|
|
9569
|
+
/* @__PURE__ */ jsxs46(chakra37.div, { layerStyle: "panel", borderRadius: "l3", "data-query-toolbar": "", children: [
|
|
9570
|
+
/* @__PURE__ */ jsxs46(HStack14, { gap: "2", wrap: "wrap", justify: "space-between", px: "2.5", py: "2", borderBottomWidth: "1px", borderColor: "border.muted", children: [
|
|
9571
|
+
/* @__PURE__ */ jsxs46(HStack14, { gap: "2", wrap: "wrap", minW: "0", children: [
|
|
9413
9572
|
leading,
|
|
9414
|
-
leading != null && views && onSelectView && /* @__PURE__ */
|
|
9415
|
-
views && onSelectView && /* @__PURE__ */
|
|
9416
|
-
/* @__PURE__ */
|
|
9417
|
-
/* @__PURE__ */
|
|
9573
|
+
leading != null && views && onSelectView && /* @__PURE__ */ jsx60(chakra37.span, { w: "1px", h: "6", bg: "border", mx: "1", "aria-hidden": true }),
|
|
9574
|
+
views && onSelectView && /* @__PURE__ */ jsxs46(HStack14, { gap: "2", children: [
|
|
9575
|
+
/* @__PURE__ */ jsx60(Text21, { as: "span", textStyle: "xs", fontWeight: "semibold", color: "fg.muted", whiteSpace: "nowrap", hideBelow: "2xl", children: labels.savedView }),
|
|
9576
|
+
/* @__PURE__ */ jsx60(
|
|
9418
9577
|
SelectField,
|
|
9419
9578
|
{
|
|
9420
9579
|
width: "auto",
|
|
@@ -9426,62 +9585,62 @@ function QueryableList({
|
|
|
9426
9585
|
}
|
|
9427
9586
|
)
|
|
9428
9587
|
] }),
|
|
9429
|
-
onSaveView && (naming === null ? /* @__PURE__ */
|
|
9430
|
-
/* @__PURE__ */
|
|
9588
|
+
onSaveView && (naming === null ? /* @__PURE__ */ jsxs46(Button, { size: "sm", variant: "ghost", color: "fg.accent", onClick: () => setNaming(activeView?.isOwner ? activeView.name : ""), children: [
|
|
9589
|
+
/* @__PURE__ */ jsx60(Save, {}),
|
|
9431
9590
|
labels.saveView
|
|
9432
|
-
] }) : /* @__PURE__ */
|
|
9591
|
+
] }) : /* @__PURE__ */ jsxs46(HStack14, { gap: "1", as: "form", onSubmit: (e) => {
|
|
9433
9592
|
e.preventDefault();
|
|
9434
9593
|
if (naming.trim()) onSaveView(naming.trim(), activeView?.isOwner && naming.trim() === activeView.name ? activeView.id : null);
|
|
9435
9594
|
setNaming(null);
|
|
9436
9595
|
}, children: [
|
|
9437
|
-
/* @__PURE__ */
|
|
9438
|
-
/* @__PURE__ */
|
|
9439
|
-
/* @__PURE__ */
|
|
9596
|
+
/* @__PURE__ */ jsx60(Input8, { size: "sm", autoFocus: true, "aria-label": labels.viewName, placeholder: labels.viewName, value: naming, onChange: (e) => setNaming(e.target.value), maxW: "56" }),
|
|
9597
|
+
/* @__PURE__ */ jsx60(Button, { size: "sm", type: "submit", variant: "primary", disabled: !naming.trim(), children: labels.save }),
|
|
9598
|
+
/* @__PURE__ */ jsx60(IconButton, { size: "sm", variant: "ghost", "aria-label": labels.cancel, onClick: () => setNaming(null), children: /* @__PURE__ */ jsx60(X2, {}) })
|
|
9440
9599
|
] })),
|
|
9441
|
-
activeView?.isOwner && onDeleteView && naming === null && /* @__PURE__ */
|
|
9600
|
+
activeView?.isOwner && onDeleteView && naming === null && /* @__PURE__ */ jsx60(IconButton, { size: "sm", variant: "ghost", "aria-label": labels.deleteView, onClick: () => onDeleteView(activeView.id), children: /* @__PURE__ */ jsx60(Trash22, {}) })
|
|
9442
9601
|
] }),
|
|
9443
|
-
/* @__PURE__ */
|
|
9444
|
-
/* @__PURE__ */
|
|
9445
|
-
/* @__PURE__ */
|
|
9446
|
-
/* @__PURE__ */
|
|
9447
|
-
/* @__PURE__ */
|
|
9602
|
+
/* @__PURE__ */ jsxs46(HStack14, { gap: "2", wrap: "wrap", children: [
|
|
9603
|
+
/* @__PURE__ */ jsxs46(Menu5.Root, { positioning: { placement: "bottom-end" }, children: [
|
|
9604
|
+
/* @__PURE__ */ jsx60(Menu5.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs46(Button, { size: "sm", variant: "secondary", "aria-label": labels.groupBy, disabled: groupable.length === 0, children: [
|
|
9605
|
+
/* @__PURE__ */ jsx60(Rows3, {}),
|
|
9606
|
+
/* @__PURE__ */ jsx60(Text21, { as: "span", color: "fg.muted", fontWeight: "normal", children: labels.group }),
|
|
9448
9607
|
groupLabel ?? labels.noGrouping,
|
|
9449
|
-
/* @__PURE__ */
|
|
9608
|
+
/* @__PURE__ */ jsx60(ChevronDown3, {})
|
|
9450
9609
|
] }) }),
|
|
9451
|
-
/* @__PURE__ */
|
|
9452
|
-
/* @__PURE__ */
|
|
9610
|
+
/* @__PURE__ */ jsx60(Portal17, { children: /* @__PURE__ */ jsx60(Menu5.Positioner, { children: /* @__PURE__ */ jsxs46(Menu5.Content, { minW: "48", children: [
|
|
9611
|
+
/* @__PURE__ */ jsxs46(
|
|
9453
9612
|
Menu5.RadioItemGroup,
|
|
9454
9613
|
{
|
|
9455
9614
|
value: groupField ?? "",
|
|
9456
9615
|
onValueChange: (d) => change({ ...query, groupBy: d.value ? { field: d.value, aggregates: [] } : null }),
|
|
9457
9616
|
children: [
|
|
9458
|
-
/* @__PURE__ */
|
|
9617
|
+
/* @__PURE__ */ jsxs46(Menu5.RadioItem, { value: "", children: [
|
|
9459
9618
|
labels.noGrouping,
|
|
9460
|
-
/* @__PURE__ */
|
|
9619
|
+
/* @__PURE__ */ jsx60(Menu5.ItemIndicator, {})
|
|
9461
9620
|
] }),
|
|
9462
|
-
groupable.map((f) => /* @__PURE__ */
|
|
9621
|
+
groupable.map((f) => /* @__PURE__ */ jsxs46(Menu5.RadioItem, { value: f.id, children: [
|
|
9463
9622
|
f.label,
|
|
9464
|
-
/* @__PURE__ */
|
|
9623
|
+
/* @__PURE__ */ jsx60(Menu5.ItemIndicator, {})
|
|
9465
9624
|
] }, f.id))
|
|
9466
9625
|
]
|
|
9467
9626
|
}
|
|
9468
9627
|
),
|
|
9469
|
-
groupField && groupable.length > 1 && /* @__PURE__ */
|
|
9470
|
-
/* @__PURE__ */
|
|
9471
|
-
/* @__PURE__ */
|
|
9628
|
+
groupField && groupable.length > 1 && /* @__PURE__ */ jsxs46(Fragment21, { children: [
|
|
9629
|
+
/* @__PURE__ */ jsx60(Menu5.Separator, {}),
|
|
9630
|
+
/* @__PURE__ */ jsxs46(
|
|
9472
9631
|
Menu5.RadioItemGroup,
|
|
9473
9632
|
{
|
|
9474
9633
|
value: thenField ?? "",
|
|
9475
9634
|
onValueChange: (d) => change({ ...query, groupBy: { ...query.groupBy, then: d.value ? { field: d.value } : null } }),
|
|
9476
9635
|
children: [
|
|
9477
|
-
/* @__PURE__ */
|
|
9478
|
-
/* @__PURE__ */
|
|
9636
|
+
/* @__PURE__ */ jsx60(Menu5.ItemGroupLabel, { children: labels.thenBy }),
|
|
9637
|
+
/* @__PURE__ */ jsxs46(Menu5.RadioItem, { value: "", children: [
|
|
9479
9638
|
labels.noSecondGrouping,
|
|
9480
|
-
/* @__PURE__ */
|
|
9639
|
+
/* @__PURE__ */ jsx60(Menu5.ItemIndicator, {})
|
|
9481
9640
|
] }),
|
|
9482
|
-
groupable.filter((f) => f.id !== groupField).map((f) => /* @__PURE__ */
|
|
9641
|
+
groupable.filter((f) => f.id !== groupField).map((f) => /* @__PURE__ */ jsxs46(Menu5.RadioItem, { value: f.id, children: [
|
|
9483
9642
|
f.label,
|
|
9484
|
-
/* @__PURE__ */
|
|
9643
|
+
/* @__PURE__ */ jsx60(Menu5.ItemIndicator, {})
|
|
9485
9644
|
] }, f.id))
|
|
9486
9645
|
]
|
|
9487
9646
|
}
|
|
@@ -9489,10 +9648,10 @@ function QueryableList({
|
|
|
9489
9648
|
] })
|
|
9490
9649
|
] }) }) })
|
|
9491
9650
|
] }),
|
|
9492
|
-
/* @__PURE__ */
|
|
9493
|
-
onExport && !exportTarget && /* @__PURE__ */
|
|
9494
|
-
onExport && exportTarget && createPortal(/* @__PURE__ */
|
|
9495
|
-
onExport && /* @__PURE__ */
|
|
9651
|
+
/* @__PURE__ */ jsx60(ColumnsPopover, { fields: fields ?? [], columns: state.columns, onChange: (next) => onStateChange({ ...state, rql: result?.rql ?? state.rql, query: void 0, columns: next }) }),
|
|
9652
|
+
onExport && !exportTarget && /* @__PURE__ */ jsx60(ExportMenu, { busy: exporting, disabled: !result || Boolean(loading), onExport: setExportFormat }),
|
|
9653
|
+
onExport && exportTarget && createPortal(/* @__PURE__ */ jsx60(ExportMenu, { busy: exporting, disabled: !result || Boolean(loading), onExport: setExportFormat }), exportTarget),
|
|
9654
|
+
onExport && /* @__PURE__ */ jsx60(
|
|
9496
9655
|
ExportDialog,
|
|
9497
9656
|
{
|
|
9498
9657
|
format: exportFormat,
|
|
@@ -9509,9 +9668,9 @@ function QueryableList({
|
|
|
9509
9668
|
actions
|
|
9510
9669
|
] })
|
|
9511
9670
|
] }),
|
|
9512
|
-
/* @__PURE__ */
|
|
9513
|
-
/* @__PURE__ */
|
|
9514
|
-
/* @__PURE__ */
|
|
9671
|
+
/* @__PURE__ */ jsxs46(HStack14, { gap: "2", align: "start", wrap: "wrap", justify: "space-between", px: "2.5", py: "2", children: [
|
|
9672
|
+
/* @__PURE__ */ jsxs46(HStack14, { gap: "2", align: "start", wrap: "wrap", flex: "1", minW: { base: "full", md: "0" }, children: [
|
|
9673
|
+
/* @__PURE__ */ jsx60(
|
|
9515
9674
|
SegmentedControl,
|
|
9516
9675
|
{
|
|
9517
9676
|
size: "sm",
|
|
@@ -9524,14 +9683,14 @@ function QueryableList({
|
|
|
9524
9683
|
]
|
|
9525
9684
|
}
|
|
9526
9685
|
),
|
|
9527
|
-
mode === "basic" && conditions !== null ? /* @__PURE__ */
|
|
9528
|
-
search && /* @__PURE__ */
|
|
9529
|
-
/* @__PURE__ */
|
|
9686
|
+
mode === "basic" && conditions !== null ? /* @__PURE__ */ jsxs46(HStack14, { gap: "2", wrap: "wrap", flex: "1", minW: "0", children: [
|
|
9687
|
+
search && /* @__PURE__ */ jsx60(QuickSearch, { initial: searchText, placeholder: search.placeholder ?? labels.searchPlaceholder, onRun: runSearch }, searchText),
|
|
9688
|
+
/* @__PURE__ */ jsxs46(AddButton, { onClick: () => setAdding(true), disabled: !fields, "data-add-filter": "", children: [
|
|
9530
9689
|
labels.addFilter,
|
|
9531
|
-
chips.length > 0 && /* @__PURE__ */
|
|
9690
|
+
chips.length > 0 && /* @__PURE__ */ jsx60(CountBadge, { value: chips.length, tone: "accent" })
|
|
9532
9691
|
] }),
|
|
9533
|
-
sortable.length > 0 && /* @__PURE__ */
|
|
9534
|
-
/* @__PURE__ */
|
|
9692
|
+
sortable.length > 0 && /* @__PURE__ */ jsxs46(HStack14, { gap: "1", flexShrink: 0, children: [
|
|
9693
|
+
/* @__PURE__ */ jsx60(
|
|
9535
9694
|
SelectField,
|
|
9536
9695
|
{
|
|
9537
9696
|
width: "auto",
|
|
@@ -9546,7 +9705,7 @@ function QueryableList({
|
|
|
9546
9705
|
]
|
|
9547
9706
|
}
|
|
9548
9707
|
),
|
|
9549
|
-
sort && /* @__PURE__ */
|
|
9708
|
+
sort && /* @__PURE__ */ jsx60(
|
|
9550
9709
|
IconButton,
|
|
9551
9710
|
{
|
|
9552
9711
|
size: "sm",
|
|
@@ -9554,11 +9713,11 @@ function QueryableList({
|
|
|
9554
9713
|
"aria-label": sort.direction === "desc" ? labels.sortDescending : labels.sortAscending,
|
|
9555
9714
|
title: sort.direction === "desc" ? labels.sortDescending : labels.sortAscending,
|
|
9556
9715
|
onClick: () => change({ ...query, orderBy: [{ field: sort.columnId, desc: sort.direction !== "desc" }] }),
|
|
9557
|
-
children: sort.direction === "desc" ? /* @__PURE__ */
|
|
9716
|
+
children: sort.direction === "desc" ? /* @__PURE__ */ jsx60(ArrowDownWideNarrow, {}) : /* @__PURE__ */ jsx60(ArrowUpNarrowWide, {})
|
|
9558
9717
|
}
|
|
9559
9718
|
)
|
|
9560
9719
|
] })
|
|
9561
|
-
] }) : /* @__PURE__ */
|
|
9720
|
+
] }) : /* @__PURE__ */ jsx60(
|
|
9562
9721
|
RqlBox,
|
|
9563
9722
|
{
|
|
9564
9723
|
initial: state.rql ?? result?.rql ?? "",
|
|
@@ -9569,11 +9728,11 @@ function QueryableList({
|
|
|
9569
9728
|
state.rql ?? result?.rql ?? ""
|
|
9570
9729
|
)
|
|
9571
9730
|
] }),
|
|
9572
|
-
attention != null && /* @__PURE__ */
|
|
9731
|
+
attention != null && /* @__PURE__ */ jsx60(HStack14, { gap: "2", wrap: "wrap", flexShrink: 0, children: attention })
|
|
9573
9732
|
] }),
|
|
9574
|
-
mode === "basic" && conditions !== null && chips.length > 0 && /* @__PURE__ */
|
|
9575
|
-
chips.map(({ c: c2, i }) => /* @__PURE__ */
|
|
9576
|
-
|
|
9733
|
+
mode === "basic" && conditions !== null && chips.length > 0 && /* @__PURE__ */ jsxs46(HStack14, { gap: "2", wrap: "wrap", px: "2.5", py: "2", borderTopWidth: "1px", borderColor: "border.muted", "data-filter-chips": "", children: [
|
|
9734
|
+
chips.map(({ c: c2, i }) => /* @__PURE__ */ jsxs46(
|
|
9735
|
+
chakra37.span,
|
|
9577
9736
|
{
|
|
9578
9737
|
display: "inline-flex",
|
|
9579
9738
|
alignItems: "center",
|
|
@@ -9587,17 +9746,17 @@ function QueryableList({
|
|
|
9587
9746
|
bg: "bg.selected",
|
|
9588
9747
|
textStyle: "sm",
|
|
9589
9748
|
children: [
|
|
9590
|
-
/* @__PURE__ */
|
|
9591
|
-
/* @__PURE__ */
|
|
9592
|
-
!NO_VALUE_OPS.has(c2.op) && /* @__PURE__ */
|
|
9593
|
-
/* @__PURE__ */
|
|
9749
|
+
/* @__PURE__ */ jsx60(Text21, { as: "span", fontWeight: "medium", children: label(c2.field) }),
|
|
9750
|
+
/* @__PURE__ */ jsx60(Text21, { as: "span", color: "fg.muted", children: opLabel(c2.op, c2.field) }),
|
|
9751
|
+
!NO_VALUE_OPS.has(c2.op) && /* @__PURE__ */ jsx60(Text21, { as: "span", children: valueText(c2.value) }),
|
|
9752
|
+
/* @__PURE__ */ jsx60(IconButton, { size: "xs", variant: "ghost", "aria-label": fill4(labels.removeFilter, { field: label(c2.field) }), onClick: () => setConditions(conditions.filter((_, j) => j !== i)), children: /* @__PURE__ */ jsx60(X2, {}) })
|
|
9594
9753
|
]
|
|
9595
9754
|
},
|
|
9596
9755
|
`${c2.field}-${i}`
|
|
9597
9756
|
)),
|
|
9598
|
-
/* @__PURE__ */
|
|
9757
|
+
/* @__PURE__ */ jsx60(Button, { size: "xs", variant: "ghost", onClick: () => setConditions(searching >= 0 ? [conditions[searching]] : []), children: labels.clearAll })
|
|
9599
9758
|
] }),
|
|
9600
|
-
adding && fields && conditions !== null && /* @__PURE__ */
|
|
9759
|
+
adding && fields && conditions !== null && /* @__PURE__ */ jsx60(
|
|
9601
9760
|
FilterBuilderDialog,
|
|
9602
9761
|
{
|
|
9603
9762
|
fields,
|
|
@@ -9612,26 +9771,26 @@ function QueryableList({
|
|
|
9612
9771
|
}
|
|
9613
9772
|
}
|
|
9614
9773
|
),
|
|
9615
|
-
toolbarFooter != null && /* @__PURE__ */
|
|
9774
|
+
toolbarFooter != null && /* @__PURE__ */ jsx60(chakra37.div, { borderTopWidth: "1px", borderColor: "border.muted", "data-toolbar-footer": "", children: toolbarFooter })
|
|
9616
9775
|
] }),
|
|
9617
|
-
mode === "basic" && error && !(loadFailed != null && error.failed && !result) && /* @__PURE__ */
|
|
9618
|
-
exported && /* @__PURE__ */
|
|
9619
|
-
/* @__PURE__ */
|
|
9620
|
-
/* @__PURE__ */
|
|
9776
|
+
mode === "basic" && error && !(loadFailed != null && error.failed && !result) && /* @__PURE__ */ jsx60(InlineAlert, { tone: "danger", children: error.message }),
|
|
9777
|
+
exported && /* @__PURE__ */ jsx60(InlineAlert, { tone: exported.tone, title: exported.tone === "danger" ? labels.exportFailed : void 0, children: /* @__PURE__ */ jsxs46(HStack14, { justify: "space-between", gap: "2", align: "start", children: [
|
|
9778
|
+
/* @__PURE__ */ jsx60(Text21, { as: "span", children: exported.message }),
|
|
9779
|
+
/* @__PURE__ */ jsx60(IconButton, { size: "xs", variant: "ghost", "aria-label": labels.dismiss, onClick: () => setExported(null), children: /* @__PURE__ */ jsx60(X2, {}) })
|
|
9621
9780
|
] }) }),
|
|
9622
|
-
/* @__PURE__ */
|
|
9781
|
+
/* @__PURE__ */ jsx60(
|
|
9623
9782
|
Panel,
|
|
9624
9783
|
{
|
|
9625
9784
|
flush: true,
|
|
9626
9785
|
footer: (
|
|
9627
9786
|
// Expand and collapse at the start, the pages in the middle (the canvas's v12, UI round 9 step 67, round 10 step 73),
|
|
9628
9787
|
// the range at the end, or with the arrows in the simple form.
|
|
9629
|
-
/* @__PURE__ */
|
|
9630
|
-
/* @__PURE__ */
|
|
9631
|
-
/* @__PURE__ */
|
|
9632
|
-
/* @__PURE__ */
|
|
9788
|
+
/* @__PURE__ */ jsxs46(chakra37.div, { display: "grid", w: "full", gridTemplateColumns: { base: "1fr", md: "1fr auto 1fr" }, alignItems: "center", gap: "3", children: [
|
|
9789
|
+
/* @__PURE__ */ jsx60(HStack14, { gap: "3", children: grouped && /* @__PURE__ */ jsxs46(Fragment21, { children: [
|
|
9790
|
+
/* @__PURE__ */ jsx60(Button, { size: "xs", variant: "ghost", color: "fg.accent", disabled: folded.size === 0, onClick: () => setFolded(/* @__PURE__ */ new Set()), children: labels.expandAll }),
|
|
9791
|
+
/* @__PURE__ */ jsx60(Button, { size: "xs", variant: "ghost", color: "fg.accent", disabled: groupKeys.every((k) => folded.has(k)), onClick: () => setFolded(new Set(groupKeys)), children: labels.collapseAll })
|
|
9633
9792
|
] }) }),
|
|
9634
|
-
/* @__PURE__ */
|
|
9793
|
+
/* @__PURE__ */ jsx60(
|
|
9635
9794
|
Pagination,
|
|
9636
9795
|
{
|
|
9637
9796
|
page: Math.floor(skip / take) + 1,
|
|
@@ -9647,10 +9806,10 @@ function QueryableList({
|
|
|
9647
9806
|
pageOf: fill4(labels.pageOf, { page: fmt.number(Math.floor(skip / take) + 1), pages: fmt.number(Math.max(1, Math.ceil(total / take))) })
|
|
9648
9807
|
}
|
|
9649
9808
|
),
|
|
9650
|
-
/* @__PURE__ */
|
|
9809
|
+
/* @__PURE__ */ jsx60(Text21, { textStyle: "caption", color: "fg.muted", textAlign: { md: "end" }, fontVariantNumeric: "tabular-nums", "aria-live": "polite", children: result && pagination !== "simple" ? fill4(labels.range, { from: fmt.number(from), to: fmt.number(to), total: fmt.number(total) }) : " " })
|
|
9651
9810
|
] })
|
|
9652
9811
|
),
|
|
9653
|
-
children: layout === "cards" && cards ? /* @__PURE__ */
|
|
9812
|
+
children: layout === "cards" && cards ? /* @__PURE__ */ jsx60(
|
|
9654
9813
|
CardGrid,
|
|
9655
9814
|
{
|
|
9656
9815
|
"aria-label": ariaLabel,
|
|
@@ -9661,7 +9820,7 @@ function QueryableList({
|
|
|
9661
9820
|
render: cards.render,
|
|
9662
9821
|
empty: loadFailed != null && error?.failed && !result ? loadFailed : empty ?? labels.empty
|
|
9663
9822
|
}
|
|
9664
|
-
) : /* @__PURE__ */
|
|
9823
|
+
) : /* @__PURE__ */ jsx60(
|
|
9665
9824
|
DataTable,
|
|
9666
9825
|
{
|
|
9667
9826
|
"aria-label": ariaLabel,
|
|
@@ -9707,11 +9866,11 @@ function QueryableList({
|
|
|
9707
9866
|
const label2 = thenField ? info?.then?.label : info?.label;
|
|
9708
9867
|
const value = thenField ? info?.then?.value ?? null : info?.value ?? null;
|
|
9709
9868
|
const period = thenField ? query.groupBy?.then?.period : query.groupBy?.period;
|
|
9710
|
-
return /* @__PURE__ */
|
|
9711
|
-
/* @__PURE__ */
|
|
9712
|
-
/* @__PURE__ */
|
|
9869
|
+
return /* @__PURE__ */ jsxs46(HStack14, { gap: "2.5", flex: "1", minW: "0", children: [
|
|
9870
|
+
/* @__PURE__ */ jsx60(chakra37.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) }),
|
|
9871
|
+
/* @__PURE__ */ jsx60(CountBadge, { value: info?.count ?? rows2.length }),
|
|
9713
9872
|
!thenField && renderGroupAside?.({ field: groupField, value: info?.value ?? null, label: info?.label ?? "" }),
|
|
9714
|
-
conditions !== null && !period && /* @__PURE__ */
|
|
9873
|
+
conditions !== null && !period && /* @__PURE__ */ jsxs46(
|
|
9715
9874
|
Button,
|
|
9716
9875
|
{
|
|
9717
9876
|
size: "xs",
|
|
@@ -9729,8 +9888,8 @@ function QueryableList({
|
|
|
9729
9888
|
condition(field, value)
|
|
9730
9889
|
]),
|
|
9731
9890
|
children: [
|
|
9732
|
-
/* @__PURE__ */
|
|
9733
|
-
/* @__PURE__ */
|
|
9891
|
+
/* @__PURE__ */ jsx60(Filter, {}),
|
|
9892
|
+
/* @__PURE__ */ jsx60(chakra37.span, { hideBelow: "md", children: labels.filterToGroup })
|
|
9734
9893
|
]
|
|
9735
9894
|
}
|
|
9736
9895
|
)
|
|
@@ -9749,9 +9908,9 @@ function QueryableList({
|
|
|
9749
9908
|
const first = groups[0]?.rows[0];
|
|
9750
9909
|
const raw = first?.values[groupField];
|
|
9751
9910
|
const count = (result?.groups ?? []).filter((g) => groupKey(g.value) === parent).reduce((n, g) => n + g.count, 0);
|
|
9752
|
-
return /* @__PURE__ */
|
|
9753
|
-
/* @__PURE__ */
|
|
9754
|
-
/* @__PURE__ */
|
|
9911
|
+
return /* @__PURE__ */ jsxs46(HStack14, { gap: "2.5", flex: "1", minW: "0", children: [
|
|
9912
|
+
/* @__PURE__ */ jsx60(chakra37.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) }),
|
|
9913
|
+
/* @__PURE__ */ jsx60(CountBadge, { value: count }),
|
|
9755
9914
|
renderGroupAside?.({ field: groupField, value: info?.value ?? null, label: info?.label ?? "" })
|
|
9756
9915
|
] });
|
|
9757
9916
|
}
|
|
@@ -9794,8 +9953,8 @@ function QuickSearch({ initial, placeholder: placeholder2, onRun }) {
|
|
|
9794
9953
|
clearTimeout(timer.current);
|
|
9795
9954
|
timer.current = setTimeout(() => next.trim() !== initial.trim() && onRun(next), 400);
|
|
9796
9955
|
}
|
|
9797
|
-
return /* @__PURE__ */
|
|
9798
|
-
|
|
9956
|
+
return /* @__PURE__ */ jsx60(
|
|
9957
|
+
chakra37.form,
|
|
9799
9958
|
{
|
|
9800
9959
|
role: "search",
|
|
9801
9960
|
flex: "1",
|
|
@@ -9806,7 +9965,7 @@ function QuickSearch({ initial, placeholder: placeholder2, onRun }) {
|
|
|
9806
9965
|
clearTimeout(timer.current);
|
|
9807
9966
|
if (text.trim() !== initial.trim()) onRun(text);
|
|
9808
9967
|
},
|
|
9809
|
-
children: /* @__PURE__ */
|
|
9968
|
+
children: /* @__PURE__ */ jsx60(
|
|
9810
9969
|
SearchInput,
|
|
9811
9970
|
{
|
|
9812
9971
|
size: "sm",
|
|
@@ -9848,14 +10007,14 @@ function placeholderOf(id, kind) {
|
|
|
9848
10007
|
}
|
|
9849
10008
|
function ExportMenu({ busy, disabled, onExport }) {
|
|
9850
10009
|
const labels = useAbpLabels().queryList;
|
|
9851
|
-
return /* @__PURE__ */
|
|
9852
|
-
/* @__PURE__ */
|
|
9853
|
-
/* @__PURE__ */
|
|
10010
|
+
return /* @__PURE__ */ jsxs46(Menu5.Root, { positioning: { placement: "bottom-end" }, onSelect: (d) => onExport(d.value), children: [
|
|
10011
|
+
/* @__PURE__ */ jsx60(Menu5.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs46(Button, { size: "sm", variant: "secondary", disabled: disabled || busy, loading: busy, loadingText: labels.exporting, children: [
|
|
10012
|
+
/* @__PURE__ */ jsx60(Download, {}),
|
|
9854
10013
|
labels.export
|
|
9855
10014
|
] }) }),
|
|
9856
|
-
/* @__PURE__ */
|
|
9857
|
-
/* @__PURE__ */
|
|
9858
|
-
/* @__PURE__ */
|
|
10015
|
+
/* @__PURE__ */ jsx60(Portal17, { children: /* @__PURE__ */ jsx60(Menu5.Positioner, { children: /* @__PURE__ */ jsxs46(Menu5.Content, { minW: "48", children: [
|
|
10016
|
+
/* @__PURE__ */ jsx60(Menu5.Item, { value: "csv", children: labels.exportCsv }),
|
|
10017
|
+
/* @__PURE__ */ jsx60(Menu5.Item, { value: "xlsx", children: labels.exportExcel })
|
|
9859
10018
|
] }) }) })
|
|
9860
10019
|
] });
|
|
9861
10020
|
}
|
|
@@ -9873,7 +10032,7 @@ function RqlBox({
|
|
|
9873
10032
|
const input = useRef20(null);
|
|
9874
10033
|
const timer = useRef20(void 0);
|
|
9875
10034
|
const seq = useRef20(0);
|
|
9876
|
-
const listId =
|
|
10035
|
+
const listId = useId10();
|
|
9877
10036
|
function ask(value, caret) {
|
|
9878
10037
|
if (!suggest) return;
|
|
9879
10038
|
clearTimeout(timer.current);
|
|
@@ -9935,10 +10094,10 @@ function RqlBox({
|
|
|
9935
10094
|
}
|
|
9936
10095
|
}
|
|
9937
10096
|
const hasSpan = error?.start != null && error.end != null && error.end >= error.start && error.end <= text.length;
|
|
9938
|
-
return /* @__PURE__ */
|
|
9939
|
-
/* @__PURE__ */
|
|
9940
|
-
/* @__PURE__ */
|
|
9941
|
-
|
|
10097
|
+
return /* @__PURE__ */ jsxs46(Stack15, { gap: "1.5", flex: "1", minW: "0", position: "relative", children: [
|
|
10098
|
+
/* @__PURE__ */ jsxs46(HStack14, { gap: "2", children: [
|
|
10099
|
+
/* @__PURE__ */ jsx60(
|
|
10100
|
+
Input8,
|
|
9942
10101
|
{
|
|
9943
10102
|
ref: input,
|
|
9944
10103
|
size: "sm",
|
|
@@ -9963,10 +10122,10 @@ function RqlBox({
|
|
|
9963
10122
|
onKeyDown
|
|
9964
10123
|
}
|
|
9965
10124
|
),
|
|
9966
|
-
/* @__PURE__ */
|
|
10125
|
+
/* @__PURE__ */ jsx60(Button, { size: "sm", variant: "primary", onClick: () => onRun(text.trim()), children: labels.run })
|
|
9967
10126
|
] }),
|
|
9968
|
-
open && found && /* @__PURE__ */
|
|
9969
|
-
|
|
10127
|
+
open && found && /* @__PURE__ */ jsx60(
|
|
10128
|
+
Box14,
|
|
9970
10129
|
{
|
|
9971
10130
|
id: listId,
|
|
9972
10131
|
role: "listbox",
|
|
@@ -9984,8 +10143,8 @@ function RqlBox({
|
|
|
9984
10143
|
borderRadius: "md",
|
|
9985
10144
|
boxShadow: "md",
|
|
9986
10145
|
py: "1",
|
|
9987
|
-
children: found.items.map((item, i) => /* @__PURE__ */
|
|
9988
|
-
|
|
10146
|
+
children: found.items.map((item, i) => /* @__PURE__ */ jsxs46(
|
|
10147
|
+
HStack14,
|
|
9989
10148
|
{
|
|
9990
10149
|
id: `${listId}-${i}`,
|
|
9991
10150
|
role: "option",
|
|
@@ -10002,28 +10161,28 @@ function RqlBox({
|
|
|
10002
10161
|
},
|
|
10003
10162
|
onMouseEnter: () => setActive(i),
|
|
10004
10163
|
children: [
|
|
10005
|
-
/* @__PURE__ */
|
|
10006
|
-
/* @__PURE__ */
|
|
10164
|
+
/* @__PURE__ */ jsx60(Text21, { 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 }),
|
|
10165
|
+
/* @__PURE__ */ jsx60(Text21, { 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 })
|
|
10007
10166
|
]
|
|
10008
10167
|
},
|
|
10009
10168
|
`${item.kind}-${item.text}`
|
|
10010
10169
|
))
|
|
10011
10170
|
}
|
|
10012
10171
|
),
|
|
10013
|
-
error && /* @__PURE__ */
|
|
10172
|
+
error && /* @__PURE__ */ jsxs46(InlineAlert, { tone: "danger", size: "sm", children: [
|
|
10014
10173
|
error.message,
|
|
10015
|
-
hasSpan && /* @__PURE__ */
|
|
10174
|
+
hasSpan && /* @__PURE__ */ jsxs46(chakra37.code, { display: "block", mt: "1", fontFamily: "mono", whiteSpace: "pre-wrap", children: [
|
|
10016
10175
|
text.slice(0, error.start),
|
|
10017
|
-
/* @__PURE__ */
|
|
10176
|
+
/* @__PURE__ */ jsx60(chakra37.mark, { bg: "red.subtle", color: "fg", textDecoration: "underline wavy", textDecorationColor: "fg.error", children: text.slice(error.start, error.end) || " " }),
|
|
10018
10177
|
text.slice(error.end)
|
|
10019
10178
|
] })
|
|
10020
10179
|
] })
|
|
10021
10180
|
] });
|
|
10022
10181
|
}
|
|
10023
10182
|
function CardGrid({ rows: rows2, loading, count, minWidth, render: render2, empty, "aria-label": label }) {
|
|
10024
|
-
if (rows2 && rows2.length === 0 && !loading) return typeof empty === "string" ? /* @__PURE__ */
|
|
10025
|
-
return /* @__PURE__ */
|
|
10026
|
-
|
|
10183
|
+
if (rows2 && rows2.length === 0 && !loading) return typeof empty === "string" ? /* @__PURE__ */ jsx60(EmptyState, { title: empty }) : /* @__PURE__ */ jsx60(Fragment21, { children: empty });
|
|
10184
|
+
return /* @__PURE__ */ jsx60(
|
|
10185
|
+
chakra37.ul,
|
|
10027
10186
|
{
|
|
10028
10187
|
role: "list",
|
|
10029
10188
|
"aria-label": label,
|
|
@@ -10035,22 +10194,22 @@ function CardGrid({ rows: rows2, loading, count, minWidth, render: render2, empt
|
|
|
10035
10194
|
gap: "3",
|
|
10036
10195
|
gridTemplateColumns: `repeat(auto-fill, minmax(min(${minWidth}, 100%), 1fr))`,
|
|
10037
10196
|
"data-layout": "cards",
|
|
10038
|
-
children: rows2 ? rows2.map((row) => /* @__PURE__ */
|
|
10197
|
+
children: rows2 ? rows2.map((row) => /* @__PURE__ */ jsx60(chakra37.li, { display: "flex", minW: "0", children: render2(row) }, row.id)) : Array.from({ length: Math.min(count, 9) }, (_, i) => /* @__PURE__ */ jsx60(chakra37.li, { h: "9.5rem", rounded: "lg", bg: "bg.subtle", "aria-hidden": true }, i))
|
|
10039
10198
|
}
|
|
10040
10199
|
);
|
|
10041
10200
|
}
|
|
10042
10201
|
|
|
10043
10202
|
// src/components/FileDrop.tsx
|
|
10044
10203
|
import { forwardRef as forwardRef9, useLayoutEffect as useLayoutEffect5, useRef as useRef21 } from "react";
|
|
10045
|
-
import { Box as
|
|
10204
|
+
import { Box as Box15, HStack as HStack15, Portal as Portal18, Text as Text22 } from "@chakra-ui/react";
|
|
10046
10205
|
import { ArrowDownToLine } from "lucide-react";
|
|
10047
|
-
import { jsx as
|
|
10206
|
+
import { jsx as jsx61, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
10048
10207
|
var OUT3 = `cubic-bezier(${curves.out.join(", ")})`;
|
|
10049
10208
|
var FileDropArea = forwardRef9(function FileDropArea2({ awake = false, over: over2 = false, hint, children, ...rest }, ref) {
|
|
10050
10209
|
const { reduce } = useMotionSetting();
|
|
10051
10210
|
const lit = awake || over2;
|
|
10052
|
-
return /* @__PURE__ */
|
|
10053
|
-
|
|
10211
|
+
return /* @__PURE__ */ jsxs47(
|
|
10212
|
+
Box15,
|
|
10054
10213
|
{
|
|
10055
10214
|
ref,
|
|
10056
10215
|
position: "relative",
|
|
@@ -10068,8 +10227,8 @@ var FileDropArea = forwardRef9(function FileDropArea2({ awake = false, over: ove
|
|
|
10068
10227
|
...rest,
|
|
10069
10228
|
children: [
|
|
10070
10229
|
children,
|
|
10071
|
-
/* @__PURE__ */
|
|
10072
|
-
|
|
10230
|
+
/* @__PURE__ */ jsx61(Presence, { show: lit, from: "fade", position: "absolute", inset: "0", rounded: "l2", zIndex: "1", pointerEvents: "none", children: /* @__PURE__ */ jsxs47(
|
|
10231
|
+
HStack15,
|
|
10073
10232
|
{
|
|
10074
10233
|
h: "full",
|
|
10075
10234
|
justify: "center",
|
|
@@ -10082,8 +10241,8 @@ var FileDropArea = forwardRef9(function FileDropArea2({ awake = false, over: ove
|
|
|
10082
10241
|
textAlign: "center",
|
|
10083
10242
|
style: { transition: "background-color 160ms ease" },
|
|
10084
10243
|
children: [
|
|
10085
|
-
/* @__PURE__ */
|
|
10086
|
-
/* @__PURE__ */
|
|
10244
|
+
/* @__PURE__ */ jsx61(Bob, { active: over2 && !reduce }),
|
|
10245
|
+
/* @__PURE__ */ jsx61(Text22, { as: "span", truncate: true, children: hint })
|
|
10087
10246
|
]
|
|
10088
10247
|
}
|
|
10089
10248
|
) })
|
|
@@ -10102,60 +10261,60 @@ function Bob({ active }) {
|
|
|
10102
10261
|
});
|
|
10103
10262
|
return () => animation?.cancel();
|
|
10104
10263
|
}, [active]);
|
|
10105
|
-
return /* @__PURE__ */
|
|
10264
|
+
return /* @__PURE__ */ jsx61(Box15, { as: "span", ref, display: "inline-flex", flexShrink: 0, _icon: { boxSize: "4" }, children: /* @__PURE__ */ jsx61(ArrowDownToLine, {}) });
|
|
10106
10265
|
}
|
|
10107
10266
|
function DropHint({ show, children }) {
|
|
10108
|
-
return /* @__PURE__ */
|
|
10109
|
-
/* @__PURE__ */
|
|
10110
|
-
/* @__PURE__ */
|
|
10267
|
+
return /* @__PURE__ */ jsx61(Portal18, { children: /* @__PURE__ */ jsx61(Box15, { position: "fixed", insetInline: "0", bottom: "6", display: "flex", justifyContent: "center", pointerEvents: "none", zIndex: "toast", px: "4", children: /* @__PURE__ */ jsx61(Presence, { show, from: "rise", children: /* @__PURE__ */ jsxs47(HStack15, { 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: [
|
|
10268
|
+
/* @__PURE__ */ jsx61(ArrowDownToLine, {}),
|
|
10269
|
+
/* @__PURE__ */ jsx61(Text22, { as: "span", truncate: true, children })
|
|
10111
10270
|
] }) }) }) });
|
|
10112
10271
|
}
|
|
10113
10272
|
|
|
10114
10273
|
// src/components/UploadList.tsx
|
|
10115
10274
|
import { useLayoutEffect as useLayoutEffect6, useRef as useRef22 } from "react";
|
|
10116
|
-
import { Box as
|
|
10275
|
+
import { Box as Box16, chakra as chakra38, HStack as HStack16, Stack as Stack16, Text as Text23 } from "@chakra-ui/react";
|
|
10117
10276
|
import { Check as Check3, File as FileIcon, RotateCcw, TriangleAlert, X as X3 } from "lucide-react";
|
|
10118
|
-
import { jsx as
|
|
10277
|
+
import { jsx as jsx62, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
10119
10278
|
var OUT4 = `cubic-bezier(${curves.out.join(", ")})`;
|
|
10120
10279
|
function UploadList({ rows: rows2, summary, fraction, announce, labels, onCancel, onRetry, onDismiss }) {
|
|
10121
|
-
return /* @__PURE__ */
|
|
10122
|
-
/* @__PURE__ */
|
|
10123
|
-
rows2.length > 0 && summary != null && /* @__PURE__ */
|
|
10124
|
-
/* @__PURE__ */
|
|
10125
|
-
fraction != null && /* @__PURE__ */
|
|
10280
|
+
return /* @__PURE__ */ jsxs48(Stack16, { gap: "2", "data-testid": "upload-list", children: [
|
|
10281
|
+
/* @__PURE__ */ jsx62(chakra38.span, { srOnly: true, "aria-live": "polite", children: announce }),
|
|
10282
|
+
rows2.length > 0 && summary != null && /* @__PURE__ */ jsxs48(Stack16, { gap: "1", children: [
|
|
10283
|
+
/* @__PURE__ */ jsx62(Text23, { textStyle: "caption", color: "fg.muted", children: summary }),
|
|
10284
|
+
fraction != null && /* @__PURE__ */ jsx62(Bar2, { fraction, tone: "accent", label: typeof summary === "string" ? summary : void 0 })
|
|
10126
10285
|
] }),
|
|
10127
|
-
/* @__PURE__ */
|
|
10286
|
+
/* @__PURE__ */ jsx62(Stack16, { gap: "1.5", position: "relative", children: /* @__PURE__ */ jsx62(PresenceList, { children: rows2.map((row) => /* @__PURE__ */ jsx62(PresenceItem, { children: /* @__PURE__ */ jsx62(Row, { row, labels, onCancel, onRetry, onDismiss }) }, row.id)) }) })
|
|
10128
10287
|
] });
|
|
10129
10288
|
}
|
|
10130
10289
|
function Row({ row, labels, onCancel, onRetry, onDismiss }) {
|
|
10131
10290
|
const going = row.state === "waiting" || row.state === "sending";
|
|
10132
10291
|
const trouble = row.state === "failed" || row.state === "refused";
|
|
10133
|
-
return /* @__PURE__ */
|
|
10134
|
-
/* @__PURE__ */
|
|
10135
|
-
/* @__PURE__ */
|
|
10136
|
-
/* @__PURE__ */
|
|
10137
|
-
/* @__PURE__ */
|
|
10138
|
-
/* @__PURE__ */
|
|
10292
|
+
return /* @__PURE__ */ jsxs48(HStack16, { 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: [
|
|
10293
|
+
/* @__PURE__ */ jsx62(Preview, { src: row.preview }),
|
|
10294
|
+
/* @__PURE__ */ jsxs48(Stack16, { gap: "1", flex: "1", minW: "0", children: [
|
|
10295
|
+
/* @__PURE__ */ jsxs48(HStack16, { gap: "2", justify: "space-between", children: [
|
|
10296
|
+
/* @__PURE__ */ jsx62(Text23, { as: "span", fontWeight: "medium", truncate: true, children: /* @__PURE__ */ jsx62("bdi", { children: row.name }) }),
|
|
10297
|
+
/* @__PURE__ */ jsx62(Text23, { as: "span", textStyle: "caption", color: trouble ? "fg.error" : "fg.muted", flexShrink: 0, fontVariantNumeric: "tabular-nums", children: row.state === "done" ? /* @__PURE__ */ jsx62(Done, {}) : row.status })
|
|
10139
10298
|
] }),
|
|
10140
|
-
(going || row.state === "done") && /* @__PURE__ */
|
|
10141
|
-
row.detail != null && /* @__PURE__ */
|
|
10142
|
-
trouble && /* @__PURE__ */
|
|
10299
|
+
(going || row.state === "done") && /* @__PURE__ */ jsx62(Bar2, { fraction: row.state === "done" ? 1 : row.fraction, tone: row.state === "done" ? "success" : "accent", label: row.name, quiet: row.state === "waiting" }),
|
|
10300
|
+
row.detail != null && /* @__PURE__ */ jsxs48(Text23, { as: "span", textStyle: "caption", color: trouble ? "fg.error" : "fg.muted", truncate: true, children: [
|
|
10301
|
+
trouble && /* @__PURE__ */ jsx62(Box16, { as: "span", display: "inline-flex", verticalAlign: "-0.15em", me: "1", _icon: { boxSize: "3.5" }, children: /* @__PURE__ */ jsx62(TriangleAlert, {}) }),
|
|
10143
10302
|
row.detail
|
|
10144
10303
|
] })
|
|
10145
10304
|
] }),
|
|
10146
|
-
going && /* @__PURE__ */
|
|
10147
|
-
row.state === "failed" && /* @__PURE__ */
|
|
10148
|
-
trouble && /* @__PURE__ */
|
|
10305
|
+
going && /* @__PURE__ */ jsx62(IconButton, { size: "xs", variant: "ghost", "aria-label": labels.cancel(row.name), onClick: () => onCancel(row.id), children: /* @__PURE__ */ jsx62(X3, {}) }),
|
|
10306
|
+
row.state === "failed" && /* @__PURE__ */ jsx62(IconButton, { size: "xs", variant: "ghost", "aria-label": labels.retry(row.name), onClick: () => onRetry(row.id), children: /* @__PURE__ */ jsx62(RotateCcw, {}) }),
|
|
10307
|
+
trouble && /* @__PURE__ */ jsx62(IconButton, { size: "xs", variant: "ghost", "aria-label": labels.dismiss(row.name), onClick: () => onDismiss(row.id), children: /* @__PURE__ */ jsx62(X3, {}) })
|
|
10149
10308
|
] });
|
|
10150
10309
|
}
|
|
10151
10310
|
function Preview({ src }) {
|
|
10152
|
-
return /* @__PURE__ */
|
|
10311
|
+
return /* @__PURE__ */ jsx62(Box16, { boxSize: "8", flexShrink: 0, rounded: "l1", overflow: "hidden", bg: "bg.muted", color: "fg.subtle", display: "grid", placeItems: "center", _icon: { boxSize: "4" }, children: src ? /* @__PURE__ */ jsx62(chakra38.img, { src, alt: "", boxSize: "full", objectFit: "cover" }) : /* @__PURE__ */ jsx62(FileIcon, {}) });
|
|
10153
10312
|
}
|
|
10154
10313
|
function Bar2({ fraction, tone, label, quiet: quiet2 }) {
|
|
10155
10314
|
const { reduce } = useMotionSetting();
|
|
10156
10315
|
const percent = Math.round(Math.max(0, Math.min(1, fraction)) * 100);
|
|
10157
|
-
return /* @__PURE__ */
|
|
10158
|
-
|
|
10316
|
+
return /* @__PURE__ */ jsx62(Box16, { h: "1", rounded: "full", bg: "bg.emphasized", overflow: "hidden", opacity: quiet2 ? 0.6 : 1, role: "progressbar", "aria-label": label, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": percent, children: /* @__PURE__ */ jsx62(
|
|
10317
|
+
Box16,
|
|
10159
10318
|
{
|
|
10160
10319
|
h: "full",
|
|
10161
10320
|
rounded: "full",
|
|
@@ -10181,7 +10340,7 @@ function Done() {
|
|
|
10181
10340
|
{ duration: 260, easing: OUT4 }
|
|
10182
10341
|
);
|
|
10183
10342
|
}, []);
|
|
10184
|
-
return /* @__PURE__ */
|
|
10343
|
+
return /* @__PURE__ */ jsx62(chakra38.span, { ref, display: "inline-grid", placeItems: "center", boxSize: "4", rounded: "full", bg: "fg.success", color: "bg", _icon: { boxSize: "3" }, children: /* @__PURE__ */ jsx62(Check3, { strokeWidth: 3 }) });
|
|
10185
10344
|
}
|
|
10186
10345
|
|
|
10187
10346
|
// src/files/drop.ts
|
|
@@ -10452,7 +10611,7 @@ function usePastedFiles({ enabled = true, onFiles }) {
|
|
|
10452
10611
|
|
|
10453
10612
|
// src/components/SortableSections.tsx
|
|
10454
10613
|
import { useMemo as useMemo15, useState as useState27 } from "react";
|
|
10455
|
-
import { Box as
|
|
10614
|
+
import { Box as Box17, Stack as Stack17, Text as Text24 } from "@chakra-ui/react";
|
|
10456
10615
|
import {
|
|
10457
10616
|
DndContext as DndContext4,
|
|
10458
10617
|
DragOverlay as DragOverlay3,
|
|
@@ -10465,7 +10624,7 @@ import {
|
|
|
10465
10624
|
} from "@dnd-kit/core";
|
|
10466
10625
|
import { SortableContext as SortableContext3, sortableKeyboardCoordinates as sortableKeyboardCoordinates3, useSortable as useSortable3, verticalListSortingStrategy as verticalListSortingStrategy3 } from "@dnd-kit/sortable";
|
|
10467
10626
|
import { CSS as CSS4 } from "@dnd-kit/utilities";
|
|
10468
|
-
import { jsx as
|
|
10627
|
+
import { jsx as jsx63, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
10469
10628
|
var sectionId = (id) => `section:${id}`;
|
|
10470
10629
|
function SortableSections({
|
|
10471
10630
|
"aria-label": ariaLabel,
|
|
@@ -10479,7 +10638,7 @@ function SortableSections({
|
|
|
10479
10638
|
skeletonItemHeight = "9"
|
|
10480
10639
|
}) {
|
|
10481
10640
|
const loading = useLoading(own);
|
|
10482
|
-
const shown = loading && sections.length === 0 ? [0, 1].map((n) => ({ id: `skeleton-${n}`, header: /* @__PURE__ */
|
|
10641
|
+
const shown = loading && sections.length === 0 ? [0, 1].map((n) => ({ id: `skeleton-${n}`, header: /* @__PURE__ */ jsx63(TextBone, { width: boneWidth(n, 14, 22) }), items: [] })) : sections;
|
|
10483
10642
|
const sensors = useSensors4(
|
|
10484
10643
|
useSensor4(PointerSensor4, { activationConstraint: { distance: 6 } }),
|
|
10485
10644
|
useSensor4(KeyboardSensor3, { coordinateGetter: sortableKeyboardCoordinates3 })
|
|
@@ -10515,7 +10674,7 @@ function SortableSections({
|
|
|
10515
10674
|
if (from === target && !move.before && !move.after) return;
|
|
10516
10675
|
onMove(item, move);
|
|
10517
10676
|
}
|
|
10518
|
-
return /* @__PURE__ */
|
|
10677
|
+
return /* @__PURE__ */ jsxs49(
|
|
10519
10678
|
DndContext4,
|
|
10520
10679
|
{
|
|
10521
10680
|
sensors,
|
|
@@ -10525,16 +10684,16 @@ function SortableSections({
|
|
|
10525
10684
|
onDragCancel: () => setActive(null),
|
|
10526
10685
|
accessibility: { announcements, screenReaderInstructions: screenReaderInstructions ? { draggable: screenReaderInstructions } : void 0 },
|
|
10527
10686
|
children: [
|
|
10528
|
-
/* @__PURE__ */
|
|
10529
|
-
loading && s.items.length === 0 && Array.from({ length: skeletonItems }, (_, n) => /* @__PURE__ */
|
|
10530
|
-
/* @__PURE__ */
|
|
10531
|
-
/* @__PURE__ */
|
|
10687
|
+
/* @__PURE__ */ jsx63(Stack17, { role: "region", "aria-label": ariaLabel, gap: "4", children: shown.map((s) => /* @__PURE__ */ jsxs49(Section, { section: s, dragging: !!active, children: [
|
|
10688
|
+
loading && s.items.length === 0 && Array.from({ length: skeletonItems }, (_, n) => /* @__PURE__ */ jsxs49(Box17, { h: skeletonItemHeight, px: "2", display: "flex", alignItems: "center", gap: "3", "aria-hidden": "true", children: [
|
|
10689
|
+
/* @__PURE__ */ jsx63(Bone, { width: "14", height: "4" }),
|
|
10690
|
+
/* @__PURE__ */ jsx63(TextBone, { width: boneWidth(n, 16, 36) })
|
|
10532
10691
|
] }, n)),
|
|
10533
|
-
s.items.map((item) => /* @__PURE__ */
|
|
10534
|
-
!loading && s.items.length === 0 && s.empty && /* @__PURE__ */
|
|
10692
|
+
s.items.map((item) => /* @__PURE__ */ jsx63(SortableItem, { id: item.id, children: (dragging) => renderItem(item, { dragging }) }, item.id)),
|
|
10693
|
+
!loading && s.items.length === 0 && s.empty && /* @__PURE__ */ jsx63(Text24, { textStyle: "caption", color: "fg.subtle", textAlign: "center", py: "4", children: s.empty }),
|
|
10535
10694
|
!loading && s.footer
|
|
10536
10695
|
] }, s.id)) }),
|
|
10537
|
-
/* @__PURE__ */
|
|
10696
|
+
/* @__PURE__ */ jsx63(DragOverlay3, { children: active ? /* @__PURE__ */ jsx63(Box17, { shadow: "lg", rounded: "l2", bg: "bg.panel", children: renderItem(active, { dragging: true }) }) : null })
|
|
10538
10697
|
]
|
|
10539
10698
|
}
|
|
10540
10699
|
);
|
|
@@ -10542,10 +10701,10 @@ function SortableSections({
|
|
|
10542
10701
|
function Section({ section, dragging, children }) {
|
|
10543
10702
|
const id = sectionId(section.id);
|
|
10544
10703
|
const { setNodeRef, isOver } = useDroppable3({ id });
|
|
10545
|
-
return /* @__PURE__ */
|
|
10546
|
-
/* @__PURE__ */
|
|
10547
|
-
/* @__PURE__ */
|
|
10548
|
-
|
|
10704
|
+
return /* @__PURE__ */ jsxs49(Box17, { as: "section", borderWidth: "1px", borderColor: "border", rounded: "l3", bg: "bg.panel", "data-section": section.id, children: [
|
|
10705
|
+
/* @__PURE__ */ jsx63(Box17, { px: "3", py: "2", borderBottomWidth: "1px", borderColor: "border.muted", children: section.header }),
|
|
10706
|
+
/* @__PURE__ */ jsx63(SortableContext3, { id, items: section.items.map((i) => i.id), strategy: verticalListSortingStrategy3, children: /* @__PURE__ */ jsx63(
|
|
10707
|
+
Stack17,
|
|
10549
10708
|
{
|
|
10550
10709
|
ref: setNodeRef,
|
|
10551
10710
|
gap: "0",
|
|
@@ -10561,8 +10720,8 @@ function Section({ section, dragging, children }) {
|
|
|
10561
10720
|
}
|
|
10562
10721
|
function SortableItem({ id, children }) {
|
|
10563
10722
|
const { attributes, listeners: listeners2, setNodeRef, transform, transition, isDragging } = useSortable3({ id });
|
|
10564
|
-
return /* @__PURE__ */
|
|
10565
|
-
|
|
10723
|
+
return /* @__PURE__ */ jsx63(
|
|
10724
|
+
Box17,
|
|
10566
10725
|
{
|
|
10567
10726
|
ref: setNodeRef,
|
|
10568
10727
|
style: { transform: CSS4.Transform.toString(transform), transition },
|
|
@@ -10579,9 +10738,9 @@ function SortableItem({ id, children }) {
|
|
|
10579
10738
|
|
|
10580
10739
|
// src/components/TimelineChart.tsx
|
|
10581
10740
|
import { Fragment as Fragment22, useEffect as useEffect20, useLayoutEffect as useLayoutEffect7, useRef as useRef24, useState as useState28 } from "react";
|
|
10582
|
-
import { Box as
|
|
10741
|
+
import { Box as Box18, HStack as HStack17, Popover as Popover4, Portal as Portal19, Stack as Stack18, Text as Text25 } from "@chakra-ui/react";
|
|
10583
10742
|
import { Flag, Trash2 as Trash23 } from "lucide-react";
|
|
10584
|
-
import { jsx as
|
|
10743
|
+
import { jsx as jsx64, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
10585
10744
|
var DAY2 = 864e5;
|
|
10586
10745
|
var toDay = (day) => Math.round(Date.parse(`${day}T00:00:00Z`) / DAY2);
|
|
10587
10746
|
var fromDay = (n) => new Date(n * DAY2).toISOString().slice(0, 10);
|
|
@@ -10850,8 +11009,8 @@ function TimelineChart({
|
|
|
10850
11009
|
const bandsTop = tickHeight, markersTop = tickHeight + (shownBands.length ? STRIP : 0);
|
|
10851
11010
|
const headerHeight = markersTop + (shownMarkers.length ? STRIP : 0);
|
|
10852
11011
|
const todayAt = today ? toDay(today) - origin : -1;
|
|
10853
|
-
return /* @__PURE__ */
|
|
10854
|
-
|
|
11012
|
+
return /* @__PURE__ */ jsxs50(
|
|
11013
|
+
Box18,
|
|
10855
11014
|
{
|
|
10856
11015
|
ref: root,
|
|
10857
11016
|
role: "region",
|
|
@@ -10868,10 +11027,10 @@ function TimelineChart({
|
|
|
10868
11027
|
},
|
|
10869
11028
|
onKeyDown: zoomKey,
|
|
10870
11029
|
children: [
|
|
10871
|
-
instructions && /* @__PURE__ */
|
|
10872
|
-
/* @__PURE__ */
|
|
10873
|
-
/* @__PURE__ */
|
|
10874
|
-
|
|
11030
|
+
instructions && /* @__PURE__ */ jsx64(Text25, { srOnly: true, children: instructions }),
|
|
11031
|
+
/* @__PURE__ */ jsxs50(Box18, { display: "grid", gridTemplateColumns: fill5 ? `${labelWidth}px minmax(${width}px, 1fr)` : `${labelWidth}px ${width}px`, minW: "fit-content", children: [
|
|
11032
|
+
/* @__PURE__ */ jsx64(
|
|
11033
|
+
Box18,
|
|
10875
11034
|
{
|
|
10876
11035
|
position: "sticky",
|
|
10877
11036
|
top: "0",
|
|
@@ -10889,9 +11048,9 @@ function TimelineChart({
|
|
|
10889
11048
|
children: corner
|
|
10890
11049
|
}
|
|
10891
11050
|
),
|
|
10892
|
-
/* @__PURE__ */
|
|
10893
|
-
ticks.map((t, i) => /* @__PURE__ */
|
|
10894
|
-
|
|
11051
|
+
/* @__PURE__ */ jsxs50(Box18, { position: "sticky", top: "0", zIndex: "2", bg: "bg.muted", borderBottomWidth: "1px", borderColor: "border", h: `${headerHeight}px`, overflow: "clip", children: [
|
|
11052
|
+
ticks.map((t, i) => /* @__PURE__ */ jsx64(
|
|
11053
|
+
Box18,
|
|
10895
11054
|
{
|
|
10896
11055
|
position: "absolute",
|
|
10897
11056
|
insetStart: `${t.day * dayWidth}px`,
|
|
@@ -10901,8 +11060,8 @@ function TimelineChart({
|
|
|
10901
11060
|
borderInlineStartWidth: "1px",
|
|
10902
11061
|
borderColor: "border",
|
|
10903
11062
|
"aria-hidden": true,
|
|
10904
|
-
children: /* @__PURE__ */
|
|
10905
|
-
|
|
11063
|
+
children: /* @__PURE__ */ jsx64(
|
|
11064
|
+
Text25,
|
|
10906
11065
|
{
|
|
10907
11066
|
position: "sticky",
|
|
10908
11067
|
insetStart: `${labelWidth}px`,
|
|
@@ -10920,8 +11079,8 @@ function TimelineChart({
|
|
|
10920
11079
|
},
|
|
10921
11080
|
t.day
|
|
10922
11081
|
)),
|
|
10923
|
-
subTicks.map((t) => /* @__PURE__ */
|
|
10924
|
-
|
|
11082
|
+
subTicks.map((t) => /* @__PURE__ */ jsx64(
|
|
11083
|
+
Text25,
|
|
10925
11084
|
{
|
|
10926
11085
|
position: "absolute",
|
|
10927
11086
|
insetStart: `${t.day * dayWidth}px`,
|
|
@@ -10940,8 +11099,8 @@ function TimelineChart({
|
|
|
10940
11099
|
},
|
|
10941
11100
|
t.day
|
|
10942
11101
|
)),
|
|
10943
|
-
offRuns.filter((o) => o.kind === "holiday").map((o) => /* @__PURE__ */
|
|
10944
|
-
|
|
11102
|
+
offRuns.filter((o) => o.kind === "holiday").map((o) => /* @__PURE__ */ jsx64(Tooltip, { content: o.label, children: /* @__PURE__ */ jsx64(
|
|
11103
|
+
Box18,
|
|
10945
11104
|
{
|
|
10946
11105
|
position: "absolute",
|
|
10947
11106
|
insetStart: `${o.a * dayWidth}px`,
|
|
@@ -10955,8 +11114,8 @@ function TimelineChart({
|
|
|
10955
11114
|
"aria-label": o.label
|
|
10956
11115
|
}
|
|
10957
11116
|
) }, `h${o.a}`)),
|
|
10958
|
-
shownBands.map((b) => /* @__PURE__ */
|
|
10959
|
-
|
|
11117
|
+
shownBands.map((b) => /* @__PURE__ */ jsx64(Tooltip, { content: b.detail ?? b.label, children: /* @__PURE__ */ jsx64(
|
|
11118
|
+
Box18,
|
|
10960
11119
|
{
|
|
10961
11120
|
position: "absolute",
|
|
10962
11121
|
insetStart: `${b.a * dayWidth + 1}px`,
|
|
@@ -10972,8 +11131,8 @@ function TimelineChart({
|
|
|
10972
11131
|
focusVisibleRing: "inside",
|
|
10973
11132
|
overflow: "clip",
|
|
10974
11133
|
"aria-label": b.label,
|
|
10975
|
-
children: /* @__PURE__ */
|
|
10976
|
-
|
|
11134
|
+
children: /* @__PURE__ */ jsx64(
|
|
11135
|
+
Text25,
|
|
10977
11136
|
{
|
|
10978
11137
|
position: "sticky",
|
|
10979
11138
|
insetStart: `${labelWidth}px`,
|
|
@@ -10985,13 +11144,13 @@ function TimelineChart({
|
|
|
10985
11144
|
color: b.current ? "colorPalette.fg" : "fg.muted",
|
|
10986
11145
|
fontWeight: b.current ? "medium" : void 0,
|
|
10987
11146
|
truncate: true,
|
|
10988
|
-
children: /* @__PURE__ */
|
|
11147
|
+
children: /* @__PURE__ */ jsx64("bdi", { children: b.label })
|
|
10989
11148
|
}
|
|
10990
11149
|
)
|
|
10991
11150
|
}
|
|
10992
11151
|
) }, b.id)),
|
|
10993
|
-
shownMarkers.map((m4) => /* @__PURE__ */
|
|
10994
|
-
|
|
11152
|
+
shownMarkers.map((m4) => /* @__PURE__ */ jsx64(Tooltip, { content: m4.detail ?? m4.label, children: /* @__PURE__ */ jsxs50(
|
|
11153
|
+
Box18,
|
|
10995
11154
|
{
|
|
10996
11155
|
position: "absolute",
|
|
10997
11156
|
insetStart: `${m4.at * dayWidth + dayWidth / 2 - 1}px`,
|
|
@@ -11015,16 +11174,16 @@ function TimelineChart({
|
|
|
11015
11174
|
focusVisibleRing: "outside",
|
|
11016
11175
|
"aria-label": m4.label,
|
|
11017
11176
|
children: [
|
|
11018
|
-
/* @__PURE__ */
|
|
11019
|
-
/* @__PURE__ */
|
|
11177
|
+
/* @__PURE__ */ jsx64(Flag, { size: 11, "aria-hidden": true }),
|
|
11178
|
+
/* @__PURE__ */ jsx64("bdi", { children: m4.label })
|
|
11020
11179
|
]
|
|
11021
11180
|
}
|
|
11022
11181
|
) }, m4.id))
|
|
11023
11182
|
] }),
|
|
11024
|
-
/* @__PURE__ */
|
|
11025
|
-
/* @__PURE__ */
|
|
11026
|
-
offRuns.map((o) => /* @__PURE__ */
|
|
11027
|
-
|
|
11183
|
+
/* @__PURE__ */ jsx64(Box18, { position: "sticky", insetStart: "0", zIndex: "1", bg: "bg.panel", borderInlineEndWidth: "1px", borderColor: "border", children: shown.map((r, i) => /* @__PURE__ */ jsx64(HStack17, { 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__ */ jsx64(TextBone, { width: boneWidth(i, 12, 26) }) : r.heading ?? (r.item && renderLabel(r.item)) }, r.id)) }),
|
|
11184
|
+
/* @__PURE__ */ jsxs50(Box18, { ref: layer, position: "relative", zIndex: "0", h: `${shown.length * rowHeight}px`, children: [
|
|
11185
|
+
offRuns.map((o) => /* @__PURE__ */ jsx64(
|
|
11186
|
+
Box18,
|
|
11028
11187
|
{
|
|
11029
11188
|
position: "absolute",
|
|
11030
11189
|
insetStart: `${o.a * dayWidth}px`,
|
|
@@ -11038,9 +11197,9 @@ function TimelineChart({
|
|
|
11038
11197
|
},
|
|
11039
11198
|
`o${o.a}`
|
|
11040
11199
|
)),
|
|
11041
|
-
ticks.map((t) => /* @__PURE__ */
|
|
11042
|
-
shownBands.filter((b) => b.current).map((b) => /* @__PURE__ */
|
|
11043
|
-
|
|
11200
|
+
ticks.map((t) => /* @__PURE__ */ jsx64(Box18, { position: "absolute", insetStart: `${t.day * dayWidth}px`, top: "0", bottom: "0", borderInlineStartWidth: "1px", borderColor: "border.muted", "aria-hidden": true }, t.day)),
|
|
11201
|
+
shownBands.filter((b) => b.current).map((b) => /* @__PURE__ */ jsx64(
|
|
11202
|
+
Box18,
|
|
11044
11203
|
{
|
|
11045
11204
|
position: "absolute",
|
|
11046
11205
|
insetStart: `${b.a * dayWidth}px`,
|
|
@@ -11054,8 +11213,8 @@ function TimelineChart({
|
|
|
11054
11213
|
},
|
|
11055
11214
|
b.id
|
|
11056
11215
|
)),
|
|
11057
|
-
shownMarkers.map((m4) => /* @__PURE__ */
|
|
11058
|
-
|
|
11216
|
+
shownMarkers.map((m4) => /* @__PURE__ */ jsx64(
|
|
11217
|
+
Box18,
|
|
11059
11218
|
{
|
|
11060
11219
|
position: "absolute",
|
|
11061
11220
|
insetStart: `${m4.at * dayWidth + dayWidth / 2 - 1}px`,
|
|
@@ -11071,8 +11230,8 @@ function TimelineChart({
|
|
|
11071
11230
|
},
|
|
11072
11231
|
m4.id
|
|
11073
11232
|
)),
|
|
11074
|
-
todayAt >= 0 && todayAt < days && /* @__PURE__ */
|
|
11075
|
-
|
|
11233
|
+
todayAt >= 0 && todayAt < days && /* @__PURE__ */ jsx64(
|
|
11234
|
+
Box18,
|
|
11076
11235
|
{
|
|
11077
11236
|
position: "absolute",
|
|
11078
11237
|
insetStart: `${todayAt * dayWidth + dayWidth / 2}px`,
|
|
@@ -11084,8 +11243,8 @@ function TimelineChart({
|
|
|
11084
11243
|
"aria-hidden": true
|
|
11085
11244
|
}
|
|
11086
11245
|
),
|
|
11087
|
-
shown.map((r, i) => /* @__PURE__ */
|
|
11088
|
-
|
|
11246
|
+
shown.map((r, i) => /* @__PURE__ */ jsx64(
|
|
11247
|
+
Box18,
|
|
11089
11248
|
{
|
|
11090
11249
|
position: "absolute",
|
|
11091
11250
|
insetStart: "0",
|
|
@@ -11099,7 +11258,7 @@ function TimelineChart({
|
|
|
11099
11258
|
},
|
|
11100
11259
|
r.id
|
|
11101
11260
|
)),
|
|
11102
|
-
placeholders && shown.map((r, i) => /* @__PURE__ */
|
|
11261
|
+
placeholders && shown.map((r, i) => /* @__PURE__ */ jsx64(
|
|
11103
11262
|
Bone,
|
|
11104
11263
|
{
|
|
11105
11264
|
position: "absolute",
|
|
@@ -11116,8 +11275,8 @@ function TimelineChart({
|
|
|
11116
11275
|
if (!bl || !bl.start && !bl.end) return null;
|
|
11117
11276
|
const a = Math.max(toDay(bl.start ?? bl.end) - origin, 0), z = Math.min(toDay(bl.end ?? bl.start) - origin, days - 1);
|
|
11118
11277
|
if (z < a) return null;
|
|
11119
|
-
return /* @__PURE__ */
|
|
11120
|
-
|
|
11278
|
+
return /* @__PURE__ */ jsx64(
|
|
11279
|
+
Box18,
|
|
11121
11280
|
{
|
|
11122
11281
|
position: "absolute",
|
|
11123
11282
|
insetStart: `${a * dayWidth}px`,
|
|
@@ -11138,8 +11297,8 @@ function TimelineChart({
|
|
|
11138
11297
|
if (z < a) return null;
|
|
11139
11298
|
const w = (z - a + 1) * dayWidth - 2;
|
|
11140
11299
|
const palette3 = c2.tone === "over" ? "danger" : c2.tone === "full" ? "warning" : "accent";
|
|
11141
|
-
return /* @__PURE__ */
|
|
11142
|
-
|
|
11300
|
+
return /* @__PURE__ */ jsx64(
|
|
11301
|
+
Box18,
|
|
11143
11302
|
{
|
|
11144
11303
|
position: "absolute",
|
|
11145
11304
|
insetStart: `${a * dayWidth + 1}px`,
|
|
@@ -11179,9 +11338,9 @@ function TimelineChart({
|
|
|
11179
11338
|
const thin = tone === "rollup" && !single;
|
|
11180
11339
|
const diamond = single ? { w: `${DIAMOND}px`, h: `${DIAMOND}px`, top: `${i * rowHeight + rowHeight / 2 - DIAMOND / 2}px`, transform: "rotate(45deg)", rounded: "l1" } : null;
|
|
11181
11340
|
const canLink = !!onLink && item.linkable !== false && !drag;
|
|
11182
|
-
return /* @__PURE__ */
|
|
11183
|
-
/* @__PURE__ */
|
|
11184
|
-
|
|
11341
|
+
return /* @__PURE__ */ jsxs50(Fragment22, { children: [
|
|
11342
|
+
/* @__PURE__ */ jsxs50(
|
|
11343
|
+
Box18,
|
|
11185
11344
|
{
|
|
11186
11345
|
role: "button",
|
|
11187
11346
|
tabIndex: 0,
|
|
@@ -11236,8 +11395,8 @@ function TimelineChart({
|
|
|
11236
11395
|
"data-bar": item.id,
|
|
11237
11396
|
children: [
|
|
11238
11397
|
!single && !thin && renderBar?.(item),
|
|
11239
|
-
item.progress != null && !single && /* @__PURE__ */
|
|
11240
|
-
|
|
11398
|
+
item.progress != null && !single && /* @__PURE__ */ jsx64(
|
|
11399
|
+
Box18,
|
|
11241
11400
|
{
|
|
11242
11401
|
position: "absolute",
|
|
11243
11402
|
insetStart: "0",
|
|
@@ -11252,8 +11411,8 @@ function TimelineChart({
|
|
|
11252
11411
|
),
|
|
11253
11412
|
item.movable !== false && !single && // The edge sits inside the bar: its moves and release stop here, or the bar would handle them too and the
|
|
11254
11413
|
// change would be saved twice (the second refused as a conflict).
|
|
11255
|
-
/* @__PURE__ */
|
|
11256
|
-
|
|
11414
|
+
/* @__PURE__ */ jsx64(
|
|
11415
|
+
Box18,
|
|
11257
11416
|
{
|
|
11258
11417
|
position: "absolute",
|
|
11259
11418
|
insetEnd: "0",
|
|
@@ -11276,8 +11435,8 @@ function TimelineChart({
|
|
|
11276
11435
|
]
|
|
11277
11436
|
}
|
|
11278
11437
|
),
|
|
11279
|
-
canLink && (hot === item.id || linking?.from.id === item.id) && /* @__PURE__ */
|
|
11280
|
-
|
|
11438
|
+
canLink && (hot === item.id || linking?.from.id === item.id) && /* @__PURE__ */ jsx64(
|
|
11439
|
+
Box18,
|
|
11281
11440
|
{
|
|
11282
11441
|
position: "absolute",
|
|
11283
11442
|
insetStart: `${single ? right + 3 : Math.max(right, left + 6)}px`,
|
|
@@ -11298,13 +11457,13 @@ function TimelineChart({
|
|
|
11298
11457
|
onPointerUp: linkUp,
|
|
11299
11458
|
onPointerCancel: () => setLinking(null),
|
|
11300
11459
|
"aria-hidden": true,
|
|
11301
|
-
children: /* @__PURE__ */
|
|
11460
|
+
children: /* @__PURE__ */ jsx64(Box18, { w: "2.5", h: "2.5", rounded: "full", bg: "bg.panel", borderWidth: "2px", borderColor: "accent.solid" })
|
|
11302
11461
|
}
|
|
11303
11462
|
)
|
|
11304
11463
|
] }, item.id);
|
|
11305
11464
|
}),
|
|
11306
|
-
/* @__PURE__ */
|
|
11307
|
-
|
|
11465
|
+
/* @__PURE__ */ jsx64(
|
|
11466
|
+
Box18,
|
|
11308
11467
|
{
|
|
11309
11468
|
position: "absolute",
|
|
11310
11469
|
insetInlineStart: "0",
|
|
@@ -11315,8 +11474,8 @@ function TimelineChart({
|
|
|
11315
11474
|
zIndex: "1",
|
|
11316
11475
|
_rtl: { transform: "scaleX(-1)" },
|
|
11317
11476
|
"aria-hidden": !onUnlink,
|
|
11318
|
-
children: /* @__PURE__ */
|
|
11319
|
-
/* @__PURE__ */
|
|
11477
|
+
children: /* @__PURE__ */ jsxs50("svg", { width, height: rows2.length * rowHeight, style: { position: "absolute", left: 0, top: 0 }, children: [
|
|
11478
|
+
/* @__PURE__ */ jsx64("defs", { children: /* @__PURE__ */ jsx64("marker", { id: "abp-arrow", viewBox: "0 0 8 8", refX: "7", refY: "4", markerWidth: "7", markerHeight: "7", orient: "auto-start-reverse", children: /* @__PURE__ */ jsx64("path", { d: "M 0 0 L 8 4 L 0 8 z", fill: "context-stroke" }) }) }),
|
|
11320
11479
|
links.map((l) => {
|
|
11321
11480
|
const f = ys.get(l.from), t = ys.get(l.to);
|
|
11322
11481
|
if (!f || !t) return null;
|
|
@@ -11327,8 +11486,8 @@ function TimelineChart({
|
|
|
11327
11486
|
const picked = menu?.from === l.from && menu.to === l.to;
|
|
11328
11487
|
const faint = !l.strong && links.some((x) => x.strong);
|
|
11329
11488
|
const open = (x, y) => setMenu({ from: l.from, to: l.to, x, y });
|
|
11330
|
-
return /* @__PURE__ */
|
|
11331
|
-
/* @__PURE__ */
|
|
11489
|
+
return /* @__PURE__ */ jsxs50("g", { children: [
|
|
11490
|
+
/* @__PURE__ */ jsx64(
|
|
11332
11491
|
"path",
|
|
11333
11492
|
{
|
|
11334
11493
|
d,
|
|
@@ -11340,7 +11499,7 @@ function TimelineChart({
|
|
|
11340
11499
|
markerEnd: "url(#abp-arrow)"
|
|
11341
11500
|
}
|
|
11342
11501
|
),
|
|
11343
|
-
onUnlink && /* @__PURE__ */
|
|
11502
|
+
onUnlink && /* @__PURE__ */ jsx64(
|
|
11344
11503
|
"path",
|
|
11345
11504
|
{
|
|
11346
11505
|
d,
|
|
@@ -11365,14 +11524,14 @@ function TimelineChart({
|
|
|
11365
11524
|
] })
|
|
11366
11525
|
}
|
|
11367
11526
|
),
|
|
11368
|
-
linking && /* @__PURE__ */
|
|
11369
|
-
/* @__PURE__ */
|
|
11370
|
-
/* @__PURE__ */
|
|
11527
|
+
linking && /* @__PURE__ */ jsxs50("svg", { width: "100%", height: shown.length * rowHeight, style: { position: "absolute", left: 0, top: 0, pointerEvents: "none", zIndex: 3 }, "aria-hidden": true, children: [
|
|
11528
|
+
/* @__PURE__ */ jsx64("line", { x1: linking.x0, y1: linking.y0, x2: linking.x, y2: linking.y, stroke: tv("colors.accent.solid"), strokeWidth: 2, strokeDasharray: "5 4" }),
|
|
11529
|
+
/* @__PURE__ */ jsx64("circle", { cx: linking.x, cy: linking.y, r: 4, fill: tv("colors.accent.solid") })
|
|
11371
11530
|
] })
|
|
11372
11531
|
] })
|
|
11373
11532
|
] }),
|
|
11374
|
-
card && renderCard && items.has(card.id) && /* @__PURE__ */
|
|
11375
|
-
|
|
11533
|
+
card && renderCard && items.has(card.id) && /* @__PURE__ */ jsx64(Portal19, { children: /* @__PURE__ */ jsx64(
|
|
11534
|
+
Box18,
|
|
11376
11535
|
{
|
|
11377
11536
|
id: "abp-timeline-card",
|
|
11378
11537
|
role: "tooltip",
|
|
@@ -11395,7 +11554,7 @@ function TimelineChart({
|
|
|
11395
11554
|
children: renderCard(items.get(card.id))
|
|
11396
11555
|
}
|
|
11397
11556
|
) }),
|
|
11398
|
-
onUnlink && /* @__PURE__ */
|
|
11557
|
+
onUnlink && /* @__PURE__ */ jsx64(
|
|
11399
11558
|
Popover4.Root,
|
|
11400
11559
|
{
|
|
11401
11560
|
open: !!menu,
|
|
@@ -11404,13 +11563,13 @@ function TimelineChart({
|
|
|
11404
11563
|
unmountOnExit: true,
|
|
11405
11564
|
autoFocus: true,
|
|
11406
11565
|
positioning: { placement: "bottom", getAnchorRect: () => menu ? { x: menu.x, y: menu.y, width: 1, height: 1 } : null },
|
|
11407
|
-
children: /* @__PURE__ */
|
|
11408
|
-
/* @__PURE__ */
|
|
11409
|
-
/* @__PURE__ */
|
|
11566
|
+
children: /* @__PURE__ */ jsx64(Portal19, { children: /* @__PURE__ */ jsx64(Popover4.Positioner, { children: /* @__PURE__ */ jsx64(Popover4.Content, { w: "auto", maxW: "calc(100vw - 32px)", children: /* @__PURE__ */ jsx64(Popover4.Body, { children: menu && /* @__PURE__ */ jsxs50(Stack18, { gap: "2", children: [
|
|
11567
|
+
/* @__PURE__ */ jsx64(Text25, { textStyle: "label", children: linkTexts?.arrow(menu.from, menu.to) }),
|
|
11568
|
+
/* @__PURE__ */ jsxs50(Button, { size: "sm", variant: "secondary", onClick: () => {
|
|
11410
11569
|
onUnlink(menu);
|
|
11411
11570
|
setMenu(null);
|
|
11412
11571
|
}, children: [
|
|
11413
|
-
/* @__PURE__ */
|
|
11572
|
+
/* @__PURE__ */ jsx64(Trash23, {}),
|
|
11414
11573
|
linkTexts?.remove
|
|
11415
11574
|
] })
|
|
11416
11575
|
] }) }) }) }) })
|
|
@@ -11423,7 +11582,7 @@ function TimelineChart({
|
|
|
11423
11582
|
|
|
11424
11583
|
// src/components/TimelineCards.tsx
|
|
11425
11584
|
import { useEffect as useEffect21, useMemo as useMemo16, useRef as useRef25, useState as useState29 } from "react";
|
|
11426
|
-
import { Box as
|
|
11585
|
+
import { Box as Box19, chakra as chakra39, Grid as Grid4, Stack as Stack19, Text as Text26 } from "@chakra-ui/react";
|
|
11427
11586
|
|
|
11428
11587
|
// src/components/timeline-cards-math.ts
|
|
11429
11588
|
var DAY3 = 864e5;
|
|
@@ -11475,7 +11634,7 @@ function placeCards(items, first, days, scale, colW = columnWidth(scale)) {
|
|
|
11475
11634
|
}
|
|
11476
11635
|
|
|
11477
11636
|
// src/components/TimelineCards.tsx
|
|
11478
|
-
import { jsx as
|
|
11637
|
+
import { jsx as jsx65, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
11479
11638
|
var LANE = 60;
|
|
11480
11639
|
var KEYS = { d: "day", w: "week", m: "month" };
|
|
11481
11640
|
function TimelineCards(props) {
|
|
@@ -11489,8 +11648,8 @@ function TimelineCards(props) {
|
|
|
11489
11648
|
onScale(next);
|
|
11490
11649
|
}
|
|
11491
11650
|
};
|
|
11492
|
-
return /* @__PURE__ */
|
|
11493
|
-
|
|
11651
|
+
return /* @__PURE__ */ jsxs51(
|
|
11652
|
+
chakra39.div,
|
|
11494
11653
|
{
|
|
11495
11654
|
role: "region",
|
|
11496
11655
|
"aria-label": props["aria-label"],
|
|
@@ -11500,15 +11659,15 @@ function TimelineCards(props) {
|
|
|
11500
11659
|
overflow: "hidden",
|
|
11501
11660
|
"data-timeline-cards": scale,
|
|
11502
11661
|
children: [
|
|
11503
|
-
scale === "day" ? /* @__PURE__ */
|
|
11662
|
+
scale === "day" ? /* @__PURE__ */ jsx65(DayGrid, { ...props }) : /* @__PURE__ */ jsx65(Lanes, { ...props, scale }),
|
|
11504
11663
|
props.footer
|
|
11505
11664
|
]
|
|
11506
11665
|
}
|
|
11507
11666
|
);
|
|
11508
11667
|
}
|
|
11509
11668
|
function Card2({ item, p, range, cutStart, cutEnd, style }) {
|
|
11510
|
-
const card = /* @__PURE__ */
|
|
11511
|
-
|
|
11669
|
+
const card = /* @__PURE__ */ jsxs51(
|
|
11670
|
+
chakra39.button,
|
|
11512
11671
|
{
|
|
11513
11672
|
type: "button",
|
|
11514
11673
|
"data-timeline-card": item.id,
|
|
@@ -11532,12 +11691,12 @@ function Card2({ item, p, range, cutStart, cutEnd, style }) {
|
|
|
11532
11691
|
transition: "background 120ms, border-color 120ms",
|
|
11533
11692
|
...style,
|
|
11534
11693
|
children: [
|
|
11535
|
-
/* @__PURE__ */
|
|
11536
|
-
/* @__PURE__ */
|
|
11694
|
+
/* @__PURE__ */ jsx65(Box19, { as: "span", w: "3px", flexShrink: 0, bg: p.accent?.(item) ?? "border.emphasized", "aria-hidden": true }),
|
|
11695
|
+
/* @__PURE__ */ jsx65(Stack19, { as: "span", gap: "0.5", px: "2.5", py: "1.5", minW: "0", flex: "1", justify: "center", children: p.renderCard(item, { range }) })
|
|
11537
11696
|
]
|
|
11538
11697
|
}
|
|
11539
11698
|
);
|
|
11540
|
-
return p.details ? /* @__PURE__ */
|
|
11699
|
+
return p.details ? /* @__PURE__ */ jsx65(Tooltip, { content: p.details(item), positioning: { placement: "bottom-start" }, openDelay: 250, children: card }) : card;
|
|
11541
11700
|
}
|
|
11542
11701
|
function Lanes(p) {
|
|
11543
11702
|
const { days, today, items, scale } = p;
|
|
@@ -11559,12 +11718,12 @@ function Lanes(p) {
|
|
|
11559
11718
|
const gridW = days.length * colW;
|
|
11560
11719
|
const placeholders = useLoading(p.loading) && items.length === 0;
|
|
11561
11720
|
const height = (placeholders ? 4 : Math.max(lanes, 1)) * LANE + 16;
|
|
11562
|
-
return /* @__PURE__ */
|
|
11563
|
-
/* @__PURE__ */
|
|
11721
|
+
return /* @__PURE__ */ jsx65(chakra39.div, { overflowX: "auto", ref: box, children: /* @__PURE__ */ jsxs51(chakra39.div, { position: "relative", minW: "full", w: `${gridW}px`, children: [
|
|
11722
|
+
/* @__PURE__ */ jsx65(chakra39.div, { display: "flex", borderBottomWidth: "1px", borderColor: "border", bg: "bg.subtle", position: "sticky", top: "0", zIndex: "1", children: days.map((d) => {
|
|
11564
11723
|
const isToday = d === today;
|
|
11565
11724
|
const weekStart = new Date(dayNumber(d) * 864e5).getUTCDay() === 0;
|
|
11566
|
-
return /* @__PURE__ */
|
|
11567
|
-
|
|
11725
|
+
return /* @__PURE__ */ jsxs51(
|
|
11726
|
+
chakra39.div,
|
|
11568
11727
|
{
|
|
11569
11728
|
w: `${colW}px`,
|
|
11570
11729
|
flexShrink: 0,
|
|
@@ -11580,9 +11739,9 @@ function Lanes(p) {
|
|
|
11580
11739
|
borderInlineStartWidth: weekStart && scale === "month" ? "1px" : "0",
|
|
11581
11740
|
borderColor: "border",
|
|
11582
11741
|
children: [
|
|
11583
|
-
/* @__PURE__ */
|
|
11584
|
-
/* @__PURE__ */
|
|
11585
|
-
|
|
11742
|
+
/* @__PURE__ */ jsx65(Text26, { as: "span", children: p.weekday(d) }),
|
|
11743
|
+
/* @__PURE__ */ jsx65(
|
|
11744
|
+
Text26,
|
|
11586
11745
|
{
|
|
11587
11746
|
as: "span",
|
|
11588
11747
|
fontVariantNumeric: "tabular-nums",
|
|
@@ -11600,9 +11759,9 @@ function Lanes(p) {
|
|
|
11600
11759
|
d
|
|
11601
11760
|
);
|
|
11602
11761
|
}) }),
|
|
11603
|
-
/* @__PURE__ */
|
|
11604
|
-
todayIdx >= 0 && /* @__PURE__ */
|
|
11605
|
-
|
|
11762
|
+
/* @__PURE__ */ jsx65(chakra39.div, { position: "absolute", insetInlineStart: "0", top: "0", bottom: "0", display: "flex", pointerEvents: "none", "aria-hidden": true, children: days.map((d) => /* @__PURE__ */ jsx65(chakra39.div, { w: `${colW}px`, flexShrink: 0, borderInlineEndWidth: "1px", borderStyle: "dashed", borderColor: "border.muted" }, d)) }),
|
|
11763
|
+
todayIdx >= 0 && /* @__PURE__ */ jsx65(
|
|
11764
|
+
chakra39.div,
|
|
11606
11765
|
{
|
|
11607
11766
|
position: "absolute",
|
|
11608
11767
|
top: "0",
|
|
@@ -11616,7 +11775,7 @@ function Lanes(p) {
|
|
|
11616
11775
|
zIndex: "1"
|
|
11617
11776
|
}
|
|
11618
11777
|
),
|
|
11619
|
-
placeholders ? /* @__PURE__ */
|
|
11778
|
+
placeholders ? /* @__PURE__ */ jsx65(chakra39.div, { position: "relative", h: `${height}px`, "aria-hidden": true, children: [0, 1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ jsx65(
|
|
11620
11779
|
Bone,
|
|
11621
11780
|
{
|
|
11622
11781
|
position: "absolute",
|
|
@@ -11627,10 +11786,10 @@ function Lanes(p) {
|
|
|
11627
11786
|
borderRadius: "l2"
|
|
11628
11787
|
},
|
|
11629
11788
|
i
|
|
11630
|
-
)) }) : cards.length === 0 && p.empty ? /* @__PURE__ */
|
|
11789
|
+
)) }) : cards.length === 0 && p.empty ? /* @__PURE__ */ jsx65(chakra39.div, { position: "relative", py: "6", children: p.empty }) : /* @__PURE__ */ jsx65(chakra39.div, { position: "relative", h: `${height}px`, role: "list", children: cards.map((c2) => {
|
|
11631
11790
|
const item = byId.get(c2.id);
|
|
11632
|
-
return /* @__PURE__ */
|
|
11633
|
-
|
|
11791
|
+
return /* @__PURE__ */ jsx65(
|
|
11792
|
+
chakra39.div,
|
|
11634
11793
|
{
|
|
11635
11794
|
role: "listitem",
|
|
11636
11795
|
position: "absolute",
|
|
@@ -11639,7 +11798,7 @@ function Lanes(p) {
|
|
|
11639
11798
|
w: `${c2.width}px`,
|
|
11640
11799
|
display: "flex",
|
|
11641
11800
|
zIndex: "2",
|
|
11642
|
-
children: /* @__PURE__ */
|
|
11801
|
+
children: /* @__PURE__ */ jsx65(Card2, { item, p, range: c2.range, cutStart: c2.cutStart, cutEnd: c2.cutEnd, style: { w: "full" } })
|
|
11643
11802
|
},
|
|
11644
11803
|
c2.id
|
|
11645
11804
|
);
|
|
@@ -11654,8 +11813,8 @@ function DayGrid(p) {
|
|
|
11654
11813
|
const x = dayNumber(day);
|
|
11655
11814
|
return s <= x && x <= d;
|
|
11656
11815
|
});
|
|
11657
|
-
if (due.length === 0 && p.empty) return /* @__PURE__ */
|
|
11658
|
-
return /* @__PURE__ */
|
|
11816
|
+
if (due.length === 0 && p.empty) return /* @__PURE__ */ jsx65(chakra39.div, { py: "6", children: p.empty });
|
|
11817
|
+
return /* @__PURE__ */ jsx65(Grid4, { role: "list", templateColumns: "repeat(auto-fill, minmax(16rem, 1fr))", gap: "2", p: "3", children: due.map((i) => /* @__PURE__ */ jsx65(chakra39.div, { role: "listitem", display: "flex", children: /* @__PURE__ */ jsx65(Card2, { item: i, p, range: Boolean(i.start && i.start < i.due), style: { w: "full" } }) }, i.id)) });
|
|
11659
11818
|
}
|
|
11660
11819
|
export {
|
|
11661
11820
|
ABP_UI_VERSION,
|
|
@@ -11677,6 +11836,7 @@ export {
|
|
|
11677
11836
|
Collapse,
|
|
11678
11837
|
ColorModeProvider,
|
|
11679
11838
|
ColorModeToggle,
|
|
11839
|
+
ColumnMatcher,
|
|
11680
11840
|
CommandPalette,
|
|
11681
11841
|
ConfirmDialog,
|
|
11682
11842
|
ConfirmProvider,
|
|
@@ -11774,6 +11934,8 @@ export {
|
|
|
11774
11934
|
basicConditions,
|
|
11775
11935
|
boneWidth,
|
|
11776
11936
|
burst,
|
|
11937
|
+
columnCounts,
|
|
11938
|
+
columnProblems,
|
|
11777
11939
|
compactLayout,
|
|
11778
11940
|
compareOrdinal,
|
|
11779
11941
|
composeTitle,
|
|
@@ -11805,6 +11967,9 @@ export {
|
|
|
11805
11967
|
ghostCss,
|
|
11806
11968
|
groupKey,
|
|
11807
11969
|
guessSeparator,
|
|
11970
|
+
guessTargets,
|
|
11971
|
+
guessType,
|
|
11972
|
+
headerKey,
|
|
11808
11973
|
heavierFirst,
|
|
11809
11974
|
hiddenPose,
|
|
11810
11975
|
inSections,
|