@universe-platform/ui 0.1.0-beta.80 → 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;
@@ -1171,9 +1174,6 @@
1171
1174
  border-color: var(--color-slate-100);
1172
1175
  }
1173
1176
  }
1174
- .self-center {
1175
- align-self: center;
1176
- }
1177
1177
  .self-end {
1178
1178
  align-self: flex-end;
1179
1179
  }
@@ -1461,6 +1461,9 @@
1461
1461
  .border-violet-200 {
1462
1462
  border-color: var(--color-violet-200);
1463
1463
  }
1464
+ .border-violet-300 {
1465
+ border-color: var(--color-violet-300);
1466
+ }
1464
1467
  .border-violet-600 {
1465
1468
  border-color: var(--color-violet-600);
1466
1469
  }
@@ -1494,6 +1497,12 @@
1494
1497
  background-color: color-mix(in oklab, var(--color-amber-50) 30%, transparent);
1495
1498
  }
1496
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
+ }
1497
1506
  .bg-amber-100 {
1498
1507
  background-color: var(--color-amber-100);
1499
1508
  }
@@ -1518,6 +1527,12 @@
1518
1527
  background-color: color-mix(in oklab, var(--color-blue-50) 40%, transparent);
1519
1528
  }
1520
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
+ }
1521
1536
  .bg-blue-50\/80 {
1522
1537
  background-color: color-mix(in srgb, oklch(97% 0.014 254.604) 80%, transparent);
1523
1538
  @supports (color: color-mix(in lab, red, red)) {
@@ -1569,6 +1584,12 @@
1569
1584
  background-color: color-mix(in oklab, var(--color-emerald-50) 60%, transparent);
1570
1585
  }
1571
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
+ }
1572
1593
  .bg-emerald-100 {
1573
1594
  background-color: var(--color-emerald-100);
1574
1595
  }
@@ -1647,6 +1668,12 @@
1647
1668
  background-color: color-mix(in oklab, var(--color-rose-50) 50%, transparent);
1648
1669
  }
1649
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
+ }
1650
1677
  .bg-rose-100 {
1651
1678
  background-color: var(--color-rose-100);
1652
1679
  }
@@ -1749,12 +1776,24 @@
1749
1776
  .bg-teal-500 {
1750
1777
  background-color: var(--color-teal-500);
1751
1778
  }
1779
+ .bg-teal-700 {
1780
+ background-color: var(--color-teal-700);
1781
+ }
1752
1782
  .bg-transparent {
1753
1783
  background-color: transparent;
1754
1784
  }
1755
1785
  .bg-violet-50 {
1756
1786
  background-color: var(--color-violet-50);
1757
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
+ }
1758
1797
  .bg-violet-600 {
1759
1798
  background-color: var(--color-violet-600);
1760
1799
  }
@@ -2209,6 +2248,9 @@
2209
2248
  .text-sky-700 {
2210
2249
  color: var(--color-sky-700);
2211
2250
  }
2251
+ .text-sky-800 {
2252
+ color: var(--color-sky-800);
2253
+ }
2212
2254
  .text-sky-900 {
2213
2255
  color: var(--color-sky-900);
2214
2256
  }
@@ -2233,6 +2275,9 @@
2233
2275
  .text-slate-900 {
2234
2276
  color: var(--color-slate-900);
2235
2277
  }
2278
+ .text-teal-600 {
2279
+ color: var(--color-teal-600);
2280
+ }
2236
2281
  .text-teal-700 {
2237
2282
  color: var(--color-teal-700);
2238
2283
  }
@@ -2248,6 +2293,9 @@
2248
2293
  .text-violet-700 {
2249
2294
  color: var(--color-violet-700);
2250
2295
  }
2296
+ .text-violet-800 {
2297
+ color: var(--color-violet-800);
2298
+ }
2251
2299
  .text-white {
2252
2300
  color: var(--color-white);
2253
2301
  }
@@ -3402,9 +3450,9 @@
3402
3450
  grid-template-columns: repeat(1, minmax(0, 1fr));
3403
3451
  }
3404
3452
  }
3405
- .lg\:grid-cols-6 {
3453
+ .lg\:grid-cols-7 {
3406
3454
  @media (width >= 64rem) {
3407
- grid-template-columns: repeat(6, minmax(0, 1fr));
3455
+ grid-template-columns: repeat(7, minmax(0, 1fr));
3408
3456
  }
3409
3457
  }
3410
3458
  .lg\:grid-cols-12 {
@@ -3427,21 +3475,6 @@
3427
3475
  white-space: normal !important;
3428
3476
  }
3429
3477
  }
3430
- .\[\&_span\]\:text-start {
3431
- & span {
3432
- text-align: start;
3433
- }
3434
- }
3435
- .\[\&\>div\]\:justify-start {
3436
- &>div {
3437
- justify-content: flex-start;
3438
- }
3439
- }
3440
- .\[\&\>div\]\:p-0 {
3441
- &>div {
3442
- padding: 0;
3443
- }
3444
- }
3445
3478
  }
3446
3479
  [data-theme="clean"], :root:has([data-theme="clean"]) {
3447
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) => {
@@ -14440,15 +14463,19 @@ var PlacementBlock = (props) => {
14440
14463
  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
14464
  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
14465
  const labelClass = "block text-[11px] font-semibold text-slate-500 mb-1";
14443
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: `w-full flex flex-col gap-4 p-4 bg-slate-50 min-h-[850px] rounded-xl border border-slate-200 ${className}`, dir: "rtl", children: [
14466
+ 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
14467
  (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
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-4", children: [
14468
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-3", children: [
14446
14469
  /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "w-full bg-teal-50/40 p-3 rounded-xl border border-teal-100 shadow-xs flex flex-col", children: [
14447
14470
  /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 border-b border-teal-200 pb-1.5 mb-2", children: [
14448
14471
  /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("h4", { className: "font-bold text-teal-900 text-base flex items-center gap-2 shrink-0", children: [
14449
14472
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "\u{1F4CC}" }),
14450
14473
  " \u05E4\u05E8\u05D8\u05D9 \u05D4\u05D9\u05E2\u05D3 \u05DC\u05E9\u05D9\u05D1\u05D5\u05E5"
14451
14474
  ] }),
14475
+ activeTarget && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "text-teal-800 font-bold text-xs shrink-0 whitespace-nowrap", children: [
14476
+ "\u05DE\u05E9\u05D5\u05D1\u05E6\u05D9\u05DD \u05DB\u05E8\u05D2\u05E2: ",
14477
+ assignedIds.length
14478
+ ] }),
14452
14479
  editUrl && (config == null ? void 0 : config.title) && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "font-semibold text-slate-600 text-xs sm:text-sm min-w-0 break-words", children: config.title }),
14453
14480
  editUrl && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
14454
14481
  "a",
@@ -14465,8 +14492,8 @@ var PlacementBlock = (props) => {
14465
14492
  }
14466
14493
  )
14467
14494
  ] }),
14468
- activeTarget ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-x-4 gap-y-1.5 content-start text-sm text-slate-700 flex-1", children: [
14469
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "col-span-full font-bold text-slate-900 text-lg", children: targetLabel(activeTarget) }),
14495
+ activeTarget ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-7 gap-x-4 gap-y-1.5 content-start text-sm text-slate-700 flex-1", children: [
14496
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "col-span-full bg-teal-700 text-white font-bold text-lg rounded-lg px-3 py-1", children: targetLabel(activeTarget) }),
14470
14497
  previewColumns.map((col) => ({ col, text: displayValue(col, readColumnValue(activeTarget.data, col.name)) })).filter(({ col, text: text2 }) => {
14471
14498
  var _a2;
14472
14499
  return text2 && (col.type === "RELATION" || typeof ((_a2 = activeTarget.data) == null ? void 0 : _a2[col.name]) !== "object");
@@ -14474,25 +14501,25 @@ var PlacementBlock = (props) => {
14474
14501
  var _a2, _b2;
14475
14502
  const label = col.label || col.name;
14476
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" : "";
14477
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: `flex gap-1.5 items-start min-w-0 ${span}`, children: [
14478
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "font-semibold shrink-0", children: [
14479
- 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,
14480
14509
  ":"
14481
14510
  ] }),
14482
- ((_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: () => {
14483
- }, 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 })
14484
14515
  ] }, col.name);
14485
14516
  }),
14486
- assignmentField && assignedText && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex gap-1.5 items-start min-w-0", children: [
14487
- /* @__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: [
14488
14519
  assignmentLabel,
14489
14520
  ":"
14490
14521
  ] }),
14491
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "break-words min-w-0", title: assignedText, children: assignedText })
14492
- ] }),
14493
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "min-w-0 text-teal-800 font-bold text-xs self-center whitespace-nowrap overflow-hidden text-ellipsis", children: [
14494
- "\u05DE\u05E9\u05D5\u05D1\u05E6\u05D9\u05DD \u05DB\u05E8\u05D2\u05E2: ",
14495
- assignedIds.length
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) => {
@@ -14224,15 +14247,19 @@ var PlacementBlock = (props) => {
14224
14247
  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
14248
  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
14249
  const labelClass = "block text-[11px] font-semibold text-slate-500 mb-1";
14227
- return /* @__PURE__ */ jsxs24("div", { className: `w-full flex flex-col gap-4 p-4 bg-slate-50 min-h-[850px] rounded-xl border border-slate-200 ${className}`, dir: "rtl", children: [
14250
+ 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
14251
  (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
- /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-4", children: [
14252
+ /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-3", children: [
14230
14253
  /* @__PURE__ */ jsxs24("div", { className: "w-full bg-teal-50/40 p-3 rounded-xl border border-teal-100 shadow-xs flex flex-col", children: [
14231
14254
  /* @__PURE__ */ jsxs24("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 border-b border-teal-200 pb-1.5 mb-2", children: [
14232
14255
  /* @__PURE__ */ jsxs24("h4", { className: "font-bold text-teal-900 text-base flex items-center gap-2 shrink-0", children: [
14233
14256
  /* @__PURE__ */ jsx30("span", { children: "\u{1F4CC}" }),
14234
14257
  " \u05E4\u05E8\u05D8\u05D9 \u05D4\u05D9\u05E2\u05D3 \u05DC\u05E9\u05D9\u05D1\u05D5\u05E5"
14235
14258
  ] }),
14259
+ activeTarget && /* @__PURE__ */ jsxs24("span", { className: "text-teal-800 font-bold text-xs shrink-0 whitespace-nowrap", children: [
14260
+ "\u05DE\u05E9\u05D5\u05D1\u05E6\u05D9\u05DD \u05DB\u05E8\u05D2\u05E2: ",
14261
+ assignedIds.length
14262
+ ] }),
14236
14263
  editUrl && (config == null ? void 0 : config.title) && /* @__PURE__ */ jsx30("span", { className: "font-semibold text-slate-600 text-xs sm:text-sm min-w-0 break-words", children: config.title }),
14237
14264
  editUrl && /* @__PURE__ */ jsxs24(
14238
14265
  "a",
@@ -14249,8 +14276,8 @@ var PlacementBlock = (props) => {
14249
14276
  }
14250
14277
  )
14251
14278
  ] }),
14252
- activeTarget ? /* @__PURE__ */ jsxs24("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-x-4 gap-y-1.5 content-start text-sm text-slate-700 flex-1", children: [
14253
- /* @__PURE__ */ jsx30("div", { className: "col-span-full font-bold text-slate-900 text-lg", children: targetLabel(activeTarget) }),
14279
+ activeTarget ? /* @__PURE__ */ jsxs24("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-7 gap-x-4 gap-y-1.5 content-start text-sm text-slate-700 flex-1", children: [
14280
+ /* @__PURE__ */ jsx30("div", { className: "col-span-full bg-teal-700 text-white font-bold text-lg rounded-lg px-3 py-1", children: targetLabel(activeTarget) }),
14254
14281
  previewColumns.map((col) => ({ col, text: displayValue(col, readColumnValue(activeTarget.data, col.name)) })).filter(({ col, text: text2 }) => {
14255
14282
  var _a2;
14256
14283
  return text2 && (col.type === "RELATION" || typeof ((_a2 = activeTarget.data) == null ? void 0 : _a2[col.name]) !== "object");
@@ -14258,25 +14285,25 @@ var PlacementBlock = (props) => {
14258
14285
  var _a2, _b2;
14259
14286
  const label = col.label || col.name;
14260
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" : "";
14261
- return /* @__PURE__ */ jsxs24("div", { className: `flex gap-1.5 items-start min-w-0 ${span}`, children: [
14262
- /* @__PURE__ */ jsxs24("span", { className: "font-semibold shrink-0", children: [
14263
- 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,
14264
14293
  ":"
14265
14294
  ] }),
14266
- ((_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: () => {
14267
- }, 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 })
14268
14299
  ] }, col.name);
14269
14300
  }),
14270
- assignmentField && assignedText && /* @__PURE__ */ jsxs24("div", { className: "flex gap-1.5 items-start min-w-0", children: [
14271
- /* @__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: [
14272
14303
  assignmentLabel,
14273
14304
  ":"
14274
14305
  ] }),
14275
- /* @__PURE__ */ jsx30("span", { className: "break-words min-w-0", title: assignedText, children: assignedText })
14276
- ] }),
14277
- /* @__PURE__ */ jsxs24("div", { className: "min-w-0 text-teal-800 font-bold text-xs self-center whitespace-nowrap overflow-hidden text-ellipsis", children: [
14278
- "\u05DE\u05E9\u05D5\u05D1\u05E6\u05D9\u05DD \u05DB\u05E8\u05D2\u05E2: ",
14279
- assignedIds.length
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.80",
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",