@streamoid/catalogix-chat 0.2.26 → 0.2.27
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/index.js +132 -137
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3094,7 +3094,7 @@ import {
|
|
|
3094
3094
|
X as X2,
|
|
3095
3095
|
RefreshCw
|
|
3096
3096
|
} from "lucide-react";
|
|
3097
|
-
import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3097
|
+
import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3098
3098
|
function buildErrorMap(criticalIssues, columns) {
|
|
3099
3099
|
const map = /* @__PURE__ */ new Map();
|
|
3100
3100
|
for (const issue of criticalIssues) {
|
|
@@ -3525,141 +3525,136 @@ function EditFeed({
|
|
|
3525
3525
|
skuField,
|
|
3526
3526
|
onSubmit
|
|
3527
3527
|
]);
|
|
3528
|
-
|
|
3529
|
-
"div",
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
"
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2", children: [
|
|
3538
|
-
/* @__PURE__ */ jsx22(AlertTriangle2, { className: "h-4 w-4 text-destructive" }),
|
|
3539
|
-
/* @__PURE__ */ jsx22("span", { className: "font-medium text-sm", children: "Feed Validation Issues" }),
|
|
3540
|
-
errorCount > 0 && /* @__PURE__ */ jsxs11(Badge, { variant: "destructive", className: "text-[10px]", children: [
|
|
3541
|
-
errorCount,
|
|
3542
|
-
" error",
|
|
3543
|
-
errorCount !== 1 ? "s" : ""
|
|
3544
|
-
] }),
|
|
3545
|
-
dataIssuesRaw.length > 0 && /* @__PURE__ */ jsxs11(Badge, { variant: "outline", className: "text-[10px] border-amber-400 text-amber-600 dark:text-amber-400", children: [
|
|
3546
|
-
dataIssuesRaw.length,
|
|
3547
|
-
" warning",
|
|
3548
|
-
dataIssuesRaw.length !== 1 ? "s" : ""
|
|
3549
|
-
] }),
|
|
3550
|
-
editedCells.size > 0 && /* @__PURE__ */ jsxs11(Badge, { variant: "secondary", className: "text-[10px]", children: [
|
|
3551
|
-
editedCells.size,
|
|
3552
|
-
" edited"
|
|
3553
|
-
] })
|
|
3554
|
-
] }),
|
|
3555
|
-
/* @__PURE__ */ jsx22(
|
|
3556
|
-
Button,
|
|
3557
|
-
{
|
|
3558
|
-
variant: "ghost",
|
|
3559
|
-
size: "sm",
|
|
3560
|
-
className: "h-7 w-7 p-0",
|
|
3561
|
-
onClick: () => setMaximized((v) => !v),
|
|
3562
|
-
title: maximized ? "Minimize" : "Maximize",
|
|
3563
|
-
children: maximized ? /* @__PURE__ */ jsx22(Minimize2, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx22(Maximize2, { className: "h-4 w-4" })
|
|
3564
|
-
}
|
|
3565
|
-
)
|
|
3566
|
-
] }),
|
|
3567
|
-
/* @__PURE__ */ jsx22("p", { className: "text-xs text-muted-foreground px-1", children: errorCount > 0 ? "Click on the highlighted cells to edit their values, then submit to re-validate." : "No critical errors found. Review the warnings below and edit values if needed, or proceed." }),
|
|
3568
|
-
statusMsg && /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2 px-2 py-1.5 rounded bg-muted text-xs text-muted-foreground", children: [
|
|
3569
|
-
/* @__PURE__ */ jsx22(Loader26, { className: "h-3 w-3 animate-spin" }),
|
|
3570
|
-
statusMsg
|
|
3528
|
+
const content = /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
3529
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between px-1 shrink-0", children: [
|
|
3530
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2", children: [
|
|
3531
|
+
/* @__PURE__ */ jsx22(AlertTriangle2, { className: "h-4 w-4 text-destructive" }),
|
|
3532
|
+
/* @__PURE__ */ jsx22("span", { className: "font-medium text-sm", children: "Feed Validation Issues" }),
|
|
3533
|
+
errorCount > 0 && /* @__PURE__ */ jsxs11(Badge, { variant: "destructive", className: "text-[10px]", children: [
|
|
3534
|
+
errorCount,
|
|
3535
|
+
" error",
|
|
3536
|
+
errorCount !== 1 ? "s" : ""
|
|
3571
3537
|
] }),
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3538
|
+
dataIssuesRaw.length > 0 && /* @__PURE__ */ jsxs11(Badge, { variant: "outline", className: "text-[10px] border-amber-400 text-amber-600 dark:text-amber-400", children: [
|
|
3539
|
+
dataIssuesRaw.length,
|
|
3540
|
+
" warning",
|
|
3541
|
+
dataIssuesRaw.length !== 1 ? "s" : ""
|
|
3575
3542
|
] }),
|
|
3576
|
-
/* @__PURE__ */
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
marketplaceOv,
|
|
3609
|
-
row["Category"] ?? "",
|
|
3610
|
-
col
|
|
3611
|
-
) : void 0
|
|
3612
|
-
}
|
|
3613
|
-
) }, col);
|
|
3614
|
-
})
|
|
3615
|
-
] }),
|
|
3616
|
-
missingAttrs && /* @__PURE__ */ jsx22("tr", { children: /* @__PURE__ */ jsx22("td", { colSpan: columns.length + 1, children: /* @__PURE__ */ jsx22(MissingAttributesBanner, { text: missingAttrs, defaultOpen: errorCount === 0 }) }) })
|
|
3617
|
-
] }, rowIdx);
|
|
3618
|
-
}),
|
|
3619
|
-
rows.length === 0 && /* @__PURE__ */ jsx22(TableRow, { children: /* @__PURE__ */ jsx22(
|
|
3620
|
-
TableCell,
|
|
3621
|
-
{
|
|
3622
|
-
colSpan: columns.length + 1,
|
|
3623
|
-
className: "text-center text-muted-foreground py-8",
|
|
3624
|
-
children: "No error rows to display."
|
|
3625
|
-
}
|
|
3626
|
-
) })
|
|
3627
|
-
] })
|
|
3628
|
-
] })
|
|
3629
|
-
}
|
|
3543
|
+
editedCells.size > 0 && /* @__PURE__ */ jsxs11(Badge, { variant: "secondary", className: "text-[10px]", children: [
|
|
3544
|
+
editedCells.size,
|
|
3545
|
+
" edited"
|
|
3546
|
+
] })
|
|
3547
|
+
] }),
|
|
3548
|
+
/* @__PURE__ */ jsx22(
|
|
3549
|
+
Button,
|
|
3550
|
+
{
|
|
3551
|
+
variant: "ghost",
|
|
3552
|
+
size: "sm",
|
|
3553
|
+
className: "h-7 w-7 p-0",
|
|
3554
|
+
onClick: () => setMaximized((v) => !v),
|
|
3555
|
+
title: maximized ? "Minimize" : "Maximize",
|
|
3556
|
+
children: maximized ? /* @__PURE__ */ jsx22(Minimize2, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx22(Maximize2, { className: "h-4 w-4" })
|
|
3557
|
+
}
|
|
3558
|
+
)
|
|
3559
|
+
] }),
|
|
3560
|
+
/* @__PURE__ */ jsx22("p", { className: "text-xs text-muted-foreground px-1 shrink-0", children: errorCount > 0 ? "Click on the highlighted cells to edit their values, then submit to re-validate." : "No critical errors found. Review the warnings below and edit values if needed, or proceed." }),
|
|
3561
|
+
statusMsg && /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2 px-2 py-1.5 rounded bg-muted text-xs text-muted-foreground shrink-0", children: [
|
|
3562
|
+
/* @__PURE__ */ jsx22(Loader26, { className: "h-3 w-3 animate-spin" }),
|
|
3563
|
+
statusMsg
|
|
3564
|
+
] }),
|
|
3565
|
+
errorMsg && /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2 px-2 py-1.5 rounded bg-destructive/10 text-xs text-destructive shrink-0", children: [
|
|
3566
|
+
/* @__PURE__ */ jsx22(AlertTriangle2, { className: "h-3 w-3 shrink-0" }),
|
|
3567
|
+
errorMsg
|
|
3568
|
+
] }),
|
|
3569
|
+
/* @__PURE__ */ jsx22(
|
|
3570
|
+
"div",
|
|
3571
|
+
{
|
|
3572
|
+
className: cn(
|
|
3573
|
+
"overflow-auto border rounded-md",
|
|
3574
|
+
maximized ? "flex-1 min-h-0" : "max-h-[400px]"
|
|
3630
3575
|
),
|
|
3631
|
-
/* @__PURE__ */ jsxs11(
|
|
3632
|
-
/* @__PURE__ */ jsxs11(
|
|
3633
|
-
|
|
3634
|
-
{
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
"
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3576
|
+
children: /* @__PURE__ */ jsxs11(Table, { children: [
|
|
3577
|
+
/* @__PURE__ */ jsx22(TableHeader, { className: "sticky top-0 bg-muted/80 backdrop-blur-sm z-10", children: /* @__PURE__ */ jsxs11(TableRow, { children: [
|
|
3578
|
+
/* @__PURE__ */ jsx22(TableHead, { className: "w-8 text-center", children: "#" }),
|
|
3579
|
+
columns.map((col) => /* @__PURE__ */ jsx22(TableHead, { children: col }, col))
|
|
3580
|
+
] }) }),
|
|
3581
|
+
/* @__PURE__ */ jsxs11(TableBody, { children: [
|
|
3582
|
+
rows.map((row, rowIdx) => {
|
|
3583
|
+
const sku = row[skuField] ?? "";
|
|
3584
|
+
const rowErrors = errorMap.get(sku);
|
|
3585
|
+
const missingAttrs = dataIssueMap.get(sku);
|
|
3586
|
+
return /* @__PURE__ */ jsxs11(React8.Fragment, { children: [
|
|
3587
|
+
/* @__PURE__ */ jsxs11(TableRow, { className: cn(rowErrors && "bg-destructive/5"), children: [
|
|
3588
|
+
/* @__PURE__ */ jsx22(TableCell, { className: "text-center text-xs text-muted-foreground", children: rowIdx + 1 }),
|
|
3589
|
+
columns.map((col) => {
|
|
3590
|
+
const cellErr = rowErrors?.get(col);
|
|
3591
|
+
return /* @__PURE__ */ jsx22(TableCell, { className: "p-0.5", children: /* @__PURE__ */ jsx22(
|
|
3592
|
+
EditableCell2,
|
|
3593
|
+
{
|
|
3594
|
+
value: row[col] ?? "",
|
|
3595
|
+
hasError: !!cellErr,
|
|
3596
|
+
errorMessage: cellErr,
|
|
3597
|
+
onChange: (val) => handleCellChange(rowIdx, col, val),
|
|
3598
|
+
readOnly: isLoading,
|
|
3599
|
+
onFetchSuggestions: cellErr ? () => fetchValidValues(
|
|
3600
|
+
sourceMp,
|
|
3601
|
+
marketplaceOv,
|
|
3602
|
+
row["Category"] ?? "",
|
|
3603
|
+
col
|
|
3604
|
+
) : void 0
|
|
3605
|
+
}
|
|
3606
|
+
) }, col);
|
|
3607
|
+
})
|
|
3608
|
+
] }),
|
|
3609
|
+
missingAttrs && /* @__PURE__ */ jsx22("tr", { children: /* @__PURE__ */ jsx22("td", { colSpan: columns.length + 1, children: /* @__PURE__ */ jsx22(MissingAttributesBanner, { text: missingAttrs, defaultOpen: errorCount === 0 }) }) })
|
|
3610
|
+
] }, rowIdx);
|
|
3611
|
+
}),
|
|
3612
|
+
rows.length === 0 && /* @__PURE__ */ jsx22(TableRow, { children: /* @__PURE__ */ jsx22(
|
|
3613
|
+
TableCell,
|
|
3614
|
+
{
|
|
3615
|
+
colSpan: columns.length + 1,
|
|
3616
|
+
className: "text-center text-muted-foreground py-8",
|
|
3617
|
+
children: "No error rows to display."
|
|
3618
|
+
}
|
|
3619
|
+
) })
|
|
3620
|
+
] })
|
|
3659
3621
|
] })
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3622
|
+
}
|
|
3623
|
+
),
|
|
3624
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-end gap-2 pt-1 shrink-0", children: [
|
|
3625
|
+
/* @__PURE__ */ jsxs11(
|
|
3626
|
+
Button,
|
|
3627
|
+
{
|
|
3628
|
+
variant: "outline",
|
|
3629
|
+
size: "sm",
|
|
3630
|
+
className: "gap-1.5",
|
|
3631
|
+
onClick: handleCancel,
|
|
3632
|
+
disabled: isLoading,
|
|
3633
|
+
children: [
|
|
3634
|
+
/* @__PURE__ */ jsx22(X2, { className: "h-3.5 w-3.5" }),
|
|
3635
|
+
"Cancel"
|
|
3636
|
+
]
|
|
3637
|
+
}
|
|
3638
|
+
),
|
|
3639
|
+
/* @__PURE__ */ jsxs11(
|
|
3640
|
+
Button,
|
|
3641
|
+
{
|
|
3642
|
+
onClick: handleFixAndRevalidate,
|
|
3643
|
+
size: "sm",
|
|
3644
|
+
className: "gap-1.5",
|
|
3645
|
+
disabled: isLoading,
|
|
3646
|
+
children: [
|
|
3647
|
+
isLoading ? /* @__PURE__ */ jsx22(Loader26, { className: "h-3.5 w-3.5 animate-spin" }) : errorCount > 0 ? /* @__PURE__ */ jsx22(RefreshCw, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx22(Send2, { className: "h-3.5 w-3.5" }),
|
|
3648
|
+
errorCount > 0 ? "Fix & Re-validate" : editedCells.size > 0 ? "Fix & Re-validate" : "Proceed"
|
|
3649
|
+
]
|
|
3650
|
+
}
|
|
3651
|
+
)
|
|
3652
|
+
] })
|
|
3653
|
+
] });
|
|
3654
|
+
if (maximized) {
|
|
3655
|
+
return /* @__PURE__ */ jsx22("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm", children: /* @__PURE__ */ jsx22("div", { className: "flex flex-col gap-3 bg-background border rounded-lg shadow-xl m-6 p-5 w-[calc(100%-3rem)] h-[calc(100%-3rem)] max-w-full max-h-full", children: content }) });
|
|
3656
|
+
}
|
|
3657
|
+
return /* @__PURE__ */ jsx22("div", { className: "flex flex-col gap-3", children: content });
|
|
3663
3658
|
}
|
|
3664
3659
|
|
|
3665
3660
|
// src/Automations/ProductAutomation.tsx
|
|
@@ -4125,7 +4120,7 @@ function BooleanField({
|
|
|
4125
4120
|
}
|
|
4126
4121
|
|
|
4127
4122
|
// src/Automations/ProductAutomation.tsx
|
|
4128
|
-
import { Fragment as
|
|
4123
|
+
import { Fragment as Fragment6, jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4129
4124
|
function ProductAutomation({
|
|
4130
4125
|
storeId,
|
|
4131
4126
|
workspaceId,
|
|
@@ -4405,10 +4400,10 @@ function ProductAutomation({
|
|
|
4405
4400
|
onClick: handleRun,
|
|
4406
4401
|
disabled: !isRunAllowed() || applying,
|
|
4407
4402
|
className: "flex-1",
|
|
4408
|
-
children: applying ? /* @__PURE__ */ jsxs13(
|
|
4403
|
+
children: applying ? /* @__PURE__ */ jsxs13(Fragment6, { children: [
|
|
4409
4404
|
/* @__PURE__ */ jsx24(Loader28, { className: "size-4 animate-spin" }),
|
|
4410
4405
|
"Applying..."
|
|
4411
|
-
] }) : /* @__PURE__ */ jsxs13(
|
|
4406
|
+
] }) : /* @__PURE__ */ jsxs13(Fragment6, { children: [
|
|
4412
4407
|
/* @__PURE__ */ jsx24(Play, { className: "size-4" }),
|
|
4413
4408
|
"Run Automation"
|
|
4414
4409
|
] })
|
|
@@ -4452,7 +4447,7 @@ function formatTimeSaved(totalSeconds) {
|
|
|
4452
4447
|
// src/Automations/StoreAutomation.tsx
|
|
4453
4448
|
import { useState as useState11, useEffect as useEffect8, useCallback as useCallback9, useRef as useRef7 } from "react";
|
|
4454
4449
|
import { ArrowLeft as ArrowLeft4, Settings } from "lucide-react";
|
|
4455
|
-
import { Fragment as
|
|
4450
|
+
import { Fragment as Fragment7, jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4456
4451
|
function StoreAutomation({
|
|
4457
4452
|
storeId,
|
|
4458
4453
|
channelsWithVersion,
|
|
@@ -4700,7 +4695,7 @@ function AutomationConfigEditor({
|
|
|
4700
4695
|
onConfigChange: handleConfigChange
|
|
4701
4696
|
}
|
|
4702
4697
|
) : /* @__PURE__ */ jsx25("p", { className: "py-4 text-center text-sm text-muted-foreground", children: "Enable this automation to configure it." }) }),
|
|
4703
|
-
automation.preview && /* @__PURE__ */ jsxs14(
|
|
4698
|
+
automation.preview && /* @__PURE__ */ jsxs14(Fragment7, { children: [
|
|
4704
4699
|
/* @__PURE__ */ jsx25(Separator2, {}),
|
|
4705
4700
|
/* @__PURE__ */ jsxs14("div", { className: "space-y-2 rounded-lg bg-muted/50 p-3 text-sm", children: [
|
|
4706
4701
|
automation.preview.info_text.map((text, i) => /* @__PURE__ */ jsx25("p", { className: "text-muted-foreground", children: text }, i)),
|
package/package.json
CHANGED