From 5e63539720e870672147df1556af48315302e6c2 Mon Sep 17 00:00:00 2001 From: m-abe-dev Date: Wed, 25 Sep 2024 14:32:38 +0200 Subject: [PATCH 01/11] update: uiux for import and export on project --- .../Projects/Project/hooks.ts | 5 ++++ .../ContentsContainer/Projects/index.tsx | 25 +++++++++++++------ .../components/Icon/Icons/DownloadSimple.svg | 5 ++++ .../components/Icon/Icons/SignIn.svg | 5 ++++ .../lib/reearth-ui/components/Icon/icons.ts | 6 ++++- web/src/services/i18n/translations/ja.yml | 6 +++-- 6 files changed, 41 insertions(+), 11 deletions(-) create mode 100644 web/src/beta/lib/reearth-ui/components/Icon/Icons/DownloadSimple.svg create mode 100644 web/src/beta/lib/reearth-ui/components/Icon/Icons/SignIn.svg diff --git a/web/src/beta/features/Dashboard/ContentsContainer/Projects/Project/hooks.ts b/web/src/beta/features/Dashboard/ContentsContainer/Projects/Project/hooks.ts index ce1efd4051..e512d33216 100644 --- a/web/src/beta/features/Dashboard/ContentsContainer/Projects/Project/hooks.ts +++ b/web/src/beta/features/Dashboard/ContentsContainer/Projects/Project/hooks.ts @@ -65,6 +65,11 @@ export default ({ title: t("Project Setting"), path: `/settings/project/${project.id}`, icon: "setting" + }, + { + id: "export", + title: t("Export"), + icon: "downloadSimple" } ]; diff --git a/web/src/beta/features/Dashboard/ContentsContainer/Projects/index.tsx b/web/src/beta/features/Dashboard/ContentsContainer/Projects/index.tsx index 6935d67c02..40e31faead 100644 --- a/web/src/beta/features/Dashboard/ContentsContainer/Projects/index.tsx +++ b/web/src/beta/features/Dashboard/ContentsContainer/Projects/index.tsx @@ -60,14 +60,23 @@ const Projects: FC<{ workspaceId?: string }> = ({ workspaceId }) => { + <> + + + ]} sortValue={sortValue} sortOptions={sortOptions} diff --git a/web/src/beta/lib/reearth-ui/components/Icon/Icons/DownloadSimple.svg b/web/src/beta/lib/reearth-ui/components/Icon/Icons/DownloadSimple.svg new file mode 100644 index 0000000000..338dac2544 --- /dev/null +++ b/web/src/beta/lib/reearth-ui/components/Icon/Icons/DownloadSimple.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/web/src/beta/lib/reearth-ui/components/Icon/Icons/SignIn.svg b/web/src/beta/lib/reearth-ui/components/Icon/Icons/SignIn.svg new file mode 100644 index 0000000000..be1527643a --- /dev/null +++ b/web/src/beta/lib/reearth-ui/components/Icon/Icons/SignIn.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/web/src/beta/lib/reearth-ui/components/Icon/icons.ts b/web/src/beta/lib/reearth-ui/components/Icon/icons.ts index 115b45d1f8..06134ac1d3 100644 --- a/web/src/beta/lib/reearth-ui/components/Icon/icons.ts +++ b/web/src/beta/lib/reearth-ui/components/Icon/icons.ts @@ -40,6 +40,7 @@ import Desktop from "./Icons/Desktop.svg?react"; import DeviceMobile from "./Icons/DeviceMobile.svg?react"; import DotsSixVertical from "./Icons/DotsSixVertical.svg?react"; import DotsThreeVertical from "./Icons/DotsThreeVertical.svg?react"; +import DownloadSimple from "./Icons/DownloadSimple.svg?react"; import EditMode from "./Icons/EditMode.svg?react"; import Editor from "./Icons/Editor.svg?react"; import Exit from "./Icons/Exit.svg?react"; @@ -106,6 +107,7 @@ import Rows from "./Icons/Rows.svg?react"; import Setting from "./Icons/Setting.svg?react"; import SettingFilled from "./Icons/SettingFilled.svg?react"; import Sidebar from "./Icons/Sidebar.svg?react"; +import SignIn from "./Icons/SignIn.svg?react"; import Square from "./Icons/Square.svg?react"; import SquareFilled from "./Icons/SquareFilled.svg?react"; import Star from "./Icons/Star.svg?react"; @@ -277,5 +279,7 @@ export default { videoFilled: VideoFilled, warning: Warning, aToZ: AToZ, - zToA: ZToA + zToA: ZToA, + downloadSimple: DownloadSimple, + signIn: SignIn }; diff --git a/web/src/services/i18n/translations/ja.yml b/web/src/services/i18n/translations/ja.yml index daa2d59158..9155f40788 100644 --- a/web/src/services/i18n/translations/ja.yml +++ b/web/src/services/i18n/translations/ja.yml @@ -23,14 +23,16 @@ Last Created: '' First Created: '' Last Updated: '' New Project: 新規プロジェクト +Import: インポート +Export: エクスポート All projects: '' Search Result for: '' Project Name: プロジェクト名 Updated At: '' Created At: '' No Project has been created yet: '' -Rename: '' -Project Setting: '' +Rename: 名称変更 +Project Setting: プロジェクト設定 Create new project: '' Project Name *: '' Text: '' From 119c6054e5ecefe796990c5c414f82be95f3e128 Mon Sep 17 00:00:00 2001 From: m-abe-dev Date: Wed, 25 Sep 2024 21:44:40 +0200 Subject: [PATCH 02/11] update: api and adding logics to ui --- .../Projects/Project/hooks.ts | 21 ++++- .../ContentsContainer/Projects/hooks.ts | 21 ++++- .../ContentsContainer/Projects/index.tsx | 18 ++++- web/src/services/api/projectApi.ts | 78 ++++++++++++++++++- web/src/services/gql/__gen__/gql.ts | 10 +++ web/src/services/gql/__gen__/graphql.ts | 17 ++++ web/src/services/gql/queries/project.ts | 16 ++++ web/src/services/i18n/translations/en.yml | 6 ++ web/src/services/i18n/translations/ja.yml | 4 + 9 files changed, 183 insertions(+), 8 deletions(-) diff --git a/web/src/beta/features/Dashboard/ContentsContainer/Projects/Project/hooks.ts b/web/src/beta/features/Dashboard/ContentsContainer/Projects/Project/hooks.ts index e512d33216..4eb6037a53 100644 --- a/web/src/beta/features/Dashboard/ContentsContainer/Projects/Project/hooks.ts +++ b/web/src/beta/features/Dashboard/ContentsContainer/Projects/Project/hooks.ts @@ -1,6 +1,9 @@ import { PopupMenuItem } from "@reearth/beta/lib/reearth-ui"; import useDoubleClick from "@reearth/beta/utils/use-double-click"; -import { useStorytellingFetcher } from "@reearth/services/api"; +import { + useStorytellingFetcher, + useProjectFetcher +} from "@reearth/services/api"; import { useT } from "@reearth/services/i18n"; import { MouseEvent, useCallback, useEffect, useMemo, useState } from "react"; @@ -22,6 +25,7 @@ export default ({ }: Props) => { const t = useT(); const { useStoriesQuery } = useStorytellingFetcher(); + const { useExportProject } = useProjectFetcher(); const { stories } = useStoriesQuery({ sceneId: project?.sceneId }); const [isEditing, setIsEditing] = useState(false); @@ -49,6 +53,18 @@ export default ({ onProjectSelect?.(undefined); }, [onProjectSelect, project.id, selectedProjectId]); + const handleExportProject = useCallback(async () => { + if (!project.id) return; + + const result = await useExportProject(project.id); + + if (result.status === "success") { + console.log("export success"); + } else { + console.error("Failed to export project:", result.status); + } + }, [useExportProject, project.id]); + useEffect(() => { setIsStarred(project.starred); }, [project.starred]); @@ -69,7 +85,8 @@ export default ({ { id: "export", title: t("Export"), - icon: "downloadSimple" + icon: "downloadSimple", + onClick: () => handleExportProject() } ]; diff --git a/web/src/beta/features/Dashboard/ContentsContainer/Projects/hooks.ts b/web/src/beta/features/Dashboard/ContentsContainer/Projects/hooks.ts index 2cb0bc29c4..28fe22d0c3 100644 --- a/web/src/beta/features/Dashboard/ContentsContainer/Projects/hooks.ts +++ b/web/src/beta/features/Dashboard/ContentsContainer/Projects/hooks.ts @@ -38,7 +38,8 @@ export default (workspaceId?: string) => { useProjectsQuery, useUpdateProject, useCreateProject, - useStarredProjectsQuery + useStarredProjectsQuery, + useImportProject } = useProjectFetcher(); const navigate = useNavigate(); @@ -236,6 +237,21 @@ export default (workspaceId?: string) => { }; }, []); + const handleImportProject = useCallback( + async (event: React.ChangeEvent) => { + const file = event.target.files?.[0]; + if (file) { + const result = await useImportProject(file); + if (result.status === "success") { + console.log(result.data); + } else { + console.error("Failed to import project:", result.status); + } + } + }, + [useImportProject] + ); + return { filtedProjects, hasMoreProjects, @@ -259,7 +275,8 @@ export default (workspaceId?: string) => { handleScrollToBottom: onScrollToBottom, handleLayoutChange, handleProjectSortChange, - handleSearch + handleSearch, + handleImportProject }; }; diff --git a/web/src/beta/features/Dashboard/ContentsContainer/Projects/index.tsx b/web/src/beta/features/Dashboard/ContentsContainer/Projects/index.tsx index 40e31faead..54801b3d3a 100644 --- a/web/src/beta/features/Dashboard/ContentsContainer/Projects/index.tsx +++ b/web/src/beta/features/Dashboard/ContentsContainer/Projects/index.tsx @@ -9,7 +9,7 @@ import { import ManagerEmptyContent from "@reearth/beta/ui/components/ManagerBase/ManagerEmptyContent"; import { useT } from "@reearth/services/i18n"; import { styled, useTheme } from "@reearth/services/theme"; -import { FC, useMemo } from "react"; +import { FC, useMemo, useRef } from "react"; import useHooks from "./hooks"; import ProjectGridViewItem from "./Project/ProjectGridViewItem"; @@ -39,7 +39,8 @@ const Projects: FC<{ workspaceId?: string }> = ({ workspaceId }) => { handleScrollToBottom, handleLayoutChange, handleProjectSortChange, - handleSearch + handleSearch, + handleImportProject } = useHooks(workspaceId); const theme = useTheme(); @@ -55,6 +56,8 @@ const Projects: FC<{ workspaceId?: string }> = ({ workspaceId }) => { [t] ); + const fileInputRef = useRef(null); + return ( handleProjectSelect(undefined)}> = ({ workspaceId }) => { managerSize="large" icon="signIn" appearance="secondary" + onClick={() => fileInputRef.current?.click()} + /> + ]} @@ -296,3 +306,7 @@ const LoadingWrapper = styled("div")(() => ({ width: "100%", height: 100 })); + +const HiddenFileInput = styled("input")({ + display: "none" +}); diff --git a/web/src/services/api/projectApi.ts b/web/src/services/api/projectApi.ts index edc392bf22..80f8a4eef1 100644 --- a/web/src/services/api/projectApi.ts +++ b/web/src/services/api/projectApi.ts @@ -21,7 +21,9 @@ import { PUBLISH_PROJECT, UPDATE_PROJECT, UPDATE_PROJECT_ALIAS, - UPDATE_PROJECT_BASIC_AUTH + UPDATE_PROJECT_BASIC_AUTH, + EXPORT_PROJECT, + IMPORT_PROJECT } from "@reearth/services/gql/queries/project"; import { CREATE_SCENE } from "@reearth/services/gql/queries/scene"; import { useT } from "@reearth/services/i18n"; @@ -387,6 +389,76 @@ export default () => { [updateProjectAliasMutation, t, setNotification] ); + const [exportProjectMutation] = useMutation(EXPORT_PROJECT); + const useExportProject = useCallback( + async (projectId: string) => { + if (!projectId) return { status: "error" }; + + const { data, errors } = await exportProjectMutation({ + variables: { projectId } + }); + + if (errors || !data?.exportProject) { + console.log("GraphQL: Failed to export project", errors); + setNotification({ + type: "error", + text: t("Failed to export project.") + }); + + return { status: "error" }; + } + + const projectData = data.exportProject.projectData; + + const blob = new Blob([JSON.stringify(projectData)], { + type: "application/json" + }); + const url = URL.createObjectURL(blob); + const link = document.createElement("a"); + link.href = url; + link.download = `${projectId}.json`; + link.click(); + URL.revokeObjectURL(url); + + setNotification({ + type: "success", + text: t("Successfully exported project!") + }); + return { data: projectData, status: "success" }; + }, + [exportProjectMutation, t, setNotification] + ); + + const [importProjectMutation] = useMutation(IMPORT_PROJECT); + const useImportProject = useCallback( + async (file: File) => { + if (!file) return { status: "error" }; + + const { data, errors } = await importProjectMutation({ + variables: { file } + }); + + if (errors || !data?.importProject) { + console.log("GraphQL: Failed to import project", errors); + setNotification({ + type: "error", + text: t("Failed to import project.") + }); + + return { status: "error" }; + } + + const projectData = data.importProject.projectData; + + setNotification({ + type: "success", + text: t("Successfully imported project!") + }); + return { data: projectData, status: "success" }; + }, + [importProjectMutation, t, setNotification] + ); + return { publishProjectLoading, useProjectQuery, @@ -399,6 +471,8 @@ export default () => { useDeleteProject, useUpdateProjectBasicAuth, useUpdateProjectAlias, - useStarredProjectsQuery + useStarredProjectsQuery, + useExportProject, + useImportProject }; }; diff --git a/web/src/services/gql/__gen__/gql.ts b/web/src/services/gql/__gen__/gql.ts index 54b17ecc6f..04d8ac7a87 100644 --- a/web/src/services/gql/__gen__/gql.ts +++ b/web/src/services/gql/__gen__/gql.ts @@ -60,6 +60,8 @@ const documents = { "\n mutation ArchiveProject($projectId: ID!, $archived: Boolean!) {\n updateProject(input: { projectId: $projectId, archived: $archived }) {\n project {\n id\n isArchived\n }\n }\n }\n": types.ArchiveProjectDocument, "\n mutation DeleteProject($projectId: ID!) {\n deleteProject(input: { projectId: $projectId }) {\n projectId\n }\n }\n": types.DeleteProjectDocument, "\n query GetStarredProjects($teamId: ID!) {\n starredProjects(teamId: $teamId) {\n\t\t\t\tnodes {\n\t\t\t\t\tid\n\t\t\t\t\tname\n\t\t\t\t\tstarred\n scene {\n id\n }\n\t\t\t\t}\n\t\t\t\ttotalCount\n\t\t\t}\n }\n": types.GetStarredProjectsDocument, + "\n mutation ExportProject($projectId: ID!) {\n exportProject(input: { projectId: $projectId }) {\n projectData\n }\n }\n": types.ExportProjectDocument, + "\n mutation ImportProject($file: Upload!) {\n importProject(input: { file: $file }) {\n projectData\n }\n }\n": types.ImportProjectDocument, "\n mutation UpdatePropertyValue(\n $propertyId: ID!\n $schemaGroupId: ID\n $itemId: ID\n $fieldId: ID!\n $value: Any\n $type: ValueType!\n $lang: Lang\n ) {\n updatePropertyValue(\n input: {\n propertyId: $propertyId\n schemaGroupId: $schemaGroupId\n itemId: $itemId\n fieldId: $fieldId\n value: $value\n type: $type\n }\n ) {\n property {\n id\n ...PropertyFragment\n layer {\n id\n ...Layer1Fragment\n }\n }\n }\n }\n": types.UpdatePropertyValueDocument, "\n mutation AddPropertyItem(\n $propertyId: ID!\n $schemaGroupId: ID!\n $lang: Lang\n ) {\n addPropertyItem(\n input: {\n propertyId: $propertyId\n schemaGroupId: $schemaGroupId\n }\n ) {\n property {\n id\n ...PropertyFragment\n layer {\n id\n ...Layer1Fragment\n }\n }\n }\n }\n": types.AddPropertyItemDocument, "\n mutation RemovePropertyItem($propertyId: ID!, $schemaGroupId: ID!, $itemId: ID!, $lang: Lang) {\n removePropertyItem(\n input: { propertyId: $propertyId, schemaGroupId: $schemaGroupId, itemId: $itemId }\n ) {\n property {\n id\n ...PropertyFragment\n layer {\n id\n ...Layer1Fragment\n }\n }\n }\n }\n": types.RemovePropertyItemDocument, @@ -291,6 +293,14 @@ export function gql(source: "\n mutation DeleteProject($projectId: ID!) {\n * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function gql(source: "\n query GetStarredProjects($teamId: ID!) {\n starredProjects(teamId: $teamId) {\n\t\t\t\tnodes {\n\t\t\t\t\tid\n\t\t\t\t\tname\n\t\t\t\t\tstarred\n scene {\n id\n }\n\t\t\t\t}\n\t\t\t\ttotalCount\n\t\t\t}\n }\n"): (typeof documents)["\n query GetStarredProjects($teamId: ID!) {\n starredProjects(teamId: $teamId) {\n\t\t\t\tnodes {\n\t\t\t\t\tid\n\t\t\t\t\tname\n\t\t\t\t\tstarred\n scene {\n id\n }\n\t\t\t\t}\n\t\t\t\ttotalCount\n\t\t\t}\n }\n"]; +/** + * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function gql(source: "\n mutation ExportProject($projectId: ID!) {\n exportProject(input: { projectId: $projectId }) {\n projectData\n }\n }\n"): (typeof documents)["\n mutation ExportProject($projectId: ID!) {\n exportProject(input: { projectId: $projectId }) {\n projectData\n }\n }\n"]; +/** + * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function gql(source: "\n mutation ImportProject($file: Upload!) {\n importProject(input: { file: $file }) {\n projectData\n }\n }\n"): (typeof documents)["\n mutation ImportProject($file: Upload!) {\n importProject(input: { file: $file }) {\n projectData\n }\n }\n"]; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/web/src/services/gql/__gen__/graphql.ts b/web/src/services/gql/__gen__/graphql.ts index a42bd5bc0d..c824bd77a0 100644 --- a/web/src/services/gql/__gen__/graphql.ts +++ b/web/src/services/gql/__gen__/graphql.ts @@ -563,6 +563,7 @@ export type ExportProjectInput = { export type ExportProjectPayload = { __typename?: 'ExportProjectPayload'; projectDataPath: Scalars['String']['output']; + projectData: Scalars['JSON']['output']; }; export type Feature = { @@ -3461,6 +3462,20 @@ export type GetStarredProjectsQueryVariables = Exact<{ export type GetStarredProjectsQuery = { __typename?: 'Query', starredProjects: { __typename?: 'ProjectConnection', totalCount: number, nodes: Array<{ __typename?: 'Project', id: string, name: string, starred: boolean, scene?: { __typename?: 'Scene', id: string } | null } | null> } }; +export type ExportProjectMutationVariables = Exact<{ + projectId: Scalars['ID']['input']; +}>; + + +export type ExportProjectMutation = { __typename?: 'Mutation', exportProject?: { __typename?: 'ExportProjectPayload', projectData: any } | null }; + +export type ImportProjectMutationVariables = Exact<{ + file: Scalars['Upload']['input']; +}>; + + +export type ImportProjectMutation = { __typename?: 'Mutation', importProject?: { __typename?: 'ImportProjectPayload', projectData: any } | null }; + export type UpdatePropertyValueMutationVariables = Exact<{ propertyId: Scalars['ID']['input']; schemaGroupId?: InputMaybe; @@ -3767,6 +3782,8 @@ export const PublishProjectDocument = {"kind":"Document","definitions":[{"kind": export const ArchiveProjectDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ArchiveProject"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"archived"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateProject"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"projectId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"archived"},"value":{"kind":"Variable","name":{"kind":"Name","value":"archived"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"project"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isArchived"}}]}}]}}]}}]} as unknown as DocumentNode; export const DeleteProjectDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteProject"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteProject"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"projectId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"projectId"}}]}}]}}]} as unknown as DocumentNode; export const GetStarredProjectsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetStarredProjects"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"starredProjects"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"starred"}},{"kind":"Field","name":{"kind":"Name","value":"scene"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}}]} as unknown as DocumentNode; +export const ExportProjectDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ExportProject"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exportProject"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"projectId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"projectData"}}]}}]}}]} as unknown as DocumentNode; +export const ImportProjectDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ImportProject"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"file"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Upload"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"importProject"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"file"},"value":{"kind":"Variable","name":{"kind":"Name","value":"file"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"projectData"}}]}}]}}]} as unknown as DocumentNode; export const UpdatePropertyValueDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdatePropertyValue"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"propertyId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"schemaGroupId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"itemId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fieldId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"value"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Any"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"type"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ValueType"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"lang"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Lang"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updatePropertyValue"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"propertyId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"propertyId"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"schemaGroupId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"schemaGroupId"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"itemId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"itemId"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"fieldId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fieldId"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"value"},"value":{"kind":"Variable","name":{"kind":"Name","value":"value"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"type"},"value":{"kind":"Variable","name":{"kind":"Name","value":"type"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFragment"}},{"kind":"Field","name":{"kind":"Name","value":"layer"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"Layer1Fragment"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertyFieldLink"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertyFieldLink"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"datasetId"}},{"kind":"Field","name":{"kind":"Name","value":"datasetSchemaId"}},{"kind":"Field","name":{"kind":"Name","value":"datasetSchemaFieldId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertyFieldFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertyField"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"links"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFieldLink"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertyGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertyGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"schemaGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"fields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFieldFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertyItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertyItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertyGroupList"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"schemaGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"groups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyGroupFragment"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertyGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyGroupFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertyFragmentWithoutSchema"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Property"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertySchemaFieldFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertySchemaField"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fieldId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"translatedTitle"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"lang"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lang"}}}]},{"kind":"Field","name":{"kind":"Name","value":"translatedDescription"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"lang"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lang"}}}]},{"kind":"Field","name":{"kind":"Name","value":"prefix"}},{"kind":"Field","name":{"kind":"Name","value":"suffix"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"ui"}},{"kind":"Field","name":{"kind":"Name","value":"min"}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"choices"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"translatedTitle"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"lang"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lang"}}}]}]}},{"kind":"Field","name":{"kind":"Name","value":"isAvailableIf"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fieldId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertySchemaGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertySchemaGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"schemaGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"collection"}},{"kind":"Field","name":{"kind":"Name","value":"translatedTitle"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"lang"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lang"}}}]},{"kind":"Field","name":{"kind":"Name","value":"isList"}},{"kind":"Field","name":{"kind":"Name","value":"representativeFieldId"}},{"kind":"Field","name":{"kind":"Name","value":"isAvailableIf"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fieldId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"Field","name":{"kind":"Name","value":"fields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertySchemaFieldFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertyFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Property"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFragmentWithoutSchema"}},{"kind":"Field","name":{"kind":"Name","value":"schema"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"groups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertySchemaGroupFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InfoboxFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Infobox"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"propertyId"}},{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"fields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"pluginId"}},{"kind":"Field","name":{"kind":"Name","value":"extensionId"}},{"kind":"Field","name":{"kind":"Name","value":"propertyId"}},{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MergedPropertyGroupCommonFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MergedPropertyGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"schemaGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"fields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fieldId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"actualValue"}},{"kind":"Field","name":{"kind":"Name","value":"overridden"}},{"kind":"Field","name":{"kind":"Name","value":"links"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFieldLink"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MergedPropertyGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MergedPropertyGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyGroupCommonFragment"}},{"kind":"Field","name":{"kind":"Name","value":"groups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyGroupCommonFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MergedPropertyFragmentWithoutSchema"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MergedProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"originalId"}},{"kind":"Field","name":{"kind":"Name","value":"parentId"}},{"kind":"Field","name":{"kind":"Name","value":"linkedDatasetId"}},{"kind":"Field","name":{"kind":"Name","value":"groups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyGroupFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MergedPropertyFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MergedProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyFragmentWithoutSchema"}},{"kind":"Field","name":{"kind":"Name","value":"schema"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MergedInfoboxFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MergedInfobox"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"fields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"originalId"}},{"kind":"Field","name":{"kind":"Name","value":"pluginId"}},{"kind":"Field","name":{"kind":"Name","value":"extensionId"}},{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LayerFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Layer"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"isVisible"}},{"kind":"Field","name":{"kind":"Name","value":"pluginId"}},{"kind":"Field","name":{"kind":"Name","value":"extensionId"}},{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"infobox"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InfoboxFragment"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LayerGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"linkedDatasetSchemaId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LayerItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"linkedDatasetId"}},{"kind":"Field","name":{"kind":"Name","value":"merged"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"parentId"}},{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"infobox"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedInfoboxFragment"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Layer1Fragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Layer"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LayerFragment"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LayerGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"layers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LayerFragment"}}]}}]}}]}}]} as unknown as DocumentNode; export const AddPropertyItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"AddPropertyItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"propertyId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"schemaGroupId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"lang"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Lang"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"addPropertyItem"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"propertyId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"propertyId"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"schemaGroupId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"schemaGroupId"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFragment"}},{"kind":"Field","name":{"kind":"Name","value":"layer"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"Layer1Fragment"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertyFieldLink"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertyFieldLink"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"datasetId"}},{"kind":"Field","name":{"kind":"Name","value":"datasetSchemaId"}},{"kind":"Field","name":{"kind":"Name","value":"datasetSchemaFieldId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertyFieldFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertyField"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"links"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFieldLink"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertyGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertyGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"schemaGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"fields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFieldFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertyItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertyItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertyGroupList"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"schemaGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"groups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyGroupFragment"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertyGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyGroupFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertyFragmentWithoutSchema"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Property"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertySchemaFieldFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertySchemaField"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fieldId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"translatedTitle"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"lang"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lang"}}}]},{"kind":"Field","name":{"kind":"Name","value":"translatedDescription"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"lang"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lang"}}}]},{"kind":"Field","name":{"kind":"Name","value":"prefix"}},{"kind":"Field","name":{"kind":"Name","value":"suffix"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"ui"}},{"kind":"Field","name":{"kind":"Name","value":"min"}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"choices"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"translatedTitle"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"lang"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lang"}}}]}]}},{"kind":"Field","name":{"kind":"Name","value":"isAvailableIf"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fieldId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertySchemaGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertySchemaGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"schemaGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"collection"}},{"kind":"Field","name":{"kind":"Name","value":"translatedTitle"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"lang"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lang"}}}]},{"kind":"Field","name":{"kind":"Name","value":"isList"}},{"kind":"Field","name":{"kind":"Name","value":"representativeFieldId"}},{"kind":"Field","name":{"kind":"Name","value":"isAvailableIf"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fieldId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"Field","name":{"kind":"Name","value":"fields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertySchemaFieldFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertyFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Property"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFragmentWithoutSchema"}},{"kind":"Field","name":{"kind":"Name","value":"schema"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"groups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertySchemaGroupFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InfoboxFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Infobox"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"propertyId"}},{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"fields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"pluginId"}},{"kind":"Field","name":{"kind":"Name","value":"extensionId"}},{"kind":"Field","name":{"kind":"Name","value":"propertyId"}},{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MergedPropertyGroupCommonFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MergedPropertyGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"schemaGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"fields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fieldId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"actualValue"}},{"kind":"Field","name":{"kind":"Name","value":"overridden"}},{"kind":"Field","name":{"kind":"Name","value":"links"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFieldLink"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MergedPropertyGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MergedPropertyGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyGroupCommonFragment"}},{"kind":"Field","name":{"kind":"Name","value":"groups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyGroupCommonFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MergedPropertyFragmentWithoutSchema"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MergedProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"originalId"}},{"kind":"Field","name":{"kind":"Name","value":"parentId"}},{"kind":"Field","name":{"kind":"Name","value":"linkedDatasetId"}},{"kind":"Field","name":{"kind":"Name","value":"groups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyGroupFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MergedPropertyFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MergedProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyFragmentWithoutSchema"}},{"kind":"Field","name":{"kind":"Name","value":"schema"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MergedInfoboxFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MergedInfobox"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"fields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"originalId"}},{"kind":"Field","name":{"kind":"Name","value":"pluginId"}},{"kind":"Field","name":{"kind":"Name","value":"extensionId"}},{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LayerFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Layer"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"isVisible"}},{"kind":"Field","name":{"kind":"Name","value":"pluginId"}},{"kind":"Field","name":{"kind":"Name","value":"extensionId"}},{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"infobox"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InfoboxFragment"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LayerGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"linkedDatasetSchemaId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LayerItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"linkedDatasetId"}},{"kind":"Field","name":{"kind":"Name","value":"merged"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"parentId"}},{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"infobox"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedInfoboxFragment"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Layer1Fragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Layer"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LayerFragment"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LayerGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"layers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LayerFragment"}}]}}]}}]}}]} as unknown as DocumentNode; export const RemovePropertyItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"RemovePropertyItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"propertyId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"schemaGroupId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"itemId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"lang"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Lang"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"removePropertyItem"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"propertyId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"propertyId"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"schemaGroupId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"schemaGroupId"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"itemId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"itemId"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFragment"}},{"kind":"Field","name":{"kind":"Name","value":"layer"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"Layer1Fragment"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertyFieldLink"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertyFieldLink"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"datasetId"}},{"kind":"Field","name":{"kind":"Name","value":"datasetSchemaId"}},{"kind":"Field","name":{"kind":"Name","value":"datasetSchemaFieldId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertyFieldFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertyField"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"links"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFieldLink"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertyGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertyGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"schemaGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"fields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFieldFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertyItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertyItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertyGroupList"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"schemaGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"groups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyGroupFragment"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertyGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyGroupFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertyFragmentWithoutSchema"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Property"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertySchemaFieldFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertySchemaField"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fieldId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"translatedTitle"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"lang"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lang"}}}]},{"kind":"Field","name":{"kind":"Name","value":"translatedDescription"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"lang"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lang"}}}]},{"kind":"Field","name":{"kind":"Name","value":"prefix"}},{"kind":"Field","name":{"kind":"Name","value":"suffix"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"ui"}},{"kind":"Field","name":{"kind":"Name","value":"min"}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"choices"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"translatedTitle"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"lang"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lang"}}}]}]}},{"kind":"Field","name":{"kind":"Name","value":"isAvailableIf"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fieldId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertySchemaGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PropertySchemaGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"schemaGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"collection"}},{"kind":"Field","name":{"kind":"Name","value":"translatedTitle"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"lang"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lang"}}}]},{"kind":"Field","name":{"kind":"Name","value":"isList"}},{"kind":"Field","name":{"kind":"Name","value":"representativeFieldId"}},{"kind":"Field","name":{"kind":"Name","value":"isAvailableIf"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fieldId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"Field","name":{"kind":"Name","value":"fields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertySchemaFieldFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PropertyFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Property"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFragmentWithoutSchema"}},{"kind":"Field","name":{"kind":"Name","value":"schema"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"groups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertySchemaGroupFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InfoboxFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Infobox"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"propertyId"}},{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"fields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"pluginId"}},{"kind":"Field","name":{"kind":"Name","value":"extensionId"}},{"kind":"Field","name":{"kind":"Name","value":"propertyId"}},{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MergedPropertyGroupCommonFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MergedPropertyGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"schemaGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"fields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fieldId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"actualValue"}},{"kind":"Field","name":{"kind":"Name","value":"overridden"}},{"kind":"Field","name":{"kind":"Name","value":"links"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFieldLink"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MergedPropertyGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MergedPropertyGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyGroupCommonFragment"}},{"kind":"Field","name":{"kind":"Name","value":"groups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyGroupCommonFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MergedPropertyFragmentWithoutSchema"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MergedProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"originalId"}},{"kind":"Field","name":{"kind":"Name","value":"parentId"}},{"kind":"Field","name":{"kind":"Name","value":"linkedDatasetId"}},{"kind":"Field","name":{"kind":"Name","value":"groups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyGroupFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MergedPropertyFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MergedProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyFragmentWithoutSchema"}},{"kind":"Field","name":{"kind":"Name","value":"schema"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MergedInfoboxFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MergedInfobox"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"fields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"originalId"}},{"kind":"Field","name":{"kind":"Name","value":"pluginId"}},{"kind":"Field","name":{"kind":"Name","value":"extensionId"}},{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LayerFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Layer"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"isVisible"}},{"kind":"Field","name":{"kind":"Name","value":"pluginId"}},{"kind":"Field","name":{"kind":"Name","value":"extensionId"}},{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"PropertyFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"infobox"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InfoboxFragment"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LayerGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"linkedDatasetSchemaId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LayerItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"linkedDatasetId"}},{"kind":"Field","name":{"kind":"Name","value":"merged"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"parentId"}},{"kind":"Field","name":{"kind":"Name","value":"property"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedPropertyFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"infobox"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MergedInfoboxFragment"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Layer1Fragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Layer"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LayerFragment"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LayerGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"layers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LayerFragment"}}]}}]}}]}}]} as unknown as DocumentNode; diff --git a/web/src/services/gql/queries/project.ts b/web/src/services/gql/queries/project.ts index fcd483c9c6..7269c421be 100644 --- a/web/src/services/gql/queries/project.ts +++ b/web/src/services/gql/queries/project.ts @@ -207,3 +207,19 @@ export const GET_STARRED_PROJECTS = gql(` } } `); + +export const EXPORT_PROJECT = gql(` + mutation ExportProject($projectId: ID!) { + exportProject(input: { projectId: $projectId }) { + projectData + } + } +`); + +export const IMPORT_PROJECT = gql(` + mutation ImportProject($file: Upload!) { + importProject(input: { file: $file }) { + projectData + } + } +`); diff --git a/web/src/services/i18n/translations/en.yml b/web/src/services/i18n/translations/en.yml index 006476dcb7..8387dea21f 100644 --- a/web/src/services/i18n/translations/en.yml +++ b/web/src/services/i18n/translations/en.yml @@ -23,6 +23,8 @@ Last Created: '' First Created: '' Last Updated: '' New Project: '' +Import: '' +Export: '' All projects: '' Search Result for: '' Project Name: '' @@ -353,6 +355,10 @@ Successfully archive project!: '' Successfully unarchived the project. You can now edit this project.: '' Failed to delete project.: '' Successfully delete project!: '' +Failed to export project.: '' +Successfully exported project!: '' +Failed to import project.: '' +Successfully imported project!: '' Failed to update property.: '' Successfully updated the property value!: '' Failed to create story.: '' diff --git a/web/src/services/i18n/translations/ja.yml b/web/src/services/i18n/translations/ja.yml index 9155f40788..c154e3ddb8 100644 --- a/web/src/services/i18n/translations/ja.yml +++ b/web/src/services/i18n/translations/ja.yml @@ -355,6 +355,10 @@ Successfully archive project!: プロジェクトのアーカイブに成功し Successfully unarchived the project. You can now edit this project.: プロジェクトの非編集化が解除されました。このプロジェクトは編集可能です。 Failed to delete project.: プロジェクトの削除に失敗しました。 Successfully delete project!: プロジェクトの削除に成功しました! +Failed to export project.: プロジェクトのエクスポートに失敗しました。 +Successfully exported project!: プロジェクトのエクスポートに成功しました! +Failed to import project.: プロジェクトのインポートに失敗しました。 +Successfully imported project!: プロジェクトのインポートに成功しました! Failed to update property.: プロパティのアップデートに失敗しました。 Successfully updated the property value!: '' Failed to create story.: ストーリーの作成に失敗しました。 From 603dd06e37aac2e02bb287da192d32805c778895 Mon Sep 17 00:00:00 2001 From: m-abe-dev Date: Thu, 26 Sep 2024 11:28:36 +0200 Subject: [PATCH 03/11] update: modal and refetch func for import --- .../Projects/Project/ProjectGridViewItem.tsx | 142 ++++++++++----- .../Projects/Project/ProjectListViewItem.tsx | 164 +++++++++++------- .../Projects/Project/hooks.ts | 20 ++- .../ContentsContainer/Projects/hooks.ts | 6 +- web/src/services/i18n/translations/en.yml | 1 + web/src/services/i18n/translations/ja.yml | 1 + 6 files changed, 220 insertions(+), 114 deletions(-) diff --git a/web/src/beta/features/Dashboard/ContentsContainer/Projects/Project/ProjectGridViewItem.tsx b/web/src/beta/features/Dashboard/ContentsContainer/Projects/Project/ProjectGridViewItem.tsx index 96e3cb0065..84e84d8c95 100644 --- a/web/src/beta/features/Dashboard/ContentsContainer/Projects/Project/ProjectGridViewItem.tsx +++ b/web/src/beta/features/Dashboard/ContentsContainer/Projects/Project/ProjectGridViewItem.tsx @@ -1,6 +1,13 @@ -import { Button, PopupMenu, TextInput } from "@reearth/beta/lib/reearth-ui"; +import { + Button, + PopupMenu, + TextInput, + Modal, + ModalPanel +} from "@reearth/beta/lib/reearth-ui"; +import { useT } from "@reearth/services/i18n"; import { styled, useTheme } from "@reearth/services/theme"; -import { FC } from "react"; +import { FC, useMemo } from "react"; import useHooks from "./hooks"; import { ProjectProps } from "./types"; @@ -12,6 +19,7 @@ const ProjectGridViewItem: FC = ({ onProjectSelect, onProjectUpdate }) => { + const t = useT(); const theme = useTheme(); const { @@ -25,7 +33,10 @@ const ProjectGridViewItem: FC = ({ handleProjectNameBlur, handleProjectHover, handleProjectNameDoubleClick, - handleProjectStarClick + handleProjectStarClick, + exportModalVisible, + closeExportModal, + handleExportProject } = useHooks({ project, selectedProjectId, @@ -33,56 +44,86 @@ const ProjectGridViewItem: FC = ({ onProjectSelect }); + const actions = useMemo( + () => ( + <> +