@rebasepro/ui 0.3.0 → 0.4.0
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/components/Card.d.ts +2 -3
- package/dist/components/FilterChip.d.ts +2 -10
- package/dist/components/VirtualTable/VirtualTableProps.d.ts +8 -2
- package/dist/index.css +1 -1
- package/dist/index.es.js +125 -107
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +124 -106
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -3
- package/src/components/Button.tsx +6 -6
- package/src/components/Card.tsx +1 -1
- package/src/components/DebouncedTextField.tsx +57 -16
- package/src/components/FilterChip.tsx +8 -13
- package/src/components/IconButton.tsx +4 -4
- package/src/components/Tabs.tsx +2 -2
- package/src/components/VirtualTable/VirtualTableHeaderRow.tsx +3 -2
- package/src/components/VirtualTable/VirtualTableProps.tsx +21 -12
- package/src/index.css +1 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
declare const Card: React.ForwardRefExoticComponent<{
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
style?: React.CSSProperties;
|
|
5
5
|
onClick?: (e?: React.MouseEvent) => void;
|
|
6
6
|
className?: string;
|
|
7
|
-
}
|
|
8
|
-
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
9
8
|
export { Card };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export interface FilterChipProps {
|
|
2
|
+
export interface FilterChipProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
3
3
|
/**
|
|
4
4
|
* The text label displayed on the chip.
|
|
5
5
|
*/
|
|
@@ -8,10 +8,6 @@ export interface FilterChipProps {
|
|
|
8
8
|
* Whether the chip is currently in an active/selected state.
|
|
9
9
|
*/
|
|
10
10
|
active?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Callback when the chip is clicked.
|
|
13
|
-
*/
|
|
14
|
-
onClick?: () => void;
|
|
15
11
|
/**
|
|
16
12
|
* Optional icon rendered before the label.
|
|
17
13
|
*/
|
|
@@ -21,10 +17,6 @@ export interface FilterChipProps {
|
|
|
21
17
|
* @default "medium"
|
|
22
18
|
*/
|
|
23
19
|
size?: "small" | "medium";
|
|
24
|
-
/**
|
|
25
|
-
* Additional class names.
|
|
26
|
-
*/
|
|
27
|
-
className?: string;
|
|
28
20
|
/**
|
|
29
21
|
* Whether the chip is disabled.
|
|
30
22
|
*/
|
|
@@ -39,4 +31,4 @@ export interface FilterChipProps {
|
|
|
39
31
|
*
|
|
40
32
|
* @group Interactive components
|
|
41
33
|
*/
|
|
42
|
-
export declare
|
|
34
|
+
export declare const FilterChip: React.ForwardRefExoticComponent<FilterChipProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -224,6 +224,12 @@ export type OnVirtualTableColumnResizeParams = {
|
|
|
224
224
|
key: string;
|
|
225
225
|
column: VirtualTableColumn;
|
|
226
226
|
};
|
|
227
|
+
/**
|
|
228
|
+
* @see Table
|
|
229
|
+
* @group Components
|
|
230
|
+
*/
|
|
231
|
+
export type WhereFilterOp = "<" | "<=" | "==" | "!=" | ">=" | ">" | "array-contains" | "in" | "not-in" | "array-contains-any";
|
|
232
|
+
export type FilterValues<Key extends string> = Partial<Record<Key, [WhereFilterOp, unknown] | [WhereFilterOp, unknown][]>>;
|
|
227
233
|
/**
|
|
228
234
|
* @see Table
|
|
229
235
|
* @group Components
|
|
@@ -233,11 +239,11 @@ export type VirtualTableSort = "asc" | "desc" | undefined;
|
|
|
233
239
|
* @see Table
|
|
234
240
|
* @group Components
|
|
235
241
|
*/
|
|
236
|
-
export type VirtualTableFilterValues<Key extends string> =
|
|
242
|
+
export type VirtualTableFilterValues<Key extends string> = FilterValues<Key>;
|
|
237
243
|
/**
|
|
238
244
|
* Filter conditions in a `Query.where()` clause are specified using the
|
|
239
245
|
* strings `<`, `<=`, `==`, `>=`, `>`, `array-contains`, `in`, and `array-contains-any`.
|
|
240
246
|
* @see Table
|
|
241
247
|
* @group Models
|
|
242
248
|
*/
|
|
243
|
-
export type VirtualTableWhereFilterOp =
|
|
249
|
+
export type VirtualTableWhereFilterOp = WhereFilterOp;
|
package/dist/index.css
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -4,7 +4,7 @@ import { c } from "react-compiler-runtime";
|
|
|
4
4
|
import { clsx } from "clsx";
|
|
5
5
|
import { twMerge } from "tailwind-merge";
|
|
6
6
|
import * as React from "react";
|
|
7
|
-
import React__default, { createContext, useContext, useEffect, useRef, useState, Children, forwardRef, useLayoutEffect, useId,
|
|
7
|
+
import React__default, { createContext, useContext, useEffect, useRef, useState, Children, forwardRef, useLayoutEffect, useId, useCallback, useMemo, createRef } from "react";
|
|
8
8
|
import * as Collapsible from "@radix-ui/react-collapsible";
|
|
9
9
|
import { AlertCircleIcon, ShieldAlertIcon, ArrowLeftIcon, RefreshCwIcon, ChevronUpIcon, ChevronDownIcon, MinusIcon, CheckIcon, CalendarIcon, XIcon, ChevronRightIcon, SearchIcon, ChevronLeftIcon, ArrowUpIcon, FilterIcon } from "lucide-react";
|
|
10
10
|
import { AlertCircleIcon as AlertCircleIcon2, AlertTriangleIcon, AlignLeftIcon, AppWindow, ArrowDownToLineIcon, ArrowLeftIcon as ArrowLeftIcon2, ArrowRightFromLineIcon, ArrowRightIcon, ArrowRightToLineIcon, ArrowUpToLineIcon, BoldIcon, BookOpenIcon, CalendarIcon as CalendarIcon2, CheckCircleIcon, CheckIcon as CheckIcon2, CheckSquareIcon, ChevronDownIcon as ChevronDownIcon2, ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon as ChevronRightIcon2, ChevronUpIcon as ChevronUpIcon2, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpDownIcon, CircleIcon, CircleUserIcon, CodeIcon, ColumnsIcon, CopyIcon, DatabaseIcon, DownloadIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileIcon, FileSearchIcon, FileTextIcon, FilterIcon as FilterIcon2, FilterXIcon, FlagIcon, FolderIcon, FolderPlusIcon, FolderUpIcon, FunctionSquareIcon, GitBranchIcon, GlobeIcon, HashIcon, Heading1Icon, Heading2Icon, Heading3Icon, HelpCircleIcon, HistoryIcon, HomeIcon, ImageIcon, ImageOffIcon, InfoIcon, ItalicIcon, KanbanIcon, KeyIcon, KeyRoundIcon, LanguagesIcon, LayoutGridIcon, LinkIcon, ListIcon, ListOrderedIcon, LoaderIcon, LogOutIcon, MailIcon, Maximize2Icon, MenuIcon, MinusCircleIcon, MinusIcon as MinusIcon2, MoonIcon, MoreVerticalIcon, Music2Icon, PanelLeftIcon, PauseIcon, PencilIcon, PhoneIcon, PlayIcon, PlusIcon, QuoteIcon, RefreshCcwIcon, RefreshCwIcon as RefreshCwIcon2, RepeatIcon, Rows3Icon, SaveIcon, SearchIcon as SearchIcon2, SendIcon, SettingsIcon, ShieldIcon, ShoppingCartIcon, SlidersHorizontalIcon, SquareIcon, StarIcon, StrikethroughIcon, SunIcon, SunMoonIcon, TableIcon, TagIcon, TerminalIcon, TextIcon, Trash2Icon, TypeIcon, UnderlineIcon, UndoIcon, UploadCloudIcon, UploadIcon, UserCheckIcon, UserIcon, VideoIcon, VoteIcon, Wand2Icon, XCircleIcon, XIcon as XIcon2, icons } from "lucide-react";
|
|
@@ -985,15 +985,15 @@ const ButtonInner = React__default.memo(React__default.forwardRef((t0, ref) => {
|
|
|
985
985
|
"border border-transparent bg-surface-300 dark:bg-surface-500 opacity-40 bg-surface-300/40 dark:bg-surface-500/40": t25
|
|
986
986
|
});
|
|
987
987
|
const sizeClasses2 = cls({
|
|
988
|
-
"py-
|
|
989
|
-
"py-
|
|
990
|
-
"py-2 px-
|
|
991
|
-
"py-
|
|
992
|
-
"py-
|
|
988
|
+
"py-1 px-2": size === "small",
|
|
989
|
+
"py-2 px-4": size === "medium",
|
|
990
|
+
"py-2.5 px-5": size === "large",
|
|
991
|
+
"py-3 px-6": size === "xl",
|
|
992
|
+
"py-4 px-10": size === "2xl"
|
|
993
993
|
});
|
|
994
994
|
const iconColorClass = (color === "neutral" || color === "text") && !disabled ? "[&>svg]:text-surface-accent-500 dark:[&>svg]:text-surface-accent-300" : "";
|
|
995
995
|
if (Component) {
|
|
996
|
-
t30 = /* @__PURE__ */ jsxs(Component, { ref, onClick: props.onClick, className: cls(startIcon ? "pl-3" : "", "typography-button h-fit rounded-md whitespace-nowrap inline-flex items-center justify-center p-
|
|
996
|
+
t30 = /* @__PURE__ */ jsxs(Component, { ref, onClick: props.onClick, className: cls(startIcon ? "pl-3" : "", "typography-button h-fit rounded-md whitespace-nowrap inline-flex items-center justify-center p-2 px-4 focus:outline-none transition-all ease-in-out duration-150 gap-2 active:scale-[0.98]", buttonClasses2, sizeClasses2, iconColorClass, className), ...props, children: [
|
|
997
997
|
startIcon,
|
|
998
998
|
children
|
|
999
999
|
] });
|
|
@@ -1002,7 +1002,7 @@ const ButtonInner = React__default.memo(React__default.forwardRef((t0, ref) => {
|
|
|
1002
1002
|
t26 = ref;
|
|
1003
1003
|
t27 = props.type ?? "button";
|
|
1004
1004
|
t28 = props.onClick;
|
|
1005
|
-
t29 = cls(startIcon ? "pl-3" : "", "typography-button h-fit rounded-md whitespace-nowrap inline-flex items-center justify-center p-
|
|
1005
|
+
t29 = cls(startIcon ? "pl-3" : "", "typography-button h-fit rounded-md whitespace-nowrap inline-flex items-center justify-center p-2 px-4 focus:outline-none transition-all ease-in-out duration-150 gap-2 active:scale-[0.98]", buttonClasses2, sizeClasses2, iconColorClass, className);
|
|
1006
1006
|
}
|
|
1007
1007
|
$[11] = Component;
|
|
1008
1008
|
$[12] = children;
|
|
@@ -2147,10 +2147,10 @@ const buttonClasses = "hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-
|
|
|
2147
2147
|
const baseClasses = "inline-flex items-center justify-center p-2 text-sm font-medium focus:outline-none transition-colors ease-in-out duration-150";
|
|
2148
2148
|
const colorClasses$1 = "text-surface-accent-500 visited:text-surface-accent-500 dark:text-surface-accent-300 dark:visited:text-surface-300";
|
|
2149
2149
|
const sizeClasses$1 = {
|
|
2150
|
-
medium: "w-
|
|
2151
|
-
small: "w-
|
|
2152
|
-
smallest: "w-
|
|
2153
|
-
large: "w-
|
|
2150
|
+
medium: "w-10 !h-10 min-w-10 min-h-10",
|
|
2151
|
+
small: "w-8 !h-8 min-w-8 min-h-8",
|
|
2152
|
+
smallest: "w-6 !h-6 min-w-6 min-h-6",
|
|
2153
|
+
large: "w-12 !h-12 min-w-12 min-h-12"
|
|
2154
2154
|
};
|
|
2155
2155
|
const shapeClasses = {
|
|
2156
2156
|
circular: "rounded-full",
|
|
@@ -3178,49 +3178,80 @@ const sizeClasses = {
|
|
|
3178
3178
|
small: "px-2 py-0.5 text-xs",
|
|
3179
3179
|
medium: "px-2.5 py-1 text-xs"
|
|
3180
3180
|
};
|
|
3181
|
-
|
|
3182
|
-
const $ = c(
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3181
|
+
const FilterChip = React__default.forwardRef(function FilterChip2(t0, ref) {
|
|
3182
|
+
const $ = c(22);
|
|
3183
|
+
let children;
|
|
3184
|
+
let className;
|
|
3185
|
+
let icon;
|
|
3186
|
+
let onClick;
|
|
3187
|
+
let rest;
|
|
3188
|
+
let t1;
|
|
3189
|
+
let t2;
|
|
3190
|
+
let t3;
|
|
3191
|
+
if ($[0] !== t0) {
|
|
3192
|
+
({
|
|
3193
|
+
children,
|
|
3194
|
+
active: t1,
|
|
3195
|
+
onClick,
|
|
3196
|
+
icon,
|
|
3197
|
+
size: t2,
|
|
3198
|
+
className,
|
|
3199
|
+
disabled: t3,
|
|
3200
|
+
...rest
|
|
3201
|
+
} = t0);
|
|
3202
|
+
$[0] = t0;
|
|
3203
|
+
$[1] = children;
|
|
3204
|
+
$[2] = className;
|
|
3205
|
+
$[3] = icon;
|
|
3206
|
+
$[4] = onClick;
|
|
3207
|
+
$[5] = rest;
|
|
3208
|
+
$[6] = t1;
|
|
3209
|
+
$[7] = t2;
|
|
3210
|
+
$[8] = t3;
|
|
3211
|
+
} else {
|
|
3212
|
+
children = $[1];
|
|
3213
|
+
className = $[2];
|
|
3214
|
+
icon = $[3];
|
|
3215
|
+
onClick = $[4];
|
|
3216
|
+
rest = $[5];
|
|
3217
|
+
t1 = $[6];
|
|
3218
|
+
t2 = $[7];
|
|
3219
|
+
t3 = $[8];
|
|
3220
|
+
}
|
|
3192
3221
|
const active = t1 === void 0 ? false : t1;
|
|
3193
3222
|
const size = t2 === void 0 ? "medium" : t2;
|
|
3194
3223
|
const disabled = t3 === void 0 ? false : t3;
|
|
3195
3224
|
const t4 = sizeClasses[size];
|
|
3196
3225
|
let t5;
|
|
3197
|
-
if ($[
|
|
3226
|
+
if ($[9] !== active || $[10] !== className || $[11] !== disabled || $[12] !== t4) {
|
|
3198
3227
|
t5 = cls("inline-flex items-center gap-1 rounded-full", "font-medium whitespace-nowrap select-none shrink-0", "transition-all duration-150", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50", t4, active ? "bg-primary/12 text-primary dark:bg-primary/20 dark:text-primary shadow-[inset_0_0_0_1.5px_var(--color-primary)]" : cls("bg-surface-accent-100 text-text-secondary dark:bg-surface-accent-800 dark:text-text-secondary-dark", !disabled && "cursor-pointer hover:bg-surface-accent-200 dark:hover:bg-surface-accent-700"), disabled && "opacity-50 cursor-not-allowed", className);
|
|
3199
|
-
$[
|
|
3200
|
-
$[
|
|
3201
|
-
$[
|
|
3202
|
-
$[
|
|
3203
|
-
$[
|
|
3228
|
+
$[9] = active;
|
|
3229
|
+
$[10] = className;
|
|
3230
|
+
$[11] = disabled;
|
|
3231
|
+
$[12] = t4;
|
|
3232
|
+
$[13] = t5;
|
|
3204
3233
|
} else {
|
|
3205
|
-
t5 = $[
|
|
3234
|
+
t5 = $[13];
|
|
3206
3235
|
}
|
|
3207
3236
|
let t6;
|
|
3208
|
-
if ($[
|
|
3209
|
-
t6 = /* @__PURE__ */ jsxs("button", { type: "button", onClick, disabled, className: t5, children: [
|
|
3237
|
+
if ($[14] !== children || $[15] !== disabled || $[16] !== icon || $[17] !== onClick || $[18] !== ref || $[19] !== rest || $[20] !== t5) {
|
|
3238
|
+
t6 = /* @__PURE__ */ jsxs("button", { ref, type: "button", onClick, disabled, className: t5, ...rest, children: [
|
|
3210
3239
|
icon,
|
|
3211
3240
|
children
|
|
3212
3241
|
] });
|
|
3213
|
-
$[
|
|
3214
|
-
$[
|
|
3215
|
-
$[
|
|
3216
|
-
$[
|
|
3217
|
-
$[
|
|
3218
|
-
$[
|
|
3242
|
+
$[14] = children;
|
|
3243
|
+
$[15] = disabled;
|
|
3244
|
+
$[16] = icon;
|
|
3245
|
+
$[17] = onClick;
|
|
3246
|
+
$[18] = ref;
|
|
3247
|
+
$[19] = rest;
|
|
3248
|
+
$[20] = t5;
|
|
3249
|
+
$[21] = t6;
|
|
3219
3250
|
} else {
|
|
3220
|
-
t6 = $[
|
|
3251
|
+
t6 = $[21];
|
|
3221
3252
|
}
|
|
3222
3253
|
return t6;
|
|
3223
|
-
}
|
|
3254
|
+
});
|
|
3224
3255
|
const colorClasses = {
|
|
3225
3256
|
info: "bg-sky-200 dark:bg-teal-900",
|
|
3226
3257
|
warn: "bg-orange-200 dark:bg-yellow-950"
|
|
@@ -7001,7 +7032,7 @@ function Tabs(t0) {
|
|
|
7001
7032
|
} else {
|
|
7002
7033
|
t10 = $[12];
|
|
7003
7034
|
}
|
|
7004
|
-
const t11 = variant === "standard" && "inline-flex h-
|
|
7035
|
+
const t11 = variant === "standard" && "inline-flex h-9 items-center justify-start rounded-md bg-surface-50 p-1 text-surface-600 dark:bg-surface-900 dark:text-surface-400 gap-2 border";
|
|
7005
7036
|
const t12 = variant === "standard" && defaultBorderMixin;
|
|
7006
7037
|
const t13 = variant === "boxy" && "flex items-center h-full";
|
|
7007
7038
|
const t14 = variant === "pill" && "flex items-center gap-0.5";
|
|
@@ -7075,7 +7106,7 @@ function Tab(t0) {
|
|
|
7075
7106
|
const {
|
|
7076
7107
|
variant
|
|
7077
7108
|
} = useContext(TabsContext);
|
|
7078
|
-
const t1 = variant === "standard" && "rounded-sm px-3 py-1
|
|
7109
|
+
const t1 = variant === "standard" && "rounded-sm px-3 py-1 data-[state=active]:bg-white data-[state=active]:text-surface-900 data-[state=active]:shadow-sm dark:data-[state=active]:bg-surface-900 dark:data-[state=active]:text-surface-50";
|
|
7079
7110
|
let t2;
|
|
7080
7111
|
if ($[0] !== className || $[1] !== innerClassName || $[2] !== t1 || $[3] !== variant) {
|
|
7081
7112
|
t2 = cls("inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-white transition-all", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-surface-400 focus-visible:ring-offset-2", "disabled:pointer-events-none disabled:opacity-50", t1, variant === "boxy" && cls("flex-shrink-0 flex items-center gap-1.5 px-3.5 h-9 border-r border-surface-200 dark:border-surface-800 cursor-pointer text-[12px] font-medium transition-colors group relative box-border overflow-hidden", "border-b-2 border-b-transparent", "data-[state=active]:bg-surface-50 dark:data-[state=active]:bg-surface-900", "data-[state=active]:text-text-primary dark:data-[state=active]:text-text-primary-dark", "data-[state=active]:border-b-primary", "text-text-secondary dark:text-text-secondary-dark hover:bg-surface-100 dark:hover:bg-surface-800"), variant === "pill" && cls("px-2 py-0.5 rounded text-[10px] font-medium transition-colors", "data-[state=active]:bg-primary/10 data-[state=active]:text-primary dark:data-[state=active]:bg-primary/20 dark:data-[state=active]:text-blue-400", "text-text-disabled dark:text-text-disabled-dark hover:text-text-secondary dark:hover:text-text-secondary-dark"), className, variant === "standard" && innerClassName);
|
|
@@ -7549,73 +7580,59 @@ const Badge = React__default.forwardRef((t0, ref) => {
|
|
|
7549
7580
|
});
|
|
7550
7581
|
Badge.displayName = "Badge";
|
|
7551
7582
|
function DebouncedTextField(props) {
|
|
7552
|
-
const
|
|
7553
|
-
const
|
|
7554
|
-
const
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7583
|
+
const [internalValue, setInternalValue] = useState(props.value ?? "");
|
|
7584
|
+
const lastSentValueRef = useRef(props.value ?? "");
|
|
7585
|
+
const timerRef = useRef(void 0);
|
|
7586
|
+
useEffect(() => {
|
|
7587
|
+
const externalValue = props.value ?? "";
|
|
7588
|
+
if (externalValue !== lastSentValueRef.current) {
|
|
7589
|
+
setInternalValue(externalValue);
|
|
7590
|
+
lastSentValueRef.current = externalValue;
|
|
7591
|
+
}
|
|
7592
|
+
}, [props.value]);
|
|
7593
|
+
useEffect(() => {
|
|
7594
|
+
return () => {
|
|
7595
|
+
if (timerRef.current) clearTimeout(timerRef.current);
|
|
7561
7596
|
};
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
}
|
|
7578
|
-
|
|
7579
|
-
|
|
7597
|
+
}, []);
|
|
7598
|
+
const flushChange = useCallback((value, event) => {
|
|
7599
|
+
if (timerRef.current) {
|
|
7600
|
+
clearTimeout(timerRef.current);
|
|
7601
|
+
timerRef.current = void 0;
|
|
7602
|
+
}
|
|
7603
|
+
if (value !== props.value && props.onChange) {
|
|
7604
|
+
lastSentValueRef.current = value;
|
|
7605
|
+
const e = {
|
|
7606
|
+
...event,
|
|
7607
|
+
target: {
|
|
7608
|
+
...event?.target,
|
|
7609
|
+
value,
|
|
7610
|
+
name: props.name
|
|
7611
|
+
}
|
|
7612
|
+
};
|
|
7613
|
+
props.onChange(e);
|
|
7614
|
+
}
|
|
7615
|
+
}, [props.value, props.onChange, props.name]);
|
|
7616
|
+
const internalOnChange = useCallback((event_0) => {
|
|
7617
|
+
const newValue = event_0.target.value;
|
|
7618
|
+
setInternalValue(newValue);
|
|
7619
|
+
if (timerRef.current) clearTimeout(timerRef.current);
|
|
7620
|
+
const eventCopy = {
|
|
7621
|
+
...event_0,
|
|
7622
|
+
target: {
|
|
7623
|
+
...event_0?.target,
|
|
7624
|
+
name: event_0?.target?.name
|
|
7580
7625
|
}
|
|
7581
7626
|
};
|
|
7582
|
-
|
|
7583
|
-
|
|
7584
|
-
|
|
7585
|
-
}
|
|
7586
|
-
|
|
7587
|
-
|
|
7588
|
-
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
$[6] = deferredValue;
|
|
7592
|
-
$[7] = props.value;
|
|
7593
|
-
$[8] = t3;
|
|
7594
|
-
} else {
|
|
7595
|
-
t3 = $[8];
|
|
7596
|
-
}
|
|
7597
|
-
useEffect(t2, t3);
|
|
7598
|
-
let t4;
|
|
7599
|
-
if ($[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
7600
|
-
t4 = (event) => {
|
|
7601
|
-
previousEventRef.current = event;
|
|
7602
|
-
setInternalValue(event.target.value);
|
|
7603
|
-
};
|
|
7604
|
-
$[9] = t4;
|
|
7605
|
-
} else {
|
|
7606
|
-
t4 = $[9];
|
|
7607
|
-
}
|
|
7608
|
-
const internalOnChange = t4;
|
|
7609
|
-
let t5;
|
|
7610
|
-
if ($[10] !== internalValue || $[11] !== props) {
|
|
7611
|
-
t5 = /* @__PURE__ */ jsx(TextField, { ...props, onChange: internalOnChange, value: internalValue });
|
|
7612
|
-
$[10] = internalValue;
|
|
7613
|
-
$[11] = props;
|
|
7614
|
-
$[12] = t5;
|
|
7615
|
-
} else {
|
|
7616
|
-
t5 = $[12];
|
|
7617
|
-
}
|
|
7618
|
-
return t5;
|
|
7627
|
+
timerRef.current = setTimeout(() => {
|
|
7628
|
+
flushChange(newValue, eventCopy);
|
|
7629
|
+
}, 150);
|
|
7630
|
+
}, [flushChange]);
|
|
7631
|
+
const internalOnBlur = useCallback((event_1) => {
|
|
7632
|
+
flushChange(internalValue, event_1);
|
|
7633
|
+
props.onBlur?.(event_1);
|
|
7634
|
+
}, [internalValue, flushChange, props.onBlur]);
|
|
7635
|
+
return /* @__PURE__ */ jsx(TextField, { ...props, onChange: internalOnChange, onBlur: internalOnBlur, value: internalValue });
|
|
7619
7636
|
}
|
|
7620
7637
|
const styles = `
|
|
7621
7638
|
@keyframes shimmer {
|
|
@@ -8335,7 +8352,8 @@ const VirtualTableHeaderRow = ({
|
|
|
8335
8352
|
height: headerHeight
|
|
8336
8353
|
}, children: [
|
|
8337
8354
|
columns.map((column_0, columnIndex) => {
|
|
8338
|
-
const
|
|
8355
|
+
const columnFilter = column_0 && filter && filter[column_0.key] ? filter[column_0.key] : void 0;
|
|
8356
|
+
const filterForThisProperty = columnFilter ? Array.isArray(columnFilter[0]) ? columnFilter[0] : columnFilter : void 0;
|
|
8339
8357
|
const isDraggable = !column_0.frozen && !!onColumnsOrderChange;
|
|
8340
8358
|
const isDragging = draggingColumnId === column_0.key;
|
|
8341
8359
|
return /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(SortableColumnHeader, { column: column_0, columnIndex, columnRefs, isResizing, onFilterUpdate, filter: filterForThisProperty, sortByProperty, currentSort, onColumnSort, onClickResizeColumn, createFilterField, isDragging, isDraggable }) }, "header_" + column_0.key);
|