@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.
Files changed (2) hide show
  1. package/dist/index.js +132 -137
  2. 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
- return /* @__PURE__ */ jsxs11(
3529
- "div",
3530
- {
3531
- className: cn(
3532
- "flex flex-col gap-3",
3533
- maximized && "fixed inset-0 z-50 bg-background p-4 overflow-auto"
3534
- ),
3535
- children: [
3536
- /* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between px-1", children: [
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
- errorMsg && /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2 px-2 py-1.5 rounded bg-destructive/10 text-xs text-destructive", children: [
3573
- /* @__PURE__ */ jsx22(AlertTriangle2, { className: "h-3 w-3 shrink-0" }),
3574
- errorMsg
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__ */ jsx22(
3577
- "div",
3578
- {
3579
- className: cn(
3580
- "overflow-auto border rounded-md",
3581
- maximized ? "flex-1 min-h-0" : "max-h-[400px]"
3582
- ),
3583
- children: /* @__PURE__ */ jsxs11(Table, { children: [
3584
- /* @__PURE__ */ jsx22(TableHeader, { className: "sticky top-0 bg-muted/80 backdrop-blur-sm z-10", children: /* @__PURE__ */ jsxs11(TableRow, { children: [
3585
- /* @__PURE__ */ jsx22(TableHead, { className: "w-8 text-center", children: "#" }),
3586
- columns.map((col) => /* @__PURE__ */ jsx22(TableHead, { children: col }, col))
3587
- ] }) }),
3588
- /* @__PURE__ */ jsxs11(TableBody, { children: [
3589
- rows.map((row, rowIdx) => {
3590
- const sku = row[skuField] ?? "";
3591
- const rowErrors = errorMap.get(sku);
3592
- const missingAttrs = dataIssueMap.get(sku);
3593
- return /* @__PURE__ */ jsxs11(React8.Fragment, { children: [
3594
- /* @__PURE__ */ jsxs11(TableRow, { className: cn(rowErrors && "bg-destructive/5"), children: [
3595
- /* @__PURE__ */ jsx22(TableCell, { className: "text-center text-xs text-muted-foreground", children: rowIdx + 1 }),
3596
- columns.map((col) => {
3597
- const cellErr = rowErrors?.get(col);
3598
- return /* @__PURE__ */ jsx22(TableCell, { className: "p-0.5", children: /* @__PURE__ */ jsx22(
3599
- EditableCell2,
3600
- {
3601
- value: row[col] ?? "",
3602
- hasError: !!cellErr,
3603
- errorMessage: cellErr,
3604
- onChange: (val) => handleCellChange(rowIdx, col, val),
3605
- readOnly: isLoading,
3606
- onFetchSuggestions: cellErr ? () => fetchValidValues(
3607
- sourceMp,
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("div", { className: "flex items-center justify-end gap-2 pt-1", children: [
3632
- /* @__PURE__ */ jsxs11(
3633
- Button,
3634
- {
3635
- variant: "outline",
3636
- size: "sm",
3637
- className: "gap-1.5",
3638
- onClick: handleCancel,
3639
- disabled: isLoading,
3640
- children: [
3641
- /* @__PURE__ */ jsx22(X2, { className: "h-3.5 w-3.5" }),
3642
- "Cancel"
3643
- ]
3644
- }
3645
- ),
3646
- /* @__PURE__ */ jsxs11(
3647
- Button,
3648
- {
3649
- onClick: handleFixAndRevalidate,
3650
- size: "sm",
3651
- className: "gap-1.5",
3652
- disabled: isLoading,
3653
- children: [
3654
- 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" }),
3655
- errorCount > 0 ? "Fix & Re-validate" : editedCells.size > 0 ? "Fix & Re-validate" : "Proceed"
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 Fragment5, jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
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(Fragment5, { children: [
4403
+ children: applying ? /* @__PURE__ */ jsxs13(Fragment6, { children: [
4409
4404
  /* @__PURE__ */ jsx24(Loader28, { className: "size-4 animate-spin" }),
4410
4405
  "Applying..."
4411
- ] }) : /* @__PURE__ */ jsxs13(Fragment5, { children: [
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 Fragment6, jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
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(Fragment6, { children: [
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamoid/catalogix-chat",
3
- "version": "0.2.26",
3
+ "version": "0.2.27",
4
4
  "description": "Catalogix chat components for the Streamoid chat host — store creation, product selection, automations",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",