@rebasepro/types 0.10.0 → 0.10.1-canary.0a881d4

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 (96) hide show
  1. package/dist/call_context.d.ts +51 -0
  2. package/dist/controllers/auth_state.d.ts +23 -0
  3. package/dist/controllers/client.d.ts +3 -1
  4. package/dist/controllers/collection_registry.d.ts +5 -1
  5. package/dist/controllers/data_driver.d.ts +31 -2
  6. package/dist/controllers/index.d.ts +1 -10
  7. package/dist/index.d.ts +1 -1
  8. package/dist/index.es.js +374 -1
  9. package/dist/index.es.js.map +1 -1
  10. package/dist/types/admin_block.d.ts +34 -0
  11. package/dist/types/backend.d.ts +30 -1
  12. package/dist/types/channel_bus.d.ts +192 -0
  13. package/dist/types/collection_contract.d.ts +43 -0
  14. package/dist/types/collections.d.ts +17 -789
  15. package/dist/types/component_ref.d.ts +39 -6
  16. package/dist/types/entity_callbacks.d.ts +1 -1
  17. package/dist/types/index.d.ts +7 -15
  18. package/dist/types/project_manifest.d.ts +336 -0
  19. package/dist/types/properties.d.ts +12 -157
  20. package/dist/types/schema_version.d.ts +18 -0
  21. package/dist/types/security_rules.d.ts +320 -0
  22. package/dist/types/storage_authorize.d.ts +74 -0
  23. package/package.json +3 -6
  24. package/src/call_context.ts +56 -0
  25. package/src/controllers/auth_state.ts +24 -0
  26. package/src/controllers/client.ts +3 -2
  27. package/src/controllers/collection_registry.ts +5 -1
  28. package/src/controllers/data_driver.ts +58 -2
  29. package/src/controllers/index.ts +1 -10
  30. package/src/index.ts +1 -1
  31. package/src/types/admin_block.ts +75 -0
  32. package/src/types/backend.ts +33 -1
  33. package/src/types/channel_bus.ts +202 -0
  34. package/src/types/collection_contract.ts +278 -0
  35. package/src/types/collections.ts +25 -848
  36. package/src/types/component_ref.ts +40 -6
  37. package/src/types/entity_callbacks.ts +1 -1
  38. package/src/types/index.ts +7 -15
  39. package/src/types/policy.ts +25 -11
  40. package/src/types/project_manifest.ts +362 -0
  41. package/src/types/properties.ts +11 -169
  42. package/src/types/schema_version.ts +112 -0
  43. package/src/types/security_rules.ts +344 -0
  44. package/src/types/storage_authorize.ts +77 -0
  45. package/dist/controllers/analytics_controller.d.ts +0 -7
  46. package/dist/controllers/auth.d.ts +0 -110
  47. package/dist/controllers/customization_controller.d.ts +0 -61
  48. package/dist/controllers/dialogs_controller.d.ts +0 -36
  49. package/dist/controllers/local_config_persistence.d.ts +0 -20
  50. package/dist/controllers/navigation.d.ts +0 -225
  51. package/dist/controllers/registry.d.ts +0 -80
  52. package/dist/controllers/side_dialogs_controller.d.ts +0 -67
  53. package/dist/controllers/side_panel_controller.d.ts +0 -97
  54. package/dist/controllers/snackbar.d.ts +0 -24
  55. package/dist/rebase_context.d.ts +0 -110
  56. package/dist/types/breadcrumbs.d.ts +0 -26
  57. package/dist/types/builders.d.ts +0 -15
  58. package/dist/types/component_overrides.d.ts +0 -196
  59. package/dist/types/entity_actions.d.ts +0 -104
  60. package/dist/types/entity_link_builder.d.ts +0 -7
  61. package/dist/types/entity_views.d.ts +0 -95
  62. package/dist/types/export_import.d.ts +0 -21
  63. package/dist/types/formex.d.ts +0 -40
  64. package/dist/types/locales.d.ts +0 -4
  65. package/dist/types/modify_collections.d.ts +0 -5
  66. package/dist/types/plugins.d.ts +0 -277
  67. package/dist/types/property_config.d.ts +0 -74
  68. package/dist/types/slots.d.ts +0 -262
  69. package/dist/types/translations.d.ts +0 -915
  70. package/dist/types/user_management_delegate.d.ts +0 -22
  71. package/src/controllers/analytics_controller.tsx +0 -57
  72. package/src/controllers/auth.tsx +0 -121
  73. package/src/controllers/customization_controller.tsx +0 -72
  74. package/src/controllers/dialogs_controller.tsx +0 -37
  75. package/src/controllers/local_config_persistence.tsx +0 -22
  76. package/src/controllers/navigation.ts +0 -267
  77. package/src/controllers/registry.ts +0 -95
  78. package/src/controllers/side_dialogs_controller.tsx +0 -82
  79. package/src/controllers/side_panel_controller.tsx +0 -112
  80. package/src/controllers/snackbar.ts +0 -29
  81. package/src/rebase_context.tsx +0 -130
  82. package/src/types/breadcrumbs.ts +0 -27
  83. package/src/types/builders.ts +0 -17
  84. package/src/types/component_overrides.ts +0 -244
  85. package/src/types/entity_actions.tsx +0 -125
  86. package/src/types/entity_link_builder.ts +0 -8
  87. package/src/types/entity_views.tsx +0 -114
  88. package/src/types/export_import.ts +0 -26
  89. package/src/types/formex.ts +0 -45
  90. package/src/types/locales.ts +0 -81
  91. package/src/types/modify_collections.tsx +0 -6
  92. package/src/types/plugins.tsx +0 -346
  93. package/src/types/property_config.tsx +0 -95
  94. package/src/types/slots.tsx +0 -307
  95. package/src/types/translations.ts +0 -1026
  96. package/src/types/user_management_delegate.ts +0 -23
@@ -1,277 +0,0 @@
1
- import React, { PropsWithChildren } from "react";
2
- import type { CollectionConfig } from "./collections";
3
- import type { EntityStatus } from "./entities";
4
- import type { InferPropertyType, Property } from "./properties";
5
- import type { FormContext } from "./entity_views";
6
- import type { RebaseContext } from "../rebase_context";
7
- import type { NavigationGroupMapping, AppView } from "../controllers/navigation";
8
- import type { User } from "../users";
9
- import type { SlotContribution } from "./slots";
10
- /**
11
- * Props interface for custom field components.
12
- *
13
- * The `@rebasepro/admin` package re-exports a narrower version of this
14
- * interface that adds `formex` and layout-specific fields. This base
15
- * definition captures the core contract that every field renderer must
16
- * satisfy, regardless of where it is rendered.
17
- *
18
- * @typeParam P - The property type this field is bound to
19
- * @typeParam CustomProps - Extra props injected via the property's `customProps`
20
- * @typeParam M - The entity model type
21
- * @group Form custom fields
22
- */
23
- export interface FieldProps<P extends Property = Property, CustomProps = unknown, M extends Record<string, unknown> = Record<string, unknown>> {
24
- /** Key of the property (e.g. "user.name" for a nested path) */
25
- propertyKey: string;
26
- /** Current value of this field */
27
- value: InferPropertyType<P> | null;
28
- /** Set value of field directly */
29
- setValue: (value: InferPropertyType<P> | null, shouldValidate?: boolean) => void;
30
- /** Set value of a different field directly */
31
- setFieldValue: (propertyKey: string, value: unknown, shouldValidate?: boolean) => void;
32
- /** Is the form currently submitting */
33
- isSubmitting?: boolean;
34
- /** Should this field show the error indicator */
35
- showError?: boolean;
36
- /** Error message for this field, or undefined if valid */
37
- error?: string;
38
- /** Has this field been touched */
39
- touched?: boolean;
40
- /** Property related to this field */
41
- property: P;
42
- /** Should this field include a description */
43
- includeDescription?: boolean;
44
- /** Flag to indicate that the underlying value has been updated in the driver */
45
- underlyingValueHasChanged?: boolean;
46
- /** Is this field part of an array */
47
- partOfArray?: boolean;
48
- /** Is this field part of a block */
49
- partOfBlock?: boolean;
50
- /** Display the child properties directly, without being wrapped in an extendable panel */
51
- minimalistView?: boolean;
52
- /** Should this field autofocus on mount */
53
- autoFocus?: boolean;
54
- /** Additional properties set by the developer */
55
- customProps?: CustomProps;
56
- /** Additional values related to the state of the form or the entity */
57
- context: FormContext<M>;
58
- /** Flag to indicate if this field should be disabled */
59
- disabled?: boolean;
60
- /** Size of the field */
61
- size?: "small" | "medium" | "large";
62
- /** Callback when internal property state changes (e.g. panel expansion) */
63
- onPropertyChange?: (property: Partial<Property>) => void;
64
- }
65
- /**
66
- * Interface used to define plugins for Rebase.
67
- * Plugins contribute UI via **slots**, wrap subtrees with **providers**,
68
- * and inject behavioral logic via **hooks**.
69
- * @group Core
70
- */
71
- export interface RebasePlugin {
72
- /**
73
- * Unique key identifying this plugin.
74
- */
75
- key: string;
76
- /**
77
- * If true, no CMS content is shown until this plugin finishes loading.
78
- */
79
- loading?: boolean;
80
- /**
81
- * UI slot contributions rendered at the matching extension points.
82
- */
83
- slots?: SlotContribution[];
84
- /**
85
- * HOC providers wrapping root or form content.
86
- * Providers with `scope: "root"` wrap the entire CMS below RebaseContext.
87
- * Providers with `scope: "form"` wrap each entity form/edit view.
88
- */
89
- providers?: PluginProvider[];
90
- /**
91
- * Behavioral hooks (non-UI) — collection modification, search blocking,
92
- * column reordering, navigation entries, etc.
93
- */
94
- hooks?: PluginHooks;
95
- /**
96
- * Field wrapping for custom field rendering (e.g. data enhancement).
97
- */
98
- fieldBuilder?: FieldBuilderConfig;
99
- /**
100
- * Views to be automatically added to the navigation.
101
- */
102
- views?: AppView[];
103
- /**
104
- * Optional lifecycle hooks. Called by the Rebase runtime
105
- * at appropriate points in the app lifecycle.
106
- */
107
- lifecycle?: PluginLifecycle;
108
- }
109
- /**
110
- * A HOC provider that wraps a subtree of the CMS.
111
- * @group Plugins
112
- */
113
- export interface PluginProvider {
114
- /**
115
- * `"root"` — wraps the entire CMS below RebaseContext.
116
- * `"form"` — wraps each entity form / edit view.
117
- */
118
- scope: "root" | "form";
119
- /**
120
- * The provider component. Must accept `children`.
121
- * Typed loosely because extra props are passed via the `props` field;
122
- * strict signatures cause contravariance issues.
123
- */
124
- Component: React.ComponentType<PropsWithChildren<Record<string, unknown>>>;
125
- /**
126
- * Additional props passed to the Component.
127
- */
128
- props?: Record<string, unknown>;
129
- }
130
- /**
131
- * Behavioral hooks that a plugin can provide.
132
- * These are non-UI extension points for modifying CMS behavior.
133
- * @group Plugins
134
- */
135
- export interface PluginHooks {
136
- /**
137
- * Modify a single collection before it is rendered (synchronous).
138
- */
139
- modifyCollection?: (collection: CollectionConfig) => CollectionConfig;
140
- /**
141
- * Async version of modifyCollection — supports fetching remote config.
142
- * Runs during navigation resolution. If provided alongside `modifyCollection`,
143
- * the sync version runs first, then the async version.
144
- */
145
- modifyCollectionAsync?: (collection: CollectionConfig) => Promise<CollectionConfig>;
146
- /**
147
- * Modify, add or remove collections.
148
- */
149
- injectCollections?: (collections: CollectionConfig[]) => CollectionConfig[];
150
- /**
151
- * Callback called when columns are reordered via drag and drop.
152
- */
153
- onColumnsReorder?: (props: {
154
- fullPath: string;
155
- parentCollectionSlugs: string[];
156
- parentEntityIds: string[];
157
- collection: CollectionConfig;
158
- newPropertiesOrder: string[];
159
- }) => void;
160
- /**
161
- * Callback called when Kanban board columns are reordered.
162
- */
163
- onKanbanColumnsReorder?: (props: {
164
- fullPath: string;
165
- parentCollectionSlugs: string[];
166
- parentEntityIds: string[];
167
- collection: CollectionConfig;
168
- kanbanColumnProperty: string;
169
- newColumnsOrder: string[];
170
- }) => void;
171
- /**
172
- * Navigation entries contributed by this plugin.
173
- */
174
- navigationEntries?: NavigationGroupMapping[];
175
- /**
176
- * Callback when navigation entry order changes (e.g. drag-and-drop).
177
- */
178
- onNavigationEntriesUpdate?: (entries: NavigationGroupMapping[]) => void;
179
- /**
180
- * Allow reordering collections in the home page via drag and drop.
181
- */
182
- allowDragAndDrop?: boolean;
183
- }
184
- /**
185
- * Lifecycle hooks for plugins. Called by the Rebase runtime
186
- * at appropriate points in the app lifecycle.
187
- * @group Plugins
188
- */
189
- export interface PluginLifecycle {
190
- /**
191
- * Called once when the plugin is mounted in the Rebase tree.
192
- * Can return a Promise for async initialization.
193
- */
194
- onMount?: (context: RebaseContext) => void | Promise<void>;
195
- /**
196
- * Called when the plugin is unmounted from the Rebase tree.
197
- * Use this for cleanup (subscriptions, timers, etc.).
198
- */
199
- onUnmount?: () => void;
200
- /**
201
- * Called whenever the authentication state changes.
202
- * Receives the new user (or null on sign-out).
203
- */
204
- onAuthStateChange?: (user: User | null) => void;
205
- /**
206
- * Called when a collection's visible entities change.
207
- * Useful for analytics, caching, or cross-plugin coordination.
208
- */
209
- onCollectionChange?: (slug: string, entities: unknown[]) => void;
210
- }
211
- /**
212
- * Configuration for wrapping form field components.
213
- * @group Plugins
214
- */
215
- export interface FieldBuilderConfig {
216
- /**
217
- * Returns a wrapped field component, or null to skip wrapping.
218
- */
219
- wrap: <T>(params: PluginFieldBuilderParams) => React.ComponentType<FieldProps<Property>> | null;
220
- /**
221
- * Optional guard — return false to skip wrapping for this field.
222
- */
223
- enabled?: (params: PluginFieldBuilderParams) => boolean;
224
- }
225
- /**
226
- * Props passed to home page collection card action components.
227
- * @group Models
228
- */
229
- export interface PluginHomePageActionsProps<EP extends object = object, M extends Record<string, unknown> = Record<string, unknown>, USER extends User = User, EC extends CollectionConfig<M> = CollectionConfig<M>> {
230
- slug: string;
231
- collection: EC;
232
- context: RebaseContext<USER>;
233
- }
234
- /**
235
- * Props passed to form action components in entity edit/form views.
236
- * @group Models
237
- */
238
- export interface PluginFormActionProps<USER extends User = User, EC extends CollectionConfig = CollectionConfig> {
239
- entityId?: string | number;
240
- path: string;
241
- parentCollectionSlugs: string[];
242
- parentEntityIds: string[];
243
- status: EntityStatus;
244
- collection: EC;
245
- disabled: boolean;
246
- formContext?: FormContext;
247
- context: RebaseContext<USER>;
248
- openEntityMode?: "side_panel" | "full_screen" | "split" | "dialog";
249
- }
250
- /**
251
- * Parameters passed to the field builder wrap function.
252
- * @group Models
253
- */
254
- export type PluginFieldBuilderParams<M extends Record<string, unknown> = Record<string, unknown>, EC extends CollectionConfig<M> = CollectionConfig<M>> = {
255
- fieldConfigId: string;
256
- propertyKey: string;
257
- property: Property;
258
- Field: React.ComponentType<FieldProps<Property, unknown, M>>;
259
- plugin: RebasePlugin;
260
- path?: string;
261
- collection?: EC;
262
- };
263
- /**
264
- * Generic props passed to plugin components that just need CMS context.
265
- * @group Models
266
- */
267
- export interface PluginGenericProps<USER extends User = User> {
268
- context: RebaseContext<USER>;
269
- }
270
- /**
271
- * Props for additional card components in the home page.
272
- * @group Models
273
- */
274
- export interface PluginHomePageAdditionalCardsProps<USER extends User = User> {
275
- group?: string;
276
- context: RebaseContext<USER>;
277
- }
@@ -1,74 +0,0 @@
1
- import React from "react";
2
- import { ArrayProperty, MapProperty, StringProperty, NumberProperty, BooleanProperty, DateProperty, GeopointProperty, ReferenceProperty, RelationProperty, VectorProperty, BinaryProperty } from "./properties";
3
- import { BaseProperty } from "./properties";
4
- type CMSBasePropertyNoName = Omit<BaseProperty, "name">;
5
- export type ConfigProperty = (Omit<StringProperty, "name"> & {
6
- name?: string;
7
- } & CMSBasePropertyNoName) | (Omit<NumberProperty, "name"> & {
8
- name?: string;
9
- } & CMSBasePropertyNoName) | (Omit<BooleanProperty, "name"> & {
10
- name?: string;
11
- } & CMSBasePropertyNoName) | (Omit<DateProperty, "name"> & {
12
- name?: string;
13
- } & CMSBasePropertyNoName) | (Omit<GeopointProperty, "name"> & {
14
- name?: string;
15
- } & CMSBasePropertyNoName) | (Omit<ReferenceProperty, "name"> & {
16
- name?: string;
17
- } & CMSBasePropertyNoName) | (Omit<RelationProperty, "name"> & {
18
- name?: string;
19
- } & CMSBasePropertyNoName) | (Omit<ArrayProperty, "name" | "of" | "oneOf"> & {
20
- name?: string;
21
- of?: ConfigProperty | ConfigProperty[];
22
- oneOf?: {
23
- properties: Record<string, ConfigProperty>;
24
- typeField?: string;
25
- valueField?: string;
26
- propertiesOrder?: string[];
27
- };
28
- } & CMSBasePropertyNoName) | (Omit<MapProperty, "name" | "properties"> & {
29
- name?: string;
30
- properties?: Record<string, ConfigProperty>;
31
- } & CMSBasePropertyNoName) | (Omit<VectorProperty, "name"> & {
32
- name?: string;
33
- } & CMSBasePropertyNoName) | (Omit<BinaryProperty, "name"> & {
34
- name?: string;
35
- } & CMSBasePropertyNoName);
36
- /**
37
- * This is the configuration object for a property.
38
- * These configs are generated by default for the properties defined in your
39
- * collections' configuration, but you can define your own to be used.
40
- */
41
- export type PropertyConfig = {
42
- /**
43
- * Key used to identify this property config.
44
- */
45
- key: PropertyConfigId | string;
46
- /**
47
- * Name of this field type.
48
- * This is not the name of the property.
49
- */
50
- name: string;
51
- /**
52
- * Default config for the property.
53
- * This property or builder will be used as the base values for the resulting property.
54
- * You can also use a builder function to generate the base property.
55
- */
56
- property: ConfigProperty;
57
- /**
58
- * Optional icon to be used in the field selector.
59
- * Use a 24x24 component, in order not to break the layout.
60
- * Any Rebase icon can be used.
61
- */
62
- Icon?: React.ComponentType;
63
- /**
64
- * CSS color, used only in some plugins like the field selector.
65
- * e.g. "#2d7ff9"
66
- */
67
- color?: string;
68
- /**
69
- * Description of this field type.
70
- */
71
- description?: string;
72
- };
73
- export type PropertyConfigId = "text_field" | "multiline" | "markdown" | "url" | "email" | "user_select" | "select" | "multi_select" | "number_input" | "number_select" | "multi_number_select" | "file_upload" | "multi_file_upload" | "group" | "key_value" | "reference" | "multi_references" | "relation" | "switch" | "date_time" | "repeat" | "custom_array" | "block" | "vector_input";
74
- export {};
@@ -1,262 +0,0 @@
1
- import React from "react";
2
- import type { CollectionActionsProps, EntityTableController, SelectionController, CollectionConfig } from "./collections";
3
- import type { Entity } from "./entities";
4
- import type { PluginFormActionProps, PluginGenericProps, PluginHomePageActionsProps, PluginHomePageAdditionalCardsProps } from "./plugins";
5
- import type { Property } from "./properties";
6
- import type { RebaseContext } from "../rebase_context";
7
- /**
8
- * Registry mapping slot names to their component prop types.
9
- * Each key represents a UI extension point in the CMS.
10
- * @group Plugins
11
- */
12
- export interface SlotRegistry {
13
- "home.actions": PluginGenericProps;
14
- "home.cards": PluginHomePageAdditionalCardsProps;
15
- "home.children.start": PluginGenericProps;
16
- "home.children.end": PluginGenericProps;
17
- /** Compact insight widget rendered inline in a home page collection card. */
18
- "home.card.insight": HomeCardInsightSlotProps;
19
- "home.collection.actions": PluginHomePageActionsProps;
20
- /** Rendered below the logo in the sidebar drawer. */
21
- "navigation.header": NavigationSlotProps;
22
- /** Rendered above the collapse toggle at the bottom of the drawer. */
23
- "navigation.footer": NavigationSlotProps;
24
- "collection.actions": CollectionActionsProps;
25
- "collection.actions.start": CollectionActionsProps;
26
- "collection.header.action": CollectionHeaderActionProps;
27
- "collection.add-column": CollectionAddColumnProps;
28
- "collection.error": CollectionErrorProps;
29
- /** Extra widgets rendered inside the collection toolbar row. */
30
- "collection.toolbar": CollectionToolbarProps;
31
- /** Custom empty-state component when a collection has no data. */
32
- "collection.empty-state": CollectionEmptyStateProps;
33
- /** Insight widgets rendered above the collection table. */
34
- "collection.insights": CollectionInsightsSlotProps;
35
- "form.actions": PluginFormActionProps;
36
- "form.actions.top": PluginFormActionProps;
37
- /** Rendered before the form title / field list. */
38
- "form.before": PluginFormActionProps;
39
- /** Rendered after the form field list. */
40
- "form.after": PluginFormActionProps;
41
- /** Per-row actions in entity tables (e.g. bulk actions, row context menus). */
42
- "entity.row.actions": EntityRowActionsProps;
43
- /** Inject UI before an individual form field. */
44
- "entity.field.before": EntityFieldSlotProps;
45
- /** Inject UI after an individual form field. */
46
- "entity.field.after": EntityFieldSlotProps;
47
- /** Custom filter sidebar for a collection. */
48
- "collection.filter-panel": CollectionFilterPanelProps;
49
- /** Widget rendered on the dashboard / home page. */
50
- "dashboard.widget": DashboardWidgetProps;
51
- /** Cross-collection search bar component. */
52
- "global.search": GlobalSearchProps;
53
- /** Top-level toolbar actions rendered in the shell toolbar area. */
54
- "shell.toolbar": ShellToolbarProps;
55
- "kanban.setup": KanbanSetupProps;
56
- "kanban.add-column": KanbanAddColumnProps;
57
- }
58
- /**
59
- * Valid slot names for UI extension points.
60
- * @group Plugins
61
- */
62
- export type SlotName = keyof SlotRegistry;
63
- /**
64
- * A single UI component contribution to a named slot.
65
- * @group Plugins
66
- */
67
- export interface SlotContribution<K extends SlotName = SlotName> {
68
- /**
69
- * Which slot to contribute to.
70
- */
71
- slot: K;
72
- /**
73
- * The component to render in the slot.
74
- * Typed loosely so mixed-slot arrays work.
75
- * Type safety is provided at the `useSlot` call site.
76
- */
77
- Component: React.ComponentType<any>;
78
- /**
79
- * Additional props to merge into the slot props before rendering.
80
- */
81
- props?: Record<string, unknown>;
82
- /**
83
- * Ordering hint. Lower values render first. Defaults to 50.
84
- */
85
- order?: number;
86
- }
87
- /**
88
- * Props for `navigation.header` and `navigation.footer` slots.
89
- * @group Plugins
90
- */
91
- export interface NavigationSlotProps {
92
- drawerOpen: boolean;
93
- drawerHovered: boolean;
94
- context: RebaseContext;
95
- }
96
- /**
97
- * Props for the `collection.toolbar` slot.
98
- * @group Plugins
99
- */
100
- export interface CollectionToolbarProps {
101
- path: string;
102
- collection: CollectionConfig;
103
- parentCollectionSlugs: string[];
104
- parentEntityIds: string[];
105
- tableController: EntityTableController;
106
- selectionController: SelectionController;
107
- }
108
- /**
109
- * Props for the `collection.empty-state` slot.
110
- * @group Plugins
111
- */
112
- export interface CollectionEmptyStateProps {
113
- path: string;
114
- collection: CollectionConfig;
115
- parentCollectionSlugs: string[];
116
- parentEntityIds: string[];
117
- canCreate: boolean;
118
- onNewClick?: () => void;
119
- }
120
- /**
121
- * Props for the `collection.header.action` slot.
122
- * @group Plugins
123
- */
124
- export interface CollectionHeaderActionProps {
125
- property: Property;
126
- propertyKey: string;
127
- path: string;
128
- parentCollectionSlugs: string[];
129
- parentEntityIds: string[];
130
- onHover: boolean;
131
- collection: CollectionConfig;
132
- tableController: EntityTableController;
133
- }
134
- /**
135
- * Props for the `collection.add-column` slot.
136
- * @group Plugins
137
- */
138
- export interface CollectionAddColumnProps {
139
- path: string;
140
- parentCollectionSlugs: string[];
141
- parentEntityIds: string[];
142
- collection: CollectionConfig;
143
- tableController: EntityTableController;
144
- }
145
- /**
146
- * Props for the `collection.error` slot.
147
- * @group Plugins
148
- */
149
- export interface CollectionErrorProps {
150
- path: string;
151
- collection: CollectionConfig;
152
- parentCollectionSlugs?: string[];
153
- parentEntityIds?: string[];
154
- error: Error;
155
- }
156
- /**
157
- * Props for the `kanban.setup` slot.
158
- * @group Plugins
159
- */
160
- export interface KanbanSetupProps {
161
- collection: CollectionConfig;
162
- fullPath: string;
163
- parentCollectionSlugs: string[];
164
- parentEntityIds: string[];
165
- }
166
- /**
167
- * Props for the `kanban.add-column` slot.
168
- * @group Plugins
169
- */
170
- export interface KanbanAddColumnProps {
171
- collection: CollectionConfig;
172
- fullPath: string;
173
- parentCollectionSlugs: string[];
174
- parentEntityIds: string[];
175
- columnProperty: string;
176
- }
177
- /**
178
- * Props for `entity.row.actions` slot.
179
- * Rendered for each row in a entity collection table.
180
- * @group Plugins
181
- */
182
- export interface EntityRowActionsProps {
183
- entity: Entity;
184
- entityId: string;
185
- path: string;
186
- collection: CollectionConfig;
187
- parentCollectionSlugs: string[];
188
- parentEntityIds: string[];
189
- selectionController: SelectionController;
190
- context: RebaseContext;
191
- }
192
- /**
193
- * Props for `entity.field.before` and `entity.field.after` slots.
194
- * Rendered around individual form fields in the entity edit view.
195
- * @group Plugins
196
- */
197
- export interface EntityFieldSlotProps {
198
- propertyKey: string;
199
- property: Property;
200
- path: string;
201
- entityId?: string | number;
202
- collection: CollectionConfig;
203
- context: RebaseContext;
204
- }
205
- /**
206
- * Props for `collection.filter-panel` slot.
207
- * Custom filter sidebar rendered alongside the collection table.
208
- * @group Plugins
209
- */
210
- export interface CollectionFilterPanelProps {
211
- path: string;
212
- collection: CollectionConfig;
213
- parentCollectionSlugs: string[];
214
- parentEntityIds: string[];
215
- tableController: EntityTableController;
216
- context: RebaseContext;
217
- }
218
- /**
219
- * Props for `dashboard.widget` slot.
220
- * Widgets rendered on the home / dashboard page.
221
- * @group Plugins
222
- */
223
- export interface DashboardWidgetProps {
224
- context: RebaseContext;
225
- }
226
- /**
227
- * Props for `global.search` slot.
228
- * Cross-collection search bar rendered in the app shell.
229
- * @group Plugins
230
- */
231
- export interface GlobalSearchProps {
232
- context: RebaseContext;
233
- }
234
- /**
235
- * Props for `shell.toolbar` slot.
236
- * Actions rendered in the top-level toolbar / app bar area.
237
- * @group Plugins
238
- */
239
- export interface ShellToolbarProps {
240
- context: RebaseContext;
241
- }
242
- /**
243
- * Props for `collection.insights` slot.
244
- * Insight widgets rendered above the collection table.
245
- * @group Plugins
246
- */
247
- export interface CollectionInsightsSlotProps {
248
- path: string;
249
- collection: CollectionConfig;
250
- parentCollectionSlugs: string[];
251
- parentEntityIds: string[];
252
- }
253
- /**
254
- * Props for `home.card.insight` slot.
255
- * Compact insight rendered inline in a home page collection card.
256
- * @group Plugins
257
- */
258
- export interface HomeCardInsightSlotProps {
259
- slug: string;
260
- collection: CollectionConfig;
261
- context: RebaseContext;
262
- }