@rebasepro/cms 0.17.3 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/{CollectionEditorDialog-B-akreOU.js → CollectionEditorDialog-BeX4b92r.js} +13 -7
- package/dist/{CollectionEditorDialog-B-akreOU.js.map → CollectionEditorDialog-BeX4b92r.js.map} +1 -1
- package/dist/{PropertyEditView-CiY84wkR.js → PropertyEditView-C7thfj4L.js} +3 -3
- package/dist/{PropertyEditView-CiY84wkR.js.map → PropertyEditView-C7thfj4L.js.map} +1 -1
- package/dist/{RouterCollectionsStudioView-DkAWda4N.js → RouterCollectionsStudioView-BtjzvB6E.js} +4 -4
- package/dist/{RouterCollectionsStudioView-DkAWda4N.js.map → RouterCollectionsStudioView-BtjzvB6E.js.map} +1 -1
- package/dist/{SchemaChangeDialog-DceT8QFX.js → SchemaChangeDialog-CkqK6KOC.js} +4 -2
- package/dist/{SchemaChangeDialog-DceT8QFX.js.map → SchemaChangeDialog-CkqK6KOC.js.map} +1 -1
- package/dist/collection_editor/api/generateCollectionApi.d.ts +1 -2
- package/dist/collection_editor_ui.d.ts +2 -0
- package/dist/collection_editor_ui.js +6 -5
- package/dist/collection_editor_ui.js.map +1 -1
- package/dist/components/DeleteEntityDialog.d.ts +2 -3
- package/dist/components/RebaseLayout.d.ts +11 -4
- package/dist/components/field_configs.d.ts +1 -1
- package/dist/editor/sanitize-html.d.ts +15 -0
- package/dist/editor.js +195 -10
- package/dist/editor.js.map +1 -1
- package/dist/{export-Ben8E355.js → export--arni_VY.js} +2 -2
- package/dist/{export-Ben8E355.js.map → export--arni_VY.js.map} +1 -1
- package/dist/form/components/LabelWithIcon.d.ts +10 -0
- package/dist/{history-DIEVd26f.js → history-C2TpoQwi.js} +2 -2
- package/dist/{history-DIEVd26f.js.map → history-C2TpoQwi.js.map} +1 -1
- package/dist/hooks/navigation/useBuildNavigationStateController.d.ts +1 -1
- package/dist/hooks/navigation/useResolvedViews.d.ts +1 -1
- package/dist/hooks/navigation/useTopLevelNavigation.d.ts +1 -1
- package/dist/{import-D25x7ko-.js → import-DTkXNoBg.js} +2 -2
- package/dist/{import-D25x7ko-.js.map → import-DTkXNoBg.js.map} +1 -1
- package/dist/index.js +78 -33
- package/dist/index.js.map +1 -1
- package/dist/util/propertyConfigMapper.d.ts +1 -1
- package/dist/util-CfLFggP7.js +57 -0
- package/dist/util-CfLFggP7.js.map +1 -0
- package/dist/{util-DVqnqlLn.js → util-DE1WQW6h.js} +134 -112
- package/dist/util-DE1WQW6h.js.map +1 -0
- package/package.json +42 -34
- package/dist/util-DVqnqlLn.js.map +0 -1
- package/src/collection_editor/CollectionEditorDialogsContext.tsx +0 -25
- package/src/collection_editor/ConfigControllerProvider.tsx +0 -395
- package/src/collection_editor/_cms_internals.ts +0 -41
- package/src/collection_editor/api/generateCollectionApi.ts +0 -126
- package/src/collection_editor/api/index.ts +0 -1
- package/src/collection_editor/extensibility_types.ts +0 -168
- package/src/collection_editor/index.ts +0 -108
- package/src/collection_editor/liveSchemaClient.ts +0 -285
- package/src/collection_editor/relation_kinds.ts +0 -44
- package/src/collection_editor/serializable_types.ts +0 -535
- package/src/collection_editor/serializable_utils.ts +0 -729
- package/src/collection_editor/types/collection_editor_controller.tsx +0 -62
- package/src/collection_editor/types/collection_inference.ts +0 -18
- package/src/collection_editor/types/config_controller.tsx +0 -121
- package/src/collection_editor/ui/AddKanbanColumnAction.tsx +0 -199
- package/src/collection_editor/ui/CollectionViewHeaderAction.tsx +0 -51
- package/src/collection_editor/ui/EditorCollectionAction.tsx +0 -54
- package/src/collection_editor/ui/EditorCollectionActionStart.tsx +0 -90
- package/src/collection_editor/ui/EditorEntityAction.tsx +0 -50
- package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +0 -114
- package/src/collection_editor/ui/KanbanSetupAction.tsx +0 -43
- package/src/collection_editor/ui/MissingReferenceWidget.tsx +0 -35
- package/src/collection_editor/ui/NewCollectionButton.tsx +0 -27
- package/src/collection_editor/ui/NewCollectionCard.tsx +0 -48
- package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +0 -49
- package/src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.tsx +0 -260
- package/src/collection_editor/ui/collection_editor/AIModifiedPathsContext.tsx +0 -90
- package/src/collection_editor/ui/collection_editor/CollectionDetailsForm.tsx +0 -388
- package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +0 -1098
- package/src/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.tsx +0 -301
- package/src/collection_editor/ui/collection_editor/CollectionJsonImportDialog.tsx +0 -172
- package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +0 -620
- package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +0 -530
- package/src/collection_editor/ui/collection_editor/CollectionRelationsTab.tsx +0 -462
- package/src/collection_editor/ui/collection_editor/CollectionStudioView.tsx +0 -104
- package/src/collection_editor/ui/collection_editor/CollectionYupValidation.tsx +0 -9
- package/src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx +0 -199
- package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +0 -315
- package/src/collection_editor/ui/collection_editor/EntityActionsEditTab.tsx +0 -164
- package/src/collection_editor/ui/collection_editor/EntityActionsSelectDialog.tsx +0 -40
- package/src/collection_editor/ui/collection_editor/EntityCustomViewsSelectDialog.tsx +0 -39
- package/src/collection_editor/ui/collection_editor/EnumForm.tsx +0 -373
- package/src/collection_editor/ui/collection_editor/GeneralSettingsForm.tsx +0 -288
- package/src/collection_editor/ui/collection_editor/GetCodeDialog.tsx +0 -141
- package/src/collection_editor/ui/collection_editor/KanbanConfigSection.tsx +0 -194
- package/src/collection_editor/ui/collection_editor/LayoutModeSwitch.tsx +0 -53
- package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +0 -980
- package/src/collection_editor/ui/collection_editor/PropertyFieldPreview.tsx +0 -164
- package/src/collection_editor/ui/collection_editor/PropertyTree.tsx +0 -364
- package/src/collection_editor/ui/collection_editor/RouterCollectionStudioView.tsx +0 -44
- package/src/collection_editor/ui/collection_editor/RouterCollectionsStudioView.tsx +0 -41
- package/src/collection_editor/ui/collection_editor/SchemaChangeDialog.tsx +0 -470
- package/src/collection_editor/ui/collection_editor/SubcollectionsEditTab.tsx +0 -256
- package/src/collection_editor/ui/collection_editor/SwitchControl.tsx +0 -39
- package/src/collection_editor/ui/collection_editor/ViewModeSwitch.tsx +0 -68
- package/src/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.tsx +0 -67
- package/src/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.tsx +0 -296
- package/src/collection_editor/ui/collection_editor/import/clean_import_data.ts +0 -57
- package/src/collection_editor/ui/collection_editor/properties/BlockPropertyField.tsx +0 -147
- package/src/collection_editor/ui/collection_editor/properties/BooleanPropertyField.tsx +0 -41
- package/src/collection_editor/ui/collection_editor/properties/CommonPropertyFields.tsx +0 -113
- package/src/collection_editor/ui/collection_editor/properties/DateTimePropertyField.tsx +0 -250
- package/src/collection_editor/ui/collection_editor/properties/EnumPropertyField.tsx +0 -126
- package/src/collection_editor/ui/collection_editor/properties/KeyValuePropertyField.tsx +0 -20
- package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +0 -153
- package/src/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.tsx +0 -217
- package/src/collection_editor/ui/collection_editor/properties/NumberPropertyField.tsx +0 -117
- package/src/collection_editor/ui/collection_editor/properties/ReferencePropertyField.tsx +0 -129
- package/src/collection_editor/ui/collection_editor/properties/RelationPropertyField.tsx +0 -335
- package/src/collection_editor/ui/collection_editor/properties/RepeatPropertyField.tsx +0 -107
- package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +0 -403
- package/src/collection_editor/ui/collection_editor/properties/StringPropertyField.tsx +0 -148
- package/src/collection_editor/ui/collection_editor/properties/UrlPropertyField.tsx +0 -91
- package/src/collection_editor/ui/collection_editor/properties/VectorPropertyField.tsx +0 -34
- package/src/collection_editor/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.tsx +0 -49
- package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsEditor.tsx +0 -925
- package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsPanel.tsx +0 -28
- package/src/collection_editor/ui/collection_editor/properties/conditions/EnumConditionsEditor.tsx +0 -626
- package/src/collection_editor/ui/collection_editor/properties/conditions/index.ts +0 -6
- package/src/collection_editor/ui/collection_editor/properties/conditions/property_paths.ts +0 -93
- package/src/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.tsx +0 -52
- package/src/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.tsx +0 -63
- package/src/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.tsx +0 -114
- package/src/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.tsx +0 -154
- package/src/collection_editor/ui/collection_editor/properties/validation/ValidationPanel.tsx +0 -28
- package/src/collection_editor/ui/collection_editor/templates/blog_template.ts +0 -112
- package/src/collection_editor/ui/collection_editor/templates/pages_template.ts +0 -183
- package/src/collection_editor/ui/collection_editor/templates/products_template.ts +0 -88
- package/src/collection_editor/ui/collection_editor/templates/users_template.ts +0 -42
- package/src/collection_editor/ui/collection_editor/util.ts +0 -28
- package/src/collection_editor/ui/collection_editor/utils/strings.ts +0 -1
- package/src/collection_editor/ui/collection_editor/utils/supported_fields.tsx +0 -39
- package/src/collection_editor/ui/collection_editor/utils/update_property_for_widget.ts +0 -276
- package/src/collection_editor/useCollectionEditorController.tsx +0 -9
- package/src/collection_editor/useCollectionsConfigController.tsx +0 -9
- package/src/collection_editor/useJsonCollectionsConfigController.tsx +0 -297
- package/src/collection_editor/useLiveSchemaEditing.tsx +0 -315
- package/src/collection_editor/useLocalCollectionsConfigController.tsx +0 -341
- package/src/collection_editor/useSafeSnackbarController.ts +0 -9
- package/src/collection_editor/validateCollectionJson.ts +0 -440
- package/src/collection_editor_ui.ts +0 -21
- package/src/components/AdditionalFieldValue.tsx +0 -68
- package/src/components/AdminModeSyncer.tsx +0 -56
- package/src/components/ArrayContainer.tsx +0 -542
- package/src/components/ClearFilterSortButton.tsx +0 -56
- package/src/components/CollectionEditorDialogs.tsx +0 -69
- package/src/components/CollectionPanel.tsx +0 -179
- package/src/components/CollectionTableBinding/CollectionRowActions.tsx +0 -244
- package/src/components/CollectionTableBinding/CollectionTableBinding.tsx +0 -394
- package/src/components/CollectionTableBinding/CollectionTableBindingProps.tsx +0 -172
- package/src/components/CollectionTableBinding/PropertyTableCell.tsx +0 -350
- package/src/components/CollectionTableBinding/column_utils.tsx +0 -155
- package/src/components/CollectionTableBinding/fields/TableMultipleRelationField.tsx +0 -131
- package/src/components/CollectionTableBinding/fields/TableReferenceField.tsx +0 -193
- package/src/components/CollectionTableBinding/fields/TableRelationField.tsx +0 -192
- package/src/components/CollectionTableBinding/fields/TableRelationSelectorField.tsx +0 -42
- package/src/components/CollectionTableBinding/fields/TableStorageUpload.tsx +0 -324
- package/src/components/CollectionTableBinding/fields/VirtualTableSelect.tsx +0 -132
- package/src/components/CollectionTableBinding/fields/VirtualTableUserSelect.tsx +0 -41
- package/src/components/CollectionTableBinding/index.tsx +0 -14
- package/src/components/CollectionTableBinding/internal/CollectionTableToolbar.tsx +0 -96
- package/src/components/CollectionTableBinding/internal/EntityTableCell.tsx +0 -309
- package/src/components/CollectionTableBinding/internal/EntityTableCellActions.tsx +0 -80
- package/src/components/CollectionTableBinding/internal/common.tsx +0 -74
- package/src/components/CollectionTableBinding/internal/popup_field/PopupFormField.tsx +0 -422
- package/src/components/CollectionTableBinding/internal/popup_field/useDraggable.tsx +0 -99
- package/src/components/CollectionTableBinding/internal/popup_field/useWindowSize.tsx +0 -22
- package/src/components/CollectionTableBinding/table_bindings.tsx +0 -350
- package/src/components/CollectionViewBinding/BoardCardBinding.tsx +0 -263
- package/src/components/CollectionViewBinding/CollectionBoardViewBinding.tsx +0 -662
- package/src/components/CollectionViewBinding/CollectionCardViewBinding.tsx +0 -159
- package/src/components/CollectionViewBinding/CollectionListViewBinding.tsx +0 -1430
- package/src/components/CollectionViewBinding/CollectionViewActions.tsx +0 -227
- package/src/components/CollectionViewBinding/CollectionViewBinding.tsx +0 -1603
- package/src/components/CollectionViewBinding/CollectionViewStartActions.tsx +0 -240
- package/src/components/CollectionViewBinding/EntityCardBinding.tsx +0 -239
- package/src/components/CollectionViewBinding/FilterPresetsButton.tsx +0 -298
- package/src/components/CollectionViewBinding/FiltersDialog.tsx +0 -218
- package/src/components/CollectionViewBinding/SearchExplanation.tsx +0 -106
- package/src/components/CollectionViewBinding/SearchHighlight.tsx +0 -311
- package/src/components/CollectionViewBinding/SlotValue.tsx +0 -156
- package/src/components/CollectionViewBinding/SortButton.tsx +0 -354
- package/src/components/CollectionViewBinding/SplitListCloseButton.tsx +0 -49
- package/src/components/CollectionViewBinding/SplitListShowButton.tsx +0 -28
- package/src/components/CollectionViewBinding/SplitListView.tsx +0 -488
- package/src/components/CollectionViewBinding/SplitViewContext.tsx +0 -34
- package/src/components/CollectionViewBinding/ViewModeToggle.tsx +0 -250
- package/src/components/CollectionViewBinding/hooks/useCollectionInlineEditor.ts +0 -81
- package/src/components/CollectionViewBinding/hooks/useKanbanDragAndDrop.ts +0 -181
- package/src/components/CollectionViewBinding/useBoardDataController.tsx +0 -802
- package/src/components/CollectionViewBinding/usePreviewSlots.ts +0 -703
- package/src/components/CollectionViewBinding/useSelectionController.tsx +0 -40
- package/src/components/CollectionViewBinding/utils.ts +0 -22
- package/src/components/DefaultAppBar.tsx +0 -264
- package/src/components/DefaultDrawer.tsx +0 -593
- package/src/components/DeleteEntityDialog.tsx +0 -205
- package/src/components/DetailViewBinding.tsx +0 -731
- package/src/components/DrawerNavigationGroup.tsx +0 -141
- package/src/components/DrawerNavigationItem.tsx +0 -115
- package/src/components/EditFormActions.tsx +0 -303
- package/src/components/EditViewBinding.tsx +0 -1069
- package/src/components/EntityDisplayHeader.tsx +0 -170
- package/src/components/EntityIdentityBar.tsx +0 -428
- package/src/components/EntityInspector.tsx +0 -156
- package/src/components/EntityPreviewBinding.tsx +0 -432
- package/src/components/EntityPreviewNesting.tsx +0 -50
- package/src/components/EntityViewBinding.tsx +0 -374
- package/src/components/FieldCaption.tsx +0 -14
- package/src/components/HomePage/ContentHomePage.tsx +0 -586
- package/src/components/HomePage/FavouritesView.tsx +0 -60
- package/src/components/HomePage/HomePageDnD.tsx +0 -704
- package/src/components/HomePage/NavigationCard.tsx +0 -81
- package/src/components/HomePage/NavigationCardBinding.tsx +0 -107
- package/src/components/HomePage/NavigationGroup.tsx +0 -156
- package/src/components/HomePage/RenameGroupDialog.tsx +0 -123
- package/src/components/HomePage/SmallNavigationCard.tsx +0 -41
- package/src/components/HomePage/index.tsx +0 -5
- package/src/components/InlineEntityPreview.tsx +0 -149
- package/src/components/JsonPreviewBinding.tsx +0 -66
- package/src/components/PropertyCollectionView.tsx +0 -336
- package/src/components/PropertyConfigBadge.tsx +0 -28
- package/src/components/PropertyIdCopyTooltip.tsx +0 -47
- package/src/components/RebaseAuthGate.tsx +0 -44
- package/src/components/RebaseCMS.tsx +0 -30
- package/src/components/RebaseLayout.tsx +0 -80
- package/src/components/RebaseNavigation.tsx +0 -369
- package/src/components/RebaseRouteDefs.tsx +0 -127
- package/src/components/RebaseShell.tsx +0 -83
- package/src/components/ReferenceTable/SelectionTableBinding.tsx +0 -389
- package/src/components/ReferenceWidget.tsx +0 -156
- package/src/components/RelationSelector.tsx +0 -926
- package/src/components/SearchIconsView.tsx +0 -78
- package/src/components/SelectableTable/SelectableTable.tsx +0 -309
- package/src/components/SelectableTable/SelectableTableContext.tsx +0 -7
- package/src/components/SelectableTable/SelectionStore.ts +0 -43
- package/src/components/SelectableTable/filters/BooleanFilterField.tsx +0 -59
- package/src/components/SelectableTable/filters/DateTimeFilterField.tsx +0 -146
- package/src/components/SelectableTable/filters/FilterFieldBinding.tsx +0 -190
- package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +0 -250
- package/src/components/SelectableTable/filters/RelationFilterField.tsx +0 -238
- package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +0 -282
- package/src/components/SelectableTable/filters/null_filter.ts +0 -63
- package/src/components/SideDialogs.tsx +0 -238
- package/src/components/SidePanelBinding.tsx +0 -361
- package/src/components/SidePanelProvider.tsx +0 -80
- package/src/components/UserSelector.tsx +0 -513
- package/src/components/admin/CreationResultDialog.tsx +0 -138
- package/src/components/admin/index.ts +0 -1
- package/src/components/app/AppBar.tsx +0 -17
- package/src/components/app/Drawer.tsx +0 -38
- package/src/components/app/Scaffold.tsx +0 -366
- package/src/components/app/index.ts +0 -4
- package/src/components/app/useApp.tsx +0 -36
- package/src/components/common/default_entity_actions.tsx +0 -440
- package/src/components/common/index.ts +0 -1
- package/src/components/field_configs.tsx +0 -506
- package/src/components/history/EntityHistoryEntry.tsx +0 -203
- package/src/components/history/EntityHistoryView.tsx +0 -206
- package/src/components/history/LastEditedByFormAction.tsx +0 -24
- package/src/components/history/LastEditedByIndicator.tsx +0 -95
- package/src/components/history/UserChip.tsx +0 -15
- package/src/components/history/index.tsx +0 -5
- package/src/components/index.ts +0 -63
- package/src/contexts/BreacrumbsContext.tsx +0 -45
- package/src/contexts/SideDialogsControllerContext.tsx +0 -5
- package/src/contexts/SidePanelControllerContext.tsx +0 -5
- package/src/data_export/export/BasicExportAction.tsx +0 -142
- package/src/data_export/export/ExportCollectionAction.tsx +0 -321
- package/src/data_export/export/export.ts +0 -295
- package/src/data_export/export/fetch_export_data.ts +0 -90
- package/src/data_export/export/index.ts +0 -4
- package/src/data_export/index.ts +0 -1
- package/src/data_import/components/DataNewPropertiesMapping.tsx +0 -261
- package/src/data_import/components/ImportFileUpload.tsx +0 -42
- package/src/data_import/components/ImportNewPropertyFieldPreview.tsx +0 -58
- package/src/data_import/components/ImportSaveInProgress.tsx +0 -121
- package/src/data_import/components/index.ts +0 -4
- package/src/data_import/hooks/index.ts +0 -1
- package/src/data_import/hooks/useImportConfig.tsx +0 -34
- package/src/data_import/import/ImportCollectionAction.tsx +0 -461
- package/src/data_import/import/index.ts +0 -1
- package/src/data_import/index.ts +0 -5
- package/src/data_import/types/column_mapping.ts +0 -32
- package/src/data_import/types/index.ts +0 -1
- package/src/data_import/utils/csv.ts +0 -153
- package/src/data_import/utils/data.ts +0 -181
- package/src/data_import/utils/file_headers.ts +0 -14
- package/src/data_import/utils/file_to_json.ts +0 -149
- package/src/data_import/utils/get_import_inference_type.ts +0 -33
- package/src/data_import/utils/get_properties_mapping.ts +0 -67
- package/src/data_import/utils/index.ts +0 -5
- package/src/data_import/utils/save_entities.ts +0 -138
- package/src/data_import/utils/transforms.ts +0 -70
- package/src/editor/components/SlashCommandMenu.tsx +0 -532
- package/src/editor/components/editor-bubble-item.tsx +0 -32
- package/src/editor/components/editor-bubble.tsx +0 -143
- package/src/editor/components/image-bubble.tsx +0 -183
- package/src/editor/components/index.ts +0 -14
- package/src/editor/components/table-bubble.tsx +0 -233
- package/src/editor/editor.tsx +0 -529
- package/src/editor/extensions/HighlightDecorationExtension.ts +0 -115
- package/src/editor/extensions/Image.ts +0 -159
- package/src/editor/extensions/TextLoadingDecorationExtension.tsx +0 -107
- package/src/editor/extensions/clipboard.ts +0 -72
- package/src/editor/extensions/custom-keymap.ts +0 -25
- package/src/editor/extensions/drag-and-drop.tsx +0 -508
- package/src/editor/hooks/useProseMirror.ts +0 -126
- package/src/editor/hooks/useProseMirrorContext.ts +0 -15
- package/src/editor/index.ts +0 -2
- package/src/editor/markdown-it-plugins.d.ts +0 -24
- package/src/editor/markdown.ts +0 -204
- package/src/editor/nodeViews/ImageComponent.tsx +0 -20
- package/src/editor/nodeViews/ReactNodeView.tsx +0 -89
- package/src/editor/nodeViews/TaskItemComponent.tsx +0 -30
- package/src/editor/nodeViews/index.ts +0 -35
- package/src/editor/plugins/index.ts +0 -58
- package/src/editor/plugins/inputrules.ts +0 -82
- package/src/editor/plugins/placeholderPlugin.ts +0 -55
- package/src/editor/plugins/slashCommandPlugin.ts +0 -65
- package/src/editor/schema.ts +0 -339
- package/src/editor/selectors/ai-selector.tsx +0 -110
- package/src/editor/selectors/color-selector.tsx +0 -199
- package/src/editor/selectors/link-selector.tsx +0 -122
- package/src/editor/selectors/node-selector.tsx +0 -159
- package/src/editor/selectors/text-buttons.tsx +0 -79
- package/src/editor/types.ts +0 -6
- package/src/editor/useProseMirror.ts +0 -125
- package/src/editor/utils/prosemirror-utils.ts +0 -113
- package/src/editor/utils/remove_classes.ts +0 -18
- package/src/editor/utils/useDebouncedCallback.ts +0 -25
- package/src/form/EntityForm.tsx +0 -761
- package/src/form/EntityFormActions.tsx +0 -160
- package/src/form/EntityFormBinding.tsx +0 -342
- package/src/form/PropertyFieldBinding.tsx +0 -348
- package/src/form/components/ErrorFocus.tsx +0 -44
- package/src/form/components/FieldBlock.tsx +0 -189
- package/src/form/components/FieldHelperText.tsx +0 -84
- package/src/form/components/FormRail.tsx +0 -153
- package/src/form/components/FormSections.tsx +0 -145
- package/src/form/components/LabelWithIcon.tsx +0 -43
- package/src/form/components/LabelWithIconAndTooltip.tsx +0 -28
- package/src/form/components/LocalChangesMenu.tsx +0 -147
- package/src/form/components/StorageItemPreview.tsx +0 -81
- package/src/form/components/StorageUploadProgress.tsx +0 -118
- package/src/form/components/index.tsx +0 -6
- package/src/form/components/useRailVisible.tsx +0 -47
- package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +0 -109
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +0 -172
- package/src/form/field_bindings/BinaryFieldBinding.tsx +0 -177
- package/src/form/field_bindings/BlockFieldBinding.tsx +0 -282
- package/src/form/field_bindings/DateTimeFieldBinding.tsx +0 -78
- package/src/form/field_bindings/GeopointFieldBinding.tsx +0 -200
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +0 -574
- package/src/form/field_bindings/MapFieldBinding.tsx +0 -120
- package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +0 -259
- package/src/form/field_bindings/MultiSelectFieldBinding.tsx +0 -130
- package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +0 -168
- package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +0 -94
- package/src/form/field_bindings/ReferenceFieldBinding.tsx +0 -146
- package/src/form/field_bindings/RelationFieldBinding.tsx +0 -202
- package/src/form/field_bindings/RepeatFieldBinding.tsx +0 -143
- package/src/form/field_bindings/SelectFieldBinding.tsx +0 -111
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +0 -521
- package/src/form/field_bindings/SwitchFieldBinding.tsx +0 -70
- package/src/form/field_bindings/TextFieldBinding.tsx +0 -189
- package/src/form/field_bindings/UserSelectFieldBinding.tsx +0 -71
- package/src/form/field_bindings/VectorFieldBinding.tsx +0 -209
- package/src/form/form_utils.ts +0 -243
- package/src/form/index.tsx +0 -36
- package/src/form/useClearRestoreValue.tsx +0 -36
- package/src/form/useUndoableDiscard.ts +0 -39
- package/src/form/validation.ts +0 -583
- package/src/hooks/index.ts +0 -16
- package/src/hooks/navigation/contexts/CollectionRegistryContext.tsx +0 -22
- package/src/hooks/navigation/contexts/NavigationStateContext.tsx +0 -16
- package/src/hooks/navigation/contexts/UrlContext.tsx +0 -24
- package/src/hooks/navigation/contexts/index.ts +0 -14
- package/src/hooks/navigation/useAsyncResolver.ts +0 -100
- package/src/hooks/navigation/useBuildCollectionRegistryController.tsx +0 -218
- package/src/hooks/navigation/useBuildNavigationStateController.tsx +0 -134
- package/src/hooks/navigation/useBuildUrlController.tsx +0 -66
- package/src/hooks/navigation/useNavigationResolution.ts +0 -271
- package/src/hooks/navigation/useResolvedCollections.ts +0 -102
- package/src/hooks/navigation/useResolvedViews.tsx +0 -139
- package/src/hooks/navigation/useTopLevelNavigation.ts +0 -273
- package/src/hooks/navigation/utils.ts +0 -200
- package/src/hooks/useAdminContext.tsx +0 -83
- package/src/hooks/useBreadcrumbsController.tsx +0 -17
- package/src/hooks/useBuildSideDialogsController.tsx +0 -145
- package/src/hooks/useBuildSidePanel.tsx +0 -315
- package/src/hooks/useChildViewSource.ts +0 -46
- package/src/hooks/useEntityDisplay.tsx +0 -262
- package/src/hooks/useEntityDisplayTitle.tsx +0 -49
- package/src/hooks/useHistory.ts +0 -178
- package/src/hooks/useRecordActions.tsx +0 -69
- package/src/hooks/useResolvedNavigationFrom.tsx +0 -167
- package/src/hooks/useResolvedUsers.ts +0 -148
- package/src/hooks/useSelectionDialog.tsx +0 -58
- package/src/hooks/useSideDialogsController.tsx +0 -25
- package/src/hooks/useSidePanel.tsx +0 -13
- package/src/index.ts +0 -124
- package/src/preview/PropertyPreview.tsx +0 -331
- package/src/preview/compact_text.ts +0 -68
- package/src/preview/components/ArrayEnumPreview.tsx +0 -39
- package/src/preview/components/BooleanPreview.tsx +0 -28
- package/src/preview/components/DatePreview.tsx +0 -106
- package/src/preview/components/EmptyValue.tsx +0 -10
- package/src/preview/components/EnumValuesChip.tsx +0 -39
- package/src/preview/components/ImagePreview.tsx +0 -144
- package/src/preview/components/InlineEntityListPreview.tsx +0 -42
- package/src/preview/components/ReferencePreview.tsx +0 -235
- package/src/preview/components/RelationPreview.tsx +0 -271
- package/src/preview/components/StorageThumbnail.tsx +0 -147
- package/src/preview/components/UrlComponentPreview.tsx +0 -116
- package/src/preview/components/UserPreview.tsx +0 -30
- package/src/preview/components/date_fns_locales.ts +0 -125
- package/src/preview/index.ts +0 -26
- package/src/preview/property_previews/ArrayOfMapsPreview.tsx +0 -73
- package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +0 -67
- package/src/preview/property_previews/ArrayOfRelationsPreview.tsx +0 -77
- package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +0 -49
- package/src/preview/property_previews/ArrayOfStringsPreview.tsx +0 -70
- package/src/preview/property_previews/ArrayOneOfPreview.tsx +0 -79
- package/src/preview/property_previews/ArrayPropertyEnumPreview.tsx +0 -35
- package/src/preview/property_previews/ArrayPropertyPreview.tsx +0 -79
- package/src/preview/property_previews/MapPropertyPreview.tsx +0 -198
- package/src/preview/property_previews/NumberPropertyPreview.tsx +0 -39
- package/src/preview/property_previews/SkeletonPropertyComponent.tsx +0 -276
- package/src/preview/property_previews/StringPropertyPreview.tsx +0 -70
- package/src/preview/util.ts +0 -39
- package/src/routes/CustomViewRoute.tsx +0 -33
- package/src/routes/RebaseRoute.tsx +0 -467
- package/src/routes/index.ts +0 -2
- package/src/types/components/EntityFormActionsProps.tsx +0 -20
- package/src/types/components/EntityFormProps.tsx +0 -119
- package/src/types/components/PropertyPreviewProps.tsx +0 -85
- package/src/types/components/formex.tsx +0 -2
- package/src/types/components/index.ts +0 -3
- package/src/types/fields.tsx +0 -340
- package/src/types/index.ts +0 -4
- package/src/util/dataControllerAdapter.ts +0 -88
- package/src/util/entity_actions.ts +0 -28
- package/src/util/index.ts +0 -5
- package/src/util/navigation_utils.ts +0 -89
- package/src/util/number_format.ts +0 -46
- package/src/util/previews.ts +0 -131
- package/src/util/propertyConfigMapper.ts +0 -134
- package/src/util/property_utils.tsx +0 -236
- package/src/util/resolutions.ts +0 -96
- package/src/util/view_constants.ts +0 -33
- package/src/util/view_mode.ts +0 -176
package/dist/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { $n as getEntityTitlePropertyKeyForEntity, $t as getCollectionBySlugWithin, A as getFieldId, An as NumberPropertyPreview, At as convertDataToEntity, B as MapFieldBinding, Bn as RelationPreview, Bt as detectCsvDelimiter, C as EntityFormBinding, Cn as ReadOnlyFieldBinding, Cr as getIconForProperty, Ct as EntityCardBinding, D as getDefaultFieldConfig, Dn as ArrayOfMapsPreview, Dr as getResolvedPropertyInPath, Dt as useCollectionEditorDialogsState, E as DEFAULT_FIELD_CONFIGS, En as FieldHelperText, Er as getPropertyInPath, Et as ConfigControllerProvider, F as SelectFieldBinding, Fn as ArrayOneOfPreview, Ft as ImportSaveInProgress, G as useSelectionDialog, Gn as SidePanelControllerContext, Gt as SearchIconsView, H as DateTimeFieldBinding, Hn as InlineEntityListPreview, Ht as parseCsvToObjects, I as RepeatFieldBinding, In as ArrayOfStringsPreview, It as IMPORT_BATCH_SIZE, J as useBuildUrlController, Jn as useCollectionRegistryController, Jt as BreadcrumbsProvider, K as SelectionTableBinding, Kn as useSidePanel, Kt as FieldCaption, L as ReferenceFieldBinding, Ln as ArrayPropertyEnumPreview, Lt as saveImportedEntities, M as TextFieldBinding, Mn as DatePreview, Mt as processValueMapping, N as SwitchFieldBinding, Nn as KeyValuePreview, Nt as getInferenceType, O as getDefaultFieldId, On as PropertyPreview, Or as isReferenceProperty, Ot as ImportNewPropertyFieldPreview, P as StorageUploadFieldBinding, Pn as MapPropertyPreview, Pt as useImportConfig, Q as useResolvedCollections, Qn as getEntityTitlePropertyKey, Qt as addInitialSlash, R as MultiSelectFieldBinding, Rn as ArrayEnumPreview, Rt as ImportFileUpload, S as isSchemaChangeCancelled, Sn as useClearRestoreValue, Sr as getDefaultPropertiesOrder, St as CollectionCardViewBinding, T as PropertyFieldBinding, Tn as LabelWithIcon, Tr as getPropertiesWithPropertiesOrder, Tt as useCollectionEditorController, U as BlockFieldBinding, Un as ReferencePreview, Ut as ArrayContainer, V as KeyValueFieldBinding, Vn as ArrayOfReferencesPreview, Vt as parseCsvRows, W as ArrayOfReferencesFieldBinding, Wn as EntityPreviewBinding, Wt as PropertyConfigBadge, X as useTopLevelNavigation, Xn as useResolvedUser, Xt as resolveEntityView, Y as useBuildNavigationStateController, Yn as getUserLabel, Yt as resolveEntityAction, Z as useResolvedViews, Zn as getEntityPreviewKeys, Zt as mergeEntityActions, _ as useCollectionsConfigController, _n as useNavigationStateController, _r as LABEL_ICON_SIZE, _t as editEntityAction, a as namespaceToPropertiesPath, an as resolveCollectionPathIds, ar as SkeletonPropertyComponent, at as getEntityViewWidth, b as asUnavailable, bn as SelectableTableContext, br as PropertyIdCopyTooltip, bt as DetailViewBinding, c as buildCollectionGenerationCallback, cn as useSelectionController, cr as renderSkeletonImageThumbnail, d as fromSerializableCollectionConfigs, dn as SelectableTable, dr as ImagePreview, dt as getInitialEntityValues, en as getCollectionPathsCombinations, er as ArrayPropertyPreview, et as useBuildCollectionRegistryController, f as fromSerializableProperties, fn as CollectionRowActions, fr as EmptyValue, ft as removeEmptyContainers, g as toSerializableProperty, gn as NavigationStateContext, gr as FieldBlock, gt as deleteEntityAction, h as toSerializableProperties, hn as useUrlController, hr as RecordMeta, ht as copyEntityAction, i as namespaceToPropertiesOrderPath, in as removeTrailingSlash, ir as StorageThumbnailInternal, it as buildSidePanelsFromUrl, j as VectorFieldBinding, jn as BooleanPreview, jt as flattenEntry, k as getFieldConfig, kn as UserPreview, kr as isRelationProperty, kt as DataNewPropertiesMapping, l as validateCollectionJson, ln as VirtualTableInput, lr as renderSkeletonText, lt as extractTouchedValues, m as toSerializableCollectionConfig, mn as UrlContext, mr as FormRail, mt as CollectionViewBinding, n as getFullIdPath, nn as removeInitialAndTrailingSlashes, nr as EnumValuesChip, nt as resolveNavigationFrom, o as CollectionGenerationApiError, on as resolveOpenEntityMode, or as renderSkeletonCaptionText, ot as useBuildSidePanel, p as fromSerializableProperty, pn as useAdminContext, pr as FormSections, pt as zodToFormErrors, q as SideDialogs, qn as CollectionRegistryContext, qt as useBreadcrumbsController, r as idToPropertiesPath, rn as removeInitialSlash, rr as StorageThumbnail, rt as useResolvedNavigationFrom, s as DEFAULT_COLLECTION_GENERATION_ENDPOINT, sn as resolveViewMode, sr as renderSkeletonIcon, st as EditViewBinding, t as getFullId, tn as getLastSegment, tr as StringPropertyPreview, tt as useHistory, u as fromSerializableCollectionConfig, un as CollectionTableBinding, ur as UrlComponentPreview, ut as getChanges, v as LiveSchemaError, vn as useSideDialogsController, vr as isSelfLabellingProperty, vt as resetPasswordAction, w as EntityForm, wn as LabelWithIconAndTooltip, wr as getIconForWidget, wt as CollectionViewActions, x as createLiveSchemaClient, xn as ArrayCustomShapedFieldBinding, xr as getBracketNotation, xt as EntityViewBinding, y as SchemaChangeCancelled, yn as SideDialogsControllerContext, yr as spanClass, yt as CreationResultDialog, z as MarkdownEditorFieldBinding, zn as ArrayOfStorageComponentsPreview, zt as convertFileToJson } from "./util-DE1WQW6h.js";
|
|
2
|
+
import { r as sanitizeUrl } from "./util-CfLFggP7.js";
|
|
3
|
+
import { i as PropertySelectEntry, n as ImportCollectionAction, r as ImportDataPreview } from "./import-DTkXNoBg.js";
|
|
4
|
+
import { a as MAX_EXPORT_ROWS, c as downloadDataAsCsv, d as escapeCsvFormula, f as getEntityCSVExportableData, i as EXPORT_PAGE_SIZE, l as downloadEntitiesExport, n as ExportCollectionAction, o as fetchAllEntitiesForExport, p as getEntityJsonExportableData, r as BasicExportAction, s as downloadBlob, u as entryToCSVRow } from "./export--arni_VY.js";
|
|
4
5
|
import React, { Suspense, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
5
6
|
import { deepEqual } from "fast-equals";
|
|
6
7
|
import { Avatar, Button, Card, CenteredView, ChevronDownIcon, ChevronsLeftIcon, ChevronsRightIcon, Chip, CircularProgressCenter, Collapse, Container, Dialog, DialogActions, DialogContent, DialogTitle, ErrorBoundary, ExpandablePanel, IconButton, LogOutIcon, Markdown, Menu, MenuIcon, MenuItem, MoonIcon, PencilIcon, SearchBar, SettingsIcon, Sheet, Skeleton, StarIcon, SunIcon, SunMoonIcon, TextField, Tooltip, Typography, cls, defaultBorderMixin, iconSize, lazyChunk } from "@rebasepro/ui";
|
|
7
8
|
import { buildRoutedRebaseData, getReferenceFrom, resolveDataSource } from "@rebasepro/common";
|
|
8
|
-
import { CollectionResolverRegistrationContext, CollectionScopeProvider, CustomizationControllerContext, DEFAULT_API_PATH, ErrorView, IconForView, LanguageToggle, LoginView, NavigationBlockerProvider, NotFoundPage, RebaseDataContext, RebaseLogo, RebaseRoutes, SchemaDriftBanner, StudioBridgeRegistryProvider,
|
|
9
|
+
import { CollectionResolverRegistrationContext, CollectionScopeProvider, CustomizationControllerContext, DEFAULT_API_PATH, ErrorView, IconForView, LanguageToggle, LoginView, NavigationBlockerProvider, NotFoundPage, RebaseDataContext, RebaseLogo, RebaseRoutes, SchemaDriftBanner, StudioBridgeRegistryProvider, UnsavedChangesDialog, UserSettingsView, buildCollapsedDefaults, getIcon, getLastSegment as getLastSegment$1, getNavigationEntriesFromPath, useAdminModeController, useAnalyticsController, useAuthController, useBridgeRegistration, useBuildLocalConfigurationPersistence, useCollapsedGroups, useComponentOverride, useCustomizationController, useData, useDataSources, useLargeLayout, useModeController, useNavigationBlocker, useNavigationGroupLabel, useRebaseClient, useRebaseContext, useRebaseRegistry, useRebaseRegistryDispatch, useRestoreScroll, useSlot, useTranslation, useUserConfigurationPersistence } from "@rebasepro/app";
|
|
9
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
11
|
import { prettifyIdentifier, toArray } from "@rebasepro/utils";
|
|
11
12
|
import { Link, NavLink, Outlet, Route, useLocation, useNavigate } from "react-router";
|
|
@@ -805,7 +806,7 @@ function DrawerNavigationItem({ name, icon, drawerOpen, url, onClick, indented =
|
|
|
805
806
|
* Renders a collapsible group with header and navigation items.
|
|
806
807
|
*/
|
|
807
808
|
function DrawerNavigationGroup({ group, entries, collapsed, onToggleCollapsed, drawerOpen, headerActions, onItemClick, hideHeader, icon }) {
|
|
808
|
-
const
|
|
809
|
+
const groupLabel = useNavigationGroupLabel();
|
|
809
810
|
const ResolvedDrawerNavigationItem = useComponentOverride("Shell.DrawerNavigationItem", DrawerNavigationItem);
|
|
810
811
|
const groupIcon = !hideHeader && drawerOpen ? getIcon(icon, void 0, void 0, "small") : void 0;
|
|
811
812
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -826,7 +827,7 @@ function DrawerNavigationGroup({ group, entries, collapsed, onToggleCollapsed, d
|
|
|
826
827
|
variant: "caption",
|
|
827
828
|
color: "secondary",
|
|
828
829
|
className: "font-semibold text-[11px] uppercase tracking-wider flex-grow line-clamp-1 text-surface-400 dark:text-surface-400",
|
|
829
|
-
children: group ||
|
|
830
|
+
children: groupLabel(group || "Views")
|
|
830
831
|
}),
|
|
831
832
|
headerActions && /* @__PURE__ */ jsx("div", {
|
|
832
833
|
onClick: (e) => e.stopPropagation(),
|
|
@@ -985,7 +986,7 @@ function DrawerLogo({ logo, title, logoDestination = "/", drawerOpen, drawerHove
|
|
|
985
986
|
children: [/* @__PURE__ */ jsx(Link, {
|
|
986
987
|
className: "shrink-0 flex items-center justify-center w-[56px] h-[40px]",
|
|
987
988
|
to: logoDestination,
|
|
988
|
-
"aria-label": t("home"
|
|
989
|
+
"aria-label": t("home", { defaultValue: "Home" }),
|
|
989
990
|
children: logo ? /* @__PURE__ */ jsx("img", {
|
|
990
991
|
src: logo,
|
|
991
992
|
alt: "Logo",
|
|
@@ -1118,7 +1119,7 @@ function DrawerFooterActions({ drawerOpen, drawerHovered, dropDownActions, user:
|
|
|
1118
1119
|
className: cls("shrink-0 flex items-center justify-center w-[44px] cursor-pointer", "rounded-md py-1", "hover:bg-surface-accent-100 dark:hover:bg-surface-800", "transition-colors duration-150"),
|
|
1119
1120
|
role: "button",
|
|
1120
1121
|
tabIndex: 0,
|
|
1121
|
-
"aria-label": t("user_menu"
|
|
1122
|
+
"aria-label": t("user_menu", { defaultValue: "User menu" }),
|
|
1122
1123
|
children: avatarComponent
|
|
1123
1124
|
}),
|
|
1124
1125
|
side: "top",
|
|
@@ -1153,7 +1154,7 @@ function DrawerFooterActions({ drawerOpen, drawerHovered, dropDownActions, user:
|
|
|
1153
1154
|
children: [/* @__PURE__ */ jsx(LanguageToggle, {}), /* @__PURE__ */ jsxs(Menu, {
|
|
1154
1155
|
trigger: /* @__PURE__ */ jsx(IconButton, {
|
|
1155
1156
|
color: "inherit",
|
|
1156
|
-
"aria-label": t("toggle_theme"
|
|
1157
|
+
"aria-label": t("toggle_theme", { defaultValue: "Toggle theme" }),
|
|
1157
1158
|
className: "text-surface-500 dark:text-surface-400",
|
|
1158
1159
|
children: mode === "dark" ? /* @__PURE__ */ jsx(MoonIcon, { size: iconSize.small }) : mode === "light" ? /* @__PURE__ */ jsx(SunIcon, { size: iconSize.small }) : /* @__PURE__ */ jsx(SunMoonIcon, { size: iconSize.small })
|
|
1159
1160
|
}),
|
|
@@ -1247,11 +1248,13 @@ function writeStoredDrawerOpen(key, open) {
|
|
|
1247
1248
|
*/
|
|
1248
1249
|
var Scaffold = React.memo(function Scaffold(props) {
|
|
1249
1250
|
const { children, autoOpenDrawer = true, defaultDrawerOpen = false, logo, className, style, padding = true } = props;
|
|
1250
|
-
const
|
|
1251
|
+
const slotOf = (child) => React.isValidElement(child) ? child.type?.componentType : void 0;
|
|
1252
|
+
const childArray = React.Children.toArray(children);
|
|
1253
|
+
const drawerChildren = childArray.filter((child) => slotOf(child) === "Drawer");
|
|
1251
1254
|
if (drawerChildren.length > 1) throw Error("Only one Drawer component is allowed in Scaffold");
|
|
1252
|
-
const appBarChildren =
|
|
1255
|
+
const appBarChildren = childArray.filter((child) => slotOf(child) === "AppBar");
|
|
1253
1256
|
if (appBarChildren.length > 1) throw Error("Only one AppBar component is allowed in Scaffold");
|
|
1254
|
-
const otherChildren =
|
|
1257
|
+
const otherChildren = childArray.filter((child) => slotOf(child) !== "Drawer" && slotOf(child) !== "AppBar");
|
|
1255
1258
|
const includeDrawer = drawerChildren.length > 0;
|
|
1256
1259
|
const largeLayout = useLargeLayout();
|
|
1257
1260
|
const storageKey = drawerOpenStorageKey(useUrlController().basePath);
|
|
@@ -1518,7 +1521,7 @@ function RebaseAuthGate({ children }) {
|
|
|
1518
1521
|
* a browser downloads before the login screen paints. It cost 14 kB there, for
|
|
1519
1522
|
* a dialog most sessions never open. The bundle budget caught it.
|
|
1520
1523
|
*/
|
|
1521
|
-
var SchemaChangeDialog = lazyChunk(() => import("./SchemaChangeDialog-
|
|
1524
|
+
var SchemaChangeDialog = lazyChunk(() => import("./SchemaChangeDialog-CkqK6KOC.js").then((n) => n.n).then((m) => ({ default: m.SchemaChangeDialog })));
|
|
1522
1525
|
function useLiveSchemaEditing(options) {
|
|
1523
1526
|
const { baseUrl, authKey, writeSourceOnly } = options;
|
|
1524
1527
|
const optionsRef = useRef(options);
|
|
@@ -1898,7 +1901,7 @@ function useLocalCollectionsConfigController(clientOrUrl, baseCollections = [],
|
|
|
1898
1901
|
//#region src/components/RebaseNavigation.tsx
|
|
1899
1902
|
var EMPTY_PLUGINS = [];
|
|
1900
1903
|
var EMPTY_COLLECTIONS = [];
|
|
1901
|
-
var CollectionsStudioView = lazyChunk(() => import("./RouterCollectionsStudioView-
|
|
1904
|
+
var CollectionsStudioView = lazyChunk(() => import("./RouterCollectionsStudioView-BtjzvB6E.js").then((n) => n.n).then((m) => ({ default: m.RouterCollectionsStudioView })));
|
|
1902
1905
|
/**
|
|
1903
1906
|
* Navigation layer — builds and provides all admin navigation controllers:
|
|
1904
1907
|
* collection registry, URL controller, navigation state, side entity,
|
|
@@ -2095,12 +2098,19 @@ function BridgeAutoRegistrar({ collectionRegistryController, urlController, navi
|
|
|
2095
2098
|
* **Independently usable**: Use this when you want the Rebase layout
|
|
2096
2099
|
* without its default route definitions.
|
|
2097
2100
|
*
|
|
2101
|
+
* It takes no children: the routed view arrives through react-router's
|
|
2102
|
+
* `<Outlet/>`. This example used to pass `<Route>` elements, which is neither
|
|
2103
|
+
* what the component renders nor something `RebaseLayoutProps` accepts — a
|
|
2104
|
+
* reader following it wrote a type error whose message was about `children`,
|
|
2105
|
+
* not about routes.
|
|
2106
|
+
*
|
|
2107
|
+
* Hand it to `<RebaseRouteDefs layout>`, which renders the routes inside it:
|
|
2108
|
+
*
|
|
2098
2109
|
* @example
|
|
2099
2110
|
* ```tsx
|
|
2100
|
-
* <RebaseLayout title="My Admin" appBar={<AppBar/>}>
|
|
2101
|
-
*
|
|
2102
|
-
*
|
|
2103
|
-
* </RebaseLayout>
|
|
2111
|
+
* <RebaseRouteDefs layout={<RebaseLayout title="My Admin" appBar={<AppBar/>}/>}>
|
|
2112
|
+
* <Route path="/custom" element={<CustomView/>}/>
|
|
2113
|
+
* </RebaseRouteDefs>
|
|
2104
2114
|
* ```
|
|
2105
2115
|
*/
|
|
2106
2116
|
function RebaseLayout(props) {
|
|
@@ -2163,9 +2173,25 @@ function FavouritesView({ hidden }) {
|
|
|
2163
2173
|
//#endregion
|
|
2164
2174
|
//#region src/components/HomePage/NavigationGroup.tsx
|
|
2165
2175
|
function NavigationGroup({ children, group, minimised, isPreview, isPotentialCardDropTarget, onEditGroup, dndDisabled, collapsed, onToggleCollapsed }) {
|
|
2166
|
-
const
|
|
2176
|
+
const groupLabel = useNavigationGroupLabel();
|
|
2167
2177
|
const [isHovered, setIsHovered] = useState(false);
|
|
2168
|
-
|
|
2178
|
+
/**
|
|
2179
|
+
* The group's *name*, which is an identifier — it is what `onEditGroup`
|
|
2180
|
+
* renames, what the card ordering compares, and what the drawer keys its
|
|
2181
|
+
* icons off. Never the translated heading.
|
|
2182
|
+
*/
|
|
2183
|
+
const currentGroupName = group ?? "Views";
|
|
2184
|
+
/**
|
|
2185
|
+
* What the heading reads.
|
|
2186
|
+
*
|
|
2187
|
+
* This used to translate only the default group (`t("views_group")`) and
|
|
2188
|
+
* render every other name raw, while the drawer used
|
|
2189
|
+
* `useNavigationGroupLabel` — so the same three groups had two sets of
|
|
2190
|
+
* labels on one screen: `VISTAS / DATABASE / SETTINGS` on the home page
|
|
2191
|
+
* against `VIEWS / BASE DE DATOS / SETTINGS` in the drawer beside it. One
|
|
2192
|
+
* lookup, in both places.
|
|
2193
|
+
*/
|
|
2194
|
+
const currentGroupLabel = groupLabel(currentGroupName);
|
|
2169
2195
|
const showCaret = !isPreview && !!onToggleCollapsed;
|
|
2170
2196
|
const TitleContent = /* @__PURE__ */ jsxs("div", {
|
|
2171
2197
|
className: cls("flex items-center", isPreview ? "px-1 py-0.5" : ""),
|
|
@@ -2174,7 +2200,7 @@ function NavigationGroup({ children, group, minimised, isPreview, isPotentialCar
|
|
|
2174
2200
|
component: "h2",
|
|
2175
2201
|
color: "secondary",
|
|
2176
2202
|
className: cls("px-4 py-1 rounded", "font-medium text-[10px] uppercase tracking-[0.08em] text-primary/50 dark:text-primary/70"),
|
|
2177
|
-
children:
|
|
2203
|
+
children: currentGroupLabel
|
|
2178
2204
|
}), !isPreview && onEditGroup && !dndDisabled && /* @__PURE__ */ jsx(IconButton, {
|
|
2179
2205
|
size: "smallest",
|
|
2180
2206
|
onClick: (e) => {
|
|
@@ -2367,6 +2393,29 @@ var cloneItemsForDnd = (items) => items.map((g) => ({
|
|
|
2367
2393
|
name: g.name,
|
|
2368
2394
|
entries: g.entries.map(cloneSerializableNavigationEntry)
|
|
2369
2395
|
}));
|
|
2396
|
+
/**
|
|
2397
|
+
* dnd-kit's `attributes`, minus the `role` it assumes.
|
|
2398
|
+
*
|
|
2399
|
+
* The wrapper these land on contains a `<Link>` and the card's own action
|
|
2400
|
+
* buttons, and dnd-kit's `role: "button"` therefore declared a button
|
|
2401
|
+
* containing a link containing more buttons. Measured on a scaffold's home
|
|
2402
|
+
* page: 17 focusables for 5 destinations, 13 of the 17 `[role=button]` nested
|
|
2403
|
+
* inside another — which is what a screen reader has to read through before it
|
|
2404
|
+
* reaches the collection you wanted.
|
|
2405
|
+
*
|
|
2406
|
+
* The rest is kept, and it is the part that carries meaning:
|
|
2407
|
+
* `aria-roledescription="sortable"`, the instructions dnd-kit points
|
|
2408
|
+
* `aria-describedby` at, and the `tabIndex` its keyboard sensor needs — drag
|
|
2409
|
+
* still works from the keyboard.
|
|
2410
|
+
*
|
|
2411
|
+
* A dedicated drag handle is the better answer and the one dnd-kit documents;
|
|
2412
|
+
* it needs a control designed into the card, which is a visual change and not
|
|
2413
|
+
* this one.
|
|
2414
|
+
*/
|
|
2415
|
+
function draggableAttributes(attributes) {
|
|
2416
|
+
const { role: _role, ...rest } = attributes;
|
|
2417
|
+
return rest;
|
|
2418
|
+
}
|
|
2370
2419
|
function SortableNavigationCard({ entry, onClick }) {
|
|
2371
2420
|
const { setNodeRef, listeners, attributes, transform, transition, isDragging } = useSortable({
|
|
2372
2421
|
id: entry.url,
|
|
@@ -2379,7 +2428,7 @@ function SortableNavigationCard({ entry, onClick }) {
|
|
|
2379
2428
|
transition,
|
|
2380
2429
|
opacity: isDragging ? 0 : 1
|
|
2381
2430
|
},
|
|
2382
|
-
...attributes,
|
|
2431
|
+
...draggableAttributes(attributes),
|
|
2383
2432
|
...listeners,
|
|
2384
2433
|
children: /* @__PURE__ */ jsx(NavigationCardBinding, {
|
|
2385
2434
|
...entry,
|
|
@@ -2412,7 +2461,7 @@ function SortableNavigationGroup({ groupName, children, disabled }) {
|
|
|
2412
2461
|
transition,
|
|
2413
2462
|
opacity: isDragging ? 0 : 1
|
|
2414
2463
|
},
|
|
2415
|
-
...attributes,
|
|
2464
|
+
...draggableAttributes(attributes),
|
|
2416
2465
|
...listeners,
|
|
2417
2466
|
children
|
|
2418
2467
|
});
|
|
@@ -3130,8 +3179,8 @@ function ContentHomePage({ additionalActions, additionalChildrenStart, additiona
|
|
|
3130
3179
|
}
|
|
3131
3180
|
//#endregion
|
|
3132
3181
|
//#region src/components/CollectionEditorDialogs.tsx
|
|
3133
|
-
var CollectionEditorDialog = lazyChunk(() => import("./CollectionEditorDialog-
|
|
3134
|
-
var PropertyFormDialog = lazyChunk(() => import("./PropertyEditView-
|
|
3182
|
+
var CollectionEditorDialog = lazyChunk(() => import("./CollectionEditorDialog-BeX4b92r.js").then((n) => n.r).then((m) => ({ default: m.CollectionEditorDialog })));
|
|
3183
|
+
var PropertyFormDialog = lazyChunk(() => import("./PropertyEditView-C7thfj4L.js").then((n) => n.t).then((m) => ({ default: m.PropertyFormDialog })));
|
|
3135
3184
|
/**
|
|
3136
3185
|
* Renders the CollectionEditorDialog and PropertyFormDialog inside
|
|
3137
3186
|
* the RebaseShell tree where admin-internal contexts
|
|
@@ -3228,10 +3277,6 @@ function RebaseRouteDefs({ children, layout }) {
|
|
|
3228
3277
|
path: "/settings",
|
|
3229
3278
|
element: /* @__PURE__ */ jsx(SettingsView, {})
|
|
3230
3279
|
}),
|
|
3231
|
-
/* @__PURE__ */ jsx(Route, {
|
|
3232
|
-
path: "/debug/ui",
|
|
3233
|
-
element: /* @__PURE__ */ jsx(UIReferenceView, {})
|
|
3234
|
-
}),
|
|
3235
3280
|
combinedViews.map((view) => {
|
|
3236
3281
|
return (Array.isArray(view.slug) ? view.slug : [view.slug]).flatMap((slug) => {
|
|
3237
3282
|
const routes = [/* @__PURE__ */ jsx(Route, {
|
|
@@ -3406,10 +3451,10 @@ var TYPE_MAP = {
|
|
|
3406
3451
|
/**
|
|
3407
3452
|
* Convert a single Property to a CollectionPropertyConfig.
|
|
3408
3453
|
*/
|
|
3409
|
-
function mapPropertyToConfig(property) {
|
|
3454
|
+
function mapPropertyToConfig(property, key) {
|
|
3410
3455
|
const base = {
|
|
3411
3456
|
type: TYPE_MAP[property.type] ?? "string",
|
|
3412
|
-
name: property.name,
|
|
3457
|
+
name: property.name ?? (key ? prettifyIdentifier(key) : ""),
|
|
3413
3458
|
description: property.description,
|
|
3414
3459
|
columnWidth: property.admin?.columnWidth,
|
|
3415
3460
|
hideFromCollection: property.admin?.hideFromCollection
|
|
@@ -3424,7 +3469,7 @@ function mapPropertyToConfig(property) {
|
|
|
3424
3469
|
if (property.email) base.email = true;
|
|
3425
3470
|
}
|
|
3426
3471
|
if (property.type === "number" && property.enum) base.enum = mapEnumValues(property.enum);
|
|
3427
|
-
if (property.type === "array" && property.of && !Array.isArray(property.of)) base.of = mapPropertyToConfig(property.of);
|
|
3472
|
+
if (property.type === "array" && property.of && !Array.isArray(property.of)) base.of = mapPropertyToConfig(property.of, key);
|
|
3428
3473
|
if (property.type === "map" && property.properties) {
|
|
3429
3474
|
base.properties = mapPropertiesToConfigs(property.properties);
|
|
3430
3475
|
if (property.propertiesOrder) base.propertiesOrder = property.propertiesOrder;
|
|
@@ -3438,7 +3483,7 @@ function mapPropertyToConfig(property) {
|
|
|
3438
3483
|
*/
|
|
3439
3484
|
function mapPropertiesToConfigs(properties) {
|
|
3440
3485
|
const result = {};
|
|
3441
|
-
for (const [key, property] of Object.entries(properties)) result[key] = mapPropertyToConfig(property);
|
|
3486
|
+
for (const [key, property] of Object.entries(properties)) result[key] = mapPropertyToConfig(property, key);
|
|
3442
3487
|
return result;
|
|
3443
3488
|
}
|
|
3444
3489
|
/**
|