From 315f4a3102a2e4b69cfcb8aff84e26671d266389 Mon Sep 17 00:00:00 2001 From: ecarreras <294235+ecarreras@users.noreply.github.com> Date: Fri, 29 Nov 2024 00:06:59 +0000 Subject: [PATCH] feat: sync changes from v2 to alpha --- package-lock.json | 12 ++++++------ package.json | 4 ++-- src/index.ts | 2 ++ src/widgets/WidgetFactory.tsx | 3 +++ src/widgets/custom/Spinner.tsx | 19 +++++++++++++++++++ 5 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 src/widgets/custom/Spinner.tsx diff --git a/package-lock.json b/package-lock.json index 3900039e..05cdb3f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "@gisce/react-ooui", - "version": "2.41.0", + "version": "2.42.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@gisce/react-ooui", - "version": "2.41.0", + "version": "2.42.0", "dependencies": { "@ant-design/plots": "^1.0.9", "@gisce/fiber-diagram": "2.1.1", - "@gisce/ooui": "2.19.0", + "@gisce/ooui": "2.20.0", "@gisce/react-formiga-components": "1.8.0", "@gisce/react-formiga-table": "1.9.0-alpha.8", "@monaco-editor/react": "^4.4.5", @@ -3370,9 +3370,9 @@ } }, "node_modules/@gisce/ooui": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/@gisce/ooui/-/ooui-2.19.0.tgz", - "integrity": "sha512-zG5Ta8I/sBCiKpjfs05rPo8z/9mhuHvG4qiaZiqIxvtcTAdi7HY9a6hEJLKx4wfexisR+bl8/uxiSiDmc/YiQw==", + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/@gisce/ooui/-/ooui-2.20.0.tgz", + "integrity": "sha512-IeoZ55dM7vwVebUtLm2oxSCbGbKwxEYCjl7PO6ZAlpjvtWyXy7dVHLo+fT/90gnAO1XlT6sCRCORJhtbGy5d9A==", "dependencies": { "@gisce/conscheck": "1.0.9", "html-entities": "^2.3.3", diff --git a/package.json b/package.json index 48ef1610..c358b6c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gisce/react-ooui", - "version": "2.41.0", + "version": "2.42.0", "engines": { "node": "20.5.0" }, @@ -35,7 +35,7 @@ "dependencies": { "@ant-design/plots": "^1.0.9", "@gisce/fiber-diagram": "2.1.1", - "@gisce/ooui": "2.19.0", + "@gisce/ooui": "2.20.0", "@gisce/react-formiga-components": "1.8.0", "@gisce/react-formiga-table": "1.9.0-alpha.8", "@monaco-editor/react": "^4.4.5", diff --git a/src/index.ts b/src/index.ts index 4b064b4d..73a04642 100644 --- a/src/index.ts +++ b/src/index.ts @@ -51,6 +51,7 @@ import { HTMLPreview } from "@/widgets/custom/HTMLPreview"; import { Alert } from "@/widgets/custom/Alert"; import { DashboardGrid } from "@/widgets/views/DashboardGrid"; import { GraphIndicator } from "@/widgets/views/Graph/GraphIndicator"; +import { Spinner } from "@/widgets/custom/Spinner"; import type { TreeView, @@ -177,4 +178,5 @@ export { HTMLPreview, Alert, dayjs, + Spinner, }; diff --git a/src/widgets/WidgetFactory.tsx b/src/widgets/WidgetFactory.tsx index c404296c..ccb9564b 100644 --- a/src/widgets/WidgetFactory.tsx +++ b/src/widgets/WidgetFactory.tsx @@ -35,6 +35,7 @@ import { CommentsTimelineField, HTMLPreview, Alert, + Spinner, } from "@/index"; import { Image } from "./base/Image"; import { FiberGrid } from "./custom/FiberGrid"; @@ -130,6 +131,8 @@ const getWidgetType = (type: string) => { return HTMLPreview; case "alert": return Alert; + case "spinner": + return Spinner; default: return undefined; } diff --git a/src/widgets/custom/Spinner.tsx b/src/widgets/custom/Spinner.tsx new file mode 100644 index 00000000..4d9cbc63 --- /dev/null +++ b/src/widgets/custom/Spinner.tsx @@ -0,0 +1,19 @@ +import React from "react"; +import { WidgetProps } from "@/types"; +import { Spinner as SpinnerOoui } from "@gisce/ooui"; +import { Spin } from "antd"; +import Container from "@/widgets/containers/Container"; + +type SpinnerProps = WidgetProps & { + ooui: SpinnerOoui; +}; + +export const Spinner = (props: SpinnerProps) => { + const { ooui } = props; + + return ( + + + + ); +};