@byteluck-fe/model-driven-controls 7.0.0-props.103 → 7.0.0-props.104

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.
@@ -72,21 +72,38 @@ function _is_native_reflect_construct() {
72
72
  }
73
73
  /**
74
74
  * name: rok_bar_chart
75
- * description: 柱状图组件。用于展示静态或动态数据图表,支持模板选择、数据模式切换和字段映射,适合统计分析与看板展示场景。
75
+ * description: 柱状图组件。用于展示静态或动态数据图表,支持模板选择和字段映射,适合统计分析与看板展示场景。
76
76
  */ import BarChartControl from './designer';
77
- import { MultistageFillingItem, Property, TreeDataSourceBind } from '@byteluck-fe/model-driven-core';
77
+ import { MultistageFillingItem, Property, PropertyRules, DataSourceBind } from '@byteluck-fe/model-driven-core';
78
78
  import { FONT_WEIGHT } from '../../framework';
79
+ import { getLocaleText } from '@byteluck-fe/locale-message';
80
+ import { createChartAxisFieldRule, createChartSeriesConfigRule } from '../utils';
81
+ var BarChartPropertyRules = /*#__PURE__*/ function(PropertyRules) {
82
+ "use strict";
83
+ _inherits(BarChartPropertyRules, PropertyRules);
84
+ function BarChartPropertyRules(props) {
85
+ _class_call_check(this, BarChartPropertyRules);
86
+ var _this;
87
+ _this = _call_super(this, BarChartPropertyRules, [
88
+ props
89
+ ]), _define_property(_this, "xField", void 0), _define_property(_this, "yField", void 0), _define_property(_this, "seriesConfig", createChartSeriesConfigRule(getLocaleText('CMD.pleaseSelectSeriesValueField', null, '请绑定系列值字段')));
90
+ _this.xField = createChartAxisFieldRule(props, 'xAxis', getLocaleText('CMD.pleaseSelectXAxisField', null, '请绑定 X 轴字段'));
91
+ _this.yField = createChartAxisFieldRule(props, 'yAxis', getLocaleText('CMD.pleaseSelectYAxisField', null, '请绑定 Y 轴字段'));
92
+ return _this;
93
+ }
94
+ return BarChartPropertyRules;
95
+ }(PropertyRules);
79
96
  var BarChartProperty = /*#__PURE__*/ function(Property) {
80
97
  "use strict";
81
98
  _inherits(BarChartProperty, Property);
82
99
  function BarChartProperty(props) {
83
100
  _class_call_check(this, BarChartProperty);
84
101
  var _this;
85
- var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17;
102
+ var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14;
86
103
  var _props_multistageFilling;
87
104
  _this = _call_super(this, BarChartProperty, [
88
105
  props
89
- ]), _define_property(_this, "caption", void 0), _define_property(_this, "isHideCaption", void 0), _define_property(_this, "isShowCaptionTip", void 0), _define_property(_this, "labelPosition", void 0), _define_property(_this, "captionTip", void 0), _define_property(_this, "captionSize", void 0), _define_property(_this, "captionColor", void 0), _define_property(_this, "isCaptionItalic", void 0), _define_property(_this, "captionFontWeight", 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, "seriesConfig", void 0);
106
+ ]), _define_property(_this, "caption", void 0), _define_property(_this, "isHideCaption", void 0), _define_property(_this, "isShowCaptionTip", void 0), _define_property(_this, "labelPosition", void 0), _define_property(_this, "captionTip", void 0), _define_property(_this, "captionSize", void 0), _define_property(_this, "captionColor", void 0), _define_property(_this, "isCaptionItalic", void 0), _define_property(_this, "captionFontWeight", void 0), _define_property(_this, "isHide", void 0), _define_property(_this, "template", 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, "seriesConfig", void 0);
90
107
  _this.caption = (_ref = props === null || props === void 0 ? void 0 : props.caption) !== null && _ref !== void 0 ? _ref : BarChartControl.controlName;
91
108
  _this.isHideCaption = (_ref1 = props === null || props === void 0 ? void 0 : props.isHideCaption) !== null && _ref1 !== void 0 ? _ref1 : false;
92
109
  _this.isShowCaptionTip = (_ref2 = props === null || props === void 0 ? void 0 : props.isShowCaptionTip) !== null && _ref2 !== void 0 ? _ref2 : false;
@@ -98,25 +115,21 @@ var BarChartProperty = /*#__PURE__*/ function(Property) {
98
115
  _this.captionFontWeight = (_ref5 = props === null || props === void 0 ? void 0 : props.captionFontWeight) !== null && _ref5 !== void 0 ? _ref5 : FONT_WEIGHT.NORMAL;
99
116
  _this.isHide = (_ref6 = props === null || props === void 0 ? void 0 : props.isHide) !== null && _ref6 !== void 0 ? _ref6 : false;
100
117
  _this.template = (_ref7 = props === null || props === void 0 ? void 0 : props.template) !== null && _ref7 !== void 0 ? _ref7 : 'bar-basic';
101
- _this.dataMode = (_ref8 = props === null || props === void 0 ? void 0 : props.dataMode) !== null && _ref8 !== void 0 ? _ref8 : 'static';
102
- _this.optionJson = (_ref9 = props === null || props === void 0 ? void 0 : props.optionJson) !== null && _ref9 !== void 0 ? _ref9 : '{}';
103
- _this.datasourceBind = new TreeDataSourceBind((_ref10 = props === null || props === void 0 ? void 0 : props.datasourceBind) !== null && _ref10 !== void 0 ? _ref10 : {
104
- attributes: BarChartControl.controlCustomAttributes
105
- });
106
- _this.filterItemDatasourceBind = new TreeDataSourceBind((_ref11 = props === null || props === void 0 ? void 0 : props.filterItemDatasourceBind) !== null && _ref11 !== void 0 ? _ref11 : {
107
- attributes: BarChartControl.controlCustomAttributes
108
- });
109
- _this.multistageFilling = (_ref12 = props === null || props === void 0 ? void 0 : (_props_multistageFilling = props.multistageFilling) === null || _props_multistageFilling === void 0 ? void 0 : _props_multistageFilling.map(function(item) {
118
+ _this.optionJson = (_ref8 = props === null || props === void 0 ? void 0 : props.optionJson) !== null && _ref8 !== void 0 ? _ref8 : '{}';
119
+ _this.datasourceBind = new DataSourceBind(props === null || props === void 0 ? void 0 : props.datasourceBind);
120
+ _this.filterItemDatasourceBind = new DataSourceBind(props === null || props === void 0 ? void 0 : props.filterItemDatasourceBind);
121
+ _this.multistageFilling = (_ref9 = props === null || props === void 0 ? void 0 : (_props_multistageFilling = props.multistageFilling) === null || _props_multistageFilling === void 0 ? void 0 : _props_multistageFilling.map(function(item) {
110
122
  return new MultistageFillingItem(item);
111
- })) !== null && _ref12 !== void 0 ? _ref12 : [];
112
- _this.defaultValue = (_ref13 = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _ref13 !== void 0 ? _ref13 : [];
113
- _this.openMultistageFilling = (_ref14 = props === null || props === void 0 ? void 0 : props.openMultistageFilling) !== null && _ref14 !== void 0 ? _ref14 : false;
114
- _this.xField = (_ref15 = props === null || props === void 0 ? void 0 : props.xField) !== null && _ref15 !== void 0 ? _ref15 : '';
115
- _this.yField = (_ref16 = props === null || props === void 0 ? void 0 : props.yField) !== null && _ref16 !== void 0 ? _ref16 : '';
116
- _this.seriesConfig = (_ref17 = props === null || props === void 0 ? void 0 : props.seriesConfig) !== null && _ref17 !== void 0 ? _ref17 : [];
123
+ })) !== null && _ref9 !== void 0 ? _ref9 : [];
124
+ _this.defaultValue = (_ref10 = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _ref10 !== void 0 ? _ref10 : [];
125
+ _this.openMultistageFilling = (_ref11 = props === null || props === void 0 ? void 0 : props.openMultistageFilling) !== null && _ref11 !== void 0 ? _ref11 : false;
126
+ _this.xField = (_ref12 = props === null || props === void 0 ? void 0 : props.xField) !== null && _ref12 !== void 0 ? _ref12 : '';
127
+ _this.yField = (_ref13 = props === null || props === void 0 ? void 0 : props.yField) !== null && _ref13 !== void 0 ? _ref13 : '';
128
+ _this.seriesConfig = (_ref14 = props === null || props === void 0 ? void 0 : props.seriesConfig) !== null && _ref14 !== void 0 ? _ref14 : [];
117
129
  return _this;
118
130
  }
119
131
  return BarChartProperty;
120
132
  }(Property);
133
+ _define_property(BarChartProperty, "Rules", BarChartPropertyRules);
121
134
  export default BarChartProperty;
122
- export { BarChartProperty };
135
+ export { BarChartProperty, BarChartPropertyRules };
@@ -72,10 +72,12 @@ function _is_native_reflect_construct() {
72
72
  }
73
73
  /**
74
74
  * name: rok_line_chart
75
- * description: 折线图组件。用于展示静态或动态趋势数据图表,支持模板选择、数据模式切换和字段映射,适合趋势分析与看板展示场景。
75
+ * description: 折线图组件。用于展示静态或动态趋势数据图表,支持模板选择和字段映射,适合趋势分析与看板展示场景。
76
76
  */ import LineChartControl from './designer';
77
- import { MultistageFillingItem, Property, TreeDataSourceBind } from '@byteluck-fe/model-driven-core';
77
+ import { MultistageFillingItem, Property, PropertyRules, DataSourceBind } from '@byteluck-fe/model-driven-core';
78
78
  import { FONT_WEIGHT } from '../../framework';
79
+ import { getLocaleText } from '@byteluck-fe/locale-message';
80
+ import { createChartAxisFieldRule, createChartSeriesConfigRule } from '../utils';
79
81
  var LineChartTemplate = /*#__PURE__*/ function(LineChartTemplate) {
80
82
  LineChartTemplate["LINE_BASIC"] = "line-basic";
81
83
  LineChartTemplate["LINE_SMOOTH"] = "line-smooth";
@@ -84,17 +86,32 @@ var LineChartTemplate = /*#__PURE__*/ function(LineChartTemplate) {
84
86
  LineChartTemplate["LINE_STACKED_AREA"] = "line-stacked-area";
85
87
  return LineChartTemplate;
86
88
  }(LineChartTemplate || {});
89
+ var LineChartPropertyRules = /*#__PURE__*/ function(PropertyRules) {
90
+ "use strict";
91
+ _inherits(LineChartPropertyRules, PropertyRules);
92
+ function LineChartPropertyRules(props) {
93
+ _class_call_check(this, LineChartPropertyRules);
94
+ var _this;
95
+ _this = _call_super(this, LineChartPropertyRules, [
96
+ props
97
+ ]), _define_property(_this, "xField", void 0), _define_property(_this, "yField", void 0), _define_property(_this, "seriesConfig", createChartSeriesConfigRule(getLocaleText('CMD.pleaseSelectSeriesValueField', null, '请绑定系列值字段')));
98
+ _this.xField = createChartAxisFieldRule(props, 'xAxis', getLocaleText('CMD.pleaseSelectXAxisField', null, '请绑定 X 轴字段'));
99
+ _this.yField = createChartAxisFieldRule(props, 'yAxis', getLocaleText('CMD.pleaseSelectYAxisField', null, '请绑定 Y 轴字段'));
100
+ return _this;
101
+ }
102
+ return LineChartPropertyRules;
103
+ }(PropertyRules);
87
104
  var LineChartProperty = /*#__PURE__*/ function(Property) {
88
105
  "use strict";
89
106
  _inherits(LineChartProperty, Property);
90
107
  function LineChartProperty(props) {
91
108
  _class_call_check(this, LineChartProperty);
92
109
  var _this;
93
- var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17;
110
+ var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14;
94
111
  var _props_multistageFilling;
95
112
  _this = _call_super(this, LineChartProperty, [
96
113
  props
97
- ]), _define_property(_this, "caption", void 0), _define_property(_this, "isHideCaption", void 0), _define_property(_this, "isShowCaptionTip", void 0), _define_property(_this, "labelPosition", void 0), _define_property(_this, "captionTip", void 0), _define_property(_this, "captionSize", void 0), _define_property(_this, "captionColor", void 0), _define_property(_this, "isCaptionItalic", void 0), _define_property(_this, "captionFontWeight", 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, "seriesConfig", void 0);
114
+ ]), _define_property(_this, "caption", void 0), _define_property(_this, "isHideCaption", void 0), _define_property(_this, "isShowCaptionTip", void 0), _define_property(_this, "labelPosition", void 0), _define_property(_this, "captionTip", void 0), _define_property(_this, "captionSize", void 0), _define_property(_this, "captionColor", void 0), _define_property(_this, "isCaptionItalic", void 0), _define_property(_this, "captionFontWeight", void 0), _define_property(_this, "isHide", void 0), _define_property(_this, "template", 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, "seriesConfig", void 0);
98
115
  _this.caption = (_ref = props === null || props === void 0 ? void 0 : props.caption) !== null && _ref !== void 0 ? _ref : LineChartControl.controlName;
99
116
  _this.isHideCaption = (_ref1 = props === null || props === void 0 ? void 0 : props.isHideCaption) !== null && _ref1 !== void 0 ? _ref1 : false;
100
117
  _this.isShowCaptionTip = (_ref2 = props === null || props === void 0 ? void 0 : props.isShowCaptionTip) !== null && _ref2 !== void 0 ? _ref2 : false;
@@ -106,25 +123,21 @@ var LineChartProperty = /*#__PURE__*/ function(Property) {
106
123
  _this.captionFontWeight = (_ref5 = props === null || props === void 0 ? void 0 : props.captionFontWeight) !== null && _ref5 !== void 0 ? _ref5 : FONT_WEIGHT.NORMAL;
107
124
  _this.isHide = (_ref6 = props === null || props === void 0 ? void 0 : props.isHide) !== null && _ref6 !== void 0 ? _ref6 : false;
108
125
  _this.template = (_ref7 = props === null || props === void 0 ? void 0 : props.template) !== null && _ref7 !== void 0 ? _ref7 : "line-basic";
109
- _this.dataMode = (_ref8 = props === null || props === void 0 ? void 0 : props.dataMode) !== null && _ref8 !== void 0 ? _ref8 : 'static';
110
- _this.optionJson = (_ref9 = props === null || props === void 0 ? void 0 : props.optionJson) !== null && _ref9 !== void 0 ? _ref9 : '{}';
111
- _this.datasourceBind = new TreeDataSourceBind((_ref10 = props === null || props === void 0 ? void 0 : props.datasourceBind) !== null && _ref10 !== void 0 ? _ref10 : {
112
- attributes: LineChartControl.controlCustomAttributes
113
- });
114
- _this.filterItemDatasourceBind = new TreeDataSourceBind((_ref11 = props === null || props === void 0 ? void 0 : props.filterItemDatasourceBind) !== null && _ref11 !== void 0 ? _ref11 : {
115
- attributes: LineChartControl.controlCustomAttributes
116
- });
117
- _this.multistageFilling = (_ref12 = props === null || props === void 0 ? void 0 : (_props_multistageFilling = props.multistageFilling) === null || _props_multistageFilling === void 0 ? void 0 : _props_multistageFilling.map(function(item) {
126
+ _this.optionJson = (_ref8 = props === null || props === void 0 ? void 0 : props.optionJson) !== null && _ref8 !== void 0 ? _ref8 : '{}';
127
+ _this.datasourceBind = new DataSourceBind(props === null || props === void 0 ? void 0 : props.datasourceBind);
128
+ _this.filterItemDatasourceBind = new DataSourceBind(props === null || props === void 0 ? void 0 : props.filterItemDatasourceBind);
129
+ _this.multistageFilling = (_ref9 = props === null || props === void 0 ? void 0 : (_props_multistageFilling = props.multistageFilling) === null || _props_multistageFilling === void 0 ? void 0 : _props_multistageFilling.map(function(item) {
118
130
  return new MultistageFillingItem(item);
119
- })) !== null && _ref12 !== void 0 ? _ref12 : [];
120
- _this.defaultValue = (_ref13 = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _ref13 !== void 0 ? _ref13 : [];
121
- _this.openMultistageFilling = (_ref14 = props === null || props === void 0 ? void 0 : props.openMultistageFilling) !== null && _ref14 !== void 0 ? _ref14 : false;
122
- _this.xField = (_ref15 = props === null || props === void 0 ? void 0 : props.xField) !== null && _ref15 !== void 0 ? _ref15 : '';
123
- _this.yField = (_ref16 = props === null || props === void 0 ? void 0 : props.yField) !== null && _ref16 !== void 0 ? _ref16 : '';
124
- _this.seriesConfig = (_ref17 = props === null || props === void 0 ? void 0 : props.seriesConfig) !== null && _ref17 !== void 0 ? _ref17 : [];
131
+ })) !== null && _ref9 !== void 0 ? _ref9 : [];
132
+ _this.defaultValue = (_ref10 = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _ref10 !== void 0 ? _ref10 : [];
133
+ _this.openMultistageFilling = (_ref11 = props === null || props === void 0 ? void 0 : props.openMultistageFilling) !== null && _ref11 !== void 0 ? _ref11 : false;
134
+ _this.xField = (_ref12 = props === null || props === void 0 ? void 0 : props.xField) !== null && _ref12 !== void 0 ? _ref12 : '';
135
+ _this.yField = (_ref13 = props === null || props === void 0 ? void 0 : props.yField) !== null && _ref13 !== void 0 ? _ref13 : '';
136
+ _this.seriesConfig = (_ref14 = props === null || props === void 0 ? void 0 : props.seriesConfig) !== null && _ref14 !== void 0 ? _ref14 : [];
125
137
  return _this;
126
138
  }
127
139
  return LineChartProperty;
128
140
  }(Property);
141
+ _define_property(LineChartProperty, "Rules", LineChartPropertyRules);
129
142
  export default LineChartProperty;
130
- export { LineChartProperty, LineChartTemplate };
143
+ export { LineChartProperty, LineChartTemplate, LineChartPropertyRules };
@@ -72,9 +72,9 @@ function _is_native_reflect_construct() {
72
72
  }
73
73
  /**
74
74
  * name: rok_pie_chart
75
- * description: 饼图组件。用于展示静态或动态数据图表,支持模板选择、数据模式切换和字段映射,适合统计分析与看板展示场景。
75
+ * description: 饼图组件。用于展示静态或动态数据图表,支持模板选择和字段映射,适合统计分析与看板展示场景。
76
76
  */ import PieChartControl from './designer';
77
- import { MultistageFillingItem, Property, TreeDataSourceBind } from '@byteluck-fe/model-driven-core';
77
+ import { MultistageFillingItem, Property, DataSourceBind } from '@byteluck-fe/model-driven-core';
78
78
  import { FONT_WEIGHT } from '../../framework';
79
79
  var PieChartProperty = /*#__PURE__*/ function(Property) {
80
80
  "use strict";
@@ -82,11 +82,11 @@ var PieChartProperty = /*#__PURE__*/ function(Property) {
82
82
  function PieChartProperty(props) {
83
83
  _class_call_check(this, PieChartProperty);
84
84
  var _this;
85
- var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15;
85
+ var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12;
86
86
  var _props_multistageFilling;
87
87
  _this = _call_super(this, PieChartProperty, [
88
88
  props
89
- ]), _define_property(_this, "caption", void 0), _define_property(_this, "isHideCaption", void 0), _define_property(_this, "isShowCaptionTip", void 0), _define_property(_this, "labelPosition", void 0), _define_property(_this, "captionTip", void 0), _define_property(_this, "captionSize", void 0), _define_property(_this, "captionColor", void 0), _define_property(_this, "isCaptionItalic", void 0), _define_property(_this, "captionFontWeight", 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, "seriesConfig", void 0);
89
+ ]), _define_property(_this, "caption", void 0), _define_property(_this, "isHideCaption", void 0), _define_property(_this, "isShowCaptionTip", void 0), _define_property(_this, "labelPosition", void 0), _define_property(_this, "captionTip", void 0), _define_property(_this, "captionSize", void 0), _define_property(_this, "captionColor", void 0), _define_property(_this, "isCaptionItalic", void 0), _define_property(_this, "captionFontWeight", void 0), _define_property(_this, "isHide", void 0), _define_property(_this, "template", 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, "seriesConfig", void 0);
90
90
  _this.caption = (_ref = props === null || props === void 0 ? void 0 : props.caption) !== null && _ref !== void 0 ? _ref : PieChartControl.controlName;
91
91
  _this.isHideCaption = (_ref1 = props === null || props === void 0 ? void 0 : props.isHideCaption) !== null && _ref1 !== void 0 ? _ref1 : false;
92
92
  _this.isShowCaptionTip = (_ref2 = props === null || props === void 0 ? void 0 : props.isShowCaptionTip) !== null && _ref2 !== void 0 ? _ref2 : false;
@@ -98,20 +98,15 @@ var PieChartProperty = /*#__PURE__*/ function(Property) {
98
98
  _this.captionFontWeight = (_ref5 = props === null || props === void 0 ? void 0 : props.captionFontWeight) !== null && _ref5 !== void 0 ? _ref5 : FONT_WEIGHT.NORMAL;
99
99
  _this.isHide = (_ref6 = props === null || props === void 0 ? void 0 : props.isHide) !== null && _ref6 !== void 0 ? _ref6 : false;
100
100
  _this.template = (_ref7 = props === null || props === void 0 ? void 0 : props.template) !== null && _ref7 !== void 0 ? _ref7 : 'pie-rounded-ring';
101
- _this.dataMode = (_ref8 = props === null || props === void 0 ? void 0 : props.dataMode) !== null && _ref8 !== void 0 ? _ref8 : 'static';
102
- _this.optionJson = (_ref9 = props === null || props === void 0 ? void 0 : props.optionJson) !== null && _ref9 !== void 0 ? _ref9 : '{}';
103
- _this.datasourceBind = new TreeDataSourceBind((_ref10 = props === null || props === void 0 ? void 0 : props.datasourceBind) !== null && _ref10 !== void 0 ? _ref10 : {
104
- attributes: PieChartControl.controlCustomAttributes
105
- });
106
- _this.filterItemDatasourceBind = new TreeDataSourceBind((_ref11 = props === null || props === void 0 ? void 0 : props.filterItemDatasourceBind) !== null && _ref11 !== void 0 ? _ref11 : {
107
- attributes: PieChartControl.controlCustomAttributes
108
- });
109
- _this.multistageFilling = (_ref12 = props === null || props === void 0 ? void 0 : (_props_multistageFilling = props.multistageFilling) === null || _props_multistageFilling === void 0 ? void 0 : _props_multistageFilling.map(function(item) {
101
+ _this.optionJson = (_ref8 = props === null || props === void 0 ? void 0 : props.optionJson) !== null && _ref8 !== void 0 ? _ref8 : '{}';
102
+ _this.datasourceBind = new DataSourceBind(props === null || props === void 0 ? void 0 : props.datasourceBind);
103
+ _this.filterItemDatasourceBind = new DataSourceBind(props === null || props === void 0 ? void 0 : props.filterItemDatasourceBind);
104
+ _this.multistageFilling = (_ref9 = props === null || props === void 0 ? void 0 : (_props_multistageFilling = props.multistageFilling) === null || _props_multistageFilling === void 0 ? void 0 : _props_multistageFilling.map(function(item) {
110
105
  return new MultistageFillingItem(item);
111
- })) !== null && _ref12 !== void 0 ? _ref12 : [];
112
- _this.defaultValue = (_ref13 = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _ref13 !== void 0 ? _ref13 : [];
113
- _this.openMultistageFilling = (_ref14 = props === null || props === void 0 ? void 0 : props.openMultistageFilling) !== null && _ref14 !== void 0 ? _ref14 : false;
114
- _this.seriesConfig = (_ref15 = props === null || props === void 0 ? void 0 : props.seriesConfig) !== null && _ref15 !== void 0 ? _ref15 : [];
106
+ })) !== null && _ref9 !== void 0 ? _ref9 : [];
107
+ _this.defaultValue = (_ref10 = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _ref10 !== void 0 ? _ref10 : [];
108
+ _this.openMultistageFilling = (_ref11 = props === null || props === void 0 ? void 0 : props.openMultistageFilling) !== null && _ref11 !== void 0 ? _ref11 : false;
109
+ _this.seriesConfig = (_ref12 = props === null || props === void 0 ? void 0 : props.seriesConfig) !== null && _ref12 !== void 0 ? _ref12 : [];
115
110
  return _this;
116
111
  }
117
112
  return PieChartProperty;
@@ -1,4 +1,65 @@
1
+ function _type_of(obj) {
2
+ "@swc/helpers - typeof";
3
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
4
+ }
1
5
  import { getLocaleText } from '@byteluck-fe/locale-message';
6
+ function isObject(value) {
7
+ return value !== null && (typeof value === "undefined" ? "undefined" : _type_of(value)) === 'object' && !Array.isArray(value);
8
+ }
9
+ function parseChartOption(optionJson) {
10
+ if (!optionJson.trim()) {
11
+ return {};
12
+ }
13
+ try {
14
+ var option = JSON.parse(optionJson);
15
+ return isObject(option) ? option : {};
16
+ } catch (unused) {
17
+ return {};
18
+ }
19
+ }
20
+ function normalizeChartAxes(axis) {
21
+ if (Array.isArray(axis)) {
22
+ return axis;
23
+ }
24
+ return axis ? [
25
+ axis
26
+ ] : [];
27
+ }
28
+ export function isBlankChartField(value) {
29
+ return typeof value !== 'string' || value.trim() === '';
30
+ }
31
+ export function isCategoryChartAxis(optionJson, axisKey) {
32
+ var option = parseChartOption(optionJson);
33
+ return normalizeChartAxes(option[axisKey]).some(function(axis) {
34
+ return axis.type === 'category';
35
+ });
36
+ }
37
+ export function createChartAxisFieldRule(props, axisKey, message) {
38
+ return {
39
+ type: 'string',
40
+ validator: function validator(rule, value, callback) {
41
+ if (isCategoryChartAxis(props.optionJson, axisKey) && isBlankChartField(value)) {
42
+ callback(message);
43
+ return;
44
+ }
45
+ callback();
46
+ }
47
+ };
48
+ }
49
+ export function createChartSeriesConfigRule(message) {
50
+ return {
51
+ type: 'array',
52
+ validator: function validator(rule, value, callback) {
53
+ if (Array.isArray(value) && value.some(function(item) {
54
+ return isBlankChartField(item === null || item === void 0 ? void 0 : item.valueField);
55
+ })) {
56
+ callback(message);
57
+ return;
58
+ }
59
+ callback();
60
+ }
61
+ };
62
+ }
2
63
  export function createFillBindRules() {
3
64
  return {
4
65
  dataCode: {