@zgfe/business-lib 1.1.58 → 1.1.59-tags.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.
Files changed (54) hide show
  1. package/es/addToPanel/demo/index.js +8 -0
  2. package/es/addToPanel/index.js +3 -2
  3. package/es/assets/demo/picker.d.ts +2 -0
  4. package/es/assets/demo/picker.js +22 -0
  5. package/es/assets/styles/chunks.less +10 -5
  6. package/es/assets/styles/resetAntd.less +1 -8
  7. package/es/assets/styles/variable.less +3 -0
  8. package/es/attrCondition/styles/index.less +0 -1
  9. package/es/attrConditions/styles/index.less +3 -5
  10. package/es/attributeSelector/index.js +1 -1
  11. package/es/attributeSelector/styles/index.less +4 -0
  12. package/es/chart/demo/data/data.js +1 -1
  13. package/es/chart/demo/pie.js +2 -4
  14. package/es/chart/index.js +1 -1
  15. package/es/chart/types.d.ts +3 -0
  16. package/es/chart/util/chartOptionConfig.d.ts +1 -1
  17. package/es/chart/util/chartOptionConfig.js +23 -4
  18. package/es/chart/util/formatData.d.ts +3 -0
  19. package/es/chart/util/formatData.js +4 -1
  20. package/es/demoWrapper/head.d.ts +1 -0
  21. package/es/demoWrapper/head.js +8 -2
  22. package/es/demoWrapper/index.js +4 -1
  23. package/es/eventSelector/demo/index.js +1 -6
  24. package/es/eventSelector/index.js +1 -1
  25. package/es/eventSelector/styles/index.less +5 -1
  26. package/es/index.d.ts +2 -1
  27. package/es/index.js +2 -1
  28. package/es/layout/optionTitle/demo/page.d.ts +2 -0
  29. package/es/layout/optionTitle/demo/page.js +5 -0
  30. package/es/layout/optionTitle/index.js +25 -11
  31. package/es/layout/optionTitle/layout.js +1 -1
  32. package/es/layout/optionTitle/styles/index.less +14 -0
  33. package/es/layout/optionTitle/types.d.ts +2 -2
  34. package/es/quickDatePicker/demo/index.d.ts +3 -0
  35. package/es/quickDatePicker/demo/index.js +35 -0
  36. package/es/quickDatePicker/index.d.ts +6 -0
  37. package/es/quickDatePicker/index.js +178 -0
  38. package/es/quickDatePicker/styles/index.less +124 -0
  39. package/es/quickDatePicker/types.d.ts +24 -0
  40. package/es/quickDatePicker/types.js +1 -0
  41. package/es/quickDatePicker/utils.d.ts +10 -0
  42. package/es/quickDatePicker/utils.js +42 -0
  43. package/es/targetConditionGroup/styles/index.less +3 -0
  44. package/es/targetSelector/styles/index.less +3 -0
  45. package/es/userGroup/index.js +10 -2
  46. package/es/userGroup/styles/index.less +3 -1
  47. package/es/userTagsSelector/cascaderOverlay.js +25 -2
  48. package/es/userTagsSelector/demo/index.js +1 -1
  49. package/es/userTagsSelector/index.js +4 -2
  50. package/es/utils/ajax.js +20 -8
  51. package/es/utils/demo/ajax.js +1 -2
  52. package/es/utils/demo/interruption.d.ts +2 -0
  53. package/es/utils/demo/interruption.js +38 -0
  54. package/package.json +2 -2
@@ -15,6 +15,10 @@ var chartTypes = [{
15
15
  label: '汇总图',
16
16
  value: 'bar',
17
17
  icon: 'huizongtu'
18
+ }, {
19
+ label: '占比图',
20
+ value: 'pie',
21
+ icon: 'huizongtu'
18
22
  }, {
19
23
  label: '地图',
20
24
  value: 'map',
@@ -32,6 +36,10 @@ var chartTypes = [{
32
36
  label: '汇总图',
33
37
  value: 'bar',
34
38
  icon: 'huizongtu'
39
+ }, {
40
+ label: '占比图',
41
+ value: 'pie',
42
+ icon: 'huizongtu'
35
43
  }]
36
44
  }, {
37
45
  label: '分数',
@@ -43,6 +43,7 @@ var BizAddToPanel = function BizAddToPanel(props) {
43
43
  router = _useContext.router,
44
44
  routes = _useContext.routes,
45
45
  isDemo = _useContext.isDemo;
46
+ var showTypes = ['line', 'bar', 'pie'];
46
47
  useEffect(function () {
47
48
  queryGroups();
48
49
  }, []);
@@ -166,8 +167,8 @@ var BizAddToPanel = function BizAddToPanel(props) {
166
167
  }
167
168
  return /*#__PURE__*/React.createElement(BizDialog, {
168
169
  open: true,
170
+ width: "auto",
169
171
  title: props.type === 'edit' ? '修改当前看板指标' : '向看板添加指标',
170
- width: 503,
171
172
  maskClosable: false,
172
173
  onCancel: props.onCancel,
173
174
  onOk: onAdd,
@@ -249,7 +250,7 @@ var BizAddToPanel = function BizAddToPanel(props) {
249
250
  }, function (_ref) {
250
251
  var getFieldValue = _ref.getFieldValue;
251
252
  var type = getFieldValue('chartType');
252
- return type === 'line' || type === 'bar' ? /*#__PURE__*/React.createElement(Form.Item, {
253
+ return showTypes.indexOf(type) > -1 ? /*#__PURE__*/React.createElement(Form.Item, {
253
254
  label: "\u663E\u793A",
254
255
  name: "showList",
255
256
  colon: false,
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,22 @@
1
+ import { Card, DatePicker, Space } from 'antd';
2
+ import React from 'react';
3
+ import AssetsDemo from '.';
4
+ var RangePicker = DatePicker.RangePicker;
5
+ export default (function () {
6
+ return /*#__PURE__*/React.createElement(AssetsDemo, null, /*#__PURE__*/React.createElement(Card, {
7
+ title: "Input"
8
+ }, /*#__PURE__*/React.createElement(Space, {
9
+ direction: "vertical",
10
+ size: 12
11
+ }, /*#__PURE__*/React.createElement(RangePicker, null), /*#__PURE__*/React.createElement(RangePicker, {
12
+ showTime: true
13
+ }), /*#__PURE__*/React.createElement(RangePicker, {
14
+ picker: "week"
15
+ }), /*#__PURE__*/React.createElement(RangePicker, {
16
+ picker: "month"
17
+ }), /*#__PURE__*/React.createElement(RangePicker, {
18
+ picker: "quarter"
19
+ }), /*#__PURE__*/React.createElement(RangePicker, {
20
+ picker: "year"
21
+ }))));
22
+ });
@@ -25,10 +25,15 @@
25
25
 
26
26
  // 下拉组件操作栏样式
27
27
  .__select-handle {
28
- padding: @padding-xss;
29
- border: 1px solid @border-color-base;
28
+ // padding: @padding-xss;
29
+ // border: 1px solid @border-color-base;
30
+ background: @custom-background;
31
+ border: 1px solid @custom-background;
30
32
  border-radius: @border-radius-small;
31
33
  cursor: pointer;
34
+ &:hover {
35
+ border: 1px solid @primary-color;
36
+ }
32
37
  }
33
38
 
34
39
  // 下拉组件展开panel样式
@@ -118,7 +123,7 @@
118
123
  .__default-overflow();
119
124
 
120
125
  &:hover:not(.disable) {
121
- background-color: @background-color-base;
126
+ // background-color: @background-color-base;
122
127
  border-color: @primary-color;
123
128
  box-shadow: none;
124
129
  }
@@ -132,14 +137,14 @@
132
137
 
133
138
  // 下拉框常用样式
134
139
  .__select-normal-secondary {
135
- background-color: @white;
140
+ // background-color: @white;
136
141
  border: 1px solid @border-color-base;
137
142
  border-radius: @border-radius-small;
138
143
 
139
144
  &:not(.disable) {
140
145
  &:hover,
141
146
  &.active {
142
- .__default-hover();
147
+ // .__default-hover();
143
148
  border-color: @border-color-base;
144
149
  box-shadow: none;
145
150
  }
@@ -162,14 +162,7 @@
162
162
 
163
163
  &:hover:not(.ant-picker-disabled),
164
164
  &.ant-picker-focused {
165
- .__default-hover() !important;
166
- border-color: @border-color-base!important;
167
- box-shadow: none !important;
168
-
169
- span,
170
- input {
171
- color: @primary-color!important;
172
- }
165
+ border-color: @primary-color!important;
173
166
  }
174
167
 
175
168
  .ant-picker-active-bar {
@@ -12,3 +12,6 @@
12
12
  @box-shadow-small: 0px 1px 2px @shadow-color-light;
13
13
  @primary-color-hover: color(~`colorPalette('@{primary-color}', 0.1) `);
14
14
  @box-shadow-form: 0 0 0 4px @primary-color-hover;
15
+ @custom-background: #fafafb;
16
+ @custom-focus: #f0f7ff;
17
+ @primary-color: '#165dff';
@@ -13,7 +13,6 @@
13
13
  .biz-attr-select-handle {
14
14
  width: 184px;
15
15
  padding: 0;
16
- border: none;
17
16
  }
18
17
  .ant-space-item:nth-of-type(3) {
19
18
  min-width: 184px;
@@ -2,9 +2,9 @@
2
2
 
3
3
  /* 筛选条件 */
4
4
  .biz-condition-item {
5
- &.border {
6
- .__select-handle();
7
- }
5
+ // &.border {
6
+ // .__select-handle();
7
+ // }
8
8
  &-panel {
9
9
  display: flex;
10
10
  width: 100%;
@@ -19,8 +19,6 @@
19
19
  .biz-attr-select-handle {
20
20
  margin-bottom: 2px;
21
21
  padding: 0;
22
- border: none;
23
- border-radius: 0;
24
22
  }
25
23
 
26
24
  .ant-input {
@@ -83,7 +83,7 @@ var BizAttributeSelector = function BizAttributeSelector(props) {
83
83
  setVisible(flag);
84
84
  };
85
85
  return /*#__PURE__*/React.createElement("div", {
86
- className: classPrefix
86
+ className: "".concat(classPrefix, " ").concat(visible ? 'focus' : '')
87
87
  }, /*#__PURE__*/React.createElement("div", {
88
88
  className: "".concat(classPrefix, "-handle")
89
89
  }, /*#__PURE__*/React.createElement(Dropdown, {
@@ -1,6 +1,10 @@
1
1
  @import '../../assets/styles/inner.less';
2
2
 
3
3
  .biz-attr-select {
4
+ border-radius: 4px;
5
+ &.focus {
6
+ box-shadow: 0 0 0 4px @custom-focus;
7
+ }
4
8
  &-handle {
5
9
  display: flex;
6
10
  flex-direction: row;
@@ -1,7 +1,7 @@
1
1
  export default {
2
2
  x_axis: ['2022-03-31', '2022-04-01', '2022-04-02', '2022-04-03', '2022-04-04', '2022-04-05', '2022-04-06', '2022-04-07', '2022-04-08', '2022-04-09', '2022-04-10', '2022-04-11', '2022-04-12', '2022-04-13'],
3
3
  series: [{
4
- names: ['付款成功'],
4
+ names: ['付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功'],
5
5
  values: [26, 27, 43, 44, 40, 34, 33, 33, 34, 24, 30, 31, 31, 38]
6
6
  }, {
7
7
  names: ['注册-发送手机验证码'],
@@ -6,9 +6,7 @@ export default (function () {
6
6
  data: pieData,
7
7
  type: "pie",
8
8
  showAll: false,
9
- legendPosition: "bottom",
10
- legendOrient: "vertical",
11
- colors: ['#1D9ED1', '#F383A2', '#9FB40F', '#FF6B3B', '#8C8C47'],
12
- showList: ['付款成功', '搜索商品', '查看商品详情', 'click']
9
+ showList: ['搜索商品', '查看商品详情', 'pv', 'scroll'],
10
+ radius: ['30%', '75%']
13
11
  });
14
12
  });
package/es/chart/index.js CHANGED
@@ -56,7 +56,7 @@ var BizChart = /*#__PURE__*/React.forwardRef(function (props, ref) {
56
56
  if (!data) return eOption;
57
57
  if (type === 'pie') {
58
58
  var rData = formatPieData(data, showAll, showList);
59
- eOption = getPieOption(rData, legendPosition, legendOrient, tooltipFormatter);
59
+ eOption = getPieOption(rData, legendPosition, legendOrient, props.showLabel, props.radius, props.center, tooltipFormatter);
60
60
  } else if (type === 'line' || type === 'bar') {
61
61
  var _rData = formatChartData(data, showAll, showList, reverseXAxis, colors);
62
62
  eOption = getChartOption(type, _rData, legendPosition, legendOrient, valueUnit, xRotate, yRotate, tooltipFormatter, xAxisFormatter, yAxisFormatter, legendFormatter, reverseXAxis, seriesName);
@@ -29,6 +29,9 @@ export declare namespace ChartTypes {
29
29
  isCity?: boolean;
30
30
  userGroup?: string;
31
31
  colors?: string[];
32
+ showLabel?: boolean;
33
+ radius?: string | number | Array<string | number>;
34
+ center?: Array<string | number>;
32
35
  tooltipFormatter?: (param: any) => string;
33
36
  xAxisFormatter?: (param: any) => string;
34
37
  yAxisFormatter?: (param: any) => string;
@@ -17,7 +17,7 @@ export declare const xAxisConfig: XAXisOption;
17
17
  export declare const yAxisConfig: YAXisOption;
18
18
  export declare const tooltipConfig: TooltipComponentOption;
19
19
  export declare const getChartOption: (chartType: string, data: ChartTypes.Value, legendPosition?: 'top' | 'bottom' | 'middle', legendOrient?: 'horizontal' | 'vertical', unit?: string, xRotate?: number, yRotate?: number, tooltipFormatter?: ((value: any) => string) | undefined, xAxisFormatter?: ((value: any) => string) | undefined, yAxisFormatter?: ((value: any) => string) | undefined, legendFormatter?: ((value: any) => string) | undefined, reverseXAxis?: boolean, seriesName?: string) => EChartsOption;
20
- export declare const getPieOption: (seriesData?: object[], legendPosition?: 'top' | 'bottom' | 'middle', legendOrient?: 'horizontal' | 'vertical', tooltipFormatter?: ((value: any) => string) | undefined) => EChartsOption;
20
+ export declare const getPieOption: (seriesData?: object[], legendPosition?: 'top' | 'bottom' | 'middle', legendOrient?: 'horizontal' | 'vertical', showLabel?: boolean, radius?: string | number | Array<string | number>, center?: Array<string | number>, tooltipFormatter?: ((value: any) => string) | undefined, legendFormatter?: ((value: any) => string) | undefined) => EChartsOption;
21
21
  export declare const getMapOption: (seriesData: object[] | undefined, maxMinValue: {
22
22
  min: number;
23
23
  max: number;
@@ -7,6 +7,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
7
7
  import { tooltipFormatterDefault, xAxisFormatterDefault, yAxisFormatterDefault, mapTooltipFormatter, legendFormatterDefault } from './formatOption';
8
8
  import { chartColors } from './color';
9
9
  import '../styles/index.less';
10
+ import { util } from '../../utils';
10
11
  export var baseConfig = {
11
12
  color: chartColors,
12
13
  backgroundColor: '#fff',
@@ -26,6 +27,7 @@ export var legendConfig = {
26
27
  itemHeight: 10,
27
28
  itemWidth: 10,
28
29
  itemGap: 21,
30
+ z: 10,
29
31
  textStyle: {
30
32
  color: '#5F6085',
31
33
  height: 10,
@@ -36,7 +38,6 @@ export var legendConfig = {
36
38
  }
37
39
  },
38
40
  formatter: ['{a|{name}}'].join('\n'),
39
- pageIconSize: 10,
40
41
  pageTextStyle: {
41
42
  color: '#5F6085'
42
43
  },
@@ -200,12 +201,29 @@ export var getPieOption = function getPieOption() {
200
201
  var seriesData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
201
202
  var legendPosition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
202
203
  var legendOrient = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'horizontal';
203
- var tooltipFormatter = arguments.length > 3 ? arguments[3] : undefined;
204
+ var showLabel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
205
+ var radius = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [0, '75%'];
206
+ var center = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : ['50%', '55%'];
207
+ var tooltipFormatter = arguments.length > 6 ? arguments[6] : undefined;
208
+ var legendFormatter = arguments.length > 7 ? arguments[7] : undefined;
204
209
  var series = [{
205
210
  type: 'pie',
206
211
  data: seriesData,
207
212
  label: {
208
- show: false
213
+ show: showLabel,
214
+ color: 'inherit',
215
+ formatter: function formatter(params) {
216
+ return util.strMiddleSplit(params.name);
217
+ }
218
+ },
219
+ radius: radius,
220
+ center: center,
221
+ emphasis: {
222
+ itemStyle: {
223
+ shadowBlur: 10,
224
+ shadowOffsetX: 0,
225
+ shadowColor: 'rgba(0, 0, 0, 0.1)'
226
+ }
209
227
  }
210
228
  }];
211
229
  var tooltip = JSON.parse(JSON.stringify(tooltipConfig)),
@@ -220,6 +238,7 @@ export var getPieOption = function getPieOption() {
220
238
  legend.width = 50;
221
239
  grid.left = '10%';
222
240
  }
241
+ legend.formatter = legendFormatter ? legendFormatter : legendFormatterDefault;
223
242
  tooltip.trigger = 'item';
224
243
  if (tooltipFormatter) {
225
244
  tooltip.formatter = tooltipFormatter;
@@ -228,7 +247,7 @@ export var getPieOption = function getPieOption() {
228
247
  var name = params.name,
229
248
  value = params.value,
230
249
  color = params.color;
231
- return "<div class=\"biz-chart-tooltip-item\">\n <span class=\"biz-chart-tooltip-content\">\n <span class=\"biz-tooltip-marker\" style=\"background:".concat(color, "\"></span>").concat(name, "\n </span> \n <span class=\"biz-chart-tooltip-value\">").concat(value, "</span>\n </div>");
250
+ return "<div class=\"biz-chart-tooltip-item\">\n <div class=\"biz-chart-tooltip-content\">\n <span class=\"biz-tooltip-marker\" style=\"background:".concat(color, "\"></span>\n <div class=\"biz-tooltip-name\">").concat(name, "</div>\n </div> \n <span class=\"biz-chart-tooltip-value\">").concat(value, "</span>\n </div>");
232
251
  };
233
252
  }
234
253
  return _objectSpread(_objectSpread({}, baseConfig), {}, {
@@ -2,6 +2,9 @@ import { ChartTypes } from '../types';
2
2
  export declare const formatPieData: (data: ChartTypes.Value, showAll?: boolean, showList?: Array<any>) => {
3
3
  name: string;
4
4
  value: number;
5
+ itemStyle: {
6
+ color: string;
7
+ };
5
8
  }[];
6
9
  export declare const formatChartData: (data: ChartTypes.Value, showAll?: boolean, showList?: Array<any>, reverseXAxis?: boolean, color?: string[]) => {
7
10
  x_axis: string[];
@@ -5,7 +5,10 @@ export var formatPieData = function formatPieData(data, showAll, showList) {
5
5
  var list = [];
6
6
  var other = {
7
7
  name: '其它',
8
- value: 0
8
+ value: 0,
9
+ itemStyle: {
10
+ color: '#ccd0d4'
11
+ }
9
12
  };
10
13
  data.series.forEach(function (item) {
11
14
  var series = {
@@ -4,5 +4,6 @@ declare const DemoHeader: React.FC<{
4
4
  defaultApp?: number;
5
5
  onChangeApp?: (app: AppInfoProps) => void;
6
6
  onLoading?: (loading: boolean) => void;
7
+ onLogin?: () => void;
7
8
  }>;
8
9
  export default DemoHeader;
@@ -4,13 +4,14 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
5
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import { Select, Skeleton } from 'antd';
7
+ import { Select, Skeleton, message } from 'antd';
8
8
  import React, { useEffect, useState } from 'react';
9
9
  import request from '../utils/ajax';
10
10
  var DemoHeader = function DemoHeader(_ref) {
11
11
  var defaultApp = _ref.defaultApp,
12
12
  onChangeApp = _ref.onChangeApp,
13
- onLoading = _ref.onLoading;
13
+ onLoading = _ref.onLoading,
14
+ onLogin = _ref.onLogin;
14
15
  var _useState = useState([]),
15
16
  _useState2 = _slicedToArray(_useState, 2),
16
17
  appList = _useState2[0],
@@ -28,6 +29,11 @@ var DemoHeader = function DemoHeader(_ref) {
28
29
  function queryAppList() {
29
30
  setLoading(true);
30
31
  request('/zg/web/v2/data/v2ajaxGetDataByApp').then(function (res) {
32
+ if (!res.data) {
33
+ message.error('获取应用列表失败,请重新登录');
34
+ onLogin && onLogin();
35
+ return;
36
+ }
31
37
  setAppList(res.data.appList);
32
38
  if (defaultApp) {
33
39
  _onChange(res.data.appList.find(function (item) {
@@ -60,7 +60,10 @@ var DemoWrapper = function DemoWrapper(_ref) {
60
60
  title: /*#__PURE__*/React.createElement(DemoHeader, {
61
61
  defaultApp: defaultApp,
62
62
  onChangeApp: setApp,
63
- onLoading: setAppListLoading
63
+ onLoading: setAppListLoading,
64
+ onLogin: function onLogin() {
65
+ return setNotLogin(true);
66
+ }
64
67
  }),
65
68
  className: className,
66
69
  bodyStyle: {
@@ -25,12 +25,7 @@ var EventDemo = function EventDemo() {
25
25
  var onChange = function onChange(data) {
26
26
  setValue(data);
27
27
  };
28
- return /*#__PURE__*/React.createElement("div", {
29
- style: {
30
- height: '500px',
31
- overflow: 'auto'
32
- }
33
- }, /*#__PURE__*/React.createElement("div", {
28
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
34
29
  style: {
35
30
  height: '700px'
36
31
  }
@@ -100,7 +100,7 @@ var BizEventSelector = function BizEventSelector(props) {
100
100
  setVisible(flag);
101
101
  };
102
102
  return /*#__PURE__*/React.createElement("div", {
103
- className: [classPrefix, border ? 'border' : ''].join(' ')
103
+ className: [classPrefix, border ? 'border' : '', visible ? 'focus' : ''].join(' ')
104
104
  }, /*#__PURE__*/React.createElement(Dropdown, {
105
105
  dropdownRender: function dropdownRender() {
106
106
  return /*#__PURE__*/React.createElement(EventListPanel, {
@@ -1,12 +1,16 @@
1
1
  @import '../../assets/styles/inner.less';
2
2
 
3
3
  .biz-event-select {
4
+ position: relative;
5
+ border-radius: 4px;
6
+ &.focus {
7
+ box-shadow: 0 0 0 4px @custom-focus;
8
+ }
4
9
  &.border {
5
10
  .biz-event-select-handle {
6
11
  .__select-handle();
7
12
  }
8
13
  }
9
- position: relative;
10
14
  &-list-panel {
11
15
  display: flex;
12
16
  flex-direction: row;
package/es/index.d.ts CHANGED
@@ -8,6 +8,7 @@ import BizTargetCondition from './targetConditionGroup';
8
8
  import BizConditionItem from './attrConditions';
9
9
  import BizConditionGroup from './attrConditions/group';
10
10
  import BizDatePicker from './datePicker';
11
+ import BizQuickDatePicker from './quickDatePicker';
11
12
  import BizSelect from './select';
12
13
  import BizDialog from './dialog';
13
14
  import BizChart from './chart';
@@ -34,7 +35,7 @@ import BizAttrCondition from './attrCondition';
34
35
  import BizAttrConditionGroup from './attrCondition/group';
35
36
  import BizTargetFromPanel from './layout/optionTitle';
36
37
  import { BizTargetFromPanelContext } from './layout/optionTitle/types';
37
- export { BizTargetFromPanel, BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizDetailLayout, BizUserGroup, IconFont, ColorIcon, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetFromPanelContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizAttrCondition, BizAttrConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, BizLoginForm, DemoWrapper, SocketClient, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig, };
38
+ export { BizTargetFromPanel, BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizDetailLayout, BizUserGroup, IconFont, ColorIcon, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetFromPanelContext, BizTargetCondition, BizDatePicker, BizQuickDatePicker, BizConditionItem, BizConditionGroup, BizAttrCondition, BizAttrConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, BizLoginForm, DemoWrapper, SocketClient, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig, };
38
39
  export type { UserGroupTypes } from './userGroup/types';
39
40
  export type { BizSelectTypes } from './select/types';
40
41
  export type { AttributeSelect } from './attributeSelector/types';
package/es/index.js CHANGED
@@ -7,6 +7,7 @@ import BizTargetCondition from './targetConditionGroup';
7
7
  import BizConditionItem from './attrConditions';
8
8
  import BizConditionGroup from './attrConditions/group';
9
9
  import BizDatePicker from './datePicker';
10
+ import BizQuickDatePicker from './quickDatePicker';
10
11
  import BizSelect from './select';
11
12
  import BizDialog from './dialog';
12
13
  import BizChart from './chart';
@@ -33,4 +34,4 @@ import BizAttrCondition from './attrCondition';
33
34
  import BizAttrConditionGroup from './attrCondition/group';
34
35
  import BizTargetFromPanel from './layout/optionTitle';
35
36
  import { BizTargetFromPanelContext } from './layout/optionTitle/types';
36
- export { BizTargetFromPanel, BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizDetailLayout, BizUserGroup, IconFont, ColorIcon, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetFromPanelContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizAttrCondition, BizAttrConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, BizLoginForm, DemoWrapper, SocketClient, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig };
37
+ export { BizTargetFromPanel, BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizDetailLayout, BizUserGroup, IconFont, ColorIcon, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetFromPanelContext, BizTargetCondition, BizDatePicker, BizQuickDatePicker, BizConditionItem, BizConditionGroup, BizAttrCondition, BizAttrConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, BizLoginForm, DemoWrapper, SocketClient, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig };
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import BizTargetFromPanel from '..';
3
+ export default (function () {
4
+ return /*#__PURE__*/React.createElement(BizTargetFromPanel, null, /*#__PURE__*/React.createElement("div", null, "\u65E0\u64CD\u4F5C\u680F\u5C55\u793A"));
5
+ });
@@ -19,12 +19,12 @@ import Apis from '../../constants/apis';
19
19
  import { Spin, message } from 'antd';
20
20
  export var classPrefix = 'biz-layout-panel';
21
21
  var BizTargetFromPanel = function BizTargetFromPanel(props) {
22
- var _props$value$target$p;
22
+ var _props$value, _props$value10, _props$value$target$p;
23
23
  var _useState = useState([]),
24
24
  _useState2 = _slicedToArray(_useState, 2),
25
25
  options = _useState2[0],
26
26
  setOptions = _useState2[1];
27
- var _useState3 = useState(props.value.target.name || '洞察'),
27
+ var _useState3 = useState(((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.target.name) || '洞察'),
28
28
  _useState4 = _slicedToArray(_useState3, 2),
29
29
  title = _useState4[0],
30
30
  setTitle = _useState4[1];
@@ -42,11 +42,14 @@ var BizTargetFromPanel = function BizTargetFromPanel(props) {
42
42
  setLoading = _useState10[1];
43
43
  var titleRef = useRef(null);
44
44
  useEffect(function () {
45
- setOptions(props.value.target.id ? panelBtn(onClick) : panelCreateBtn(onClick));
45
+ var _props$value2, _props$value3;
46
+ if (!((_props$value2 = props.value) === null || _props$value2 === void 0 ? void 0 : _props$value2.panelId)) return;
47
+ setOptions(((_props$value3 = props.value) === null || _props$value3 === void 0 ? void 0 : _props$value3.target.id) ? panelBtn(onClick) : panelCreateBtn(onClick));
46
48
  }, []);
47
49
  var onClick = function onClick(type) {
48
50
  if (type === BizOptionTitleProps.OptionTypes.CANCEL) {
49
- var param = props.value.target.id ? {
51
+ var _props$value4;
52
+ var param = ((_props$value4 = props.value) === null || _props$value4 === void 0 ? void 0 : _props$value4.target.id) ? {
50
53
  panelId: props.value.panelId,
51
54
  elementId: props.value.target.id,
52
55
  name: title
@@ -62,12 +65,13 @@ var BizTargetFromPanel = function BizTargetFromPanel(props) {
62
65
  }
63
66
  };
64
67
  var onDelete = function onDelete() {
68
+ var _props$value5, _props$value6;
65
69
  setLoading(true);
66
70
  ajax(Apis.delPanelElement, {
67
71
  method: 'post',
68
72
  data: {
69
- panelId: props.value.panelId,
70
- elementId: props.value.target.id
73
+ panelId: (_props$value5 = props.value) === null || _props$value5 === void 0 ? void 0 : _props$value5.panelId,
74
+ elementId: (_props$value6 = props.value) === null || _props$value6 === void 0 ? void 0 : _props$value6.target.id
71
75
  }
72
76
  }).then(function (res) {
73
77
  if (!res) return;
@@ -80,6 +84,7 @@ var BizTargetFromPanel = function BizTargetFromPanel(props) {
80
84
  });
81
85
  };
82
86
  var onService = function onService(value, callback) {
87
+ var _props$value7, _props$value8;
83
88
  setTitle(value);
84
89
  setBtnOptions(!value);
85
90
  if (!value) return;
@@ -87,8 +92,8 @@ var BizTargetFromPanel = function BizTargetFromPanel(props) {
87
92
  ajax(Apis.updateElementName, {
88
93
  method: 'post',
89
94
  data: {
90
- panelId: props.value.panelId,
91
- elementId: props.value.target.id,
95
+ panelId: (_props$value7 = props.value) === null || _props$value7 === void 0 ? void 0 : _props$value7.panelId,
96
+ elementId: (_props$value8 = props.value) === null || _props$value8 === void 0 ? void 0 : _props$value8.target.id,
92
97
  name: value
93
98
  }
94
99
  }).then(function (res) {
@@ -112,20 +117,27 @@ var BizTargetFromPanel = function BizTargetFromPanel(props) {
112
117
  };
113
118
  var setBtnOptions = function setBtnOptions(disabled) {
114
119
  setOptions(function (option) {
120
+ var _props$value9;
115
121
  if (!option.length) return [];
116
122
  option[option.length - 1].disabled = disabled;
117
- if (props.value.target.id) {
123
+ if ((_props$value9 = props.value) === null || _props$value9 === void 0 ? void 0 : _props$value9.target.id) {
118
124
  option[option.length - 2].disabled = disabled;
119
125
  }
120
126
  return _toConsumableArray(option);
121
127
  });
122
128
  };
129
+ if (!((_props$value10 = props.value) === null || _props$value10 === void 0 ? void 0 : _props$value10.panelId)) {
130
+ return /*#__PURE__*/React.createElement("div", {
131
+ className: "".concat(classPrefix, "-content")
132
+ }, props.children);
133
+ }
123
134
  return /*#__PURE__*/React.createElement(BizTargetFromPanelContext.Provider, {
124
135
  value: {
125
136
  handleSearch: setBtnOptions
126
137
  }
127
138
  }, /*#__PURE__*/React.createElement(Spin, {
128
- spinning: loading
139
+ spinning: loading,
140
+ wrapperClassName: classPrefix
129
141
  }, /*#__PURE__*/React.createElement(BizOptionLayout, {
130
142
  ref: titleRef,
131
143
  value: title,
@@ -136,7 +148,9 @@ var BizTargetFromPanel = function BizTargetFromPanel(props) {
136
148
  onBack: function onBack() {
137
149
  return onClick(BizOptionTitleProps.OptionTypes.CANCEL);
138
150
  }
139
- }, props.children, showDialog && /*#__PURE__*/React.createElement(BizAddToPanel, {
151
+ }, /*#__PURE__*/React.createElement("div", {
152
+ className: "".concat(classPrefix, "-content ").concat(classPrefix, "-content2")
153
+ }, props.children), showDialog && /*#__PURE__*/React.createElement(BizAddToPanel, {
140
154
  defaultValue: {
141
155
  panel: {
142
156
  id: props.value.panelId
@@ -7,7 +7,7 @@ var BizOptionLayout = /*#__PURE__*/React.forwardRef(function (props, ref) {
7
7
  var className = props.className;
8
8
  var classPrefix = 'biz-option-layout';
9
9
  return /*#__PURE__*/React.createElement("div", {
10
- className: "".concat(classPrefix, " ").concat(className)
10
+ className: "".concat(classPrefix, " ").concat(className || '')
11
11
  }, /*#__PURE__*/React.createElement("div", {
12
12
  className: "".concat(classPrefix, "-header")
13
13
  }, /*#__PURE__*/React.createElement("div", {
@@ -1,6 +1,11 @@
1
1
  @import '~@zgfe/business-lib/es/assets/styles/inner.less';
2
2
 
3
3
  .biz-layout-panel {
4
+ width: 100%;
5
+ height: 100%;
6
+ & > .ant-spin-container {
7
+ height: 100%;
8
+ }
4
9
  /*更多按钮*/
5
10
  &-btn-more {
6
11
  width: @height-base;
@@ -16,4 +21,13 @@
16
21
  .__default-hover();
17
22
  }
18
23
  }
24
+
25
+ &-content {
26
+ width: 100%;
27
+ height: 100%;
28
+ overflow: auto;
29
+ }
30
+ &-content2 {
31
+ height: calc(100% - 64px);
32
+ }
19
33
  }
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  import AddToPanel from '../../addToPanel/types';
3
3
  export declare namespace BizOptionTitleProps {
4
4
  export interface Props {
5
- value: Value;
6
- styleOptions: AddToPanel.TabItem[];
5
+ value?: Value;
6
+ styleOptions?: AddToPanel.TabItem[];
7
7
  children: React.ReactNode;
8
8
  afterEditTarget?: (type: string, value?: any) => void;
9
9
  }