@universe-platform/ui 0.1.0-beta.81 → 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
@@ -61,6 +61,7 @@
61
61
  --color-sky-300: oklch(82.8% 0.111 230.318);
62
62
  --color-sky-600: oklch(58.8% 0.158 241.966);
63
63
  --color-sky-700: oklch(50% 0.134 242.749);
64
+ --color-sky-800: oklch(44.3% 0.11 240.79);
64
65
  --color-sky-900: oklch(39.1% 0.09 240.876);
65
66
  --color-blue-50: oklch(97% 0.014 254.604);
66
67
  --color-blue-100: oklch(93.2% 0.032 255.585);
@@ -83,8 +84,10 @@
83
84
  --color-violet-50: oklch(96.9% 0.016 293.756);
84
85
  --color-violet-100: oklch(94.3% 0.029 294.588);
85
86
  --color-violet-200: oklch(89.4% 0.057 293.283);
87
+ --color-violet-300: oklch(81.1% 0.111 293.571);
86
88
  --color-violet-600: oklch(54.1% 0.281 293.009);
87
89
  --color-violet-700: oklch(49.1% 0.27 292.581);
90
+ --color-violet-800: oklch(43.2% 0.232 292.759);
88
91
  --color-purple-50: oklch(97.7% 0.014 308.299);
89
92
  --color-purple-200: oklch(90.2% 0.063 306.703);
90
93
  --color-purple-700: oklch(49.6% 0.265 301.924);
@@ -492,9 +495,6 @@
492
495
  .my-1 {
493
496
  margin-block: var(--spacing);
494
497
  }
495
- .ms-3 {
496
- margin-inline-start: calc(var(--spacing) * 3);
497
- }
498
498
  .ms-auto {
499
499
  margin-inline-start: auto;
500
500
  }
@@ -879,6 +879,9 @@
879
879
  .min-w-0 {
880
880
  min-width: 0;
881
881
  }
882
+ .min-w-\[5\.5rem\] {
883
+ min-width: 5.5rem;
884
+ }
882
885
  .min-w-\[18px\] {
883
886
  min-width: 18px;
884
887
  }
@@ -1012,6 +1015,9 @@
1012
1015
  .content-start {
1013
1016
  align-content: flex-start;
1014
1017
  }
1018
+ .items-baseline {
1019
+ align-items: baseline;
1020
+ }
1015
1021
  .items-center {
1016
1022
  align-items: center;
1017
1023
  }
@@ -1154,9 +1160,6 @@
1154
1160
  .gap-y-2\.5 {
1155
1161
  row-gap: calc(var(--spacing) * 2.5);
1156
1162
  }
1157
- .gap-y-3 {
1158
- row-gap: calc(var(--spacing) * 3);
1159
- }
1160
1163
  .divide-y {
1161
1164
  :where(& > :not(:last-child)) {
1162
1165
  --tw-divide-y-reverse: 0;
@@ -1458,6 +1461,9 @@
1458
1461
  .border-violet-200 {
1459
1462
  border-color: var(--color-violet-200);
1460
1463
  }
1464
+ .border-violet-300 {
1465
+ border-color: var(--color-violet-300);
1466
+ }
1461
1467
  .border-violet-600 {
1462
1468
  border-color: var(--color-violet-600);
1463
1469
  }
@@ -1491,6 +1497,12 @@
1491
1497
  background-color: color-mix(in oklab, var(--color-amber-50) 30%, transparent);
1492
1498
  }
1493
1499
  }
1500
+ .bg-amber-50\/70 {
1501
+ background-color: color-mix(in srgb, oklch(98.7% 0.022 95.277) 70%, transparent);
1502
+ @supports (color: color-mix(in lab, red, red)) {
1503
+ background-color: color-mix(in oklab, var(--color-amber-50) 70%, transparent);
1504
+ }
1505
+ }
1494
1506
  .bg-amber-100 {
1495
1507
  background-color: var(--color-amber-100);
1496
1508
  }
@@ -1515,6 +1527,12 @@
1515
1527
  background-color: color-mix(in oklab, var(--color-blue-50) 40%, transparent);
1516
1528
  }
1517
1529
  }
1530
+ .bg-blue-50\/70 {
1531
+ background-color: color-mix(in srgb, oklch(97% 0.014 254.604) 70%, transparent);
1532
+ @supports (color: color-mix(in lab, red, red)) {
1533
+ background-color: color-mix(in oklab, var(--color-blue-50) 70%, transparent);
1534
+ }
1535
+ }
1518
1536
  .bg-blue-50\/80 {
1519
1537
  background-color: color-mix(in srgb, oklch(97% 0.014 254.604) 80%, transparent);
1520
1538
  @supports (color: color-mix(in lab, red, red)) {
@@ -1566,6 +1584,12 @@
1566
1584
  background-color: color-mix(in oklab, var(--color-emerald-50) 60%, transparent);
1567
1585
  }
1568
1586
  }
1587
+ .bg-emerald-50\/70 {
1588
+ background-color: color-mix(in srgb, oklch(97.9% 0.021 166.113) 70%, transparent);
1589
+ @supports (color: color-mix(in lab, red, red)) {
1590
+ background-color: color-mix(in oklab, var(--color-emerald-50) 70%, transparent);
1591
+ }
1592
+ }
1569
1593
  .bg-emerald-100 {
1570
1594
  background-color: var(--color-emerald-100);
1571
1595
  }
@@ -1644,6 +1668,12 @@
1644
1668
  background-color: color-mix(in oklab, var(--color-rose-50) 50%, transparent);
1645
1669
  }
1646
1670
  }
1671
+ .bg-rose-50\/70 {
1672
+ background-color: color-mix(in srgb, oklch(96.9% 0.015 12.422) 70%, transparent);
1673
+ @supports (color: color-mix(in lab, red, red)) {
1674
+ background-color: color-mix(in oklab, var(--color-rose-50) 70%, transparent);
1675
+ }
1676
+ }
1647
1677
  .bg-rose-100 {
1648
1678
  background-color: var(--color-rose-100);
1649
1679
  }
@@ -1746,12 +1776,24 @@
1746
1776
  .bg-teal-500 {
1747
1777
  background-color: var(--color-teal-500);
1748
1778
  }
1779
+ .bg-teal-700 {
1780
+ background-color: var(--color-teal-700);
1781
+ }
1749
1782
  .bg-transparent {
1750
1783
  background-color: transparent;
1751
1784
  }
1752
1785
  .bg-violet-50 {
1753
1786
  background-color: var(--color-violet-50);
1754
1787
  }
1788
+ .bg-violet-50\/70 {
1789
+ background-color: color-mix(in srgb, oklch(96.9% 0.016 293.756) 70%, transparent);
1790
+ @supports (color: color-mix(in lab, red, red)) {
1791
+ background-color: color-mix(in oklab, var(--color-violet-50) 70%, transparent);
1792
+ }
1793
+ }
1794
+ .bg-violet-100 {
1795
+ background-color: var(--color-violet-100);
1796
+ }
1755
1797
  .bg-violet-600 {
1756
1798
  background-color: var(--color-violet-600);
1757
1799
  }
@@ -2206,6 +2248,9 @@
2206
2248
  .text-sky-700 {
2207
2249
  color: var(--color-sky-700);
2208
2250
  }
2251
+ .text-sky-800 {
2252
+ color: var(--color-sky-800);
2253
+ }
2209
2254
  .text-sky-900 {
2210
2255
  color: var(--color-sky-900);
2211
2256
  }
@@ -2230,6 +2275,15 @@
2230
2275
  .text-slate-900 {
2231
2276
  color: var(--color-slate-900);
2232
2277
  }
2278
+ .text-teal-50 {
2279
+ color: var(--color-teal-50);
2280
+ }
2281
+ .text-teal-100 {
2282
+ color: var(--color-teal-100);
2283
+ }
2284
+ .text-teal-600 {
2285
+ color: var(--color-teal-600);
2286
+ }
2233
2287
  .text-teal-700 {
2234
2288
  color: var(--color-teal-700);
2235
2289
  }
@@ -2245,6 +2299,9 @@
2245
2299
  .text-violet-700 {
2246
2300
  color: var(--color-violet-700);
2247
2301
  }
2302
+ .text-violet-800 {
2303
+ color: var(--color-violet-800);
2304
+ }
2248
2305
  .text-white {
2249
2306
  color: var(--color-white);
2250
2307
  }
@@ -3424,21 +3481,6 @@
3424
3481
  white-space: normal !important;
3425
3482
  }
3426
3483
  }
3427
- .\[\&_span\]\:text-start {
3428
- & span {
3429
- text-align: start;
3430
- }
3431
- }
3432
- .\[\&\>div\]\:justify-start {
3433
- &>div {
3434
- justify-content: flex-start;
3435
- }
3436
- }
3437
- .\[\&\>div\]\:p-0 {
3438
- &>div {
3439
- padding: 0;
3440
- }
3441
- }
3442
3484
  }
3443
3485
  [data-theme="clean"], :root:has([data-theme="clean"]) {
3444
3486
  --color-brand: #4f46e5;
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
  }),
@@ -13508,14 +13521,14 @@ var PlacementSettings = ({ config, onChange, tables }) => {
13508
13521
  };
13509
13522
 
13510
13523
  // src/components/PlacementBlock/PlacementRelationButtons.tsx
13511
- var import_react30 = __toESM(require("react"));
13524
+ var import_react30 = require("react");
13512
13525
  var import_jsx_runtime29 = require("react/jsx-runtime");
13513
13526
  var GROUP_COLORS = [
13514
- { title: "bg-blue-600 text-white", active: "bg-blue-600 border-blue-600 text-white hover:bg-blue-700", count: "text-blue-700" },
13515
- { title: "bg-violet-600 text-white", active: "bg-violet-600 border-violet-600 text-white hover:bg-violet-700", count: "text-violet-700" },
13516
- { title: "bg-emerald-600 text-white", active: "bg-emerald-600 border-emerald-600 text-white hover:bg-emerald-700", count: "text-emerald-700" },
13517
- { title: "bg-amber-500 text-white", active: "bg-amber-500 border-amber-500 text-white hover:bg-amber-600", count: "text-amber-700" },
13518
- { title: "bg-rose-600 text-white", active: "bg-rose-600 border-rose-600 text-white hover:bg-rose-700", count: "text-rose-700" }
13527
+ { box: "bg-blue-50/70 border-blue-200", title: "bg-blue-600 text-white", active: "bg-blue-600 border-blue-600 text-white hover:bg-blue-700", count: "text-blue-700" },
13528
+ { box: "bg-violet-50/70 border-violet-200", title: "bg-violet-600 text-white", active: "bg-violet-600 border-violet-600 text-white hover:bg-violet-700", count: "text-violet-700" },
13529
+ { box: "bg-emerald-50/70 border-emerald-200", title: "bg-emerald-600 text-white", active: "bg-emerald-600 border-emerald-600 text-white hover:bg-emerald-700", count: "text-emerald-700" },
13530
+ { box: "bg-amber-50/70 border-amber-200", title: "bg-amber-500 text-white", active: "bg-amber-500 border-amber-500 text-white hover:bg-amber-600", count: "text-amber-700" },
13531
+ { box: "bg-rose-50/70 border-rose-200", title: "bg-rose-600 text-white", active: "bg-rose-600 border-rose-600 text-white hover:bg-rose-700", count: "text-rose-700" }
13519
13532
  ];
13520
13533
  var isRawObjectId2 = (s) => /^[0-9a-fA-F]{24}$/.test(s);
13521
13534
  function rowMatchesRelationFilter(row, colName, ids) {
@@ -13567,18 +13580,17 @@ var PlacementRelationButtons = ({
13567
13580
  className,
13568
13581
  "data-testid": "placement-relation-buttons",
13569
13582
  children: groups.every((g) => g.options.length === 0) ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "py-2 text-xs text-slate-400", children: "\u05D0\u05D9\u05DF \u05E2\u05E8\u05DB\u05D9\u05DD \u05DC\u05D4\u05E6\u05D2\u05D4 \u05D1\u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05E9\u05E0\u05D1\u05D7\u05E8\u05D5" }) : (
13570
- // זרימה אופקית אחת לכל הקבוצות: תגית הכותרת הצבעונית ואחריה הכפתורים שלה, ואז הקבוצה הבאה
13571
- // באותה שורה, וכך אין חלל ריק גם כשבעמודה אחת הרבה ערכים ובאחרת מעט.
13572
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "bg-white border border-slate-200 rounded-xl p-3 shadow-2xs", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex flex-wrap items-end gap-x-2 gap-y-3", children: groups.map((group, gi) => {
13583
+ // כל קבוצה (עמודה) במסגרת עם רקע בהיר משלה: הכותרת הצבעונית קבועה בצד, והכפתורים שלה לידה
13584
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex flex-col gap-2", children: groups.map((group, gi) => {
13573
13585
  if (group.options.length === 0) return null;
13574
13586
  const color = GROUP_COLORS[gi % GROUP_COLORS.length];
13575
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react30.default.Fragment, { children: [
13576
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: `flex flex-col items-center gap-0.5 ${gi > 0 ? "ms-3" : ""}`, children: [
13587
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: `flex items-start gap-3 rounded-xl border p-2.5 shadow-2xs ${color.box}`, children: [
13588
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col items-center gap-0.5 shrink-0", children: [
13577
13589
  /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-[11px] leading-none invisible", "aria-hidden": "true", children: "0" }),
13578
13590
  /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
13579
13591
  "span",
13580
13592
  {
13581
- className: `inline-flex items-center gap-1.5 px-2.5 h-8 rounded-md text-xs font-bold whitespace-nowrap ${color.title}`,
13593
+ className: `inline-flex items-center justify-center gap-1.5 px-2.5 h-8 min-w-[5.5rem] rounded-md text-xs font-bold whitespace-nowrap ${color.title}`,
13582
13594
  title: group.title,
13583
13595
  children: [
13584
13596
  group.title,
@@ -13597,7 +13609,7 @@ var PlacementRelationButtons = ({
13597
13609
  }
13598
13610
  )
13599
13611
  ] }),
13600
- group.options.map((opt) => {
13612
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex flex-wrap items-end gap-x-2 gap-y-2 flex-1 min-w-0", children: group.options.map((opt) => {
13601
13613
  const active = group.activeIds.includes(opt.id);
13602
13614
  return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col items-center gap-0.5", children: [
13603
13615
  /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: `text-[11px] font-bold leading-none ${active ? color.count : "text-slate-500"}`, children: opt.count }),
@@ -13613,9 +13625,9 @@ var PlacementRelationButtons = ({
13613
13625
  }
13614
13626
  )
13615
13627
  ] }, `${group.key}:${opt.id}`);
13616
- })
13628
+ }) })
13617
13629
  ] }, group.key);
13618
- }) }) })
13630
+ }) })
13619
13631
  )
13620
13632
  }
13621
13633
  );
@@ -13660,6 +13672,30 @@ function computePlacementDefaultFilters(args) {
13660
13672
 
13661
13673
  // src/components/PlacementBlock/PlacementBlock.tsx
13662
13674
  var import_jsx_runtime30 = require("react/jsx-runtime");
13675
+ var STATUS_BADGE_FALLBACK = [
13676
+ "bg-blue-100 text-blue-800 border-blue-300",
13677
+ "bg-violet-100 text-violet-800 border-violet-300",
13678
+ "bg-sky-100 text-sky-800 border-sky-300",
13679
+ "bg-slate-100 text-slate-700 border-slate-300"
13680
+ ];
13681
+ function statusBadgeClass(text2) {
13682
+ if (/שובץ|משובץ|אושר|פעיל/.test(text2)) return "bg-emerald-100 text-emerald-800 border-emerald-300";
13683
+ if (/לא |בוטל|נדחה|סגור/.test(text2)) return "bg-rose-100 text-rose-800 border-rose-300";
13684
+ if (/ממתין|טיוטה|בהמתנה|פתוח/.test(text2)) return "bg-amber-100 text-amber-800 border-amber-300";
13685
+ let h = 0;
13686
+ for (let i = 0; i < text2.length; i++) h = h * 31 + text2.charCodeAt(i) >>> 0;
13687
+ return STATUS_BADGE_FALLBACK[h % STATUS_BADGE_FALLBACK.length];
13688
+ }
13689
+ function formatPreviewDate(raw, fallback) {
13690
+ if (typeof raw === "string") {
13691
+ const m = raw.match(/^(\d{4})-(\d{2})-(\d{2})/);
13692
+ if (m) return `${m[3]}/${m[2]}/${m[1]}`;
13693
+ }
13694
+ if (raw instanceof Date && !isNaN(raw.getTime())) {
13695
+ return `${String(raw.getDate()).padStart(2, "0")}/${String(raw.getMonth() + 1).padStart(2, "0")}/${raw.getFullYear()}`;
13696
+ }
13697
+ return fallback;
13698
+ }
13663
13699
  var FETCH_LIMIT = 1e3;
13664
13700
  function normalizeRows(records) {
13665
13701
  return (records || []).filter(Boolean).map((r) => {
@@ -14134,16 +14170,51 @@ var PlacementBlock = (props) => {
14134
14170
  } catch (e) {
14135
14171
  }
14136
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]);
14137
14208
  const sourceVisibleColumns = (0, import_react31.useMemo)(() => {
14138
14209
  const h = new Set(hiddenCols.source);
14139
- const v = gridColumns.filter((c) => !h.has(c.name));
14140
- return v.length ? v : gridColumns;
14141
- }, [gridColumns, hiddenCols.source]);
14210
+ const v = sourceOrderedColumns.filter((c) => !h.has(c.name));
14211
+ return v.length ? v : sourceOrderedColumns;
14212
+ }, [sourceOrderedColumns, hiddenCols.source]);
14142
14213
  const candVisibleColumns = (0, import_react31.useMemo)(() => {
14143
14214
  const h = new Set(hiddenCols.cand);
14144
- const v = gridColumns.filter((c) => !h.has(c.name));
14145
- return v.length ? v : gridColumns;
14146
- }, [gridColumns, hiddenCols.cand]);
14215
+ const v = candOrderedColumns.filter((c) => !h.has(c.name));
14216
+ return v.length ? v : candOrderedColumns;
14217
+ }, [candOrderedColumns, hiddenCols.cand]);
14147
14218
  const onSourceHiddenChange = (0, import_react31.useCallback)((next) => updateHiddenCols("source", next), [updateHiddenCols]);
14148
14219
  const onCandHiddenChange = (0, import_react31.useCallback)((next) => updateHiddenCols("cand", next), [updateHiddenCols]);
14149
14220
  const getCellValue = (0, import_react31.useCallback)((row, col) => {
@@ -14440,62 +14511,75 @@ var PlacementBlock = (props) => {
14440
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);
14441
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";
14442
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;
14443
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: [
14444
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 }),
14445
14530
  /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-3", children: [
14446
- /* @__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: [
14447
- /* @__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: [
14448
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("h4", { className: "font-bold text-teal-900 text-base flex items-center gap-2 shrink-0", children: [
14449
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "\u{1F4CC}" }),
14450
- " \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) })
14451
14536
  ] }),
14452
- 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: [
14453
14538
  "\u05DE\u05E9\u05D5\u05D1\u05E6\u05D9\u05DD \u05DB\u05E8\u05D2\u05E2: ",
14454
14539
  assignedIds.length
14455
14540
  ] }),
14456
- 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 }),
14457
- editUrl && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
14458
- "a",
14459
- {
14460
- href: editUrl,
14461
- target: "_blank",
14462
- rel: "noopener noreferrer",
14463
- 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",
14464
- 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",
14465
- children: [
14466
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "\u05E2\u05E8\u05D9\u05DB\u05EA \u05E8\u05DB\u05D9\u05D1 \u05D4\u05E9\u05D9\u05D1\u05D5\u05E5" }),
14467
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.ExternalLink, { className: "w-3.5 h-3.5 text-slate-500" })
14468
- ]
14469
- }
14470
- )
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
14471
14545
  ] }),
14472
- 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: [
14473
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "col-span-full font-bold text-slate-900 text-lg", children: targetLabel(activeTarget) }),
14474
- previewColumns.map((col) => ({ col, text: displayValue(col, readColumnValue(activeTarget.data, col.name)) })).filter(({ col, text: text2 }) => {
14475
- var _a2;
14476
- return text2 && (col.type === "RELATION" || typeof ((_a2 = activeTarget.data) == null ? void 0 : _a2[col.name]) !== "object");
14477
- }).map(({ col, text: text2 }) => {
14478
- var _a2, _b2;
14479
- const label = col.label || col.name;
14480
- 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" : "";
14481
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: `flex gap-1.5 items-start min-w-0 ${span}`, children: [
14482
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "font-semibold shrink-0", children: [
14483
- col.label || col.name,
14484
- ":"
14485
- ] }),
14486
- ((_a2 = col.type) == null ? void 0 : _a2.toUpperCase()) === "DATE" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "min-w-0 flex-1 [&>div]:p-0 [&>div]:justify-start [&_span]:text-start", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DatePickerCell, { value: (_b2 = activeTarget.data) == null ? void 0 : _b2[col.name], onChange: () => {
14487
- }, readOnly: true }) }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "break-words min-w-0", children: text2 })
14488
- ] }, col.name);
14489
- }),
14490
- assignmentField && assignedText && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex gap-1.5 items-start min-w-0", children: [
14491
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "font-semibold shrink-0", children: [
14492
- assignmentLabel,
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: [
14556
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "text-slate-500 text-xs shrink-0", children: [
14557
+ label,
14493
14558
  ":"
14494
14559
  ] }),
14495
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "break-words min-w-0", title: assignedText, children: assignedText })
14496
- ] })
14497
- ] }) : /* @__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." })
14498
- ] }),
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
+ ] }) }),
14499
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: [
14500
14584
  /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col sm:flex-row sm:flex-wrap sm:items-end gap-3", children: [
14501
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" }),
@@ -14576,7 +14660,7 @@ var PlacementBlock = (props) => {
14576
14660
  availableGridData.length,
14577
14661
  ")"
14578
14662
  ] }),
14579
- /* @__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 }),
14580
14664
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PlacementSearchInput, { onChange: setSourceSearch, disabled: isLoading })
14581
14665
  ] }),
14582
14666
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
@@ -14594,6 +14678,7 @@ var PlacementBlock = (props) => {
14594
14678
  onMove: moveToCandidates,
14595
14679
  moveTitle: "\u05D4\u05E2\u05D1\u05E8 \u05DC\u05D8\u05D1\u05DC\u05EA \u05D4\u05DE\u05D5\u05E2\u05DE\u05D3\u05D9\u05DD",
14596
14680
  onOpenDetails: openSourceDetails,
14681
+ onReorderColumns: onSourceReorder,
14597
14682
  isFilterActive: isSourceFilterActive,
14598
14683
  onOpenFilter: openSourceFilter,
14599
14684
  cellContext,
@@ -14612,7 +14697,7 @@ var PlacementBlock = (props) => {
14612
14697
  candidateGridData.length,
14613
14698
  ")"
14614
14699
  ] }),
14615
- /* @__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" }),
14616
14701
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PlacementSearchInput, { onChange: setCandidateSearch, disabled: isLoading }),
14617
14702
  /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center gap-2 ms-auto", children: [
14618
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" }),
@@ -14640,6 +14725,7 @@ var PlacementBlock = (props) => {
14640
14725
  onMove: moveToSource,
14641
14726
  moveTitle: "\u05D4\u05D7\u05D6\u05E8 \u05DC\u05E8\u05E9\u05D9\u05DE\u05EA \u05D4\u05DE\u05E7\u05D5\u05E8",
14642
14727
  onOpenDetails: openCandDetails,
14728
+ onReorderColumns: onCandReorder,
14643
14729
  isFilterActive: isCandFilterActive,
14644
14730
  onOpenFilter: openCandFilter,
14645
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
  }),
@@ -12875,7 +12888,7 @@ var PlacementSearchInput = ({ onChange, disabled, placeholder = "\u05D7\u05D9\u0
12875
12888
  };
12876
12889
 
12877
12890
  // src/components/PlacementBlock/PlacementBlock.tsx
12878
- import { ExternalLink as ExternalLink3 } from "lucide-react";
12891
+ import { ExternalLink as ExternalLink3, CalendarDays } from "lucide-react";
12879
12892
 
12880
12893
  // src/components/PlacementBlock/PlacementSettings.tsx
12881
12894
  import React24 from "react";
@@ -13292,14 +13305,14 @@ var PlacementSettings = ({ config, onChange, tables }) => {
13292
13305
  };
13293
13306
 
13294
13307
  // src/components/PlacementBlock/PlacementRelationButtons.tsx
13295
- import React25, { useMemo as useMemo11 } from "react";
13308
+ import { useMemo as useMemo11 } from "react";
13296
13309
  import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
13297
13310
  var GROUP_COLORS = [
13298
- { title: "bg-blue-600 text-white", active: "bg-blue-600 border-blue-600 text-white hover:bg-blue-700", count: "text-blue-700" },
13299
- { title: "bg-violet-600 text-white", active: "bg-violet-600 border-violet-600 text-white hover:bg-violet-700", count: "text-violet-700" },
13300
- { title: "bg-emerald-600 text-white", active: "bg-emerald-600 border-emerald-600 text-white hover:bg-emerald-700", count: "text-emerald-700" },
13301
- { title: "bg-amber-500 text-white", active: "bg-amber-500 border-amber-500 text-white hover:bg-amber-600", count: "text-amber-700" },
13302
- { title: "bg-rose-600 text-white", active: "bg-rose-600 border-rose-600 text-white hover:bg-rose-700", count: "text-rose-700" }
13311
+ { box: "bg-blue-50/70 border-blue-200", title: "bg-blue-600 text-white", active: "bg-blue-600 border-blue-600 text-white hover:bg-blue-700", count: "text-blue-700" },
13312
+ { box: "bg-violet-50/70 border-violet-200", title: "bg-violet-600 text-white", active: "bg-violet-600 border-violet-600 text-white hover:bg-violet-700", count: "text-violet-700" },
13313
+ { box: "bg-emerald-50/70 border-emerald-200", title: "bg-emerald-600 text-white", active: "bg-emerald-600 border-emerald-600 text-white hover:bg-emerald-700", count: "text-emerald-700" },
13314
+ { box: "bg-amber-50/70 border-amber-200", title: "bg-amber-500 text-white", active: "bg-amber-500 border-amber-500 text-white hover:bg-amber-600", count: "text-amber-700" },
13315
+ { box: "bg-rose-50/70 border-rose-200", title: "bg-rose-600 text-white", active: "bg-rose-600 border-rose-600 text-white hover:bg-rose-700", count: "text-rose-700" }
13303
13316
  ];
13304
13317
  var isRawObjectId2 = (s) => /^[0-9a-fA-F]{24}$/.test(s);
13305
13318
  function rowMatchesRelationFilter(row, colName, ids) {
@@ -13351,18 +13364,17 @@ var PlacementRelationButtons = ({
13351
13364
  className,
13352
13365
  "data-testid": "placement-relation-buttons",
13353
13366
  children: groups.every((g) => g.options.length === 0) ? /* @__PURE__ */ jsx29("div", { className: "py-2 text-xs text-slate-400", children: "\u05D0\u05D9\u05DF \u05E2\u05E8\u05DB\u05D9\u05DD \u05DC\u05D4\u05E6\u05D2\u05D4 \u05D1\u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05E9\u05E0\u05D1\u05D7\u05E8\u05D5" }) : (
13354
- // זרימה אופקית אחת לכל הקבוצות: תגית הכותרת הצבעונית ואחריה הכפתורים שלה, ואז הקבוצה הבאה
13355
- // באותה שורה, וכך אין חלל ריק גם כשבעמודה אחת הרבה ערכים ובאחרת מעט.
13356
- /* @__PURE__ */ jsx29("div", { className: "bg-white border border-slate-200 rounded-xl p-3 shadow-2xs", children: /* @__PURE__ */ jsx29("div", { className: "flex flex-wrap items-end gap-x-2 gap-y-3", children: groups.map((group, gi) => {
13367
+ // כל קבוצה (עמודה) במסגרת עם רקע בהיר משלה: הכותרת הצבעונית קבועה בצד, והכפתורים שלה לידה
13368
+ /* @__PURE__ */ jsx29("div", { className: "flex flex-col gap-2", children: groups.map((group, gi) => {
13357
13369
  if (group.options.length === 0) return null;
13358
13370
  const color = GROUP_COLORS[gi % GROUP_COLORS.length];
13359
- return /* @__PURE__ */ jsxs23(React25.Fragment, { children: [
13360
- /* @__PURE__ */ jsxs23("div", { className: `flex flex-col items-center gap-0.5 ${gi > 0 ? "ms-3" : ""}`, children: [
13371
+ return /* @__PURE__ */ jsxs23("div", { className: `flex items-start gap-3 rounded-xl border p-2.5 shadow-2xs ${color.box}`, children: [
13372
+ /* @__PURE__ */ jsxs23("div", { className: "flex flex-col items-center gap-0.5 shrink-0", children: [
13361
13373
  /* @__PURE__ */ jsx29("span", { className: "text-[11px] leading-none invisible", "aria-hidden": "true", children: "0" }),
13362
13374
  /* @__PURE__ */ jsxs23(
13363
13375
  "span",
13364
13376
  {
13365
- className: `inline-flex items-center gap-1.5 px-2.5 h-8 rounded-md text-xs font-bold whitespace-nowrap ${color.title}`,
13377
+ className: `inline-flex items-center justify-center gap-1.5 px-2.5 h-8 min-w-[5.5rem] rounded-md text-xs font-bold whitespace-nowrap ${color.title}`,
13366
13378
  title: group.title,
13367
13379
  children: [
13368
13380
  group.title,
@@ -13381,7 +13393,7 @@ var PlacementRelationButtons = ({
13381
13393
  }
13382
13394
  )
13383
13395
  ] }),
13384
- group.options.map((opt) => {
13396
+ /* @__PURE__ */ jsx29("div", { className: "flex flex-wrap items-end gap-x-2 gap-y-2 flex-1 min-w-0", children: group.options.map((opt) => {
13385
13397
  const active = group.activeIds.includes(opt.id);
13386
13398
  return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col items-center gap-0.5", children: [
13387
13399
  /* @__PURE__ */ jsx29("span", { className: `text-[11px] font-bold leading-none ${active ? color.count : "text-slate-500"}`, children: opt.count }),
@@ -13397,9 +13409,9 @@ var PlacementRelationButtons = ({
13397
13409
  }
13398
13410
  )
13399
13411
  ] }, `${group.key}:${opt.id}`);
13400
- })
13412
+ }) })
13401
13413
  ] }, group.key);
13402
- }) }) })
13414
+ }) })
13403
13415
  )
13404
13416
  }
13405
13417
  );
@@ -13443,7 +13455,31 @@ function computePlacementDefaultFilters(args) {
13443
13455
  }
13444
13456
 
13445
13457
  // src/components/PlacementBlock/PlacementBlock.tsx
13446
- 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";
13459
+ var STATUS_BADGE_FALLBACK = [
13460
+ "bg-blue-100 text-blue-800 border-blue-300",
13461
+ "bg-violet-100 text-violet-800 border-violet-300",
13462
+ "bg-sky-100 text-sky-800 border-sky-300",
13463
+ "bg-slate-100 text-slate-700 border-slate-300"
13464
+ ];
13465
+ function statusBadgeClass(text2) {
13466
+ if (/שובץ|משובץ|אושר|פעיל/.test(text2)) return "bg-emerald-100 text-emerald-800 border-emerald-300";
13467
+ if (/לא |בוטל|נדחה|סגור/.test(text2)) return "bg-rose-100 text-rose-800 border-rose-300";
13468
+ if (/ממתין|טיוטה|בהמתנה|פתוח/.test(text2)) return "bg-amber-100 text-amber-800 border-amber-300";
13469
+ let h = 0;
13470
+ for (let i = 0; i < text2.length; i++) h = h * 31 + text2.charCodeAt(i) >>> 0;
13471
+ return STATUS_BADGE_FALLBACK[h % STATUS_BADGE_FALLBACK.length];
13472
+ }
13473
+ function formatPreviewDate(raw, fallback) {
13474
+ if (typeof raw === "string") {
13475
+ const m = raw.match(/^(\d{4})-(\d{2})-(\d{2})/);
13476
+ if (m) return `${m[3]}/${m[2]}/${m[1]}`;
13477
+ }
13478
+ if (raw instanceof Date && !isNaN(raw.getTime())) {
13479
+ return `${String(raw.getDate()).padStart(2, "0")}/${String(raw.getMonth() + 1).padStart(2, "0")}/${raw.getFullYear()}`;
13480
+ }
13481
+ return fallback;
13482
+ }
13447
13483
  var FETCH_LIMIT = 1e3;
13448
13484
  function normalizeRows(records) {
13449
13485
  return (records || []).filter(Boolean).map((r) => {
@@ -13918,16 +13954,51 @@ var PlacementBlock = (props) => {
13918
13954
  } catch (e) {
13919
13955
  }
13920
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]);
13921
13992
  const sourceVisibleColumns = useMemo12(() => {
13922
13993
  const h = new Set(hiddenCols.source);
13923
- const v = gridColumns.filter((c) => !h.has(c.name));
13924
- return v.length ? v : gridColumns;
13925
- }, [gridColumns, hiddenCols.source]);
13994
+ const v = sourceOrderedColumns.filter((c) => !h.has(c.name));
13995
+ return v.length ? v : sourceOrderedColumns;
13996
+ }, [sourceOrderedColumns, hiddenCols.source]);
13926
13997
  const candVisibleColumns = useMemo12(() => {
13927
13998
  const h = new Set(hiddenCols.cand);
13928
- const v = gridColumns.filter((c) => !h.has(c.name));
13929
- return v.length ? v : gridColumns;
13930
- }, [gridColumns, hiddenCols.cand]);
13999
+ const v = candOrderedColumns.filter((c) => !h.has(c.name));
14000
+ return v.length ? v : candOrderedColumns;
14001
+ }, [candOrderedColumns, hiddenCols.cand]);
13931
14002
  const onSourceHiddenChange = useCallback18((next) => updateHiddenCols("source", next), [updateHiddenCols]);
13932
14003
  const onCandHiddenChange = useCallback18((next) => updateHiddenCols("cand", next), [updateHiddenCols]);
13933
14004
  const getCellValue = useCallback18((row, col) => {
@@ -14224,62 +14295,75 @@ var PlacementBlock = (props) => {
14224
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);
14225
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";
14226
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;
14227
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: [
14228
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 }),
14229
14314
  /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-3", children: [
14230
- /* @__PURE__ */ jsxs24("div", { className: "w-full bg-teal-50/40 p-3 rounded-xl border border-teal-100 shadow-xs flex flex-col", children: [
14231
- /* @__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: [
14232
- /* @__PURE__ */ jsxs24("h4", { className: "font-bold text-teal-900 text-base flex items-center gap-2 shrink-0", children: [
14233
- /* @__PURE__ */ jsx30("span", { children: "\u{1F4CC}" }),
14234
- " \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) })
14235
14320
  ] }),
14236
- 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: [
14237
14322
  "\u05DE\u05E9\u05D5\u05D1\u05E6\u05D9\u05DD \u05DB\u05E8\u05D2\u05E2: ",
14238
14323
  assignedIds.length
14239
14324
  ] }),
14240
- 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 }),
14241
- editUrl && /* @__PURE__ */ jsxs24(
14242
- "a",
14243
- {
14244
- href: editUrl,
14245
- target: "_blank",
14246
- rel: "noopener noreferrer",
14247
- 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",
14248
- 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",
14249
- children: [
14250
- /* @__PURE__ */ jsx30("span", { children: "\u05E2\u05E8\u05D9\u05DB\u05EA \u05E8\u05DB\u05D9\u05D1 \u05D4\u05E9\u05D9\u05D1\u05D5\u05E5" }),
14251
- /* @__PURE__ */ jsx30(ExternalLink3, { className: "w-3.5 h-3.5 text-slate-500" })
14252
- ]
14253
- }
14254
- )
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
14255
14329
  ] }),
14256
- 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: [
14257
- /* @__PURE__ */ jsx30("div", { className: "col-span-full font-bold text-slate-900 text-lg", children: targetLabel(activeTarget) }),
14258
- previewColumns.map((col) => ({ col, text: displayValue(col, readColumnValue(activeTarget.data, col.name)) })).filter(({ col, text: text2 }) => {
14259
- var _a2;
14260
- return text2 && (col.type === "RELATION" || typeof ((_a2 = activeTarget.data) == null ? void 0 : _a2[col.name]) !== "object");
14261
- }).map(({ col, text: text2 }) => {
14262
- var _a2, _b2;
14263
- const label = col.label || col.name;
14264
- 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" : "";
14265
- return /* @__PURE__ */ jsxs24("div", { className: `flex gap-1.5 items-start min-w-0 ${span}`, children: [
14266
- /* @__PURE__ */ jsxs24("span", { className: "font-semibold shrink-0", children: [
14267
- col.label || col.name,
14268
- ":"
14269
- ] }),
14270
- ((_a2 = col.type) == null ? void 0 : _a2.toUpperCase()) === "DATE" ? /* @__PURE__ */ jsx30("span", { className: "min-w-0 flex-1 [&>div]:p-0 [&>div]:justify-start [&_span]:text-start", children: /* @__PURE__ */ jsx30(DatePickerCell, { value: (_b2 = activeTarget.data) == null ? void 0 : _b2[col.name], onChange: () => {
14271
- }, readOnly: true }) }) : /* @__PURE__ */ jsx30("span", { className: "break-words min-w-0", children: text2 })
14272
- ] }, col.name);
14273
- }),
14274
- assignmentField && assignedText && /* @__PURE__ */ jsxs24("div", { className: "flex gap-1.5 items-start min-w-0", children: [
14275
- /* @__PURE__ */ jsxs24("span", { className: "font-semibold shrink-0", children: [
14276
- assignmentLabel,
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: [
14340
+ /* @__PURE__ */ jsxs24("span", { className: "text-slate-500 text-xs shrink-0", children: [
14341
+ label,
14277
14342
  ":"
14278
14343
  ] }),
14279
- /* @__PURE__ */ jsx30("span", { className: "break-words min-w-0", title: assignedText, children: assignedText })
14280
- ] })
14281
- ] }) : /* @__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." })
14282
- ] }),
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
+ ] }) }),
14283
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: [
14284
14368
  /* @__PURE__ */ jsxs24("div", { className: "flex flex-col sm:flex-row sm:flex-wrap sm:items-end gap-3", children: [
14285
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" }),
@@ -14360,7 +14444,7 @@ var PlacementBlock = (props) => {
14360
14444
  availableGridData.length,
14361
14445
  ")"
14362
14446
  ] }),
14363
- /* @__PURE__ */ jsx30(PlacementColumnsMenu, { columns: gridColumns, hidden: hiddenCols.source, onChange: onSourceHiddenChange }),
14447
+ /* @__PURE__ */ jsx30(PlacementColumnsMenu, { columns: sourceOrderedColumns, hidden: hiddenCols.source, onChange: onSourceHiddenChange }),
14364
14448
  /* @__PURE__ */ jsx30(PlacementSearchInput, { onChange: setSourceSearch, disabled: isLoading })
14365
14449
  ] }),
14366
14450
  /* @__PURE__ */ jsx30(
@@ -14378,6 +14462,7 @@ var PlacementBlock = (props) => {
14378
14462
  onMove: moveToCandidates,
14379
14463
  moveTitle: "\u05D4\u05E2\u05D1\u05E8 \u05DC\u05D8\u05D1\u05DC\u05EA \u05D4\u05DE\u05D5\u05E2\u05DE\u05D3\u05D9\u05DD",
14380
14464
  onOpenDetails: openSourceDetails,
14465
+ onReorderColumns: onSourceReorder,
14381
14466
  isFilterActive: isSourceFilterActive,
14382
14467
  onOpenFilter: openSourceFilter,
14383
14468
  cellContext,
@@ -14396,7 +14481,7 @@ var PlacementBlock = (props) => {
14396
14481
  candidateGridData.length,
14397
14482
  ")"
14398
14483
  ] }),
14399
- /* @__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" }),
14400
14485
  /* @__PURE__ */ jsx30(PlacementSearchInput, { onChange: setCandidateSearch, disabled: isLoading }),
14401
14486
  /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 ms-auto", children: [
14402
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" }),
@@ -14424,6 +14509,7 @@ var PlacementBlock = (props) => {
14424
14509
  onMove: moveToSource,
14425
14510
  moveTitle: "\u05D4\u05D7\u05D6\u05E8 \u05DC\u05E8\u05E9\u05D9\u05DE\u05EA \u05D4\u05DE\u05E7\u05D5\u05E8",
14426
14511
  onOpenDetails: openCandDetails,
14512
+ onReorderColumns: onCandReorder,
14427
14513
  isFilterActive: isCandFilterActive,
14428
14514
  onOpenFilter: openCandFilter,
14429
14515
  cellContext,
@@ -14681,7 +14767,7 @@ import { AgGridReact } from "ag-grid-react";
14681
14767
  import { ModuleRegistry, AllCommunityModule } from "ag-grid-community";
14682
14768
 
14683
14769
  // src/components/PaymentReportsBlock/PaymentReportsModals.tsx
14684
- 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";
14685
14771
  var Modal = ({ title, onClose, children, footer, wide }) => /* @__PURE__ */ jsx31(
14686
14772
  "div",
14687
14773
  {
@@ -14710,7 +14796,7 @@ var ConfirmModal = ({ title, message, confirmLabel, danger, busy, onConfirm, onC
14710
14796
  {
14711
14797
  title,
14712
14798
  onClose,
14713
- footer: /* @__PURE__ */ jsxs25(Fragment7, { children: [
14799
+ footer: /* @__PURE__ */ jsxs25(Fragment8, { children: [
14714
14800
  /* @__PURE__ */ jsx31(
14715
14801
  "button",
14716
14802
  {
@@ -15007,7 +15093,7 @@ import { ModuleRegistry as ModuleRegistry2, AllCommunityModule as AllCommunityMo
15007
15093
 
15008
15094
  // src/components/PaymentReportsBlock/ProofCell.tsx
15009
15095
  import { useRef as useRef24, useState as useState28 } from "react";
15010
- 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";
15011
15097
  var ProofCell = ({ files, editable, onUpload, onRemove }) => {
15012
15098
  const inputRef = useRef24(null);
15013
15099
  const [busy, setBusy] = useState28(false);
@@ -15034,9 +15120,9 @@ var ProofCell = ({ files, editable, onUpload, onRemove }) => {
15034
15120
  }
15035
15121
  };
15036
15122
  return /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2 h-full", children: [
15037
- file ? /* @__PURE__ */ jsxs27(Fragment8, { children: [
15123
+ file ? /* @__PURE__ */ jsxs27(Fragment9, { children: [
15038
15124
  /* @__PURE__ */ jsx33("a", { href, target: "_blank", rel: "noreferrer", className: "text-blue-600 underline text-xs font-medium", children: "\u05E6\u05E4\u05D9\u05D9\u05D4" }),
15039
- editable && /* @__PURE__ */ jsxs27(Fragment8, { children: [
15125
+ editable && /* @__PURE__ */ jsxs27(Fragment9, { children: [
15040
15126
  /* @__PURE__ */ jsx33("button", { type: "button", disabled: busy, onClick: () => {
15041
15127
  var _a;
15042
15128
  return (_a = inputRef.current) == null ? void 0 : _a.click();
@@ -15836,7 +15922,7 @@ function readFileAsBase64(file) {
15836
15922
  }
15837
15923
 
15838
15924
  // src/components/WhatsAppComponent/CreateTemplateModal.tsx
15839
- 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";
15840
15926
  function CreateTemplateModal({
15841
15927
  isOpen,
15842
15928
  onClose,
@@ -16909,10 +16995,10 @@ function CreateTemplateModal({
16909
16995
  disabled: !canSubmit,
16910
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"}`,
16911
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",
16912
- children: isSubmitting ? /* @__PURE__ */ jsxs32(Fragment9, { children: [
16998
+ children: isSubmitting ? /* @__PURE__ */ jsxs32(Fragment10, { children: [
16913
16999
  /* @__PURE__ */ jsx40(Loader24, { className: "w-4 h-4 animate-spin" }),
16914
17000
  /* @__PURE__ */ jsx40("span", { children: submittingStep || "\u05D9\u05D5\u05E6\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA..." })
16915
- ] }) : /* @__PURE__ */ jsxs32(Fragment9, { children: [
17001
+ ] }) : /* @__PURE__ */ jsxs32(Fragment10, { children: [
16916
17002
  /* @__PURE__ */ jsx40(CheckCircle22, { className: "w-4 h-4" }),
16917
17003
  /* @__PURE__ */ jsx40("span", { children: "\u05E9\u05DC\u05D7 \u05DC\u05D1\u05D3\u05D9\u05E7\u05D4" })
16918
17004
  ] })
@@ -19625,7 +19711,7 @@ import {
19625
19711
  CheckCircle2 as CheckCircle23,
19626
19712
  AlertCircle as AlertCircle3
19627
19713
  } from "lucide-react";
19628
- 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";
19629
19715
  function TemplateSelectionBlock({
19630
19716
  selectedTemplate,
19631
19717
  selectedTemplateId,
@@ -19725,7 +19811,7 @@ function TemplateSelectionBlock({
19725
19811
  ]
19726
19812
  }
19727
19813
  ),
19728
- isDropdownOpen && /* @__PURE__ */ jsxs33(Fragment10, { children: [
19814
+ isDropdownOpen && /* @__PURE__ */ jsxs33(Fragment11, { children: [
19729
19815
  /* @__PURE__ */ jsx41(
19730
19816
  "div",
19731
19817
  {
@@ -19838,7 +19924,7 @@ function TemplateSelectionBlock({
19838
19924
  const hasValidMedia = Boolean(headerMediaUrl && headerMediaUrl.trim() && headerMediaUrl.startsWith("http"));
19839
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";
19840
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: [
19841
- /* @__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: [
19842
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(
19843
19929
  "img",
19844
19930
  {
@@ -19854,13 +19940,13 @@ function TemplateSelectionBlock({
19854
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" }),
19855
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" })
19856
19942
  ] })
19857
- ] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */ jsxs33(Fragment10, { children: [
19943
+ ] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */ jsxs33(Fragment11, { children: [
19858
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" }) }),
19859
19945
  /* @__PURE__ */ jsxs33("div", { className: "overflow-hidden", children: [
19860
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)" }),
19861
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" })
19862
19948
  ] })
19863
- ] }) : /* @__PURE__ */ jsxs33(Fragment10, { children: [
19949
+ ] }) : /* @__PURE__ */ jsxs33(Fragment11, { children: [
19864
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" }) }),
19865
19951
  /* @__PURE__ */ jsxs33("div", { className: "overflow-hidden", children: [
19866
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" }),
@@ -19915,10 +20001,10 @@ function TemplateSelectionBlock({
19915
20001
  },
19916
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"}`,
19917
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`,
19918
- children: isUploadingMedia ? /* @__PURE__ */ jsxs33(Fragment10, { children: [
20004
+ children: isUploadingMedia ? /* @__PURE__ */ jsxs33(Fragment11, { children: [
19919
20005
  /* @__PURE__ */ jsx41(Loader25, { className: "w-3.5 h-3.5 animate-spin" }),
19920
20006
  /* @__PURE__ */ jsx41("span", { children: "\u05DE\u05E2\u05DC\u05D4..." })
19921
- ] }) : /* @__PURE__ */ jsxs33(Fragment10, { children: [
20007
+ ] }) : /* @__PURE__ */ jsxs33(Fragment11, { children: [
19922
20008
  /* @__PURE__ */ jsx41(Upload4, { className: "w-3.5 h-3.5" }),
19923
20009
  /* @__PURE__ */ jsx41("span", { children: hasValidMedia ? "\u05D4\u05D7\u05DC\u05E3 \u05E7\u05D5\u05D1\u05E5" : uploadButtonLabel })
19924
20010
  ] })
@@ -20008,7 +20094,7 @@ import {
20008
20094
  CheckSquare,
20009
20095
  RefreshCw
20010
20096
  } from "lucide-react";
20011
- 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";
20012
20098
  function DynamicFiltersBlock({
20013
20099
  filterableColumns,
20014
20100
  filters,
@@ -20076,7 +20162,7 @@ function DynamicFiltersBlock({
20076
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"}`,
20077
20163
  children: [
20078
20164
  /* @__PURE__ */ jsx42("option", { value: "", children: "\u05D4\u05DB\u05DC" }),
20079
- isBoolean ? /* @__PURE__ */ jsxs34(Fragment11, { children: [
20165
+ isBoolean ? /* @__PURE__ */ jsxs34(Fragment12, { children: [
20080
20166
  /* @__PURE__ */ jsx42("option", { value: "true", children: "\u05DB\u05DF" }),
20081
20167
  /* @__PURE__ */ jsx42("option", { value: "false", children: "\u05DC\u05D0" })
20082
20168
  ] }) : options.map((opt) => /* @__PURE__ */ jsx42("option", { value: opt.id || opt._id, children: getRelationOptionLabel(opt, col, relationOptions) }, opt.id || opt._id))
@@ -20138,7 +20224,7 @@ import {
20138
20224
  X as X13,
20139
20225
  CheckSquare as CheckSquare2
20140
20226
  } from "lucide-react";
20141
- 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";
20142
20228
  function SettingsAndActionsBlock({
20143
20229
  isScanningPhoneColumns,
20144
20230
  targetPhoneOptions,
@@ -20354,7 +20440,7 @@ function SettingsAndActionsBlock({
20354
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"}`,
20355
20441
  children: [
20356
20442
  /* @__PURE__ */ jsx43("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05E8\u05DA \u05DC\u05E1\u05D9\u05E0\u05D5\u05DF..." }),
20357
- ((_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: [
20358
20444
  /* @__PURE__ */ jsx43("option", { value: "true", children: "\u05DB\u05DF (true)" }),
20359
20445
  /* @__PURE__ */ jsx43("option", { value: "false", children: "\u05DC\u05D0 (false)" })
20360
20446
  ] }) : getRelationOptionsForCol(
@@ -20412,7 +20498,7 @@ function SettingsAndActionsBlock({
20412
20498
  ),
20413
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" })
20414
20500
  ] }),
20415
- 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: [
20416
20502
  /* @__PURE__ */ jsxs35("div", { className: "space-y-1", children: [
20417
20503
  /* @__PURE__ */ jsxs35("div", { className: "flex items-center justify-between", children: [
20418
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" }),
@@ -20460,7 +20546,7 @@ function SettingsAndActionsBlock({
20460
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"}`,
20461
20547
  children: [
20462
20548
  /* @__PURE__ */ jsx43("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05E8\u05DA..." }),
20463
- selectedPostSendOption.type === "BOOLEAN" ? /* @__PURE__ */ jsxs35(Fragment12, { children: [
20549
+ selectedPostSendOption.type === "BOOLEAN" ? /* @__PURE__ */ jsxs35(Fragment13, { children: [
20464
20550
  /* @__PURE__ */ jsx43("option", { value: "true", children: "\u05DB\u05DF (Yes)" }),
20465
20551
  /* @__PURE__ */ jsx43("option", { value: "false", children: "\u05DC\u05D0 (No)" })
20466
20552
  ] }) : getRelationOptionsForCol(
@@ -20544,7 +20630,7 @@ function SettingsAndActionsBlock({
20544
20630
  ] })
20545
20631
  ]
20546
20632
  }
20547
- ) : /* @__PURE__ */ jsxs35(Fragment12, { children: [
20633
+ ) : /* @__PURE__ */ jsxs35(Fragment13, { children: [
20548
20634
  /* @__PURE__ */ jsxs35(
20549
20635
  "button",
20550
20636
  {
@@ -20872,7 +20958,7 @@ function WhatsAppInbox({
20872
20958
  }
20873
20959
 
20874
20960
  // src/components/WhatsAppComponent/WhatsAppComponent.tsx
20875
- 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";
20876
20962
  function WhatsAppComponent(props) {
20877
20963
  var _a;
20878
20964
  const { className = "", settings, orgId, componentId, executeAction } = props;
@@ -20944,7 +21030,7 @@ function WhatsAppComponent(props) {
20944
21030
  }
20945
21031
  }
20946
21032
  }
20947
- ) }) : /* @__PURE__ */ jsxs39(Fragment13, { children: [
21033
+ ) }) : /* @__PURE__ */ jsxs39(Fragment14, { children: [
20948
21034
  state.feedback && /* @__PURE__ */ jsxs39(
20949
21035
  "div",
20950
21036
  {
@@ -21174,7 +21260,7 @@ function WhatsAppComponent(props) {
21174
21260
  const headerFormat = (state.templateHeaderComp.format || "").toUpperCase();
21175
21261
  const docFilename = resolveDocumentFilename(state.templateHeaderComp, state.headerMediaUrl);
21176
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: [
21177
- /* @__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: [
21178
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(
21179
21265
  "img",
21180
21266
  {
@@ -21187,13 +21273,13 @@ function WhatsAppComponent(props) {
21187
21273
  }
21188
21274
  ) : /* @__PURE__ */ jsx47(ImageIcon3, { className: "w-3.5 h-3.5 text-emerald-600" }) }),
21189
21275
  /* @__PURE__ */ jsx47("span", { className: "font-semibold text-slate-800 truncate", children: "\u05EA\u05DE\u05D5\u05E0\u05EA \u05DB\u05D5\u05EA\u05E8\u05EA" })
21190
- ] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */ jsxs39(Fragment13, { children: [
21276
+ ] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */ jsxs39(Fragment14, { children: [
21191
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" }) }),
21192
21278
  /* @__PURE__ */ jsxs39("div", { className: "overflow-hidden", children: [
21193
21279
  /* @__PURE__ */ jsx47("span", { className: "font-semibold text-slate-800 block truncate", children: "\u05DE\u05E1\u05DE\u05DA \u05DB\u05D5\u05EA\u05E8\u05EA (PDF)" }),
21194
21280
  /* @__PURE__ */ jsx47("span", { className: "text-[10px] text-slate-500 font-mono block truncate", title: docFilename, children: docFilename })
21195
21281
  ] })
21196
- ] }) : /* @__PURE__ */ jsxs39(Fragment13, { children: [
21282
+ ] }) : /* @__PURE__ */ jsxs39(Fragment14, { children: [
21197
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" }) }),
21198
21284
  /* @__PURE__ */ jsx47("span", { className: "font-semibold text-slate-800 truncate", children: "\u05E1\u05E8\u05D8\u05D5\u05DF \u05DB\u05D5\u05EA\u05E8\u05EA" })
21199
21285
  ] }) }),
@@ -21260,10 +21346,10 @@ function WhatsAppComponent(props) {
21260
21346
  onClick: state.handleSendTest,
21261
21347
  title: state.testButtonTitle,
21262
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"}`,
21263
- children: state.isSendingTest ? /* @__PURE__ */ jsxs39(Fragment13, { children: [
21349
+ children: state.isSendingTest ? /* @__PURE__ */ jsxs39(Fragment14, { children: [
21264
21350
  /* @__PURE__ */ jsx47(Loader28, { className: "w-3.5 h-3.5 animate-spin" }),
21265
21351
  /* @__PURE__ */ jsx47("span", { children: "\u05E9\u05D5\u05DC\u05D7..." })
21266
- ] }) : /* @__PURE__ */ jsxs39(Fragment13, { children: [
21352
+ ] }) : /* @__PURE__ */ jsxs39(Fragment14, { children: [
21267
21353
  /* @__PURE__ */ jsx47(Send3, { className: "w-3.5 h-3.5" }),
21268
21354
  /* @__PURE__ */ jsx47("span", { children: "\u05E9\u05DC\u05D7 \u05E2\u05DB\u05E9\u05D9\u05D5" })
21269
21355
  ] })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@universe-platform/ui",
3
- "version": "0.1.0-beta.81",
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",