@zgfe/business-lib 1.2.71-hxd.27 → 1.2.71-hxd.30

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.
@@ -1,14 +1,7 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _regeneratorValues(e) { if (null != e) { var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], r = 0; if (t) return t.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) return { next: function next() { return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e }; } }; } throw new TypeError(_typeof(e) + " is not iterable"); }
3
- function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
4
- function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
5
- function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
6
1
  function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
7
2
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8
3
  function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
9
4
  function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
10
- function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
11
- function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
12
5
  function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
13
6
  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."); }
14
7
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
@@ -16,12 +9,11 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
16
9
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
17
10
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
18
11
  import { Anchor, Button } from 'antd';
19
- import React, { useContext, useEffect, useState } from 'react';
12
+ import React, { useContext, useEffect, useMemo, useState } from 'react';
20
13
  import { BizGlobalDataContext } from '..';
21
14
  import BizSearchInput from '../searchInput';
22
15
  import Option from './option';
23
16
  import _ from 'lodash';
24
- import { eventApi } from '../utils';
25
17
  var Link = Anchor.Link;
26
18
  var AttrListPanel = function AttrListPanel(props) {
27
19
  var _props$disableItemLis;
@@ -59,6 +51,17 @@ var AttrListPanel = function AttrListPanel(props) {
59
51
  _useState6 = _slicedToArray(_useState5, 2),
60
52
  currentAttr = _useState6[0],
61
53
  setCurrentAttr = _useState6[1];
54
+ var eventIdMap = useMemo(function () {
55
+ var eventIdMap = {};
56
+ var eventList = (eventGroupList || []).reduce(function (pre, group) {
57
+ return [].concat(_toConsumableArray(pre), _toConsumableArray(group.eventList));
58
+ }, []);
59
+ eventList.forEach(function (event) {
60
+ if (eventIdMap[event.id]) return;
61
+ eventIdMap[event.id] = event;
62
+ });
63
+ return eventIdMap;
64
+ }, [eventGroupList]);
62
65
  var disableItemlist = (_props$disableItemLis = props.disableItemList) === null || _props$disableItemLis === void 0 ? void 0 : _props$disableItemLis.map(function (item) {
63
66
  if (item.propCategory === 'envProp') {
64
67
  item.key = "envProp-".concat(item.dimensionSub || item.name, "-").concat(item.id || 0);
@@ -81,10 +84,6 @@ var AttrListPanel = function AttrListPanel(props) {
81
84
  _useState0 = _slicedToArray(_useState9, 2),
82
85
  anchorList = _useState0[0],
83
86
  setAnchorList = _useState0[1];
84
- var _useState1 = useState([]),
85
- _useState10 = _slicedToArray(_useState1, 2),
86
- eventAttrsList = _useState10[0],
87
- setEventAttrsList = _useState10[1];
88
87
  useEffect(function () {
89
88
  var data = {
90
89
  container: "container-".concat(id),
@@ -123,306 +122,101 @@ var AttrListPanel = function AttrListPanel(props) {
123
122
  }, [id]);
124
123
  var classPrefix = 'biz-attr-select';
125
124
  useEffect(function () {
126
- var allEventIds = new Set();
127
- if (eventIdList && eventIdList.length > 0) {
128
- eventIdList.forEach(function (id) {
129
- return allEventIds.add(id);
125
+ var list = [];
126
+ if (extra) {
127
+ extra.forEach(function (item) {
128
+ list.push({
129
+ isEvent: false,
130
+ groupName: item.name,
131
+ key: item.type,
132
+ anchor: anchor[item.type],
133
+ children: item.attrList
134
+ });
130
135
  });
131
136
  }
132
- if (funnelEventIdList && funnelEventIdList.length > 0) {
133
- funnelEventIdList.forEach(function (stepList) {
134
- stepList.forEach(function (id) {
135
- return allEventIds.add(id);
137
+ if (enableEventProp) {
138
+ if (props.showCommonProp) {
139
+ var group = {
140
+ isEvent: true,
141
+ groupName: '共有属性',
142
+ key: "event-common",
143
+ children: [],
144
+ anchor: anchor.event
145
+ };
146
+ var propMap = {};
147
+ eventIdList === null || eventIdList === void 0 ? void 0 : eventIdList.forEach(function (id) {
148
+ var event = eventIdMap[id];
149
+ if (!event) return;
150
+ event.attrList.forEach(function (attr) {
151
+ var name = attr.alias || attr.label;
152
+ if (!propMap[name]) {
153
+ propMap[name] = _.cloneDeep(attr);
154
+ } else {
155
+ group.children.push(propMap[name]);
156
+ }
157
+ });
136
158
  });
159
+ if (group.children.length) list.push(group);
160
+ } else {
161
+ var hasAnchor = false;
162
+ eventIdList === null || eventIdList === void 0 ? void 0 : eventIdList.forEach(function (id) {
163
+ var event = eventIdMap[id];
164
+ if (!event) return;
165
+ var group = {
166
+ isEvent: true,
167
+ groupName: event.alias || event.name,
168
+ anchor: hasAnchor ? String(Math.random()) : anchor.event,
169
+ key: "event-".concat(event.id),
170
+ children: event.attrList.slice().filter(function (item) {
171
+ return isHideYeWu || realTimeTags ? item.id != 31415926 : true;
172
+ }).filter(function (item) {
173
+ return isStrNum ? item.type === 2 || item.type === 1 : isNumber ? item.type === 2 : isString ? item.type === 1 : true;
174
+ })
175
+ };
176
+ list.push(group);
177
+ });
178
+ funnelEventIdList === null || funnelEventIdList === void 0 ? void 0 : funnelEventIdList.forEach(function (idList, step) {
179
+ idList.forEach(function (id) {
180
+ var event = eventIdMap[id];
181
+ if (!event) return;
182
+ var group = {
183
+ isEvent: true,
184
+ groupName: event.alias || event.name,
185
+ anchor: hasAnchor ? String(Math.random()) : anchor.event,
186
+ key: "event-".concat(event.id, "-").concat(step),
187
+ children: event.attrList.map(function (attr) {
188
+ var res = _.cloneDeep(attr);
189
+ res.step = step;
190
+ return res;
191
+ })
192
+ };
193
+ list.push(group);
194
+ });
195
+ });
196
+ }
197
+ }
198
+ if (enableUserProp) {
199
+ list.push({
200
+ isEvent: false,
201
+ groupName: "".concat((currentApp === null || currentApp === void 0 ? void 0 : currentApp.type) === 'user' ? '用户' : '主体', "\u5C5E\u6027"),
202
+ key: 'userProps',
203
+ anchor: anchor.user,
204
+ children: (extraUser ? extraUser : []).concat(userPropList.filter(function (item) {
205
+ return realTimeTags ? item.category === 'custom' : true;
206
+ }))
137
207
  });
138
208
  }
139
- if (allEventIds.size === 0) {
140
- setEventAttrsList([]);
141
- return;
209
+ if (enableEnvProp) {
210
+ list.push({
211
+ isEvent: false,
212
+ groupName: '触发环境',
213
+ key: 'eventEnvProps',
214
+ anchor: anchor.env,
215
+ children: eventEnvList
216
+ });
142
217
  }
143
- var prefetchEventAttrs = /*#__PURE__*/function () {
144
- var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
145
- var allAttrs, _i, _Array$from, eventId, attrs, _t;
146
- return _regenerator().w(function (_context) {
147
- while (1) switch (_context.n) {
148
- case 0:
149
- allAttrs = [];
150
- _i = 0, _Array$from = Array.from(allEventIds);
151
- case 1:
152
- if (!(_i < _Array$from.length)) {
153
- _context.n = 6;
154
- break;
155
- }
156
- eventId = _Array$from[_i];
157
- _context.p = 2;
158
- _context.n = 3;
159
- return eventApi.fetchEventAttrs(eventId, currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId);
160
- case 3:
161
- attrs = _context.v;
162
- allAttrs.push.apply(allAttrs, _toConsumableArray(attrs));
163
- _context.n = 5;
164
- break;
165
- case 4:
166
- _context.p = 4;
167
- _t = _context.v;
168
- console.error("\u9884\u53D6\u4E8B\u4EF6 ".concat(eventId, " \u7684\u5C5E\u6027\u5931\u8D25"), _t);
169
- case 5:
170
- _i++;
171
- _context.n = 1;
172
- break;
173
- case 6:
174
- setEventAttrsList(allAttrs);
175
- case 7:
176
- return _context.a(2);
177
- }
178
- }, _callee, null, [[2, 4]]);
179
- }));
180
- return function prefetchEventAttrs() {
181
- return _ref.apply(this, arguments);
182
- };
183
- }();
184
- prefetchEventAttrs();
185
- }, [eventIdList === null || eventIdList === void 0 ? void 0 : eventIdList.join(','), JSON.stringify(funnelEventIdList)]);
186
- useEffect(function () {
187
- var initOptionList = /*#__PURE__*/function () {
188
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
189
- var list, group, propMap, hasAnchor, eventAttrsMap, _iterator, _step, _loop3, _loop, step, _t3;
190
- return _regenerator().w(function (_context5) {
191
- while (1) switch (_context5.n) {
192
- case 0:
193
- list = [];
194
- if (extra) {
195
- extra.forEach(function (item) {
196
- list.push({
197
- isEvent: false,
198
- groupName: item.name,
199
- key: item.type,
200
- anchor: anchor[item.type],
201
- children: item.attrList
202
- });
203
- });
204
- }
205
- if (!enableEventProp) {
206
- _context5.n = 11;
207
- break;
208
- }
209
- if (!props.showCommonProp) {
210
- _context5.n = 1;
211
- break;
212
- }
213
- group = {
214
- isEvent: true,
215
- groupName: '共有属性',
216
- key: "event-common",
217
- children: [],
218
- anchor: anchor.event
219
- };
220
- propMap = {};
221
- eventAttrsList.forEach(function (attr) {
222
- var name = attr.alias || attr.label;
223
- if (!propMap[name]) {
224
- propMap[name] = _.cloneDeep(attr);
225
- } else {
226
- group.children.push(propMap[name]);
227
- }
228
- });
229
- if (group.children.length) list.push(group);
230
- _context5.n = 11;
231
- break;
232
- case 1:
233
- hasAnchor = false;
234
- eventAttrsMap = {};
235
- eventAttrsList.forEach(function (attr) {
236
- if (!eventAttrsMap[attr.eventId]) {
237
- eventAttrsMap[attr.eventId] = [];
238
- }
239
- eventAttrsMap[attr.eventId].push(attr);
240
- });
241
- _iterator = _createForOfIteratorHelper(eventIdList || []);
242
- _context5.p = 2;
243
- _loop3 = /*#__PURE__*/_regenerator().m(function _loop3() {
244
- var eventId, eventName, eventAttrs, filteredAttrs, _group2;
245
- return _regenerator().w(function (_context4) {
246
- while (1) switch (_context4.n) {
247
- case 0:
248
- eventId = _step.value;
249
- try {
250
- eventName = function () {
251
- var eventList = (eventGroupList || []).reduce(function (pre, group) {
252
- return [].concat(_toConsumableArray(pre), _toConsumableArray(group.eventList));
253
- }, []);
254
- var event = eventList.find(function (e) {
255
- return e.id === eventId;
256
- });
257
- return event ? event.alias || event.name : "\u4E8B\u4EF6".concat(eventId);
258
- }();
259
- eventAttrs = eventAttrsMap[eventId] || [];
260
- filteredAttrs = eventAttrs.filter(function (item) {
261
- return isHideYeWu || realTimeTags ? item.id !== 31415926 : true;
262
- }).filter(function (item) {
263
- return isStrNum ? item.type === 2 || item.type === 1 : isNumber ? item.type === 2 : isString ? item.type === 1 : true;
264
- });
265
- if (filteredAttrs.length > 0) {
266
- _group2 = {
267
- isEvent: true,
268
- groupName: eventName,
269
- anchor: hasAnchor ? String(Math.random()) : anchor.event,
270
- key: "event-".concat(id),
271
- children: filteredAttrs
272
- };
273
- list.push(_group2);
274
- hasAnchor = true;
275
- }
276
- } catch (error) {
277
- console.error("\u83B7\u53D6\u4E8B\u4EF6 ".concat(id, " \u7684\u5C5E\u6027\u5931\u8D25"), error);
278
- }
279
- case 1:
280
- return _context4.a(2);
281
- }
282
- }, _loop3);
283
- });
284
- _iterator.s();
285
- case 3:
286
- if ((_step = _iterator.n()).done) {
287
- _context5.n = 5;
288
- break;
289
- }
290
- return _context5.d(_regeneratorValues(_loop3()), 4);
291
- case 4:
292
- _context5.n = 3;
293
- break;
294
- case 5:
295
- _context5.n = 7;
296
- break;
297
- case 6:
298
- _context5.p = 6;
299
- _t3 = _context5.v;
300
- _iterator.e(_t3);
301
- case 7:
302
- _context5.p = 7;
303
- _iterator.f();
304
- return _context5.f(7);
305
- case 8:
306
- if (!funnelEventIdList) {
307
- _context5.n = 11;
308
- break;
309
- }
310
- _loop = /*#__PURE__*/_regenerator().m(function _loop(step) {
311
- var idList, _iterator2, _step2, _loop2, _t2;
312
- return _regenerator().w(function (_context3) {
313
- while (1) switch (_context3.n) {
314
- case 0:
315
- idList = funnelEventIdList[step];
316
- _iterator2 = _createForOfIteratorHelper(idList);
317
- _context3.p = 1;
318
- _loop2 = /*#__PURE__*/_regenerator().m(function _loop2() {
319
- var eventId, eventName, eventAttrs, _group;
320
- return _regenerator().w(function (_context2) {
321
- while (1) switch (_context2.n) {
322
- case 0:
323
- eventId = _step2.value;
324
- try {
325
- eventName = function () {
326
- var eventList = (eventGroupList || []).reduce(function (pre, group) {
327
- return [].concat(_toConsumableArray(pre), _toConsumableArray(group.eventList));
328
- }, []);
329
- var event = eventList.find(function (e) {
330
- return e.id === eventId;
331
- });
332
- return event ? event.alias || event.name : "\u4E8B\u4EF6".concat(eventId);
333
- }();
334
- eventAttrs = eventAttrsMap[eventId] || [];
335
- _group = {
336
- isEvent: true,
337
- groupName: eventName,
338
- anchor: hasAnchor ? String(Math.random()) : anchor.event,
339
- key: "event-".concat(eventId, "-").concat(step),
340
- children: eventAttrs.map(function (attr) {
341
- var res = _.cloneDeep(attr);
342
- res.step = step;
343
- return res;
344
- })
345
- };
346
- list.push(_group);
347
- hasAnchor = true;
348
- } catch (error) {
349
- console.error("\u83B7\u53D6\u6F0F\u6597\u4E8B\u4EF6 ".concat(id, " \u7684\u5C5E\u6027\u5931\u8D25"), error);
350
- }
351
- case 1:
352
- return _context2.a(2);
353
- }
354
- }, _loop2);
355
- });
356
- _iterator2.s();
357
- case 2:
358
- if ((_step2 = _iterator2.n()).done) {
359
- _context3.n = 4;
360
- break;
361
- }
362
- return _context3.d(_regeneratorValues(_loop2()), 3);
363
- case 3:
364
- _context3.n = 2;
365
- break;
366
- case 4:
367
- _context3.n = 6;
368
- break;
369
- case 5:
370
- _context3.p = 5;
371
- _t2 = _context3.v;
372
- _iterator2.e(_t2);
373
- case 6:
374
- _context3.p = 6;
375
- _iterator2.f();
376
- return _context3.f(6);
377
- case 7:
378
- return _context3.a(2);
379
- }
380
- }, _loop, null, [[1, 5, 6, 7]]);
381
- });
382
- step = 0;
383
- case 9:
384
- if (!(step < funnelEventIdList.length)) {
385
- _context5.n = 11;
386
- break;
387
- }
388
- return _context5.d(_regeneratorValues(_loop(step)), 10);
389
- case 10:
390
- step++;
391
- _context5.n = 9;
392
- break;
393
- case 11:
394
- if (enableUserProp) {
395
- list.push({
396
- isEvent: false,
397
- groupName: "".concat((currentApp === null || currentApp === void 0 ? void 0 : currentApp.type) === 'user' ? '用户' : '主体', "\u5C5E\u6027"),
398
- key: 'userProps',
399
- anchor: anchor.user,
400
- children: (extraUser ? extraUser : []).concat(userPropList.filter(function (item) {
401
- return realTimeTags ? item.category === 'custom' : true;
402
- }))
403
- });
404
- }
405
- if (enableEnvProp) {
406
- list.push({
407
- isEvent: false,
408
- groupName: '触发环境',
409
- key: 'eventEnvProps',
410
- anchor: anchor.env,
411
- children: eventEnvList
412
- });
413
- }
414
- setOptionList(list);
415
- case 12:
416
- return _context5.a(2);
417
- }
418
- }, _callee2, null, [[2, 6, 7, 8]]);
419
- }));
420
- return function initOptionList() {
421
- return _ref2.apply(this, arguments);
422
- };
423
- }();
424
- initOptionList();
425
- }, [anchor, eventGroupList, userPropList, eventEnvList, props.showCommonProp, enableEventProp, enableUserProp, enableEnvProp, extra, extraUser, isHideYeWu, realTimeTags, isNumber, isStrNum, isString, eventAttrsList]);
218
+ setOptionList(list);
219
+ }, [anchor, eventIdMap, userPropList, eventEnvList, eventIdList, props.showCommonProp]);
426
220
  useEffect(function () {
427
221
  setCurrentAttr(props.value);
428
222
  }, [props.value]);
@@ -441,7 +235,7 @@ var AttrListPanel = function AttrListPanel(props) {
441
235
  });
442
236
  var childList = [];
443
237
  group.children.forEach(function (option) {
444
- if (searchValue && !(new RegExp(_.escapeRegExp(searchValue), 'i').test(option === null || option === void 0 ? void 0 : option.alias) || new RegExp(_.escapeRegExp(searchValue), 'i').test(option === null || option === void 0 ? void 0 : option.label))) return;
238
+ if (searchValue && !new RegExp(_.escapeRegExp(searchValue), 'i').test((option === null || option === void 0 ? void 0 : option.alias) || (option === null || option === void 0 ? void 0 : option.label))) return;
445
239
  var disabled = false;
446
240
  disableItemlist === null || disableItemlist === void 0 ? void 0 : disableItemlist.forEach(function (item) {
447
241
  if (item.key === option.key) disabled = true;
@@ -40,7 +40,6 @@ export interface EventGroup {
40
40
  export interface BasicProp {
41
41
  id?: number;
42
42
  label?: string;
43
- encryptionType: number;
44
43
  alias?: string;
45
44
  type?: PropType;
46
45
  realTime?: boolean;
@@ -31,7 +31,6 @@ export default function convertAttributeData(store) {
31
31
  propCategory: 'eventProp',
32
32
  type: item.prop_type,
33
33
  realTime: true,
34
- encryptionType: item.encryption_type,
35
34
  dimensionSub: item.dimension_sub || 'event_attr'
36
35
  };
37
36
  }),
@@ -67,7 +66,6 @@ export default function convertAttributeData(store) {
67
66
  propCategory: 'envProp',
68
67
  type: prop.type,
69
68
  realTime: true,
70
- encryptionType: prop.encryption_type,
71
69
  dimensionSub: prop.dimension_sub || prop.name
72
70
  };
73
71
  });
@@ -79,7 +77,6 @@ export default function convertAttributeData(store) {
79
77
  category: prop.category,
80
78
  key: "userProp-".concat(prop.name, "-").concat(prop.id || 0),
81
79
  label: prop.text || prop.name,
82
- encryptionType: prop.encryption_type,
83
80
  name: prop.name,
84
81
  propCategory: 'userProp',
85
82
  type: prop.type,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.2.71-hxd.27",
3
+ "version": "1.2.71-hxd.30",
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": "fffd879803ecee239a8d42e9645db426fbc05a23",
58
+ "gitHead": "f619d8e9acb810bf34cdfb16220eb76f0979325d",
59
59
  "gitHooks": {
60
60
  "pre-commit": "lint-staged"
61
61
  }