@zgfe/business-lib 1.0.15-user.2 → 1.0.15

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 (100) hide show
  1. package/es/assets/styles/chunks.less +4 -3
  2. package/es/assets/styles/resetAntd.less +1 -40
  3. package/es/assets/theme.js +2 -0
  4. package/es/attrConditions/components/operateList.d.ts +0 -1
  5. package/es/attrConditions/components/operateList.js +2 -2
  6. package/es/attrConditions/components/stringList.d.ts +0 -1
  7. package/es/attrConditions/components/stringList.js +2 -2
  8. package/es/attrConditions/components/valuesList.d.ts +0 -1
  9. package/es/attrConditions/components/valuesList.js +4 -5
  10. package/es/attrConditions/demo/index.js +8 -7
  11. package/es/attrConditions/index.js +4 -14
  12. package/es/attrConditions/styles/index.less +2 -3
  13. package/es/attrConditions/types.d.ts +0 -3
  14. package/es/attrConditions/utils/operates.js +2 -2
  15. package/es/attributeSelector/index.js +4 -8
  16. package/es/attributeSelector/listPanel.js +19 -32
  17. package/es/attributeSelector/styles/index.less +3 -3
  18. package/es/attributeSelector/types.d.ts +0 -7
  19. package/es/attributeSelector/types.js +1 -8
  20. package/es/attributeSelector/util.js +2 -3
  21. package/es/eventSelector/index.js +4 -10
  22. package/es/eventSelector/listPanel.js +0 -2
  23. package/es/eventSelector/styles/index.less +5 -5
  24. package/es/eventSelector/types.d.ts +0 -4
  25. package/es/index.d.ts +2 -3
  26. package/es/index.js +2 -3
  27. package/es/mock/event.js +0 -214
  28. package/es/select/demo/index.js +4 -10
  29. package/es/select/demo/multiple.js +3 -10
  30. package/es/select/handle.js +2 -4
  31. package/es/select/index.d.ts +2 -2
  32. package/es/select/index.js +5 -7
  33. package/es/select/overlay.js +1 -1
  34. package/es/select/styles/handle.less +13 -23
  35. package/es/select/types.d.ts +1 -3
  36. package/es/userCondition/conditionTypeList.js +3 -14
  37. package/es/userCondition/conditionWrap.js +2 -4
  38. package/es/userCondition/conditions/eventCondition.js +4 -14
  39. package/es/userCondition/conditions/periodCondition.js +10 -20
  40. package/es/userCondition/conditions/propCondition.js +8 -28
  41. package/es/userCondition/conditions/runTimesCondition.js +2 -2
  42. package/es/userCondition/conditions/styles/eventCondition.less +6 -8
  43. package/es/userCondition/conditions/styles/periodCondition.less +0 -3
  44. package/es/userCondition/conditions/styles/propCondition.less +3 -3
  45. package/es/userCondition/conditions/styles/runTimesCondition.less +0 -3
  46. package/es/userCondition/demo/index.js +31 -234
  47. package/es/userCondition/index.d.ts +1 -1
  48. package/es/userCondition/index.js +11 -32
  49. package/es/userCondition/orConditions.js +28 -70
  50. package/es/userCondition/relationLabel.js +1 -6
  51. package/es/userCondition/styles/conditionTypeList.less +1 -1
  52. package/es/userCondition/styles/conditionWrap.less +0 -3
  53. package/es/userCondition/styles/index.less +1 -20
  54. package/es/userCondition/styles/orConditions.less +2 -20
  55. package/es/userCondition/styles/relationLabel.less +3 -4
  56. package/es/userCondition/types.d.ts +2 -21
  57. package/es/userCondition/util.d.ts +1 -5
  58. package/es/userCondition/util.js +0 -42
  59. package/es/utils/type.d.ts +2 -2
  60. package/package.json +2 -5
  61. package/es/assets/theme.d.ts +0 -15
  62. package/es/select/demo/children.d.ts +0 -2
  63. package/es/select/demo/children.js +0 -81
  64. package/es/userCondition/conditions/constants.d.ts +0 -21
  65. package/es/userCondition/conditions/constants.js +0 -21
  66. package/es/userCondition/conditions/styles/tagsCondition.less +0 -18
  67. package/es/userCondition/conditions/styles/textDesc.less +0 -17
  68. package/es/userCondition/conditions/tagsCondition.d.ts +0 -9
  69. package/es/userCondition/conditions/tagsCondition.js +0 -107
  70. package/es/userCondition/conditions/textDesc.d.ts +0 -9
  71. package/es/userCondition/conditions/textDesc.js +0 -197
  72. package/es/userTagsSelector/cascaderOverlay.d.ts +0 -5
  73. package/es/userTagsSelector/cascaderOverlay.js +0 -114
  74. package/es/userTagsSelector/components/search/index.d.ts +0 -8
  75. package/es/userTagsSelector/components/search/index.js +0 -16
  76. package/es/userTagsSelector/components/search/index.less +0 -6
  77. package/es/userTagsSelector/context.d.ts +0 -3
  78. package/es/userTagsSelector/context.js +0 -2
  79. package/es/userTagsSelector/demo/index.d.ts +0 -2
  80. package/es/userTagsSelector/demo/index.js +0 -48
  81. package/es/userTagsSelector/groups/groupOption.d.ts +0 -5
  82. package/es/userTagsSelector/groups/groupOption.js +0 -42
  83. package/es/userTagsSelector/groups/index.d.ts +0 -4
  84. package/es/userTagsSelector/groups/index.js +0 -86
  85. package/es/userTagsSelector/groups/styles/index.less +0 -0
  86. package/es/userTagsSelector/groups/styles/option.less +0 -50
  87. package/es/userTagsSelector/index.d.ts +0 -6
  88. package/es/userTagsSelector/index.js +0 -110
  89. package/es/userTagsSelector/multipleCheckPanel/checkOption.d.ts +0 -5
  90. package/es/userTagsSelector/multipleCheckPanel/checkOption.js +0 -45
  91. package/es/userTagsSelector/multipleCheckPanel/index.d.ts +0 -4
  92. package/es/userTagsSelector/multipleCheckPanel/index.js +0 -80
  93. package/es/userTagsSelector/multipleCheckPanel/styles/index.less +0 -0
  94. package/es/userTagsSelector/multipleCheckPanel/styles/option.less +0 -39
  95. package/es/userTagsSelector/styles/cascaderOverlay.less +0 -27
  96. package/es/userTagsSelector/styles/index.less +0 -10
  97. package/es/userTagsSelector/types.d.ts +0 -67
  98. package/es/userTagsSelector/types.js +0 -1
  99. package/es/userTagsSelector/util.d.ts +0 -4
  100. package/es/userTagsSelector/util.js +0 -38
@@ -29,26 +29,27 @@ import { buildCondition } from './util';
29
29
  import ConditionWrap from './conditionWrap';
30
30
  import PropCondition from './conditions/propCondition';
31
31
  import EventCondition from './conditions/eventCondition';
32
- import TagsCondition from './conditions/tagsCondition';
33
32
  import { classPrefix } from '.';
34
- import Text from './conditions/textDesc';
35
33
 
36
34
  var OrConditions = function OrConditions(props) {
37
35
  var _useContext = useContext(BizUserConditionContext),
38
- orConditionNum = _useContext.orConditionNum,
39
- textMode = _useContext.textMode,
40
- openTagCondition = _useContext.openTagCondition;
36
+ orConditionNum = _useContext.orConditionNum;
41
37
 
42
- var orConditions = props.orConditions,
43
- showAndDesc = props.showAndDesc;
38
+ var orConditions = props.orConditions;
44
39
 
45
40
  var _useState = useState([]),
46
41
  _useState2 = _slicedToArray(_useState, 2),
47
42
  showList = _useState2[0],
48
43
  setShowList = _useState2[1];
49
44
 
45
+ var _useState3 = useState(orConditions),
46
+ _useState4 = _slicedToArray(_useState3, 2),
47
+ value = _useState4[0],
48
+ setValue = _useState4[1];
49
+
50
50
  useEffect(function () {
51
51
  if (orConditions) {
52
+ setValue(orConditions);
52
53
  initShowList();
53
54
  }
54
55
  }, [orConditions]);
@@ -71,9 +72,8 @@ var OrConditions = function OrConditions(props) {
71
72
  id: Math.random(),
72
73
  condition: condition
73
74
  };
74
- var newValue = showList.map(function (item) {
75
- return item.condition;
76
- }).concat([condition]);
75
+ var newValue = [].concat(_toConsumableArray(value), [condition]);
76
+ setValue(newValue);
77
77
  setShowList([].concat(_toConsumableArray(showList), [newData]));
78
78
  props.onChange(newValue);
79
79
  }
@@ -117,32 +117,6 @@ var OrConditions = function OrConditions(props) {
117
117
  props.onChange(newValue);
118
118
  }
119
119
 
120
- function onChangeTags(id, newTags) {
121
- changeData('tag', id, newTags);
122
- }
123
-
124
- function changeData(type, id, newData) {
125
- var newValue = [];
126
- console.log(type, id, newData);
127
- showList.forEach(function (data) {
128
- if (id === data.id) {
129
- if (type === 'period') {
130
- data.condition.runPeriod = newData;
131
- } else if (type === 'attr') {
132
- data.condition.attrs = newData;
133
- } else if (type === 'event') {
134
- data.condition = newData;
135
- } else if (type === 'tag') {
136
- data.condition.labels = newData;
137
- }
138
- }
139
-
140
- newValue.push(data.condition);
141
- });
142
- setShowList(_toConsumableArray(showList));
143
- props.onChange(newValue);
144
- }
145
-
146
120
  function onDelete(id) {
147
121
  var index = showList.findIndex(function (item) {
148
122
  return item.id === id;
@@ -155,52 +129,34 @@ var OrConditions = function OrConditions(props) {
155
129
  var newValue = newList.map(function (item) {
156
130
  return item.condition;
157
131
  });
132
+ setValue(newValue);
158
133
  props.onChange(newValue);
159
134
  }
160
135
 
161
- if (textMode) {
162
- return /*#__PURE__*/React.createElement(React.Fragment, null, textMode && showAndDesc ? /*#__PURE__*/React.createElement("span", {
163
- className: "".concat(classPrefix, "-and-desc")
164
- }, "\u4E14") : null, /*#__PURE__*/React.createElement("span", null, "("), showList.map(function (item, i) {
165
- return renderCondition(item, i);
166
- }), /*#__PURE__*/React.createElement("span", null, ")"));
167
- }
168
-
169
- function renderCondition(data, i) {
136
+ function renderCondition(data) {
170
137
  var condition = data.condition,
171
138
  id = data.id;
172
139
  var conditionDom = null;
173
140
 
174
- if (textMode) {
175
- return /*#__PURE__*/React.createElement(Text, {
176
- showOrDesc: i > 0,
177
- key: i,
178
- condition: condition
179
- });
180
- }
181
-
182
- if (condition.labels) {
183
- if (!openTagCondition) return null;
184
- conditionDom = /*#__PURE__*/React.createElement(TagsCondition, {
185
- labels: condition.labels,
186
- dataId: id,
187
- onChange: onChangeTags
188
- });
189
- } else if (condition.eventId === undefined) {
141
+ if (condition.eventId === undefined) {
190
142
  conditionDom = /*#__PURE__*/React.createElement(PropCondition, {
191
143
  label: "\u5C5E\u6027",
192
144
  attrs: condition.attrs,
193
145
  dataId: id,
194
146
  onChange: onChangeAttrs
195
147
  });
196
- } else if (condition.eventId === '-3') {
148
+ }
149
+
150
+ if (condition.eventId === '-3') {
197
151
  conditionDom = /*#__PURE__*/React.createElement(PeriodCondition, {
198
152
  label: "\u65B0\u589E\u4E8E",
199
153
  dataId: id,
200
154
  onChange: onChangeRunPeriod,
201
155
  runPeriod: condition.runPeriod
202
156
  });
203
- } else if (condition.eventId === '-4') {
157
+ }
158
+
159
+ if (condition.eventId === '-4') {
204
160
  conditionDom = /*#__PURE__*/React.createElement(PeriodCondition, {
205
161
  label: "\u6D3B\u8DC3\u4E8E",
206
162
  isRealTime: true,
@@ -208,12 +164,14 @@ var OrConditions = function OrConditions(props) {
208
164
  onChange: onChangeRunPeriod,
209
165
  runPeriod: condition.runPeriod
210
166
  });
211
- } else if (util.isNumber(condition.eventId)) {
212
- conditionDom = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(EventCondition, {
167
+ }
168
+
169
+ if (util.isNumber(condition.eventId)) {
170
+ conditionDom = /*#__PURE__*/React.createElement(EventCondition, {
213
171
  dataId: id,
214
172
  onChange: onChangeEvent,
215
173
  condition: condition
216
- }));
174
+ });
217
175
  }
218
176
 
219
177
  return /*#__PURE__*/React.createElement(ConditionWrap, {
@@ -225,15 +183,15 @@ var OrConditions = function OrConditions(props) {
225
183
  }
226
184
 
227
185
  return /*#__PURE__*/React.createElement("div", {
228
- className: ["".concat(classPrefix, "-or"),, textMode ? 'text-mode' : ''].join(' ')
186
+ className: "".concat(classPrefix, "-or")
229
187
  }, /*#__PURE__*/React.createElement("div", {
230
- className: ["".concat(classPrefix, "-or-content")].join(' ')
188
+ className: "".concat(classPrefix, "-or-content")
231
189
  }, /*#__PURE__*/React.createElement(RelationLabel, {
232
190
  show: showList.length >= 2
233
191
  }, "\u6216"), /*#__PURE__*/React.createElement("div", {
234
192
  className: "".concat(classPrefix, "-conditions")
235
- }, showList.map(function (item, i) {
236
- return renderCondition(item, i);
193
+ }, showList.map(function (item) {
194
+ return renderCondition(item);
237
195
  }))), /*#__PURE__*/React.createElement(ConditionTypeList, {
238
196
  label: "\u6216",
239
197
  onAdd: onAdd,
@@ -1,12 +1,7 @@
1
- import React, { useContext } from 'react';
2
- import { BizUserConditionContext } from '.';
1
+ import React from 'react';
3
2
  import './styles/relationLabel.less';
4
3
 
5
4
  var RelationLabel = function RelationLabel(props) {
6
- var _useContext = useContext(BizUserConditionContext),
7
- textMode = _useContext.textMode;
8
-
9
- if (textMode) return null;
10
5
  return /*#__PURE__*/React.createElement("div", {
11
6
  className: "biz-user-condition-relation"
12
7
  }, props.show ? /*#__PURE__*/React.createElement("div", {
@@ -13,7 +13,7 @@
13
13
  list-style: none;
14
14
  .condition-type {
15
15
  padding: @padding-xss 12px;
16
- background-color: @background-color-base;
16
+ border: 1px solid @border-color-base;
17
17
  border-radius: @border-radius-large;
18
18
  cursor: pointer;
19
19
  &:nth-child(n + 2) {
@@ -8,9 +8,6 @@
8
8
  flex: 1;
9
9
  }
10
10
  .biz-user-condition-item-delete {
11
- display: flex;
12
- align-items: center;
13
- height: 40px;
14
11
  margin-left: @margin-lg;
15
12
  cursor: pointer;
16
13
  }
@@ -1,32 +1,13 @@
1
1
  @import '../../assets/styles/variable.less';
2
2
  .biz-user-condition {
3
- width: 100%;
4
- min-width: 0;
5
3
  &-conditions-content {
6
4
  display: flex;
7
5
  .biz-user-condition-and-conditions-wrap {
8
6
  flex: 1;
9
- margin-bottom: @margin-lg;
10
- &.text-mode {
11
- display: flex;
12
- flex-wrap: wrap;
13
- min-width: 0;
14
- margin-bottom: 0;
15
- border: none;
16
- .biz-user-condition-and-desc {
17
- margin: 0 @margin-xs;
18
- }
19
- }
7
+ margin-bottom: @margin-md;
20
8
  }
21
9
  .biz-user-condition-and-conditions-empty {
22
10
  margin-bottom: 0;
23
11
  }
24
- .biz-select-handle-input-multiple {
25
- min-height: 40px;
26
- padding: calc(@margin-xs - 2px) @margin-xs calc(@margin-xs - 2px) @margin-sm;
27
- .biz-select-handle-holder {
28
- line-height: 28px;
29
- }
30
- }
31
12
  }
32
13
  }
@@ -1,31 +1,13 @@
1
1
  @import '../../assets/styles/variable.less';
2
2
  .biz-user-condition-or {
3
- &:not(:last-child) {
4
- margin-bottom: @margin-md;
5
- }
6
- &.text-mode {
7
- display: flex;
8
- min-width: 0;
9
- // align-items: center;
10
- margin-bottom: 0;
11
- .biz-user-condition-or-content {
12
- margin-bottom: 0;
13
- border: none;
14
- .biz-user-condition-conditions {
15
- padding: 0;
16
- }
17
- }
18
- }
3
+ margin-bottom: @margin-md;
19
4
  &-content {
20
5
  display: flex;
21
6
  width: 100%;
22
-
7
+ margin-bottom: @margin-md;
23
8
  background: #ffffff;
24
9
  border: 1px solid @border-color-base;
25
10
  border-radius: @border-radius-small;
26
- &:not(:last-child) {
27
- margin-bottom: @margin-md;
28
- }
29
11
  .biz-user-condition-conditions {
30
12
  flex: 1;
31
13
  padding: @padding-xs @padding-md 0 0;
@@ -1,9 +1,9 @@
1
- @import '../../assets/styles/inner.less';
1
+ @import '../../commonStyle/variable.less';
2
2
  .biz-user-condition-relation {
3
3
  position: relative;
4
4
  width: 2px;
5
5
  margin-right: 30px;
6
- background-color: @border-color-split;
6
+ background-color: @hoverBgColor;
7
7
  &-label {
8
8
  position: absolute;
9
9
  top: 50%;
@@ -12,8 +12,7 @@
12
12
  height: 24px;
13
13
  line-height: 24px;
14
14
  text-align: center;
15
- background-color: @border-color-split;
16
- border-radius: @border-radius-small;
15
+ background-color: @hoverBgColor;
17
16
  transform: translate(-50%, -50%);
18
17
  }
19
18
  }
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { TagI } from './../userTagsSelector/types';
3
2
  export declare type Unpacked<T, U extends keyof T> = Required<T> extends {
4
3
  [key in U]: infer R;
5
4
  } ? R : never;
@@ -16,21 +15,13 @@ export interface AllConditionBasePropsI<T> {
16
15
  onChange: (dataId: number, newData: T) => void;
17
16
  }
18
17
  export declare namespace BizUserConditionT {
19
- type ConditionType = 'add' | 'active' | 'event' | 'prop' | 'tag';
18
+ type ConditionType = 'add' | 'active' | 'event' | 'prop';
20
19
  interface PropsI {
21
20
  defaultValue: BizUserConditionT.Conditions;
22
21
  onChange: (value: any[]) => void;
23
22
  andConditionNum?: number;
24
23
  orConditionNum?: number;
25
24
  eventAttrNum?: number;
26
- textMode?: boolean;
27
- openTagCondition?: boolean;
28
- userTagsData?: UserTagsDataI[];
29
- isRealTime?: boolean;
30
- }
31
- interface UserTagsDataI {
32
- labelGroup: string;
33
- children: TagI[];
34
25
  }
35
26
  interface AttrCondition {
36
27
  attrId: number;
@@ -59,20 +50,11 @@ export declare namespace BizUserConditionT {
59
50
  runPeriod: RunPeriodI;
60
51
  runTimes: RunTimesI;
61
52
  }
62
- interface Labels {
63
- operator: 'not equal' | 'equal';
64
- values: number[];
65
- }
66
- interface TagsCondition {
67
- attrs: [];
68
- labels: Labels;
69
- eventId: undefined;
70
- }
71
53
  interface PropCondition {
72
54
  attrs: AttrCondition[];
73
55
  eventId: undefined;
74
56
  }
75
- type Condition = EventCondition | AddCondition | ActiveCondition | PropCondition | TagsCondition;
57
+ type Condition = EventCondition | AddCondition | ActiveCondition | PropCondition;
76
58
  type Conditions = Condition[][];
77
59
  interface ShowItemI {
78
60
  id: number;
@@ -84,7 +66,6 @@ export declare namespace OrConditionsT {
84
66
  interface PropI {
85
67
  onChange: (value: any[]) => void;
86
68
  orConditions: BizUserConditionT.Conditions[number];
87
- showAndDesc: boolean;
88
69
  }
89
70
  interface ShowItemI {
90
71
  id: number;
@@ -1,7 +1,3 @@
1
- import type { GlobalContextProps } from '../context';
2
- import type { BizUserConditionT, Unpacked } from './types';
1
+ import { BizUserConditionT } from './types';
3
2
  export declare function buildCondition(type: BizUserConditionT.ConditionType): BizUserConditionT.EventCondition | BizUserConditionT.AddCondition | BizUserConditionT.ActiveCondition | BizUserConditionT.PropCondition;
4
3
  export declare function transformNumberOperate(key: string, output?: boolean): string;
5
- export declare function findEvent(eventId: number, eventGroupList: Unpacked<GlobalContextProps, 'eventGroupList'>): import("../attributeSelector/types").AnalysisEvent | null;
6
- export declare function findPropAndEnv(name: string, list: Unpacked<GlobalContextProps, 'userPropList' | 'eventEnvList'>): import("../attributeSelector/types").UserProp | import("../attributeSelector/types").EnvProp | null;
7
- export declare function findTagFactory(data: BizUserConditionT.UserTagsDataI[]): (id: number) => import("../userTagsSelector/types").TagI | null;
@@ -50,16 +50,6 @@ export function buildCondition(type) {
50
50
  attrId: 0
51
51
  }]
52
52
  };
53
-
54
- case 'tag':
55
- return {
56
- attrs: [],
57
- labels: {
58
- operator: 'equal',
59
- values: []
60
- },
61
- eventId: undefined
62
- };
63
53
  }
64
54
  }
65
55
  export function transformNumberOperate(key) {
@@ -80,36 +70,4 @@ export function transformNumberOperate(key) {
80
70
  };
81
71
  if (output) return outputMap[key] || key;
82
72
  return inputMap[key] || key;
83
- }
84
- export function findEvent(eventId, eventGroupList) {
85
- for (var i = 0; i < eventGroupList.length; i++) {
86
- var eventList = eventGroupList[i].eventList;
87
-
88
- for (var j = 0; j < eventList.length; j++) {
89
- if (eventList[j].id === eventId) return eventList[j];
90
- }
91
- }
92
-
93
- return null;
94
- }
95
- export function findPropAndEnv(name, list) {
96
- for (var i = 0; i < list.length; i++) {
97
- if (list[i].name === name) return list[i];
98
- }
99
-
100
- return null;
101
- }
102
- export function findTagFactory(data) {
103
- return function (id) {
104
- var i = -1;
105
- var j = data.findIndex(function (item) {
106
- i = item.children.findIndex(function (tag) {
107
- return tag.labelId === id;
108
- });
109
- if (i < 0) return false;
110
- return true;
111
- });
112
- if (j < 0) return null;
113
- return data[j].children[i];
114
- };
115
73
  }
@@ -1,5 +1,5 @@
1
- import { PropType, ShowStatus } from '../attributeSelector/types';
2
1
  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: ShowStatus;
24
+ event_hidden: boolean;
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.15-user.2",
3
+ "version": "1.0.15",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -36,7 +36,6 @@
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",
40
39
  "react-infinite-scroll-component": "^6.1.0",
41
40
  "umi-request": "^1.4.0"
42
41
  },
@@ -49,11 +48,9 @@
49
48
  "@testing-library/jest-dom": "^5.15.1",
50
49
  "@testing-library/react": "^12.1.2",
51
50
  "@types/jest": "^27.0.3",
52
- "@types/lodash": "^4.14.182",
53
51
  "@types/qs": "^6.9.7",
54
52
  "@umijs/fabric": "^2.8.1",
55
53
  "@umijs/test": "^3.0.5",
56
- "@zgfe/business-lib": "^1.0.15-user.2",
57
54
  "antd": "^4.19.2",
58
55
  "dumi": "^1.1.0",
59
56
  "father-build": "^1.17.2",
@@ -62,5 +59,5 @@
62
59
  "prettier": "^2.2.1",
63
60
  "yorkie": "^2.0.0"
64
61
  },
65
- "gitHead": "a81065a7d384c18f20773ec155efad1ed01c61c5"
62
+ "gitHead": "0a48d3a8065d6f69ea294686714e65a4ca51a507"
66
63
  }
@@ -1,15 +0,0 @@
1
- declare const _default: {
2
- 'primary-color': string;
3
- 'border-color-base': string;
4
- 'background-color-base': string;
5
- 'text-color': string;
6
- 'text-color-secondary': string;
7
- 'tooltip-bg': string;
8
- 'error-color': string;
9
- 'shadow-color': string;
10
- 'box-shadow-base': string;
11
- 'btn-text-hover-bg': string;
12
- 'warning-color': string;
13
- 'border-color-split': string;
14
- };
15
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: () => JSX.Element;
2
- export default _default;
@@ -1,81 +0,0 @@
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 { BizSelect } from '@zgfe/business-lib';
15
- import { Button } from 'antd';
16
- var stringOperate = [{
17
- name: '是',
18
- value: 'equal'
19
- }, {
20
- name: '包含',
21
- value: 'contains'
22
- }, {
23
- name: '不是',
24
- value: 'not equal'
25
- }, {
26
- name: '不包含',
27
- value: 'not contains'
28
- }, {
29
- name: '开头是',
30
- value: 'begin with'
31
- }, {
32
- name: '结尾是',
33
- value: 'end with'
34
- }, {
35
- name: '开头不是',
36
- value: 'not begin with'
37
- }, {
38
- name: '结尾不是',
39
- value: 'not end with'
40
- }, {
41
- name: '是空值',
42
- value: 'is null'
43
- }, {
44
- name: '不是空值',
45
- value: 'is not null'
46
- }];
47
- var disabledList = [{
48
- value: 'not equal'
49
- }, {
50
- value: 'not begin with'
51
- }];
52
- export default (function () {
53
- var _useState = useState([{
54
- name: '不是',
55
- value: 'not equal'
56
- }]),
57
- _useState2 = _slicedToArray(_useState, 2),
58
- data = _useState2[0],
59
- setData = _useState2[1];
60
-
61
- var onChange = function onChange(value) {
62
- console.log(value);
63
- setData(function () {
64
- return value;
65
- });
66
- };
67
-
68
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizSelect, {
69
- options: stringOperate,
70
- value: data,
71
- labelField: "name",
72
- keyField: "value",
73
- theme: "secondary",
74
- popupContainer: true,
75
- onChange: onChange,
76
- disableItemList: disabledList,
77
- multiple: true
78
- }, /*#__PURE__*/React.createElement(Button, {
79
- type: "primary"
80
- }, "\u70B9\u51FB\u6253\u5F00\u4E0B\u62C9")));
81
- });
@@ -1,21 +0,0 @@
1
- export declare const operatorMap: {
2
- relative: string;
3
- absolute: string;
4
- unlimited_time: string;
5
- join_time: string;
6
- 'is not null': string;
7
- 'is null': string;
8
- 'not contains': string;
9
- contains: string;
10
- equal: string;
11
- 'not equal': string;
12
- 'begin with': string;
13
- 'not begin with': string;
14
- 'end with': string;
15
- 'not end with': string;
16
- '=': string;
17
- '<': string;
18
- '>': string;
19
- '>=': string;
20
- '<=': string;
21
- };
@@ -1,21 +0,0 @@
1
- export var operatorMap = {
2
- relative: '最近',
3
- absolute: '固定时段',
4
- unlimited_time: '任意时间',
5
- join_time: '新增后',
6
- 'is not null': '不是空值',
7
- 'is null': '是空值',
8
- 'not contains': '不包含',
9
- contains: '包含',
10
- equal: '是',
11
- 'not equal': '不是',
12
- 'begin with': '开头是',
13
- 'not begin with': '开头不是',
14
- 'end with': '结尾是',
15
- 'not end with': '结尾不是',
16
- '=': '',
17
- '<': '',
18
- '>': '',
19
- '>=': '',
20
- '<=': ''
21
- };
@@ -1,18 +0,0 @@
1
- @import '../../../assets/styles/variable.less';
2
- .biz-user-condition-tags-condition {
3
- display: flex;
4
- &-label,
5
- &-value {
6
- margin-right: @margin-xs;
7
- }
8
- &-label {
9
- line-height: 40px;
10
- }
11
- &-value {
12
- flex: 1;
13
- min-width: 0;
14
- }
15
- &-operator {
16
- width: 96px;
17
- }
18
- }
@@ -1,17 +0,0 @@
1
- @import '../../../assets/styles/variable.less';
2
- .biz-user-condition {
3
- &-text-desc {
4
- color: @text-color-secondary;
5
- font-size: 14px;
6
- &-or {
7
- margin: 0 @margin-xs;
8
- }
9
- &-label {
10
- }
11
- &-operator {
12
- }
13
- &-value {
14
- color: @text-color;
15
- }
16
- }
17
- }
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { AllConditionBasePropsI, BizUserConditionT } from '../types';
3
- import './styles/tagsCondition.less';
4
- declare type Labels = BizUserConditionT.Labels;
5
- export interface TagsConditionPropI extends AllConditionBasePropsI<Labels> {
6
- labels: Labels;
7
- }
8
- declare const TagsCondition: React.FC<TagsConditionPropI>;
9
- export default TagsCondition;