@zgfe/business-lib 1.1.33 → 1.1.34-alpha.1

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 (63) hide show
  1. package/es/assets/iconfont/demo_index.html +3 -95
  2. package/es/assets/iconfont/iconfont.css +3 -19
  3. package/es/assets/iconfont/iconfont.js +1 -1
  4. package/es/assets/iconfont/iconfont.json +0 -28
  5. package/es/assets/iconfont/iconfont.ttf +0 -0
  6. package/es/assets/iconfont/iconfont.woff +0 -0
  7. package/es/assets/iconfont/iconfont.woff2 +0 -0
  8. package/es/assets/styles/resetAntd.less +36 -12
  9. package/es/attrConditions/components/stringList.js +1 -0
  10. package/es/attrConditions/demo/index.js +11 -1
  11. package/es/attrConditions/index.js +1 -2
  12. package/es/attrConditions/utils/operates.d.ts +50 -0
  13. package/es/attrConditions/utils/operates.js +126 -0
  14. package/es/constants/apis.d.ts +0 -1
  15. package/es/constants/apis.js +1 -2
  16. package/es/context/index.d.ts +1 -0
  17. package/es/datePicker/index.d.ts +1 -1
  18. package/es/datePicker/index.js +1 -1
  19. package/es/datePicker/styles/index.less +1 -1
  20. package/es/demoWrapper/content.d.ts +1 -2
  21. package/es/demoWrapper/content.js +12 -23
  22. package/es/demoWrapper/demo/index.js +3 -5
  23. package/es/demoWrapper/head.d.ts +1 -3
  24. package/es/demoWrapper/head.js +5 -17
  25. package/es/demoWrapper/index.js +10 -18
  26. package/es/eventSelector/listPanel.js +4 -11
  27. package/es/index.d.ts +1 -3
  28. package/es/index.js +1 -3
  29. package/es/userCondition/conditionTypeList.js +19 -2
  30. package/es/userCondition/conditions/businessCondition.d.ts +11 -0
  31. package/es/userCondition/conditions/businessCondition.js +416 -0
  32. package/es/userCondition/conditions/constants.d.ts +1 -0
  33. package/es/userCondition/conditions/constants.js +2 -1
  34. package/es/userCondition/conditions/dataAttribute.d.ts +10 -0
  35. package/es/userCondition/conditions/dataAttribute.js +448 -0
  36. package/es/userCondition/conditions/eventCondition.js +77 -2
  37. package/es/userCondition/conditions/timeDimension.d.ts +9 -0
  38. package/es/userCondition/conditions/timeDimension.js +200 -0
  39. package/es/userCondition/orConditions.js +15 -0
  40. package/es/userCondition/types.d.ts +34 -3
  41. package/es/userCondition/util.d.ts +1 -1
  42. package/es/userCondition/util.js +29 -0
  43. package/package.json +60 -60
  44. package/es/assets/colorIcon/demo.css +0 -539
  45. package/es/assets/colorIcon/demo_index.html +0 -741
  46. package/es/assets/colorIcon/iconfont.css +0 -112
  47. package/es/assets/colorIcon/iconfont.js +0 -43
  48. package/es/assets/colorIcon/iconfont.json +0 -177
  49. package/es/assets/colorIcon/iconfont.svg +0 -67
  50. package/es/assets/colorIcon/iconfont.ttf +0 -0
  51. package/es/assets/colorIcon/iconfont.woff +0 -0
  52. package/es/assets/colorIcon/iconfont.woff2 +0 -0
  53. package/es/colorIcon/demo/index.d.ts +0 -3
  54. package/es/colorIcon/demo/index.js +0 -10
  55. package/es/colorIcon/index.d.ts +0 -9
  56. package/es/colorIcon/index.js +0 -19
  57. package/es/socket/demo/demo.d.ts +0 -2
  58. package/es/socket/demo/demo.js +0 -145
  59. package/es/socket/demo/index.less +0 -27
  60. package/es/socket/index.d.ts +0 -31
  61. package/es/socket/index.js +0 -291
  62. package/es/socket/types.d.ts +0 -38
  63. package/es/socket/types.js +0 -28
@@ -16,8 +16,12 @@
16
16
  border-color: @primary-color!important;
17
17
  }
18
18
 
19
- &.ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless):not(.ant-input-affix-wrapper-focused).ant-input-affix-wrapper,
20
- &.ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless):not(.ant-input-affix-wrapper-focused).ant-input-affix-wrapper:hover {
19
+ &.ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(
20
+ .ant-input-affix-wrapper-borderless
21
+ ):not(.ant-input-affix-wrapper-focused).ant-input-affix-wrapper,
22
+ &.ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(
23
+ .ant-input-affix-wrapper-borderless
24
+ ):not(.ant-input-affix-wrapper-focused).ant-input-affix-wrapper:hover {
21
25
  background-color: @background-color-base!important;
22
26
  }
23
27
  }
@@ -31,8 +35,12 @@
31
35
  }
32
36
  }
33
37
 
34
- .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper,
35
- .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:hover {
38
+ .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(
39
+ .ant-input-affix-wrapper-borderless
40
+ ).ant-input-affix-wrapper,
41
+ .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(
42
+ .ant-input-affix-wrapper-borderless
43
+ ).ant-input-affix-wrapper:hover {
36
44
  border-color: @error-color!important;
37
45
  }
38
46
  // 输入框
@@ -62,7 +70,9 @@
62
70
  background-color: @background-color-base!important;
63
71
  }
64
72
 
65
- .ant-select:not(.ant-select-customize-input):not(.ant-pagination-size-changer):not(.ant-select-status-error)
73
+ .ant-select:not(.ant-select-customize-input):not(.ant-pagination-size-changer):not(
74
+ .ant-select-status-error
75
+ )
66
76
  .ant-select-selector {
67
77
  background: #fafafb;
68
78
  border-color: rgba(0, 0, 0, 0);
@@ -229,7 +239,9 @@
229
239
  /*日期hover*/
230
240
  &:hover {
231
241
  &:not(.ant-picker-cell-in-view) .ant-picker-cell-inner,
232
- &:not(.ant-picker-cell-selected):not(.ant-picker-cell-range-start):not(.ant-picker-cell-range-end):not(.ant-picker-cell-range-hover-start):not(.ant-picker-cell-range-hover-end)
242
+ &:not(.ant-picker-cell-selected):not(.ant-picker-cell-range-start):not(
243
+ .ant-picker-cell-range-end
244
+ ):not(.ant-picker-cell-range-hover-start):not(.ant-picker-cell-range-hover-end)
233
245
  .ant-picker-cell-inner {
234
246
  background-color: transparent !important;
235
247
  border: 1px solid @primary-color!important;
@@ -239,9 +251,13 @@
239
251
 
240
252
  /*选中的日期范围*/
241
253
  /* 日期范围的起始时间radius */
242
- .ant-picker-cell-in-view.ant-picker-cell-range-start:not(.ant-picker-cell-range-start-single):not(.ant-picker-cell-range-end)
254
+ .ant-picker-cell-in-view.ant-picker-cell-range-start:not(.ant-picker-cell-range-start-single):not(
255
+ .ant-picker-cell-range-end
256
+ )
243
257
  .ant-picker-cell-inner,
244
- .ant-picker-cell-in-view.ant-picker-cell-range-end:not(.ant-picker-cell-range-end-single):not(.ant-picker-cell-range-start)
258
+ .ant-picker-cell-in-view.ant-picker-cell-range-end:not(.ant-picker-cell-range-end-single):not(
259
+ .ant-picker-cell-range-start
260
+ )
245
261
  .ant-picker-cell-inner {
246
262
  border-radius: 50% !important;
247
263
  }
@@ -272,8 +288,12 @@
272
288
  .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover::before,
273
289
  .ant-picker-cell-in-view.ant-picker-cell-range-start.ant-picker-cell-range-hover::before,
274
290
  .ant-picker-cell-in-view.ant-picker-cell-range-end.ant-picker-cell-range-hover::before,
275
- .ant-picker-cell-in-view.ant-picker-cell-range-start:not(.ant-picker-cell-range-start-single).ant-picker-cell-range-hover-start::before,
276
- .ant-picker-cell-in-view.ant-picker-cell-range-end:not(.ant-picker-cell-range-end-single).ant-picker-cell-range-hover-end::before,
291
+ .ant-picker-cell-in-view.ant-picker-cell-range-start:not(
292
+ .ant-picker-cell-range-start-single
293
+ ).ant-picker-cell-range-hover-start::before,
294
+ .ant-picker-cell-in-view.ant-picker-cell-range-end:not(
295
+ .ant-picker-cell-range-end-single
296
+ ).ant-picker-cell-range-hover-end::before,
277
297
  .ant-picker-panel
278
298
  > :not(.ant-picker-date-panel)
279
299
  .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-start::before,
@@ -296,8 +316,12 @@
296
316
  }
297
317
  }
298
318
  }
299
- .ant-picker-cell-in-view.ant-picker-cell-range-start:not(.ant-picker-cell-range-start-single)::before,
300
- .ant-picker-cell-in-view.ant-picker-cell-range-end:not(.ant-picker-cell-range-end-single)::before {
319
+ .ant-picker-cell-in-view.ant-picker-cell-range-start:not(
320
+ .ant-picker-cell-range-start-single
321
+ )::before,
322
+ .ant-picker-cell-in-view.ant-picker-cell-range-end:not(
323
+ .ant-picker-cell-range-end-single
324
+ )::before {
301
325
  background: @primary-color-hover !important;
302
326
  }
303
327
  }
@@ -128,6 +128,7 @@ var StringList = function StringList(props) {
128
128
  };
129
129
  }();
130
130
  var onChange = function onChange(data) {
131
+ console.log(8888, data);
131
132
  var resData = data.map(function (item) {
132
133
  return item.value;
133
134
  });
@@ -11,7 +11,17 @@ export default (function () {
11
11
  var _Form$useForm = Form.useForm(),
12
12
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
13
13
  form = _Form$useForm2[0];
14
- var _useState = useState({}),
14
+ var _useState = useState({
15
+ condition: {
16
+ attrId: 30183426,
17
+ propCategory: 'eventProp',
18
+ type: 1,
19
+ operator: 'equal',
20
+ values: [],
21
+ dimensionSub: 'event_attr',
22
+ attrName: '公众号名称'
23
+ }
24
+ }),
15
25
  _useState2 = _slicedToArray(_useState, 2),
16
26
  formData = _useState2[0],
17
27
  setFormData = _useState2[1];
@@ -50,7 +50,6 @@ var BizConditionItem = function BizConditionItem(props) {
50
50
  propCategory: data.propCategory,
51
51
  type: data.type,
52
52
  key: data.attrId,
53
- label: data.label,
54
53
  dimensionSub: data.dimensionSub || 'event_attr'
55
54
  };
56
55
  }
@@ -86,7 +85,7 @@ var BizConditionItem = function BizConditionItem(props) {
86
85
  operator: operate,
87
86
  values: values || [],
88
87
  dimensionSub: attr.dimensionSub,
89
- label: attr.alias || attr.label
88
+ label: attr.label
90
89
  };
91
90
  if (attr.propCategory === PropCategory.EventProp) {
92
91
  responseData.attrName = attr.label;
@@ -6,6 +6,56 @@ export declare const numberOperate: {
6
6
  name: string;
7
7
  value: string;
8
8
  }[];
9
+ export declare const computeTypeList: {
10
+ value: string;
11
+ name: string;
12
+ }[];
13
+ export declare const typeList: {
14
+ 'cont-string': {
15
+ name: string;
16
+ value: string;
17
+ }[];
18
+ 'cont-date': {
19
+ name: string;
20
+ value: string;
21
+ }[];
22
+ 'cont-num': {
23
+ name: string;
24
+ value: string;
25
+ }[];
26
+ };
27
+ export declare const timeDimensionType: {
28
+ name: string;
29
+ value: number;
30
+ }[];
31
+ export declare const orderTypeList: {
32
+ name: string;
33
+ value: string;
34
+ }[];
35
+ export declare const skyTimeOperatorType: {
36
+ name: string;
37
+ value: string;
38
+ }[];
39
+ export declare const weekTimeOperatorType: {
40
+ name: string;
41
+ value: string;
42
+ }[];
43
+ export declare const monthTimeOperatorType: {
44
+ name: string;
45
+ value: string;
46
+ }[];
47
+ export declare const timeValuesType: {
48
+ name: string;
49
+ value: any;
50
+ }[];
51
+ export declare const weekValuesType: {
52
+ name: string;
53
+ value: number;
54
+ }[];
55
+ export declare const monthValuesType: {
56
+ name: string;
57
+ value: any;
58
+ }[];
9
59
  export declare const dateOperate: {
10
60
  name: string;
11
61
  value: string;
@@ -1,3 +1,4 @@
1
+ var _Array$from, _Array$from2;
1
2
  export var stringOperate = [{
2
3
  name: '是',
3
4
  value: 'equal'
@@ -48,6 +49,131 @@ export var numberOperate = [{
48
49
  name: '≠',
49
50
  value: 'not equal'
50
51
  }];
52
+ export var computeTypeList = [{
53
+ value: 'origin',
54
+ name: '原值'
55
+ }, {
56
+ value: 'max',
57
+ name: '最大值'
58
+ }, {
59
+ value: 'min',
60
+ name: '最小值'
61
+ }, {
62
+ value: 'sum',
63
+ name: '累计值'
64
+ }, {
65
+ value: 'avg',
66
+ name: '平均值'
67
+ }];
68
+ export var typeList = {
69
+ 'cont-string': stringOperate,
70
+ 'cont-date': [{
71
+ name: '最近',
72
+ value: 'relative'
73
+ }, {
74
+ name: '最近区间',
75
+ value: 'relativeInterval'
76
+ }, {
77
+ name: '未来',
78
+ value: 'future'
79
+ }, {
80
+ name: '未来区间',
81
+ value: 'futureInterval'
82
+ }, {
83
+ name: '固定时段',
84
+ value: 'absolute'
85
+ }],
86
+ 'cont-num': [{
87
+ name: '>',
88
+ value: '>'
89
+ }, {
90
+ name: '=',
91
+ value: '='
92
+ }, {
93
+ name: '<',
94
+ value: '<'
95
+ }, {
96
+ name: '>=',
97
+ value: '>='
98
+ }, {
99
+ name: '<=',
100
+ value: '<='
101
+ }, {
102
+ name: '≠',
103
+ value: 'not equal'
104
+ }, {
105
+ name: '区间',
106
+ value: 'between'
107
+ }]
108
+ };
109
+ export var timeDimensionType = [{
110
+ name: '每天',
111
+ value: 1
112
+ }, {
113
+ name: '每周',
114
+ value: 2
115
+ }, {
116
+ name: '每月',
117
+ value: 3
118
+ }];
119
+ export var orderTypeList = [{
120
+ name: '主订单',
121
+ value: 'master'
122
+ }, {
123
+ name: '子订单',
124
+ value: 'son'
125
+ }];
126
+ export var skyTimeOperatorType = [{
127
+ name: '整天',
128
+ value: 'all'
129
+ }, {
130
+ name: '在',
131
+ value: 'in'
132
+ }, {
133
+ name: '在区间',
134
+ value: 'between'
135
+ }];
136
+ export var weekTimeOperatorType = [{
137
+ name: '整周',
138
+ value: 'all'
139
+ }, {
140
+ name: '在',
141
+ value: 'in'
142
+ }, {
143
+ name: '在区间',
144
+ value: 'between'
145
+ }];
146
+ export var monthTimeOperatorType = [{
147
+ name: '整月',
148
+ value: 'all'
149
+ }, {
150
+ name: '在',
151
+ value: 'in'
152
+ }, {
153
+ name: '在区间',
154
+ value: 'between'
155
+ }];
156
+ var arr1 = new Array(24).keys();
157
+ export var timeValuesType = (_Array$from = Array.from(arr1)) === null || _Array$from === void 0 ? void 0 : _Array$from.map(function (item) {
158
+ return {
159
+ name: item + '时',
160
+ value: item
161
+ };
162
+ });
163
+ var arr2 = ['一', '二', '三', '四', '五', '六', '日'];
164
+ export var weekValuesType = arr2.map(function (item, index) {
165
+ return {
166
+ name: '周' + item,
167
+ value: index + 1
168
+ };
169
+ });
170
+ var arr3 = new Array(31).keys();
171
+ export var monthValuesType = (_Array$from2 = Array.from(arr3)) === null || _Array$from2 === void 0 ? void 0 : _Array$from2.map(function (item) {
172
+ return {
173
+ name: item + 1 + '号',
174
+ value: item + 1
175
+ };
176
+ });
51
177
  export var dateOperate = [{
52
178
  name: '最近',
53
179
  value: 'relative'
@@ -7,6 +7,5 @@ declare const Apis: {
7
7
  queryPanelGroup: string;
8
8
  queryDatasetList: string;
9
9
  queryDatasetDetail: string;
10
- getSocketToken: string;
11
10
  };
12
11
  export default Apis;
@@ -6,7 +6,6 @@ var Apis = {
6
6
  updatePanelTarget: '/apppanel/updateElemet.jsp',
7
7
  queryPanelGroup: '/apppanel/panels.jsp',
8
8
  queryDatasetList: '/zg/web/cdp/inner/dataset/list',
9
- queryDatasetDetail: '/zg/web/cdp/inner/dataset/detail',
10
- getSocketToken: '/zg/web/v2/tracking/view/websocket/token'
9
+ queryDatasetDetail: '/zg/web/cdp/inner/dataset/detail'
11
10
  };
12
11
  export default Apis;
@@ -36,6 +36,7 @@ export interface GlobalContextProps {
36
36
  router?: any;
37
37
  routes?: any;
38
38
  envs?: Record<string, any>;
39
+ system?: string;
39
40
  }
40
41
  declare const BizGlobalDataContext: import("react").Context<GlobalContextProps>;
41
42
  export default BizGlobalDataContext;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { DatePickerTypes } from './types';
3
3
  import './styles/index.less';
4
- export declare const classPrefix = "biz-date-picker-wrap";
4
+ export declare const classPrefix = "biz-date-picker";
5
5
  declare const BizDatePicker: React.FC<DatePickerTypes.Props>;
6
6
  export default BizDatePicker;
@@ -16,7 +16,7 @@ import BizSelect from '../select';
16
16
  import BizDate from './datePicker';
17
17
  import './styles/index.less';
18
18
  import { Skeleton } from 'antd';
19
- export var classPrefix = 'biz-date-picker-wrap';
19
+ export var classPrefix = 'biz-date-picker';
20
20
  var BizDatePicker = function BizDatePicker(props) {
21
21
  var dateList = getDateList(props.mode, props.dateTypeList);
22
22
  var _useState = useState(dateList[0]),
@@ -1,6 +1,6 @@
1
1
  @import '../../assets/styles/inner.less';
2
2
 
3
- .biz-date-picker-wrap {
3
+ .biz-date-picker {
4
4
  display: flex;
5
5
 
6
6
  &-type {
@@ -1,8 +1,7 @@
1
1
  import React, { ReactNode } from 'react';
2
- import { AppInfoProps } from '../context';
3
2
  declare const DemoContent: React.FC<{
4
3
  children?: ReactNode;
5
4
  needMeta?: boolean;
6
- currentApp?: AppInfoProps;
5
+ currentApp?: number;
7
6
  }>;
8
7
  export default DemoContent;
@@ -1,9 +1,3 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
1
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
2
  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."); }
9
3
  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); }
@@ -88,16 +82,10 @@ var DemoContent = function DemoContent(_ref3) {
88
82
  setStore = _useState18[1];
89
83
  useEffect(function () {
90
84
  if (!needMeta || !currentApp) return;
91
- if (currentApp.appsHasData && currentApp.appsHasData.length) {
92
- loadUserProps();
93
- loadEvents();
94
- loadEnvList();
95
- loadUserGroup();
96
- } else {
97
- setLoadEnv(false);
98
- setLoadEvent(false);
99
- setLoadUsers(false);
100
- }
85
+ loadUserProps();
86
+ loadEvents();
87
+ loadEnvList();
88
+ loadUserGroup();
101
89
  }, [currentApp, needMeta]);
102
90
  useEffect(function () {
103
91
  if (loadEnv || loadEvent || loadUsers || loadUserGroups) return;
@@ -112,7 +100,7 @@ var DemoContent = function DemoContent(_ref3) {
112
100
  ajax('/analysis/api/common/proxy/usergroup/getAll.jsp', {
113
101
  method: 'post',
114
102
  params: {
115
- appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.id,
103
+ appId: currentApp,
116
104
  platform: 0,
117
105
  includeDefault: true,
118
106
  includeToday: true
@@ -127,7 +115,7 @@ var DemoContent = function DemoContent(_ref3) {
127
115
  ajax('/analysis/api/common/proxy/appusergroup/getUserPropMeta.jsp', {
128
116
  method: 'post',
129
117
  params: {
130
- app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.id,
118
+ app_id: currentApp,
131
119
  platform: 0
132
120
  }
133
121
  }).then(function (res) {
@@ -140,7 +128,7 @@ var DemoContent = function DemoContent(_ref3) {
140
128
  ajax('/analysis/api/common/proxy/data/queryEventMetasOfGroup.jsp', {
141
129
  method: 'post',
142
130
  params: {
143
- app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.id,
131
+ app_id: currentApp,
144
132
  platform: 0,
145
133
  is_all: true
146
134
  }
@@ -154,7 +142,7 @@ var DemoContent = function DemoContent(_ref3) {
154
142
  ajax('/analysis/api/common/proxy/appusergroup/getEventEnvData.jsp', {
155
143
  method: 'post',
156
144
  params: {
157
- app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.id,
145
+ app_id: currentApp,
158
146
  platform: 0
159
147
  }
160
148
  }).then(function (res) {
@@ -169,9 +157,10 @@ var DemoContent = function DemoContent(_ref3) {
169
157
  }
170
158
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BizGlobalDataContext.Provider, {
171
159
  value: {
172
- currentApp: _objectSpread(_objectSpread({}, currentApp), {}, {
173
- appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.id
174
- }),
160
+ currentApp: {
161
+ appId: currentApp,
162
+ platform: 0
163
+ },
175
164
  eventGroupList: store === null || store === void 0 ? void 0 : store.eventGroupList,
176
165
  userPropList: store === null || store === void 0 ? void 0 : store.userPropList,
177
166
  eventEnvList: store === null || store === void 0 ? void 0 : store.envPropList,
@@ -1,10 +1,8 @@
1
1
  import React from 'react';
2
- import { DemoWrapper, BizGlobalDataContext } from '@zgfe/business-lib';
2
+ import { DemoWrapper } from '@zgfe/business-lib';
3
3
  export default (function () {
4
4
  return /*#__PURE__*/React.createElement(DemoWrapper, {
5
+ defaultApp: 3,
5
6
  needMeta: true
6
- }, /*#__PURE__*/React.createElement(BizGlobalDataContext.Consumer, null, function (_ref) {
7
- var currentApp = _ref.currentApp;
8
- return /*#__PURE__*/React.createElement(React.Fragment, null, "\u5F53\u524D\u5E94\u7528\uFF1A", currentApp.appName, "(id: ", currentApp.id, ")");
9
- }));
7
+ }, "xxx");
10
8
  });
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
- import { AppInfoProps } from '../context';
3
2
  declare const DemoHeader: React.FC<{
4
3
  defaultApp?: number;
5
- onChangeApp?: (app: AppInfoProps) => void;
6
- onLoading?: (loading: boolean) => void;
4
+ onChangeApp?: (appId: number) => void;
7
5
  }>;
8
6
  export default DemoHeader;
@@ -9,8 +9,7 @@ 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
- onChangeApp = _ref.onChangeApp,
13
- onLoading = _ref.onLoading;
12
+ onChangeApp = _ref.onChangeApp;
14
13
  var _useState = useState([]),
15
14
  _useState2 = _slicedToArray(_useState, 2),
16
15
  appList = _useState2[0],
@@ -22,25 +21,17 @@ var DemoHeader = function DemoHeader(_ref) {
22
21
  useEffect(function () {
23
22
  queryAppList();
24
23
  }, []);
25
- useEffect(function () {
26
- if (onLoading) onLoading(loading);
27
- }, [loading, appList]);
28
24
  function queryAppList() {
29
25
  setLoading(true);
30
26
  request('/analysis/api/common/proxy/data/v2ajaxGetDataByApp.jsp').then(function (res) {
31
27
  setAppList(res.applist);
32
- if (defaultApp) {
33
- _onChange(res.applist.find(function (item) {
34
- return item.id === defaultApp;
35
- }));
36
- }
37
- if (!defaultApp && res.applist.length) _onChange(res.applist[0]);
28
+ if (!defaultApp && res.applist.length) onChange(res.applist[0].id);
38
29
  }).finally(function () {
39
30
  setLoading(false);
40
31
  });
41
32
  }
42
- function _onChange(item) {
43
- if (onChangeApp) onChangeApp(item);
33
+ function onChange(id) {
34
+ if (onChangeApp) onChangeApp(id);
44
35
  }
45
36
  if (loading) return /*#__PURE__*/React.createElement(Skeleton.Input, null);
46
37
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, {
@@ -50,10 +41,7 @@ var DemoHeader = function DemoHeader(_ref) {
50
41
  label: 'appName',
51
42
  value: 'id'
52
43
  },
53
- onChange: function onChange(_id, app) {
54
- console.log('默认应用', app);
55
- _onChange(app);
56
- },
44
+ onChange: onChange,
57
45
  style: {
58
46
  width: '200px'
59
47
  }
@@ -20,18 +20,14 @@ var DemoWrapper = function DemoWrapper(_ref) {
20
20
  _useState2 = _slicedToArray(_useState, 2),
21
21
  loading = _useState2[0],
22
22
  setLoading = _useState2[1];
23
- var _useState3 = useState(true),
23
+ var _useState3 = useState(false),
24
24
  _useState4 = _slicedToArray(_useState3, 2),
25
- appListLoading = _useState4[0],
26
- setAppListLoading = _useState4[1];
27
- var _useState5 = useState(false),
25
+ notLogin = _useState4[0],
26
+ setNotLogin = _useState4[1];
27
+ var _useState5 = useState(defaultApp),
28
28
  _useState6 = _slicedToArray(_useState5, 2),
29
- notLogin = _useState6[0],
30
- setNotLogin = _useState6[1];
31
- var _useState7 = useState(),
32
- _useState8 = _slicedToArray(_useState7, 2),
33
- app = _useState8[0],
34
- setApp = _useState8[1];
29
+ appId = _useState6[0],
30
+ setAppId = _useState6[1];
35
31
  useEffect(function () {
36
32
  getCurrentUser();
37
33
  }, []);
@@ -57,19 +53,15 @@ var DemoWrapper = function DemoWrapper(_ref) {
57
53
  return /*#__PURE__*/React.createElement(Card, {
58
54
  title: /*#__PURE__*/React.createElement(DemoHeader, {
59
55
  defaultApp: defaultApp,
60
- onChangeApp: setApp,
61
- onLoading: setAppListLoading
56
+ onChangeApp: setAppId
62
57
  }),
63
58
  className: className,
64
59
  bodyStyle: {
65
60
  background: '#FAFAFB'
66
61
  }
67
- }, appListLoading ? /*#__PURE__*/React.createElement(Spin, {
68
- tip: "\u5E94\u7528\u4FE1\u606F\u521D\u59CB\u5316\u4E2D"
69
- }) : /*#__PURE__*/React.createElement(DemoContent, {
70
- currentApp: app,
71
- needMeta: needMeta,
72
- key: app === null || app === void 0 ? void 0 : app.appId
62
+ }, /*#__PURE__*/React.createElement(DemoContent, {
63
+ currentApp: appId,
64
+ needMeta: needMeta
73
65
  }, children));
74
66
  };
75
67
  export default DemoWrapper;
@@ -166,26 +166,18 @@ var InfiniteScrollList = function InfiniteScrollList(_ref) {
166
166
  _useState12 = _slicedToArray(_useState11, 2),
167
167
  showList = _useState12[0],
168
168
  setShowList = _useState12[1];
169
- var _useState13 = useState([]),
170
- _useState14 = _slicedToArray(_useState13, 2),
171
- canShowList = _useState14[0],
172
- setCanShowList = _useState14[1];
173
169
  useEffect(function () {
174
- var data = searchEventList.filter(function (item) {
175
- return item.eventHidden !== ShowStatus.hidden;
176
- });
177
- setCanShowList(data);
178
- setShowList(data.slice(0, 10));
170
+ setShowList(searchEventList.slice(0, 10));
179
171
  }, [searchEventList]);
180
172
  var loadMoreData = function loadMoreData() {
181
- var moreData = canShowList.slice(showList.length, showList.length + 10);
173
+ var moreData = searchEventList.slice(showList.length, showList.length + 10);
182
174
  setShowList(function (list) {
183
175
  return [].concat(_toConsumableArray(list), _toConsumableArray(moreData));
184
176
  });
185
177
  };
186
178
  return /*#__PURE__*/React.createElement(InfiniteScroll, {
187
179
  dataLength: showList.length,
188
- hasMore: showList.length < canShowList.length,
180
+ hasMore: showList.length < searchEventList.length,
189
181
  loader: /*#__PURE__*/React.createElement(Skeleton, {
190
182
  paragraph: {
191
183
  rows: 1
@@ -198,6 +190,7 @@ var InfiniteScrollList = function InfiniteScrollList(_ref) {
198
190
  key: Math.random()
199
191
  }, showList.map(function (e) {
200
192
  var _currentValue$event2;
193
+ if (e.eventHidden === ShowStatus.hidden) return null;
201
194
  return /*#__PURE__*/React.createElement(EventListOption, {
202
195
  label: e.alias || e.name,
203
196
  key: "".concat(currentGroup === null || currentGroup === void 0 ? void 0 : currentGroup.id, "-").concat(e.id),
package/es/index.d.ts CHANGED
@@ -13,7 +13,6 @@ import BizDialog from './dialog';
13
13
  import BizChart from './chart';
14
14
  import BizTable from './table';
15
15
  import IconFont from './icon/iconFont';
16
- import ColorIcon from './colorIcon';
17
16
  import { util, ajax } from './utils';
18
17
  import theme from './assets/theme.js';
19
18
  import convertAttributeData from './attributeSelector/util';
@@ -29,8 +28,7 @@ import BizDnd from './dnd';
29
28
  import BizDetailLayout from './layout/detail';
30
29
  import BizLoginForm from './loginForm';
31
30
  import DemoWrapper from './demoWrapper';
32
- import SocketClient from './socket';
33
- export { BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizDetailLayout, BizUserGroup, IconFont, ColorIcon, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, BizLoginForm, DemoWrapper, SocketClient, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig, };
31
+ export { BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizDetailLayout, BizUserGroup, IconFont, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, BizLoginForm, DemoWrapper, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig, };
34
32
  export type { UserGroupTypes } from './userGroup/types';
35
33
  export type { BizSelectTypes } from './select/types';
36
34
  export type { AttributeSelect } from './attributeSelector/types';