@zgfe/business-lib 1.2.70-hxd.9 → 1.2.71-hxd.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 (281) hide show
  1. package/README.md +12 -12
  2. package/config.js +41 -41
  3. package/es/AUMFormulaTarget/components/formula/index.js +6 -4
  4. package/es/AUMFormulaTarget/components/formula/index.less +86 -86
  5. package/es/AUMFormulaTarget/components/panel/cdpCshCondition.js +2 -2
  6. package/es/AUMFormulaTarget/components/panel/index.less +269 -269
  7. package/es/AUMFormulaTarget/components/symbol/index.less +49 -49
  8. package/es/AUMFormulaTarget/demo/index.js +1 -1
  9. package/es/AUMFormulaTarget/index.d.ts +4 -1
  10. package/es/AUMFormulaTarget/styles/index.less +74 -74
  11. package/es/addToPanel/components/radioGroup.d.ts +4 -1
  12. package/es/addToPanel/components/styleList.d.ts +4 -1
  13. package/es/addToPanel/index.d.ts +4 -1
  14. package/es/addToPanel/index.js +1 -1
  15. package/es/addToPanel/styles/addPanel.less +25 -25
  16. package/es/addToPanel/styles/index.less +17 -17
  17. package/es/addToPanel/styles/style.less +66 -66
  18. package/es/addToScene/index.js +3 -8
  19. package/es/addToScene/styles/index.less +30 -30
  20. package/es/amountSelector/demo/index.d.ts +3 -0
  21. package/es/amountSelector/demo/index.js +9 -0
  22. package/es/amountSelector/index.d.ts +10 -0
  23. package/es/amountSelector/index.js +21 -0
  24. package/es/amountSelector/styles/index.less +27 -0
  25. package/es/amountSelector/types.d.ts +4 -0
  26. package/es/amountSelector/types.js +1 -0
  27. package/es/amountSelector/util.d.ts +3 -0
  28. package/es/amountSelector/util.js +18 -0
  29. package/es/assets/colorIcon/demo.css +539 -539
  30. package/es/assets/colorIcon/demo_index.html +1985 -1454
  31. package/es/assets/colorIcon/iconfont.css +329 -236
  32. package/es/assets/colorIcon/iconfont.js +13 -14
  33. package/es/assets/colorIcon/iconfont.json +555 -394
  34. package/es/assets/colorIcon/iconfont.ttf +0 -0
  35. package/es/assets/colorIcon/iconfont.woff +0 -0
  36. package/es/assets/colorIcon/iconfont.woff2 +0 -0
  37. package/es/assets/iconfont/demo.css +539 -539
  38. package/es/assets/iconfont/demo_index.html +5563 -5708
  39. package/es/assets/iconfont/iconfont.css +1015 -975
  40. package/es/assets/iconfont/iconfont.js +1 -1
  41. package/es/assets/iconfont/iconfont.json +1584 -1689
  42. package/es/assets/styles/chunks.less +183 -183
  43. package/es/assets/styles/inner.less +3 -3
  44. package/es/assets/styles/resetAntd.less +568 -564
  45. package/es/assets/styles/variable.less +21 -21
  46. package/es/assets/theme.js +1 -1
  47. package/es/attrCondition/demo/group.js +1 -1
  48. package/es/attrCondition/group.js +11 -6
  49. package/es/attrCondition/index.js +11 -6
  50. package/es/attrCondition/styles/index.less +101 -101
  51. package/es/attrCondition/useAttrCondition.js +7 -5
  52. package/es/attrConditions/components/operateList.js +6 -3
  53. package/es/attrConditions/components/stringList.js +5 -9
  54. package/es/attrConditions/index.d.ts +4 -1
  55. package/es/attrConditions/index.js +4 -2
  56. package/es/attrConditions/styles/group.less +49 -49
  57. package/es/attrConditions/styles/index.less +151 -151
  58. package/es/attrConditions/types.d.ts +4 -0
  59. package/es/attrConditions/utils/operates.d.ts +4 -0
  60. package/es/attrConditions/utils/operates.js +37 -0
  61. package/es/attributeSelector/index.js +11 -11
  62. package/es/attributeSelector/listPanel.js +313 -101
  63. package/es/attributeSelector/styles/index.less +141 -141
  64. package/es/attributeSelector/types.d.ts +2 -0
  65. package/es/attributeSelector/util.js +3 -0
  66. package/es/chart/demo/data/data5 copy.js +2 -2
  67. package/es/chart/demo/index.js +1 -1
  68. package/es/chart/demo/line_bar_stack.js +4 -4
  69. package/es/chart/demo/stack.js +1 -1
  70. package/es/chart/index.js +10 -12
  71. package/es/chart/styles/index.less +113 -113
  72. package/es/chart/util/color.js +1 -1
  73. package/es/chart/util/data/china.js +17 -17
  74. package/es/colorIcon/index.js +2 -4
  75. package/es/constants/apis.d.ts +4 -0
  76. package/es/constants/apis.js +6 -2
  77. package/es/constants/common.d.ts +11 -0
  78. package/es/constants/common.js +31 -0
  79. package/es/context/index.d.ts +2 -0
  80. package/es/cycleTime/index.js +6 -8
  81. package/es/cycleTime/month.js +2 -5
  82. package/es/cycleTime/styles/index.less +24 -24
  83. package/es/cycleTime/styles/month.less +95 -95
  84. package/es/dataSetGroup/index.js +0 -1
  85. package/es/dataSetGroup/styles/index.less +146 -146
  86. package/es/datePicker/index.d.ts +4 -1
  87. package/es/datePicker/styles/index.less +53 -53
  88. package/es/datePickerV2/demo/index.js +1 -1
  89. package/es/datePickerV2/index.d.ts +4 -1
  90. package/es/datePickerV2/index.js +13 -4
  91. package/es/datePickerV2/popoverContent.js +1 -1
  92. package/es/datePickerV2/shortcut.js +1 -1
  93. package/es/datePickerV2/styles/index.less +194 -194
  94. package/es/datePickerV2/types.d.ts +1 -0
  95. package/es/datePickerV2/utils.js +8 -2
  96. package/es/demoWrapper/content.js +9 -10
  97. package/es/demoWrapper/index.less +3 -3
  98. package/es/demoWrapper/innerDemo.js +1 -1
  99. package/es/dialog/index.d.ts +4 -1
  100. package/es/dialog/styles/index.less +22 -22
  101. package/es/dnd/demo/index.js +5 -1
  102. package/es/dnd/demo/styles/index.less +34 -34
  103. package/es/dnd/index.d.ts +4 -1
  104. package/es/dnd/item.js +14 -0
  105. package/es/dnd/styles/index.less +19 -19
  106. package/es/eventSelector/index.d.ts +4 -1
  107. package/es/eventSelector/index.js +3 -2
  108. package/es/eventSelector/listPanel.js +9 -13
  109. package/es/eventSelector/option.d.ts +1 -0
  110. package/es/eventSelector/option.js +14 -3
  111. package/es/eventSelector/styles/index.less +127 -123
  112. package/es/eventSelector/types.d.ts +1 -0
  113. package/es/formulaTarget/components/formula/index.js +2 -1
  114. package/es/formulaTarget/components/formula/index.less +76 -76
  115. package/es/formulaTarget/components/formula/types.d.ts +1 -0
  116. package/es/formulaTarget/components/formulaItem/index.js +7 -2
  117. package/es/formulaTarget/components/formulaItem/types.d.ts +1 -0
  118. package/es/formulaTarget/components/panel/index.js +2 -1
  119. package/es/formulaTarget/components/panel/index.less +139 -139
  120. package/es/formulaTarget/components/panel/item.js +5 -1
  121. package/es/formulaTarget/components/panel/types.d.ts +2 -0
  122. package/es/formulaTarget/components/symbol/index.less +49 -49
  123. package/es/formulaTarget/index.d.ts +4 -1
  124. package/es/formulaTarget/index.js +2 -1
  125. package/es/formulaTarget/styles/index.less +74 -74
  126. package/es/formulaTarget/types.d.ts +1 -0
  127. package/es/hooks/types/subject.d.ts +14 -14
  128. package/es/hooks/useBizStore.js +3 -9
  129. package/es/icon/demo/list.less +32 -32
  130. package/es/icon/iconFont.d.ts +4 -1
  131. package/es/index.d.ts +2 -1
  132. package/es/index.js +2 -1
  133. package/es/layout/analysisLayout/demo/index.less +12 -12
  134. package/es/layout/analysisLayout/index.d.ts +4 -1
  135. package/es/layout/analysisLayout/index.less +118 -118
  136. package/es/layout/columnLayout/demo/index.less +15 -15
  137. package/es/layout/columnLayout/index.d.ts +4 -1
  138. package/es/layout/columnLayout/index.less +81 -81
  139. package/es/layout/detail/index.less +27 -27
  140. package/es/layout/optionTitle/components/btnMenu/index.less +18 -18
  141. package/es/layout/optionTitle/components/changePanelModal/styles/index.less +92 -92
  142. package/es/layout/optionTitle/components/title/index.d.ts +1 -2
  143. package/es/layout/optionTitle/components/title/index.js +10 -6
  144. package/es/layout/optionTitle/components/title/index.less +43 -43
  145. package/es/layout/optionTitle/demo/index.less +12 -12
  146. package/es/layout/optionTitle/index.js +1 -1
  147. package/es/layout/optionTitle/styles/index.less +30 -30
  148. package/es/layout/optionTitle/styles/layout.less +90 -90
  149. package/es/layout/optionTitle/styles/search.less +27 -27
  150. package/es/loading/styles/index.less +20 -20
  151. package/es/loginForm/index.less +7 -7
  152. package/es/platformSelector/styles/index.less +26 -26
  153. package/es/productCondition/conditionTypeList.d.ts +4 -1
  154. package/es/productCondition/conditions/cdpCshCondition.js +9 -6
  155. package/es/productCondition/conditions/constants.d.ts +2 -0
  156. package/es/productCondition/conditions/constants.js +2 -0
  157. package/es/productCondition/conditions/order/runPeriodCondition.js +2 -4
  158. package/es/productCondition/conditions/periodCondition.d.ts +4 -1
  159. package/es/productCondition/conditions/propCondition.d.ts +4 -1
  160. package/es/productCondition/conditions/styles/cdpCondition.less +31 -31
  161. package/es/productCondition/conditions/styles/cdpCshCondition.less +41 -41
  162. package/es/productCondition/conditions/styles/eventCondition.less +51 -51
  163. package/es/productCondition/conditions/styles/periodCondition.less +26 -26
  164. package/es/productCondition/conditions/styles/propCondition.less +43 -43
  165. package/es/productCondition/conditions/styles/runTimesCondition.less +19 -19
  166. package/es/productCondition/conditions/styles/tagsCondition.less +20 -20
  167. package/es/productCondition/conditions/styles/textDesc.less +17 -17
  168. package/es/productCondition/index.d.ts +4 -1
  169. package/es/productCondition/styles/conditionTypeList.less +32 -30
  170. package/es/productCondition/styles/conditionWrap.less +18 -18
  171. package/es/productCondition/styles/index.less +33 -33
  172. package/es/productCondition/styles/orConditions.less +34 -34
  173. package/es/productCondition/styles/relationLabel.less +19 -19
  174. package/es/productCondition/types.d.ts +3 -1
  175. package/es/productCondition/util.d.ts +4 -0
  176. package/es/productCondition/util.js +4 -2
  177. package/es/quickDatePicker/demo/index.js +31 -11
  178. package/es/quickDatePicker/index.js +122 -23
  179. package/es/quickDatePicker/styles/index.less +141 -138
  180. package/es/quickDatePicker/types.d.ts +13 -0
  181. package/es/quickDatePicker/utils.d.ts +6 -0
  182. package/es/quickDatePicker/utils.js +54 -1
  183. package/es/select/demo/index.js +2 -1
  184. package/es/select/handle.js +2 -9
  185. package/es/select/index.d.ts +4 -1
  186. package/es/select/option.js +1 -1
  187. package/es/select/overlay.js +2 -2
  188. package/es/select/styles/handle.less +206 -193
  189. package/es/select/styles/index.less +129 -129
  190. package/es/socket/demo/demo.js +2 -2
  191. package/es/socket/demo/index.less +27 -27
  192. package/es/subjectWrapper/index.js +3 -1
  193. package/es/subjectWrapper/index.less +12 -12
  194. package/es/table/demo/data/color.js +1 -1
  195. package/es/table/index.js +3 -30
  196. package/es/table/styles/index.less +5 -5
  197. package/es/targetConditionGroup/components/targetDimension.js +147 -53
  198. package/es/targetConditionGroup/demo/group.js +5 -18
  199. package/es/targetConditionGroup/demo/styles/index.less +29 -29
  200. package/es/targetConditionGroup/index.d.ts +4 -1
  201. package/es/targetConditionGroup/index.js +12 -10
  202. package/es/targetConditionGroup/styles/index.less +53 -53
  203. package/es/targetConditionGroup/types.d.ts +1 -0
  204. package/es/targetSelector/editBox.d.ts +1 -0
  205. package/es/targetSelector/editBox.js +8 -3
  206. package/es/targetSelector/index.js +2 -1
  207. package/es/targetSelector/optionIcon.d.ts +4 -1
  208. package/es/targetSelector/optionIcon.js +3 -0
  209. package/es/targetSelector/styles/index.less +142 -110
  210. package/es/userCondition/conditionTypeList.d.ts +4 -1
  211. package/es/userCondition/conditionTypeList.js +5 -4
  212. package/es/userCondition/conditions/cdpCondition.js +9 -6
  213. package/es/userCondition/conditions/cdpCshCondition.js +9 -6
  214. package/es/userCondition/conditions/constants.d.ts +2 -0
  215. package/es/userCondition/conditions/constants.js +2 -0
  216. package/es/userCondition/conditions/dataAttribute.js +11 -7
  217. package/es/userCondition/conditions/eventCondition.js +16 -24
  218. package/es/userCondition/conditions/order/runPeriodCondition.d.ts +4 -1
  219. package/es/userCondition/conditions/periodCondition.d.ts +4 -1
  220. package/es/userCondition/conditions/periodCondition.js +19 -11
  221. package/es/userCondition/conditions/propCondition.js +5 -3
  222. package/es/userCondition/conditions/styles/cdpCondition.less +37 -37
  223. package/es/userCondition/conditions/styles/cdpCshCondition.less +47 -47
  224. package/es/userCondition/conditions/styles/eventCondition.less +71 -57
  225. package/es/userCondition/conditions/styles/periodCondition.less +32 -26
  226. package/es/userCondition/conditions/styles/propCondition.less +43 -43
  227. package/es/userCondition/conditions/styles/runTimesCondition.less +19 -19
  228. package/es/userCondition/conditions/styles/tagsCondition.less +20 -20
  229. package/es/userCondition/conditions/styles/textDesc.less +16 -17
  230. package/es/userCondition/conditions/tagsCondition.js +12 -5
  231. package/es/userCondition/conditions/textDesc.js +9 -5
  232. package/es/userCondition/demo/index.js +20 -14
  233. package/es/userCondition/demo/mockData.d.ts +20 -94
  234. package/es/userCondition/demo/mockData.js +31 -76
  235. package/es/userCondition/index.d.ts +5 -1
  236. package/es/userCondition/index.js +37 -21
  237. package/es/userCondition/styles/conditionTypeList.less +32 -30
  238. package/es/userCondition/styles/conditionWrap.less +18 -18
  239. package/es/userCondition/styles/index.less +33 -33
  240. package/es/userCondition/styles/orConditions.less +34 -34
  241. package/es/userCondition/styles/relationLabel.less +19 -19
  242. package/es/userCondition/types.d.ts +5 -2
  243. package/es/userCondition/util.d.ts +4 -0
  244. package/es/userCondition/util.js +4 -2
  245. package/es/userGroup/demo/index.js +2 -9
  246. package/es/userGroup/index.d.ts +4 -1
  247. package/es/userGroup/index.js +63 -15
  248. package/es/userGroup/overlay.js +17 -3
  249. package/es/userGroup/styles/index.less +199 -145
  250. package/es/userGroup/types.d.ts +2 -0
  251. package/es/userGroup/util.d.ts +2 -0
  252. package/es/userGroup/util.js +47 -0
  253. package/es/userGroupHeader/demo/index.js +1 -1
  254. package/es/userGroupHeader/index.d.ts +1 -0
  255. package/es/userGroupHeader/index.js +53 -6
  256. package/es/userGroupHeader/styles/index.less +50 -31
  257. package/es/userTagsSelector/cascaderOverlay.d.ts +4 -1
  258. package/es/userTagsSelector/cascaderOverlay.js +9 -2
  259. package/es/userTagsSelector/components/search/index.less +6 -6
  260. package/es/userTagsSelector/components/tagList/index.d.ts +4 -1
  261. package/es/userTagsSelector/components/tagList/index.less +13 -13
  262. package/es/userTagsSelector/groups/index.d.ts +4 -1
  263. package/es/userTagsSelector/groups/styles/option.less +55 -55
  264. package/es/userTagsSelector/index.d.ts +4 -1
  265. package/es/userTagsSelector/index.js +32 -2
  266. package/es/userTagsSelector/multipleCheckPanel/styles/option.less +40 -40
  267. package/es/userTagsSelector/styles/cascaderOverlay.less +34 -34
  268. package/es/userTagsSelector/styles/index.less +20 -10
  269. package/es/userTagsSelector/types.d.ts +2 -0
  270. package/es/userTagsSelector/util.d.ts +1 -0
  271. package/es/userTagsSelector/util.js +20 -0
  272. package/es/utils/ajax.js +63 -26
  273. package/es/utils/eventApi.d.ts +14 -0
  274. package/es/utils/eventApi.js +128 -0
  275. package/es/utils/index.d.ts +2 -1
  276. package/es/utils/index.js +2 -1
  277. package/es/utils/type.d.ts +1 -0
  278. package/es/utils/util.d.ts +1 -0
  279. package/es/utils/util.js +18 -0
  280. package/package.json +2 -2
  281. package/es/assets/colorIcon/iconfont.svg +0 -129
@@ -1,3 +1,7 @@
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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
1
5
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
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."); }
3
7
  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,15 +10,16 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
6
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
11
  import { Dropdown, Menu } from 'antd';
8
12
  import SubMenu from 'antd/lib/menu/SubMenu';
9
- import React, { useContext, useEffect, useState } from 'react';
13
+ import React, { useContext, useEffect, useRef, useState } from 'react';
10
14
  import { classPrefix } from '..';
11
15
  import BizGlobalDataContext from '../../context';
12
16
  import SelectHandle from '../../select/handle';
13
17
  import { normalOptions, attrOptions } from '../data/operates';
18
+ import { eventApi } from '../../utils';
19
+ import _ from 'lodash';
14
20
  var BizTargetDimension = function BizTargetDimension(props) {
15
21
  var _currentApp$type;
16
22
  var _useContext = useContext(BizGlobalDataContext),
17
- eventGroupList = _useContext.eventGroupList,
18
23
  currentApp = _useContext.currentApp;
19
24
  var _useState = useState(),
20
25
  _useState2 = _slicedToArray(_useState, 2),
@@ -32,62 +37,150 @@ var BizTargetDimension = function BizTargetDimension(props) {
32
37
  _useState8 = _slicedToArray(_useState7, 2),
33
38
  visible = _useState8[0],
34
39
  setVisible = _useState8[1];
40
+ var eventAttrsCache = useRef(new Map());
41
+ var loadingRef = useRef(new Map());
35
42
  useEffect(function () {
36
- var _currentApp$type2, _props$value;
43
+ var _currentApp$type2;
37
44
  var dimensionOption = props.normalOptions || normalOptions((_currentApp$type2 = currentApp === null || currentApp === void 0 ? void 0 : currentApp.type) !== null && _currentApp$type2 !== void 0 ? _currentApp$type2 : 'user');
38
- if (props.eventId && props.isExtend) {
39
- dimensionOption = getAttrOption(props.eventId, dimensionOption);
40
- }
41
- setOptions(dimensionOption);
42
- var current = dimensionOption[0];
43
- if (!((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.analysisAttr)) setDimensionParent({
44
- label: '',
45
- value: ''
46
- });
47
- if (props.value) {
48
- dimensionOption.forEach(function (item) {
49
- var _props$value2, _props$value3;
50
- if (item.value === ((_props$value2 = props.value) === null || _props$value2 === void 0 ? void 0 : _props$value2.analysisIndex)) {
51
- current = item;
52
- }
53
- if (item.children && item.label === ((_props$value3 = props.value) === null || _props$value3 === void 0 ? void 0 : _props$value3.analysisAttr)) {
54
- setDimensionParent({
55
- label: item.label,
56
- value: item.value
57
- });
58
- item.children.forEach(function (child) {
59
- var _props$value4;
60
- if (child.value === ((_props$value4 = props.value) === null || _props$value4 === void 0 ? void 0 : _props$value4.analysisIndex)) {
61
- current = child;
45
+ var debouncedLoadAttrs = _.debounce( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
46
+ var _props$value;
47
+ var optionsWithAttrs, current;
48
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
49
+ while (1) switch (_context.prev = _context.next) {
50
+ case 0:
51
+ optionsWithAttrs = dimensionOption;
52
+ if (!(props.eventId && props.isExtend)) {
53
+ _context.next = 5;
54
+ break;
62
55
  }
63
- });
64
- }
65
- });
66
- }
67
- setDimension(current);
68
- }, [props.eventId, props.value, props.normalOptions]);
69
- var getAttrOption = function getAttrOption(eventId, data) {
70
- var attrData = [];
71
- var attrMap = {};
72
- eventGroupList === null || eventGroupList === void 0 ? void 0 : eventGroupList.forEach(function (group) {
73
- group.eventList.forEach(function (event) {
74
- if (event.id === eventId) {
75
- event.attrList.forEach(function (attr) {
76
- if (attr.type === 2 && !attr.isHidden && attr.label && !attrMap[String(attr.id)]) {
77
- attrMap[String(attr.id)] = true;
78
- attrData.push({
79
- label: attr.label,
80
- value: String(attr.id),
81
- children: attrOptions
56
+ _context.next = 4;
57
+ return getAttrOption(props.eventId, dimensionOption);
58
+ case 4:
59
+ optionsWithAttrs = _context.sent;
60
+ case 5:
61
+ setOptions(optionsWithAttrs);
62
+ current = optionsWithAttrs[0];
63
+ if (!((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.analysisAttr)) setDimensionParent({
64
+ label: '',
65
+ value: ''
66
+ });
67
+ if (props.value) {
68
+ optionsWithAttrs.forEach(function (item) {
69
+ var _props$value2, _props$value3;
70
+ if (item.value === ((_props$value2 = props.value) === null || _props$value2 === void 0 ? void 0 : _props$value2.analysisIndex)) {
71
+ current = item;
72
+ }
73
+ if (item.children && item.label === ((_props$value3 = props.value) === null || _props$value3 === void 0 ? void 0 : _props$value3.analysisAttr)) {
74
+ setDimensionParent({
75
+ label: item.label,
76
+ value: item.value
77
+ });
78
+ item.children.forEach(function (child) {
79
+ var _props$value4;
80
+ if (child.value === ((_props$value4 = props.value) === null || _props$value4 === void 0 ? void 0 : _props$value4.analysisIndex)) {
81
+ current = child;
82
+ }
83
+ });
84
+ }
82
85
  });
83
86
  }
84
- });
85
- return;
87
+ setDimension(current);
88
+ case 10:
89
+ case "end":
90
+ return _context.stop();
86
91
  }
87
- });
88
- });
89
- return data.concat(attrData);
90
- };
92
+ }, _callee);
93
+ })), 300);
94
+ debouncedLoadAttrs();
95
+ return function () {
96
+ debouncedLoadAttrs.cancel();
97
+ };
98
+ }, [props.eventId, props.value, JSON.stringify(props.normalOptions), props.isExtend]);
99
+ var getAttrOption = /*#__PURE__*/function () {
100
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(eventId, data) {
101
+ var attrData, attrMap, cachedAttrs, eventAttrs;
102
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
103
+ while (1) switch (_context2.prev = _context2.next) {
104
+ case 0:
105
+ attrData = [];
106
+ attrMap = {};
107
+ if (!eventAttrsCache.current.has(eventId)) {
108
+ _context2.next = 6;
109
+ break;
110
+ }
111
+ cachedAttrs = eventAttrsCache.current.get(eventId) || [];
112
+ cachedAttrs === null || cachedAttrs === void 0 ? void 0 : cachedAttrs.forEach(function (attr) {
113
+ if (attr.type === 2 && !attr.isHidden && attr.label && !attrMap[String(attr.id)]) {
114
+ attrMap[String(attr.id)] = true;
115
+ attrData.push({
116
+ label: attr.label,
117
+ value: String(attr.id),
118
+ children: attrOptions
119
+ });
120
+ }
121
+ });
122
+ return _context2.abrupt("return", data.concat(attrData));
123
+ case 6:
124
+ if (!loadingRef.current.get(eventId)) {
125
+ _context2.next = 8;
126
+ break;
127
+ }
128
+ return _context2.abrupt("return", new Promise(function (resolve) {
129
+ var interval = setInterval(function () {
130
+ if (!loadingRef.current.get(eventId) && eventAttrsCache.current.has(eventId)) {
131
+ clearInterval(interval);
132
+ resolve(getAttrOption(eventId, data));
133
+ }
134
+ }, 100);
135
+ }));
136
+ case 8:
137
+ _context2.prev = 8;
138
+ loadingRef.current.set(eventId, true);
139
+ _context2.next = 12;
140
+ return eventApi.fetchEventAttrs(eventId, currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId);
141
+ case 12:
142
+ _context2.t0 = _context2.sent;
143
+ if (_context2.t0) {
144
+ _context2.next = 15;
145
+ break;
146
+ }
147
+ _context2.t0 = [];
148
+ case 15:
149
+ eventAttrs = _context2.t0;
150
+ eventAttrsCache.current.set(eventId, eventAttrs);
151
+ eventAttrs.forEach(function (attr) {
152
+ if (attr.type === 2 && !attr.isHidden && attr.label && !attrMap[String(attr.id)]) {
153
+ attrMap[String(attr.id)] = true;
154
+ attrData.push({
155
+ label: attr.label,
156
+ value: String(attr.id),
157
+ children: attrOptions
158
+ });
159
+ }
160
+ });
161
+ _context2.next = 24;
162
+ break;
163
+ case 20:
164
+ _context2.prev = 20;
165
+ _context2.t1 = _context2["catch"](8);
166
+ console.error('Failed to fetch event attributes:', _context2.t1);
167
+ eventAttrsCache.current.set(eventId, []);
168
+ case 24:
169
+ _context2.prev = 24;
170
+ loadingRef.current.set(eventId, false);
171
+ return _context2.finish(24);
172
+ case 27:
173
+ return _context2.abrupt("return", data.concat(attrData));
174
+ case 28:
175
+ case "end":
176
+ return _context2.stop();
177
+ }
178
+ }, _callee2, null, [[8, 20, 24, 27]]);
179
+ }));
180
+ return function getAttrOption(_x2, _x3) {
181
+ return _ref2.apply(this, arguments);
182
+ };
183
+ }();
91
184
  var onChange = function onChange(data, parent) {
92
185
  setDimension(data);
93
186
  setDimensionParent(parent);
@@ -122,7 +215,8 @@ var BizTargetDimension = function BizTargetDimension(props) {
122
215
  title: sub.label,
123
216
  key: "".concat(item.value, "-").concat(sub.value),
124
217
  onClick: function onClick() {
125
- return onChange(sub, item);
218
+ onChange(sub, item);
219
+ onVisibleChange(false);
126
220
  }
127
221
  }, sub.label);
128
222
  }));
@@ -11,12 +11,10 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
11
11
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import React, { useEffect, useState } from 'react';
14
- import { BizTargetCondition, BizEventSelector, BizGlobalDataContext, IconFont, convertAttributeData } from '@zgfe/business-lib';
15
- import eventData from '../../mock/event';
16
- import envData from '../../mock/env';
17
- import userData from '../../mock/user';
14
+ import { BizTargetCondition, BizEventSelector, IconFont } from '@zgfe/business-lib';
18
15
  import './styles/index.less';
19
16
  import { Form } from 'antd';
17
+ import InnerDemo from '../../demoWrapper/innerDemo';
20
18
  var initValue = {
21
19
  type: 'event',
22
20
  alias: '',
@@ -48,11 +46,6 @@ export default (function () {
48
46
  var _Form$useForm = Form.useForm(),
49
47
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
50
48
  form = _Form$useForm2[0];
51
- var store = convertAttributeData({
52
- eventList: eventData,
53
- userPropList: userData,
54
- envPropList: envData
55
- });
56
49
  var onValuesChange = function onValuesChange() {
57
50
  for (var _len = arguments.length, res = new Array(_len), _key = 0; _key < _len; _key++) {
58
51
  res[_key] = arguments[_key];
@@ -78,13 +71,7 @@ export default (function () {
78
71
  setShowOverview(show);
79
72
  setEnableAdd(flag);
80
73
  }, [target === null || target === void 0 ? void 0 : target.targets]);
81
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizGlobalDataContext.Provider, {
82
- value: {
83
- eventGroupList: store.eventGroupList,
84
- userPropList: store.userPropList,
85
- eventEnvList: store.envPropList
86
- }
87
- }, /*#__PURE__*/React.createElement(Form, {
74
+ return /*#__PURE__*/React.createElement(InnerDemo, null, /*#__PURE__*/React.createElement(Form, {
88
75
  initialValues: target,
89
76
  form: form,
90
77
  name: "target_form",
@@ -104,7 +91,7 @@ export default (function () {
104
91
  remove(field.name);
105
92
  }
106
93
  }, /*#__PURE__*/React.createElement(BizEventSelector, {
107
- showBuiltInTarget: true,
94
+ showRetentionTarget: true,
108
95
  showAllEvent: showOverview,
109
96
  popupContainer: false,
110
97
  border: false,
@@ -119,5 +106,5 @@ export default (function () {
119
106
  className: "biz-icon",
120
107
  type: 'tianjia1'
121
108
  }), "\u6DFB\u52A0\u6307\u6807")));
122
- }))), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u503C\uFF1A", JSON.stringify(target)));
109
+ })));
123
110
  });
@@ -1,29 +1,29 @@
1
- @import '../../../assets/styles/inner.less';
2
-
3
- .biz-add-btn {
4
- width: fit-content;
5
- padding: 0 4px;
6
- line-height: 20px;
7
- background-color: #fff;
8
- border-radius: 4px;
9
-
10
- span {
11
- margin-right: 5px;
12
- }
13
-
14
- &.disabled {
15
- color: @disabled-color;
16
- cursor: not-allowed;
17
- span {
18
- color: @disabled-color;
19
- }
20
- }
21
-
22
- &:hover:not(.disabled) {
23
- .__default-hover();
24
-
25
- span {
26
- color: @primary-color;
27
- }
28
- }
29
- }
1
+ @import '../../../assets/styles/inner.less';
2
+
3
+ .biz-add-btn {
4
+ width: fit-content;
5
+ padding: 0 4px;
6
+ line-height: 20px;
7
+ background-color: #fff;
8
+ border-radius: 4px;
9
+
10
+ span {
11
+ margin-right: 5px;
12
+ }
13
+
14
+ &.disabled {
15
+ color: @disabled-color;
16
+ cursor: not-allowed;
17
+ span {
18
+ color: @disabled-color;
19
+ }
20
+ }
21
+
22
+ &:hover:not(.disabled) {
23
+ .__default-hover();
24
+
25
+ span {
26
+ color: @primary-color;
27
+ }
28
+ }
29
+ }
@@ -2,5 +2,8 @@ import React from 'react';
2
2
  import { TargetConditionTypes } from './types';
3
3
  import './styles/index.less';
4
4
  export declare const classPrefix = "biz-target";
5
- declare const BizTargetCondition: React.FC<TargetConditionTypes.Props>;
5
+ type FCWithDefaultProps<P> = React.FC<P> & {
6
+ defaultProps?: Partial<P>;
7
+ };
8
+ declare const BizTargetCondition: FCWithDefaultProps<TargetConditionTypes.Props>;
6
9
  export default BizTargetCondition;
@@ -78,14 +78,14 @@ var BizTargetCondition = function BizTargetCondition(props) {
78
78
  }, []);
79
79
  useEffect(function () {
80
80
  if (targetData === null || targetData === void 0 ? void 0 : targetData.value) {
81
- var _targetData$value$eve, _targetData$value$eve2, _targetData$value$eve3;
81
+ var _targetData$value$eve;
82
82
  var canAdd = true,
83
83
  canDelete = true;
84
- if (((_targetData$value$eve = targetData.value.event) === null || _targetData$value$eve === void 0 ? void 0 : _targetData$value$eve.id) === -100 || ((_targetData$value$eve2 = targetData.value.event) === null || _targetData$value$eve2 === void 0 ? void 0 : _targetData$value$eve2.id) === -204 || ((_targetData$value$eve3 = targetData.value.event) === null || _targetData$value$eve3 === void 0 ? void 0 : _targetData$value$eve3.id) === -205) {
85
- var _targetData$value$gro, _targetData$value$eve4;
84
+ if ([-100, -201, -202, -203, -204, -205].indexOf((_targetData$value$eve = targetData.value.event) === null || _targetData$value$eve === void 0 ? void 0 : _targetData$value$eve.id) != -1) {
85
+ var _targetData$value$gro, _targetData$value$eve2;
86
86
  canAdd = false;
87
87
  setFilters(undefined);
88
- if (!((_targetData$value$gro = targetData.value.group) === null || _targetData$value$gro === void 0 ? void 0 : _targetData$value$gro.id) && ((_targetData$value$eve4 = targetData.value.event) === null || _targetData$value$eve4 === void 0 ? void 0 : _targetData$value$eve4.id) === -100) {
88
+ if (!((_targetData$value$gro = targetData.value.group) === null || _targetData$value$gro === void 0 ? void 0 : _targetData$value$gro.id) && ((_targetData$value$eve2 = targetData.value.event) === null || _targetData$value$eve2 === void 0 ? void 0 : _targetData$value$eve2.id) === -100) {
89
89
  canDelete = false;
90
90
  }
91
91
  } else {
@@ -165,10 +165,10 @@ var BizTargetCondition = function BizTargetCondition(props) {
165
165
  return target;
166
166
  };
167
167
  var onChangeTarget = function onChangeTarget(target) {
168
- var _target$value, _target$value$event, _targetData$value, _targetData$value$eve5;
168
+ var _target$value, _target$value$event, _targetData$value, _targetData$value$eve3;
169
169
  setTargetData(target);
170
170
  var filterData = _.cloneDeep(filters);
171
- if (((_target$value = target.value) === null || _target$value === void 0 ? void 0 : (_target$value$event = _target$value.event) === null || _target$value$event === void 0 ? void 0 : _target$value$event.id) !== (targetData === null || targetData === void 0 ? void 0 : (_targetData$value = targetData.value) === null || _targetData$value === void 0 ? void 0 : (_targetData$value$eve5 = _targetData$value.event) === null || _targetData$value$eve5 === void 0 ? void 0 : _targetData$value$eve5.id)) {
171
+ if (((_target$value = target.value) === null || _target$value === void 0 ? void 0 : (_target$value$event = _target$value.event) === null || _target$value$event === void 0 ? void 0 : _target$value$event.id) !== (targetData === null || targetData === void 0 ? void 0 : (_targetData$value = targetData.value) === null || _targetData$value === void 0 ? void 0 : (_targetData$value$eve3 = _targetData$value.event) === null || _targetData$value$eve3 === void 0 ? void 0 : _targetData$value$eve3.id)) {
172
172
  filterData = undefined;
173
173
  setFilters(undefined);
174
174
  setIsAdd(false);
@@ -204,6 +204,7 @@ var BizTargetCondition = function BizTargetCondition(props) {
204
204
  var data = {
205
205
  type: type,
206
206
  alias: (target === null || target === void 0 ? void 0 : target.alias) || target.value.event.alias || ((_target$value$event3 = target.value.event) === null || _target$value$event3 === void 0 ? void 0 : _target$value$event3.name) || '',
207
+ stepAlias: (target === null || target === void 0 ? void 0 : target.alias) || '',
207
208
  eventId: (_target$value$event4 = target.value.event) === null || _target$value$event4 === void 0 ? void 0 : _target$value$event4.id,
208
209
  eventName: ((_target$value$event5 = target.value.event) === null || _target$value$event5 === void 0 ? void 0 : _target$value$event5.alias) || ((_target$value$event6 = target.value.event) === null || _target$value$event6 === void 0 ? void 0 : _target$value$event6.name),
209
210
  eventGroupId: (_target$value$group2 = target.value.group) === null || _target$value$group2 === void 0 ? void 0 : _target$value$group2.id,
@@ -240,18 +241,19 @@ var BizTargetCondition = function BizTargetCondition(props) {
240
241
  className: "".concat(classPrefix, "-content")
241
242
  }, /*#__PURE__*/React.createElement(BizTargetSelector, {
242
243
  value: targetData,
243
- onChange: onChangeTarget
244
- }, props.children), (targetData === null || targetData === void 0 ? void 0 : (_targetData$value3 = targetData.value) === null || _targetData$value3 === void 0 ? void 0 : (_targetData$value3$gr = _targetData$value3.group) === null || _targetData$value3$gr === void 0 ? void 0 : _targetData$value3$gr.id) === -2 || (targetData === null || targetData === void 0 ? void 0 : (_targetData$value4 = targetData.value) === null || _targetData$value4 === void 0 ? void 0 : (_targetData$value4$ev = _targetData$value4.event) === null || _targetData$value4$ev === void 0 ? void 0 : _targetData$value4$ev.isBuiltIn) ? null : /*#__PURE__*/React.createElement(BizTargetDimension, {
244
+ onChange: onChangeTarget,
245
+ isFunnelEvent: props.isFunnelEvent
246
+ }, props.children), (targetData === null || targetData === void 0 ? void 0 : (_targetData$value3 = targetData.value) === null || _targetData$value3 === void 0 ? void 0 : (_targetData$value3$gr = _targetData$value3.group) === null || _targetData$value3$gr === void 0 ? void 0 : _targetData$value3$gr.id) === -2 || (targetData === null || targetData === void 0 ? void 0 : (_targetData$value4 = targetData.value) === null || _targetData$value4 === void 0 ? void 0 : (_targetData$value4$ev = _targetData$value4.event) === null || _targetData$value4$ev === void 0 ? void 0 : _targetData$value4$ev.isBuiltIn) || props.isFunnelEvent ? null : /*#__PURE__*/React.createElement(BizTargetDimension, {
245
247
  eventId: (targetData === null || targetData === void 0 ? void 0 : (_targetData$value5 = targetData.value) === null || _targetData$value5 === void 0 ? void 0 : (_targetData$value5$ev = _targetData$value5.event) === null || _targetData$value5$ev === void 0 ? void 0 : _targetData$value5$ev.id) ? targetData === null || targetData === void 0 ? void 0 : (_targetData$value6 = targetData.value) === null || _targetData$value6 === void 0 ? void 0 : (_targetData$value6$ev = _targetData$value6.event) === null || _targetData$value6$ev === void 0 ? void 0 : _targetData$value6$ev.id : undefined,
246
248
  value: dimension,
247
249
  onChange: onChangeDimension
248
- }), /*#__PURE__*/React.createElement(Tooltip, {
250
+ }), (props === null || props === void 0 ? void 0 : props.isFunnelEvent) ? null : /*#__PURE__*/React.createElement(Tooltip, {
249
251
  title: "\u6DFB\u52A0\u5C5E\u6027\u7B5B\u9009"
250
252
  }, /*#__PURE__*/React.createElement(IconFont, {
251
253
  className: "".concat(classPrefix, "-icon ").concat(!enableAdd ? 'disabled' : ''),
252
254
  type: "shaixuan",
253
255
  onClick: onAdd
254
- })), /*#__PURE__*/React.createElement(IconFont, {
256
+ })), props.isFunnelEvent ? null : /*#__PURE__*/React.createElement(IconFont, {
255
257
  className: "".concat(classPrefix, "-icon delete ").concat(!(props.enableDelete !== undefined ? props.enableDelete || !(targetData === null || targetData === void 0 ? void 0 : (_targetData$value7 = targetData.value) === null || _targetData$value7 === void 0 ? void 0 : _targetData$value7.event) : enableDelete) ? 'disabled' : ''),
256
258
  type: "qingchu",
257
259
  onClick: onDelete
@@ -1,53 +1,53 @@
1
- @import '../../assets/styles/inner.less';
2
-
3
- .biz-target {
4
- &-content {
5
- display: flex;
6
- align-items: center;
7
- }
8
-
9
- .biz-target-select {
10
- min-width: 160px;
11
- max-width: calc(100% - 208px);
12
- &:hover {
13
- .biz-event-select {
14
- max-width: calc(100% - 18px);
15
- }
16
- }
17
- .biz-event-select {
18
- max-width: 100%;
19
- }
20
- .biz-select-handle-content {
21
- max-width: calc(100% - 19px);
22
- }
23
- }
24
-
25
- .biz-attr-condition-group {
26
- margin-top: 12px;
27
- }
28
-
29
- &-dimension {
30
- width: 100px;
31
- margin-left: 16px;
32
- }
33
- &-dropmenu,
34
- &-submenu {
35
- width: 120px;
36
- }
37
-
38
- &-icon {
39
- margin-left: 16px;
40
- .__icon();
41
-
42
- &.shaixuan {
43
- font-size: 20px !important;
44
- }
45
-
46
- &.delete {
47
- font-size: 16px !important;
48
- }
49
- }
50
- .biz-event-select.focus {
51
- box-shadow: none;
52
- }
53
- }
1
+ @import '../../assets/styles/inner.less';
2
+
3
+ .biz-target {
4
+ &-content {
5
+ display: flex;
6
+ align-items: center;
7
+ }
8
+
9
+ .biz-target-select {
10
+ min-width: 160px;
11
+ max-width: calc(100% - 208px);
12
+ &:hover {
13
+ .biz-event-select {
14
+ max-width: calc(100% - 18px);
15
+ }
16
+ }
17
+ .biz-event-select {
18
+ max-width: 100%;
19
+ }
20
+ .biz-select-handle-content {
21
+ max-width: calc(100% - 19px);
22
+ }
23
+ }
24
+
25
+ .biz-attr-condition-group {
26
+ margin-top: 12px;
27
+ }
28
+
29
+ &-dimension {
30
+ width: 100px;
31
+ margin-left: 16px;
32
+ }
33
+ &-dropmenu,
34
+ &-submenu {
35
+ width: 120px;
36
+ }
37
+
38
+ &-icon {
39
+ margin-left: 16px;
40
+ .__icon();
41
+
42
+ &.shaixuan {
43
+ font-size: 20px !important;
44
+ }
45
+
46
+ &.delete {
47
+ font-size: 16px !important;
48
+ }
49
+ }
50
+ .biz-event-select.focus {
51
+ box-shadow: none;
52
+ }
53
+ }
@@ -31,6 +31,7 @@ export declare namespace TargetConditionTypes {
31
31
  max?: number;
32
32
  children: ReactNode;
33
33
  onlyAnd?: boolean;
34
+ isFunnelEvent?: boolean;
34
35
  enableDelete?: boolean;
35
36
  onChange?: (value: Value) => void;
36
37
  onDelete?: (value?: Value) => void;
@@ -4,5 +4,6 @@ declare const BizEventNameEditBox: React.FC<{
4
4
  disabled?: string;
5
5
  onCancel: () => void;
6
6
  onChange: (alias: string) => void;
7
+ isFunnelEvent?: boolean;
7
8
  }>;
8
9
  export default BizEventNameEditBox;
@@ -25,7 +25,7 @@ var BizEventNameEditBox = function BizEventNameEditBox(props) {
25
25
  }, [alias]);
26
26
  var onClick = function onClick() {
27
27
  if (aliasStatus) {
28
- if (props.disabled && props.disabled === alias) {
28
+ if (props.disabled && props.disabled === alias && !props.isFunnelEvent) {
29
29
  message.error('不能与事件名相同!');
30
30
  return;
31
31
  }
@@ -56,13 +56,18 @@ var BizEventNameEditBox = function BizEventNameEditBox(props) {
56
56
  className: "".concat(classPrefix, "-tip ").concat(!aliasStatus ? classPrefix + '-error' : '')
57
57
  }, "\u8BF7\u8F93\u5165\u6570\u5B57\u3001\u5B57\u6BCD\u6216\u6C49\u5B57"), /*#__PURE__*/React.createElement("div", {
58
58
  className: "".concat(classPrefix, "-footer")
59
- }, /*#__PURE__*/React.createElement(Button, {
59
+ }, /*#__PURE__*/React.createElement("span", {
60
+ onClick: function onClick() {
61
+ setAlias(props.disabled || '');
62
+ },
63
+ className: "".concat(classPrefix, "-footer-left")
64
+ }, "\u4F7F\u7528\u539F\u59CB\u540D"), /*#__PURE__*/React.createElement(Button, {
60
65
  onClick: onCancel,
61
66
  type: "text",
62
67
  className: "".concat(classPrefix, "-mr8")
63
68
  }, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
64
69
  onClick: onClick,
65
70
  type: "primary"
66
- }, "\u786E\u5B9A")));
71
+ }, "\u4FDD\u5B58")));
67
72
  };
68
73
  export default BizEventNameEditBox;
@@ -76,7 +76,8 @@ var BizTargetSelector = function BizTargetSelector(props) {
76
76
  defaultValue: alias,
77
77
  disabled: targetData === null || targetData === void 0 ? void 0 : (_targetData$event = targetData.event) === null || _targetData$event === void 0 ? void 0 : _targetData$event.name,
78
78
  onCancel: onCancelEdit,
79
- onChange: onChangeAlias
79
+ onChange: onChangeAlias,
80
+ isFunnelEvent: props.isFunnelEvent
80
81
  }));
81
82
  };
82
83
  export default BizTargetSelector;
@@ -1,5 +1,8 @@
1
1
  import React from 'react';
2
- declare const BizTargetOptionIcon: React.FC<{
2
+ type FCWithDefaultProps<P> = React.FC<P> & {
3
+ defaultProps?: Partial<P>;
4
+ };
5
+ declare const BizTargetOptionIcon: FCWithDefaultProps<{
3
6
  enabled?: boolean;
4
7
  title?: string;
5
8
  name: string;
@@ -13,6 +13,9 @@ var BizTargetOptionIcon = function BizTargetOptionIcon(props) {
13
13
  key: props.name
14
14
  }, /*#__PURE__*/React.createElement(IconFont, {
15
15
  className: "".concat(classPrefix, "-option-icon ").concat(enabled ? '' : 'disabled', " ").concat(props.name === 'delete' ? classPrefix + '-del-icon' : ''),
16
+ style: {
17
+ backgroundColor: '#E8EFFF'
18
+ },
16
19
  type: props.icon,
17
20
  onClick: onClick
18
21
  }));