@rebasepro/studio 0.2.1 → 0.2.4

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.
Files changed (83) hide show
  1. package/dist/{ApiExplorer-BmcdhAX0.js → ApiExplorer-CGHEF1uL.js} +4 -4
  2. package/dist/ApiExplorer-CGHEF1uL.js.map +1 -0
  3. package/dist/{CronJobsView-CNfz0etw.js → CronJobsView-3PM_qR8v.js} +20 -3
  4. package/dist/CronJobsView-3PM_qR8v.js.map +1 -0
  5. package/dist/{JSEditor-Ch8z8lJ4.js → JSEditor-Br4ke-J4.js} +30 -27
  6. package/dist/JSEditor-Br4ke-J4.js.map +1 -0
  7. package/dist/LogsExplorer-_4sZadKn.js +162 -0
  8. package/dist/LogsExplorer-_4sZadKn.js.map +1 -0
  9. package/dist/{SQLEditor-BELYJQRP.js → SQLEditor-BC0IOUQu.js} +4 -4
  10. package/dist/SQLEditor-BC0IOUQu.js.map +1 -0
  11. package/dist/common/src/collections/default-collections.d.ts +12 -0
  12. package/dist/common/src/collections/index.d.ts +1 -0
  13. package/dist/common/src/data/query_builder.d.ts +51 -0
  14. package/dist/common/src/index.d.ts +1 -0
  15. package/dist/common/src/util/permissions.d.ts +1 -0
  16. package/dist/core/src/components/LoginView/LoginView.d.ts +17 -1
  17. package/dist/core/src/components/common/types.d.ts +10 -7
  18. package/dist/core/src/components/common/useDebouncedData.d.ts +1 -1
  19. package/dist/core/src/core/RebaseProps.d.ts +13 -2
  20. package/dist/core/src/core/RebaseRouter.d.ts +1 -1
  21. package/dist/core/src/hooks/index.d.ts +0 -1
  22. package/dist/core/src/util/entity_cache.d.ts +0 -5
  23. package/dist/core/src/util/index.d.ts +0 -2
  24. package/dist/core/src/util/useStorageUploadController.d.ts +2 -2
  25. package/dist/formex/src/utils.d.ts +2 -2
  26. package/dist/index.es.js +23 -5
  27. package/dist/index.es.js.map +1 -1
  28. package/dist/index.umd.js +232 -35
  29. package/dist/index.umd.js.map +1 -1
  30. package/dist/studio/src/components/ApiExplorer/parseSpec.d.ts +1 -1
  31. package/dist/studio/src/components/ApiExplorer/types.d.ts +3 -3
  32. package/dist/studio/src/components/LogsExplorer/LogsExplorer.d.ts +1 -0
  33. package/dist/types/src/controllers/auth.d.ts +2 -24
  34. package/dist/types/src/controllers/client.d.ts +0 -3
  35. package/dist/types/src/controllers/collection_registry.d.ts +1 -1
  36. package/dist/types/src/controllers/data.d.ts +21 -0
  37. package/dist/types/src/controllers/data_driver.d.ts +18 -0
  38. package/dist/types/src/controllers/registry.d.ts +5 -4
  39. package/dist/types/src/rebase_context.d.ts +1 -1
  40. package/dist/types/src/types/auth_adapter.d.ts +2 -4
  41. package/dist/types/src/types/collections.d.ts +0 -4
  42. package/dist/types/src/types/component_ref.d.ts +1 -1
  43. package/dist/types/src/types/cron.d.ts +1 -1
  44. package/dist/types/src/types/entity_views.d.ts +1 -0
  45. package/dist/types/src/types/export_import.d.ts +1 -1
  46. package/dist/types/src/types/formex.d.ts +2 -2
  47. package/dist/types/src/types/properties.d.ts +2 -2
  48. package/dist/types/src/types/translations.d.ts +28 -12
  49. package/dist/types/src/types/user_management_delegate.d.ts +6 -4
  50. package/dist/types/src/users/roles.d.ts +0 -8
  51. package/dist/ui/src/components/Button.d.ts +2 -2
  52. package/dist/ui/src/components/ErrorBoundary.d.ts +25 -3
  53. package/dist/ui/src/components/VirtualTable/VirtualTable.d.ts +1 -1
  54. package/dist/ui/src/components/VirtualTable/VirtualTableCell.d.ts +6 -6
  55. package/dist/ui/src/components/VirtualTable/VirtualTableHeader.d.ts +8 -8
  56. package/dist/ui/src/components/VirtualTable/VirtualTableHeaderRow.d.ts +1 -1
  57. package/dist/ui/src/components/VirtualTable/VirtualTableProps.d.ts +11 -11
  58. package/dist/ui/src/components/VirtualTable/VirtualTableRow.d.ts +1 -1
  59. package/dist/ui/src/components/VirtualTable/types.d.ts +9 -9
  60. package/dist/ui/src/hooks/useDebounceCallback.d.ts +1 -1
  61. package/dist/ui/src/util/debounce.d.ts +1 -1
  62. package/package.json +13 -8
  63. package/src/components/ApiExplorer/ApiExplorer.tsx +2 -2
  64. package/src/components/ApiExplorer/EndpointDetail.tsx +1 -1
  65. package/src/components/ApiExplorer/TryItPanel.tsx +5 -5
  66. package/src/components/ApiExplorer/parseSpec.ts +3 -3
  67. package/src/components/ApiExplorer/types.ts +3 -3
  68. package/src/components/CronJobs/CronJobsView.tsx +27 -2
  69. package/src/components/JSEditor/JSEditor.tsx +21 -18
  70. package/src/components/JSEditor/JSMonacoEditor.tsx +10 -10
  71. package/src/components/LogsExplorer/LogsExplorer.tsx +224 -0
  72. package/src/components/RebaseStudio.tsx +10 -1
  73. package/src/components/SQLEditor/SQLEditor.tsx +28 -7
  74. package/src/components/StudioHomePage.tsx +2 -1
  75. package/src/utils/parseSpec.test.ts +274 -0
  76. package/src/utils/pgColumnToProperty.ts +16 -2
  77. package/dist/ApiExplorer-BmcdhAX0.js.map +0 -1
  78. package/dist/CronJobsView-CNfz0etw.js.map +0 -1
  79. package/dist/JSEditor-Ch8z8lJ4.js.map +0 -1
  80. package/dist/SQLEditor-BELYJQRP.js.map +0 -1
  81. package/dist/core/src/hooks/useValidateAuthenticator.d.ts +0 -21
  82. package/dist/core/src/util/icon_synonyms.d.ts +0 -1
  83. package/dist/core/src/util/useTraceUpdate.d.ts +0 -2
@@ -13,4 +13,4 @@ export declare function resolveRefName(ref: string): string;
13
13
  /**
14
14
  * Resolve a $ref to its actual schema from the spec.
15
15
  */
16
- export declare function resolveRef(spec: OpenApiSpec, ref: string): any;
16
+ export declare function resolveRef(spec: OpenApiSpec, ref: string): unknown;
@@ -13,7 +13,7 @@ export interface OpenApiSpec {
13
13
  paths: Record<string, Record<string, OpenApiOperation>>;
14
14
  components?: {
15
15
  schemas?: Record<string, OpenApiSchema>;
16
- securitySchemes?: Record<string, any>;
16
+ securitySchemes?: Record<string, unknown>;
17
17
  };
18
18
  tags?: {
19
19
  name: string;
@@ -65,8 +65,8 @@ export interface OpenApiSchema {
65
65
  maximum?: number;
66
66
  maxLength?: number;
67
67
  minLength?: number;
68
- default?: any;
69
- example?: any;
68
+ default?: unknown;
69
+ example?: unknown;
70
70
  additionalProperties?: boolean | OpenApiSchema;
71
71
  }
72
72
  export interface ParsedEndpoint {
@@ -0,0 +1 @@
1
+ export declare function LogsExplorer(): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,4 @@
1
- import { StorageSource } from "./storage";
2
1
  import { Role, User } from "../users";
3
- import { RebaseData } from "./data";
4
2
  /**
5
3
  * Capabilities advertised by an auth provider.
6
4
  * UI components use this to show/hide features dynamically
@@ -89,6 +87,8 @@ export interface AuthControllerExtended<USER extends User = User, ExtraData = un
89
87
  code: string;
90
88
  redirectUri: string;
91
89
  }) => Promise<void>;
90
+ /** Generic OAuth login — works with any provider. Posts payload to /auth/{providerId}. */
91
+ oauthLogin?: (providerId: string, payload: Record<string, unknown>) => Promise<void>;
92
92
  /** Register a new user */
93
93
  register?(email: string, password: string, displayName?: string): Promise<void>;
94
94
  /** Skip login (for anonymous access if enabled) */
@@ -102,25 +102,3 @@ export interface AuthControllerExtended<USER extends User = User, ExtraData = un
102
102
  /** Update user profile */
103
103
  updateProfile?(displayName?: string, photoURL?: string): Promise<USER>;
104
104
  }
105
- /**
106
- * Implement this function to allow access to specific users.
107
- * @group Hooks and utilities
108
- */
109
- export type Authenticator<USER extends User = User> = (props: {
110
- /**
111
- * Logged-in user or null
112
- */
113
- user: USER | null;
114
- /**
115
- * AuthController
116
- */
117
- authController: AuthController<USER>;
118
- /**
119
- * Unified data access API
120
- */
121
- data: RebaseData;
122
- /**
123
- * Used storage implementation
124
- */
125
- storageSource: StorageSource;
126
- }) => boolean | Promise<boolean>;
@@ -65,7 +65,6 @@ export interface AdminRole {
65
65
  name: string;
66
66
  isAdmin: boolean;
67
67
  defaultPermissions: Record<string, unknown> | null;
68
- config: Record<string, unknown> | null;
69
68
  }
70
69
  /**
71
70
  * Client-side Admin API interface.
@@ -123,7 +122,6 @@ export interface AdminAPI {
123
122
  name: string;
124
123
  isAdmin?: boolean;
125
124
  defaultPermissions?: Record<string, unknown>;
126
- config?: Record<string, unknown>;
127
125
  }): Promise<{
128
126
  role: AdminRole;
129
127
  }>;
@@ -131,7 +129,6 @@ export interface AdminAPI {
131
129
  name?: string;
132
130
  isAdmin?: boolean;
133
131
  defaultPermissions?: Record<string, unknown>;
134
- config?: Record<string, unknown>;
135
132
  }): Promise<{
136
133
  role: AdminRole;
137
134
  }>;
@@ -4,7 +4,7 @@ import type { EntityReference } from "../types/entities";
4
4
  * Controller that provides access to the registered entity collections.
5
5
  * @group Models
6
6
  */
7
- export type CollectionRegistryController<DB = Record<string, unknown>, EC extends EntityCollection = EntityCollection<any>> = {
7
+ export type CollectionRegistryController<DB = Record<string, unknown>, EC extends EntityCollection = EntityCollection> = {
8
8
  /**
9
9
  * List of the mapped collections in the CMS.
10
10
  * Each entry relates to a collection in the root database.
@@ -76,6 +76,21 @@ export interface FindResponse<M extends Record<string, unknown> = Record<string,
76
76
  hasMore: boolean;
77
77
  };
78
78
  }
79
+ export type FilterOperator = WhereFilterOpShort;
80
+ /**
81
+ * Fluent Query Builder Interface supported on both client and server accessors.
82
+ * @group Data
83
+ */
84
+ export interface QueryBuilderInterface<M extends Record<string, unknown> = Record<string, unknown>> {
85
+ where(column: keyof M & string, operator: FilterOperator, value: unknown): this;
86
+ orderBy(column: keyof M & string, ascending?: "asc" | "desc"): this;
87
+ limit(count: number): this;
88
+ offset(count: number): this;
89
+ search(searchString: string): this;
90
+ include(...relations: string[]): this;
91
+ find(): Promise<FindResponse<M>>;
92
+ listen(onUpdate: (data: FindResponse<M>) => void, onError?: (error: Error) => void): () => void;
93
+ }
79
94
  /**
80
95
  * A single collection's CRUD accessor.
81
96
  *
@@ -124,6 +139,12 @@ export interface CollectionAccessor<M extends Record<string, unknown> = Record<s
124
139
  * Count the number of records matching the given filter.
125
140
  */
126
141
  count?(params?: FindParams): Promise<number>;
142
+ where(column: keyof M & string, operator: FilterOperator, value: unknown): QueryBuilderInterface<M>;
143
+ orderBy(column: keyof M & string, ascending?: "asc" | "desc"): QueryBuilderInterface<M>;
144
+ limit(count: number): QueryBuilderInterface<M>;
145
+ offset(count: number): QueryBuilderInterface<M>;
146
+ search(searchString: string): QueryBuilderInterface<M>;
147
+ include(...relations: string[]): QueryBuilderInterface<M>;
127
148
  }
128
149
  /**
129
150
  * The unified data access object.
@@ -17,6 +17,21 @@ export type ListenEntityProps<M extends Record<string, unknown> = Record<string,
17
17
  onUpdate: (entity: Entity<M> | null) => void;
18
18
  onError?: (error: Error) => void;
19
19
  };
20
+ /**
21
+ * Configuration for vector similarity search queries.
22
+ * Vector search applies an ORDER BY distance expression and optionally
23
+ * filters results by a distance threshold.
24
+ */
25
+ export interface VectorSearchParams {
26
+ /** Property name containing the vector column */
27
+ property: string;
28
+ /** Query vector to compare against */
29
+ vector: number[];
30
+ /** Distance function (default: "cosine") */
31
+ distance?: "cosine" | "l2" | "inner_product";
32
+ /** Only return results within this distance threshold */
33
+ threshold?: number;
34
+ }
20
35
  /**
21
36
  * @internal
22
37
  */
@@ -30,6 +45,8 @@ export interface FetchCollectionProps<M extends Record<string, unknown> = Record
30
45
  orderBy?: string;
31
46
  searchString?: string;
32
47
  order?: "desc" | "asc";
48
+ /** Vector similarity search configuration */
49
+ vectorSearch?: VectorSearchParams;
33
50
  }
34
51
  /**
35
52
  * @internal
@@ -187,6 +204,7 @@ export interface RestFetchService {
187
204
  startAfter?: Record<string, unknown>;
188
205
  searchString?: string;
189
206
  databaseId?: string;
207
+ vectorSearch?: VectorSearchParams;
190
208
  }, include?: string[]): Promise<Record<string, unknown>[]>;
191
209
  /**
192
210
  * Fetch a single flattened entity with optional relation includes.
@@ -4,6 +4,7 @@ import type { EntityCollectionsBuilder } from "../types/builders";
4
4
  import type { EntityCustomView } from "../types/entity_views";
5
5
  import type { EntityAction } from "../types/entity_actions";
6
6
  import type { AppView, NavigationGroupMapping } from "./navigation";
7
+ import type { RebasePlugin } from "../types/plugins";
7
8
  /**
8
9
  * Options to enable the built-in collection editor.
9
10
  * When provided to `<RebaseCMS>`, the editor is auto-wired as a native feature.
@@ -19,12 +20,12 @@ export interface CollectionEditorOptions {
19
20
  /** Suggested base paths shown when creating new collections. */
20
21
  pathSuggestions?: string[];
21
22
  }
22
- export interface RebaseCMSConfig<EC extends EntityCollection = any> {
23
+ export interface RebaseCMSConfig<EC extends EntityCollection = EntityCollection> {
23
24
  collections?: EC[] | EntityCollectionsBuilder<EC>;
24
25
  homePage?: ReactNode;
25
- entityViews?: EntityCustomView<any>[];
26
+ entityViews?: EntityCustomView[];
26
27
  entityActions?: EntityAction[];
27
- plugins?: any[];
28
+ plugins?: RebasePlugin[];
28
29
  /**
29
30
  * Centralized configuration for how collections and views are grouped
30
31
  * in the navigation sidebar and home page.
@@ -42,7 +43,7 @@ export interface RebaseCMSConfig<EC extends EntityCollection = any> {
42
43
  collectionEditor?: boolean | CollectionEditorOptions;
43
44
  }
44
45
  export interface RebaseStudioConfig {
45
- tools?: ("sql" | "js" | "rls" | "schema" | "storage" | "cron" | "schema-visualizer" | "branches" | "api")[];
46
+ tools?: ("sql" | "js" | "rls" | "schema" | "storage" | "cron" | "schema-visualizer" | "branches" | "api" | "logs")[];
46
47
  homePage?: ReactNode;
47
48
  devViews?: AppView[];
48
49
  }
@@ -28,7 +28,7 @@ export type RebaseCallContext<USER extends User = User> = {
28
28
  * const { client } = props.context;
29
29
  * const result = await client.functions.invoke('extract-job', { url });
30
30
  */
31
- client: RebaseClient<any>;
31
+ client: RebaseClient;
32
32
  /**
33
33
  * Unified data access — `context.data.products.create(...)`.
34
34
  * Access any collection as a dynamic property.
@@ -133,7 +133,7 @@ export interface AuthUserData {
133
133
  displayName?: string | null;
134
134
  photoUrl?: string | null;
135
135
  emailVerified?: boolean;
136
- metadata?: Record<string, any>;
136
+ metadata?: Record<string, unknown>;
137
137
  createdAt?: Date;
138
138
  updatedAt?: Date;
139
139
  }
@@ -146,7 +146,7 @@ export interface AuthCreateUserData {
146
146
  password?: string;
147
147
  displayName?: string;
148
148
  photoUrl?: string;
149
- metadata?: Record<string, any>;
149
+ metadata?: Record<string, unknown>;
150
150
  }
151
151
  /**
152
152
  * Role data exposed by the auth adapter.
@@ -168,7 +168,6 @@ export interface AuthRoleData {
168
168
  edit?: boolean;
169
169
  delete?: boolean;
170
170
  }> | null;
171
- config?: Record<string, unknown> | null;
172
171
  }
173
172
  /**
174
173
  * Data for creating a role.
@@ -180,7 +179,6 @@ export interface AuthCreateRoleData {
180
179
  isAdmin?: boolean;
181
180
  defaultPermissions?: AuthRoleData["defaultPermissions"];
182
181
  collectionPermissions?: AuthRoleData["collectionPermissions"];
183
- config?: AuthRoleData["config"];
184
182
  }
185
183
  /**
186
184
  * User management operations for the admin panel.
@@ -589,10 +589,6 @@ export interface FilterPreset<Key extends string = string> {
589
589
  */
590
590
  sort?: [Key, "asc" | "desc"];
591
591
  }
592
- /**
593
- * @deprecated Use {@link FilterPreset} instead.
594
- */
595
- export type QuickFilter<Key extends string = string> = FilterPreset<Key>;
596
592
  /**
597
593
  * Used to indicate valid filter combinations (e.g. created in Firestore)
598
594
  * If the user selects a specific filter/sort combination, the CMS checks if it's
@@ -37,7 +37,7 @@ export interface LazyComponentRef<P = unknown> {
37
37
  *
38
38
  * @group Types
39
39
  */
40
- export type ComponentRef<P = unknown> = React.ComponentType<P> | LazyComponentRef<P> | (() => Promise<{
40
+ export type ComponentRef<P = any> = React.ComponentType<P> | LazyComponentRef<P> | (() => Promise<{
41
41
  default: React.ComponentType<P>;
42
42
  }>) | string;
43
43
  /**
@@ -44,7 +44,7 @@ export interface CronJobContext {
44
44
  /** A simple logger scoped to this job run. */
45
45
  log: (...args: unknown[]) => void;
46
46
  /** The RebaseClient instance to interact with the database. */
47
- client: RebaseClient<any>;
47
+ client: RebaseClient;
48
48
  }
49
49
  export type CronJobRunState = "idle" | "running" | "success" | "error" | "disabled";
50
50
  /**
@@ -50,6 +50,7 @@ export interface FormContext<M extends Record<string, unknown> = Record<string,
50
50
  export type EntityCustomView<M extends Record<string, unknown> = Record<string, unknown>> = {
51
51
  key: string;
52
52
  name: string;
53
+ icon?: string | React.ReactNode;
53
54
  tabComponent?: React.ReactNode;
54
55
  includeActions?: boolean | "bottom";
55
56
  Builder?: ComponentRef<EntityCustomViewParams<M>>;
@@ -15,7 +15,7 @@ export interface ExportConfig<USER extends User = User> {
15
15
  export interface ExportMappingFunction<USER extends User = User> {
16
16
  key: string;
17
17
  builder: ({ entity, context }: {
18
- entity: Entity<any>;
18
+ entity: Entity;
19
19
  context: RebaseContext<USER>;
20
20
  }) => Promise<string> | string;
21
21
  }
@@ -1,5 +1,5 @@
1
1
  import React, { FormEvent } from "react";
2
- export type FormexController<T = any> = {
2
+ export type FormexController<T = unknown> = {
3
3
  values: T;
4
4
  initialValues: T;
5
5
  setValues: (values: T) => void;
@@ -32,7 +32,7 @@ export type FormexController<T = any> = {
32
32
  canUndo: boolean;
33
33
  canRedo: boolean;
34
34
  };
35
- export type FormexResetProps<T = any> = {
35
+ export type FormexResetProps<T = unknown> = {
36
36
  values?: T;
37
37
  submitCount?: number;
38
38
  errors?: Record<string, string>;
@@ -104,8 +104,8 @@ export interface BaseUIConfig<CustomProps = unknown> {
104
104
  disabled?: boolean | PropertyDisabledConfig;
105
105
  widthPercentage?: number;
106
106
  customProps?: CustomProps;
107
- Field?: ComponentRef<any>;
108
- Preview?: ComponentRef<any>;
107
+ Field?: ComponentRef;
108
+ Preview?: ComponentRef;
109
109
  }
110
110
  export interface BaseProperty<CustomProps = unknown> {
111
111
  ui?: BaseUIConfig<CustomProps>;
@@ -105,6 +105,12 @@ export interface RebaseTranslations {
105
105
  navigation_drawer: string;
106
106
  collapse: string;
107
107
  expand: string;
108
+ /** Tooltip for the language switcher in the drawer footer */
109
+ change_language?: string;
110
+ /** Tooltip for the theme toggle in the drawer footer */
111
+ toggle_theme?: string;
112
+ /** Aria label for the user menu trigger in the drawer footer */
113
+ user_menu?: string;
108
114
  error: string;
109
115
  error_uploading_file: string;
110
116
  error_deleting: string;
@@ -426,18 +432,28 @@ export interface RebaseTranslations {
426
432
  deleted: string;
427
433
  select_reference: string;
428
434
  select_references: string;
429
- account_settings: string;
430
- profile: string;
431
- sessions: string;
432
- display_name: string;
433
- photo_url: string;
434
- save_profile: string;
435
- saving: string;
436
- no_active_sessions: string;
437
- revoking: string;
438
- revoke_all_sessions: string;
439
- unknown_device: string;
440
- current: string;
435
+ account_settings?: string;
436
+ profile?: string;
437
+ sessions?: string;
438
+ security?: string;
439
+ change_password?: string;
440
+ current_password?: string;
441
+ new_password?: string;
442
+ confirm_password?: string;
443
+ password_changed?: string;
444
+ passwords_dont_match?: string;
445
+ password_too_short?: string;
446
+ password_change_not_available?: string;
447
+ changing_password?: string;
448
+ display_name?: string;
449
+ photo_url?: string;
450
+ save_profile?: string;
451
+ saving?: string;
452
+ no_active_sessions?: string;
453
+ revoking?: string;
454
+ revoke_all_sessions?: string;
455
+ unknown_device?: string;
456
+ current?: string;
441
457
  role_id: string;
442
458
  role_name: string;
443
459
  add_reference: string;
@@ -104,15 +104,17 @@ export interface UserManagementDelegate<USER extends User = User> {
104
104
  * If true, the UI will allow the user to create the default roles (admin, editor, viewer).
105
105
  */
106
106
  allowDefaultRolesCreation?: boolean;
107
- /**
108
- * Should collection config permissions be included?
109
- */
110
- includeCollectionConfigPermissions?: boolean;
111
107
  /**
112
108
  * Optionally define roles for a given user. This is useful when the roles
113
109
  * are coming from a separate provider than the one issuing the tokens.
114
110
  */
115
111
  defineRolesFor?: (user: USER) => Promise<Role[] | undefined> | Role[] | undefined;
112
+ /**
113
+ * Whether any admin users exist. Used by the bootstrap banner to decide
114
+ * whether to prompt. Populated via a lightweight check (e.g. `limit=1`
115
+ * query) instead of loading all users.
116
+ */
117
+ hasAdminUsers?: boolean;
116
118
  /**
117
119
  * Optional function to bootstrap an admin user.
118
120
  * Often used when the database is empty.
@@ -11,12 +11,4 @@ export type Role = {
11
11
  * If this flag is true, the user can perform any action
12
12
  */
13
13
  isAdmin?: boolean;
14
- /**
15
- * Permissions related to editing the collections
16
- */
17
- config?: {
18
- createCollections?: boolean;
19
- editCollections?: boolean | "own";
20
- deleteCollections?: boolean | "own";
21
- };
22
14
  };
@@ -9,6 +9,6 @@ export type ButtonProps<C extends React.ElementType = "button"> = {
9
9
  fullWidth?: boolean;
10
10
  className?: string;
11
11
  component?: C;
12
- onClick?: React.MouseEventHandler<any>;
12
+ onClick?: React.MouseEventHandler<HTMLElement>;
13
13
  } & React.ComponentPropsWithoutRef<C>;
14
- export declare const Button: React.FC<ButtonProps<any>>;
14
+ export declare const Button: React.FC<ButtonProps<React.ElementType>>;
@@ -1,11 +1,33 @@
1
1
  import React, { ErrorInfo, PropsWithChildren } from "react";
2
- export declare class ErrorBoundary extends React.Component<PropsWithChildren<Record<string, unknown>>, {
2
+ export interface ErrorBoundaryProps {
3
+ /**
4
+ * When true, renders a full-page centered error screen instead of the
5
+ * compact inline error. Intended for wrapping top-level app roots or
6
+ * major route sections.
7
+ */
8
+ fullPage?: boolean;
9
+ /**
10
+ * Optional callback invoked when the user clicks "Try again". If provided,
11
+ * the boundary resets its error state and calls this handler. If omitted,
12
+ * the "Try again" button resets the boundary state, re-mounting children.
13
+ */
14
+ onReset?: () => void;
15
+ }
16
+ interface ErrorBoundaryState {
3
17
  error: Error | null;
4
- }> {
5
- constructor(props: any);
18
+ showDetails: boolean;
19
+ }
20
+ export declare class ErrorBoundary extends React.Component<PropsWithChildren<ErrorBoundaryProps>, ErrorBoundaryState> {
21
+ constructor(props: PropsWithChildren<ErrorBoundaryProps>);
6
22
  static getDerivedStateFromError(error: Error): {
7
23
  error: Error;
8
24
  };
9
25
  componentDidCatch(error: Error, _errorInfo: ErrorInfo): void;
26
+ private handleReset;
27
+ private handleReload;
28
+ private toggleDetails;
10
29
  render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
30
+ private renderInline;
31
+ private renderFullPage;
11
32
  }
33
+ export {};
@@ -8,4 +8,4 @@ import { VirtualTableProps } from "./VirtualTableProps";
8
8
  *
9
9
  * @group Components
10
10
  */
11
- export declare const VirtualTable: React.NamedExoticComponent<VirtualTableProps<any>>;
11
+ export declare const VirtualTable: React.NamedExoticComponent<VirtualTableProps<Record<string, unknown>>>;
@@ -4,18 +4,18 @@ type VirtualTableCellProps<T> = {
4
4
  dataKey: string;
5
5
  column: VirtualTableColumn;
6
6
  columns: VirtualTableColumn[];
7
- rowData: any;
8
- cellData: any;
9
- rowIndex: any;
7
+ rowData: T;
8
+ cellData: unknown;
9
+ rowIndex: number;
10
10
  columnIndex: number;
11
11
  cellRenderer: (props: CellRendererParams<T>) => React.ReactNode;
12
12
  sortableNodeRef?: (node: HTMLElement | null) => void;
13
13
  sortableStyle?: React.CSSProperties;
14
- sortableAttributes?: Record<string, any>;
14
+ sortableAttributes?: Record<string, unknown>;
15
15
  isDragging?: boolean;
16
16
  isDraggable?: boolean;
17
17
  frozen?: boolean;
18
- extraData?: any;
18
+ extraData?: unknown;
19
19
  };
20
- export declare const VirtualTableCell: React.NamedExoticComponent<VirtualTableCellProps<any>>;
20
+ export declare const VirtualTableCell: React.NamedExoticComponent<VirtualTableCellProps<unknown>>;
21
21
  export {};
@@ -2,28 +2,28 @@ import React from "react";
2
2
  import { VirtualTableColumn, VirtualTableSort, VirtualTableWhereFilterOp } from "./VirtualTableProps";
3
3
  export type FilterFormFieldProps<CustomProps> = {
4
4
  id: React.Key;
5
- filterValue: [VirtualTableWhereFilterOp, any] | undefined;
6
- setFilterValue: (filterValue?: [VirtualTableWhereFilterOp, any]) => void;
5
+ filterValue: [VirtualTableWhereFilterOp, unknown] | undefined;
6
+ setFilterValue: (filterValue?: [VirtualTableWhereFilterOp, unknown]) => void;
7
7
  column: VirtualTableColumn<CustomProps>;
8
8
  hidden: boolean;
9
9
  setHidden: (hidden: boolean) => void;
10
10
  };
11
- type VirtualTableHeaderProps<M extends Record<string, any>> = {
11
+ type VirtualTableHeaderProps<M extends Record<string, unknown>> = {
12
12
  resizeHandleRef: React.Ref<HTMLDivElement>;
13
13
  columnIndex: number;
14
14
  isResizingIndex: number;
15
- column: VirtualTableColumn<any>;
15
+ column: VirtualTableColumn<unknown>;
16
16
  onColumnSort: (key: Extract<keyof M, string>) => void;
17
- filter?: [VirtualTableWhereFilterOp, any];
17
+ filter?: [VirtualTableWhereFilterOp, unknown];
18
18
  sort: VirtualTableSort;
19
- onFilterUpdate: (column: VirtualTableColumn, filterForProperty?: [VirtualTableWhereFilterOp, any]) => void;
19
+ onFilterUpdate: (column: VirtualTableColumn, filterForProperty?: [VirtualTableWhereFilterOp, unknown]) => void;
20
20
  onClickResizeColumn?: (columnIndex: number, column: VirtualTableColumn) => void;
21
- createFilterField?: (props: FilterFormFieldProps<any>) => React.ReactNode;
21
+ createFilterField?: (props: FilterFormFieldProps<unknown>) => React.ReactNode;
22
22
  AdditionalHeaderWidget?: (props: {
23
23
  onHover: boolean;
24
24
  }) => React.ReactNode;
25
25
  isDragging?: boolean;
26
26
  isDraggable?: boolean;
27
27
  };
28
- export declare const VirtualTableHeader: React.FunctionComponent<VirtualTableHeaderProps<any>>;
28
+ export declare const VirtualTableHeader: React.FunctionComponent<VirtualTableHeaderProps<Record<string, unknown>>>;
29
29
  export {};
@@ -1,2 +1,2 @@
1
1
  import { VirtualTableContextProps } from "./types";
2
- export declare const VirtualTableHeaderRow: ({ columns, currentSort, onColumnSort, onFilterUpdate, sortByProperty, filter, onColumnResize, onColumnResizeEnd, createFilterField, AddColumnComponent, onColumnsOrderChange, data, cellRenderer: CellRenderer, rowHeight, draggingColumnId, headerHeight }: VirtualTableContextProps<any>) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const VirtualTableHeaderRow: ({ columns, currentSort, onColumnSort, onFilterUpdate, sortByProperty, filter, onColumnResize, onColumnResizeEnd, createFilterField, AddColumnComponent, onColumnsOrderChange, data, cellRenderer: CellRenderer, rowHeight, draggingColumnId, headerHeight }: VirtualTableContextProps<Record<string, unknown>>) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { FilterFormFieldProps } from "./VirtualTableHeader";
3
- export type OnRowClickParams<T extends Record<string, any>> = {
3
+ export type OnRowClickParams<T extends Record<string, unknown>> = {
4
4
  rowData: T;
5
5
  rowIndex: number;
6
6
  event: React.SyntheticEvent;
@@ -9,7 +9,7 @@ export type OnRowClickParams<T extends Record<string, any>> = {
9
9
  * @see Table
10
10
  * @group Components
11
11
  */
12
- export interface VirtualTableProps<T extends Record<string, any>> {
12
+ export interface VirtualTableProps<T extends Record<string, unknown>> {
13
13
  /**
14
14
  * Array of arbitrary data
15
15
  */
@@ -61,12 +61,12 @@ export interface VirtualTableProps<T extends Record<string, any>> {
61
61
  /**
62
62
  * In case this table should have some filters set by default
63
63
  */
64
- filter?: VirtualTableFilterValues<any>;
64
+ filter?: VirtualTableFilterValues<string>;
65
65
  /**
66
66
  * Callback used when filters are updated
67
67
  * @param filter
68
68
  */
69
- onFilterUpdate?: (filter?: VirtualTableFilterValues<any> | undefined) => void;
69
+ onFilterUpdate?: (filter?: VirtualTableFilterValues<string> | undefined) => void;
70
70
  /**
71
71
  * Callback when the table is scrolled
72
72
  * @param props
@@ -111,7 +111,7 @@ export interface VirtualTableProps<T extends Record<string, any>> {
111
111
  * Callback to create a filter field, displayed in the header as a dropdown
112
112
  * @param props
113
113
  */
114
- createFilterField?: (props: FilterFormFieldProps<any>) => React.ReactNode;
114
+ createFilterField?: (props: FilterFormFieldProps<unknown>) => React.ReactNode;
115
115
  /**
116
116
  * Class name applied to the table
117
117
  */
@@ -141,9 +141,9 @@ export interface VirtualTableProps<T extends Record<string, any>> {
141
141
  /**
142
142
  * Extra data passed to the cell renderer
143
143
  */
144
- extraData?: any;
144
+ extraData?: unknown;
145
145
  }
146
- export type CellRendererParams<T = any> = {
146
+ export type CellRendererParams<T = unknown> = {
147
147
  column: VirtualTableColumn;
148
148
  columns: VirtualTableColumn[];
149
149
  columnIndex: number;
@@ -153,17 +153,17 @@ export type CellRendererParams<T = any> = {
153
153
  isScrolling?: boolean;
154
154
  sortableNodeRef?: (node: HTMLElement | null) => void;
155
155
  sortableStyle?: React.CSSProperties;
156
- sortableAttributes?: Record<string, any>;
156
+ sortableAttributes?: Record<string, unknown>;
157
157
  isDragging?: boolean;
158
158
  isDraggable?: boolean;
159
159
  frozen?: boolean;
160
- extraData?: any;
160
+ extraData?: unknown;
161
161
  };
162
162
  /**
163
163
  * @see Table
164
164
  * @group Components
165
165
  */
166
- export interface VirtualTableColumn<CustomProps = any> {
166
+ export interface VirtualTableColumn<CustomProps = unknown> {
167
167
  /**
168
168
  * Data key for the cell value, could be "a.b.c"
169
169
  */
@@ -233,7 +233,7 @@ export type VirtualTableSort = "asc" | "desc" | undefined;
233
233
  * @see Table
234
234
  * @group Components
235
235
  */
236
- export type VirtualTableFilterValues<Key extends string> = Partial<Record<Key, [VirtualTableWhereFilterOp, any]>>;
236
+ export type VirtualTableFilterValues<Key extends string> = Partial<Record<Key, [VirtualTableWhereFilterOp, unknown]>>;
237
237
  /**
238
238
  * Filter conditions in a `Query.where()` clause are specified using the
239
239
  * strings `<`, `<=`, `==`, `>=`, `>`, `array-contains`, `in`, and `array-contains-any`.
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
2
  import { VirtualTableRowProps } from "./types";
3
- export declare const VirtualTableRow: React.NamedExoticComponent<VirtualTableRowProps<any>>;
3
+ export declare const VirtualTableRow: React.NamedExoticComponent<VirtualTableRowProps<Record<string, unknown>>>;