@firecms/collection_editor 3.5.2 → 3.5.3
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/ConfigControllerProvider.d.ts +5 -5
- package/dist/api/index.d.ts +1 -1
- package/dist/index.d.ts +16 -16
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/types/collection_editor_controller.d.ts +2 -2
- package/dist/types/config_controller.d.ts +1 -1
- package/dist/ui/CollectionViewHeaderAction.d.ts +1 -1
- package/dist/ui/PropertyAddColumnComponent.d.ts +1 -1
- package/dist/ui/collection_editor/AICollectionGeneratorPopover.d.ts +2 -2
- package/dist/ui/collection_editor/AIModifiedPathsContext.d.ts +1 -1
- package/dist/ui/collection_editor/CollectionEditorDialog.d.ts +4 -4
- package/dist/ui/collection_editor/CollectionEditorWelcomeView.d.ts +1 -1
- package/dist/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +1 -1
- package/dist/ui/collection_editor/EntityActionsEditTab.d.ts +1 -1
- package/dist/ui/collection_editor/ExtendSettingsForm.d.ts +3 -3
- package/dist/ui/collection_editor/SubcollectionsEditTab.d.ts +3 -3
- package/dist/ui/collection_editor/properties/conditions/index.d.ts +6 -6
- package/dist/useCollectionEditorController.d.ts +1 -1
- package/dist/useCollectionEditorPlugin.d.ts +5 -5
- package/dist/useCollectionsConfigController.d.ts +1 -1
- package/dist/utils/collections.d.ts +1 -1
- package/package.json +8 -8
- package/src/ConfigControllerProvider.tsx +8 -8
- package/src/api/index.ts +1 -1
- package/src/index.ts +16 -16
- package/src/types/collection_editor_controller.tsx +2 -2
- package/src/types/config_controller.tsx +1 -1
- package/src/ui/AddKanbanColumnAction.tsx +1 -1
- package/src/ui/CollectionViewHeaderAction.tsx +2 -2
- package/src/ui/EditorCollectionAction.tsx +2 -2
- package/src/ui/EditorCollectionActionStart.tsx +3 -3
- package/src/ui/EditorEntityAction.tsx +2 -2
- package/src/ui/HomePageEditorCollectionAction.tsx +2 -2
- package/src/ui/KanbanSetupAction.tsx +1 -1
- package/src/ui/MissingReferenceWidget.tsx +1 -1
- package/src/ui/NewCollectionButton.tsx +1 -1
- package/src/ui/NewCollectionCard.tsx +1 -1
- package/src/ui/PropertyAddColumnComponent.tsx +2 -2
- package/src/ui/collection_editor/AICollectionGeneratorPopover.tsx +2 -2
- package/src/ui/collection_editor/AIModifiedPathsContext.tsx +1 -1
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +5 -5
- package/src/ui/collection_editor/CollectionEditorDialog.tsx +17 -17
- package/src/ui/collection_editor/CollectionEditorWelcomeView.tsx +8 -8
- package/src/ui/collection_editor/CollectionJsonImportDialog.tsx +1 -1
- package/src/ui/collection_editor/CollectionPropertiesEditorForm.tsx +6 -6
- package/src/ui/collection_editor/DisplaySettingsForm.tsx +4 -4
- package/src/ui/collection_editor/EntityActionsEditTab.tsx +2 -2
- package/src/ui/collection_editor/ExtendSettingsForm.tsx +5 -5
- package/src/ui/collection_editor/GetCodeDialog.tsx +1 -1
- package/src/ui/collection_editor/KanbanConfigSection.tsx +1 -1
- package/src/ui/collection_editor/PropertyEditView.tsx +19 -19
- package/src/ui/collection_editor/PropertyFieldPreview.tsx +1 -1
- package/src/ui/collection_editor/PropertyTree.tsx +4 -4
- package/src/ui/collection_editor/SubcollectionsEditTab.tsx +5 -5
- package/src/ui/collection_editor/import/CollectionEditorImportMapping.tsx +5 -5
- package/src/ui/collection_editor/properties/BlockPropertyField.tsx +3 -3
- package/src/ui/collection_editor/properties/BooleanPropertyField.tsx +3 -3
- package/src/ui/collection_editor/properties/CommonPropertyFields.tsx +1 -1
- package/src/ui/collection_editor/properties/DateTimePropertyField.tsx +2 -2
- package/src/ui/collection_editor/properties/EnumPropertyField.tsx +5 -5
- package/src/ui/collection_editor/properties/KeyValuePropertyField.tsx +2 -2
- package/src/ui/collection_editor/properties/MapPropertyField.tsx +3 -3
- package/src/ui/collection_editor/properties/MarkdownPropertyField.tsx +2 -2
- package/src/ui/collection_editor/properties/NumberPropertyField.tsx +2 -2
- package/src/ui/collection_editor/properties/RepeatPropertyField.tsx +4 -4
- package/src/ui/collection_editor/properties/StoragePropertyField.tsx +4 -4
- package/src/ui/collection_editor/properties/StringPropertyField.tsx +2 -2
- package/src/ui/collection_editor/properties/UrlPropertyField.tsx +2 -2
- package/src/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.tsx +1 -1
- package/src/ui/collection_editor/properties/conditions/ConditionsEditor.tsx +2 -2
- package/src/ui/collection_editor/properties/conditions/EnumConditionsEditor.tsx +2 -2
- package/src/ui/collection_editor/properties/conditions/index.ts +6 -6
- package/src/ui/collection_editor/properties/validation/ArrayPropertyValidation.tsx +1 -1
- package/src/ui/collection_editor/properties/validation/GeneralPropertyValidation.tsx +1 -1
- package/src/ui/collection_editor/properties/validation/NumberPropertyValidation.tsx +2 -2
- package/src/ui/collection_editor/properties/validation/StringPropertyValidation.tsx +2 -2
- package/src/useCollectionEditorController.tsx +2 -2
- package/src/useCollectionEditorPlugin.tsx +24 -24
- package/src/useCollectionsConfigController.tsx +2 -2
- package/src/utils/collections.ts +1 -1
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
} from "@firecms/ui";
|
|
24
24
|
|
|
25
25
|
import { useFormex } from "@firecms/formex";
|
|
26
|
-
import { LayoutModeSwitch } from "./LayoutModeSwitch";
|
|
27
|
-
import { ViewModeSwitch } from "./ViewModeSwitch";
|
|
28
|
-
import { KanbanConfigSection } from "./KanbanConfigSection";
|
|
29
|
-
import { PropertyFormDialog } from "./PropertyEditView";
|
|
26
|
+
import { LayoutModeSwitch } from "./LayoutModeSwitch.js";
|
|
27
|
+
import { ViewModeSwitch } from "./ViewModeSwitch.js";
|
|
28
|
+
import { KanbanConfigSection } from "./KanbanConfigSection.js";
|
|
29
|
+
import { PropertyFormDialog } from "./PropertyEditView.js";
|
|
30
30
|
|
|
31
31
|
export function DisplaySettingsForm({
|
|
32
32
|
expandKanban
|
|
@@ -22,9 +22,9 @@ import {
|
|
|
22
22
|
Tooltip,
|
|
23
23
|
Typography,
|
|
24
24
|
} from "@firecms/ui";
|
|
25
|
-
import { PersistedCollection } from "../../types/persisted_collection";
|
|
25
|
+
import { PersistedCollection } from "../../types/persisted_collection.js";
|
|
26
26
|
import { useFormex } from "@firecms/formex";
|
|
27
|
-
import { EntityActionsSelectDialog } from "./EntityActionsSelectDialog";
|
|
27
|
+
import { EntityActionsSelectDialog } from "./EntityActionsSelectDialog.js";
|
|
28
28
|
|
|
29
29
|
export function EntityActionsEditTab({
|
|
30
30
|
collection,
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
} from "@firecms/ui";
|
|
14
14
|
|
|
15
15
|
import { useFormex } from "@firecms/formex";
|
|
16
|
-
import { CollectionsConfigController } from "../../types/config_controller";
|
|
17
|
-
import { CollectionInference } from "../../types/collection_inference";
|
|
18
|
-
import { SubcollectionsEditTab } from "./SubcollectionsEditTab";
|
|
19
|
-
import { EntityActionsEditTab } from "./EntityActionsEditTab";
|
|
20
|
-
import { PersistedCollection } from "../../types/persisted_collection";
|
|
16
|
+
import { CollectionsConfigController } from "../../types/config_controller.js";
|
|
17
|
+
import { CollectionInference } from "../../types/collection_inference.js";
|
|
18
|
+
import { SubcollectionsEditTab } from "./SubcollectionsEditTab.js";
|
|
19
|
+
import { EntityActionsEditTab } from "./EntityActionsEditTab.js";
|
|
20
|
+
import { PersistedCollection } from "../../types/persisted_collection.js";
|
|
21
21
|
|
|
22
22
|
export function ExtendSettingsForm({
|
|
23
23
|
collection,
|
|
@@ -3,7 +3,7 @@ import { Button, ContentCopyIcon, Dialog, DialogActions, DialogContent, DialogTi
|
|
|
3
3
|
import React, { useState } from "react";
|
|
4
4
|
import JSON5 from "json5";
|
|
5
5
|
import { Highlight, themes } from "prism-react-renderer"
|
|
6
|
-
import { camelCase } from "./utils/strings";
|
|
6
|
+
import { camelCase } from "./utils/strings.js";
|
|
7
7
|
import { clone } from "@firecms/formex";
|
|
8
8
|
|
|
9
9
|
export function GetCodeDialog({
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
Typography
|
|
20
20
|
} from "@firecms/ui";
|
|
21
21
|
import { useFormex } from "@firecms/formex";
|
|
22
|
-
import { PropertyFormDialog } from "./PropertyEditView";
|
|
22
|
+
import { PropertyFormDialog } from "./PropertyEditView.js";
|
|
23
23
|
|
|
24
24
|
export function KanbanConfigSection({
|
|
25
25
|
className,
|
|
@@ -35,25 +35,25 @@ import {
|
|
|
35
35
|
Typography,
|
|
36
36
|
WarningIcon
|
|
37
37
|
} from "@firecms/ui";
|
|
38
|
-
import { EnumPropertyField } from "./properties/EnumPropertyField";
|
|
39
|
-
import { StoragePropertyField } from "./properties/StoragePropertyField";
|
|
40
|
-
import { MapPropertyField } from "./properties/MapPropertyField";
|
|
41
|
-
import { RepeatPropertyField } from "./properties/RepeatPropertyField";
|
|
42
|
-
import { CommonPropertyFields } from "./properties/CommonPropertyFields";
|
|
43
|
-
import { StringPropertyField } from "./properties/StringPropertyField";
|
|
44
|
-
import { BooleanPropertyField } from "./properties/BooleanPropertyField";
|
|
45
|
-
import { BlockPropertyField } from "./properties/BlockPropertyField";
|
|
46
|
-
import { NumberPropertyField } from "./properties/NumberPropertyField";
|
|
47
|
-
import { ReferencePropertyField } from "./properties/ReferencePropertyField";
|
|
48
|
-
import { DateTimePropertyField } from "./properties/DateTimePropertyField";
|
|
49
|
-
import { AdvancedPropertyValidation } from "./properties/advanced/AdvancedPropertyValidation";
|
|
50
|
-
import { ConditionsPanel, ConditionsEditor, EnumConditionsEditor } from "./properties/conditions";
|
|
51
|
-
import { editableProperty } from "../../utils/entities";
|
|
52
|
-
import { KeyValuePropertyField } from "./properties/KeyValuePropertyField";
|
|
53
|
-
import { updatePropertyFromWidget } from "./utils/update_property_for_widget";
|
|
54
|
-
import { UrlPropertyField } from "./properties/UrlPropertyField";
|
|
55
|
-
import { supportedFields } from "./utils/supported_fields";
|
|
56
|
-
import { MarkdownPropertyField } from "./properties/MarkdownPropertyField";
|
|
38
|
+
import { EnumPropertyField } from "./properties/EnumPropertyField.js";
|
|
39
|
+
import { StoragePropertyField } from "./properties/StoragePropertyField.js";
|
|
40
|
+
import { MapPropertyField } from "./properties/MapPropertyField.js";
|
|
41
|
+
import { RepeatPropertyField } from "./properties/RepeatPropertyField.js";
|
|
42
|
+
import { CommonPropertyFields } from "./properties/CommonPropertyFields.js";
|
|
43
|
+
import { StringPropertyField } from "./properties/StringPropertyField.js";
|
|
44
|
+
import { BooleanPropertyField } from "./properties/BooleanPropertyField.js";
|
|
45
|
+
import { BlockPropertyField } from "./properties/BlockPropertyField.js";
|
|
46
|
+
import { NumberPropertyField } from "./properties/NumberPropertyField.js";
|
|
47
|
+
import { ReferencePropertyField } from "./properties/ReferencePropertyField.js";
|
|
48
|
+
import { DateTimePropertyField } from "./properties/DateTimePropertyField.js";
|
|
49
|
+
import { AdvancedPropertyValidation } from "./properties/advanced/AdvancedPropertyValidation.js";
|
|
50
|
+
import { ConditionsPanel, ConditionsEditor, EnumConditionsEditor } from "./properties/conditions/index.js";
|
|
51
|
+
import { editableProperty } from "../../utils/entities.js";
|
|
52
|
+
import { KeyValuePropertyField } from "./properties/KeyValuePropertyField.js";
|
|
53
|
+
import { updatePropertyFromWidget } from "./utils/update_property_for_widget.js";
|
|
54
|
+
import { UrlPropertyField } from "./properties/UrlPropertyField.js";
|
|
55
|
+
import { supportedFields } from "./utils/supported_fields.js";
|
|
56
|
+
import { MarkdownPropertyField } from "./properties/MarkdownPropertyField.js";
|
|
57
57
|
|
|
58
58
|
export type PropertyWithId = Property & {
|
|
59
59
|
id?: string
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
VerticalAlignBottomIcon,
|
|
22
22
|
VerticalAlignTopIcon
|
|
23
23
|
} from "@firecms/ui";
|
|
24
|
-
import { NonEditablePropertyPreview, PropertyFieldPreview } from "./PropertyFieldPreview";
|
|
24
|
+
import { NonEditablePropertyPreview, PropertyFieldPreview } from "./PropertyFieldPreview.js";
|
|
25
25
|
import {
|
|
26
26
|
closestCenter,
|
|
27
27
|
DndContext,
|
|
@@ -40,9 +40,9 @@ import {
|
|
|
40
40
|
import { restrictToVerticalAxis } from "@dnd-kit/modifiers";
|
|
41
41
|
|
|
42
42
|
import { CSS } from "@dnd-kit/utilities";
|
|
43
|
-
import { getFullId, getFullIdPath } from "./util";
|
|
44
|
-
import { editableProperty } from "../../utils/entities";
|
|
45
|
-
import { useAIModifiedPaths } from "./AIModifiedPathsContext";
|
|
43
|
+
import { getFullId, getFullIdPath } from "./util.js";
|
|
44
|
+
import { editableProperty } from "../../utils/entities.js";
|
|
45
|
+
import { useAIModifiedPaths } from "./AIModifiedPathsContext.js";
|
|
46
46
|
|
|
47
47
|
export const PropertyTree = React.memo(
|
|
48
48
|
function PropertyTree<M extends {
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
Tooltip,
|
|
24
24
|
Typography,
|
|
25
25
|
} from "@firecms/ui";
|
|
26
|
-
import { CollectionEditorDialog } from "./CollectionEditorDialog";
|
|
27
|
-
import { CollectionsConfigController } from "../../types/config_controller";
|
|
28
|
-
import { PersistedCollection } from "../../types/persisted_collection";
|
|
29
|
-
import { CollectionInference } from "../../types/collection_inference";
|
|
30
|
-
import { EntityCustomViewsSelectDialog } from "./EntityCustomViewsSelectDialog";
|
|
26
|
+
import { CollectionEditorDialog } from "./CollectionEditorDialog.js";
|
|
27
|
+
import { CollectionsConfigController } from "../../types/config_controller.js";
|
|
28
|
+
import { PersistedCollection } from "../../types/persisted_collection.js";
|
|
29
|
+
import { CollectionInference } from "../../types/collection_inference.js";
|
|
30
|
+
import { EntityCustomViewsSelectDialog } from "./EntityCustomViewsSelectDialog.js";
|
|
31
31
|
import { useFormex } from "@firecms/formex";
|
|
32
32
|
|
|
33
33
|
export function SubcollectionsEditTab({
|
|
@@ -10,11 +10,11 @@ import { getFieldConfig, getFieldId, Properties, Property, PropertyConfig, Prope
|
|
|
10
10
|
} from "@firecms/core";
|
|
11
11
|
import { cls, Container, Select, SelectItem, Tooltip, Typography } from "@firecms/ui";
|
|
12
12
|
import React, { useState } from "react";
|
|
13
|
-
import { OnPropertyChangedParams, PropertyFormDialog, PropertyWithId } from "../PropertyEditView";
|
|
14
|
-
import { getFullId, idToPropertiesPath, namespaceToPropertiesOrderPath } from "../util";
|
|
15
|
-
import { PersistedCollection } from "../../../types/persisted_collection";
|
|
16
|
-
import { updatePropertyFromWidget } from "../utils/update_property_for_widget";
|
|
17
|
-
import { supportedFields } from "../utils/supported_fields";
|
|
13
|
+
import { OnPropertyChangedParams, PropertyFormDialog, PropertyWithId } from "../PropertyEditView.js";
|
|
14
|
+
import { getFullId, idToPropertiesPath, namespaceToPropertiesOrderPath } from "../util.js";
|
|
15
|
+
import { PersistedCollection } from "../../../types/persisted_collection.js";
|
|
16
|
+
import { updatePropertyFromWidget } from "../utils/update_property_for_widget.js";
|
|
17
|
+
import { supportedFields } from "../utils/supported_fields.js";
|
|
18
18
|
import { buildPropertyFromData } from "@firecms/schema_inference";
|
|
19
19
|
|
|
20
20
|
export function CollectionEditorImportMapping({
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { AddIcon, Button, Paper, Typography } from "@firecms/ui";
|
|
3
3
|
import { getIn, useFormex } from "@firecms/formex";
|
|
4
|
-
import { OnPropertyChangedParams, PropertyFormDialog } from "../PropertyEditView";
|
|
4
|
+
import { OnPropertyChangedParams, PropertyFormDialog } from "../PropertyEditView.js";
|
|
5
5
|
import {
|
|
6
6
|
getFullId,
|
|
7
7
|
getFullIdPath,
|
|
8
8
|
idToPropertiesPath,
|
|
9
9
|
namespaceToPropertiesOrderPath,
|
|
10
10
|
namespaceToPropertiesPath
|
|
11
|
-
} from "../util";
|
|
12
|
-
import { PropertyTree } from "../PropertyTree";
|
|
11
|
+
} from "../util.js";
|
|
12
|
+
import { PropertyTree } from "../PropertyTree.js";
|
|
13
13
|
import { ArrayProperty, PropertyConfig } from "@firecms/core";
|
|
14
14
|
|
|
15
15
|
export function BlockPropertyField({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Field, FormexFieldProps, getIn, useFormex } from "@firecms/formex";
|
|
3
3
|
|
|
4
|
-
import { GeneralPropertyValidation } from "./validation/GeneralPropertyValidation";
|
|
5
|
-
import { ValidationPanel } from "./validation/ValidationPanel";
|
|
6
|
-
import { SwitchControl } from "../SwitchControl";
|
|
4
|
+
import { GeneralPropertyValidation } from "./validation/GeneralPropertyValidation.js";
|
|
5
|
+
import { ValidationPanel } from "./validation/ValidationPanel.js";
|
|
6
|
+
import { SwitchControl } from "../SwitchControl.js";
|
|
7
7
|
import { useTranslation } from "@firecms/core";
|
|
8
8
|
|
|
9
9
|
export function BooleanPropertyField({ disabled }: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Field, getIn, useFormex } from "@firecms/formex";
|
|
2
2
|
import { DebouncedTextField } from "@firecms/ui";
|
|
3
|
-
import { PropertyWithId } from "../PropertyEditView";
|
|
3
|
+
import { PropertyWithId } from "../PropertyEditView.js";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { FieldCaption, prettifyIdentifier, toSnakeCase, useTranslation } from "@firecms/core";
|
|
6
6
|
|
|
@@ -2,8 +2,8 @@ import React from "react";
|
|
|
2
2
|
import { getIn, useFormex } from "@firecms/formex";
|
|
3
3
|
import { FieldCaption, NumberProperty, StringProperty, useTranslation } from "@firecms/core";
|
|
4
4
|
import { Select, SelectItem } from "@firecms/ui";
|
|
5
|
-
import { GeneralPropertyValidation } from "./validation/GeneralPropertyValidation";
|
|
6
|
-
import { ValidationPanel } from "./validation/ValidationPanel";
|
|
5
|
+
import { GeneralPropertyValidation } from "./validation/GeneralPropertyValidation.js";
|
|
6
|
+
import { ValidationPanel } from "./validation/ValidationPanel.js";
|
|
7
7
|
|
|
8
8
|
// Common IANA timezones with human-readable labels
|
|
9
9
|
const TIMEZONES = [
|
|
@@ -2,11 +2,11 @@ import React, { useMemo } from "react";
|
|
|
2
2
|
import { getIn, useFormex } from "@firecms/formex";
|
|
3
3
|
import { EnumValueConfig, resolveEnumValues, useSnackbarController, useTranslation } from "@firecms/core";
|
|
4
4
|
import { Select, SelectItem } from "@firecms/ui";
|
|
5
|
-
import { EnumForm } from "../EnumForm";
|
|
6
|
-
import { StringPropertyValidation } from "./validation/StringPropertyValidation";
|
|
7
|
-
import { ArrayPropertyValidation } from "./validation/ArrayPropertyValidation";
|
|
8
|
-
import { ValidationPanel } from "./validation/ValidationPanel";
|
|
9
|
-
import { PropertyWithId } from "../PropertyEditView";
|
|
5
|
+
import { EnumForm } from "../EnumForm.js";
|
|
6
|
+
import { StringPropertyValidation } from "./validation/StringPropertyValidation.js";
|
|
7
|
+
import { ArrayPropertyValidation } from "./validation/ArrayPropertyValidation.js";
|
|
8
|
+
import { ValidationPanel } from "./validation/ValidationPanel.js";
|
|
9
|
+
import { PropertyWithId } from "../PropertyEditView.js";
|
|
10
10
|
|
|
11
11
|
export function EnumPropertyField({
|
|
12
12
|
multiselect,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ValidationPanel } from "./validation/ValidationPanel";
|
|
3
|
-
import { GeneralPropertyValidation } from "./validation/GeneralPropertyValidation";
|
|
2
|
+
import { ValidationPanel } from "./validation/ValidationPanel.js";
|
|
3
|
+
import { GeneralPropertyValidation } from "./validation/GeneralPropertyValidation.js";
|
|
4
4
|
|
|
5
5
|
export function KeyValuePropertyField({ disabled }: {
|
|
6
6
|
disabled: boolean;
|
|
@@ -2,10 +2,10 @@ import React, { useState } from "react";
|
|
|
2
2
|
import { FieldCaption, MapProperty, Property, PropertyConfig, useTranslation
|
|
3
3
|
} from "@firecms/core";
|
|
4
4
|
import { AddIcon, BooleanSwitchWithLabel, Button, Paper, Typography } from "@firecms/ui";
|
|
5
|
-
import { PropertyFormDialog } from "../PropertyEditView";
|
|
5
|
+
import { PropertyFormDialog } from "../PropertyEditView.js";
|
|
6
6
|
import { getIn, useFormex } from "@firecms/formex";
|
|
7
|
-
import { PropertyTree } from "../PropertyTree";
|
|
8
|
-
import { getFullId, idToPropertiesPath, namespaceToPropertiesOrderPath, namespaceToPropertiesPath } from "../util";
|
|
7
|
+
import { PropertyTree } from "../PropertyTree.js";
|
|
8
|
+
import { getFullId, idToPropertiesPath, namespaceToPropertiesOrderPath, namespaceToPropertiesPath } from "../util.js";
|
|
9
9
|
|
|
10
10
|
export function MapPropertyField({ disabled, getData, allowDataInference, propertyConfigs, collectionEditable }: {
|
|
11
11
|
disabled: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback } from "react";
|
|
2
|
-
import { StringPropertyValidation } from "./validation/StringPropertyValidation";
|
|
3
|
-
import { ValidationPanel } from "./validation/ValidationPanel";
|
|
2
|
+
import { StringPropertyValidation } from "./validation/StringPropertyValidation.js";
|
|
3
|
+
import { ValidationPanel } from "./validation/ValidationPanel.js";
|
|
4
4
|
import { Field, getIn, useFormex } from "@firecms/formex";
|
|
5
5
|
|
|
6
6
|
import {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { NumberPropertyValidation } from "./validation/NumberPropertyValidation";
|
|
3
|
-
import { ValidationPanel } from "./validation/ValidationPanel";
|
|
2
|
+
import { NumberPropertyValidation } from "./validation/NumberPropertyValidation.js";
|
|
3
|
+
import { ValidationPanel } from "./validation/ValidationPanel.js";
|
|
4
4
|
import { TextField } from "@firecms/ui";
|
|
5
5
|
import { getIn, useFormex } from "@firecms/formex";
|
|
6
6
|
import { useTranslation } from "@firecms/core";
|
|
@@ -2,10 +2,10 @@ import React, { useState } from "react";
|
|
|
2
2
|
import { ArrayProperty, getFieldConfig, Property, PropertyConfig } from "@firecms/core";
|
|
3
3
|
import { Button, Paper, Typography } from "@firecms/ui";
|
|
4
4
|
import { Field, getIn, useFormex } from "@firecms/formex";
|
|
5
|
-
import { PropertyFormDialog } from "../PropertyEditView";
|
|
6
|
-
import { PropertyFieldPreview } from "../PropertyFieldPreview";
|
|
7
|
-
import { ArrayPropertyValidation } from "./validation/ArrayPropertyValidation";
|
|
8
|
-
import { ValidationPanel } from "./validation/ValidationPanel";
|
|
5
|
+
import { PropertyFormDialog } from "../PropertyEditView.js";
|
|
6
|
+
import { PropertyFieldPreview } from "../PropertyFieldPreview.js";
|
|
7
|
+
import { ArrayPropertyValidation } from "./validation/ArrayPropertyValidation.js";
|
|
8
|
+
import { ValidationPanel } from "./validation/ValidationPanel.js";
|
|
9
9
|
|
|
10
10
|
export function RepeatPropertyField({
|
|
11
11
|
showErrors,
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
} from "@firecms/ui";
|
|
13
13
|
|
|
14
14
|
import { Field, FormexFieldProps, getIn, useFormex } from "@firecms/formex";
|
|
15
|
-
import { GeneralPropertyValidation } from "./validation/GeneralPropertyValidation";
|
|
16
|
-
import { ArrayPropertyValidation } from "./validation/ArrayPropertyValidation";
|
|
17
|
-
import { ValidationPanel } from "./validation/ValidationPanel";
|
|
18
|
-
import { SwitchControl } from "../SwitchControl";
|
|
15
|
+
import { GeneralPropertyValidation } from "./validation/GeneralPropertyValidation.js";
|
|
16
|
+
import { ArrayPropertyValidation } from "./validation/ArrayPropertyValidation.js";
|
|
17
|
+
import { ValidationPanel } from "./validation/ValidationPanel.js";
|
|
18
|
+
import { SwitchControl } from "../SwitchControl.js";
|
|
19
19
|
import { useTranslation } from "@firecms/core";
|
|
20
20
|
|
|
21
21
|
export function StoragePropertyField({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { StringPropertyValidation } from "./validation/StringPropertyValidation";
|
|
3
|
-
import { ValidationPanel } from "./validation/ValidationPanel";
|
|
2
|
+
import { StringPropertyValidation } from "./validation/StringPropertyValidation.js";
|
|
3
|
+
import { ValidationPanel } from "./validation/ValidationPanel.js";
|
|
4
4
|
import { getIn, useFormex } from "@firecms/formex";
|
|
5
5
|
|
|
6
6
|
import { TextField } from "@firecms/ui";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { StringPropertyValidation } from "./validation/StringPropertyValidation";
|
|
3
|
-
import { ValidationPanel } from "./validation/ValidationPanel";
|
|
2
|
+
import { StringPropertyValidation } from "./validation/StringPropertyValidation.js";
|
|
3
|
+
import { ValidationPanel } from "./validation/ValidationPanel.js";
|
|
4
4
|
import { getIn, useFormex } from "@firecms/formex";
|
|
5
5
|
|
|
6
6
|
import { Select, SelectItem, TextField } from "@firecms/ui";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
3
|
import { Field, FormexFieldProps } from "@firecms/formex";
|
|
4
|
-
import { SwitchControl } from "../../SwitchControl";
|
|
4
|
+
import { SwitchControl } from "../../SwitchControl.js";
|
|
5
5
|
import { useTranslation } from "@firecms/core";
|
|
6
6
|
|
|
7
7
|
export function AdvancedPropertyValidation({ disabled }: {
|
|
@@ -24,8 +24,8 @@ import {
|
|
|
24
24
|
isPropertyBuilder,
|
|
25
25
|
useTranslation
|
|
26
26
|
} from "@firecms/core";
|
|
27
|
-
import { PropertyWithId } from "../../PropertyEditView";
|
|
28
|
-
import { getPropertyPaths } from "./property_paths";
|
|
27
|
+
import { PropertyWithId } from "../../PropertyEditView.js";
|
|
28
|
+
import { getPropertyPaths } from "./property_paths.js";
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Condition types that can be configured
|
|
@@ -22,8 +22,8 @@ import {
|
|
|
22
22
|
EnumValueConfig,
|
|
23
23
|
isPropertyBuilder
|
|
24
24
|
} from "@firecms/core";
|
|
25
|
-
import { PropertyWithId } from "../../PropertyEditView";
|
|
26
|
-
import { getPropertyPaths } from "./property_paths";
|
|
25
|
+
import { PropertyWithId } from "../../PropertyEditView.js";
|
|
26
|
+
import { getPropertyPaths } from "./property_paths.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* Enum condition types - maps to PropertyConditions structure:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ConditionsPanel } from "./ConditionsPanel";
|
|
2
|
-
export { ConditionsEditor } from "./ConditionsEditor";
|
|
3
|
-
export type { ConditionsEditorProps } from "./ConditionsEditor";
|
|
4
|
-
export { EnumConditionsEditor } from "./EnumConditionsEditor";
|
|
5
|
-
export type { EnumConditionsEditorProps } from "./EnumConditionsEditor";
|
|
6
|
-
export { getPropertyPaths, getGroupedPropertyPaths } from "./property_paths";
|
|
1
|
+
export { ConditionsPanel } from "./ConditionsPanel.js";
|
|
2
|
+
export { ConditionsEditor } from "./ConditionsEditor.js";
|
|
3
|
+
export type { ConditionsEditorProps } from "./ConditionsEditor.js";
|
|
4
|
+
export { EnumConditionsEditor } from "./EnumConditionsEditor.js";
|
|
5
|
+
export type { EnumConditionsEditorProps } from "./EnumConditionsEditor.js";
|
|
6
|
+
export { getPropertyPaths, getGroupedPropertyPaths } from "./property_paths.js";
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { getIn, useFormex } from "@firecms/formex";
|
|
4
4
|
import { DebouncedTextField } from "@firecms/ui";
|
|
5
|
-
import { GeneralPropertyValidation } from "./GeneralPropertyValidation";
|
|
5
|
+
import { GeneralPropertyValidation } from "./GeneralPropertyValidation.js";
|
|
6
6
|
import { useTranslation } from "@firecms/core";
|
|
7
7
|
|
|
8
8
|
export function ArrayPropertyValidation({
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { Field, FormexFieldProps, getIn, useFormex } from "@firecms/formex";
|
|
4
4
|
import { DebouncedTextField } from "@firecms/ui";
|
|
5
|
-
import { SwitchControl } from "../../SwitchControl";
|
|
5
|
+
import { SwitchControl } from "../../SwitchControl.js";
|
|
6
6
|
import { useTranslation } from "@firecms/core";
|
|
7
7
|
|
|
8
8
|
export function GeneralPropertyValidation({ disabled }: {
|
|
@@ -2,8 +2,8 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { Field, FormexFieldProps, getIn, useFormex } from "@firecms/formex";
|
|
4
4
|
import { DebouncedTextField } from "@firecms/ui";
|
|
5
|
-
import { GeneralPropertyValidation } from "./GeneralPropertyValidation";
|
|
6
|
-
import { SwitchControl } from "../../SwitchControl";
|
|
5
|
+
import { GeneralPropertyValidation } from "./GeneralPropertyValidation.js";
|
|
6
|
+
import { SwitchControl } from "../../SwitchControl.js";
|
|
7
7
|
import { useTranslation } from "@firecms/core";
|
|
8
8
|
|
|
9
9
|
export function NumberPropertyValidation({ disabled }: {
|
|
@@ -3,8 +3,8 @@ import React from "react";
|
|
|
3
3
|
import { Field, FormexFieldProps, getIn, useFormex } from "@firecms/formex";
|
|
4
4
|
import { FieldCaption, serializeRegExp, useTranslation } from "@firecms/core";
|
|
5
5
|
import { DebouncedTextField, } from "@firecms/ui";
|
|
6
|
-
import { GeneralPropertyValidation } from "./GeneralPropertyValidation";
|
|
7
|
-
import { SwitchControl } from "../../SwitchControl";
|
|
6
|
+
import { GeneralPropertyValidation } from "./GeneralPropertyValidation.js";
|
|
7
|
+
import { SwitchControl } from "../../SwitchControl.js";
|
|
8
8
|
|
|
9
9
|
export function StringPropertyValidation({
|
|
10
10
|
length,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useContext } from "react";
|
|
2
|
-
import { CollectionEditorController } from "./types/collection_editor_controller";
|
|
3
|
-
import { CollectionEditorContext } from "./ConfigControllerProvider";
|
|
2
|
+
import { CollectionEditorController } from "./types/collection_editor_controller.js";
|
|
3
|
+
import { CollectionEditorContext } from "./ConfigControllerProvider.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Hook to access the collection editor controller.
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FireCMSPlugin, useAuthController, useNavigationController, User, useTranslation } from "@firecms/core";
|
|
3
|
-
import { ConfigControllerProvider } from "./ConfigControllerProvider";
|
|
4
|
-
import { CollectionEditorPermissionsBuilder } from "./types/config_permissions";
|
|
5
|
-
import { EditorCollectionAction } from "./ui/EditorCollectionAction";
|
|
6
|
-
import { HomePageEditorCollectionAction } from "./ui/HomePageEditorCollectionAction";
|
|
7
|
-
import { PersistedCollection } from "./types/persisted_collection";
|
|
8
|
-
import { CollectionInference } from "./types/collection_inference";
|
|
9
|
-
import { CollectionsConfigController } from "./types/config_controller";
|
|
10
|
-
import { CollectionGenerationCallback } from "./api/generateCollectionApi";
|
|
11
|
-
import { CollectionViewHeaderAction } from "./ui/CollectionViewHeaderAction";
|
|
12
|
-
import { PropertyAddColumnComponent } from "./ui/PropertyAddColumnComponent";
|
|
13
|
-
import { NewCollectionButton } from "./ui/NewCollectionButton";
|
|
3
|
+
import { ConfigControllerProvider } from "./ConfigControllerProvider.js";
|
|
4
|
+
import { CollectionEditorPermissionsBuilder } from "./types/config_permissions.js";
|
|
5
|
+
import { EditorCollectionAction } from "./ui/EditorCollectionAction.js";
|
|
6
|
+
import { HomePageEditorCollectionAction } from "./ui/HomePageEditorCollectionAction.js";
|
|
7
|
+
import { PersistedCollection } from "./types/persisted_collection.js";
|
|
8
|
+
import { CollectionInference } from "./types/collection_inference.js";
|
|
9
|
+
import { CollectionsConfigController } from "./types/config_controller.js";
|
|
10
|
+
import { CollectionGenerationCallback } from "./api/generateCollectionApi.js";
|
|
11
|
+
import { CollectionViewHeaderAction } from "./ui/CollectionViewHeaderAction.js";
|
|
12
|
+
import { PropertyAddColumnComponent } from "./ui/PropertyAddColumnComponent.js";
|
|
13
|
+
import { NewCollectionButton } from "./ui/NewCollectionButton.js";
|
|
14
14
|
import { AddIcon, Button, Paper, Typography } from "@firecms/ui";
|
|
15
|
-
import { useCollectionEditorController } from "./useCollectionEditorController";
|
|
16
|
-
import { EditorCollectionActionStart } from "./ui/EditorCollectionActionStart";
|
|
17
|
-
import { NewCollectionCard } from "./ui/NewCollectionCard";
|
|
18
|
-
import { EditorEntityAction } from "./ui/EditorEntityAction";
|
|
19
|
-
import { KanbanSetupAction } from "./ui/KanbanSetupAction";
|
|
20
|
-
import { AddKanbanColumnAction } from "./ui/AddKanbanColumnAction";
|
|
21
|
-
import { collectionEditorTranslationsEn } from "./locales/en";
|
|
15
|
+
import { useCollectionEditorController } from "./useCollectionEditorController.js";
|
|
16
|
+
import { EditorCollectionActionStart } from "./ui/EditorCollectionActionStart.js";
|
|
17
|
+
import { NewCollectionCard } from "./ui/NewCollectionCard.js";
|
|
18
|
+
import { EditorEntityAction } from "./ui/EditorEntityAction.js";
|
|
19
|
+
import { KanbanSetupAction } from "./ui/KanbanSetupAction.js";
|
|
20
|
+
import { AddKanbanColumnAction } from "./ui/AddKanbanColumnAction.js";
|
|
21
|
+
import { collectionEditorTranslationsEn } from "./locales/en.js";
|
|
22
22
|
|
|
23
23
|
export interface CollectionConfigControllerProps<EC extends PersistedCollection = PersistedCollection, USER extends User = User> {
|
|
24
24
|
|
|
@@ -137,12 +137,12 @@ export function useCollectionEditorPlugin<EC extends PersistedCollection = Persi
|
|
|
137
137
|
// Seven languages of strings in every plugin bundle is dead weight for
|
|
138
138
|
// the six nobody is reading.
|
|
139
139
|
en: collectionEditorTranslationsEn,
|
|
140
|
-
es: () => import("./locales/es").then((m) => m.collectionEditorTranslationsEs),
|
|
141
|
-
de: () => import("./locales/de").then((m) => m.collectionEditorTranslationsDe),
|
|
142
|
-
fr: () => import("./locales/fr").then((m) => m.collectionEditorTranslationsFr),
|
|
143
|
-
it: () => import("./locales/it").then((m) => m.collectionEditorTranslationsIt),
|
|
144
|
-
hi: () => import("./locales/hi").then((m) => m.collectionEditorTranslationsHi),
|
|
145
|
-
pt: () => import("./locales/pt").then((m) => m.collectionEditorTranslationsPt)
|
|
140
|
+
es: () => import("./locales/es.js").then((m) => m.collectionEditorTranslationsEs),
|
|
141
|
+
de: () => import("./locales/de.js").then((m) => m.collectionEditorTranslationsDe),
|
|
142
|
+
fr: () => import("./locales/fr.js").then((m) => m.collectionEditorTranslationsFr),
|
|
143
|
+
it: () => import("./locales/it.js").then((m) => m.collectionEditorTranslationsIt),
|
|
144
|
+
hi: () => import("./locales/hi.js").then((m) => m.collectionEditorTranslationsHi),
|
|
145
|
+
pt: () => import("./locales/pt.js").then((m) => m.collectionEditorTranslationsPt)
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useContext } from "react";
|
|
2
|
-
import { CollectionsConfigController } from "./types/config_controller";
|
|
3
|
-
import { ConfigControllerContext } from "./ConfigControllerProvider";
|
|
2
|
+
import { CollectionsConfigController } from "./types/config_controller.js";
|
|
3
|
+
import { ConfigControllerContext } from "./ConfigControllerProvider.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Use this hook to access the configuration controller.
|
package/src/utils/collections.ts
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
ModifyCollectionProps,
|
|
6
6
|
Properties
|
|
7
7
|
} from "@firecms/core";
|
|
8
|
-
import { PersistedCollection } from "../types/persisted_collection";
|
|
8
|
+
import { PersistedCollection } from "../types/persisted_collection.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Function in charge of merging collections defined in code with those stored in the backend.
|