@zgfe/business-lib 1.0.18 → 1.0.19

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 (104) hide show
  1. package/es/addToPanel/index.js +1 -0
  2. package/es/addToScene/index.js +1 -0
  3. package/es/assets/styles/chunks.less +3 -4
  4. package/es/assets/styles/resetAntd.less +47 -11
  5. package/es/attrConditions/components/operateList.d.ts +1 -0
  6. package/es/attrConditions/components/operateList.js +2 -2
  7. package/es/attrConditions/components/stringList.d.ts +1 -0
  8. package/es/attrConditions/components/stringList.js +2 -2
  9. package/es/attrConditions/components/valuesList.d.ts +1 -1
  10. package/es/attrConditions/components/valuesList.js +11 -12
  11. package/es/attrConditions/demo/group.js +13 -1
  12. package/es/attrConditions/group.js +14 -0
  13. package/es/attrConditions/index.js +16 -5
  14. package/es/attrConditions/styles/index.less +39 -5
  15. package/es/attrConditions/types.d.ts +4 -0
  16. package/es/attrConditions/utils/operates.js +2 -2
  17. package/es/attributeSelector/index.js +8 -4
  18. package/es/attributeSelector/listPanel.js +32 -19
  19. package/es/attributeSelector/styles/index.less +3 -3
  20. package/es/attributeSelector/types.d.ts +7 -0
  21. package/es/attributeSelector/types.js +8 -1
  22. package/es/attributeSelector/util.js +3 -2
  23. package/es/eventSelector/index.js +10 -4
  24. package/es/eventSelector/listPanel.js +18 -23
  25. package/es/eventSelector/styles/index.less +5 -5
  26. package/es/eventSelector/types.d.ts +4 -0
  27. package/es/index.d.ts +2 -1
  28. package/es/index.js +2 -1
  29. package/es/mock/event.js +214 -0
  30. package/es/select/demo/children.d.ts +2 -0
  31. package/es/select/demo/children.js +81 -0
  32. package/es/select/demo/customLabel.d.ts +2 -0
  33. package/es/select/demo/customLabel.js +23 -0
  34. package/es/select/demo/index.js +10 -4
  35. package/es/select/demo/multiple.js +10 -3
  36. package/es/select/handle.js +4 -2
  37. package/es/select/index.d.ts +2 -2
  38. package/es/select/index.js +7 -5
  39. package/es/select/option.js +8 -2
  40. package/es/select/overlay.js +5 -3
  41. package/es/select/styles/handle.less +23 -13
  42. package/es/select/types.d.ts +5 -1
  43. package/es/userCondition/conditionTypeList.js +29 -6
  44. package/es/userCondition/conditionWrap.js +4 -2
  45. package/es/userCondition/conditions/constants.d.ts +24 -0
  46. package/es/userCondition/conditions/constants.js +41 -0
  47. package/es/userCondition/conditions/eventCondition.js +13 -4
  48. package/es/userCondition/conditions/periodCondition.js +21 -10
  49. package/es/userCondition/conditions/propCondition.js +25 -6
  50. package/es/userCondition/conditions/runTimesCondition.js +2 -2
  51. package/es/userCondition/conditions/styles/eventCondition.less +9 -7
  52. package/es/userCondition/conditions/styles/periodCondition.less +12 -0
  53. package/es/userCondition/conditions/styles/propCondition.less +11 -3
  54. package/es/userCondition/conditions/styles/runTimesCondition.less +3 -0
  55. package/es/userCondition/conditions/styles/tagsCondition.less +20 -0
  56. package/es/userCondition/conditions/styles/textDesc.less +17 -0
  57. package/es/userCondition/conditions/tagsCondition.d.ts +9 -0
  58. package/es/userCondition/conditions/tagsCondition.js +107 -0
  59. package/es/userCondition/conditions/textDesc.d.ts +9 -0
  60. package/es/userCondition/conditions/textDesc.js +241 -0
  61. package/es/userCondition/demo/index.js +259 -31
  62. package/es/userCondition/index.d.ts +1 -1
  63. package/es/userCondition/index.js +52 -10
  64. package/es/userCondition/orConditions.js +69 -28
  65. package/es/userCondition/relationLabel.js +6 -1
  66. package/es/userCondition/styles/conditionTypeList.less +1 -1
  67. package/es/userCondition/styles/conditionWrap.less +3 -0
  68. package/es/userCondition/styles/index.less +21 -1
  69. package/es/userCondition/styles/orConditions.less +20 -2
  70. package/es/userCondition/styles/relationLabel.less +5 -4
  71. package/es/userCondition/types.d.ts +28 -2
  72. package/es/userCondition/util.d.ts +5 -1
  73. package/es/userCondition/util.js +42 -0
  74. package/es/userTagsSelector/cascaderOverlay.d.ts +5 -0
  75. package/es/userTagsSelector/cascaderOverlay.js +114 -0
  76. package/es/userTagsSelector/components/search/index.d.ts +8 -0
  77. package/es/userTagsSelector/components/search/index.js +16 -0
  78. package/es/userTagsSelector/components/search/index.less +6 -0
  79. package/es/userTagsSelector/context.d.ts +3 -0
  80. package/es/userTagsSelector/context.js +2 -0
  81. package/es/userTagsSelector/demo/index.d.ts +2 -0
  82. package/es/userTagsSelector/demo/index.js +48 -0
  83. package/es/userTagsSelector/groups/groupOption.d.ts +5 -0
  84. package/es/userTagsSelector/groups/groupOption.js +42 -0
  85. package/es/userTagsSelector/groups/index.d.ts +4 -0
  86. package/es/userTagsSelector/groups/index.js +86 -0
  87. package/es/userTagsSelector/groups/styles/index.less +0 -0
  88. package/es/userTagsSelector/groups/styles/option.less +50 -0
  89. package/es/userTagsSelector/index.d.ts +6 -0
  90. package/es/userTagsSelector/index.js +110 -0
  91. package/es/userTagsSelector/multipleCheckPanel/checkOption.d.ts +5 -0
  92. package/es/userTagsSelector/multipleCheckPanel/checkOption.js +45 -0
  93. package/es/userTagsSelector/multipleCheckPanel/index.d.ts +4 -0
  94. package/es/userTagsSelector/multipleCheckPanel/index.js +80 -0
  95. package/es/userTagsSelector/multipleCheckPanel/styles/index.less +0 -0
  96. package/es/userTagsSelector/multipleCheckPanel/styles/option.less +40 -0
  97. package/es/userTagsSelector/styles/cascaderOverlay.less +27 -0
  98. package/es/userTagsSelector/styles/index.less +10 -0
  99. package/es/userTagsSelector/types.d.ts +67 -0
  100. package/es/userTagsSelector/types.js +1 -0
  101. package/es/userTagsSelector/util.d.ts +4 -0
  102. package/es/userTagsSelector/util.js +38 -0
  103. package/es/utils/type.d.ts +2 -2
  104. package/package.json +6 -7
@@ -0,0 +1,110 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+
5
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+
7
+ 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; }
8
+
9
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
10
+
11
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
+
13
+ import React, { useState } from 'react';
14
+ import { Dropdown } from 'antd';
15
+ import SelectHandle from '../select/handle';
16
+ import CascaderOverlay from './cascaderOverlay';
17
+ import './styles/index.less';
18
+ import { useMemo } from 'react';
19
+ import { util } from '../utils';
20
+ import _ from 'lodash';
21
+ export var classPrefix = 'biz-user-tags-selector';
22
+
23
+ var UserTagsSelect = function UserTagsSelect(props) {
24
+ var defaultValue = props.defaultValue,
25
+ data = props.data,
26
+ labelFields = props.labelFields,
27
+ childFields = props.childFields,
28
+ keyFields = props.keyFields,
29
+ valueFields = props.valueFields;
30
+
31
+ var _useState = useState(util.isArray(defaultValue) ? defaultValue : []),
32
+ _useState2 = _slicedToArray(_useState, 2),
33
+ currentValue = _useState2[0],
34
+ setCurrentValue = _useState2[1];
35
+
36
+ var _useState3 = useState(false),
37
+ _useState4 = _slicedToArray(_useState3, 2),
38
+ visible = _useState4[0],
39
+ setVisible = _useState4[1];
40
+
41
+ var handleValue = useMemo(function () {
42
+ return currentValue.map(function (item) {
43
+ return item.slice().pop();
44
+ });
45
+ }, [currentValue]);
46
+
47
+ function onVisibleChange(visible) {
48
+ setVisible(visible);
49
+ }
50
+
51
+ function onDelete(data) {
52
+ var current = currentValue.slice();
53
+ var index = current.findIndex(function (item) {
54
+ return _.isEqual(item.slice().pop(), data);
55
+ });
56
+ current.splice(index, 1);
57
+ props.onChange && props.onChange(current);
58
+ setCurrentValue(current);
59
+ }
60
+
61
+ function onChange(val) {
62
+ props.onChange && props.onChange(val);
63
+ setCurrentValue(val);
64
+ }
65
+
66
+ function renderOverlay() {
67
+ if (!data || !data.length) return /*#__PURE__*/React.createElement("span", {
68
+ style: {
69
+ padding: 16
70
+ },
71
+ className: "".concat(classPrefix, "-overlay")
72
+ }, "\u6682\u65E0\u6570\u636E");
73
+ return /*#__PURE__*/React.createElement(CascaderOverlay, {
74
+ currentValue: currentValue,
75
+ valueFields: valueFields,
76
+ childFields: childFields,
77
+ keyFields: keyFields,
78
+ labelFields: labelFields,
79
+ data: data,
80
+ onChange: onChange
81
+ });
82
+ }
83
+
84
+ return /*#__PURE__*/React.createElement("div", {
85
+ className: classPrefix
86
+ }, /*#__PURE__*/React.createElement(Dropdown, {
87
+ overlay: renderOverlay(),
88
+ trigger: ['click'],
89
+ overlayStyle: {
90
+ minWidth: 0
91
+ },
92
+ onVisibleChange: onVisibleChange,
93
+ visible: visible,
94
+ destroyPopupOnHide: props.destroyPopupOnHide
95
+ }, /*#__PURE__*/React.createElement("div", {
96
+ className: "".concat(classPrefix, "-handle")
97
+ }, /*#__PURE__*/React.createElement(SelectHandle, {
98
+ border: false,
99
+ value: handleValue,
100
+ labelField: labelFields[labelFields.length - 1],
101
+ multiple: true,
102
+ placeholder: "\u9009\u62E9\u6807\u7B7E",
103
+ onDelete: onDelete
104
+ }))));
105
+ };
106
+
107
+ UserTagsSelect.defaultProps = {
108
+ destroyPopupOnHide: false
109
+ };
110
+ export default UserTagsSelect;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { UserTagsSelectorTypes } from '../types';
3
+ import './styles/option.less';
4
+ declare const CheckOption: React.ForwardRefExoticComponent<UserTagsSelectorTypes.CheckOption & React.RefAttributes<HTMLDivElement>>;
5
+ export default CheckOption;
@@ -0,0 +1,45 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { Checkbox } from 'antd';
3
+ import { classPrefix } from '..';
4
+ import { util } from '../../utils';
5
+ import theme from '../../assets/theme.js';
6
+ import './styles/option.less';
7
+ var CheckOption = /*#__PURE__*/forwardRef(function (props, ref) {
8
+ var highlightText = props.highlightText,
9
+ label = props.label,
10
+ checked = props.checked,
11
+ disabled = props.disabled;
12
+
13
+ function onChange(e) {
14
+ if (e.target.checked) {
15
+ props.onCheck();
16
+ } else {
17
+ props.onUncheck();
18
+ }
19
+ }
20
+
21
+ function renderLabel() {
22
+ if (!highlightText || !highlightText.trim()) return label;
23
+ var dom = util.setHighLight(label, highlightText, function (text, key) {
24
+ return /*#__PURE__*/React.createElement("span", {
25
+ style: {
26
+ color: theme['primary-color']
27
+ },
28
+ key: key
29
+ }, text);
30
+ });
31
+ return dom;
32
+ }
33
+
34
+ return /*#__PURE__*/React.createElement("div", {
35
+ ref: ref,
36
+ className: ["".concat(classPrefix, "-check-option"), disabled ? "".concat(classPrefix, "-check-option-disabled") : ''].join(' ')
37
+ }, /*#__PURE__*/React.createElement(Checkbox, {
38
+ onChange: onChange,
39
+ disabled: disabled,
40
+ checked: checked
41
+ }, /*#__PURE__*/React.createElement("div", {
42
+ className: "".concat(classPrefix, "-check-option-label")
43
+ }, renderLabel())));
44
+ });
45
+ export default CheckOption;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { UserTagsSelectorTypes } from '../types';
3
+ declare const MultipleCheckPanel: React.FC<UserTagsSelectorTypes.MultiplePanelProps>;
4
+ export default MultipleCheckPanel;
@@ -0,0 +1,80 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+
5
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+
7
+ 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; }
8
+
9
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
10
+
11
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
+
13
+ import React, { useMemo, useState } from 'react';
14
+ import { classPrefix } from '..';
15
+ import VirtualList from 'rc-virtual-list';
16
+ import Search from '../components/search';
17
+ import CheckOption from './checkOption';
18
+ import { filterFactory, isCheckedFactory } from '../util';
19
+
20
+ var MultipleCheckPanel = function MultipleCheckPanel(props) {
21
+ var data = props.data,
22
+ labelField = props.labelField,
23
+ level = props.level,
24
+ currentValue = props.currentValue;
25
+
26
+ var _useState = useState(''),
27
+ _useState2 = _slicedToArray(_useState, 2),
28
+ searchValue = _useState2[0],
29
+ setSearchValue = _useState2[1];
30
+
31
+ function onSearch(val) {
32
+ setSearchValue(val);
33
+ }
34
+
35
+ var searchFilter = useMemo(function () {
36
+ return filterFactory(labelField, searchValue);
37
+ }, [labelField, searchValue]);
38
+ var isChecked = useMemo(function () {
39
+ return isCheckedFactory(currentValue, level);
40
+ }, [currentValue, level]);
41
+
42
+ function _onCheck(data) {
43
+ props.onCheck(data);
44
+ }
45
+
46
+ function _onUncheck(data) {
47
+ props.onUncheck(data);
48
+ }
49
+
50
+ if (!data.length) return /*#__PURE__*/React.createElement("span", null, "\u6682\u65E0\u6570\u636E");
51
+ return /*#__PURE__*/React.createElement("div", {
52
+ className: "".concat(classPrefix, "-check-panel")
53
+ }, /*#__PURE__*/React.createElement(Search, {
54
+ show: true,
55
+ onChange: onSearch,
56
+ placeholder: "\u641C\u7D22\u6807\u7B7E\u540D\u79F0"
57
+ }), /*#__PURE__*/React.createElement(VirtualList, {
58
+ data: data.filter(searchFilter),
59
+ itemHeight: 48,
60
+ itemKey: labelField,
61
+ height: 361
62
+ }, function (item, index) {
63
+ var checked = isChecked(item);
64
+ return /*#__PURE__*/React.createElement(CheckOption, {
65
+ checked: checked,
66
+ highlightText: searchValue,
67
+ label: item[labelField],
68
+ value: index,
69
+ disabled: currentValue.length >= 20 && !checked,
70
+ onCheck: function onCheck() {
71
+ return _onCheck(item);
72
+ },
73
+ onUncheck: function onUncheck() {
74
+ return _onUncheck(item);
75
+ }
76
+ });
77
+ }));
78
+ };
79
+
80
+ export default MultipleCheckPanel;
@@ -0,0 +1,40 @@
1
+ @import '../../../assets/styles/inner.less';
2
+ .biz-user-tags-selector {
3
+ &-check-option {
4
+ display: flex;
5
+ align-items: center;
6
+ height: 48px;
7
+ padding: 0 12px;
8
+ border-radius: @border-radius-normal;
9
+ &:hover {
10
+ .__default-hover();
11
+ }
12
+ &-label {
13
+ flex: 1;
14
+ min-width: 0;
15
+ height: 48px;
16
+ line-height: 48px;
17
+ .__default-overflow();
18
+ }
19
+ &&-disabled {
20
+ .__default-disabled();
21
+ }
22
+ .ant-checkbox-wrapper {
23
+ width: 100%;
24
+ min-width: 0;
25
+ > span {
26
+ &:not(.ant-checkbox) {
27
+ flex: 1;
28
+ min-width: 0;
29
+ }
30
+ }
31
+ .ant-checkbox-checked {
32
+ & + span {
33
+ .biz-user-tags-selector-check-option-label {
34
+ color: @primary-color;
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,27 @@
1
+ @import '../../assets/styles/inner.less';
2
+ .biz-user-tags-selector {
3
+ &-overlay {
4
+ display: flex;
5
+ width: 651px;
6
+ max-height: 425px;
7
+ background-color: #fff;
8
+ border-radius: @border-radius-normal;
9
+ box-shadow: @box-shadow-base;
10
+ &-groups {
11
+ width: 192px;
12
+ padding: @margin-xs;
13
+ border-right: 1px solid @border-color-base;
14
+ }
15
+ &-selections {
16
+ flex: 1;
17
+ min-width: 0;
18
+ padding: @padding-xs;
19
+ }
20
+ // .rc-virtual-list-scrollbar {
21
+ // display: block !important;
22
+ // }
23
+ // .rc-virtual-list-scrollbar-thumb {
24
+ // background-color: #cacdd4 !important;
25
+ // }
26
+ }
27
+ }
@@ -0,0 +1,10 @@
1
+ @import '../../assets/styles/inner.less';
2
+ .biz-user-tags-selector {
3
+ > .ant-dropdown-trigger.biz-user-tags-selector-handle {
4
+ > .biz-select-handle-input-multiple {
5
+ .ant-input.biz-select-handle-search {
6
+ height: auto !important;
7
+ }
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,67 @@
1
+ export declare namespace UserTagsSelectorTypes {
2
+ interface Props {
3
+ data: any[];
4
+ childFields: string[];
5
+ labelFields: string[];
6
+ keyFields: string[];
7
+ valueFields: string[];
8
+ defaultValue?: any[];
9
+ defaultCurrent?: string[];
10
+ onChange: Function;
11
+ destroyPopupOnHide?: boolean;
12
+ }
13
+ interface CascaderOverlayProps {
14
+ data: any[];
15
+ childFields: string[];
16
+ labelFields: string[];
17
+ keyFields: string[];
18
+ valueFields: string[];
19
+ currentValue: any[];
20
+ onChange: (val: any[]) => void;
21
+ }
22
+ interface Groups {
23
+ data: any[];
24
+ labelField: string;
25
+ keyField: string;
26
+ valueField: string;
27
+ childField?: string;
28
+ onActive: (data: any, level: number) => void;
29
+ searchable?: boolean;
30
+ level: number;
31
+ currentValue: any[];
32
+ }
33
+ interface GroupOption {
34
+ actived: boolean;
35
+ checked: boolean;
36
+ label: string;
37
+ value: any;
38
+ count: number;
39
+ onClick: Function;
40
+ highlightText: string;
41
+ }
42
+ interface MultiplePanelProps {
43
+ data: any[];
44
+ labelField: string;
45
+ valueField: string;
46
+ level: number;
47
+ currentValue: any[];
48
+ onCheck: (data: any) => void;
49
+ onUncheck: (data: any) => void;
50
+ }
51
+ interface CheckOption extends Pick<GroupOption, 'label' | 'value' | 'highlightText'> {
52
+ checked?: boolean;
53
+ onCheck: () => void;
54
+ onUncheck: () => void;
55
+ disabled: boolean;
56
+ }
57
+ }
58
+ export interface TagI {
59
+ appId: number;
60
+ createTime: string;
61
+ updateTime: string;
62
+ del: number;
63
+ labelGroup: string;
64
+ labelId: number;
65
+ labelName: string;
66
+ labelStatus: number;
67
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare function curry(fn: Function): (...arg1: any[]) => (...arg2: any[]) => any;
2
+ export declare function filterFactory(labelField: string, searchValue: string): (item: any) => boolean;
3
+ export declare function isCheckedFactory(currentValue: any[], level: number): (val: any) => boolean;
4
+ export declare function getFieldFactory(fields: string[]): () => string;
@@ -0,0 +1,38 @@
1
+ import _ from 'lodash';
2
+ export function curry(fn) {
3
+ return function () {
4
+ for (var _len = arguments.length, arg1 = new Array(_len), _key = 0; _key < _len; _key++) {
5
+ arg1[_key] = arguments[_key];
6
+ }
7
+
8
+ return function () {
9
+ for (var _len2 = arguments.length, arg2 = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
10
+ arg2[_key2] = arguments[_key2];
11
+ }
12
+
13
+ return fn.apply(void 0, arg1.concat(arg2));
14
+ };
15
+ };
16
+ }
17
+ export function filterFactory(labelField, searchValue) {
18
+ return function (item) {
19
+ if (!searchValue || !searchValue.trim()) return true;
20
+ if (new RegExp(searchValue, 'i').test(item[labelField])) return true;
21
+ return false;
22
+ };
23
+ }
24
+ export function isCheckedFactory(currentValue, level) {
25
+ return function (val) {
26
+ return currentValue.some(function (value) {
27
+ return _.isEqual(val, value[level]);
28
+ });
29
+ };
30
+ }
31
+ export function getFieldFactory(fields) {
32
+ var fieldQueue = fields.slice();
33
+ var field = '';
34
+ return function () {
35
+ field = fieldQueue.length ? fieldQueue.shift() : field;
36
+ return field;
37
+ };
38
+ }
@@ -1,5 +1,5 @@
1
+ import { PropType, ShowStatus } from '../attributeSelector/types';
1
2
  import { RequestOptionsInit } from 'umi-request';
2
- import { PropType } from '../attributeSelector/types';
3
3
  export interface Event {
4
4
  value?: string | number;
5
5
  label?: string | number;
@@ -21,7 +21,7 @@ export declare namespace OldSystem {
21
21
  alias_name?: string;
22
22
  click_analysis: boolean;
23
23
  event_attrs: EventProp[];
24
- event_hidden: boolean;
24
+ event_hidden: ShowStatus;
25
25
  event_type: number;
26
26
  insert_time: string;
27
27
  is_delete: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -36,18 +36,15 @@
36
36
  "echarts": "^5.3.2",
37
37
  "echarts-for-react": "^3.0.2",
38
38
  "lerna": "^4.0.0",
39
+ "rc-virtual-list": "^3.4.8",
39
40
  "react-infinite-scroll-component": "^6.1.0",
40
41
  "umi-request": "^1.4.0"
41
42
  },
42
- "peerDependencies": {
43
- "@types/lodash": "^4.14.182",
44
- "lodash": "^4.17.21",
45
- "react": "^16.12.0 || ^17.0.0"
46
- },
47
43
  "devDependencies": {
48
44
  "@testing-library/jest-dom": "^5.15.1",
49
45
  "@testing-library/react": "^12.1.2",
50
46
  "@types/jest": "^27.0.3",
47
+ "@types/lodash": "^4.14.182",
51
48
  "@types/qs": "^6.9.7",
52
49
  "@umijs/fabric": "^2.8.1",
53
50
  "@umijs/test": "^3.0.5",
@@ -56,8 +53,10 @@
56
53
  "father-build": "^1.17.2",
57
54
  "gh-pages": "^3.0.0",
58
55
  "lint-staged": "^10.0.7",
56
+ "lodash": "^4.17.21",
59
57
  "prettier": "^2.2.1",
58
+ "react": "^16.12.0 || ^17.0.0",
60
59
  "yorkie": "^2.0.0"
61
60
  },
62
- "gitHead": "572cbe41c1052ce19fa66b5c95b0e7738f2ceb6c"
61
+ "gitHead": "694208ef60a4bb6aa6dad45a86866bb8565c89ee"
63
62
  }