@rebasepro/admin 0.16.0 → 0.16.1-canary.g2d1aec8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CollectionEditorDialog-D2Vf4C3-.js → CollectionEditorDialog-Cec5jU6R.js} +7 -3
- package/dist/{CollectionEditorDialog-D2Vf4C3-.js.map → CollectionEditorDialog-Cec5jU6R.js.map} +1 -1
- package/dist/{PropertyEditView-D3NBsK9_.js → PropertyEditView-BuSPZwnQ.js} +2 -2
- package/dist/{PropertyEditView-D3NBsK9_.js.map → PropertyEditView-BuSPZwnQ.js.map} +1 -1
- package/dist/{RouterCollectionsStudioView-hPB54l3Q.js → RouterCollectionsStudioView-BiNFpEii.js} +4 -4
- package/dist/{RouterCollectionsStudioView-hPB54l3Q.js.map → RouterCollectionsStudioView-BiNFpEii.js.map} +1 -1
- package/dist/SchemaChangeDialog-WKIbzS6P.js +327 -0
- package/dist/SchemaChangeDialog-WKIbzS6P.js.map +1 -0
- package/dist/collection_editor/ConfigControllerProvider.d.ts +4 -4
- package/dist/collection_editor/_cms_internals.d.ts +23 -23
- package/dist/collection_editor/api/index.d.ts +1 -1
- package/dist/collection_editor/extensibility_types.d.ts +1 -1
- package/dist/collection_editor/index.d.ts +21 -21
- package/dist/collection_editor/liveSchemaClient.d.ts +170 -0
- package/dist/collection_editor/serializable_utils.d.ts +1 -1
- package/dist/collection_editor/types/collection_editor_controller.d.ts +1 -1
- package/dist/collection_editor/types/config_controller.d.ts +11 -0
- package/dist/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/AIModifiedPathsContext.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.d.ts +4 -4
- package/dist/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/CollectionStudioView.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/CollectionsStudioView.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/GeneralSettingsForm.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/PropertyEditView.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/RouterCollectionStudioView.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/RouterCollectionsStudioView.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/SchemaChangeDialog.d.ts +66 -0
- package/dist/collection_editor/ui/collection_editor/SubcollectionsEditTab.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/import/clean_import_data.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/properties/conditions/index.d.ts +6 -6
- package/dist/collection_editor/useCollectionEditorController.d.ts +1 -1
- package/dist/collection_editor/useCollectionsConfigController.d.ts +1 -1
- package/dist/collection_editor/useJsonCollectionsConfigController.d.ts +2 -2
- package/dist/collection_editor/useLiveSchemaEditing.d.ts +71 -0
- package/dist/collection_editor/useLocalCollectionsConfigController.d.ts +1 -1
- package/dist/collection_editor_ui.d.ts +12 -12
- package/dist/collection_editor_ui.js +4 -4
- package/dist/components/CollectionTableBinding/CollectionTableBinding.d.ts +1 -1
- package/dist/components/CollectionTableBinding/PropertyTableCell.d.ts +1 -1
- package/dist/components/CollectionTableBinding/fields/TableStorageUpload.d.ts +1 -1
- package/dist/components/CollectionTableBinding/index.d.ts +5 -5
- package/dist/components/CollectionTableBinding/internal/popup_field/PopupFormField.d.ts +1 -1
- package/dist/components/CollectionViewBinding/SlotValue.d.ts +2 -2
- package/dist/components/CollectionViewBinding/hooks/useKanbanDragAndDrop.d.ts +1 -1
- package/dist/components/EditFormActions.d.ts +1 -1
- package/dist/components/EditViewBinding.d.ts +3 -3
- package/dist/components/EntityInspector.d.ts +1 -1
- package/dist/components/EntityPreviewBinding.d.ts +1 -1
- package/dist/components/EntityViewBinding.d.ts +1 -1
- package/dist/components/HomePage/index.d.ts +4 -4
- package/dist/components/PropertyCollectionView.d.ts +1 -1
- package/dist/components/ReferenceWidget.d.ts +1 -1
- package/dist/components/admin/index.d.ts +1 -1
- package/dist/components/app/AppBar.d.ts +1 -1
- package/dist/components/app/index.d.ts +4 -4
- package/dist/components/common/index.d.ts +1 -1
- package/dist/components/field_configs.d.ts +1 -1
- package/dist/components/history/EntityHistoryEntry.d.ts +2 -2
- package/dist/components/history/index.d.ts +5 -5
- package/dist/components/index.d.ts +45 -45
- package/dist/data_export/export/index.d.ts +4 -4
- package/dist/data_export/index.d.ts +1 -1
- package/dist/data_import/components/DataNewPropertiesMapping.d.ts +1 -1
- package/dist/data_import/components/ImportSaveInProgress.d.ts +1 -1
- package/dist/data_import/components/index.d.ts +4 -4
- package/dist/data_import/hooks/index.d.ts +1 -1
- package/dist/data_import/hooks/useImportConfig.d.ts +1 -1
- package/dist/data_import/import/ImportCollectionAction.d.ts +1 -1
- package/dist/data_import/import/index.d.ts +1 -1
- package/dist/data_import/index.d.ts +5 -5
- package/dist/data_import/types/index.d.ts +1 -1
- package/dist/data_import/utils/file_to_json.d.ts +1 -1
- package/dist/data_import/utils/index.d.ts +5 -5
- package/dist/editor/components/SlashCommandMenu.d.ts +2 -2
- package/dist/editor/components/index.d.ts +5 -5
- package/dist/editor/editor.d.ts +2 -2
- package/dist/editor/index.d.ts +2 -2
- package/dist/editor/nodeViews/ImageComponent.d.ts +1 -1
- package/dist/editor/nodeViews/TaskItemComponent.d.ts +1 -1
- package/dist/editor/types.d.ts +1 -1
- package/dist/{export-oauWlxuu.js → export-BItpoIu0.js} +2 -2
- package/dist/{export-oauWlxuu.js.map → export-BItpoIu0.js.map} +1 -1
- package/dist/form/EntityForm.d.ts +1 -1
- package/dist/form/EntityFormActions.d.ts +1 -1
- package/dist/form/EntityFormBinding.d.ts +1 -1
- package/dist/form/PropertyFieldBinding.d.ts +1 -1
- package/dist/form/components/StorageItemPreview.d.ts +1 -1
- package/dist/form/components/index.d.ts +6 -6
- package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/BinaryFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/BlockFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/DateTimeFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/GeopointFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/KeyValueFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/MapFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/MarkdownEditorFieldBinding.d.ts +2 -2
- package/dist/form/field_bindings/MultiSelectFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/MultipleRelationFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/ReadOnlyFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/ReferenceFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/RelationFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/RepeatFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/SelectFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/SwitchFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/TextFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/UserSelectFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/VectorFieldBinding.d.ts +1 -1
- package/dist/form/index.d.ts +24 -24
- package/dist/{history-C2cqc0bw.js → history-C7WF14VR.js} +2 -2
- package/dist/{history-C2cqc0bw.js.map → history-C7WF14VR.js.map} +1 -1
- package/dist/hooks/index.d.ts +16 -16
- package/dist/hooks/navigation/contexts/index.d.ts +3 -3
- package/dist/hooks/useBuildSideDialogsController.d.ts +1 -1
- package/dist/hooks/useSelectionDialog.d.ts +1 -1
- package/dist/{import-Bxv5JPm-.js → import-CZgNAlcd.js} +2 -2
- package/dist/{import-Bxv5JPm-.js.map → import-CZgNAlcd.js.map} +1 -1
- package/dist/index.d.ts +17 -15
- package/dist/index.js +238 -21
- package/dist/index.js.map +1 -1
- package/dist/preview/PropertyPreview.d.ts +1 -1
- package/dist/preview/components/ArrayEnumPreview.d.ts +1 -1
- package/dist/preview/components/BooleanPreview.d.ts +1 -1
- package/dist/preview/components/ImagePreview.d.ts +1 -1
- package/dist/preview/components/ReferencePreview.d.ts +1 -1
- package/dist/preview/components/RelationPreview.d.ts +1 -1
- package/dist/preview/components/StorageThumbnail.d.ts +1 -1
- package/dist/preview/components/UrlComponentPreview.d.ts +2 -2
- package/dist/preview/components/UserPreview.d.ts +1 -1
- package/dist/preview/index.d.ts +24 -24
- package/dist/preview/property_previews/ArrayOfMapsPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayOfReferencesPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayOfRelationsPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayOfStorageComponentsPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayOfStringsPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayOneOfPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayPropertyEnumPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayPropertyPreview.d.ts +1 -1
- package/dist/preview/property_previews/MapPropertyPreview.d.ts +1 -1
- package/dist/preview/property_previews/NumberPropertyPreview.d.ts +1 -1
- package/dist/preview/property_previews/SkeletonPropertyComponent.d.ts +1 -1
- package/dist/preview/property_previews/StringPropertyPreview.d.ts +1 -1
- package/dist/preview/util.d.ts +1 -1
- package/dist/routes/index.d.ts +2 -2
- package/dist/types/components/EntityFormActionsProps.d.ts +2 -2
- package/dist/types/components/EntityFormProps.d.ts +3 -3
- package/dist/types/components/index.d.ts +3 -3
- package/dist/types/fields.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/util/index.d.ts +5 -5
- package/dist/{util-C4qsI1QV.js → util-wrBH4QSB.js} +130 -7
- package/dist/util-wrBH4QSB.js.map +1 -0
- package/package.json +10 -10
- package/src/collection_editor/ConfigControllerProvider.tsx +5 -0
- package/src/collection_editor/liveSchemaClient.ts +272 -0
- package/src/collection_editor/types/config_controller.tsx +11 -0
- package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +10 -0
- package/src/collection_editor/ui/collection_editor/SchemaChangeDialog.tsx +368 -0
- package/src/collection_editor/useLiveSchemaEditing.tsx +285 -0
- package/src/collection_editor/useLocalCollectionsConfigController.tsx +109 -10
- package/src/index.ts +6 -0
- package/dist/util-C4qsI1QV.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Property } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import type { PropertyPreviewProps } from "../types/components/PropertyPreviewProps";
|
|
3
|
+
import type { PropertyPreviewProps } from "../types/components/PropertyPreviewProps.js";
|
|
4
4
|
/**
|
|
5
5
|
* @group Preview components
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { EnumValueConfig } from "@rebasepro/types";
|
|
3
|
-
import type { PreviewSize } from "../../types/components/PropertyPreviewProps";
|
|
3
|
+
import type { PreviewSize } from "../../types/components/PropertyPreviewProps.js";
|
|
4
4
|
/**
|
|
5
5
|
* @group Preview components
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Property } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { PreviewSize } from "../../types/components/PropertyPreviewProps";
|
|
3
|
+
import { PreviewSize } from "../../types/components/PropertyPreviewProps.js";
|
|
4
4
|
/**
|
|
5
5
|
* @group Preview components
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { EntityReference } from "@rebasepro/types";
|
|
3
|
-
import type { PreviewSize } from "../../types/components/PropertyPreviewProps";
|
|
3
|
+
import type { PreviewSize } from "../../types/components/PropertyPreviewProps.js";
|
|
4
4
|
export type ReferencePreviewProps = {
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
reference: EntityReference;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { EntityRelation } from "@rebasepro/types";
|
|
3
|
-
import type { PreviewSize } from "../../types/components/PropertyPreviewProps";
|
|
3
|
+
import type { PreviewSize } from "../../types/components/PropertyPreviewProps.js";
|
|
4
4
|
export type RelationPreviewProps = {
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
relation: EntityRelation;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { PreviewSize } from "../../types/components/PropertyPreviewProps";
|
|
2
|
+
import type { PreviewSize } from "../../types/components/PropertyPreviewProps.js";
|
|
3
3
|
type StorageThumbnailProps = {
|
|
4
4
|
storagePathOrDownloadUrl: string;
|
|
5
5
|
storeUrl: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { PreviewType } from "@rebasepro/admin-types";
|
|
3
|
-
import type { PreviewSize } from "../../types/components/PropertyPreviewProps";
|
|
4
|
-
import { sanitizeUrl } from "../util";
|
|
3
|
+
import type { PreviewSize } from "../../types/components/PropertyPreviewProps.js";
|
|
4
|
+
import { sanitizeUrl } from "../util.js";
|
|
5
5
|
export { sanitizeUrl };
|
|
6
6
|
/**
|
|
7
7
|
* @group Preview components
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps";
|
|
1
|
+
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps.js";
|
|
2
2
|
import type { StringProperty } from "@rebasepro/types";
|
|
3
3
|
import React from "react";
|
|
4
4
|
/**
|
package/dist/preview/index.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export { PropertyPreview } from "./PropertyPreview";
|
|
2
|
-
export * from "./property_previews/ArrayOfStringsPreview";
|
|
3
|
-
export * from "./property_previews/ArrayPropertyEnumPreview";
|
|
4
|
-
export * from "./property_previews/ArrayOfMapsPreview";
|
|
5
|
-
export * from "./property_previews/NumberPropertyPreview";
|
|
6
|
-
export * from "./property_previews/StringPropertyPreview";
|
|
7
|
-
export * from "./property_previews/ArrayOfStorageComponentsPreview";
|
|
8
|
-
export * from "./property_previews/ArrayOfReferencesPreview";
|
|
9
|
-
export * from "./property_previews/MapPropertyPreview";
|
|
10
|
-
export * from "./property_previews/ArrayPropertyPreview";
|
|
11
|
-
export * from "./property_previews/ArrayOneOfPreview";
|
|
12
|
-
export * from "./property_previews/SkeletonPropertyComponent";
|
|
13
|
-
export * from "./components/DatePreview";
|
|
14
|
-
export * from "./components/UrlComponentPreview";
|
|
15
|
-
export * from "./components/StorageThumbnail";
|
|
16
|
-
export * from "./components/ArrayEnumPreview";
|
|
17
|
-
export * from "./components/BooleanPreview";
|
|
18
|
-
export * from "./components/EnumValuesChip";
|
|
19
|
-
export * from "./components/EmptyValue";
|
|
20
|
-
export * from "./components/ImagePreview";
|
|
21
|
-
export * from "./components/ReferencePreview";
|
|
22
|
-
export * from "./components/RelationPreview";
|
|
23
|
-
export * from "./components/InlineEntityListPreview";
|
|
24
|
-
export * from "./components/UserPreview";
|
|
1
|
+
export { PropertyPreview } from "./PropertyPreview.js";
|
|
2
|
+
export * from "./property_previews/ArrayOfStringsPreview.js";
|
|
3
|
+
export * from "./property_previews/ArrayPropertyEnumPreview.js";
|
|
4
|
+
export * from "./property_previews/ArrayOfMapsPreview.js";
|
|
5
|
+
export * from "./property_previews/NumberPropertyPreview.js";
|
|
6
|
+
export * from "./property_previews/StringPropertyPreview.js";
|
|
7
|
+
export * from "./property_previews/ArrayOfStorageComponentsPreview.js";
|
|
8
|
+
export * from "./property_previews/ArrayOfReferencesPreview.js";
|
|
9
|
+
export * from "./property_previews/MapPropertyPreview.js";
|
|
10
|
+
export * from "./property_previews/ArrayPropertyPreview.js";
|
|
11
|
+
export * from "./property_previews/ArrayOneOfPreview.js";
|
|
12
|
+
export * from "./property_previews/SkeletonPropertyComponent.js";
|
|
13
|
+
export * from "./components/DatePreview.js";
|
|
14
|
+
export * from "./components/UrlComponentPreview.js";
|
|
15
|
+
export * from "./components/StorageThumbnail.js";
|
|
16
|
+
export * from "./components/ArrayEnumPreview.js";
|
|
17
|
+
export * from "./components/BooleanPreview.js";
|
|
18
|
+
export * from "./components/EnumValuesChip.js";
|
|
19
|
+
export * from "./components/EmptyValue.js";
|
|
20
|
+
export * from "./components/ImagePreview.js";
|
|
21
|
+
export * from "./components/ReferencePreview.js";
|
|
22
|
+
export * from "./components/RelationPreview.js";
|
|
23
|
+
export * from "./components/InlineEntityListPreview.js";
|
|
24
|
+
export * from "./components/UserPreview.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ArrayProperty } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps";
|
|
3
|
+
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps.js";
|
|
4
4
|
/**
|
|
5
5
|
* @group Preview components
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ArrayProperty } from "@rebasepro/types";
|
|
2
|
-
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps";
|
|
2
|
+
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps.js";
|
|
3
3
|
/**
|
|
4
4
|
* @group Preview components
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ArrayProperty } from "@rebasepro/types";
|
|
2
|
-
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps";
|
|
2
|
+
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps.js";
|
|
3
3
|
/**
|
|
4
4
|
* @group Preview components
|
|
5
5
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ArrayProperty } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps";
|
|
3
|
+
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps.js";
|
|
4
4
|
/**
|
|
5
5
|
* @group Preview components
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ArrayProperty } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps";
|
|
3
|
+
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps.js";
|
|
4
4
|
/**
|
|
5
5
|
* @group Preview components
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ArrayProperty } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps";
|
|
3
|
+
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps.js";
|
|
4
4
|
/**
|
|
5
5
|
* @group Preview components
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ArrayProperty } from "@rebasepro/types";
|
|
2
|
-
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps";
|
|
2
|
+
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps.js";
|
|
3
3
|
/**
|
|
4
4
|
* @group Preview components
|
|
5
5
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ArrayProperty } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps";
|
|
3
|
+
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps.js";
|
|
4
4
|
/**
|
|
5
5
|
* @group Preview components
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MapProperty } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps";
|
|
3
|
+
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps.js";
|
|
4
4
|
/**
|
|
5
5
|
* @group Preview components
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NumberProperty } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps";
|
|
3
|
+
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps.js";
|
|
4
4
|
/**
|
|
5
5
|
* @group Preview components
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Property } from "@rebasepro/types";
|
|
2
|
-
import { PreviewSize } from "../../types/components/PropertyPreviewProps";
|
|
2
|
+
import { PreviewSize } from "../../types/components/PropertyPreviewProps.js";
|
|
3
3
|
import React from "react";
|
|
4
4
|
export interface SkeletonPropertyComponentProps {
|
|
5
5
|
property: Property;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { StringProperty } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps";
|
|
3
|
+
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps.js";
|
|
4
4
|
/**
|
|
5
5
|
* @group Preview components
|
|
6
6
|
*/
|
package/dist/preview/util.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CollectionSize } from "@rebasepro/admin-types";
|
|
2
|
-
import type { PreviewSize } from "../types/components/PropertyPreviewProps";
|
|
2
|
+
import type { PreviewSize } from "../types/components/PropertyPreviewProps.js";
|
|
3
3
|
export declare function sanitizeUrl(url: string | undefined): string;
|
|
4
4
|
export declare const SMALL_THUMBNAIL = 40;
|
|
5
5
|
export declare const MEDIUM_THUMBNAIL = 100;
|
package/dist/routes/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./CustomViewRoute";
|
|
2
|
-
export * from "./RebaseRoute";
|
|
1
|
+
export * from "./CustomViewRoute.js";
|
|
2
|
+
export * from "./RebaseRoute.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Entity } from "@rebasepro/types";
|
|
2
|
-
import { FormContext } from "../fields";
|
|
3
|
-
import { FormexController } from "./formex";
|
|
2
|
+
import { FormContext } from "../fields.js";
|
|
3
|
+
import { FormexController } from "./formex.js";
|
|
4
4
|
import type { AdminCollection } from "@rebasepro/admin-types";
|
|
5
5
|
export interface EntityFormActionsProps {
|
|
6
6
|
path: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Entity, EntityStatus } from "@rebasepro/types";
|
|
2
2
|
import { EntityCustomViewParams, AdminCollection } from "@rebasepro/admin-types";
|
|
3
|
-
import { FormContext } from "../fields";
|
|
4
|
-
import { FormexController } from "./formex";
|
|
5
|
-
import { EntityFormActionsProps } from "./EntityFormActionsProps";
|
|
3
|
+
import { FormContext } from "../fields.js";
|
|
4
|
+
import { FormexController } from "./formex.js";
|
|
5
|
+
import { EntityFormActionsProps } from "./EntityFormActionsProps.js";
|
|
6
6
|
/**
|
|
7
7
|
* Props for the headless EntityForm component.
|
|
8
8
|
* This form can be used without admin context — all backend concerns
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./PropertyPreviewProps";
|
|
2
|
-
export * from "./EntityFormProps";
|
|
3
|
-
export * from "./EntityFormActionsProps";
|
|
1
|
+
export * from "./PropertyPreviewProps.js";
|
|
2
|
+
export * from "./EntityFormProps.js";
|
|
3
|
+
export * from "./EntityFormActionsProps.js";
|
package/dist/types/fields.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InferPropertyType } from "@rebasepro/types";
|
|
2
2
|
import { Entity } from "@rebasepro/types";
|
|
3
|
-
import { FormexController } from "./components/formex";
|
|
3
|
+
import { FormexController } from "./components/formex.js";
|
|
4
4
|
import { Property } from "@rebasepro/types";
|
|
5
5
|
import type { AdminCollection } from "@rebasepro/admin-types";
|
|
6
6
|
export type DefaultFieldConfig = "text_field" | "multiline" | "markdown" | "url" | "email" | "switch" | "select" | "multi_select" | "user_select" | "number_input" | "number_select" | "multi_number_select" | "file_upload" | "multi_file_upload" | "reference" | "multi_references" | "relation" | "date_time" | "group" | "key_value" | "repeat" | "custom_array" | "block" | "vector_input" | "geopoint" | "binary";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./fields";
|
|
2
|
-
export * from "./components";
|
|
1
|
+
export * from "./fields.js";
|
|
2
|
+
export * from "./components/index.js";
|
package/dist/util/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./entity_actions";
|
|
2
|
-
export * from "./navigation_utils";
|
|
3
|
-
export * from "./resolutions";
|
|
4
|
-
export * from "./property_utils";
|
|
5
|
-
export * from "./previews";
|
|
1
|
+
export * from "./entity_actions.js";
|
|
2
|
+
export * from "./navigation_utils.js";
|
|
3
|
+
export * from "./resolutions.js";
|
|
4
|
+
export * from "./property_utils.js";
|
|
5
|
+
export * from "./previews.js";
|
|
@@ -9383,9 +9383,9 @@ var ConfigControllerProvider = React.memo(function ConfigControllerProvider({ ch
|
|
|
9383
9383
|
value: collectionConfigController,
|
|
9384
9384
|
children: /* @__PURE__ */ jsx(CollectionEditorContext.Provider, {
|
|
9385
9385
|
value: collectionEditorContextValue,
|
|
9386
|
-
children: /* @__PURE__ */
|
|
9386
|
+
children: /* @__PURE__ */ jsxs(CollectionEditorDialogsContext.Provider, {
|
|
9387
9387
|
value: dialogsState,
|
|
9388
|
-
children
|
|
9388
|
+
children: [children, collectionConfigController.dialog]
|
|
9389
9389
|
})
|
|
9390
9390
|
})
|
|
9391
9391
|
});
|
|
@@ -9427,8 +9427,8 @@ function EditorCollectionAction({ path, parentCollectionSlugs, parentEntityIds,
|
|
|
9427
9427
|
}
|
|
9428
9428
|
//#endregion
|
|
9429
9429
|
//#region src/components/CollectionViewBinding/CollectionViewActions.tsx
|
|
9430
|
-
var ImportCollectionAction = lazyChunk(() => import("./import-
|
|
9431
|
-
var ExportCollectionAction = lazyChunk(() => import("./export-
|
|
9430
|
+
var ImportCollectionAction = lazyChunk(() => import("./import-CZgNAlcd.js").then((n) => n.t).then((m) => ({ default: m.ImportCollectionAction })));
|
|
9431
|
+
var ExportCollectionAction = lazyChunk(() => import("./export-BItpoIu0.js").then((n) => n.t).then((m) => ({ default: m.ExportCollectionAction })));
|
|
9432
9432
|
function CollectionViewActions({ collection, relativePath, parentCollectionSlugs, parentEntityIds, onNewClick, onAddExistingClick, onMultipleDeleteClick, selectionEnabled, path, selectionController, tableController, collectionEntitiesCount, compact, children, openNewDocument }) {
|
|
9433
9433
|
const context = useAdminContext();
|
|
9434
9434
|
const { canCreate, canDelete } = usePermissions();
|
|
@@ -11776,7 +11776,7 @@ function JsonPreviewBinding({ values }) {
|
|
|
11776
11776
|
}
|
|
11777
11777
|
//#endregion
|
|
11778
11778
|
//#region src/components/EntityInspector.tsx
|
|
11779
|
-
var EntityHistoryView = lazyChunk(() => import("./history-
|
|
11779
|
+
var EntityHistoryView = lazyChunk(() => import("./history-C7WF14VR.js").then((m) => ({ default: m.EntityHistoryView })));
|
|
11780
11780
|
/**
|
|
11781
11781
|
* Raw values and revision history, as an inspector rather than as tabs.
|
|
11782
11782
|
*
|
|
@@ -23894,6 +23894,129 @@ function EntityFormBinding({ path, entityId: entityIdProp, collection, entity, i
|
|
|
23894
23894
|
});
|
|
23895
23895
|
}
|
|
23896
23896
|
//#endregion
|
|
23897
|
+
//#region src/collection_editor/liveSchemaClient.ts
|
|
23898
|
+
var LiveSchemaError = class extends Error {
|
|
23899
|
+
code;
|
|
23900
|
+
changes;
|
|
23901
|
+
constructor(message, code, changes) {
|
|
23902
|
+
super(message);
|
|
23903
|
+
this.code = code;
|
|
23904
|
+
this.changes = changes;
|
|
23905
|
+
this.name = "LiveSchemaError";
|
|
23906
|
+
}
|
|
23907
|
+
};
|
|
23908
|
+
var UNAVAILABLE = {
|
|
23909
|
+
SCHEMA_EDITING_UNSUPPORTED: "unsupported",
|
|
23910
|
+
SCHEMA_EDITING_NO_REPOSITORY: "no-repository"
|
|
23911
|
+
};
|
|
23912
|
+
function createLiveSchemaClient(options) {
|
|
23913
|
+
const doFetch = options.fetchImpl ?? fetch;
|
|
23914
|
+
const base = options.baseUrl.replace(/\/$/, "");
|
|
23915
|
+
const post = async (path, body) => {
|
|
23916
|
+
const token = await options.getAuthToken?.();
|
|
23917
|
+
const headers = { "Content-Type": "application/json" };
|
|
23918
|
+
if (token) headers.Authorization = `Bearer ${token}`;
|
|
23919
|
+
const response = await doFetch(`${base}${path}`, {
|
|
23920
|
+
method: "POST",
|
|
23921
|
+
headers,
|
|
23922
|
+
body: JSON.stringify(body)
|
|
23923
|
+
});
|
|
23924
|
+
if (response.ok) return await response.json();
|
|
23925
|
+
let payload = {};
|
|
23926
|
+
try {
|
|
23927
|
+
payload = await response.json();
|
|
23928
|
+
} catch {
|
|
23929
|
+
payload = { error: { message: await response.text().catch(() => "") } };
|
|
23930
|
+
}
|
|
23931
|
+
throw new LiveSchemaError(payload.error?.message || `Schema request failed with ${response.status}`, payload.error?.code, payload.error?.details?.changes);
|
|
23932
|
+
};
|
|
23933
|
+
return {
|
|
23934
|
+
/**
|
|
23935
|
+
* Whether this backend can edit its schema.
|
|
23936
|
+
*
|
|
23937
|
+
* Never throws. Every way of failing to get an answer — a backend too
|
|
23938
|
+
* old to have the endpoint, an unreachable one, a session that is not
|
|
23939
|
+
* an admin — means the same thing to a caller deciding whether to offer
|
|
23940
|
+
* the control, and turning that into an exception each caller has to
|
|
23941
|
+
* catch would only produce four copies of this `catch`.
|
|
23942
|
+
*/
|
|
23943
|
+
status: async () => {
|
|
23944
|
+
try {
|
|
23945
|
+
const token = await options.getAuthToken?.();
|
|
23946
|
+
const response = await doFetch(`${base}/status`, { headers: token ? { Authorization: `Bearer ${token}` } : {} });
|
|
23947
|
+
const body = await response.json().catch(() => ({}));
|
|
23948
|
+
if (response.ok) return {
|
|
23949
|
+
enabled: body.enabled === true,
|
|
23950
|
+
canPlan: body.canPlan === true,
|
|
23951
|
+
canApply: body.canApply ?? body.enabled === true,
|
|
23952
|
+
applyRefusedBecause: body.applyRefusedBecause,
|
|
23953
|
+
applyRefusedCode: body.applyRefusedCode,
|
|
23954
|
+
repository: body.repository,
|
|
23955
|
+
code: body.code,
|
|
23956
|
+
reason: body.reason
|
|
23957
|
+
};
|
|
23958
|
+
return {
|
|
23959
|
+
enabled: false,
|
|
23960
|
+
canPlan: false,
|
|
23961
|
+
canApply: false,
|
|
23962
|
+
code: body.error?.code,
|
|
23963
|
+
reason: body.error?.message ?? `The backend refused to say whether its schema is editable (HTTP ${response.status}).`
|
|
23964
|
+
};
|
|
23965
|
+
} catch (err) {
|
|
23966
|
+
return {
|
|
23967
|
+
enabled: false,
|
|
23968
|
+
canPlan: false,
|
|
23969
|
+
canApply: false,
|
|
23970
|
+
reason: err instanceof Error ? err.message : "The backend could not be reached."
|
|
23971
|
+
};
|
|
23972
|
+
}
|
|
23973
|
+
},
|
|
23974
|
+
/** What the change would do. No side effects. */
|
|
23975
|
+
plan: (change) => post("/plan", change),
|
|
23976
|
+
/** Commit the change, then apply it. */
|
|
23977
|
+
apply: (change) => post("/apply", change)
|
|
23978
|
+
};
|
|
23979
|
+
}
|
|
23980
|
+
/**
|
|
23981
|
+
* Whether an error means live editing is unavailable here, rather than that the
|
|
23982
|
+
* change was wrong.
|
|
23983
|
+
*
|
|
23984
|
+
* Returns the reason so a caller can say which, and `undefined` for anything
|
|
23985
|
+
* else — a refused change is not an unavailable feature, and conflating them
|
|
23986
|
+
* would hide the refusal that the user needs to read.
|
|
23987
|
+
*/
|
|
23988
|
+
function asUnavailable(err) {
|
|
23989
|
+
if (!(err instanceof LiveSchemaError) || !err.code) return void 0;
|
|
23990
|
+
const reason = UNAVAILABLE[err.code];
|
|
23991
|
+
return reason ? {
|
|
23992
|
+
reason,
|
|
23993
|
+
message: err.message
|
|
23994
|
+
} : void 0;
|
|
23995
|
+
}
|
|
23996
|
+
/** The person closed the dialog without applying. Not an error; an answer. */
|
|
23997
|
+
var SchemaChangeCancelled = class extends Error {
|
|
23998
|
+
constructor() {
|
|
23999
|
+
super("The schema change was not applied.");
|
|
24000
|
+
this.name = "SchemaChangeCancelled";
|
|
24001
|
+
}
|
|
24002
|
+
};
|
|
24003
|
+
/**
|
|
24004
|
+
* Was this rejection the person saying no?
|
|
24005
|
+
*
|
|
24006
|
+
* A save has to *reject* when it is cancelled — resolving would leave the form
|
|
24007
|
+
* believing it saved. But a caller that treats every rejection as a failure
|
|
24008
|
+
* then reports the user's own choice back to them as an error, which is what
|
|
24009
|
+
* the collection editor did: a console error and a red snackbar reading "Error
|
|
24010
|
+
* persisting collection: The schema change was not applied."
|
|
24011
|
+
*
|
|
24012
|
+
* Matched by name rather than `instanceof`, which is unreliable the moment two
|
|
24013
|
+
* copies of this module end up in one bundle — the class is then a different
|
|
24014
|
+
* identity and every check silently answers false.
|
|
24015
|
+
*/
|
|
24016
|
+
function isSchemaChangeCancelled(err) {
|
|
24017
|
+
return err instanceof Error && err.name === "SchemaChangeCancelled";
|
|
24018
|
+
}
|
|
24019
|
+
//#endregion
|
|
23897
24020
|
//#region src/collection_editor/useCollectionsConfigController.tsx
|
|
23898
24021
|
/**
|
|
23899
24022
|
* Use this hook to access the configuration controller.
|
|
@@ -24761,6 +24884,6 @@ function getFullIdPath(propertyKey, propertyNamespace) {
|
|
|
24761
24884
|
return idToPropertiesPath(propertyNamespace ? `${propertyNamespace}.${propertyKey}` : propertyKey);
|
|
24762
24885
|
}
|
|
24763
24886
|
//#endregion
|
|
24764
|
-
export {
|
|
24887
|
+
export { useBuildCollectionRegistryController as $, getEntityTitlePropertyKeyForEntity as $n, getCollectionBySlugWithin as $t, getFieldId as A, NumberPropertyPreview as An, isRelationProperty as Ar, flattenEntry as At, MapFieldBinding as B, RelationPreview as Bn, parseCsvRows as Bt, EntityFormBinding as C, ReadOnlyFieldBinding as Cn, getDefaultPropertiesOrder as Cr, CollectionViewActions as Ct, getDefaultFieldConfig as D, ArrayOfMapsPreview as Dn, getPropertyInPath$1 as Dr, ImportNewPropertyFieldPreview as Dt, DEFAULT_FIELD_CONFIGS as E, FieldHelperText as En, getPropertiesWithPropertiesOrder as Er, useCollectionEditorDialogsState as Et, SelectFieldBinding as F, ArrayOneOfPreview as Fn, IMPORT_BATCH_SIZE as Ft, useSelectionDialog as G, SidePanelControllerContext as Gn, SearchIconsView as Gt, DateTimeFieldBinding as H, InlineEntityListPreview as Hn, unflattenObject as Ht, RepeatFieldBinding as I, ArrayOfStringsPreview as In, saveImportedEntities as It, useBuildUrlController as J, useCollectionRegistryController as Jn, BreadcrumbsProvider as Jt, SelectionTableBinding as K, useSidePanel as Kn, FieldCaption as Kt, ReferenceFieldBinding as L, ArrayPropertyEnumPreview as Ln, ImportFileUpload as Lt, TextFieldBinding as M, DatePreview as Mn, getInferenceType as Mt, SwitchFieldBinding as N, KeyValuePreview as Nn, useImportConfig as Nt, getDefaultFieldId as O, PropertyPreview as On, getResolvedPropertyInPath as Or, DataNewPropertiesMapping as Ot, StorageUploadFieldBinding as P, MapPropertyPreview as Pn, ImportSaveInProgress as Pt, useResolvedCollections as Q, getEntityTitlePropertyKey as Qn, addInitialSlash as Qt, MultiSelectFieldBinding as R, ArrayEnumPreview as Rn, convertFileToJson as Rt, isSchemaChangeCancelled as S, useClearRestoreValue as Sn, getBracketNotation as Sr, EntityCardBinding as St, PropertyFieldBinding as T, LabelWithIcon as Tn, getIconForWidget as Tr, ConfigControllerProvider as Tt, BlockFieldBinding as U, ReferencePreview as Un, ArrayContainer as Ut, KeyValueFieldBinding as V, ArrayOfReferencesPreview as Vn, parseCsvToObjects as Vt, ArrayOfReferencesFieldBinding as W, EntityPreviewBinding as Wn, PropertyConfigBadge as Wt, useTopLevelNavigation as X, useResolvedUser as Xn, resolveEntityView as Xt, useBuildNavigationStateController as Y, getUserLabel as Yn, resolveEntityAction as Yt, useResolvedViews as Z, getEntityPreviewKeys as Zn, mergeEntityActions as Zt, useCollectionsConfigController as _, useNavigationStateController as _n, FieldBlock as _r, resetPasswordAction as _t, namespaceToPropertiesPath as a, resolveCollectionPathIds$1 as an, SkeletonPropertyComponent as ar, useBuildSidePanel as at, asUnavailable as b, SelectableTableContext as bn, spanClass as br, EntityViewBinding as bt, buildCollectionGenerationCallback as c, useSelectionController as cn, renderSkeletonImageThumbnail as cr, extractTouchedValues as ct, fromSerializableCollectionConfigs as d, SelectableTable as dn, ImagePreview as dr, removeEmptyContainers as dt, getCollectionPathsCombinations as en, ArrayPropertyPreview as er, useHistory as et, fromSerializableProperties as f, CollectionRowActions as fn, sanitizeUrl as fr, zodToFormErrors as ft, toSerializableProperty as g, NavigationStateContext as gn, RecordMeta as gr, editEntityAction as gt, toSerializableProperties as h, useUrlController as hn, FormRail as hr, deleteEntityAction as ht, namespaceToPropertiesOrderPath as i, removeTrailingSlash$1 as in, StorageThumbnailInternal as ir, getEntityViewWidth as it, VectorFieldBinding as j, BooleanPreview as jn, processValueMapping as jt, getFieldConfig as k, UserPreview as kn, isReferenceProperty as kr, convertDataToEntity as kt, validateCollectionJson as l, VirtualTableInput$1 as ln, renderSkeletonText as lr, getChanges as lt, toSerializableCollectionConfig as m, UrlContext as mn, FormSections as mr, copyEntityAction as mt, getFullIdPath as n, removeInitialAndTrailingSlashes$1 as nn, EnumValuesChip as nr, useResolvedNavigationFrom as nt, CollectionGenerationApiError as o, resolveOpenEntityMode as on, renderSkeletonCaptionText as or, EditViewBinding as ot, fromSerializableProperty as p, useAdminContext as pn, EmptyValue as pr, CollectionViewBinding as pt, SideDialogs as q, CollectionRegistryContext as qn, useBreadcrumbsController as qt, idToPropertiesPath as r, removeInitialSlash as rn, StorageThumbnail as rr, buildSidePanelsFromUrl as rt, DEFAULT_COLLECTION_GENERATION_ENDPOINT as s, resolveViewMode as sn, renderSkeletonIcon as sr, useSafeSnackbarController as st, getFullId as t, getLastSegment$1 as tn, StringPropertyPreview as tr, resolveNavigationFrom as tt, fromSerializableCollectionConfig as u, CollectionTableBinding as un, UrlComponentPreview as ur, getInitialEntityValues as ut, LiveSchemaError as v, useSideDialogsController as vn, LABEL_ICON_SIZE as vr, CreationResultDialog as vt, EntityForm as w, LabelWithIconAndTooltip as wn, getIconForProperty as wr, useCollectionEditorController as wt, createLiveSchemaClient as x, ArrayCustomShapedFieldBinding as xn, PropertyIdCopyTooltip as xr, CollectionCardViewBinding as xt, SchemaChangeCancelled as y, SideDialogsControllerContext as yn, isSelfLabellingProperty as yr, DetailViewBinding as yt, MarkdownEditorFieldBinding as z, ArrayOfStorageComponentsPreview as zn, detectCsvDelimiter as zt };
|
|
24765
24888
|
|
|
24766
|
-
//# sourceMappingURL=util-
|
|
24889
|
+
//# sourceMappingURL=util-wrBH4QSB.js.map
|