@universe-platform/ui 0.1.0-beta.82 → 0.1.0-beta.83

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/globals.css CHANGED
@@ -2275,6 +2275,12 @@
2275
2275
  .text-slate-900 {
2276
2276
  color: var(--color-slate-900);
2277
2277
  }
2278
+ .text-teal-50 {
2279
+ color: var(--color-teal-50);
2280
+ }
2281
+ .text-teal-100 {
2282
+ color: var(--color-teal-100);
2283
+ }
2278
2284
  .text-teal-600 {
2279
2285
  color: var(--color-teal-600);
2280
2286
  }
package/dist/index.js CHANGED
@@ -12693,7 +12693,8 @@ var PlacementRow = import_react26.default.memo(
12693
12693
  title: "\u05DC\u05D7\u05D9\u05E6\u05D4 \u05DB\u05E4\u05D5\u05DC\u05D4: \u05D4\u05E6\u05D2\u05EA \u05DB\u05DC \u05E4\u05E8\u05D8\u05D9 \u05D4\u05E8\u05E9\u05D5\u05DE\u05D4",
12694
12694
  onDoubleClick: (e) => {
12695
12695
  const t = e.target;
12696
- if (t.closest('button, a, select, input, textarea, [role="button"], [role="dialog"], [contenteditable="true"], [data-placement-move]')) return;
12696
+ if (t.closest('button, a, select, [role="button"], [role="dialog"], [contenteditable="true"], [data-placement-move]')) return;
12697
+ if (t.type === "checkbox") return;
12697
12698
  p.onOpenDetails(row.id);
12698
12699
  },
12699
12700
  children: [
@@ -12782,6 +12783,14 @@ var PlacementGrid = (props) => {
12782
12783
  return calculateMinColumnWidth((col == null ? void 0 : col.label) || colName, false, col == null ? void 0 : col.type);
12783
12784
  }
12784
12785
  });
12786
+ const canReorder = !!props.onReorderColumns && !props.isLoading;
12787
+ const { draggedColName, dragOverColName, getHeaderDragProps } = useColumnReorder({
12788
+ onReorder: (dragged, target) => {
12789
+ var _a;
12790
+ return (_a = props.onReorderColumns) == null ? void 0 : _a.call(props, dragged, target);
12791
+ },
12792
+ disabled: !canReorder
12793
+ });
12785
12794
  const minOf = (col) => calculateMinColumnWidth(col.label || col.name, false, col.virtual ? "DEFAULT" : col.type);
12786
12795
  const widthOf = (col) => Math.max(minOf(col), columnWidths[col.name] || DEFAULT_COL_WIDTH);
12787
12796
  const widthsVersion = JSON.stringify(columnWidths);
@@ -12842,12 +12851,16 @@ var PlacementGrid = (props) => {
12842
12851
  const colMin = minOf(col);
12843
12852
  const isRelation2 = !col.virtual && ((_a = col.type) == null ? void 0 : _a.toUpperCase()) === "RELATION";
12844
12853
  const active = !!((_b = props.isFilterActive) == null ? void 0 : _b.call(props, col.name));
12854
+ const dragProps = canReorder ? getHeaderDragProps(col.name) : {};
12855
+ const isDragging = canReorder && draggedColName === col.name;
12856
+ const isDragOver = canReorder && dragOverColName === col.name && draggedColName !== col.name;
12845
12857
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
12846
12858
  "th",
12847
- {
12859
+ __spreadProps(__spreadValues({
12848
12860
  style: { width, minWidth: width, maxWidth: width },
12849
- title: col.label || col.name,
12850
- className: "group relative border-b border-l border-slate-200 px-2 py-1 font-semibold text-slate-700 select-none h-12 min-h-[48px] align-middle bg-white cursor-default",
12861
+ title: col.label || col.name
12862
+ }, dragProps), {
12863
+ className: `group relative border-b border-l border-slate-200 px-2 py-1 font-semibold text-slate-700 select-none transition-colors h-12 min-h-[48px] align-middle bg-white ${canReorder ? "cursor-grab active:cursor-grabbing hover:bg-slate-100" : "cursor-default"} ${isDragging ? "opacity-40 bg-slate-200 border-dashed border-2 border-brand" : ""} ${isDragOver ? "bg-blue-50 border-r-4 border-r-brand text-brand font-bold" : ""}`,
12851
12864
  children: [
12852
12865
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
12853
12866
  "div",
@@ -12882,7 +12895,7 @@ var PlacementGrid = (props) => {
12882
12895
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ColumnHeaderTitle, { name: col.label || col.name, width, isSubTable: false })
12883
12896
  ] })
12884
12897
  ]
12885
- },
12898
+ }),
12886
12899
  col.name
12887
12900
  );
12888
12901
  }),
@@ -14157,16 +14170,51 @@ var PlacementBlock = (props) => {
14157
14170
  } catch (e) {
14158
14171
  }
14159
14172
  }, [sourceTableId]);
14173
+ const [colOrder, setColOrder] = (0, import_react31.useState)({ source: [], cand: [] });
14174
+ (0, import_react31.useEffect)(() => {
14175
+ if (!sourceTableId) return;
14176
+ const load = (grid) => {
14177
+ try {
14178
+ const v = JSON.parse(localStorage.getItem(`placement_col_order_${sourceTableId}_${grid}`) || "[]");
14179
+ return Array.isArray(v) ? v : [];
14180
+ } catch (e) {
14181
+ return [];
14182
+ }
14183
+ };
14184
+ setColOrder({ source: load("source"), cand: load("cand") });
14185
+ }, [sourceTableId]);
14186
+ const applyOrder = (0, import_react31.useCallback)((order) => {
14187
+ if (!order.length) return gridColumns;
14188
+ const rank = new Map(order.map((n, i) => [n, i]));
14189
+ return gridColumns.map((c, i) => ({ c, i })).sort((a, b) => (rank.has(a.c.name) ? rank.get(a.c.name) : order.length + a.i) - (rank.has(b.c.name) ? rank.get(b.c.name) : order.length + b.i)).map((x) => x.c);
14190
+ }, [gridColumns]);
14191
+ const sourceOrderedColumns = (0, import_react31.useMemo)(() => applyOrder(colOrder.source), [applyOrder, colOrder.source]);
14192
+ const candOrderedColumns = (0, import_react31.useMemo)(() => applyOrder(colOrder.cand), [applyOrder, colOrder.cand]);
14193
+ const reorderColumns = (0, import_react31.useCallback)((grid, dragged, target) => {
14194
+ const current = (grid === "source" ? sourceOrderedColumns : candOrderedColumns).map((c) => c.name);
14195
+ const from = current.indexOf(dragged);
14196
+ const to = current.indexOf(target);
14197
+ if (from < 0 || to < 0 || from === to) return;
14198
+ const [item] = current.splice(from, 1);
14199
+ current.splice(to, 0, item);
14200
+ setColOrder((prev) => __spreadProps(__spreadValues({}, prev), { [grid]: current }));
14201
+ try {
14202
+ localStorage.setItem(`placement_col_order_${sourceTableId}_${grid}`, JSON.stringify(current));
14203
+ } catch (e) {
14204
+ }
14205
+ }, [sourceOrderedColumns, candOrderedColumns, sourceTableId]);
14206
+ const onSourceReorder = (0, import_react31.useCallback)((d, t) => reorderColumns("source", d, t), [reorderColumns]);
14207
+ const onCandReorder = (0, import_react31.useCallback)((d, t) => reorderColumns("cand", d, t), [reorderColumns]);
14160
14208
  const sourceVisibleColumns = (0, import_react31.useMemo)(() => {
14161
14209
  const h = new Set(hiddenCols.source);
14162
- const v = gridColumns.filter((c) => !h.has(c.name));
14163
- return v.length ? v : gridColumns;
14164
- }, [gridColumns, hiddenCols.source]);
14210
+ const v = sourceOrderedColumns.filter((c) => !h.has(c.name));
14211
+ return v.length ? v : sourceOrderedColumns;
14212
+ }, [sourceOrderedColumns, hiddenCols.source]);
14165
14213
  const candVisibleColumns = (0, import_react31.useMemo)(() => {
14166
14214
  const h = new Set(hiddenCols.cand);
14167
- const v = gridColumns.filter((c) => !h.has(c.name));
14168
- return v.length ? v : gridColumns;
14169
- }, [gridColumns, hiddenCols.cand]);
14215
+ const v = candOrderedColumns.filter((c) => !h.has(c.name));
14216
+ return v.length ? v : candOrderedColumns;
14217
+ }, [candOrderedColumns, hiddenCols.cand]);
14170
14218
  const onSourceHiddenChange = (0, import_react31.useCallback)((next) => updateHiddenCols("source", next), [updateHiddenCols]);
14171
14219
  const onCandHiddenChange = (0, import_react31.useCallback)((next) => updateHiddenCols("cand", next), [updateHiddenCols]);
14172
14220
  const getCellValue = (0, import_react31.useCallback)((row, col) => {
@@ -14463,66 +14511,75 @@ var PlacementBlock = (props) => {
14463
14511
  const editUrl = editComponentUrl || (role === "OWNER" && orgId && componentId ? `${process.env.NEXT_PUBLIC_DASHBOARD_URL || "http://localhost:3000"}/organizations/${orgId}/edit-app?tab=pages&componentId=${encodeURIComponent(componentId)}` : null);
14464
14512
  const selectClass = "w-full p-2 border border-slate-300 rounded-lg text-xs font-medium text-slate-700 bg-slate-50 outline-none focus:border-brand";
14465
14513
  const labelClass = "block text-[11px] font-semibold text-slate-500 mb-1";
14514
+ const editButton = editUrl ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
14515
+ "a",
14516
+ {
14517
+ href: editUrl,
14518
+ target: "_blank",
14519
+ rel: "noopener noreferrer",
14520
+ className: "inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-medium bg-white hover:bg-slate-100 border border-slate-300 text-slate-700 hover:text-slate-900 transition-colors shadow-2xs shrink-0 cursor-pointer",
14521
+ title: "\u05E2\u05E8\u05D5\u05DA \u05D0\u05EA \u05E8\u05DB\u05D9\u05D1 \u05D4\u05E9\u05D9\u05D1\u05D5\u05E5 \u05D1\u05DC\u05D5\u05D7 \u05D4\u05D1\u05E7\u05E8\u05D4",
14522
+ children: [
14523
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "\u05E2\u05E8\u05D9\u05DB\u05EA \u05E8\u05DB\u05D9\u05D1 \u05D4\u05E9\u05D9\u05D1\u05D5\u05E5" }),
14524
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.ExternalLink, { className: "w-3.5 h-3.5 text-slate-500" })
14525
+ ]
14526
+ }
14527
+ ) : null;
14466
14528
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: `w-full flex flex-col gap-3 p-3 bg-slate-50 min-h-[850px] rounded-xl border border-slate-200 ${className}`, dir: "rtl", children: [
14467
14529
  (loadError || saveError) && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "p-3 text-xs rounded-lg bg-rose-50 border border-rose-200 text-rose-700", children: loadError || saveError }),
14468
14530
  /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-3", children: [
14469
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "w-full bg-teal-50/40 p-3 rounded-xl border border-teal-100 shadow-xs flex flex-col", children: [
14470
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 border-b border-teal-200 pb-1.5 mb-2", children: [
14471
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("h4", { className: "font-bold text-teal-900 text-base flex items-center gap-2 shrink-0", children: [
14472
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "\u{1F4CC}" }),
14473
- " \u05E4\u05E8\u05D8\u05D9 \u05D4\u05D9\u05E2\u05D3 \u05DC\u05E9\u05D9\u05D1\u05D5\u05E5"
14531
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "w-full bg-teal-50/40 p-3 rounded-xl border border-teal-100 shadow-xs flex flex-col", children: activeTarget ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-7 gap-x-4 gap-y-1.5 content-start text-sm text-slate-700 flex-1", children: [
14532
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "col-span-full bg-teal-700 text-white rounded-lg px-3 py-1 flex flex-wrap items-center gap-x-3 gap-y-1", children: [
14533
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "font-bold text-lg flex items-center gap-2 min-w-0", children: [
14534
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { "aria-hidden": "true", children: "\u{1F4CC}" }),
14535
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "min-w-0 break-words", children: targetLabel(activeTarget) })
14474
14536
  ] }),
14475
- activeTarget && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "text-teal-800 font-bold text-xs shrink-0 whitespace-nowrap", children: [
14537
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "text-teal-100 font-bold text-xs shrink-0 whitespace-nowrap", children: [
14476
14538
  "\u05DE\u05E9\u05D5\u05D1\u05E6\u05D9\u05DD \u05DB\u05E8\u05D2\u05E2: ",
14477
14539
  assignedIds.length
14478
14540
  ] }),
14479
- editUrl && (config == null ? void 0 : config.title) && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "font-semibold text-slate-600 text-xs sm:text-sm min-w-0 break-words", children: config.title }),
14480
- editUrl && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
14481
- "a",
14482
- {
14483
- href: editUrl,
14484
- target: "_blank",
14485
- rel: "noopener noreferrer",
14486
- className: "ms-auto inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-medium bg-white hover:bg-slate-100 border border-slate-300 text-slate-700 hover:text-slate-900 transition-colors shadow-2xs shrink-0 cursor-pointer",
14487
- title: "\u05E2\u05E8\u05D5\u05DA \u05D0\u05EA \u05E8\u05DB\u05D9\u05D1 \u05D4\u05E9\u05D9\u05D1\u05D5\u05E5 \u05D1\u05DC\u05D5\u05D7 \u05D4\u05D1\u05E7\u05E8\u05D4",
14488
- children: [
14489
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "\u05E2\u05E8\u05D9\u05DB\u05EA \u05E8\u05DB\u05D9\u05D1 \u05D4\u05E9\u05D9\u05D1\u05D5\u05E5" }),
14490
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.ExternalLink, { className: "w-3.5 h-3.5 text-slate-500" })
14491
- ]
14492
- }
14493
- )
14541
+ editUrl && (config == null ? void 0 : config.title) || editButton ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "ms-auto flex items-center gap-3 min-w-0", children: [
14542
+ editUrl && (config == null ? void 0 : config.title) && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-teal-50 text-xs sm:text-sm min-w-0 break-words", children: config.title }),
14543
+ editButton
14544
+ ] }) : null
14494
14545
  ] }),
14495
- activeTarget ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-7 gap-x-4 gap-y-1.5 content-start text-sm text-slate-700 flex-1", children: [
14496
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "col-span-full bg-teal-700 text-white font-bold text-lg rounded-lg px-3 py-1", children: targetLabel(activeTarget) }),
14497
- previewColumns.map((col) => ({ col, text: displayValue(col, readColumnValue(activeTarget.data, col.name)) })).filter(({ col, text: text2 }) => {
14498
- var _a2;
14499
- return text2 && (col.type === "RELATION" || typeof ((_a2 = activeTarget.data) == null ? void 0 : _a2[col.name]) !== "object");
14500
- }).map(({ col, text: text2 }) => {
14501
- var _a2, _b2;
14502
- const label = col.label || col.name;
14503
- const span = label === "\u05E4\u05E8\u05D8\u05D9\u05DD \u05E0\u05D5\u05E1\u05E4\u05D9\u05DD" || text2.length > 60 ? "col-span-full" : text2.length > 28 ? "col-span-2 sm:col-span-3 lg:col-span-2" : "";
14504
- const isDate = ((_a2 = col.type) == null ? void 0 : _a2.toUpperCase()) === "DATE";
14505
- const isStatus = label.includes("\u05E1\u05D8\u05D8\u05D5\u05E1");
14506
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: `flex gap-1.5 items-baseline min-w-0 ${span}`, children: [
14507
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "text-slate-500 text-xs shrink-0", children: [
14508
- label,
14509
- ":"
14510
- ] }),
14511
- isDate ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "inline-flex items-center gap-1 font-semibold text-slate-900", children: [
14512
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.CalendarDays, { className: "w-3.5 h-3.5 text-teal-600 shrink-0" }),
14513
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { dir: "ltr", children: formatPreviewDate((_b2 = activeTarget.data) == null ? void 0 : _b2[col.name], text2) })
14514
- ] }) : isStatus ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: `inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-bold ${statusBadgeClass(text2)}`, children: text2 }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "break-words min-w-0 font-semibold text-slate-900", children: text2 })
14515
- ] }, col.name);
14516
- }),
14517
- assignmentField && assignedText && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex gap-1.5 items-baseline min-w-0", children: [
14546
+ previewColumns.map((col) => ({ col, text: displayValue(col, readColumnValue(activeTarget.data, col.name)) })).filter(({ col, text: text2 }) => {
14547
+ var _a2;
14548
+ return text2 && (col.type === "RELATION" || typeof ((_a2 = activeTarget.data) == null ? void 0 : _a2[col.name]) !== "object");
14549
+ }).map(({ col, text: text2 }) => {
14550
+ var _a2, _b2;
14551
+ const label = col.label || col.name;
14552
+ const span = label === "\u05E4\u05E8\u05D8\u05D9\u05DD \u05E0\u05D5\u05E1\u05E4\u05D9\u05DD" || text2.length > 60 ? "col-span-full" : text2.length > 28 ? "col-span-2 sm:col-span-3 lg:col-span-2" : "";
14553
+ const isDate = ((_a2 = col.type) == null ? void 0 : _a2.toUpperCase()) === "DATE";
14554
+ const isStatus = label.includes("\u05E1\u05D8\u05D8\u05D5\u05E1");
14555
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: `flex gap-1.5 items-baseline min-w-0 ${span}`, children: [
14518
14556
  /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "text-slate-500 text-xs shrink-0", children: [
14519
- assignmentLabel,
14557
+ label,
14520
14558
  ":"
14521
14559
  ] }),
14522
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "break-words min-w-0 font-semibold text-slate-900", title: assignedText, children: assignedText })
14523
- ] })
14524
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "text-slate-500 text-xs text-center py-6", children: isLoading ? "\u05D8\u05D5\u05E2\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD..." : "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05E8\u05E9\u05D5\u05DE\u05EA \u05D9\u05E2\u05D3." })
14525
- ] }),
14560
+ isDate ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "inline-flex items-center gap-1 font-semibold text-slate-900", children: [
14561
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.CalendarDays, { className: "w-3.5 h-3.5 text-teal-600 shrink-0" }),
14562
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { dir: "ltr", children: formatPreviewDate((_b2 = activeTarget.data) == null ? void 0 : _b2[col.name], text2) })
14563
+ ] }) : isStatus ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: `inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-bold ${statusBadgeClass(text2)}`, children: text2 }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "break-words min-w-0 font-semibold text-slate-900", children: text2 })
14564
+ ] }, col.name);
14565
+ }),
14566
+ assignmentField && assignedText && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex gap-1.5 items-baseline min-w-0", children: [
14567
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "text-slate-500 text-xs shrink-0", children: [
14568
+ assignmentLabel,
14569
+ ":"
14570
+ ] }),
14571
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "break-words min-w-0 font-semibold text-slate-900", title: assignedText, children: assignedText })
14572
+ ] })
14573
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
14574
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1", children: [
14575
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("h4", { className: "font-bold text-teal-900 text-base flex items-center gap-2 shrink-0", children: [
14576
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "\u{1F4CC}" }),
14577
+ " \u05E4\u05E8\u05D8\u05D9 \u05D4\u05D9\u05E2\u05D3 \u05DC\u05E9\u05D9\u05D1\u05D5\u05E5"
14578
+ ] }),
14579
+ editButton && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "ms-auto", children: editButton })
14580
+ ] }),
14581
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "text-slate-500 text-xs text-center py-6", children: isLoading ? "\u05D8\u05D5\u05E2\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD..." : "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05E8\u05E9\u05D5\u05DE\u05EA \u05D9\u05E2\u05D3." })
14582
+ ] }) }),
14526
14583
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "w-full bg-white p-3 rounded-xl border border-slate-200 shadow-xs flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
14527
14584
  /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col sm:flex-row sm:flex-wrap sm:items-end gap-3", children: [
14528
14585
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h4", { className: "font-bold text-slate-800 text-sm shrink-0 sm:pb-2", children: "\u05E1\u05D9\u05E0\u05D5\u05DF \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA \u05D4\u05D9\u05E2\u05D3" }),
@@ -14603,7 +14660,7 @@ var PlacementBlock = (props) => {
14603
14660
  availableGridData.length,
14604
14661
  ")"
14605
14662
  ] }),
14606
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PlacementColumnsMenu, { columns: gridColumns, hidden: hiddenCols.source, onChange: onSourceHiddenChange }),
14663
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PlacementColumnsMenu, { columns: sourceOrderedColumns, hidden: hiddenCols.source, onChange: onSourceHiddenChange }),
14607
14664
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PlacementSearchInput, { onChange: setSourceSearch, disabled: isLoading })
14608
14665
  ] }),
14609
14666
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
@@ -14621,6 +14678,7 @@ var PlacementBlock = (props) => {
14621
14678
  onMove: moveToCandidates,
14622
14679
  moveTitle: "\u05D4\u05E2\u05D1\u05E8 \u05DC\u05D8\u05D1\u05DC\u05EA \u05D4\u05DE\u05D5\u05E2\u05DE\u05D3\u05D9\u05DD",
14623
14680
  onOpenDetails: openSourceDetails,
14681
+ onReorderColumns: onSourceReorder,
14624
14682
  isFilterActive: isSourceFilterActive,
14625
14683
  onOpenFilter: openSourceFilter,
14626
14684
  cellContext,
@@ -14639,7 +14697,7 @@ var PlacementBlock = (props) => {
14639
14697
  candidateGridData.length,
14640
14698
  ")"
14641
14699
  ] }),
14642
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PlacementColumnsMenu, { columns: gridColumns, hidden: hiddenCols.cand, onChange: onCandHiddenChange, accent: "blue" }),
14700
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PlacementColumnsMenu, { columns: candOrderedColumns, hidden: hiddenCols.cand, onChange: onCandHiddenChange, accent: "blue" }),
14643
14701
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PlacementSearchInput, { onChange: setCandidateSearch, disabled: isLoading }),
14644
14702
  /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center gap-2 ms-auto", children: [
14645
14703
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("button", { type: "button", onClick: returnAll, disabled: candidateIds.length === 0, className: "px-3 py-1.5 rounded-lg text-xs font-bold bg-amber-400 hover:bg-amber-500 text-slate-900 disabled:opacity-40 disabled:cursor-not-allowed transition-colors", children: "\u21BA \u05D4\u05D7\u05D6\u05E8 \u05D4\u05DB\u05DC" }),
@@ -14667,6 +14725,7 @@ var PlacementBlock = (props) => {
14667
14725
  onMove: moveToSource,
14668
14726
  moveTitle: "\u05D4\u05D7\u05D6\u05E8 \u05DC\u05E8\u05E9\u05D9\u05DE\u05EA \u05D4\u05DE\u05E7\u05D5\u05E8",
14669
14727
  onOpenDetails: openCandDetails,
14728
+ onReorderColumns: onCandReorder,
14670
14729
  isFilterActive: isCandFilterActive,
14671
14730
  onOpenFilter: openCandFilter,
14672
14731
  cellContext,
package/dist/index.mjs CHANGED
@@ -12477,7 +12477,8 @@ var PlacementRow = React21.memo(
12477
12477
  title: "\u05DC\u05D7\u05D9\u05E6\u05D4 \u05DB\u05E4\u05D5\u05DC\u05D4: \u05D4\u05E6\u05D2\u05EA \u05DB\u05DC \u05E4\u05E8\u05D8\u05D9 \u05D4\u05E8\u05E9\u05D5\u05DE\u05D4",
12478
12478
  onDoubleClick: (e) => {
12479
12479
  const t = e.target;
12480
- if (t.closest('button, a, select, input, textarea, [role="button"], [role="dialog"], [contenteditable="true"], [data-placement-move]')) return;
12480
+ if (t.closest('button, a, select, [role="button"], [role="dialog"], [contenteditable="true"], [data-placement-move]')) return;
12481
+ if (t.type === "checkbox") return;
12481
12482
  p.onOpenDetails(row.id);
12482
12483
  },
12483
12484
  children: [
@@ -12566,6 +12567,14 @@ var PlacementGrid = (props) => {
12566
12567
  return calculateMinColumnWidth((col == null ? void 0 : col.label) || colName, false, col == null ? void 0 : col.type);
12567
12568
  }
12568
12569
  });
12570
+ const canReorder = !!props.onReorderColumns && !props.isLoading;
12571
+ const { draggedColName, dragOverColName, getHeaderDragProps } = useColumnReorder({
12572
+ onReorder: (dragged, target) => {
12573
+ var _a;
12574
+ return (_a = props.onReorderColumns) == null ? void 0 : _a.call(props, dragged, target);
12575
+ },
12576
+ disabled: !canReorder
12577
+ });
12569
12578
  const minOf = (col) => calculateMinColumnWidth(col.label || col.name, false, col.virtual ? "DEFAULT" : col.type);
12570
12579
  const widthOf = (col) => Math.max(minOf(col), columnWidths[col.name] || DEFAULT_COL_WIDTH);
12571
12580
  const widthsVersion = JSON.stringify(columnWidths);
@@ -12626,12 +12635,16 @@ var PlacementGrid = (props) => {
12626
12635
  const colMin = minOf(col);
12627
12636
  const isRelation2 = !col.virtual && ((_a = col.type) == null ? void 0 : _a.toUpperCase()) === "RELATION";
12628
12637
  const active = !!((_b = props.isFilterActive) == null ? void 0 : _b.call(props, col.name));
12638
+ const dragProps = canReorder ? getHeaderDragProps(col.name) : {};
12639
+ const isDragging = canReorder && draggedColName === col.name;
12640
+ const isDragOver = canReorder && dragOverColName === col.name && draggedColName !== col.name;
12629
12641
  return /* @__PURE__ */ jsxs19(
12630
12642
  "th",
12631
- {
12643
+ __spreadProps(__spreadValues({
12632
12644
  style: { width, minWidth: width, maxWidth: width },
12633
- title: col.label || col.name,
12634
- className: "group relative border-b border-l border-slate-200 px-2 py-1 font-semibold text-slate-700 select-none h-12 min-h-[48px] align-middle bg-white cursor-default",
12645
+ title: col.label || col.name
12646
+ }, dragProps), {
12647
+ className: `group relative border-b border-l border-slate-200 px-2 py-1 font-semibold text-slate-700 select-none transition-colors h-12 min-h-[48px] align-middle bg-white ${canReorder ? "cursor-grab active:cursor-grabbing hover:bg-slate-100" : "cursor-default"} ${isDragging ? "opacity-40 bg-slate-200 border-dashed border-2 border-brand" : ""} ${isDragOver ? "bg-blue-50 border-r-4 border-r-brand text-brand font-bold" : ""}`,
12635
12648
  children: [
12636
12649
  /* @__PURE__ */ jsx25(
12637
12650
  "div",
@@ -12666,7 +12679,7 @@ var PlacementGrid = (props) => {
12666
12679
  /* @__PURE__ */ jsx25(ColumnHeaderTitle, { name: col.label || col.name, width, isSubTable: false })
12667
12680
  ] })
12668
12681
  ]
12669
- },
12682
+ }),
12670
12683
  col.name
12671
12684
  );
12672
12685
  }),
@@ -13442,7 +13455,7 @@ function computePlacementDefaultFilters(args) {
13442
13455
  }
13443
13456
 
13444
13457
  // src/components/PlacementBlock/PlacementBlock.tsx
13445
- import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
13458
+ import { Fragment as Fragment7, jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
13446
13459
  var STATUS_BADGE_FALLBACK = [
13447
13460
  "bg-blue-100 text-blue-800 border-blue-300",
13448
13461
  "bg-violet-100 text-violet-800 border-violet-300",
@@ -13941,16 +13954,51 @@ var PlacementBlock = (props) => {
13941
13954
  } catch (e) {
13942
13955
  }
13943
13956
  }, [sourceTableId]);
13957
+ const [colOrder, setColOrder] = useState25({ source: [], cand: [] });
13958
+ useEffect22(() => {
13959
+ if (!sourceTableId) return;
13960
+ const load = (grid) => {
13961
+ try {
13962
+ const v = JSON.parse(localStorage.getItem(`placement_col_order_${sourceTableId}_${grid}`) || "[]");
13963
+ return Array.isArray(v) ? v : [];
13964
+ } catch (e) {
13965
+ return [];
13966
+ }
13967
+ };
13968
+ setColOrder({ source: load("source"), cand: load("cand") });
13969
+ }, [sourceTableId]);
13970
+ const applyOrder = useCallback18((order) => {
13971
+ if (!order.length) return gridColumns;
13972
+ const rank = new Map(order.map((n, i) => [n, i]));
13973
+ return gridColumns.map((c, i) => ({ c, i })).sort((a, b) => (rank.has(a.c.name) ? rank.get(a.c.name) : order.length + a.i) - (rank.has(b.c.name) ? rank.get(b.c.name) : order.length + b.i)).map((x) => x.c);
13974
+ }, [gridColumns]);
13975
+ const sourceOrderedColumns = useMemo12(() => applyOrder(colOrder.source), [applyOrder, colOrder.source]);
13976
+ const candOrderedColumns = useMemo12(() => applyOrder(colOrder.cand), [applyOrder, colOrder.cand]);
13977
+ const reorderColumns = useCallback18((grid, dragged, target) => {
13978
+ const current = (grid === "source" ? sourceOrderedColumns : candOrderedColumns).map((c) => c.name);
13979
+ const from = current.indexOf(dragged);
13980
+ const to = current.indexOf(target);
13981
+ if (from < 0 || to < 0 || from === to) return;
13982
+ const [item] = current.splice(from, 1);
13983
+ current.splice(to, 0, item);
13984
+ setColOrder((prev) => __spreadProps(__spreadValues({}, prev), { [grid]: current }));
13985
+ try {
13986
+ localStorage.setItem(`placement_col_order_${sourceTableId}_${grid}`, JSON.stringify(current));
13987
+ } catch (e) {
13988
+ }
13989
+ }, [sourceOrderedColumns, candOrderedColumns, sourceTableId]);
13990
+ const onSourceReorder = useCallback18((d, t) => reorderColumns("source", d, t), [reorderColumns]);
13991
+ const onCandReorder = useCallback18((d, t) => reorderColumns("cand", d, t), [reorderColumns]);
13944
13992
  const sourceVisibleColumns = useMemo12(() => {
13945
13993
  const h = new Set(hiddenCols.source);
13946
- const v = gridColumns.filter((c) => !h.has(c.name));
13947
- return v.length ? v : gridColumns;
13948
- }, [gridColumns, hiddenCols.source]);
13994
+ const v = sourceOrderedColumns.filter((c) => !h.has(c.name));
13995
+ return v.length ? v : sourceOrderedColumns;
13996
+ }, [sourceOrderedColumns, hiddenCols.source]);
13949
13997
  const candVisibleColumns = useMemo12(() => {
13950
13998
  const h = new Set(hiddenCols.cand);
13951
- const v = gridColumns.filter((c) => !h.has(c.name));
13952
- return v.length ? v : gridColumns;
13953
- }, [gridColumns, hiddenCols.cand]);
13999
+ const v = candOrderedColumns.filter((c) => !h.has(c.name));
14000
+ return v.length ? v : candOrderedColumns;
14001
+ }, [candOrderedColumns, hiddenCols.cand]);
13954
14002
  const onSourceHiddenChange = useCallback18((next) => updateHiddenCols("source", next), [updateHiddenCols]);
13955
14003
  const onCandHiddenChange = useCallback18((next) => updateHiddenCols("cand", next), [updateHiddenCols]);
13956
14004
  const getCellValue = useCallback18((row, col) => {
@@ -14247,66 +14295,75 @@ var PlacementBlock = (props) => {
14247
14295
  const editUrl = editComponentUrl || (role === "OWNER" && orgId && componentId ? `${process.env.NEXT_PUBLIC_DASHBOARD_URL || "http://localhost:3000"}/organizations/${orgId}/edit-app?tab=pages&componentId=${encodeURIComponent(componentId)}` : null);
14248
14296
  const selectClass = "w-full p-2 border border-slate-300 rounded-lg text-xs font-medium text-slate-700 bg-slate-50 outline-none focus:border-brand";
14249
14297
  const labelClass = "block text-[11px] font-semibold text-slate-500 mb-1";
14298
+ const editButton = editUrl ? /* @__PURE__ */ jsxs24(
14299
+ "a",
14300
+ {
14301
+ href: editUrl,
14302
+ target: "_blank",
14303
+ rel: "noopener noreferrer",
14304
+ className: "inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-medium bg-white hover:bg-slate-100 border border-slate-300 text-slate-700 hover:text-slate-900 transition-colors shadow-2xs shrink-0 cursor-pointer",
14305
+ title: "\u05E2\u05E8\u05D5\u05DA \u05D0\u05EA \u05E8\u05DB\u05D9\u05D1 \u05D4\u05E9\u05D9\u05D1\u05D5\u05E5 \u05D1\u05DC\u05D5\u05D7 \u05D4\u05D1\u05E7\u05E8\u05D4",
14306
+ children: [
14307
+ /* @__PURE__ */ jsx30("span", { children: "\u05E2\u05E8\u05D9\u05DB\u05EA \u05E8\u05DB\u05D9\u05D1 \u05D4\u05E9\u05D9\u05D1\u05D5\u05E5" }),
14308
+ /* @__PURE__ */ jsx30(ExternalLink3, { className: "w-3.5 h-3.5 text-slate-500" })
14309
+ ]
14310
+ }
14311
+ ) : null;
14250
14312
  return /* @__PURE__ */ jsxs24("div", { className: `w-full flex flex-col gap-3 p-3 bg-slate-50 min-h-[850px] rounded-xl border border-slate-200 ${className}`, dir: "rtl", children: [
14251
14313
  (loadError || saveError) && /* @__PURE__ */ jsx30("div", { className: "p-3 text-xs rounded-lg bg-rose-50 border border-rose-200 text-rose-700", children: loadError || saveError }),
14252
14314
  /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-3", children: [
14253
- /* @__PURE__ */ jsxs24("div", { className: "w-full bg-teal-50/40 p-3 rounded-xl border border-teal-100 shadow-xs flex flex-col", children: [
14254
- /* @__PURE__ */ jsxs24("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 border-b border-teal-200 pb-1.5 mb-2", children: [
14255
- /* @__PURE__ */ jsxs24("h4", { className: "font-bold text-teal-900 text-base flex items-center gap-2 shrink-0", children: [
14256
- /* @__PURE__ */ jsx30("span", { children: "\u{1F4CC}" }),
14257
- " \u05E4\u05E8\u05D8\u05D9 \u05D4\u05D9\u05E2\u05D3 \u05DC\u05E9\u05D9\u05D1\u05D5\u05E5"
14315
+ /* @__PURE__ */ jsx30("div", { className: "w-full bg-teal-50/40 p-3 rounded-xl border border-teal-100 shadow-xs flex flex-col", children: activeTarget ? /* @__PURE__ */ jsxs24("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-7 gap-x-4 gap-y-1.5 content-start text-sm text-slate-700 flex-1", children: [
14316
+ /* @__PURE__ */ jsxs24("div", { className: "col-span-full bg-teal-700 text-white rounded-lg px-3 py-1 flex flex-wrap items-center gap-x-3 gap-y-1", children: [
14317
+ /* @__PURE__ */ jsxs24("span", { className: "font-bold text-lg flex items-center gap-2 min-w-0", children: [
14318
+ /* @__PURE__ */ jsx30("span", { "aria-hidden": "true", children: "\u{1F4CC}" }),
14319
+ /* @__PURE__ */ jsx30("span", { className: "min-w-0 break-words", children: targetLabel(activeTarget) })
14258
14320
  ] }),
14259
- activeTarget && /* @__PURE__ */ jsxs24("span", { className: "text-teal-800 font-bold text-xs shrink-0 whitespace-nowrap", children: [
14321
+ /* @__PURE__ */ jsxs24("span", { className: "text-teal-100 font-bold text-xs shrink-0 whitespace-nowrap", children: [
14260
14322
  "\u05DE\u05E9\u05D5\u05D1\u05E6\u05D9\u05DD \u05DB\u05E8\u05D2\u05E2: ",
14261
14323
  assignedIds.length
14262
14324
  ] }),
14263
- editUrl && (config == null ? void 0 : config.title) && /* @__PURE__ */ jsx30("span", { className: "font-semibold text-slate-600 text-xs sm:text-sm min-w-0 break-words", children: config.title }),
14264
- editUrl && /* @__PURE__ */ jsxs24(
14265
- "a",
14266
- {
14267
- href: editUrl,
14268
- target: "_blank",
14269
- rel: "noopener noreferrer",
14270
- className: "ms-auto inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-medium bg-white hover:bg-slate-100 border border-slate-300 text-slate-700 hover:text-slate-900 transition-colors shadow-2xs shrink-0 cursor-pointer",
14271
- title: "\u05E2\u05E8\u05D5\u05DA \u05D0\u05EA \u05E8\u05DB\u05D9\u05D1 \u05D4\u05E9\u05D9\u05D1\u05D5\u05E5 \u05D1\u05DC\u05D5\u05D7 \u05D4\u05D1\u05E7\u05E8\u05D4",
14272
- children: [
14273
- /* @__PURE__ */ jsx30("span", { children: "\u05E2\u05E8\u05D9\u05DB\u05EA \u05E8\u05DB\u05D9\u05D1 \u05D4\u05E9\u05D9\u05D1\u05D5\u05E5" }),
14274
- /* @__PURE__ */ jsx30(ExternalLink3, { className: "w-3.5 h-3.5 text-slate-500" })
14275
- ]
14276
- }
14277
- )
14325
+ editUrl && (config == null ? void 0 : config.title) || editButton ? /* @__PURE__ */ jsxs24("div", { className: "ms-auto flex items-center gap-3 min-w-0", children: [
14326
+ editUrl && (config == null ? void 0 : config.title) && /* @__PURE__ */ jsx30("span", { className: "text-teal-50 text-xs sm:text-sm min-w-0 break-words", children: config.title }),
14327
+ editButton
14328
+ ] }) : null
14278
14329
  ] }),
14279
- activeTarget ? /* @__PURE__ */ jsxs24("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-7 gap-x-4 gap-y-1.5 content-start text-sm text-slate-700 flex-1", children: [
14280
- /* @__PURE__ */ jsx30("div", { className: "col-span-full bg-teal-700 text-white font-bold text-lg rounded-lg px-3 py-1", children: targetLabel(activeTarget) }),
14281
- previewColumns.map((col) => ({ col, text: displayValue(col, readColumnValue(activeTarget.data, col.name)) })).filter(({ col, text: text2 }) => {
14282
- var _a2;
14283
- return text2 && (col.type === "RELATION" || typeof ((_a2 = activeTarget.data) == null ? void 0 : _a2[col.name]) !== "object");
14284
- }).map(({ col, text: text2 }) => {
14285
- var _a2, _b2;
14286
- const label = col.label || col.name;
14287
- const span = label === "\u05E4\u05E8\u05D8\u05D9\u05DD \u05E0\u05D5\u05E1\u05E4\u05D9\u05DD" || text2.length > 60 ? "col-span-full" : text2.length > 28 ? "col-span-2 sm:col-span-3 lg:col-span-2" : "";
14288
- const isDate = ((_a2 = col.type) == null ? void 0 : _a2.toUpperCase()) === "DATE";
14289
- const isStatus = label.includes("\u05E1\u05D8\u05D8\u05D5\u05E1");
14290
- return /* @__PURE__ */ jsxs24("div", { className: `flex gap-1.5 items-baseline min-w-0 ${span}`, children: [
14291
- /* @__PURE__ */ jsxs24("span", { className: "text-slate-500 text-xs shrink-0", children: [
14292
- label,
14293
- ":"
14294
- ] }),
14295
- isDate ? /* @__PURE__ */ jsxs24("span", { className: "inline-flex items-center gap-1 font-semibold text-slate-900", children: [
14296
- /* @__PURE__ */ jsx30(CalendarDays, { className: "w-3.5 h-3.5 text-teal-600 shrink-0" }),
14297
- /* @__PURE__ */ jsx30("span", { dir: "ltr", children: formatPreviewDate((_b2 = activeTarget.data) == null ? void 0 : _b2[col.name], text2) })
14298
- ] }) : isStatus ? /* @__PURE__ */ jsx30("span", { className: `inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-bold ${statusBadgeClass(text2)}`, children: text2 }) : /* @__PURE__ */ jsx30("span", { className: "break-words min-w-0 font-semibold text-slate-900", children: text2 })
14299
- ] }, col.name);
14300
- }),
14301
- assignmentField && assignedText && /* @__PURE__ */ jsxs24("div", { className: "flex gap-1.5 items-baseline min-w-0", children: [
14330
+ previewColumns.map((col) => ({ col, text: displayValue(col, readColumnValue(activeTarget.data, col.name)) })).filter(({ col, text: text2 }) => {
14331
+ var _a2;
14332
+ return text2 && (col.type === "RELATION" || typeof ((_a2 = activeTarget.data) == null ? void 0 : _a2[col.name]) !== "object");
14333
+ }).map(({ col, text: text2 }) => {
14334
+ var _a2, _b2;
14335
+ const label = col.label || col.name;
14336
+ const span = label === "\u05E4\u05E8\u05D8\u05D9\u05DD \u05E0\u05D5\u05E1\u05E4\u05D9\u05DD" || text2.length > 60 ? "col-span-full" : text2.length > 28 ? "col-span-2 sm:col-span-3 lg:col-span-2" : "";
14337
+ const isDate = ((_a2 = col.type) == null ? void 0 : _a2.toUpperCase()) === "DATE";
14338
+ const isStatus = label.includes("\u05E1\u05D8\u05D8\u05D5\u05E1");
14339
+ return /* @__PURE__ */ jsxs24("div", { className: `flex gap-1.5 items-baseline min-w-0 ${span}`, children: [
14302
14340
  /* @__PURE__ */ jsxs24("span", { className: "text-slate-500 text-xs shrink-0", children: [
14303
- assignmentLabel,
14341
+ label,
14304
14342
  ":"
14305
14343
  ] }),
14306
- /* @__PURE__ */ jsx30("span", { className: "break-words min-w-0 font-semibold text-slate-900", title: assignedText, children: assignedText })
14307
- ] })
14308
- ] }) : /* @__PURE__ */ jsx30("div", { className: "text-slate-500 text-xs text-center py-6", children: isLoading ? "\u05D8\u05D5\u05E2\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD..." : "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05E8\u05E9\u05D5\u05DE\u05EA \u05D9\u05E2\u05D3." })
14309
- ] }),
14344
+ isDate ? /* @__PURE__ */ jsxs24("span", { className: "inline-flex items-center gap-1 font-semibold text-slate-900", children: [
14345
+ /* @__PURE__ */ jsx30(CalendarDays, { className: "w-3.5 h-3.5 text-teal-600 shrink-0" }),
14346
+ /* @__PURE__ */ jsx30("span", { dir: "ltr", children: formatPreviewDate((_b2 = activeTarget.data) == null ? void 0 : _b2[col.name], text2) })
14347
+ ] }) : isStatus ? /* @__PURE__ */ jsx30("span", { className: `inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-bold ${statusBadgeClass(text2)}`, children: text2 }) : /* @__PURE__ */ jsx30("span", { className: "break-words min-w-0 font-semibold text-slate-900", children: text2 })
14348
+ ] }, col.name);
14349
+ }),
14350
+ assignmentField && assignedText && /* @__PURE__ */ jsxs24("div", { className: "flex gap-1.5 items-baseline min-w-0", children: [
14351
+ /* @__PURE__ */ jsxs24("span", { className: "text-slate-500 text-xs shrink-0", children: [
14352
+ assignmentLabel,
14353
+ ":"
14354
+ ] }),
14355
+ /* @__PURE__ */ jsx30("span", { className: "break-words min-w-0 font-semibold text-slate-900", title: assignedText, children: assignedText })
14356
+ ] })
14357
+ ] }) : /* @__PURE__ */ jsxs24(Fragment7, { children: [
14358
+ /* @__PURE__ */ jsxs24("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1", children: [
14359
+ /* @__PURE__ */ jsxs24("h4", { className: "font-bold text-teal-900 text-base flex items-center gap-2 shrink-0", children: [
14360
+ /* @__PURE__ */ jsx30("span", { children: "\u{1F4CC}" }),
14361
+ " \u05E4\u05E8\u05D8\u05D9 \u05D4\u05D9\u05E2\u05D3 \u05DC\u05E9\u05D9\u05D1\u05D5\u05E5"
14362
+ ] }),
14363
+ editButton && /* @__PURE__ */ jsx30("div", { className: "ms-auto", children: editButton })
14364
+ ] }),
14365
+ /* @__PURE__ */ jsx30("div", { className: "text-slate-500 text-xs text-center py-6", children: isLoading ? "\u05D8\u05D5\u05E2\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD..." : "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05E8\u05E9\u05D5\u05DE\u05EA \u05D9\u05E2\u05D3." })
14366
+ ] }) }),
14310
14367
  /* @__PURE__ */ jsx30("div", { className: "w-full bg-white p-3 rounded-xl border border-slate-200 shadow-xs flex flex-col", children: /* @__PURE__ */ jsxs24("div", { children: [
14311
14368
  /* @__PURE__ */ jsxs24("div", { className: "flex flex-col sm:flex-row sm:flex-wrap sm:items-end gap-3", children: [
14312
14369
  /* @__PURE__ */ jsx30("h4", { className: "font-bold text-slate-800 text-sm shrink-0 sm:pb-2", children: "\u05E1\u05D9\u05E0\u05D5\u05DF \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA \u05D4\u05D9\u05E2\u05D3" }),
@@ -14387,7 +14444,7 @@ var PlacementBlock = (props) => {
14387
14444
  availableGridData.length,
14388
14445
  ")"
14389
14446
  ] }),
14390
- /* @__PURE__ */ jsx30(PlacementColumnsMenu, { columns: gridColumns, hidden: hiddenCols.source, onChange: onSourceHiddenChange }),
14447
+ /* @__PURE__ */ jsx30(PlacementColumnsMenu, { columns: sourceOrderedColumns, hidden: hiddenCols.source, onChange: onSourceHiddenChange }),
14391
14448
  /* @__PURE__ */ jsx30(PlacementSearchInput, { onChange: setSourceSearch, disabled: isLoading })
14392
14449
  ] }),
14393
14450
  /* @__PURE__ */ jsx30(
@@ -14405,6 +14462,7 @@ var PlacementBlock = (props) => {
14405
14462
  onMove: moveToCandidates,
14406
14463
  moveTitle: "\u05D4\u05E2\u05D1\u05E8 \u05DC\u05D8\u05D1\u05DC\u05EA \u05D4\u05DE\u05D5\u05E2\u05DE\u05D3\u05D9\u05DD",
14407
14464
  onOpenDetails: openSourceDetails,
14465
+ onReorderColumns: onSourceReorder,
14408
14466
  isFilterActive: isSourceFilterActive,
14409
14467
  onOpenFilter: openSourceFilter,
14410
14468
  cellContext,
@@ -14423,7 +14481,7 @@ var PlacementBlock = (props) => {
14423
14481
  candidateGridData.length,
14424
14482
  ")"
14425
14483
  ] }),
14426
- /* @__PURE__ */ jsx30(PlacementColumnsMenu, { columns: gridColumns, hidden: hiddenCols.cand, onChange: onCandHiddenChange, accent: "blue" }),
14484
+ /* @__PURE__ */ jsx30(PlacementColumnsMenu, { columns: candOrderedColumns, hidden: hiddenCols.cand, onChange: onCandHiddenChange, accent: "blue" }),
14427
14485
  /* @__PURE__ */ jsx30(PlacementSearchInput, { onChange: setCandidateSearch, disabled: isLoading }),
14428
14486
  /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 ms-auto", children: [
14429
14487
  /* @__PURE__ */ jsx30("button", { type: "button", onClick: returnAll, disabled: candidateIds.length === 0, className: "px-3 py-1.5 rounded-lg text-xs font-bold bg-amber-400 hover:bg-amber-500 text-slate-900 disabled:opacity-40 disabled:cursor-not-allowed transition-colors", children: "\u21BA \u05D4\u05D7\u05D6\u05E8 \u05D4\u05DB\u05DC" }),
@@ -14451,6 +14509,7 @@ var PlacementBlock = (props) => {
14451
14509
  onMove: moveToSource,
14452
14510
  moveTitle: "\u05D4\u05D7\u05D6\u05E8 \u05DC\u05E8\u05E9\u05D9\u05DE\u05EA \u05D4\u05DE\u05E7\u05D5\u05E8",
14453
14511
  onOpenDetails: openCandDetails,
14512
+ onReorderColumns: onCandReorder,
14454
14513
  isFilterActive: isCandFilterActive,
14455
14514
  onOpenFilter: openCandFilter,
14456
14515
  cellContext,
@@ -14708,7 +14767,7 @@ import { AgGridReact } from "ag-grid-react";
14708
14767
  import { ModuleRegistry, AllCommunityModule } from "ag-grid-community";
14709
14768
 
14710
14769
  // src/components/PaymentReportsBlock/PaymentReportsModals.tsx
14711
- import { Fragment as Fragment7, jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
14770
+ import { Fragment as Fragment8, jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
14712
14771
  var Modal = ({ title, onClose, children, footer, wide }) => /* @__PURE__ */ jsx31(
14713
14772
  "div",
14714
14773
  {
@@ -14737,7 +14796,7 @@ var ConfirmModal = ({ title, message, confirmLabel, danger, busy, onConfirm, onC
14737
14796
  {
14738
14797
  title,
14739
14798
  onClose,
14740
- footer: /* @__PURE__ */ jsxs25(Fragment7, { children: [
14799
+ footer: /* @__PURE__ */ jsxs25(Fragment8, { children: [
14741
14800
  /* @__PURE__ */ jsx31(
14742
14801
  "button",
14743
14802
  {
@@ -15034,7 +15093,7 @@ import { ModuleRegistry as ModuleRegistry2, AllCommunityModule as AllCommunityMo
15034
15093
 
15035
15094
  // src/components/PaymentReportsBlock/ProofCell.tsx
15036
15095
  import { useRef as useRef24, useState as useState28 } from "react";
15037
- import { Fragment as Fragment8, jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
15096
+ import { Fragment as Fragment9, jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
15038
15097
  var ProofCell = ({ files, editable, onUpload, onRemove }) => {
15039
15098
  const inputRef = useRef24(null);
15040
15099
  const [busy, setBusy] = useState28(false);
@@ -15061,9 +15120,9 @@ var ProofCell = ({ files, editable, onUpload, onRemove }) => {
15061
15120
  }
15062
15121
  };
15063
15122
  return /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2 h-full", children: [
15064
- file ? /* @__PURE__ */ jsxs27(Fragment8, { children: [
15123
+ file ? /* @__PURE__ */ jsxs27(Fragment9, { children: [
15065
15124
  /* @__PURE__ */ jsx33("a", { href, target: "_blank", rel: "noreferrer", className: "text-blue-600 underline text-xs font-medium", children: "\u05E6\u05E4\u05D9\u05D9\u05D4" }),
15066
- editable && /* @__PURE__ */ jsxs27(Fragment8, { children: [
15125
+ editable && /* @__PURE__ */ jsxs27(Fragment9, { children: [
15067
15126
  /* @__PURE__ */ jsx33("button", { type: "button", disabled: busy, onClick: () => {
15068
15127
  var _a;
15069
15128
  return (_a = inputRef.current) == null ? void 0 : _a.click();
@@ -15863,7 +15922,7 @@ function readFileAsBase64(file) {
15863
15922
  }
15864
15923
 
15865
15924
  // src/components/WhatsAppComponent/CreateTemplateModal.tsx
15866
- import { Fragment as Fragment9, jsx as jsx40, jsxs as jsxs32 } from "react/jsx-runtime";
15925
+ import { Fragment as Fragment10, jsx as jsx40, jsxs as jsxs32 } from "react/jsx-runtime";
15867
15926
  function CreateTemplateModal({
15868
15927
  isOpen,
15869
15928
  onClose,
@@ -16936,10 +16995,10 @@ function CreateTemplateModal({
16936
16995
  disabled: !canSubmit,
16937
16996
  className: `inline-flex items-center gap-2 px-5 py-2 text-xs font-semibold text-white rounded-xl shadow-xs transition-all cursor-pointer active:scale-[0.98] ${canSubmit ? "bg-emerald-600 hover:bg-emerald-700" : "bg-slate-300 text-slate-500 cursor-not-allowed opacity-60"}`,
16938
16997
  title: !canSubmit ? fileError || validationResult.errors[0] || "\u05D9\u05E9 \u05DC\u05D4\u05E9\u05DC\u05D9\u05DD \u05D0\u05EA \u05DB\u05DC \u05E9\u05D3\u05D5\u05EA \u05D4\u05D7\u05D5\u05D1\u05D4 \u05D1\u05D0\u05D5\u05E4\u05DF \u05EA\u05E7\u05D9\u05DF" : "\u05E9\u05DC\u05D7 \u05EA\u05D1\u05E0\u05D9\u05EA \u05DC\u05D0\u05D9\u05E9\u05D5\u05E8 Meta",
16939
- children: isSubmitting ? /* @__PURE__ */ jsxs32(Fragment9, { children: [
16998
+ children: isSubmitting ? /* @__PURE__ */ jsxs32(Fragment10, { children: [
16940
16999
  /* @__PURE__ */ jsx40(Loader24, { className: "w-4 h-4 animate-spin" }),
16941
17000
  /* @__PURE__ */ jsx40("span", { children: submittingStep || "\u05D9\u05D5\u05E6\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA..." })
16942
- ] }) : /* @__PURE__ */ jsxs32(Fragment9, { children: [
17001
+ ] }) : /* @__PURE__ */ jsxs32(Fragment10, { children: [
16943
17002
  /* @__PURE__ */ jsx40(CheckCircle22, { className: "w-4 h-4" }),
16944
17003
  /* @__PURE__ */ jsx40("span", { children: "\u05E9\u05DC\u05D7 \u05DC\u05D1\u05D3\u05D9\u05E7\u05D4" })
16945
17004
  ] })
@@ -19652,7 +19711,7 @@ import {
19652
19711
  CheckCircle2 as CheckCircle23,
19653
19712
  AlertCircle as AlertCircle3
19654
19713
  } from "lucide-react";
19655
- import { Fragment as Fragment10, jsx as jsx41, jsxs as jsxs33 } from "react/jsx-runtime";
19714
+ import { Fragment as Fragment11, jsx as jsx41, jsxs as jsxs33 } from "react/jsx-runtime";
19656
19715
  function TemplateSelectionBlock({
19657
19716
  selectedTemplate,
19658
19717
  selectedTemplateId,
@@ -19752,7 +19811,7 @@ function TemplateSelectionBlock({
19752
19811
  ]
19753
19812
  }
19754
19813
  ),
19755
- isDropdownOpen && /* @__PURE__ */ jsxs33(Fragment10, { children: [
19814
+ isDropdownOpen && /* @__PURE__ */ jsxs33(Fragment11, { children: [
19756
19815
  /* @__PURE__ */ jsx41(
19757
19816
  "div",
19758
19817
  {
@@ -19865,7 +19924,7 @@ function TemplateSelectionBlock({
19865
19924
  const hasValidMedia = Boolean(headerMediaUrl && headerMediaUrl.trim() && headerMediaUrl.startsWith("http"));
19866
19925
  const uploadButtonLabel = headerFormat === "DOCUMENT" ? "\u05D4\u05E2\u05DC\u05D4 \u05DE\u05E1\u05DE\u05DA" : headerFormat === "IMAGE" ? "\u05D4\u05E2\u05DC\u05D4 \u05EA\u05DE\u05D5\u05E0\u05D4" : "\u05D4\u05E2\u05DC\u05D4 \u05E7\u05D5\u05D1\u05E5";
19867
19926
  return /* @__PURE__ */ jsxs33("div", { className: "p-2.5 bg-slate-50 border border-slate-200/90 rounded-xl flex items-center justify-between gap-3 shrink-0 shadow-2xs", children: [
19868
- /* @__PURE__ */ jsx41("div", { className: "flex items-center gap-2.5 overflow-hidden", children: headerFormat === "IMAGE" ? /* @__PURE__ */ jsxs33(Fragment10, { children: [
19927
+ /* @__PURE__ */ jsx41("div", { className: "flex items-center gap-2.5 overflow-hidden", children: headerFormat === "IMAGE" ? /* @__PURE__ */ jsxs33(Fragment11, { children: [
19869
19928
  /* @__PURE__ */ jsx41("div", { className: "w-8 h-8 rounded-lg overflow-hidden border border-slate-200 shrink-0 bg-slate-100 flex items-center justify-center", children: hasValidMedia ? /* @__PURE__ */ jsx41(
19870
19929
  "img",
19871
19930
  {
@@ -19881,13 +19940,13 @@ function TemplateSelectionBlock({
19881
19940
  /* @__PURE__ */ jsx41("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05EA\u05DE\u05D5\u05E0\u05EA \u05DB\u05D5\u05EA\u05E8\u05EA" }),
19882
19941
  /* @__PURE__ */ jsx41("span", { className: "text-[10px] text-slate-400 block truncate", children: hasValidMedia ? "\u05E7\u05D5\u05D1\u05E5 \u05EA\u05DE\u05D5\u05E0\u05D4 \u05DE\u05E7\u05D5\u05E9\u05E8 \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA" : "\u05D8\u05E8\u05DD \u05D4\u05D5\u05E2\u05DC\u05D4 \u05E7\u05D5\u05D1\u05E5 \u05EA\u05DE\u05D5\u05E0\u05D4" })
19883
19942
  ] })
19884
- ] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */ jsxs33(Fragment10, { children: [
19943
+ ] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */ jsxs33(Fragment11, { children: [
19885
19944
  /* @__PURE__ */ jsx41("div", { className: `w-8 h-8 rounded-lg flex items-center justify-center shrink-0 border ${hasValidMedia ? "bg-rose-50 text-rose-600 border-rose-100" : "bg-slate-100 text-slate-400 border-slate-200"}`, children: /* @__PURE__ */ jsx41(FileText3, { className: "w-4 h-4" }) }),
19886
19945
  /* @__PURE__ */ jsxs33("div", { className: "overflow-hidden", children: [
19887
19946
  /* @__PURE__ */ jsx41("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05DE\u05E1\u05DE\u05DA \u05DB\u05D5\u05EA\u05E8\u05EA (PDF)" }),
19888
19947
  /* @__PURE__ */ jsx41("span", { className: "text-[10px] text-slate-500 font-mono block truncate", title: hasValidMedia ? docFilename : void 0, children: hasValidMedia ? docFilename : "\u05D8\u05E8\u05DD \u05D4\u05D5\u05E2\u05DC\u05D4 \u05E7\u05D5\u05D1\u05E5 \u05DE\u05E1\u05DE\u05DA" })
19889
19948
  ] })
19890
- ] }) : /* @__PURE__ */ jsxs33(Fragment10, { children: [
19949
+ ] }) : /* @__PURE__ */ jsxs33(Fragment11, { children: [
19891
19950
  /* @__PURE__ */ jsx41("div", { className: `w-8 h-8 rounded-lg flex items-center justify-center shrink-0 border ${hasValidMedia ? "bg-indigo-50 text-indigo-600 border-indigo-100" : "bg-slate-100 text-slate-400 border-slate-200"}`, children: /* @__PURE__ */ jsx41(Video2, { className: "w-4 h-4" }) }),
19892
19951
  /* @__PURE__ */ jsxs33("div", { className: "overflow-hidden", children: [
19893
19952
  /* @__PURE__ */ jsx41("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05E1\u05E8\u05D8\u05D5\u05DF \u05DB\u05D5\u05EA\u05E8\u05EA" }),
@@ -19942,10 +20001,10 @@ function TemplateSelectionBlock({
19942
20001
  },
19943
20002
  className: `inline-flex items-center gap-1.5 px-2.5 py-1 text-[11px] font-medium rounded-lg transition-colors border shadow-2xs ${isUploadingMedia ? "bg-slate-100 text-slate-400 border-slate-200 cursor-not-allowed" : hasValidMedia ? "bg-white text-slate-700 hover:bg-slate-50 border-slate-200 hover:border-slate-300" : "bg-emerald-600 text-white hover:bg-emerald-700 border-emerald-600"}`,
19944
20003
  title: hasValidMedia ? "\u05D4\u05D7\u05DC\u05E3 \u05E7\u05D5\u05D1\u05E5 \u05DE\u05D3\u05D9\u05D4 \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA \u05D6\u05D5" : `${uploadButtonLabel} \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA \u05D6\u05D5`,
19945
- children: isUploadingMedia ? /* @__PURE__ */ jsxs33(Fragment10, { children: [
20004
+ children: isUploadingMedia ? /* @__PURE__ */ jsxs33(Fragment11, { children: [
19946
20005
  /* @__PURE__ */ jsx41(Loader25, { className: "w-3.5 h-3.5 animate-spin" }),
19947
20006
  /* @__PURE__ */ jsx41("span", { children: "\u05DE\u05E2\u05DC\u05D4..." })
19948
- ] }) : /* @__PURE__ */ jsxs33(Fragment10, { children: [
20007
+ ] }) : /* @__PURE__ */ jsxs33(Fragment11, { children: [
19949
20008
  /* @__PURE__ */ jsx41(Upload4, { className: "w-3.5 h-3.5" }),
19950
20009
  /* @__PURE__ */ jsx41("span", { children: hasValidMedia ? "\u05D4\u05D7\u05DC\u05E3 \u05E7\u05D5\u05D1\u05E5" : uploadButtonLabel })
19951
20010
  ] })
@@ -20035,7 +20094,7 @@ import {
20035
20094
  CheckSquare,
20036
20095
  RefreshCw
20037
20096
  } from "lucide-react";
20038
- import { Fragment as Fragment11, jsx as jsx42, jsxs as jsxs34 } from "react/jsx-runtime";
20097
+ import { Fragment as Fragment12, jsx as jsx42, jsxs as jsxs34 } from "react/jsx-runtime";
20039
20098
  function DynamicFiltersBlock({
20040
20099
  filterableColumns,
20041
20100
  filters,
@@ -20103,7 +20162,7 @@ function DynamicFiltersBlock({
20103
20162
  className: `w-full h-8 px-2 pr-2.5 pl-6 text-[11px] rounded-lg border transition-all appearance-none bg-white cursor-pointer truncate ${isActive ? "border-emerald-500 bg-emerald-50/20 text-emerald-900 font-medium ring-1 ring-emerald-500/20" : "border-slate-200 text-slate-700 hover:border-slate-300 focus:border-emerald-500"}`,
20104
20163
  children: [
20105
20164
  /* @__PURE__ */ jsx42("option", { value: "", children: "\u05D4\u05DB\u05DC" }),
20106
- isBoolean ? /* @__PURE__ */ jsxs34(Fragment11, { children: [
20165
+ isBoolean ? /* @__PURE__ */ jsxs34(Fragment12, { children: [
20107
20166
  /* @__PURE__ */ jsx42("option", { value: "true", children: "\u05DB\u05DF" }),
20108
20167
  /* @__PURE__ */ jsx42("option", { value: "false", children: "\u05DC\u05D0" })
20109
20168
  ] }) : options.map((opt) => /* @__PURE__ */ jsx42("option", { value: opt.id || opt._id, children: getRelationOptionLabel(opt, col, relationOptions) }, opt.id || opt._id))
@@ -20165,7 +20224,7 @@ import {
20165
20224
  X as X13,
20166
20225
  CheckSquare as CheckSquare2
20167
20226
  } from "lucide-react";
20168
- import { Fragment as Fragment12, jsx as jsx43, jsxs as jsxs35 } from "react/jsx-runtime";
20227
+ import { Fragment as Fragment13, jsx as jsx43, jsxs as jsxs35 } from "react/jsx-runtime";
20169
20228
  function SettingsAndActionsBlock({
20170
20229
  isScanningPhoneColumns,
20171
20230
  targetPhoneOptions,
@@ -20381,7 +20440,7 @@ function SettingsAndActionsBlock({
20381
20440
  className: `w-full h-7 px-2 pr-2 pl-5 text-[11px] rounded-lg border appearance-none cursor-pointer truncate transition-colors ${!subtableFilterValue ? "border-amber-400 bg-amber-50/30 text-slate-700 focus:border-amber-500 focus:ring-1 focus:ring-amber-500" : "border-slate-200 bg-white text-slate-700 focus:border-emerald-500"}`,
20382
20441
  children: [
20383
20442
  /* @__PURE__ */ jsx43("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05E8\u05DA \u05DC\u05E1\u05D9\u05E0\u05D5\u05DF..." }),
20384
- ((_a = selectedSubtableFilterCol.type) == null ? void 0 : _a.toUpperCase()) === "BOOLEAN" ? /* @__PURE__ */ jsxs35(Fragment12, { children: [
20443
+ ((_a = selectedSubtableFilterCol.type) == null ? void 0 : _a.toUpperCase()) === "BOOLEAN" ? /* @__PURE__ */ jsxs35(Fragment13, { children: [
20385
20444
  /* @__PURE__ */ jsx43("option", { value: "true", children: "\u05DB\u05DF (true)" }),
20386
20445
  /* @__PURE__ */ jsx43("option", { value: "false", children: "\u05DC\u05D0 (false)" })
20387
20446
  ] }) : getRelationOptionsForCol(
@@ -20439,7 +20498,7 @@ function SettingsAndActionsBlock({
20439
20498
  ),
20440
20499
  /* @__PURE__ */ jsx43("span", { className: "text-[11px] font-semibold text-slate-800", children: "\u05E2\u05D3\u05DB\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05DC\u05D0\u05D7\u05E8 \u05E9\u05DC\u05D9\u05D7\u05D4 \u05DE\u05D5\u05E6\u05DC\u05D7\u05EA" })
20441
20500
  ] }),
20442
- enablePostSendAction && /* @__PURE__ */ jsx43("div", { className: "p-2 bg-slate-100/70 border border-slate-200/80 rounded-xl space-y-2 animate-in fade-in duration-150", children: postSendActionTargetOptions.length === 0 ? /* @__PURE__ */ jsx43("div", { className: "text-[10px] text-slate-400 text-center py-1", children: "\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D5 \u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05E7\u05E9\u05E8 \u05D0\u05D5 \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9 \u05DC\u05E2\u05D3\u05DB\u05D5\u05DF" }) : /* @__PURE__ */ jsxs35(Fragment12, { children: [
20501
+ enablePostSendAction && /* @__PURE__ */ jsx43("div", { className: "p-2 bg-slate-100/70 border border-slate-200/80 rounded-xl space-y-2 animate-in fade-in duration-150", children: postSendActionTargetOptions.length === 0 ? /* @__PURE__ */ jsx43("div", { className: "text-[10px] text-slate-400 text-center py-1", children: "\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D5 \u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05E7\u05E9\u05E8 \u05D0\u05D5 \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9 \u05DC\u05E2\u05D3\u05DB\u05D5\u05DF" }) : /* @__PURE__ */ jsxs35(Fragment13, { children: [
20443
20502
  /* @__PURE__ */ jsxs35("div", { className: "space-y-1", children: [
20444
20503
  /* @__PURE__ */ jsxs35("div", { className: "flex items-center justify-between", children: [
20445
20504
  /* @__PURE__ */ jsx43("label", { className: "text-[10px] font-semibold text-slate-600 block", children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D9\u05E2\u05D3 \u05DC\u05E2\u05D3\u05DB\u05D5\u05DF" }),
@@ -20487,7 +20546,7 @@ function SettingsAndActionsBlock({
20487
20546
  className: `w-full h-7 px-2 pr-2 pl-5 text-[11px] rounded-lg border appearance-none cursor-pointer truncate transition-colors ${!postSendActionValue ? "border-amber-400 bg-amber-50/30 text-slate-700 focus:border-amber-500 focus:ring-1 focus:ring-amber-500" : "border-slate-200 bg-white text-slate-700 focus:border-emerald-500"}`,
20488
20547
  children: [
20489
20548
  /* @__PURE__ */ jsx43("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05E8\u05DA..." }),
20490
- selectedPostSendOption.type === "BOOLEAN" ? /* @__PURE__ */ jsxs35(Fragment12, { children: [
20549
+ selectedPostSendOption.type === "BOOLEAN" ? /* @__PURE__ */ jsxs35(Fragment13, { children: [
20491
20550
  /* @__PURE__ */ jsx43("option", { value: "true", children: "\u05DB\u05DF (Yes)" }),
20492
20551
  /* @__PURE__ */ jsx43("option", { value: "false", children: "\u05DC\u05D0 (No)" })
20493
20552
  ] }) : getRelationOptionsForCol(
@@ -20571,7 +20630,7 @@ function SettingsAndActionsBlock({
20571
20630
  ] })
20572
20631
  ]
20573
20632
  }
20574
- ) : /* @__PURE__ */ jsxs35(Fragment12, { children: [
20633
+ ) : /* @__PURE__ */ jsxs35(Fragment13, { children: [
20575
20634
  /* @__PURE__ */ jsxs35(
20576
20635
  "button",
20577
20636
  {
@@ -20899,7 +20958,7 @@ function WhatsAppInbox({
20899
20958
  }
20900
20959
 
20901
20960
  // src/components/WhatsAppComponent/WhatsAppComponent.tsx
20902
- import { Fragment as Fragment13, jsx as jsx47, jsxs as jsxs39 } from "react/jsx-runtime";
20961
+ import { Fragment as Fragment14, jsx as jsx47, jsxs as jsxs39 } from "react/jsx-runtime";
20903
20962
  function WhatsAppComponent(props) {
20904
20963
  var _a;
20905
20964
  const { className = "", settings, orgId, componentId, executeAction } = props;
@@ -20971,7 +21030,7 @@ function WhatsAppComponent(props) {
20971
21030
  }
20972
21031
  }
20973
21032
  }
20974
- ) }) : /* @__PURE__ */ jsxs39(Fragment13, { children: [
21033
+ ) }) : /* @__PURE__ */ jsxs39(Fragment14, { children: [
20975
21034
  state.feedback && /* @__PURE__ */ jsxs39(
20976
21035
  "div",
20977
21036
  {
@@ -21201,7 +21260,7 @@ function WhatsAppComponent(props) {
21201
21260
  const headerFormat = (state.templateHeaderComp.format || "").toUpperCase();
21202
21261
  const docFilename = resolveDocumentFilename(state.templateHeaderComp, state.headerMediaUrl);
21203
21262
  return /* @__PURE__ */ jsxs39("div", { className: "p-2.5 bg-slate-50 border border-slate-200/80 rounded-xl flex items-center justify-between text-xs", children: [
21204
- /* @__PURE__ */ jsx47("div", { className: "flex items-center gap-2 overflow-hidden", children: headerFormat === "IMAGE" ? /* @__PURE__ */ jsxs39(Fragment13, { children: [
21263
+ /* @__PURE__ */ jsx47("div", { className: "flex items-center gap-2 overflow-hidden", children: headerFormat === "IMAGE" ? /* @__PURE__ */ jsxs39(Fragment14, { children: [
21205
21264
  /* @__PURE__ */ jsx47("div", { className: "w-7 h-7 rounded-md overflow-hidden border border-slate-200 shrink-0 bg-slate-100 flex items-center justify-center", children: state.headerMediaUrl && state.headerMediaUrl.startsWith("http") ? /* @__PURE__ */ jsx47(
21206
21265
  "img",
21207
21266
  {
@@ -21214,13 +21273,13 @@ function WhatsAppComponent(props) {
21214
21273
  }
21215
21274
  ) : /* @__PURE__ */ jsx47(ImageIcon3, { className: "w-3.5 h-3.5 text-emerald-600" }) }),
21216
21275
  /* @__PURE__ */ jsx47("span", { className: "font-semibold text-slate-800 truncate", children: "\u05EA\u05DE\u05D5\u05E0\u05EA \u05DB\u05D5\u05EA\u05E8\u05EA" })
21217
- ] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */ jsxs39(Fragment13, { children: [
21276
+ ] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */ jsxs39(Fragment14, { children: [
21218
21277
  /* @__PURE__ */ jsx47("div", { className: "w-7 h-7 rounded-md bg-rose-50 text-rose-600 border border-rose-100 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx47(FileText4, { className: "w-3.5 h-3.5" }) }),
21219
21278
  /* @__PURE__ */ jsxs39("div", { className: "overflow-hidden", children: [
21220
21279
  /* @__PURE__ */ jsx47("span", { className: "font-semibold text-slate-800 block truncate", children: "\u05DE\u05E1\u05DE\u05DA \u05DB\u05D5\u05EA\u05E8\u05EA (PDF)" }),
21221
21280
  /* @__PURE__ */ jsx47("span", { className: "text-[10px] text-slate-500 font-mono block truncate", title: docFilename, children: docFilename })
21222
21281
  ] })
21223
- ] }) : /* @__PURE__ */ jsxs39(Fragment13, { children: [
21282
+ ] }) : /* @__PURE__ */ jsxs39(Fragment14, { children: [
21224
21283
  /* @__PURE__ */ jsx47("div", { className: "w-7 h-7 rounded-md bg-indigo-50 text-indigo-600 border border-indigo-100 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx47(Video3, { className: "w-3.5 h-3.5" }) }),
21225
21284
  /* @__PURE__ */ jsx47("span", { className: "font-semibold text-slate-800 truncate", children: "\u05E1\u05E8\u05D8\u05D5\u05DF \u05DB\u05D5\u05EA\u05E8\u05EA" })
21226
21285
  ] }) }),
@@ -21287,10 +21346,10 @@ function WhatsAppComponent(props) {
21287
21346
  onClick: state.handleSendTest,
21288
21347
  title: state.testButtonTitle,
21289
21348
  className: `px-4 py-2 text-xs font-bold rounded-xl transition-all flex items-center gap-1.5 ${!state.testPhoneNumber.trim() || state.isSendingTest || state.isTestDisabled ? "bg-emerald-600/40 text-white/70 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 active:scale-[0.98] text-white shadow-xs cursor-pointer"}`,
21290
- children: state.isSendingTest ? /* @__PURE__ */ jsxs39(Fragment13, { children: [
21349
+ children: state.isSendingTest ? /* @__PURE__ */ jsxs39(Fragment14, { children: [
21291
21350
  /* @__PURE__ */ jsx47(Loader28, { className: "w-3.5 h-3.5 animate-spin" }),
21292
21351
  /* @__PURE__ */ jsx47("span", { children: "\u05E9\u05D5\u05DC\u05D7..." })
21293
- ] }) : /* @__PURE__ */ jsxs39(Fragment13, { children: [
21352
+ ] }) : /* @__PURE__ */ jsxs39(Fragment14, { children: [
21294
21353
  /* @__PURE__ */ jsx47(Send3, { className: "w-3.5 h-3.5" }),
21295
21354
  /* @__PURE__ */ jsx47("span", { children: "\u05E9\u05DC\u05D7 \u05E2\u05DB\u05E9\u05D9\u05D5" })
21296
21355
  ] })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@universe-platform/ui",
3
- "version": "0.1.0-beta.82",
3
+ "version": "0.1.0-beta.83",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",