@rebasepro/cms 0.24.0 → 0.24.1-canary.gcb918fc
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 +3 -1
- package/dist/collection_editor/CollectionEditorDialogsContext.js +10 -0
- package/dist/collection_editor/CollectionEditorDialogsContext.js.map +1 -0
- package/dist/collection_editor/ConfigControllerProvider.js +274 -0
- package/dist/collection_editor/ConfigControllerProvider.js.map +1 -0
- package/dist/collection_editor/api/generateCollectionApi.js +64 -0
- package/dist/collection_editor/api/generateCollectionApi.js.map +1 -0
- package/dist/collection_editor/collection_wire.d.ts +13 -0
- package/dist/collection_editor/collection_wire.js +49 -0
- package/dist/collection_editor/collection_wire.js.map +1 -0
- package/dist/collection_editor/liveSchemaClient.js +130 -0
- package/dist/collection_editor/liveSchemaClient.js.map +1 -0
- package/dist/collection_editor/relation_kinds.js +74 -0
- package/dist/collection_editor/relation_kinds.js.map +1 -0
- package/dist/collection_editor/serializable_types.d.ts +4 -1
- package/dist/collection_editor/serializable_utils.js +504 -0
- package/dist/collection_editor/serializable_utils.js.map +1 -0
- package/dist/collection_editor/ui/EditorCollectionAction.js +37 -0
- package/dist/collection_editor/ui/EditorCollectionAction.js.map +1 -0
- package/dist/collection_editor/ui/MissingReferenceWidget.js +39 -0
- package/dist/collection_editor/ui/MissingReferenceWidget.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.js +160 -0
- package/dist/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/AIModifiedPathsContext.js +61 -0
- package/dist/collection_editor/ui/collection_editor/AIModifiedPathsContext.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.js +731 -0
- package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.js +220 -0
- package/dist/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/CollectionJsonImportDialog.js +160 -0
- package/dist/collection_editor/ui/collection_editor/CollectionJsonImportDialog.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.js +394 -0
- package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/CollectionRLSTab.js +616 -0
- package/dist/collection_editor/ui/collection_editor/CollectionRLSTab.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/CollectionStudioView.js +68 -0
- package/dist/collection_editor/ui/collection_editor/CollectionStudioView.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/CollectionYupValidation.js +11 -0
- package/dist/collection_editor/ui/collection_editor/CollectionYupValidation.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/CollectionsStudioView.js +148 -0
- package/dist/collection_editor/ui/collection_editor/CollectionsStudioView.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/DisplaySettingsForm.js +244 -0
- package/dist/collection_editor/ui/collection_editor/DisplaySettingsForm.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/EnumForm.js +222 -0
- package/dist/collection_editor/ui/collection_editor/EnumForm.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/GeneralSettingsForm.js +204 -0
- package/dist/collection_editor/ui/collection_editor/GeneralSettingsForm.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/GetCodeDialog.js +108 -0
- package/dist/collection_editor/ui/collection_editor/GetCodeDialog.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/KanbanConfigSection.js +163 -0
- package/dist/collection_editor/ui/collection_editor/KanbanConfigSection.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/LayoutModeSwitch.js +59 -0
- package/dist/collection_editor/ui/collection_editor/LayoutModeSwitch.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/PropertyEditView.js +640 -0
- package/dist/collection_editor/ui/collection_editor/PropertyEditView.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/PropertyFieldPreview.js +141 -0
- package/dist/collection_editor/ui/collection_editor/PropertyFieldPreview.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/PropertyTree.js +210 -0
- package/dist/collection_editor/ui/collection_editor/PropertyTree.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/RouterCollectionStudioView.js +31 -0
- package/dist/collection_editor/ui/collection_editor/RouterCollectionStudioView.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/RouterCollectionsStudioView.js +25 -0
- package/dist/collection_editor/ui/collection_editor/RouterCollectionsStudioView.js.map +1 -0
- package/dist/{SchemaChangeDialog-CcFSXvkK.js → collection_editor/ui/collection_editor/SchemaChangeDialog.js} +42 -59
- package/dist/collection_editor/ui/collection_editor/SchemaChangeDialog.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/SwitchControl.js +24 -0
- package/dist/collection_editor/ui/collection_editor/SwitchControl.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/ViewModeSwitch.js +66 -0
- package/dist/collection_editor/ui/collection_editor/ViewModeSwitch.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.js +61 -0
- package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.js +188 -0
- package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/import/clean_import_data.d.ts +12 -0
- package/dist/collection_editor/ui/collection_editor/import/clean_import_data.js +74 -0
- package/dist/collection_editor/ui/collection_editor/import/clean_import_data.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/BlockPropertyField.js +100 -0
- package/dist/collection_editor/ui/collection_editor/properties/BlockPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/BooleanPropertyField.js +34 -0
- package/dist/collection_editor/ui/collection_editor/properties/BooleanPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/CommonPropertyFields.js +75 -0
- package/dist/collection_editor/ui/collection_editor/properties/CommonPropertyFields.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/DateTimePropertyField.js +338 -0
- package/dist/collection_editor/ui/collection_editor/properties/DateTimePropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/EnumPropertyField.js +83 -0
- package/dist/collection_editor/ui/collection_editor/properties/EnumPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/KeyValuePropertyField.js +15 -0
- package/dist/collection_editor/ui/collection_editor/properties/KeyValuePropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/MapPropertyField.js +121 -0
- package/dist/collection_editor/ui/collection_editor/properties/MapPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.js +127 -0
- package/dist/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/NumberPropertyField.js +151 -0
- package/dist/collection_editor/ui/collection_editor/properties/NumberPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/ReferencePropertyField.js +77 -0
- package/dist/collection_editor/ui/collection_editor/properties/ReferencePropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/RelationPropertyField.js +254 -0
- package/dist/collection_editor/ui/collection_editor/properties/RelationPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/RepeatPropertyField.js +71 -0
- package/dist/collection_editor/ui/collection_editor/properties/RepeatPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/StoragePropertyField.js +356 -0
- package/dist/collection_editor/ui/collection_editor/properties/StoragePropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/StringPropertyField.js +173 -0
- package/dist/collection_editor/ui/collection_editor/properties/StringPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/UrlPropertyField.js +79 -0
- package/dist/collection_editor/ui/collection_editor/properties/UrlPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/VectorPropertyField.js +34 -0
- package/dist/collection_editor/ui/collection_editor/properties/VectorPropertyField.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.js +47 -0
- package/dist/collection_editor/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.js +47 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.js +62 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.js +119 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.d.ts +10 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.js +178 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/ValidationPanel.js +23 -0
- package/dist/collection_editor/ui/collection_editor/properties/validation/ValidationPanel.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/templates/blog_template.js +116 -0
- package/dist/collection_editor/ui/collection_editor/templates/blog_template.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/templates/pages_template.js +182 -0
- package/dist/collection_editor/ui/collection_editor/templates/pages_template.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/templates/products_template.js +87 -0
- package/dist/collection_editor/ui/collection_editor/templates/products_template.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/templates/users_template.js +46 -0
- package/dist/collection_editor/ui/collection_editor/templates/users_template.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/util.js +20 -0
- package/dist/collection_editor/ui/collection_editor/util.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/utils/strings.js +2 -0
- package/dist/collection_editor/ui/collection_editor/utils/supported_fields.js +37 -0
- package/dist/collection_editor/ui/collection_editor/utils/supported_fields.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/utils/update_property_for_widget.js +192 -0
- package/dist/collection_editor/ui/collection_editor/utils/update_property_for_widget.js.map +1 -0
- package/dist/collection_editor/useCollectionEditorController.js +12 -0
- package/dist/collection_editor/useCollectionEditorController.js.map +1 -0
- package/dist/collection_editor/useCollectionsConfigController.js +12 -0
- package/dist/collection_editor/useCollectionsConfigController.js.map +1 -0
- package/dist/collection_editor/useJsonCollectionsConfigController.js +191 -0
- package/dist/collection_editor/useJsonCollectionsConfigController.js.map +1 -0
- package/dist/collection_editor/useLiveSchemaEditing.js +214 -0
- package/dist/collection_editor/useLiveSchemaEditing.js.map +1 -0
- package/dist/collection_editor/useLocalCollectionsConfigController.js +228 -0
- package/dist/collection_editor/useLocalCollectionsConfigController.js.map +1 -0
- package/dist/collection_editor/useSafeSnackbarController.js +13 -0
- package/dist/collection_editor/useSafeSnackbarController.js.map +1 -0
- package/dist/collection_editor/validateCollectionJson.js +289 -0
- package/dist/collection_editor/validateCollectionJson.js.map +1 -0
- package/dist/collection_editor_ui.js +7 -33
- package/dist/components/AdditionalFieldValue.js +60 -0
- package/dist/components/AdditionalFieldValue.js.map +1 -0
- package/dist/components/AdminModeSyncer.js +41 -0
- package/dist/components/AdminModeSyncer.js.map +1 -0
- package/dist/components/ArrayContainer.d.ts +8 -2
- package/dist/components/ArrayContainer.js +363 -0
- package/dist/components/ArrayContainer.js.map +1 -0
- package/dist/components/ClearFilterSortButton.js +33 -0
- package/dist/components/ClearFilterSortButton.js.map +1 -0
- package/dist/components/CollectionEditorDialogs.js +49 -0
- package/dist/components/CollectionEditorDialogs.js.map +1 -0
- package/dist/components/CollectionPanel.d.ts +26 -5
- package/dist/components/CollectionPanel.js +142 -0
- package/dist/components/CollectionPanel.js.map +1 -0
- package/dist/components/CollectionTableBinding/CollectionRowActions.js +165 -0
- package/dist/components/CollectionTableBinding/CollectionRowActions.js.map +1 -0
- package/dist/components/CollectionTableBinding/CollectionTableBinding.js +329 -0
- package/dist/components/CollectionTableBinding/CollectionTableBinding.js.map +1 -0
- package/dist/components/CollectionTableBinding/PropertyTableCell.js +311 -0
- package/dist/components/CollectionTableBinding/PropertyTableCell.js.map +1 -0
- package/dist/components/CollectionTableBinding/column_utils.js +85 -0
- package/dist/components/CollectionTableBinding/column_utils.js.map +1 -0
- package/dist/components/CollectionTableBinding/fields/CompactEntityCellField.js +45 -0
- package/dist/components/CollectionTableBinding/fields/CompactEntityCellField.js.map +1 -0
- package/dist/components/CollectionTableBinding/fields/TableMultipleRelationField.js +66 -0
- package/dist/components/CollectionTableBinding/fields/TableMultipleRelationField.js.map +1 -0
- package/dist/components/CollectionTableBinding/fields/TableReferenceField.js +86 -0
- package/dist/components/CollectionTableBinding/fields/TableReferenceField.js.map +1 -0
- package/dist/components/CollectionTableBinding/fields/TableRelationField.js +93 -0
- package/dist/components/CollectionTableBinding/fields/TableRelationField.js.map +1 -0
- package/dist/components/CollectionTableBinding/fields/TableRelationSelectorField.js +33 -0
- package/dist/components/CollectionTableBinding/fields/TableRelationSelectorField.js.map +1 -0
- package/dist/components/CollectionTableBinding/fields/TableStorageUpload.js +171 -0
- package/dist/components/CollectionTableBinding/fields/TableStorageUpload.js.map +1 -0
- package/dist/components/CollectionTableBinding/fields/VirtualTableSelect.js +91 -0
- package/dist/components/CollectionTableBinding/fields/VirtualTableSelect.js.map +1 -0
- package/dist/components/CollectionTableBinding/fields/VirtualTableUserSelect.js +36 -0
- package/dist/components/CollectionTableBinding/fields/VirtualTableUserSelect.js.map +1 -0
- package/dist/components/CollectionTableBinding/index.js +6 -0
- package/dist/components/CollectionTableBinding/internal/CollectionTableToolbar.js +50 -0
- package/dist/components/CollectionTableBinding/internal/CollectionTableToolbar.js.map +1 -0
- package/dist/components/CollectionTableBinding/internal/EntityTableCell.d.ts +2 -0
- package/dist/components/CollectionTableBinding/internal/EntityTableCell.js +223 -0
- package/dist/components/CollectionTableBinding/internal/EntityTableCell.js.map +1 -0
- package/dist/components/CollectionTableBinding/internal/EntityTableCellActions.js +58 -0
- package/dist/components/CollectionTableBinding/internal/EntityTableCellActions.js.map +1 -0
- package/dist/components/CollectionTableBinding/internal/TableCellOpener.js +53 -0
- package/dist/components/CollectionTableBinding/internal/TableCellOpener.js.map +1 -0
- package/dist/components/CollectionTableBinding/internal/common.js +40 -0
- package/dist/components/CollectionTableBinding/internal/common.js.map +1 -0
- package/dist/components/CollectionTableBinding/internal/popup_field/PopupFormField.js +270 -0
- package/dist/components/CollectionTableBinding/internal/popup_field/PopupFormField.js.map +1 -0
- package/dist/components/CollectionTableBinding/internal/popup_field/useDraggable.js +68 -0
- package/dist/components/CollectionTableBinding/internal/popup_field/useDraggable.js.map +1 -0
- package/dist/components/CollectionTableBinding/internal/popup_field/useWindowSize.js +24 -0
- package/dist/components/CollectionTableBinding/internal/popup_field/useWindowSize.js.map +1 -0
- package/dist/components/CollectionTableBinding/table_bindings.js +306 -0
- package/dist/components/CollectionTableBinding/table_bindings.js.map +1 -0
- package/dist/components/CollectionViewBinding/BoardCardBinding.js +160 -0
- package/dist/components/CollectionViewBinding/BoardCardBinding.js.map +1 -0
- package/dist/components/CollectionViewBinding/CollectionBoardViewBinding.js +471 -0
- package/dist/components/CollectionViewBinding/CollectionBoardViewBinding.js.map +1 -0
- package/dist/components/CollectionViewBinding/CollectionCardViewBinding.js +108 -0
- package/dist/components/CollectionViewBinding/CollectionCardViewBinding.js.map +1 -0
- package/dist/components/CollectionViewBinding/CollectionListViewBinding.js +988 -0
- package/dist/components/CollectionViewBinding/CollectionListViewBinding.js.map +1 -0
- package/dist/components/CollectionViewBinding/CollectionViewActions.js +146 -0
- package/dist/components/CollectionViewBinding/CollectionViewActions.js.map +1 -0
- package/dist/components/CollectionViewBinding/CollectionViewBinding.js +1209 -0
- package/dist/components/CollectionViewBinding/CollectionViewBinding.js.map +1 -0
- package/dist/components/CollectionViewBinding/CollectionViewStartActions.js +133 -0
- package/dist/components/CollectionViewBinding/CollectionViewStartActions.js.map +1 -0
- package/dist/components/CollectionViewBinding/EntityCardBinding.js +133 -0
- package/dist/components/CollectionViewBinding/EntityCardBinding.js.map +1 -0
- package/dist/components/CollectionViewBinding/FilterPresetsButton.js +203 -0
- package/dist/components/CollectionViewBinding/FilterPresetsButton.js.map +1 -0
- package/dist/components/CollectionViewBinding/FiltersDialog.js +148 -0
- package/dist/components/CollectionViewBinding/FiltersDialog.js.map +1 -0
- package/dist/components/CollectionViewBinding/SearchExplanation.js +86 -0
- package/dist/components/CollectionViewBinding/SearchExplanation.js.map +1 -0
- package/dist/components/CollectionViewBinding/SearchHighlight.js +262 -0
- package/dist/components/CollectionViewBinding/SearchHighlight.js.map +1 -0
- package/dist/components/CollectionViewBinding/SlotValue.js +117 -0
- package/dist/components/CollectionViewBinding/SlotValue.js.map +1 -0
- package/dist/components/CollectionViewBinding/SortButton.js +214 -0
- package/dist/components/CollectionViewBinding/SortButton.js.map +1 -0
- package/dist/components/CollectionViewBinding/SplitListCloseButton.js +41 -0
- package/dist/components/CollectionViewBinding/SplitListCloseButton.js.map +1 -0
- package/dist/components/CollectionViewBinding/SplitListShowButton.js +29 -0
- package/dist/components/CollectionViewBinding/SplitListShowButton.js.map +1 -0
- package/dist/components/CollectionViewBinding/SplitListView.js +311 -0
- package/dist/components/CollectionViewBinding/SplitListView.js.map +1 -0
- package/dist/components/CollectionViewBinding/SplitViewContext.js +21 -0
- package/dist/components/CollectionViewBinding/SplitViewContext.js.map +1 -0
- package/dist/components/CollectionViewBinding/ViewModeToggle.js +150 -0
- package/dist/components/CollectionViewBinding/ViewModeToggle.js.map +1 -0
- package/dist/components/CollectionViewBinding/hooks/useCollectionInlineEditor.js +49 -0
- package/dist/components/CollectionViewBinding/hooks/useCollectionInlineEditor.js.map +1 -0
- package/dist/components/CollectionViewBinding/hooks/useKanbanDragAndDrop.js +122 -0
- package/dist/components/CollectionViewBinding/hooks/useKanbanDragAndDrop.js.map +1 -0
- package/dist/components/CollectionViewBinding/useBoardDataController.js +530 -0
- package/dist/components/CollectionViewBinding/useBoardDataController.js.map +1 -0
- package/dist/components/CollectionViewBinding/usePreviewSlots.d.ts +4 -1
- package/dist/components/CollectionViewBinding/usePreviewSlots.js +384 -0
- package/dist/components/CollectionViewBinding/usePreviewSlots.js.map +1 -0
- package/dist/components/CollectionViewBinding/useSelectionController.js +104 -0
- package/dist/components/CollectionViewBinding/useSelectionController.js.map +1 -0
- package/dist/components/CollectionViewBinding/utils.js +21 -0
- package/dist/components/CollectionViewBinding/utils.js.map +1 -0
- package/dist/components/CollectionsProvider.d.ts +44 -0
- package/dist/components/CollectionsProvider.js +137 -0
- package/dist/components/CollectionsProvider.js.map +1 -0
- package/dist/components/CollectionsScopeContext.d.ts +18 -0
- package/dist/components/CollectionsScopeContext.js +25 -0
- package/dist/components/CollectionsScopeContext.js.map +1 -0
- package/dist/components/DefaultAppBar.js +179 -0
- package/dist/components/DefaultAppBar.js.map +1 -0
- package/dist/components/DefaultDrawer.js +364 -0
- package/dist/components/DefaultDrawer.js.map +1 -0
- package/dist/components/DeleteEntityDialog.js +256 -0
- package/dist/components/DeleteEntityDialog.js.map +1 -0
- package/dist/components/DetailViewBinding.js +504 -0
- package/dist/components/DetailViewBinding.js.map +1 -0
- package/dist/components/DrawerNavigationGroup.js +74 -0
- package/dist/components/DrawerNavigationGroup.js.map +1 -0
- package/dist/components/DrawerNavigationItem.d.ts +8 -0
- package/dist/components/DrawerNavigationItem.js +45 -0
- package/dist/components/DrawerNavigationItem.js.map +1 -0
- package/dist/components/EditFormActions.js +210 -0
- package/dist/components/EditFormActions.js.map +1 -0
- package/dist/components/EditViewBinding.js +802 -0
- package/dist/components/EditViewBinding.js.map +1 -0
- package/dist/components/EntityDisplayHeader.js +139 -0
- package/dist/components/EntityDisplayHeader.js.map +1 -0
- package/dist/components/EntityFormPanel.d.ts +58 -0
- package/dist/components/EntityFormPanel.js +126 -0
- package/dist/components/EntityFormPanel.js.map +1 -0
- package/dist/components/EntityIdentityBar.js +364 -0
- package/dist/components/EntityIdentityBar.js.map +1 -0
- package/dist/components/EntityInspector.js +96 -0
- package/dist/components/EntityInspector.js.map +1 -0
- package/dist/components/EntityPreviewBinding.js +282 -0
- package/dist/components/EntityPreviewBinding.js.map +1 -0
- package/dist/components/EntityPreviewNesting.js +53 -0
- package/dist/components/EntityPreviewNesting.js.map +1 -0
- package/dist/components/EntityViewBinding.js +246 -0
- package/dist/components/EntityViewBinding.js.map +1 -0
- package/dist/components/FieldCaption.js +17 -0
- package/dist/components/FieldCaption.js.map +1 -0
- package/dist/components/HomePage/ContentHomePage.js +326 -0
- package/dist/components/HomePage/ContentHomePage.js.map +1 -0
- package/dist/components/HomePage/FavouritesView.js +44 -0
- package/dist/components/HomePage/FavouritesView.js.map +1 -0
- package/dist/components/HomePage/HomePageDnD.js +436 -0
- package/dist/components/HomePage/HomePageDnD.js.map +1 -0
- package/dist/components/HomePage/NavigationCard.js +59 -0
- package/dist/components/HomePage/NavigationCard.js.map +1 -0
- package/dist/components/HomePage/NavigationCardBinding.js +70 -0
- package/dist/components/HomePage/NavigationCardBinding.js.map +1 -0
- package/dist/components/HomePage/NavigationGroup.js +98 -0
- package/dist/components/HomePage/NavigationGroup.js.map +1 -0
- package/dist/components/HomePage/RenameGroupDialog.js +89 -0
- package/dist/components/HomePage/RenameGroupDialog.js.map +1 -0
- package/dist/components/InlineEntityPreview.js +116 -0
- package/dist/components/InlineEntityPreview.js.map +1 -0
- package/dist/{JsonPreviewBinding-v0w3H0fp.js → components/JsonPreviewBinding.js} +2 -2
- package/dist/components/JsonPreviewBinding.js.map +1 -0
- package/dist/components/NavigationLoadingErrorView.js +27 -0
- package/dist/components/NavigationLoadingErrorView.js.map +1 -0
- package/dist/components/PickerTrigger.js +27 -0
- package/dist/components/PickerTrigger.js.map +1 -0
- package/dist/components/PropertyCollectionView.js +215 -0
- package/dist/components/PropertyCollectionView.js.map +1 -0
- package/dist/components/PropertyConfigBadge.js +19 -0
- package/dist/components/PropertyConfigBadge.js.map +1 -0
- package/dist/components/PropertyKeyHint.js +58 -0
- package/dist/components/PropertyKeyHint.js.map +1 -0
- package/dist/components/RebaseAuthGate.js +35 -0
- package/dist/components/RebaseAuthGate.js.map +1 -0
- package/dist/components/RebaseCMS.js +44 -0
- package/dist/components/RebaseCMS.js.map +1 -0
- package/dist/components/RebaseLayout.js +59 -0
- package/dist/components/RebaseLayout.js.map +1 -0
- package/dist/components/RebaseNavigation.js +215 -0
- package/dist/components/RebaseNavigation.js.map +1 -0
- package/dist/components/RebaseRouteDefs.js +96 -0
- package/dist/components/RebaseRouteDefs.js.map +1 -0
- package/dist/components/RebaseShell.js +50 -0
- package/dist/components/RebaseShell.js.map +1 -0
- package/dist/components/ReferenceTable/SelectionTableBinding.js +224 -0
- package/dist/components/ReferenceTable/SelectionTableBinding.js.map +1 -0
- package/dist/components/ReferenceWidget.js +100 -0
- package/dist/components/ReferenceWidget.js.map +1 -0
- package/dist/components/RelationSelector.js +625 -0
- package/dist/components/RelationSelector.js.map +1 -0
- package/dist/components/SearchIconsView.js +52 -0
- package/dist/components/SearchIconsView.js.map +1 -0
- package/dist/components/SelectableTable/SelectableTable.d.ts +1 -1
- package/dist/components/SelectableTable/SelectableTable.js +158 -0
- package/dist/components/SelectableTable/SelectableTable.js.map +1 -0
- package/dist/components/SelectableTable/SelectableTableContext.js +8 -0
- package/dist/components/SelectableTable/SelectableTableContext.js.map +1 -0
- package/dist/components/SelectableTable/SelectionStore.js +29 -0
- package/dist/components/SelectableTable/SelectionStore.js.map +1 -0
- package/dist/components/SelectableTable/filters/BooleanFilterField.js +28 -0
- package/dist/components/SelectableTable/filters/BooleanFilterField.js.map +1 -0
- package/dist/components/SelectableTable/filters/DateTimeFilterField.d.ts +2 -1
- package/dist/components/SelectableTable/filters/DateTimeFilterField.js +93 -0
- package/dist/components/SelectableTable/filters/DateTimeFilterField.js.map +1 -0
- package/dist/components/SelectableTable/filters/FilterFieldBinding.js +132 -0
- package/dist/components/SelectableTable/filters/FilterFieldBinding.js.map +1 -0
- package/dist/components/SelectableTable/filters/ReferenceFilterField.js +157 -0
- package/dist/components/SelectableTable/filters/ReferenceFilterField.js.map +1 -0
- package/dist/components/SelectableTable/filters/RelationFilterField.js +169 -0
- package/dist/components/SelectableTable/filters/RelationFilterField.js.map +1 -0
- package/dist/components/SelectableTable/filters/StringNumberFilterField.js +181 -0
- package/dist/components/SelectableTable/filters/StringNumberFilterField.js.map +1 -0
- package/dist/components/SelectableTable/filters/null_filter.js +36 -0
- package/dist/components/SelectableTable/filters/null_filter.js.map +1 -0
- package/dist/components/SideDialogs.js +149 -0
- package/dist/components/SideDialogs.js.map +1 -0
- package/dist/components/SidePanelBinding.js +287 -0
- package/dist/components/SidePanelBinding.js.map +1 -0
- package/dist/components/SidePanelProvider.js +69 -0
- package/dist/components/SidePanelProvider.js.map +1 -0
- package/dist/components/UserSelector.d.ts +2 -0
- package/dist/components/UserSelector.js +418 -0
- package/dist/components/UserSelector.js.map +1 -0
- package/dist/components/admin/CreationResultDialog.js +118 -0
- package/dist/components/admin/CreationResultDialog.js.map +1 -0
- package/dist/components/app/AppBar.js +14 -0
- package/dist/components/app/AppBar.js.map +1 -0
- package/dist/components/app/Drawer.js +26 -0
- package/dist/components/app/Drawer.js.map +1 -0
- package/dist/components/app/Scaffold.js +229 -0
- package/dist/components/app/Scaffold.js.map +1 -0
- package/dist/components/app/useApp.js +24 -0
- package/dist/components/app/useApp.js.map +1 -0
- package/dist/components/common/ActionMenuLabel.js +30 -0
- package/dist/components/common/ActionMenuLabel.js.map +1 -0
- package/dist/components/common/default_entity_actions.js +590 -0
- package/dist/components/common/default_entity_actions.js.map +1 -0
- package/dist/components/drawer_expansion.d.ts +25 -0
- package/dist/components/drawer_expansion.js +44 -0
- package/dist/components/drawer_expansion.js.map +1 -0
- package/dist/components/field_configs.d.ts +2 -2
- package/dist/components/field_configs.js +431 -0
- package/dist/components/field_configs.js.map +1 -0
- package/dist/components/field_ids.d.ts +11 -0
- package/dist/components/field_ids.js +58 -0
- package/dist/components/field_ids.js.map +1 -0
- package/dist/components/history/EntityHistoryEntry.js +151 -0
- package/dist/components/history/EntityHistoryEntry.js.map +1 -0
- package/dist/components/history/EntityHistoryView.js +157 -0
- package/dist/components/history/EntityHistoryView.js.map +1 -0
- package/dist/components/history/UserChip.js +21 -0
- package/dist/components/history/UserChip.js.map +1 -0
- package/dist/components/history/index.js +4 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/lazy_record_views.d.ts +10 -0
- package/dist/components/lazy_record_views.js +57 -0
- package/dist/components/lazy_record_views.js.map +1 -0
- package/dist/contexts/BreacrumbsContext.js +28 -0
- package/dist/contexts/BreacrumbsContext.js.map +1 -0
- package/dist/contexts/EditorAIControllerContext.d.ts +18 -0
- package/dist/contexts/EditorAIControllerContext.js +29 -0
- package/dist/contexts/EditorAIControllerContext.js.map +1 -0
- package/dist/contexts/SideDialogsControllerContext.js +7 -0
- package/dist/contexts/SideDialogsControllerContext.js.map +1 -0
- package/dist/data_export/export/BasicExportAction.js +151 -0
- package/dist/data_export/export/BasicExportAction.js.map +1 -0
- package/dist/data_export/export/ExportCollectionAction.js +297 -0
- package/dist/data_export/export/ExportCollectionAction.js.map +1 -0
- package/dist/data_export/export/additional_fields.js +40 -0
- package/dist/data_export/export/additional_fields.js.map +1 -0
- package/dist/data_export/export/export.d.ts +35 -0
- package/dist/data_export/export/export.js +400 -0
- package/dist/data_export/export/export.js.map +1 -0
- package/dist/data_export/export/fetch_export_data.d.ts +17 -7
- package/dist/data_export/export/fetch_export_data.js +67 -0
- package/dist/data_export/export/fetch_export_data.js.map +1 -0
- package/dist/data_export/export/index.d.ts +4 -2
- package/dist/data_export/export/index.js +5 -0
- package/dist/data_import/components/DataNewPropertiesMapping.js +207 -0
- package/dist/data_import/components/DataNewPropertiesMapping.js.map +1 -0
- package/dist/data_import/components/ImportConversionProblems.js +89 -0
- package/dist/data_import/components/ImportConversionProblems.js.map +1 -0
- package/dist/data_import/components/ImportFileUpload.js +43 -0
- package/dist/data_import/components/ImportFileUpload.js.map +1 -0
- package/dist/data_import/components/ImportNewPropertyFieldPreview.js +42 -0
- package/dist/data_import/components/ImportNewPropertyFieldPreview.js.map +1 -0
- package/dist/data_import/components/ImportSaveInProgress.js +105 -0
- package/dist/data_import/components/ImportSaveInProgress.js.map +1 -0
- package/dist/data_import/hooks/useImportConfig.js +34 -0
- package/dist/data_import/hooks/useImportConfig.js.map +1 -0
- package/dist/{import-DjQoRrIU.js → data_import/import/ImportCollectionAction.js} +53 -43
- package/dist/data_import/import/ImportCollectionAction.js.map +1 -0
- package/dist/data_import/import/index.js +2 -0
- package/dist/data_import/utils/csv.js +146 -0
- package/dist/data_import/utils/csv.js.map +1 -0
- package/dist/data_import/utils/data.js +366 -0
- package/dist/data_import/utils/data.js.map +1 -0
- package/dist/data_import/utils/file_headers.js +32 -0
- package/dist/data_import/utils/file_headers.js.map +1 -0
- package/dist/data_import/utils/file_to_json.js +149 -0
- package/dist/data_import/utils/file_to_json.js.map +1 -0
- package/dist/data_import/utils/get_import_inference_type.js +14 -0
- package/dist/data_import/utils/get_import_inference_type.js.map +1 -0
- package/dist/data_import/utils/id_column.js +27 -0
- package/dist/data_import/utils/id_column.js.map +1 -0
- package/dist/data_import/utils/import_columns.js +92 -0
- package/dist/data_import/utils/import_columns.js.map +1 -0
- package/dist/data_import/utils/save_entities.d.ts +33 -4
- package/dist/data_import/utils/save_entities.js +244 -0
- package/dist/data_import/utils/save_entities.js.map +1 -0
- package/dist/data_import/utils/transforms.js +83 -0
- package/dist/data_import/utils/transforms.js.map +1 -0
- package/dist/editor/components/SlashCommandMenu.js +497 -0
- package/dist/editor/components/SlashCommandMenu.js.map +1 -0
- package/dist/editor/components/editor-bubble-item.js +24 -0
- package/dist/editor/components/editor-bubble-item.js.map +1 -0
- package/dist/editor/components/editor-bubble.js +97 -0
- package/dist/editor/components/editor-bubble.js.map +1 -0
- package/dist/editor/components/image-bubble.js +148 -0
- package/dist/editor/components/image-bubble.js.map +1 -0
- package/dist/editor/components/table-bubble.js +406 -0
- package/dist/editor/components/table-bubble.js.map +1 -0
- package/dist/editor/editor.js +423 -0
- package/dist/editor/editor.js.map +1 -0
- package/dist/editor/extensions/HighlightDecorationExtension.js +74 -0
- package/dist/editor/extensions/HighlightDecorationExtension.js.map +1 -0
- package/dist/editor/extensions/Image.d.ts +7 -1
- package/dist/editor/extensions/Image.js +160 -0
- package/dist/editor/extensions/Image.js.map +1 -0
- package/dist/editor/extensions/TextLoadingDecorationExtension.js +82 -0
- package/dist/editor/extensions/TextLoadingDecorationExtension.js.map +1 -0
- package/dist/editor/extensions/clipboard.js +63 -0
- package/dist/editor/extensions/clipboard.js.map +1 -0
- package/dist/editor/extensions/drag-and-drop.js +354 -0
- package/dist/editor/extensions/drag-and-drop.js.map +1 -0
- package/dist/editor/hooks/useProseMirror.js +101 -0
- package/dist/editor/hooks/useProseMirror.js.map +1 -0
- package/dist/editor/hooks/useProseMirrorContext.js +11 -0
- package/dist/editor/hooks/useProseMirrorContext.js.map +1 -0
- package/dist/editor/markdown.js +154 -0
- package/dist/editor/markdown.js.map +1 -0
- package/dist/editor/nodeViews/ImageComponent.js +35 -0
- package/dist/editor/nodeViews/ImageComponent.js.map +1 -0
- package/dist/editor/nodeViews/ReactNodeView.js +57 -0
- package/dist/editor/nodeViews/ReactNodeView.js.map +1 -0
- package/dist/editor/nodeViews/TaskItemComponent.js +29 -0
- package/dist/editor/nodeViews/TaskItemComponent.js.map +1 -0
- package/dist/editor/nodeViews/index.js +21 -0
- package/dist/editor/nodeViews/index.js.map +1 -0
- package/dist/editor/plugins/index.js +54 -0
- package/dist/editor/plugins/index.js.map +1 -0
- package/dist/editor/plugins/inputrules.js +54 -0
- package/dist/editor/plugins/inputrules.js.map +1 -0
- package/dist/editor/plugins/placeholderPlugin.js +38 -0
- package/dist/editor/plugins/placeholderPlugin.js.map +1 -0
- package/dist/editor/plugins/slashCommandPlugin.js +40 -0
- package/dist/editor/plugins/slashCommandPlugin.js.map +1 -0
- package/dist/editor/sanitize-html.js +190 -0
- package/dist/editor/sanitize-html.js.map +1 -0
- package/dist/{markdown-CCqp8ibf.js → editor/schema.js} +2 -159
- package/dist/editor/schema.js.map +1 -0
- package/dist/editor/selectors/link-selector.js +118 -0
- package/dist/editor/selectors/link-selector.js.map +1 -0
- package/dist/editor/selectors/node-selector.js +118 -0
- package/dist/editor/selectors/node-selector.js.map +1 -0
- package/dist/editor/selectors/text-buttons.js +71 -0
- package/dist/editor/selectors/text-buttons.js.map +1 -0
- package/dist/editor/utils/prosemirror-utils.js +92 -0
- package/dist/editor/utils/prosemirror-utils.js.map +1 -0
- package/dist/editor/utils/remove_classes.js +16 -0
- package/dist/editor/utils/remove_classes.js.map +1 -0
- package/dist/editor.js +1 -3147
- package/dist/form/EntityForm.js +734 -0
- package/dist/form/EntityForm.js.map +1 -0
- package/dist/form/EntityFormActions.js +101 -0
- package/dist/form/EntityFormActions.js.map +1 -0
- package/dist/form/EntityFormBinding.js +256 -0
- package/dist/form/EntityFormBinding.js.map +1 -0
- package/dist/form/PropertyFieldBinding.js +298 -0
- package/dist/form/PropertyFieldBinding.js.map +1 -0
- package/dist/form/components/ErrorFocus.js +33 -0
- package/dist/form/components/ErrorFocus.js.map +1 -0
- package/dist/form/components/FieldBlock.js +118 -0
- package/dist/form/components/FieldBlock.js.map +1 -0
- package/dist/form/components/FieldHelperText.js +56 -0
- package/dist/form/components/FieldHelperText.js.map +1 -0
- package/dist/form/components/FormRail.js +118 -0
- package/dist/form/components/FormRail.js.map +1 -0
- package/dist/form/components/FormSections.js +63 -0
- package/dist/form/components/FormSections.js.map +1 -0
- package/dist/form/components/LabelWithIcon.js +29 -0
- package/dist/form/components/LabelWithIcon.js.map +1 -0
- package/dist/form/components/LocalChangesMenu.js +127 -0
- package/dist/form/components/LocalChangesMenu.js.map +1 -0
- package/dist/form/components/StorageItemPreview.js +46 -0
- package/dist/form/components/StorageItemPreview.js.map +1 -0
- package/dist/form/components/StorageUploadProgress.js +84 -0
- package/dist/form/components/StorageUploadProgress.js.map +1 -0
- package/dist/form/components/useRailVisible.js +43 -0
- package/dist/form/components/useRailVisible.js.map +1 -0
- package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.js +84 -0
- package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.js +125 -0
- package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/BinaryFieldBinding.js +135 -0
- package/dist/form/field_bindings/BinaryFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/BlockFieldBinding.js +164 -0
- package/dist/form/field_bindings/BlockFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/DateTimeFieldBinding.js +47 -0
- package/dist/form/field_bindings/DateTimeFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/GeopointFieldBinding.js +148 -0
- package/dist/form/field_bindings/GeopointFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/KeyValueFieldBinding.js +450 -0
- package/dist/form/field_bindings/KeyValueFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/MapFieldBinding.js +77 -0
- package/dist/form/field_bindings/MapFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/MarkdownEditorFieldBinding.js +215 -0
- package/dist/form/field_bindings/MarkdownEditorFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/MultiSelectFieldBinding.js +88 -0
- package/dist/form/field_bindings/MultiSelectFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/MultipleRelationFieldBinding.js +118 -0
- package/dist/form/field_bindings/MultipleRelationFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/ReadOnlyFieldBinding.js +52 -0
- package/dist/form/field_bindings/ReadOnlyFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/ReferenceFieldBinding.js +99 -0
- package/dist/form/field_bindings/ReferenceFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/RelationFieldBinding.js +135 -0
- package/dist/form/field_bindings/RelationFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/RepeatFieldBinding.js +103 -0
- package/dist/form/field_bindings/RepeatFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/SelectFieldBinding.js +80 -0
- package/dist/form/field_bindings/SelectFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/StorageUploadFieldBinding.js +266 -0
- package/dist/form/field_bindings/StorageUploadFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/SwitchFieldBinding.js +41 -0
- package/dist/form/field_bindings/SwitchFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/TextFieldBinding.js +114 -0
- package/dist/form/field_bindings/TextFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/UserSelectFieldBinding.js +48 -0
- package/dist/form/field_bindings/UserSelectFieldBinding.js.map +1 -0
- package/dist/form/field_bindings/VectorFieldBinding.js +147 -0
- package/dist/form/field_bindings/VectorFieldBinding.js.map +1 -0
- package/dist/form/form_keyboard_scope.d.ts +26 -0
- package/dist/form/form_keyboard_scope.js +39 -0
- package/dist/form/form_keyboard_scope.js.map +1 -0
- package/dist/form/form_uploads.d.ts +24 -0
- package/dist/form/form_uploads.js +31 -0
- package/dist/form/form_uploads.js.map +1 -0
- package/dist/form/form_utils.d.ts +24 -0
- package/dist/form/form_utils.js +280 -0
- package/dist/form/form_utils.js.map +1 -0
- package/dist/form/resolve_cell_property.d.ts +32 -0
- package/dist/form/resolve_cell_property.js +80 -0
- package/dist/form/resolve_cell_property.js.map +1 -0
- package/dist/form/resolve_form_properties.d.ts +2 -1
- package/dist/form/resolve_form_properties.js +78 -0
- package/dist/form/resolve_form_properties.js.map +1 -0
- package/dist/form/useClearRestoreValue.js +27 -0
- package/dist/form/useClearRestoreValue.js.map +1 -0
- package/dist/form/useUndoableDiscard.js +36 -0
- package/dist/form/useUndoableDiscard.js.map +1 -0
- package/dist/form/validation.d.ts +20 -0
- package/dist/form/validation.js +416 -0
- package/dist/form/validation.js.map +1 -0
- package/dist/hooks/navigation/contexts/CollectionRegistryContext.js +22 -0
- package/dist/hooks/navigation/contexts/CollectionRegistryContext.js.map +1 -0
- package/dist/hooks/navigation/contexts/NavigationStateContext.js +15 -0
- package/dist/hooks/navigation/contexts/NavigationStateContext.js.map +1 -0
- package/dist/hooks/navigation/contexts/UrlContext.js +22 -0
- package/dist/hooks/navigation/contexts/UrlContext.js.map +1 -0
- package/dist/hooks/navigation/useAsyncResolver.js +68 -0
- package/dist/hooks/navigation/useAsyncResolver.js.map +1 -0
- package/dist/hooks/navigation/useBuildCollectionRegistryController.js +141 -0
- package/dist/hooks/navigation/useBuildCollectionRegistryController.js.map +1 -0
- package/dist/hooks/navigation/useBuildNavigationStateController.js +77 -0
- package/dist/hooks/navigation/useBuildNavigationStateController.js.map +1 -0
- package/dist/hooks/navigation/useBuildUrlController.js +57 -0
- package/dist/hooks/navigation/useBuildUrlController.js.map +1 -0
- package/dist/hooks/navigation/useNavigationResolution.js +177 -0
- package/dist/hooks/navigation/useNavigationResolution.js.map +1 -0
- package/dist/hooks/navigation/useResolvedCollections.js +56 -0
- package/dist/hooks/navigation/useResolvedCollections.js.map +1 -0
- package/dist/hooks/navigation/useResolvedViews.js +94 -0
- package/dist/hooks/navigation/useResolvedViews.js.map +1 -0
- package/dist/hooks/navigation/useTopLevelNavigation.js +162 -0
- package/dist/hooks/navigation/useTopLevelNavigation.js.map +1 -0
- package/dist/hooks/navigation/utils.js +125 -0
- package/dist/hooks/navigation/utils.js.map +1 -0
- package/dist/hooks/useAdminContext.js +45 -0
- package/dist/hooks/useAdminContext.js.map +1 -0
- package/dist/hooks/useBreadcrumbsController.js +17 -0
- package/dist/hooks/useBreadcrumbsController.js.map +1 -0
- package/dist/hooks/useBuildSideDialogsController.js +96 -0
- package/dist/hooks/useBuildSideDialogsController.js.map +1 -0
- package/dist/hooks/useBuildSidePanel.js +221 -0
- package/dist/hooks/useBuildSidePanel.js.map +1 -0
- package/dist/hooks/useChildViewSource.js +41 -0
- package/dist/hooks/useChildViewSource.js.map +1 -0
- package/dist/hooks/useEntityDisplay.js +136 -0
- package/dist/hooks/useEntityDisplay.js.map +1 -0
- package/dist/hooks/useEntityDisplayTitle.js +34 -0
- package/dist/hooks/useEntityDisplayTitle.js.map +1 -0
- package/dist/hooks/useHistory.js +137 -0
- package/dist/hooks/useHistory.js.map +1 -0
- package/dist/hooks/useRecordActions.js +108 -0
- package/dist/hooks/useRecordActions.js.map +1 -0
- package/dist/hooks/useReferencePaths.js +32 -0
- package/dist/hooks/useReferencePaths.js.map +1 -0
- package/dist/hooks/useResolvedNavigationFrom.js +83 -0
- package/dist/hooks/useResolvedNavigationFrom.js.map +1 -0
- package/dist/hooks/useResolvedUsers.js +109 -0
- package/dist/hooks/useResolvedUsers.js.map +1 -0
- package/dist/hooks/useSelectionDialog.js +53 -0
- package/dist/hooks/useSelectionDialog.js.map +1 -0
- package/dist/hooks/useSideDialogsController.js +8 -0
- package/dist/hooks/useSideDialogsController.js.map +1 -0
- package/dist/hooks/useSidePanel.js +15 -0
- package/dist/hooks/useSidePanel.js.map +1 -0
- package/dist/hooks/useStorageReferenceResolver.d.ts +4 -2
- package/dist/hooks/useStorageReferenceResolver.js +49 -0
- package/dist/hooks/useStorageReferenceResolver.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +151 -3867
- package/dist/preview/PropertyPreview.js +260 -0
- package/dist/preview/PropertyPreview.js.map +1 -0
- package/dist/preview/compact_text.js +52 -0
- package/dist/preview/compact_text.js.map +1 -0
- package/dist/preview/components/ArrayEnumPreview.js +24 -0
- package/dist/preview/components/ArrayEnumPreview.js.map +1 -0
- package/dist/preview/components/BooleanPreview.js +25 -0
- package/dist/preview/components/BooleanPreview.js.map +1 -0
- package/dist/preview/components/DatePreview.d.ts +3 -2
- package/dist/preview/components/DatePreview.js +87 -0
- package/dist/preview/components/DatePreview.js.map +1 -0
- package/dist/preview/components/EmptyValue.js +13 -0
- package/dist/preview/components/EmptyValue.js.map +1 -0
- package/dist/preview/components/EnumValuesChip.js +26 -0
- package/dist/preview/components/EnumValuesChip.js.map +1 -0
- package/dist/preview/components/ImagePreview.d.ts +7 -1
- package/dist/preview/components/ImagePreview.js +112 -0
- package/dist/preview/components/ImagePreview.js.map +1 -0
- package/dist/preview/components/InlineEntityListPreview.js +31 -0
- package/dist/preview/components/InlineEntityListPreview.js.map +1 -0
- package/dist/preview/components/ReferencePreview.js +162 -0
- package/dist/preview/components/ReferencePreview.js.map +1 -0
- package/dist/preview/components/RelationPreview.js +196 -0
- package/dist/preview/components/RelationPreview.js.map +1 -0
- package/dist/preview/components/StorageMarkdown.d.ts +2 -1
- package/dist/preview/components/StorageMarkdown.js +49 -0
- package/dist/preview/components/StorageMarkdown.js.map +1 -0
- package/dist/preview/components/StorageThumbnail.js +183 -0
- package/dist/preview/components/StorageThumbnail.js.map +1 -0
- package/dist/preview/components/UrlComponentPreview.d.ts +3 -1
- package/dist/preview/components/UrlComponentPreview.js +88 -0
- package/dist/preview/components/UrlComponentPreview.js.map +1 -0
- package/dist/preview/components/UserPreview.js +30 -0
- package/dist/preview/components/UserPreview.js.map +1 -0
- package/dist/preview/components/date_fns_locales.js +124 -0
- package/dist/preview/components/date_fns_locales.js.map +1 -0
- package/dist/preview/components/storageRenditions.d.ts +10 -0
- package/dist/preview/components/storageRenditions.js +93 -0
- package/dist/preview/components/storageRenditions.js.map +1 -0
- package/dist/preview/property_previews/ArrayOfMapsPreview.js +44 -0
- package/dist/preview/property_previews/ArrayOfMapsPreview.js.map +1 -0
- package/dist/preview/property_previews/ArrayOfReferencesPreview.js +48 -0
- package/dist/preview/property_previews/ArrayOfReferencesPreview.js.map +1 -0
- package/dist/preview/property_previews/ArrayOfRelationsPreview.js +50 -0
- package/dist/preview/property_previews/ArrayOfRelationsPreview.js.map +1 -0
- package/dist/preview/property_previews/ArrayOfStorageComponentsPreview.js +30 -0
- package/dist/preview/property_previews/ArrayOfStorageComponentsPreview.js.map +1 -0
- package/dist/preview/property_previews/ArrayOfStringsPreview.js +42 -0
- package/dist/preview/property_previews/ArrayOfStringsPreview.js.map +1 -0
- package/dist/preview/property_previews/ArrayOneOfPreview.js +47 -0
- package/dist/preview/property_previews/ArrayOneOfPreview.js.map +1 -0
- package/dist/preview/property_previews/ArrayPropertyEnumPreview.js +25 -0
- package/dist/preview/property_previews/ArrayPropertyEnumPreview.js.map +1 -0
- package/dist/preview/property_previews/ArrayPropertyPreview.js +48 -0
- package/dist/preview/property_previews/ArrayPropertyPreview.js.map +1 -0
- package/dist/preview/property_previews/MapPropertyPreview.js +137 -0
- package/dist/preview/property_previews/MapPropertyPreview.js.map +1 -0
- package/dist/preview/property_previews/NumberPropertyPreview.js +34 -0
- package/dist/preview/property_previews/NumberPropertyPreview.js.map +1 -0
- package/dist/preview/property_previews/SkeletonPropertyComponent.js +151 -0
- package/dist/preview/property_previews/SkeletonPropertyComponent.js.map +1 -0
- package/dist/preview/property_previews/StringPropertyPreview.js +49 -0
- package/dist/preview/property_previews/StringPropertyPreview.js.map +1 -0
- package/dist/preview/util.d.ts +4 -3
- package/dist/{util-D7ebttKT.js → preview/util.js} +8 -5
- package/dist/preview/util.js.map +1 -0
- package/dist/routes/CustomViewRoute.js +26 -0
- package/dist/routes/CustomViewRoute.js.map +1 -0
- package/dist/routes/RebaseRoute.js +311 -0
- package/dist/routes/RebaseRoute.js.map +1 -0
- package/dist/selection/SelectionMenu.js +90 -0
- package/dist/selection/SelectionMenu.js.map +1 -0
- package/dist/selection/resolve_selection.js +79 -0
- package/dist/selection/resolve_selection.js.map +1 -0
- package/dist/util/caller_scopes.js +25 -0
- package/dist/util/caller_scopes.js.map +1 -0
- package/dist/util/collection_open_mode.d.ts +20 -0
- package/dist/util/collection_open_mode.js +32 -0
- package/dist/util/collection_open_mode.js.map +1 -0
- package/dist/util/dataControllerAdapter.js +65 -0
- package/dist/util/dataControllerAdapter.js.map +1 -0
- package/dist/util/entity_actions.d.ts +5 -0
- package/dist/util/entity_actions.js +77 -0
- package/dist/util/entity_actions.js.map +1 -0
- package/dist/util/entity_pages.d.ts +37 -3
- package/dist/util/entity_pages.js +71 -0
- package/dist/util/entity_pages.js.map +1 -0
- package/dist/util/find_entities_by_ids.d.ts +23 -0
- package/dist/util/find_entities_by_ids.js +55 -0
- package/dist/util/find_entities_by_ids.js.map +1 -0
- package/dist/util/fit_inline_actions.js +40 -0
- package/dist/util/fit_inline_actions.js.map +1 -0
- package/dist/util/format_collection_date.d.ts +29 -0
- package/dist/util/format_collection_date.js +60 -0
- package/dist/util/format_collection_date.js.map +1 -0
- package/dist/util/map_with_concurrency.js +46 -0
- package/dist/util/map_with_concurrency.js.map +1 -0
- package/dist/util/navigation_utils.js +45 -0
- package/dist/util/navigation_utils.js.map +1 -0
- package/dist/util/number_format.js +33 -0
- package/dist/util/number_format.js.map +1 -0
- package/dist/util/previews.js +71 -0
- package/dist/util/previews.js.map +1 -0
- package/dist/util/propertyConfigMapper.js +83 -0
- package/dist/util/propertyConfigMapper.js.map +1 -0
- package/dist/util/property_utils.js +141 -0
- package/dist/util/property_utils.js.map +1 -0
- package/dist/util/resolutions.js +55 -0
- package/dist/util/resolutions.js.map +1 -0
- package/dist/util/view_constants.js +35 -0
- package/dist/util/view_constants.js.map +1 -0
- package/dist/util/view_mode.js +112 -0
- package/dist/util/view_mode.js.map +1 -0
- package/package.json +13 -9
- package/dist/CollectionEditorDialog-p5-I-Apu.js +0 -3669
- package/dist/CollectionEditorDialog-p5-I-Apu.js.map +0 -1
- package/dist/JsonPreviewBinding-v0w3H0fp.js.map +0 -1
- package/dist/PropertyEditView-DDB_X-00.js +0 -3837
- package/dist/PropertyEditView-DDB_X-00.js.map +0 -1
- package/dist/RouterCollectionsStudioView-SGBV4CMg.js +0 -212
- package/dist/RouterCollectionsStudioView-SGBV4CMg.js.map +0 -1
- package/dist/SchemaChangeDialog-CcFSXvkK.js.map +0 -1
- package/dist/collection_editor/ui/CollectionViewHeaderAction.d.ts +0 -13
- package/dist/collection_editor/ui/PropertyAddColumnComponent.d.ts +0 -8
- package/dist/collection_editor_ui.js.map +0 -1
- package/dist/editor.js.map +0 -1
- package/dist/export-DCHuPD1a.js +0 -520
- package/dist/export-DCHuPD1a.js.map +0 -1
- package/dist/history-CBd6SBRs.js +0 -314
- package/dist/history-CBd6SBRs.js.map +0 -1
- package/dist/import-DjQoRrIU.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/markdown-CCqp8ibf.js.map +0 -1
- package/dist/rolldown-runtime-D7D4PA-g.js +0 -13
- package/dist/util-BRvKFMLa.js +0 -27773
- package/dist/util-BRvKFMLa.js.map +0 -1
- package/dist/util-D7ebttKT.js.map +0 -1
|
@@ -1,34 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { Alert, Button, Chip, CircularProgress, Dialog, DialogActions, DialogContent, DialogTitle, Typography, cls } from "@rebasepro/ui";
|
|
1
|
+
import "react";
|
|
4
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Alert, Button, Chip, CircularProgress, Dialog, DialogActions, DialogContent, DialogTitle, ExpandablePanel, Typography, cls } from "@rebasepro/ui";
|
|
5
4
|
//#region src/collection_editor/ui/collection_editor/SchemaChangeDialog.tsx
|
|
6
|
-
/**
|
|
7
|
-
* What a schema change would do, before it does it.
|
|
8
|
-
*
|
|
9
|
-
* The dialog exists because a schema change has three possible verdicts and two
|
|
10
|
-
* of them are refusals. Without a preview, the only way to discover that a
|
|
11
|
-
* change is refused is to press a button on a live database and read what comes
|
|
12
|
-
* back — which is a fine way to learn and a poor way to work.
|
|
13
|
-
*
|
|
14
|
-
* ## What it shows, in the order somebody reads it
|
|
15
|
-
*
|
|
16
|
-
* The verdict first, in a sentence, because it decides whether the rest is
|
|
17
|
-
* worth reading. Then the changes, each with what it does and — when it is
|
|
18
|
-
* refused — what to do instead. Then the things that are easy to skip past and
|
|
19
|
-
* expensive to have skipped: constraints the change asks for that the database
|
|
20
|
-
* will not end up enforcing. The SQL and the file list come last, collapsed,
|
|
21
|
-
* for the reader who wants them; they are the evidence, not the summary.
|
|
22
|
-
*
|
|
23
|
-
* ## Why the button says "Commit and apply"
|
|
24
|
-
*
|
|
25
|
-
* Because that is the order, and the order is the feature. The commit lands
|
|
26
|
-
* first, so a failed apply leaves the repository ahead of the database — the
|
|
27
|
-
* ordinary state of every project between an edit and a deploy, which the next
|
|
28
|
-
* boot reconciles. A button labelled "Save" would be describing a different,
|
|
29
|
-
* worse thing.
|
|
30
|
-
*/
|
|
31
|
-
var SchemaChangeDialog_exports = /* @__PURE__ */ __exportAll({ SchemaChangeDialog: () => SchemaChangeDialog });
|
|
32
5
|
/** What the verdict means, in the words the reader needs rather than the enum's. */
|
|
33
6
|
/**
|
|
34
7
|
* What the verdict means, in the words the reader needs rather than the enum's.
|
|
@@ -74,26 +47,23 @@ var monospace = "font-mono text-xs leading-relaxed";
|
|
|
74
47
|
var codeBlock = cls(monospace, "bg-surface-raised rounded-md p-3 overflow-x-auto whitespace-pre");
|
|
75
48
|
/** A disclosure that starts closed. The evidence, for the reader who wants it. */
|
|
76
49
|
function Details({ summary, count, children }) {
|
|
77
|
-
const [open, setOpen] = useState(false);
|
|
78
50
|
if (count === 0) return null;
|
|
79
|
-
return /* @__PURE__ */
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}), open && /* @__PURE__ */ jsx("div", {
|
|
94
|
-
className: "mt-2",
|
|
51
|
+
return /* @__PURE__ */ jsx(ExpandablePanel, {
|
|
52
|
+
initiallyExpanded: false,
|
|
53
|
+
titleClassName: "!min-h-0 !py-2 px-3",
|
|
54
|
+
innerClassName: "p-3",
|
|
55
|
+
title: /* @__PURE__ */ jsxs(Typography, {
|
|
56
|
+
variant: "body2",
|
|
57
|
+
color: "secondary",
|
|
58
|
+
children: [
|
|
59
|
+
summary,
|
|
60
|
+
" (",
|
|
61
|
+
count,
|
|
62
|
+
")"
|
|
63
|
+
]
|
|
64
|
+
}),
|
|
95
65
|
children
|
|
96
|
-
})
|
|
66
|
+
});
|
|
97
67
|
}
|
|
98
68
|
/**
|
|
99
69
|
* What still has to happen after this lands.
|
|
@@ -144,16 +114,21 @@ function WithheldConstraints({ constraints }) {
|
|
|
144
114
|
children: constraints.map((constraint) => /* @__PURE__ */ jsxs("li", {
|
|
145
115
|
className: "text-sm",
|
|
146
116
|
children: [
|
|
147
|
-
/* @__PURE__ */ jsx(
|
|
148
|
-
|
|
117
|
+
/* @__PURE__ */ jsx(Typography, {
|
|
118
|
+
component: "code",
|
|
119
|
+
variant: "mono",
|
|
120
|
+
className: "bg-surface-raised px-1 rounded-md",
|
|
149
121
|
children: constraint.target
|
|
150
122
|
}),
|
|
151
|
-
/* @__PURE__ */ jsx(
|
|
123
|
+
/* @__PURE__ */ jsx(Typography, {
|
|
124
|
+
variant: "body2",
|
|
152
125
|
className: "mt-1",
|
|
153
126
|
children: constraint.reason
|
|
154
127
|
}),
|
|
155
|
-
/* @__PURE__ */ jsx(
|
|
156
|
-
|
|
128
|
+
/* @__PURE__ */ jsx(Typography, {
|
|
129
|
+
variant: "body2",
|
|
130
|
+
color: "secondary",
|
|
131
|
+
className: "mt-1",
|
|
157
132
|
children: constraint.remedy
|
|
158
133
|
})
|
|
159
134
|
]
|
|
@@ -202,7 +177,11 @@ function Applied({ result }) {
|
|
|
202
177
|
className: "mt-2",
|
|
203
178
|
children: [
|
|
204
179
|
"The commit is on ",
|
|
205
|
-
/* @__PURE__ */ jsx(
|
|
180
|
+
/* @__PURE__ */ jsx(Typography, {
|
|
181
|
+
component: "code",
|
|
182
|
+
variant: "mono",
|
|
183
|
+
children: result.committed.branch
|
|
184
|
+
}),
|
|
206
185
|
" either way, so whatever did not run will be applied on the next boot."
|
|
207
186
|
]
|
|
208
187
|
})
|
|
@@ -245,8 +224,10 @@ function SchemaChangeDialog({ open, collectionId, plan, planError, result, apply
|
|
|
245
224
|
children: [
|
|
246
225
|
/* @__PURE__ */ jsxs(DialogTitle, {
|
|
247
226
|
className: "flex items-center gap-2",
|
|
248
|
-
children: [result ? result.sourceOnly ? "Schema change committed" : "Schema change applied" : "Review schema change", /* @__PURE__ */ jsx(
|
|
249
|
-
|
|
227
|
+
children: [result ? result.sourceOnly ? "Schema change committed" : "Schema change applied" : "Review schema change", /* @__PURE__ */ jsx(Typography, {
|
|
228
|
+
component: "code",
|
|
229
|
+
variant: "mono",
|
|
230
|
+
color: "secondary",
|
|
250
231
|
children: collectionId
|
|
251
232
|
})]
|
|
252
233
|
}),
|
|
@@ -375,8 +356,10 @@ function SchemaChangeDialog({ open, collectionId, plan, planError, result, apply
|
|
|
375
356
|
]
|
|
376
357
|
}),
|
|
377
358
|
/* @__PURE__ */ jsxs(DialogActions, { children: [
|
|
378
|
-
!result && target?.repository && /* @__PURE__ */ jsxs(
|
|
379
|
-
|
|
359
|
+
!result && target?.repository && /* @__PURE__ */ jsxs(Typography, {
|
|
360
|
+
variant: "caption",
|
|
361
|
+
color: "secondary",
|
|
362
|
+
className: cls(monospace, "mr-auto truncate"),
|
|
380
363
|
children: [
|
|
381
364
|
"→ ",
|
|
382
365
|
repositoryLabel(target.repository),
|
|
@@ -412,6 +395,6 @@ function SchemaChangeDialog({ open, collectionId, plan, planError, result, apply
|
|
|
412
395
|
});
|
|
413
396
|
}
|
|
414
397
|
//#endregion
|
|
415
|
-
export {
|
|
398
|
+
export { SchemaChangeDialog };
|
|
416
399
|
|
|
417
|
-
//# sourceMappingURL=SchemaChangeDialog
|
|
400
|
+
//# sourceMappingURL=SchemaChangeDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaChangeDialog.js","names":[],"sources":["../../../../src/collection_editor/ui/collection_editor/SchemaChangeDialog.tsx"],"sourcesContent":["/**\n * What a schema change would do, before it does it.\n *\n * The dialog exists because a schema change has three possible verdicts and two\n * of them are refusals. Without a preview, the only way to discover that a\n * change is refused is to press a button on a live database and read what comes\n * back — which is a fine way to learn and a poor way to work.\n *\n * ## What it shows, in the order somebody reads it\n *\n * The verdict first, in a sentence, because it decides whether the rest is\n * worth reading. Then the changes, each with what it does and — when it is\n * refused — what to do instead. Then the things that are easy to skip past and\n * expensive to have skipped: constraints the change asks for that the database\n * will not end up enforcing. The SQL and the file list come last, collapsed,\n * for the reader who wants them; they are the evidence, not the summary.\n *\n * ## Why the button says \"Commit and apply\"\n *\n * Because that is the order, and the order is the feature. The commit lands\n * first, so a failed apply leaves the repository ahead of the database — the\n * ordinary state of every project between an edit and a deploy, which the next\n * boot reconciles. A button labelled \"Save\" would be describing a different,\n * worse thing.\n */\nimport React from \"react\";\nimport {\n Alert,\n Button,\n Chip,\n CircularProgress,\n cls,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n ExpandablePanel,\n Typography\n} from \"@rebasepro/ui\";\n\nimport type { LiveSchemaPlan, LiveSchemaResult, WithheldConstraint } from \"../../liveSchemaClient\";\n\nexport interface SchemaChangeDialogProps {\n open: boolean;\n /** The collection being changed, for the title. */\n collectionId: string;\n /** `undefined` while the plan is still being fetched. */\n plan?: LiveSchemaPlan;\n /** Set when planning itself failed — a network error, a refusal, a 500. */\n planError?: string;\n /** Set once the change has been applied, which turns this into a receipt. */\n result?: LiveSchemaResult;\n applying: boolean;\n /** Set when the apply threw rather than returning a result. */\n applyError?: string;\n onConfirm: () => void;\n /**\n * Ask again, when planning failed.\n *\n * A dropped connection should cost a click, not the whole wizard. The form\n * is already filled in, and making somebody redo it for a transient failure\n * teaches them to distrust the preview rather than the network.\n */\n onRetry?: () => void;\n /**\n * Write the collection source and leave the database alone.\n *\n * Offered only when the change is refused, and it is what keeps the editor\n * usable while it is. Removing a property is the ordinary case: the ensure\n * path has no `DROP COLUMN`, so a removal can never be applied — and\n * refusing the whole save over it would mean a dev could no longer delete a\n * field from a collection they are still designing.\n *\n * This is exactly what the editor did before live editing existed, so it is\n * not a new hazard; the difference is that it now says what it leaves\n * behind instead of reporting success.\n */\n onSourceOnly?: () => void;\n onClose: () => void;\n /**\n * Why this caller may preview but not apply, when that is the case.\n *\n * A person signed in with an API key, most often. Shown next to a disabled\n * button so the refusal arrives while they are deciding rather than after\n * they have decided.\n */\n applyRefusedBecause?: string;\n /**\n * Where a confirmation would land — `owner/repo` and a branch.\n *\n * On screen before the button, not in the receipt after it. A commit is\n * going somewhere, and which branch it is going to is the one fact somebody\n * cannot recover from being wrong about.\n */\n target?: { repository?: string; branch?: string };\n}\n\ntype Verdict = LiveSchemaPlan[\"verdict\"];\n\n/** What the verdict means, in the words the reader needs rather than the enum's. */\n/**\n * What the verdict means, in the words the reader needs rather than the enum's.\n *\n * `safe` is written twice because the two cases are genuinely different, and\n * saying \"can be made against the running database\" when nothing will be run is\n * the kind of small lie that teaches people to stop reading. A document\n * database has no table to alter, and a change that needs no DDL on a\n * relational one is in the same position: the commit *is* the change.\n */\nconst VERDICT_COPY: Record<Verdict, { title: string; body: string; color: \"info\" | \"warning\" | \"error\" }> = {\n safe: {\n title: \"Ready to apply\",\n body: \"Every change here can be made against the running database.\",\n color: \"info\"\n },\n diverges: {\n title: \"This would leave the database out of step\",\n body: \"The change can be written, but the database will not end up matching it. \" +\n \"The details below say which part, and what would make it applicable.\",\n color: \"warning\"\n },\n \"needs-migration\": {\n title: \"This needs a migration\",\n body: \"Some of this cannot be done to a running database at all — it drops or rewrites \" +\n \"something, and that belongs in a migration somebody has read.\",\n color: \"error\"\n }\n};\n\nconst VERDICT_CHIP: Record<Verdict, { label: string; scheme: \"greenLighter\" | \"orangeLighter\" | \"redLighter\" }> = {\n safe: { label: \"safe\", scheme: \"greenLighter\" },\n diverges: { label: \"diverges\", scheme: \"orangeLighter\" },\n \"needs-migration\": { label: \"needs migration\", scheme: \"redLighter\" }\n};\n\nconst monospace = \"font-mono text-xs leading-relaxed\";\nconst codeBlock = cls(\n monospace,\n \"bg-surface-raised rounded-md p-3 overflow-x-auto whitespace-pre\"\n);\n\n/** A disclosure that starts closed. The evidence, for the reader who wants it. */\nfunction Details({ summary, count, children }: {\n summary: string;\n count: number;\n children: React.ReactNode;\n}) {\n if (count === 0) return null;\n return (\n <ExpandablePanel\n initiallyExpanded={false}\n titleClassName=\"!min-h-0 !py-2 px-3\"\n innerClassName=\"p-3\"\n title={<Typography variant=\"body2\" color=\"secondary\">{summary} ({count})</Typography>}\n >\n {children}\n </ExpandablePanel>\n );\n}\n\n/**\n * What still has to happen after this lands.\n *\n * Above the evidence and below the changes, because it is not a refusal and not\n * a detail: the change will apply, and something outside this dialog still has\n * to be done or a later environment will differ from this one.\n */\nfunction FollowUp({ items }: { items: string[] }) {\n if (items.length === 0) return null;\n return (\n <Alert color=\"info\">\n <Typography variant=\"body2\" className=\"font-medium mb-1\">\n {items.length === 1 ? \"One thing to do afterwards\" : \"To do afterwards\"}\n </Typography>\n <ul className=\"space-y-2\">\n {items.map(item => (\n <li key={item} className=\"text-sm\">{item}</li>\n ))}\n </ul>\n </Alert>\n );\n}\n\n/**\n * The destination, short enough to read at a glance.\n *\n * A remote repository already reports itself as `owner/repo`, which is exactly\n * what somebody recognises. A local one reports an absolute path, and the\n * leading directories are the part nobody needs: what matters is which\n * checkout, and its name says that.\n */\nfunction repositoryLabel(repository: string): string {\n if (!repository.startsWith(\"/\")) return repository;\n return repository.split(\"/\").filter(Boolean).pop() ?? repository;\n}\n\nfunction WithheldConstraints({ constraints }: { constraints: WithheldConstraint[] }) {\n if (constraints.length === 0) return null;\n return (\n <Alert color=\"warning\">\n <Typography variant=\"body2\" className=\"font-medium mb-1\">\n {constraints.length === 1\n ? \"One constraint will not be enforced\"\n : `${constraints.length} constraints will not be enforced`}\n </Typography>\n <ul className=\"space-y-2\">\n {constraints.map(constraint => (\n <li key={constraint.target} className=\"text-sm\">\n <Typography component=\"code\" variant=\"mono\" className=\"bg-surface-raised px-1 rounded-md\">\n {constraint.target}\n </Typography>\n <Typography variant=\"body2\" className=\"mt-1\">{constraint.reason}</Typography>\n <Typography variant=\"body2\" color=\"secondary\" className=\"mt-1\">\n {constraint.remedy}\n </Typography>\n </li>\n ))}\n </ul>\n </Alert>\n );\n}\n\n/**\n * How far a failed apply got, in a heading.\n *\n * The statements run one at a time with no transaction around them, so only\n * \"none ran\" means the database is as it was.\n */\nfunction partialApplyHeading(result: LiveSchemaResult): string {\n const ran = result.appliedStatements;\n if (ran === 0) return \"The database was not changed\";\n if (ran === undefined) return \"The database may have been changed in part\";\n return `${ran} of ${result.statements.length} statements ran, then one failed`;\n}\n\n/** The receipt. Shown in place of the plan once the change has been applied. */\nfunction Applied({ result }: { result: LiveSchemaResult }) {\n return (\n <div className=\"flex flex-col gap-4\">\n <Alert color={result.applied || result.sourceOnly ? \"success\" : \"warning\"}>\n <Typography variant=\"body2\">{result.summary}</Typography>\n </Alert>\n\n {!result.applied && !result.sourceOnly && result.applyError && (\n // Deliberately not an error state. The commit landed, which is\n // the durable half; the database is now behind the repository,\n // which is where every project sits between an edit and a\n // deploy, and boot reconciles it.\n <Alert color=\"warning\">\n <Typography variant=\"body2\" className=\"font-medium mb-1\">\n {partialApplyHeading(result)}\n </Typography>\n <Typography variant=\"body2\">{result.applyError}</Typography>\n <Typography variant=\"body2\" className=\"mt-2\">\n The commit is on <Typography component=\"code\" variant=\"mono\">{result.committed.branch}</Typography> either way, so\n whatever did not run will be applied on the next boot.\n </Typography>\n </Alert>\n )}\n\n <WithheldConstraints constraints={result.withheldConstraints ?? []}/>\n <FollowUp items={result.followUp ?? []}/>\n\n <div>\n <Typography variant=\"label\" color=\"secondary\">Committed</Typography>\n <div className={cls(codeBlock, \"mt-1\")}>\n {result.committed.sha.slice(0, 9)} on {result.committed.branch}\n {\"\\n\"}\n {result.committed.files.map(file => ` ${file}`).join(\"\\n\")}\n </div>\n </div>\n </div>\n );\n}\n\nexport function SchemaChangeDialog({\n open,\n collectionId,\n plan,\n planError,\n result,\n applying,\n applyError,\n onConfirm,\n onRetry,\n onSourceOnly,\n onClose,\n applyRefusedBecause,\n target\n}: SchemaChangeDialogProps) {\n\n const verdict = plan?.verdict;\n const statements = plan?.statements.length ?? 0;\n\n // \"Commit\" only when we positively know there is nothing to apply: a plan\n // that is going ahead and has no statements. A *refused* plan also has none\n // — because it will not run — and labelling that button \"Commit\" would be\n // describing the change it is refusing to make. Unknown reads as the fuller\n // action, which is the safer way to be wrong about a label.\n const commitOnly = Boolean(plan?.applicable) && statements === 0;\n\n // Described from the plan rather than from an assumption about the engine.\n // A document database runs nothing; so does a relational change that only\n // moves source. Both are a commit, and calling either one \"apply\" would be\n // describing something that does not happen.\n // A plan with changes and no statements still changes something — a\n // security rule takes effect when the server next starts — so \"there is\n // no schema change to make\" is said only when there is none.\n const copy = verdict === \"safe\" && commitOnly\n ? {\n title: \"Ready to commit\",\n body: plan && plan.changes.length > 0\n ? \"Nothing runs against the database now. Each change below says what it does and \" +\n \"when it takes effect.\"\n : \"This changes what your project declares. Nothing runs against the database — \" +\n \"there is no schema change to make.\",\n color: \"info\" as const\n }\n : verdict\n ? VERDICT_COPY[verdict]\n : undefined;\n\n return (\n <Dialog open={open} onOpenChange={value => { if (!value) onClose(); }} maxWidth=\"3xl\">\n <DialogTitle className=\"flex items-center gap-2\">\n {result ? (result.sourceOnly ? \"Schema change committed\" : \"Schema change applied\") : \"Review schema change\"}\n <Typography component=\"code\" variant=\"mono\" color=\"secondary\">\n {collectionId}\n </Typography>\n </DialogTitle>\n\n <DialogContent className=\"flex flex-col gap-4\">\n {planError && (\n <Alert color=\"error\">\n <Typography variant=\"body2\" className=\"font-medium mb-1\">\n The change could not be planned\n </Typography>\n <Typography variant=\"body2\">{planError}</Typography>\n </Alert>\n )}\n\n {!plan && !planError && !result && (\n <div className=\"flex items-center gap-3 py-6\">\n <CircularProgress size=\"small\"/>\n <Typography variant=\"body2\" color=\"secondary\">\n Working out what this change would do…\n </Typography>\n </div>\n )}\n\n {result && <Applied result={result}/>}\n\n {plan && !result && copy && (\n <>\n <Alert color={copy.color}>\n <Typography variant=\"body2\" className=\"font-medium mb-1\">\n {copy.title}\n </Typography>\n <Typography variant=\"body2\">{copy.body}</Typography>\n </Alert>\n\n {applyError && (\n <Alert color=\"error\">\n <Typography variant=\"body2\">{applyError}</Typography>\n </Alert>\n )}\n\n {plan.changes.length === 0 && (\n <Typography variant=\"body2\" color=\"secondary\">\n Nothing here changes the shape of your data. Only the collection\n source changes, and it is committed.\n </Typography>\n )}\n\n {!plan.applicable && onSourceOnly && (\n // Said per change: what a removal leaves behind is\n // not what a type change or a new required field\n // does, and the one that breaks every insert has to\n // be on screen before the button is pressed.\n <Alert color=\"warning\">\n <Typography variant=\"body2\" className=\"font-medium mb-1\">\n Edit source only: commit the collection, leave the database\n </Typography>\n <ul className=\"space-y-1\">\n {plan.changes.filter(change => change.verdict !== \"safe\" && change.sourceOnly).map((change, index) => (\n <li key={`${change.property ?? change.collection}.${index}`} className=\"text-sm\">\n {change.sourceOnly}\n </li>\n ))}\n </ul>\n </Alert>\n )}\n\n {plan.changes.length > 0 && (\n <ul className=\"flex flex-col gap-3\">\n {plan.changes.map((change, index) => (\n <li\n key={`${change.collection}.${change.property ?? \"\"}.${index}`}\n className=\"flex gap-3\"\n >\n <Chip\n size=\"smallest\"\n colorScheme={VERDICT_CHIP[change.verdict].scheme}\n className=\"shrink-0 mt-0.5\"\n >\n {VERDICT_CHIP[change.verdict].label}\n </Chip>\n <div className=\"min-w-0\">\n <Typography variant=\"body2\">{change.detail}</Typography>\n {change.remedy && (\n <Typography\n variant=\"body2\"\n color=\"secondary\"\n className=\"mt-1\"\n >\n {change.remedy}\n </Typography>\n )}\n </div>\n </li>\n ))}\n </ul>\n )}\n\n <WithheldConstraints constraints={plan.withheldConstraints ?? []}/>\n <FollowUp items={plan.followUp ?? []}/>\n\n {applyRefusedBecause && (\n <Alert color=\"info\">\n <Typography variant=\"body2\" className=\"font-medium mb-1\">\n You can preview this change, but not apply it\n </Typography>\n <Typography variant=\"body2\">{applyRefusedBecause}</Typography>\n </Alert>\n )}\n\n <Details summary=\"Statements that will run\" count={plan.statements.length}>\n <div className={codeBlock}>{plan.statements.join(\"\\n\")}</div>\n </Details>\n\n <Details summary=\"Files that will be committed\" count={plan.files.length}>\n <div className={codeBlock}>{plan.files.join(\"\\n\")}</div>\n </Details>\n\n <Details summary=\"Commit message\" count={plan.message ? 1 : 0}>\n <div className={codeBlock}>{plan.message}</div>\n </Details>\n </>\n )}\n </DialogContent>\n\n <DialogActions>\n {!result && target?.repository && (\n <Typography variant=\"caption\" color=\"secondary\" className={cls(monospace, \"mr-auto truncate\")}>\n → {repositoryLabel(target.repository)}{target.branch ? ` · ${target.branch}` : \"\"}\n </Typography>\n )}\n <Button variant=\"text\" onClick={onClose} disabled={applying}>\n {result ? \"Close\" : \"Cancel\"}\n </Button>\n {!result && planError && onRetry && (\n <Button variant=\"outlined\" onClick={onRetry}>\n Try again\n </Button>\n )}\n {!result && plan && !plan.applicable && onSourceOnly && (\n <Button variant=\"outlined\" onClick={onSourceOnly} disabled={applying}>\n Edit source only\n </Button>\n )}\n {!result && (\n <Button\n variant=\"filled\"\n color=\"primary\"\n onClick={onConfirm}\n // `applicable` is the server's word, not a\n // re-derivation from the verdicts on screen:\n // `applySchemaChange` re-checks it before it writes\n // anything, so a button that disagreed would only\n // produce the same refusal one click later. The same\n // goes for the permission — `/apply` checks it too, and\n // this only saves somebody the round trip.\n disabled={!plan?.applicable || applying || Boolean(applyRefusedBecause)}\n >\n {applying\n ? (commitOnly ? \"Committing…\" : \"Applying…\")\n : (commitOnly ? \"Commit\" : \"Commit and apply\")}\n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KACX,EAAA,CAAA;IAEK;;GAEf,qBAAC,eAAD,EAAA,UAAA;IACK,CAAC,UAAU,QAAQ,cAChB,qBAAC,YAAD;KAAY,SAAQ;KAAU,OAAM;KAAY,WAAW,IAAI,WAAW,kBAAkB;eAA5F;MAA+F;MACxF,gBAAgB,OAAO,UAAU;MAAG,OAAO,SAAS,MAAM,OAAO,WAAW;KACvE;;IAEhB,oBAAC,QAAD;KAAQ,SAAQ;KAAO,SAAS;KAAS,UAAU;eAC9C,SAAS,UAAU;IAChB,CAAA;IACP,CAAC,UAAU,aAAa,WACrB,oBAAC,QAAD;KAAQ,SAAQ;KAAW,SAAS;eAAS;IAErC,CAAA;IAEX,CAAC,UAAU,QAAQ,CAAC,KAAK,cAAc,gBACpC,oBAAC,QAAD;KAAQ,SAAQ;KAAW,SAAS;KAAc,UAAU;eAAU;IAE9D,CAAA;IAEX,CAAC,UACE,oBAAC,QAAD;KACI,SAAQ;KACR,OAAM;KACN,SAAS;KAQT,UAAU,CAAC,MAAM,cAAc,YAAY,QAAQ,mBAAmB;eAErE,WACM,aAAa,gBAAgB,cAC7B,aAAa,WAAW;IAC3B,CAAA;GAED,EAAA,CAAA;EACX;;AAEhB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { BooleanSwitchWithLabel, Tooltip } from "@rebasepro/ui";
|
|
4
|
+
//#region src/collection_editor/ui/collection_editor/SwitchControl.tsx
|
|
5
|
+
function SwitchControl({ field, form, label, tooltip, disabled, size = "small", allowIndeterminate }) {
|
|
6
|
+
const formControlLabel = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, {
|
|
7
|
+
label,
|
|
8
|
+
size,
|
|
9
|
+
position: "start",
|
|
10
|
+
value: field.value,
|
|
11
|
+
disabled,
|
|
12
|
+
allowIndeterminate,
|
|
13
|
+
onValueChange: (checked) => form.setFieldValue(field.name, checked)
|
|
14
|
+
});
|
|
15
|
+
if (tooltip) return /* @__PURE__ */ jsx(Tooltip, {
|
|
16
|
+
title: tooltip,
|
|
17
|
+
children: formControlLabel
|
|
18
|
+
});
|
|
19
|
+
return formControlLabel;
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { SwitchControl };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=SwitchControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwitchControl.js","names":[],"sources":["../../../../src/collection_editor/ui/collection_editor/SwitchControl.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { BooleanSwitchWithLabel, Tooltip } from \"@rebasepro/ui\";\nimport { FormexFieldProps } from \"@rebasepro/forms\";\n\nexport function SwitchControl({\n field,\n form,\n label,\n tooltip,\n disabled,\n size = \"small\",\n allowIndeterminate\n}: FormexFieldProps & {\n label: string,\n tooltip?: string,\n disabled?: boolean,\n size?: \"small\" | \"medium\",\n allowIndeterminate?: boolean\n}) {\n\n const formControlLabel = <BooleanSwitchWithLabel\n label={label}\n size={size}\n position={\"start\"}\n value={field.value}\n disabled={disabled}\n allowIndeterminate={allowIndeterminate}\n onValueChange={(checked: boolean | null) => form.setFieldValue(field.name, checked)}/>;\n\n if (tooltip)\n return (\n <Tooltip\n title={tooltip}>\n {formControlLabel}\n </Tooltip>\n );\n return formControlLabel;\n}\n"],"mappings":";;;;AAKA,SAAgB,cAAc,EAC1B,OACA,MACA,OACA,SACA,UACA,OAAO,SACP,sBAOD;CAEC,MAAM,mBAAmB,oBAAC,wBAAD;EACd;EACD;EACN,UAAU;EACV,OAAO,MAAM;EACH;EACU;EACpB,gBAAgB,YAA4B,KAAK,cAAc,MAAM,MAAM,OAAO;CAAG,CAAA;CAEzF,IAAI,SACA,OACI,oBAAC,SAAD;EACI,OAAO;YACN;CACI,CAAA;CAEjB,OAAO;AACX"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { useId } from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { KanbanIcon, LayoutGridIcon, ListIcon, TableIcon, ToggleButtonGroup, Typography, cls } from "@rebasepro/ui";
|
|
4
|
+
import { getIcon, useCustomizationController } from "@rebasepro/app";
|
|
5
|
+
//#region src/collection_editor/ui/collection_editor/ViewModeSwitch.tsx
|
|
6
|
+
function ViewModeSwitch({ value, onChange, className }) {
|
|
7
|
+
const registeredViews = useCustomizationController().collectionViews ?? [];
|
|
8
|
+
const labelId = useId();
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
10
|
+
className: cls(className),
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ jsx(Typography, {
|
|
13
|
+
id: labelId,
|
|
14
|
+
variant: "label",
|
|
15
|
+
color: "secondary",
|
|
16
|
+
className: "ml-3.5",
|
|
17
|
+
children: "Default collection view"
|
|
18
|
+
}),
|
|
19
|
+
/* @__PURE__ */ jsx("div", {
|
|
20
|
+
className: "my-2",
|
|
21
|
+
children: /* @__PURE__ */ jsx(ToggleButtonGroup, {
|
|
22
|
+
"aria-labelledby": labelId,
|
|
23
|
+
value,
|
|
24
|
+
onValueChange: onChange,
|
|
25
|
+
options: [
|
|
26
|
+
{
|
|
27
|
+
value: "list",
|
|
28
|
+
label: "List",
|
|
29
|
+
icon: /* @__PURE__ */ jsx(ListIcon, {})
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
value: "table",
|
|
33
|
+
label: "Table",
|
|
34
|
+
icon: /* @__PURE__ */ jsx(TableIcon, {})
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
value: "cards",
|
|
38
|
+
label: "Cards",
|
|
39
|
+
icon: /* @__PURE__ */ jsx(LayoutGridIcon, {})
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
value: "kanban",
|
|
43
|
+
label: "Kanban",
|
|
44
|
+
icon: /* @__PURE__ */ jsx(KanbanIcon, {})
|
|
45
|
+
},
|
|
46
|
+
...registeredViews.map((view) => ({
|
|
47
|
+
value: view.key,
|
|
48
|
+
label: view.name,
|
|
49
|
+
icon: getIcon(view.icon) ?? /* @__PURE__ */ jsx(ListIcon, {})
|
|
50
|
+
}))
|
|
51
|
+
]
|
|
52
|
+
})
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ jsx(Typography, {
|
|
55
|
+
variant: "caption",
|
|
56
|
+
color: "secondary",
|
|
57
|
+
className: "ml-3.5",
|
|
58
|
+
children: "Choose how entities should be displayed by default"
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
export { ViewModeSwitch };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=ViewModeSwitch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewModeSwitch.js","names":[],"sources":["../../../../src/collection_editor/ui/collection_editor/ViewModeSwitch.tsx"],"sourcesContent":["import { useId } from \"react\";\nimport { CollectionCustomView, ViewMode } from \"@rebasepro/cms-types\";\nimport {\n cls,\n KanbanIcon,\n LayoutGridIcon,\n ListIcon,\n TableIcon,\n ToggleButtonGroup,\n Typography\n} from \"@rebasepro/ui\";\nimport { getIcon, useCustomizationController } from \"@rebasepro/app\";\n\nexport function ViewModeSwitch({\n value,\n onChange,\n className\n}: {\n value: ViewMode;\n onChange: (value: ViewMode) => void;\n className?: string;\n}) {\n\n const customizationController = useCustomizationController();\n\n // Only app-registered views are offerable here. A view declared inline on\n // a collection carries a `Builder` function, which the editor cannot write\n // back into a config file — registering it on `<RebaseCMS>` and naming\n // the key is what makes it editable, the same bargain `entityViews` makes.\n const registeredViews: CollectionCustomView[] = customizationController.collectionViews ?? [];\n\n const labelId = useId();\n return <div className={cls(className)}>\n <Typography id={labelId} variant={\"label\"} color={\"secondary\"} className={\"ml-3.5\"}>Default collection view</Typography>\n <div className={\"my-2\"}>\n <ToggleButtonGroup\n aria-labelledby={labelId}\n value={value}\n onValueChange={onChange}\n options={[\n {\n value: \"list\",\n label: \"List\",\n icon: <ListIcon/>\n },\n {\n value: \"table\",\n label: \"Table\",\n icon: <TableIcon/>\n },\n {\n value: \"cards\",\n label: \"Cards\",\n icon: <LayoutGridIcon/>\n },\n {\n value: \"kanban\",\n label: \"Kanban\",\n icon: <KanbanIcon/>\n },\n ...registeredViews.map((view) => ({\n value: view.key,\n label: view.name,\n icon: getIcon(view.icon) ?? <ListIcon/>\n }))\n ]}\n />\n </div>\n <Typography variant={\"caption\"} color={\"secondary\"} className={\"ml-3.5\"}>Choose how entities should be displayed by default</Typography>\n </div>\n}\n"],"mappings":";;;;;AAaA,SAAgB,eAAe,EAC3B,OACA,UACA,aAKD;CAQC,MAAM,kBAN0B,2BAMgB,CAAA,CAAwB,mBAAmB,CAAC;CAE5F,MAAM,UAAU,MAAM;CACtB,OAAO,qBAAC,OAAD;EAAK,WAAW,IAAI,SAAS;YAA7B;GACH,oBAAC,YAAD;IAAY,IAAI;IAAS,SAAS;IAAS,OAAO;IAAa,WAAW;cAAU;GAAmC,CAAA;GACvH,oBAAC,OAAD;IAAK,WAAW;cACZ,oBAAC,mBAAD;KACI,mBAAiB;KACV;KACP,eAAe;KACf,SAAS;MACL;OACI,OAAO;OACP,OAAO;OACP,MAAM,oBAAC,UAAD,CAAU,CAAA;MACpB;MACA;OACI,OAAO;OACP,OAAO;OACP,MAAM,oBAAC,WAAD,CAAW,CAAA;MACrB;MACA;OACI,OAAO;OACP,OAAO;OACP,MAAM,oBAAC,gBAAD,CAAgB,CAAA;MAC1B;MACA;OACI,OAAO;OACP,OAAO;OACP,MAAM,oBAAC,YAAD,CAAY,CAAA;MACtB;MACA,GAAG,gBAAgB,KAAK,UAAU;OAC9B,OAAO,KAAK;OACZ,OAAO,KAAK;OACZ,MAAM,QAAQ,KAAK,IAAI,KAAK,oBAAC,UAAD,CAAU,CAAA;MAC1C,EAAE;KACN;IACH,CAAA;GACA,CAAA;GACL,oBAAC,YAAD;IAAY,SAAS;IAAW,OAAO;IAAa,WAAW;cAAU;GAA8D,CAAA;EACtI;;AACT"}
|
package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { useCollectionRegistryController } from "../../../../hooks/navigation/contexts/CollectionRegistryContext.js";
|
|
2
|
+
import { CollectionTableBinding } from "../../../../components/CollectionTableBinding/CollectionTableBinding.js";
|
|
3
|
+
import { useSelectionController } from "../../../../components/CollectionViewBinding/useSelectionController.js";
|
|
4
|
+
import { convertImportData } from "../../../../data_import/utils/data.js";
|
|
5
|
+
import { ImportConversionProblems } from "../../../../data_import/components/ImportConversionProblems.js";
|
|
6
|
+
import { useEffect, useState } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { CircularProgressCenter, Typography } from "@rebasepro/ui";
|
|
9
|
+
import { useAuthController } from "@rebasepro/app";
|
|
10
|
+
//#region src/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.tsx
|
|
11
|
+
function CollectionEditorImportDataPreview({ importConfig, properties, propertiesOrder }) {
|
|
12
|
+
const authController = useAuthController();
|
|
13
|
+
const registry = useCollectionRegistryController();
|
|
14
|
+
const [loading, setLoading] = useState(false);
|
|
15
|
+
const [problems, setProblems] = useState([]);
|
|
16
|
+
async function loadEntities() {
|
|
17
|
+
const converted = convertImportData(authController, registry, importConfig.importData, importConfig.idColumn, importConfig.headersMapping, properties, "TEMP_PATH", importConfig.defaultValues);
|
|
18
|
+
importConfig.setEntities(converted.entities);
|
|
19
|
+
setProblems(converted.problems);
|
|
20
|
+
}
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
loadEntities().finally(() => setLoading(false));
|
|
23
|
+
}, []);
|
|
24
|
+
const selectionController = useSelectionController();
|
|
25
|
+
if (loading) return /* @__PURE__ */ jsx(CircularProgressCenter, {});
|
|
26
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
27
|
+
className: "flex flex-col h-full w-full",
|
|
28
|
+
children: [/* @__PURE__ */ jsx(ImportConversionProblems, { problems }), /* @__PURE__ */ jsx("div", {
|
|
29
|
+
className: "flex-1 min-h-0",
|
|
30
|
+
children: /* @__PURE__ */ jsx(CollectionTableBinding, {
|
|
31
|
+
title: /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Typography, {
|
|
32
|
+
variant: "subtitle2",
|
|
33
|
+
children: "Imported data preview"
|
|
34
|
+
}), /* @__PURE__ */ jsx(Typography, {
|
|
35
|
+
variant: "caption",
|
|
36
|
+
children: "Entities with the same id will be overwritten"
|
|
37
|
+
})] }),
|
|
38
|
+
tableController: {
|
|
39
|
+
data: importConfig.entities,
|
|
40
|
+
dataLoading: false,
|
|
41
|
+
noMoreToLoad: false
|
|
42
|
+
},
|
|
43
|
+
endAdornment: /* @__PURE__ */ jsx("div", { className: "h-12" }),
|
|
44
|
+
filterable: false,
|
|
45
|
+
sortable: false,
|
|
46
|
+
selectionController,
|
|
47
|
+
displayedColumnIds: propertiesOrder.map((p) => ({
|
|
48
|
+
key: p,
|
|
49
|
+
disabled: false
|
|
50
|
+
})),
|
|
51
|
+
openEntityMode: "side_panel",
|
|
52
|
+
properties,
|
|
53
|
+
enablePopupIcon: false
|
|
54
|
+
})
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { CollectionEditorImportDataPreview };
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=CollectionEditorImportDataPreview.js.map
|
package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollectionEditorImportDataPreview.js","names":[],"sources":["../../../../../src/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.tsx"],"sourcesContent":["import { useCollectionRegistryController } from \"../../../_cms_internals\";\nimport { convertImportData, ImportConfig, ImportConversionProblems } from \"../../../_cms_internals\";\nimport type { ImportConversionProblem } from \"../../../../data_import/utils/data\";\nimport { useAuthController } from \"@rebasepro/app\";\nimport { CollectionTableBinding } from \"../../../../components/CollectionTableBinding/CollectionTableBinding\";\nimport { useSelectionController } from \"../../../../components/CollectionViewBinding/useSelectionController\";\nimport { CircularProgressCenter } from \"@rebasepro/ui\";\nimport { Properties } from \"@rebasepro/types\";\nimport { useEffect, useState } from \"react\";\nimport { Typography } from \"@rebasepro/ui\";\n\nexport function CollectionEditorImportDataPreview({\n importConfig,\n properties,\n propertiesOrder\n}: {\n importConfig: ImportConfig,\n properties: Properties,\n propertiesOrder: string[]\n}) {\n\n const authController = useAuthController();\n const registry = useCollectionRegistryController();\n const [loading, setLoading] = useState<boolean>(false);\n const [problems, setProblems] = useState<ImportConversionProblem[]>([]);\n\n async function loadEntities() {\n const converted = convertImportData(authController,\n registry,\n importConfig.importData,\n importConfig.idColumn,\n importConfig.headersMapping,\n properties,\n \"TEMP_PATH\",\n importConfig.defaultValues);\n importConfig.setEntities(converted.entities);\n setProblems(converted.problems);\n }\n\n useEffect(() => {\n loadEntities().finally(() => setLoading(false));\n }, []);\n\n const selectionController = useSelectionController();\n if (loading)\n return <CircularProgressCenter/>\n\n return <div className={\"flex flex-col h-full w-full\"}>\n <ImportConversionProblems problems={problems}/>\n <div className={\"flex-1 min-h-0\"}>\n <CollectionTableBinding\n title={<div>\n <Typography variant={\"subtitle2\"}>Imported data preview</Typography>\n <Typography variant={\"caption\"}>Entities with the same id will be overwritten</Typography>\n </div>}\n tableController={{\n data: importConfig.entities,\n dataLoading: false,\n noMoreToLoad: false\n }}\n endAdornment={<div className={\"h-12\"}/>}\n filterable={false}\n sortable={false}\n selectionController={selectionController}\n displayedColumnIds={propertiesOrder.map(p => ({\n key: p,\n disabled: false\n }))}\n openEntityMode={\"side_panel\"}\n properties={properties}\n enablePopupIcon={false}/>\n </div>\n </div>;\n\n}\n"],"mappings":";;;;;;;;;;AAWA,SAAgB,kCAAkC,EAC9C,cACA,YACA,mBAKD;CAEC,MAAM,iBAAiB,kBAAkB;CACzC,MAAM,WAAW,gCAAgC;CACjD,MAAM,CAAC,SAAS,cAAc,SAAkB,KAAK;CACrD,MAAM,CAAC,UAAU,eAAe,SAAoC,CAAC,CAAC;CAEtE,eAAe,eAAe;EAC1B,MAAM,YAAY,kBAAkB,gBAChC,UACA,aAAa,YACb,aAAa,UACb,aAAa,gBACb,YACA,aACA,aAAa,aAAa;EAC9B,aAAa,YAAY,UAAU,QAAQ;EAC3C,YAAY,UAAU,QAAQ;CAClC;CAEA,gBAAgB;EACZ,aAAa,CAAC,CAAC,cAAc,WAAW,KAAK,CAAC;CAClD,GAAG,CAAC,CAAC;CAEL,MAAM,sBAAsB,uBAAuB;CACnD,IAAI,SACA,OAAO,oBAAC,wBAAD,CAAwB,CAAA;CAEnC,OAAO,qBAAC,OAAD;EAAK,WAAW;YAAhB,CACH,oBAAC,0BAAD,EAAoC,SAAU,CAAA,GAC9C,oBAAC,OAAD;GAAK,WAAW;aACZ,oBAAC,wBAAD;IACI,OAAO,qBAAC,OAAD,EAAA,UAAA,CACH,oBAAC,YAAD;KAAY,SAAS;eAAa;IAAiC,CAAA,GACnE,oBAAC,YAAD;KAAY,SAAS;eAAW;IAAyD,CAAA,CACxF,EAAA,CAAA;IACL,iBAAiB;KACb,MAAM,aAAa;KACnB,aAAa;KACb,cAAc;IAClB;IACA,cAAc,oBAAC,OAAD,EAAK,WAAW,OAAQ,CAAA;IACtC,YAAY;IACZ,UAAU;IACW;IACrB,oBAAoB,gBAAgB,KAAI,OAAM;KAC1C,KAAK;KACL,UAAU;IACd,EAAE;IACF,gBAAgB;IACJ;IACZ,iBAAiB;GAAO,CAAA;EAC3B,CAAA,CACJ;;AAET"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { getFieldId } from "../../../../components/field_ids.js";
|
|
2
|
+
import { getFieldConfig } from "../../../../components/field_configs.js";
|
|
3
|
+
import { PropertyConfigBadge } from "../../../../components/PropertyConfigBadge.js";
|
|
4
|
+
import { getInferenceType } from "../../../../data_import/utils/get_import_inference_type.js";
|
|
5
|
+
import { DataNewPropertiesMapping } from "../../../../data_import/components/DataNewPropertiesMapping.js";
|
|
6
|
+
import { ImportNewPropertyFieldPreview } from "../../../../data_import/components/ImportNewPropertyFieldPreview.js";
|
|
7
|
+
import { getFullId, idToPropertiesPath, namespaceToPropertiesOrderPath } from "../util.js";
|
|
8
|
+
import { updatePropertyFromWidget } from "../utils/update_property_for_widget.js";
|
|
9
|
+
import { supportedFields } from "../utils/supported_fields.js";
|
|
10
|
+
import { PropertyFormDialog } from "../PropertyEditView.js";
|
|
11
|
+
import React, { useState } from "react";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Container, Select, SelectItem, Tooltip, Typography, cls } from "@rebasepro/ui";
|
|
14
|
+
import { getIn, useFormex } from "@rebasepro/forms";
|
|
15
|
+
import { buildPropertyFromData } from "@rebasepro/inference";
|
|
16
|
+
//#region src/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.tsx
|
|
17
|
+
function CollectionEditorImportMapping({ importConfig, propertyConfigs }) {
|
|
18
|
+
const { setFieldValue, setFieldTouched, values } = useFormex();
|
|
19
|
+
const [selectedProperty, setSelectedProperty] = useState(void 0);
|
|
20
|
+
const currentPropertiesOrderRef = React.useRef(values.propertiesOrder ? { "": values.propertiesOrder } : {});
|
|
21
|
+
const propertyKey = selectedProperty ? selectedProperty.id : void 0;
|
|
22
|
+
const property = selectedProperty || void 0;
|
|
23
|
+
const onPropertyChanged = ({ id, property, previousId, namespace }) => {
|
|
24
|
+
const fullId = id ? getFullId(id, namespace) : void 0;
|
|
25
|
+
const propertyPath = fullId ? idToPropertiesPath(fullId) : void 0;
|
|
26
|
+
const getCurrentPropertiesOrder = (namespace) => {
|
|
27
|
+
if (!namespace) return currentPropertiesOrderRef.current[""];
|
|
28
|
+
return currentPropertiesOrderRef.current[namespace] ?? getIn(values, namespaceToPropertiesOrderPath(namespace));
|
|
29
|
+
};
|
|
30
|
+
const updatePropertiesOrder = (newPropertiesOrder, namespace) => {
|
|
31
|
+
const propertiesOrderPath = namespaceToPropertiesOrderPath(namespace);
|
|
32
|
+
setFieldValue(propertiesOrderPath, newPropertiesOrder, false);
|
|
33
|
+
currentPropertiesOrderRef.current[namespace ?? ""] = newPropertiesOrder;
|
|
34
|
+
};
|
|
35
|
+
if (previousId && previousId !== id) {
|
|
36
|
+
const previousPropertyPath = idToPropertiesPath(getFullId(previousId, namespace));
|
|
37
|
+
updatePropertiesOrder(getCurrentPropertiesOrder(namespace).map((p) => p === previousId ? id : p).filter((p) => p !== void 0), namespace);
|
|
38
|
+
const newHeadersMapping = { ...importConfig.headersMapping };
|
|
39
|
+
Object.keys(newHeadersMapping).forEach((key) => {
|
|
40
|
+
if (newHeadersMapping[key] === previousId) newHeadersMapping[key] = id ?? "";
|
|
41
|
+
});
|
|
42
|
+
importConfig.setHeadersMapping(newHeadersMapping);
|
|
43
|
+
setFieldValue(previousPropertyPath, void 0, false);
|
|
44
|
+
setFieldTouched(previousPropertyPath, false, false);
|
|
45
|
+
}
|
|
46
|
+
if (propertyPath) {
|
|
47
|
+
setFieldValue(propertyPath, property, false);
|
|
48
|
+
setFieldTouched(propertyPath, true, false);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const onPropertyTypeChanged = async ({ id, importKey, property, namespace }) => {
|
|
52
|
+
const fullId = id ? getFullId(id, namespace) : void 0;
|
|
53
|
+
const propertyPath = fullId ? idToPropertiesPath(fullId) : void 0;
|
|
54
|
+
const inferredNewProperty = { ...buildPropertyFromData(importConfig.importData.map((d) => getIn(d, importKey)), property, getInferenceType) };
|
|
55
|
+
if (propertyPath) {
|
|
56
|
+
if (inferredNewProperty) setFieldValue(propertyPath, inferredNewProperty, false);
|
|
57
|
+
else setFieldValue(propertyPath, property, false);
|
|
58
|
+
setFieldTouched(propertyPath, true, false);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
62
|
+
className: "overflow-auto my-auto",
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ jsxs(Container, {
|
|
65
|
+
maxWidth: "6xl",
|
|
66
|
+
className: "flex flex-col gap-4 p-8 m-auto",
|
|
67
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
68
|
+
variant: "h6",
|
|
69
|
+
className: "my-4 ml-3.5",
|
|
70
|
+
children: "Data property mapping"
|
|
71
|
+
}), /* @__PURE__ */ jsx(DataNewPropertiesMapping, {
|
|
72
|
+
importConfig,
|
|
73
|
+
destinationProperties: values.properties,
|
|
74
|
+
buildPropertyView: ({ property, propertyKey, importKey, isIdColumn }) => {
|
|
75
|
+
if (isIdColumn) return /* @__PURE__ */ jsx(Typography, { children: " This column will be used as ID" });
|
|
76
|
+
return /* @__PURE__ */ jsx(ImportNewPropertyFieldPreview, {
|
|
77
|
+
property,
|
|
78
|
+
propertyKey,
|
|
79
|
+
onPropertyNameChanged: (propertyKey, value) => setFieldValue(`properties.${propertyKey}.name`, value, false),
|
|
80
|
+
onEditClick: () => {
|
|
81
|
+
if (!propertyKey || !property) return;
|
|
82
|
+
setSelectedProperty({
|
|
83
|
+
...property,
|
|
84
|
+
id: propertyKey
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
propertyTypeView: /* @__PURE__ */ jsx(PropertySelect, {
|
|
88
|
+
property,
|
|
89
|
+
disabled: false,
|
|
90
|
+
onPropertyChanged: (props) => onPropertyTypeChanged({
|
|
91
|
+
...props,
|
|
92
|
+
importKey
|
|
93
|
+
}),
|
|
94
|
+
propertyKey,
|
|
95
|
+
propertyConfigs
|
|
96
|
+
})
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
})]
|
|
100
|
+
}),
|
|
101
|
+
/* @__PURE__ */ jsx(PropertyFormDialog, {
|
|
102
|
+
open: selectedProperty !== void 0,
|
|
103
|
+
propertyKey,
|
|
104
|
+
property,
|
|
105
|
+
inArray: false,
|
|
106
|
+
autoUpdateId: false,
|
|
107
|
+
onPropertyChanged,
|
|
108
|
+
allowDataInference: false,
|
|
109
|
+
onOkClicked: () => {
|
|
110
|
+
setSelectedProperty(void 0);
|
|
111
|
+
},
|
|
112
|
+
onCancel: () => {
|
|
113
|
+
setSelectedProperty(void 0);
|
|
114
|
+
},
|
|
115
|
+
autoOpenTypeSelect: false,
|
|
116
|
+
existingProperty: false,
|
|
117
|
+
propertyConfigs
|
|
118
|
+
}),
|
|
119
|
+
/* @__PURE__ */ jsx("div", { style: { height: "52px" } })
|
|
120
|
+
]
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function PropertySelect({ property, onPropertyChanged, propertyKey, propertyConfigs, disabled }) {
|
|
124
|
+
const fieldId = property ? getFieldId(property) : null;
|
|
125
|
+
const widget = property ? getFieldConfig(property, propertyConfigs) : null;
|
|
126
|
+
const [selectOpen, setSelectOpen] = useState(false);
|
|
127
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
128
|
+
title: property && widget ? `${widget?.name} - ${property.type}` : void 0,
|
|
129
|
+
open: selectOpen ? false : void 0,
|
|
130
|
+
children: /* @__PURE__ */ jsx(Select, {
|
|
131
|
+
open: selectOpen,
|
|
132
|
+
onOpenChange: setSelectOpen,
|
|
133
|
+
invisible: true,
|
|
134
|
+
className: "w-full",
|
|
135
|
+
disabled,
|
|
136
|
+
error: !widget,
|
|
137
|
+
fullWidth: true,
|
|
138
|
+
value: fieldId ?? "",
|
|
139
|
+
placeholder: "Select a property widget",
|
|
140
|
+
position: "item-aligned",
|
|
141
|
+
renderValue: (value) => {
|
|
142
|
+
if (!widget) return null;
|
|
143
|
+
return /* @__PURE__ */ jsx(PropertyConfigBadge, { propertyConfig: widget });
|
|
144
|
+
},
|
|
145
|
+
onValueChange: (newSelectedWidgetId) => {
|
|
146
|
+
const newProperty = updatePropertyFromWidget(property, newSelectedWidgetId, propertyConfigs);
|
|
147
|
+
if (!propertyKey) return;
|
|
148
|
+
onPropertyChanged({
|
|
149
|
+
id: propertyKey,
|
|
150
|
+
property: newProperty,
|
|
151
|
+
previousId: propertyKey,
|
|
152
|
+
namespace: void 0
|
|
153
|
+
});
|
|
154
|
+
},
|
|
155
|
+
children: Object.entries(supportedFields).map(([key, widget]) => {
|
|
156
|
+
return /* @__PURE__ */ jsx(ImportPropertySelectItem, {
|
|
157
|
+
value: key,
|
|
158
|
+
optionDisabled: false,
|
|
159
|
+
propertyConfig: widget,
|
|
160
|
+
existing: false
|
|
161
|
+
}, key);
|
|
162
|
+
})
|
|
163
|
+
})
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
function ImportPropertySelectItem({ value, optionDisabled, propertyConfig, existing }) {
|
|
167
|
+
return /* @__PURE__ */ jsx(SelectItem, {
|
|
168
|
+
value,
|
|
169
|
+
disabled: optionDisabled,
|
|
170
|
+
className: "flex flex-row items-center",
|
|
171
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
172
|
+
className: cls("flex flex-row items-center text-base min-h-[48px]", optionDisabled ? "w-full" : ""),
|
|
173
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
174
|
+
className: "mr-8",
|
|
175
|
+
children: /* @__PURE__ */ jsx(PropertyConfigBadge, { propertyConfig })
|
|
176
|
+
}), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", { children: propertyConfig.name }), /* @__PURE__ */ jsx(Typography, {
|
|
177
|
+
variant: "caption",
|
|
178
|
+
color: "disabled",
|
|
179
|
+
className: "max-w-sm",
|
|
180
|
+
children: existing && optionDisabled ? "You can only switch to widgets that use the same data type" : propertyConfig.description
|
|
181
|
+
})] })]
|
|
182
|
+
})
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
//#endregion
|
|
186
|
+
export { CollectionEditorImportMapping, ImportPropertySelectItem };
|
|
187
|
+
|
|
188
|
+
//# sourceMappingURL=CollectionEditorImportMapping.js.map
|
package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollectionEditorImportMapping.js","names":[],"sources":["../../../../../src/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.tsx"],"sourcesContent":["import { DataNewPropertiesMapping } from \"../../../../data_import/components/DataNewPropertiesMapping\";\nimport { getInferenceType } from \"../../../../data_import/utils/get_import_inference_type\";\nimport { ImportConfig } from \"../../../../data_import/types\";\nimport { ImportNewPropertyFieldPreview } from \"../../../../data_import/components/ImportNewPropertyFieldPreview\";\nimport { getIn, useFormex } from \"@rebasepro/forms\";\n\nimport { getFieldConfig, getFieldId } from \"../../../../components/field_configs\";\nimport { PropertyConfigBadge } from \"../../../../components/PropertyConfigBadge\";\nimport { Properties, Property } from \"@rebasepro/types\";\nimport { PropertyConfig, AdminCollection } from \"@rebasepro/cms-types\";\nimport { cls, Container, Select, SelectItem, Tooltip, Typography } from \"@rebasepro/ui\";\nimport React, { useState } from \"react\";\nimport { OnPropertyChangedParams, PropertyFormDialog, PropertyWithId } from \"../PropertyEditView\";\nimport { getFullId, idToPropertiesPath, namespaceToPropertiesOrderPath } from \"../util\";\nimport { updatePropertyFromWidget } from \"../utils/update_property_for_widget\";\nimport { supportedFields } from \"../utils/supported_fields\";\nimport { buildPropertyFromData } from \"@rebasepro/inference\";\n\nexport function CollectionEditorImportMapping({\n importConfig,\n propertyConfigs\n}:\n {\n importConfig: ImportConfig,\n propertyConfigs: Record<string, PropertyConfig>,\n }) {\n\n // const {\n // values,\n // setFieldValue,\n // setFieldTouched,\n // setValues,\n // submitCount\n // } = useFormex();\n\n const {\n setFieldValue,\n setFieldTouched,\n values\n } = useFormex<AdminCollection>();\n const [selectedProperty, setSelectedProperty] = useState<PropertyWithId | undefined>(undefined);\n\n const currentPropertiesOrderRef = React.useRef<{\n [key: string]: string[]\n }>(values.propertiesOrder ? { \"\": values.propertiesOrder } : {});\n\n const propertyKey = selectedProperty ? selectedProperty.id : undefined;\n const property = selectedProperty || undefined;\n\n const onPropertyChanged = ({\n id,\n property,\n previousId,\n namespace\n }: OnPropertyChangedParams) => {\n\n const fullId = id ? getFullId(id, namespace) : undefined;\n const propertyPath = fullId ? idToPropertiesPath(fullId) : undefined;\n\n // setSelectedProperty(property);\n const getCurrentPropertiesOrder = (namespace?: string) => {\n if (!namespace) return currentPropertiesOrderRef.current[\"\"];\n return currentPropertiesOrderRef.current[namespace] ?? getIn(values, namespaceToPropertiesOrderPath(namespace));\n }\n\n const updatePropertiesOrder = (newPropertiesOrder: string[], namespace?: string) => {\n const propertiesOrderPath = namespaceToPropertiesOrderPath(namespace);\n\n setFieldValue(propertiesOrderPath, newPropertiesOrder, false);\n currentPropertiesOrderRef.current[namespace ?? \"\"] = newPropertiesOrder;\n\n };\n\n // If the id has changed we need to a little cleanup\n if (previousId && previousId !== id) {\n const previousFullId = getFullId(previousId, namespace);\n const previousPropertyPath = idToPropertiesPath(previousFullId);\n\n const currentPropertiesOrder = getCurrentPropertiesOrder(namespace);\n\n // replace previousId with id in propertiesOrder\n const newPropertiesOrder = currentPropertiesOrder\n .map((p) => p === previousId ? id : p)\n .filter((p) => p !== undefined) as string[];\n updatePropertiesOrder(newPropertiesOrder, namespace);\n\n // replace previousId with id in headersMapping\n const newHeadersMapping = { ...importConfig.headersMapping };\n Object.keys(newHeadersMapping).forEach((key) => {\n if (newHeadersMapping[key] === previousId) {\n newHeadersMapping[key] = id ?? \"\";\n }\n });\n importConfig.setHeadersMapping(newHeadersMapping);\n\n // if (id) {\n // setSelectedPropertyIndex(newPropertiesOrder.indexOf(id));\n // setSelectedPropertyKey(id);\n // }\n setFieldValue(previousPropertyPath, undefined, false);\n setFieldTouched(previousPropertyPath, false, false);\n }\n\n if (propertyPath) {\n setFieldValue(propertyPath, property, false);\n setFieldTouched(propertyPath, true, false);\n }\n };\n const onPropertyTypeChanged = async ({\n id,\n importKey,\n property,\n namespace\n }: OnPropertyChangedParams & {\n importKey: string\n }) => {\n\n const fullId = id ? getFullId(id, namespace) : undefined;\n const propertyPath = fullId ? idToPropertiesPath(fullId) : undefined;\n\n // we try to infer the rest of the properties of a property, from the type and the data\n const propertyData = importConfig.importData.map((d) => getIn(d, importKey));\n const inferredNewProperty = {\n ...buildPropertyFromData(propertyData, property, getInferenceType)\n };\n\n if (propertyPath) {\n if (inferredNewProperty) {\n setFieldValue(propertyPath, inferredNewProperty, false);\n } else {\n setFieldValue(propertyPath, property, false);\n }\n setFieldTouched(propertyPath, true, false);\n }\n };\n\n return (\n\n <div className={\"overflow-auto my-auto\"}>\n <Container maxWidth={\"6xl\"} className={\"flex flex-col gap-4 p-8 m-auto\"}>\n\n <Typography variant=\"h6\" className={\"my-4 ml-3.5\"}>Data property mapping</Typography>\n\n <DataNewPropertiesMapping importConfig={importConfig}\n destinationProperties={values.properties as Properties}\n buildPropertyView={({\n property,\n propertyKey,\n importKey,\n isIdColumn\n }) => {\n if (isIdColumn) {\n return <Typography> This column will be used as ID</Typography>\n }\n\n return <ImportNewPropertyFieldPreview\n property={property}\n propertyKey={propertyKey}\n onPropertyNameChanged={(propertyKey: string, value: string) => setFieldValue(`properties.${propertyKey}.name`, value, false)}\n onEditClick={() => {\n if (!propertyKey || !property) return;\n setSelectedProperty({\n ...property,\n id: propertyKey\n });\n }}\n propertyTypeView={<PropertySelect property={property}\n disabled={false}\n onPropertyChanged={(props) => onPropertyTypeChanged({\n ...props,\n importKey\n })}\n propertyKey={propertyKey}\n propertyConfigs={propertyConfigs}/>}\n />;\n }}/>\n </Container>\n\n <PropertyFormDialog\n open={selectedProperty !== undefined}\n propertyKey={propertyKey}\n property={property}\n inArray={false}\n autoUpdateId={false}\n onPropertyChanged={onPropertyChanged}\n allowDataInference={false}\n\n onOkClicked={() => {\n setSelectedProperty(undefined);\n }}\n onCancel={() => {\n setSelectedProperty(undefined);\n }}\n autoOpenTypeSelect={false}\n existingProperty={false}\n propertyConfigs={propertyConfigs}/>\n\n <div style={{ height: \"52px\" }}/>\n </div>\n );\n\n}\n\nfunction PropertySelect({\n property,\n onPropertyChanged,\n propertyKey,\n propertyConfigs,\n disabled\n}: {\n property: Property | null,\n propertyKey: string | null,\n onPropertyChanged: ({\n id,\n property,\n previousId,\n namespace\n }: OnPropertyChangedParams) => void,\n propertyConfigs: Record<string, PropertyConfig>,\n disabled?: boolean\n}) {\n\n const fieldId = property ? getFieldId(property) : null;\n const widget = property ? getFieldConfig(property, propertyConfigs) : null;\n\n const [selectOpen, setSelectOpen] = useState(false);\n\n return <Tooltip title={property && widget ? `${widget?.name} - ${property.type}` : undefined}\n open={selectOpen ? false : undefined}>\n <Select\n open={selectOpen}\n onOpenChange={setSelectOpen}\n invisible={true}\n className={\"w-full\"}\n disabled={disabled}\n error={!widget}\n fullWidth={true}\n value={fieldId ?? \"\"}\n placeholder={\"Select a property widget\"}\n position={\"item-aligned\"}\n renderValue={(value) => {\n if (!widget) return null;\n return <PropertyConfigBadge propertyConfig={widget}/>\n }}\n onValueChange={(newSelectedWidgetId) => {\n const newProperty = updatePropertyFromWidget(property, newSelectedWidgetId, propertyConfigs)\n if (!propertyKey) return;\n onPropertyChanged({\n id: propertyKey,\n property: newProperty,\n previousId: propertyKey,\n namespace: undefined\n });\n }}>\n {Object.entries(supportedFields).map(([key, widget]) => {\n return <ImportPropertySelectItem\n key={key}\n value={key}\n optionDisabled={false}\n propertyConfig={widget}\n existing={false}/>;\n })\n }\n </Select>\n </Tooltip>;\n}\n\nexport interface ImportPropertySelectItemProps {\n value: string;\n optionDisabled: boolean;\n propertyConfig: PropertyConfig;\n existing: boolean;\n}\n\nexport function ImportPropertySelectItem({ value, optionDisabled, propertyConfig, existing }: ImportPropertySelectItemProps) {\n return <SelectItem value={value}\n disabled={optionDisabled}\n className={\"flex flex-row items-center\"}>\n <div\n className={cls(\n \"flex flex-row items-center text-base min-h-[48px]\",\n optionDisabled ? \"w-full\" : \"\")}>\n <div className={\"mr-8\"}>\n <PropertyConfigBadge propertyConfig={propertyConfig}/>\n </div>\n <div>\n <div>{propertyConfig.name}</div>\n <Typography variant={\"caption\"}\n color={\"disabled\"}\n className={\"max-w-sm\"}>\n {existing && optionDisabled ? \"You can only switch to widgets that use the same data type\" : propertyConfig.description}\n </Typography>\n </div>\n </div>\n </SelectItem>\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAkBA,SAAgB,8BAA8B,EAC1C,cACA,mBAKG;CAUH,MAAM,EACF,eACA,iBACA,WACA,UAA2B;CAC/B,MAAM,CAAC,kBAAkB,uBAAuB,SAAqC,KAAA,CAAS;CAE9F,MAAM,4BAA4B,MAAM,OAErC,OAAO,kBAAkB,EAAE,IAAI,OAAO,gBAAgB,IAAI,CAAC,CAAC;CAE/D,MAAM,cAAc,mBAAmB,iBAAiB,KAAK,KAAA;CAC7D,MAAM,WAAW,oBAAoB,KAAA;CAErC,MAAM,qBAAqB,EACvB,IACA,UACA,YACA,gBAC2B;EAE3B,MAAM,SAAS,KAAK,UAAU,IAAI,SAAS,IAAI,KAAA;EAC/C,MAAM,eAAe,SAAS,mBAAmB,MAAM,IAAI,KAAA;EAG3D,MAAM,6BAA6B,cAAuB;GACtD,IAAI,CAAC,WAAW,OAAO,0BAA0B,QAAQ;GACzD,OAAO,0BAA0B,QAAQ,cAAc,MAAM,QAAQ,+BAA+B,SAAS,CAAC;EAClH;EAEA,MAAM,yBAAyB,oBAA8B,cAAuB;GAChF,MAAM,sBAAsB,+BAA+B,SAAS;GAEpE,cAAc,qBAAqB,oBAAoB,KAAK;GAC5D,0BAA0B,QAAQ,aAAa,MAAM;EAEzD;EAGA,IAAI,cAAc,eAAe,IAAI;GAEjC,MAAM,uBAAuB,mBADN,UAAU,YAAY,SACG,CAAc;GAQ9D,sBAN+B,0BAA0B,SAG9B,CAAA,CACtB,KAAK,MAAM,MAAM,aAAa,KAAK,CAAC,CAAC,CACrC,QAAQ,MAAM,MAAM,KAAA,CACH,GAAoB,SAAS;GAGnD,MAAM,oBAAoB,EAAE,GAAG,aAAa,eAAe;GAC3D,OAAO,KAAK,iBAAiB,CAAC,CAAC,S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