@firecms/collection_editor 3.5.2-canary.c5764a3 → 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/{de-BfAs6FCh.js → de-CTzwD8_Y.js} +1 -1
- package/dist/{de-BfAs6FCh.js.map → de-CTzwD8_Y.js.map} +1 -1
- package/dist/{es-n-JMLSct.js → es-Cr-tkCSp.js} +1 -1
- package/dist/{es-n-JMLSct.js.map → es-Cr-tkCSp.js.map} +1 -1
- package/dist/{fr-BkIcmidG.js → fr-CGf2Dv7P.js} +1 -1
- package/dist/{fr-BkIcmidG.js.map → fr-CGf2Dv7P.js.map} +1 -1
- package/dist/{hi-CeydXFQO.js → hi-DCg_UyAb.js} +1 -1
- package/dist/{hi-CeydXFQO.js.map → hi-DCg_UyAb.js.map} +1 -1
- package/dist/index.d.ts +16 -16
- package/dist/index.es.js +6 -6
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/{it-B8DeGSZc.js → it-Dgi5NRgX.js} +1 -1
- package/dist/{it-B8DeGSZc.js.map → it-Dgi5NRgX.js.map} +1 -1
- package/dist/{pt-BDUhigIy.js → pt-DNdR9Hts.js} +1 -1
- package/dist/{pt-BDUhigIy.js.map → pt-DNdR9Hts.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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AddIcon, Button } from "@firecms/ui";
|
|
2
2
|
import { useTranslation } from "@firecms/core";
|
|
3
|
-
import { useCollectionEditorController } from "../useCollectionEditorController";
|
|
3
|
+
import { useCollectionEditorController } from "../useCollectionEditorController.js";
|
|
4
4
|
|
|
5
5
|
export function NewCollectionButton() {
|
|
6
6
|
const { t } = useTranslation();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PluginHomePageAdditionalCardsProps, useAuthController, useTranslation } from "@firecms/core";
|
|
2
2
|
import { AddIcon, Card, cls, Typography } from "@firecms/ui";
|
|
3
|
-
import { useCollectionEditorController } from "../useCollectionEditorController";
|
|
3
|
+
import { useCollectionEditorController } from "../useCollectionEditorController.js";
|
|
4
4
|
|
|
5
5
|
export function NewCollectionCard({
|
|
6
6
|
group,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EntityTableController, getDefaultPropertiesOrder, useAuthController, useTranslation } from "@firecms/core";
|
|
2
2
|
import { AddIcon, Tooltip } from "@firecms/ui";
|
|
3
|
-
import { useCollectionEditorController } from "../useCollectionEditorController";
|
|
4
|
-
import { PersistedCollection } from "../types/persisted_collection";
|
|
3
|
+
import { useCollectionEditorController } from "../useCollectionEditorController.js";
|
|
4
|
+
import { PersistedCollection } from "../types/persisted_collection.js";
|
|
5
5
|
|
|
6
6
|
export function PropertyAddColumnComponent({
|
|
7
7
|
fullPath,
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
CollectionGenerationCallback,
|
|
14
14
|
CollectionGenerationApiError,
|
|
15
15
|
CollectionOperation
|
|
16
|
-
} from "../../api/generateCollectionApi";
|
|
17
|
-
import { PersistedCollection } from "../../types/persisted_collection";
|
|
16
|
+
} from "../../api/generateCollectionApi.js";
|
|
17
|
+
import { PersistedCollection } from "../../types/persisted_collection.js";
|
|
18
18
|
|
|
19
19
|
export interface AICollectionGeneratorPopoverProps {
|
|
20
20
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { createContext, useCallback, useContext, useState } from "react";
|
|
2
|
-
import { CollectionOperation } from "../../api/generateCollectionApi";
|
|
2
|
+
import { CollectionOperation } from "../../api/generateCollectionApi.js";
|
|
3
3
|
|
|
4
4
|
export interface AIModifiedPathsContextType {
|
|
5
5
|
/** Set of paths that were modified by AI */
|
|
@@ -19,11 +19,11 @@ import {
|
|
|
19
19
|
} from "@firecms/ui";
|
|
20
20
|
|
|
21
21
|
import { Field, getIn, useFormex } from "@firecms/formex";
|
|
22
|
-
import { useCollectionEditorController } from "../../useCollectionEditorController";
|
|
23
|
-
import { LayoutModeSwitch } from "./LayoutModeSwitch";
|
|
24
|
-
import { ViewModeSwitch } from "./ViewModeSwitch";
|
|
25
|
-
import { KanbanConfigSection } from "./KanbanConfigSection";
|
|
26
|
-
import { PropertyFormDialog } from "./PropertyEditView";
|
|
22
|
+
import { useCollectionEditorController } from "../../useCollectionEditorController.js";
|
|
23
|
+
import { LayoutModeSwitch } from "./LayoutModeSwitch.js";
|
|
24
|
+
import { ViewModeSwitch } from "./ViewModeSwitch.js";
|
|
25
|
+
import { KanbanConfigSection } from "./KanbanConfigSection.js";
|
|
26
|
+
import { PropertyFormDialog } from "./PropertyEditView.js";
|
|
27
27
|
|
|
28
28
|
export function CollectionDetailsForm({
|
|
29
29
|
isNewCollection,
|
|
@@ -42,26 +42,26 @@ import {
|
|
|
42
42
|
Tabs,
|
|
43
43
|
Typography
|
|
44
44
|
} from "@firecms/ui";
|
|
45
|
-
import { YupSchema } from "./CollectionYupValidation";
|
|
46
|
-
import { GeneralSettingsForm } from "./GeneralSettingsForm";
|
|
47
|
-
import { DisplaySettingsForm } from "./DisplaySettingsForm";
|
|
48
|
-
import { CollectionPropertiesEditorForm } from "./CollectionPropertiesEditorForm";
|
|
49
|
-
import { UnsavedChangesDialog } from "./UnsavedChangesDialog";
|
|
50
|
-
import { ExtendSettingsForm } from "./ExtendSettingsForm";
|
|
51
|
-
import { CollectionsConfigController } from "../../types/config_controller";
|
|
52
|
-
import { CollectionEditorWelcomeView } from "./CollectionEditorWelcomeView";
|
|
53
|
-
import { CollectionInference } from "../../types/collection_inference";
|
|
45
|
+
import { YupSchema } from "./CollectionYupValidation.js";
|
|
46
|
+
import { GeneralSettingsForm } from "./GeneralSettingsForm.js";
|
|
47
|
+
import { DisplaySettingsForm } from "./DisplaySettingsForm.js";
|
|
48
|
+
import { CollectionPropertiesEditorForm } from "./CollectionPropertiesEditorForm.js";
|
|
49
|
+
import { UnsavedChangesDialog } from "./UnsavedChangesDialog.js";
|
|
50
|
+
import { ExtendSettingsForm } from "./ExtendSettingsForm.js";
|
|
51
|
+
import { CollectionsConfigController } from "../../types/config_controller.js";
|
|
52
|
+
import { CollectionEditorWelcomeView } from "./CollectionEditorWelcomeView.js";
|
|
53
|
+
import { CollectionInference } from "../../types/collection_inference.js";
|
|
54
54
|
import { getInferenceType, ImportSaveInProgress, useImportConfig } from "@firecms/data_import";
|
|
55
55
|
import { buildEntityPropertiesFromData } from "@firecms/schema_inference";
|
|
56
|
-
import { CollectionEditorImportMapping } from "./import/CollectionEditorImportMapping";
|
|
57
|
-
import { CollectionEditorImportDataPreview } from "./import/CollectionEditorImportDataPreview";
|
|
58
|
-
import { cleanPropertiesFromImport } from "./import/clean_import_data";
|
|
59
|
-
import { PersistedCollection } from "../../types/persisted_collection";
|
|
56
|
+
import { CollectionEditorImportMapping } from "./import/CollectionEditorImportMapping.js";
|
|
57
|
+
import { CollectionEditorImportDataPreview } from "./import/CollectionEditorImportDataPreview.js";
|
|
58
|
+
import { cleanPropertiesFromImport } from "./import/clean_import_data.js";
|
|
59
|
+
import { PersistedCollection } from "../../types/persisted_collection.js";
|
|
60
60
|
import { Formex, FormexController, useCreateFormex } from "@firecms/formex";
|
|
61
|
-
import { getFullIdPath } from "./util";
|
|
62
|
-
import { AICollectionGeneratorPopover } from "./AICollectionGeneratorPopover";
|
|
63
|
-
import { AIModifiedPathsProvider, useAIModifiedPaths } from "./AIModifiedPathsContext";
|
|
64
|
-
import { CollectionOperation, CollectionGenerationCallback } from "../../api/generateCollectionApi";
|
|
61
|
+
import { getFullIdPath } from "./util.js";
|
|
62
|
+
import { AICollectionGeneratorPopover } from "./AICollectionGeneratorPopover.js";
|
|
63
|
+
import { AIModifiedPathsProvider, useAIModifiedPaths } from "./AIModifiedPathsContext.js";
|
|
64
|
+
import { CollectionOperation, CollectionGenerationCallback } from "../../api/generateCollectionApi.js";
|
|
65
65
|
|
|
66
66
|
export interface CollectionEditorDialogProps {
|
|
67
67
|
open: boolean;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { AIIcon, EntityCollection, prettifyIdentifier, useTranslation } from "@firecms/core";
|
|
3
3
|
import { Button, Card, Chip, cls, CodeIcon, Container, Icon, Tooltip, Typography, } from "@firecms/ui";
|
|
4
|
-
import { CollectionJsonImportDialog } from "./CollectionJsonImportDialog";
|
|
4
|
+
import { CollectionJsonImportDialog } from "./CollectionJsonImportDialog.js";
|
|
5
5
|
|
|
6
|
-
import { productsCollectionTemplate } from "./templates/products_template";
|
|
7
|
-
import { blogCollectionTemplate } from "./templates/blog_template";
|
|
8
|
-
import { usersCollectionTemplate } from "./templates/users_template";
|
|
6
|
+
import { productsCollectionTemplate } from "./templates/products_template.js";
|
|
7
|
+
import { blogCollectionTemplate } from "./templates/blog_template.js";
|
|
8
|
+
import { usersCollectionTemplate } from "./templates/users_template.js";
|
|
9
9
|
import { ImportFileUpload } from "@firecms/data_import";
|
|
10
|
-
import { pagesCollectionTemplate } from "./templates/pages_template";
|
|
10
|
+
import { pagesCollectionTemplate } from "./templates/pages_template.js";
|
|
11
11
|
import { useFormex } from "@firecms/formex";
|
|
12
|
-
import { useCollectionEditorController } from "../../useCollectionEditorController";
|
|
13
|
-
import { AICollectionGeneratorPopover } from "./AICollectionGeneratorPopover";
|
|
14
|
-
import { CollectionGenerationCallback } from "../../api/generateCollectionApi";
|
|
12
|
+
import { useCollectionEditorController } from "../../useCollectionEditorController.js";
|
|
13
|
+
import { AICollectionGeneratorPopover } from "./AICollectionGeneratorPopover.js";
|
|
14
|
+
import { CollectionGenerationCallback } from "../../api/generateCollectionApi.js";
|
|
15
15
|
|
|
16
16
|
export function CollectionEditorWelcomeView({
|
|
17
17
|
path,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
Typography
|
|
11
11
|
} from "@firecms/ui";
|
|
12
12
|
import { EntityCollection } from "@firecms/core";
|
|
13
|
-
import { validateCollectionJson, CollectionValidationError } from "../../utils/validateCollectionJson";
|
|
13
|
+
import { validateCollectionJson, CollectionValidationError } from "../../utils/validateCollectionJson.js";
|
|
14
14
|
|
|
15
15
|
const EXAMPLE_JSON = `{
|
|
16
16
|
"id": "products",
|
|
@@ -30,12 +30,12 @@ import {
|
|
|
30
30
|
Typography,
|
|
31
31
|
} from "@firecms/ui";
|
|
32
32
|
|
|
33
|
-
import { getFullId, idToPropertiesPath, namespaceToPropertiesOrderPath } from "./util";
|
|
34
|
-
import { OnPropertyChangedParams, PropertyForm, PropertyFormDialog } from "./PropertyEditView";
|
|
35
|
-
import { PropertyTree } from "./PropertyTree";
|
|
36
|
-
import { PersistedCollection } from "../../types/persisted_collection";
|
|
37
|
-
import { GetCodeDialog } from "./GetCodeDialog";
|
|
38
|
-
import { useAIModifiedPaths } from "./AIModifiedPathsContext";
|
|
33
|
+
import { getFullId, idToPropertiesPath, namespaceToPropertiesOrderPath } from "./util.js";
|
|
34
|
+
import { OnPropertyChangedParams, PropertyForm, PropertyFormDialog } from "./PropertyEditView.js";
|
|
35
|
+
import { PropertyTree } from "./PropertyTree.js";
|
|
36
|
+
import { PersistedCollection } from "../../types/persisted_collection.js";
|
|
37
|
+
import { GetCodeDialog } from "./GetCodeDialog.js";
|
|
38
|
+
import { useAIModifiedPaths } from "./AIModifiedPathsContext.js";
|
|
39
39
|
|
|
40
40
|
type CollectionEditorFormProps = {
|
|
41
41
|
showErrors: boolean;
|
|
@@ -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 }: {
|