@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,356 @@
|
|
|
1
|
+
import { SwitchControl } from "../SwitchControl.js";
|
|
2
|
+
import { GeneralPropertyValidation } from "./validation/GeneralPropertyValidation.js";
|
|
3
|
+
import { ArrayPropertyValidation } from "./validation/ArrayPropertyValidation.js";
|
|
4
|
+
import { ValidationPanel } from "./validation/ValidationPanel.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Button, DebouncedTextField, ExpandablePanel, MultiSelect, MultiSelectItem, Select, SelectItem, Typography, UploadCloudIcon } from "@rebasepro/ui";
|
|
8
|
+
import { useStorageSources, useTranslation } from "@rebasepro/app";
|
|
9
|
+
import { Field, getIn, useFormex } from "@rebasepro/forms";
|
|
10
|
+
import { DEFAULT_STORAGE_SOURCE_KEY } from "@rebasepro/types";
|
|
11
|
+
//#region src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx
|
|
12
|
+
var fileTypes = {
|
|
13
|
+
"image/*": "Images",
|
|
14
|
+
"video/*": "Videos",
|
|
15
|
+
"audio/*": "Audio files",
|
|
16
|
+
"application/*": "Files (pdf, zip, csv, excel...)",
|
|
17
|
+
"text/*": "Text files"
|
|
18
|
+
};
|
|
19
|
+
function StoragePropertyField({ multiple, existing, disabled }) {
|
|
20
|
+
const { values, setFieldValue } = useFormex();
|
|
21
|
+
const { t } = useTranslation();
|
|
22
|
+
const storageSources = useStorageSources();
|
|
23
|
+
const baseStoragePath = multiple ? "of.storage" : "storage";
|
|
24
|
+
const acceptedFiles = `${baseStoragePath}.acceptedFiles`;
|
|
25
|
+
const storageSource = `${baseStoragePath}.storageSource`;
|
|
26
|
+
`${baseStoragePath}`;
|
|
27
|
+
const fileName = `${baseStoragePath}.fileName`;
|
|
28
|
+
const maxSize = `${baseStoragePath}.maxSize`;
|
|
29
|
+
const storagePath = `${baseStoragePath}.storagePath`;
|
|
30
|
+
const storeUrl = `${baseStoragePath}.storeUrl`;
|
|
31
|
+
const includeBucketUrl = `${baseStoragePath}.includeBucketUrl`;
|
|
32
|
+
const imageResize = `${baseStoragePath}.imageResize`;
|
|
33
|
+
const imageResizeMaxWidth = `${imageResize}.maxWidth`;
|
|
34
|
+
const imageResizeMaxHeight = `${imageResize}.maxHeight`;
|
|
35
|
+
const imageResizeMode = `${imageResize}.mode`;
|
|
36
|
+
const imageResizeFormat = `${imageResize}.format`;
|
|
37
|
+
const imageResizeQuality = `${imageResize}.quality`;
|
|
38
|
+
const fileNameValue = getIn(values, fileName) ?? "{rand}_{file}";
|
|
39
|
+
const storagePathValue = getIn(values, storagePath) ?? "/";
|
|
40
|
+
const maxSizeValue = getIn(values, maxSize);
|
|
41
|
+
const imageResizeMaxWidthValue = getIn(values, imageResizeMaxWidth);
|
|
42
|
+
const imageResizeMaxHeightValue = getIn(values, imageResizeMaxHeight);
|
|
43
|
+
const imageResizeModeValue = getIn(values, imageResizeMode) ?? "cover";
|
|
44
|
+
const imageResizeFormatValue = getIn(values, imageResizeFormat) ?? "original";
|
|
45
|
+
const imageResizeQualityValue = getIn(values, imageResizeQuality);
|
|
46
|
+
const storedValue = getIn(values, acceptedFiles);
|
|
47
|
+
const fileTypesValue = Array.isArray(storedValue) ? storedValue : void 0;
|
|
48
|
+
const allFileTypesSelected = !fileTypesValue || fileTypesValue.length === 0;
|
|
49
|
+
const sourceKeys = Object.keys(storageSources.sources).filter((key) => key !== DEFAULT_STORAGE_SOURCE_KEY);
|
|
50
|
+
const storageSourceValue = getIn(values, storageSource) ?? DEFAULT_STORAGE_SOURCE_KEY;
|
|
51
|
+
const handleTypesChange = (value) => {
|
|
52
|
+
if (!value) setFieldValue(acceptedFiles, void 0);
|
|
53
|
+
else setFieldValue(acceptedFiles, value);
|
|
54
|
+
};
|
|
55
|
+
const hasFilenameCallback = typeof fileNameValue === "function";
|
|
56
|
+
const hasStoragePathCallback = typeof storagePathValue === "function";
|
|
57
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
58
|
+
className: "col-span-12",
|
|
59
|
+
children: /* @__PURE__ */ jsx(ExpandablePanel, {
|
|
60
|
+
title: /* @__PURE__ */ jsxs("div", {
|
|
61
|
+
className: "flex flex-row text-surface-500 text-text-secondary dark:text-text-secondary-dark",
|
|
62
|
+
children: [/* @__PURE__ */ jsx(UploadCloudIcon, {}), /* @__PURE__ */ jsx(Typography, {
|
|
63
|
+
variant: "subtitle2",
|
|
64
|
+
className: "ml-4",
|
|
65
|
+
children: "File upload config"
|
|
66
|
+
})]
|
|
67
|
+
}),
|
|
68
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
69
|
+
className: "grid grid-cols-12 gap-2 p-4",
|
|
70
|
+
children: [
|
|
71
|
+
sourceKeys.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
72
|
+
className: "col-span-12",
|
|
73
|
+
children: /* @__PURE__ */ jsxs(Select, {
|
|
74
|
+
className: "w-full",
|
|
75
|
+
disabled,
|
|
76
|
+
name: storageSource,
|
|
77
|
+
value: storageSourceValue,
|
|
78
|
+
onValueChange: (value) => setFieldValue(storageSource, !value || value === DEFAULT_STORAGE_SOURCE_KEY ? void 0 : value),
|
|
79
|
+
label: "Storage backend",
|
|
80
|
+
renderValue: (key) => {
|
|
81
|
+
return storageSources.registry[key]?.label ?? (key === DEFAULT_STORAGE_SOURCE_KEY ? "Default" : key);
|
|
82
|
+
},
|
|
83
|
+
children: [/* @__PURE__ */ jsx(SelectItem, {
|
|
84
|
+
value: DEFAULT_STORAGE_SOURCE_KEY,
|
|
85
|
+
children: "Default"
|
|
86
|
+
}), sourceKeys.map((key) => /* @__PURE__ */ jsx(SelectItem, {
|
|
87
|
+
value: key,
|
|
88
|
+
children: storageSources.registry[key]?.label ?? key
|
|
89
|
+
}, key))]
|
|
90
|
+
})
|
|
91
|
+
}),
|
|
92
|
+
/* @__PURE__ */ jsx("div", {
|
|
93
|
+
className: "col-span-12",
|
|
94
|
+
children: /* @__PURE__ */ jsx(MultiSelect, {
|
|
95
|
+
className: "w-full",
|
|
96
|
+
placeholder: "All file types allowed",
|
|
97
|
+
disabled,
|
|
98
|
+
value: fileTypesValue ?? [],
|
|
99
|
+
onValueChange: handleTypesChange,
|
|
100
|
+
label: allFileTypesSelected ? void 0 : "Allowed file types",
|
|
101
|
+
renderValues: (selected) => {
|
|
102
|
+
if (!selected || selected.length === 0) return "All file types allowed";
|
|
103
|
+
return selected.map((v) => fileTypes[v]).filter((v) => Boolean(v)).join(", ");
|
|
104
|
+
},
|
|
105
|
+
children: Object.entries(fileTypes).map(([value, label]) => /* @__PURE__ */ jsxs(MultiSelectItem, {
|
|
106
|
+
value,
|
|
107
|
+
className: "flex items-center gap-2",
|
|
108
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
109
|
+
className: "grow",
|
|
110
|
+
children: label
|
|
111
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
112
|
+
size: "small",
|
|
113
|
+
variant: "text",
|
|
114
|
+
onClick: (e) => {
|
|
115
|
+
e.preventDefault();
|
|
116
|
+
e.stopPropagation();
|
|
117
|
+
return setFieldValue(acceptedFiles, [value]);
|
|
118
|
+
},
|
|
119
|
+
children: "Only"
|
|
120
|
+
})]
|
|
121
|
+
}, value))
|
|
122
|
+
})
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ jsx("div", {
|
|
125
|
+
className: "col-span-12",
|
|
126
|
+
children: /* @__PURE__ */ jsx(Field, {
|
|
127
|
+
name: fileName,
|
|
128
|
+
as: DebouncedTextField,
|
|
129
|
+
label: t("storage_file_name"),
|
|
130
|
+
size: "small",
|
|
131
|
+
disabled: hasFilenameCallback || disabled,
|
|
132
|
+
value: hasFilenameCallback ? "-" : fileNameValue
|
|
133
|
+
})
|
|
134
|
+
}),
|
|
135
|
+
/* @__PURE__ */ jsxs("div", {
|
|
136
|
+
className: "col-span-12",
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ jsx(Field, {
|
|
139
|
+
name: storagePath,
|
|
140
|
+
as: DebouncedTextField,
|
|
141
|
+
label: t("storage_path"),
|
|
142
|
+
disabled: hasStoragePathCallback || disabled,
|
|
143
|
+
size: "small",
|
|
144
|
+
value: hasStoragePathCallback ? "-" : storagePathValue
|
|
145
|
+
}),
|
|
146
|
+
/* @__PURE__ */ jsxs(Typography, {
|
|
147
|
+
variant: "caption",
|
|
148
|
+
className: "ml-3.5 mt-1 mb-2",
|
|
149
|
+
children: [/* @__PURE__ */ jsx("p", { children: "You can use the following placeholders in the file name and storage path values:" }), /* @__PURE__ */ jsxs("ul", { children: [
|
|
150
|
+
/* @__PURE__ */ jsx("li", { children: "{file} - Full name of the uploaded file" }),
|
|
151
|
+
/* @__PURE__ */ jsx("li", { children: "{file.name} - Name of the uploaded file without extension" }),
|
|
152
|
+
/* @__PURE__ */ jsx("li", { children: "{file.ext} - Extension of the uploaded file" }),
|
|
153
|
+
/* @__PURE__ */ jsx("li", { children: "{entityId} - ID of the entity" }),
|
|
154
|
+
/* @__PURE__ */ jsx("li", { children: "{propertyKey} - ID of this field" }),
|
|
155
|
+
/* @__PURE__ */ jsx("li", { children: "{path} - Path of this entity" }),
|
|
156
|
+
/* @__PURE__ */ jsx("li", { children: "{rand} - Random value used to avoid name collisions" })
|
|
157
|
+
] })]
|
|
158
|
+
}),
|
|
159
|
+
/* @__PURE__ */ jsx(Field, {
|
|
160
|
+
name: includeBucketUrl,
|
|
161
|
+
type: "checkbox",
|
|
162
|
+
children: ({ field, form }) => {
|
|
163
|
+
return /* @__PURE__ */ jsx(SwitchControl, {
|
|
164
|
+
label: t("storage_include_bucket_url"),
|
|
165
|
+
disabled: existing || disabled,
|
|
166
|
+
form,
|
|
167
|
+
field
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}),
|
|
171
|
+
/* @__PURE__ */ jsxs(Typography, {
|
|
172
|
+
variant: "caption",
|
|
173
|
+
className: "ml-3.5 mt-1 mb-2",
|
|
174
|
+
children: [
|
|
175
|
+
"Turn this setting on if you want to save a fully-qualified storage URL (e.g. ",
|
|
176
|
+
/* @__PURE__ */ jsx("code", { children: "s3://my-bucket/path/to/file" }),
|
|
177
|
+
") instead of just the storage path. You can only change this prop upon creation."
|
|
178
|
+
]
|
|
179
|
+
}),
|
|
180
|
+
/* @__PURE__ */ jsx(Field, {
|
|
181
|
+
name: storeUrl,
|
|
182
|
+
type: "checkbox",
|
|
183
|
+
children: ({ field, form }) => {
|
|
184
|
+
return /* @__PURE__ */ jsx(SwitchControl, {
|
|
185
|
+
label: t("storage_save_url"),
|
|
186
|
+
disabled: existing || disabled,
|
|
187
|
+
form,
|
|
188
|
+
field
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}),
|
|
192
|
+
/* @__PURE__ */ jsx(Typography, {
|
|
193
|
+
variant: "caption",
|
|
194
|
+
className: "ml-3.5 mt-1 mb-2",
|
|
195
|
+
children: "Turn this setting on, if you prefer to save the download URL of the uploaded file instead of the storage path. You can only change this prop upon creation."
|
|
196
|
+
})
|
|
197
|
+
]
|
|
198
|
+
}),
|
|
199
|
+
/* @__PURE__ */ jsx("div", {
|
|
200
|
+
className: "col-span-12",
|
|
201
|
+
children: /* @__PURE__ */ jsx(DebouncedTextField, {
|
|
202
|
+
name: maxSize,
|
|
203
|
+
type: "number",
|
|
204
|
+
label: t("storage_max_size"),
|
|
205
|
+
size: "small",
|
|
206
|
+
value: maxSizeValue !== void 0 && maxSizeValue !== null ? maxSizeValue.toString() : "",
|
|
207
|
+
onChange: (e) => {
|
|
208
|
+
const value = e.target.value;
|
|
209
|
+
if (value === "") setFieldValue(maxSize, void 0);
|
|
210
|
+
else setFieldValue(maxSize, parseInt(value));
|
|
211
|
+
}
|
|
212
|
+
})
|
|
213
|
+
}),
|
|
214
|
+
/* @__PURE__ */ jsxs("div", {
|
|
215
|
+
className: "col-span-12 mt-4",
|
|
216
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
217
|
+
variant: "subtitle2",
|
|
218
|
+
color: "secondary",
|
|
219
|
+
className: "mb-2 block",
|
|
220
|
+
children: "Image Resize Configuration"
|
|
221
|
+
}), /* @__PURE__ */ jsx(Typography, {
|
|
222
|
+
variant: "caption",
|
|
223
|
+
className: "mb-2 block text-xs",
|
|
224
|
+
children: "Automatically resize and optimize images before upload (JPEG, PNG, WebP only)"
|
|
225
|
+
})]
|
|
226
|
+
}),
|
|
227
|
+
/* @__PURE__ */ jsx("div", {
|
|
228
|
+
className: "col-span-6",
|
|
229
|
+
children: /* @__PURE__ */ jsx(DebouncedTextField, {
|
|
230
|
+
name: imageResizeMaxWidth,
|
|
231
|
+
type: "number",
|
|
232
|
+
label: t("storage_max_width"),
|
|
233
|
+
size: "small",
|
|
234
|
+
disabled,
|
|
235
|
+
value: imageResizeMaxWidthValue !== void 0 && imageResizeMaxWidthValue !== null ? imageResizeMaxWidthValue.toString() : "",
|
|
236
|
+
onChange: (e) => {
|
|
237
|
+
const value = e.target.value;
|
|
238
|
+
if (value === "") setFieldValue(imageResizeMaxWidth, void 0);
|
|
239
|
+
else setFieldValue(imageResizeMaxWidth, parseInt(value));
|
|
240
|
+
}
|
|
241
|
+
})
|
|
242
|
+
}),
|
|
243
|
+
/* @__PURE__ */ jsx("div", {
|
|
244
|
+
className: "col-span-6",
|
|
245
|
+
children: /* @__PURE__ */ jsx(DebouncedTextField, {
|
|
246
|
+
name: imageResizeMaxHeight,
|
|
247
|
+
type: "number",
|
|
248
|
+
label: t("storage_max_height"),
|
|
249
|
+
size: "small",
|
|
250
|
+
disabled,
|
|
251
|
+
value: imageResizeMaxHeightValue !== void 0 && imageResizeMaxHeightValue !== null ? imageResizeMaxHeightValue.toString() : "",
|
|
252
|
+
onChange: (e) => {
|
|
253
|
+
const value = e.target.value;
|
|
254
|
+
if (value === "") setFieldValue(imageResizeMaxHeight, void 0);
|
|
255
|
+
else setFieldValue(imageResizeMaxHeight, parseInt(value));
|
|
256
|
+
}
|
|
257
|
+
})
|
|
258
|
+
}),
|
|
259
|
+
/* @__PURE__ */ jsx("div", {
|
|
260
|
+
className: "col-span-6",
|
|
261
|
+
children: /* @__PURE__ */ jsxs(Select, {
|
|
262
|
+
disabled,
|
|
263
|
+
name: imageResizeMode,
|
|
264
|
+
fullWidth: true,
|
|
265
|
+
size: "medium",
|
|
266
|
+
value: imageResizeModeValue || "cover",
|
|
267
|
+
onValueChange: (value) => setFieldValue(imageResizeMode, value || "cover"),
|
|
268
|
+
label: t("storage_resize_mode"),
|
|
269
|
+
renderValue: (selected) => {
|
|
270
|
+
if (!selected) return "Cover";
|
|
271
|
+
return selected === "contain" ? "Contain (fit within bounds)" : "Cover (fill bounds, may crop)";
|
|
272
|
+
},
|
|
273
|
+
children: [/* @__PURE__ */ jsx(SelectItem, {
|
|
274
|
+
value: "contain",
|
|
275
|
+
children: "Contain (fit within bounds)"
|
|
276
|
+
}), /* @__PURE__ */ jsx(SelectItem, {
|
|
277
|
+
value: "cover",
|
|
278
|
+
children: "Cover (fill bounds, may crop)"
|
|
279
|
+
})]
|
|
280
|
+
})
|
|
281
|
+
}),
|
|
282
|
+
/* @__PURE__ */ jsx("div", {
|
|
283
|
+
className: "col-span-6",
|
|
284
|
+
children: /* @__PURE__ */ jsxs(Select, {
|
|
285
|
+
disabled,
|
|
286
|
+
size: "medium",
|
|
287
|
+
fullWidth: true,
|
|
288
|
+
name: imageResizeFormat,
|
|
289
|
+
value: imageResizeFormatValue || "original",
|
|
290
|
+
onValueChange: (value) => setFieldValue(imageResizeFormat, value || "original"),
|
|
291
|
+
label: t("storage_output_format"),
|
|
292
|
+
renderValue: (selected) => {
|
|
293
|
+
if (!selected) return "Original";
|
|
294
|
+
return selected.charAt(0).toUpperCase() + selected.slice(1);
|
|
295
|
+
},
|
|
296
|
+
children: [
|
|
297
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
298
|
+
value: "original",
|
|
299
|
+
children: "Original (keep same format)"
|
|
300
|
+
}),
|
|
301
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
302
|
+
value: "jpeg",
|
|
303
|
+
children: "JPEG"
|
|
304
|
+
}),
|
|
305
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
306
|
+
value: "png",
|
|
307
|
+
children: "PNG"
|
|
308
|
+
}),
|
|
309
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
310
|
+
value: "webp",
|
|
311
|
+
children: "WebP (best compression)"
|
|
312
|
+
})
|
|
313
|
+
]
|
|
314
|
+
})
|
|
315
|
+
}),
|
|
316
|
+
/* @__PURE__ */ jsxs("div", {
|
|
317
|
+
className: "col-span-12",
|
|
318
|
+
children: [/* @__PURE__ */ jsx(DebouncedTextField, {
|
|
319
|
+
name: imageResizeQuality,
|
|
320
|
+
type: "number",
|
|
321
|
+
label: t("storage_quality"),
|
|
322
|
+
size: "small",
|
|
323
|
+
disabled,
|
|
324
|
+
value: imageResizeQualityValue !== void 0 && imageResizeQualityValue !== null ? imageResizeQualityValue.toString() : "",
|
|
325
|
+
onChange: (e) => {
|
|
326
|
+
const value = e.target.value;
|
|
327
|
+
if (value === "") setFieldValue(imageResizeQuality, void 0);
|
|
328
|
+
else {
|
|
329
|
+
const numValue = parseInt(value);
|
|
330
|
+
if (numValue >= 0 && numValue <= 100) setFieldValue(imageResizeQuality, numValue);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}), /* @__PURE__ */ jsx(Typography, {
|
|
334
|
+
variant: "caption",
|
|
335
|
+
className: "ml-3.5 mt-1 mb-2",
|
|
336
|
+
children: "Higher quality = larger file size. Recommended: 80-90 for photos, 90-100 for graphics"
|
|
337
|
+
})]
|
|
338
|
+
})
|
|
339
|
+
]
|
|
340
|
+
})
|
|
341
|
+
})
|
|
342
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
343
|
+
className: "col-span-12",
|
|
344
|
+
children: /* @__PURE__ */ jsxs(ValidationPanel, { children: [!multiple && /* @__PURE__ */ jsx("div", {
|
|
345
|
+
className: "grid grid-cols-12 gap-2",
|
|
346
|
+
children: /* @__PURE__ */ jsx(GeneralPropertyValidation, { disabled })
|
|
347
|
+
}), multiple && /* @__PURE__ */ jsx("div", {
|
|
348
|
+
className: "col-span-12",
|
|
349
|
+
children: /* @__PURE__ */ jsx(ArrayPropertyValidation, { disabled })
|
|
350
|
+
})] })
|
|
351
|
+
})] });
|
|
352
|
+
}
|
|
353
|
+
//#endregion
|
|
354
|
+
export { StoragePropertyField };
|
|
355
|
+
|
|
356
|
+
//# sourceMappingURL=StoragePropertyField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StoragePropertyField.js","names":[],"sources":["../../../../../src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx"],"sourcesContent":["\nimport React from \"react\";\nimport {\n Button,\n DebouncedTextField,\n ExpandablePanel,\n MultiSelect,\n MultiSelectItem,\n Select,\n SelectItem,\n Typography,\n UploadCloudIcon\n} from \"@rebasepro/ui\";\n\nimport { Field, FormexFieldProps, getIn, useFormex } from \"@rebasepro/forms\";\nimport { useStorageSources, useTranslation } from \"@rebasepro/app\";\nimport { DEFAULT_STORAGE_SOURCE_KEY } from \"@rebasepro/types\";\nimport { GeneralPropertyValidation } from \"./validation/GeneralPropertyValidation\";\nimport { ArrayPropertyValidation } from \"./validation/ArrayPropertyValidation\";\nimport { ValidationPanel } from \"./validation/ValidationPanel\";\nimport { SwitchControl } from \"../SwitchControl\";\n\nconst fileTypes: Record<string, string> = {\n \"image/*\": \"Images\",\n \"video/*\": \"Videos\",\n \"audio/*\": \"Audio files\",\n \"application/*\": \"Files (pdf, zip, csv, excel...)\",\n \"text/*\": \"Text files\"\n}\n\nexport function StoragePropertyField({\n multiple,\n existing,\n disabled\n}: {\n multiple: boolean;\n existing: boolean;\n disabled: boolean;\n}) {\n\n const {\n values,\n setFieldValue\n } = useFormex();\n const { t } = useTranslation();\n const storageSources = useStorageSources();\n\n const baseStoragePath = multiple ? \"of.storage\" : \"storage\";\n const acceptedFiles = `${baseStoragePath}.acceptedFiles`;\n const storageSource = `${baseStoragePath}.storageSource`;\n\n const metadata = `${baseStoragePath}.metadata`;\n const fileName = `${baseStoragePath}.fileName`;\n const maxSize = `${baseStoragePath}.maxSize`;\n const storagePath = `${baseStoragePath}.storagePath`;\n const storeUrl = `${baseStoragePath}.storeUrl`;\n const includeBucketUrl = `${baseStoragePath}.includeBucketUrl`;\n\n // Image resize config paths\n const imageResize = `${baseStoragePath}.imageResize`;\n const imageResizeMaxWidth = `${imageResize}.maxWidth`;\n const imageResizeMaxHeight = `${imageResize}.maxHeight`;\n const imageResizeMode = `${imageResize}.mode`;\n const imageResizeFormat = `${imageResize}.format`;\n const imageResizeQuality = `${imageResize}.quality`;\n\n const fileNameValue = (getIn(values, fileName) as string | undefined) ?? \"{rand}_{file}\";\n const storagePathValue = (getIn(values, storagePath) as string | undefined) ?? \"/\";\n const maxSizeValue = getIn(values, maxSize) as number | undefined;\n\n // Image resize values\n const imageResizeMaxWidthValue = getIn(values, imageResizeMaxWidth) as number | undefined;\n const imageResizeMaxHeightValue = getIn(values, imageResizeMaxHeight) as number | undefined;\n const imageResizeModeValue = (getIn(values, imageResizeMode) as string | undefined) ?? \"cover\";\n const imageResizeFormatValue = (getIn(values, imageResizeFormat) as string | undefined) ?? \"original\";\n const imageResizeQualityValue = getIn(values, imageResizeQuality) as number | undefined;\n\n const storedValue = getIn(values, acceptedFiles);\n const fileTypesValue: string[] | undefined = Array.isArray(storedValue) ? storedValue : undefined;\n const allFileTypesSelected = !fileTypesValue || fileTypesValue.length === 0;\n\n // Available storage backends (from `<Rebase storageSources={...}>`).\n const sourceKeys = Object.keys(storageSources.sources)\n .filter((key) => key !== DEFAULT_STORAGE_SOURCE_KEY);\n const storageSourceValue = (getIn(values, storageSource) as string | undefined) ?? DEFAULT_STORAGE_SOURCE_KEY;\n\n const handleTypesChange = (value: string[]) => {\n if (!value) setFieldValue(acceptedFiles, undefined);\n else setFieldValue(acceptedFiles, value);\n };\n\n const hasFilenameCallback = typeof fileNameValue === \"function\";\n const hasStoragePathCallback = typeof storagePathValue === \"function\";\n\n return (\n <>\n\n <div className={\"col-span-12\"}>\n\n <ExpandablePanel\n title={\n <div className=\"flex flex-row text-surface-500 text-text-secondary dark:text-text-secondary-dark\">\n <UploadCloudIcon/>\n <Typography variant={\"subtitle2\"}\n className=\"ml-4\">\n File upload config\n </Typography>\n </div>\n }>\n\n <div className={\"grid grid-cols-12 gap-2 p-4\"}>\n\n {sourceKeys.length > 0 && (\n <div className={\"col-span-12\"}>\n <Select\n className={\"w-full\"}\n disabled={disabled}\n name={storageSource}\n value={storageSourceValue}\n onValueChange={(value) =>\n setFieldValue(storageSource, !value || value === DEFAULT_STORAGE_SOURCE_KEY ? undefined : value)}\n label={\"Storage backend\"}\n renderValue={(key) => {\n const label = storageSources.registry[key]?.label;\n return label ?? (key === DEFAULT_STORAGE_SOURCE_KEY ? \"Default\" : key);\n }}>\n <SelectItem value={DEFAULT_STORAGE_SOURCE_KEY}>\n Default\n </SelectItem>\n {sourceKeys.map((key) => (\n <SelectItem key={key} value={key}>\n {storageSources.registry[key]?.label ?? key}\n </SelectItem>\n ))}\n </Select>\n </div>\n )}\n\n <div className={\"col-span-12\"}>\n\n <MultiSelect\n className={\"w-full\"}\n placeholder={\"All file types allowed\"}\n disabled={disabled}\n value={fileTypesValue ?? []}\n onValueChange={handleTypesChange}\n label={allFileTypesSelected ? undefined : \"Allowed file types\"}\n renderValues={(selected: string[]) => {\n if (!selected || selected.length === 0) return \"All file types allowed\";\n return selected.map((v: string) => fileTypes[v])\n .filter((v: string) => Boolean(v))\n .join(\", \");\n }}>\n\n {Object.entries(fileTypes).map(([value, label]) => (\n <MultiSelectItem key={value} value={value} className={\"flex items-center gap-2\"}>\n {/*<Checkbox*/}\n {/* checked={allFileTypesSelected || fileTypesValue.indexOf(value) > -1}/>*/}\n <div className={\"grow\"}>\n {label}\n </div>\n <Button size={\"small\"}\n variant={\"text\"}\n onClick={(e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n return setFieldValue(acceptedFiles, [value]);\n }}>\n Only\n </Button>\n </MultiSelectItem>\n ))}\n\n </MultiSelect>\n </div>\n\n <div className={\"col-span-12\"}>\n <Field name={fileName}\n as={DebouncedTextField}\n label={t(\"storage_file_name\")}\n size={\"small\"}\n disabled={hasFilenameCallback || disabled}\n value={hasFilenameCallback ? \"-\" : fileNameValue}\n />\n </div>\n <div className={\"col-span-12\"}>\n <Field name={storagePath}\n as={DebouncedTextField}\n label={t(\"storage_path\")}\n disabled={hasStoragePathCallback || disabled}\n size={\"small\"}\n value={hasStoragePathCallback ? \"-\" : storagePathValue}\n />\n <Typography variant={\"caption\"} className={\"ml-3.5 mt-1 mb-2\"}>\n <p>You can use the following placeholders in\n the file name\n and storage path values:</p>\n <ul>\n <li>{\"{file} - Full name of the uploaded file\"}</li>\n <li>{\"{file.name} - Name of the uploaded file without extension\"}</li>\n <li>{\"{file.ext} - Extension of the uploaded file\"}</li>\n <li>{\"{entityId} - ID of the entity\"}</li>\n <li>{\"{propertyKey} - ID of this field\"}</li>\n <li>{\"{path} - Path of this entity\"}</li>\n <li>{\"{rand} - Random value used to avoid name collisions\"}</li>\n </ul>\n </Typography>\n\n <Field name={includeBucketUrl}\n type=\"checkbox\">\n {({\n field,\n form\n }: FormexFieldProps) => {\n return <SwitchControl\n label={t(\"storage_include_bucket_url\")}\n disabled={existing || disabled}\n form={form}\n field={field}/>;\n }}\n </Field>\n\n <Typography variant={\"caption\"} className={\"ml-3.5 mt-1 mb-2\"}>\n Turn this setting on if you want to save a fully-qualified storage URL\n (e.g. <code>s3://my-bucket/path/to/file</code>) instead of just the storage path.\n You can only change this prop upon creation.\n </Typography>\n\n <Field name={storeUrl}\n type=\"checkbox\">\n {({\n field,\n form\n }: FormexFieldProps) => {\n return <SwitchControl\n label={t(\"storage_save_url\")}\n disabled={existing || disabled}\n form={form}\n field={field}/>;\n }}\n </Field>\n\n <Typography variant={\"caption\"} className={\"ml-3.5 mt-1 mb-2\"}>\n Turn this setting on, if you prefer to save\n the download\n URL of the uploaded file instead of the\n storage path.\n You can only change this prop upon creation.\n </Typography>\n </div>\n\n <div className={\"col-span-12\"}>\n <DebouncedTextField name={maxSize}\n type={\"number\"}\n label={t(\"storage_max_size\")}\n size={\"small\"}\n value={maxSizeValue !== undefined && maxSizeValue !== null ? maxSizeValue.toString() : \"\"}\n onChange={(e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n const value = e.target.value;\n if (value === \"\") setFieldValue(maxSize, undefined);\n else setFieldValue(maxSize, parseInt(value));\n }}\n />\n </div>\n\n <div className={\"col-span-12 mt-4\"}>\n <Typography variant={\"subtitle2\"}\n color={\"secondary\"}\n className={\"mb-2 block\"}>\n Image Resize Configuration\n </Typography>\n <Typography variant={\"caption\"} className={\"mb-2 block text-xs\"}>\n Automatically resize and optimize images before upload (JPEG, PNG, WebP only)\n </Typography>\n </div>\n\n <div className={\"col-span-6\"}>\n <DebouncedTextField\n name={imageResizeMaxWidth}\n type={\"number\"}\n label={t(\"storage_max_width\")}\n size={\"small\"}\n disabled={disabled}\n value={imageResizeMaxWidthValue !== undefined && imageResizeMaxWidthValue !== null ? imageResizeMaxWidthValue.toString() : \"\"}\n onChange={(e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n const value = e.target.value;\n if (value === \"\") setFieldValue(imageResizeMaxWidth, undefined);\n else setFieldValue(imageResizeMaxWidth, parseInt(value));\n }}\n />\n </div>\n\n <div className={\"col-span-6\"}>\n <DebouncedTextField\n name={imageResizeMaxHeight}\n type={\"number\"}\n label={t(\"storage_max_height\")}\n size={\"small\"}\n disabled={disabled}\n value={imageResizeMaxHeightValue !== undefined && imageResizeMaxHeightValue !== null ? imageResizeMaxHeightValue.toString() : \"\"}\n onChange={(e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n const value = e.target.value;\n if (value === \"\") setFieldValue(imageResizeMaxHeight, undefined);\n else setFieldValue(imageResizeMaxHeight, parseInt(value));\n }}\n />\n </div>\n\n <div className={\"col-span-6\"}>\n <Select\n disabled={disabled}\n name={imageResizeMode}\n fullWidth\n size={\"medium\"}\n value={imageResizeModeValue || \"cover\"}\n onValueChange={(value) => setFieldValue(imageResizeMode, value || \"cover\")}\n label={t(\"storage_resize_mode\")}\n renderValue={(selected) => {\n if (!selected) return \"Cover\";\n return selected === \"contain\" ? \"Contain (fit within bounds)\" : \"Cover (fill bounds, may crop)\";\n }}>\n <SelectItem value=\"contain\">\n Contain (fit within bounds)\n </SelectItem>\n <SelectItem value=\"cover\">\n Cover (fill bounds, may crop)\n </SelectItem>\n </Select>\n </div>\n\n <div className={\"col-span-6\"}>\n <Select\n disabled={disabled}\n size={\"medium\"}\n fullWidth\n name={imageResizeFormat}\n value={imageResizeFormatValue || \"original\"}\n onValueChange={(value) => setFieldValue(imageResizeFormat, value || \"original\")}\n label={t(\"storage_output_format\")}\n renderValue={(selected) => {\n if (!selected) return \"Original\";\n return selected.charAt(0).toUpperCase() + selected.slice(1);\n }}>\n <SelectItem value=\"original\">\n Original (keep same format)\n </SelectItem>\n <SelectItem value=\"jpeg\">\n JPEG\n </SelectItem>\n <SelectItem value=\"png\">\n PNG\n </SelectItem>\n <SelectItem value=\"webp\">\n WebP (best compression)\n </SelectItem>\n </Select>\n </div>\n\n <div className={\"col-span-12\"}>\n <DebouncedTextField\n name={imageResizeQuality}\n type={\"number\"}\n label={t(\"storage_quality\")}\n size={\"small\"}\n disabled={disabled}\n value={imageResizeQualityValue !== undefined && imageResizeQualityValue !== null ? imageResizeQualityValue.toString() : \"\"}\n onChange={(e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n const value = e.target.value;\n if (value === \"\") setFieldValue(imageResizeQuality, undefined);\n else {\n const numValue = parseInt(value);\n if (numValue >= 0 && numValue <= 100) {\n setFieldValue(imageResizeQuality, numValue);\n }\n }\n }}\n />\n <Typography variant={\"caption\"} className={\"ml-3.5 mt-1 mb-2\"}>\n Higher quality = larger file size. Recommended: 80-90 for photos, 90-100 for graphics\n </Typography>\n </div>\n\n </div>\n </ExpandablePanel>\n\n </div>\n\n <div className={\"col-span-12\"}>\n\n <ValidationPanel>\n {!multiple && <div className={\"grid grid-cols-12 gap-2\"}>\n <GeneralPropertyValidation disabled={disabled}/>\n </div>}\n {multiple && <div className={\"col-span-12\"}>\n <ArrayPropertyValidation disabled={disabled}/>\n </div>}\n </ValidationPanel>\n\n </div>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;AAsBA,IAAM,YAAoC;CACtC,WAAW;CACX,WAAW;CACX,WAAW;CACX,iBAAiB;CACjB,UAAU;AACd;AAEA,SAAgB,qBAAqB,EACjC,UACA,UACA,YAKD;CAEC,MAAM,EACF,QACA,kBACA,UAAU;CACd,MAAM,EAAE,MAAM,eAAe;CAC7B,MAAM,iBAAiB,kBAAkB;CAEzC,MAAM,kBAAkB,WAAW,eAAe;CAClD,MAAM,gBAAgB,GAAG,gBAAgB;CACzC,MAAM,gBAAgB,GAAG,gBAAgB;CAExB,GAAG;CACpB,MAAM,WAAW,GAAG,gBAAgB;CACpC,MAAM,UAAU,GAAG,gBAAgB;CACnC,MAAM,cAAc,GAAG,gBAAgB;CACvC,MAAM,WAAW,GAAG,gBAAgB;CACpC,MAAM,mBAAmB,GAAG,gBAAgB;CAG5C,MAAM,cAAc,GAAG,gBAAgB;CACvC,MAAM,sBAAsB,GAAG,YAAY;CAC3C,MAAM,uBAAuB,GAAG,YAAY;CAC5C,MAAM,kBAAkB,GAAG,YAAY;CACvC,MAAM,oBAAoB,GAAG,YAAY;CACzC,MAAM,qBA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YAAY,KAAK,YAAY,KAC7B,cAAc,oBAAoB,QAAQ;QAElD;OACJ;MACH,CAAA,GACD,oBAAC,YAAD;OAAY,SAAS;OAAW,WAAW;iBAAoB;MAEnD,CAAA,CACX;;IAEJ;;EACQ,CAAA;CAEhB,CAAA,GAEL,oBAAC,OAAD;EAAK,WAAW;YAEZ,qBAAC,iBAAD,EAAA,UAAA,CACK,CAAC,YAAY,oBAAC,OAAD;GAAK,WAAW;aAC1B,oBAAC,2BAAD,EAAqC,SAAU,CAAA;EAC9C,CAAA,GACJ,YAAY,oBAAC,OAAD;GAAK,WAAW;aACzB,oBAAC,yBAAD,EAAmC,SAAU,CAAA;EAC5C,CAAA,CACQ,EAAA,CAAA;CAEhB,CAAA,CACP,EAAA,CAAA;AAEV"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { FieldCaption } from "../../../../components/FieldCaption.js";
|
|
2
|
+
import { StringPropertyValidation } from "./validation/StringPropertyValidation.js";
|
|
3
|
+
import { ValidationPanel } from "./validation/ValidationPanel.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Select, SelectItem, TextField } from "@rebasepro/ui";
|
|
7
|
+
import { useTranslation } from "@rebasepro/app";
|
|
8
|
+
import { getIn, useFormex } from "@rebasepro/forms";
|
|
9
|
+
//#region src/collection_editor/ui/collection_editor/properties/StringPropertyField.tsx
|
|
10
|
+
function StringPropertyField({ widgetId, disabled, showErrors }) {
|
|
11
|
+
const { values, setFieldValue, touched, errors } = useFormex();
|
|
12
|
+
const { t } = useTranslation();
|
|
13
|
+
const columnTypePath = "columnType";
|
|
14
|
+
const columnTypeValue = getIn(values, columnTypePath);
|
|
15
|
+
const columnTypeError = getIn(touched, columnTypePath) && getIn(errors, columnTypePath);
|
|
16
|
+
const isIdPath = "isId";
|
|
17
|
+
const isIdValue = getIn(values, isIdPath);
|
|
18
|
+
const isIdError = getIn(touched, isIdPath) && getIn(errors, isIdPath);
|
|
19
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20
|
+
/* @__PURE__ */ jsx("div", {
|
|
21
|
+
className: "col-span-12",
|
|
22
|
+
children: /* @__PURE__ */ jsxs(ValidationPanel, { children: [
|
|
23
|
+
widgetId === "text_field" && /* @__PURE__ */ jsx(StringPropertyValidation, {
|
|
24
|
+
disabled,
|
|
25
|
+
length: true,
|
|
26
|
+
lowercase: true,
|
|
27
|
+
matches: true,
|
|
28
|
+
max: true,
|
|
29
|
+
min: true,
|
|
30
|
+
trim: true,
|
|
31
|
+
uppercase: true,
|
|
32
|
+
showErrors
|
|
33
|
+
}),
|
|
34
|
+
widgetId === "user_select" && /* @__PURE__ */ jsx(StringPropertyValidation, {
|
|
35
|
+
disabled,
|
|
36
|
+
showErrors
|
|
37
|
+
}),
|
|
38
|
+
widgetId === "multiline" && /* @__PURE__ */ jsx(StringPropertyValidation, {
|
|
39
|
+
disabled,
|
|
40
|
+
length: true,
|
|
41
|
+
lowercase: true,
|
|
42
|
+
max: true,
|
|
43
|
+
min: true,
|
|
44
|
+
trim: true,
|
|
45
|
+
uppercase: true,
|
|
46
|
+
showErrors
|
|
47
|
+
}),
|
|
48
|
+
widgetId === "email" && /* @__PURE__ */ jsx(StringPropertyValidation, {
|
|
49
|
+
disabled,
|
|
50
|
+
max: true,
|
|
51
|
+
min: true,
|
|
52
|
+
trim: true,
|
|
53
|
+
showErrors
|
|
54
|
+
})
|
|
55
|
+
] })
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ jsxs("div", {
|
|
58
|
+
className: "col-span-12",
|
|
59
|
+
children: [/* @__PURE__ */ jsxs(Select, {
|
|
60
|
+
name: columnTypePath,
|
|
61
|
+
disabled: disabled || Boolean(isIdValue),
|
|
62
|
+
fullWidth: true,
|
|
63
|
+
value: isIdValue === "uuid" ? "uuid" : columnTypeValue ?? "_default_",
|
|
64
|
+
onValueChange: (v) => setFieldValue(columnTypePath, v === "_default_" ? void 0 : v),
|
|
65
|
+
renderValue: (v) => {
|
|
66
|
+
if (isIdValue === "uuid") return "uuid (forced by Primary Key)";
|
|
67
|
+
switch (v) {
|
|
68
|
+
case "text": return "text (unlimited)";
|
|
69
|
+
case "char": return "char (fixed length)";
|
|
70
|
+
case "varchar": return "varchar (variable length)";
|
|
71
|
+
case "_default_": return "Default (varchar)";
|
|
72
|
+
default: return "Default (varchar)";
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
error: Boolean(columnTypeError),
|
|
76
|
+
label: t("db_column_type"),
|
|
77
|
+
children: [
|
|
78
|
+
isIdValue === "uuid" && /* @__PURE__ */ jsx(SelectItem, {
|
|
79
|
+
value: "uuid",
|
|
80
|
+
children: " uuid (forced by Primary Key) "
|
|
81
|
+
}),
|
|
82
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
83
|
+
value: "_default_",
|
|
84
|
+
children: " Default (varchar) "
|
|
85
|
+
}),
|
|
86
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
87
|
+
value: "varchar",
|
|
88
|
+
children: " varchar (variable length) "
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
91
|
+
value: "text",
|
|
92
|
+
children: " text (unlimited) "
|
|
93
|
+
}),
|
|
94
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
95
|
+
value: "char",
|
|
96
|
+
children: " char (fixed length) "
|
|
97
|
+
})
|
|
98
|
+
]
|
|
99
|
+
}), /* @__PURE__ */ jsx(FieldCaption, {
|
|
100
|
+
error: Boolean(columnTypeError),
|
|
101
|
+
children: columnTypeError ?? "Optional database override for this string field."
|
|
102
|
+
})]
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ jsxs("div", {
|
|
105
|
+
className: "col-span-12",
|
|
106
|
+
children: [/* @__PURE__ */ jsxs(Select, {
|
|
107
|
+
name: isIdPath,
|
|
108
|
+
disabled,
|
|
109
|
+
fullWidth: true,
|
|
110
|
+
value: isIdValue === true ? "true" : isIdValue === false ? "false" : isIdValue ?? "_default_",
|
|
111
|
+
onValueChange: (v) => {
|
|
112
|
+
if (v === "_default_" || v === "false") setFieldValue(isIdPath, void 0);
|
|
113
|
+
else if (v === "true") setFieldValue(isIdPath, true);
|
|
114
|
+
else setFieldValue(isIdPath, v);
|
|
115
|
+
},
|
|
116
|
+
renderValue: (v) => {
|
|
117
|
+
switch (v) {
|
|
118
|
+
case "true": return "Yes (Auto-generated UUID/String)";
|
|
119
|
+
case "manual": return "Yes (Manual input)";
|
|
120
|
+
case "uuid": return "Yes (UUID)";
|
|
121
|
+
case "cuid": return "Yes (CUID)";
|
|
122
|
+
case "false":
|
|
123
|
+
case "_default_": return "No";
|
|
124
|
+
default: return `Yes (${v})`;
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
error: Boolean(isIdError),
|
|
128
|
+
label: t("primary_key_unique_id"),
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
131
|
+
value: "_default_",
|
|
132
|
+
children: " No "
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
135
|
+
value: "manual",
|
|
136
|
+
children: " Yes (Manual input) "
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
139
|
+
value: "true",
|
|
140
|
+
children: " Yes (Auto-generated UUID/String) "
|
|
141
|
+
}),
|
|
142
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
143
|
+
value: "uuid",
|
|
144
|
+
children: " Yes (UUID) "
|
|
145
|
+
}),
|
|
146
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
147
|
+
value: "cuid",
|
|
148
|
+
children: " Yes (CUID) "
|
|
149
|
+
})
|
|
150
|
+
]
|
|
151
|
+
}), /* @__PURE__ */ jsx(FieldCaption, {
|
|
152
|
+
error: Boolean(isIdError),
|
|
153
|
+
children: isIdError ?? "Set as Primary Key and configure ID generation strategy."
|
|
154
|
+
})]
|
|
155
|
+
}),
|
|
156
|
+
/* @__PURE__ */ jsx("div", {
|
|
157
|
+
className: "col-span-12",
|
|
158
|
+
children: /* @__PURE__ */ jsx(TextField, {
|
|
159
|
+
name: "defaultValue",
|
|
160
|
+
disabled,
|
|
161
|
+
onChange: (e) => {
|
|
162
|
+
setFieldValue("defaultValue", e.target.value === "" ? void 0 : e.target.value);
|
|
163
|
+
},
|
|
164
|
+
label: t("default_value"),
|
|
165
|
+
value: getIn(values, "defaultValue") ?? ""
|
|
166
|
+
})
|
|
167
|
+
})
|
|
168
|
+
] });
|
|
169
|
+
}
|
|
170
|
+
//#endregion
|
|
171
|
+
export { StringPropertyField };
|
|
172
|
+
|
|
173
|
+
//# sourceMappingURL=StringPropertyField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StringPropertyField.js","names":[],"sources":["../../../../../src/collection_editor/ui/collection_editor/properties/StringPropertyField.tsx"],"sourcesContent":["import { FieldCaption } from \"../../../_cms_internals\";\nimport React from \"react\";\nimport { StringPropertyValidation } from \"./validation/StringPropertyValidation\";\nimport { ValidationPanel } from \"./validation/ValidationPanel\";\nimport { getIn, useFormex } from \"@rebasepro/forms\";\nimport { useTranslation } from \"@rebasepro/app\";\n;\nimport { Select, SelectItem, TextField } from \"@rebasepro/ui\";\n\nexport function StringPropertyField({\n widgetId,\n disabled,\n showErrors\n}: {\n widgetId: \"text_field\" | \"multiline\" | \"email\" | \"user_select\";\n disabled: boolean;\n showErrors: boolean;\n}) {\n\n const { values, setFieldValue, touched, errors } = useFormex();\n const { t } = useTranslation();\n\n const columnTypePath = \"columnType\";\n const columnTypeValue: string | undefined = getIn(values, columnTypePath) as string | undefined;\n const columnTypeError: string | undefined = (getIn(touched, columnTypePath) && getIn(errors, columnTypePath)) as string | undefined;\n\n const isIdPath = \"isId\";\n const isIdValue: string | boolean | undefined = getIn(values, isIdPath) as string | boolean | undefined;\n const isIdError: string | undefined = (getIn(touched, isIdPath) && getIn(errors, isIdPath)) as string | undefined;\n\n return (\n <>\n <div className={\"col-span-12\"}>\n\n <ValidationPanel>\n\n {widgetId === \"text_field\" &&\n <StringPropertyValidation disabled={disabled}\n length={true}\n lowercase={true}\n matches={true}\n max={true}\n min={true}\n trim={true}\n uppercase={true}\n showErrors={showErrors}/>}\n {widgetId === \"user_select\" &&\n <StringPropertyValidation disabled={disabled}\n showErrors={showErrors}/>}\n\n {widgetId === \"multiline\" &&\n <StringPropertyValidation disabled={disabled}\n length={true}\n lowercase={true}\n max={true}\n min={true}\n trim={true}\n uppercase={true}\n showErrors={showErrors}/>}\n\n {widgetId === \"email\" &&\n <StringPropertyValidation disabled={disabled}\n max={true}\n min={true}\n trim={true}\n showErrors={showErrors}/>}\n\n </ValidationPanel>\n\n </div>\n\n <div className={\"col-span-12\"}>\n <Select name={columnTypePath}\n disabled={disabled || Boolean(isIdValue)}\n fullWidth={true}\n value={isIdValue === \"uuid\" ? \"uuid\" : (columnTypeValue ?? \"_default_\")}\n onValueChange={(v) => setFieldValue(columnTypePath, v === \"_default_\" ? undefined : v)}\n renderValue={(v) => {\n if (isIdValue === \"uuid\") return \"uuid (forced by Primary Key)\";\n switch (v) {\n case \"text\": return \"text (unlimited)\";\n case \"char\": return \"char (fixed length)\";\n case \"varchar\": return \"varchar (variable length)\";\n case \"_default_\": return \"Default (varchar)\";\n default: return \"Default (varchar)\";\n }\n }}\n error={Boolean(columnTypeError)}\n label={t(\"db_column_type\")}>\n {isIdValue === \"uuid\" && <SelectItem value={\"uuid\"}> uuid (forced by Primary Key) </SelectItem>}\n <SelectItem value={\"_default_\"}> Default (varchar) </SelectItem>\n <SelectItem value={\"varchar\"}> varchar (variable length) </SelectItem>\n <SelectItem value={\"text\"}> text (unlimited) </SelectItem>\n <SelectItem value={\"char\"}> char (fixed length) </SelectItem>\n </Select>\n <FieldCaption error={Boolean(columnTypeError)}>\n {columnTypeError ?? \"Optional database override for this string field.\"}\n </FieldCaption>\n </div>\n\n <div className={\"col-span-12\"}>\n <Select name={isIdPath}\n disabled={disabled}\n fullWidth={true}\n value={isIdValue === true ? \"true\" : (isIdValue === false ? \"false\" : (isIdValue ?? \"_default_\"))}\n onValueChange={(v) => {\n if (v === \"_default_\" || v === \"false\") setFieldValue(isIdPath, undefined);\n else if (v === \"true\") setFieldValue(isIdPath, true);\n else setFieldValue(isIdPath, v);\n }}\n renderValue={(v) => {\n switch (v) {\n case \"true\": return \"Yes (Auto-generated UUID/String)\";\n case \"manual\": return \"Yes (Manual input)\";\n case \"uuid\": return \"Yes (UUID)\";\n case \"cuid\": return \"Yes (CUID)\";\n case \"false\":\n case \"_default_\": return \"No\";\n default: return `Yes (${v})`;\n }\n }}\n error={Boolean(isIdError)}\n label={t(\"primary_key_unique_id\")}>\n <SelectItem value={\"_default_\"}> No </SelectItem>\n <SelectItem value={\"manual\"}> Yes (Manual input) </SelectItem>\n <SelectItem value={\"true\"}> Yes (Auto-generated UUID/String) </SelectItem>\n <SelectItem value={\"uuid\"}> Yes (UUID) </SelectItem>\n <SelectItem value={\"cuid\"}> Yes (CUID) </SelectItem>\n </Select>\n <FieldCaption error={Boolean(isIdError)}>\n {isIdError ?? \"Set as Primary Key and configure ID generation strategy.\"}\n </FieldCaption>\n </div>\n\n <div className={\"col-span-12\"}>\n\n <TextField name={\"defaultValue\"}\n disabled={disabled}\n onChange={(e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n setFieldValue(\"defaultValue\", e.target.value === \"\" ? undefined : e.target.value);\n }}\n label={t(\"default_value\")}\n value={(getIn(values, \"defaultValue\") as string | undefined) ?? \"\"}/>\n\n </div>\n </>\n );\n}\n"],"mappings":";;;;;;;;;AASA,SAAgB,oBAAoB,EAChC,UACA,UACA,cAKD;CAEC,MAAM,EAAE,QAAQ,eAAe,SAAS,WAAW,UAAU;CAC7D,MAAM,EAAE,MAAM,eAAe;CAE7B,MAAM,iBAAiB;CACvB,MAAM,kBAAsC,MAAM,QAAQ,cAAc;CACxE,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