@zgfe/business-lib 1.1.100 → 1.2.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.
@@ -5,69 +5,6 @@
5
5
  "css_prefix_text": "",
6
6
  "description": "诸葛业务平台",
7
7
  "glyphs": [
8
- {
9
- "icon_id": "37416479",
10
- "name": "收起",
11
- "font_class": "shouqi1",
12
- "unicode": "e797",
13
- "unicode_decimal": 59287
14
- },
15
- {
16
- "icon_id": "37416478",
17
- "name": "添加",
18
- "font_class": "tianjia2",
19
- "unicode": "e799",
20
- "unicode_decimal": 59289
21
- },
22
- {
23
- "icon_id": "37343412",
24
- "name": "盒须图",
25
- "font_class": "hexutu",
26
- "unicode": "e796",
27
- "unicode_decimal": 59286
28
- },
29
- {
30
- "icon_id": "37316029",
31
- "name": "全屏展示",
32
- "font_class": "quanpingzhanshi",
33
- "unicode": "e6a3",
34
- "unicode_decimal": 59043
35
- },
36
- {
37
- "icon_id": "37316033",
38
- "name": "流向图",
39
- "font_class": "liuxiangtu",
40
- "unicode": "e78f",
41
- "unicode_decimal": 59279
42
- },
43
- {
44
- "icon_id": "37316032",
45
- "name": "旭日图",
46
- "font_class": "xuritu",
47
- "unicode": "e790",
48
- "unicode_decimal": 59280
49
- },
50
- {
51
- "icon_id": "37316031",
52
- "name": "桑基图",
53
- "font_class": "sangjitu",
54
- "unicode": "e791",
55
- "unicode_decimal": 59281
56
- },
57
- {
58
- "icon_id": "37316030",
59
- "name": "树形图",
60
- "font_class": "shuxingtu",
61
- "unicode": "e792",
62
- "unicode_decimal": 59282
63
- },
64
- {
65
- "icon_id": "37316028",
66
- "name": "全屏收起",
67
- "font_class": "quanpingshouqi",
68
- "unicode": "e793",
69
- "unicode_decimal": 59283
70
- },
71
8
  {
72
9
  "icon_id": "36957204",
73
10
  "name": "对勾",
@@ -719,6 +656,13 @@
719
656
  "unicode": "e6a5",
720
657
  "unicode_decimal": 59045
721
658
  },
659
+ {
660
+ "icon_id": "31389407",
661
+ "name": "全屏展示",
662
+ "font_class": "quanpingzhanshi",
663
+ "unicode": "e6a3",
664
+ "unicode_decimal": 59043
665
+ },
722
666
  {
723
667
  "icon_id": "31360676",
724
668
  "name": "收藏",
@@ -810,6 +754,13 @@
810
754
  "unicode": "e771",
811
755
  "unicode_decimal": 59249
812
756
  },
757
+ {
758
+ "icon_id": "28451990",
759
+ "name": "添加",
760
+ "font_class": "tianjia2",
761
+ "unicode": "e773",
762
+ "unicode_decimal": 59251
763
+ },
813
764
  {
814
765
  "icon_id": "28452283",
815
766
  "name": "生成",
Binary file
Binary file
Binary file
@@ -1 +1 @@
1
- export var chartColors = ['#457DFF', '#80E1D9', '#65789B', '#F8BC3B', '#6F66ED', '#66AFED', '#9661BC', '#FF7557', '#4DB273', '#F08BB4', '#CDDBFD', '#CDF3F0', '#CED4DE', '#FCE7B9', '#D1CEFD', '#D3E7F9', '#DFCFEA', '#FFD1C7', '#BBDEC8', '#FFE0ED'];
1
+ export var chartColors = ['#165DFF', '#80E1D9', '#65789B', '#F8BC3B', '#6F66ED', '#66AFED', '#9661BC', '#FF7557', '#4DB273', '#F08BB4', '#CDDBFD', '#CDF3F0', '#CED4DE', '#FCE7B9', '#D1CEFD', '#D3E7F9', '#DFCFEA', '#FFD1C7', '#BBDEC8', '#FFE0ED'];
@@ -142,7 +142,7 @@ var BizDatePicker = function BizDatePicker(_ref) {
142
142
  })));
143
143
  };
144
144
  BizDatePicker.defaultProps = {
145
- includeToday: true,
145
+ includeToday: false,
146
146
  mode: 'general',
147
147
  dateTypeList: [DatePickerTypes.Unit.hour, DatePickerTypes.Unit.day, DatePickerTypes.Unit.week, DatePickerTypes.Unit.month]
148
148
  };
@@ -72,7 +72,7 @@ var getTypeList = function getTypeList(currentType, mode, includeToday) {
72
72
  return item.value === currentType;
73
73
  })) === null || _shortcuts$find === void 0 ? void 0 : _shortcuts$find.children) || []).filter(function (item) {
74
74
  if (currentType === 'day') {
75
- if ((mode === 'general' || !includeToday) && (item.count === 0 || item.count === 1)) return false;
75
+ if (mode === 'general' && item.count === 1 || item.count === 0 && !includeToday) return false;
76
76
  return true;
77
77
  }
78
78
  return true;
@@ -95,7 +95,7 @@ var PickerShortcut = function PickerShortcut() {
95
95
  var list = getTypeList(currentType, mode, includeToday);
96
96
  useEffect(function () {
97
97
  list = getTypeList(currentType, mode, includeToday);
98
- if (!relative && !dateRange) {
98
+ if (!relative) {
99
99
  var _list$;
100
100
  var _active = (_list$ = list[0]) === null || _list$ === void 0 ? void 0 : _list$.count;
101
101
  setActive(_active);
@@ -11,9 +11,7 @@
11
11
  }
12
12
  .biz-dialog-wrap {
13
13
  .ant-modal-close {
14
- top: 5px;
15
- right: 5px;
16
-
14
+ top: 15px;
17
15
  .bsicon {
18
16
  color: @text-color;
19
17
  font-size: 24px !important;
@@ -10,7 +10,7 @@ import InnerDemo from '../../demoWrapper/innerDemo';
10
10
  var EventDemo = function EventDemo() {
11
11
  var _useState = useState({
12
12
  event: {
13
- id: -2
13
+ id: 24292415
14
14
  }
15
15
  }),
16
16
  _useState2 = _slicedToArray(_useState, 2),
@@ -27,18 +27,7 @@ var EventDemo = function EventDemo() {
27
27
  defaultSelectAble: false,
28
28
  destroyPopupOnHide: true,
29
29
  value: value,
30
- onChange: onChange,
31
- selectList: [24143017, 24256188, 24256187],
32
- disableList: [-1],
33
- extendEvents: [{
34
- id: -1,
35
- name: '会话开始',
36
- attrList: []
37
- }, {
38
- id: -2,
39
- name: '会话结束',
40
- attrList: []
41
- }]
30
+ onChange: onChange
42
31
  }));
43
32
  };
44
33
  export default (function () {
@@ -93,18 +93,12 @@ var BizEventSelector = function BizEventSelector(props) {
93
93
  attrList: []
94
94
  };
95
95
  }
96
- if (props.extendEvents) {
97
- props.extendEvents.forEach(function (item) {
98
- var _params$event2;
99
- if (item.id === ((_params$event2 = _params.event) === null || _params$event2 === void 0 ? void 0 : _params$event2.id)) res.event = item;
100
- });
101
- }
102
96
  allEvents === null || allEvents === void 0 ? void 0 : allEvents.forEach(function (group) {
103
97
  var _params$group2;
104
98
  if (group.id === ((_params$group2 = _params.group) === null || _params$group2 === void 0 ? void 0 : _params$group2.id)) res.group = group;
105
99
  group.eventList.forEach(function (event) {
106
- var _params$event3;
107
- if (event.id === ((_params$event3 = _params.event) === null || _params$event3 === void 0 ? void 0 : _params$event3.id)) res.event = event;
100
+ var _params$event2;
101
+ if (event.id === ((_params$event2 = _params.event) === null || _params$event2 === void 0 ? void 0 : _params$event2.id)) res.event = event;
108
102
  });
109
103
  });
110
104
  return res;
@@ -153,8 +147,6 @@ var BizEventSelector = function BizEventSelector(props) {
153
147
  showBuiltInTarget: props.showBuiltInTarget,
154
148
  defaultSelectAble: defaultSelectAble,
155
149
  selectList: props.selectList,
156
- disableList: props.disableList,
157
- extendEvents: props.extendEvents,
158
150
  filter: props.filter,
159
151
  afterSelect: function afterSelect() {
160
152
  setVisible(false);
@@ -10,7 +10,6 @@ export declare const InfiniteScrollList: React.FC<{
10
10
  currentId?: string | number;
11
11
  checkedIdList?: number[];
12
12
  selectList?: number[];
13
- disableList?: number[];
14
13
  multiple?: boolean;
15
14
  maxEventCount?: number;
16
15
  onClick: (data: AnalysisEvent) => void;
@@ -86,9 +86,6 @@ var EventListPanel = function EventListPanel(props) {
86
86
  });
87
87
  });
88
88
  list = props.showBuiltInTarget ? [].concat(_toConsumableArray(BuiltinIndicators.eventList), markList, _toConsumableArray(list)) : [].concat(markList, _toConsumableArray(list));
89
- if (props.extendEvents) {
90
- list = [].concat(_toConsumableArray(props.extendEvents), _toConsumableArray(list));
91
- }
92
89
  return list;
93
90
  }(),
94
91
  name: '所有分组'
@@ -250,7 +247,6 @@ var EventListPanel = function EventListPanel(props) {
250
247
  groupId: currentGroup === null || currentGroup === void 0 ? void 0 : currentGroup.id,
251
248
  currentId: currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$event2 = currentValue.event) === null || _currentValue$event2 === void 0 ? void 0 : _currentValue$event2.id,
252
249
  selectList: props.selectList,
253
- disableList: props.disableList,
254
250
  multiple: props.multiple,
255
251
  maxEventCount: props.maxEventCount,
256
252
  checkedIdList: checkedEventList.map(function (e) {
@@ -267,7 +263,6 @@ export var InfiniteScrollList = function InfiniteScrollList(_ref) {
267
263
  currentId = _ref.currentId,
268
264
  onClick = _ref.onClick,
269
265
  selectList = _ref.selectList,
270
- disableList = _ref.disableList,
271
266
  multiple = _ref.multiple,
272
267
  maxEventCount = _ref.maxEventCount,
273
268
  checkedIdList = _ref.checkedIdList;
@@ -317,7 +312,7 @@ export var InfiniteScrollList = function InfiniteScrollList(_ref) {
317
312
  if (selectList && (selectList === null || selectList === void 0 ? void 0 : selectList.indexOf(e.id)) !== -1 && currentId !== e.id) {
318
313
  _disable = true;
319
314
  }
320
- if ((disableList === null || disableList === void 0 ? void 0 : disableList.includes(e.id)) || multiple && checkedIdList && (checkedIdList === null || checkedIdList === void 0 ? void 0 : checkedIdList.length) >= maxEventCount && !checkedIdList.includes(e.id)) {
315
+ if (multiple && checkedIdList && (checkedIdList === null || checkedIdList === void 0 ? void 0 : checkedIdList.length) >= maxEventCount && !checkedIdList.includes(e.id)) {
321
316
  _disable = true;
322
317
  }
323
318
  return /*#__PURE__*/React.createElement(EventListOption, {
@@ -14,36 +14,38 @@ export declare namespace EventSelectTypes {
14
14
  name?: string;
15
15
  };
16
16
  }
17
- interface BaseProps {
17
+ interface Props {
18
+ defaultValue?: Value | SimpleValue | AnalysisEvent[];
18
19
  value?: Value | AnalysisEvent[];
19
20
  multiple?: boolean;
20
21
  maxEventCount?: number;
21
- showBuiltInTarget?: boolean;
22
- defaultSelectAble?: boolean;
23
- selectList?: number[];
24
- disableList?: number[];
25
- extendEvents?: AnalysisEvent[];
26
- }
27
- interface Props extends BaseProps {
28
- defaultValue?: Value | SimpleValue | AnalysisEvent[];
29
22
  groupId?: number;
30
23
  alias?: string;
31
24
  placeholder?: string;
32
25
  showAllEvent?: boolean;
26
+ defaultSelectAble?: boolean;
33
27
  popupContainer?: boolean;
28
+ showBuiltInTarget?: boolean;
34
29
  onVisibleChange?: (visible: boolean) => void;
35
30
  border?: boolean;
36
31
  theme?: string;
37
32
  size?: SizeType;
38
33
  destroyPopupOnHide?: boolean;
39
34
  onChange?: (val: Value | AnalysisEvent[]) => void;
35
+ selectList?: number[];
40
36
  filter?: (evt: AnalysisEvent) => boolean;
41
37
  disableVirtualEventShow?: boolean;
42
38
  }
43
- interface DropdownProps extends BaseProps {
39
+ interface DropdownProps {
40
+ value?: Value | AnalysisEvent[];
41
+ multiple?: boolean;
42
+ maxEventCount?: number;
44
43
  showOverview?: boolean;
44
+ showBuiltInTarget?: boolean;
45
+ defaultSelectAble?: boolean;
45
46
  onChange?: (value: Value | AnalysisEvent[], isOverview?: boolean) => void;
46
47
  afterSelect?: () => void;
48
+ selectList?: number[];
47
49
  filter?: Props['filter'];
48
50
  disableVirtualEventShow?: boolean;
49
51
  }
@@ -19,10 +19,6 @@ export default (function () {
19
19
  tableData = _useState4[0],
20
20
  setTableData = _useState4[1];
21
21
  var formRef = useRef(null);
22
- var _useState5 = useState(false),
23
- _useState6 = _slicedToArray(_useState5, 2),
24
- fullScreen = _useState6[0],
25
- setFullScreen = _useState6[1];
26
22
  useEffect(function () {
27
23
  setColumn(getColumn(chartData.xAxis));
28
24
  setTableData(formateTableData(chartData.series));
@@ -92,21 +88,8 @@ export default (function () {
92
88
  hasCollapse: true,
93
89
  collapseRef: formRef,
94
90
  topPanel: topPanel,
95
- topRender: topRender,
96
- topHide: fullScreen
91
+ topRender: topRender
97
92
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
98
- style: {
99
- display: 'flex',
100
- marginBottom: 20,
101
- justifyContent: 'flex-end'
102
- }
103
- }, /*#__PURE__*/React.createElement(Button, {
104
- onClick: function onClick() {
105
- return setFullScreen(function (flag) {
106
- return !flag;
107
- });
108
- }
109
- }, fullScreen ? '还原' : '全屏')), /*#__PURE__*/React.createElement("div", {
110
93
  style: {
111
94
  border: '1px solid #ECEDF0',
112
95
  borderRadius: 8,
@@ -31,7 +31,7 @@ var BizLayout = function BizLayout(props) {
31
31
  }, /*#__PURE__*/React.createElement(IconFont, {
32
32
  type: "fanhuiicon"
33
33
  }), "\u8FD4\u56DE") : null, /*#__PURE__*/React.createElement("span", null, props.title)) : null, props.toolbar, /*#__PURE__*/React.createElement("div", {
34
- className: "".concat(classPrefix, "-top").concat(props.topHide ? ' hide' : '')
34
+ className: "".concat(classPrefix, "-top")
35
35
  }, props.topRender || null, /*#__PURE__*/React.createElement("div", {
36
36
  className: "".concat(classPrefix, "-top-container")
37
37
  }, /*#__PURE__*/React.createElement("div", {
@@ -32,33 +32,27 @@
32
32
  &-top {
33
33
  padding: 16px 24px;
34
34
  background: #fafafb;
35
- transition: all 2s;
36
-
37
35
  &-container {
38
36
  padding-top: 24px;
39
37
  background-color: #fff;
40
38
  border: 1px solid #ecedf0;
41
39
  border-radius: 8px;
42
40
  }
43
-
44
- &.hide {
45
- display: none;
46
- }
47
41
  }
48
42
 
49
43
  &-collapse-container {
50
44
  display: flex;
51
45
  justify-content: center;
52
46
  width: 100%;
53
- height: 24px;
47
+ height: 32px;
54
48
  }
55
49
 
56
50
  &-collapse-handle {
57
51
  display: flex;
58
- align-items: flex-start;
52
+ align-items: center;
59
53
  justify-content: center;
60
54
  width: 200px;
61
- height: 24px;
55
+ height: 32px;
62
56
  color: #9aa1a9;
63
57
  cursor: pointer;
64
58
 
@@ -11,7 +11,6 @@ export declare namespace LayoutTypes {
11
11
  children: ReactNode;
12
12
  toolbar?: ReactNode;
13
13
  topRender?: ReactNode;
14
- topHide?: boolean;
15
14
  onBack?: () => void;
16
15
  }
17
16
  }
@@ -72,8 +72,6 @@ export default (function () {
72
72
  disableItemList: disabledList,
73
73
  multiple: true,
74
74
  enableCreate: true,
75
- value: data,
76
- max: 5,
77
- maxTip: "\u6700\u591A\u9009\u62E95\u6761\u9009\u9879"
75
+ value: data
78
76
  }), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u9009\u62E9\u7684\u503C\u662F\uFF1A", JSON.stringify(data)));
79
77
  });
@@ -13,7 +13,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
13
13
  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; } }
14
14
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
15
  import React, { useEffect, useState } from 'react';
16
- import { Spin, message } from 'antd';
16
+ import { Spin } from 'antd';
17
17
  import BizSearchInput from '../searchInput';
18
18
  import { classPrefix } from './index';
19
19
  import SelectOption, { SelectAll } from './option';
@@ -151,11 +151,7 @@ var SelectOverlay = /*#__PURE__*/React.forwardRef(function (props, ref) {
151
151
  if (flag) {
152
152
  currentOption.splice(num, 1);
153
153
  } else {
154
- if (props.max && props.max <= currentOption.length) {
155
- message.warning(props.maxTip || "\u6700\u591A\u53EF\u9009\u62E9".concat(props.max, "\u4E2A"));
156
- } else {
157
- currentOption.push(option);
158
- }
154
+ currentOption.push(option);
159
155
  }
160
156
  }
161
157
  } else {
@@ -85,9 +85,8 @@
85
85
  cursor: not-allowed;
86
86
  }
87
87
  }
88
- .biz-select-handle-tag-label,
89
- .ant-tag-close-icon {
90
- color: #ccd0d4 !important;
88
+ .biz-select-handle-tag-label {
89
+ color: @disabled-color !important;
91
90
  }
92
91
  }
93
92
  }
@@ -21,8 +21,6 @@ export declare namespace BizSelectTypes {
21
21
  border?: boolean;
22
22
  multiple?: boolean;
23
23
  enableSelectAll?: boolean;
24
- max?: number;
25
- maxTip?: string;
26
24
  minDropdownWidth?: number;
27
25
  options: Group[] | Option[];
28
26
  extra?: (option: Option) => ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.1.100",
3
+ "version": "1.2.0",
4
4
  "module": "es/index.js",
5
5
  "typings": "es/index.d.ts",
6
6
  "files": [
@@ -55,7 +55,7 @@
55
55
  "react": "^16.12.0 || ^17.0.0",
56
56
  "yorkie": "^2.0.0"
57
57
  },
58
- "gitHead": "50c41e2102076fcd95ddc2cf87fc7d8dddb2fe0c",
58
+ "gitHead": "4156c428c25567093502e878b3a03c799df6b82b",
59
59
  "gitHooks": {
60
60
  "pre-commit": "lint-staged"
61
61
  }