@byteluck-fe/model-driven-controls 7.0.0-props.92 → 7.0.0-props.93
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/esm/api-doc-index.js +2 -1
- package/dist/esm/baseControls/{Chart → BarChart}/designer.js +39 -22
- package/dist/esm/baseControls/BarChart/property.js +119 -0
- package/dist/esm/baseControls/{Chart → BarChart}/runtime.js +12 -12
- package/dist/esm/baseControls/PieChart/designer.js +194 -0
- package/dist/esm/baseControls/PieChart/index.js +11 -0
- package/dist/esm/baseControls/{Chart → PieChart}/property.js +15 -15
- package/dist/esm/baseControls/PieChart/runtime.js +112 -0
- package/dist/esm/baseControls/index.js +2 -1
- package/dist/index.umd.js +1 -1
- package/dist/types/api-doc-index.d.ts +2 -1
- package/dist/types/baseControls/{Chart → BarChart}/designer.d.ts +6 -6
- package/dist/types/baseControls/{Chart → BarChart}/property.d.ts +15 -15
- package/dist/types/baseControls/BarChart/runtime.d.ts +9 -0
- package/dist/types/baseControls/PieChart/designer.d.ts +13 -0
- package/dist/types/baseControls/PieChart/index.d.ts +12 -0
- package/dist/types/baseControls/PieChart/property.d.ts +154 -0
- package/dist/types/baseControls/PieChart/runtime.d.ts +9 -0
- package/dist/types/baseControls/index.d.ts +4 -2
- package/dist/types/type.d.ts +3 -2
- package/package.json +2 -2
- package/dist/types/baseControls/Chart/runtime.d.ts +0 -9
- /package/dist/esm/baseControls/{Chart → BarChart}/index.js +0 -0
- /package/dist/types/baseControls/{Chart → BarChart}/index.d.ts +0 -0
|
@@ -14,7 +14,8 @@ export { default as FormSelectButton } from './baseControls/FormSelectButton/pro
|
|
|
14
14
|
export { default as ListSelectButton } from './baseControls/ListSelectButton/property';
|
|
15
15
|
export { default as Pagination } from './baseControls/Pagination/property';
|
|
16
16
|
export { default as Dashboard } from './baseControls/Dashboard/property';
|
|
17
|
-
export { default as
|
|
17
|
+
export { default as BarChart } from './baseControls/BarChart/property';
|
|
18
|
+
export { default as PieChart } from './baseControls/PieChart/property';
|
|
18
19
|
export { default as ListViewSelect } from './baseControls/ListViewSelect/property';
|
|
19
20
|
export { default as TextOcrButton } from './baseControls/TextOcrButton/property';
|
|
20
21
|
export { default as InvoiceCheckButton } from './baseControls/InvoiceCheckButton/property';
|
|
@@ -86,24 +86,24 @@ function _is_native_reflect_construct() {
|
|
|
86
86
|
}
|
|
87
87
|
import { COMMON_SETTING_TYPE, DesignerControl } from '@byteluck-fe/model-driven-core';
|
|
88
88
|
import { getLocaleText } from '@byteluck-fe/locale-message';
|
|
89
|
-
import
|
|
90
|
-
var
|
|
89
|
+
import BarChartProperty from './property';
|
|
90
|
+
var BarChartControl = /*#__PURE__*/ function(DesignerControl) {
|
|
91
91
|
"use strict";
|
|
92
|
-
_inherits(
|
|
93
|
-
function
|
|
94
|
-
_class_call_check(this,
|
|
92
|
+
_inherits(BarChartControl, DesignerControl);
|
|
93
|
+
function BarChartControl(props) {
|
|
94
|
+
_class_call_check(this, BarChartControl);
|
|
95
95
|
var _this;
|
|
96
|
-
_this = _call_super(this,
|
|
96
|
+
_this = _call_super(this, BarChartControl, [
|
|
97
97
|
props
|
|
98
98
|
]), _define_property(_this, "props", void 0);
|
|
99
|
-
_this.props = new
|
|
99
|
+
_this.props = new BarChartProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
100
100
|
return _this;
|
|
101
101
|
}
|
|
102
|
-
_create_class(
|
|
102
|
+
_create_class(BarChartControl, null, [
|
|
103
103
|
{
|
|
104
104
|
key: "controlName",
|
|
105
105
|
get: function get() {
|
|
106
|
-
return getLocaleText('CMD.
|
|
106
|
+
return getLocaleText('CMD.barChart', null, '柱状图');
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
109
|
{
|
|
@@ -115,7 +115,7 @@ var ChartControl = /*#__PURE__*/ function(DesignerControl) {
|
|
|
115
115
|
{
|
|
116
116
|
key: "controlType",
|
|
117
117
|
get: function get() {
|
|
118
|
-
return 'chart';
|
|
118
|
+
return 'bar-chart';
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
{
|
|
@@ -125,17 +125,9 @@ var ChartControl = /*#__PURE__*/ function(DesignerControl) {
|
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
]);
|
|
128
|
-
return
|
|
128
|
+
return BarChartControl;
|
|
129
129
|
}(DesignerControl);
|
|
130
|
-
_define_property(
|
|
131
|
-
{
|
|
132
|
-
key: 'chart-setting',
|
|
133
|
-
visible: true
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
key: 'chart-data-bind',
|
|
137
|
-
visible: true
|
|
138
|
-
},
|
|
130
|
+
_define_property(BarChartControl, "setting", [
|
|
139
131
|
{
|
|
140
132
|
key: 'caption',
|
|
141
133
|
showItems: [
|
|
@@ -152,10 +144,35 @@ _define_property(ChartControl, "setting", [
|
|
|
152
144
|
COMMON_SETTING_TYPE.IS_SHOW_CAPTION_TIP
|
|
153
145
|
]
|
|
154
146
|
},
|
|
147
|
+
{
|
|
148
|
+
key: 'common-select',
|
|
149
|
+
visible: true,
|
|
150
|
+
name: 'template',
|
|
151
|
+
label: '模版',
|
|
152
|
+
default: 'default',
|
|
153
|
+
options: [
|
|
154
|
+
{
|
|
155
|
+
value: 'bar-basic',
|
|
156
|
+
label: '基础柱状图'
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
value: 'bar-background',
|
|
160
|
+
label: '带背景色的柱状图'
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
key: 'chart-setting',
|
|
166
|
+
visible: true
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
key: 'chart-data-bind',
|
|
170
|
+
visible: true
|
|
171
|
+
},
|
|
155
172
|
{
|
|
156
173
|
key: 'super-setting',
|
|
157
174
|
visible: true
|
|
158
175
|
}
|
|
159
176
|
]);
|
|
160
|
-
export default
|
|
161
|
-
export {
|
|
177
|
+
export default BarChartControl;
|
|
178
|
+
export { BarChartControl as DesignerBarChartControl };
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
function _assert_this_initialized(self) {
|
|
2
|
+
if (self === void 0) {
|
|
3
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
+
}
|
|
5
|
+
return self;
|
|
6
|
+
}
|
|
7
|
+
function _call_super(_this, derived, args) {
|
|
8
|
+
derived = _get_prototype_of(derived);
|
|
9
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
+
}
|
|
11
|
+
function _class_call_check(instance, Constructor) {
|
|
12
|
+
if (!(instance instanceof Constructor)) {
|
|
13
|
+
throw new TypeError("Cannot call a class as a function");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function _define_property(obj, key, value) {
|
|
17
|
+
if (key in obj) {
|
|
18
|
+
Object.defineProperty(obj, key, {
|
|
19
|
+
value: value,
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true
|
|
23
|
+
});
|
|
24
|
+
} else {
|
|
25
|
+
obj[key] = value;
|
|
26
|
+
}
|
|
27
|
+
return obj;
|
|
28
|
+
}
|
|
29
|
+
function _get_prototype_of(o) {
|
|
30
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
31
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
32
|
+
};
|
|
33
|
+
return _get_prototype_of(o);
|
|
34
|
+
}
|
|
35
|
+
function _inherits(subClass, superClass) {
|
|
36
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
37
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
38
|
+
}
|
|
39
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
40
|
+
constructor: {
|
|
41
|
+
value: subClass,
|
|
42
|
+
writable: true,
|
|
43
|
+
configurable: true
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
47
|
+
}
|
|
48
|
+
function _possible_constructor_return(self, call) {
|
|
49
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
50
|
+
return call;
|
|
51
|
+
}
|
|
52
|
+
return _assert_this_initialized(self);
|
|
53
|
+
}
|
|
54
|
+
function _set_prototype_of(o, p) {
|
|
55
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
56
|
+
o.__proto__ = p;
|
|
57
|
+
return o;
|
|
58
|
+
};
|
|
59
|
+
return _set_prototype_of(o, p);
|
|
60
|
+
}
|
|
61
|
+
function _type_of(obj) {
|
|
62
|
+
"@swc/helpers - typeof";
|
|
63
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
64
|
+
}
|
|
65
|
+
function _is_native_reflect_construct() {
|
|
66
|
+
try {
|
|
67
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
68
|
+
} catch (_) {}
|
|
69
|
+
return (_is_native_reflect_construct = function() {
|
|
70
|
+
return !!result;
|
|
71
|
+
})();
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* name: rok_bar_chart
|
|
75
|
+
* description: 柱状图组件。用于展示静态或动态数据图表,支持模板选择、数据模式切换和字段映射,适合统计分析与看板展示场景。
|
|
76
|
+
*/ import BarChartControl from './designer';
|
|
77
|
+
import { MultistageFillingItem, Property, TreeDataSourceBind } from '@byteluck-fe/model-driven-core';
|
|
78
|
+
var BarChartProperty = /*#__PURE__*/ function(Property) {
|
|
79
|
+
"use strict";
|
|
80
|
+
_inherits(BarChartProperty, Property);
|
|
81
|
+
function BarChartProperty(props) {
|
|
82
|
+
_class_call_check(this, BarChartProperty);
|
|
83
|
+
var _this;
|
|
84
|
+
var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18;
|
|
85
|
+
var _props_multistageFilling;
|
|
86
|
+
_this = _call_super(this, BarChartProperty, [
|
|
87
|
+
props
|
|
88
|
+
]), _define_property(_this, "caption", void 0), _define_property(_this, "isHideCaption", void 0), _define_property(_this, "isShowCaptionTip", void 0), _define_property(_this, "captionTip", void 0), _define_property(_this, "isHide", void 0), _define_property(_this, "template", void 0), _define_property(_this, "dataMode", void 0), _define_property(_this, "optionJson", void 0), _define_property(_this, "optionConfig", 'datasource'), _define_property(_this, "datasourceBind", void 0), _define_property(_this, "filterItemDatasourceBind", void 0), _define_property(_this, "multistageFilling", void 0), _define_property(_this, "defaultValue", void 0), _define_property(_this, "openMultistageFilling", void 0), _define_property(_this, "xField", void 0), _define_property(_this, "yField", void 0), _define_property(_this, "yFields", void 0), _define_property(_this, "groupField", void 0), _define_property(_this, "nameField", void 0), _define_property(_this, "valueField", void 0);
|
|
89
|
+
_this.caption = (_ref = props === null || props === void 0 ? void 0 : props.caption) !== null && _ref !== void 0 ? _ref : BarChartControl.controlName;
|
|
90
|
+
_this.isHideCaption = (_ref1 = props === null || props === void 0 ? void 0 : props.isHideCaption) !== null && _ref1 !== void 0 ? _ref1 : false;
|
|
91
|
+
_this.isShowCaptionTip = (_ref2 = props === null || props === void 0 ? void 0 : props.isShowCaptionTip) !== null && _ref2 !== void 0 ? _ref2 : false;
|
|
92
|
+
_this.captionTip = (_ref3 = props === null || props === void 0 ? void 0 : props.captionTip) !== null && _ref3 !== void 0 ? _ref3 : '';
|
|
93
|
+
_this.isHide = (_ref4 = props === null || props === void 0 ? void 0 : props.isHide) !== null && _ref4 !== void 0 ? _ref4 : false;
|
|
94
|
+
_this.template = (_ref5 = props === null || props === void 0 ? void 0 : props.template) !== null && _ref5 !== void 0 ? _ref5 : 'bar-basic';
|
|
95
|
+
_this.dataMode = (_ref6 = props === null || props === void 0 ? void 0 : props.dataMode) !== null && _ref6 !== void 0 ? _ref6 : 'static';
|
|
96
|
+
_this.optionJson = (_ref7 = props === null || props === void 0 ? void 0 : props.optionJson) !== null && _ref7 !== void 0 ? _ref7 : '{}';
|
|
97
|
+
_this.datasourceBind = new TreeDataSourceBind((_ref8 = props === null || props === void 0 ? void 0 : props.datasourceBind) !== null && _ref8 !== void 0 ? _ref8 : {
|
|
98
|
+
attributes: BarChartControl.controlCustomAttributes
|
|
99
|
+
});
|
|
100
|
+
_this.filterItemDatasourceBind = new TreeDataSourceBind((_ref9 = props === null || props === void 0 ? void 0 : props.filterItemDatasourceBind) !== null && _ref9 !== void 0 ? _ref9 : {
|
|
101
|
+
attributes: BarChartControl.controlCustomAttributes
|
|
102
|
+
});
|
|
103
|
+
_this.multistageFilling = (_ref10 = props === null || props === void 0 ? void 0 : (_props_multistageFilling = props.multistageFilling) === null || _props_multistageFilling === void 0 ? void 0 : _props_multistageFilling.map(function(item) {
|
|
104
|
+
return new MultistageFillingItem(item);
|
|
105
|
+
})) !== null && _ref10 !== void 0 ? _ref10 : [];
|
|
106
|
+
_this.defaultValue = (_ref11 = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _ref11 !== void 0 ? _ref11 : [];
|
|
107
|
+
_this.openMultistageFilling = (_ref12 = props === null || props === void 0 ? void 0 : props.openMultistageFilling) !== null && _ref12 !== void 0 ? _ref12 : false;
|
|
108
|
+
_this.xField = (_ref13 = props === null || props === void 0 ? void 0 : props.xField) !== null && _ref13 !== void 0 ? _ref13 : '';
|
|
109
|
+
_this.yField = (_ref14 = props === null || props === void 0 ? void 0 : props.yField) !== null && _ref14 !== void 0 ? _ref14 : '';
|
|
110
|
+
_this.yFields = (_ref15 = props === null || props === void 0 ? void 0 : props.yFields) !== null && _ref15 !== void 0 ? _ref15 : [];
|
|
111
|
+
_this.groupField = (_ref16 = props === null || props === void 0 ? void 0 : props.groupField) !== null && _ref16 !== void 0 ? _ref16 : '';
|
|
112
|
+
_this.nameField = (_ref17 = props === null || props === void 0 ? void 0 : props.nameField) !== null && _ref17 !== void 0 ? _ref17 : '';
|
|
113
|
+
_this.valueField = (_ref18 = props === null || props === void 0 ? void 0 : props.valueField) !== null && _ref18 !== void 0 ? _ref18 : '';
|
|
114
|
+
return _this;
|
|
115
|
+
}
|
|
116
|
+
return BarChartProperty;
|
|
117
|
+
}(Property);
|
|
118
|
+
export default BarChartProperty;
|
|
119
|
+
export { BarChartProperty };
|
|
@@ -85,28 +85,28 @@ function _is_native_reflect_construct() {
|
|
|
85
85
|
})();
|
|
86
86
|
}
|
|
87
87
|
import { RuntimeControl } from '@byteluck-fe/model-driven-core';
|
|
88
|
-
import
|
|
89
|
-
var
|
|
88
|
+
import BarChartProperty from './property';
|
|
89
|
+
var BarChartControl = /*#__PURE__*/ function(RuntimeControl) {
|
|
90
90
|
"use strict";
|
|
91
|
-
_inherits(
|
|
92
|
-
function
|
|
93
|
-
_class_call_check(this,
|
|
91
|
+
_inherits(BarChartControl, RuntimeControl);
|
|
92
|
+
function BarChartControl(props) {
|
|
93
|
+
_class_call_check(this, BarChartControl);
|
|
94
94
|
var _this;
|
|
95
|
-
_this = _call_super(this,
|
|
95
|
+
_this = _call_super(this, BarChartControl, [
|
|
96
96
|
props
|
|
97
97
|
]), _define_property(_this, "props", void 0);
|
|
98
|
-
_this.props = new
|
|
98
|
+
_this.props = new BarChartProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
99
99
|
return _this;
|
|
100
100
|
}
|
|
101
|
-
_create_class(
|
|
101
|
+
_create_class(BarChartControl, null, [
|
|
102
102
|
{
|
|
103
103
|
key: "controlType",
|
|
104
104
|
get: function get() {
|
|
105
|
-
return 'chart';
|
|
105
|
+
return 'bar-chart';
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
]);
|
|
109
|
-
return
|
|
109
|
+
return BarChartControl;
|
|
110
110
|
}(RuntimeControl);
|
|
111
|
-
export default
|
|
112
|
-
export {
|
|
111
|
+
export default BarChartControl;
|
|
112
|
+
export { BarChartControl as RuntimeBarChartControl };
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
function _assert_this_initialized(self) {
|
|
2
|
+
if (self === void 0) {
|
|
3
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
+
}
|
|
5
|
+
return self;
|
|
6
|
+
}
|
|
7
|
+
function _call_super(_this, derived, args) {
|
|
8
|
+
derived = _get_prototype_of(derived);
|
|
9
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
+
}
|
|
11
|
+
function _class_call_check(instance, Constructor) {
|
|
12
|
+
if (!(instance instanceof Constructor)) {
|
|
13
|
+
throw new TypeError("Cannot call a class as a function");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function _defineProperties(target, props) {
|
|
17
|
+
for(var i = 0; i < props.length; i++){
|
|
18
|
+
var descriptor = props[i];
|
|
19
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
20
|
+
descriptor.configurable = true;
|
|
21
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
22
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
26
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
27
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
28
|
+
return Constructor;
|
|
29
|
+
}
|
|
30
|
+
function _define_property(obj, key, value) {
|
|
31
|
+
if (key in obj) {
|
|
32
|
+
Object.defineProperty(obj, key, {
|
|
33
|
+
value: value,
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
writable: true
|
|
37
|
+
});
|
|
38
|
+
} else {
|
|
39
|
+
obj[key] = value;
|
|
40
|
+
}
|
|
41
|
+
return obj;
|
|
42
|
+
}
|
|
43
|
+
function _get_prototype_of(o) {
|
|
44
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
45
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
46
|
+
};
|
|
47
|
+
return _get_prototype_of(o);
|
|
48
|
+
}
|
|
49
|
+
function _inherits(subClass, superClass) {
|
|
50
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
51
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
52
|
+
}
|
|
53
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
54
|
+
constructor: {
|
|
55
|
+
value: subClass,
|
|
56
|
+
writable: true,
|
|
57
|
+
configurable: true
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
61
|
+
}
|
|
62
|
+
function _possible_constructor_return(self, call) {
|
|
63
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
64
|
+
return call;
|
|
65
|
+
}
|
|
66
|
+
return _assert_this_initialized(self);
|
|
67
|
+
}
|
|
68
|
+
function _set_prototype_of(o, p) {
|
|
69
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
70
|
+
o.__proto__ = p;
|
|
71
|
+
return o;
|
|
72
|
+
};
|
|
73
|
+
return _set_prototype_of(o, p);
|
|
74
|
+
}
|
|
75
|
+
function _type_of(obj) {
|
|
76
|
+
"@swc/helpers - typeof";
|
|
77
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
78
|
+
}
|
|
79
|
+
function _is_native_reflect_construct() {
|
|
80
|
+
try {
|
|
81
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
82
|
+
} catch (_) {}
|
|
83
|
+
return (_is_native_reflect_construct = function() {
|
|
84
|
+
return !!result;
|
|
85
|
+
})();
|
|
86
|
+
}
|
|
87
|
+
import { COMMON_SETTING_TYPE, DesignerControl } from '@byteluck-fe/model-driven-core';
|
|
88
|
+
import { getLocaleText } from '@byteluck-fe/locale-message';
|
|
89
|
+
import PieChartProperty from './property';
|
|
90
|
+
var PieChartControl = /*#__PURE__*/ function(DesignerControl) {
|
|
91
|
+
"use strict";
|
|
92
|
+
_inherits(PieChartControl, DesignerControl);
|
|
93
|
+
function PieChartControl(props) {
|
|
94
|
+
_class_call_check(this, PieChartControl);
|
|
95
|
+
var _this;
|
|
96
|
+
_this = _call_super(this, PieChartControl, [
|
|
97
|
+
props
|
|
98
|
+
]), _define_property(_this, "props", void 0);
|
|
99
|
+
_this.props = new PieChartProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
100
|
+
return _this;
|
|
101
|
+
}
|
|
102
|
+
_create_class(PieChartControl, null, [
|
|
103
|
+
{
|
|
104
|
+
key: "controlName",
|
|
105
|
+
get: function get() {
|
|
106
|
+
return getLocaleText('CMD.pieChart', null, '饼图');
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
key: "controlIcon",
|
|
111
|
+
get: function get() {
|
|
112
|
+
return 'iconbiaodan_tubiao';
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
key: "controlType",
|
|
117
|
+
get: function get() {
|
|
118
|
+
return 'pie-chart';
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
key: "controlCustomAttributes",
|
|
123
|
+
get: function get() {
|
|
124
|
+
return [];
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
]);
|
|
128
|
+
return PieChartControl;
|
|
129
|
+
}(DesignerControl);
|
|
130
|
+
_define_property(PieChartControl, "setting", [
|
|
131
|
+
{
|
|
132
|
+
key: 'caption',
|
|
133
|
+
showItems: [
|
|
134
|
+
COMMON_SETTING_TYPE.CAPTION,
|
|
135
|
+
COMMON_SETTING_TYPE.IS_HIDE_CAPTION
|
|
136
|
+
],
|
|
137
|
+
visible: true
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
key: 'common-setting',
|
|
141
|
+
visible: true,
|
|
142
|
+
showItems: [
|
|
143
|
+
COMMON_SETTING_TYPE.IS_HIDE,
|
|
144
|
+
COMMON_SETTING_TYPE.IS_SHOW_CAPTION_TIP
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
key: 'common-select',
|
|
149
|
+
visible: true,
|
|
150
|
+
name: 'template',
|
|
151
|
+
label: '模版',
|
|
152
|
+
default: 'default',
|
|
153
|
+
options: [
|
|
154
|
+
{
|
|
155
|
+
value: 'pie-rounded-ring',
|
|
156
|
+
label: '圆角环形图'
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
value: 'pie-ring',
|
|
160
|
+
label: '环形图'
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
value: 'pie-half-ring',
|
|
164
|
+
label: '半环形图'
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
value: 'pie-gap',
|
|
168
|
+
label: '饼图扇区间隙'
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
value: 'pie-rose',
|
|
172
|
+
label: '基础南丁格尔玫瑰图'
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
value: 'pie-texture',
|
|
176
|
+
label: '饼图纹理'
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
key: 'chart-setting',
|
|
182
|
+
visible: true
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
key: 'chart-data-bind',
|
|
186
|
+
visible: true
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
key: 'super-setting',
|
|
190
|
+
visible: true
|
|
191
|
+
}
|
|
192
|
+
]);
|
|
193
|
+
export default PieChartControl;
|
|
194
|
+
export { PieChartControl as DesignerPieChartControl };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Designer from './designer';
|
|
2
|
+
import Runtime from './runtime';
|
|
3
|
+
import Property from './property';
|
|
4
|
+
export default {
|
|
5
|
+
Designer: Designer,
|
|
6
|
+
Runtime: Runtime,
|
|
7
|
+
Property: Property
|
|
8
|
+
};
|
|
9
|
+
export * from './designer';
|
|
10
|
+
export * from './runtime';
|
|
11
|
+
export * from './property';
|
|
@@ -71,34 +71,34 @@ function _is_native_reflect_construct() {
|
|
|
71
71
|
})();
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
|
-
* name:
|
|
75
|
-
* description:
|
|
76
|
-
*/ import
|
|
74
|
+
* name: rok_pie_chart
|
|
75
|
+
* description: 饼图组件。用于展示静态或动态数据图表,支持模板选择、数据模式切换和字段映射,适合统计分析与看板展示场景。
|
|
76
|
+
*/ import PieChartControl from './designer';
|
|
77
77
|
import { MultistageFillingItem, Property, TreeDataSourceBind } from '@byteluck-fe/model-driven-core';
|
|
78
|
-
var
|
|
78
|
+
var PieChartProperty = /*#__PURE__*/ function(Property) {
|
|
79
79
|
"use strict";
|
|
80
|
-
_inherits(
|
|
81
|
-
function
|
|
82
|
-
_class_call_check(this,
|
|
80
|
+
_inherits(PieChartProperty, Property);
|
|
81
|
+
function PieChartProperty(props) {
|
|
82
|
+
_class_call_check(this, PieChartProperty);
|
|
83
83
|
var _this;
|
|
84
84
|
var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18;
|
|
85
85
|
var _props_multistageFilling;
|
|
86
|
-
_this = _call_super(this,
|
|
86
|
+
_this = _call_super(this, PieChartProperty, [
|
|
87
87
|
props
|
|
88
88
|
]), _define_property(_this, "caption", void 0), _define_property(_this, "isHideCaption", void 0), _define_property(_this, "isShowCaptionTip", void 0), _define_property(_this, "captionTip", void 0), _define_property(_this, "isHide", void 0), _define_property(_this, "template", void 0), _define_property(_this, "dataMode", void 0), _define_property(_this, "optionJson", void 0), _define_property(_this, "optionConfig", 'datasource'), _define_property(_this, "datasourceBind", void 0), _define_property(_this, "filterItemDatasourceBind", void 0), _define_property(_this, "multistageFilling", void 0), _define_property(_this, "defaultValue", void 0), _define_property(_this, "openMultistageFilling", void 0), _define_property(_this, "xField", void 0), _define_property(_this, "yField", void 0), _define_property(_this, "yFields", void 0), _define_property(_this, "groupField", void 0), _define_property(_this, "nameField", void 0), _define_property(_this, "valueField", void 0);
|
|
89
|
-
_this.caption = (_ref = props === null || props === void 0 ? void 0 : props.caption) !== null && _ref !== void 0 ? _ref :
|
|
89
|
+
_this.caption = (_ref = props === null || props === void 0 ? void 0 : props.caption) !== null && _ref !== void 0 ? _ref : PieChartControl.controlName;
|
|
90
90
|
_this.isHideCaption = (_ref1 = props === null || props === void 0 ? void 0 : props.isHideCaption) !== null && _ref1 !== void 0 ? _ref1 : false;
|
|
91
91
|
_this.isShowCaptionTip = (_ref2 = props === null || props === void 0 ? void 0 : props.isShowCaptionTip) !== null && _ref2 !== void 0 ? _ref2 : false;
|
|
92
92
|
_this.captionTip = (_ref3 = props === null || props === void 0 ? void 0 : props.captionTip) !== null && _ref3 !== void 0 ? _ref3 : '';
|
|
93
93
|
_this.isHide = (_ref4 = props === null || props === void 0 ? void 0 : props.isHide) !== null && _ref4 !== void 0 ? _ref4 : false;
|
|
94
|
-
_this.template = (_ref5 = props === null || props === void 0 ? void 0 : props.template) !== null && _ref5 !== void 0 ? _ref5 : '
|
|
94
|
+
_this.template = (_ref5 = props === null || props === void 0 ? void 0 : props.template) !== null && _ref5 !== void 0 ? _ref5 : 'pie-rounded-ring';
|
|
95
95
|
_this.dataMode = (_ref6 = props === null || props === void 0 ? void 0 : props.dataMode) !== null && _ref6 !== void 0 ? _ref6 : 'static';
|
|
96
96
|
_this.optionJson = (_ref7 = props === null || props === void 0 ? void 0 : props.optionJson) !== null && _ref7 !== void 0 ? _ref7 : '{}';
|
|
97
97
|
_this.datasourceBind = new TreeDataSourceBind((_ref8 = props === null || props === void 0 ? void 0 : props.datasourceBind) !== null && _ref8 !== void 0 ? _ref8 : {
|
|
98
|
-
attributes:
|
|
98
|
+
attributes: PieChartControl.controlCustomAttributes
|
|
99
99
|
});
|
|
100
100
|
_this.filterItemDatasourceBind = new TreeDataSourceBind((_ref9 = props === null || props === void 0 ? void 0 : props.filterItemDatasourceBind) !== null && _ref9 !== void 0 ? _ref9 : {
|
|
101
|
-
attributes:
|
|
101
|
+
attributes: PieChartControl.controlCustomAttributes
|
|
102
102
|
});
|
|
103
103
|
_this.multistageFilling = (_ref10 = props === null || props === void 0 ? void 0 : (_props_multistageFilling = props.multistageFilling) === null || _props_multistageFilling === void 0 ? void 0 : _props_multistageFilling.map(function(item) {
|
|
104
104
|
return new MultistageFillingItem(item);
|
|
@@ -113,7 +113,7 @@ var ChartProperty = /*#__PURE__*/ function(Property) {
|
|
|
113
113
|
_this.valueField = (_ref18 = props === null || props === void 0 ? void 0 : props.valueField) !== null && _ref18 !== void 0 ? _ref18 : '';
|
|
114
114
|
return _this;
|
|
115
115
|
}
|
|
116
|
-
return
|
|
116
|
+
return PieChartProperty;
|
|
117
117
|
}(Property);
|
|
118
|
-
export default
|
|
119
|
-
export {
|
|
118
|
+
export default PieChartProperty;
|
|
119
|
+
export { PieChartProperty };
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
function _assert_this_initialized(self) {
|
|
2
|
+
if (self === void 0) {
|
|
3
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
+
}
|
|
5
|
+
return self;
|
|
6
|
+
}
|
|
7
|
+
function _call_super(_this, derived, args) {
|
|
8
|
+
derived = _get_prototype_of(derived);
|
|
9
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
+
}
|
|
11
|
+
function _class_call_check(instance, Constructor) {
|
|
12
|
+
if (!(instance instanceof Constructor)) {
|
|
13
|
+
throw new TypeError("Cannot call a class as a function");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function _defineProperties(target, props) {
|
|
17
|
+
for(var i = 0; i < props.length; i++){
|
|
18
|
+
var descriptor = props[i];
|
|
19
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
20
|
+
descriptor.configurable = true;
|
|
21
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
22
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
26
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
27
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
28
|
+
return Constructor;
|
|
29
|
+
}
|
|
30
|
+
function _define_property(obj, key, value) {
|
|
31
|
+
if (key in obj) {
|
|
32
|
+
Object.defineProperty(obj, key, {
|
|
33
|
+
value: value,
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
writable: true
|
|
37
|
+
});
|
|
38
|
+
} else {
|
|
39
|
+
obj[key] = value;
|
|
40
|
+
}
|
|
41
|
+
return obj;
|
|
42
|
+
}
|
|
43
|
+
function _get_prototype_of(o) {
|
|
44
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
45
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
46
|
+
};
|
|
47
|
+
return _get_prototype_of(o);
|
|
48
|
+
}
|
|
49
|
+
function _inherits(subClass, superClass) {
|
|
50
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
51
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
52
|
+
}
|
|
53
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
54
|
+
constructor: {
|
|
55
|
+
value: subClass,
|
|
56
|
+
writable: true,
|
|
57
|
+
configurable: true
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
61
|
+
}
|
|
62
|
+
function _possible_constructor_return(self, call) {
|
|
63
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
64
|
+
return call;
|
|
65
|
+
}
|
|
66
|
+
return _assert_this_initialized(self);
|
|
67
|
+
}
|
|
68
|
+
function _set_prototype_of(o, p) {
|
|
69
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
70
|
+
o.__proto__ = p;
|
|
71
|
+
return o;
|
|
72
|
+
};
|
|
73
|
+
return _set_prototype_of(o, p);
|
|
74
|
+
}
|
|
75
|
+
function _type_of(obj) {
|
|
76
|
+
"@swc/helpers - typeof";
|
|
77
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
78
|
+
}
|
|
79
|
+
function _is_native_reflect_construct() {
|
|
80
|
+
try {
|
|
81
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
82
|
+
} catch (_) {}
|
|
83
|
+
return (_is_native_reflect_construct = function() {
|
|
84
|
+
return !!result;
|
|
85
|
+
})();
|
|
86
|
+
}
|
|
87
|
+
import { RuntimeControl } from '@byteluck-fe/model-driven-core';
|
|
88
|
+
import PieChartProperty from './property';
|
|
89
|
+
var PieChartControl = /*#__PURE__*/ function(RuntimeControl) {
|
|
90
|
+
"use strict";
|
|
91
|
+
_inherits(PieChartControl, RuntimeControl);
|
|
92
|
+
function PieChartControl(props) {
|
|
93
|
+
_class_call_check(this, PieChartControl);
|
|
94
|
+
var _this;
|
|
95
|
+
_this = _call_super(this, PieChartControl, [
|
|
96
|
+
props
|
|
97
|
+
]), _define_property(_this, "props", void 0);
|
|
98
|
+
_this.props = new PieChartProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
99
|
+
return _this;
|
|
100
|
+
}
|
|
101
|
+
_create_class(PieChartControl, null, [
|
|
102
|
+
{
|
|
103
|
+
key: "controlType",
|
|
104
|
+
get: function get() {
|
|
105
|
+
return 'pie-chart';
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
]);
|
|
109
|
+
return PieChartControl;
|
|
110
|
+
}(RuntimeControl);
|
|
111
|
+
export default PieChartControl;
|
|
112
|
+
export { PieChartControl as RuntimePieChartControl };
|
|
@@ -14,7 +14,8 @@ export { default as FormSelectButton } from './FormSelectButton';
|
|
|
14
14
|
export { default as ListSelectButton } from './ListSelectButton';
|
|
15
15
|
export { default as Pagination } from './Pagination';
|
|
16
16
|
export { default as Dashboard } from './Dashboard';
|
|
17
|
-
export { default as
|
|
17
|
+
export { default as BarChart } from './BarChart';
|
|
18
|
+
export { default as PieChart } from './PieChart';
|
|
18
19
|
export { default as ListViewSelect } from './ListViewSelect';
|
|
19
20
|
export { default as TextOcrButton } from './TextOcrButton';
|
|
20
21
|
export { default as InvoiceCheckButton } from './InvoiceCheckButton';
|