@universe-platform/ui 0.1.0-beta.16 → 0.1.0-beta.18
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 +100 -21
- package/dist/index.d.mts +61 -3
- package/dist/index.d.ts +61 -3
- package/dist/index.js +2916 -1682
- package/dist/index.mjs +2892 -1656
- package/package.json +1 -1
package/dist/globals.css
CHANGED
|
@@ -72,7 +72,9 @@
|
|
|
72
72
|
--color-indigo-600: oklch(51.1% 0.262 276.966);
|
|
73
73
|
--color-indigo-700: oklch(45.7% 0.24 277.023);
|
|
74
74
|
--color-violet-50: oklch(96.9% 0.016 293.756);
|
|
75
|
+
--color-violet-100: oklch(94.3% 0.029 294.588);
|
|
75
76
|
--color-violet-200: oklch(89.4% 0.057 293.283);
|
|
77
|
+
--color-violet-600: oklch(54.1% 0.281 293.009);
|
|
76
78
|
--color-violet-700: oklch(49.1% 0.27 292.581);
|
|
77
79
|
--color-purple-50: oklch(97.7% 0.014 308.299);
|
|
78
80
|
--color-purple-200: oklch(90.2% 0.063 306.703);
|
|
@@ -107,6 +109,7 @@
|
|
|
107
109
|
--color-white: #fff;
|
|
108
110
|
--spacing: 0.25rem;
|
|
109
111
|
--container-xs: 20rem;
|
|
112
|
+
--container-sm: 24rem;
|
|
110
113
|
--container-md: 28rem;
|
|
111
114
|
--container-lg: 32rem;
|
|
112
115
|
--container-xl: 36rem;
|
|
@@ -296,6 +299,9 @@
|
|
|
296
299
|
.pointer-events-none {
|
|
297
300
|
pointer-events: none;
|
|
298
301
|
}
|
|
302
|
+
.invisible {
|
|
303
|
+
visibility: hidden;
|
|
304
|
+
}
|
|
299
305
|
.visible {
|
|
300
306
|
visibility: visible;
|
|
301
307
|
}
|
|
@@ -575,15 +581,18 @@
|
|
|
575
581
|
.max-h-\[calc\(100vh-240px\)\] {
|
|
576
582
|
max-height: calc(100vh - 240px);
|
|
577
583
|
}
|
|
578
|
-
.max-h-full {
|
|
579
|
-
max-height: 100%;
|
|
580
|
-
}
|
|
581
584
|
.min-h-0 {
|
|
582
585
|
min-height: 0;
|
|
583
586
|
}
|
|
584
587
|
.min-h-\[26rem\] {
|
|
585
588
|
min-height: 26rem;
|
|
586
589
|
}
|
|
590
|
+
.min-h-\[28px\] {
|
|
591
|
+
min-height: 28px;
|
|
592
|
+
}
|
|
593
|
+
.min-h-\[32px\] {
|
|
594
|
+
min-height: 32px;
|
|
595
|
+
}
|
|
587
596
|
.min-h-\[48px\] {
|
|
588
597
|
min-height: 48px;
|
|
589
598
|
}
|
|
@@ -593,6 +602,9 @@
|
|
|
593
602
|
.min-h-\[320px\] {
|
|
594
603
|
min-height: 320px;
|
|
595
604
|
}
|
|
605
|
+
.min-h-\[inherit\] {
|
|
606
|
+
min-height: inherit;
|
|
607
|
+
}
|
|
596
608
|
.w-1\.5 {
|
|
597
609
|
width: calc(var(--spacing) * 1.5);
|
|
598
610
|
}
|
|
@@ -671,8 +683,8 @@
|
|
|
671
683
|
.max-w-\[150px\] {
|
|
672
684
|
max-width: 150px;
|
|
673
685
|
}
|
|
674
|
-
.max-w-\[
|
|
675
|
-
max-width:
|
|
686
|
+
.max-w-\[180px\] {
|
|
687
|
+
max-width: 180px;
|
|
676
688
|
}
|
|
677
689
|
.max-w-\[calc\(100\%-28px\)\] {
|
|
678
690
|
max-width: calc(100% - 28px);
|
|
@@ -686,6 +698,9 @@
|
|
|
686
698
|
.max-w-md {
|
|
687
699
|
max-width: var(--container-md);
|
|
688
700
|
}
|
|
701
|
+
.max-w-sm {
|
|
702
|
+
max-width: var(--container-sm);
|
|
703
|
+
}
|
|
689
704
|
.max-w-xs {
|
|
690
705
|
max-width: var(--container-xs);
|
|
691
706
|
}
|
|
@@ -792,8 +807,8 @@
|
|
|
792
807
|
.flex-col {
|
|
793
808
|
flex-direction: column;
|
|
794
809
|
}
|
|
795
|
-
.flex-
|
|
796
|
-
flex-
|
|
810
|
+
.flex-row {
|
|
811
|
+
flex-direction: row;
|
|
797
812
|
}
|
|
798
813
|
.flex-wrap {
|
|
799
814
|
flex-wrap: wrap;
|
|
@@ -885,6 +900,13 @@
|
|
|
885
900
|
margin-block-end: calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)));
|
|
886
901
|
}
|
|
887
902
|
}
|
|
903
|
+
.space-y-3\.5 {
|
|
904
|
+
:where(& > :not(:last-child)) {
|
|
905
|
+
--tw-space-y-reverse: 0;
|
|
906
|
+
margin-block-start: calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));
|
|
907
|
+
margin-block-end: calc(calc(var(--spacing) * 3.5) * calc(1 - var(--tw-space-y-reverse)));
|
|
908
|
+
}
|
|
909
|
+
}
|
|
888
910
|
.space-y-4 {
|
|
889
911
|
:where(& > :not(:last-child)) {
|
|
890
912
|
--tw-space-y-reverse: 0;
|
|
@@ -1128,6 +1150,12 @@
|
|
|
1128
1150
|
.border-slate-300 {
|
|
1129
1151
|
border-color: var(--color-slate-300);
|
|
1130
1152
|
}
|
|
1153
|
+
.border-slate-700\/60 {
|
|
1154
|
+
border-color: color-mix(in srgb, oklch(37.2% 0.044 257.287) 60%, transparent);
|
|
1155
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1156
|
+
border-color: color-mix(in oklab, var(--color-slate-700) 60%, transparent);
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1131
1159
|
.border-teal-200 {
|
|
1132
1160
|
border-color: var(--color-teal-200);
|
|
1133
1161
|
}
|
|
@@ -1347,6 +1375,12 @@
|
|
|
1347
1375
|
background-color: color-mix(in oklab, var(--color-slate-900) 60%, transparent);
|
|
1348
1376
|
}
|
|
1349
1377
|
}
|
|
1378
|
+
.bg-slate-900\/95 {
|
|
1379
|
+
background-color: color-mix(in srgb, oklch(20.8% 0.042 265.755) 95%, transparent);
|
|
1380
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1381
|
+
background-color: color-mix(in oklab, var(--color-slate-900) 95%, transparent);
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1350
1384
|
.bg-teal-50 {
|
|
1351
1385
|
background-color: var(--color-teal-50);
|
|
1352
1386
|
}
|
|
@@ -1359,6 +1393,12 @@
|
|
|
1359
1393
|
.bg-white {
|
|
1360
1394
|
background-color: var(--color-white);
|
|
1361
1395
|
}
|
|
1396
|
+
.bg-white\/60 {
|
|
1397
|
+
background-color: color-mix(in srgb, #fff 60%, transparent);
|
|
1398
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1399
|
+
background-color: color-mix(in oklab, var(--color-white) 60%, transparent);
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1362
1402
|
.bg-white\/80 {
|
|
1363
1403
|
background-color: color-mix(in srgb, #fff 80%, transparent);
|
|
1364
1404
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -1524,6 +1564,12 @@
|
|
|
1524
1564
|
.pb-2\.5 {
|
|
1525
1565
|
padding-bottom: calc(var(--spacing) * 2.5);
|
|
1526
1566
|
}
|
|
1567
|
+
.pl-1 {
|
|
1568
|
+
padding-left: var(--spacing);
|
|
1569
|
+
}
|
|
1570
|
+
.pl-2 {
|
|
1571
|
+
padding-left: calc(var(--spacing) * 2);
|
|
1572
|
+
}
|
|
1527
1573
|
.pl-3 {
|
|
1528
1574
|
padding-left: calc(var(--spacing) * 3);
|
|
1529
1575
|
}
|
|
@@ -1616,6 +1662,9 @@
|
|
|
1616
1662
|
.break-words {
|
|
1617
1663
|
overflow-wrap: break-word;
|
|
1618
1664
|
}
|
|
1665
|
+
.text-ellipsis {
|
|
1666
|
+
text-overflow: ellipsis;
|
|
1667
|
+
}
|
|
1619
1668
|
.whitespace-nowrap {
|
|
1620
1669
|
white-space: nowrap;
|
|
1621
1670
|
}
|
|
@@ -1754,6 +1803,9 @@
|
|
|
1754
1803
|
.text-teal-700 {
|
|
1755
1804
|
color: var(--color-teal-700);
|
|
1756
1805
|
}
|
|
1806
|
+
.text-violet-600 {
|
|
1807
|
+
color: var(--color-violet-600);
|
|
1808
|
+
}
|
|
1757
1809
|
.text-violet-700 {
|
|
1758
1810
|
color: var(--color-violet-700);
|
|
1759
1811
|
}
|
|
@@ -1769,6 +1821,9 @@
|
|
|
1769
1821
|
.text-yellow-700 {
|
|
1770
1822
|
color: var(--color-yellow-700);
|
|
1771
1823
|
}
|
|
1824
|
+
.uppercase {
|
|
1825
|
+
text-transform: uppercase;
|
|
1826
|
+
}
|
|
1772
1827
|
.italic {
|
|
1773
1828
|
font-style: italic;
|
|
1774
1829
|
}
|
|
@@ -1953,6 +2008,27 @@
|
|
|
1953
2008
|
-webkit-user-select: text;
|
|
1954
2009
|
user-select: text;
|
|
1955
2010
|
}
|
|
2011
|
+
.group-hover\:bg-amber-100 {
|
|
2012
|
+
&:is(:where(.group):hover *) {
|
|
2013
|
+
@media (hover: hover) {
|
|
2014
|
+
background-color: var(--color-amber-100);
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
.group-hover\:bg-emerald-100 {
|
|
2019
|
+
&:is(:where(.group):hover *) {
|
|
2020
|
+
@media (hover: hover) {
|
|
2021
|
+
background-color: var(--color-emerald-100);
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
.group-hover\:bg-sky-100 {
|
|
2026
|
+
&:is(:where(.group):hover *) {
|
|
2027
|
+
@media (hover: hover) {
|
|
2028
|
+
background-color: var(--color-sky-100);
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
1956
2032
|
.group-hover\:bg-transparent {
|
|
1957
2033
|
&:is(:where(.group):hover *) {
|
|
1958
2034
|
@media (hover: hover) {
|
|
@@ -1960,6 +2036,13 @@
|
|
|
1960
2036
|
}
|
|
1961
2037
|
}
|
|
1962
2038
|
}
|
|
2039
|
+
.group-hover\:bg-violet-100 {
|
|
2040
|
+
&:is(:where(.group):hover *) {
|
|
2041
|
+
@media (hover: hover) {
|
|
2042
|
+
background-color: var(--color-violet-100);
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
1963
2046
|
.group-hover\:opacity-100 {
|
|
1964
2047
|
&:is(:where(.group):hover *) {
|
|
1965
2048
|
@media (hover: hover) {
|
|
@@ -2138,6 +2221,16 @@
|
|
|
2138
2221
|
}
|
|
2139
2222
|
}
|
|
2140
2223
|
}
|
|
2224
|
+
.hover\:bg-emerald-50\/80 {
|
|
2225
|
+
&:hover {
|
|
2226
|
+
@media (hover: hover) {
|
|
2227
|
+
background-color: color-mix(in srgb, oklch(97.9% 0.021 166.113) 80%, transparent);
|
|
2228
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2229
|
+
background-color: color-mix(in oklab, var(--color-emerald-50) 80%, transparent);
|
|
2230
|
+
}
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2141
2234
|
.hover\:bg-emerald-100 {
|
|
2142
2235
|
&:hover {
|
|
2143
2236
|
@media (hover: hover) {
|
|
@@ -2286,13 +2379,6 @@
|
|
|
2286
2379
|
}
|
|
2287
2380
|
}
|
|
2288
2381
|
}
|
|
2289
|
-
.hover\:text-emerald-600 {
|
|
2290
|
-
&:hover {
|
|
2291
|
-
@media (hover: hover) {
|
|
2292
|
-
color: var(--color-emerald-600);
|
|
2293
|
-
}
|
|
2294
|
-
}
|
|
2295
|
-
}
|
|
2296
2382
|
.hover\:text-emerald-700 {
|
|
2297
2383
|
&:hover {
|
|
2298
2384
|
@media (hover: hover) {
|
|
@@ -2356,13 +2442,6 @@
|
|
|
2356
2442
|
}
|
|
2357
2443
|
}
|
|
2358
2444
|
}
|
|
2359
|
-
.hover\:opacity-60 {
|
|
2360
|
-
&:hover {
|
|
2361
|
-
@media (hover: hover) {
|
|
2362
|
-
opacity: 60%;
|
|
2363
|
-
}
|
|
2364
|
-
}
|
|
2365
|
-
}
|
|
2366
2445
|
.hover\:opacity-80 {
|
|
2367
2446
|
&:hover {
|
|
2368
2447
|
@media (hover: hover) {
|
package/dist/index.d.mts
CHANGED
|
@@ -112,7 +112,7 @@ interface RolePermissions {
|
|
|
112
112
|
permissions: ComponentPermissions;
|
|
113
113
|
readOnly: boolean;
|
|
114
114
|
}
|
|
115
|
-
declare function getRolePermissions(role?: OrgRole |
|
|
115
|
+
declare function getRolePermissions(role?: OrgRole | null): RolePermissions;
|
|
116
116
|
|
|
117
117
|
interface TableConfig extends SchemaDef {
|
|
118
118
|
}
|
|
@@ -120,7 +120,7 @@ type TableData = RecordData[];
|
|
|
120
120
|
type RowStatusType = "success" | "failed" | "skipped" | "partial";
|
|
121
121
|
interface TableBlockProps extends Partial<BaseComponentProps<TableData, TableConfig>> {
|
|
122
122
|
exportAction?: (payload: any) => Promise<any>;
|
|
123
|
-
role?: OrgRole |
|
|
123
|
+
role?: OrgRole | null;
|
|
124
124
|
permissions?: ComponentPermissions;
|
|
125
125
|
readOnly?: boolean;
|
|
126
126
|
onSelectionChange?: (selectedIds: string[]) => void;
|
|
@@ -128,6 +128,7 @@ interface TableBlockProps extends Partial<BaseComponentProps<TableData, TableCon
|
|
|
128
128
|
status: RowStatusType;
|
|
129
129
|
tooltip?: string;
|
|
130
130
|
} | RowStatusType>;
|
|
131
|
+
editModelUrl?: string;
|
|
131
132
|
}
|
|
132
133
|
interface CreateRecordPayload {
|
|
133
134
|
records: RecordData[];
|
|
@@ -304,6 +305,63 @@ interface RelationFilterPopoverProps {
|
|
|
304
305
|
}
|
|
305
306
|
declare function RelationFilterPopover({ isOpen, onClose, column, triggerRect, options, filterValue, selectedValues, onSelectionChange, isLoading, }: RelationFilterPopoverProps): react_jsx_runtime.JSX.Element | null;
|
|
306
307
|
|
|
308
|
+
/**
|
|
309
|
+
* checkElementTruncation - Standard browser-accurate truncation detection using the Range API.
|
|
310
|
+
* Measures the exact unconstrained bounding box of rendered text without container padding interference.
|
|
311
|
+
*/
|
|
312
|
+
declare const checkElementTruncation: (el: HTMLElement | null) => boolean;
|
|
313
|
+
/**
|
|
314
|
+
* useSmartTooltip - Reusable hook for detecting text truncation and rendering
|
|
315
|
+
* a custom portal tooltip bubble strictly when content is clipped (scrollWidth > el.clientWidth).
|
|
316
|
+
*/
|
|
317
|
+
declare function useSmartTooltip<T extends HTMLElement = HTMLElement>(): {
|
|
318
|
+
targetRef: react__default.RefObject<T | null>;
|
|
319
|
+
checkTruncation: () => boolean;
|
|
320
|
+
handleMouseEnter: () => void;
|
|
321
|
+
handleMouseLeave: () => void;
|
|
322
|
+
hideBubble: () => void;
|
|
323
|
+
renderTooltip: (text?: string, dir?: "ltr" | "rtl" | "auto") => react__default.ReactPortal | null;
|
|
324
|
+
isTruncated: boolean;
|
|
325
|
+
showBubble: boolean;
|
|
326
|
+
};
|
|
327
|
+
interface TruncatedTooltipProps {
|
|
328
|
+
text: string;
|
|
329
|
+
tooltipText?: string;
|
|
330
|
+
dir?: 'ltr' | 'rtl' | 'auto';
|
|
331
|
+
className?: string;
|
|
332
|
+
wrapperClassName?: string;
|
|
333
|
+
children?: react__default.ReactNode;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* TruncatedTooltip - A text container that applies ellipsis truncation
|
|
337
|
+
* and only displays a custom portal tooltip when text overflows horizontal bounds.
|
|
338
|
+
* Expands to full cell dimensions (w-full h-full min-h-[inherit]) for reliable hover detection.
|
|
339
|
+
* No native browser title attribute is rendered.
|
|
340
|
+
*/
|
|
341
|
+
declare const TruncatedTooltip: react__default.FC<TruncatedTooltipProps>;
|
|
342
|
+
interface SmartTextCellProps {
|
|
343
|
+
value: any;
|
|
344
|
+
onChange?: (val: any) => void;
|
|
345
|
+
readOnly?: boolean;
|
|
346
|
+
type?: 'text' | 'number' | 'tel';
|
|
347
|
+
placeholder?: string;
|
|
348
|
+
className?: string;
|
|
349
|
+
prefix?: react__default.ReactNode;
|
|
350
|
+
suffix?: react__default.ReactNode;
|
|
351
|
+
dir?: 'ltr' | 'rtl' | 'auto';
|
|
352
|
+
tooltipText?: string;
|
|
353
|
+
step?: string;
|
|
354
|
+
onFocus?: (e: react__default.FocusEvent<HTMLInputElement>) => void;
|
|
355
|
+
onBlur?: (e: react__default.FocusEvent<HTMLInputElement>) => void;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* SmartTextCell - Text cell with intelligent hover tooltip.
|
|
359
|
+
* Only displays the custom portal tooltip bubble if the text is actually
|
|
360
|
+
* clipped/truncated within its visible boundary (scrollWidth > clientWidth).
|
|
361
|
+
* Native title attributes are omitted to prevent duplicate tooltips.
|
|
362
|
+
*/
|
|
363
|
+
declare const SmartTextCell: react__default.FC<SmartTextCellProps>;
|
|
364
|
+
|
|
307
365
|
interface MetaTemplateComponent {
|
|
308
366
|
type: "HEADER" | "BODY" | "FOOTER" | "BUTTONS" | string;
|
|
309
367
|
format?: "TEXT" | "IMAGE" | "DOCUMENT" | "VIDEO" | string;
|
|
@@ -387,4 +445,4 @@ declare function ToastProvider({ children }: {
|
|
|
387
445
|
|
|
388
446
|
declare function useToast(): ToastContextType;
|
|
389
447
|
|
|
390
|
-
export { type BaseComponentProps, ColumnHeaderTitle, type ColumnHeaderTitleProps, type ComponentCommunication, type ComponentConfig, type ComponentData, type ComponentPermissions, type ComponentRegistry, type ComponentState, type CreateRecordPayload, CreateTemplateModal, type CreateTemplateModalProps, DatePickerCell, type DeleteRecordPayload, LinkPickerCell, type MetaTemplateComponent, type MetaWhatsAppTemplate, type OrgRole, PASTEL_PALETTES, type PastelPalette, type RelationFilterOption, type RelationFilterPayload, RelationFilterPopover, type RelationFilterPopoverProps, RelationPickerCell, type RolePermissions, type RowStatusType, type SplitTitleResult, TableBlock, type TableBlockProps, type TableConfig, type TableData, TimePickerCell, ToastContext, type ToastContextType, type ToastItem, ToastProvider, UNIVERSE_COMPONENTS, type UniverseComponentType, type UpdateRecordPayload, type UseColumnReorderOptions, type UseColumnResizeOptions, WhatsAppComponent, type WhatsAppComponentProps, type WhatsAppData, calculateMinColumnWidth, cn, formatConflictCellValue, formatPhoneDisplay, formatTimeInput, formatTimeIso, generateWhatsAppLink, getDeterministicPastelBadge, getRolePermissions, isValidPhoneNumber, measureTextWidth, normalizePhoneForWhatsApp, normalizeRelationValue, openWhatsAppChat, parseLinkValue, parseTimeParts, resolveProtocol, sanitizePhoneNumber, splitHeaderTitle, useColumnReorder, useColumnResize, useToast };
|
|
448
|
+
export { type BaseComponentProps, ColumnHeaderTitle, type ColumnHeaderTitleProps, type ComponentCommunication, type ComponentConfig, type ComponentData, type ComponentPermissions, type ComponentRegistry, type ComponentState, type CreateRecordPayload, CreateTemplateModal, type CreateTemplateModalProps, DatePickerCell, type DeleteRecordPayload, LinkPickerCell, type MetaTemplateComponent, type MetaWhatsAppTemplate, type OrgRole, PASTEL_PALETTES, type PastelPalette, type RelationFilterOption, type RelationFilterPayload, RelationFilterPopover, type RelationFilterPopoverProps, RelationPickerCell, type RolePermissions, type RowStatusType, SmartTextCell, type SplitTitleResult, TableBlock, type TableBlockProps, type TableConfig, type TableData, TimePickerCell, ToastContext, type ToastContextType, type ToastItem, ToastProvider, TruncatedTooltip, UNIVERSE_COMPONENTS, type UniverseComponentType, type UpdateRecordPayload, type UseColumnReorderOptions, type UseColumnResizeOptions, WhatsAppComponent, type WhatsAppComponentProps, type WhatsAppData, calculateMinColumnWidth, checkElementTruncation, cn, formatConflictCellValue, formatPhoneDisplay, formatTimeInput, formatTimeIso, generateWhatsAppLink, getDeterministicPastelBadge, getRolePermissions, isValidPhoneNumber, measureTextWidth, normalizePhoneForWhatsApp, normalizeRelationValue, openWhatsAppChat, parseLinkValue, parseTimeParts, resolveProtocol, sanitizePhoneNumber, splitHeaderTitle, useColumnReorder, useColumnResize, useSmartTooltip, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -112,7 +112,7 @@ interface RolePermissions {
|
|
|
112
112
|
permissions: ComponentPermissions;
|
|
113
113
|
readOnly: boolean;
|
|
114
114
|
}
|
|
115
|
-
declare function getRolePermissions(role?: OrgRole |
|
|
115
|
+
declare function getRolePermissions(role?: OrgRole | null): RolePermissions;
|
|
116
116
|
|
|
117
117
|
interface TableConfig extends SchemaDef {
|
|
118
118
|
}
|
|
@@ -120,7 +120,7 @@ type TableData = RecordData[];
|
|
|
120
120
|
type RowStatusType = "success" | "failed" | "skipped" | "partial";
|
|
121
121
|
interface TableBlockProps extends Partial<BaseComponentProps<TableData, TableConfig>> {
|
|
122
122
|
exportAction?: (payload: any) => Promise<any>;
|
|
123
|
-
role?: OrgRole |
|
|
123
|
+
role?: OrgRole | null;
|
|
124
124
|
permissions?: ComponentPermissions;
|
|
125
125
|
readOnly?: boolean;
|
|
126
126
|
onSelectionChange?: (selectedIds: string[]) => void;
|
|
@@ -128,6 +128,7 @@ interface TableBlockProps extends Partial<BaseComponentProps<TableData, TableCon
|
|
|
128
128
|
status: RowStatusType;
|
|
129
129
|
tooltip?: string;
|
|
130
130
|
} | RowStatusType>;
|
|
131
|
+
editModelUrl?: string;
|
|
131
132
|
}
|
|
132
133
|
interface CreateRecordPayload {
|
|
133
134
|
records: RecordData[];
|
|
@@ -304,6 +305,63 @@ interface RelationFilterPopoverProps {
|
|
|
304
305
|
}
|
|
305
306
|
declare function RelationFilterPopover({ isOpen, onClose, column, triggerRect, options, filterValue, selectedValues, onSelectionChange, isLoading, }: RelationFilterPopoverProps): react_jsx_runtime.JSX.Element | null;
|
|
306
307
|
|
|
308
|
+
/**
|
|
309
|
+
* checkElementTruncation - Standard browser-accurate truncation detection using the Range API.
|
|
310
|
+
* Measures the exact unconstrained bounding box of rendered text without container padding interference.
|
|
311
|
+
*/
|
|
312
|
+
declare const checkElementTruncation: (el: HTMLElement | null) => boolean;
|
|
313
|
+
/**
|
|
314
|
+
* useSmartTooltip - Reusable hook for detecting text truncation and rendering
|
|
315
|
+
* a custom portal tooltip bubble strictly when content is clipped (scrollWidth > el.clientWidth).
|
|
316
|
+
*/
|
|
317
|
+
declare function useSmartTooltip<T extends HTMLElement = HTMLElement>(): {
|
|
318
|
+
targetRef: react__default.RefObject<T | null>;
|
|
319
|
+
checkTruncation: () => boolean;
|
|
320
|
+
handleMouseEnter: () => void;
|
|
321
|
+
handleMouseLeave: () => void;
|
|
322
|
+
hideBubble: () => void;
|
|
323
|
+
renderTooltip: (text?: string, dir?: "ltr" | "rtl" | "auto") => react__default.ReactPortal | null;
|
|
324
|
+
isTruncated: boolean;
|
|
325
|
+
showBubble: boolean;
|
|
326
|
+
};
|
|
327
|
+
interface TruncatedTooltipProps {
|
|
328
|
+
text: string;
|
|
329
|
+
tooltipText?: string;
|
|
330
|
+
dir?: 'ltr' | 'rtl' | 'auto';
|
|
331
|
+
className?: string;
|
|
332
|
+
wrapperClassName?: string;
|
|
333
|
+
children?: react__default.ReactNode;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* TruncatedTooltip - A text container that applies ellipsis truncation
|
|
337
|
+
* and only displays a custom portal tooltip when text overflows horizontal bounds.
|
|
338
|
+
* Expands to full cell dimensions (w-full h-full min-h-[inherit]) for reliable hover detection.
|
|
339
|
+
* No native browser title attribute is rendered.
|
|
340
|
+
*/
|
|
341
|
+
declare const TruncatedTooltip: react__default.FC<TruncatedTooltipProps>;
|
|
342
|
+
interface SmartTextCellProps {
|
|
343
|
+
value: any;
|
|
344
|
+
onChange?: (val: any) => void;
|
|
345
|
+
readOnly?: boolean;
|
|
346
|
+
type?: 'text' | 'number' | 'tel';
|
|
347
|
+
placeholder?: string;
|
|
348
|
+
className?: string;
|
|
349
|
+
prefix?: react__default.ReactNode;
|
|
350
|
+
suffix?: react__default.ReactNode;
|
|
351
|
+
dir?: 'ltr' | 'rtl' | 'auto';
|
|
352
|
+
tooltipText?: string;
|
|
353
|
+
step?: string;
|
|
354
|
+
onFocus?: (e: react__default.FocusEvent<HTMLInputElement>) => void;
|
|
355
|
+
onBlur?: (e: react__default.FocusEvent<HTMLInputElement>) => void;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* SmartTextCell - Text cell with intelligent hover tooltip.
|
|
359
|
+
* Only displays the custom portal tooltip bubble if the text is actually
|
|
360
|
+
* clipped/truncated within its visible boundary (scrollWidth > clientWidth).
|
|
361
|
+
* Native title attributes are omitted to prevent duplicate tooltips.
|
|
362
|
+
*/
|
|
363
|
+
declare const SmartTextCell: react__default.FC<SmartTextCellProps>;
|
|
364
|
+
|
|
307
365
|
interface MetaTemplateComponent {
|
|
308
366
|
type: "HEADER" | "BODY" | "FOOTER" | "BUTTONS" | string;
|
|
309
367
|
format?: "TEXT" | "IMAGE" | "DOCUMENT" | "VIDEO" | string;
|
|
@@ -387,4 +445,4 @@ declare function ToastProvider({ children }: {
|
|
|
387
445
|
|
|
388
446
|
declare function useToast(): ToastContextType;
|
|
389
447
|
|
|
390
|
-
export { type BaseComponentProps, ColumnHeaderTitle, type ColumnHeaderTitleProps, type ComponentCommunication, type ComponentConfig, type ComponentData, type ComponentPermissions, type ComponentRegistry, type ComponentState, type CreateRecordPayload, CreateTemplateModal, type CreateTemplateModalProps, DatePickerCell, type DeleteRecordPayload, LinkPickerCell, type MetaTemplateComponent, type MetaWhatsAppTemplate, type OrgRole, PASTEL_PALETTES, type PastelPalette, type RelationFilterOption, type RelationFilterPayload, RelationFilterPopover, type RelationFilterPopoverProps, RelationPickerCell, type RolePermissions, type RowStatusType, type SplitTitleResult, TableBlock, type TableBlockProps, type TableConfig, type TableData, TimePickerCell, ToastContext, type ToastContextType, type ToastItem, ToastProvider, UNIVERSE_COMPONENTS, type UniverseComponentType, type UpdateRecordPayload, type UseColumnReorderOptions, type UseColumnResizeOptions, WhatsAppComponent, type WhatsAppComponentProps, type WhatsAppData, calculateMinColumnWidth, cn, formatConflictCellValue, formatPhoneDisplay, formatTimeInput, formatTimeIso, generateWhatsAppLink, getDeterministicPastelBadge, getRolePermissions, isValidPhoneNumber, measureTextWidth, normalizePhoneForWhatsApp, normalizeRelationValue, openWhatsAppChat, parseLinkValue, parseTimeParts, resolveProtocol, sanitizePhoneNumber, splitHeaderTitle, useColumnReorder, useColumnResize, useToast };
|
|
448
|
+
export { type BaseComponentProps, ColumnHeaderTitle, type ColumnHeaderTitleProps, type ComponentCommunication, type ComponentConfig, type ComponentData, type ComponentPermissions, type ComponentRegistry, type ComponentState, type CreateRecordPayload, CreateTemplateModal, type CreateTemplateModalProps, DatePickerCell, type DeleteRecordPayload, LinkPickerCell, type MetaTemplateComponent, type MetaWhatsAppTemplate, type OrgRole, PASTEL_PALETTES, type PastelPalette, type RelationFilterOption, type RelationFilterPayload, RelationFilterPopover, type RelationFilterPopoverProps, RelationPickerCell, type RolePermissions, type RowStatusType, SmartTextCell, type SplitTitleResult, TableBlock, type TableBlockProps, type TableConfig, type TableData, TimePickerCell, ToastContext, type ToastContextType, type ToastItem, ToastProvider, TruncatedTooltip, UNIVERSE_COMPONENTS, type UniverseComponentType, type UpdateRecordPayload, type UseColumnReorderOptions, type UseColumnResizeOptions, WhatsAppComponent, type WhatsAppComponentProps, type WhatsAppData, calculateMinColumnWidth, checkElementTruncation, cn, formatConflictCellValue, formatPhoneDisplay, formatTimeInput, formatTimeIso, generateWhatsAppLink, getDeterministicPastelBadge, getRolePermissions, isValidPhoneNumber, measureTextWidth, normalizePhoneForWhatsApp, normalizeRelationValue, openWhatsAppChat, parseLinkValue, parseTimeParts, resolveProtocol, sanitizePhoneNumber, splitHeaderTitle, useColumnReorder, useColumnResize, useSmartTooltip, useToast };
|