@next-bricks/data-view 0.1.1 → 0.3.0
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/bricks.json +19 -2
- package/dist/chunks/{1646.c6fb10b9.js → 1646.840ff4cb.js} +2 -2
- package/dist/chunks/1646.840ff4cb.js.map +1 -0
- package/dist/chunks/2323.d18e8952.js +2 -0
- package/dist/chunks/2323.d18e8952.js.map +1 -0
- package/dist/chunks/2618.68a01967.js +2 -0
- package/dist/chunks/2618.68a01967.js.map +1 -0
- package/dist/chunks/2916.949ccbac.js +2 -0
- package/dist/chunks/2916.949ccbac.js.map +1 -0
- package/dist/chunks/{3494.7601f52b.js → 3494.d359914f.js} +2 -2
- package/dist/chunks/{3494.7601f52b.js.map → 3494.d359914f.js.map} +1 -1
- package/dist/chunks/353.379af925.js +2 -0
- package/dist/chunks/{353.ff1b1400.js.map → 353.379af925.js.map} +1 -1
- package/dist/chunks/4454.3c78522e.js +2 -0
- package/dist/chunks/4454.3c78522e.js.map +1 -0
- package/dist/chunks/4512.a6f07874.js +2 -0
- package/dist/chunks/{4512.72dd7711.js.map → 4512.a6f07874.js.map} +1 -1
- package/dist/chunks/4728.fb9d912a.js +2 -0
- package/dist/chunks/4728.fb9d912a.js.map +1 -0
- package/dist/chunks/4791.3791c567.js +2 -0
- package/dist/chunks/4791.3791c567.js.map +1 -0
- package/dist/chunks/5151.f76b1f6a.js +2 -0
- package/dist/chunks/5151.f76b1f6a.js.map +1 -0
- package/dist/chunks/5636.6a5194f2.js +2 -0
- package/dist/chunks/5636.6a5194f2.js.map +1 -0
- package/dist/chunks/5746.0603bcc0.js +3 -0
- package/dist/chunks/5746.0603bcc0.js.map +1 -0
- package/dist/chunks/6205.ad762e76.js +2 -0
- package/dist/chunks/{6205.43fcf1c2.js.map → 6205.ad762e76.js.map} +1 -1
- package/dist/chunks/7164.679a698f.js +2 -0
- package/dist/chunks/{7164.2ccb4fce.js.map → 7164.679a698f.js.map} +1 -1
- package/dist/chunks/7746.ad47a983.js +2 -0
- package/dist/chunks/7746.ad47a983.js.map +1 -0
- package/dist/chunks/{7822.7e6f7627.js → 7822.4a63fdd3.js} +2 -2
- package/dist/chunks/{7822.7e6f7627.js.map → 7822.4a63fdd3.js.map} +1 -1
- package/dist/chunks/{7915.0bf6d068.js → 7915.f3e0ede9.js} +2 -2
- package/dist/chunks/{7915.0bf6d068.js.map → 7915.f3e0ede9.js.map} +1 -1
- package/dist/chunks/{8008.00ab7560.js → 8008.a58de07d.js} +3 -3
- package/dist/chunks/{8008.00ab7560.js.map → 8008.a58de07d.js.map} +1 -1
- package/dist/chunks/8196.667392f2.js +2 -0
- package/dist/chunks/8196.667392f2.js.map +1 -0
- package/dist/chunks/873.b84ce056.js +2 -0
- package/dist/chunks/873.b84ce056.js.map +1 -0
- package/dist/chunks/8843.dcd562e8.js +3 -0
- package/dist/chunks/8843.dcd562e8.js.map +1 -0
- package/dist/chunks/app-wall-card-item.74fb1221.js +3 -0
- package/dist/chunks/app-wall-card-item.74fb1221.js.map +1 -0
- package/dist/chunks/app-wall-relation-line.ff4dd4fc.js +3 -0
- package/dist/chunks/app-wall-relation-line.ff4dd4fc.js.LICENSE.txt +5 -0
- package/dist/chunks/app-wall-relation-line.ff4dd4fc.js.map +1 -0
- package/dist/chunks/app-wall-system-card.331f8176.js +3 -0
- package/dist/chunks/app-wall-system-card.331f8176.js.LICENSE.txt +5 -0
- package/dist/chunks/app-wall-system-card.331f8176.js.map +1 -0
- package/dist/chunks/battery-chart.658a3780.js +2 -0
- package/dist/chunks/battery-chart.658a3780.js.map +1 -0
- package/dist/chunks/complex-search.c4405533.js +2 -0
- package/dist/chunks/complex-search.c4405533.js.map +1 -0
- package/dist/chunks/dropdown-menu.43f26f9a.js +3 -0
- package/dist/chunks/dropdown-menu.43f26f9a.js.LICENSE.txt +5 -0
- package/dist/chunks/dropdown-menu.43f26f9a.js.map +1 -0
- package/dist/chunks/gauge-chart.0ae3f129.js +2 -0
- package/dist/chunks/{gauge-chart.1f452553.js.map → gauge-chart.0ae3f129.js.map} +1 -1
- package/dist/chunks/loading-panel.c495be3f.js +2 -0
- package/dist/chunks/loading-panel.c495be3f.js.map +1 -0
- package/dist/chunks/main.8488fbc4.js +2 -0
- package/dist/chunks/main.8488fbc4.js.map +1 -0
- package/dist/chunks/modern-style-component-title.389445d4.js +2 -0
- package/dist/chunks/modern-style-component-title.389445d4.js.map +1 -0
- package/dist/chunks/modern-style-page-title.ca489473.js +2 -0
- package/dist/chunks/modern-style-page-title.ca489473.js.map +1 -0
- package/dist/chunks/modern-style-treemap.8cfc03bf.js +2 -0
- package/dist/chunks/modern-style-treemap.8cfc03bf.js.map +1 -0
- package/dist/chunks/particle-animation.39f3cafa.js +2 -0
- package/dist/chunks/particle-animation.39f3cafa.js.map +1 -0
- package/dist/chunks/tabs-drawer.9ae3c94a.js +3 -0
- package/dist/chunks/tabs-drawer.9ae3c94a.js.LICENSE.txt +5 -0
- package/dist/chunks/{tabs-drawer.8f87a1b2.js.map → tabs-drawer.9ae3c94a.js.map} +1 -1
- package/dist/images/6d954a25.png +0 -0
- package/dist/index.710e5862.js +2 -0
- package/dist/index.710e5862.js.map +1 -0
- package/dist-types/app-wall/card-item/index.d.ts +40 -0
- package/dist-types/app-wall/card-item/index.spec.d.ts +1 -0
- package/dist-types/app-wall/relation-line/index.d.ts +24 -0
- package/dist-types/app-wall/relation-line/index.spec.d.ts +1 -0
- package/dist-types/app-wall/system-card/index.d.ts +75 -0
- package/dist-types/app-wall/system-card/index.spec.d.ts +1 -0
- package/dist-types/bootstrap.d.ts +7 -0
- package/dist-types/complex-search/i18n.d.ts +12 -0
- package/dist-types/complex-search/index.d.ts +73 -0
- package/dist-types/complex-search/index.spec.d.ts +1 -0
- package/dist-types/dropdown-menu/index.d.ts +49 -0
- package/dist-types/dropdown-menu/index.spec.d.ts +1 -0
- package/dist-types/hooks/index.d.ts +1 -0
- package/dist-types/hooks/usePrevious/index.d.ts +1 -0
- package/dist-types/hooks/usePrevious/usePrevious.spec.d.ts +1 -0
- package/dist-types/loading-panel/index.d.ts +60 -0
- package/dist-types/loading-panel/index.spec.d.ts +1 -0
- package/dist-types/modern-style-treemap/index.d.ts +14 -6
- package/dist-types/particle-animation/index.d.ts +38 -0
- package/dist-types/particle-animation/index.spec.d.ts +1 -0
- package/dist-types/utils/debounceByAnimationFrame.d.ts +4 -0
- package/dist-types/utils/debounceByAnimationFrame.spec.d.ts +1 -0
- package/package.json +13 -12
- package/dist/chunks/1646.c6fb10b9.js.map +0 -1
- package/dist/chunks/2241.761c67f5.js +0 -3
- package/dist/chunks/2241.761c67f5.js.map +0 -1
- package/dist/chunks/2323.5185fa60.js +0 -2
- package/dist/chunks/2323.5185fa60.js.map +0 -1
- package/dist/chunks/2993.e6502630.js +0 -2
- package/dist/chunks/2993.e6502630.js.map +0 -1
- package/dist/chunks/353.ff1b1400.js +0 -2
- package/dist/chunks/4454.25db2c7a.js +0 -2
- package/dist/chunks/4454.25db2c7a.js.map +0 -1
- package/dist/chunks/4512.72dd7711.js +0 -2
- package/dist/chunks/4728.b40327c9.js +0 -2
- package/dist/chunks/4728.b40327c9.js.map +0 -1
- package/dist/chunks/5151.f19f99d2.js +0 -2
- package/dist/chunks/5151.f19f99d2.js.map +0 -1
- package/dist/chunks/5603.39981534.js +0 -2
- package/dist/chunks/5603.39981534.js.map +0 -1
- package/dist/chunks/6173.9d8d57ea.js +0 -3
- package/dist/chunks/6173.9d8d57ea.js.map +0 -1
- package/dist/chunks/6205.43fcf1c2.js +0 -2
- package/dist/chunks/7164.2ccb4fce.js +0 -2
- package/dist/chunks/7746.2d8b6f17.js +0 -2
- package/dist/chunks/7746.2d8b6f17.js.map +0 -1
- package/dist/chunks/873.58c2e4d7.js +0 -2
- package/dist/chunks/873.58c2e4d7.js.map +0 -1
- package/dist/chunks/battery-chart.02988af9.js +0 -2
- package/dist/chunks/battery-chart.02988af9.js.map +0 -1
- package/dist/chunks/gauge-chart.1f452553.js +0 -2
- package/dist/chunks/main.0455b6ae.js +0 -2
- package/dist/chunks/main.0455b6ae.js.map +0 -1
- package/dist/chunks/modern-style-component-title.17b744e0.js +0 -2
- package/dist/chunks/modern-style-component-title.17b744e0.js.map +0 -1
- package/dist/chunks/modern-style-page-title.ae7b75cb.js +0 -2
- package/dist/chunks/modern-style-page-title.ae7b75cb.js.map +0 -1
- package/dist/chunks/modern-style-treemap.db14f864.js +0 -2
- package/dist/chunks/modern-style-treemap.db14f864.js.map +0 -1
- package/dist/chunks/tabs-drawer.8f87a1b2.js +0 -3
- package/dist/index.364eb559.js +0 -2
- package/dist/index.364eb559.js.map +0 -1
- /package/dist/chunks/{6173.9d8d57ea.js.LICENSE.txt → 5746.0603bcc0.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{8008.00ab7560.js.LICENSE.txt → 8008.a58de07d.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{2241.761c67f5.js.LICENSE.txt → 8843.dcd562e8.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{tabs-drawer.8f87a1b2.js.LICENSE.txt → app-wall-card-item.74fb1221.js.LICENSE.txt} +0 -0
- /package/dist/{f3856ac6.svg → images/f3856ac6.svg} +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
type StatusType = "normal" | "warning";
|
|
4
|
+
interface DescriptionItem {
|
|
5
|
+
key: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
interface SystemCardProps {
|
|
9
|
+
status: StatusType;
|
|
10
|
+
cardTitle: string | undefined;
|
|
11
|
+
itemList?: DescriptionItem[];
|
|
12
|
+
buttonName?: string;
|
|
13
|
+
handleClick?: () => void;
|
|
14
|
+
containerStyle?: React.CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @id data-view.app-wall-system-card
|
|
18
|
+
* @name data-view.app-wall-system-card
|
|
19
|
+
* @docKind brick
|
|
20
|
+
* @description
|
|
21
|
+
* @author astrid
|
|
22
|
+
* @noInheritDoc
|
|
23
|
+
*/
|
|
24
|
+
declare class SystemCard extends ReactNextElement implements SystemCardProps {
|
|
25
|
+
#private;
|
|
26
|
+
/**
|
|
27
|
+
* @kind StatusType
|
|
28
|
+
* @required true
|
|
29
|
+
* @default normal
|
|
30
|
+
* @description 卡片状态
|
|
31
|
+
* @enums
|
|
32
|
+
* @group basic
|
|
33
|
+
*/
|
|
34
|
+
accessor status: StatusType;
|
|
35
|
+
/**
|
|
36
|
+
* @kind string
|
|
37
|
+
* @required -
|
|
38
|
+
* @default -
|
|
39
|
+
* @description 卡片标题
|
|
40
|
+
* @enums
|
|
41
|
+
* @group basic
|
|
42
|
+
*/
|
|
43
|
+
accessor cardTitle: string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* @kind DescriptionItem[]
|
|
46
|
+
* @required false
|
|
47
|
+
* @default -
|
|
48
|
+
* @description 卡片信息数据
|
|
49
|
+
* @enums
|
|
50
|
+
* @group basic
|
|
51
|
+
*/
|
|
52
|
+
accessor itemList: DescriptionItem[];
|
|
53
|
+
/**
|
|
54
|
+
* @kind string
|
|
55
|
+
* @required -
|
|
56
|
+
* @default -
|
|
57
|
+
* @description 按钮名称
|
|
58
|
+
* @enums
|
|
59
|
+
* @group basic
|
|
60
|
+
*/
|
|
61
|
+
accessor buttonName: string | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* @kind React.CSSProperties
|
|
64
|
+
* @required -
|
|
65
|
+
* @default -
|
|
66
|
+
* @description 外层容器样式
|
|
67
|
+
* @enums
|
|
68
|
+
* @group basic
|
|
69
|
+
*/
|
|
70
|
+
accessor containerStyle: React.CSSProperties;
|
|
71
|
+
handleClick: () => void;
|
|
72
|
+
render(): React.ReactNode;
|
|
73
|
+
}
|
|
74
|
+
export declare function SystemCardComponent(props: SystemCardProps): React.ReactElement;
|
|
75
|
+
export { SystemCard };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.js";
|
|
@@ -4,3 +4,10 @@ import "./modern-style-page-title/index.js";
|
|
|
4
4
|
import "./tabs-drawer/index.js";
|
|
5
5
|
import "./modern-style-treemap/index.js";
|
|
6
6
|
import "./battery-chart/index.js";
|
|
7
|
+
import "./dropdown-menu/index.js";
|
|
8
|
+
import "./complex-search/index.js";
|
|
9
|
+
import "./loading-panel/index.js";
|
|
10
|
+
import "./particle-animation/index.js";
|
|
11
|
+
import "./app-wall/card-item/index.js";
|
|
12
|
+
import "./app-wall/system-card/index.js";
|
|
13
|
+
import "./app-wall/relation-line/index.js";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
import type { GeneralIconProps } from "@next-bricks/icons/general-icon";
|
|
4
|
+
import { ReactUseMultipleBricksProps } from "@next-core/react-runtime";
|
|
5
|
+
export interface OptionItem {
|
|
6
|
+
icon: GeneralIconProps;
|
|
7
|
+
name: string;
|
|
8
|
+
[propName: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
interface ComplexSearchProps {
|
|
11
|
+
options?: OptionItem[];
|
|
12
|
+
value?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
onInputChange?: (value: string) => void;
|
|
15
|
+
onSearch?: (value: string) => void;
|
|
16
|
+
onFocus?: () => void;
|
|
17
|
+
onBlur?: () => void;
|
|
18
|
+
tooltipUseBrick?: ReactUseMultipleBricksProps;
|
|
19
|
+
onSelect?: (data: OptionItem) => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @id data-view.complex-search
|
|
23
|
+
* @name data-view.complex-search
|
|
24
|
+
* @docKind brick
|
|
25
|
+
* @description 大屏搜索构件
|
|
26
|
+
* @author astrid
|
|
27
|
+
* @noInheritDoc
|
|
28
|
+
*/
|
|
29
|
+
declare class ComplexSearch extends ReactNextElement implements ComplexSearchProps {
|
|
30
|
+
#private;
|
|
31
|
+
/**
|
|
32
|
+
* @kind string
|
|
33
|
+
* @required false
|
|
34
|
+
* @default default
|
|
35
|
+
* @description 初始值
|
|
36
|
+
* @enums
|
|
37
|
+
* @group basic
|
|
38
|
+
*/
|
|
39
|
+
accessor value: string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* @kind string
|
|
42
|
+
* @required false
|
|
43
|
+
* @default default
|
|
44
|
+
* @description 占位符
|
|
45
|
+
* @enums
|
|
46
|
+
* @group basic
|
|
47
|
+
*/
|
|
48
|
+
accessor placeholder: string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* @kind OptionItem[]
|
|
51
|
+
* @required false
|
|
52
|
+
* @default default
|
|
53
|
+
* @description 下拉选项
|
|
54
|
+
* @enums
|
|
55
|
+
* @group basic
|
|
56
|
+
*/
|
|
57
|
+
accessor options: OptionItem[];
|
|
58
|
+
/**
|
|
59
|
+
* @kind ReactUseMultipleBricksProps
|
|
60
|
+
* @required false
|
|
61
|
+
* @default -
|
|
62
|
+
* @description tooltip useBrick
|
|
63
|
+
*/
|
|
64
|
+
accessor tooltipUseBrick: ReactUseMultipleBricksProps;
|
|
65
|
+
handleInputChange: (value: string) => void;
|
|
66
|
+
handleSearch: (value: string) => void;
|
|
67
|
+
handleFocus: () => void;
|
|
68
|
+
handleBlur: () => void;
|
|
69
|
+
handleSelect: (data: OptionItem) => void;
|
|
70
|
+
render(): React.ReactNode;
|
|
71
|
+
}
|
|
72
|
+
export declare function ComplexSearchComponent(props: ComplexSearchProps): React.ReactElement;
|
|
73
|
+
export { ComplexSearch };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.jsx";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
interface DropdownMenuProps {
|
|
4
|
+
curElement?: HTMLElement;
|
|
5
|
+
options?: {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}[];
|
|
9
|
+
value?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
onChange?: (value: string) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @id data-view.dropdown-menu
|
|
15
|
+
* @name data-view.dropdown-menu
|
|
16
|
+
* @docKind brick
|
|
17
|
+
* @description 基础下拉菜单
|
|
18
|
+
* @author nlicroshan
|
|
19
|
+
* @noInheritDoc
|
|
20
|
+
*/
|
|
21
|
+
declare class DropdownMenu extends ReactNextElement implements DropdownMenuProps {
|
|
22
|
+
#private;
|
|
23
|
+
/**
|
|
24
|
+
* @kind { label: string, value: string }[]
|
|
25
|
+
* @required false
|
|
26
|
+
* @default
|
|
27
|
+
* @description 候选项
|
|
28
|
+
*/
|
|
29
|
+
accessor options: {
|
|
30
|
+
label: string;
|
|
31
|
+
value: string;
|
|
32
|
+
}[];
|
|
33
|
+
/**
|
|
34
|
+
* @kind string
|
|
35
|
+
* @required false
|
|
36
|
+
* @default
|
|
37
|
+
* @description 值
|
|
38
|
+
*/
|
|
39
|
+
accessor value: string;
|
|
40
|
+
/**
|
|
41
|
+
* @kind string
|
|
42
|
+
* @required false
|
|
43
|
+
* @default
|
|
44
|
+
* @description 占位符
|
|
45
|
+
*/
|
|
46
|
+
accessor placeholder: string;
|
|
47
|
+
render(): JSX.Element;
|
|
48
|
+
}
|
|
49
|
+
export { DropdownMenu };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.jsx";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function usePrevious<T>(data?: T): T | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
interface LoadingPanelProps {
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
customTitle?: string;
|
|
6
|
+
progress?: number;
|
|
7
|
+
useRealTimeProgress?: boolean;
|
|
8
|
+
intervalTime?: number;
|
|
9
|
+
onEnd?: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @id data-view.loading-panel
|
|
13
|
+
* @name data-view.loading-panel
|
|
14
|
+
* @docKind brick
|
|
15
|
+
* @description 大屏加载模块展示
|
|
16
|
+
* @author astrid
|
|
17
|
+
* @noInheritDoc
|
|
18
|
+
*/
|
|
19
|
+
declare class LoadingPanel extends ReactNextElement implements LoadingPanelProps {
|
|
20
|
+
#private;
|
|
21
|
+
/**
|
|
22
|
+
* @kind string
|
|
23
|
+
* @default -
|
|
24
|
+
* @required false
|
|
25
|
+
* @description 标题
|
|
26
|
+
*/
|
|
27
|
+
accessor customTitle: string;
|
|
28
|
+
/**
|
|
29
|
+
* @kind boolean
|
|
30
|
+
* @default true
|
|
31
|
+
* @required false
|
|
32
|
+
* @description 是否加载中, 虚拟数据模拟加载过程
|
|
33
|
+
*/
|
|
34
|
+
accessor loading: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* @kind boolean
|
|
37
|
+
* @default false
|
|
38
|
+
* @required false
|
|
39
|
+
* @description 加载过程是否使用真实数据
|
|
40
|
+
*/
|
|
41
|
+
accessor useRealTimeProgress: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* @kind number
|
|
44
|
+
* @default -
|
|
45
|
+
* @required false
|
|
46
|
+
* @description 加载进度,区间[0-100]; 真实数据
|
|
47
|
+
*/
|
|
48
|
+
accessor progress: number;
|
|
49
|
+
/**
|
|
50
|
+
* @kind number
|
|
51
|
+
* @default -
|
|
52
|
+
* @required 100
|
|
53
|
+
* @description 每次加载变化的时间间隔,单位ms
|
|
54
|
+
*/
|
|
55
|
+
accessor intervalTime: number;
|
|
56
|
+
onEnd: () => void;
|
|
57
|
+
render(): React.ReactNode;
|
|
58
|
+
}
|
|
59
|
+
export declare function LoadingPanelComponent(props: LoadingPanelProps): React.ReactElement;
|
|
60
|
+
export { LoadingPanel };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.js";
|
|
@@ -17,9 +17,13 @@ type TreemapData = {
|
|
|
17
17
|
interface ModernStyleTreemapProps {
|
|
18
18
|
data: TreemapData;
|
|
19
19
|
tail?: TailTypes;
|
|
20
|
-
leafUseBrick?:
|
|
20
|
+
leafUseBrick?: {
|
|
21
|
+
useBrick: UseBrickConf;
|
|
22
|
+
};
|
|
21
23
|
leafContainerStyle?: CSSProperties;
|
|
22
|
-
tooltipUseBrick?:
|
|
24
|
+
tooltipUseBrick?: {
|
|
25
|
+
useBrick: UseBrickConf;
|
|
26
|
+
};
|
|
23
27
|
tooltipStyle?: CSSProperties;
|
|
24
28
|
}
|
|
25
29
|
/**
|
|
@@ -46,12 +50,14 @@ declare class ModernStyleTreemap extends ReactNextElement implements ModernStyle
|
|
|
46
50
|
*/
|
|
47
51
|
accessor tail: TailTypes;
|
|
48
52
|
/**
|
|
49
|
-
* @kind UseBrickConf
|
|
53
|
+
* @kind { useBrick: UseBrickConf }
|
|
50
54
|
* @required false
|
|
51
55
|
* @default -
|
|
52
56
|
* @description 叶子节点useBrick
|
|
53
57
|
*/
|
|
54
|
-
accessor leafUseBrick:
|
|
58
|
+
accessor leafUseBrick: {
|
|
59
|
+
useBrick: UseBrickConf;
|
|
60
|
+
};
|
|
55
61
|
/**
|
|
56
62
|
* @kind CSSProperties
|
|
57
63
|
* @required false
|
|
@@ -60,12 +66,14 @@ declare class ModernStyleTreemap extends ReactNextElement implements ModernStyle
|
|
|
60
66
|
*/
|
|
61
67
|
accessor leafContainerStyle: CSSProperties;
|
|
62
68
|
/**
|
|
63
|
-
* @kind UseBrickConf
|
|
69
|
+
* @kind { useBrick: UseBrickConf }
|
|
64
70
|
* @required false
|
|
65
71
|
* @default -
|
|
66
72
|
* @description tooltip useBrick
|
|
67
73
|
*/
|
|
68
|
-
accessor tooltipUseBrick:
|
|
74
|
+
accessor tooltipUseBrick: {
|
|
75
|
+
useBrick: UseBrickConf;
|
|
76
|
+
};
|
|
69
77
|
/**
|
|
70
78
|
* @kind CSSProperties
|
|
71
79
|
* @required false
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
export interface ColorType {
|
|
4
|
+
startColor: React.CSSProperties["color"];
|
|
5
|
+
middleColor: React.CSSProperties["color"];
|
|
6
|
+
endColor: React.CSSProperties["color"];
|
|
7
|
+
}
|
|
8
|
+
interface ParticleAnimationProps {
|
|
9
|
+
colors: ColorType;
|
|
10
|
+
containerStyle?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @id data-view.particle-animation
|
|
14
|
+
* @name data-view.particle-animation
|
|
15
|
+
* @docKind brick
|
|
16
|
+
* @description 大屏粒子加载动效
|
|
17
|
+
* @author astrid
|
|
18
|
+
* @noInheritDoc
|
|
19
|
+
*/
|
|
20
|
+
declare class ParticleAnimation extends ReactNextElement implements ParticleAnimationProps {
|
|
21
|
+
/**
|
|
22
|
+
* @kind ColorType
|
|
23
|
+
* @default -
|
|
24
|
+
* @required true
|
|
25
|
+
* @description 颜色配置,由于光标有三段颜色,中间色段为也为特效中光点的颜色
|
|
26
|
+
*/
|
|
27
|
+
accessor colors: ColorType;
|
|
28
|
+
/**
|
|
29
|
+
* @kind React.CSSProperties
|
|
30
|
+
* @default -
|
|
31
|
+
* @required false
|
|
32
|
+
* @description 容器样式
|
|
33
|
+
*/
|
|
34
|
+
accessor containerStyle: React.CSSProperties;
|
|
35
|
+
render(): React.ReactNode;
|
|
36
|
+
}
|
|
37
|
+
export declare function ParticleAnimationComponent(props: ParticleAnimationProps): React.ReactElement;
|
|
38
|
+
export { ParticleAnimation };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.jsx";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/data-view",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"homepage": "https://github.com/easyops-cn/next-
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/data-view",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git@github.com:easyops-cn/next-
|
|
7
|
+
"url": "git@github.com:easyops-cn/next-bricks.git"
|
|
8
8
|
},
|
|
9
9
|
"license": "GPL-3.0",
|
|
10
10
|
"type": "module",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"exports": {
|
|
27
27
|
"./package.json": "./package.json",
|
|
28
|
+
"./dist/bricks.json": "./dist/bricks.json",
|
|
28
29
|
"./*": {
|
|
29
30
|
"types": "./dist-types/*/index.d.ts"
|
|
30
31
|
}
|
|
@@ -38,21 +39,21 @@
|
|
|
38
39
|
"test:ci": "cross-env NODE_ENV='test' CI=true test-next"
|
|
39
40
|
},
|
|
40
41
|
"dependencies": {
|
|
41
|
-
"@next-bricks/icons": "^0.
|
|
42
|
-
"@next-core/element": "^1.0.
|
|
43
|
-
"@next-core/i18n": "^1.0.
|
|
44
|
-
"@next-core/react-element": "^1.0.
|
|
45
|
-
"@next-core/types": "^1.0
|
|
46
|
-
"@next-core/utils": "^1.
|
|
42
|
+
"@next-bricks/icons": "^0.1.1",
|
|
43
|
+
"@next-core/element": "^1.0.4",
|
|
44
|
+
"@next-core/i18n": "^1.0.8",
|
|
45
|
+
"@next-core/react-element": "^1.0.5",
|
|
46
|
+
"@next-core/types": "^1.1.0",
|
|
47
|
+
"@next-core/utils": "^1.2.3",
|
|
47
48
|
"classnames": "^2.3.2",
|
|
48
49
|
"d3-hierarchy": "^3.1.2",
|
|
49
50
|
"react": "0.0.0-experimental-ee8509801-20230117",
|
|
50
51
|
"resize-observer-polyfill": "^1.5.1"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
53
|
-
"@next-core/build-next-bricks": "^1.
|
|
54
|
-
"@next-core/test-next": "^1.0.
|
|
54
|
+
"@next-core/build-next-bricks": "^1.4.0",
|
|
55
|
+
"@next-core/test-next": "^1.0.4",
|
|
55
56
|
"@types/d3-hierarchy": "^3.1.2"
|
|
56
57
|
},
|
|
57
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "d0f0254ee8d5dc430967cdec7173dfb43b349cd4"
|
|
58
59
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/1646.c6fb10b9.js","mappings":"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","sources":["webpack:///../../node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack:///../../node_modules/@next-core/react-element/dist/esm/ReactNextElement.js","webpack:///../../node_modules/@next-core/react-element/dist/esm/wrapBrick.js"],"sourcesContent":["export default function _checkPrivateRedeclaration(obj, privateCollection) {\n if (privateCollection.has(obj)) {\n throw new TypeError(\"Cannot initialize the same private elements twice on an object\");\n }\n}","export default function _classExtractFieldDescriptor(receiver, privateMap, action) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to \" + action + \" private field on non-instance\");\n }\n return privateMap.get(receiver);\n}","import classApplyDescriptorGet from \"./classApplyDescriptorGet.js\";\nimport classExtractFieldDescriptor from \"./classExtractFieldDescriptor.js\";\nexport default function _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"get\");\n return classApplyDescriptorGet(receiver, descriptor);\n}","export default function _classApplyDescriptorGet(receiver, descriptor) {\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n return descriptor.value;\n}","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nexport default function _classPrivateFieldInitSpec(obj, privateMap, value) {\n checkPrivateRedeclaration(obj, privateMap);\n privateMap.set(obj, value);\n}","import classApplyDescriptorSet from \"./classApplyDescriptorSet.js\";\nimport classExtractFieldDescriptor from \"./classExtractFieldDescriptor.js\";\nexport default function _classPrivateFieldSet(receiver, privateMap, value) {\n var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"set\");\n classApplyDescriptorSet(receiver, descriptor, value);\n return value;\n}","export default function _classApplyDescriptorSet(receiver, descriptor, value) {\n if (descriptor.set) {\n descriptor.set.call(receiver, value);\n } else {\n if (!descriptor.writable) {\n throw new TypeError(\"attempted to set read only private field\");\n }\n descriptor.value = value;\n }\n}","export default function _classPrivateMethodGet(receiver, privateSet, fn) {\n if (!privateSet.has(receiver)) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n return fn;\n}","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nexport default function _classPrivateMethodInitSpec(obj, privateSet) {\n checkPrivateRedeclaration(obj, privateSet);\n privateSet.add(obj);\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import _classPrivateMethodInitSpec from \"@babel/runtime/helpers/classPrivateMethodInitSpec\";\nimport _classPrivateFieldInitSpec from \"@babel/runtime/helpers/classPrivateFieldInitSpec\";\nimport _classPrivateMethodGet from \"@babel/runtime/helpers/classPrivateMethodGet\";\nimport _classPrivateFieldSet from \"@babel/runtime/helpers/classPrivateFieldSet\";\nimport _classPrivateFieldGet from \"@babel/runtime/helpers/classPrivateFieldGet\";\nimport React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport { NextElement, supportsAdoptingStyleSheets } from \"@next-core/element\";\nvar _root = /*#__PURE__*/new WeakMap();\nvar _createRoot = /*#__PURE__*/new WeakSet();\nexport class ReactNextElement extends NextElement {\n constructor() {\n super(...arguments);\n _classPrivateMethodInitSpec(this, _createRoot);\n _classPrivateFieldInitSpec(this, _root, {\n writable: true,\n value: void 0\n });\n }\n connectedCallback() {\n super._markConnectedCallbackCalled();\n _classPrivateMethodGet(this, _createRoot, _createRoot2).call(this);\n this._render();\n }\n disconnectedCallback() {\n var _classPrivateFieldGet2;\n (_classPrivateFieldGet2 = _classPrivateFieldGet(this, _root)) === null || _classPrivateFieldGet2 === void 0 ? void 0 : _classPrivateFieldGet2.render(null);\n }\n _render() {\n if (!this.isConnected || !_classPrivateFieldGet(this, _root)) {\n return;\n }\n var ctor = this.constructor;\n if (ctor.shadowOptions) {\n var _ctor$styleTexts;\n _classPrivateFieldGet(this, _root).render(supportsAdoptingStyleSheets() || !((_ctor$styleTexts = ctor.styleTexts) !== null && _ctor$styleTexts !== void 0 && _ctor$styleTexts.length) ? this.render() : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"style\", null, ctor.styleTexts.join(\"\\n\")), this.render()));\n } else {\n _classPrivateFieldGet(this, _root).render(this.render());\n }\n }\n}\nfunction _createRoot2() {\n if (_classPrivateFieldGet(this, _root)) {\n return;\n }\n var ctor = this.constructor;\n if (ctor.shadowOptions) {\n var shadowRoot = this.attachShadow(ctor.shadowOptions);\n if (supportsAdoptingStyleSheets()) {\n var _ctor$styleTexts2;\n if ((_ctor$styleTexts2 = ctor.styleTexts) !== null && _ctor$styleTexts2 !== void 0 && _ctor$styleTexts2.length) {\n var styleSheet = new CSSStyleSheet();\n styleSheet.replaceSync(ctor.styleTexts.join(\"\"));\n shadowRoot.adoptedStyleSheets = [styleSheet];\n }\n }\n _classPrivateFieldSet(this, _root, createRoot(shadowRoot));\n } else {\n var _ctor$styleTexts3;\n if (process.env.NODE_ENV !== \"production\" && (_ctor$styleTexts3 = ctor.styleTexts) !== null && _ctor$styleTexts3 !== void 0 && _ctor$styleTexts3.length) {\n throw new Error(\"Use `styleTexts` with `shadowOptions: false` is not supported\");\n }\n _classPrivateFieldSet(this, _root, createRoot(this));\n }\n}\n//# sourceMappingURL=ReactNextElement.js.map","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"],\n _excluded2 = [\"children\"];\nimport React, { forwardRef } from \"react\";\nexport function wrapLocalBrick(brick, eventsMapping) {\n return /*#__PURE__*/forwardRef(function BrickReactWrapper(_ref, ref) {\n var {\n children\n } = _ref,\n props = _objectWithoutProperties(_ref, _excluded);\n var WebComponent = brick.__tagName;\n var properties = getMappedProperties(props, eventsMapping);\n return /*#__PURE__*/React.createElement(WebComponent, _extends({}, properties, {\n ref: ref\n }), children);\n });\n}\nexport function wrapBrick(BrickName, eventsMapping) {\n return /*#__PURE__*/forwardRef(function BrickReactWrapper(_ref2, ref) {\n var {\n children\n } = _ref2,\n props = _objectWithoutProperties(_ref2, _excluded2);\n var properties = getMappedProperties(props, eventsMapping);\n return /*#__PURE__*/React.createElement(BrickName, _extends({}, properties, {\n ref: ref\n }), children);\n });\n}\nfunction getMappedProperties(props, eventsMapping) {\n var properties;\n if (eventsMapping) {\n properties = {};\n for (var [propName, propValue] of Object.entries(props)) {\n if (Object.prototype.hasOwnProperty.call(eventsMapping, propName)) {\n properties[\"on\".concat(eventsMapping[propName])] = propValue;\n } else {\n properties[propName] = propValue;\n }\n }\n } else {\n properties = props;\n }\n return properties;\n}\n//# sourceMappingURL=wrapBrick.js.map"],"names":["_checkPrivateRedeclaration","obj","privateCollection","has","TypeError","_classExtractFieldDescriptor","receiver","privateMap","action","get","_classPrivateFieldGet","descriptor","call","value","classExtractFieldDescriptor","_classPrivateFieldInitSpec","set","_classPrivateFieldSet","writable","_classPrivateMethodGet","privateSet","fn","_classPrivateMethodInitSpec","add","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","apply","this","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_root","WeakMap","_createRoot","WeakSet","ReactNextElement","NextElement","constructor","super","connectedCallback","_markConnectedCallbackCalled","_createRoot2","_render","disconnectedCallback","_classPrivateFieldGet2","render","isConnected","_ctor$styleTexts","ctor","shadowOptions","supportsAdoptingStyleSheets","styleTexts","join","_ctor$styleTexts2","shadowRoot","attachShadow","styleSheet","CSSStyleSheet","replaceSync","adoptedStyleSheets","_excluded","_excluded2","wrapLocalBrick","brick","eventsMapping","forwardRef","_ref","ref","children","props","WebComponent","__tagName","properties","getMappedProperties","wrapBrick","BrickName","_ref2","propName","propValue","entries","concat"],"sourceRoot":""}
|