@almadar/ui 5.128.0 → 5.130.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +349 -11
- package/dist/avl/index.js +349 -11
- package/dist/components/index.cjs +352 -11
- package/dist/components/index.d.cts +119 -5
- package/dist/components/index.d.ts +119 -5
- package/dist/components/index.js +353 -12
- package/dist/providers/index.cjs +349 -11
- package/dist/providers/index.js +349 -11
- package/dist/runtime/index.cjs +349 -11
- package/dist/runtime/index.js +349 -11
- package/package.json +6 -5
- package/scripts/audit-tailwind-safelist.ts +237 -0
- package/scripts/export-static.js +61 -0
- package/scripts/generate-design-system.ts +344 -0
- package/scripts/generate-theme-from-schema.ts +480 -0
- package/scripts/generate.ts +835 -0
- package/scripts/strip-base-tokens-from-themes.mjs +179 -0
- package/scripts/suggest-components.ts +508 -0
- package/scripts/theme-contrast-audit.mjs +132 -0
- package/scripts/types.ts +282 -0
- package/themes/_contract.md +1 -1
package/dist/providers/index.js
CHANGED
|
@@ -24209,7 +24209,7 @@ var init_useQuerySingleton = __esm({
|
|
|
24209
24209
|
queryStores = /* @__PURE__ */ new Map();
|
|
24210
24210
|
}
|
|
24211
24211
|
});
|
|
24212
|
-
var resolveFilterType, lookStyles6, FilterGroup;
|
|
24212
|
+
var resolveFilterType, lookStyles6, FilterGroupControls, FilterGroupPopover, FilterGroup;
|
|
24213
24213
|
var init_FilterGroup = __esm({
|
|
24214
24214
|
"components/core/molecules/FilterGroup.tsx"() {
|
|
24215
24215
|
"use client";
|
|
@@ -24227,10 +24227,10 @@ var init_FilterGroup = __esm({
|
|
|
24227
24227
|
toolbar: "",
|
|
24228
24228
|
chips: "gap-1 [&_input]:rounded-pill [&_select]:rounded-pill [&_button]:rounded-pill [&_input]:!px-3 [&_select]:!px-3 [&_input]:bg-muted [&_select]:bg-muted [&_label]:hidden",
|
|
24229
24229
|
pills: "gap-2 [&_input]:rounded-pill [&_select]:rounded-pill [&_button]:rounded-pill",
|
|
24230
|
-
"popover-trigger": "
|
|
24230
|
+
"popover-trigger": "",
|
|
24231
24231
|
"inline-column-header": "hidden"
|
|
24232
24232
|
};
|
|
24233
|
-
|
|
24233
|
+
FilterGroupControls = ({
|
|
24234
24234
|
entity,
|
|
24235
24235
|
filters,
|
|
24236
24236
|
onFilterChange,
|
|
@@ -24566,7 +24566,7 @@ var init_FilterGroup = __esm({
|
|
|
24566
24566
|
className: "text-muted-foreground",
|
|
24567
24567
|
children: [
|
|
24568
24568
|
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
24569
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
24569
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
24570
24570
|
]
|
|
24571
24571
|
}
|
|
24572
24572
|
),
|
|
@@ -24657,6 +24657,42 @@ var init_FilterGroup = __esm({
|
|
|
24657
24657
|
}
|
|
24658
24658
|
);
|
|
24659
24659
|
};
|
|
24660
|
+
FilterGroupControls.displayName = "FilterGroupControls";
|
|
24661
|
+
FilterGroupPopover = (props) => {
|
|
24662
|
+
const { t } = useTranslate();
|
|
24663
|
+
const [open, setOpen] = useState(false);
|
|
24664
|
+
const queryState = useQuerySingleton(props.query);
|
|
24665
|
+
const activeFilterCount = queryState?.filters ? Object.values(queryState.filters).filter((v) => v !== null && v !== void 0).length : 0;
|
|
24666
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("relative inline-block", props.className), children: [
|
|
24667
|
+
/* @__PURE__ */ jsx(
|
|
24668
|
+
Button,
|
|
24669
|
+
{
|
|
24670
|
+
variant: activeFilterCount > 0 ? "secondary" : "ghost",
|
|
24671
|
+
size: "sm",
|
|
24672
|
+
leftIcon: "filter",
|
|
24673
|
+
onClick: () => setOpen((o) => !o),
|
|
24674
|
+
"aria-expanded": open,
|
|
24675
|
+
"aria-haspopup": "true",
|
|
24676
|
+
children: /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
24677
|
+
/* @__PURE__ */ jsx("span", { children: t("filterGroup.filters") }),
|
|
24678
|
+
activeFilterCount > 0 && /* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: activeFilterCount })
|
|
24679
|
+
] })
|
|
24680
|
+
}
|
|
24681
|
+
),
|
|
24682
|
+
open && /* @__PURE__ */ jsx("div", { className: "absolute left-0 z-50 mt-2 min-w-[16rem] rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-card-md shadow-main", children: /* @__PURE__ */ jsx(
|
|
24683
|
+
FilterGroupControls,
|
|
24684
|
+
{
|
|
24685
|
+
...props,
|
|
24686
|
+
className: void 0,
|
|
24687
|
+
look: "toolbar",
|
|
24688
|
+
variant: "vertical",
|
|
24689
|
+
showIcon: false
|
|
24690
|
+
}
|
|
24691
|
+
) })
|
|
24692
|
+
] });
|
|
24693
|
+
};
|
|
24694
|
+
FilterGroupPopover.displayName = "FilterGroupPopover";
|
|
24695
|
+
FilterGroup = (props) => props.look === "popover-trigger" ? /* @__PURE__ */ jsx(FilterGroupPopover, { ...props }) : /* @__PURE__ */ jsx(FilterGroupControls, { ...props });
|
|
24660
24696
|
FilterGroup.displayName = "FilterGroup";
|
|
24661
24697
|
}
|
|
24662
24698
|
});
|
|
@@ -27314,12 +27350,12 @@ var init_MapView = __esm({
|
|
|
27314
27350
|
shadowSize: [41, 41]
|
|
27315
27351
|
});
|
|
27316
27352
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
27317
|
-
const { useEffect: useEffect62, useRef:
|
|
27353
|
+
const { useEffect: useEffect62, useRef: useRef60, useCallback: useCallback93, useState: useState91 } = React84__default;
|
|
27318
27354
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
27319
27355
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
27320
27356
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
27321
27357
|
const map = useMap();
|
|
27322
|
-
const prevRef =
|
|
27358
|
+
const prevRef = useRef60({ centerLat, centerLng, zoom });
|
|
27323
27359
|
useEffect62(() => {
|
|
27324
27360
|
const prev = prevRef.current;
|
|
27325
27361
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
@@ -28298,9 +28334,19 @@ function TableView({
|
|
|
28298
28334
|
const inlineActionCount = hasActions ? maxInlineActions != null ? Math.min(itemActions.length, maxInlineActions) : itemActions.length : 0;
|
|
28299
28335
|
const hasOverflowActions = hasActions && maxInlineActions != null && itemActions.length > maxInlineActions;
|
|
28300
28336
|
const actionsTrack = hasActions ? `${inlineActionCount * 6 + (hasOverflowActions ? 3 : 0)}rem` : null;
|
|
28337
|
+
const colFloors = React84__default.useMemo(
|
|
28338
|
+
() => colDefs.map((col) => {
|
|
28339
|
+
const longest = data.reduce((widest, row) => {
|
|
28340
|
+
const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
|
|
28341
|
+
return Math.max(widest, cell.length);
|
|
28342
|
+
}, columnLabel(col).length);
|
|
28343
|
+
return Math.min(longest, MAX_MEASURED_COL_CH);
|
|
28344
|
+
}),
|
|
28345
|
+
[colDefs, data]
|
|
28346
|
+
);
|
|
28301
28347
|
const gridTemplateColumns = [
|
|
28302
28348
|
selectable ? "auto" : null,
|
|
28303
|
-
...colDefs.map((c) => c.width ??
|
|
28349
|
+
...colDefs.map((c, i) => c.width ?? `minmax(${colFloors[i]}ch, 1fr)`),
|
|
28304
28350
|
actionsTrack
|
|
28305
28351
|
].filter(Boolean).join(" ");
|
|
28306
28352
|
const header = /* @__PURE__ */ jsxs(
|
|
@@ -28467,7 +28513,7 @@ function TableView({
|
|
|
28467
28513
|
}
|
|
28468
28514
|
);
|
|
28469
28515
|
}
|
|
28470
|
-
var alignClass, weightClass, LOOKS;
|
|
28516
|
+
var MAX_MEASURED_COL_CH, alignClass, weightClass, LOOKS;
|
|
28471
28517
|
var init_TableView = __esm({
|
|
28472
28518
|
"components/core/molecules/TableView.tsx"() {
|
|
28473
28519
|
"use client";
|
|
@@ -28485,6 +28531,7 @@ var init_TableView = __esm({
|
|
|
28485
28531
|
init_Menu();
|
|
28486
28532
|
init_useDataDnd();
|
|
28487
28533
|
createLogger("almadar:ui:table-view");
|
|
28534
|
+
MAX_MEASURED_COL_CH = 32;
|
|
28488
28535
|
alignClass = {
|
|
28489
28536
|
left: "justify-start text-left",
|
|
28490
28537
|
center: "justify-center text-center",
|
|
@@ -36509,6 +36556,290 @@ var init_GraphCanvas = __esm({
|
|
|
36509
36556
|
GraphCanvas.displayName = "GraphCanvas";
|
|
36510
36557
|
}
|
|
36511
36558
|
});
|
|
36559
|
+
var ImportSourcePicker;
|
|
36560
|
+
var init_ImportSourcePicker = __esm({
|
|
36561
|
+
"components/core/molecules/import/ImportSourcePicker.tsx"() {
|
|
36562
|
+
"use client";
|
|
36563
|
+
init_Box();
|
|
36564
|
+
init_Icon();
|
|
36565
|
+
init_Typography();
|
|
36566
|
+
init_cn();
|
|
36567
|
+
ImportSourcePicker = ({
|
|
36568
|
+
sources,
|
|
36569
|
+
onSelect,
|
|
36570
|
+
onFilesSelected,
|
|
36571
|
+
title,
|
|
36572
|
+
moreSources,
|
|
36573
|
+
className
|
|
36574
|
+
}) => {
|
|
36575
|
+
const fileInputRef = useRef(null);
|
|
36576
|
+
const handlePick = (source) => {
|
|
36577
|
+
if (source.disabled) return;
|
|
36578
|
+
if (source.kind === "file") {
|
|
36579
|
+
const input = fileInputRef.current;
|
|
36580
|
+
if (!input) return;
|
|
36581
|
+
input.accept = source.accept ?? "";
|
|
36582
|
+
input.multiple = source.multiple ?? false;
|
|
36583
|
+
input.click();
|
|
36584
|
+
return;
|
|
36585
|
+
}
|
|
36586
|
+
onSelect?.(source.id);
|
|
36587
|
+
};
|
|
36588
|
+
const handleFiles = (event) => {
|
|
36589
|
+
const files = event.target.files ? Array.from(event.target.files) : [];
|
|
36590
|
+
event.target.value = "";
|
|
36591
|
+
if (files.length > 0) onFilesSelected?.(files);
|
|
36592
|
+
};
|
|
36593
|
+
return /* @__PURE__ */ jsxs(Box, { className: cn("flex flex-col gap-2", className), children: [
|
|
36594
|
+
title ? /* @__PURE__ */ jsx(Typography, { variant: "h4", children: title }) : null,
|
|
36595
|
+
sources.map((source) => /* @__PURE__ */ jsxs(
|
|
36596
|
+
Box,
|
|
36597
|
+
{
|
|
36598
|
+
role: "button",
|
|
36599
|
+
tabIndex: source.disabled ? -1 : 0,
|
|
36600
|
+
"aria-disabled": source.disabled,
|
|
36601
|
+
onClick: () => handlePick(source),
|
|
36602
|
+
onKeyDown: (event) => {
|
|
36603
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
36604
|
+
event.preventDefault();
|
|
36605
|
+
handlePick(source);
|
|
36606
|
+
}
|
|
36607
|
+
},
|
|
36608
|
+
className: cn(
|
|
36609
|
+
"flex items-center gap-3 rounded-md border border-border bg-card px-4 py-3 text-left",
|
|
36610
|
+
source.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:bg-accent hover:text-accent-foreground"
|
|
36611
|
+
),
|
|
36612
|
+
children: [
|
|
36613
|
+
source.icon ? /* @__PURE__ */ jsx(Icon, { icon: source.icon, size: "md" }) : null,
|
|
36614
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex flex-col", children: [
|
|
36615
|
+
/* @__PURE__ */ jsx(Typography, { variant: "label", children: source.label }),
|
|
36616
|
+
source.description ? /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground", children: source.description }) : null
|
|
36617
|
+
] })
|
|
36618
|
+
]
|
|
36619
|
+
},
|
|
36620
|
+
source.id
|
|
36621
|
+
)),
|
|
36622
|
+
moreSources,
|
|
36623
|
+
/* @__PURE__ */ jsx(
|
|
36624
|
+
"input",
|
|
36625
|
+
{
|
|
36626
|
+
ref: fileInputRef,
|
|
36627
|
+
type: "file",
|
|
36628
|
+
className: "hidden",
|
|
36629
|
+
onChange: handleFiles,
|
|
36630
|
+
"data-testid": "import-source-file-input"
|
|
36631
|
+
}
|
|
36632
|
+
)
|
|
36633
|
+
] });
|
|
36634
|
+
};
|
|
36635
|
+
}
|
|
36636
|
+
});
|
|
36637
|
+
function formatFieldValue(value) {
|
|
36638
|
+
if (value === null) return "\u2014";
|
|
36639
|
+
if (value instanceof Date) return value.toISOString();
|
|
36640
|
+
if (Array.isArray(value)) return value.map(formatFieldValue).join(", ");
|
|
36641
|
+
if (typeof value === "object") return JSON.stringify(value);
|
|
36642
|
+
return String(value);
|
|
36643
|
+
}
|
|
36644
|
+
function unitTitle(unit) {
|
|
36645
|
+
for (const key of TITLE_KEYS) {
|
|
36646
|
+
const value = unit.fields[key];
|
|
36647
|
+
if (typeof value === "string" && value.length > 0) return value;
|
|
36648
|
+
}
|
|
36649
|
+
return unit.ref;
|
|
36650
|
+
}
|
|
36651
|
+
function fieldSummary(unit) {
|
|
36652
|
+
return Object.entries(unit.fields).filter(([key]) => !TITLE_KEYS.includes(key)).map(([key, value]) => `${key}: ${formatFieldValue(value)}`).join(" \xB7 ");
|
|
36653
|
+
}
|
|
36654
|
+
var TITLE_KEYS, ImportPreviewTree;
|
|
36655
|
+
var init_ImportPreviewTree = __esm({
|
|
36656
|
+
"components/core/molecules/import/ImportPreviewTree.tsx"() {
|
|
36657
|
+
"use client";
|
|
36658
|
+
init_Box();
|
|
36659
|
+
init_Badge();
|
|
36660
|
+
init_Button();
|
|
36661
|
+
init_Icon();
|
|
36662
|
+
init_Typography();
|
|
36663
|
+
init_cn();
|
|
36664
|
+
TITLE_KEYS = ["title", "name", "label"];
|
|
36665
|
+
ImportPreviewTree = ({
|
|
36666
|
+
units,
|
|
36667
|
+
skipped = [],
|
|
36668
|
+
entityDisplay,
|
|
36669
|
+
onConfirm,
|
|
36670
|
+
onCancel,
|
|
36671
|
+
confirmLabel = "Confirm import",
|
|
36672
|
+
cancelLabel = "Cancel",
|
|
36673
|
+
indent = 16,
|
|
36674
|
+
className
|
|
36675
|
+
}) => {
|
|
36676
|
+
const groups = /* @__PURE__ */ new Map();
|
|
36677
|
+
for (const unit of units) {
|
|
36678
|
+
const group = groups.get(unit.targetEntity);
|
|
36679
|
+
if (group) group.push(unit);
|
|
36680
|
+
else groups.set(unit.targetEntity, [unit]);
|
|
36681
|
+
}
|
|
36682
|
+
const renderUnit = (unit, childrenByParent, depth) => {
|
|
36683
|
+
const summary = fieldSummary(unit);
|
|
36684
|
+
const children = childrenByParent.get(unit.ref) ?? [];
|
|
36685
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
36686
|
+
/* @__PURE__ */ jsxs(
|
|
36687
|
+
Box,
|
|
36688
|
+
{
|
|
36689
|
+
className: "flex flex-col py-1",
|
|
36690
|
+
style: { paddingLeft: depth * indent },
|
|
36691
|
+
"data-testid": `import-preview-unit-${unit.ref}`,
|
|
36692
|
+
children: [
|
|
36693
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
|
|
36694
|
+
/* @__PURE__ */ jsx(Icon, { icon: "file-text", size: "xs", className: "text-muted-foreground" }),
|
|
36695
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: unitTitle(unit) })
|
|
36696
|
+
] }),
|
|
36697
|
+
summary ? /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground", children: summary }) : null
|
|
36698
|
+
]
|
|
36699
|
+
}
|
|
36700
|
+
),
|
|
36701
|
+
children.map((child) => renderUnit(child, childrenByParent, depth + 1))
|
|
36702
|
+
] }, unit.ref);
|
|
36703
|
+
};
|
|
36704
|
+
return /* @__PURE__ */ jsxs(Box, { className: cn("flex flex-col gap-4", className), children: [
|
|
36705
|
+
units.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-muted-foreground", children: "No units staged." }) : null,
|
|
36706
|
+
Array.from(groups.entries()).map(([entity, groupUnits]) => {
|
|
36707
|
+
const refs = new Set(groupUnits.map((unit) => unit.ref));
|
|
36708
|
+
const childrenByParent = /* @__PURE__ */ new Map();
|
|
36709
|
+
const roots = [];
|
|
36710
|
+
for (const unit of groupUnits) {
|
|
36711
|
+
if (unit.parentRef && refs.has(unit.parentRef)) {
|
|
36712
|
+
const siblings = childrenByParent.get(unit.parentRef);
|
|
36713
|
+
if (siblings) siblings.push(unit);
|
|
36714
|
+
else childrenByParent.set(unit.parentRef, [unit]);
|
|
36715
|
+
} else {
|
|
36716
|
+
roots.push(unit);
|
|
36717
|
+
}
|
|
36718
|
+
}
|
|
36719
|
+
const label = entityDisplay[entity]?.plural ?? entity;
|
|
36720
|
+
return /* @__PURE__ */ jsxs(Box, { border: true, className: "rounded-md border-border bg-card p-3", children: [
|
|
36721
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2 pb-2", children: [
|
|
36722
|
+
/* @__PURE__ */ jsx(Typography, { variant: "label", children: label }),
|
|
36723
|
+
/* @__PURE__ */ jsx(Badge, { amount: groupUnits.length })
|
|
36724
|
+
] }),
|
|
36725
|
+
roots.map((unit) => renderUnit(unit, childrenByParent, 0))
|
|
36726
|
+
] }, entity);
|
|
36727
|
+
}),
|
|
36728
|
+
skipped.length > 0 ? /* @__PURE__ */ jsxs(Box, { border: true, className: "rounded-md border-border bg-card p-3", children: [
|
|
36729
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2 pb-2", children: [
|
|
36730
|
+
/* @__PURE__ */ jsx(Typography, { variant: "label", children: "Skipped" }),
|
|
36731
|
+
/* @__PURE__ */ jsx(Badge, { amount: skipped.length })
|
|
36732
|
+
] }),
|
|
36733
|
+
skipped.map((element) => /* @__PURE__ */ jsxs(Box, { className: "flex items-baseline gap-2 py-1", children: [
|
|
36734
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: element.ref }),
|
|
36735
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground", children: element.reason })
|
|
36736
|
+
] }, element.ref))
|
|
36737
|
+
] }) : null,
|
|
36738
|
+
onConfirm || onCancel ? /* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-end gap-2", children: [
|
|
36739
|
+
onCancel ? /* @__PURE__ */ jsx(Button, { variant: "default", label: cancelLabel, onClick: onCancel }) : null,
|
|
36740
|
+
onConfirm ? /* @__PURE__ */ jsx(Button, { variant: "primary", label: confirmLabel, onClick: onConfirm }) : null
|
|
36741
|
+
] }) : null
|
|
36742
|
+
] });
|
|
36743
|
+
};
|
|
36744
|
+
}
|
|
36745
|
+
});
|
|
36746
|
+
var PIPELINE, DEFAULT_LABELS, ImportProgress;
|
|
36747
|
+
var init_ImportProgress = __esm({
|
|
36748
|
+
"components/core/molecules/import/ImportProgress.tsx"() {
|
|
36749
|
+
"use client";
|
|
36750
|
+
init_Box();
|
|
36751
|
+
init_Badge();
|
|
36752
|
+
init_Icon();
|
|
36753
|
+
init_Typography();
|
|
36754
|
+
init_cn();
|
|
36755
|
+
PIPELINE = [
|
|
36756
|
+
"fetching",
|
|
36757
|
+
"mapping",
|
|
36758
|
+
"reviewing",
|
|
36759
|
+
"committing"
|
|
36760
|
+
];
|
|
36761
|
+
DEFAULT_LABELS = {
|
|
36762
|
+
fetching: "Fetching",
|
|
36763
|
+
mapping: "Mapping",
|
|
36764
|
+
reviewing: "Reviewing",
|
|
36765
|
+
committing: "Committing",
|
|
36766
|
+
done: "Done",
|
|
36767
|
+
failed: "Failed"
|
|
36768
|
+
};
|
|
36769
|
+
ImportProgress = ({
|
|
36770
|
+
step,
|
|
36771
|
+
counts,
|
|
36772
|
+
labels,
|
|
36773
|
+
className
|
|
36774
|
+
}) => {
|
|
36775
|
+
const label = (key) => labels?.[key] ?? DEFAULT_LABELS[key];
|
|
36776
|
+
const currentIndex = step === "done" || step === "failed" ? PIPELINE.length : PIPELINE.indexOf(step);
|
|
36777
|
+
return /* @__PURE__ */ jsxs(Box, { className: cn("flex flex-col gap-3", className), children: [
|
|
36778
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
|
|
36779
|
+
PIPELINE.map((key, index) => {
|
|
36780
|
+
const isComplete = index < currentIndex;
|
|
36781
|
+
const isActive = index === currentIndex;
|
|
36782
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
36783
|
+
index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
|
|
36784
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
|
|
36785
|
+
/* @__PURE__ */ jsx(
|
|
36786
|
+
Icon,
|
|
36787
|
+
{
|
|
36788
|
+
icon: isComplete ? "check" : isActive ? "loader" : "circle",
|
|
36789
|
+
size: "sm",
|
|
36790
|
+
className: cn(
|
|
36791
|
+
isComplete ? "text-success" : isActive ? "text-primary" : "text-muted-foreground"
|
|
36792
|
+
)
|
|
36793
|
+
}
|
|
36794
|
+
),
|
|
36795
|
+
/* @__PURE__ */ jsx(
|
|
36796
|
+
Typography,
|
|
36797
|
+
{
|
|
36798
|
+
variant: "caption",
|
|
36799
|
+
className: cn(isActive ? "text-foreground" : "text-muted-foreground"),
|
|
36800
|
+
children: label(key)
|
|
36801
|
+
}
|
|
36802
|
+
)
|
|
36803
|
+
] })
|
|
36804
|
+
] }, key);
|
|
36805
|
+
}),
|
|
36806
|
+
step === "done" || step === "failed" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
36807
|
+
/* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }),
|
|
36808
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${step}`, children: [
|
|
36809
|
+
/* @__PURE__ */ jsx(
|
|
36810
|
+
Icon,
|
|
36811
|
+
{
|
|
36812
|
+
icon: step === "done" ? "check" : "x",
|
|
36813
|
+
size: "sm",
|
|
36814
|
+
className: step === "done" ? "text-success" : "text-error"
|
|
36815
|
+
}
|
|
36816
|
+
),
|
|
36817
|
+
/* @__PURE__ */ jsx(
|
|
36818
|
+
Typography,
|
|
36819
|
+
{
|
|
36820
|
+
variant: "caption",
|
|
36821
|
+
className: step === "done" ? "text-success" : "text-error",
|
|
36822
|
+
children: label(step)
|
|
36823
|
+
}
|
|
36824
|
+
)
|
|
36825
|
+
] })
|
|
36826
|
+
] }) : null
|
|
36827
|
+
] }),
|
|
36828
|
+
counts ? /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
|
|
36829
|
+
counts.staged !== void 0 ? /* @__PURE__ */ jsx(Badge, { label: `Staged ${counts.staged}` }) : null,
|
|
36830
|
+
counts.committed !== void 0 ? /* @__PURE__ */ jsx(Badge, { variant: "success", label: `Committed ${counts.committed}` }) : null,
|
|
36831
|
+
counts.failed !== void 0 ? /* @__PURE__ */ jsx(Badge, { variant: "danger", label: `Failed ${counts.failed}` }) : null
|
|
36832
|
+
] }) : null
|
|
36833
|
+
] });
|
|
36834
|
+
};
|
|
36835
|
+
}
|
|
36836
|
+
});
|
|
36837
|
+
|
|
36838
|
+
// components/core/molecules/import/index.ts
|
|
36839
|
+
var init_import = __esm({
|
|
36840
|
+
"components/core/molecules/import/index.ts"() {
|
|
36841
|
+
}
|
|
36842
|
+
});
|
|
36512
36843
|
var ReflectionBlock;
|
|
36513
36844
|
var init_ReflectionBlock = __esm({
|
|
36514
36845
|
"components/core/molecules/ReflectionBlock.tsx"() {
|
|
@@ -36583,6 +36914,7 @@ var init_molecules2 = __esm({
|
|
|
36583
36914
|
init_EmptyState();
|
|
36584
36915
|
init_Pagination();
|
|
36585
36916
|
init_molecules();
|
|
36917
|
+
init_import();
|
|
36586
36918
|
}
|
|
36587
36919
|
});
|
|
36588
36920
|
|
|
@@ -37063,7 +37395,7 @@ function getBadgeVariant(fieldName, value) {
|
|
|
37063
37395
|
function formatFieldLabel(fieldName) {
|
|
37064
37396
|
return fieldName.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase());
|
|
37065
37397
|
}
|
|
37066
|
-
function
|
|
37398
|
+
function formatFieldValue2(value, fieldName) {
|
|
37067
37399
|
if (typeof value === "number") {
|
|
37068
37400
|
if (fieldName.toLowerCase().includes("progress") || fieldName.toLowerCase().includes("percent")) {
|
|
37069
37401
|
return `${value}%`;
|
|
@@ -37158,7 +37490,7 @@ function renderRichFieldValue(value, fieldName, fieldType) {
|
|
|
37158
37490
|
return str;
|
|
37159
37491
|
}
|
|
37160
37492
|
default:
|
|
37161
|
-
return
|
|
37493
|
+
return formatFieldValue2(value, fieldName);
|
|
37162
37494
|
}
|
|
37163
37495
|
}
|
|
37164
37496
|
function normalizeFieldDefs(fields) {
|
|
@@ -37269,7 +37601,7 @@ var init_DetailPanel = __esm({
|
|
|
37269
37601
|
const value = getNestedValue(normalizedData, field);
|
|
37270
37602
|
return {
|
|
37271
37603
|
label: labelFor(field),
|
|
37272
|
-
value:
|
|
37604
|
+
value: formatFieldValue2(value, field),
|
|
37273
37605
|
icon: getFieldIcon(field)
|
|
37274
37606
|
};
|
|
37275
37607
|
}
|
|
@@ -43281,6 +43613,9 @@ var init_component_registry_generated = __esm({
|
|
|
43281
43613
|
init_HeroOrganism();
|
|
43282
43614
|
init_HeroSection();
|
|
43283
43615
|
init_Icon();
|
|
43616
|
+
init_ImportPreviewTree();
|
|
43617
|
+
init_ImportProgress();
|
|
43618
|
+
init_ImportSourcePicker();
|
|
43284
43619
|
init_InfiniteScrollSentinel();
|
|
43285
43620
|
init_Input();
|
|
43286
43621
|
init_InputGroup();
|
|
@@ -43544,6 +43879,9 @@ var init_component_registry_generated = __esm({
|
|
|
43544
43879
|
"HeroOrganism": HeroOrganism,
|
|
43545
43880
|
"HeroSection": HeroSection,
|
|
43546
43881
|
"Icon": Icon,
|
|
43882
|
+
"ImportPreviewTree": ImportPreviewTree,
|
|
43883
|
+
"ImportProgress": ImportProgress,
|
|
43884
|
+
"ImportSourcePicker": ImportSourcePicker,
|
|
43547
43885
|
"InfiniteScrollSentinel": InfiniteScrollSentinel,
|
|
43548
43886
|
"Input": Input,
|
|
43549
43887
|
"InputGroup": InputGroup,
|