@rebasepro/cms 0.24.0 → 0.24.1-canary.g56af4a4
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/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.js +95 -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/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/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 +211 -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/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 +257 -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 +208 -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 +1 -0
- package/dist/index.js +149 -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 +44 -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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default_entity_actions.js","names":[],"sources":["../../../src/components/common/default_entity_actions.tsx"],"sourcesContent":["import {\n Alert,\n BooleanSwitch,\n Button,\n CircularProgress,\n CopyIcon,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n iconSize,\n KeyRoundIcon,\n Label,\n LoadingButton,\n LockIcon,\n PencilIcon,\n RadioGroup,\n RadioGroupItem,\n ShieldIcon,\n TextField,\n Trash2Icon,\n Unlink2Icon,\n Typography,\n lazyChunk\n} from \"@rebasepro/ui\";\nimport type { User } from \"@rebasepro/types\";\nimport type { EntityAction, UserCreationResult } from \"@rebasepro/cms-types\";\nimport {\n apiBaseOf,\n populateFetchCache,\n useAuthController,\n useRebaseClient,\n useSnackbarController,\n useTranslation\n} from \"@rebasepro/app\";\n// Lazy: the navigation layer imports the account actions from this module on\n// every page, and the delete dialog renders the record's preview — a static\n// import here put the entity preview stack on the login screen.\nconst DeleteEntityDialog = lazyChunk(() => import(\"../DeleteEntityDialog\").then(m => ({ default: m.DeleteEntityDialog })));\nimport { addRecentId } from \"../CollectionViewBinding/utils\";\nimport { navigateToEntity } from \"../../util/navigation_utils\";\nimport { callerHoldsScope } from \"../../util/caller_scopes\";\nimport { resolveDefaultSelectedView } from \"@rebasepro/app\";\nimport { CreationResultDialog } from \"../admin/CreationResultDialog\";\nimport React, { Suspense, useCallback, useEffect, useRef, useState } from \"react\";\n\nexport const editEntityAction: EntityAction = {\n icon: <PencilIcon size={iconSize.smallest}/>,\n key: \"edit\",\n name: \"Edit\",\n nameKey: \"edit\",\n collapsed: false,\n isEnabled: ({ entity }) => Boolean(entity),\n onClick({\n entity,\n collection,\n path,\n context,\n sidePanelController,\n highlightEntity,\n unhighlightEntity,\n openEntityMode\n }): Promise<void> {\n\n if (!entity) {\n throw new Error(\"INTERNAL: editEntityAction: Entity is undefined\");\n }\n\n if (!sidePanelController) {\n throw new Error(\"INTERNAL: editEntityAction: sidePanelController is undefined\");\n }\n\n highlightEntity?.(entity);\n\n context?.analyticsController?.onAnalyticsEvent?.(\"entity_click\", {\n path: entity.path,\n entityId: entity.id\n });\n\n if (collection) {\n addRecentId(collection.slug, entity.id);\n }\n\n const newFullIdPath = path ?? collection?.slug ?? entity.path;\n const defaultSelectedView = collection?.defaultEntityAction === \"view\"\n ? \"edit\"\n : resolveDefaultSelectedView(\n collection ? collection.defaultSelectedView : undefined,\n {\n status: \"existing\",\n entityId: entity.id\n }\n );\n if (!context?.urlController) {\n throw new Error(\"INTERNAL: editEntityAction: urlController is undefined\");\n }\n // The record opens with the row it was opened from on screen, as a\n // click on the row does.\n populateFetchCache(newFullIdPath, [entity]);\n navigateToEntity({\n openEntityMode,\n collection,\n entityId: entity.id,\n path: newFullIdPath,\n sidePanelController,\n onClose: () => unhighlightEntity?.(entity),\n navigation: context.urlController,\n selectedTab: defaultSelectedView\n });\n\n return Promise.resolve(undefined);\n }\n}\n\nexport const copyEntityAction: EntityAction = {\n icon: <CopyIcon size={iconSize.smallest}/>,\n name: \"Copy\",\n nameKey: \"copy\",\n key: \"copy\",\n isEnabled: ({ entity }) => Boolean(entity),\n onClick({\n entity,\n collection,\n context,\n path,\n sidePanelController,\n highlightEntity,\n unhighlightEntity,\n onCollectionChange,\n openEntityMode\n }): Promise<void> {\n if (!entity) {\n throw new Error(\"INTERNAL: copyEntityAction: Entity is undefined\");\n }\n if (!sidePanelController) {\n throw new Error(\"INTERNAL: copyEntityAction: sidePanelController is undefined\");\n }\n highlightEntity?.(entity);\n context?.analyticsController?.onAnalyticsEvent?.(\"copy_entity_click\", {\n path: entity.path,\n entityId: entity.id\n });\n\n const usedPath = path ?? collection?.slug ?? entity.path;\n if (!context?.urlController) {\n throw new Error(\"INTERNAL: copyEntityAction: urlController is undefined\");\n }\n // The copy's form starts from this row's values.\n populateFetchCache(usedPath, [entity]);\n navigateToEntity({\n openEntityMode,\n collection,\n entityId: entity.id,\n path: usedPath,\n copy: true,\n sidePanelController,\n onClose: () => unhighlightEntity?.(entity),\n // The copy is a new row: saved from a side panel, it changes what\n // the collection counts, the way a delete does.\n onUpdate: onCollectionChange,\n navigation: context.urlController\n });\n\n return Promise.resolve(undefined);\n }\n}\n\n/**\n * The destructive row action, in its two readings.\n *\n * The mechanics are identical — both issue a DELETE at the row's path — but\n * what that *does* is not. On a many-to-many tab the path is\n * `posts/1/tags/5`, and the backend removes the junction row: tag 5 keeps\n * existing, and every other post keeps it. Labelling that \"Delete\" and warning\n * about permanent removal describes an operation the server will not perform.\n */\nfunction buildRemoveEntityAction({\n key,\n name,\n nameKey,\n icon,\n variant\n}: {\n key: string;\n name: string;\n nameKey: string;\n icon: React.ReactElement;\n variant: \"delete\" | \"unlink\";\n}): EntityAction {\n return {\n icon,\n name,\n nameKey,\n key,\n isEnabled: ({ entity }) => Boolean(entity),\n onClick({\n entity,\n path,\n collection,\n context,\n selectionController,\n onCollectionChange,\n navigateBack,\n openEntityMode\n }): Promise<void> {\n if (!entity) {\n throw new Error(`INTERNAL: ${key}EntityAction: Entity is undefined`);\n }\n if (!context?.dialogsController) {\n throw new Error(`INTERNAL: ${key}EntityAction: context.dialogsController is undefined`);\n }\n const { closeDialog } = context.dialogsController.open({\n key: `${key}_entity_dialog_` + entity.id,\n Component: ({ open }) => {\n if (!collection || !path)\n throw new Error(`${key}EntityAction: Collection is undefined`);\n return <Suspense fallback={null}><DeleteEntityDialog\n target={entity}\n path={path}\n collection={collection}\n variant={variant}\n open={open}\n onEntityDelete={() => {\n context?.analyticsController?.onAnalyticsEvent?.(\"single_entity_deleted\", {\n path\n });\n selectionController?.toggleEntitySelection(entity, false);\n onCollectionChange?.();\n // In full-screen mode, navigateBack would go to the deleted entity's\n // detail URL, which no longer exists. Navigate to the parent collection instead.\n if (openEntityMode === \"full_screen\" && context?.urlController) {\n const collectionUrl = context.urlController.buildUrlCollectionPath(path);\n context.urlController.navigate(collectionUrl, { replace: true });\n } else {\n navigateBack?.();\n }\n }}\n onClose={closeDialog}/></Suspense>;\n }\n });\n return Promise.resolve(undefined);\n }\n };\n}\n\nexport const deleteEntityAction: EntityAction = buildRemoveEntityAction({\n key: \"delete\",\n name: \"Delete\",\n nameKey: \"delete\",\n icon: <Trash2Icon size={iconSize.smallest}/>,\n variant: \"delete\"\n});\n\n/**\n * The destructive action on a tab whose rows are shared through a junction.\n * Removes the row from *this* parent; the row itself is untouched.\n */\nexport const unlinkEntityAction: EntityAction = buildRemoveEntityAction({\n key: \"unlink\",\n name: \"Remove\",\n nameKey: \"remove\",\n icon: <Unlink2Icon size={iconSize.smallest}/>,\n variant: \"unlink\"\n});\n\nexport function ResetPasswordActionDialog({\n user,\n open,\n onClose\n}: {\n user: User;\n open: boolean;\n onClose: () => void;\n}) {\n const client = useRebaseClient<{ baseUrl?: string, apiPath?: string }>();\n const { getAuthToken } = useAuthController();\n const snackbarController = useSnackbarController();\n const { t } = useTranslation();\n const [loading, setLoading] = useState(false);\n const [creationResult, setCreationResult] = useState<UserCreationResult | null>(null);\n const [mode, setMode] = useState<\"email\" | \"manual\">(\"email\");\n const [password, setPassword] = useState(\"\");\n const [confirmPassword, setConfirmPassword] = useState(\"\");\n const [error, setError] = useState<string | null>(null);\n\n // Strength rules are enforced server side, and are overridable through auth\n // hooks, so only the match is checked here; the server's message is surfaced.\n const passwordsMatch = password === confirmPassword;\n const canSubmit = mode === \"email\" || (password.length > 0 && passwordsMatch);\n\n const handleConfirm = async () => {\n if (mode === \"manual\" && !passwordsMatch) {\n setError(t(\"passwords_dont_match\", { defaultValue: \"Passwords don't match\" }));\n return;\n }\n setLoading(true);\n setError(null);\n try {\n const apiBase = apiBaseOf(client) ?? \"\";\n const token = await getAuthToken?.();\n const response = await fetch(`${apiBase}/admin/users/${user.uid}/reset-password`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n ...(token ? { \"Authorization\": `Bearer ${token}` } : {})\n },\n body: JSON.stringify(mode === \"manual\" ? { password } : {})\n });\n if (!response.ok) {\n const errorBody = await response.json().catch(() => ({}));\n throw new Error(errorBody.error?.message || errorBody.message || \"Failed to reset password\");\n }\n const data = await response.json();\n snackbarController.open({\n type: \"success\",\n message: t(\"reset_password_success\", { defaultValue: \"Password reset successfully\" })\n });\n // Setting a password directly returns neither an invitation nor a\n // temporary password, so there is no result to show.\n if (data.invitationSent || data.temporaryPassword) {\n setCreationResult({\n user,\n invitationSent: data.invitationSent ?? false,\n temporaryPassword: data.temporaryPassword,\n emailDeliveryFailed: data.emailDeliveryFailed ?? false\n });\n } else {\n onClose();\n }\n } catch (e: unknown) {\n setError(e instanceof Error ? e.message : t(\"error_resetting_password\", { defaultValue: \"Error resetting password\" }));\n } finally {\n setLoading(false);\n }\n };\n\n if (creationResult) {\n return (\n <CreationResultDialog\n result={creationResult}\n onClose={() => {\n setCreationResult(null);\n onClose();\n }}\n />\n );\n }\n\n return (\n <Dialog open={open} onOpenChange={(o) => !o ? onClose() : undefined} maxWidth=\"xl\">\n <DialogTitle variant=\"h5\" gutterBottom={false}>\n {t(\"reset_password\", { defaultValue: \"Reset Password\" })}\n </DialogTitle>\n <DialogContent>\n <div className=\"flex flex-col gap-4 py-2\">\n <Typography variant=\"body2\" color=\"secondary\">\n {user.email}\n </Typography>\n\n <RadioGroup value={mode} onValueChange={(v) => {\n setMode(v as \"email\" | \"manual\");\n setError(null);\n }}>\n <div className=\"flex items-center gap-2\">\n <RadioGroupItem value=\"email\" id=\"reset-password-mode-email\"/>\n <Label htmlFor=\"reset-password-mode-email\">\n {t(\"reset_password_send_email\", { defaultValue: \"Send a password reset email\" })}\n </Label>\n </div>\n <div className=\"flex items-center gap-2\">\n <RadioGroupItem value=\"manual\" id=\"reset-password-mode-manual\"/>\n <Label htmlFor=\"reset-password-mode-manual\">\n {t(\"reset_password_set_manually\", { defaultValue: \"Set a password manually\" })}\n </Label>\n </div>\n </RadioGroup>\n\n {mode === \"manual\" && <>\n <TextField\n type=\"password\"\n value={password}\n autoFocus\n autoComplete=\"new-password\"\n label={t(\"new_password\", { defaultValue: \"New Password\" })}\n onChange={(e) => {\n setPassword(e.target.value);\n setError(null);\n }}\n />\n <TextField\n type=\"password\"\n value={confirmPassword}\n autoComplete=\"new-password\"\n error={confirmPassword.length > 0 && !passwordsMatch}\n label={t(\"confirm_password\", { defaultValue: \"Confirm New Password\" })}\n onChange={(e) => {\n setConfirmPassword(e.target.value);\n setError(null);\n }}\n />\n <Typography variant=\"caption\" color=\"secondary\">\n {t(\"reset_password_set_manually_description\", {\n defaultValue: \"The password is updated immediately and no email is sent. Share it with the user securely.\"\n })}\n </Typography>\n </>}\n\n {error && <Alert color=\"error\">\n <Typography variant=\"body2\">{error}</Typography>\n </Alert>}\n </div>\n </DialogContent>\n <DialogActions>\n <Button variant=\"text\" onClick={onClose} disabled={loading}>\n {t(\"cancel\")}\n </Button>\n <LoadingButton variant=\"filled\" onClick={handleConfirm} loading={loading} disabled={!canSubmit}>\n {t(\"reset_password\", { defaultValue: \"Reset Password\" })}\n </LoadingButton>\n </DialogActions>\n </Dialog>\n );\n}\n\nexport const resetPasswordAction: EntityAction = {\n icon: <KeyRoundIcon size={iconSize.smallest}/>,\n name: \"Reset Password\",\n nameKey: \"reset_password\",\n key: \"reset_password\",\n collapsed: false,\n showActionsInListView: true,\n isEnabled: ({ entity }) => Boolean(entity),\n onClick({\n entity,\n context\n }): Promise<void> {\n if (!entity) {\n throw new Error(\"INTERNAL: resetPasswordAction: Entity is undefined\");\n }\n if (!context?.dialogsController) {\n throw new Error(\"INTERNAL: resetPasswordAction: context.dialogsController is undefined\");\n }\n\n const user: User = {\n uid: entity.id as string,\n email: entity.values?.email as string,\n displayName: entity.values?.displayName as string || null,\n photoURL: entity.values?.photoURL as string || null,\n providerId: entity.values?.providerId as string || \"custom\",\n isAnonymous: entity.values?.isAnonymous as boolean || false,\n roles: entity.values?.roles as string[] || []\n };\n\n const { closeDialog } = context!.dialogsController.open({\n key: \"reset_password_dialog_\" + entity.id,\n Component: ({ open }) => (\n <ResetPasswordActionDialog\n user={user}\n open={open}\n onClose={closeDialog}\n />\n )\n });\n return Promise.resolve(undefined);\n }\n};\n\n\n/** The signed-in caller's uid, if the context names one. */\nfunction callerUid(authController: unknown): string | undefined {\n if (typeof authController !== \"object\" || authController === null || !(\"user\" in authController)) return undefined;\n const user = authController.user;\n return typeof user === \"object\" && user !== null && \"uid\" in user && typeof user.uid === \"string\" ? user.uid : undefined;\n}\n\n/** A user, as the two dialogs below need one. */\ninterface AdminActionUser {\n uid: string;\n email: string;\n}\n\nfunction adminActionUser(entity: { id: unknown; values?: Record<string, unknown> }): AdminActionUser {\n return { uid: String(entity.id), email: typeof entity.values?.email === \"string\" ? entity.values.email : \"\" };\n}\n\n/**\n * Call an admin user route as the signed-in caller, and turn a refusal into an\n * error carrying the server's message.\n */\nfunction useAdminUserRequest() {\n const client = useRebaseClient<{ baseUrl?: string, apiPath?: string }>();\n const { getAuthToken } = useAuthController();\n return useCallback(async <T,>(path: string, init?: { method: string; body?: unknown }): Promise<T> => {\n const token = await getAuthToken?.();\n const response = await fetch(`${apiBaseOf(client) ?? \"\"}/admin/users/${path}`, {\n method: init?.method ?? \"GET\",\n headers: {\n ...(init?.body !== undefined ? { \"Content-Type\": \"application/json\" } : {}),\n ...(token ? { \"Authorization\": `Bearer ${token}` } : {})\n },\n ...(init?.body !== undefined ? { body: JSON.stringify(init.body) } : {})\n });\n const body = await response.json().catch(() => ({}));\n if (!response.ok) {\n throw new Error(body?.error?.message || body?.message || response.statusText);\n }\n return body as T;\n }, [client, getAuthToken]);\n}\n\n/**\n * Remove every second factor and recovery code an account has, and end its\n * sessions — for someone who lost their authenticator and their codes.\n */\nexport function ResetMfaActionDialog({\n user,\n open,\n onClose\n}: {\n user: AdminActionUser;\n open: boolean;\n onClose: () => void;\n}) {\n const request = useAdminUserRequest();\n const snackbarController = useSnackbarController();\n const { t } = useTranslation();\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState<string | null>(null);\n\n const handleConfirm = async () => {\n setLoading(true);\n setError(null);\n try {\n await request<{ removedFactors: number }>(`${encodeURIComponent(user.uid)}/mfa`, { method: \"DELETE\" });\n snackbarController.open({ type: \"success\", message: t(\"reset_mfa_success\") });\n onClose();\n } catch (e: unknown) {\n setError(e instanceof Error ? e.message : String(e));\n } finally {\n setLoading(false);\n }\n };\n\n return (\n <Dialog open={open} onOpenChange={(o) => !o ? onClose() : undefined} maxWidth=\"md\">\n <DialogTitle variant=\"h5\" gutterBottom={false}>\n {t(\"reset_mfa_title\")}\n </DialogTitle>\n <DialogContent>\n <div className=\"flex flex-col gap-4 py-2\">\n <Typography variant=\"body2\" color=\"secondary\">{user.email}</Typography>\n <Typography variant=\"body2\">{t(\"reset_mfa_description\")}</Typography>\n {error && <Alert color=\"error\"><Typography variant=\"body2\">{error}</Typography></Alert>}\n </div>\n </DialogContent>\n <DialogActions>\n <Button variant=\"text\" onClick={onClose} disabled={loading}>{t(\"cancel\")}</Button>\n <LoadingButton variant=\"filled\" color=\"error\" onClick={handleConfirm} loading={loading}>\n {t(\"reset_mfa_confirm\")}\n </LoadingButton>\n </DialogActions>\n </Dialog>\n );\n}\n\n/**\n * Switch an account off, or back on. Off, it signs in nowhere and every session\n * and token it holds ends; the switch reads the account's state first, because\n * the users table does not carry it.\n */\nexport function AccountAccessDialog({\n user,\n open,\n onClose\n}: {\n user: AdminActionUser;\n open: boolean;\n onClose: () => void;\n}) {\n const request = useAdminUserRequest();\n const snackbarController = useSnackbarController();\n const { t } = useTranslation();\n const [disabled, setDisabled] = useState<boolean | null>(null);\n const [saving, setSaving] = useState(false);\n const [error, setError] = useState<string | null>(null);\n // Read once per user, whatever the request helper's identity does between renders.\n const requestRef = useRef(request);\n requestRef.current = request;\n\n useEffect(() => {\n let current = true;\n requestRef.current<{ user: { disabled?: boolean } }>(encodeURIComponent(user.uid))\n .then(({ user: account }) => { if (current) setDisabled(account.disabled === true); })\n .catch((e: unknown) => { if (current) setError(e instanceof Error ? e.message : String(e)); });\n return () => { current = false; };\n }, [user.uid]);\n\n const toggle = async (next: boolean) => {\n setSaving(true);\n setError(null);\n try {\n const { user: account } = await request<{ user: { disabled?: boolean } }>(encodeURIComponent(user.uid), {\n method: \"PUT\",\n body: { disabled: next }\n });\n setDisabled(account.disabled === true);\n snackbarController.open({ type: \"success\", message: t(next ? \"account_disabled_success\" : \"account_enabled_success\") });\n } catch (e: unknown) {\n setError(e instanceof Error ? e.message : String(e));\n } finally {\n setSaving(false);\n }\n };\n\n return (\n <Dialog open={open} onOpenChange={(o) => !o ? onClose() : undefined} maxWidth=\"md\">\n <DialogTitle variant=\"h5\" gutterBottom={false}>\n {t(\"account_access_title\")}\n </DialogTitle>\n <DialogContent>\n <div className=\"flex flex-col gap-4 py-2\">\n <Typography variant=\"body2\" color=\"secondary\">{user.email}</Typography>\n {disabled === null && !error\n ? <div className=\"flex justify-center p-4\"><CircularProgress size=\"small\"/></div>\n : disabled !== null && (\n <div className=\"flex items-center gap-3\">\n <BooleanSwitch value={disabled} disabled={saving} onValueChange={(next) => void toggle(next)}/>\n <Typography variant=\"body1\">{t(\"account_disabled_label\")}</Typography>\n </div>\n )}\n <Typography variant=\"body2\" color=\"secondary\">{t(\"account_disabled_description\")}</Typography>\n {error && <Alert color=\"error\"><Typography variant=\"body2\">{error}</Typography></Alert>}\n </div>\n </DialogContent>\n <DialogActions>\n <Button variant=\"text\" onClick={onClose}>{t(\"close\")}</Button>\n </DialogActions>\n </Dialog>\n );\n}\n\n/**\n * Reset a user's two-step verification. Offered to whoever holds\n * `users:write`, as `DELETE /admin/users/:uid/mfa` is; the route also refuses\n * an account that outranks the caller, and the dialog says so.\n */\nexport const resetMfaAction: EntityAction = {\n icon: <ShieldIcon size={iconSize.smallest}/>,\n name: \"Reset two-step verification\",\n nameKey: \"reset_mfa_title\",\n key: \"reset_mfa\",\n isEnabled: ({ entity, context }) => Boolean(entity) && callerHoldsScope(context?.authController, \"users:write\"),\n onClick({ entity, context }): Promise<void> {\n if (!entity) throw new Error(\"INTERNAL: resetMfaAction: Entity is undefined\");\n if (!context?.dialogsController) throw new Error(\"INTERNAL: resetMfaAction: context.dialogsController is undefined\");\n const { closeDialog } = context.dialogsController.open({\n key: \"reset_mfa_dialog_\" + entity.id,\n Component: ({ open }) => <ResetMfaActionDialog user={adminActionUser(entity)} open={open} onClose={closeDialog}/>\n });\n return Promise.resolve(undefined);\n }\n};\n\n/**\n * Switch an account off or on. Offered to whoever holds `users:write`, as\n * `PUT /admin/users/:uid { disabled }` is, and never on the caller's own\n * account, which the route refuses.\n */\nexport const accountAccessAction: EntityAction = {\n icon: <LockIcon size={iconSize.smallest}/>,\n name: \"Disable or enable account\",\n nameKey: \"account_access_action\",\n key: \"account_access\",\n isEnabled: ({ entity, context }) => Boolean(entity)\n && callerHoldsScope(context?.authController, \"users:write\")\n && String(entity?.id) !== callerUid(context?.authController),\n onClick({ entity, context }): Promise<void> {\n if (!entity) throw new Error(\"INTERNAL: accountAccessAction: Entity is undefined\");\n if (!context?.dialogsController) throw new Error(\"INTERNAL: accountAccessAction: context.dialogsController is undefined\");\n const { closeDialog } = context.dialogsController.open({\n key: \"account_access_dialog_\" + entity.id,\n Component: ({ open }) => <AccountAccessDialog user={adminActionUser(entity)} open={open} onClose={closeDialog}/>\n });\n return Promise.resolve(undefined);\n }\n};\n"],"mappings":";;;;;;;;;AAsCA,IAAM,qBAAqB,gBAAgB,OAAO,2BAAwB,CAAC,MAAK,OAAM,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;AAQzH,IAAa,mBAAiC;CAC1C,MAAM,oBAAC,YAAD,EAAY,MAAM,SAA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CACT,KAAK;CACL,YAAY,EAAE,QAAQ,cAAc,QAAQ,MAAM,KAC3C,iBAAiB,SAAS,gBAAgB,aAAa,KACvD,OAAO,QAAQ,EAAE,MAAM,UAAU,SAAS,cAAc;CAC/D,QAAQ,EAAE,QAAQ,WAA0B;EACxC,IAAI,CAAC,QAAQ,MAAM,IAAI,MAAM,oDAAoD;EACjF,IAAI,CAAC,SAAS,mBAAmB,MAAM,IAAI,MAAM,uEAAuE;EACxH,MAAM,EAAE,gBAAgB,QAAQ,kBAAkB,KAAK;GACnD,KAAK,2BAA2B,OAAO;GACvC,YAAY,EAAE,WAAW,oBAAC,qBAAD;IAAqB,MAAM,gBAAgB,MAAM;IAAS;IAAM,SAAS;GAAa,CAAA;EACnH,CAAC;EACD,OAAO,QAAQ,QAAQ,KAAA,CAAS;CACpC;AACJ"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Whether the drawer is open — pinned, or floating open under the pointer —
|
|
4
|
+
* as a subscription rather than a value.
|
|
5
|
+
*
|
|
6
|
+
* The rail floats open every time the pointer crosses it. Handed down as a
|
|
7
|
+
* prop, that re-rendered every navigation row twice per crossing. The stock
|
|
8
|
+
* rows follow it through the drawer's `data-expanded` attribute and CSS
|
|
9
|
+
* instead, and only a row whose tooltip wants to open listens here, to mask
|
|
10
|
+
* the tooltip once its label is showing.
|
|
11
|
+
*/
|
|
12
|
+
export type DrawerExpansion = {
|
|
13
|
+
isExpanded(): boolean;
|
|
14
|
+
subscribe(listener: () => void): () => void;
|
|
15
|
+
};
|
|
16
|
+
/** Provided by `DefaultDrawer`; `null` outside one. */
|
|
17
|
+
export declare const DrawerExpansionContext: React.Context<DrawerExpansion | null>;
|
|
18
|
+
/** One store for the life of the drawer, updated as `expanded` changes. */
|
|
19
|
+
export declare function useDrawerExpansion(expanded: boolean): DrawerExpansion;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the drawer around this row is open — read only while `listening`.
|
|
22
|
+
* A row that is not listening gets `false` and is not re-rendered when the
|
|
23
|
+
* drawer opens or closes.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useDrawerExpandedWhile(listening: boolean): boolean;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
//#region src/components/drawer_expansion.ts
|
|
3
|
+
/** Provided by `DefaultDrawer`; `null` outside one. */
|
|
4
|
+
var DrawerExpansionContext = React.createContext(null);
|
|
5
|
+
/** One store for the life of the drawer, updated as `expanded` changes. */
|
|
6
|
+
function useDrawerExpansion(expanded) {
|
|
7
|
+
const [store] = React.useState(() => {
|
|
8
|
+
let current = expanded;
|
|
9
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
10
|
+
return {
|
|
11
|
+
isExpanded: () => current,
|
|
12
|
+
subscribe: (listener) => {
|
|
13
|
+
listeners.add(listener);
|
|
14
|
+
return () => {
|
|
15
|
+
listeners.delete(listener);
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
set: (next) => {
|
|
19
|
+
if (next === current) return;
|
|
20
|
+
current = next;
|
|
21
|
+
listeners.forEach((listener) => listener());
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
React.useLayoutEffect(() => {
|
|
26
|
+
store.set(expanded);
|
|
27
|
+
}, [store, expanded]);
|
|
28
|
+
return store;
|
|
29
|
+
}
|
|
30
|
+
var subscribeToNothing = () => () => void 0;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the drawer around this row is open — read only while `listening`.
|
|
33
|
+
* A row that is not listening gets `false` and is not re-rendered when the
|
|
34
|
+
* drawer opens or closes.
|
|
35
|
+
*/
|
|
36
|
+
function useDrawerExpandedWhile(listening) {
|
|
37
|
+
const expansion = React.useContext(DrawerExpansionContext);
|
|
38
|
+
const active = listening && expansion !== null;
|
|
39
|
+
return React.useSyncExternalStore(active ? expansion.subscribe : subscribeToNothing, () => active ? expansion.isExpanded() : false, () => false);
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { DrawerExpansionContext, useDrawerExpandedWhile, useDrawerExpansion };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=drawer_expansion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer_expansion.js","names":[],"sources":["../../src/components/drawer_expansion.ts"],"sourcesContent":["import React from \"react\";\n\n/**\n * Whether the drawer is open — pinned, or floating open under the pointer —\n * as a subscription rather than a value.\n *\n * The rail floats open every time the pointer crosses it. Handed down as a\n * prop, that re-rendered every navigation row twice per crossing. The stock\n * rows follow it through the drawer's `data-expanded` attribute and CSS\n * instead, and only a row whose tooltip wants to open listens here, to mask\n * the tooltip once its label is showing.\n */\nexport type DrawerExpansion = {\n isExpanded(): boolean;\n subscribe(listener: () => void): () => void;\n};\n\n/** Provided by `DefaultDrawer`; `null` outside one. */\nexport const DrawerExpansionContext = React.createContext<DrawerExpansion | null>(null);\n\n/** One store for the life of the drawer, updated as `expanded` changes. */\nexport function useDrawerExpansion(expanded: boolean): DrawerExpansion {\n const [store] = React.useState(() => {\n let current = expanded;\n const listeners = new Set<() => void>();\n return {\n isExpanded: () => current,\n subscribe: (listener: () => void) => {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n },\n set: (next: boolean) => {\n if (next === current) return;\n current = next;\n listeners.forEach(listener => listener());\n }\n };\n });\n // Before paint, with the attribute the CSS reads, so a masked tooltip and\n // a showing label never appear together.\n React.useLayoutEffect(() => {\n store.set(expanded);\n }, [store, expanded]);\n return store;\n}\n\nconst subscribeToNothing = () => () => undefined;\n\n/**\n * Whether the drawer around this row is open — read only while `listening`.\n * A row that is not listening gets `false` and is not re-rendered when the\n * drawer opens or closes.\n */\nexport function useDrawerExpandedWhile(listening: boolean): boolean {\n const expansion = React.useContext(DrawerExpansionContext);\n const active = listening && expansion !== null;\n return React.useSyncExternalStore(\n active ? expansion.subscribe : subscribeToNothing,\n () => active ? expansion.isExpanded() : false,\n () => false\n );\n}\n"],"mappings":";;;AAkBA,IAAa,yBAAyB,MAAM,cAAsC,IAAI;;AAGtF,SAAgB,mBAAmB,UAAoC;CACnE,MAAM,CAAC,SAAS,MAAM,eAAe;EACjC,IAAI,UAAU;EACd,MAAM,4BAAY,IAAI,IAAgB;EACtC,OAAO;GACH,kBAAkB;GAClB,YAAY,aAAyB;IACjC,UAAU,IAAI,QAAQ;IACtB,aAAa;KACT,UAAU,OAAO,QAAQ;IAC7B;GACJ;GACA,MAAM,SAAkB;IACpB,IAAI,SAAS,SAAS;IACtB,UAAU;IACV,UAAU,SAAQ,aAAY,SAAS,CAAC;GAC5C;EACJ;CACJ,CAAC;CAGD,MAAM,sBAAsB;EACxB,MAAM,IAAI,QAAQ;CACtB,GAAG,CAAC,OAAO,QAAQ,CAAC;CACpB,OAAO;AACX;AAEA,IAAM,iCAAiC,KAAA;;;;;;AAOvC,SAAgB,uBAAuB,WAA6B;CAChE,MAAM,YAAY,MAAM,WAAW,sBAAsB;CACzD,MAAM,SAAS,aAAa,cAAc;CAC1C,OAAO,MAAM,qBACT,SAAS,UAAU,YAAY,0BACzB,SAAS,UAAU,WAAW,IAAI,aAClC,KACV;AACJ"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { DefaultFieldConfig } from "../types/fields.js";
|
|
2
2
|
import type { Property } from "@rebasepro/types";
|
|
3
3
|
import type { PropertyConfig } from "@rebasepro/cms-types";
|
|
4
|
+
import { getDefaultFieldId, getFieldId } from "./field_ids.js";
|
|
5
|
+
export { getDefaultFieldId, getFieldId };
|
|
4
6
|
/**
|
|
5
7
|
* Every `Field` below is a getter on purpose — do not inline it back to
|
|
6
8
|
* `Field: SomeBinding`.
|
|
@@ -21,5 +23,3 @@ import type { PropertyConfig } from "@rebasepro/cms-types";
|
|
|
21
23
|
export declare const DEFAULT_FIELD_CONFIGS: Record<DefaultFieldConfig, PropertyConfig>;
|
|
22
24
|
export declare function getDefaultFieldConfig(property: Property): PropertyConfig | undefined;
|
|
23
25
|
export declare function getFieldConfig(property: Property, propertyConfigs: Record<string, PropertyConfig>): PropertyConfig | undefined;
|
|
24
|
-
export declare function getDefaultFieldId(property: Property): "reference" | "geopoint" | "relation" | "binary" | "date_time" | "text_field" | "multiline" | "markdown" | "url" | "email" | "switch" | "select" | "multi_select" | "user_select" | "number_input" | "number_select" | "multi_number_select" | "file_upload" | "multi_file_upload" | "multi_references" | "group" | "key_value" | "repeat" | "custom_array" | "block" | "vector_input" | undefined;
|
|
25
|
-
export declare function getFieldId(property: Property): string | undefined;
|
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
import { ArrayCustomShapedFieldBinding } from "../form/field_bindings/ArrayCustomShapedFieldBinding.js";
|
|
2
|
+
import { ArrayOfReferencesFieldBinding } from "../form/field_bindings/ArrayOfReferencesFieldBinding.js";
|
|
3
|
+
import { BlockFieldBinding } from "../form/field_bindings/BlockFieldBinding.js";
|
|
4
|
+
import { DateTimeFieldBinding } from "../form/field_bindings/DateTimeFieldBinding.js";
|
|
5
|
+
import { KeyValueFieldBinding } from "../form/field_bindings/KeyValueFieldBinding.js";
|
|
6
|
+
import { MapFieldBinding } from "../form/field_bindings/MapFieldBinding.js";
|
|
7
|
+
import { MarkdownEditorFieldBinding } from "../form/field_bindings/MarkdownEditorFieldBinding.js";
|
|
8
|
+
import { MultiSelectFieldBinding } from "../form/field_bindings/MultiSelectFieldBinding.js";
|
|
9
|
+
import { ReferenceFieldBinding } from "../form/field_bindings/ReferenceFieldBinding.js";
|
|
10
|
+
import { RepeatFieldBinding } from "../form/field_bindings/RepeatFieldBinding.js";
|
|
11
|
+
import { SelectFieldBinding } from "../form/field_bindings/SelectFieldBinding.js";
|
|
12
|
+
import { StorageUploadFieldBinding } from "../form/field_bindings/StorageUploadFieldBinding.js";
|
|
13
|
+
import { SwitchFieldBinding } from "../form/field_bindings/SwitchFieldBinding.js";
|
|
14
|
+
import { TextFieldBinding } from "../form/field_bindings/TextFieldBinding.js";
|
|
15
|
+
import { VectorFieldBinding } from "../form/field_bindings/VectorFieldBinding.js";
|
|
16
|
+
import { GeopointFieldBinding } from "../form/field_bindings/GeopointFieldBinding.js";
|
|
17
|
+
import { BinaryFieldBinding } from "../form/field_bindings/BinaryFieldBinding.js";
|
|
18
|
+
import { RelationFieldBinding } from "../form/field_bindings/RelationFieldBinding.js";
|
|
19
|
+
import { UserSelectFieldBinding } from "../form/field_bindings/UserSelectFieldBinding.js";
|
|
20
|
+
import { getDefaultFieldId, getFieldId } from "./field_ids.js";
|
|
21
|
+
import { AlignLeftIcon, CalendarIcon, FlagIcon, FolderUpIcon, GlobeIcon, HashIcon, LinkIcon, ListIcon, ListOrderedIcon, MailIcon, QuoteIcon, RepeatIcon, Rows3Icon, TextIcon, UploadIcon, UserIcon, VoteIcon } from "@rebasepro/ui";
|
|
22
|
+
import { mergeDeep } from "@rebasepro/utils";
|
|
23
|
+
//#region src/components/field_configs.tsx
|
|
24
|
+
/**
|
|
25
|
+
* Every `Field` below is a getter on purpose — do not inline it back to
|
|
26
|
+
* `Field: SomeBinding`.
|
|
27
|
+
*
|
|
28
|
+
* This module and the field bindings form an import cycle: we import the
|
|
29
|
+
* bindings, the container bindings (map, repeat, block, custom-shaped array)
|
|
30
|
+
* import `PropertyFieldBinding` to render their children, and that imports
|
|
31
|
+
* `getFieldConfig` from here. Enter the cycle at a binding rather than here and
|
|
32
|
+
* this object is built while that binding's module is still initialising.
|
|
33
|
+
*
|
|
34
|
+
* As a plain value the binding would be read at that moment. It happens to
|
|
35
|
+
* survive today only because every binding is declared `export function`, which
|
|
36
|
+
* hoists; rewriting a single one as `export const` would make the read a
|
|
37
|
+
* temporal dead zone ReferenceError at import time, surfacing as a blank screen
|
|
38
|
+
* far from its cause. The getter defers the read to first access, long after
|
|
39
|
+
* every module has initialised, so declaration style stops mattering.
|
|
40
|
+
*/
|
|
41
|
+
var DEFAULT_FIELD_CONFIGS = {
|
|
42
|
+
text_field: {
|
|
43
|
+
key: "text_field",
|
|
44
|
+
name: "Text field",
|
|
45
|
+
description: "Simple short text",
|
|
46
|
+
Icon: TextIcon,
|
|
47
|
+
color: "#2d7ff9",
|
|
48
|
+
property: {
|
|
49
|
+
type: "string",
|
|
50
|
+
admin: { get Field() {
|
|
51
|
+
return TextFieldBinding;
|
|
52
|
+
} }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
multiline: {
|
|
56
|
+
key: "multiline",
|
|
57
|
+
name: "Multiline",
|
|
58
|
+
description: "Text with multiple lines",
|
|
59
|
+
Icon: AlignLeftIcon,
|
|
60
|
+
color: "#2d7ff9",
|
|
61
|
+
property: {
|
|
62
|
+
type: "string",
|
|
63
|
+
admin: {
|
|
64
|
+
multiline: true,
|
|
65
|
+
get Field() {
|
|
66
|
+
return TextFieldBinding;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
markdown: {
|
|
72
|
+
key: "markdown",
|
|
73
|
+
name: "Markdown",
|
|
74
|
+
description: "Text with advanced markdown syntax",
|
|
75
|
+
Icon: QuoteIcon,
|
|
76
|
+
color: "#2d7ff9",
|
|
77
|
+
property: {
|
|
78
|
+
type: "string",
|
|
79
|
+
admin: {
|
|
80
|
+
markdown: true,
|
|
81
|
+
get Field() {
|
|
82
|
+
return MarkdownEditorFieldBinding;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
url: {
|
|
88
|
+
key: "url",
|
|
89
|
+
name: "Url",
|
|
90
|
+
description: "Text with URL validation",
|
|
91
|
+
Icon: GlobeIcon,
|
|
92
|
+
color: "#154fb3",
|
|
93
|
+
property: {
|
|
94
|
+
type: "string",
|
|
95
|
+
url: true,
|
|
96
|
+
admin: { get Field() {
|
|
97
|
+
return TextFieldBinding;
|
|
98
|
+
} }
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
email: {
|
|
102
|
+
key: "email",
|
|
103
|
+
name: "Email",
|
|
104
|
+
description: "Text with email validation",
|
|
105
|
+
Icon: MailIcon,
|
|
106
|
+
color: "#154fb3",
|
|
107
|
+
property: {
|
|
108
|
+
type: "string",
|
|
109
|
+
email: true,
|
|
110
|
+
admin: { get Field() {
|
|
111
|
+
return TextFieldBinding;
|
|
112
|
+
} }
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
switch: {
|
|
116
|
+
key: "switch",
|
|
117
|
+
name: "Switch",
|
|
118
|
+
description: "Boolean true or false field (or yes or no, 0 or 1...)",
|
|
119
|
+
Icon: FlagIcon,
|
|
120
|
+
color: "#20d9d2",
|
|
121
|
+
property: {
|
|
122
|
+
type: "boolean",
|
|
123
|
+
admin: { get Field() {
|
|
124
|
+
return SwitchFieldBinding;
|
|
125
|
+
} }
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
select: {
|
|
129
|
+
key: "select",
|
|
130
|
+
name: "Select/enum",
|
|
131
|
+
description: "Select one text value from within an enumeration",
|
|
132
|
+
Icon: ListIcon,
|
|
133
|
+
color: "#4223c9",
|
|
134
|
+
property: {
|
|
135
|
+
type: "string",
|
|
136
|
+
enum: [],
|
|
137
|
+
admin: { get Field() {
|
|
138
|
+
return SelectFieldBinding;
|
|
139
|
+
} }
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
multi_select: {
|
|
143
|
+
key: "multi_select",
|
|
144
|
+
name: "Multi select (enum)",
|
|
145
|
+
description: "Select multiple text values from within an enumeration",
|
|
146
|
+
Icon: ListIcon,
|
|
147
|
+
color: "#4223c9",
|
|
148
|
+
property: {
|
|
149
|
+
type: "array",
|
|
150
|
+
of: {
|
|
151
|
+
type: "string",
|
|
152
|
+
enum: []
|
|
153
|
+
},
|
|
154
|
+
admin: { get Field() {
|
|
155
|
+
return MultiSelectFieldBinding;
|
|
156
|
+
} }
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
user_select: {
|
|
160
|
+
key: "user_select",
|
|
161
|
+
name: "User select",
|
|
162
|
+
description: "Select a user from the user management system. Store the user ID.",
|
|
163
|
+
Icon: UserIcon,
|
|
164
|
+
property: {
|
|
165
|
+
type: "string",
|
|
166
|
+
admin: { get Field() {
|
|
167
|
+
return UserSelectFieldBinding;
|
|
168
|
+
} }
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
number_input: {
|
|
172
|
+
key: "number_input",
|
|
173
|
+
name: "Number input",
|
|
174
|
+
description: "Simple number field with validation",
|
|
175
|
+
Icon: HashIcon,
|
|
176
|
+
color: "#bec920",
|
|
177
|
+
property: {
|
|
178
|
+
type: "number",
|
|
179
|
+
admin: { get Field() {
|
|
180
|
+
return TextFieldBinding;
|
|
181
|
+
} }
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
number_select: {
|
|
185
|
+
key: "number_select",
|
|
186
|
+
name: "Number select",
|
|
187
|
+
description: "Select a number value from within an enumeration",
|
|
188
|
+
Icon: ListOrderedIcon,
|
|
189
|
+
color: "#bec920",
|
|
190
|
+
property: {
|
|
191
|
+
type: "number",
|
|
192
|
+
enum: [],
|
|
193
|
+
admin: { get Field() {
|
|
194
|
+
return SelectFieldBinding;
|
|
195
|
+
} }
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
multi_number_select: {
|
|
199
|
+
key: "multi_number_select",
|
|
200
|
+
name: "Multiple number select",
|
|
201
|
+
description: "Select multiple number values from within an enumeration",
|
|
202
|
+
Icon: ListOrderedIcon,
|
|
203
|
+
color: "#bec920",
|
|
204
|
+
property: {
|
|
205
|
+
type: "array",
|
|
206
|
+
of: {
|
|
207
|
+
type: "number",
|
|
208
|
+
enum: []
|
|
209
|
+
},
|
|
210
|
+
admin: { get Field() {
|
|
211
|
+
return MultiSelectFieldBinding;
|
|
212
|
+
} }
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
file_upload: {
|
|
216
|
+
key: "file_upload",
|
|
217
|
+
name: "File upload",
|
|
218
|
+
description: "Input for uploading single files",
|
|
219
|
+
Icon: UploadIcon,
|
|
220
|
+
color: "#f92d9a",
|
|
221
|
+
property: {
|
|
222
|
+
type: "string",
|
|
223
|
+
storage: { storagePath: "{path}" },
|
|
224
|
+
admin: { get Field() {
|
|
225
|
+
return StorageUploadFieldBinding;
|
|
226
|
+
} }
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
multi_file_upload: {
|
|
230
|
+
key: "multi_file_upload",
|
|
231
|
+
name: "Multiple file upload",
|
|
232
|
+
description: "Input for uploading multiple files",
|
|
233
|
+
Icon: FolderUpIcon,
|
|
234
|
+
color: "#f92d9a",
|
|
235
|
+
property: {
|
|
236
|
+
type: "array",
|
|
237
|
+
of: {
|
|
238
|
+
type: "string",
|
|
239
|
+
storage: { storagePath: "{path}" }
|
|
240
|
+
},
|
|
241
|
+
admin: { get Field() {
|
|
242
|
+
return StorageUploadFieldBinding;
|
|
243
|
+
} }
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
reference: {
|
|
247
|
+
key: "reference",
|
|
248
|
+
name: "Reference",
|
|
249
|
+
description: "The value refers to a different collection (it is saved as a reference)",
|
|
250
|
+
Icon: LinkIcon,
|
|
251
|
+
color: "#ff0042",
|
|
252
|
+
property: {
|
|
253
|
+
type: "reference",
|
|
254
|
+
admin: { get Field() {
|
|
255
|
+
return ReferenceFieldBinding;
|
|
256
|
+
} }
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
multi_references: {
|
|
260
|
+
key: "multi_references",
|
|
261
|
+
name: "Multiple references",
|
|
262
|
+
description: "Multiple values that refer to a different collection",
|
|
263
|
+
Icon: LinkIcon,
|
|
264
|
+
color: "#ff0042",
|
|
265
|
+
property: {
|
|
266
|
+
type: "array",
|
|
267
|
+
of: { type: "reference" },
|
|
268
|
+
admin: { get Field() {
|
|
269
|
+
return ArrayOfReferencesFieldBinding;
|
|
270
|
+
} }
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
relation: {
|
|
274
|
+
key: "relation",
|
|
275
|
+
name: "Relation",
|
|
276
|
+
description: "Multiple values that refer to a different collection",
|
|
277
|
+
Icon: LinkIcon,
|
|
278
|
+
color: "#ff0042",
|
|
279
|
+
property: {
|
|
280
|
+
type: "relation",
|
|
281
|
+
admin: { get Field() {
|
|
282
|
+
return RelationFieldBinding;
|
|
283
|
+
} }
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
date_time: {
|
|
287
|
+
key: "date_time",
|
|
288
|
+
name: "Date/time",
|
|
289
|
+
description: "A date time select field",
|
|
290
|
+
Icon: CalendarIcon,
|
|
291
|
+
color: "#8b46ff",
|
|
292
|
+
property: {
|
|
293
|
+
type: "date",
|
|
294
|
+
admin: { get Field() {
|
|
295
|
+
return DateTimeFieldBinding;
|
|
296
|
+
} }
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
group: {
|
|
300
|
+
key: "group",
|
|
301
|
+
name: "Group",
|
|
302
|
+
description: "Group of multiple fields",
|
|
303
|
+
Icon: VoteIcon,
|
|
304
|
+
color: "#ff9408",
|
|
305
|
+
property: {
|
|
306
|
+
type: "map",
|
|
307
|
+
properties: {},
|
|
308
|
+
admin: { get Field() {
|
|
309
|
+
return MapFieldBinding;
|
|
310
|
+
} }
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
key_value: {
|
|
314
|
+
key: "key_value",
|
|
315
|
+
name: "Key-value",
|
|
316
|
+
description: "Flexible field that allows the user to add multiple key-value pairs",
|
|
317
|
+
Icon: VoteIcon,
|
|
318
|
+
color: "#ff9408",
|
|
319
|
+
property: {
|
|
320
|
+
type: "map",
|
|
321
|
+
keyValue: true,
|
|
322
|
+
admin: { get Field() {
|
|
323
|
+
return KeyValueFieldBinding;
|
|
324
|
+
} }
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
repeat: {
|
|
328
|
+
key: "repeat",
|
|
329
|
+
name: "Repeat/list",
|
|
330
|
+
description: "A field that gets repeated multiple times (e.g. multiple text fields)",
|
|
331
|
+
Icon: RepeatIcon,
|
|
332
|
+
color: "#ff9408",
|
|
333
|
+
property: {
|
|
334
|
+
type: "array",
|
|
335
|
+
of: { type: "string" },
|
|
336
|
+
admin: { get Field() {
|
|
337
|
+
return RepeatFieldBinding;
|
|
338
|
+
} }
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
custom_array: {
|
|
342
|
+
key: "custom_array",
|
|
343
|
+
name: "Custom array",
|
|
344
|
+
description: "A field that saved its value as an array of custom objects",
|
|
345
|
+
Icon: RepeatIcon,
|
|
346
|
+
color: "#ff9408",
|
|
347
|
+
property: {
|
|
348
|
+
type: "array",
|
|
349
|
+
admin: { get Field() {
|
|
350
|
+
return ArrayCustomShapedFieldBinding;
|
|
351
|
+
} }
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
block: {
|
|
355
|
+
key: "block",
|
|
356
|
+
name: "Block",
|
|
357
|
+
description: "A complex field that allows the user to compose different fields together, with a key/value format",
|
|
358
|
+
Icon: Rows3Icon,
|
|
359
|
+
color: "#ff9408",
|
|
360
|
+
property: {
|
|
361
|
+
type: "array",
|
|
362
|
+
oneOf: { properties: {} },
|
|
363
|
+
admin: { get Field() {
|
|
364
|
+
return BlockFieldBinding;
|
|
365
|
+
} }
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
vector_input: {
|
|
369
|
+
key: "vector_input",
|
|
370
|
+
name: "Vector input",
|
|
371
|
+
description: "Vector array for embeddings",
|
|
372
|
+
Icon: HashIcon,
|
|
373
|
+
color: "#bec920",
|
|
374
|
+
property: {
|
|
375
|
+
type: "vector",
|
|
376
|
+
dimensions: 1536,
|
|
377
|
+
admin: { get Field() {
|
|
378
|
+
return VectorFieldBinding;
|
|
379
|
+
} }
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
geopoint: {
|
|
383
|
+
key: "geopoint",
|
|
384
|
+
name: "Location",
|
|
385
|
+
description: "A latitude and longitude",
|
|
386
|
+
Icon: GlobeIcon,
|
|
387
|
+
color: "#3f9e5c",
|
|
388
|
+
property: {
|
|
389
|
+
type: "geopoint",
|
|
390
|
+
admin: { get Field() {
|
|
391
|
+
return GeopointFieldBinding;
|
|
392
|
+
} }
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
binary: {
|
|
396
|
+
key: "binary",
|
|
397
|
+
name: "Binary",
|
|
398
|
+
description: "Base64-encoded bytes",
|
|
399
|
+
Icon: HashIcon,
|
|
400
|
+
color: "#7a6ff0",
|
|
401
|
+
property: {
|
|
402
|
+
type: "binary",
|
|
403
|
+
admin: { get Field() {
|
|
404
|
+
return BinaryFieldBinding;
|
|
405
|
+
} }
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
function getDefaultFieldConfig(property) {
|
|
410
|
+
const fieldId = getDefaultFieldId(property);
|
|
411
|
+
if (!fieldId) {
|
|
412
|
+
console.error("No field id found for property", property);
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
return DEFAULT_FIELD_CONFIGS[fieldId];
|
|
416
|
+
}
|
|
417
|
+
function getFieldConfig(property, propertyConfigs) {
|
|
418
|
+
const fieldId = getFieldId(property);
|
|
419
|
+
const defaultFieldId = getDefaultFieldId(property);
|
|
420
|
+
if (!defaultFieldId) {
|
|
421
|
+
console.error("No field id found for property", property);
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
const defaultFieldConfig = defaultFieldId ? DEFAULT_FIELD_CONFIGS[defaultFieldId] : void 0;
|
|
425
|
+
const customField = fieldId && propertyConfigs ? propertyConfigs[fieldId] : void 0;
|
|
426
|
+
return mergeDeep(defaultFieldConfig ?? {}, customField ?? {});
|
|
427
|
+
}
|
|
428
|
+
//#endregion
|
|
429
|
+
export { DEFAULT_FIELD_CONFIGS, getDefaultFieldConfig, getDefaultFieldId, getFieldConfig, getFieldId };
|
|
430
|
+
|
|
431
|
+
//# sourceMappingURL=field_configs.js.map
|