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

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,9 @@
2230
2275
  .text-slate-900 {
2231
2276
  color: var(--color-slate-900);
2232
2277
  }
2278
+ .text-teal-600 {
2279
+ color: var(--color-teal-600);
2280
+ }
2233
2281
  .text-teal-700 {
2234
2282
  color: var(--color-teal-700);
2235
2283
  }
@@ -2245,6 +2293,9 @@
2245
2293
  .text-violet-700 {
2246
2294
  color: var(--color-violet-700);
2247
2295
  }
2296
+ .text-violet-800 {
2297
+ color: var(--color-violet-800);
2298
+ }
2248
2299
  .text-white {
2249
2300
  color: var(--color-white);
2250
2301
  }
@@ -3424,21 +3475,6 @@
3424
3475
  white-space: normal !important;
3425
3476
  }
3426
3477
  }
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
3478
  }
3443
3479
  [data-theme="clean"], :root:has([data-theme="clean"]) {
3444
3480
  --color-brand: #4f46e5;
package/dist/index.js CHANGED
@@ -13508,14 +13508,14 @@ var PlacementSettings = ({ config, onChange, tables }) => {
13508
13508
  };
13509
13509
 
13510
13510
  // src/components/PlacementBlock/PlacementRelationButtons.tsx
13511
- var import_react30 = __toESM(require("react"));
13511
+ var import_react30 = require("react");
13512
13512
  var import_jsx_runtime29 = require("react/jsx-runtime");
13513
13513
  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" }
13514
+ { 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" },
13515
+ { 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" },
13516
+ { 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" },
13517
+ { 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" },
13518
+ { 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
13519
  ];
13520
13520
  var isRawObjectId2 = (s) => /^[0-9a-fA-F]{24}$/.test(s);
13521
13521
  function rowMatchesRelationFilter(row, colName, ids) {
@@ -13567,18 +13567,17 @@ var PlacementRelationButtons = ({
13567
13567
  className,
13568
13568
  "data-testid": "placement-relation-buttons",
13569
13569
  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) => {
13570
+ // כל קבוצה (עמודה) במסגרת עם רקע בהיר משלה: הכותרת הצבעונית קבועה בצד, והכפתורים שלה לידה
13571
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex flex-col gap-2", children: groups.map((group, gi) => {
13573
13572
  if (group.options.length === 0) return null;
13574
13573
  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: [
13574
+ 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: [
13575
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col items-center gap-0.5 shrink-0", children: [
13577
13576
  /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-[11px] leading-none invisible", "aria-hidden": "true", children: "0" }),
13578
13577
  /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
13579
13578
  "span",
13580
13579
  {
13581
- className: `inline-flex items-center gap-1.5 px-2.5 h-8 rounded-md text-xs font-bold whitespace-nowrap ${color.title}`,
13580
+ 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
13581
  title: group.title,
13583
13582
  children: [
13584
13583
  group.title,
@@ -13597,7 +13596,7 @@ var PlacementRelationButtons = ({
13597
13596
  }
13598
13597
  )
13599
13598
  ] }),
13600
- group.options.map((opt) => {
13599
+ /* @__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
13600
  const active = group.activeIds.includes(opt.id);
13602
13601
  return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col items-center gap-0.5", children: [
13603
13602
  /* @__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 +13612,9 @@ var PlacementRelationButtons = ({
13613
13612
  }
13614
13613
  )
13615
13614
  ] }, `${group.key}:${opt.id}`);
13616
- })
13615
+ }) })
13617
13616
  ] }, group.key);
13618
- }) }) })
13617
+ }) })
13619
13618
  )
13620
13619
  }
13621
13620
  );
@@ -13660,6 +13659,30 @@ function computePlacementDefaultFilters(args) {
13660
13659
 
13661
13660
  // src/components/PlacementBlock/PlacementBlock.tsx
13662
13661
  var import_jsx_runtime30 = require("react/jsx-runtime");
13662
+ var STATUS_BADGE_FALLBACK = [
13663
+ "bg-blue-100 text-blue-800 border-blue-300",
13664
+ "bg-violet-100 text-violet-800 border-violet-300",
13665
+ "bg-sky-100 text-sky-800 border-sky-300",
13666
+ "bg-slate-100 text-slate-700 border-slate-300"
13667
+ ];
13668
+ function statusBadgeClass(text2) {
13669
+ if (/שובץ|משובץ|אושר|פעיל/.test(text2)) return "bg-emerald-100 text-emerald-800 border-emerald-300";
13670
+ if (/לא |בוטל|נדחה|סגור/.test(text2)) return "bg-rose-100 text-rose-800 border-rose-300";
13671
+ if (/ממתין|טיוטה|בהמתנה|פתוח/.test(text2)) return "bg-amber-100 text-amber-800 border-amber-300";
13672
+ let h = 0;
13673
+ for (let i = 0; i < text2.length; i++) h = h * 31 + text2.charCodeAt(i) >>> 0;
13674
+ return STATUS_BADGE_FALLBACK[h % STATUS_BADGE_FALLBACK.length];
13675
+ }
13676
+ function formatPreviewDate(raw, fallback) {
13677
+ if (typeof raw === "string") {
13678
+ const m = raw.match(/^(\d{4})-(\d{2})-(\d{2})/);
13679
+ if (m) return `${m[3]}/${m[2]}/${m[1]}`;
13680
+ }
13681
+ if (raw instanceof Date && !isNaN(raw.getTime())) {
13682
+ return `${String(raw.getDate()).padStart(2, "0")}/${String(raw.getMonth() + 1).padStart(2, "0")}/${raw.getFullYear()}`;
13683
+ }
13684
+ return fallback;
13685
+ }
13663
13686
  var FETCH_LIMIT = 1e3;
13664
13687
  function normalizeRows(records) {
13665
13688
  return (records || []).filter(Boolean).map((r) => {
@@ -14470,7 +14493,7 @@ var PlacementBlock = (props) => {
14470
14493
  )
14471
14494
  ] }),
14472
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: [
14473
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "col-span-full font-bold text-slate-900 text-lg", children: targetLabel(activeTarget) }),
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) }),
14474
14497
  previewColumns.map((col) => ({ col, text: displayValue(col, readColumnValue(activeTarget.data, col.name)) })).filter(({ col, text: text2 }) => {
14475
14498
  var _a2;
14476
14499
  return text2 && (col.type === "RELATION" || typeof ((_a2 = activeTarget.data) == null ? void 0 : _a2[col.name]) !== "object");
@@ -14478,21 +14501,25 @@ var PlacementBlock = (props) => {
14478
14501
  var _a2, _b2;
14479
14502
  const label = col.label || col.name;
14480
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" : "";
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,
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,
14484
14509
  ":"
14485
14510
  ] }),
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 })
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 })
14488
14515
  ] }, col.name);
14489
14516
  }),
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: [
14517
+ assignmentField && assignedText && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex gap-1.5 items-baseline min-w-0", children: [
14518
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "text-slate-500 text-xs shrink-0", children: [
14492
14519
  assignmentLabel,
14493
14520
  ":"
14494
14521
  ] }),
14495
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "break-words min-w-0", title: assignedText, children: assignedText })
14522
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "break-words min-w-0 font-semibold text-slate-900", title: assignedText, children: assignedText })
14496
14523
  ] })
14497
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." })
14498
14525
  ] }),
package/dist/index.mjs CHANGED
@@ -12875,7 +12875,7 @@ var PlacementSearchInput = ({ onChange, disabled, placeholder = "\u05D7\u05D9\u0
12875
12875
  };
12876
12876
 
12877
12877
  // src/components/PlacementBlock/PlacementBlock.tsx
12878
- import { ExternalLink as ExternalLink3 } from "lucide-react";
12878
+ import { ExternalLink as ExternalLink3, CalendarDays } from "lucide-react";
12879
12879
 
12880
12880
  // src/components/PlacementBlock/PlacementSettings.tsx
12881
12881
  import React24 from "react";
@@ -13292,14 +13292,14 @@ var PlacementSettings = ({ config, onChange, tables }) => {
13292
13292
  };
13293
13293
 
13294
13294
  // src/components/PlacementBlock/PlacementRelationButtons.tsx
13295
- import React25, { useMemo as useMemo11 } from "react";
13295
+ import { useMemo as useMemo11 } from "react";
13296
13296
  import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
13297
13297
  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" }
13298
+ { 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" },
13299
+ { 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" },
13300
+ { 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" },
13301
+ { 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" },
13302
+ { 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
13303
  ];
13304
13304
  var isRawObjectId2 = (s) => /^[0-9a-fA-F]{24}$/.test(s);
13305
13305
  function rowMatchesRelationFilter(row, colName, ids) {
@@ -13351,18 +13351,17 @@ var PlacementRelationButtons = ({
13351
13351
  className,
13352
13352
  "data-testid": "placement-relation-buttons",
13353
13353
  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) => {
13354
+ // כל קבוצה (עמודה) במסגרת עם רקע בהיר משלה: הכותרת הצבעונית קבועה בצד, והכפתורים שלה לידה
13355
+ /* @__PURE__ */ jsx29("div", { className: "flex flex-col gap-2", children: groups.map((group, gi) => {
13357
13356
  if (group.options.length === 0) return null;
13358
13357
  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: [
13358
+ return /* @__PURE__ */ jsxs23("div", { className: `flex items-start gap-3 rounded-xl border p-2.5 shadow-2xs ${color.box}`, children: [
13359
+ /* @__PURE__ */ jsxs23("div", { className: "flex flex-col items-center gap-0.5 shrink-0", children: [
13361
13360
  /* @__PURE__ */ jsx29("span", { className: "text-[11px] leading-none invisible", "aria-hidden": "true", children: "0" }),
13362
13361
  /* @__PURE__ */ jsxs23(
13363
13362
  "span",
13364
13363
  {
13365
- className: `inline-flex items-center gap-1.5 px-2.5 h-8 rounded-md text-xs font-bold whitespace-nowrap ${color.title}`,
13364
+ 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
13365
  title: group.title,
13367
13366
  children: [
13368
13367
  group.title,
@@ -13381,7 +13380,7 @@ var PlacementRelationButtons = ({
13381
13380
  }
13382
13381
  )
13383
13382
  ] }),
13384
- group.options.map((opt) => {
13383
+ /* @__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
13384
  const active = group.activeIds.includes(opt.id);
13386
13385
  return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col items-center gap-0.5", children: [
13387
13386
  /* @__PURE__ */ jsx29("span", { className: `text-[11px] font-bold leading-none ${active ? color.count : "text-slate-500"}`, children: opt.count }),
@@ -13397,9 +13396,9 @@ var PlacementRelationButtons = ({
13397
13396
  }
13398
13397
  )
13399
13398
  ] }, `${group.key}:${opt.id}`);
13400
- })
13399
+ }) })
13401
13400
  ] }, group.key);
13402
- }) }) })
13401
+ }) })
13403
13402
  )
13404
13403
  }
13405
13404
  );
@@ -13444,6 +13443,30 @@ function computePlacementDefaultFilters(args) {
13444
13443
 
13445
13444
  // src/components/PlacementBlock/PlacementBlock.tsx
13446
13445
  import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
13446
+ var STATUS_BADGE_FALLBACK = [
13447
+ "bg-blue-100 text-blue-800 border-blue-300",
13448
+ "bg-violet-100 text-violet-800 border-violet-300",
13449
+ "bg-sky-100 text-sky-800 border-sky-300",
13450
+ "bg-slate-100 text-slate-700 border-slate-300"
13451
+ ];
13452
+ function statusBadgeClass(text2) {
13453
+ if (/שובץ|משובץ|אושר|פעיל/.test(text2)) return "bg-emerald-100 text-emerald-800 border-emerald-300";
13454
+ if (/לא |בוטל|נדחה|סגור/.test(text2)) return "bg-rose-100 text-rose-800 border-rose-300";
13455
+ if (/ממתין|טיוטה|בהמתנה|פתוח/.test(text2)) return "bg-amber-100 text-amber-800 border-amber-300";
13456
+ let h = 0;
13457
+ for (let i = 0; i < text2.length; i++) h = h * 31 + text2.charCodeAt(i) >>> 0;
13458
+ return STATUS_BADGE_FALLBACK[h % STATUS_BADGE_FALLBACK.length];
13459
+ }
13460
+ function formatPreviewDate(raw, fallback) {
13461
+ if (typeof raw === "string") {
13462
+ const m = raw.match(/^(\d{4})-(\d{2})-(\d{2})/);
13463
+ if (m) return `${m[3]}/${m[2]}/${m[1]}`;
13464
+ }
13465
+ if (raw instanceof Date && !isNaN(raw.getTime())) {
13466
+ return `${String(raw.getDate()).padStart(2, "0")}/${String(raw.getMonth() + 1).padStart(2, "0")}/${raw.getFullYear()}`;
13467
+ }
13468
+ return fallback;
13469
+ }
13447
13470
  var FETCH_LIMIT = 1e3;
13448
13471
  function normalizeRows(records) {
13449
13472
  return (records || []).filter(Boolean).map((r) => {
@@ -14254,7 +14277,7 @@ var PlacementBlock = (props) => {
14254
14277
  )
14255
14278
  ] }),
14256
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: [
14257
- /* @__PURE__ */ jsx30("div", { className: "col-span-full font-bold text-slate-900 text-lg", children: targetLabel(activeTarget) }),
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) }),
14258
14281
  previewColumns.map((col) => ({ col, text: displayValue(col, readColumnValue(activeTarget.data, col.name)) })).filter(({ col, text: text2 }) => {
14259
14282
  var _a2;
14260
14283
  return text2 && (col.type === "RELATION" || typeof ((_a2 = activeTarget.data) == null ? void 0 : _a2[col.name]) !== "object");
@@ -14262,21 +14285,25 @@ var PlacementBlock = (props) => {
14262
14285
  var _a2, _b2;
14263
14286
  const label = col.label || col.name;
14264
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" : "";
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,
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,
14268
14293
  ":"
14269
14294
  ] }),
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 })
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 })
14272
14299
  ] }, col.name);
14273
14300
  }),
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: [
14301
+ assignmentField && assignedText && /* @__PURE__ */ jsxs24("div", { className: "flex gap-1.5 items-baseline min-w-0", children: [
14302
+ /* @__PURE__ */ jsxs24("span", { className: "text-slate-500 text-xs shrink-0", children: [
14276
14303
  assignmentLabel,
14277
14304
  ":"
14278
14305
  ] }),
14279
- /* @__PURE__ */ jsx30("span", { className: "break-words min-w-0", title: assignedText, children: assignedText })
14306
+ /* @__PURE__ */ jsx30("span", { className: "break-words min-w-0 font-semibold text-slate-900", title: assignedText, children: assignedText })
14280
14307
  ] })
14281
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." })
14282
14309
  ] }),
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.82",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",