devexpress-dashboard-react 24.1.2-beta → 24.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard-control.js +52 -66
- package/index.js +3 -19
- package/package.json +5 -5
package/dashboard-control.js
CHANGED
|
@@ -1,82 +1,76 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const DashboardControl = (0, react_1.memo)((0, react_1.forwardRef)((props, ref) => {
|
|
11
|
-
const baseRef = (0, react_1.useRef)(null);
|
|
12
|
-
(0, react_1.useImperativeHandle)(ref, () => ({
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { memo, forwardRef, useImperativeHandle, useRef, useMemo } from "react";
|
|
4
|
+
import dxDashboardControl from "devexpress-dashboard/integration/index";
|
|
5
|
+
import { Component as BaseComponent } from "devextreme-react/core/component";
|
|
6
|
+
import NestedOption from "devextreme-react/core/nested-option";
|
|
7
|
+
const DashboardControl = memo(forwardRef((props, ref) => {
|
|
8
|
+
const baseRef = useRef(null);
|
|
9
|
+
useImperativeHandle(ref, () => ({
|
|
13
10
|
instance() {
|
|
14
|
-
|
|
15
|
-
return (_a = baseRef.current) === null || _a === void 0 ? void 0 : _a.getInstance();
|
|
11
|
+
return baseRef.current?.getInstance();
|
|
16
12
|
}
|
|
17
13
|
}), [baseRef.current]);
|
|
18
|
-
const subscribableOptions =
|
|
19
|
-
const independentEvents =
|
|
20
|
-
const defaults =
|
|
14
|
+
const subscribableOptions = useMemo(() => (["dashboardId", "workingMode"]), []);
|
|
15
|
+
const independentEvents = useMemo(() => (["onBeforeRender", "onDashboardBeginUpdate", "onDashboardEndUpdate", "onDashboardInitialized", "onDashboardInitializing", "onInitializing", "onItemBeginUpdate", "onItemEndUpdate"]), []);
|
|
16
|
+
const defaults = useMemo(() => ({
|
|
21
17
|
defaultDashboardId: "dashboardId",
|
|
22
18
|
defaultWorkingMode: "workingMode",
|
|
23
19
|
}), []);
|
|
24
|
-
const expectedChildren =
|
|
20
|
+
const expectedChildren = useMemo(() => ({
|
|
25
21
|
ajaxRemoteService: { optionName: "ajaxRemoteService", isCollectionItem: false },
|
|
26
22
|
dataRequestOptions: { optionName: "dataRequestOptions", isCollectionItem: false },
|
|
27
23
|
extensions: { optionName: "extensions", isCollectionItem: false },
|
|
28
24
|
fetchRemoteService: { optionName: "fetchRemoteService", isCollectionItem: false }
|
|
29
25
|
}), []);
|
|
30
|
-
return (React.createElement((
|
|
26
|
+
return (React.createElement((BaseComponent), {
|
|
27
|
+
WidgetClass: dxDashboardControl,
|
|
28
|
+
ref: baseRef,
|
|
29
|
+
subscribableOptions,
|
|
31
30
|
independentEvents,
|
|
32
31
|
defaults,
|
|
33
|
-
expectedChildren
|
|
32
|
+
expectedChildren,
|
|
33
|
+
...props,
|
|
34
|
+
}));
|
|
34
35
|
}));
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return React.createElement((nested_option_1.default), Object.assign({}, props));
|
|
36
|
+
const _componentAjaxRemoteService = memo((props) => {
|
|
37
|
+
return React.createElement((NestedOption), { ...props });
|
|
38
38
|
});
|
|
39
39
|
const AjaxRemoteService = Object.assign(_componentAjaxRemoteService, {
|
|
40
40
|
OptionName: "ajaxRemoteService",
|
|
41
41
|
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return React.createElement((nested_option_1.default), Object.assign({}, props));
|
|
42
|
+
const _componentChartIndicators = memo((props) => {
|
|
43
|
+
return React.createElement((NestedOption), { ...props });
|
|
45
44
|
});
|
|
46
45
|
const ChartIndicators = Object.assign(_componentChartIndicators, {
|
|
47
46
|
OptionName: "chartIndicators",
|
|
48
47
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return React.createElement((nested_option_1.default), Object.assign({}, props));
|
|
48
|
+
const _componentDashboardExport = memo((props) => {
|
|
49
|
+
return React.createElement((NestedOption), { ...props });
|
|
52
50
|
});
|
|
53
51
|
const DashboardExport = Object.assign(_componentDashboardExport, {
|
|
54
52
|
OptionName: "dashboardExport",
|
|
55
53
|
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return React.createElement((nested_option_1.default), Object.assign({}, props));
|
|
54
|
+
const _componentDashboardParameterDialog = memo((props) => {
|
|
55
|
+
return React.createElement((NestedOption), { ...props });
|
|
59
56
|
});
|
|
60
57
|
const DashboardParameterDialog = Object.assign(_componentDashboardParameterDialog, {
|
|
61
58
|
OptionName: "dashboardParameterDialog",
|
|
62
59
|
});
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return React.createElement((nested_option_1.default), Object.assign({}, props));
|
|
60
|
+
const _componentDataInspector = memo((props) => {
|
|
61
|
+
return React.createElement((NestedOption), { ...props });
|
|
66
62
|
});
|
|
67
63
|
const DataInspector = Object.assign(_componentDataInspector, {
|
|
68
64
|
OptionName: "dataInspector",
|
|
69
65
|
});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return React.createElement((nested_option_1.default), Object.assign({}, props));
|
|
66
|
+
const _componentDataRequestOptions = memo((props) => {
|
|
67
|
+
return React.createElement((NestedOption), { ...props });
|
|
73
68
|
});
|
|
74
69
|
const DataRequestOptions = Object.assign(_componentDataRequestOptions, {
|
|
75
70
|
OptionName: "dataRequestOptions",
|
|
76
71
|
});
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
return React.createElement((nested_option_1.default), Object.assign({}, props));
|
|
72
|
+
const _componentDataSourceWizard = memo((props) => {
|
|
73
|
+
return React.createElement((NestedOption), { ...props });
|
|
80
74
|
});
|
|
81
75
|
const DataSourceWizard = Object.assign(_componentDataSourceWizard, {
|
|
82
76
|
OptionName: "dataSourceWizard",
|
|
@@ -84,16 +78,14 @@ const DataSourceWizard = Object.assign(_componentDataSourceWizard, {
|
|
|
84
78
|
wizardSettings: { optionName: "wizardSettings", isCollectionItem: false }
|
|
85
79
|
},
|
|
86
80
|
});
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
return React.createElement((nested_option_1.default), Object.assign({}, props));
|
|
81
|
+
const _componentDesignerToolbar = memo((props) => {
|
|
82
|
+
return React.createElement((NestedOption), { ...props });
|
|
90
83
|
});
|
|
91
84
|
const DesignerToolbar = Object.assign(_componentDesignerToolbar, {
|
|
92
85
|
OptionName: "designerToolbar",
|
|
93
86
|
});
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
return React.createElement((nested_option_1.default), Object.assign({}, props));
|
|
87
|
+
const _componentExtensions = memo((props) => {
|
|
88
|
+
return React.createElement((NestedOption), { ...props });
|
|
97
89
|
});
|
|
98
90
|
const Extensions = Object.assign(_componentExtensions, {
|
|
99
91
|
OptionName: "extensions",
|
|
@@ -110,47 +102,41 @@ const Extensions = Object.assign(_componentExtensions, {
|
|
|
110
102
|
viewerApi: { optionName: "viewerApi", isCollectionItem: false }
|
|
111
103
|
},
|
|
112
104
|
});
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return React.createElement((nested_option_1.default), Object.assign({}, props));
|
|
105
|
+
const _componentFetchRemoteService = memo((props) => {
|
|
106
|
+
return React.createElement((NestedOption), { ...props });
|
|
116
107
|
});
|
|
117
108
|
const FetchRemoteService = Object.assign(_componentFetchRemoteService, {
|
|
118
109
|
OptionName: "fetchRemoteService",
|
|
119
110
|
});
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
return React.createElement((nested_option_1.default), Object.assign({}, props));
|
|
111
|
+
const _componentItemBindingPanel = memo((props) => {
|
|
112
|
+
return React.createElement((NestedOption), { ...props });
|
|
123
113
|
});
|
|
124
114
|
const ItemBindingPanel = Object.assign(_componentItemBindingPanel, {
|
|
125
115
|
OptionName: "itemBindingPanel",
|
|
126
116
|
});
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
return React.createElement((nested_option_1.default), Object.assign({}, props));
|
|
117
|
+
const _componentItemOptionsPanel = memo((props) => {
|
|
118
|
+
return React.createElement((NestedOption), { ...props });
|
|
130
119
|
});
|
|
131
120
|
const ItemOptionsPanel = Object.assign(_componentItemOptionsPanel, {
|
|
132
121
|
OptionName: "itemOptionsPanel",
|
|
133
122
|
});
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
return React.createElement((nested_option_1.default), Object.assign({}, props));
|
|
123
|
+
const _componentMobileLayout = memo((props) => {
|
|
124
|
+
return React.createElement((NestedOption), { ...props });
|
|
137
125
|
});
|
|
138
126
|
const MobileLayout = Object.assign(_componentMobileLayout, {
|
|
139
127
|
OptionName: "mobileLayout",
|
|
140
128
|
});
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
return React.createElement((nested_option_1.default), Object.assign({}, props));
|
|
129
|
+
const _componentViewerApi = memo((props) => {
|
|
130
|
+
return React.createElement((NestedOption), { ...props });
|
|
144
131
|
});
|
|
145
132
|
const ViewerApi = Object.assign(_componentViewerApi, {
|
|
146
133
|
OptionName: "viewerApi",
|
|
147
134
|
});
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
return React.createElement((nested_option_1.default), Object.assign({}, props));
|
|
135
|
+
const _componentWizardSettings = memo((props) => {
|
|
136
|
+
return React.createElement((NestedOption), { ...props });
|
|
151
137
|
});
|
|
152
138
|
const WizardSettings = Object.assign(_componentWizardSettings, {
|
|
153
139
|
OptionName: "wizardSettings",
|
|
154
140
|
});
|
|
155
|
-
|
|
156
|
-
|
|
141
|
+
export default DashboardControl;
|
|
142
|
+
export { DashboardControl, AjaxRemoteService, ChartIndicators, DashboardExport, DashboardParameterDialog, DataInspector, DataRequestOptions, DataSourceWizard, DesignerToolbar, Extensions, FetchRemoteService, ItemBindingPanel, ItemOptionsPanel, MobileLayout, ViewerApi, WizardSettings };
|
package/index.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
const dashboard_control_1 = require("./dashboard-control");
|
|
18
|
-
exports.default = dashboard_control_1.default;
|
|
19
|
-
__exportStar(require("./dashboard-control"), exports);
|
|
1
|
+
import DashboardControl from "./dashboard-control";
|
|
2
|
+
export default DashboardControl;
|
|
3
|
+
export * from "./dashboard-control";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devexpress-dashboard-react",
|
|
3
3
|
"author": "Developer Express Inc.",
|
|
4
|
-
"version": "24.1.
|
|
4
|
+
"version": "24.1.3",
|
|
5
5
|
"description": "A component that integrates DevExpress Web Dashboard in a React application",
|
|
6
6
|
"homepage": "https://www.devexpress.com/products/net/dashboard/",
|
|
7
7
|
"bugs": "https://www.devexpress.com/support/",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"prop-types": "^15.6.1"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"devexpress-dashboard": "24.1.
|
|
21
|
-
"devextreme": "24.1.
|
|
22
|
-
"devextreme-react": "24.1.
|
|
23
|
-
"@devexpress/analytics-core": "24.1.
|
|
20
|
+
"devexpress-dashboard": "24.1.3",
|
|
21
|
+
"devextreme": "24.1.3",
|
|
22
|
+
"devextreme-react": "24.1.3",
|
|
23
|
+
"@devexpress/analytics-core": "24.1.3"
|
|
24
24
|
}
|
|
25
25
|
}
|