Skip to content

Commit

Permalink
feat: sync changes from v2 to v2-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ecarreras authored and github-actions[bot] committed Nov 29, 2024
1 parent 8db3627 commit 35522bd
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 8 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gisce/react-ooui",
"version": "2.41.0",
"version": "2.42.0",
"engines": {
"node": "20.5.0"
},
Expand Down Expand Up @@ -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.8.5",
"@monaco-editor/react": "^4.4.5",
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -177,4 +178,5 @@ export {
HTMLPreview,
Alert,
dayjs,
Spinner,
};
3 changes: 3 additions & 0 deletions src/widgets/WidgetFactory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import {
CommentsTimelineField,
HTMLPreview,
Alert,
Spinner,
} from "@/index";
import { Image } from "./base/Image";
import { FiberGrid } from "./custom/FiberGrid";
Expand Down Expand Up @@ -130,6 +131,8 @@ const getWidgetType = (type: string) => {
return HTMLPreview;
case "alert":
return Alert;
case "spinner":
return Spinner;
default:
return undefined;
}
Expand Down
19 changes: 19 additions & 0 deletions src/widgets/custom/Spinner.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<Spin tip={ooui.label} size="large" spinning={ooui.loading}>
<Container container={ooui.container} responsiveBehaviour={false} />
</Spin>
);
};

0 comments on commit 35522bd

Please sign in to comment.