@zgfe/business-lib 1.2.71-hxd.8 → 1.2.86-h5.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.
- package/README.md +1 -1
- package/es/AUMFormulaTarget/components/formula/index.js +10 -10
- package/es/AUMFormulaTarget/components/formula/util.js +6 -6
- package/es/AUMFormulaTarget/components/formulaItem/index.js +23 -23
- package/es/AUMFormulaTarget/components/panel/cdpCshCondition.js +50 -50
- package/es/AUMFormulaTarget/components/panel/index.js +30 -30
- package/es/AUMFormulaTarget/components/panel/item.js +22 -22
- package/es/AUMFormulaTarget/components/symbol/index.js +5 -5
- package/es/AUMFormulaTarget/demo/group.js +15 -15
- package/es/AUMFormulaTarget/demo/index.js +2 -2
- package/es/AUMFormulaTarget/index.d.ts +1 -4
- package/es/AUMFormulaTarget/index.js +11 -11
- package/es/addToPanel/components/addPanel.js +5 -5
- package/es/addToPanel/components/numberChart.js +5 -5
- package/es/addToPanel/components/radioGroup.d.ts +1 -4
- package/es/addToPanel/components/styleList.d.ts +1 -4
- package/es/addToPanel/components/styleList.js +5 -5
- package/es/addToPanel/components/wholeChart.js +5 -5
- package/es/addToPanel/demo/edit.js +8 -8
- package/es/addToPanel/demo/index.js +8 -8
- package/es/addToPanel/index.d.ts +1 -4
- package/es/addToPanel/index.js +22 -22
- package/es/addToScene/demo/index.js +8 -8
- package/es/addToScene/index.js +16 -11
- package/es/amountSelector/demo/index.js +1 -1
- package/es/amountSelector/index.js +1 -1
- package/es/assets/demo/dropdown.js +5 -5
- package/es/assets/demo/index.d.ts +1 -1
- package/es/assets/demo/index.js +1 -1
- package/es/assets/demo/input.js +6 -6
- package/es/assets/iconfont/demo_index.html +348 -19
- package/es/assets/iconfont/iconfont.css +3 -11
- package/es/assets/iconfont/iconfont.js +1 -1
- package/es/assets/iconfont/iconfont.json +161 -0
- package/es/assets/iconfont/iconfont.ttf +0 -0
- package/es/assets/iconfont/iconfont.woff +0 -0
- package/es/assets/iconfont/iconfont.woff2 +0 -0
- package/es/assets/theme.js +1 -1
- package/es/attrCondition/demo/group.js +1 -1
- package/es/attrCondition/demo/index.js +1 -1
- package/es/attrCondition/group.js +9 -12
- package/es/attrCondition/index.js +13 -16
- package/es/attrCondition/useAttrCondition.js +9 -11
- package/es/attrCondition/useConditionGroup.js +8 -8
- package/es/attrConditions/components/operateList.js +13 -16
- package/es/attrConditions/components/stringList.js +31 -26
- package/es/attrConditions/components/valuesList.js +5 -5
- package/es/attrConditions/demo/group.js +8 -8
- package/es/attrConditions/demo/index.js +6 -6
- package/es/attrConditions/group.js +3 -3
- package/es/attrConditions/index.d.ts +1 -4
- package/es/attrConditions/types.d.ts +0 -2
- package/es/attrConditions/utils/operates.d.ts +0 -4
- package/es/attrConditions/utils/operates.js +0 -37
- package/es/attributeSelector/demo/disable.d.ts +1 -1
- package/es/attributeSelector/demo/disable.js +7 -7
- package/es/attributeSelector/demo/extra.d.ts +1 -1
- package/es/attributeSelector/demo/extra.js +7 -7
- package/es/attributeSelector/demo/funnel.d.ts +1 -1
- package/es/attributeSelector/demo/funnel.js +7 -7
- package/es/attributeSelector/demo/index.d.ts +1 -1
- package/es/attributeSelector/demo/index.js +7 -7
- package/es/attributeSelector/index.js +35 -39
- package/es/attributeSelector/listPanel.js +126 -330
- package/es/attributeSelector/types.d.ts +0 -1
- package/es/attributeSelector/util.js +0 -3
- package/es/chart/demo/bar.js +1 -1
- package/es/chart/demo/index.js +7 -7
- package/es/chart/demo/line_bar.js +1 -1
- package/es/chart/demo/line_bar_stack.js +22 -22
- package/es/chart/demo/map.js +1 -1
- package/es/chart/demo/muit_y.js +1 -1
- package/es/chart/demo/pie.js +1 -1
- package/es/chart/demo/stack.js +7 -7
- package/es/chart/index.js +23 -21
- package/es/chart/util/chartOptionConfig.js +6 -6
- package/es/chart/util/data/china.js +1 -1
- package/es/chart/util/formatData.js +6 -6
- package/es/chart/util/mapUtil.js +11 -11
- package/es/colorIcon/demo/index.js +1 -1
- package/es/colorIcon/index.js +4 -2
- package/es/constants/apis.d.ts +0 -3
- package/es/constants/apis.js +2 -5
- package/es/constants/common.d.ts +0 -11
- package/es/constants/common.js +0 -31
- package/es/context/index.d.ts +0 -1
- package/es/context/index.js +1 -3
- package/es/cycleTime/demo/disable.js +1 -1
- package/es/cycleTime/demo/hour.js +6 -6
- package/es/cycleTime/demo/index.d.ts +1 -1
- package/es/cycleTime/demo/index.js +2 -2
- package/es/cycleTime/demo/multi.js +1 -1
- package/es/cycleTime/index.js +24 -22
- package/es/cycleTime/month.js +12 -9
- package/es/dataSetGroup/demo/index.js +1 -1
- package/es/dataSetGroup/index.js +6 -5
- package/es/dataSetGroup/overlay.js +10 -10
- package/es/datePicker/datePicker.js +8 -8
- package/es/datePicker/demo/customType.d.ts +1 -1
- package/es/datePicker/demo/customType.js +7 -7
- package/es/datePicker/demo/day.d.ts +1 -1
- package/es/datePicker/demo/day.js +7 -7
- package/es/datePicker/demo/index.d.ts +1 -1
- package/es/datePicker/demo/index.js +7 -7
- package/es/datePicker/index.d.ts +1 -4
- package/es/datePicker/index.js +19 -19
- package/es/datePicker/shortcut.js +5 -5
- package/es/datePickerV2/datePicker.d.ts +1 -1
- package/es/datePickerV2/datePicker.js +11 -20
- package/es/datePickerV2/demo/customType.d.ts +1 -1
- package/es/datePickerV2/demo/customType.js +7 -7
- package/es/datePickerV2/demo/day.d.ts +1 -1
- package/es/datePickerV2/demo/day.js +8 -10
- package/es/datePickerV2/demo/index.d.ts +1 -1
- package/es/datePickerV2/demo/index.js +9 -10
- package/es/datePickerV2/index.d.ts +1 -4
- package/es/datePickerV2/index.js +27 -33
- package/es/datePickerV2/popoverContent.d.ts +1 -1
- package/es/datePickerV2/popoverContent.js +9 -10
- package/es/datePickerV2/shortcut.js +7 -7
- package/es/datePickerV2/types.d.ts +1 -3
- package/es/datePickerV2/types.js +0 -1
- package/es/datePickerV2/utils.js +1 -17
- package/es/demoWrapper/content.js +46 -40
- package/es/demoWrapper/demo/index.js +1 -1
- package/es/demoWrapper/index.js +15 -15
- package/es/dialog/demo/index.js +6 -6
- package/es/dialog/index.d.ts +1 -4
- package/es/dialog/index.js +6 -6
- package/es/dnd/demo/data.js +6 -6
- package/es/dnd/demo/handle.js +6 -6
- package/es/dnd/demo/index.js +2 -6
- package/es/dnd/demo/styles/index.less +1 -1
- package/es/dnd/index.d.ts +1 -4
- package/es/dnd/index.js +11 -10
- package/es/dnd/item.js +6 -20
- package/es/empty/demo/index.d.ts +1 -1
- package/es/empty/demo/index.js +2 -2
- package/es/empty/index.js +6 -6
- package/es/eventSelector/demo/index.js +6 -6
- package/es/eventSelector/demo/multiple.js +6 -6
- package/es/eventSelector/index.d.ts +1 -4
- package/es/eventSelector/index.js +9 -10
- package/es/eventSelector/listPanel.js +39 -41
- package/es/eventSelector/option.js +3 -3
- package/es/eventSelector/types.d.ts +0 -1
- package/es/formulaTarget/components/formula/index.js +8 -9
- package/es/formulaTarget/components/formula/index.less +1 -1
- package/es/formulaTarget/components/formula/types.d.ts +0 -1
- package/es/formulaTarget/components/formula/util.js +6 -6
- package/es/formulaTarget/components/formulaItem/index.js +22 -27
- package/es/formulaTarget/components/formulaItem/types.d.ts +0 -1
- package/es/formulaTarget/components/panel/index.js +33 -34
- package/es/formulaTarget/components/panel/item.js +10 -17
- package/es/formulaTarget/components/panel/types.d.ts +0 -2
- package/es/formulaTarget/components/symbol/index.js +5 -5
- package/es/formulaTarget/demo/group.js +15 -15
- package/es/formulaTarget/demo/index.js +1 -1
- package/es/formulaTarget/index.d.ts +1 -4
- package/es/formulaTarget/index.js +26 -27
- package/es/formulaTarget/types.d.ts +0 -1
- package/es/hooks/useBizStore.js +44 -38
- package/es/hooks/useChanged.js +5 -5
- package/es/hooks/useSubject.js +5 -5
- package/es/icon/demo/index.js +1 -1
- package/es/icon/demo/list.js +1 -1
- package/es/icon/iconFont.d.ts +1 -4
- package/es/icon/iconFont.js +8 -8
- package/es/index.d.ts +1 -2
- package/es/index.js +1 -2
- package/es/layout/analysisLayout/demo/index.d.ts +1 -1
- package/es/layout/analysisLayout/demo/index.js +2 -2
- package/es/layout/analysisLayout/index.d.ts +1 -4
- package/es/layout/analysisLayout/index.js +8 -8
- package/es/layout/columnLayout/demo/data.js +9 -9
- package/es/layout/columnLayout/demo/index.js +6 -6
- package/es/layout/columnLayout/demo/panel.js +7 -7
- package/es/layout/columnLayout/index.d.ts +1 -4
- package/es/layout/columnLayout/index.js +10 -10
- package/es/layout/detail/demo/index.js +1 -1
- package/es/layout/optionTitle/components/btnMenu/demo.js +2 -2
- package/es/layout/optionTitle/components/btnMenu/index.js +6 -6
- package/es/layout/optionTitle/components/btnMenu/index.less +1 -1
- package/es/layout/optionTitle/components/changePanelModal/index.js +14 -14
- package/es/layout/optionTitle/components/changePanelModal/panelItem.js +10 -10
- package/es/layout/optionTitle/components/title/demo.js +5 -5
- package/es/layout/optionTitle/components/title/index.d.ts +2 -1
- package/es/layout/optionTitle/components/title/index.js +15 -19
- package/es/layout/optionTitle/components/title/index.less +1 -1
- package/es/layout/optionTitle/demo/index.js +6 -6
- package/es/layout/optionTitle/demo/layout.js +6 -6
- package/es/layout/optionTitle/demo/panelCreate.js +6 -6
- package/es/layout/optionTitle/index.js +16 -16
- package/es/layout/optionTitle/layout.js +9 -9
- package/es/layout/optionTitle/styles/index.less +1 -1
- package/es/layout/optionTitle/styles/layout.less +1 -1
- package/es/layout/optionTitle/styles/search.less +1 -1
- package/es/loading/demo/index.d.ts +1 -1
- package/es/loading/demo/index.js +2 -2
- package/es/loginForm/demo/index.js +1 -1
- package/es/loginForm/index.js +5 -5
- package/es/platformSelector/demo/index.js +1 -1
- package/es/platformSelector/index.js +6 -6
- package/es/platformSelector/util.js +1 -1
- package/es/productCondition/conditionTypeList.d.ts +1 -4
- package/es/productCondition/conditionTypeList.js +2 -2
- package/es/productCondition/conditions/cdpCshCondition.js +51 -54
- package/es/productCondition/conditions/constants.d.ts +0 -2
- package/es/productCondition/conditions/constants.js +0 -2
- package/es/productCondition/conditions/eventCondition.js +8 -8
- package/es/productCondition/conditions/order/runPeriodCondition.js +10 -8
- package/es/productCondition/conditions/order/runTimesCondition.js +13 -13
- package/es/productCondition/conditions/periodCondition.d.ts +1 -4
- package/es/productCondition/conditions/periodCondition.js +8 -8
- package/es/productCondition/conditions/propCondition.d.ts +1 -4
- package/es/productCondition/conditions/propCondition.js +14 -14
- package/es/productCondition/conditions/runTimesCondition.js +6 -6
- package/es/productCondition/conditions/textDesc.js +6 -6
- package/es/productCondition/conditions/timeDimension.js +18 -18
- package/es/productCondition/demo/business.d.ts +1 -1
- package/es/productCondition/demo/business.js +7 -7
- package/es/productCondition/demo/index.d.ts +1 -1
- package/es/productCondition/demo/index.js +7 -7
- package/es/productCondition/index.d.ts +1 -4
- package/es/productCondition/index.js +17 -17
- package/es/productCondition/orConditions.js +8 -8
- package/es/productCondition/relationLabel.js +2 -2
- package/es/productCondition/types.d.ts +1 -1
- package/es/productCondition/util.js +6 -6
- package/es/quickDatePicker/demo/index.d.ts +1 -1
- package/es/quickDatePicker/demo/index.js +18 -38
- package/es/quickDatePicker/index.js +21 -115
- package/es/quickDatePicker/styles/index.less +23 -26
- package/es/quickDatePicker/types.d.ts +0 -12
- package/es/quickDatePicker/utils.d.ts +0 -6
- package/es/quickDatePicker/utils.js +1 -54
- package/es/searchInput/demo/index.js +1 -1
- package/es/select/demo/children.js +6 -6
- package/es/select/demo/customLabel.js +1 -1
- package/es/select/demo/group.js +6 -6
- package/es/select/demo/index.js +6 -6
- package/es/select/demo/loading.js +6 -6
- package/es/select/demo/multiple.js +6 -6
- package/es/select/handle.js +20 -13
- package/es/select/index.d.ts +1 -4
- package/es/select/index.js +17 -16
- package/es/select/option.js +13 -13
- package/es/select/overlay.js +17 -16
- package/es/socket/demo/demo.js +12 -12
- package/es/socket/index.js +26 -23
- package/es/subjectWrapper/demo/index.js +1 -1
- package/es/subjectWrapper/index.js +13 -13
- package/es/table/demo/index.d.ts +1 -1
- package/es/table/demo/index.js +17 -17
- package/es/table/demo/index2.js +6 -6
- package/es/table/demo/index3.js +9 -9
- package/es/table/index.js +8 -8
- package/es/targetConditionGroup/components/targetDimension.js +64 -157
- package/es/targetConditionGroup/demo/group.js +15 -15
- package/es/targetConditionGroup/demo/index.js +6 -6
- package/es/targetConditionGroup/index.d.ts +1 -4
- package/es/targetConditionGroup/index.js +38 -38
- package/es/targetSelector/demo/index.d.ts +1 -1
- package/es/targetSelector/demo/index.js +7 -7
- package/es/targetSelector/editBox.js +5 -5
- package/es/targetSelector/index.js +7 -7
- package/es/targetSelector/optionIcon.d.ts +1 -4
- package/es/userCondition/conditionTypeList.d.ts +1 -4
- package/es/userCondition/conditionTypeList.js +11 -11
- package/es/userCondition/conditions/business/operatorCondition.js +15 -15
- package/es/userCondition/conditions/business/paramsCondition.js +10 -10
- package/es/userCondition/conditions/businessCondition.js +15 -15
- package/es/userCondition/conditions/cdpCondition.js +33 -36
- package/es/userCondition/conditions/cdpCshCondition.js +51 -54
- package/es/userCondition/conditions/constants.d.ts +0 -2
- package/es/userCondition/conditions/constants.js +0 -2
- package/es/userCondition/conditions/dataAttribute.js +18 -22
- package/es/userCondition/conditions/eventCondition.js +17 -17
- package/es/userCondition/conditions/order/runPeriodCondition.d.ts +1 -4
- package/es/userCondition/conditions/order/runPeriodCondition.js +6 -6
- package/es/userCondition/conditions/order/runTimesCondition.js +13 -13
- package/es/userCondition/conditions/periodCondition.d.ts +1 -4
- package/es/userCondition/conditions/periodCondition.js +10 -10
- package/es/userCondition/conditions/propCondition.js +20 -18
- package/es/userCondition/conditions/runTimesCondition.js +6 -6
- package/es/userCondition/conditions/tagsCondition.js +11 -11
- package/es/userCondition/conditions/textDesc.js +17 -17
- package/es/userCondition/conditions/timeDimension.js +18 -18
- package/es/userCondition/demo/business.d.ts +1 -1
- package/es/userCondition/demo/business.js +7 -7
- package/es/userCondition/demo/index.d.ts +1 -1
- package/es/userCondition/demo/index.js +7 -7
- package/es/userCondition/index.js +129 -70
- package/es/userCondition/orConditions.js +8 -8
- package/es/userCondition/relationLabel.js +2 -2
- package/es/userCondition/types.d.ts +1 -1
- package/es/userCondition/util.js +6 -6
- package/es/userGroup/demo/group.js +14 -14
- package/es/userGroup/demo/index.js +9 -9
- package/es/userGroup/index.d.ts +1 -4
- package/es/userGroup/index.js +71 -13
- package/es/userGroup/overlay.js +15 -15
- package/es/userGroupHeader/demo/index.js +1 -1
- package/es/userGroupHeader/index.d.ts +0 -1
- package/es/userGroupHeader/index.js +71 -34
- package/es/userGroupHeader/styles/index.less +0 -8
- package/es/userTagsSelector/cascaderOverlay.d.ts +1 -4
- package/es/userTagsSelector/cascaderOverlay.js +27 -27
- package/es/userTagsSelector/components/tagList/index.d.ts +1 -4
- package/es/userTagsSelector/components/tagList/index.js +5 -5
- package/es/userTagsSelector/demo/index.js +7 -7
- package/es/userTagsSelector/groups/index.d.ts +1 -4
- package/es/userTagsSelector/groups/index.js +5 -5
- package/es/userTagsSelector/index.d.ts +1 -4
- package/es/userTagsSelector/index.js +13 -13
- package/es/userTagsSelector/multipleCheckPanel/index.js +5 -5
- package/es/utils/ajax.js +54 -66
- package/es/utils/demo/ajax.js +1 -1
- package/es/utils/demo/interruption.js +6 -6
- package/es/utils/index.d.ts +1 -2
- package/es/utils/index.js +1 -2
- package/es/utils/type.d.ts +0 -1
- package/es/utils/type.js +6 -6
- package/package.json +2 -2
- package/es/utils/eventApi.d.ts +0 -14
- package/es/utils/eventApi.js +0 -120
|
@@ -1,31 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
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 }; })(); }
|
|
3
|
-
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); }
|
|
4
|
-
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); }
|
|
5
|
-
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); }); }; }
|
|
6
|
-
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
7
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."); }
|
|
8
|
-
function _unsupportedIterableToArray(
|
|
9
|
-
function _arrayLikeToArray(
|
|
10
|
-
function _iterableToArrayLimit(
|
|
11
|
-
function _arrayWithHoles(
|
|
12
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
13
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
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); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
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; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
7
|
import { Dropdown, Menu } from 'antd';
|
|
15
8
|
import SubMenu from 'antd/lib/menu/SubMenu';
|
|
16
|
-
import React, { useContext, useEffect,
|
|
9
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
17
10
|
import { classPrefix } from '..';
|
|
18
11
|
import BizGlobalDataContext from '../../context';
|
|
19
12
|
import SelectHandle from '../../select/handle';
|
|
20
13
|
import { normalOptions, attrOptions } from '../data/operates';
|
|
21
|
-
|
|
22
|
-
import _ from 'lodash';
|
|
23
|
-
var BizTargetDimension = function BizTargetDimension(_ref) {
|
|
14
|
+
var BizTargetDimension = function BizTargetDimension(props) {
|
|
24
15
|
var _currentApp$type;
|
|
25
|
-
var _ref$isExtend = _ref.isExtend,
|
|
26
|
-
isExtend = _ref$isExtend === void 0 ? true : _ref$isExtend,
|
|
27
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
28
16
|
var _useContext = useContext(BizGlobalDataContext),
|
|
17
|
+
eventGroupList = _useContext.eventGroupList,
|
|
29
18
|
currentApp = _useContext.currentApp;
|
|
30
19
|
var _useState = useState(),
|
|
31
20
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -43,146 +32,62 @@ var BizTargetDimension = function BizTargetDimension(_ref) {
|
|
|
43
32
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
44
33
|
visible = _useState8[0],
|
|
45
34
|
setVisible = _useState8[1];
|
|
46
|
-
var eventAttrsCache = useRef(new Map());
|
|
47
|
-
var loadingRef = useRef(new Map());
|
|
48
35
|
useEffect(function () {
|
|
49
|
-
var _currentApp$type2;
|
|
36
|
+
var _currentApp$type2, _props$value;
|
|
50
37
|
var dimensionOption = props.normalOptions || normalOptions((_currentApp$type2 = currentApp === null || currentApp === void 0 ? void 0 : currentApp.type) !== null && _currentApp$type2 !== void 0 ? _currentApp$type2 : 'user');
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
optionsWithAttrs = _context.v;
|
|
66
|
-
case 2:
|
|
67
|
-
setOptions(optionsWithAttrs);
|
|
68
|
-
current = optionsWithAttrs[0];
|
|
69
|
-
if (!((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.analysisAttr)) setDimensionParent({
|
|
70
|
-
label: '',
|
|
71
|
-
value: ''
|
|
72
|
-
});
|
|
73
|
-
if (props.value) {
|
|
74
|
-
optionsWithAttrs.forEach(function (item) {
|
|
75
|
-
var _props$value2, _props$value3;
|
|
76
|
-
if (item.value === ((_props$value2 = props.value) === null || _props$value2 === void 0 ? void 0 : _props$value2.analysisIndex)) {
|
|
77
|
-
current = item;
|
|
78
|
-
}
|
|
79
|
-
if (item.children && item.label === ((_props$value3 = props.value) === null || _props$value3 === void 0 ? void 0 : _props$value3.analysisAttr)) {
|
|
80
|
-
setDimensionParent({
|
|
81
|
-
label: item.label,
|
|
82
|
-
value: item.value
|
|
83
|
-
});
|
|
84
|
-
item.children.forEach(function (child) {
|
|
85
|
-
var _props$value4;
|
|
86
|
-
if (child.value === ((_props$value4 = props.value) === null || _props$value4 === void 0 ? void 0 : _props$value4.analysisIndex)) {
|
|
87
|
-
current = child;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
setDimension(current);
|
|
94
|
-
case 3:
|
|
95
|
-
return _context.a(2);
|
|
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;
|
|
96
52
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
var attrData, attrMap, cachedAttrs, eventAttrs, _t, _t2;
|
|
107
|
-
return _regenerator().w(function (_context2) {
|
|
108
|
-
while (1) switch (_context2.n) {
|
|
109
|
-
case 0:
|
|
110
|
-
attrData = [];
|
|
111
|
-
attrMap = {};
|
|
112
|
-
if (!eventAttrsCache.current.has(eventId)) {
|
|
113
|
-
_context2.n = 1;
|
|
114
|
-
break;
|
|
115
|
-
}
|
|
116
|
-
cachedAttrs = eventAttrsCache.current.get(eventId) || [];
|
|
117
|
-
cachedAttrs === null || cachedAttrs === void 0 ? void 0 : cachedAttrs.forEach(function (attr) {
|
|
118
|
-
if (attr.type === 2 && !attr.isHidden && attr.label && !attrMap[String(attr.id)]) {
|
|
119
|
-
attrMap[String(attr.id)] = true;
|
|
120
|
-
attrData.push({
|
|
121
|
-
label: attr.label,
|
|
122
|
-
value: String(attr.id),
|
|
123
|
-
children: attrOptions
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
return _context2.a(2, data.concat(attrData));
|
|
128
|
-
case 1:
|
|
129
|
-
if (!loadingRef.current.get(eventId)) {
|
|
130
|
-
_context2.n = 2;
|
|
131
|
-
break;
|
|
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;
|
|
132
62
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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
|
|
82
|
+
});
|
|
151
83
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
eventAttrs = _t;
|
|
155
|
-
eventAttrsCache.current.set(eventId, eventAttrs);
|
|
156
|
-
eventAttrs.forEach(function (attr) {
|
|
157
|
-
if (attr.type === 2 && !attr.isHidden && attr.label && !attrMap[String(attr.id)]) {
|
|
158
|
-
attrMap[String(attr.id)] = true;
|
|
159
|
-
attrData.push({
|
|
160
|
-
label: attr.label,
|
|
161
|
-
value: String(attr.id),
|
|
162
|
-
children: attrOptions
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
_context2.n = 6;
|
|
167
|
-
break;
|
|
168
|
-
case 5:
|
|
169
|
-
_context2.p = 5;
|
|
170
|
-
_t2 = _context2.v;
|
|
171
|
-
console.error('Failed to fetch event attributes:', _t2);
|
|
172
|
-
eventAttrsCache.current.set(eventId, []);
|
|
173
|
-
case 6:
|
|
174
|
-
_context2.p = 6;
|
|
175
|
-
loadingRef.current.set(eventId, false);
|
|
176
|
-
return _context2.f(6);
|
|
177
|
-
case 7:
|
|
178
|
-
return _context2.a(2, data.concat(attrData));
|
|
84
|
+
});
|
|
85
|
+
return;
|
|
179
86
|
}
|
|
180
|
-
}
|
|
181
|
-
})
|
|
182
|
-
return
|
|
183
|
-
|
|
184
|
-
};
|
|
185
|
-
}();
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
return data.concat(attrData);
|
|
90
|
+
};
|
|
186
91
|
var onChange = function onChange(data, parent) {
|
|
187
92
|
setDimension(data);
|
|
188
93
|
setDimensionParent(parent);
|
|
@@ -198,13 +103,13 @@ var BizTargetDimension = function BizTargetDimension(_ref) {
|
|
|
198
103
|
setVisible(show);
|
|
199
104
|
};
|
|
200
105
|
var dropdownRender = function dropdownRender() {
|
|
201
|
-
return /*#__PURE__*/React.createElement(Menu, null, props.promptTxt &&
|
|
106
|
+
return /*#__PURE__*/React.createElement(Menu, null, props.promptTxt && /*#__PURE__*/React.createElement("div", {
|
|
202
107
|
style: {
|
|
203
108
|
color: '#9AA1A9',
|
|
204
109
|
fontSize: 12,
|
|
205
110
|
marginBottom: 8
|
|
206
111
|
}
|
|
207
|
-
}, props.promptTxt)
|
|
112
|
+
}, props.promptTxt), options.map(function (item) {
|
|
208
113
|
if (item.children) {
|
|
209
114
|
return /*#__PURE__*/React.createElement(SubMenu, {
|
|
210
115
|
popupClassName: "".concat(classPrefix, "-submenu"),
|
|
@@ -217,8 +122,7 @@ var BizTargetDimension = function BizTargetDimension(_ref) {
|
|
|
217
122
|
title: sub.label,
|
|
218
123
|
key: "".concat(item.value, "-").concat(sub.value),
|
|
219
124
|
onClick: function onClick() {
|
|
220
|
-
onChange(sub, item);
|
|
221
|
-
onVisibleChange(false);
|
|
125
|
+
return onChange(sub, item);
|
|
222
126
|
}
|
|
223
127
|
}, sub.label);
|
|
224
128
|
}));
|
|
@@ -253,4 +157,7 @@ var BizTargetDimension = function BizTargetDimension(_ref) {
|
|
|
253
157
|
label: "".concat(!options.length ? '暂无字段' : dimensionParent ? dimensionParent.label : '').concat((dimension === null || dimension === void 0 ? void 0 : dimension.label) || '')
|
|
254
158
|
})));
|
|
255
159
|
};
|
|
160
|
+
BizTargetDimension.defaultProps = {
|
|
161
|
+
isExtend: true
|
|
162
|
+
};
|
|
256
163
|
export default BizTargetDimension;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
function _defineProperty(
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
7
|
-
function _slicedToArray(
|
|
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
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
8
|
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
|
-
function _unsupportedIterableToArray(
|
|
10
|
-
function _arrayLikeToArray(
|
|
11
|
-
function _iterableToArrayLimit(
|
|
12
|
-
function _arrayWithHoles(
|
|
9
|
+
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); }
|
|
10
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
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
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import React, { useEffect, useState } from 'react';
|
|
14
|
-
import { BizTargetCondition, BizEventSelector, IconFont } from '@
|
|
14
|
+
import { BizTargetCondition, BizEventSelector, IconFont } from '@iofe/business-lib';
|
|
15
15
|
import './styles/index.less';
|
|
16
16
|
import { Form } from 'antd';
|
|
17
17
|
import InnerDemo from '../../demoWrapper/innerDemo';
|
|
@@ -91,13 +91,13 @@ export default (function () {
|
|
|
91
91
|
remove(field.name);
|
|
92
92
|
}
|
|
93
93
|
}, /*#__PURE__*/React.createElement(BizEventSelector, {
|
|
94
|
-
|
|
94
|
+
showBuiltInTarget: true,
|
|
95
95
|
showAllEvent: showOverview,
|
|
96
96
|
popupContainer: false,
|
|
97
97
|
border: false,
|
|
98
98
|
defaultSelectAble: false
|
|
99
99
|
})));
|
|
100
|
-
}), fields.length < 5 &&
|
|
100
|
+
}), fields.length < 5 && /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement("div", {
|
|
101
101
|
className: "biz-add-btn ".concat(enableAdd ? '' : 'disabled'),
|
|
102
102
|
onClick: function onClick() {
|
|
103
103
|
return enableAdd && add();
|
|
@@ -105,6 +105,6 @@ export default (function () {
|
|
|
105
105
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
106
106
|
className: "biz-icon",
|
|
107
107
|
type: 'tianjia1'
|
|
108
|
-
}), "\u6DFB\u52A0\u6307\u6807")))
|
|
108
|
+
}), "\u6DFB\u52A0\u6307\u6807")));
|
|
109
109
|
})));
|
|
110
110
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
function _slicedToArray(
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
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."); }
|
|
3
|
-
function _unsupportedIterableToArray(
|
|
4
|
-
function _arrayLikeToArray(
|
|
5
|
-
function _iterableToArrayLimit(
|
|
6
|
-
function _arrayWithHoles(
|
|
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); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
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; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import React, { useState } from 'react';
|
|
8
|
-
import { BizTargetCondition, BizEventSelector, BizGlobalDataContext, convertAttributeData } from '@
|
|
8
|
+
import { BizTargetCondition, BizEventSelector, BizGlobalDataContext, convertAttributeData } from '@iofe/business-lib';
|
|
9
9
|
import eventData from '../../mock/event';
|
|
10
10
|
import envData from '../../mock/env';
|
|
11
11
|
import userData from '../../mock/user';
|
|
@@ -2,8 +2,5 @@ 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
|
-
|
|
6
|
-
defaultProps?: Partial<P>;
|
|
7
|
-
};
|
|
8
|
-
declare const BizTargetCondition: FCWithDefaultProps<TargetConditionTypes.Props>;
|
|
5
|
+
declare const BizTargetCondition: React.FC<TargetConditionTypes.Props>;
|
|
9
6
|
export default BizTargetCondition;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
function _defineProperty(
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
7
|
-
function _slicedToArray(
|
|
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
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
8
|
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
|
-
function _unsupportedIterableToArray(
|
|
10
|
-
function _arrayLikeToArray(
|
|
11
|
-
function _iterableToArrayLimit(
|
|
12
|
-
function _arrayWithHoles(
|
|
9
|
+
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); }
|
|
10
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
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
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
14
14
|
import BizTargetSelector from '../targetSelector';
|
|
15
15
|
import BizTargetDimension from './components/targetDimension';
|
|
@@ -21,7 +21,7 @@ import { BuiltinIndicators } from '../constants/common';
|
|
|
21
21
|
import { BizAttrConditionGroup, IconFont } from '..';
|
|
22
22
|
export var classPrefix = 'biz-target';
|
|
23
23
|
var BizTargetCondition = function BizTargetCondition(props) {
|
|
24
|
-
var _targetData$value3, _targetData$value3$gr, _targetData$value4, _targetData$value4$ev, _targetData$value5, _targetData$value5$ev, _targetData$value6, _targetData$value6$ev, _targetData$value7, _targetData$value8, _targetData$value8$ev, _targetData$value9, _targetData$value9$ev, _targetData$
|
|
24
|
+
var _targetData$value3, _targetData$value3$gr, _targetData$value4, _targetData$value4$ev, _targetData$value5, _targetData$value5$ev, _targetData$value6, _targetData$value6$ev, _targetData$value7, _targetData$value8, _targetData$value8$ev, _targetData$value9, _targetData$value9$ev, _targetData$value10, _targetData$value10$e, _targetData$value11, _targetData$value11$e;
|
|
25
25
|
var max = props.max;
|
|
26
26
|
var _useState = useState(),
|
|
27
27
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -47,22 +47,22 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
47
47
|
enableAdd = _useState8[0],
|
|
48
48
|
setEnableAdd = _useState8[1];
|
|
49
49
|
var _useState9 = useState(props.enableDelete),
|
|
50
|
-
|
|
51
|
-
enableDelete =
|
|
52
|
-
setEnableDelete =
|
|
53
|
-
var
|
|
54
|
-
_useState10 = _slicedToArray(_useState1, 2),
|
|
55
|
-
count = _useState10[0],
|
|
56
|
-
setCount = _useState10[1];
|
|
57
|
-
var _useState11 = useState(false),
|
|
50
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
51
|
+
enableDelete = _useState10[0],
|
|
52
|
+
setEnableDelete = _useState10[1];
|
|
53
|
+
var _useState11 = useState(0),
|
|
58
54
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
var
|
|
62
|
-
var _useState13 = useState(true),
|
|
55
|
+
count = _useState12[0],
|
|
56
|
+
setCount = _useState12[1];
|
|
57
|
+
var _useState13 = useState(false),
|
|
63
58
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
isAdd = _useState14[0],
|
|
60
|
+
setIsAdd = _useState14[1];
|
|
61
|
+
var conditionRef = useRef(null);
|
|
62
|
+
var _useState15 = useState(true),
|
|
63
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
64
|
+
loading = _useState16[0],
|
|
65
|
+
setLoading = _useState16[1];
|
|
66
66
|
useEffect(function () {
|
|
67
67
|
var value = props.defaultValue || props.value;
|
|
68
68
|
if (value) {
|
|
@@ -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;
|
|
81
|
+
var _targetData$value$eve, _targetData$value$eve2, _targetData$value$eve3;
|
|
82
82
|
var canAdd = true,
|
|
83
83
|
canDelete = true;
|
|
84
|
-
if (
|
|
85
|
-
var _targetData$value$gro, _targetData$value$
|
|
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;
|
|
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$
|
|
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) {
|
|
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$
|
|
168
|
+
var _target$value, _target$value$event, _targetData$value, _targetData$value$eve5;
|
|
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$
|
|
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)) {
|
|
172
172
|
filterData = undefined;
|
|
173
173
|
setFilters(undefined);
|
|
174
174
|
setIsAdd(false);
|
|
@@ -243,30 +243,30 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
243
243
|
value: targetData,
|
|
244
244
|
onChange: onChangeTarget,
|
|
245
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 :
|
|
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, {
|
|
247
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,
|
|
248
248
|
value: dimension,
|
|
249
249
|
onChange: onChangeDimension
|
|
250
|
-
})
|
|
250
|
+
}), (props === null || props === void 0 ? void 0 : props.isFunnelEvent) ? null : /*#__PURE__*/React.createElement(Tooltip, {
|
|
251
251
|
title: "\u6DFB\u52A0\u5C5E\u6027\u7B5B\u9009"
|
|
252
252
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
253
253
|
className: "".concat(classPrefix, "-icon ").concat(!enableAdd ? 'disabled' : ''),
|
|
254
254
|
type: "shaixuan",
|
|
255
255
|
onClick: onAdd
|
|
256
|
-
}))
|
|
256
|
+
})), props.isFunnelEvent ? null : /*#__PURE__*/React.createElement(IconFont, {
|
|
257
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' : ''),
|
|
258
258
|
type: "qingchu",
|
|
259
259
|
onClick: onDelete
|
|
260
|
-
}))
|
|
260
|
+
})), (targetData === null || targetData === void 0 ? void 0 : (_targetData$value8 = targetData.value) === null || _targetData$value8 === void 0 ? void 0 : (_targetData$value8$ev = _targetData$value8.event) === null || _targetData$value8$ev === void 0 ? void 0 : _targetData$value8$ev.id) && eventIdMap && eventIdMap[targetData === null || targetData === void 0 ? void 0 : (_targetData$value9 = targetData.value) === null || _targetData$value9 === void 0 ? void 0 : (_targetData$value9$ev = _targetData$value9.event) === null || _targetData$value9$ev === void 0 ? void 0 : _targetData$value9$ev.id] && (filters || isAdd) && /*#__PURE__*/React.createElement(BizAttrConditionGroup, {
|
|
261
261
|
ref: conditionRef,
|
|
262
262
|
value: filters,
|
|
263
263
|
onlyAnd: props.onlyAnd,
|
|
264
264
|
enableEventProp: true,
|
|
265
265
|
enableDelete: true,
|
|
266
|
-
eventIdList: (targetData === null || targetData === void 0 ? void 0 : (_targetData$
|
|
266
|
+
eventIdList: (targetData === null || targetData === void 0 ? void 0 : (_targetData$value10 = targetData.value) === null || _targetData$value10 === void 0 ? void 0 : (_targetData$value10$e = _targetData$value10.event) === null || _targetData$value10$e === void 0 ? void 0 : _targetData$value10$e.id) ? [targetData === null || targetData === void 0 ? void 0 : (_targetData$value11 = targetData.value) === null || _targetData$value11 === void 0 ? void 0 : (_targetData$value11$e = _targetData$value11.event) === null || _targetData$value11$e === void 0 ? void 0 : _targetData$value11$e.id] : undefined,
|
|
267
267
|
onChange: onChangeFilters,
|
|
268
268
|
onConditionsCount: setCount
|
|
269
|
-
})))
|
|
269
|
+
})));
|
|
270
270
|
};
|
|
271
271
|
BizTargetCondition.defaultProps = {
|
|
272
272
|
max: 5
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
function _slicedToArray(
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
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."); }
|
|
3
|
-
function _unsupportedIterableToArray(
|
|
4
|
-
function _arrayLikeToArray(
|
|
5
|
-
function _iterableToArrayLimit(
|
|
6
|
-
function _arrayWithHoles(
|
|
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); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
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; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import React, { useState } from 'react';
|
|
8
|
-
import { BizTargetSelector, BizEventSelector, convertAttributeData, BizGlobalDataContext } from '@
|
|
8
|
+
import { BizTargetSelector, BizEventSelector, convertAttributeData, BizGlobalDataContext } from '@iofe/business-lib';
|
|
9
9
|
import eventData from '../../mock/event';
|
|
10
|
-
import '@
|
|
10
|
+
import '@iofe/business-lib/es/assets/styles/resetAntd.less';
|
|
11
11
|
var EventDemo = function EventDemo() {
|
|
12
12
|
var store = convertAttributeData({
|
|
13
13
|
eventList: eventData
|