@rebasepro/admin 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CollectionEditorDialog-jA-PLh6N.js +3549 -0
- package/dist/CollectionEditorDialog-jA-PLh6N.js.map +1 -0
- package/dist/CollectionsStudioView-UKouBPOm.js +170 -0
- package/dist/CollectionsStudioView-UKouBPOm.js.map +1 -0
- package/dist/PropertyEditView-DEUddmg_.js +3660 -0
- package/dist/PropertyEditView-DEUddmg_.js.map +1 -0
- package/dist/collection_editor/ConfigControllerProvider.d.ts +2 -2
- package/dist/collection_editor/ui/AddKanbanColumnAction.d.ts +2 -1
- package/dist/collection_editor/ui/CollectionViewHeaderAction.d.ts +2 -1
- package/dist/collection_editor/ui/EditorCollectionAction.d.ts +1 -1
- package/dist/collection_editor/ui/EditorCollectionActionStart.d.ts +1 -1
- package/dist/collection_editor/ui/EditorEntityAction.d.ts +1 -1
- package/dist/collection_editor/ui/HomePageEditorCollectionAction.d.ts +1 -1
- package/dist/collection_editor/ui/KanbanSetupAction.d.ts +2 -1
- package/dist/collection_editor/ui/MissingReferenceWidget.d.ts +1 -1
- package/dist/collection_editor/ui/NewCollectionButton.d.ts +1 -1
- package/dist/collection_editor/ui/NewCollectionCard.d.ts +1 -1
- package/dist/collection_editor/ui/PropertyAddColumnComponent.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/AIModifiedPathsContext.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/CollectionDetailsForm.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/CollectionJsonImportDialog.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/CollectionRLSTab.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/CollectionRelationsTab.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/CollectionStudioView.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/CollectionYupValidation.d.ts +1 -9
- package/dist/collection_editor/ui/collection_editor/CollectionsStudioView.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/DisplaySettingsForm.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/EntityActionsEditTab.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/EntityActionsSelectDialog.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/EntityCustomViewsSelectDialog.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/EnumForm.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/GeneralSettingsForm.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/GetCodeDialog.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/KanbanConfigSection.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/LayoutModeSwitch.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/PropertyEditView.d.ts +4 -4
- package/dist/collection_editor/ui/collection_editor/PropertyFieldPreview.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/PropertyTree.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/SubcollectionsEditTab.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/SwitchControl.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/ViewModeSwitch.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.d.ts +3 -2
- package/dist/collection_editor/ui/collection_editor/properties/BlockPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/BooleanPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/DateTimePropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/EnumPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/KeyValuePropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/MapPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/NumberPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/ReferencePropertyField.d.ts +3 -2
- package/dist/collection_editor/ui/collection_editor/properties/RelationPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/RepeatPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/StoragePropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/StringPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/UrlPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/VectorPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/conditions/ConditionsEditor.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/conditions/ConditionsPanel.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/properties/conditions/EnumConditionsEditor.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/validation/ValidationPanel.d.ts +1 -1
- package/dist/collection_editor_ui.js +4 -11
- package/dist/components/ArrayContainer.d.ts +3 -3
- package/dist/components/ClearFilterSortButton.d.ts +1 -1
- package/dist/components/CollectionEditorDialogs.d.ts +2 -1
- package/dist/components/CollectionPanel.d.ts +2 -27
- package/dist/components/DefaultAppBar.d.ts +1 -1
- package/dist/components/DefaultDrawer.d.ts +4 -4
- package/dist/components/DeleteEntityDialog.d.ts +2 -1
- package/dist/components/DrawerNavigationGroup.d.ts +1 -1
- package/dist/components/DrawerNavigationItem.d.ts +1 -1
- package/dist/components/EntityCollectionTable/EntityCollectionRowActions.d.ts +1 -1
- package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +2 -1
- package/dist/components/EntityCollectionTable/fields/TableMultipleRelationField.d.ts +3 -3
- package/dist/components/EntityCollectionTable/fields/TableReferenceField.d.ts +3 -3
- package/dist/components/EntityCollectionTable/fields/TableRelationField.d.ts +3 -3
- package/dist/components/EntityCollectionTable/fields/TableRelationSelectorField.d.ts +2 -1
- package/dist/components/EntityCollectionTable/fields/TableStorageUpload.d.ts +2 -2
- package/dist/components/EntityCollectionTable/fields/VirtualTableDateField.d.ts +1 -1
- package/dist/components/EntityCollectionTable/fields/VirtualTableInput.d.ts +2 -1
- package/dist/components/EntityCollectionTable/fields/VirtualTableNumberInput.d.ts +2 -1
- package/dist/components/EntityCollectionTable/fields/VirtualTableSelect.d.ts +1 -1
- package/dist/components/EntityCollectionTable/fields/VirtualTableSwitch.d.ts +2 -1
- package/dist/components/EntityCollectionTable/fields/VirtualTableUserSelect.d.ts +1 -1
- package/dist/components/EntityCollectionTable/internal/CollectionTableToolbar.d.ts +1 -1
- package/dist/components/EntityCollectionTable/internal/EntityTableCellActions.d.ts +1 -1
- package/dist/components/EntityCollectionTable/internal/popup_field/PopupFormField.d.ts +4 -3
- package/dist/components/EntityCollectionView/Board.d.ts +2 -1
- package/dist/components/EntityCollectionView/BoardColumnTitle.d.ts +1 -1
- package/dist/components/EntityCollectionView/BoardSortableList.d.ts +1 -1
- package/dist/components/EntityCollectionView/EntityBoardCard.d.ts +1 -1
- package/dist/components/EntityCollectionView/EntityCard.d.ts +2 -1
- package/dist/components/EntityCollectionView/EntityCollectionBoardView.d.ts +1 -1
- package/dist/components/EntityCollectionView/EntityCollectionCardView.d.ts +1 -1
- package/dist/components/EntityCollectionView/EntityCollectionListView.d.ts +1 -1
- package/dist/components/EntityCollectionView/EntityCollectionView.d.ts +0 -24
- package/dist/components/EntityCollectionView/EntityCollectionViewActions.d.ts +1 -1
- package/dist/components/EntityCollectionView/EntityCollectionViewStartActions.d.ts +2 -1
- package/dist/components/EntityCollectionView/FilterPresetsButton.d.ts +2 -1
- package/dist/components/EntityCollectionView/FiltersDialog.d.ts +2 -1
- package/dist/components/EntityCollectionView/SplitListView.d.ts +1 -1
- package/dist/components/EntityCollectionView/ViewModeToggle.d.ts +2 -1
- package/dist/components/EntityDetailView.d.ts +1 -1
- package/dist/components/EntityEditView.d.ts +2 -2
- package/dist/components/EntityEditViewFormActions.d.ts +2 -1
- package/dist/components/EntityJsonPreview.d.ts +2 -1
- package/dist/components/EntityPreview.d.ts +3 -3
- package/dist/components/EntitySidePanel.d.ts +2 -1
- package/dist/components/EntityView.d.ts +2 -1
- package/dist/components/FieldCaption.d.ts +1 -1
- package/dist/components/HomePage/ContentHomePage.d.ts +1 -1
- package/dist/components/HomePage/FavouritesView.d.ts +1 -1
- package/dist/components/HomePage/HomePageDnD.d.ts +4 -4
- package/dist/components/HomePage/NavigationCard.d.ts +1 -1
- package/dist/components/HomePage/NavigationCardBinding.d.ts +2 -1
- package/dist/components/HomePage/NavigationGroup.d.ts +2 -2
- package/dist/components/HomePage/RenameGroupDialog.d.ts +2 -1
- package/dist/components/HomePage/SmallNavigationCard.d.ts +1 -1
- package/dist/components/PropertyCollectionView.d.ts +2 -1
- package/dist/components/PropertyIdCopyTooltip.d.ts +2 -2
- package/dist/components/RebaseAuthGate.d.ts +1 -1
- package/dist/components/RebaseLayout.d.ts +1 -1
- package/dist/components/RebaseNavigation.d.ts +1 -1
- package/dist/components/RebaseRouteDefs.d.ts +1 -1
- package/dist/components/RebaseShell.d.ts +1 -1
- package/dist/components/ReferenceTable/EntitySelectionTable.d.ts +1 -1
- package/dist/components/ReferenceWidget.d.ts +2 -1
- package/dist/components/SearchIconsView.d.ts +2 -1
- package/dist/components/SelectableTable/SelectableTable.d.ts +2 -2
- package/dist/components/SelectableTable/filters/BooleanFilterField.d.ts +2 -1
- package/dist/components/SelectableTable/filters/DateTimeFilterField.d.ts +2 -1
- package/dist/components/SelectableTable/filters/ReferenceFilterField.d.ts +2 -1
- package/dist/components/SelectableTable/filters/RelationFilterField.d.ts +2 -1
- package/dist/components/SelectableTable/filters/StringNumberFilterField.d.ts +2 -1
- package/dist/components/SideDialogs.d.ts +1 -1
- package/dist/components/SideEntityProvider.d.ts +1 -1
- package/dist/components/admin/CreationResultDialog.d.ts +2 -1
- package/dist/components/app/AppBar.d.ts +1 -1
- package/dist/components/app/Drawer.d.ts +1 -1
- package/dist/components/common/default_entity_actions.d.ts +2 -1
- package/dist/components/history/EntityHistoryEntry.d.ts +1 -1
- package/dist/components/history/EntityHistoryView.d.ts +1 -1
- package/dist/components/history/LastEditedByFormAction.d.ts +2 -1
- package/dist/components/history/LastEditedByIndicator.d.ts +2 -1
- package/dist/components/history/UserChip.d.ts +1 -1
- package/dist/data_export/export/BasicExportAction.d.ts +2 -1
- package/dist/data_export/export/ExportCollectionAction.d.ts +1 -1
- package/dist/data_import/components/DataNewPropertiesMapping.d.ts +1 -1
- package/dist/data_import/components/ImportFileUpload.d.ts +1 -1
- package/dist/data_import/components/ImportNewPropertyFieldPreview.d.ts +2 -1
- package/dist/data_import/components/ImportSaveInProgress.d.ts +1 -1
- package/dist/data_import/import/ImportCollectionAction.d.ts +4 -3
- package/dist/editor/components/SlashCommandMenu.d.ts +2 -1
- package/dist/editor/editor.d.ts +1 -1
- package/dist/editor/selectors/color-selector.d.ts +1 -1
- package/dist/editor/selectors/link-selector.d.ts +1 -1
- package/dist/editor/selectors/node-selector.d.ts +1 -1
- package/dist/editor/selectors/text-buttons.d.ts +1 -1
- package/dist/editor.js +2621 -3574
- package/dist/editor.js.map +1 -1
- package/dist/form/EntityForm.d.ts +2 -1
- package/dist/form/EntityFormActions.d.ts +2 -1
- package/dist/form/components/FieldHelperText.d.ts +1 -1
- package/dist/form/components/FormEntry.d.ts +1 -1
- package/dist/form/components/FormLayout.d.ts +1 -1
- package/dist/form/components/LabelWithIconAndTooltip.d.ts +1 -1
- package/dist/form/components/LocalChangesMenu.d.ts +2 -1
- package/dist/form/components/StorageItemPreview.d.ts +2 -1
- package/dist/form/components/StorageUploadProgress.d.ts +2 -1
- package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/BlockFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/DateTimeFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/KeyValueFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/MapFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/MarkdownEditorFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/MultiSelectFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/MultipleRelationFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/ReadOnlyFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/ReferenceAsStringFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/ReferenceFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/RelationFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/RepeatFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/SelectFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +3 -2
- package/dist/form/field_bindings/SwitchFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/TextFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/UserSelectFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/VectorFieldBinding.d.ts +2 -1
- package/dist/history-BL49TIDb.js +311 -0
- package/dist/history-BL49TIDb.js.map +1 -0
- package/dist/hooks/navigation/useBuildNavigationStateController.d.ts +0 -2
- package/dist/hooks/navigation/useNavigationResolution.d.ts +5 -6
- package/dist/hooks/navigation/useResolvedCollections.d.ts +0 -2
- package/dist/hooks/useBreadcrumbsController.d.ts +2 -32
- package/dist/index.js +2 -3393
- package/dist/markdown-CklalUUk.js +526 -0
- package/dist/markdown-CklalUUk.js.map +1 -0
- package/dist/preview/components/ArrayEnumPreview.d.ts +2 -1
- package/dist/preview/components/EmptyValue.d.ts +2 -1
- package/dist/preview/components/EnumValuesChip.d.ts +1 -1
- package/dist/preview/components/ImagePreview.d.ts +2 -1
- package/dist/preview/components/ReferencePreview.d.ts +2 -1
- package/dist/preview/components/RelationPreview.d.ts +2 -1
- package/dist/preview/components/StorageThumbnail.d.ts +1 -1
- package/dist/preview/components/UserPreview.d.ts +6 -3
- package/dist/preview/property_previews/ArrayOfMapsPreview.d.ts +2 -1
- package/dist/preview/property_previews/ArrayOfReferencesPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayOfRelationsPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayOfStorageComponentsPreview.d.ts +2 -1
- package/dist/preview/property_previews/ArrayOfStringsPreview.d.ts +2 -1
- package/dist/preview/property_previews/ArrayOneOfPreview.d.ts +2 -1
- package/dist/preview/property_previews/ArrayPropertyEnumPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayPropertyPreview.d.ts +2 -1
- package/dist/preview/property_previews/MapPropertyPreview.d.ts +3 -2
- package/dist/preview/property_previews/SkeletonPropertyComponent.d.ts +5 -4
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/routes/RebaseRoute.d.ts +1 -1
- package/dist/src-BJ8fkM8y.js +24010 -0
- package/dist/src-BJ8fkM8y.js.map +1 -0
- package/dist/types/components/PropertyPreviewProps.d.ts +4 -0
- package/dist/types/components/formex.d.ts +1 -40
- package/dist/types/fields.d.ts +9 -1
- package/dist/util/navigation_utils.d.ts +2 -1
- package/dist/util/previews.d.ts +5 -0
- package/dist/util/property_utils.d.ts +1 -1
- package/package.json +29 -26
- package/src/collection_editor/ConfigControllerProvider.tsx +10 -7
- package/src/collection_editor/ui/CollectionViewHeaderAction.tsx +2 -1
- package/src/collection_editor/ui/EditorCollectionAction.tsx +2 -1
- package/src/collection_editor/ui/EditorCollectionActionStart.tsx +2 -1
- package/src/collection_editor/ui/EditorEntityAction.tsx +2 -1
- package/src/collection_editor/ui/KanbanSetupAction.tsx +2 -1
- package/src/collection_editor/ui/MissingReferenceWidget.tsx +2 -1
- package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +2 -1
- package/src/collection_editor/ui/collection_editor/CollectionDetailsForm.tsx +2 -3
- package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +0 -1
- package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +8 -4
- package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +2 -1
- package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/RelationPropertyField.tsx +5 -2
- package/src/collection_editor/useLocalCollectionsConfigController.tsx +7 -2
- package/src/collection_editor/validateCollectionJson.ts +2 -2
- package/src/components/CollectionPanel.tsx +51 -25
- package/src/components/DefaultAppBar.tsx +1 -2
- package/src/components/DefaultDrawer.tsx +3 -2
- package/src/components/DrawerNavigationGroup.tsx +3 -2
- package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +30 -9
- package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +1 -1
- package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +1 -0
- package/src/components/EntityCollectionView/Board.tsx +10 -8
- package/src/components/EntityCollectionView/BoardSortableList.tsx +2 -2
- package/src/components/EntityCollectionView/EntityCollectionBoardView.tsx +4 -2
- package/src/components/EntityCollectionView/EntityCollectionCardView.tsx +14 -4
- package/src/components/EntityCollectionView/EntityCollectionListView.tsx +48 -26
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +146 -73
- package/src/components/EntityCollectionView/EntityCollectionViewActions.tsx +2 -1
- package/src/components/EntityCollectionView/EntityCollectionViewStartActions.tsx +3 -2
- package/src/components/EntityCollectionView/FilterPresetsButton.tsx +4 -2
- package/src/components/EntityCollectionView/ViewModeToggle.tsx +0 -1
- package/src/components/EntityCollectionView/useBoardDataController.tsx +17 -15
- package/src/components/EntityCollectionView/useEntityPreviewSlots.ts +29 -19
- package/src/components/EntityDetailView.tsx +66 -30
- package/src/components/EntityEditView.tsx +70 -32
- package/src/components/EntitySidePanel.tsx +6 -3
- package/src/components/HomePage/ContentHomePage.tsx +3 -3
- package/src/components/HomePage/NavigationCard.tsx +5 -5
- package/src/components/HomePage/NavigationCardBinding.tsx +1 -1
- package/src/components/RebaseLayout.tsx +5 -2
- package/src/components/RebaseNavigation.tsx +1 -4
- package/src/components/RebaseRouteDefs.tsx +5 -3
- package/src/components/SearchIconsView.tsx +1 -1
- package/src/components/SelectableTable/SelectableTable.tsx +2 -3
- package/src/components/SelectableTable/SelectionStore.ts +9 -3
- package/src/components/UserSelector.tsx +92 -2
- package/src/components/common/default_entity_actions.tsx +23 -6
- package/src/components/field_configs.tsx +6 -3
- package/src/editor/editor.tsx +1 -1
- package/src/editor/extensions/Image/index.ts +2 -2
- package/src/editor/extensions/Image.ts +2 -2
- package/src/editor/extensions/clipboard.ts +2 -2
- package/src/editor/markdown-it-plugins.d.ts +24 -0
- package/src/editor/markdown.ts +2 -3
- package/src/form/EntityForm.tsx +21 -15
- package/src/form/field_bindings/MapFieldBinding.tsx +3 -3
- package/src/form/field_bindings/VectorFieldBinding.tsx +3 -3
- package/src/form/validation.ts +17 -15
- package/src/hooks/navigation/useBuildNavigationStateController.tsx +3 -6
- package/src/hooks/navigation/useNavigationResolution.ts +143 -19
- package/src/hooks/navigation/useResolvedCollections.ts +4 -6
- package/src/hooks/useBreadcrumbsController.tsx +2 -34
- package/src/hooks/useBuildSideEntityController.tsx +25 -3
- package/src/preview/PropertyPreview.tsx +6 -2
- package/src/preview/components/ReferencePreview.tsx +64 -13
- package/src/preview/components/RelationPreview.tsx +101 -13
- package/src/preview/components/UserPreview.tsx +5 -14
- package/src/preview/property_previews/ArrayOfMapsPreview.tsx +1 -1
- package/src/routes/RebaseRoute.tsx +5 -4
- package/src/types/components/PropertyPreviewProps.tsx +5 -0
- package/src/types/components/formex.tsx +1 -45
- package/src/types/fields.tsx +10 -1
- package/src/util/navigation_utils.ts +14 -4
- package/src/util/previews.ts +101 -4
- package/dist/CollectionEditorDialog-C8E440oK.js +0 -4574
- package/dist/CollectionEditorDialog-C8E440oK.js.map +0 -1
- package/dist/CollectionsStudioView-Brr_b06v.js +0 -217
- package/dist/CollectionsStudioView-Brr_b06v.js.map +0 -1
- package/dist/ExportCollectionAction-D3TTYXrq.js +0 -446
- package/dist/ExportCollectionAction-D3TTYXrq.js.map +0 -1
- package/dist/ImportCollectionAction-Dn7lya6E.js +0 -685
- package/dist/ImportCollectionAction-Dn7lya6E.js.map +0 -1
- package/dist/PropertyEditView-ChBleIbN.js +0 -8197
- package/dist/PropertyEditView-ChBleIbN.js.map +0 -1
- package/dist/collection_editor_ui.js.map +0 -1
- package/dist/index-D3S9x_RP.js +0 -462
- package/dist/index-D3S9x_RP.js.map +0 -1
- package/dist/index-D9RNzm01.js +0 -12
- package/dist/index-D9RNzm01.js.map +0 -1
- package/dist/index-DrrT332R.js +0 -8
- package/dist/index-DrrT332R.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/markdown-DD2JDU1X.js +0 -618
- package/dist/markdown-DD2JDU1X.js.map +0 -1
- package/dist/useEntityHistory-UVsSclfZ.js +0 -123
- package/dist/useEntityHistory-UVsSclfZ.js.map +0 -1
- package/dist/util-COYYD8zr.js +0 -30474
- package/dist/util-COYYD8zr.js.map +0 -1
|
@@ -1,685 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { c } from "react-compiler-runtime";
|
|
3
|
-
import React__default, { useEffect } from "react";
|
|
4
|
-
import { useSnackbarController, useCustomizationController, useAuthController } from "@rebasepro/core";
|
|
5
|
-
import "@rebasepro/common";
|
|
6
|
-
import { bo as useImportConfig, aV as getPropertiesWithPropertiesOrder, aU as getInferenceType, S as ImportFileUpload, p as DataNewPropertiesMapping, U as ImportSaveInProgress, aW as getPropertyInPath, aO as getFieldConfig, bl as useCollectionRegistryController, bt as useSelectionController, aB as convertDataToEntity, y as EntityCollectionTable, a4 as PropertyConfigBadge } from "./util-COYYD8zr.js";
|
|
7
|
-
import { UploadIcon, iconSize, Tooltip, IconButton, DialogTitle, Typography, DialogContent, Button, DialogActions, Dialog, SelectItem, cls, defaultBorderMixin, Select } from "@rebasepro/ui";
|
|
8
|
-
import "fast-equals";
|
|
9
|
-
import "@rebasepro/formex";
|
|
10
|
-
import "zod";
|
|
11
|
-
import { slugify } from "@rebasepro/utils";
|
|
12
|
-
import "@dnd-kit/core";
|
|
13
|
-
import "@dnd-kit/modifiers";
|
|
14
|
-
import "@dnd-kit/sortable";
|
|
15
|
-
import "@dnd-kit/utilities";
|
|
16
|
-
import "react-dropzone";
|
|
17
|
-
import "@rebasepro/types";
|
|
18
|
-
import "react-router-dom";
|
|
19
|
-
import "exceljs";
|
|
20
|
-
import { buildEntityPropertiesFromData } from "@rebasepro/schema-inference";
|
|
21
|
-
import "date-fns";
|
|
22
|
-
import "date-fns/locale";
|
|
23
|
-
import "fuse.js";
|
|
24
|
-
function ImportCollectionAction(t0) {
|
|
25
|
-
const $ = c(76);
|
|
26
|
-
const {
|
|
27
|
-
collection,
|
|
28
|
-
path,
|
|
29
|
-
onAnalyticsEvent
|
|
30
|
-
} = t0;
|
|
31
|
-
const snackbarController = useSnackbarController();
|
|
32
|
-
const [open, setOpen] = React__default.useState(false);
|
|
33
|
-
const [step, setStep] = React__default.useState("initial");
|
|
34
|
-
const importConfig = useImportConfig();
|
|
35
|
-
let t1;
|
|
36
|
-
if ($[0] !== onAnalyticsEvent) {
|
|
37
|
-
t1 = () => {
|
|
38
|
-
setOpen(true);
|
|
39
|
-
onAnalyticsEvent?.("import_open");
|
|
40
|
-
setStep("initial");
|
|
41
|
-
};
|
|
42
|
-
$[0] = onAnalyticsEvent;
|
|
43
|
-
$[1] = t1;
|
|
44
|
-
} else {
|
|
45
|
-
t1 = $[1];
|
|
46
|
-
}
|
|
47
|
-
const handleClickOpen = t1;
|
|
48
|
-
let t2;
|
|
49
|
-
if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
50
|
-
t2 = () => {
|
|
51
|
-
setOpen(false);
|
|
52
|
-
};
|
|
53
|
-
$[2] = t2;
|
|
54
|
-
} else {
|
|
55
|
-
t2 = $[2];
|
|
56
|
-
}
|
|
57
|
-
const handleClose = t2;
|
|
58
|
-
let t3;
|
|
59
|
-
if ($[3] !== onAnalyticsEvent) {
|
|
60
|
-
t3 = () => {
|
|
61
|
-
onAnalyticsEvent?.("import_mapping_complete");
|
|
62
|
-
setStep("preview");
|
|
63
|
-
};
|
|
64
|
-
$[3] = onAnalyticsEvent;
|
|
65
|
-
$[4] = t3;
|
|
66
|
-
} else {
|
|
67
|
-
t3 = $[4];
|
|
68
|
-
}
|
|
69
|
-
const onMappingComplete = t3;
|
|
70
|
-
let t4;
|
|
71
|
-
if ($[5] !== onAnalyticsEvent) {
|
|
72
|
-
t4 = () => {
|
|
73
|
-
onAnalyticsEvent?.("import_data_save");
|
|
74
|
-
setStep("import_data_saving");
|
|
75
|
-
};
|
|
76
|
-
$[5] = onAnalyticsEvent;
|
|
77
|
-
$[6] = t4;
|
|
78
|
-
} else {
|
|
79
|
-
t4 = $[6];
|
|
80
|
-
}
|
|
81
|
-
const onPreviewComplete = t4;
|
|
82
|
-
let t5;
|
|
83
|
-
if ($[7] !== collection.properties || $[8] !== importConfig || $[9] !== onAnalyticsEvent) {
|
|
84
|
-
t5 = async (data) => {
|
|
85
|
-
importConfig.setImportData(data);
|
|
86
|
-
if (data.length > 0) {
|
|
87
|
-
const originProperties = await buildEntityPropertiesFromData(data, getInferenceType);
|
|
88
|
-
importConfig.setOriginProperties(originProperties);
|
|
89
|
-
const headersMapping = buildHeadersMappingFromData(data, collection?.properties);
|
|
90
|
-
importConfig.setHeadersMapping(headersMapping);
|
|
91
|
-
const firstKey = Object.keys(headersMapping)?.[0];
|
|
92
|
-
if (firstKey?.includes("id") || firstKey?.includes("key")) {
|
|
93
|
-
importConfig.setIdColumn(firstKey);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
setTimeout(() => {
|
|
97
|
-
onAnalyticsEvent?.("import_data_added");
|
|
98
|
-
setStep("mapping");
|
|
99
|
-
}, 100);
|
|
100
|
-
};
|
|
101
|
-
$[7] = collection.properties;
|
|
102
|
-
$[8] = importConfig;
|
|
103
|
-
$[9] = onAnalyticsEvent;
|
|
104
|
-
$[10] = t5;
|
|
105
|
-
} else {
|
|
106
|
-
t5 = $[10];
|
|
107
|
-
}
|
|
108
|
-
const onDataAdded = t5;
|
|
109
|
-
const t6 = collection.propertiesOrder;
|
|
110
|
-
let properties;
|
|
111
|
-
let t7;
|
|
112
|
-
if ($[11] !== collection.properties || $[12] !== t6) {
|
|
113
|
-
properties = getPropertiesWithPropertiesOrder(collection.properties, t6);
|
|
114
|
-
t7 = Object.entries(properties).flatMap(_temp);
|
|
115
|
-
$[11] = collection.properties;
|
|
116
|
-
$[12] = t6;
|
|
117
|
-
$[13] = properties;
|
|
118
|
-
$[14] = t7;
|
|
119
|
-
} else {
|
|
120
|
-
properties = $[13];
|
|
121
|
-
t7 = $[14];
|
|
122
|
-
}
|
|
123
|
-
const propertiesAndLevel = t7;
|
|
124
|
-
let t8;
|
|
125
|
-
if ($[15] !== collection.properties || $[16] !== collection.propertiesOrder) {
|
|
126
|
-
t8 = collection.propertiesOrder ?? Object.keys(collection.properties);
|
|
127
|
-
$[15] = collection.properties;
|
|
128
|
-
$[16] = collection.propertiesOrder;
|
|
129
|
-
$[17] = t8;
|
|
130
|
-
} else {
|
|
131
|
-
t8 = $[17];
|
|
132
|
-
}
|
|
133
|
-
const propertiesOrder = t8;
|
|
134
|
-
let t9;
|
|
135
|
-
if ($[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
136
|
-
t9 = /* @__PURE__ */ jsx(UploadIcon, { size: iconSize.small });
|
|
137
|
-
$[18] = t9;
|
|
138
|
-
} else {
|
|
139
|
-
t9 = $[18];
|
|
140
|
-
}
|
|
141
|
-
let t10;
|
|
142
|
-
if ($[19] !== handleClickOpen) {
|
|
143
|
-
t10 = /* @__PURE__ */ jsx(Tooltip, { title: "Import", asChild: true, children: /* @__PURE__ */ jsx(IconButton, { size: "small", color: "primary", onClick: handleClickOpen, children: t9 }) });
|
|
144
|
-
$[19] = handleClickOpen;
|
|
145
|
-
$[20] = t10;
|
|
146
|
-
} else {
|
|
147
|
-
t10 = $[20];
|
|
148
|
-
}
|
|
149
|
-
const t11 = step !== "initial";
|
|
150
|
-
const t12 = step !== "initial";
|
|
151
|
-
const t13 = step === "initial" ? "lg" : "7xl";
|
|
152
|
-
const t14 = step === "preview";
|
|
153
|
-
let t15;
|
|
154
|
-
if ($[21] !== t14) {
|
|
155
|
-
t15 = /* @__PURE__ */ jsx(DialogTitle, { variant: "h6", hidden: t14, children: "Import data" });
|
|
156
|
-
$[21] = t14;
|
|
157
|
-
$[22] = t15;
|
|
158
|
-
} else {
|
|
159
|
-
t15 = $[22];
|
|
160
|
-
}
|
|
161
|
-
const t16 = step === "preview";
|
|
162
|
-
let t17;
|
|
163
|
-
if ($[23] !== onDataAdded || $[24] !== step) {
|
|
164
|
-
t17 = step === "initial" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
165
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: "Upload a CSV, Excel or JSON file and map it to your existing schema" }),
|
|
166
|
-
/* @__PURE__ */ jsx(ImportFileUpload, { onDataAdded })
|
|
167
|
-
] });
|
|
168
|
-
$[23] = onDataAdded;
|
|
169
|
-
$[24] = step;
|
|
170
|
-
$[25] = t17;
|
|
171
|
-
} else {
|
|
172
|
-
t17 = $[25];
|
|
173
|
-
}
|
|
174
|
-
let t18;
|
|
175
|
-
if ($[26] !== importConfig || $[27] !== onAnalyticsEvent || $[28] !== properties || $[29] !== propertiesAndLevel || $[30] !== step) {
|
|
176
|
-
t18 = step === "mapping" && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(DataNewPropertiesMapping, { importConfig, destinationProperties: properties, buildPropertyView: (t192) => {
|
|
177
|
-
const {
|
|
178
|
-
isIdColumn,
|
|
179
|
-
propertyKey,
|
|
180
|
-
importKey
|
|
181
|
-
} = t192;
|
|
182
|
-
return /* @__PURE__ */ jsx(PropertyTreeSelect, { selectedPropertyKey: propertyKey ?? "", properties, propertiesAndLevel, isIdColumn, onIdSelected: () => {
|
|
183
|
-
importConfig.setIdColumn(importKey);
|
|
184
|
-
}, onPropertySelected: (newPropertyKey) => {
|
|
185
|
-
onAnalyticsEvent?.("import_mapping_field_updated");
|
|
186
|
-
const newHeadersMapping = Object.entries(importConfig.headersMapping).map((t202) => {
|
|
187
|
-
const [currentImportKey, currentPropertyKey] = t202;
|
|
188
|
-
if (currentPropertyKey === newPropertyKey) {
|
|
189
|
-
return {
|
|
190
|
-
[currentImportKey]: null
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
if (currentImportKey === importKey) {
|
|
194
|
-
return {
|
|
195
|
-
[currentImportKey]: newPropertyKey
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
return {
|
|
199
|
-
[currentImportKey]: currentPropertyKey
|
|
200
|
-
};
|
|
201
|
-
}).reduce(_temp2, {});
|
|
202
|
-
importConfig.setHeadersMapping(newHeadersMapping);
|
|
203
|
-
if (newPropertyKey === importConfig.idColumn) {
|
|
204
|
-
importConfig.setIdColumn(void 0);
|
|
205
|
-
}
|
|
206
|
-
} });
|
|
207
|
-
} }) });
|
|
208
|
-
$[26] = importConfig;
|
|
209
|
-
$[27] = onAnalyticsEvent;
|
|
210
|
-
$[28] = properties;
|
|
211
|
-
$[29] = propertiesAndLevel;
|
|
212
|
-
$[30] = step;
|
|
213
|
-
$[31] = t18;
|
|
214
|
-
} else {
|
|
215
|
-
t18 = $[31];
|
|
216
|
-
}
|
|
217
|
-
let t19;
|
|
218
|
-
if ($[32] !== importConfig || $[33] !== properties || $[34] !== propertiesOrder || $[35] !== step) {
|
|
219
|
-
t19 = step === "preview" && /* @__PURE__ */ jsx(ImportDataPreview, { importConfig, properties, propertiesOrder });
|
|
220
|
-
$[32] = importConfig;
|
|
221
|
-
$[33] = properties;
|
|
222
|
-
$[34] = propertiesOrder;
|
|
223
|
-
$[35] = step;
|
|
224
|
-
$[36] = t19;
|
|
225
|
-
} else {
|
|
226
|
-
t19 = $[36];
|
|
227
|
-
}
|
|
228
|
-
let t20;
|
|
229
|
-
if ($[37] !== collection || $[38] !== importConfig || $[39] !== path || $[40] !== snackbarController || $[41] !== step) {
|
|
230
|
-
t20 = step === "import_data_saving" && importConfig && /* @__PURE__ */ jsx(ImportSaveInProgress, { importConfig, collection, path, onImportSuccess: (importedCollection) => {
|
|
231
|
-
handleClose();
|
|
232
|
-
snackbarController.open({
|
|
233
|
-
type: "info",
|
|
234
|
-
message: "Data imported successfully"
|
|
235
|
-
});
|
|
236
|
-
} });
|
|
237
|
-
$[37] = collection;
|
|
238
|
-
$[38] = importConfig;
|
|
239
|
-
$[39] = path;
|
|
240
|
-
$[40] = snackbarController;
|
|
241
|
-
$[41] = step;
|
|
242
|
-
$[42] = t20;
|
|
243
|
-
} else {
|
|
244
|
-
t20 = $[42];
|
|
245
|
-
}
|
|
246
|
-
let t21;
|
|
247
|
-
if ($[43] !== t16 || $[44] !== t17 || $[45] !== t18 || $[46] !== t19 || $[47] !== t20) {
|
|
248
|
-
t21 = /* @__PURE__ */ jsxs(DialogContent, { className: "h-full flex flex-col gap-4 my-4", fullHeight: t16, children: [
|
|
249
|
-
t17,
|
|
250
|
-
t18,
|
|
251
|
-
t19,
|
|
252
|
-
t20
|
|
253
|
-
] });
|
|
254
|
-
$[43] = t16;
|
|
255
|
-
$[44] = t17;
|
|
256
|
-
$[45] = t18;
|
|
257
|
-
$[46] = t19;
|
|
258
|
-
$[47] = t20;
|
|
259
|
-
$[48] = t21;
|
|
260
|
-
} else {
|
|
261
|
-
t21 = $[48];
|
|
262
|
-
}
|
|
263
|
-
let t22;
|
|
264
|
-
if ($[49] !== step) {
|
|
265
|
-
t22 = step === "mapping" && /* @__PURE__ */ jsx(Button, { onClick: () => setStep("initial"), variant: "text", children: "Back" });
|
|
266
|
-
$[49] = step;
|
|
267
|
-
$[50] = t22;
|
|
268
|
-
} else {
|
|
269
|
-
t22 = $[50];
|
|
270
|
-
}
|
|
271
|
-
let t23;
|
|
272
|
-
if ($[51] !== step) {
|
|
273
|
-
t23 = step === "preview" && /* @__PURE__ */ jsx(Button, { onClick: () => setStep("mapping"), variant: "text", children: "Back" });
|
|
274
|
-
$[51] = step;
|
|
275
|
-
$[52] = t23;
|
|
276
|
-
} else {
|
|
277
|
-
t23 = $[52];
|
|
278
|
-
}
|
|
279
|
-
let t24;
|
|
280
|
-
if ($[53] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
281
|
-
t24 = /* @__PURE__ */ jsx(Button, { onClick: handleClose, variant: "text", children: "Cancel" });
|
|
282
|
-
$[53] = t24;
|
|
283
|
-
} else {
|
|
284
|
-
t24 = $[53];
|
|
285
|
-
}
|
|
286
|
-
let t25;
|
|
287
|
-
if ($[54] !== onMappingComplete || $[55] !== step) {
|
|
288
|
-
t25 = step === "mapping" && /* @__PURE__ */ jsx(Button, { variant: "filled", color: "primary", onClick: onMappingComplete, children: "Next" });
|
|
289
|
-
$[54] = onMappingComplete;
|
|
290
|
-
$[55] = step;
|
|
291
|
-
$[56] = t25;
|
|
292
|
-
} else {
|
|
293
|
-
t25 = $[56];
|
|
294
|
-
}
|
|
295
|
-
let t26;
|
|
296
|
-
if ($[57] !== onPreviewComplete || $[58] !== step) {
|
|
297
|
-
t26 = step === "preview" && /* @__PURE__ */ jsx(Button, { variant: "filled", color: "primary", onClick: onPreviewComplete, children: "Save data" });
|
|
298
|
-
$[57] = onPreviewComplete;
|
|
299
|
-
$[58] = step;
|
|
300
|
-
$[59] = t26;
|
|
301
|
-
} else {
|
|
302
|
-
t26 = $[59];
|
|
303
|
-
}
|
|
304
|
-
let t27;
|
|
305
|
-
if ($[60] !== t22 || $[61] !== t23 || $[62] !== t25 || $[63] !== t26) {
|
|
306
|
-
t27 = /* @__PURE__ */ jsxs(DialogActions, { children: [
|
|
307
|
-
t22,
|
|
308
|
-
t23,
|
|
309
|
-
t24,
|
|
310
|
-
t25,
|
|
311
|
-
t26
|
|
312
|
-
] });
|
|
313
|
-
$[60] = t22;
|
|
314
|
-
$[61] = t23;
|
|
315
|
-
$[62] = t25;
|
|
316
|
-
$[63] = t26;
|
|
317
|
-
$[64] = t27;
|
|
318
|
-
} else {
|
|
319
|
-
t27 = $[64];
|
|
320
|
-
}
|
|
321
|
-
let t28;
|
|
322
|
-
if ($[65] !== open || $[66] !== t11 || $[67] !== t12 || $[68] !== t13 || $[69] !== t15 || $[70] !== t21 || $[71] !== t27) {
|
|
323
|
-
t28 = /* @__PURE__ */ jsxs(Dialog, { open, fullWidth: t11, fullHeight: t12, maxWidth: t13, children: [
|
|
324
|
-
t15,
|
|
325
|
-
t21,
|
|
326
|
-
t27
|
|
327
|
-
] });
|
|
328
|
-
$[65] = open;
|
|
329
|
-
$[66] = t11;
|
|
330
|
-
$[67] = t12;
|
|
331
|
-
$[68] = t13;
|
|
332
|
-
$[69] = t15;
|
|
333
|
-
$[70] = t21;
|
|
334
|
-
$[71] = t27;
|
|
335
|
-
$[72] = t28;
|
|
336
|
-
} else {
|
|
337
|
-
t28 = $[72];
|
|
338
|
-
}
|
|
339
|
-
let t29;
|
|
340
|
-
if ($[73] !== t10 || $[74] !== t28) {
|
|
341
|
-
t29 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
342
|
-
t10,
|
|
343
|
-
t28
|
|
344
|
-
] });
|
|
345
|
-
$[73] = t10;
|
|
346
|
-
$[74] = t28;
|
|
347
|
-
$[75] = t29;
|
|
348
|
-
} else {
|
|
349
|
-
t29 = $[75];
|
|
350
|
-
}
|
|
351
|
-
return t29;
|
|
352
|
-
}
|
|
353
|
-
function _temp2(acc, curr) {
|
|
354
|
-
return {
|
|
355
|
-
...acc,
|
|
356
|
-
...curr
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
function _temp(t0) {
|
|
360
|
-
const [key, property] = t0;
|
|
361
|
-
return getPropertiesAndLevel(key, property, 0);
|
|
362
|
-
}
|
|
363
|
-
const internalIDValue = "__internal_id__";
|
|
364
|
-
function PropertyTreeSelect(t0) {
|
|
365
|
-
const $ = c(17);
|
|
366
|
-
const {
|
|
367
|
-
selectedPropertyKey,
|
|
368
|
-
properties,
|
|
369
|
-
onPropertySelected,
|
|
370
|
-
onIdSelected,
|
|
371
|
-
propertiesAndLevel,
|
|
372
|
-
isIdColumn
|
|
373
|
-
} = t0;
|
|
374
|
-
let t1;
|
|
375
|
-
if ($[0] !== properties || $[1] !== selectedPropertyKey) {
|
|
376
|
-
t1 = selectedPropertyKey ? getPropertyInPath(properties, selectedPropertyKey) : null;
|
|
377
|
-
$[0] = properties;
|
|
378
|
-
$[1] = selectedPropertyKey;
|
|
379
|
-
$[2] = t1;
|
|
380
|
-
} else {
|
|
381
|
-
t1 = $[2];
|
|
382
|
-
}
|
|
383
|
-
const selectedProperty = t1;
|
|
384
|
-
let t2;
|
|
385
|
-
if ($[3] !== selectedProperty) {
|
|
386
|
-
t2 = (selectedPropertyKey_0) => {
|
|
387
|
-
if (selectedPropertyKey_0 === internalIDValue) {
|
|
388
|
-
return /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "p-4", children: "Use this column as ID" });
|
|
389
|
-
}
|
|
390
|
-
if (!selectedPropertyKey_0 || !selectedProperty) {
|
|
391
|
-
return /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "disabled", className: "p-4", children: "Do not import this property" });
|
|
392
|
-
}
|
|
393
|
-
return /* @__PURE__ */ jsx(PropertySelectEntry, { propertyKey: selectedPropertyKey_0, property: selectedProperty });
|
|
394
|
-
};
|
|
395
|
-
$[3] = selectedProperty;
|
|
396
|
-
$[4] = t2;
|
|
397
|
-
} else {
|
|
398
|
-
t2 = $[4];
|
|
399
|
-
}
|
|
400
|
-
const renderValue = t2;
|
|
401
|
-
let t3;
|
|
402
|
-
if ($[5] !== onIdSelected || $[6] !== onPropertySelected) {
|
|
403
|
-
t3 = (value) => {
|
|
404
|
-
if (value === internalIDValue) {
|
|
405
|
-
onIdSelected();
|
|
406
|
-
onPropertySelected(null);
|
|
407
|
-
} else {
|
|
408
|
-
if (value === "__do_not_import") {
|
|
409
|
-
onPropertySelected(null);
|
|
410
|
-
} else {
|
|
411
|
-
onPropertySelected(value);
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
};
|
|
415
|
-
$[5] = onIdSelected;
|
|
416
|
-
$[6] = onPropertySelected;
|
|
417
|
-
$[7] = t3;
|
|
418
|
-
} else {
|
|
419
|
-
t3 = $[7];
|
|
420
|
-
}
|
|
421
|
-
const onSelectValueChange = t3;
|
|
422
|
-
const t4 = isIdColumn ? internalIDValue : selectedPropertyKey ?? void 0;
|
|
423
|
-
let t5;
|
|
424
|
-
if ($[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
425
|
-
t5 = /* @__PURE__ */ jsx(SelectItem, { value: "__do_not_import", children: /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "disabled", className: "p-4", children: "Do not import this property" }) });
|
|
426
|
-
$[8] = t5;
|
|
427
|
-
} else {
|
|
428
|
-
t5 = $[8];
|
|
429
|
-
}
|
|
430
|
-
let t6;
|
|
431
|
-
if ($[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
432
|
-
t6 = /* @__PURE__ */ jsx(SelectItem, { value: internalIDValue, children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "p-4", children: "Use this column as ID" }) });
|
|
433
|
-
$[9] = t6;
|
|
434
|
-
} else {
|
|
435
|
-
t6 = $[9];
|
|
436
|
-
}
|
|
437
|
-
let t7;
|
|
438
|
-
if ($[10] !== propertiesAndLevel) {
|
|
439
|
-
t7 = propertiesAndLevel.map(_temp3);
|
|
440
|
-
$[10] = propertiesAndLevel;
|
|
441
|
-
$[11] = t7;
|
|
442
|
-
} else {
|
|
443
|
-
t7 = $[11];
|
|
444
|
-
}
|
|
445
|
-
let t8;
|
|
446
|
-
if ($[12] !== onSelectValueChange || $[13] !== renderValue || $[14] !== t4 || $[15] !== t7) {
|
|
447
|
-
t8 = /* @__PURE__ */ jsxs(Select, { value: t4, fullWidth: true, onValueChange: onSelectValueChange, renderValue, children: [
|
|
448
|
-
t5,
|
|
449
|
-
t6,
|
|
450
|
-
t7
|
|
451
|
-
] });
|
|
452
|
-
$[12] = onSelectValueChange;
|
|
453
|
-
$[13] = renderValue;
|
|
454
|
-
$[14] = t4;
|
|
455
|
-
$[15] = t7;
|
|
456
|
-
$[16] = t8;
|
|
457
|
-
} else {
|
|
458
|
-
t8 = $[16];
|
|
459
|
-
}
|
|
460
|
-
return t8;
|
|
461
|
-
}
|
|
462
|
-
function _temp3(t0) {
|
|
463
|
-
const {
|
|
464
|
-
property,
|
|
465
|
-
level,
|
|
466
|
-
propertyKey
|
|
467
|
-
} = t0;
|
|
468
|
-
return /* @__PURE__ */ jsx(SelectItem, { value: propertyKey, disabled: property.type === "map", children: /* @__PURE__ */ jsx(PropertySelectEntry, { propertyKey, property, level }) }, propertyKey);
|
|
469
|
-
}
|
|
470
|
-
function getPropertiesAndLevel(key, property, level) {
|
|
471
|
-
const properties = [];
|
|
472
|
-
properties.push({
|
|
473
|
-
property,
|
|
474
|
-
level,
|
|
475
|
-
propertyKey: key
|
|
476
|
-
});
|
|
477
|
-
if (property.type === "map" && property.properties) {
|
|
478
|
-
Object.entries(property.properties).forEach(([childKey, value]) => {
|
|
479
|
-
properties.push(...getPropertiesAndLevel(`${key}.${childKey}`, value, level + 1));
|
|
480
|
-
});
|
|
481
|
-
}
|
|
482
|
-
return properties;
|
|
483
|
-
}
|
|
484
|
-
function PropertySelectEntry(t0) {
|
|
485
|
-
const $ = c(21);
|
|
486
|
-
const {
|
|
487
|
-
propertyKey,
|
|
488
|
-
property,
|
|
489
|
-
level: t1
|
|
490
|
-
} = t0;
|
|
491
|
-
const level = t1 === void 0 ? 0 : t1;
|
|
492
|
-
const {
|
|
493
|
-
propertyConfigs
|
|
494
|
-
} = useCustomizationController();
|
|
495
|
-
let t2;
|
|
496
|
-
if ($[0] !== property || $[1] !== propertyConfigs) {
|
|
497
|
-
t2 = getFieldConfig(property, propertyConfigs);
|
|
498
|
-
$[0] = property;
|
|
499
|
-
$[1] = propertyConfigs;
|
|
500
|
-
$[2] = t2;
|
|
501
|
-
} else {
|
|
502
|
-
t2 = $[2];
|
|
503
|
-
}
|
|
504
|
-
const widget = t2;
|
|
505
|
-
let t3;
|
|
506
|
-
if ($[3] !== level) {
|
|
507
|
-
t3 = new Array(level).fill(0).map(_temp4);
|
|
508
|
-
$[3] = level;
|
|
509
|
-
$[4] = t3;
|
|
510
|
-
} else {
|
|
511
|
-
t3 = $[4];
|
|
512
|
-
}
|
|
513
|
-
const t4 = widget?.name;
|
|
514
|
-
let t5;
|
|
515
|
-
if ($[5] !== widget) {
|
|
516
|
-
t5 = /* @__PURE__ */ jsx(PropertyConfigBadge, { propertyConfig: widget });
|
|
517
|
-
$[5] = widget;
|
|
518
|
-
$[6] = t5;
|
|
519
|
-
} else {
|
|
520
|
-
t5 = $[6];
|
|
521
|
-
}
|
|
522
|
-
let t6;
|
|
523
|
-
if ($[7] !== t4 || $[8] !== t5) {
|
|
524
|
-
t6 = /* @__PURE__ */ jsx("div", { className: "m-4", children: /* @__PURE__ */ jsx(Tooltip, { title: t4, children: t5 }) });
|
|
525
|
-
$[7] = t4;
|
|
526
|
-
$[8] = t5;
|
|
527
|
-
$[9] = t6;
|
|
528
|
-
} else {
|
|
529
|
-
t6 = $[9];
|
|
530
|
-
}
|
|
531
|
-
const t7 = property.name ? property.name : " ";
|
|
532
|
-
let t8;
|
|
533
|
-
if ($[10] !== t7) {
|
|
534
|
-
t8 = /* @__PURE__ */ jsx(Typography, { variant: "body1", component: "span", className: "grow pr-2", children: t7 });
|
|
535
|
-
$[10] = t7;
|
|
536
|
-
$[11] = t8;
|
|
537
|
-
} else {
|
|
538
|
-
t8 = $[11];
|
|
539
|
-
}
|
|
540
|
-
let t9;
|
|
541
|
-
if ($[12] !== propertyKey) {
|
|
542
|
-
t9 = /* @__PURE__ */ jsx(Typography, { className: " pr-2", variant: "body2", component: "span", color: "secondary", children: propertyKey });
|
|
543
|
-
$[12] = propertyKey;
|
|
544
|
-
$[13] = t9;
|
|
545
|
-
} else {
|
|
546
|
-
t9 = $[13];
|
|
547
|
-
}
|
|
548
|
-
let t10;
|
|
549
|
-
if ($[14] !== t8 || $[15] !== t9) {
|
|
550
|
-
t10 = /* @__PURE__ */ jsxs("div", { className: "flex flex-col grow p-2 pl-2", children: [
|
|
551
|
-
t8,
|
|
552
|
-
t9
|
|
553
|
-
] });
|
|
554
|
-
$[14] = t8;
|
|
555
|
-
$[15] = t9;
|
|
556
|
-
$[16] = t10;
|
|
557
|
-
} else {
|
|
558
|
-
t10 = $[16];
|
|
559
|
-
}
|
|
560
|
-
let t11;
|
|
561
|
-
if ($[17] !== t10 || $[18] !== t3 || $[19] !== t6) {
|
|
562
|
-
t11 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row w-full text-start items-center h-full", children: [
|
|
563
|
-
t3,
|
|
564
|
-
t6,
|
|
565
|
-
t10
|
|
566
|
-
] });
|
|
567
|
-
$[17] = t10;
|
|
568
|
-
$[18] = t3;
|
|
569
|
-
$[19] = t6;
|
|
570
|
-
$[20] = t11;
|
|
571
|
-
} else {
|
|
572
|
-
t11 = $[20];
|
|
573
|
-
}
|
|
574
|
-
return t11;
|
|
575
|
-
}
|
|
576
|
-
function _temp4(_, index) {
|
|
577
|
-
return /* @__PURE__ */ jsx("div", { className: cls(defaultBorderMixin, "ml-8 border-l h-12") }, index);
|
|
578
|
-
}
|
|
579
|
-
function ImportDataPreview(t0) {
|
|
580
|
-
const $ = c(14);
|
|
581
|
-
const {
|
|
582
|
-
importConfig,
|
|
583
|
-
properties
|
|
584
|
-
} = t0;
|
|
585
|
-
const authController = useAuthController();
|
|
586
|
-
const collectionRegistry = useCollectionRegistryController();
|
|
587
|
-
let t1;
|
|
588
|
-
if ($[0] !== authController || $[1] !== collectionRegistry || $[2] !== importConfig || $[3] !== properties) {
|
|
589
|
-
t1 = () => {
|
|
590
|
-
const mappedData = importConfig.importData.map((d) => convertDataToEntity(authController, collectionRegistry, d, importConfig.idColumn, importConfig.headersMapping, properties, "TEMP_PATH", importConfig.defaultValues));
|
|
591
|
-
importConfig.setEntities(mappedData);
|
|
592
|
-
};
|
|
593
|
-
$[0] = authController;
|
|
594
|
-
$[1] = collectionRegistry;
|
|
595
|
-
$[2] = importConfig;
|
|
596
|
-
$[3] = properties;
|
|
597
|
-
$[4] = t1;
|
|
598
|
-
} else {
|
|
599
|
-
t1 = $[4];
|
|
600
|
-
}
|
|
601
|
-
let t2;
|
|
602
|
-
if ($[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
603
|
-
t2 = [];
|
|
604
|
-
$[5] = t2;
|
|
605
|
-
} else {
|
|
606
|
-
t2 = $[5];
|
|
607
|
-
}
|
|
608
|
-
useEffect(t1, t2);
|
|
609
|
-
const selectionController = useSelectionController();
|
|
610
|
-
let t3;
|
|
611
|
-
if ($[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
612
|
-
t3 = /* @__PURE__ */ jsxs("div", { children: [
|
|
613
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", children: "Imported data preview" }),
|
|
614
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: "Entities with the same id will be overwritten" })
|
|
615
|
-
] });
|
|
616
|
-
$[6] = t3;
|
|
617
|
-
} else {
|
|
618
|
-
t3 = $[6];
|
|
619
|
-
}
|
|
620
|
-
let t4;
|
|
621
|
-
if ($[7] !== importConfig.entities) {
|
|
622
|
-
t4 = {
|
|
623
|
-
data: importConfig.entities,
|
|
624
|
-
dataLoading: false,
|
|
625
|
-
noMoreToLoad: false
|
|
626
|
-
};
|
|
627
|
-
$[7] = importConfig.entities;
|
|
628
|
-
$[8] = t4;
|
|
629
|
-
} else {
|
|
630
|
-
t4 = $[8];
|
|
631
|
-
}
|
|
632
|
-
let t5;
|
|
633
|
-
if ($[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
634
|
-
t5 = /* @__PURE__ */ jsx("div", { className: "h-12" });
|
|
635
|
-
$[9] = t5;
|
|
636
|
-
} else {
|
|
637
|
-
t5 = $[9];
|
|
638
|
-
}
|
|
639
|
-
let t6;
|
|
640
|
-
if ($[10] !== properties || $[11] !== selectionController || $[12] !== t4) {
|
|
641
|
-
t6 = /* @__PURE__ */ jsx(EntityCollectionTable, { title: t3, tableController: t4, enablePopupIcon: false, endAdornment: t5, filterable: false, sortable: false, openEntityMode: "full_screen", selectionController, properties });
|
|
642
|
-
$[10] = properties;
|
|
643
|
-
$[11] = selectionController;
|
|
644
|
-
$[12] = t4;
|
|
645
|
-
$[13] = t6;
|
|
646
|
-
} else {
|
|
647
|
-
t6 = $[13];
|
|
648
|
-
}
|
|
649
|
-
return t6;
|
|
650
|
-
}
|
|
651
|
-
function buildHeadersMappingFromData(objArr, properties) {
|
|
652
|
-
const headersMapping = {};
|
|
653
|
-
objArr.filter(Boolean).forEach((obj) => {
|
|
654
|
-
Object.keys(obj).forEach((key) => {
|
|
655
|
-
const child = obj[key];
|
|
656
|
-
if (child != null && typeof child === "object" && !Array.isArray(child)) {
|
|
657
|
-
const childProperty = properties?.[key];
|
|
658
|
-
const childProperties = childProperty && "properties" in childProperty ? childProperty.properties : void 0;
|
|
659
|
-
const childHeadersMapping = buildHeadersMappingFromData([child], childProperties);
|
|
660
|
-
Object.entries(childHeadersMapping).forEach(([subKey, mapping]) => {
|
|
661
|
-
headersMapping[`${key}.${subKey}`] = `${key}.${mapping}`;
|
|
662
|
-
});
|
|
663
|
-
}
|
|
664
|
-
if (!properties) {
|
|
665
|
-
headersMapping[key] = key;
|
|
666
|
-
} else if (key in properties) {
|
|
667
|
-
headersMapping[key] = key;
|
|
668
|
-
} else {
|
|
669
|
-
const slug = slugify(key);
|
|
670
|
-
if (slug in properties) {
|
|
671
|
-
headersMapping[key] = slug;
|
|
672
|
-
} else {
|
|
673
|
-
headersMapping[key] = key;
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
});
|
|
677
|
-
});
|
|
678
|
-
return headersMapping;
|
|
679
|
-
}
|
|
680
|
-
export {
|
|
681
|
-
ImportCollectionAction as I,
|
|
682
|
-
PropertySelectEntry as P,
|
|
683
|
-
ImportDataPreview as a
|
|
684
|
-
};
|
|
685
|
-
//# sourceMappingURL=ImportCollectionAction-Dn7lya6E.js.map
|