diff options
| author | joonhoekim <26rote@gmail.com> | 2025-03-25 15:55:45 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-03-25 15:55:45 +0900 |
| commit | 1a2241c40e10193c5ff7008a7b7b36cc1d855d96 (patch) | |
| tree | 8a5587f10ca55b162d7e3254cb088b323a34c41b /config/data-table.ts | |
initial commit
Diffstat (limited to 'config/data-table.ts')
| -rw-r--r-- | config/data-table.ts | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/config/data-table.ts b/config/data-table.ts new file mode 100644 index 00000000..62c3c248 --- /dev/null +++ b/config/data-table.ts @@ -0,0 +1,94 @@ +import { Pickaxe, SquareSquare } from "lucide-react" + +export type DataTableConfig = typeof dataTableConfig + +export const dataTableConfig = { + featureFlags: [ + { + label: "Advanced table", + value: "advancedTable" as const, + icon: Pickaxe, + tooltipTitle: "Toggle advanced table", + tooltipDescription: "A filter and sort builder to filter and sort rows.", + }, + { + label: "Floating bar", + value: "floatingBar" as const, + icon: SquareSquare, + tooltipTitle: "Toggle floating bar", + tooltipDescription: "A floating bar that sticks to the top of the table.", + }, + ], + textOperators: [ + { label: "Contains", value: "iLike" as const }, + { label: "Does not contain", value: "notILike" as const }, + { label: "Is", value: "eq" as const }, + { label: "Is not", value: "ne" as const }, + { label: "Is empty", value: "isEmpty" as const }, + { label: "Is not empty", value: "isNotEmpty" as const }, + ], + numericOperators: [ + { label: "Is", value: "eq" as const }, + { label: "Is not", value: "ne" as const }, + { label: "Is less than", value: "lt" as const }, + { label: "Is less than or equal to", value: "lte" as const }, + { label: "Is greater than", value: "gt" as const }, + { label: "Is greater than or equal to", value: "gte" as const }, + { label: "Is empty", value: "isEmpty" as const }, + { label: "Is not empty", value: "isNotEmpty" as const }, + ], + dateOperators: [ + { label: "Is", value: "eq" as const }, + { label: "Is not", value: "ne" as const }, + { label: "Is before", value: "lt" as const }, + { label: "Is after", value: "gt" as const }, + { label: "Is on or before", value: "lte" as const }, + { label: "Is on or after", value: "gte" as const }, + { label: "Is between", value: "isBetween" as const }, + { label: "Is relative to today", value: "isRelativeToToday" as const }, + { label: "Is empty", value: "isEmpty" as const }, + { label: "Is not empty", value: "isNotEmpty" as const }, + ], + selectOperators: [ + { label: "Is", value: "eq" as const }, + { label: "Is not", value: "ne" as const }, + { label: "Is empty", value: "isEmpty" as const }, + { label: "Is not empty", value: "isNotEmpty" as const }, + ], + booleanOperators: [ + { label: "Is", value: "eq" as const }, + { label: "Is not", value: "ne" as const }, + ], + joinOperators: [ + { label: "And", value: "and" as const }, + { label: "Or", value: "or" as const }, + ], + sortOrders: [ + { label: "Asc", value: "asc" as const }, + { label: "Desc", value: "desc" as const }, + ], + columnTypes: [ + "text", + "number", + "date", + "boolean", + "select", + "multi-select", + ] as const, + globalOperators: [ + "iLike", + "notILike", + "eq", + "ne", + "isEmpty", + "isNotEmpty", + "lt", + "lte", + "gt", + "gte", + "isBetween", + "isRelativeToToday", + "and", + "or", + ] as const, +} |
