@tulip-systems/drive 0.8.3 → 0.9.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/grid-card.client.d.mts +1 -1
- package/dist/lib/dto.d.mts +2 -2
- package/dist/lib/validators.d.mts +9 -9
- package/dist/providers/google/components/view.client.d.mts +1 -1
- package/dist/providers/google/components/view.client.mjs +2 -2
- package/dist/providers/google/config/filters.d.mts +1 -1
- package/dist/providers/google/lib/router.server.d.mts +18 -18
- package/dist/providers/google/lib/search-params.d.mts +1 -1
- package/dist/providers/google/lib/validators.d.mts +12 -12
- package/dist/providers/local/components/view.client.d.mts +1 -1
- package/dist/providers/local/components/view.client.mjs +2 -2
- package/dist/providers/local/config/filters.d.mts +1 -1
- package/dist/providers/local/config/sorting.mjs +16 -0
- package/dist/providers/local/lib/router.server.d.mts +101 -101
- package/dist/providers/local/lib/schema.d.mts +2 -2
- package/dist/providers/local/lib/search-params.d.mts +1 -1
- package/dist/providers/local/lib/service.server.d.mts +11 -11
- package/dist/providers/local/lib/service.server.mjs +9 -8
- package/dist/providers/local/lib/validators.d.mts +18 -18
- package/package.json +2 -2
- package/src/components/grid-card.client.tsx +1 -1
- package/src/providers/google/components/view.client.tsx +4 -3
- package/src/providers/local/components/view.client.tsx +4 -3
- package/src/providers/local/config/sorting.ts +16 -0
- package/src/providers/local/lib/service.server.ts +8 -19
|
@@ -10,7 +10,7 @@ import { CommandDef } from "@tulip-systems/core/commands";
|
|
|
10
10
|
*/
|
|
11
11
|
type DriveGridCardProps<TData extends DriveNode> = ComponentProps<"div"> & {
|
|
12
12
|
node: TData;
|
|
13
|
-
commands?: CommandDef
|
|
13
|
+
commands?: CommandDef[];
|
|
14
14
|
imageLoader?: (props: ImageLoaderProps) => string;
|
|
15
15
|
unoptimized?: boolean;
|
|
16
16
|
};
|
package/dist/lib/dto.d.mts
CHANGED
|
@@ -13,8 +13,8 @@ type DriveNodeProvider = z.infer<typeof driveNodeProviderSchema>;
|
|
|
13
13
|
* Drive node type
|
|
14
14
|
*/
|
|
15
15
|
declare const driveNodeTypeSchema: z.ZodEnum<{
|
|
16
|
-
file: "file";
|
|
17
16
|
folder: "folder";
|
|
17
|
+
file: "file";
|
|
18
18
|
}>;
|
|
19
19
|
type DriveNodeType = z.infer<typeof driveNodeTypeSchema>;
|
|
20
20
|
/**
|
|
@@ -63,8 +63,8 @@ declare const driveNodeSchema: z.ZodObject<{
|
|
|
63
63
|
name: z.ZodString;
|
|
64
64
|
namespace: z.ZodString;
|
|
65
65
|
type: z.ZodEnum<{
|
|
66
|
-
file: "file";
|
|
67
66
|
folder: "folder";
|
|
67
|
+
file: "file";
|
|
68
68
|
}>;
|
|
69
69
|
subtype: z.ZodEnum<{
|
|
70
70
|
image: "image";
|
|
@@ -51,8 +51,8 @@ type PresignDriveFileSchema = z.infer<typeof presignDriveFileInputSchema>;
|
|
|
51
51
|
*/
|
|
52
52
|
declare const driveTableFiltersSchema: z.ZodPipe<z.ZodObject<{
|
|
53
53
|
types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
54
|
-
file: "file";
|
|
55
54
|
folder: "folder";
|
|
55
|
+
file: "file";
|
|
56
56
|
}>>>>;
|
|
57
57
|
contentTypes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
58
58
|
nodeIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
@@ -63,13 +63,13 @@ declare const driveTableFiltersSchema: z.ZodPipe<z.ZodObject<{
|
|
|
63
63
|
isArchived: boolean;
|
|
64
64
|
namespace: string;
|
|
65
65
|
parentId: string | null;
|
|
66
|
-
types?: ("
|
|
66
|
+
types?: ("folder" | "file")[] | null | undefined;
|
|
67
67
|
contentTypes?: string[] | null | undefined;
|
|
68
68
|
nodeIds?: string[] | null | undefined;
|
|
69
69
|
}, {
|
|
70
70
|
namespace: string;
|
|
71
71
|
parentId: string | null;
|
|
72
|
-
types?: ("
|
|
72
|
+
types?: ("folder" | "file")[] | null | undefined;
|
|
73
73
|
contentTypes?: string[] | null | undefined;
|
|
74
74
|
nodeIds?: string[] | null | undefined;
|
|
75
75
|
isArchived?: boolean | null | undefined;
|
|
@@ -89,8 +89,8 @@ declare const listDriveTreeInputSchema: z.ZodObject<{
|
|
|
89
89
|
search: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
90
|
filters: z.ZodPipe<z.ZodObject<{
|
|
91
91
|
types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
92
|
-
file: "file";
|
|
93
92
|
folder: "folder";
|
|
93
|
+
file: "file";
|
|
94
94
|
}>>>>;
|
|
95
95
|
contentTypes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
96
96
|
nodeIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
@@ -101,13 +101,13 @@ declare const listDriveTreeInputSchema: z.ZodObject<{
|
|
|
101
101
|
isArchived: boolean;
|
|
102
102
|
namespace: string;
|
|
103
103
|
parentId: string | null;
|
|
104
|
-
types?: ("
|
|
104
|
+
types?: ("folder" | "file")[] | null | undefined;
|
|
105
105
|
contentTypes?: string[] | null | undefined;
|
|
106
106
|
nodeIds?: string[] | null | undefined;
|
|
107
107
|
}, {
|
|
108
108
|
namespace: string;
|
|
109
109
|
parentId: string | null;
|
|
110
|
-
types?: ("
|
|
110
|
+
types?: ("folder" | "file")[] | null | undefined;
|
|
111
111
|
contentTypes?: string[] | null | undefined;
|
|
112
112
|
nodeIds?: string[] | null | undefined;
|
|
113
113
|
isArchived?: boolean | null | undefined;
|
|
@@ -127,8 +127,8 @@ declare const getNodesByParentIdInputSchema: z.ZodObject<{
|
|
|
127
127
|
}>>>;
|
|
128
128
|
filters: z.ZodPipe<z.ZodObject<{
|
|
129
129
|
types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
130
|
-
file: "file";
|
|
131
130
|
folder: "folder";
|
|
131
|
+
file: "file";
|
|
132
132
|
}>>>>;
|
|
133
133
|
contentTypes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
134
134
|
nodeIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
@@ -139,13 +139,13 @@ declare const getNodesByParentIdInputSchema: z.ZodObject<{
|
|
|
139
139
|
isArchived: boolean;
|
|
140
140
|
namespace: string;
|
|
141
141
|
parentId: string | null;
|
|
142
|
-
types?: ("
|
|
142
|
+
types?: ("folder" | "file")[] | null | undefined;
|
|
143
143
|
contentTypes?: string[] | null | undefined;
|
|
144
144
|
nodeIds?: string[] | null | undefined;
|
|
145
145
|
}, {
|
|
146
146
|
namespace: string;
|
|
147
147
|
parentId: string | null;
|
|
148
|
-
types?: ("
|
|
148
|
+
types?: ("folder" | "file")[] | null | undefined;
|
|
149
149
|
contentTypes?: string[] | null | undefined;
|
|
150
150
|
nodeIds?: string[] | null | undefined;
|
|
151
151
|
isArchived?: boolean | null | undefined;
|
|
@@ -14,7 +14,7 @@ type GoogleDriveViewProviderProps<TData extends GoogleDriveNode = GoogleDriveNod
|
|
|
14
14
|
queryData: TData[];
|
|
15
15
|
columns?: TableColumnDef<TData>[];
|
|
16
16
|
strategy: ReturnType<typeof useInfiniteStrategy>;
|
|
17
|
-
commands?: CommandDef
|
|
17
|
+
commands?: CommandDef[];
|
|
18
18
|
columnVisibility?: VisibilityState;
|
|
19
19
|
};
|
|
20
20
|
declare function GoogleDriveViewProvider<TData extends GoogleDriveNode = GoogleDriveNode>({
|
|
@@ -15,16 +15,16 @@ import { DataTable, TableConfigProvider, createTableConfig, useTableConfigContex
|
|
|
15
15
|
//#region src/providers/google/components/view.client.tsx
|
|
16
16
|
function GoogleDriveViewProvider({ queryData, columns = googleDriveColumns, strategy, commands, columnVisibility, children, ...props }) {
|
|
17
17
|
const { meta } = useGoogleDriveContext();
|
|
18
|
-
const { selection } = useDriveSelectionContext();
|
|
19
18
|
return /* @__PURE__ */ jsx(TableConfigProvider, {
|
|
20
19
|
config: createTableConfig({
|
|
21
20
|
queryData,
|
|
22
21
|
columns,
|
|
22
|
+
getRowId: (row) => row.id,
|
|
23
23
|
strategy,
|
|
24
24
|
commands,
|
|
25
25
|
meta,
|
|
26
26
|
columnVisibility,
|
|
27
|
-
selection
|
|
27
|
+
selection: useDriveSelectionContext()?.selection
|
|
28
28
|
}),
|
|
29
29
|
children: /* @__PURE__ */ jsx(TableLayout, {
|
|
30
30
|
...props,
|
|
@@ -4,8 +4,8 @@ import * as _tulip_systems_core_data_tables0 from "@tulip-systems/core/data-tabl
|
|
|
4
4
|
//#region src/providers/google/config/filters.d.ts
|
|
5
5
|
declare const googleDriveTreeFilters: {
|
|
6
6
|
types: _tulip_systems_core_data_tables0.ParseFilter<zod.ZodArray<zod.ZodEnum<{
|
|
7
|
-
file: "file";
|
|
8
7
|
folder: "folder";
|
|
8
|
+
file: "file";
|
|
9
9
|
}>>>;
|
|
10
10
|
contentTypes: _tulip_systems_core_data_tables0.ParseFilter<zod.ZodArray<zod.ZodString>>;
|
|
11
11
|
nodeIds: _tulip_systems_core_data_tables0.ParseFilter<zod.ZodArray<zod.ZodString>>;
|
|
@@ -18,8 +18,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
|
|
|
18
18
|
name: z.ZodString;
|
|
19
19
|
namespace: z.ZodString;
|
|
20
20
|
type: z.ZodEnum<{
|
|
21
|
-
file: "file";
|
|
22
21
|
folder: "folder";
|
|
22
|
+
file: "file";
|
|
23
23
|
}>;
|
|
24
24
|
subtype: z.ZodEnum<{
|
|
25
25
|
image: "image";
|
|
@@ -64,8 +64,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
|
|
|
64
64
|
name: z.ZodString;
|
|
65
65
|
namespace: z.ZodString;
|
|
66
66
|
type: z.ZodEnum<{
|
|
67
|
-
file: "file";
|
|
68
67
|
folder: "folder";
|
|
68
|
+
file: "file";
|
|
69
69
|
}>;
|
|
70
70
|
subtype: z.ZodEnum<{
|
|
71
71
|
image: "image";
|
|
@@ -114,8 +114,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
|
|
|
114
114
|
}>>>;
|
|
115
115
|
filters: z.ZodPipe<z.ZodObject<{
|
|
116
116
|
types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
117
|
-
file: "file";
|
|
118
117
|
folder: "folder";
|
|
118
|
+
file: "file";
|
|
119
119
|
}>>>>;
|
|
120
120
|
contentTypes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
121
121
|
nodeIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
@@ -126,13 +126,13 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
|
|
|
126
126
|
isArchived: boolean;
|
|
127
127
|
namespace: string;
|
|
128
128
|
parentId: string | null;
|
|
129
|
-
types?: ("
|
|
129
|
+
types?: ("folder" | "file")[] | null | undefined;
|
|
130
130
|
contentTypes?: string[] | null | undefined;
|
|
131
131
|
nodeIds?: string[] | null | undefined;
|
|
132
132
|
}, {
|
|
133
133
|
namespace: string;
|
|
134
134
|
parentId: string | null;
|
|
135
|
-
types?: ("
|
|
135
|
+
types?: ("folder" | "file")[] | null | undefined;
|
|
136
136
|
contentTypes?: string[] | null | undefined;
|
|
137
137
|
nodeIds?: string[] | null | undefined;
|
|
138
138
|
isArchived?: boolean | null | undefined;
|
|
@@ -144,8 +144,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
|
|
|
144
144
|
name: z.ZodString;
|
|
145
145
|
namespace: z.ZodString;
|
|
146
146
|
type: z.ZodEnum<{
|
|
147
|
-
file: "file";
|
|
148
147
|
folder: "folder";
|
|
148
|
+
file: "file";
|
|
149
149
|
}>;
|
|
150
150
|
subtype: z.ZodEnum<{
|
|
151
151
|
image: "image";
|
|
@@ -195,8 +195,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
|
|
|
195
195
|
search: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
196
196
|
filters: z.ZodPipe<z.ZodObject<{
|
|
197
197
|
types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
198
|
-
file: "file";
|
|
199
198
|
folder: "folder";
|
|
199
|
+
file: "file";
|
|
200
200
|
}>>>>;
|
|
201
201
|
contentTypes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
202
202
|
nodeIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
@@ -207,13 +207,13 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
|
|
|
207
207
|
isArchived: boolean;
|
|
208
208
|
namespace: string;
|
|
209
209
|
parentId: string | null;
|
|
210
|
-
types?: ("
|
|
210
|
+
types?: ("folder" | "file")[] | null | undefined;
|
|
211
211
|
contentTypes?: string[] | null | undefined;
|
|
212
212
|
nodeIds?: string[] | null | undefined;
|
|
213
213
|
}, {
|
|
214
214
|
namespace: string;
|
|
215
215
|
parentId: string | null;
|
|
216
|
-
types?: ("
|
|
216
|
+
types?: ("folder" | "file")[] | null | undefined;
|
|
217
217
|
contentTypes?: string[] | null | undefined;
|
|
218
218
|
nodeIds?: string[] | null | undefined;
|
|
219
219
|
isArchived?: boolean | null | undefined;
|
|
@@ -224,7 +224,7 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
|
|
|
224
224
|
updatedAt: Date;
|
|
225
225
|
name: string;
|
|
226
226
|
namespace: string;
|
|
227
|
-
type: "
|
|
227
|
+
type: "folder" | "file";
|
|
228
228
|
subtype: "image" | "document" | "spreadsheet" | "video" | "audio" | "archive" | "other";
|
|
229
229
|
size: number | null;
|
|
230
230
|
contentType: string | null;
|
|
@@ -255,7 +255,7 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
|
|
|
255
255
|
updatedAt: Date;
|
|
256
256
|
name: string;
|
|
257
257
|
namespace: string;
|
|
258
|
-
type: "
|
|
258
|
+
type: "folder" | "file";
|
|
259
259
|
subtype: "image" | "document" | "spreadsheet" | "video" | "audio" | "archive" | "other";
|
|
260
260
|
size: number | null;
|
|
261
261
|
contentType: string | null;
|
|
@@ -290,7 +290,7 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
|
|
|
290
290
|
updatedAt: Date;
|
|
291
291
|
name: string;
|
|
292
292
|
namespace: string;
|
|
293
|
-
type: "
|
|
293
|
+
type: "folder" | "file";
|
|
294
294
|
subtype: "image" | "document" | "spreadsheet" | "video" | "audio" | "archive" | "other";
|
|
295
295
|
size: number | null;
|
|
296
296
|
contentType: string | null;
|
|
@@ -323,7 +323,7 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
|
|
|
323
323
|
updatedAt: Date;
|
|
324
324
|
name: string;
|
|
325
325
|
namespace: string;
|
|
326
|
-
type: "
|
|
326
|
+
type: "folder" | "file";
|
|
327
327
|
subtype: "image" | "document" | "spreadsheet" | "video" | "audio" | "archive" | "other";
|
|
328
328
|
size: number | null;
|
|
329
329
|
contentType: string | null;
|
|
@@ -362,8 +362,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
|
|
|
362
362
|
name: z.ZodString;
|
|
363
363
|
namespace: z.ZodString;
|
|
364
364
|
type: z.ZodEnum<{
|
|
365
|
-
file: "file";
|
|
366
365
|
folder: "folder";
|
|
366
|
+
file: "file";
|
|
367
367
|
}>;
|
|
368
368
|
subtype: z.ZodEnum<{
|
|
369
369
|
image: "image";
|
|
@@ -415,8 +415,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
|
|
|
415
415
|
name: z.ZodString;
|
|
416
416
|
namespace: z.ZodString;
|
|
417
417
|
type: z.ZodEnum<{
|
|
418
|
-
file: "file";
|
|
419
418
|
folder: "folder";
|
|
419
|
+
file: "file";
|
|
420
420
|
}>;
|
|
421
421
|
subtype: z.ZodEnum<{
|
|
422
422
|
image: "image";
|
|
@@ -465,8 +465,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
|
|
|
465
465
|
name: z.ZodString;
|
|
466
466
|
namespace: z.ZodString;
|
|
467
467
|
type: z.ZodEnum<{
|
|
468
|
-
file: "file";
|
|
469
468
|
folder: "folder";
|
|
469
|
+
file: "file";
|
|
470
470
|
}>;
|
|
471
471
|
subtype: z.ZodEnum<{
|
|
472
472
|
image: "image";
|
|
@@ -514,8 +514,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
|
|
|
514
514
|
name: z.ZodString;
|
|
515
515
|
namespace: z.ZodString;
|
|
516
516
|
type: z.ZodEnum<{
|
|
517
|
-
file: "file";
|
|
518
517
|
folder: "folder";
|
|
518
|
+
file: "file";
|
|
519
519
|
}>;
|
|
520
520
|
subtype: z.ZodEnum<{
|
|
521
521
|
image: "image";
|
|
@@ -563,8 +563,8 @@ declare function createGoogleDriveProcedures<TSchema extends TDatabaseSchema>(dr
|
|
|
563
563
|
name: z.ZodString;
|
|
564
564
|
namespace: z.ZodString;
|
|
565
565
|
type: z.ZodEnum<{
|
|
566
|
-
file: "file";
|
|
567
566
|
folder: "folder";
|
|
567
|
+
file: "file";
|
|
568
568
|
}>;
|
|
569
569
|
subtype: z.ZodEnum<{
|
|
570
570
|
image: "image";
|
|
@@ -5,7 +5,7 @@ import * as nuqs_server0 from "nuqs/server";
|
|
|
5
5
|
* Filters
|
|
6
6
|
*/
|
|
7
7
|
declare const googleDriveTreeFilterSearchParams: {
|
|
8
|
-
readonly types: nuqs_server0.SingleParserBuilder<("
|
|
8
|
+
readonly types: nuqs_server0.SingleParserBuilder<("folder" | "file")[] | null>;
|
|
9
9
|
readonly contentTypes: nuqs_server0.SingleParserBuilder<string[] | null>;
|
|
10
10
|
readonly nodeIds: nuqs_server0.SingleParserBuilder<string[] | null>;
|
|
11
11
|
readonly isArchived: nuqs_server0.SingleParserBuilder<boolean | null>;
|
|
@@ -13,8 +13,8 @@ declare const googleDriveNodeSchema: z$1.ZodObject<{
|
|
|
13
13
|
name: z$1.ZodString;
|
|
14
14
|
namespace: z$1.ZodString;
|
|
15
15
|
type: z$1.ZodEnum<{
|
|
16
|
-
file: "file";
|
|
17
16
|
folder: "folder";
|
|
17
|
+
file: "file";
|
|
18
18
|
}>;
|
|
19
19
|
subtype: z$1.ZodEnum<{
|
|
20
20
|
image: "image";
|
|
@@ -66,8 +66,8 @@ declare const googleDriveNodeWithChildrenSchema: z$1.ZodObject<{
|
|
|
66
66
|
name: z$1.ZodString;
|
|
67
67
|
namespace: z$1.ZodString;
|
|
68
68
|
type: z$1.ZodEnum<{
|
|
69
|
-
file: "file";
|
|
70
69
|
folder: "folder";
|
|
70
|
+
file: "file";
|
|
71
71
|
}>;
|
|
72
72
|
subtype: z$1.ZodEnum<{
|
|
73
73
|
image: "image";
|
|
@@ -112,8 +112,8 @@ declare const googleDriveNodeWithChildrenSchema: z$1.ZodObject<{
|
|
|
112
112
|
name: z$1.ZodString;
|
|
113
113
|
namespace: z$1.ZodString;
|
|
114
114
|
type: z$1.ZodEnum<{
|
|
115
|
-
file: "file";
|
|
116
115
|
folder: "folder";
|
|
116
|
+
file: "file";
|
|
117
117
|
}>;
|
|
118
118
|
subtype: z$1.ZodEnum<{
|
|
119
119
|
image: "image";
|
|
@@ -193,8 +193,8 @@ type UploadGoogleDriveFileSchema = z$1.infer<typeof uploadGoogleDriveFileInputSc
|
|
|
193
193
|
*/
|
|
194
194
|
declare const googleDriveTableFiltersSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
195
195
|
types: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodEnum<{
|
|
196
|
-
file: "file";
|
|
197
196
|
folder: "folder";
|
|
197
|
+
file: "file";
|
|
198
198
|
}>>>>;
|
|
199
199
|
contentTypes: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
|
|
200
200
|
nodeIds: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
|
|
@@ -205,13 +205,13 @@ declare const googleDriveTableFiltersSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
|
205
205
|
isArchived: boolean;
|
|
206
206
|
namespace: string;
|
|
207
207
|
parentId: string | null;
|
|
208
|
-
types?: ("
|
|
208
|
+
types?: ("folder" | "file")[] | null | undefined;
|
|
209
209
|
contentTypes?: string[] | null | undefined;
|
|
210
210
|
nodeIds?: string[] | null | undefined;
|
|
211
211
|
}, {
|
|
212
212
|
namespace: string;
|
|
213
213
|
parentId: string | null;
|
|
214
|
-
types?: ("
|
|
214
|
+
types?: ("folder" | "file")[] | null | undefined;
|
|
215
215
|
contentTypes?: string[] | null | undefined;
|
|
216
216
|
nodeIds?: string[] | null | undefined;
|
|
217
217
|
isArchived?: boolean | null | undefined;
|
|
@@ -233,8 +233,8 @@ declare const listGoogleDriveTreeInputSchema: z$1.ZodObject<{
|
|
|
233
233
|
search: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
234
234
|
filters: z$1.ZodPipe<z$1.ZodObject<{
|
|
235
235
|
types: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodEnum<{
|
|
236
|
-
file: "file";
|
|
237
236
|
folder: "folder";
|
|
237
|
+
file: "file";
|
|
238
238
|
}>>>>;
|
|
239
239
|
contentTypes: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
|
|
240
240
|
nodeIds: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
|
|
@@ -245,13 +245,13 @@ declare const listGoogleDriveTreeInputSchema: z$1.ZodObject<{
|
|
|
245
245
|
isArchived: boolean;
|
|
246
246
|
namespace: string;
|
|
247
247
|
parentId: string | null;
|
|
248
|
-
types?: ("
|
|
248
|
+
types?: ("folder" | "file")[] | null | undefined;
|
|
249
249
|
contentTypes?: string[] | null | undefined;
|
|
250
250
|
nodeIds?: string[] | null | undefined;
|
|
251
251
|
}, {
|
|
252
252
|
namespace: string;
|
|
253
253
|
parentId: string | null;
|
|
254
|
-
types?: ("
|
|
254
|
+
types?: ("folder" | "file")[] | null | undefined;
|
|
255
255
|
contentTypes?: string[] | null | undefined;
|
|
256
256
|
nodeIds?: string[] | null | undefined;
|
|
257
257
|
isArchived?: boolean | null | undefined;
|
|
@@ -272,8 +272,8 @@ declare const getGoogleDriveNodesByParentIdInputSchema: z$1.ZodObject<{
|
|
|
272
272
|
}>>>;
|
|
273
273
|
filters: z$1.ZodPipe<z$1.ZodObject<{
|
|
274
274
|
types: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodEnum<{
|
|
275
|
-
file: "file";
|
|
276
275
|
folder: "folder";
|
|
276
|
+
file: "file";
|
|
277
277
|
}>>>>;
|
|
278
278
|
contentTypes: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
|
|
279
279
|
nodeIds: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
|
|
@@ -284,13 +284,13 @@ declare const getGoogleDriveNodesByParentIdInputSchema: z$1.ZodObject<{
|
|
|
284
284
|
isArchived: boolean;
|
|
285
285
|
namespace: string;
|
|
286
286
|
parentId: string | null;
|
|
287
|
-
types?: ("
|
|
287
|
+
types?: ("folder" | "file")[] | null | undefined;
|
|
288
288
|
contentTypes?: string[] | null | undefined;
|
|
289
289
|
nodeIds?: string[] | null | undefined;
|
|
290
290
|
}, {
|
|
291
291
|
namespace: string;
|
|
292
292
|
parentId: string | null;
|
|
293
|
-
types?: ("
|
|
293
|
+
types?: ("folder" | "file")[] | null | undefined;
|
|
294
294
|
contentTypes?: string[] | null | undefined;
|
|
295
295
|
nodeIds?: string[] | null | undefined;
|
|
296
296
|
isArchived?: boolean | null | undefined;
|
|
@@ -11,7 +11,7 @@ type LocalDriveViewProviderProps<TData extends LocalDriveNodeWithAsset = LocalDr
|
|
|
11
11
|
queryData: TData[];
|
|
12
12
|
columns?: TableColumnDef<TData>[];
|
|
13
13
|
strategy: ReturnType<typeof useInfiniteStrategy>;
|
|
14
|
-
commands?: CommandDef
|
|
14
|
+
commands?: CommandDef[];
|
|
15
15
|
columnVisibility?: VisibilityState;
|
|
16
16
|
};
|
|
17
17
|
declare function LocalDriveViewProvider<TData extends LocalDriveNodeWithAsset = LocalDriveNodeWithAsset>({
|
|
@@ -17,16 +17,16 @@ import { DataTable, TableConfigProvider, createTableConfig, useTableConfigContex
|
|
|
17
17
|
//#region src/providers/local/components/view.client.tsx
|
|
18
18
|
function LocalDriveViewProvider({ queryData, columns = localDriveColumns, strategy, commands, columnVisibility, children, ...props }) {
|
|
19
19
|
const { meta } = useLocalDriveContext();
|
|
20
|
-
const { selection } = useDriveSelectionContext();
|
|
21
20
|
return /* @__PURE__ */ jsx(TableConfigProvider, {
|
|
22
21
|
config: createTableConfig({
|
|
23
22
|
queryData,
|
|
24
23
|
columns,
|
|
24
|
+
getRowId: (row) => row.id,
|
|
25
25
|
strategy,
|
|
26
26
|
commands,
|
|
27
27
|
meta,
|
|
28
28
|
columnVisibility,
|
|
29
|
-
selection
|
|
29
|
+
selection: useDriveSelectionContext()?.selection
|
|
30
30
|
}),
|
|
31
31
|
children: /* @__PURE__ */ jsx(TableLayout, {
|
|
32
32
|
...props,
|
|
@@ -14,8 +14,8 @@ declare const localDriveFilters: {
|
|
|
14
14
|
}>>>;
|
|
15
15
|
hidden: _tulip_systems_core_data_tables0.ParseFilter<z$1.ZodBoolean>;
|
|
16
16
|
types: _tulip_systems_core_data_tables0.ParseFilter<z$1.ZodArray<z$1.ZodEnum<{
|
|
17
|
-
file: "file";
|
|
18
17
|
folder: "folder";
|
|
18
|
+
file: "file";
|
|
19
19
|
}>>>;
|
|
20
20
|
contentTypes: _tulip_systems_core_data_tables0.ParseFilter<z$1.ZodArray<z$1.ZodString>>;
|
|
21
21
|
nodeIds: _tulip_systems_core_data_tables0.ParseFilter<z$1.ZodArray<z$1.ZodString>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { nodes } from "../lib/schema.mjs";
|
|
2
|
+
import { asc, getTableColumns } from "drizzle-orm";
|
|
3
|
+
import { createTableQuerySortingParser } from "@tulip-systems/core/data-tables/server";
|
|
4
|
+
|
|
5
|
+
//#region src/providers/local/config/sorting.ts
|
|
6
|
+
/**
|
|
7
|
+
* Local Drive specific sorting config
|
|
8
|
+
*/
|
|
9
|
+
const localDriveTableQuerySortingConfig = getTableColumns(nodes);
|
|
10
|
+
/**
|
|
11
|
+
* Local Drive specific sorting parser
|
|
12
|
+
*/
|
|
13
|
+
const parseLocalDriveTableQuerySorting = createTableQuerySortingParser(localDriveTableQuerySortingConfig, { fallback: asc(nodes.createdAt) });
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { parseLocalDriveTableQuerySorting };
|