@xnetjs/data 0.2.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/{chunk-2UPMDBWD.js → chunk-E3J22ID2.js} +2670 -2539
- package/dist/{chunk-DWEXKD6E.js → chunk-FB63TZVI.js} +7 -1
- package/dist/{chunk-H4GA4BBK.js → chunk-MD553LDL.js} +11 -2
- package/dist/{chunk-3RUDVTMH.js → chunk-Q67VT5XL.js} +307 -138
- package/dist/{chunk-K7DOZWWT.js → chunk-YAUS3Q2Q.js} +4 -4
- package/dist/{clone-C0Jhk2UN.d.ts → clone-_owA3IXN.d.ts} +10 -171
- package/dist/database/index.d.ts +4 -4
- package/dist/database/index.js +17 -3
- package/dist/{database-row-6Q6TRVE4.js → database-row-5MEIOJ52.js} +1 -1
- package/dist/{database-view-5PLSOBI2.js → database-view-DM7YCTZT.js} +1 -1
- package/dist/form-types-BlZvpDEE.d.ts +645 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +20 -6
- package/dist/schema/index.d.ts +48 -29
- package/dist/schema/index.js +3 -3
- package/dist/store/index.d.ts +16 -70
- package/dist/store/index.js +1 -1
- package/dist/{store-DtIDjk7c.d.ts → store-CjjofiLR.d.ts} +10 -7
- package/package.json +7 -7
- package/dist/view-types-DSde-uT_.d.ts +0 -316
|
@@ -1,110 +1,8 @@
|
|
|
1
|
+
import { C as CellValue, a7 as FormSubmissionMeta, E as ColumnDefinition, h as FieldType, j as FieldConfig, K as SelectColor, k as FieldNode, S as SelectOptionNode, V as ViewType, W as FilterGroup, Z as SortConfig, U as ViewConfig, B as ColumnType, Y as FilterOperator, L as RollupAggregation, l as RollupColumnConfig } from './form-types-BlZvpDEE.js';
|
|
1
2
|
import { ao as NodeQueryMaterializedViewOptions, h as NodeState, B as PropertyType, S as SchemaIRI, a as Schema } from './types-S-BJAKyK.js';
|
|
2
|
-
import { N as NodeStore } from './store-
|
|
3
|
-
import { c as ColumnDefinition, C as ColumnType, d as ColumnConfig, f as SelectColor, i as isNodeStoreColumnType, h as isComputedColumnType, j as isAutoColumnType, k as isYDocColumnType, V as ViewType, m as FilterGroup, p as SortConfig, l as ViewConfig, o as FilterOperator, g as RollupAggregation, a as RollupColumnConfig } from './view-types-DSde-uT_.js';
|
|
3
|
+
import { N as NodeStore } from './store-CjjofiLR.js';
|
|
4
4
|
import * as Y from 'yjs';
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
* Cell value types for database rows.
|
|
8
|
-
*
|
|
9
|
-
* Cell values are stored as dynamic properties on DatabaseRow nodes,
|
|
10
|
-
* keyed by column ID with a `cell_` prefix to avoid collisions with
|
|
11
|
-
* schema-defined properties.
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* Reference to a file stored in the system.
|
|
15
|
-
* Same shape as the blob-layer FileRef (schema/properties/file.ts):
|
|
16
|
-
* content-addressed, resolved to URLs through the BlobService.
|
|
17
|
-
*/
|
|
18
|
-
interface FileRef {
|
|
19
|
-
/** Content-addressed ID (CID) of the file */
|
|
20
|
-
cid: string;
|
|
21
|
-
/** Original file name */
|
|
22
|
-
name: string;
|
|
23
|
-
/** MIME type */
|
|
24
|
-
mimeType: string;
|
|
25
|
-
/** File size in bytes */
|
|
26
|
-
size: number;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* A date range with start and end dates.
|
|
30
|
-
*/
|
|
31
|
-
interface DateRange {
|
|
32
|
-
/** Start date (ISO 8601 string) */
|
|
33
|
-
start: string;
|
|
34
|
-
/** End date (ISO 8601 string) */
|
|
35
|
-
end: string;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* All possible cell value types.
|
|
39
|
-
*
|
|
40
|
-
* - string: text, url, email, phone, select (option ID), person (DID)
|
|
41
|
-
* - number: number
|
|
42
|
-
* - boolean: checkbox
|
|
43
|
-
* - string (ISO 8601): date
|
|
44
|
-
* - DateRange: dateRange
|
|
45
|
-
* - string[]: multiSelect (option IDs), relation (row IDs)
|
|
46
|
-
* - FileRef: file
|
|
47
|
-
* - null: empty cell
|
|
48
|
-
*/
|
|
49
|
-
type CellValue = string | number | boolean | DateRange | string[] | FileRef | null;
|
|
50
|
-
/**
|
|
51
|
-
* Prefix for cell value property keys.
|
|
52
|
-
* This prevents collisions with schema-defined properties like 'database' and 'sortKey'.
|
|
53
|
-
*/
|
|
54
|
-
declare const CELL_PREFIX = "cell_";
|
|
55
|
-
/**
|
|
56
|
-
* Convert a column ID to a cell property key.
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* cellKey('name') // 'cell_name'
|
|
60
|
-
* cellKey('status') // 'cell_status'
|
|
61
|
-
*/
|
|
62
|
-
declare function cellKey(columnId: string): string;
|
|
63
|
-
/**
|
|
64
|
-
* Check if a property key is a cell value key.
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* isCellKey('cell_name') // true
|
|
68
|
-
* isCellKey('database') // false
|
|
69
|
-
*/
|
|
70
|
-
declare function isCellKey(key: string): boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Extract the column ID from a cell property key.
|
|
73
|
-
*
|
|
74
|
-
* @example
|
|
75
|
-
* columnIdFromKey('cell_name') // 'name'
|
|
76
|
-
* columnIdFromKey('cell_status') // 'status'
|
|
77
|
-
*/
|
|
78
|
-
declare function columnIdFromKey(key: string): string;
|
|
79
|
-
/**
|
|
80
|
-
* Convert a record of column ID -> value to cell key -> value.
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* toCellProperties({ name: 'John', age: 30 })
|
|
84
|
-
* // { cell_name: 'John', cell_age: 30 }
|
|
85
|
-
*/
|
|
86
|
-
declare function toCellProperties(cells: Record<string, CellValue>): Record<string, CellValue>;
|
|
87
|
-
/**
|
|
88
|
-
* Extract cell values from a node's properties, converting cell keys back to column IDs.
|
|
89
|
-
*
|
|
90
|
-
* @example
|
|
91
|
-
* fromCellProperties({ cell_name: 'John', cell_age: 30, database: 'db1' })
|
|
92
|
-
* // { name: 'John', age: 30 }
|
|
93
|
-
*/
|
|
94
|
-
declare function fromCellProperties(properties: Record<string, unknown>): Record<string, CellValue>;
|
|
95
|
-
/**
|
|
96
|
-
* Check if a value is a valid DateRange.
|
|
97
|
-
*/
|
|
98
|
-
declare function isDateRange(value: unknown): value is DateRange;
|
|
99
|
-
/**
|
|
100
|
-
* Check if a value is a valid FileRef.
|
|
101
|
-
*/
|
|
102
|
-
declare function isFileRef(value: unknown): value is FileRef;
|
|
103
|
-
/**
|
|
104
|
-
* Check if a value is a valid CellValue.
|
|
105
|
-
*/
|
|
106
|
-
declare function isCellValue(value: unknown): value is CellValue;
|
|
107
|
-
|
|
108
6
|
/**
|
|
109
7
|
* Row CRUD operations for database rows.
|
|
110
8
|
*
|
|
@@ -133,6 +31,13 @@ interface CreateRowOptions {
|
|
|
133
31
|
* If neither before nor after is specified, appends to end.
|
|
134
32
|
*/
|
|
135
33
|
after?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Explicit node id (exploration 0278): deterministic ids make retried
|
|
36
|
+
* form-submission drains an LWW upsert instead of a duplicate row.
|
|
37
|
+
*/
|
|
38
|
+
id?: string;
|
|
39
|
+
/** Form-submission provenance stamped on the row (exploration 0278). */
|
|
40
|
+
submissionMeta?: FormSubmissionMeta;
|
|
136
41
|
}
|
|
137
42
|
/**
|
|
138
43
|
* Options for querying rows.
|
|
@@ -427,72 +332,6 @@ declare function deleteRichTextCell(doc: Y.Doc, columnId: string): void;
|
|
|
427
332
|
*/
|
|
428
333
|
declare function getRichTextPlainText(doc: Y.Doc, columnId: string): string;
|
|
429
334
|
|
|
430
|
-
/**
|
|
431
|
-
* Field type definitions for the V2 database model.
|
|
432
|
-
*
|
|
433
|
-
* V2 stores fields as first-class DatabaseField nodes (see
|
|
434
|
-
* schema/schemas/database-field.ts) ordered by fractional sortKey, rather
|
|
435
|
-
* than as Y.Array entries in the database Y.Doc. The type/config unions are
|
|
436
|
-
* shared with the legacy column model (column-types.ts) so the pure engines
|
|
437
|
-
* (filter/sort/group/rollup/formula) work unchanged.
|
|
438
|
-
*
|
|
439
|
-
* Select/multiSelect options are NOT part of the field config in V2 — they
|
|
440
|
-
* are DatabaseSelectOption nodes keyed by `field`, so concurrent option
|
|
441
|
-
* creation merges cleanly. SelectFieldConfig retains only behavioral flags.
|
|
442
|
-
*/
|
|
443
|
-
|
|
444
|
-
/** All supported field types. */
|
|
445
|
-
type FieldType = ColumnType;
|
|
446
|
-
/** Type-specific field configuration. */
|
|
447
|
-
type FieldConfig = ColumnConfig;
|
|
448
|
-
|
|
449
|
-
/** Valid field type values, for runtime enforcement in field-operations. */
|
|
450
|
-
declare const FIELD_TYPES: readonly FieldType[];
|
|
451
|
-
declare function isFieldType(value: unknown): value is FieldType;
|
|
452
|
-
/** Valid select option colors. */
|
|
453
|
-
declare const SELECT_COLORS: readonly SelectColor[];
|
|
454
|
-
declare function isSelectColor(value: unknown): value is SelectColor;
|
|
455
|
-
/**
|
|
456
|
-
* Pick a deterministic color for a new option from its name, so
|
|
457
|
-
* typeahead-created tags get stable, pleasant colors without a picker.
|
|
458
|
-
*/
|
|
459
|
-
declare function autoColor(name: string): SelectColor;
|
|
460
|
-
declare const isNodeStoreFieldType: typeof isNodeStoreColumnType;
|
|
461
|
-
declare const isComputedFieldType: typeof isComputedColumnType;
|
|
462
|
-
declare const isAutoFieldType: typeof isAutoColumnType;
|
|
463
|
-
declare const isYDocFieldType: typeof isYDocColumnType;
|
|
464
|
-
/** A DatabaseField node narrowed with typed properties access. */
|
|
465
|
-
interface FieldNode {
|
|
466
|
-
id: string;
|
|
467
|
-
database: string;
|
|
468
|
-
name: string;
|
|
469
|
-
type: FieldType;
|
|
470
|
-
config: FieldConfig;
|
|
471
|
-
sortKey: string;
|
|
472
|
-
width?: number;
|
|
473
|
-
isTitle?: boolean;
|
|
474
|
-
hidden?: boolean;
|
|
475
|
-
}
|
|
476
|
-
/** A DatabaseSelectOption node narrowed for picker use. */
|
|
477
|
-
interface SelectOptionNode {
|
|
478
|
-
id: string;
|
|
479
|
-
field: string;
|
|
480
|
-
database: string;
|
|
481
|
-
name: string;
|
|
482
|
-
color?: SelectColor;
|
|
483
|
-
sortKey: string;
|
|
484
|
-
}
|
|
485
|
-
/** Extract a FieldNode from a raw node's properties. */
|
|
486
|
-
declare function toFieldNode(node: {
|
|
487
|
-
id: string;
|
|
488
|
-
properties: Record<string, unknown>;
|
|
489
|
-
}): FieldNode;
|
|
490
|
-
/** Extract a SelectOptionNode from a raw node's properties. */
|
|
491
|
-
declare function toSelectOptionNode(node: {
|
|
492
|
-
id: string;
|
|
493
|
-
properties: Record<string, unknown>;
|
|
494
|
-
}): SelectOptionNode;
|
|
495
|
-
|
|
496
335
|
/**
|
|
497
336
|
* Field CRUD operations for the V2 database model.
|
|
498
337
|
*
|
|
@@ -2202,4 +2041,4 @@ declare function cloneSampleRows(rows: Array<Record<string, unknown>>, idMap: Ma
|
|
|
2202
2041
|
*/
|
|
2203
2042
|
declare function cloneSchema(source: CloneSourceData, options?: CloneSchemaOptions): CloneSchemaResult;
|
|
2204
2043
|
|
|
2205
|
-
export {
|
|
2044
|
+
export { getViews$1 as $, getTitleField as A, createField as B, type CreateRowOptions as C, type DatabaseRowNode as D, updateField as E, deleteField as F, moveField as G, duplicateField as H, ensureSchemaExtension as I, createExtensionField as J, renameExtensionField as K, deleteExtensionField as L, MAX_KEY_LENGTH as M, type EnsureExtensionOptions as N, type CreateExtensionFieldOptions as O, getSelectOptions as P, type QueryRowsOptions as Q, RICHTEXT_PREFIX as R, getDatabaseSelectOptions as S, createSelectOption as T, type UpdateFieldOptions as U, updateSelectOption as V, deleteSelectOption as W, moveSelectOption as X, type ViewNode as Y, type CreateViewOptions as Z, type UpdateViewOptions as _, type QueryRowsResult as a, formatValue as a$, getView$1 as a0, createView$1 as a1, updateView$1 as a2, deleteView$1 as a3, duplicateView$1 as a4, moveView as a5, setViewFilters$1 as a6, setViewSorts$1 as a7, setViewGroupBy$1 as a8, toggleViewGroupCollapsed as a9, computeRollup as aA, batchComputeRollups as aB, validateRollupConfig as aC, type RollupRow as aD, type RollupContext as aE, FormulaService as aF, createFormulaService as aG, type FormulaRow as aH, type FormulaValidationResult as aI, parseCSV as aJ, parseCSVLine as aK, guessColumnType as aL, parseValue as aM, parseRow as aN, inferColumnTypes as aO, parseJSON as aP, inferColumnsFromRows as aQ, inferTypeFromValues as aR, toColumnDefinitions as aS, validateJsonData as aT, type ParsedCSV as aU, type CsvParseOptions as aV, type ParsedJSON as aW, type InferredColumn as aX, type JsonParseOptions as aY, exportToCsv as aZ, escapeCSV as a_, setFieldHidden as aa, setViewFieldWidth as ab, setViewFieldOrder as ac, effectiveFieldSortKey as ad, setupDatabase as ae, type SetupDatabaseResult as af, DEFAULT_DATABASE_SCHEMA_VERSION as ag, fieldsToStoredColumns as ah, buildSchemaFromFields as ai, getDatabaseSchemaIRI as aj, createNodeDatabaseSchemaResolver as ak, initializeDatabaseDoc as al, isDatabaseDocInitialized as am, addDefaultTitleColumn as an, addDefaultTableView as ao, setupNewDatabase as ap, getMeta as aq, setMeta as ar, deleteMeta as as, getDatabaseDocumentModel as at, type DatabaseDocumentModel as au, convertCellValue as av, cellValueToText as aw, type ConvertContext as ax, type ConvertedCell as ay, aggregate as az, updateCells as b, type GroupableRow as b$, createCsvBlob as b0, downloadCsv as b1, exportToJson as b2, exportToJsonArray as b3, exportToNdjson as b4, createJsonBlob as b5, downloadJson as b6, type ExportRow$1 as b7, type CsvExportOptions as b8, type JsonExportOptions as b9, setVisibleColumns as bA, showColumn as bB, hideColumn as bC, reorderViewColumns as bD, setColumnWidth as bE, OPERATORS_BY_TYPE as bF, OPERATOR_LABELS as bG, getOperatorsForType as bH, isValidOperator as bI, getOperatorLabel as bJ, operatorRequiresValue as bK, filterRows as bL, createEqualsFilter as bM, createAnyOfFilter as bN, combineFiltersAnd as bO, combineFiltersOr as bP, type FilterableRow as bQ, sortRows as bR, createSort as bS, toggleSortDirection as bT, addOrToggleSort as bU, removeSort as bV, type SortableRow as bW, groupRows as bX, toggleGroupCollapsed as bY, expandAllGroups as bZ, collapseAllGroups as b_, type ExportedJSON as ba, type ExportedColumn as bb, getColumns as bc, getColumn as bd, getColumnIndex as be, getTitleColumn as bf, createColumn as bg, updateColumn as bh, deleteColumn as bi, reorderColumn as bj, duplicateColumn as bk, getViews as bl, getView as bm, getViewByType as bn, createView as bo, updateView as bp, deleteView as bq, duplicateView as br, setViewFilters as bs, clearViewFilters as bt, setViewSorts as bu, addViewSort as bv, removeViewSort as bw, clearViewSorts as bx, setViewGroupBy as by, toggleGroupCollapsed$1 as bz, createRow as c, type GroupConfig as c0, type RowGroup as c1, type GroupAggregates as c2, executeQuery as c3, createFilterQuery as c4, createSortQuery as c5, createPaginatedQuery as c6, flattenGroups as c7, getTotalFromGroups as c8, type QueryableRow as c9, cloneSampleRows as cA, generateColumnIdMap as cB, remapViewColumnIds as cC, type CloneSchemaOptions as cD, type CloneSchemaResult as cE, type CloneSourceData as cF, getEmptyValue as cG, isNumericAggregation as cH, getAggregationResultType as cI, type QueryOptions as ca, type QueryResult as cb, buildSchemaIRI as cc, parseDatabaseSchemaIRI as cd, isDatabaseSchemaIRI as ce, parseVersion as cf, bumpSchemaVersion as cg, createInitialSchemaMetadata as ch, buildDatabaseSchema as ci, createVersionEntry as cj, pruneVersionHistory as ck, getVersionBumpType as cl, DATABASE_SCHEMA_NAMESPACE as cm, DATABASE_SCHEMA_PREFIX as cn, MAX_VERSION_HISTORY as co, type DatabaseSchemaMetadata as cp, type StoredColumn as cq, type SchemaVersionEntry as cr, type VersionBumpType as cs, createDatabaseSchemaResolver as ct, extractSchemaFromDoc as cu, getSchemaIRIFromDoc as cv, type DocFetcher as cw, type CreateDatabaseSchemaResolverOptions as cx, cloneSchema as cy, cloneColumns as cz, deleteRow as d, checkNeedsRebalancing as e, generateSortKey as f, getRow as g, generateSortKeyWithJitter as h, isValidSortKey as i, compareSortKeys as j, rebalanceSortKeys as k, getRichTextCell as l, moveRow as m, needsRebalancing as n, hasRichTextContent as o, hasRichTextColumns as p, queryRows as q, rebalanceDatabase as r, getRichTextColumnIds as s, deleteRichTextCell as t, updateCell as u, getRichTextPlainText as v, type CreateFieldOptions as w, type CreateSelectOptionOptions as x, getFields as y, getField as z };
|
package/dist/database/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export {
|
|
1
|
+
import { W as FilterGroup, E as ColumnDefinition, B as ColumnType, V as ViewType, Z as SortConfig } from '../form-types-BlZvpDEE.js';
|
|
2
|
+
export { a as CELL_PREFIX, C as CellValue, G as ColumnConfig, aq as ColumnSummaryResult, at as DEFAULT_ROW_HEIGHT, n as DateColumnConfig, n as DateFieldConfig, D as DateRange, H as EmptyConfig, p as FIELD_TYPES, j as FieldConfig, k as FieldNode, h as FieldType, o as FileColumnConfig, o as FileFieldConfig, F as FileRef, X as FilterCondition, Y as FilterOperator, a6 as FormAudience, a3 as FormConfirmation, a5 as FormFieldRule, a2 as FormQuestion, a7 as FormSubmissionMeta, a8 as FormValidationError, a9 as FormValidationResult, a4 as FormViewConfig, m as FormulaColumnConfig, m as FormulaFieldConfig, N as NumberColumnConfig, N as NumberFieldConfig, ac as PUBLIC_SAFE_FORM_FIELD_TYPES, ab as PublicFormDefinition, aa as PublicFormQuestion, as as ROW_HEIGHTS, ar as ROW_HEIGHT_PX, R as RelationColumnConfig, R as RelationFieldConfig, L as RollupAggregation, l as RollupColumnConfig, l as RollupFieldConfig, ax as RowHeight, q as SELECT_COLORS, aj as SUMMARY_FUNCTIONS_BY_TYPE, K as SelectColor, I as SelectColumnConfig, J as SelectOption, S as SelectOptionNode, ap as SummaryColumnLike, an as SummaryFunction, ao as SummaryRow, T as TextColumnConfig, T as TextFieldConfig, U as ViewConfig, aw as asRowHeight, u as autoColor, ah as buildPublicFormDefinition, c as cellKey, b as columnIdFromKey, am as computeColumnSummary, f as fromCellProperties, P as isAutoColumnType, x as isAutoFieldType, i as isCellKey, g as isCellValue, O as isComputedColumnType, w as isComputedFieldType, d as isDateRange, r as isFieldType, e as isFileRef, al as isFilledValue, $ as isFilterCondition, _ as isFilterGroup, ad as isFormFieldTypeAllowed, ae as isFormQuestionVisible, M as isNodeStoreColumnType, v as isNodeStoreFieldType, s as isSelectColor, Q as isYDocColumnType, y as isYDocFieldType, a1 as requiresDateColumn, av as resolveRowHeightPx, au as rowHeightLabel, ai as submissionRowId, ak as summaryFunctionLabel, a0 as supportsGrouping, t as toCellProperties, z as toFieldNode, A as toSelectOptionNode, ag as validateFormSubmission, af as visibleFormQuestions } from '../form-types-BlZvpDEE.js';
|
|
3
|
+
export { cD as CloneSchemaOptions, cE as CloneSchemaResult, cF as CloneSourceData, ax as ConvertContext, ay as ConvertedCell, cx as CreateDatabaseSchemaResolverOptions, O as CreateExtensionFieldOptions, w as CreateFieldOptions, C as CreateRowOptions, x as CreateSelectOptionOptions, Z as CreateViewOptions, b8 as CsvExportOptions, aV as CsvParseOptions, cm as DATABASE_SCHEMA_NAMESPACE, cn as DATABASE_SCHEMA_PREFIX, ag as DEFAULT_DATABASE_SCHEMA_VERSION, au as DatabaseDocumentModel, D as DatabaseRowNode, cp as DatabaseSchemaMetadata, cw as DocFetcher, N as EnsureExtensionOptions, b7 as ExportRow, bb as ExportedColumn, ba as ExportedJSON, bQ as FilterableRow, aH as FormulaRow, aF as FormulaService, aI as FormulaValidationResult, c2 as GroupAggregates, c0 as GroupConfig, b$ as GroupableRow, aX as InferredColumn, b9 as JsonExportOptions, aY as JsonParseOptions, M as MAX_KEY_LENGTH, co as MAX_VERSION_HISTORY, bF as OPERATORS_BY_TYPE, bG as OPERATOR_LABELS, aU as ParsedCSV, aW as ParsedJSON, ca as QueryOptions, cb as QueryResult, Q as QueryRowsOptions, a as QueryRowsResult, c9 as QueryableRow, R as RICHTEXT_PREFIX, aE as RollupContext, aD as RollupRow, c1 as RowGroup, cr as SchemaVersionEntry, af as SetupDatabaseResult, bW as SortableRow, cq as StoredColumn, U as UpdateFieldOptions, _ as UpdateViewOptions, cs as VersionBumpType, Y as ViewNode, ao as addDefaultTableView, an as addDefaultTitleColumn, bU as addOrToggleSort, bv as addViewSort, az as aggregate, aB as batchComputeRollups, ci as buildDatabaseSchema, ai as buildSchemaFromFields, cc as buildSchemaIRI, cg as bumpSchemaVersion, aw as cellValueToText, e as checkNeedsRebalancing, bt as clearViewFilters, bx as clearViewSorts, cz as cloneColumns, cA as cloneSampleRows, cy as cloneSchema, b_ as collapseAllGroups, bO as combineFiltersAnd, bP as combineFiltersOr, j as compareSortKeys, aA as computeRollup, av as convertCellValue, bN as createAnyOfFilter, bg as createColumn, b0 as createCsvBlob, ct as createDatabaseSchemaResolver, bM as createEqualsFilter, J as createExtensionField, B as createField, c4 as createFilterQuery, aG as createFormulaService, ch as createInitialSchemaMetadata, b5 as createJsonBlob, ak as createNodeDatabaseSchemaResolver, c6 as createPaginatedQuery, c as createRow, T as createSelectOption, bS as createSort, c5 as createSortQuery, cj as createVersionEntry, bo as createView, a1 as createViewNode, bi as deleteColumn, L as deleteExtensionField, F as deleteField, as as deleteMeta, t as deleteRichTextCell, d as deleteRow, W as deleteSelectOption, bq as deleteView, a3 as deleteViewNode, b1 as downloadCsv, b6 as downloadJson, bk as duplicateColumn, H as duplicateField, br as duplicateView, a4 as duplicateViewNode, ad as effectiveFieldSortKey, I as ensureSchemaExtension, a_ as escapeCSV, c3 as executeQuery, bZ as expandAllGroups, aZ as exportToCsv, b2 as exportToJson, b3 as exportToJsonArray, b4 as exportToNdjson, cu as extractSchemaFromDoc, ah as fieldsToStoredColumns, bL as filterRows, c7 as flattenGroups, a$ as formatValue, cB as generateColumnIdMap, f as generateSortKey, h as generateSortKeyWithJitter, cI as getAggregationResultType, bd as getColumn, be as getColumnIndex, bc as getColumns, at as getDatabaseDocumentModel, aj as getDatabaseSchemaIRI, S as getDatabaseSelectOptions, cG as getEmptyValue, z as getField, y as getFields, aq as getMeta, bJ as getOperatorLabel, bH as getOperatorsForType, l as getRichTextCell, s as getRichTextColumnIds, v as getRichTextPlainText, g as getRow, cv as getSchemaIRIFromDoc, P as getSelectOptions, bf as getTitleColumn, A as getTitleField, c8 as getTotalFromGroups, cl as getVersionBumpType, bm as getView, bn as getViewByType, a0 as getViewNode, $ as getViewNodes, bl as getViews, bX as groupRows, aL as guessColumnType, p as hasRichTextColumns, o as hasRichTextContent, bC as hideColumn, aO as inferColumnTypes, aQ as inferColumnsFromRows, aR as inferTypeFromValues, al as initializeDatabaseDoc, am as isDatabaseDocInitialized, ce as isDatabaseSchemaIRI, cH as isNumericAggregation, bI as isValidOperator, i as isValidSortKey, G as moveField, m as moveRow, X as moveSelectOption, a5 as moveView, n as needsRebalancing, bK as operatorRequiresValue, aJ as parseCSV, aK as parseCSVLine, cd as parseDatabaseSchemaIRI, aP as parseJSON, aN as parseRow, aM as parseValue, cf as parseVersion, ck as pruneVersionHistory, q as queryRows, r as rebalanceDatabase, k as rebalanceSortKeys, cC as remapViewColumnIds, bV as removeSort, bw as removeViewSort, K as renameExtensionField, bj as reorderColumn, bD as reorderViewColumns, bE as setColumnWidth, aa as setFieldHidden, ar as setMeta, ac as setViewFieldOrder, ab as setViewFieldWidth, bs as setViewFilters, by as setViewGroupBy, a6 as setViewNodeFilters, a8 as setViewNodeGroupBy, a7 as setViewNodeSorts, bu as setViewSorts, bA as setVisibleColumns, ae as setupDatabase, ap as setupNewDatabase, bB as showColumn, bR as sortRows, aS as toColumnDefinitions, bz as toggleGroupCollapsed, bY as toggleGroupCollapsedState, bT as toggleSortDirection, a9 as toggleViewGroupCollapsed, u as updateCell, b as updateCells, bh as updateColumn, E as updateField, V as updateSelectOption, bp as updateView, a2 as updateViewNode, aT as validateJsonData, aC as validateRollupConfig } from '../clone-_owA3IXN.js';
|
|
4
4
|
import '../types-S-BJAKyK.js';
|
|
5
5
|
import '@xnetjs/core';
|
|
6
6
|
import '@xnetjs/crypto';
|
|
7
7
|
import '@xnetjs/sqlite';
|
|
8
8
|
import '@xnetjs/sync';
|
|
9
|
-
import '../store-
|
|
9
|
+
import '../store-CjjofiLR.js';
|
|
10
10
|
import 'yjs';
|
|
11
11
|
|
|
12
12
|
/**
|
package/dist/database/index.js
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
MAX_VERSION_HISTORY,
|
|
17
17
|
OPERATORS_BY_TYPE,
|
|
18
18
|
OPERATOR_LABELS,
|
|
19
|
+
PUBLIC_SAFE_FORM_FIELD_TYPES,
|
|
19
20
|
QueryRouter,
|
|
20
21
|
RICHTEXT_PREFIX,
|
|
21
22
|
ROW_HEIGHTS,
|
|
@@ -34,6 +35,7 @@ import {
|
|
|
34
35
|
batchInvalidate,
|
|
35
36
|
buildDatabaseSchema,
|
|
36
37
|
buildDependencyGraph,
|
|
38
|
+
buildPublicFormDefinition,
|
|
37
39
|
buildSchemaFromFields,
|
|
38
40
|
buildSchemaIRI,
|
|
39
41
|
bumpSchemaVersion,
|
|
@@ -173,6 +175,8 @@ import {
|
|
|
173
175
|
isFilledValue,
|
|
174
176
|
isFilterCondition,
|
|
175
177
|
isFilterGroup,
|
|
178
|
+
isFormFieldTypeAllowed,
|
|
179
|
+
isFormQuestionVisible,
|
|
176
180
|
isNodeStoreColumnType,
|
|
177
181
|
isNodeStoreFieldType,
|
|
178
182
|
isNumericAggregation,
|
|
@@ -224,6 +228,7 @@ import {
|
|
|
224
228
|
setupNewDatabase,
|
|
225
229
|
showColumn,
|
|
226
230
|
sortRows,
|
|
231
|
+
submissionRowId,
|
|
227
232
|
summaryFunctionLabel,
|
|
228
233
|
supportsGrouping,
|
|
229
234
|
toCellProperties,
|
|
@@ -241,11 +246,13 @@ import {
|
|
|
241
246
|
updateSelectOption,
|
|
242
247
|
updateView,
|
|
243
248
|
updateView2,
|
|
249
|
+
validateFormSubmission,
|
|
244
250
|
validateJsonData,
|
|
245
251
|
validateRollupConfig,
|
|
246
252
|
validateTemplate,
|
|
253
|
+
visibleFormQuestions,
|
|
247
254
|
wouldCreateCircular
|
|
248
|
-
} from "../chunk-
|
|
255
|
+
} from "../chunk-Q67VT5XL.js";
|
|
249
256
|
import "../chunk-PMUQACPY.js";
|
|
250
257
|
import "../chunk-WEPK7SZF.js";
|
|
251
258
|
import {
|
|
@@ -257,10 +264,10 @@ import {
|
|
|
257
264
|
needsRebalancing,
|
|
258
265
|
rebalanceSortKeys
|
|
259
266
|
} from "../chunk-QWFTRZQT.js";
|
|
260
|
-
import "../chunk-
|
|
267
|
+
import "../chunk-FB63TZVI.js";
|
|
261
268
|
import "../chunk-KQAT4XBL.js";
|
|
262
269
|
import "../chunk-6OMG4I7M.js";
|
|
263
|
-
import "../chunk-
|
|
270
|
+
import "../chunk-MD553LDL.js";
|
|
264
271
|
import "../chunk-OCMSAKWV.js";
|
|
265
272
|
import "../chunk-S5RP5RKY.js";
|
|
266
273
|
import "../chunk-T5AZAOG5.js";
|
|
@@ -285,6 +292,7 @@ export {
|
|
|
285
292
|
MAX_VERSION_HISTORY,
|
|
286
293
|
OPERATORS_BY_TYPE,
|
|
287
294
|
OPERATOR_LABELS,
|
|
295
|
+
PUBLIC_SAFE_FORM_FIELD_TYPES,
|
|
288
296
|
QueryRouter,
|
|
289
297
|
RICHTEXT_PREFIX,
|
|
290
298
|
ROW_HEIGHTS,
|
|
@@ -303,6 +311,7 @@ export {
|
|
|
303
311
|
batchInvalidate,
|
|
304
312
|
buildDatabaseSchema,
|
|
305
313
|
buildDependencyGraph,
|
|
314
|
+
buildPublicFormDefinition,
|
|
306
315
|
buildSchemaFromFields,
|
|
307
316
|
buildSchemaIRI,
|
|
308
317
|
bumpSchemaVersion,
|
|
@@ -445,6 +454,8 @@ export {
|
|
|
445
454
|
isFilledValue,
|
|
446
455
|
isFilterCondition,
|
|
447
456
|
isFilterGroup,
|
|
457
|
+
isFormFieldTypeAllowed,
|
|
458
|
+
isFormQuestionVisible,
|
|
448
459
|
isNodeStoreColumnType,
|
|
449
460
|
isNodeStoreFieldType,
|
|
450
461
|
isNumericAggregation,
|
|
@@ -499,6 +510,7 @@ export {
|
|
|
499
510
|
setupNewDatabase,
|
|
500
511
|
showColumn,
|
|
501
512
|
sortRows,
|
|
513
|
+
submissionRowId,
|
|
502
514
|
summaryFunctionLabel,
|
|
503
515
|
supportsGrouping,
|
|
504
516
|
toCellProperties,
|
|
@@ -516,8 +528,10 @@ export {
|
|
|
516
528
|
updateSelectOption,
|
|
517
529
|
updateView2 as updateView,
|
|
518
530
|
updateView as updateViewNode,
|
|
531
|
+
validateFormSubmission,
|
|
519
532
|
validateJsonData,
|
|
520
533
|
validateRollupConfig,
|
|
521
534
|
validateTemplate,
|
|
535
|
+
visibleFormQuestions,
|
|
522
536
|
wouldCreateCircular
|
|
523
537
|
};
|