@revisium/schema-toolkit-ui 0.3.2 → 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/index.d.mts CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as _revisium_schema_toolkit0 from "@revisium/schema-toolkit";
2
- import { Diagnostic, JsonObjectSchema, JsonPatch, JsonSchema, JsonValuePatch, RefSchemas, RowModel, SchemaModel, SchemaNode, SchemaPatch, SchemaValidationError, TableModel, TreeFormulaValidationError, ValueNode } from "@revisium/schema-toolkit";
2
+ import { Diagnostic, InferNode, JsonObjectSchema, JsonPatch, JsonSchema, JsonValuePatch, RefSchemas, RowModel, SchemaModel, SchemaNode, SchemaPatch, SchemaValidationError, SystemSchemaIds, TableModel, TreeFormulaValidationError, ValueNode } from "@revisium/schema-toolkit";
3
3
  import { BoxProps, IconButtonProps, Tooltip as Tooltip$1 } from "@chakra-ui/react";
4
4
  import * as React$1 from "react";
5
- import React, { FC, FocusEventHandler, FormEventHandler, KeyboardEventHandler, RefCallback } from "react";
5
+ import React, { FC, FocusEventHandler, FormEventHandler, KeyboardEventHandler, PropsWithChildren, RefCallback } from "react";
6
+ import * as react_jsx_runtime19 from "react/jsx-runtime";
6
7
  export * from "@revisium/schema-toolkit";
7
8
 
8
9
  //#region src/schema-editor/model/state/TreeState.d.ts
@@ -233,7 +234,7 @@ declare class ValidationTracker {
233
234
  //#endregion
234
235
  //#region src/schema-editor/model/core/ViewState.d.ts
235
236
  type ViewMode = 'Tree' | 'Json' | 'RefBy';
236
- declare class ViewState {
237
+ declare class ViewState$1 {
237
238
  private _viewMode;
238
239
  private _loading;
239
240
  constructor();
@@ -331,7 +332,7 @@ declare class SchemaEditorCore {
331
332
  private readonly _onSelectForeignKey;
332
333
  readonly accessors: AccessorCache;
333
334
  readonly validation: ValidationTracker;
334
- readonly view: ViewState;
335
+ readonly view: ViewState$1;
335
336
  readonly collapse: CollapseManager;
336
337
  readonly keyboard: KeyboardNavigation;
337
338
  constructor(jsonSchema: JsonObjectSchema, options?: SchemaEditorCoreOptions, accessorFactory?: NodeAccessorFactory);
@@ -609,7 +610,7 @@ interface MenuItem {
609
610
  beforeSeparator?: boolean;
610
611
  afterSeparator?: boolean;
611
612
  }
612
- type NodeRendererType = 'string' | 'number' | 'boolean' | 'container' | 'file' | 'foreignKey';
613
+ type NodeRendererType = 'string' | 'number' | 'boolean' | 'container' | 'file' | 'foreignKey' | 'markdown';
613
614
  interface ForeignKeySearchResult {
614
615
  ids: string[];
615
616
  hasMore: boolean;
@@ -811,6 +812,1384 @@ interface CreateButtonProps {
811
812
  }
812
813
  declare const CreateButton: React.FC<CreateButtonProps>;
813
814
  //#endregion
815
+ //#region src/table-editor/shared/field-types.d.ts
816
+ declare enum FilterFieldType {
817
+ String = "String",
818
+ Number = "Number",
819
+ Boolean = "Boolean",
820
+ ForeignKey = "ForeignKey",
821
+ File = "File",
822
+ DateTime = "DateTime"
823
+ }
824
+ //#endregion
825
+ //#region src/table-editor/shared/system-fields.d.ts
826
+ declare enum SystemFieldId {
827
+ Id = "id",
828
+ CreatedAt = "createdAt",
829
+ UpdatedAt = "updatedAt",
830
+ CreatedId = "createdId",
831
+ VersionId = "versionId",
832
+ PublishedAt = "publishedAt",
833
+ Hash = "hash",
834
+ SchemaHash = "schemaHash"
835
+ }
836
+ interface SystemFieldDef {
837
+ id: SystemFieldId;
838
+ label: string;
839
+ fieldType: FilterFieldType;
840
+ ref: SystemSchemaIds;
841
+ }
842
+ declare const SYSTEM_FIELDS: SystemFieldDef[];
843
+ declare const SYSTEM_FIELD_BY_REF: ReadonlyMap<string, SystemFieldDef>;
844
+ //#endregion
845
+ //#region src/table-editor/shared/system-field-ids.d.ts
846
+ declare const SYSTEM_FIELD_IDS: ReadonlySet<string>;
847
+ //#endregion
848
+ //#region src/table-editor/Columns/model/types.d.ts
849
+ interface ColumnSpec {
850
+ field: string;
851
+ label: string;
852
+ fieldType: FilterFieldType;
853
+ isSystem: boolean;
854
+ systemFieldId?: SystemFieldId;
855
+ isDeprecated: boolean;
856
+ hasFormula: boolean;
857
+ foreignKeyTableId?: string;
858
+ }
859
+ type PinSide = 'left' | 'right';
860
+ interface ViewColumn {
861
+ field: string;
862
+ width?: number;
863
+ pinned?: PinSide;
864
+ }
865
+ //#endregion
866
+ //#region src/table-editor/Columns/model/extractColumns.d.ts
867
+ declare function extractColumns(rootNode: SchemaNode): ColumnSpec[];
868
+ //#endregion
869
+ //#region src/table-editor/Columns/model/selectDefaultColumns.d.ts
870
+ declare function selectDefaultColumns(columns: ColumnSpec[], maxVisible?: number): ColumnSpec[];
871
+ //#endregion
872
+ //#region src/table-editor/Columns/model/ColumnsModel.d.ts
873
+ declare class ColumnsModel {
874
+ private _allColumns;
875
+ private _visibleFields;
876
+ private readonly _columnWidths;
877
+ private readonly _pinnedColumns;
878
+ private _onChange;
879
+ constructor();
880
+ get visibleColumns(): ColumnSpec[];
881
+ get hiddenColumns(): ColumnSpec[];
882
+ get availableFieldsToAdd(): ColumnSpec[];
883
+ get availableSystemFieldsToAdd(): ColumnSpec[];
884
+ get hasHiddenColumns(): boolean;
885
+ get canRemoveColumn(): boolean;
886
+ get sortableFields(): ColumnSpec[];
887
+ get filterableFields(): ColumnSpec[];
888
+ get pinnedLeftCount(): number;
889
+ get pinnedRightCount(): number;
890
+ init(columns: ColumnSpec[]): void;
891
+ showColumn(field: string): void;
892
+ hideColumn(field: string): void;
893
+ hideAll(): void;
894
+ addAll(): void;
895
+ getColumnIndex(field: string): number;
896
+ canMoveLeft(field: string): boolean;
897
+ canMoveRight(field: string): boolean;
898
+ canMoveToStart(field: string): boolean;
899
+ canMoveToEnd(field: string): boolean;
900
+ moveColumnLeft(field: string): void;
901
+ moveColumnRight(field: string): void;
902
+ moveColumnToStart(field: string): void;
903
+ moveColumnToEnd(field: string): void;
904
+ insertColumnBefore(targetField: string, newField: string): void;
905
+ insertColumnAfter(targetField: string, newField: string): void;
906
+ reorderColumns(fields: string[]): void;
907
+ setColumnWidth(field: string, width: number): void;
908
+ getColumnWidth(field: string): number | undefined;
909
+ resolveColumnWidth(field: string): number;
910
+ getPinState(field: string): PinSide | undefined;
911
+ isPinned(field: string): boolean;
912
+ canPinLeft(field: string): boolean;
913
+ canPinRight(field: string): boolean;
914
+ canUnpin(field: string): boolean;
915
+ pinLeft(field: string): void;
916
+ pinRight(field: string): void;
917
+ unpin(field: string): void;
918
+ getColumnStickyLeft(field: string, selectionWidth: number): number | undefined;
919
+ getColumnStickyRight(field: string): number | undefined;
920
+ isStickyLeftBoundary(field: string): boolean;
921
+ isStickyRightBoundary(field: string): boolean;
922
+ resetToDefaults(): void;
923
+ serializeToViewColumns(): ViewColumn[];
924
+ applyViewColumns(viewColumns: ViewColumn[]): void;
925
+ setOnChange(cb: (() => void) | null): void;
926
+ dispose(): void;
927
+ private get _visibleFieldSet();
928
+ private get _columnLookup();
929
+ private _getZone;
930
+ private _getZoneBounds;
931
+ private _pinnedLeftInsertIndex;
932
+ private _pinnedRightInsertIndex;
933
+ private _hasNeighborPin;
934
+ private _toViewField;
935
+ private _fromViewField;
936
+ private _notifyChange;
937
+ }
938
+ //#endregion
939
+ //#region src/table-editor/Filters/model/utils/operators.d.ts
940
+ declare enum FilterOperator {
941
+ Equals = "equals",
942
+ NotEquals = "not_equals",
943
+ Contains = "contains",
944
+ NotContains = "not_contains",
945
+ StartsWith = "starts_with",
946
+ EndsWith = "ends_with",
947
+ IsEmpty = "is_empty",
948
+ IsNotEmpty = "is_not_empty",
949
+ Gt = "gt",
950
+ Gte = "gte",
951
+ Lt = "lt",
952
+ Lte = "lte",
953
+ IsTrue = "is_true",
954
+ IsFalse = "is_false",
955
+ Search = "search"
956
+ }
957
+ interface OperatorInfo {
958
+ operator: FilterOperator;
959
+ label: string;
960
+ requiresValue: boolean;
961
+ }
962
+ declare function operatorRequiresValue(operator: FilterOperator): boolean;
963
+ declare const OPERATORS_BY_TYPE: Readonly<Record<FilterFieldType, readonly OperatorInfo[]>>;
964
+ declare function getOperatorLabel(operator: FilterOperator, fieldType: FilterFieldType): string;
965
+ declare function getDefaultOperator(fieldType: FilterFieldType): FilterOperator;
966
+ declare function getOperatorsForType(fieldType: FilterFieldType): OperatorInfo[];
967
+ //#endregion
968
+ //#region src/table-editor/Filters/model/utils/searchTypes.d.ts
969
+ declare enum SearchLanguage {
970
+ Arabic = "arabic",
971
+ Armenian = "armenian",
972
+ Basque = "basque",
973
+ Catalan = "catalan",
974
+ Danish = "danish",
975
+ Dutch = "dutch",
976
+ English = "english",
977
+ Finnish = "finnish",
978
+ French = "french",
979
+ German = "german",
980
+ Greek = "greek",
981
+ Hindi = "hindi",
982
+ Hungarian = "hungarian",
983
+ Indonesian = "indonesian",
984
+ Irish = "irish",
985
+ Italian = "italian",
986
+ Lithuanian = "lithuanian",
987
+ Nepali = "nepali",
988
+ Norwegian = "norwegian",
989
+ Portuguese = "portuguese",
990
+ Romanian = "romanian",
991
+ Russian = "russian",
992
+ Serbian = "serbian",
993
+ Simple = "simple",
994
+ Spanish = "spanish",
995
+ Swedish = "swedish",
996
+ Tamil = "tamil",
997
+ Turkish = "turkish",
998
+ Yiddish = "yiddish"
999
+ }
1000
+ declare enum SearchType {
1001
+ Plain = "plain",
1002
+ Phrase = "phrase",
1003
+ Prefix = "prefix",
1004
+ Tsquery = "tsquery"
1005
+ }
1006
+ declare const SEARCH_LANGUAGES: readonly {
1007
+ value: SearchLanguage;
1008
+ label: string;
1009
+ }[];
1010
+ declare const SEARCH_TYPES: readonly {
1011
+ value: SearchType;
1012
+ label: string;
1013
+ }[];
1014
+ //#endregion
1015
+ //#region src/table-editor/Filters/model/types.d.ts
1016
+ interface FilterCondition {
1017
+ id: string;
1018
+ field: string;
1019
+ fieldType: FilterFieldType;
1020
+ operator: FilterOperator;
1021
+ value: string;
1022
+ searchLanguage?: string;
1023
+ searchType?: string;
1024
+ }
1025
+ interface FilterGroup {
1026
+ id: string;
1027
+ logic: 'and' | 'or';
1028
+ conditions: FilterCondition[];
1029
+ groups: FilterGroup[];
1030
+ }
1031
+ //#endregion
1032
+ //#region src/table-editor/Filters/model/filterSchema.d.ts
1033
+ declare const CONDITION_SCHEMA: {
1034
+ type: "object";
1035
+ additionalProperties: false;
1036
+ required: string[];
1037
+ properties: Record<string, _revisium_schema_toolkit0.JsonSchema>;
1038
+ title?: string;
1039
+ description?: string;
1040
+ deprecated?: boolean;
1041
+ } & _revisium_schema_toolkit0.JsonSchemaSharedFields & {
1042
+ readonly properties: {
1043
+ readonly id: _revisium_schema_toolkit0.JsonStringSchema;
1044
+ readonly field: _revisium_schema_toolkit0.JsonStringSchema;
1045
+ readonly fieldType: _revisium_schema_toolkit0.JsonStringSchema;
1046
+ readonly operator: _revisium_schema_toolkit0.JsonStringSchema;
1047
+ readonly value: _revisium_schema_toolkit0.JsonStringSchema;
1048
+ readonly searchLanguage: _revisium_schema_toolkit0.JsonStringSchema;
1049
+ readonly searchType: _revisium_schema_toolkit0.JsonStringSchema;
1050
+ };
1051
+ };
1052
+ declare const NESTED_GROUP_SCHEMA: {
1053
+ type: "object";
1054
+ additionalProperties: false;
1055
+ required: string[];
1056
+ properties: Record<string, _revisium_schema_toolkit0.JsonSchema>;
1057
+ title?: string;
1058
+ description?: string;
1059
+ deprecated?: boolean;
1060
+ } & _revisium_schema_toolkit0.JsonSchemaSharedFields & {
1061
+ readonly properties: {
1062
+ readonly id: _revisium_schema_toolkit0.JsonStringSchema;
1063
+ readonly logic: _revisium_schema_toolkit0.JsonStringSchema;
1064
+ readonly conditions: {
1065
+ type: "array";
1066
+ items: _revisium_schema_toolkit0.JsonSchema;
1067
+ title?: string;
1068
+ description?: string;
1069
+ deprecated?: boolean;
1070
+ } & _revisium_schema_toolkit0.JsonSchemaSharedFields & {
1071
+ readonly items: {
1072
+ type: "object";
1073
+ additionalProperties: false;
1074
+ required: string[];
1075
+ properties: Record<string, _revisium_schema_toolkit0.JsonSchema>;
1076
+ title?: string;
1077
+ description?: string;
1078
+ deprecated?: boolean;
1079
+ } & _revisium_schema_toolkit0.JsonSchemaSharedFields & {
1080
+ readonly properties: {
1081
+ readonly id: _revisium_schema_toolkit0.JsonStringSchema;
1082
+ readonly field: _revisium_schema_toolkit0.JsonStringSchema;
1083
+ readonly fieldType: _revisium_schema_toolkit0.JsonStringSchema;
1084
+ readonly operator: _revisium_schema_toolkit0.JsonStringSchema;
1085
+ readonly value: _revisium_schema_toolkit0.JsonStringSchema;
1086
+ readonly searchLanguage: _revisium_schema_toolkit0.JsonStringSchema;
1087
+ readonly searchType: _revisium_schema_toolkit0.JsonStringSchema;
1088
+ };
1089
+ };
1090
+ };
1091
+ };
1092
+ };
1093
+ declare const FILTER_SCHEMA: {
1094
+ type: "object";
1095
+ additionalProperties: false;
1096
+ required: string[];
1097
+ properties: Record<string, _revisium_schema_toolkit0.JsonSchema>;
1098
+ title?: string;
1099
+ description?: string;
1100
+ deprecated?: boolean;
1101
+ } & _revisium_schema_toolkit0.JsonSchemaSharedFields & {
1102
+ readonly properties: {
1103
+ readonly id: _revisium_schema_toolkit0.JsonStringSchema;
1104
+ readonly logic: _revisium_schema_toolkit0.JsonStringSchema;
1105
+ readonly conditions: {
1106
+ type: "array";
1107
+ items: _revisium_schema_toolkit0.JsonSchema;
1108
+ title?: string;
1109
+ description?: string;
1110
+ deprecated?: boolean;
1111
+ } & _revisium_schema_toolkit0.JsonSchemaSharedFields & {
1112
+ readonly items: {
1113
+ type: "object";
1114
+ additionalProperties: false;
1115
+ required: string[];
1116
+ properties: Record<string, _revisium_schema_toolkit0.JsonSchema>;
1117
+ title?: string;
1118
+ description?: string;
1119
+ deprecated?: boolean;
1120
+ } & _revisium_schema_toolkit0.JsonSchemaSharedFields & {
1121
+ readonly properties: {
1122
+ readonly id: _revisium_schema_toolkit0.JsonStringSchema;
1123
+ readonly field: _revisium_schema_toolkit0.JsonStringSchema;
1124
+ readonly fieldType: _revisium_schema_toolkit0.JsonStringSchema;
1125
+ readonly operator: _revisium_schema_toolkit0.JsonStringSchema;
1126
+ readonly value: _revisium_schema_toolkit0.JsonStringSchema;
1127
+ readonly searchLanguage: _revisium_schema_toolkit0.JsonStringSchema;
1128
+ readonly searchType: _revisium_schema_toolkit0.JsonStringSchema;
1129
+ };
1130
+ };
1131
+ };
1132
+ readonly groups: {
1133
+ type: "array";
1134
+ items: _revisium_schema_toolkit0.JsonSchema;
1135
+ title?: string;
1136
+ description?: string;
1137
+ deprecated?: boolean;
1138
+ } & _revisium_schema_toolkit0.JsonSchemaSharedFields & {
1139
+ readonly items: {
1140
+ type: "object";
1141
+ additionalProperties: false;
1142
+ required: string[];
1143
+ properties: Record<string, _revisium_schema_toolkit0.JsonSchema>;
1144
+ title?: string;
1145
+ description?: string;
1146
+ deprecated?: boolean;
1147
+ } & _revisium_schema_toolkit0.JsonSchemaSharedFields & {
1148
+ readonly properties: {
1149
+ readonly id: _revisium_schema_toolkit0.JsonStringSchema;
1150
+ readonly logic: _revisium_schema_toolkit0.JsonStringSchema;
1151
+ readonly conditions: {
1152
+ type: "array";
1153
+ items: _revisium_schema_toolkit0.JsonSchema;
1154
+ title?: string;
1155
+ description?: string;
1156
+ deprecated?: boolean;
1157
+ } & _revisium_schema_toolkit0.JsonSchemaSharedFields & {
1158
+ readonly items: {
1159
+ type: "object";
1160
+ additionalProperties: false;
1161
+ required: string[];
1162
+ properties: Record<string, _revisium_schema_toolkit0.JsonSchema>;
1163
+ title?: string;
1164
+ description?: string;
1165
+ deprecated?: boolean;
1166
+ } & _revisium_schema_toolkit0.JsonSchemaSharedFields & {
1167
+ readonly properties: {
1168
+ readonly id: _revisium_schema_toolkit0.JsonStringSchema;
1169
+ readonly field: _revisium_schema_toolkit0.JsonStringSchema;
1170
+ readonly fieldType: _revisium_schema_toolkit0.JsonStringSchema;
1171
+ readonly operator: _revisium_schema_toolkit0.JsonStringSchema;
1172
+ readonly value: _revisium_schema_toolkit0.JsonStringSchema;
1173
+ readonly searchLanguage: _revisium_schema_toolkit0.JsonStringSchema;
1174
+ readonly searchType: _revisium_schema_toolkit0.JsonStringSchema;
1175
+ };
1176
+ };
1177
+ };
1178
+ };
1179
+ };
1180
+ };
1181
+ readonly nextConditionId: _revisium_schema_toolkit0.JsonNumberSchema;
1182
+ readonly nextGroupId: _revisium_schema_toolkit0.JsonNumberSchema;
1183
+ };
1184
+ };
1185
+ type ConditionNode = InferNode<typeof CONDITION_SCHEMA>;
1186
+ type NestedGroupNode = InferNode<typeof NESTED_GROUP_SCHEMA>;
1187
+ type FilterRootNode = InferNode<typeof FILTER_SCHEMA>;
1188
+ //#endregion
1189
+ //#region src/table-editor/Filters/model/vm/FilterConditionVM.d.ts
1190
+ declare class FilterConditionVM {
1191
+ private readonly _node;
1192
+ constructor(_node: ConditionNode);
1193
+ get id(): string;
1194
+ get field(): string;
1195
+ get fieldType(): FilterFieldType;
1196
+ get operator(): FilterOperator;
1197
+ get value(): string;
1198
+ get searchLanguage(): SearchLanguage;
1199
+ get searchType(): SearchType;
1200
+ }
1201
+ //#endregion
1202
+ //#region src/table-editor/Filters/model/vm/FilterGroupVM.d.ts
1203
+ declare class FilterGroupVM {
1204
+ private readonly _node;
1205
+ private readonly _isRoot;
1206
+ constructor(_node: FilterRootNode | NestedGroupNode, isRoot?: boolean);
1207
+ get id(): string;
1208
+ get logic(): 'and' | 'or';
1209
+ get conditions(): FilterConditionVM[];
1210
+ get groups(): FilterGroupVM[];
1211
+ }
1212
+ //#endregion
1213
+ //#region src/table-editor/Filters/model/core/FilterCore.d.ts
1214
+ declare class FilterCore {
1215
+ private readonly _row;
1216
+ private readonly _treeOps;
1217
+ private readonly _serializer;
1218
+ private readonly _validator;
1219
+ private _availableFields;
1220
+ private _onChange;
1221
+ private _onApply;
1222
+ private _isOpen;
1223
+ private _committedHasFilters;
1224
+ constructor();
1225
+ private static _emptyFilterData;
1226
+ get isOpen(): boolean;
1227
+ setOpen(value: boolean): void;
1228
+ get rootGroup(): FilterGroupVM;
1229
+ get hasPendingChanges(): boolean;
1230
+ get totalConditionCount(): number;
1231
+ get hasActiveFilters(): boolean;
1232
+ get allFiltersValid(): boolean;
1233
+ get isEmpty(): boolean;
1234
+ hasFilterForField(field: string): boolean;
1235
+ get showBadge(): boolean;
1236
+ buildCurrentWhereClause(): Record<string, unknown> | null;
1237
+ init(availableFields: ColumnSpec[]): void;
1238
+ addCondition(groupId?: string): void;
1239
+ addConditionForField(field: string): void;
1240
+ updateCondition(id: string, updates: Partial<Pick<FilterConditionVM, 'field' | 'operator' | 'value' | 'searchLanguage' | 'searchType'>>): void;
1241
+ removeCondition(id: string): void;
1242
+ addGroup(): void;
1243
+ removeGroup(id: string): void;
1244
+ setGroupLogic(id: string, logic: 'and' | 'or'): void;
1245
+ apply(): void;
1246
+ applyAndClose(): void;
1247
+ reset(): void;
1248
+ applySnapshot(serialized: string): void;
1249
+ clearAll(): void;
1250
+ clearAllAndClose(): void;
1251
+ isConditionValid(id: string): boolean;
1252
+ getConditionError(id: string): string | null;
1253
+ serializeRootGroup(): FilterGroup;
1254
+ setOnChange(cb: (() => void) | null): void;
1255
+ setOnApply(cb: ((where: Record<string, unknown> | null) => void) | null): void;
1256
+ dispose(): void;
1257
+ private _fireOnApply;
1258
+ private _notifyChange;
1259
+ }
1260
+ //#endregion
1261
+ //#region src/table-editor/Filters/model/utils/filterBuilder.d.ts
1262
+ declare function buildWhereClause(group: FilterGroup): Record<string, unknown> | null;
1263
+ //#endregion
1264
+ //#region src/table-editor/Filters/ui/FilterWidget/FilterWidget.d.ts
1265
+ interface FilterWidgetProps {
1266
+ model: FilterCore;
1267
+ availableFields: ColumnSpec[];
1268
+ }
1269
+ declare const FilterWidget: (({
1270
+ model,
1271
+ availableFields
1272
+ }: FilterWidgetProps) => react_jsx_runtime19.JSX.Element) & {
1273
+ displayName: string;
1274
+ };
1275
+ //#endregion
1276
+ //#region src/table-editor/Filters/ui/FilterGroupView/FilterGroupView.d.ts
1277
+ interface FilterGroupViewProps {
1278
+ model: FilterCore;
1279
+ group: FilterGroupVM;
1280
+ availableFields: ColumnSpec[];
1281
+ isRoot?: boolean;
1282
+ }
1283
+ declare const FilterGroupView: (({
1284
+ model,
1285
+ group,
1286
+ availableFields,
1287
+ isRoot
1288
+ }: FilterGroupViewProps) => react_jsx_runtime19.JSX.Element) & {
1289
+ displayName: string;
1290
+ };
1291
+ //#endregion
1292
+ //#region src/table-editor/Filters/ui/FilterConditionView/FilterConditionView.d.ts
1293
+ interface FilterConditionViewProps {
1294
+ model: FilterCore;
1295
+ condition: FilterConditionVM;
1296
+ availableFields: ColumnSpec[];
1297
+ }
1298
+ declare const FilterConditionView: (({
1299
+ model,
1300
+ condition,
1301
+ availableFields
1302
+ }: FilterConditionViewProps) => react_jsx_runtime19.JSX.Element) & {
1303
+ displayName: string;
1304
+ };
1305
+ //#endregion
1306
+ //#region src/table-editor/Filters/ui/FieldSelect/FieldSelect.d.ts
1307
+ interface FieldSelectProps {
1308
+ value: string;
1309
+ fieldType: FilterFieldType;
1310
+ fields: ColumnSpec[];
1311
+ onChange: (field: string) => void;
1312
+ }
1313
+ declare const FieldSelect: (({
1314
+ value,
1315
+ fieldType,
1316
+ fields,
1317
+ onChange
1318
+ }: FieldSelectProps) => react_jsx_runtime19.JSX.Element) & {
1319
+ displayName: string;
1320
+ };
1321
+ //#endregion
1322
+ //#region src/table-editor/Filters/ui/OperatorSelect/OperatorSelect.d.ts
1323
+ interface OperatorSelectProps {
1324
+ value: FilterOperator;
1325
+ fieldType: FilterFieldType;
1326
+ onChange: (operator: FilterOperator) => void;
1327
+ }
1328
+ declare const OperatorSelect: (({
1329
+ value,
1330
+ fieldType,
1331
+ onChange
1332
+ }: OperatorSelectProps) => react_jsx_runtime19.JSX.Element) & {
1333
+ displayName: string;
1334
+ };
1335
+ //#endregion
1336
+ //#region src/table-editor/Filters/ui/FilterValueInput/FilterValueInput.d.ts
1337
+ interface FilterValueInputProps {
1338
+ value: string;
1339
+ fieldType: FilterFieldType;
1340
+ onChange: (value: string) => void;
1341
+ error?: string | null;
1342
+ }
1343
+ declare const FilterValueInput: (({
1344
+ value,
1345
+ fieldType,
1346
+ onChange,
1347
+ error
1348
+ }: FilterValueInputProps) => react_jsx_runtime19.JSX.Element) & {
1349
+ displayName: string;
1350
+ };
1351
+ //#endregion
1352
+ //#region src/table-editor/Search/model/SearchModel.d.ts
1353
+ declare class SearchModel {
1354
+ private _query;
1355
+ private _debouncedQuery;
1356
+ private readonly _debounce;
1357
+ private readonly _onSearch;
1358
+ constructor(onSearch: (query: string) => void, delay?: number);
1359
+ get query(): string;
1360
+ get debouncedQuery(): string;
1361
+ get hasActiveSearch(): boolean;
1362
+ setQuery(value: string): void;
1363
+ clear(): void;
1364
+ dispose(): void;
1365
+ }
1366
+ //#endregion
1367
+ //#region src/table-editor/Search/ui/SearchWidget.d.ts
1368
+ interface SearchWidgetProps {
1369
+ model: SearchModel;
1370
+ }
1371
+ declare const SearchWidget: (({
1372
+ model
1373
+ }: SearchWidgetProps) => react_jsx_runtime19.JSX.Element) & {
1374
+ displayName: string;
1375
+ };
1376
+ //#endregion
1377
+ //#region src/table-editor/Sortings/model/types.d.ts
1378
+ interface SortEntry {
1379
+ field: string;
1380
+ direction: 'asc' | 'desc';
1381
+ }
1382
+ interface ViewSort {
1383
+ field: string;
1384
+ direction: string;
1385
+ }
1386
+ //#endregion
1387
+ //#region src/table-editor/Sortings/model/SortModel.d.ts
1388
+ declare class SortModel {
1389
+ private readonly _row;
1390
+ private _availableFields;
1391
+ private _isOpen;
1392
+ private _onChange;
1393
+ private _onApply;
1394
+ constructor();
1395
+ private get _rootNode();
1396
+ get sorts(): SortEntry[];
1397
+ get hasSorts(): boolean;
1398
+ get sortCount(): number;
1399
+ get isOpen(): boolean;
1400
+ get hasPendingChanges(): boolean;
1401
+ setOpen(value: boolean): void;
1402
+ get availableFields(): ColumnSpec[];
1403
+ private get _fieldLookup();
1404
+ private _findIndex;
1405
+ private _setItemChild;
1406
+ init(availableFields: ColumnSpec[]): void;
1407
+ apply(): void;
1408
+ applyAndClose(): void;
1409
+ addSort(field: string, direction?: 'asc' | 'desc'): void;
1410
+ replaceField(oldField: string, newField: string): void;
1411
+ getSortDirection(field: string): 'asc' | 'desc' | null;
1412
+ getSortIndex(field: string): number | null;
1413
+ isSorted(field: string): boolean;
1414
+ setSingleSort(field: string, direction: 'asc' | 'desc'): void;
1415
+ setDirection(field: string, direction: 'asc' | 'desc'): void;
1416
+ removeSort(field: string): void;
1417
+ toggleDirection(field: string): void;
1418
+ reorderSorts(fields: string[]): void;
1419
+ clearAll(): void;
1420
+ clearAllAndClose(): void;
1421
+ addFirstAvailableSort(): void;
1422
+ serializeToViewSorts(): ViewSort[];
1423
+ applyViewSorts(viewSorts: ViewSort[]): void;
1424
+ setOnChange(cb: (() => void) | null): void;
1425
+ setOnApply(cb: ((sorts: ReturnType<SortModel['serializeToViewSorts']>) => void) | null): void;
1426
+ dispose(): void;
1427
+ private _fireOnApply;
1428
+ private _notifyChange;
1429
+ }
1430
+ //#endregion
1431
+ //#region src/table-editor/Sortings/model/sortSchema.d.ts
1432
+ declare const SORT_SCHEMA: {
1433
+ type: "array";
1434
+ items: _revisium_schema_toolkit0.JsonSchema;
1435
+ title?: string;
1436
+ description?: string;
1437
+ deprecated?: boolean;
1438
+ } & _revisium_schema_toolkit0.JsonSchemaSharedFields & {
1439
+ readonly items: {
1440
+ type: "object";
1441
+ additionalProperties: false;
1442
+ required: string[];
1443
+ properties: Record<string, _revisium_schema_toolkit0.JsonSchema>;
1444
+ title?: string;
1445
+ description?: string;
1446
+ deprecated?: boolean;
1447
+ } & _revisium_schema_toolkit0.JsonSchemaSharedFields & {
1448
+ readonly properties: {
1449
+ readonly field: _revisium_schema_toolkit0.JsonStringSchema;
1450
+ readonly direction: _revisium_schema_toolkit0.JsonStringSchema;
1451
+ };
1452
+ };
1453
+ };
1454
+ //#endregion
1455
+ //#region src/table-editor/Sortings/ui/SortingsWidget/SortingsWidget.d.ts
1456
+ interface SortingsWidgetProps {
1457
+ model: SortModel;
1458
+ availableFields: ColumnSpec[];
1459
+ onChange: (sorts: ReturnType<SortModel['serializeToViewSorts']>) => void;
1460
+ }
1461
+ declare const SortingsWidget: (({
1462
+ model,
1463
+ availableFields,
1464
+ onChange
1465
+ }: SortingsWidgetProps) => react_jsx_runtime19.JSX.Element) & {
1466
+ displayName: string;
1467
+ };
1468
+ //#endregion
1469
+ //#region src/table-editor/Sortings/ui/SortRow/SortRow.d.ts
1470
+ interface SortRowProps {
1471
+ sort: SortEntry;
1472
+ index: number;
1473
+ model: SortModel;
1474
+ availableFields: ColumnSpec[];
1475
+ }
1476
+ declare const SortRow: (({
1477
+ sort,
1478
+ index,
1479
+ model,
1480
+ availableFields
1481
+ }: SortRowProps) => react_jsx_runtime19.JSX.Element) & {
1482
+ displayName: string;
1483
+ };
1484
+ //#endregion
1485
+ //#region src/table-editor/Sortings/ui/SortFieldSelect/SortFieldSelect.d.ts
1486
+ interface SortFieldSelectProps {
1487
+ currentField: string;
1488
+ availableFields: ColumnSpec[];
1489
+ onChange: (field: string) => void;
1490
+ }
1491
+ declare const SortFieldSelect: (({
1492
+ currentField,
1493
+ availableFields,
1494
+ onChange
1495
+ }: SortFieldSelectProps) => react_jsx_runtime19.JSX.Element) & {
1496
+ displayName: string;
1497
+ };
1498
+ //#endregion
1499
+ //#region src/table-editor/Sortings/ui/SortDirectionSelect/SortDirectionSelect.d.ts
1500
+ interface SortDirectionSelectProps {
1501
+ selectedDirection: 'asc' | 'desc';
1502
+ onSelect: (direction: 'asc' | 'desc') => void;
1503
+ }
1504
+ declare const SortDirectionSelect: (({
1505
+ selectedDirection,
1506
+ onSelect
1507
+ }: SortDirectionSelectProps) => react_jsx_runtime19.JSX.Element) & {
1508
+ displayName: string;
1509
+ };
1510
+ //#endregion
1511
+ //#region src/table-editor/Table/model/SelectionModel.d.ts
1512
+ declare class SelectionModel {
1513
+ private readonly _selected;
1514
+ constructor();
1515
+ get isSelectionMode(): boolean;
1516
+ get selectedCount(): number;
1517
+ get selectedIds(): string[];
1518
+ isSelected(rowId: string): boolean;
1519
+ deselect(rowId: string): void;
1520
+ toggle(rowId: string): void;
1521
+ selectAll(rowIds: string[]): void;
1522
+ deselectAll(): void;
1523
+ enterSelectionMode(rowId?: string): void;
1524
+ isAllSelected(allRowIds: string[]): boolean;
1525
+ exitSelectionMode(): void;
1526
+ }
1527
+ //#endregion
1528
+ //#region src/table-editor/Table/model/cellFSMConfig.d.ts
1529
+ interface CellAddress {
1530
+ rowId: string;
1531
+ field: string;
1532
+ }
1533
+ type EditTrigger = {
1534
+ type: 'doubleClick';
1535
+ clickOffset?: number;
1536
+ } | {
1537
+ type: 'enter';
1538
+ } | {
1539
+ type: 'char';
1540
+ char: string;
1541
+ };
1542
+ interface SelectedRange {
1543
+ startCol: number;
1544
+ endCol: number;
1545
+ startRow: number;
1546
+ endRow: number;
1547
+ }
1548
+ interface SelectionEdges {
1549
+ top: boolean;
1550
+ bottom: boolean;
1551
+ left: boolean;
1552
+ right: boolean;
1553
+ }
1554
+ type CellState = 'idle' | 'focused' | 'editing';
1555
+ //#endregion
1556
+ //#region src/table-editor/Table/model/CellFSM.d.ts
1557
+ declare class CellFSM {
1558
+ private readonly _fsm;
1559
+ constructor();
1560
+ get state(): CellState;
1561
+ get focusedCell(): CellAddress | null;
1562
+ get anchorCell(): CellAddress | null;
1563
+ get editTrigger(): EditTrigger | null;
1564
+ get columns(): string[];
1565
+ get rowIds(): string[];
1566
+ get navigationVersion(): number;
1567
+ get hasSelection(): boolean;
1568
+ isCellFocused(rowId: string, field: string): boolean;
1569
+ isCellAnchor(rowId: string, field: string): boolean;
1570
+ isCellEditing(rowId: string, field: string): boolean;
1571
+ isCellInSelection(rowId: string, field: string): boolean;
1572
+ getCellSelectionEdges(rowId: string, field: string): SelectionEdges | null;
1573
+ private _getCellPosition;
1574
+ getSelectedRange(): SelectedRange | null;
1575
+ setNavigationContext(columns: string[], rowIds: string[]): void;
1576
+ updateNavigationContext(columns: string[], rowIds: string[]): void;
1577
+ focusCell(cell: CellAddress): void;
1578
+ blur(): void;
1579
+ doubleClick(clickOffset?: number): void;
1580
+ enterEdit(): void;
1581
+ typeChar(char: string): void;
1582
+ commit(): void;
1583
+ commitAndMoveDown(): void;
1584
+ cancel(): void;
1585
+ moveUp(): void;
1586
+ moveDown(): void;
1587
+ moveLeft(): void;
1588
+ moveRight(): void;
1589
+ handleTab(shift: boolean): void;
1590
+ selectTo(cell: CellAddress): void;
1591
+ shiftMoveUp(): void;
1592
+ shiftMoveDown(): void;
1593
+ shiftMoveLeft(): void;
1594
+ shiftMoveRight(): void;
1595
+ dragStart(cell: CellAddress): void;
1596
+ dragExtend(cell: CellAddress): void;
1597
+ dispose(): void;
1598
+ }
1599
+ //#endregion
1600
+ //#region src/table-editor/Table/model/CellVM.d.ts
1601
+ type CellCommitCallback = (rowId: string, field: string, value: unknown, previousValue?: unknown) => void;
1602
+ declare class CellVM {
1603
+ private readonly _rowModel;
1604
+ private readonly _column;
1605
+ private readonly _rowId;
1606
+ private readonly _cellFSM;
1607
+ private readonly _onCommit;
1608
+ constructor(rowModel: RowModel, column: ColumnSpec, rowId: string, cellFSM: CellFSM, onCommit?: CellCommitCallback);
1609
+ get field(): string;
1610
+ get jsonPath(): string;
1611
+ get column(): ColumnSpec;
1612
+ get rowId(): string;
1613
+ get value(): unknown;
1614
+ get displayValue(): string;
1615
+ get isReadOnly(): boolean;
1616
+ get foreignKeyTableId(): string | undefined;
1617
+ get isEditable(): boolean;
1618
+ get isFocused(): boolean;
1619
+ get isEditing(): boolean;
1620
+ get isAnchor(): boolean;
1621
+ get isInSelection(): boolean;
1622
+ get selectionEdges(): SelectionEdges | null;
1623
+ get hasRangeSelection(): boolean;
1624
+ get navigationVersion(): number;
1625
+ get editTrigger(): EditTrigger | null;
1626
+ focus(): void;
1627
+ startEdit(): void;
1628
+ startEditWithChar(char: string): void;
1629
+ startEditWithDoubleClick(clickOffset?: number): void;
1630
+ commitEdit(newValue: unknown): void;
1631
+ commitEditAndMoveDown(newValue?: unknown): void;
1632
+ cancelEdit(): void;
1633
+ clearToDefault(): void;
1634
+ copyToClipboard(): Promise<void>;
1635
+ pasteFromClipboard(): Promise<void>;
1636
+ applyPastedText(text: string): void;
1637
+ blur(): void;
1638
+ moveUp(): void;
1639
+ moveDown(): void;
1640
+ moveLeft(): void;
1641
+ moveRight(): void;
1642
+ handleTab(shift: boolean): void;
1643
+ selectTo(): void;
1644
+ shiftMoveUp(): void;
1645
+ shiftMoveDown(): void;
1646
+ shiftMoveLeft(): void;
1647
+ shiftMoveRight(): void;
1648
+ dragStart(): void;
1649
+ dragExtend(): void;
1650
+ private _getNode;
1651
+ private _applyPastedString;
1652
+ private _applyPastedNumber;
1653
+ private _applyPastedBoolean;
1654
+ }
1655
+ //#endregion
1656
+ //#region src/table-editor/Table/model/RowVM.d.ts
1657
+ declare class RowVM {
1658
+ private readonly _rowModel;
1659
+ private readonly _rowId;
1660
+ private readonly _cellFSM;
1661
+ private readonly _selection;
1662
+ private readonly _onCellCommit;
1663
+ private readonly _cellCache;
1664
+ constructor(rowModel: RowModel, rowId: string, cellFSM: CellFSM, selection: SelectionModel, onCellCommit?: CellCommitCallback);
1665
+ get rowId(): string;
1666
+ get rowModel(): RowModel;
1667
+ get isSelected(): boolean;
1668
+ toggleSelection(): void;
1669
+ getCellVM(column: ColumnSpec): CellVM;
1670
+ dispose(): void;
1671
+ }
1672
+ //#endregion
1673
+ //#region src/search-foreign-key/vm/SearchForeignKeyVM.d.ts
1674
+ type SearchForeignKeySearchFn = (tableId: string, search: string) => Promise<{
1675
+ ids: string[];
1676
+ hasMore: boolean;
1677
+ }>;
1678
+ type SearchState = 'loading' | 'empty' | 'list' | 'notFound' | 'error';
1679
+ declare class SearchForeignKeyVM {
1680
+ private readonly _tableId;
1681
+ private readonly _onSearch;
1682
+ private _search;
1683
+ private _state;
1684
+ private _ids;
1685
+ private _hasMore;
1686
+ private _initialized;
1687
+ private _disposeReaction;
1688
+ private readonly _debounce;
1689
+ constructor(_tableId: string, _onSearch: SearchForeignKeySearchFn | null);
1690
+ get search(): string;
1691
+ get state(): SearchState;
1692
+ get ids(): string[];
1693
+ get hasMore(): boolean;
1694
+ get showInput(): boolean;
1695
+ get showFooter(): boolean;
1696
+ get showLoading(): boolean;
1697
+ get showNotFound(): boolean;
1698
+ get showError(): boolean;
1699
+ get showEmpty(): boolean;
1700
+ get showList(): boolean;
1701
+ get tableId(): string;
1702
+ init(): void;
1703
+ setSearch(value: string): void;
1704
+ dispose(): void;
1705
+ private _debouncedSearch;
1706
+ private _resolveState;
1707
+ private _performSearch;
1708
+ }
1709
+ //#endregion
1710
+ //#region src/search-foreign-key/ui/SearchForeignKey.d.ts
1711
+ interface SearchForeignKeyProps {
1712
+ tableId: string;
1713
+ onSearch: SearchForeignKeySearchFn;
1714
+ onSelect: (id: string) => void;
1715
+ onClose?: () => void;
1716
+ onOpenTableSearch?: () => void;
1717
+ onCreateAndConnect?: () => void;
1718
+ }
1719
+ declare const SearchForeignKey: FC<SearchForeignKeyProps>;
1720
+ //#endregion
1721
+ //#region src/table-editor/Table/ui/Cell/CellRenderer.d.ts
1722
+ interface CellRendererProps {
1723
+ cell: CellVM;
1724
+ onSearchForeignKey?: SearchForeignKeySearchFn;
1725
+ }
1726
+ declare const CellRenderer: (({
1727
+ cell,
1728
+ onSearchForeignKey
1729
+ }: CellRendererProps) => react_jsx_runtime19.JSX.Element) & {
1730
+ displayName: string;
1731
+ };
1732
+ //#endregion
1733
+ //#region src/table-editor/Table/ui/Cell/CellWrapper.d.ts
1734
+ interface CellWrapperProps extends PropsWithChildren {
1735
+ cell: CellVM;
1736
+ onDoubleClick?: (clientX?: number) => void;
1737
+ onStartEdit?: () => void;
1738
+ onTypeChar?: (char: string) => void;
1739
+ onDelete?: () => void;
1740
+ }
1741
+ declare const CellWrapper: FC<CellWrapperProps>;
1742
+ //#endregion
1743
+ //#region src/table-editor/Table/ui/Cell/StringCell.d.ts
1744
+ interface StringCellProps {
1745
+ cell: CellVM;
1746
+ }
1747
+ declare const StringCell: (({
1748
+ cell
1749
+ }: StringCellProps) => react_jsx_runtime19.JSX.Element) & {
1750
+ displayName: string;
1751
+ };
1752
+ //#endregion
1753
+ //#region src/table-editor/Table/ui/Cell/NumberCell.d.ts
1754
+ interface NumberCellProps {
1755
+ cell: CellVM;
1756
+ }
1757
+ declare const NumberCell: (({
1758
+ cell
1759
+ }: NumberCellProps) => react_jsx_runtime19.JSX.Element) & {
1760
+ displayName: string;
1761
+ };
1762
+ //#endregion
1763
+ //#region src/table-editor/Table/ui/Cell/BooleanCell.d.ts
1764
+ interface BooleanCellProps {
1765
+ cell: CellVM;
1766
+ }
1767
+ declare const BooleanCell: (({
1768
+ cell
1769
+ }: BooleanCellProps) => react_jsx_runtime19.JSX.Element) & {
1770
+ displayName: string;
1771
+ };
1772
+ //#endregion
1773
+ //#region src/table-editor/Table/ui/Cell/ForeignKeyCell.d.ts
1774
+ interface ForeignKeyCellProps {
1775
+ cell: CellVM;
1776
+ onSearchForeignKey?: SearchForeignKeySearchFn;
1777
+ }
1778
+ declare const ForeignKeyCell: (({
1779
+ cell,
1780
+ onSearchForeignKey
1781
+ }: ForeignKeyCellProps) => react_jsx_runtime19.JSX.Element) & {
1782
+ displayName: string;
1783
+ };
1784
+ //#endregion
1785
+ //#region src/table-editor/Table/ui/Cell/FileCell.d.ts
1786
+ interface FileCellProps {
1787
+ cell: CellVM;
1788
+ }
1789
+ declare const FileCell: (({
1790
+ cell
1791
+ }: FileCellProps) => react_jsx_runtime19.JSX.Element) & {
1792
+ displayName: string;
1793
+ };
1794
+ //#endregion
1795
+ //#region src/table-editor/Table/ui/Cell/DateTimeCell.d.ts
1796
+ interface DateTimeCellProps {
1797
+ cell: CellVM;
1798
+ }
1799
+ declare const DateTimeCell: (({
1800
+ cell
1801
+ }: DateTimeCellProps) => react_jsx_runtime19.JSX.Element) & {
1802
+ displayName: string;
1803
+ };
1804
+ //#endregion
1805
+ //#region src/table-editor/Table/ui/Cell/ReadonlyCell.d.ts
1806
+ interface ReadonlyCellProps {
1807
+ cell: CellVM;
1808
+ }
1809
+ declare const ReadonlyCell: (({
1810
+ cell
1811
+ }: ReadonlyCellProps) => react_jsx_runtime19.JSX.Element) & {
1812
+ displayName: string;
1813
+ };
1814
+ //#endregion
1815
+ //#region src/table-editor/Table/ui/TableWidget.d.ts
1816
+ interface TableWidgetProps {
1817
+ rows: RowVM[];
1818
+ columnsModel: ColumnsModel;
1819
+ cellFSM?: CellFSM;
1820
+ selection: SelectionModel;
1821
+ sortModel?: SortModel;
1822
+ filterModel?: FilterCore;
1823
+ onSearchForeignKey?: SearchForeignKeySearchFn;
1824
+ onOpenRow?: (rowId: string) => void;
1825
+ onDeleteSelected?: (ids: string[]) => void;
1826
+ onDuplicateSelected?: (ids: string[]) => void;
1827
+ onDeleteRow?: (rowId: string) => void;
1828
+ onDuplicateRow?: (rowId: string) => void;
1829
+ onCopyPath?: (path: string) => void;
1830
+ onEndReached?: () => void;
1831
+ isLoadingMore?: boolean;
1832
+ useWindowScroll?: boolean;
1833
+ }
1834
+ declare const TableWidget: (({
1835
+ rows,
1836
+ columnsModel,
1837
+ cellFSM,
1838
+ selection,
1839
+ sortModel,
1840
+ filterModel,
1841
+ onSearchForeignKey,
1842
+ onOpenRow,
1843
+ onDeleteSelected,
1844
+ onDuplicateSelected,
1845
+ onDeleteRow,
1846
+ onDuplicateRow,
1847
+ onCopyPath,
1848
+ onEndReached,
1849
+ isLoadingMore,
1850
+ useWindowScroll: useWindowScrollProp
1851
+ }: TableWidgetProps) => react_jsx_runtime19.JSX.Element) & {
1852
+ displayName: string;
1853
+ };
1854
+ //#endregion
1855
+ //#region src/table-editor/Table/ui/HeaderRow.d.ts
1856
+ interface HeaderRowProps {
1857
+ columnsModel: ColumnsModel;
1858
+ sortModel?: SortModel;
1859
+ filterModel?: FilterCore;
1860
+ onCopyPath?: (path: string) => void;
1861
+ showSelection?: boolean;
1862
+ showLeftShadow?: boolean;
1863
+ showRightShadow?: boolean;
1864
+ }
1865
+ declare const HeaderRow: (({
1866
+ columnsModel,
1867
+ sortModel,
1868
+ filterModel,
1869
+ onCopyPath,
1870
+ showSelection,
1871
+ showLeftShadow,
1872
+ showRightShadow
1873
+ }: HeaderRowProps) => react_jsx_runtime19.JSX.Element) & {
1874
+ displayName: string;
1875
+ };
1876
+ //#endregion
1877
+ //#region src/table-editor/Table/ui/DataRow.d.ts
1878
+ interface DataRowProps {
1879
+ row: RowVM;
1880
+ columnsModel: ColumnsModel;
1881
+ showSelection: boolean;
1882
+ showLeftShadow?: boolean;
1883
+ showRightShadow?: boolean;
1884
+ onSearchForeignKey?: SearchForeignKeySearchFn;
1885
+ onOpenRow?: (rowId: string) => void;
1886
+ onSelectRow?: (rowId: string) => void;
1887
+ onDuplicateRow?: (rowId: string) => void;
1888
+ onDeleteRow?: (rowId: string) => void;
1889
+ }
1890
+ declare const DataRow: (({
1891
+ row,
1892
+ columnsModel,
1893
+ showSelection,
1894
+ showLeftShadow,
1895
+ showRightShadow,
1896
+ onSearchForeignKey,
1897
+ onOpenRow,
1898
+ onSelectRow,
1899
+ onDuplicateRow,
1900
+ onDeleteRow
1901
+ }: DataRowProps) => react_jsx_runtime19.JSX.Element) & {
1902
+ displayName: string;
1903
+ };
1904
+ //#endregion
1905
+ //#region src/table-editor/Table/ui/ResizeHandle.d.ts
1906
+ interface ResizeHandleProps {
1907
+ field: string;
1908
+ columnsModel: ColumnsModel;
1909
+ }
1910
+ declare const ResizeHandle: (({
1911
+ field,
1912
+ columnsModel
1913
+ }: ResizeHandleProps) => react_jsx_runtime19.JSX.Element) & {
1914
+ displayName: string;
1915
+ };
1916
+ //#endregion
1917
+ //#region src/table-editor/Table/ui/SelectionToolbar.d.ts
1918
+ interface SelectionToolbarProps {
1919
+ selection: SelectionModel;
1920
+ allRowIds: string[];
1921
+ onDuplicate?: (ids: string[]) => void;
1922
+ onDelete?: (ids: string[]) => void;
1923
+ }
1924
+ declare const SelectionToolbar: (({
1925
+ selection,
1926
+ allRowIds,
1927
+ onDuplicate,
1928
+ onDelete
1929
+ }: SelectionToolbarProps) => react_jsx_runtime19.JSX.Element) & {
1930
+ displayName: string;
1931
+ };
1932
+ //#endregion
1933
+ //#region src/table-editor/Table/ui/RowActionsMenu/RowActionsMenu.d.ts
1934
+ interface RowActionsMenuProps {
1935
+ rowId: string;
1936
+ onSelect?: (rowId: string) => void;
1937
+ onDuplicate?: (rowId: string) => void;
1938
+ onDelete?: (rowId: string) => void;
1939
+ }
1940
+ declare const RowActionsMenu: FC<RowActionsMenuProps>;
1941
+ //#endregion
1942
+ //#region src/table-editor/Table/ui/DeleteConfirmDialog/DeleteConfirmDialog.d.ts
1943
+ interface DeleteConfirmDialogProps {
1944
+ isOpen: boolean;
1945
+ onClose: () => void;
1946
+ onConfirm: () => void;
1947
+ count?: number;
1948
+ }
1949
+ declare const DeleteConfirmDialog: FC<DeleteConfirmDialogProps>;
1950
+ //#endregion
1951
+ //#region src/table-editor/Status/model/RowCountModel.d.ts
1952
+ declare class RowCountModel {
1953
+ private _totalCount;
1954
+ private _baseTotalCount;
1955
+ private _isFiltering;
1956
+ private _isRefetching;
1957
+ constructor();
1958
+ get totalCount(): number;
1959
+ get baseTotalCount(): number;
1960
+ get isFiltering(): boolean;
1961
+ get isRefetching(): boolean;
1962
+ get text(): string;
1963
+ setTotalCount(count: number): void;
1964
+ setBaseTotalCount(count: number): void;
1965
+ setIsFiltering(value: boolean): void;
1966
+ setRefetching(value: boolean): void;
1967
+ decrementBaseTotalCount(by?: number): void;
1968
+ }
1969
+ //#endregion
1970
+ //#region src/table-editor/Status/model/ViewSettingsBadgeModel.d.ts
1971
+ declare class ViewSettingsBadgeModel {
1972
+ private _snapshot;
1973
+ private _currentSnapshot;
1974
+ private _canSave;
1975
+ private _isPopoverOpen;
1976
+ private _onSave;
1977
+ private _onRevert;
1978
+ constructor();
1979
+ get hasChanges(): boolean;
1980
+ get isVisible(): boolean;
1981
+ get canSave(): boolean;
1982
+ get isPopoverOpen(): boolean;
1983
+ saveSnapshot(state: unknown): void;
1984
+ checkForChanges(state: unknown): void;
1985
+ save(): Promise<void>;
1986
+ revert(): void;
1987
+ setCanSave(value: boolean): void;
1988
+ setPopoverOpen(value: boolean): void;
1989
+ setOnSave(cb: (() => Promise<void>) | null): void;
1990
+ setOnRevert(cb: (() => void) | null): void;
1991
+ dispose(): void;
1992
+ }
1993
+ //#endregion
1994
+ //#region src/table-editor/TableEditor/model/ITableDataSource.d.ts
1995
+ interface RowDataItem {
1996
+ rowId: string;
1997
+ data: Record<string, unknown>;
1998
+ }
1999
+ interface TableMetadata {
2000
+ schema: JsonSchema;
2001
+ columns: ColumnSpec[];
2002
+ viewState: ViewState | null;
2003
+ readonly: boolean;
2004
+ }
2005
+ interface TableQuery {
2006
+ where: Record<string, unknown> | null;
2007
+ orderBy: Array<{
2008
+ field: string;
2009
+ direction: string;
2010
+ }>;
2011
+ search: string;
2012
+ first: number;
2013
+ after: string | null;
2014
+ }
2015
+ interface FetchRowsResult {
2016
+ rows: RowDataItem[];
2017
+ totalCount: number;
2018
+ hasNextPage: boolean;
2019
+ endCursor: string | null;
2020
+ }
2021
+ interface CellPatch {
2022
+ rowId: string;
2023
+ field: string;
2024
+ value: unknown;
2025
+ }
2026
+ interface CellPatchResult {
2027
+ rowId: string;
2028
+ field: string;
2029
+ ok: boolean;
2030
+ error?: string;
2031
+ }
2032
+ interface DeleteRowsResult {
2033
+ ok: boolean;
2034
+ error?: string;
2035
+ }
2036
+ interface ITableDataSource {
2037
+ fetchMetadata(): Promise<TableMetadata>;
2038
+ fetchRows(query: TableQuery): Promise<FetchRowsResult>;
2039
+ patchCells(patches: CellPatch[]): Promise<CellPatchResult[]>;
2040
+ deleteRows(rowIds: string[]): Promise<DeleteRowsResult>;
2041
+ saveView(viewState: ViewState): Promise<{
2042
+ ok: boolean;
2043
+ error?: string;
2044
+ }>;
2045
+ }
2046
+ //#endregion
2047
+ //#region src/table-editor/TableEditor/model/TableEditorCore.d.ts
2048
+ interface ViewState {
2049
+ columns: Array<{
2050
+ field: string;
2051
+ width?: number;
2052
+ }>;
2053
+ filters: string | null;
2054
+ sorts: Array<{
2055
+ field: string;
2056
+ direction: string;
2057
+ }>;
2058
+ search: string;
2059
+ }
2060
+ interface TableEditorBreadcrumb {
2061
+ label: string;
2062
+ dataTestId?: string;
2063
+ }
2064
+ interface TableEditorCallbacks {
2065
+ onBreadcrumbClick?: (segment: TableEditorBreadcrumb, index: number) => void;
2066
+ onCreateRow?: () => void;
2067
+ onOpenRow?: (rowId: string) => void;
2068
+ onDuplicateRow?: (rowId: string) => void;
2069
+ onSearchForeignKey?: SearchForeignKeySearchFn;
2070
+ onCopyPath?: (path: string) => void;
2071
+ }
2072
+ interface TableEditorOptions {
2073
+ tableId: string;
2074
+ pageSize?: number;
2075
+ breadcrumbs?: TableEditorBreadcrumb[];
2076
+ callbacks?: TableEditorCallbacks;
2077
+ }
2078
+ declare class TableEditorCore {
2079
+ readonly columns: ColumnsModel;
2080
+ readonly filters: FilterCore;
2081
+ readonly sorts: SortModel;
2082
+ readonly search: SearchModel;
2083
+ readonly viewBadge: ViewSettingsBadgeModel;
2084
+ readonly cellFSM: CellFSM;
2085
+ readonly selection: SelectionModel;
2086
+ readonly rowCount: RowCountModel;
2087
+ private readonly _dataSource;
2088
+ private readonly _pageSize;
2089
+ private readonly _breadcrumbs;
2090
+ private readonly _callbacks;
2091
+ private readonly _tableId;
2092
+ private _schema;
2093
+ private _readonly;
2094
+ private _rows;
2095
+ private _isBootstrapping;
2096
+ private _isLoadingMore;
2097
+ private _hasNextPage;
2098
+ private _endCursor;
2099
+ private _savedViewState;
2100
+ constructor(dataSource: ITableDataSource, options: TableEditorOptions);
2101
+ get rows(): RowVM[];
2102
+ get isBootstrapping(): boolean;
2103
+ get isLoadingMore(): boolean;
2104
+ get readonly(): boolean;
2105
+ get tableId(): string;
2106
+ get breadcrumbs(): TableEditorBreadcrumb[];
2107
+ get callbacks(): TableEditorCallbacks;
2108
+ getViewState(): ViewState;
2109
+ applyViewState(state: ViewState): void;
2110
+ loadMore(): Promise<void>;
2111
+ deleteRows(rowIds: string[]): Promise<void>;
2112
+ dispose(): void;
2113
+ private _bootstrap;
2114
+ private _buildQuery;
2115
+ private _loadRows;
2116
+ private _reloadRows;
2117
+ private _replaceRowVMs;
2118
+ private _appendRowVMs;
2119
+ private _createRowVMs;
2120
+ private _commitCell;
2121
+ private _updateNavigationContext;
2122
+ private _handleColumnsChange;
2123
+ private _handleFilterChange;
2124
+ private _handleFilterApply;
2125
+ private _handleSortChange;
2126
+ private _handleSortApply;
2127
+ private _handleSearch;
2128
+ private _handleViewSave;
2129
+ private _handleViewRevert;
2130
+ private _saveViewSnapshot;
2131
+ private _checkViewChanges;
2132
+ }
2133
+ //#endregion
2134
+ //#region src/table-editor/TableEditor/model/MockDataSource.d.ts
2135
+ interface MockDataSourceParams {
2136
+ schema: JsonSchema;
2137
+ columns: ColumnSpec[];
2138
+ rows: RowDataItem[];
2139
+ viewState?: ViewState | null;
2140
+ readonly?: boolean;
2141
+ failPatches?: Set<string>;
2142
+ }
2143
+ declare class MockDataSource implements ITableDataSource {
2144
+ private _allRows;
2145
+ private readonly _schema;
2146
+ private readonly _columns;
2147
+ private readonly _viewState;
2148
+ private readonly _readonly;
2149
+ private readonly _failPatches;
2150
+ readonly fetchMetadataLog: Array<true>;
2151
+ readonly fetchLog: TableQuery[];
2152
+ readonly patchLog: CellPatch[][];
2153
+ readonly deleteLog: string[][];
2154
+ readonly saveViewLog: ViewState[];
2155
+ constructor(params: MockDataSourceParams);
2156
+ static createRow(rowId: string, data: Record<string, unknown>): RowDataItem;
2157
+ fetchMetadata(): Promise<TableMetadata>;
2158
+ fetchRows(query: TableQuery): Promise<FetchRowsResult>;
2159
+ patchCells(patches: CellPatch[]): Promise<CellPatchResult[]>;
2160
+ deleteRows(rowIds: string[]): Promise<DeleteRowsResult>;
2161
+ saveView(viewState: ViewState): Promise<{
2162
+ ok: boolean;
2163
+ }>;
2164
+ }
2165
+ //#endregion
2166
+ //#region src/table-editor/TableEditor/ui/TableEditor.d.ts
2167
+ interface TableEditorProps {
2168
+ viewModel: TableEditorCore;
2169
+ useWindowScroll?: boolean;
2170
+ }
2171
+ declare const TableEditor: FC<TableEditorProps>;
2172
+ //#endregion
2173
+ //#region src/table-editor/Status/ui/RowCountWidget.d.ts
2174
+ interface RowCountWidgetProps {
2175
+ model: RowCountModel;
2176
+ }
2177
+ declare const RowCountWidget: (({
2178
+ model
2179
+ }: RowCountWidgetProps) => react_jsx_runtime19.JSX.Element) & {
2180
+ displayName: string;
2181
+ };
2182
+ //#endregion
2183
+ //#region src/table-editor/Status/ui/ViewSettingsBadge.d.ts
2184
+ interface ViewSettingsBadgeProps {
2185
+ model: ViewSettingsBadgeModel;
2186
+ }
2187
+ declare const ViewSettingsBadge: (({
2188
+ model
2189
+ }: ViewSettingsBadgeProps) => react_jsx_runtime19.JSX.Element | null) & {
2190
+ displayName: string;
2191
+ };
2192
+ //#endregion
814
2193
  //#region src/components/Tooltip/Tooltip.d.ts
815
2194
  interface TooltipProps extends Tooltip$1.RootProps {
816
2195
  showArrow?: boolean;
@@ -822,6 +2201,30 @@ interface TooltipProps extends Tooltip$1.RootProps {
822
2201
  }
823
2202
  declare const Tooltip: React$1.ForwardRefExoticComponent<TooltipProps & React$1.RefAttributes<HTMLDivElement>>;
824
2203
  //#endregion
2204
+ //#region src/components/Breadcrumbs/Breadcrumbs.d.ts
2205
+ interface BreadcrumbSegment {
2206
+ label: string;
2207
+ dataTestId?: string;
2208
+ }
2209
+ interface BreadcrumbEditableProps {
2210
+ value: string;
2211
+ onChange?: (value: string) => void;
2212
+ onBlur?: (value: string) => void;
2213
+ tooltip?: string;
2214
+ placeholder?: string;
2215
+ dataTestId?: string;
2216
+ }
2217
+ interface BreadcrumbsProps {
2218
+ segments: BreadcrumbSegment[];
2219
+ separator?: string;
2220
+ dataTestId?: string;
2221
+ highlightLast?: boolean;
2222
+ onSegmentClick?: (segment: BreadcrumbSegment, index: number) => void;
2223
+ editable?: BreadcrumbEditableProps;
2224
+ action?: React.ReactNode;
2225
+ }
2226
+ declare const Breadcrumbs: React.FC<BreadcrumbsProps>;
2227
+ //#endregion
825
2228
  //#region src/components/GrayButton/GrayButton.d.ts
826
2229
  interface GrayButtonProps {
827
2230
  title: string;
@@ -865,6 +2268,15 @@ interface CopyButtonProps extends IconButtonProps {
865
2268
  }
866
2269
  declare const CopyButton: FC<CopyButtonProps>;
867
2270
  //#endregion
2271
+ //#region src/components/PlusButton/PlusButton.d.ts
2272
+ interface PlusButtonProps {
2273
+ onClick?: () => void;
2274
+ tooltip?: string;
2275
+ disabled?: boolean;
2276
+ dataTestId?: string;
2277
+ }
2278
+ declare const PlusButton: React.FC<PlusButtonProps>;
2279
+ //#endregion
868
2280
  //#region src/components/JsonCard/JsonCard.d.ts
869
2281
  type JsonValue = string | number | boolean | null | JsonValue[] | {
870
2282
  [key: string]: JsonValue;
@@ -886,56 +2298,8 @@ interface ViewerSwitcherProps {
886
2298
  }
887
2299
  declare const ViewerSwitcher: React.FC<ViewerSwitcherProps>;
888
2300
  //#endregion
889
- //#region src/search-foreign-key/vm/SearchForeignKeyVM.d.ts
890
- type SearchForeignKeySearchFn = (tableId: string, search: string) => Promise<{
891
- ids: string[];
892
- hasMore: boolean;
893
- }>;
894
- type SearchState = 'loading' | 'empty' | 'list' | 'notFound' | 'error';
895
- declare class SearchForeignKeyVM {
896
- private readonly _tableId;
897
- private readonly _onSearch;
898
- private _search;
899
- private _state;
900
- private _ids;
901
- private _hasMore;
902
- private _initialized;
903
- private _disposeReaction;
904
- private readonly _debounce;
905
- constructor(_tableId: string, _onSearch: SearchForeignKeySearchFn | null);
906
- get search(): string;
907
- get state(): SearchState;
908
- get ids(): string[];
909
- get hasMore(): boolean;
910
- get showInput(): boolean;
911
- get showFooter(): boolean;
912
- get showLoading(): boolean;
913
- get showNotFound(): boolean;
914
- get showError(): boolean;
915
- get showEmpty(): boolean;
916
- get showList(): boolean;
917
- get tableId(): string;
918
- init(): void;
919
- setSearch(value: string): void;
920
- dispose(): void;
921
- private _debouncedSearch;
922
- private _resolveState;
923
- private _performSearch;
924
- }
925
- //#endregion
926
- //#region src/search-foreign-key/ui/SearchForeignKey.d.ts
927
- interface SearchForeignKeyProps {
928
- tableId: string;
929
- onSearch: SearchForeignKeySearchFn;
930
- onSelect: (id: string) => void;
931
- onClose?: () => void;
932
- onOpenTableSearch?: () => void;
933
- onCreateAndConnect?: () => void;
934
- }
935
- declare const SearchForeignKey: FC<SearchForeignKeyProps>;
936
- //#endregion
937
2301
  //#region src/lib/initReactivity.d.ts
938
2302
  declare function ensureReactivityProvider(): void;
939
2303
  //#endregion
940
- export { type ArrayNodeVM, BackButton, CloseButton, ContentEditable, type ContentEditableProps, CopyButton, CreateButton, CreatingEditorVM, type CreatingEditorVMOptions, CreatingSchemaEditor, type CreatingSchemaEditorProps, type FileNodeVM, type FileUploadResult, type FlatItem, type ForeignKeyNodeVM, type ForeignKeySearchResult, type ForeignKeySelectionCallback, GrayButton, JsonCard, type MenuGroup, type MenuOptionItem, type NodeVM, type ObjectNodeVM, type PrimitiveNodeVM, RowEditor, type RowEditorCallbacks, type RowEditorMode, type RowEditorProps, RowEditorVM, type RowEditorVMOptions, SchemaEditorCore, type SchemaEditorCoreOptions, SchemaTypeIds, SearchForeignKey, type SearchForeignKeyProps, type SearchForeignKeySearchFn, SearchForeignKeyVM, SettingsButton, Tooltip, type TooltipProps, UpdatingEditorVM, type UpdatingEditorVMOptions, UpdatingSchemaEditor, type UpdatingSchemaEditorProps, type UseContentEditableOptions, type UseContentEditableReturn, type ViewMode, ViewerSwitcher, ViewerSwitcherMode, ensureReactivityProvider, getLabelByRef, typeMenuGroups, useContentEditable };
2304
+ export { type ArrayNodeVM, BackButton, BooleanCell, type BreadcrumbEditableProps, type BreadcrumbSegment, Breadcrumbs, type BreadcrumbsProps, type CellAddress, type CellCommitCallback, CellFSM, type CellPatch, type CellPatchResult, CellRenderer, CellVM, CellWrapper, CloseButton, type ColumnSpec, ColumnsModel, ContentEditable, type ContentEditableProps, CopyButton, CreateButton, CreatingEditorVM, type CreatingEditorVMOptions, CreatingSchemaEditor, type CreatingSchemaEditorProps, DataRow, DateTimeCell, DeleteConfirmDialog, type DeleteRowsResult, type EditTrigger, type FetchRowsResult, FieldSelect, FileCell, type FileNodeVM, type FileUploadResult, type FilterCondition, FilterConditionVM, FilterConditionView, FilterCore, FilterCore as FilterModel, FilterFieldType, type FilterGroup, FilterGroupVM, FilterGroupView, FilterOperator, FilterValueInput, FilterWidget, type FlatItem, ForeignKeyCell, type ForeignKeyNodeVM, type ForeignKeySearchResult, type ForeignKeySelectionCallback, GrayButton, HeaderRow, type ITableDataSource, JsonCard, type MenuGroup, type MenuOptionItem, MockDataSource, type NodeVM, NumberCell, OPERATORS_BY_TYPE, type ObjectNodeVM, type OperatorInfo, OperatorSelect, PlusButton, type PlusButtonProps, type PrimitiveNodeVM, ReadonlyCell, ResizeHandle, RowActionsMenu, RowCountModel, RowCountWidget, type RowDataItem, RowEditor, type RowEditorCallbacks, type RowEditorMode, type RowEditorProps, RowEditorVM, type RowEditorVMOptions, RowVM, SEARCH_LANGUAGES, SEARCH_TYPES, SORT_SCHEMA, SYSTEM_FIELDS, SYSTEM_FIELD_BY_REF, SYSTEM_FIELD_IDS, SchemaEditorCore, type SchemaEditorCoreOptions, SchemaTypeIds, SearchForeignKey, type SearchForeignKeyProps, type SearchForeignKeySearchFn, SearchForeignKeyVM, SearchLanguage, SearchModel, SearchType, SearchWidget, SelectionModel, SelectionToolbar, SettingsButton, SortDirectionSelect, type SortEntry, SortFieldSelect, SortModel, SortRow, SortingsWidget, StringCell, type SystemFieldDef, SystemFieldId, TableEditor, type TableEditorBreadcrumb, type TableEditorCallbacks, TableEditorCore, type TableEditorOptions, type TableEditorProps, type TableMetadata, type TableQuery, TableWidget, Tooltip, type TooltipProps, UpdatingEditorVM, type UpdatingEditorVMOptions, UpdatingSchemaEditor, type UpdatingSchemaEditorProps, type UseContentEditableOptions, type UseContentEditableReturn, type ViewColumn, type ViewMode, ViewSettingsBadge, ViewSettingsBadgeModel, type ViewSort, type ViewState, ViewerSwitcher, ViewerSwitcherMode, buildWhereClause, ensureReactivityProvider, extractColumns, getDefaultOperator, getLabelByRef, getOperatorLabel, getOperatorsForType, operatorRequiresValue, selectDefaultColumns, typeMenuGroups, useContentEditable };
941
2305
  //# sourceMappingURL=index.d.mts.map