@byteluck-fe/model-driven-controls 7.0.0-props.103 → 7.0.0-props.105
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/baseControls/BarChart/property.js +33 -20
- package/dist/esm/baseControls/LineChart/property.js +33 -20
- package/dist/esm/baseControls/PieChart/property.js +29 -18
- package/dist/esm/baseControls/utils.js +61 -0
- package/dist/index.umd.js +1 -1
- package/dist/types/baseControls/BarChart/property.d.ts +17 -17
- package/dist/types/baseControls/LineChart/property.d.ts +17 -17
- package/dist/types/baseControls/PieChart/property.d.ts +15 -17
- package/dist/types/baseControls/utils.d.ts +9 -0
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MultistageFillingItem, Property, PropertyInterface,
|
|
1
|
+
import { MultistageFillingItem, Property, PropertyInterface, PropertyRules, DataSourceBind } from '@byteluck-fe/model-driven-core';
|
|
2
2
|
import { FONT_WEIGHT } from '../../framework';
|
|
3
|
-
|
|
3
|
+
import { RuleItem } from 'async-validator';
|
|
4
4
|
interface BarChartYFieldItem {
|
|
5
5
|
field: string;
|
|
6
6
|
name: string;
|
|
@@ -11,6 +11,12 @@ interface BarChartSeriesConfigItem {
|
|
|
11
11
|
*/
|
|
12
12
|
valueField?: string;
|
|
13
13
|
}
|
|
14
|
+
declare class BarChartPropertyRules extends PropertyRules {
|
|
15
|
+
xField: RuleItem;
|
|
16
|
+
yField: RuleItem;
|
|
17
|
+
seriesConfig: RuleItem;
|
|
18
|
+
constructor(props: BarChartProperty);
|
|
19
|
+
}
|
|
14
20
|
interface BarChartPropertyInterface extends PropertyInterface {
|
|
15
21
|
/**
|
|
16
22
|
* 标题
|
|
@@ -78,12 +84,6 @@ interface BarChartPropertyInterface extends PropertyInterface {
|
|
|
78
84
|
* @public
|
|
79
85
|
*/
|
|
80
86
|
template: string;
|
|
81
|
-
/**
|
|
82
|
-
* 数据模式;取值:static:静态数据;dynamic:动态数据源;
|
|
83
|
-
* @defaultValue 'static'
|
|
84
|
-
* @public
|
|
85
|
-
*/
|
|
86
|
-
dataMode: BarChartDataMode;
|
|
87
87
|
/**
|
|
88
88
|
* 图表 option JSON
|
|
89
89
|
* @defaultValue '{}'
|
|
@@ -98,16 +98,16 @@ interface BarChartPropertyInterface extends PropertyInterface {
|
|
|
98
98
|
optionConfig: 'datasource';
|
|
99
99
|
/**
|
|
100
100
|
* 数据源绑定
|
|
101
|
-
* @defaultValue new
|
|
101
|
+
* @defaultValue new DataSourceBind()
|
|
102
102
|
* @public
|
|
103
103
|
*/
|
|
104
|
-
datasourceBind:
|
|
104
|
+
datasourceBind: DataSourceBind;
|
|
105
105
|
/**
|
|
106
106
|
* 筛选项数据源绑定
|
|
107
|
-
* @defaultValue new
|
|
107
|
+
* @defaultValue new DataSourceBind()
|
|
108
108
|
* @public
|
|
109
109
|
*/
|
|
110
|
-
filterItemDatasourceBind:
|
|
110
|
+
filterItemDatasourceBind: DataSourceBind;
|
|
111
111
|
/**
|
|
112
112
|
* 多级填充
|
|
113
113
|
* @defaultValue []
|
|
@@ -146,6 +146,7 @@ interface BarChartPropertyInterface extends PropertyInterface {
|
|
|
146
146
|
seriesConfig: BarChartSeriesConfigItem[];
|
|
147
147
|
}
|
|
148
148
|
declare class BarChartProperty extends Property implements BarChartPropertyInterface {
|
|
149
|
+
static readonly Rules: typeof BarChartPropertyRules;
|
|
149
150
|
caption: string;
|
|
150
151
|
isHideCaption: boolean;
|
|
151
152
|
isShowCaptionTip: boolean;
|
|
@@ -157,11 +158,10 @@ declare class BarChartProperty extends Property implements BarChartPropertyInter
|
|
|
157
158
|
captionFontWeight: FONT_WEIGHT;
|
|
158
159
|
isHide: boolean;
|
|
159
160
|
template: string;
|
|
160
|
-
dataMode: BarChartDataMode;
|
|
161
161
|
optionJson: string;
|
|
162
162
|
optionConfig: 'datasource';
|
|
163
|
-
datasourceBind:
|
|
164
|
-
filterItemDatasourceBind:
|
|
163
|
+
datasourceBind: DataSourceBind;
|
|
164
|
+
filterItemDatasourceBind: DataSourceBind;
|
|
165
165
|
multistageFilling: MultistageFillingItem[];
|
|
166
166
|
defaultValue: string[];
|
|
167
167
|
openMultistageFilling: boolean;
|
|
@@ -171,5 +171,5 @@ declare class BarChartProperty extends Property implements BarChartPropertyInter
|
|
|
171
171
|
constructor(props?: Partial<BarChartProperty>);
|
|
172
172
|
}
|
|
173
173
|
export default BarChartProperty;
|
|
174
|
-
export type {
|
|
175
|
-
export { BarChartProperty };
|
|
174
|
+
export type { BarChartSeriesConfigItem, BarChartPropertyInterface, BarChartYFieldItem, };
|
|
175
|
+
export { BarChartProperty, BarChartPropertyRules };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MultistageFillingItem, Property, PropertyInterface,
|
|
1
|
+
import { MultistageFillingItem, Property, PropertyInterface, PropertyRules, DataSourceBind } from '@byteluck-fe/model-driven-core';
|
|
2
2
|
import { FONT_WEIGHT } from '../../framework';
|
|
3
|
-
|
|
3
|
+
import { RuleItem } from 'async-validator';
|
|
4
4
|
declare enum LineChartTemplate {
|
|
5
5
|
LINE_BASIC = "line-basic",
|
|
6
6
|
LINE_SMOOTH = "line-smooth",
|
|
@@ -14,6 +14,12 @@ interface LineChartSeriesConfigItem {
|
|
|
14
14
|
*/
|
|
15
15
|
valueField?: string;
|
|
16
16
|
}
|
|
17
|
+
declare class LineChartPropertyRules extends PropertyRules {
|
|
18
|
+
xField: RuleItem;
|
|
19
|
+
yField: RuleItem;
|
|
20
|
+
seriesConfig: RuleItem;
|
|
21
|
+
constructor(props: LineChartProperty);
|
|
22
|
+
}
|
|
17
23
|
interface LineChartPropertyInterface extends PropertyInterface {
|
|
18
24
|
/**
|
|
19
25
|
* 标题
|
|
@@ -81,12 +87,6 @@ interface LineChartPropertyInterface extends PropertyInterface {
|
|
|
81
87
|
* @public
|
|
82
88
|
*/
|
|
83
89
|
template: string;
|
|
84
|
-
/**
|
|
85
|
-
* 数据模式;取值:static:静态数据;dynamic:动态数据源;
|
|
86
|
-
* @defaultValue 'static'
|
|
87
|
-
* @public
|
|
88
|
-
*/
|
|
89
|
-
dataMode: LineChartDataMode;
|
|
90
90
|
/**
|
|
91
91
|
* 图表 option JSON
|
|
92
92
|
* @defaultValue '{}'
|
|
@@ -101,16 +101,16 @@ interface LineChartPropertyInterface extends PropertyInterface {
|
|
|
101
101
|
optionConfig: 'datasource';
|
|
102
102
|
/**
|
|
103
103
|
* 数据源绑定
|
|
104
|
-
* @defaultValue new
|
|
104
|
+
* @defaultValue new DataSourceBind()
|
|
105
105
|
* @public
|
|
106
106
|
*/
|
|
107
|
-
datasourceBind:
|
|
107
|
+
datasourceBind: DataSourceBind;
|
|
108
108
|
/**
|
|
109
109
|
* 筛选项数据源绑定
|
|
110
|
-
* @defaultValue new
|
|
110
|
+
* @defaultValue new DataSourceBind()
|
|
111
111
|
* @public
|
|
112
112
|
*/
|
|
113
|
-
filterItemDatasourceBind:
|
|
113
|
+
filterItemDatasourceBind: DataSourceBind;
|
|
114
114
|
/**
|
|
115
115
|
* 多级填充
|
|
116
116
|
* @defaultValue []
|
|
@@ -149,6 +149,7 @@ interface LineChartPropertyInterface extends PropertyInterface {
|
|
|
149
149
|
seriesConfig: LineChartSeriesConfigItem[];
|
|
150
150
|
}
|
|
151
151
|
declare class LineChartProperty extends Property implements LineChartPropertyInterface {
|
|
152
|
+
static readonly Rules: typeof LineChartPropertyRules;
|
|
152
153
|
caption: string;
|
|
153
154
|
isHideCaption: boolean;
|
|
154
155
|
isShowCaptionTip: boolean;
|
|
@@ -160,11 +161,10 @@ declare class LineChartProperty extends Property implements LineChartPropertyInt
|
|
|
160
161
|
captionFontWeight: FONT_WEIGHT;
|
|
161
162
|
isHide: boolean;
|
|
162
163
|
template: string;
|
|
163
|
-
dataMode: LineChartDataMode;
|
|
164
164
|
optionJson: string;
|
|
165
165
|
optionConfig: 'datasource';
|
|
166
|
-
datasourceBind:
|
|
167
|
-
filterItemDatasourceBind:
|
|
166
|
+
datasourceBind: DataSourceBind;
|
|
167
|
+
filterItemDatasourceBind: DataSourceBind;
|
|
168
168
|
multistageFilling: MultistageFillingItem[];
|
|
169
169
|
defaultValue: string[];
|
|
170
170
|
openMultistageFilling: boolean;
|
|
@@ -174,5 +174,5 @@ declare class LineChartProperty extends Property implements LineChartPropertyInt
|
|
|
174
174
|
constructor(props?: Partial<LineChartProperty>);
|
|
175
175
|
}
|
|
176
176
|
export default LineChartProperty;
|
|
177
|
-
export type {
|
|
178
|
-
export { LineChartProperty, LineChartTemplate };
|
|
177
|
+
export type { LineChartSeriesConfigItem, LineChartPropertyInterface };
|
|
178
|
+
export { LineChartProperty, LineChartTemplate, LineChartPropertyRules };
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { MultistageFillingItem, Property, PropertyInterface,
|
|
1
|
+
import { MultistageFillingItem, Property, PropertyInterface, PropertyRules, DataSourceBind } from '@byteluck-fe/model-driven-core';
|
|
2
2
|
import { FONT_WEIGHT } from '../../framework';
|
|
3
|
-
|
|
3
|
+
import { RuleItem } from 'async-validator';
|
|
4
4
|
type PieSeriesDataConfig = {
|
|
5
5
|
nameField?: string;
|
|
6
6
|
valueField?: string;
|
|
7
7
|
};
|
|
8
|
+
declare class PieChartPropertyRules extends PropertyRules {
|
|
9
|
+
seriesConfig: RuleItem;
|
|
10
|
+
constructor(props: PieChartProperty);
|
|
11
|
+
}
|
|
8
12
|
interface PieChartPropertyInterface extends PropertyInterface {
|
|
9
13
|
/**
|
|
10
14
|
* 标题
|
|
@@ -72,12 +76,6 @@ interface PieChartPropertyInterface extends PropertyInterface {
|
|
|
72
76
|
* @public
|
|
73
77
|
*/
|
|
74
78
|
template: string;
|
|
75
|
-
/**
|
|
76
|
-
* 数据模式;取值:static:静态数据;dynamic:动态数据源;
|
|
77
|
-
* @defaultValue 'static'
|
|
78
|
-
* @public
|
|
79
|
-
*/
|
|
80
|
-
dataMode: PieChartDataMode;
|
|
81
79
|
/**
|
|
82
80
|
* 图表 option JSON
|
|
83
81
|
* @defaultValue '{}'
|
|
@@ -92,16 +90,16 @@ interface PieChartPropertyInterface extends PropertyInterface {
|
|
|
92
90
|
optionConfig: 'datasource';
|
|
93
91
|
/**
|
|
94
92
|
* 数据源绑定
|
|
95
|
-
* @defaultValue new
|
|
93
|
+
* @defaultValue new DataSourceBind()
|
|
96
94
|
* @public
|
|
97
95
|
*/
|
|
98
|
-
datasourceBind:
|
|
96
|
+
datasourceBind: DataSourceBind;
|
|
99
97
|
/**
|
|
100
98
|
* 筛选项数据源绑定
|
|
101
|
-
* @defaultValue new
|
|
99
|
+
* @defaultValue new DataSourceBind()
|
|
102
100
|
* @public
|
|
103
101
|
*/
|
|
104
|
-
filterItemDatasourceBind:
|
|
102
|
+
filterItemDatasourceBind: DataSourceBind;
|
|
105
103
|
/**
|
|
106
104
|
* 多级填充
|
|
107
105
|
* @defaultValue []
|
|
@@ -128,6 +126,7 @@ interface PieChartPropertyInterface extends PropertyInterface {
|
|
|
128
126
|
seriesConfig: PieSeriesDataConfig[];
|
|
129
127
|
}
|
|
130
128
|
declare class PieChartProperty extends Property implements PieChartPropertyInterface {
|
|
129
|
+
static readonly Rules: typeof PieChartPropertyRules;
|
|
131
130
|
caption: string;
|
|
132
131
|
isHideCaption: boolean;
|
|
133
132
|
isShowCaptionTip: boolean;
|
|
@@ -139,11 +138,10 @@ declare class PieChartProperty extends Property implements PieChartPropertyInter
|
|
|
139
138
|
captionFontWeight: FONT_WEIGHT;
|
|
140
139
|
isHide: boolean;
|
|
141
140
|
template: string;
|
|
142
|
-
dataMode: PieChartDataMode;
|
|
143
141
|
optionJson: string;
|
|
144
142
|
optionConfig: 'datasource';
|
|
145
|
-
datasourceBind:
|
|
146
|
-
filterItemDatasourceBind:
|
|
143
|
+
datasourceBind: DataSourceBind;
|
|
144
|
+
filterItemDatasourceBind: DataSourceBind;
|
|
147
145
|
multistageFilling: MultistageFillingItem[];
|
|
148
146
|
defaultValue: string[];
|
|
149
147
|
openMultistageFilling: boolean;
|
|
@@ -151,5 +149,5 @@ declare class PieChartProperty extends Property implements PieChartPropertyInter
|
|
|
151
149
|
constructor(props?: Partial<PieChartProperty>);
|
|
152
150
|
}
|
|
153
151
|
export default PieChartProperty;
|
|
154
|
-
export type {
|
|
155
|
-
export { PieChartProperty };
|
|
152
|
+
export type { PieChartPropertyInterface, PieSeriesDataConfig };
|
|
153
|
+
export { PieChartProperty, PieChartPropertyRules };
|
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
import { RuleItem } from 'async-validator';
|
|
2
|
+
type ChartAxisKey = 'xAxis' | 'yAxis';
|
|
3
|
+
interface ChartOptionProps {
|
|
4
|
+
optionJson: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function isBlankChartField(value: unknown): boolean;
|
|
7
|
+
export declare function isCategoryChartAxis(optionJson: string, axisKey: ChartAxisKey): boolean;
|
|
8
|
+
export declare function createChartAxisFieldRule(props: ChartOptionProps, axisKey: ChartAxisKey, message: string): RuleItem;
|
|
9
|
+
export declare function createChartSeriesConfigRule(message: string): RuleItem;
|
|
2
10
|
export declare function createFillBindRules(): Record<string, RuleItem>;
|
|
11
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byteluck-fe/model-driven-controls",
|
|
3
|
-
"version": "7.0.0-props.
|
|
3
|
+
"version": "7.0.0-props.105",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "郝晨光 <2293885211@qq.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"@byteluck-fe/model-driven-shared": "7.0.0-props.101",
|
|
32
32
|
"async-validator": "3.5.1"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "3a1668f07097bce7a54ac4b2642c7a241b48aed3"
|
|
35
35
|
}
|