@rebasepro/admin 0.1.2 → 0.2.3
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/LICENSE +21 -6
- package/dist/{CollectionEditorDialog-ywdxhs1L.js → CollectionEditorDialog-CmGXXSY9.js} +42 -209
- package/dist/CollectionEditorDialog-CmGXXSY9.js.map +1 -0
- package/dist/{CollectionsStudioView-BDzMFzqH.js → CollectionsStudioView-DcLHT5bU.js} +6 -8
- package/dist/CollectionsStudioView-DcLHT5bU.js.map +1 -0
- package/dist/{ContentHomePage-0tHuEIm_.js → ContentHomePage-C7vFqKSe.js} +5 -7
- package/dist/ContentHomePage-C7vFqKSe.js.map +1 -0
- package/dist/{ExportCollectionAction-BIrq92To.js → ExportCollectionAction-BfN34eWX.js} +36 -38
- package/dist/ExportCollectionAction-BfN34eWX.js.map +1 -0
- package/dist/{ImportCollectionAction-h8yg_To8.js → ImportCollectionAction-SZrInjhx.js} +5 -7
- package/dist/ImportCollectionAction-SZrInjhx.js.map +1 -0
- package/dist/{PropertyEditView-BuZrNnBN.js → PropertyEditView-Cvryrb3B.js} +563 -489
- package/dist/PropertyEditView-Cvryrb3B.js.map +1 -0
- package/dist/{RolesView-CMPsaIXo.js → RolesView-BCb7qwWs.js} +22 -11
- package/dist/RolesView-BCb7qwWs.js.map +1 -0
- package/dist/{UsersView-BkeblMVT.js → UsersView-Cex24r8H.js} +7 -71
- package/dist/UsersView-Cex24r8H.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/LayoutModeSwitch.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/properties/RelationPropertyField.d.ts +1 -7
- package/dist/collection_editor/ui/collection_editor/properties/VectorPropertyField.d.ts +3 -0
- package/dist/collection_editor_ui.js +5 -5
- package/dist/components/EntityCollectionTable/EntityCollectionRowActions.d.ts +1 -1
- package/dist/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +1 -1
- package/dist/components/EntityCollectionView/EntityCollectionListView.d.ts +18 -2
- package/dist/components/EntityCollectionView/FilterPresetsButton.d.ts +21 -0
- package/dist/components/EntityDetailView.d.ts +31 -0
- package/dist/components/EntityEditView.d.ts +3 -2
- package/dist/components/ReferenceTable/EntitySelectionTable.d.ts +1 -1
- package/dist/components/admin/CreationResultDialog.d.ts +5 -0
- package/dist/components/admin/RolesFilterSelect.d.ts +2 -0
- package/dist/components/admin/UserRolesSelectField.d.ts +2 -0
- package/dist/components/common/default_entity_actions.d.ts +7 -1
- package/dist/components/field_configs.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/data_import/utils/data.d.ts +1 -1
- package/dist/data_import/utils/file_headers.d.ts +6 -1
- package/dist/data_import/utils/file_to_json.d.ts +1 -11
- package/dist/data_import/utils/transforms.d.ts +11 -0
- package/dist/editor.js +2 -4
- package/dist/editor.js.map +1 -1
- package/dist/form/EntityForm.d.ts +1 -1
- package/dist/form/field_bindings/RelationFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/VectorFieldBinding.d.ts +11 -0
- package/dist/form/index.d.ts +1 -0
- package/dist/hooks/navigation/useResolvedViews.d.ts +2 -1
- package/dist/{index-eRJbMvHi.js → index-DjduZG1T.js} +3 -3
- package/dist/index-DjduZG1T.js.map +1 -0
- package/dist/{index-BuZaHcyc.js → index-MKPc70-v.js} +3 -3
- package/dist/index-MKPc70-v.js.map +1 -0
- package/dist/{index-CS6uJ7oW.js → index-PLIQXpTt.js} +4 -6
- package/dist/index-PLIQXpTt.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +352 -148
- package/dist/index.js.map +1 -1
- package/dist/types/components/EntityFormActionsProps.d.ts +1 -1
- package/dist/types/components/EntityFormProps.d.ts +2 -1
- package/dist/types/fields.d.ts +3 -3
- package/dist/util/navigation_utils.d.ts +1 -1
- package/dist/{util-zfU1zOCX.js → util-DbWax_sV.js} +5453 -2641
- package/dist/util-DbWax_sV.js.map +1 -0
- package/package.json +46 -39
- package/src/collection_editor/ConfigControllerProvider.tsx +1 -1
- package/src/collection_editor/ui/AddKanbanColumnAction.tsx +12 -2
- package/src/collection_editor/ui/CollectionViewHeaderAction.tsx +1 -2
- package/src/collection_editor/ui/EditorCollectionAction.tsx +1 -2
- package/src/collection_editor/ui/EditorCollectionActionStart.tsx +1 -2
- package/src/collection_editor/ui/EditorEntityAction.tsx +1 -2
- package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +1 -2
- package/src/collection_editor/ui/NewCollectionButton.tsx +1 -2
- package/src/collection_editor/ui/NewCollectionCard.tsx +4 -6
- package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +1 -2
- package/src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.tsx +10 -2
- package/src/collection_editor/ui/collection_editor/CollectionDetailsForm.tsx +18 -2
- package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +23 -17
- package/src/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.tsx +16 -2
- package/src/collection_editor/ui/collection_editor/CollectionJsonImportDialog.tsx +19 -9
- package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +13 -2
- package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +24 -2
- package/src/collection_editor/ui/collection_editor/CollectionRelationsTab.tsx +22 -3
- package/src/collection_editor/ui/collection_editor/CollectionStudioView.tsx +1 -2
- package/src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx +11 -2
- package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +12 -2
- package/src/collection_editor/ui/collection_editor/EntityActionsEditTab.tsx +16 -3
- package/src/collection_editor/ui/collection_editor/EnumForm.tsx +17 -2
- package/src/collection_editor/ui/collection_editor/GeneralSettingsForm.tsx +18 -2
- package/src/collection_editor/ui/collection_editor/GetCodeDialog.tsx +1 -2
- package/src/collection_editor/ui/collection_editor/KanbanConfigSection.tsx +1 -2
- package/src/collection_editor/ui/collection_editor/LayoutModeSwitch.tsx +17 -5
- package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +32 -6
- package/src/collection_editor/ui/collection_editor/PropertyFieldPreview.tsx +7 -7
- package/src/collection_editor/ui/collection_editor/PropertyTree.tsx +14 -2
- package/src/collection_editor/ui/collection_editor/SubcollectionsEditTab.tsx +16 -2
- package/src/collection_editor/ui/collection_editor/ViewModeSwitch.tsx +9 -2
- package/src/collection_editor/ui/collection_editor/properties/BlockPropertyField.tsx +1 -2
- package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +1 -2
- package/src/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.tsx +9 -2
- package/src/collection_editor/ui/collection_editor/properties/RelationPropertyField.tsx +37 -57
- package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +11 -2
- package/src/collection_editor/ui/collection_editor/properties/VectorPropertyField.tsx +34 -0
- package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsEditor.tsx +15 -7
- package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsPanel.tsx +1 -2
- package/src/collection_editor/ui/collection_editor/properties/conditions/EnumConditionsEditor.tsx +15 -3
- package/src/collection_editor/ui/collection_editor/properties/conditions/property_paths.ts +1 -1
- package/src/collection_editor/ui/collection_editor/properties/validation/ValidationPanel.tsx +1 -2
- package/src/collection_editor/useLocalCollectionsConfigController.tsx +0 -2
- package/src/collection_editor/validateCollectionJson.ts +97 -10
- package/src/components/AdminModeSyncer.tsx +1 -1
- package/src/components/ArrayContainer.tsx +19 -15
- package/src/components/ClearFilterSortButton.tsx +1 -2
- package/src/components/CollectionEditorDialogs.tsx +1 -1
- package/src/components/DefaultAppBar.tsx +15 -3
- package/src/components/DefaultDrawer.tsx +3 -3
- package/src/components/DrawerNavigationGroup.tsx +1 -2
- package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +14 -6
- package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +1 -1
- package/src/components/EntityCollectionTable/EntityCollectionTableProps.tsx +1 -1
- package/src/components/EntityCollectionTable/fields/TableMultipleRelationField.tsx +1 -2
- package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +1 -2
- package/src/components/EntityCollectionTable/fields/TableRelationField.tsx +1 -2
- package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +1 -2
- package/src/components/EntityCollectionTable/fields/VirtualTableSelect.tsx +0 -1
- package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +15 -27
- package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +1 -2
- package/src/components/EntityCollectionTable/internal/EntityTableCellActions.tsx +1 -2
- package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +3 -5
- package/src/components/EntityCollectionTable/table_bindings.tsx +51 -45
- package/src/components/EntityCollectionView/Board.tsx +1 -2
- package/src/components/EntityCollectionView/BoardColumn.tsx +9 -2
- package/src/components/EntityCollectionView/BoardColumnTitle.tsx +5 -4
- package/src/components/EntityCollectionView/EntityCollectionBoardView.tsx +18 -16
- package/src/components/EntityCollectionView/EntityCollectionCardView.tsx +16 -17
- package/src/components/EntityCollectionView/EntityCollectionListView.tsx +87 -18
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +20 -11
- package/src/components/EntityCollectionView/EntityCollectionViewActions.tsx +6 -7
- package/src/components/EntityCollectionView/EntityCollectionViewStartActions.tsx +14 -5
- package/src/components/EntityCollectionView/FilterPresetsButton.tsx +292 -0
- package/src/components/EntityCollectionView/FiltersDialog.tsx +1 -2
- package/src/components/EntityCollectionView/SplitListView.tsx +76 -25
- package/src/components/EntityCollectionView/ViewModeToggle.tsx +20 -7
- package/src/components/EntityCollectionView/hooks/useKanbanDragAndDrop.ts +1 -1
- package/src/components/EntityCollectionView/useBoardDataController.tsx +74 -6
- package/src/components/EntityCollectionView/useEntityPreviewSlots.ts +1 -1
- package/src/components/EntityDetailView.tsx +619 -0
- package/src/components/EntityEditView.tsx +29 -10
- package/src/components/EntityEditViewFormActions.tsx +20 -7
- package/src/components/EntityPreview.tsx +14 -5
- package/src/components/EntitySidePanel.tsx +116 -62
- package/src/components/EntityView.tsx +1 -2
- package/src/components/HomePage/ContentHomePage.tsx +1 -1
- package/src/components/HomePage/FavouritesView.tsx +1 -2
- package/src/components/HomePage/NavigationCard.tsx +1 -2
- package/src/components/HomePage/NavigationCardBinding.tsx +1 -2
- package/src/components/HomePage/NavigationGroup.tsx +1 -2
- package/src/components/HomePage/SmallNavigationCard.tsx +1 -2
- package/src/components/PropertyIdCopyTooltip.tsx +1 -2
- package/src/components/RebaseAuthGate.tsx +2 -2
- package/src/components/RebaseNavigation.tsx +9 -7
- package/src/components/ReferenceTable/EntitySelectionTable.tsx +12 -8
- package/src/components/RelationSelector.tsx +34 -6
- package/src/components/SearchIconsView.tsx +10 -2
- package/src/components/SelectableTable/SelectableTable.tsx +2 -2
- package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +1 -2
- package/src/components/SideDialogs.tsx +63 -38
- package/src/components/UserSelector.tsx +30 -6
- package/src/components/admin/CreationResultDialog.tsx +135 -0
- package/src/components/admin/RolesFilterSelect.tsx +45 -0
- package/src/components/admin/RolesView.tsx +53 -14
- package/src/components/admin/UserRolesSelectField.tsx +50 -0
- package/src/components/admin/UsersView.tsx +41 -124
- package/src/components/app/Scaffold.tsx +1 -2
- package/src/components/common/default_entity_actions.tsx +119 -12
- package/src/components/field_configs.tsx +39 -3
- package/src/components/history/EntityHistoryEntry.tsx +1 -2
- package/src/components/history/EntityHistoryView.tsx +1 -2
- package/src/components/index.ts +2 -0
- package/src/data_export/export/BasicExportAction.tsx +35 -38
- package/src/data_export/export/ExportCollectionAction.tsx +39 -40
- package/src/data_import/components/DataNewPropertiesMapping.tsx +15 -2
- package/src/data_import/components/ImportFileUpload.tsx +1 -2
- package/src/data_import/components/ImportNewPropertyFieldPreview.tsx +1 -2
- package/src/data_import/import/ImportCollectionAction.tsx +21 -8
- package/src/data_import/utils/data.ts +23 -5
- package/src/data_import/utils/file_headers.ts +13 -89
- package/src/data_import/utils/file_to_json.ts +43 -68
- package/src/data_import/utils/transforms.ts +47 -0
- package/src/editor/components/SlashCommandMenu.tsx +17 -2
- package/src/editor/components/editor-bubble-item.tsx +1 -1
- package/src/editor/extensions/Image/index.ts +1 -1
- package/src/editor/extensions/Image.ts +1 -1
- package/src/editor/selectors/color-selector.tsx +1 -2
- package/src/editor/selectors/link-selector.tsx +1 -2
- package/src/editor/selectors/node-selector.tsx +16 -2
- package/src/editor/selectors/text-buttons.tsx +1 -2
- package/src/editor/utils/prosemirror-utils.ts +1 -1
- package/src/form/EntityForm.tsx +16 -6
- package/src/form/EntityFormActions.tsx +11 -3
- package/src/form/PropertyFieldBinding.tsx +5 -12
- package/src/form/components/FieldHelperText.tsx +1 -2
- package/src/form/components/LocalChangesMenu.tsx +17 -2
- package/src/form/components/StorageItemPreview.tsx +1 -2
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +1 -2
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +17 -2
- package/src/form/field_bindings/MapFieldBinding.tsx +1 -1
- package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +10 -3
- package/src/form/field_bindings/MultiSelectFieldBinding.tsx +1 -2
- package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +1 -2
- package/src/form/field_bindings/ReferenceAsStringFieldBinding.tsx +7 -7
- package/src/form/field_bindings/RelationFieldBinding.tsx +150 -147
- package/src/form/field_bindings/RepeatFieldBinding.tsx +1 -1
- package/src/form/field_bindings/SelectFieldBinding.tsx +1 -2
- package/src/form/field_bindings/TextFieldBinding.tsx +10 -2
- package/src/form/field_bindings/VectorFieldBinding.tsx +202 -0
- package/src/form/index.tsx +1 -0
- package/src/form/validation.ts +54 -2
- package/src/hooks/navigation/useBuildNavigationStateController.tsx +2 -1
- package/src/hooks/navigation/useResolvedViews.tsx +30 -15
- package/src/hooks/navigation/useTopLevelNavigation.ts +1 -1
- package/src/index.ts +6 -0
- package/src/preview/PropertyPreview.tsx +1 -1
- package/src/preview/components/ImagePreview.tsx +1 -1
- package/src/preview/components/UrlComponentPreview.tsx +1 -2
- package/src/preview/property_previews/ArrayOfMapsPreview.tsx +2 -2
- package/src/preview/property_previews/SkeletonPropertyComponent.tsx +23 -24
- package/src/routes/RebaseRoute.tsx +64 -35
- package/src/types/components/EntityFormActionsProps.tsx +1 -1
- package/src/types/components/EntityFormProps.tsx +3 -1
- package/src/types/fields.tsx +4 -3
- package/src/util/navigation_utils.ts +4 -3
- package/src/util/previews.ts +1 -1
- package/src/util/property_utils.tsx +22 -6
- package/src/util/resolutions.ts +2 -2
- package/dist/CollectionEditorDialog-ywdxhs1L.js.map +0 -1
- package/dist/CollectionsStudioView-BDzMFzqH.js.map +0 -1
- package/dist/ContentHomePage-0tHuEIm_.js.map +0 -1
- package/dist/ExportCollectionAction-BIrq92To.js.map +0 -1
- package/dist/ImportCollectionAction-h8yg_To8.js.map +0 -1
- package/dist/PropertyEditView-BuZrNnBN.js.map +0 -1
- package/dist/RolesView-CMPsaIXo.js.map +0 -1
- package/dist/UsersView-BkeblMVT.js.map +0 -1
- package/dist/index-BuZaHcyc.js.map +0 -1
- package/dist/index-CS6uJ7oW.js.map +0 -1
- package/dist/index-eRJbMvHi.js.map +0 -1
- package/dist/util-zfU1zOCX.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebasepro/admin",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.3",
|
|
5
5
|
"description": "Rebase CMS — content management views, forms, and routing",
|
|
6
6
|
"funding": {
|
|
7
7
|
"url": "https://github.com/sponsors/rebaseco"
|
|
@@ -34,12 +34,17 @@
|
|
|
34
34
|
"exports": {
|
|
35
35
|
".": {
|
|
36
36
|
"types": "./dist/index.d.ts",
|
|
37
|
-
"development": "./
|
|
37
|
+
"development": "./dist/index.js",
|
|
38
38
|
"import": "./dist/index.js"
|
|
39
39
|
},
|
|
40
|
+
"./editor": {
|
|
41
|
+
"types": "./dist/editor.d.ts",
|
|
42
|
+
"development": "./dist/editor.js",
|
|
43
|
+
"import": "./dist/editor.js"
|
|
44
|
+
},
|
|
40
45
|
"./collection_editor_ui": {
|
|
41
46
|
"types": "./dist/collection_editor_ui.d.ts",
|
|
42
|
-
"development": "./
|
|
47
|
+
"development": "./dist/collection_editor_ui.js",
|
|
43
48
|
"import": "./dist/collection_editor_ui.js"
|
|
44
49
|
},
|
|
45
50
|
"./package.json": "./package.json"
|
|
@@ -48,42 +53,44 @@
|
|
|
48
53
|
"@dnd-kit/core": "^6.3.1",
|
|
49
54
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
50
55
|
"@dnd-kit/sortable": "^10.0.0",
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
53
|
-
"
|
|
56
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
57
|
+
"@floating-ui/dom": "^1.7.6",
|
|
58
|
+
"cmdk": "^1.1.1",
|
|
54
59
|
"date-fns": "^3.6.0",
|
|
60
|
+
"exceljs": "^4.4.0",
|
|
55
61
|
"fast-equals": "6.0.0",
|
|
56
62
|
"fractional-indexing": "3.2.0",
|
|
63
|
+
"fuse.js": "^7.3.0",
|
|
57
64
|
"json5": "^2.2.3",
|
|
58
|
-
"markdown-it": "^14.1.
|
|
65
|
+
"markdown-it": "^14.1.1",
|
|
59
66
|
"markdown-it-ins": "^4.0.0",
|
|
60
67
|
"markdown-it-mark": "^4.0.0",
|
|
61
68
|
"markdown-it-task-lists": "^2.1.1",
|
|
62
69
|
"prism-react-renderer": "^2.4.1",
|
|
63
|
-
"prosemirror-commands": "^1.
|
|
64
|
-
"prosemirror-dropcursor": "^1.8.
|
|
65
|
-
"prosemirror-gapcursor": "^1.
|
|
66
|
-
"prosemirror-history": "^1.
|
|
70
|
+
"prosemirror-commands": "^1.7.1",
|
|
71
|
+
"prosemirror-dropcursor": "^1.8.2",
|
|
72
|
+
"prosemirror-gapcursor": "^1.4.1",
|
|
73
|
+
"prosemirror-history": "^1.5.0",
|
|
67
74
|
"prosemirror-inputrules": "^1.5.1",
|
|
68
|
-
"prosemirror-keymap": "^1.2.
|
|
69
|
-
"prosemirror-markdown": "^1.13.
|
|
70
|
-
"prosemirror-model": "^1.
|
|
71
|
-
"prosemirror-schema-list": "^1.
|
|
72
|
-
"prosemirror-state": "^1.4.
|
|
75
|
+
"prosemirror-keymap": "^1.2.3",
|
|
76
|
+
"prosemirror-markdown": "^1.13.4",
|
|
77
|
+
"prosemirror-model": "^1.25.7",
|
|
78
|
+
"prosemirror-schema-list": "^1.5.1",
|
|
79
|
+
"prosemirror-state": "^1.4.4",
|
|
73
80
|
"prosemirror-tables": "^1.8.5",
|
|
74
|
-
"prosemirror-transform": "^1.
|
|
75
|
-
"prosemirror-view": "^1.
|
|
76
|
-
"react-
|
|
81
|
+
"prosemirror-transform": "^1.12.0",
|
|
82
|
+
"prosemirror-view": "^1.41.8",
|
|
83
|
+
"react-compiler-runtime": "1.0.0",
|
|
84
|
+
"react-dropzone": "^14.4.1",
|
|
77
85
|
"react-use-measure": "^2.1.7",
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"@rebasepro/
|
|
81
|
-
"@rebasepro/core": "0.
|
|
82
|
-
"@rebasepro/
|
|
83
|
-
"@rebasepro/
|
|
84
|
-
"@rebasepro/
|
|
85
|
-
"@rebasepro/
|
|
86
|
-
"@rebasepro/utils": "0.1.2"
|
|
86
|
+
"zod": "^3.25.76",
|
|
87
|
+
"@rebasepro/common": "0.2.3",
|
|
88
|
+
"@rebasepro/formex": "0.2.3",
|
|
89
|
+
"@rebasepro/core": "0.2.3",
|
|
90
|
+
"@rebasepro/schema-inference": "0.2.3",
|
|
91
|
+
"@rebasepro/ui": "0.2.3",
|
|
92
|
+
"@rebasepro/utils": "0.2.3",
|
|
93
|
+
"@rebasepro/types": "0.2.3"
|
|
87
94
|
},
|
|
88
95
|
"peerDependencies": {
|
|
89
96
|
"react": ">=19.0.0",
|
|
@@ -92,21 +99,21 @@
|
|
|
92
99
|
"react-router-dom": "^7.0.0"
|
|
93
100
|
},
|
|
94
101
|
"devDependencies": {
|
|
95
|
-
"@jest/globals": "^30.
|
|
96
|
-
"@testing-library/react": "^16.3.
|
|
102
|
+
"@jest/globals": "^30.4.1",
|
|
103
|
+
"@testing-library/react": "^16.3.2",
|
|
97
104
|
"@types/jest": "^29.5.14",
|
|
98
|
-
"@types/
|
|
99
|
-
"@types/
|
|
100
|
-
"@types/react
|
|
105
|
+
"@types/markdown-it": "^14.1.2",
|
|
106
|
+
"@types/node": "^20.19.41",
|
|
107
|
+
"@types/react": "^19.2.15",
|
|
108
|
+
"@types/react-dom": "^19.2.3",
|
|
101
109
|
"@types/react-measure": "^2.0.12",
|
|
102
|
-
"@vitejs/plugin-react": "^4.
|
|
103
|
-
"eslint-plugin-react-compiler": "^19.1.0-rc.2",
|
|
110
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
104
111
|
"jest": "^29.7.0",
|
|
105
|
-
"react-router": "^7.
|
|
106
|
-
"react-router-dom": "^7.
|
|
107
|
-
"ts-jest": "^29.4.
|
|
112
|
+
"react-router": "^7.15.1",
|
|
113
|
+
"react-router-dom": "^7.15.1",
|
|
114
|
+
"ts-jest": "^29.4.10",
|
|
108
115
|
"typescript": "^5.9.3",
|
|
109
|
-
"vite": "^7.
|
|
116
|
+
"vite": "^7.3.3"
|
|
110
117
|
},
|
|
111
118
|
"files": [
|
|
112
119
|
"dist",
|
|
@@ -6,7 +6,7 @@ import { deepEqual as equal } from "fast-equals";
|
|
|
6
6
|
import { CollectionsConfigController } from "./types/config_controller";
|
|
7
7
|
import { useCustomizationController, useRebaseContext, useAuthController, useSnackbarController } from "@rebasepro/core";
|
|
8
8
|
import { getTableName } from "@rebasepro/common";
|
|
9
|
-
import { useNavigate } from "react-router";
|
|
9
|
+
import { useNavigate } from "react-router-dom";
|
|
10
10
|
import { CollectionEditorController } from "./types/collection_editor_controller";
|
|
11
11
|
import { CollectionEditorPermissionsBuilder } from "./types/config_permissions";
|
|
12
12
|
import { CollectionInference } from "./types/collection_inference";
|
|
@@ -8,8 +8,18 @@ import {
|
|
|
8
8
|
import { getPropertyInPath } from "../_cms_internals";
|
|
9
9
|
import { EntityCollection, EnumValueConfig, StringProperty } from "@rebasepro/types";
|
|
10
10
|
import { resolveEnumValues } from "@rebasepro/common";
|
|
11
|
-
import {
|
|
12
|
-
|
|
11
|
+
import {
|
|
12
|
+
Button,
|
|
13
|
+
cls,
|
|
14
|
+
defaultBorderMixin,
|
|
15
|
+
Dialog,
|
|
16
|
+
DialogActions,
|
|
17
|
+
DialogContent,
|
|
18
|
+
IconButton,
|
|
19
|
+
PlusIcon,
|
|
20
|
+
TextField,
|
|
21
|
+
Typography
|
|
22
|
+
} from "@rebasepro/ui";
|
|
13
23
|
import { useCollectionsConfigController } from "../useCollectionsConfigController";
|
|
14
24
|
import { toSnakeCase } from "@rebasepro/utils";
|
|
15
25
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useTranslation } from "@rebasepro/core";
|
|
2
2
|
import { EntityCollection, EntityTableController, Property } from "@rebasepro/types";
|
|
3
|
-
import { IconButton, Tooltip } from "@rebasepro/ui";
|
|
4
|
-
import { SettingsIcon } from "lucide-react";
|
|
3
|
+
import { IconButton, SettingsIcon, Tooltip } from "@rebasepro/ui";
|
|
5
4
|
import React from "react";
|
|
6
5
|
import { useCollectionEditorController } from "../useCollectionEditorController";
|
|
7
6
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { useCollectionRegistryController } from "../_cms_internals";
|
|
2
2
|
import { useAuthController, useTranslation } from "@rebasepro/core";
|
|
3
3
|
import { EntityCollection, CollectionActionsProps } from "@rebasepro/types";
|
|
4
|
-
import { IconButton, Tooltip } from "@rebasepro/ui";
|
|
5
|
-
import { SettingsIcon } from "lucide-react";
|
|
4
|
+
import { IconButton, SettingsIcon, Tooltip } from "@rebasepro/ui";
|
|
6
5
|
|
|
7
6
|
import { useCollectionEditorController } from "../useCollectionEditorController";
|
|
8
7
|
|
|
@@ -6,8 +6,7 @@ import {
|
|
|
6
6
|
useTranslation
|
|
7
7
|
} from "@rebasepro/core";
|
|
8
8
|
import { EntityCollection, CollectionActionsProps } from "@rebasepro/types";
|
|
9
|
-
import { Button, Tooltip } from "@rebasepro/ui";
|
|
10
|
-
import { SaveIcon, UndoIcon } from "lucide-react";
|
|
9
|
+
import { Button, SaveIcon, Tooltip, UndoIcon } from "@rebasepro/ui";
|
|
11
10
|
|
|
12
11
|
import { useCollectionEditorController } from "../useCollectionEditorController";
|
|
13
12
|
import { useCollectionsConfigController } from "../useCollectionsConfigController";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { useCollectionRegistryController } from "../_cms_internals";
|
|
2
2
|
import { useAuthController, useTranslation } from "@rebasepro/core";
|
|
3
3
|
import { EntityCollection, PluginFormActionProps } from "@rebasepro/types";
|
|
4
|
-
import { IconButton, Tooltip } from "@rebasepro/ui";
|
|
5
|
-
import { SettingsIcon } from "lucide-react";
|
|
4
|
+
import { IconButton, SettingsIcon, Tooltip } from "@rebasepro/ui";
|
|
6
5
|
|
|
7
6
|
import { useCollectionEditorController } from "../useCollectionEditorController";
|
|
8
7
|
|
|
@@ -5,8 +5,7 @@ import {
|
|
|
5
5
|
useTranslation
|
|
6
6
|
} from "@rebasepro/core";
|
|
7
7
|
import { PluginHomePageActionsProps } from "@rebasepro/types";
|
|
8
|
-
import { IconButton, Menu, MenuItem } from "@rebasepro/ui";
|
|
9
|
-
import { CopyIcon, MoreVerticalIcon, SettingsIcon, Trash2Icon } from "lucide-react";
|
|
8
|
+
import { CopyIcon, IconButton, Menu, MenuItem, MoreVerticalIcon, SettingsIcon, Trash2Icon } from "@rebasepro/ui";
|
|
10
9
|
import { useCollectionEditorController } from "../useCollectionEditorController";
|
|
11
10
|
import { useState } from "react";
|
|
12
11
|
import { useCollectionsConfigController } from "../useCollectionsConfigController";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Button } from "@rebasepro/ui";
|
|
2
|
-
import { PlusIcon } from "lucide-react";
|
|
1
|
+
import { Button, PlusIcon } from "@rebasepro/ui";
|
|
3
2
|
import { useCollectionEditorController } from "../useCollectionEditorController";
|
|
4
3
|
import { useAdminModeController, useTranslation } from "@rebasepro/core";
|
|
5
4
|
|
|
@@ -3,8 +3,7 @@ import {
|
|
|
3
3
|
useTranslation
|
|
4
4
|
} from "@rebasepro/core";
|
|
5
5
|
import { PluginHomePageAdditionalCardsProps } from "@rebasepro/types";
|
|
6
|
-
import { Card, cls, Typography } from "@rebasepro/ui";
|
|
7
|
-
import { PlusIcon } from "lucide-react";
|
|
6
|
+
import { Card, cls, PlusIcon, Typography } from "@rebasepro/ui";
|
|
8
7
|
import { useCollectionEditorController } from "../useCollectionEditorController";
|
|
9
8
|
|
|
10
9
|
export function NewCollectionCard({
|
|
@@ -12,13 +11,12 @@ export function NewCollectionCard({
|
|
|
12
11
|
context
|
|
13
12
|
}: PluginHomePageAdditionalCardsProps) {
|
|
14
13
|
|
|
15
|
-
if (!context.navigationStateController?.topLevelNavigation)
|
|
16
|
-
return null;
|
|
17
|
-
|
|
18
14
|
const authController = useAuthController();
|
|
19
|
-
|
|
20
15
|
const collectionEditorController = useCollectionEditorController();
|
|
21
16
|
const { t } = useTranslation();
|
|
17
|
+
|
|
18
|
+
if (!context.navigationStateController?.topLevelNavigation)
|
|
19
|
+
return null;
|
|
22
20
|
const canCreateCollections = collectionEditorController.configPermissions
|
|
23
21
|
? collectionEditorController.configPermissions({
|
|
24
22
|
user: authController.user
|
|
@@ -4,8 +4,7 @@ import {
|
|
|
4
4
|
} from "@rebasepro/core";
|
|
5
5
|
import { getDefaultPropertiesOrder } from "../_cms_internals";
|
|
6
6
|
import { EntityCollection, EntityTableController } from "@rebasepro/types";
|
|
7
|
-
import { Tooltip } from "@rebasepro/ui";
|
|
8
|
-
import { PlusIcon } from "lucide-react";
|
|
7
|
+
import { PlusIcon, Tooltip } from "@rebasepro/ui";
|
|
9
8
|
import { useCollectionEditorController } from "../useCollectionEditorController";
|
|
10
9
|
|
|
11
10
|
export function PropertyAddColumnComponent({
|
|
@@ -4,8 +4,16 @@ import { useCollectionRegistryController } from "../../_cms_internals";
|
|
|
4
4
|
import React, { useState } from "react";
|
|
5
5
|
import { useSnackbarController } from "@rebasepro/core";
|
|
6
6
|
import { EntityCollection } from "@rebasepro/types";
|
|
7
|
-
import {
|
|
8
|
-
|
|
7
|
+
import {
|
|
8
|
+
Button,
|
|
9
|
+
CircularProgress,
|
|
10
|
+
IconButton,
|
|
11
|
+
Menu,
|
|
12
|
+
SendIcon,
|
|
13
|
+
TextField,
|
|
14
|
+
Tooltip,
|
|
15
|
+
Typography
|
|
16
|
+
} from "@rebasepro/ui";
|
|
9
17
|
import {
|
|
10
18
|
CollectionGenerationCallback,
|
|
11
19
|
CollectionGenerationApiError,
|
|
@@ -5,8 +5,24 @@ import React, { useMemo, useState } from "react";
|
|
|
5
5
|
import { useAuthController, useCustomizationController } from "@rebasepro/core";
|
|
6
6
|
import { getFieldConfig, PropertyConfigBadge, SearchIconsView } from "../../_cms_internals";
|
|
7
7
|
import { EntityCollection, Property } from "@rebasepro/types";
|
|
8
|
-
import {
|
|
9
|
-
|
|
8
|
+
import {
|
|
9
|
+
BooleanSwitchWithLabel,
|
|
10
|
+
Button,
|
|
11
|
+
Chip,
|
|
12
|
+
cls,
|
|
13
|
+
Container,
|
|
14
|
+
DebouncedTextField,
|
|
15
|
+
Dialog,
|
|
16
|
+
HistoryIcon,
|
|
17
|
+
IconButton,
|
|
18
|
+
iconSize,
|
|
19
|
+
Select,
|
|
20
|
+
SelectItem,
|
|
21
|
+
TextField,
|
|
22
|
+
Tooltip,
|
|
23
|
+
Typography,
|
|
24
|
+
XIcon
|
|
25
|
+
} from "@rebasepro/ui";
|
|
10
26
|
|
|
11
27
|
import { Field, getIn, useFormex } from "@rebasepro/formex";
|
|
12
28
|
import { useCollectionEditorController } from "../../useCollectionEditorController";
|
|
@@ -5,16 +5,30 @@ import * as React from "react";
|
|
|
5
5
|
import { useEffect, useRef, useState } from "react";
|
|
6
6
|
import { ConfirmationDialog, ErrorView, useAuthController, useCustomizationController, useSnackbarController } from "@rebasepro/core";
|
|
7
7
|
import { CircularProgressCenter } from "@rebasepro/ui";
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
ArrowLeftIcon,
|
|
10
|
+
Button,
|
|
11
|
+
CheckIcon,
|
|
12
|
+
cls,
|
|
13
|
+
coolIconKeys,
|
|
14
|
+
defaultBorderMixin,
|
|
15
|
+
Dialog,
|
|
16
|
+
DialogActions,
|
|
17
|
+
DialogContent,
|
|
18
|
+
DialogTitle,
|
|
19
|
+
IconButton,
|
|
20
|
+
LoadingButton,
|
|
21
|
+
Tab,
|
|
22
|
+
Tabs,
|
|
23
|
+
Typography
|
|
24
|
+
} from "@rebasepro/ui";
|
|
9
25
|
import { Entity, EntityCollection, MapProperty, Properties, Property, PropertyConfig, User, getDataSourceCapabilities } from "@rebasepro/types";
|
|
10
26
|
import type { PostgresCollection } from "@rebasepro/types";
|
|
11
27
|
import { getSubcollections, isPropertyBuilder, removeInitialAndTrailingSlashes, getTableName } from "@rebasepro/common";
|
|
12
|
-
import { Button, cls, coolIconKeys, defaultBorderMixin, Dialog, DialogActions, DialogContent, DialogTitle, IconButton, LoadingButton, Tab, Tabs, Typography } from "@rebasepro/ui";
|
|
13
28
|
import { CollectionEditorSchema } from "./CollectionYupValidation";
|
|
14
29
|
import { GeneralSettingsForm } from "./GeneralSettingsForm";
|
|
15
30
|
import { DisplaySettingsForm } from "./DisplaySettingsForm";
|
|
16
31
|
import { CollectionPropertiesEditorForm } from "./CollectionPropertiesEditorForm";
|
|
17
|
-
import { CollectionRelationsTab } from "./CollectionRelationsTab";
|
|
18
32
|
import { CollectionsConfigController } from "../../types/config_controller";
|
|
19
33
|
import { CollectionEditorWelcomeView } from "./CollectionEditorWelcomeView";
|
|
20
34
|
import { CollectionInference } from "../../types/collection_inference";
|
|
@@ -148,7 +162,6 @@ type EditorView = "welcome"
|
|
|
148
162
|
| "properties"
|
|
149
163
|
| "loading"
|
|
150
164
|
| "extra_view"
|
|
151
|
-
| "relations"
|
|
152
165
|
| "rls";
|
|
153
166
|
|
|
154
167
|
export function CollectionEditor(props: CollectionEditorDialogProps & {
|
|
@@ -418,7 +431,7 @@ function CollectionEditorInternal<M extends Record<string, unknown>>({
|
|
|
418
431
|
if (success) {
|
|
419
432
|
aiModifiedPaths?.clearAllPaths();
|
|
420
433
|
formexController.resetForm({ values: newCollectionState });
|
|
421
|
-
handleClose(newCollectionState as
|
|
434
|
+
handleClose(newCollectionState as EntityCollection);
|
|
422
435
|
}
|
|
423
436
|
return;
|
|
424
437
|
}
|
|
@@ -456,7 +469,7 @@ function CollectionEditorInternal<M extends Record<string, unknown>>({
|
|
|
456
469
|
if (success) {
|
|
457
470
|
formexController.resetForm({ values: initialValues });
|
|
458
471
|
setNextMode();
|
|
459
|
-
handleClose(newCollectionState as
|
|
472
|
+
handleClose(newCollectionState as EntityCollection);
|
|
460
473
|
}
|
|
461
474
|
} else {
|
|
462
475
|
setNextMode();
|
|
@@ -475,7 +488,7 @@ function CollectionEditorInternal<M extends Record<string, unknown>>({
|
|
|
475
488
|
const validation = (col: EntityCollection<M>) => {
|
|
476
489
|
|
|
477
490
|
let errors: Record<string, string> = {};
|
|
478
|
-
const schema = (currentView === "properties" || currentView === "
|
|
491
|
+
const schema = (currentView === "properties" || currentView === "general") && CollectionEditorSchema;
|
|
479
492
|
if (schema) {
|
|
480
493
|
const result = schema.safeParse(col);
|
|
481
494
|
if (!result.success) {
|
|
@@ -548,8 +561,8 @@ function CollectionEditorInternal<M extends Record<string, unknown>>({
|
|
|
548
561
|
function onImportDataSet(data: object[], propertiesOrder?: string[]) {
|
|
549
562
|
importConfig.setInUse(true);
|
|
550
563
|
buildEntityPropertiesFromData(data, getInferenceType)
|
|
551
|
-
.then((properties:
|
|
552
|
-
const res = cleanPropertiesFromImport(properties as
|
|
564
|
+
.then((properties: any) => {
|
|
565
|
+
const res = cleanPropertiesFromImport(properties as Properties);
|
|
553
566
|
|
|
554
567
|
importConfig.setIdColumn(res.idColumn);
|
|
555
568
|
importConfig.setImportData(data);
|
|
@@ -629,9 +642,6 @@ function CollectionEditorInternal<M extends Record<string, unknown>>({
|
|
|
629
642
|
{getDataSourceCapabilities(values.driver).supportsRLS && <Tab value={"rls"}>
|
|
630
643
|
RLS
|
|
631
644
|
</Tab>}
|
|
632
|
-
{getDataSourceCapabilities(values.driver).supportsRelations && <Tab value={"relations"}>
|
|
633
|
-
Relations
|
|
634
|
-
</Tab>}
|
|
635
645
|
</Tabs>
|
|
636
646
|
</div>
|
|
637
647
|
<div className="flex items-center gap-4">
|
|
@@ -737,10 +747,6 @@ function CollectionEditorInternal<M extends Record<string, unknown>>({
|
|
|
737
747
|
<DisplaySettingsForm expandKanban={expandKanban}/>
|
|
738
748
|
}
|
|
739
749
|
|
|
740
|
-
{currentView === "relations" && getDataSourceCapabilities(values.driver).supportsRelations &&
|
|
741
|
-
<CollectionRelationsTab/>
|
|
742
|
-
}
|
|
743
|
-
|
|
744
750
|
{currentView === "rls" && getDataSourceCapabilities(values.driver).supportsRLS &&
|
|
745
751
|
<CollectionRLSTab/>
|
|
746
752
|
}
|
|
@@ -914,7 +920,7 @@ function applyPropertiesConfig(property: Property, propertyConfigs: Record<strin
|
|
|
914
920
|
if (propertyConfigs && internalProperty && typeof internalProperty === "object" && internalProperty.propertyConfig) {
|
|
915
921
|
const propertyConfig = propertyConfigs[internalProperty.propertyConfig];
|
|
916
922
|
if (propertyConfig && isPropertyBuilder(propertyConfig.property as Property)) {
|
|
917
|
-
internalProperty = propertyConfig.property as
|
|
923
|
+
internalProperty = propertyConfig.property as Property;
|
|
918
924
|
} else {
|
|
919
925
|
|
|
920
926
|
if (propertyConfig) {
|
|
@@ -3,8 +3,22 @@ import { AIIcon } from "@rebasepro/core";
|
|
|
3
3
|
import React, { useState } from "react";
|
|
4
4
|
;
|
|
5
5
|
import { EntityCollection } from "@rebasepro/types";
|
|
6
|
-
import {
|
|
7
|
-
|
|
6
|
+
import {
|
|
7
|
+
Button,
|
|
8
|
+
Card,
|
|
9
|
+
Chip,
|
|
10
|
+
cls,
|
|
11
|
+
CodeIcon,
|
|
12
|
+
Container,
|
|
13
|
+
FileIcon,
|
|
14
|
+
FileTextIcon,
|
|
15
|
+
iconSize,
|
|
16
|
+
ShoppingCartIcon,
|
|
17
|
+
TableIcon,
|
|
18
|
+
Tooltip,
|
|
19
|
+
Typography,
|
|
20
|
+
UserIcon
|
|
21
|
+
} from "@rebasepro/ui";
|
|
8
22
|
import { CollectionJsonImportDialog } from "./CollectionJsonImportDialog";
|
|
9
23
|
|
|
10
24
|
import { productsCollectionTemplate } from "./templates/products_template";
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
import React, { useCallback, useState } from "react";
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
Alert,
|
|
5
|
+
Button,
|
|
6
|
+
cls,
|
|
7
|
+
CodeIcon,
|
|
8
|
+
Dialog,
|
|
9
|
+
DialogActions,
|
|
10
|
+
DialogContent,
|
|
11
|
+
DialogTitle,
|
|
12
|
+
iconSize,
|
|
13
|
+
Typography
|
|
14
|
+
} from "@rebasepro/ui";
|
|
5
15
|
import { EntityCollection } from "@rebasepro/types";
|
|
6
16
|
import { validateCollectionJson, CollectionValidationError } from "../../validateCollectionJson";
|
|
7
17
|
|
|
@@ -112,13 +122,13 @@ export function CollectionJsonImportDialog({
|
|
|
112
122
|
/>
|
|
113
123
|
|
|
114
124
|
{errors.length > 0 && touched && (
|
|
115
|
-
<
|
|
116
|
-
<Typography variant="body2" className="font-medium
|
|
125
|
+
<Alert color="error">
|
|
126
|
+
<Typography variant="body2" className="font-medium mb-2">
|
|
117
127
|
Validation errors:
|
|
118
128
|
</Typography>
|
|
119
129
|
<ul className="list-disc list-inside space-y-1">
|
|
120
130
|
{errors.map((error, index) => (
|
|
121
|
-
<li key={index} className="text-sm
|
|
131
|
+
<li key={index} className="text-sm">
|
|
122
132
|
{error.path ? (
|
|
123
133
|
<>
|
|
124
134
|
<code className="bg-red-100 dark:bg-red-900/40 px-1 rounded">
|
|
@@ -132,15 +142,15 @@ export function CollectionJsonImportDialog({
|
|
|
132
142
|
</li>
|
|
133
143
|
))}
|
|
134
144
|
</ul>
|
|
135
|
-
</
|
|
145
|
+
</Alert>
|
|
136
146
|
)}
|
|
137
147
|
|
|
138
148
|
{isValid && (
|
|
139
|
-
<
|
|
140
|
-
<Typography variant="body2"
|
|
149
|
+
<Alert color="success">
|
|
150
|
+
<Typography variant="body2">
|
|
141
151
|
✓ JSON is valid and ready to import
|
|
142
152
|
</Typography>
|
|
143
|
-
</
|
|
153
|
+
</Alert>
|
|
144
154
|
)}
|
|
145
155
|
</DialogContent>
|
|
146
156
|
<DialogActions>
|
|
@@ -7,10 +7,21 @@ import {
|
|
|
7
7
|
useSnackbarController
|
|
8
8
|
} from "@rebasepro/core";
|
|
9
9
|
import { ErrorBoundary } from "@rebasepro/ui";
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
Button,
|
|
12
|
+
CircularProgress,
|
|
13
|
+
cls,
|
|
14
|
+
CodeIcon,
|
|
15
|
+
DebouncedTextField,
|
|
16
|
+
defaultBorderMixin,
|
|
17
|
+
FileSearchIcon,
|
|
18
|
+
IconButton,
|
|
19
|
+
PlusIcon,
|
|
20
|
+
Tooltip,
|
|
21
|
+
Typography
|
|
22
|
+
} from "@rebasepro/ui";
|
|
11
23
|
import { EntityCollection, MapProperty, Properties, Property, PropertyConfig, User } from "@rebasepro/types";
|
|
12
24
|
import { isPropertyBuilder } from "@rebasepro/common";
|
|
13
|
-
import { Button, CircularProgress, cls, DebouncedTextField, defaultBorderMixin, IconButton, Tooltip, Typography } from "@rebasepro/ui";
|
|
14
25
|
|
|
15
26
|
import { getFullId, idToPropertiesPath, namespaceToPropertiesOrderPath } from "./util";
|
|
16
27
|
import { OnPropertyChangedParams, PropertyForm, PropertyFormDialog } from "./PropertyEditView";
|
|
@@ -13,8 +13,30 @@ function sanitizeSqlIdentifier(name: string): string {
|
|
|
13
13
|
}
|
|
14
14
|
return `"${name}"`;
|
|
15
15
|
}
|
|
16
|
-
import {
|
|
17
|
-
|
|
16
|
+
import {
|
|
17
|
+
Button,
|
|
18
|
+
Chip,
|
|
19
|
+
CircularProgress,
|
|
20
|
+
cls,
|
|
21
|
+
Container,
|
|
22
|
+
defaultBorderMixin,
|
|
23
|
+
Dialog,
|
|
24
|
+
DialogActions,
|
|
25
|
+
DialogContent,
|
|
26
|
+
DialogTitle,
|
|
27
|
+
IconButton,
|
|
28
|
+
iconSize,
|
|
29
|
+
KeyIcon,
|
|
30
|
+
MultiSelect,
|
|
31
|
+
MultiSelectItem,
|
|
32
|
+
Paper,
|
|
33
|
+
Select,
|
|
34
|
+
SelectItem,
|
|
35
|
+
TextField,
|
|
36
|
+
Tooltip,
|
|
37
|
+
Trash2Icon,
|
|
38
|
+
Typography
|
|
39
|
+
} from "@rebasepro/ui";
|
|
18
40
|
import { useFormex } from "@rebasepro/formex";
|
|
19
41
|
import { useRebaseContext } from "@rebasepro/core";
|
|
20
42
|
|
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
|
|
2
2
|
import React, { useState } from "react";
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
Button,
|
|
5
|
+
cls,
|
|
6
|
+
Container,
|
|
7
|
+
defaultBorderMixin,
|
|
8
|
+
Dialog,
|
|
9
|
+
DialogActions,
|
|
10
|
+
DialogContent,
|
|
11
|
+
DialogTitle,
|
|
12
|
+
IconButton,
|
|
13
|
+
Select,
|
|
14
|
+
SelectItem,
|
|
15
|
+
Table,
|
|
16
|
+
TableBody,
|
|
17
|
+
TableCell,
|
|
18
|
+
TableHeader,
|
|
19
|
+
TableRow,
|
|
20
|
+
TextField,
|
|
21
|
+
Trash2Icon,
|
|
22
|
+
Typography
|
|
23
|
+
} from "@rebasepro/ui";
|
|
5
24
|
import { useFormex } from "@rebasepro/formex";
|
|
6
25
|
import { PostgresCollection, Relation } from "@rebasepro/types";
|
|
7
26
|
import { useCollectionsConfigController } from "../../useCollectionsConfigController";
|
|
@@ -148,7 +167,7 @@ relationName: e.target.value } : null)}
|
|
|
148
167
|
const targetFn = () => collections?.find(c => c.slug === val) || { slug: val };
|
|
149
168
|
(targetFn as { slug?: string }).slug = val;
|
|
150
169
|
return { ...prev,
|
|
151
|
-
target: targetFn as
|
|
170
|
+
target: targetFn as Relation["target"] };
|
|
152
171
|
});
|
|
153
172
|
}}
|
|
154
173
|
>
|
|
@@ -3,8 +3,7 @@ import { useUnsavedChangesDialog, UnsavedChangesDialog } from "@rebasepro/core";
|
|
|
3
3
|
import { useUrlController } from "../../_cms_internals";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { useState, useMemo, useEffect } from "react";
|
|
6
|
-
import {
|
|
7
|
-
import { PlusIcon } from "lucide-react";
|
|
6
|
+
import { Button, PlusIcon, Typography } from "@rebasepro/ui";
|
|
8
7
|
import { useSnackbarController } from "@rebasepro/core";
|
|
9
8
|
import { CollectionEditorDialogProps } from "./CollectionEditorDialog";
|
|
10
9
|
import { AIModifiedPathsProvider } from "./AIModifiedPathsContext";
|
|
@@ -4,8 +4,17 @@ import { IconForView } from "@rebasepro/core";
|
|
|
4
4
|
import { useUrlController } from "../../_cms_internals";
|
|
5
5
|
import React, { useState, useEffect } from "react";
|
|
6
6
|
import { useLocation, useNavigate } from "react-router-dom";
|
|
7
|
-
import {
|
|
8
|
-
|
|
7
|
+
import {
|
|
8
|
+
Button,
|
|
9
|
+
cls,
|
|
10
|
+
defaultBorderMixin,
|
|
11
|
+
IconButton,
|
|
12
|
+
iconSize,
|
|
13
|
+
PlusIcon,
|
|
14
|
+
ResizablePanels,
|
|
15
|
+
Tooltip,
|
|
16
|
+
Typography
|
|
17
|
+
} from "@rebasepro/ui";
|
|
9
18
|
;
|
|
10
19
|
import { CollectionsConfigController } from "../../types/config_controller";
|
|
11
20
|
import { CollectionStudioView } from "./CollectionStudioView";
|