@constructive-io/sheets 0.13.0 → 0.14.1
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/README.md +10 -1
- package/dist/advanced.cjs +555 -680
- package/dist/advanced.cjs.map +1 -1
- package/dist/advanced.d.cts +2 -2
- package/dist/advanced.d.ts +2 -2
- package/dist/advanced.js +4 -4
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.js +2 -2
- package/dist/{chunk-PZL2BCWF.js → chunk-6Y7CZ5VS.js} +2 -2
- package/dist/chunk-6Y7CZ5VS.js.map +1 -0
- package/dist/{chunk-26J3DVW7.js → chunk-BGL6EBTE.js} +116 -173
- package/dist/chunk-BGL6EBTE.js.map +1 -0
- package/dist/{chunk-MXVNIKES.js → chunk-BYAYBXVB.js} +2 -2
- package/dist/{chunk-CBXNKMN6.js → chunk-ER3FIDK7.js} +444 -458
- package/dist/chunk-ER3FIDK7.js.map +1 -0
- package/dist/chunk-GZM2CSTR.js +279 -0
- package/dist/chunk-GZM2CSTR.js.map +1 -0
- package/dist/{chunk-H5HR5HUJ.js → chunk-YJZFHL2D.js} +1 -1
- package/dist/chunk-YJZFHL2D.js.map +1 -0
- package/dist/{date-editor-ZFNDKYBD.js → date-editor-G26WKILO.js} +2 -2
- package/dist/{grid-cell-types-Pbe2m2tE.d.ts → grid-cell-types-C2-ocDS7.d.cts} +45 -5
- package/dist/{grid-cell-types-Pbe2m2tE.d.cts → grid-cell-types-C2-ocDS7.d.ts} +45 -5
- package/dist/index.cjs +789 -607
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +106 -112
- package/dist/index.d.ts +106 -112
- package/dist/index.js +234 -134
- package/dist/index.js.map +1 -1
- package/dist/{sheets-context-Cu3Ec_ca.d.ts → sheets-context-CHUVJCff.d.ts} +32 -31
- package/dist/{sheets-context-CY1RmDKL.d.cts → sheets-context-C_MkTxXm.d.cts} +32 -31
- package/dist/testing.cjs +128 -57
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +16 -4
- package/dist/testing.js.map +1 -1
- package/package.json +5 -4
- package/dist/chunk-26J3DVW7.js.map +0 -1
- package/dist/chunk-CBXNKMN6.js.map +0 -1
- package/dist/chunk-H5HR5HUJ.js.map +0 -1
- package/dist/chunk-HETVHNMD.js +0 -123
- package/dist/chunk-HETVHNMD.js.map +0 -1
- package/dist/chunk-PZL2BCWF.js.map +0 -1
- /package/dist/{chunk-MXVNIKES.js.map → chunk-BYAYBXVB.js.map} +0 -0
- /package/dist/{date-editor-ZFNDKYBD.js.map → date-editor-G26WKILO.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { Component, ReactNode, ErrorInfo } from 'react';
|
|
3
|
-
import { b as SheetsConfig, S as SheetsExecuteFn, C as CellProps, c as CellTypeDefinition, d as SheetsCellRenderContext, e as CellTypeMatchInput, f as SheetsScopeKey, a as SheetsUploadFn,
|
|
4
|
-
export { A as AdapterListQuery,
|
|
3
|
+
import { b as SheetsConfig, S as SheetsExecuteFn, C as CellProps, c as CellTypeDefinition, d as SheetsCellRenderContext, e as CellTypeMatchInput, f as SheetsScopeKey, g as SheetsFileValue, a as SheetsUploadFn, h as SheetsBackendAdapter } from './sheets-context-C_MkTxXm.cjs';
|
|
4
|
+
export { A as AdapterListQuery, i as AdapterListResult, j as AdapterPageInfo, k as AdapterTableContext, l as CellColumnDescriptor, m as CellTypePlugin, n as SheetsAuthEmbedded, o as SheetsAuthStandalone, p as SheetsContext, q as SheetsContextValue, r as SheetsLogger, s as SheetsUploadResult, t as createSheetsExecute, u as createSheetsUpload, v as defineCellType, w as useSheetsContext } from './sheets-context-C_MkTxXm.cjs';
|
|
5
5
|
import { StoreApi } from 'zustand';
|
|
6
|
-
import { R as RelationInfo, d as RelationInfoSlice, E as EditorProps, F as FieldMetadata, S as SheetsCell,
|
|
7
|
-
export { B as BaseCellProps, c as CellCategory,
|
|
8
|
-
import { RowIdentityValue, TableWriteCapability, MetaTable as MetaTable$1, FieldSelection, MutationOptions, PageInfo, MetaQuery, QueryOptions, Filter } from '@constructive-io/data';
|
|
9
|
-
export { ConstructiveError } from '@constructive-io/data';
|
|
6
|
+
import { R as RelationInfo, d as RelationInfoSlice, E as EditorProps, e as SheetsRowIdentifier, F as FieldMetadata, S as SheetsCell, D as DraftSubmitResult, f as CellRegistryEntry, b as CellType, g as CellRenderer, h as CellPlugin, i as ColumnSchema } from './grid-cell-types-C2-ocDS7.cjs';
|
|
7
|
+
export { B as BaseCellProps, c as CellCategory, j as CellValue, k as FieldMetadata, l as RelationKind, m as RowData, a as SheetsCellKind, n as SheetsRowIdentityResolution, T as TableSchema, o as buildRelationInfoFromMeta, p as canRunSheetsMutation, q as getSheetsWriteCapability, r as isImageField, s as resolveCellType, t as resolveSheetsIdentifier, u as resolveSheetsRowIdentity, v as sheetsIdentifierCacheKey, w as sheetsIdentifierToWhere, x as sheetsRowKey } from './grid-cell-types-C2-ocDS7.cjs';
|
|
10
8
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
11
9
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
10
|
+
import { FieldSelection, MutationOptions, PageInfo, MetaQuery, QueryOptions, Filter, MetaTable as MetaTable$1 } from '@constructive-io/data';
|
|
11
|
+
export { ConstructiveError } from '@constructive-io/data';
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
export { SheetsAuthGate, SheetsAuthGateProps, useSheetsForgotPassword, useSheetsLogin, useSheetsRegister, useSheetsResetPassword } from './auth.cjs';
|
|
14
14
|
import 'graphql';
|
|
@@ -27,14 +27,12 @@ declare function SheetsProvider({ config, children }: SheetsProviderProps): reac
|
|
|
27
27
|
* 2. Call the presigned upload op (discovered via introspection) to get a
|
|
28
28
|
* presigned PUT url + fileId
|
|
29
29
|
* 3. PUT the raw bytes to that url (only Content-Type, NO Authorization)
|
|
30
|
-
* 4.
|
|
30
|
+
* 4. Return the file projection and try to resolve an optional download URL
|
|
31
31
|
*
|
|
32
|
-
*
|
|
33
|
-
* row inside the upload op, so `downloadUrl` resolves immediately.
|
|
32
|
+
* The server confirms PUTs and expires rows that never received one.
|
|
34
33
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* whose input + payload carry the upload shape.
|
|
34
|
+
* Runtime introspection finds root mutations with the presigned upload shape
|
|
35
|
+
* and prefers `uploadAppFile` when multiple storage planes are exposed.
|
|
38
36
|
*
|
|
39
37
|
* The downloadUrl-by-id field is likewise shape-discovered. Three read shapes,
|
|
40
38
|
* preferred in order: the inflected singular `appFile(id:)`; a filtered
|
|
@@ -49,7 +47,7 @@ declare function SheetsProvider({ config, children }: SheetsProviderProps): reac
|
|
|
49
47
|
*
|
|
50
48
|
* `downloadUrl` is a Grafast computed field, so it cannot be selected through the
|
|
51
49
|
* runtime query builder (`buildSelect` intersects the select against pg columns and
|
|
52
|
-
* drops computed fields). This discovers the by-id field
|
|
50
|
+
* drops computed fields). This discovers the by-id field using cached introspection
|
|
53
51
|
* and reads it through the SAME resolver the upload path uses. Returns null on any
|
|
54
52
|
* failure — a missing url is not exceptional for the caller (it just disables
|
|
55
53
|
* copy/download), so the throwing internals are swallowed here.
|
|
@@ -321,39 +319,6 @@ declare function extendRangeToCell(sel: SheetsSelection, col: number, row: numbe
|
|
|
321
319
|
*/
|
|
322
320
|
declare function moveActive(sel: SheetsSelection, dCol: number, dRow: number, colCount: number, rowCount: number): SheetsSelection;
|
|
323
321
|
|
|
324
|
-
/** A row locator accepted by Sheets CRUD operations. */
|
|
325
|
-
type SheetsRowIdentifier = string | number | Readonly<Record<string, RowIdentityValue>>;
|
|
326
|
-
type SheetsMutationOperation = 'create' | 'update' | 'delete';
|
|
327
|
-
type SheetsRowIdentityResolution = Readonly<{
|
|
328
|
-
status: 'identified';
|
|
329
|
-
/** Backwards-compatible scalar for an ordinary `id` PK; otherwise the PK object. */
|
|
330
|
-
identifier: SheetsRowIdentifier;
|
|
331
|
-
/** GraphQL primary-key input, including renamed and composite keys. */
|
|
332
|
-
primaryKey: Readonly<Record<string, RowIdentityValue>>;
|
|
333
|
-
/** Stable, schema-qualified key used by caches, selection, and editors. */
|
|
334
|
-
key: string;
|
|
335
|
-
}> | Readonly<{
|
|
336
|
-
status: 'unavailable';
|
|
337
|
-
reason: 'no-primary-key' | 'invalid-row';
|
|
338
|
-
}>;
|
|
339
|
-
/**
|
|
340
|
-
* Resolve one server row from `_meta`. The familiar scalar `id` contract is kept
|
|
341
|
-
* for existing adapters, while renamed and composite keys use the full PK input.
|
|
342
|
-
*/
|
|
343
|
-
declare function resolveSheetsRowIdentity(table: MetaTable$1, row: Readonly<Record<string, unknown>>): SheetsRowIdentityResolution;
|
|
344
|
-
/** Resolve a public CRUD identifier through the same `_meta` identity contract. */
|
|
345
|
-
declare function resolveSheetsIdentifier(table: MetaTable$1, identifier: SheetsRowIdentifier): SheetsRowIdentityResolution;
|
|
346
|
-
/** Build the PostGraphile connection filter used by `findOne`. */
|
|
347
|
-
declare function sheetsIdentifierToWhere(table: MetaTable$1, identifier: SheetsRowIdentifier): Record<string, {
|
|
348
|
-
equalTo: RowIdentityValue;
|
|
349
|
-
}> | null;
|
|
350
|
-
/** Use scalar IDs as cache keys for compatibility; use serialized identities otherwise. */
|
|
351
|
-
declare function sheetsIdentifierCacheKey(table: MetaTable$1, identifier: SheetsRowIdentifier): string | number | null;
|
|
352
|
-
/** Stable TanStack/selection/editor key with an index fallback only for non-writable rows. */
|
|
353
|
-
declare function sheetsRowKey(table: MetaTable$1, row: Readonly<Record<string, unknown>>, index: number): string;
|
|
354
|
-
declare function getSheetsWriteCapability(table: MetaTable$1 | null): TableWriteCapability | null;
|
|
355
|
-
declare function canRunSheetsMutation(capability: TableWriteCapability | null, operation: SheetsMutationOperation): boolean;
|
|
356
|
-
|
|
357
322
|
/** A single cell write request. */
|
|
358
323
|
interface CellWrite {
|
|
359
324
|
rowIndex: number;
|
|
@@ -795,12 +760,6 @@ interface CellTypeRegistry {
|
|
|
795
760
|
*/
|
|
796
761
|
declare function createCellTypeRegistry(cellTypes: CellTypeDefinition<any>[], builtins: CellTypeBuiltins): CellTypeRegistry;
|
|
797
762
|
|
|
798
|
-
/** Result of submitting a draft row */
|
|
799
|
-
interface DraftSubmitResult {
|
|
800
|
-
/** The created row with its metadata-defined primary-key fields. */
|
|
801
|
-
createdRow: Record<string, unknown> | null;
|
|
802
|
-
}
|
|
803
|
-
|
|
804
763
|
/** Resolved DOM cell payload: the neutral cell plus its (optional) view component. */
|
|
805
764
|
interface SheetsCellResolution {
|
|
806
765
|
cell: SheetsCell;
|
|
@@ -813,6 +772,9 @@ interface SheetsCellResolution {
|
|
|
813
772
|
* of the `meta.cellType` the cell itself now self-describes.)
|
|
814
773
|
*/
|
|
815
774
|
typeKey: string;
|
|
775
|
+
/** Typed server row locator, separate from the grid's string key. */
|
|
776
|
+
rowIdentifier?: SheetsRowIdentifier | null;
|
|
777
|
+
readOnlyReason?: string;
|
|
816
778
|
/** Field metadata for the column — fed to a native overlay editor's EditorProps.fieldMeta. */
|
|
817
779
|
fieldMeta?: FieldMetadata;
|
|
818
780
|
/** Relation info for the column (when relational) — fed to a native overlay editor's EditorProps.relationInfo. */
|
|
@@ -1220,26 +1182,13 @@ interface UseSheetsTableCursorResult<TData extends RowRecord = RowRecord> {
|
|
|
1220
1182
|
}
|
|
1221
1183
|
declare function useSheetsTableCursor<TData extends RowRecord = RowRecord>(tableName: string, options?: UseSheetsTableCursorOptions): UseSheetsTableCursorResult<TData>;
|
|
1222
1184
|
|
|
1223
|
-
/**
|
|
1224
|
-
* Upload progress callback type
|
|
1225
|
-
*/
|
|
1226
1185
|
interface UploadProgress {
|
|
1227
1186
|
loaded: number;
|
|
1228
1187
|
total: number;
|
|
1229
1188
|
percentage: number;
|
|
1230
1189
|
}
|
|
1231
|
-
/**
|
|
1232
|
-
|
|
1233
|
-
*/
|
|
1234
|
-
interface UploadResponse {
|
|
1235
|
-
url: string;
|
|
1236
|
-
filename: string;
|
|
1237
|
-
mime: string;
|
|
1238
|
-
size: number;
|
|
1239
|
-
}
|
|
1240
|
-
/**
|
|
1241
|
-
* Field upload options
|
|
1242
|
-
*/
|
|
1190
|
+
/** The value confirmed by the row update. Attachments store a public URL as text. */
|
|
1191
|
+
type UploadResponse = SheetsFileValue | string | null;
|
|
1243
1192
|
interface UseFieldUploadOptions {
|
|
1244
1193
|
onProgress?: (progress: UploadProgress) => void;
|
|
1245
1194
|
onSuccess?: (data: UploadResponse) => void;
|
|
@@ -1248,59 +1197,104 @@ interface UseFieldUploadOptions {
|
|
|
1248
1197
|
successMessage?: string;
|
|
1249
1198
|
successToastDelayMs?: number;
|
|
1250
1199
|
}
|
|
1251
|
-
interface
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1200
|
+
interface FieldUploadTarget {
|
|
1201
|
+
table: MetaTable$1;
|
|
1202
|
+
allTables?: readonly MetaTable$1[];
|
|
1203
|
+
fieldName: string;
|
|
1204
|
+
recordId: SheetsRowIdentifier;
|
|
1256
1205
|
}
|
|
1257
|
-
interface
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
* `execute`/`executeUpload` here so injected/mock implementations intercept
|
|
1262
|
-
* both steps. When omitted (e.g. image-editor's direct retry path), the
|
|
1263
|
-
* functions are built from `endpoint`/`getToken`/`onAuthError` via the same
|
|
1264
|
-
* factories — never a raw fetch.
|
|
1265
|
-
*/
|
|
1266
|
-
execute?: SheetsExecuteFn;
|
|
1267
|
-
executeUpload?: SheetsUploadFn;
|
|
1206
|
+
interface FieldUploadTransport {
|
|
1207
|
+
execute: SheetsExecuteFn;
|
|
1208
|
+
executeUpload: SheetsUploadFn;
|
|
1209
|
+
adapter: Pick<SheetsBackendAdapter, 'updateRow'>;
|
|
1268
1210
|
onProgress?: (progress: UploadProgress) => void;
|
|
1269
1211
|
}
|
|
1270
|
-
/**
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1212
|
+
/** Upload and persist a media value, or pass null to clear the cell. */
|
|
1213
|
+
declare function executeFieldUpload({ table: meta, allTables, fieldName, recordId }: FieldUploadTarget, file: File | null, { execute, executeUpload, adapter, onProgress }: FieldUploadTransport): Promise<UploadResponse>;
|
|
1214
|
+
declare function useSheetsFieldUpload(tableName: string, fieldName: string, recordId: SheetsRowIdentifier | null, options?: UseFieldUploadOptions): {
|
|
1215
|
+
write: (id: SheetsRowIdentifier, file: File | null) => Promise<UploadResponse>;
|
|
1216
|
+
resolveRowIdentifier: (row: Readonly<Record<string, unknown>>) => SheetsRowIdentifier | null;
|
|
1217
|
+
data: undefined;
|
|
1218
|
+
variables: undefined;
|
|
1219
|
+
error: null;
|
|
1220
|
+
isError: false;
|
|
1221
|
+
isIdle: true;
|
|
1222
|
+
isPending: false;
|
|
1223
|
+
isSuccess: false;
|
|
1224
|
+
status: "idle";
|
|
1225
|
+
mutate: _tanstack_react_query.UseMutateFunction<UploadResponse, Error, File | null, unknown>;
|
|
1226
|
+
reset: () => void;
|
|
1227
|
+
context: unknown;
|
|
1228
|
+
failureCount: number;
|
|
1229
|
+
failureReason: Error | null;
|
|
1230
|
+
isPaused: boolean;
|
|
1231
|
+
submittedAt: number;
|
|
1232
|
+
mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<UploadResponse, Error, File | null, unknown>;
|
|
1233
|
+
} | {
|
|
1234
|
+
write: (id: SheetsRowIdentifier, file: File | null) => Promise<UploadResponse>;
|
|
1235
|
+
resolveRowIdentifier: (row: Readonly<Record<string, unknown>>) => SheetsRowIdentifier | null;
|
|
1236
|
+
data: undefined;
|
|
1237
|
+
variables: File | null;
|
|
1238
|
+
error: null;
|
|
1239
|
+
isError: false;
|
|
1240
|
+
isIdle: false;
|
|
1241
|
+
isPending: true;
|
|
1242
|
+
isSuccess: false;
|
|
1243
|
+
status: "pending";
|
|
1244
|
+
mutate: _tanstack_react_query.UseMutateFunction<UploadResponse, Error, File | null, unknown>;
|
|
1245
|
+
reset: () => void;
|
|
1246
|
+
context: unknown;
|
|
1247
|
+
failureCount: number;
|
|
1248
|
+
failureReason: Error | null;
|
|
1249
|
+
isPaused: boolean;
|
|
1250
|
+
submittedAt: number;
|
|
1251
|
+
mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<UploadResponse, Error, File | null, unknown>;
|
|
1252
|
+
} | {
|
|
1253
|
+
write: (id: SheetsRowIdentifier, file: File | null) => Promise<UploadResponse>;
|
|
1254
|
+
resolveRowIdentifier: (row: Readonly<Record<string, unknown>>) => SheetsRowIdentifier | null;
|
|
1255
|
+
data: undefined;
|
|
1256
|
+
error: Error;
|
|
1257
|
+
variables: File | null;
|
|
1258
|
+
isError: true;
|
|
1259
|
+
isIdle: false;
|
|
1260
|
+
isPending: false;
|
|
1261
|
+
isSuccess: false;
|
|
1262
|
+
status: "error";
|
|
1263
|
+
mutate: _tanstack_react_query.UseMutateFunction<UploadResponse, Error, File | null, unknown>;
|
|
1264
|
+
reset: () => void;
|
|
1265
|
+
context: unknown;
|
|
1266
|
+
failureCount: number;
|
|
1267
|
+
failureReason: Error | null;
|
|
1268
|
+
isPaused: boolean;
|
|
1269
|
+
submittedAt: number;
|
|
1270
|
+
mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<UploadResponse, Error, File | null, unknown>;
|
|
1271
|
+
} | {
|
|
1272
|
+
write: (id: SheetsRowIdentifier, file: File | null) => Promise<UploadResponse>;
|
|
1273
|
+
resolveRowIdentifier: (row: Readonly<Record<string, unknown>>) => SheetsRowIdentifier | null;
|
|
1274
|
+
data: UploadResponse;
|
|
1275
|
+
error: null;
|
|
1276
|
+
variables: File | null;
|
|
1277
|
+
isError: false;
|
|
1278
|
+
isIdle: false;
|
|
1279
|
+
isPending: false;
|
|
1280
|
+
isSuccess: true;
|
|
1281
|
+
status: "success";
|
|
1282
|
+
mutate: _tanstack_react_query.UseMutateFunction<UploadResponse, Error, File | null, unknown>;
|
|
1283
|
+
reset: () => void;
|
|
1284
|
+
context: unknown;
|
|
1285
|
+
failureCount: number;
|
|
1286
|
+
failureReason: Error | null;
|
|
1287
|
+
isPaused: boolean;
|
|
1288
|
+
submittedAt: number;
|
|
1289
|
+
mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<UploadResponse, Error, File | null, unknown>;
|
|
1290
|
+
};
|
|
1298
1291
|
|
|
1299
1292
|
declare function isSheetsScopeKey(value: unknown): value is SheetsScopeKey;
|
|
1300
1293
|
declare const sheetsQueryKeys: {
|
|
1301
1294
|
readonly root: readonly ["sheets"];
|
|
1302
1295
|
readonly scope: (scope: SheetsScopeKey) => readonly ["sheets", SheetsScopeKey];
|
|
1303
1296
|
readonly meta: (scope: SheetsScopeKey) => readonly ["sheets", SheetsScopeKey, "meta"];
|
|
1297
|
+
readonly mediaUrl: (scope: SheetsScopeKey, endpoint: string | undefined, id: string | null) => readonly ["sheets", SheetsScopeKey, "media-url", string | undefined, string | null];
|
|
1304
1298
|
readonly typeFields: (scope: SheetsScopeKey, typeName: string) => readonly ["sheets", SheetsScopeKey, "type-fields", string];
|
|
1305
1299
|
readonly enumValues: (scope: SheetsScopeKey, typeName: string) => readonly ["sheets", SheetsScopeKey, "enum-values", string];
|
|
1306
1300
|
readonly relations: (scope: SheetsScopeKey, tableName: string) => readonly ["sheets", SheetsScopeKey, "relations", string];
|
|
@@ -1734,4 +1728,4 @@ declare function useDataPagination({ initialPageSize, initialPageIndex, totalCou
|
|
|
1734
1728
|
}) => any;
|
|
1735
1729
|
};
|
|
1736
1730
|
|
|
1737
|
-
export { BOOLEAN_TYPES, BUILTIN_EDITOR_TYPES, type Binding, CellPlugin, CellProps, CellRegistry, CellRegistryEntry, CellRenderer, type CellSlot, type CellSlots, CellType, type CellTypeBuiltins, CellTypeDefinition, CellTypeMatchInput, type CellTypeRegistry, ColumnSchema, type CommandResult, DATE_TIME_TYPES, type DataFilteringContextValue, type DataPaginationContextValue, type DispatchEvent, DockStatusBar, DockStatusBarCompact, type DraftMeta, type DraftRow, type DynamicFormSpec, ENHANCED_TYPES, EditorProps, type ExtractedRange, FeedbackProvider, type FieldTypeMap, type FilterCondition, type FilterGroup, type FilterNode, type FilterValue, FloatingStatus, GEOMETRY_TYPES, type GridCommand, type GridCommandContext, type Interceptor, MAX_FILTER_DEPTH, MEDIA_TYPES, type MetaField, type MetaTable, NON_EDITABLE_TYPES, NUMBER_TYPES, type OperationFeedback, RangeSet, type RelationColumnInfo, RelationInfo, type RowWithDraft, STRUCTURED_DATA_TYPES, type ScalarFieldSpec, type SelectionCurrent, type SelectionRect, Sheets, type SheetsAuthState, SheetsBackendAdapter, SheetsCell, SheetsCellRenderContext, SheetsConfig, SheetsControls, type SheetsControlsProps, type SheetsDraftBindings, SheetsEmptyState, SheetsErrorBoundary, SheetsErrorState, type SheetsEvent, SheetsExecuteFn, type SheetsHandle, SheetsLoadingState, SheetsPagination, type SheetsPaginationBindings, type SheetsPaginationProps, type SheetsProps, SheetsProvider, type SheetsRow,
|
|
1731
|
+
export { BOOLEAN_TYPES, BUILTIN_EDITOR_TYPES, type Binding, CellPlugin, CellProps, CellRegistry, CellRegistryEntry, CellRenderer, type CellSlot, type CellSlots, CellType, type CellTypeBuiltins, CellTypeDefinition, CellTypeMatchInput, type CellTypeRegistry, ColumnSchema, type CommandResult, DATE_TIME_TYPES, type DataFilteringContextValue, type DataPaginationContextValue, type DispatchEvent, DockStatusBar, DockStatusBarCompact, type DraftMeta, type DraftRow, type DynamicFormSpec, ENHANCED_TYPES, EditorProps, type ExtractedRange, FeedbackProvider, type FieldTypeMap, type FilterCondition, type FilterGroup, type FilterNode, type FilterValue, FloatingStatus, GEOMETRY_TYPES, type GridCommand, type GridCommandContext, type Interceptor, MAX_FILTER_DEPTH, MEDIA_TYPES, type MetaField, type MetaTable, NON_EDITABLE_TYPES, NUMBER_TYPES, type OperationFeedback, RangeSet, type RelationColumnInfo, RelationInfo, type RowWithDraft, STRUCTURED_DATA_TYPES, type ScalarFieldSpec, type SelectionCurrent, type SelectionRect, Sheets, type SheetsAuthState, SheetsBackendAdapter, SheetsCell, SheetsCellRenderContext, SheetsConfig, SheetsControls, type SheetsControlsProps, type SheetsDraftBindings, SheetsEmptyState, SheetsErrorBoundary, SheetsErrorState, type SheetsEvent, SheetsExecuteFn, SheetsFileValue, type SheetsHandle, SheetsLoadingState, SheetsPagination, type SheetsPaginationBindings, type SheetsPaginationProps, type SheetsProps, SheetsProvider, type SheetsRow, SheetsRowIdentifier, SheetsScopeKey, type SheetsSelection, type SheetsSelectionBindings, type SheetsSlots, type SheetsStoreState, SheetsTableSelector, type SheetsThemeInput, type SheetsThemeTokens, SheetsUploadFn, TYPED_ARRAY_TYPES, type TableSelectorProps, type TableWithCategory, type Trigger, type UploadProgress, type UploadResponse, type UseDataFilteringConfig, type UseDataPaginationConfig, type UseFieldUploadOptions, type UseInfiniteTableOptions, type UseInfiniteTableResult, type UseMetaOptions, type UseSheetsResult, type UseSheetsTableCursorOptions, type UseSheetsTableCursorResult, type UseTableOptions, type UseTableResult, VIEWER_ONLY_TYPES, buildScalarFormSpec, buildZodSchema, clear as clearSheetsSelection, computeDraftMetaSignature, countConditions, createCellTypeRegistry, createColumnSchemaFromMeta, createEmptyGroup, createMetadataHash, createPostGraphileAdapter, emptySheetsSelection, executeFieldUpload, extendRangeToCell, fillDownWrites, fillRightWrites, findTableFormSpec, getCellsInRange, getDraftMeta, isArrayCellType, isDraftRow, isSheetsScopeKey, isStructuredDataType, kbd, mapToFrontendCellType, moveActive, sheetsTableQueryKeys as queryKeys, resolveDownloadUrl, selectCell, selectRange, selectRow, sheetsQueryKeys, toTSV, toggleRow, tokensFromCssVars, useDataFiltering, useDataGridColumns, useDataPagination, useDynamicCreate, useDynamicUpdate, useFeedback, useOperationFeedback, useRelationColumns, useSheets, useSheetsAdapter, useSheetsFieldUpload, useSheetsInfiniteTable, useSheetsMeta, useSheetsStore, useSheetsStoreApi, useSheetsTable, useSheetsTableCursor };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { Component, ReactNode, ErrorInfo } from 'react';
|
|
3
|
-
import { b as SheetsConfig, S as SheetsExecuteFn, C as CellProps, c as CellTypeDefinition, d as SheetsCellRenderContext, e as CellTypeMatchInput, f as SheetsScopeKey, a as SheetsUploadFn,
|
|
4
|
-
export { A as AdapterListQuery,
|
|
3
|
+
import { b as SheetsConfig, S as SheetsExecuteFn, C as CellProps, c as CellTypeDefinition, d as SheetsCellRenderContext, e as CellTypeMatchInput, f as SheetsScopeKey, g as SheetsFileValue, a as SheetsUploadFn, h as SheetsBackendAdapter } from './sheets-context-CHUVJCff.js';
|
|
4
|
+
export { A as AdapterListQuery, i as AdapterListResult, j as AdapterPageInfo, k as AdapterTableContext, l as CellColumnDescriptor, m as CellTypePlugin, n as SheetsAuthEmbedded, o as SheetsAuthStandalone, p as SheetsContext, q as SheetsContextValue, r as SheetsLogger, s as SheetsUploadResult, t as createSheetsExecute, u as createSheetsUpload, v as defineCellType, w as useSheetsContext } from './sheets-context-CHUVJCff.js';
|
|
5
5
|
import { StoreApi } from 'zustand';
|
|
6
|
-
import { R as RelationInfo, d as RelationInfoSlice, E as EditorProps, F as FieldMetadata, S as SheetsCell,
|
|
7
|
-
export { B as BaseCellProps, c as CellCategory,
|
|
8
|
-
import { RowIdentityValue, TableWriteCapability, MetaTable as MetaTable$1, FieldSelection, MutationOptions, PageInfo, MetaQuery, QueryOptions, Filter } from '@constructive-io/data';
|
|
9
|
-
export { ConstructiveError } from '@constructive-io/data';
|
|
6
|
+
import { R as RelationInfo, d as RelationInfoSlice, E as EditorProps, e as SheetsRowIdentifier, F as FieldMetadata, S as SheetsCell, D as DraftSubmitResult, f as CellRegistryEntry, b as CellType, g as CellRenderer, h as CellPlugin, i as ColumnSchema } from './grid-cell-types-C2-ocDS7.js';
|
|
7
|
+
export { B as BaseCellProps, c as CellCategory, j as CellValue, k as FieldMetadata, l as RelationKind, m as RowData, a as SheetsCellKind, n as SheetsRowIdentityResolution, T as TableSchema, o as buildRelationInfoFromMeta, p as canRunSheetsMutation, q as getSheetsWriteCapability, r as isImageField, s as resolveCellType, t as resolveSheetsIdentifier, u as resolveSheetsRowIdentity, v as sheetsIdentifierCacheKey, w as sheetsIdentifierToWhere, x as sheetsRowKey } from './grid-cell-types-C2-ocDS7.js';
|
|
10
8
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
11
9
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
10
|
+
import { FieldSelection, MutationOptions, PageInfo, MetaQuery, QueryOptions, Filter, MetaTable as MetaTable$1 } from '@constructive-io/data';
|
|
11
|
+
export { ConstructiveError } from '@constructive-io/data';
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
export { SheetsAuthGate, SheetsAuthGateProps, useSheetsForgotPassword, useSheetsLogin, useSheetsRegister, useSheetsResetPassword } from './auth.js';
|
|
14
14
|
import 'graphql';
|
|
@@ -27,14 +27,12 @@ declare function SheetsProvider({ config, children }: SheetsProviderProps): reac
|
|
|
27
27
|
* 2. Call the presigned upload op (discovered via introspection) to get a
|
|
28
28
|
* presigned PUT url + fileId
|
|
29
29
|
* 3. PUT the raw bytes to that url (only Content-Type, NO Authorization)
|
|
30
|
-
* 4.
|
|
30
|
+
* 4. Return the file projection and try to resolve an optional download URL
|
|
31
31
|
*
|
|
32
|
-
*
|
|
33
|
-
* row inside the upload op, so `downloadUrl` resolves immediately.
|
|
32
|
+
* The server confirms PUTs and expires rows that never received one.
|
|
34
33
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* whose input + payload carry the upload shape.
|
|
34
|
+
* Runtime introspection finds root mutations with the presigned upload shape
|
|
35
|
+
* and prefers `uploadAppFile` when multiple storage planes are exposed.
|
|
38
36
|
*
|
|
39
37
|
* The downloadUrl-by-id field is likewise shape-discovered. Three read shapes,
|
|
40
38
|
* preferred in order: the inflected singular `appFile(id:)`; a filtered
|
|
@@ -49,7 +47,7 @@ declare function SheetsProvider({ config, children }: SheetsProviderProps): reac
|
|
|
49
47
|
*
|
|
50
48
|
* `downloadUrl` is a Grafast computed field, so it cannot be selected through the
|
|
51
49
|
* runtime query builder (`buildSelect` intersects the select against pg columns and
|
|
52
|
-
* drops computed fields). This discovers the by-id field
|
|
50
|
+
* drops computed fields). This discovers the by-id field using cached introspection
|
|
53
51
|
* and reads it through the SAME resolver the upload path uses. Returns null on any
|
|
54
52
|
* failure — a missing url is not exceptional for the caller (it just disables
|
|
55
53
|
* copy/download), so the throwing internals are swallowed here.
|
|
@@ -321,39 +319,6 @@ declare function extendRangeToCell(sel: SheetsSelection, col: number, row: numbe
|
|
|
321
319
|
*/
|
|
322
320
|
declare function moveActive(sel: SheetsSelection, dCol: number, dRow: number, colCount: number, rowCount: number): SheetsSelection;
|
|
323
321
|
|
|
324
|
-
/** A row locator accepted by Sheets CRUD operations. */
|
|
325
|
-
type SheetsRowIdentifier = string | number | Readonly<Record<string, RowIdentityValue>>;
|
|
326
|
-
type SheetsMutationOperation = 'create' | 'update' | 'delete';
|
|
327
|
-
type SheetsRowIdentityResolution = Readonly<{
|
|
328
|
-
status: 'identified';
|
|
329
|
-
/** Backwards-compatible scalar for an ordinary `id` PK; otherwise the PK object. */
|
|
330
|
-
identifier: SheetsRowIdentifier;
|
|
331
|
-
/** GraphQL primary-key input, including renamed and composite keys. */
|
|
332
|
-
primaryKey: Readonly<Record<string, RowIdentityValue>>;
|
|
333
|
-
/** Stable, schema-qualified key used by caches, selection, and editors. */
|
|
334
|
-
key: string;
|
|
335
|
-
}> | Readonly<{
|
|
336
|
-
status: 'unavailable';
|
|
337
|
-
reason: 'no-primary-key' | 'invalid-row';
|
|
338
|
-
}>;
|
|
339
|
-
/**
|
|
340
|
-
* Resolve one server row from `_meta`. The familiar scalar `id` contract is kept
|
|
341
|
-
* for existing adapters, while renamed and composite keys use the full PK input.
|
|
342
|
-
*/
|
|
343
|
-
declare function resolveSheetsRowIdentity(table: MetaTable$1, row: Readonly<Record<string, unknown>>): SheetsRowIdentityResolution;
|
|
344
|
-
/** Resolve a public CRUD identifier through the same `_meta` identity contract. */
|
|
345
|
-
declare function resolveSheetsIdentifier(table: MetaTable$1, identifier: SheetsRowIdentifier): SheetsRowIdentityResolution;
|
|
346
|
-
/** Build the PostGraphile connection filter used by `findOne`. */
|
|
347
|
-
declare function sheetsIdentifierToWhere(table: MetaTable$1, identifier: SheetsRowIdentifier): Record<string, {
|
|
348
|
-
equalTo: RowIdentityValue;
|
|
349
|
-
}> | null;
|
|
350
|
-
/** Use scalar IDs as cache keys for compatibility; use serialized identities otherwise. */
|
|
351
|
-
declare function sheetsIdentifierCacheKey(table: MetaTable$1, identifier: SheetsRowIdentifier): string | number | null;
|
|
352
|
-
/** Stable TanStack/selection/editor key with an index fallback only for non-writable rows. */
|
|
353
|
-
declare function sheetsRowKey(table: MetaTable$1, row: Readonly<Record<string, unknown>>, index: number): string;
|
|
354
|
-
declare function getSheetsWriteCapability(table: MetaTable$1 | null): TableWriteCapability | null;
|
|
355
|
-
declare function canRunSheetsMutation(capability: TableWriteCapability | null, operation: SheetsMutationOperation): boolean;
|
|
356
|
-
|
|
357
322
|
/** A single cell write request. */
|
|
358
323
|
interface CellWrite {
|
|
359
324
|
rowIndex: number;
|
|
@@ -795,12 +760,6 @@ interface CellTypeRegistry {
|
|
|
795
760
|
*/
|
|
796
761
|
declare function createCellTypeRegistry(cellTypes: CellTypeDefinition<any>[], builtins: CellTypeBuiltins): CellTypeRegistry;
|
|
797
762
|
|
|
798
|
-
/** Result of submitting a draft row */
|
|
799
|
-
interface DraftSubmitResult {
|
|
800
|
-
/** The created row with its metadata-defined primary-key fields. */
|
|
801
|
-
createdRow: Record<string, unknown> | null;
|
|
802
|
-
}
|
|
803
|
-
|
|
804
763
|
/** Resolved DOM cell payload: the neutral cell plus its (optional) view component. */
|
|
805
764
|
interface SheetsCellResolution {
|
|
806
765
|
cell: SheetsCell;
|
|
@@ -813,6 +772,9 @@ interface SheetsCellResolution {
|
|
|
813
772
|
* of the `meta.cellType` the cell itself now self-describes.)
|
|
814
773
|
*/
|
|
815
774
|
typeKey: string;
|
|
775
|
+
/** Typed server row locator, separate from the grid's string key. */
|
|
776
|
+
rowIdentifier?: SheetsRowIdentifier | null;
|
|
777
|
+
readOnlyReason?: string;
|
|
816
778
|
/** Field metadata for the column — fed to a native overlay editor's EditorProps.fieldMeta. */
|
|
817
779
|
fieldMeta?: FieldMetadata;
|
|
818
780
|
/** Relation info for the column (when relational) — fed to a native overlay editor's EditorProps.relationInfo. */
|
|
@@ -1220,26 +1182,13 @@ interface UseSheetsTableCursorResult<TData extends RowRecord = RowRecord> {
|
|
|
1220
1182
|
}
|
|
1221
1183
|
declare function useSheetsTableCursor<TData extends RowRecord = RowRecord>(tableName: string, options?: UseSheetsTableCursorOptions): UseSheetsTableCursorResult<TData>;
|
|
1222
1184
|
|
|
1223
|
-
/**
|
|
1224
|
-
* Upload progress callback type
|
|
1225
|
-
*/
|
|
1226
1185
|
interface UploadProgress {
|
|
1227
1186
|
loaded: number;
|
|
1228
1187
|
total: number;
|
|
1229
1188
|
percentage: number;
|
|
1230
1189
|
}
|
|
1231
|
-
/**
|
|
1232
|
-
|
|
1233
|
-
*/
|
|
1234
|
-
interface UploadResponse {
|
|
1235
|
-
url: string;
|
|
1236
|
-
filename: string;
|
|
1237
|
-
mime: string;
|
|
1238
|
-
size: number;
|
|
1239
|
-
}
|
|
1240
|
-
/**
|
|
1241
|
-
* Field upload options
|
|
1242
|
-
*/
|
|
1190
|
+
/** The value confirmed by the row update. Attachments store a public URL as text. */
|
|
1191
|
+
type UploadResponse = SheetsFileValue | string | null;
|
|
1243
1192
|
interface UseFieldUploadOptions {
|
|
1244
1193
|
onProgress?: (progress: UploadProgress) => void;
|
|
1245
1194
|
onSuccess?: (data: UploadResponse) => void;
|
|
@@ -1248,59 +1197,104 @@ interface UseFieldUploadOptions {
|
|
|
1248
1197
|
successMessage?: string;
|
|
1249
1198
|
successToastDelayMs?: number;
|
|
1250
1199
|
}
|
|
1251
|
-
interface
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1200
|
+
interface FieldUploadTarget {
|
|
1201
|
+
table: MetaTable$1;
|
|
1202
|
+
allTables?: readonly MetaTable$1[];
|
|
1203
|
+
fieldName: string;
|
|
1204
|
+
recordId: SheetsRowIdentifier;
|
|
1256
1205
|
}
|
|
1257
|
-
interface
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
* `execute`/`executeUpload` here so injected/mock implementations intercept
|
|
1262
|
-
* both steps. When omitted (e.g. image-editor's direct retry path), the
|
|
1263
|
-
* functions are built from `endpoint`/`getToken`/`onAuthError` via the same
|
|
1264
|
-
* factories — never a raw fetch.
|
|
1265
|
-
*/
|
|
1266
|
-
execute?: SheetsExecuteFn;
|
|
1267
|
-
executeUpload?: SheetsUploadFn;
|
|
1206
|
+
interface FieldUploadTransport {
|
|
1207
|
+
execute: SheetsExecuteFn;
|
|
1208
|
+
executeUpload: SheetsUploadFn;
|
|
1209
|
+
adapter: Pick<SheetsBackendAdapter, 'updateRow'>;
|
|
1268
1210
|
onProgress?: (progress: UploadProgress) => void;
|
|
1269
1211
|
}
|
|
1270
|
-
/**
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1212
|
+
/** Upload and persist a media value, or pass null to clear the cell. */
|
|
1213
|
+
declare function executeFieldUpload({ table: meta, allTables, fieldName, recordId }: FieldUploadTarget, file: File | null, { execute, executeUpload, adapter, onProgress }: FieldUploadTransport): Promise<UploadResponse>;
|
|
1214
|
+
declare function useSheetsFieldUpload(tableName: string, fieldName: string, recordId: SheetsRowIdentifier | null, options?: UseFieldUploadOptions): {
|
|
1215
|
+
write: (id: SheetsRowIdentifier, file: File | null) => Promise<UploadResponse>;
|
|
1216
|
+
resolveRowIdentifier: (row: Readonly<Record<string, unknown>>) => SheetsRowIdentifier | null;
|
|
1217
|
+
data: undefined;
|
|
1218
|
+
variables: undefined;
|
|
1219
|
+
error: null;
|
|
1220
|
+
isError: false;
|
|
1221
|
+
isIdle: true;
|
|
1222
|
+
isPending: false;
|
|
1223
|
+
isSuccess: false;
|
|
1224
|
+
status: "idle";
|
|
1225
|
+
mutate: _tanstack_react_query.UseMutateFunction<UploadResponse, Error, File | null, unknown>;
|
|
1226
|
+
reset: () => void;
|
|
1227
|
+
context: unknown;
|
|
1228
|
+
failureCount: number;
|
|
1229
|
+
failureReason: Error | null;
|
|
1230
|
+
isPaused: boolean;
|
|
1231
|
+
submittedAt: number;
|
|
1232
|
+
mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<UploadResponse, Error, File | null, unknown>;
|
|
1233
|
+
} | {
|
|
1234
|
+
write: (id: SheetsRowIdentifier, file: File | null) => Promise<UploadResponse>;
|
|
1235
|
+
resolveRowIdentifier: (row: Readonly<Record<string, unknown>>) => SheetsRowIdentifier | null;
|
|
1236
|
+
data: undefined;
|
|
1237
|
+
variables: File | null;
|
|
1238
|
+
error: null;
|
|
1239
|
+
isError: false;
|
|
1240
|
+
isIdle: false;
|
|
1241
|
+
isPending: true;
|
|
1242
|
+
isSuccess: false;
|
|
1243
|
+
status: "pending";
|
|
1244
|
+
mutate: _tanstack_react_query.UseMutateFunction<UploadResponse, Error, File | null, unknown>;
|
|
1245
|
+
reset: () => void;
|
|
1246
|
+
context: unknown;
|
|
1247
|
+
failureCount: number;
|
|
1248
|
+
failureReason: Error | null;
|
|
1249
|
+
isPaused: boolean;
|
|
1250
|
+
submittedAt: number;
|
|
1251
|
+
mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<UploadResponse, Error, File | null, unknown>;
|
|
1252
|
+
} | {
|
|
1253
|
+
write: (id: SheetsRowIdentifier, file: File | null) => Promise<UploadResponse>;
|
|
1254
|
+
resolveRowIdentifier: (row: Readonly<Record<string, unknown>>) => SheetsRowIdentifier | null;
|
|
1255
|
+
data: undefined;
|
|
1256
|
+
error: Error;
|
|
1257
|
+
variables: File | null;
|
|
1258
|
+
isError: true;
|
|
1259
|
+
isIdle: false;
|
|
1260
|
+
isPending: false;
|
|
1261
|
+
isSuccess: false;
|
|
1262
|
+
status: "error";
|
|
1263
|
+
mutate: _tanstack_react_query.UseMutateFunction<UploadResponse, Error, File | null, unknown>;
|
|
1264
|
+
reset: () => void;
|
|
1265
|
+
context: unknown;
|
|
1266
|
+
failureCount: number;
|
|
1267
|
+
failureReason: Error | null;
|
|
1268
|
+
isPaused: boolean;
|
|
1269
|
+
submittedAt: number;
|
|
1270
|
+
mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<UploadResponse, Error, File | null, unknown>;
|
|
1271
|
+
} | {
|
|
1272
|
+
write: (id: SheetsRowIdentifier, file: File | null) => Promise<UploadResponse>;
|
|
1273
|
+
resolveRowIdentifier: (row: Readonly<Record<string, unknown>>) => SheetsRowIdentifier | null;
|
|
1274
|
+
data: UploadResponse;
|
|
1275
|
+
error: null;
|
|
1276
|
+
variables: File | null;
|
|
1277
|
+
isError: false;
|
|
1278
|
+
isIdle: false;
|
|
1279
|
+
isPending: false;
|
|
1280
|
+
isSuccess: true;
|
|
1281
|
+
status: "success";
|
|
1282
|
+
mutate: _tanstack_react_query.UseMutateFunction<UploadResponse, Error, File | null, unknown>;
|
|
1283
|
+
reset: () => void;
|
|
1284
|
+
context: unknown;
|
|
1285
|
+
failureCount: number;
|
|
1286
|
+
failureReason: Error | null;
|
|
1287
|
+
isPaused: boolean;
|
|
1288
|
+
submittedAt: number;
|
|
1289
|
+
mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<UploadResponse, Error, File | null, unknown>;
|
|
1290
|
+
};
|
|
1298
1291
|
|
|
1299
1292
|
declare function isSheetsScopeKey(value: unknown): value is SheetsScopeKey;
|
|
1300
1293
|
declare const sheetsQueryKeys: {
|
|
1301
1294
|
readonly root: readonly ["sheets"];
|
|
1302
1295
|
readonly scope: (scope: SheetsScopeKey) => readonly ["sheets", SheetsScopeKey];
|
|
1303
1296
|
readonly meta: (scope: SheetsScopeKey) => readonly ["sheets", SheetsScopeKey, "meta"];
|
|
1297
|
+
readonly mediaUrl: (scope: SheetsScopeKey, endpoint: string | undefined, id: string | null) => readonly ["sheets", SheetsScopeKey, "media-url", string | undefined, string | null];
|
|
1304
1298
|
readonly typeFields: (scope: SheetsScopeKey, typeName: string) => readonly ["sheets", SheetsScopeKey, "type-fields", string];
|
|
1305
1299
|
readonly enumValues: (scope: SheetsScopeKey, typeName: string) => readonly ["sheets", SheetsScopeKey, "enum-values", string];
|
|
1306
1300
|
readonly relations: (scope: SheetsScopeKey, tableName: string) => readonly ["sheets", SheetsScopeKey, "relations", string];
|
|
@@ -1734,4 +1728,4 @@ declare function useDataPagination({ initialPageSize, initialPageIndex, totalCou
|
|
|
1734
1728
|
}) => any;
|
|
1735
1729
|
};
|
|
1736
1730
|
|
|
1737
|
-
export { BOOLEAN_TYPES, BUILTIN_EDITOR_TYPES, type Binding, CellPlugin, CellProps, CellRegistry, CellRegistryEntry, CellRenderer, type CellSlot, type CellSlots, CellType, type CellTypeBuiltins, CellTypeDefinition, CellTypeMatchInput, type CellTypeRegistry, ColumnSchema, type CommandResult, DATE_TIME_TYPES, type DataFilteringContextValue, type DataPaginationContextValue, type DispatchEvent, DockStatusBar, DockStatusBarCompact, type DraftMeta, type DraftRow, type DynamicFormSpec, ENHANCED_TYPES, EditorProps, type ExtractedRange, FeedbackProvider, type FieldTypeMap, type FilterCondition, type FilterGroup, type FilterNode, type FilterValue, FloatingStatus, GEOMETRY_TYPES, type GridCommand, type GridCommandContext, type Interceptor, MAX_FILTER_DEPTH, MEDIA_TYPES, type MetaField, type MetaTable, NON_EDITABLE_TYPES, NUMBER_TYPES, type OperationFeedback, RangeSet, type RelationColumnInfo, RelationInfo, type RowWithDraft, STRUCTURED_DATA_TYPES, type ScalarFieldSpec, type SelectionCurrent, type SelectionRect, Sheets, type SheetsAuthState, SheetsBackendAdapter, SheetsCell, SheetsCellRenderContext, SheetsConfig, SheetsControls, type SheetsControlsProps, type SheetsDraftBindings, SheetsEmptyState, SheetsErrorBoundary, SheetsErrorState, type SheetsEvent, SheetsExecuteFn, type SheetsHandle, SheetsLoadingState, SheetsPagination, type SheetsPaginationBindings, type SheetsPaginationProps, type SheetsProps, SheetsProvider, type SheetsRow,
|
|
1731
|
+
export { BOOLEAN_TYPES, BUILTIN_EDITOR_TYPES, type Binding, CellPlugin, CellProps, CellRegistry, CellRegistryEntry, CellRenderer, type CellSlot, type CellSlots, CellType, type CellTypeBuiltins, CellTypeDefinition, CellTypeMatchInput, type CellTypeRegistry, ColumnSchema, type CommandResult, DATE_TIME_TYPES, type DataFilteringContextValue, type DataPaginationContextValue, type DispatchEvent, DockStatusBar, DockStatusBarCompact, type DraftMeta, type DraftRow, type DynamicFormSpec, ENHANCED_TYPES, EditorProps, type ExtractedRange, FeedbackProvider, type FieldTypeMap, type FilterCondition, type FilterGroup, type FilterNode, type FilterValue, FloatingStatus, GEOMETRY_TYPES, type GridCommand, type GridCommandContext, type Interceptor, MAX_FILTER_DEPTH, MEDIA_TYPES, type MetaField, type MetaTable, NON_EDITABLE_TYPES, NUMBER_TYPES, type OperationFeedback, RangeSet, type RelationColumnInfo, RelationInfo, type RowWithDraft, STRUCTURED_DATA_TYPES, type ScalarFieldSpec, type SelectionCurrent, type SelectionRect, Sheets, type SheetsAuthState, SheetsBackendAdapter, SheetsCell, SheetsCellRenderContext, SheetsConfig, SheetsControls, type SheetsControlsProps, type SheetsDraftBindings, SheetsEmptyState, SheetsErrorBoundary, SheetsErrorState, type SheetsEvent, SheetsExecuteFn, SheetsFileValue, type SheetsHandle, SheetsLoadingState, SheetsPagination, type SheetsPaginationBindings, type SheetsPaginationProps, type SheetsProps, SheetsProvider, type SheetsRow, SheetsRowIdentifier, SheetsScopeKey, type SheetsSelection, type SheetsSelectionBindings, type SheetsSlots, type SheetsStoreState, SheetsTableSelector, type SheetsThemeInput, type SheetsThemeTokens, SheetsUploadFn, TYPED_ARRAY_TYPES, type TableSelectorProps, type TableWithCategory, type Trigger, type UploadProgress, type UploadResponse, type UseDataFilteringConfig, type UseDataPaginationConfig, type UseFieldUploadOptions, type UseInfiniteTableOptions, type UseInfiniteTableResult, type UseMetaOptions, type UseSheetsResult, type UseSheetsTableCursorOptions, type UseSheetsTableCursorResult, type UseTableOptions, type UseTableResult, VIEWER_ONLY_TYPES, buildScalarFormSpec, buildZodSchema, clear as clearSheetsSelection, computeDraftMetaSignature, countConditions, createCellTypeRegistry, createColumnSchemaFromMeta, createEmptyGroup, createMetadataHash, createPostGraphileAdapter, emptySheetsSelection, executeFieldUpload, extendRangeToCell, fillDownWrites, fillRightWrites, findTableFormSpec, getCellsInRange, getDraftMeta, isArrayCellType, isDraftRow, isSheetsScopeKey, isStructuredDataType, kbd, mapToFrontendCellType, moveActive, sheetsTableQueryKeys as queryKeys, resolveDownloadUrl, selectCell, selectRange, selectRow, sheetsQueryKeys, toTSV, toggleRow, tokensFromCssVars, useDataFiltering, useDataGridColumns, useDataPagination, useDynamicCreate, useDynamicUpdate, useFeedback, useOperationFeedback, useRelationColumns, useSheets, useSheetsAdapter, useSheetsFieldUpload, useSheetsInfiniteTable, useSheetsMeta, useSheetsStore, useSheetsStoreApi, useSheetsTable, useSheetsTableCursor };
|