@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,18 +1,15 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
var
|
|
3
|
-
function
|
|
4
|
-
function
|
|
5
|
-
function
|
|
6
|
-
function
|
|
7
|
-
function
|
|
8
|
-
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
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(); }
|
|
9
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."); }
|
|
10
|
-
function _unsupportedIterableToArray(
|
|
11
|
-
function _arrayLikeToArray(
|
|
12
|
-
function _iterableToArrayLimit(
|
|
13
|
-
function _arrayWithHoles(
|
|
14
|
-
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; }
|
|
15
|
-
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; }
|
|
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; }
|
|
16
13
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
17
14
|
import './styles/index.less';
|
|
18
15
|
import { Dropdown } from 'antd';
|
|
@@ -21,20 +18,9 @@ import { BizGlobalDataContext } from '..';
|
|
|
21
18
|
import SelectHandle from '../select/handle';
|
|
22
19
|
import BizTargetOptionIcon from '../targetSelector/optionIcon';
|
|
23
20
|
import _ from 'lodash';
|
|
24
|
-
var BizAttributeSelector = function BizAttributeSelector(
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
_ref$propSymbol = _ref.propSymbol,
|
|
28
|
-
propSymbol = _ref$propSymbol === void 0 ? '*' : _ref$propSymbol,
|
|
29
|
-
_ref$optionsHeaderTip = _ref.optionsHeaderTip,
|
|
30
|
-
optionsHeaderTip = _ref$optionsHeaderTip === void 0 ? '带*的属性每日凌晨更新' : _ref$optionsHeaderTip,
|
|
31
|
-
_ref$destroyPopupOnHi = _ref.destroyPopupOnHide,
|
|
32
|
-
destroyPopupOnHide = _ref$destroyPopupOnHi === void 0 ? false : _ref$destroyPopupOnHi,
|
|
33
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
-
var _props$enableDelete = props.enableDelete,
|
|
35
|
-
enableDelete = _props$enableDelete === void 0 ? false : _props$enableDelete,
|
|
36
|
-
_props$placeholder = props.placeholder,
|
|
37
|
-
placeholder = _props$placeholder === void 0 ? '请选择' : _props$placeholder,
|
|
21
|
+
var BizAttributeSelector = function BizAttributeSelector(props) {
|
|
22
|
+
var enableDelete = props.enableDelete,
|
|
23
|
+
placeholder = props.placeholder,
|
|
38
24
|
theme = props.theme,
|
|
39
25
|
extra = props.extra,
|
|
40
26
|
extraUser = props.extraUser,
|
|
@@ -57,6 +43,7 @@ var BizAttributeSelector = function BizAttributeSelector(_ref) {
|
|
|
57
43
|
_useState6 = _slicedToArray(_useState5, 1),
|
|
58
44
|
id = _useState6[0];
|
|
59
45
|
var _useContext = useContext(BizGlobalDataContext),
|
|
46
|
+
eventGroupList = _useContext.eventGroupList,
|
|
60
47
|
userPropList = _useContext.userPropList,
|
|
61
48
|
eventEnvList = _useContext.eventEnvList;
|
|
62
49
|
var boxRef = useRef(null);
|
|
@@ -70,7 +57,6 @@ var BizAttributeSelector = function BizAttributeSelector(_ref) {
|
|
|
70
57
|
setCurrentAttr(getValue(props.defaultValue));
|
|
71
58
|
}, []);
|
|
72
59
|
useEffect(function () {
|
|
73
|
-
if (props.value && !getValue(props.value)) return;
|
|
74
60
|
setCurrentAttr(getValue(props.value));
|
|
75
61
|
}, [props.value, props.extra]);
|
|
76
62
|
function getValue(param) {
|
|
@@ -80,12 +66,14 @@ var BizAttributeSelector = function BizAttributeSelector(_ref) {
|
|
|
80
66
|
if (attr.id === param.id && attr.name === (param.name || param.value)) res = attr;
|
|
81
67
|
});
|
|
82
68
|
} else if ((param === null || param === void 0 ? void 0 : param.propCategory) === 'eventProp') {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
69
|
+
eventGroupList === null || eventGroupList === void 0 ? void 0 : eventGroupList.forEach(function (group) {
|
|
70
|
+
group.eventList.forEach(function (event) {
|
|
71
|
+
event.attrList.forEach(function (attr) {
|
|
72
|
+
if (attr.id === param.id) res = _.cloneDeep(attr);
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
if (res && param.step !== undefined) res.step = param.step;
|
|
89
77
|
} else if ((param === null || param === void 0 ? void 0 : param.propCategory) === 'userProp') {
|
|
90
78
|
var _concat;
|
|
91
79
|
(_concat = (extraUser ? extraUser : []).concat(userPropList ? userPropList : [])) === null || _concat === void 0 ? void 0 : _concat.forEach(function (attr) {
|
|
@@ -136,7 +124,7 @@ var BizAttributeSelector = function BizAttributeSelector(_ref) {
|
|
|
136
124
|
},
|
|
137
125
|
open: visible,
|
|
138
126
|
onOpenChange: onVisibleChange,
|
|
139
|
-
destroyPopupOnHide: destroyPopupOnHide
|
|
127
|
+
destroyPopupOnHide: props.destroyPopupOnHide
|
|
140
128
|
}, /*#__PURE__*/React.createElement("div", {
|
|
141
129
|
style: {
|
|
142
130
|
width: '100%'
|
|
@@ -144,17 +132,25 @@ var BizAttributeSelector = function BizAttributeSelector(_ref) {
|
|
|
144
132
|
}, /*#__PURE__*/React.createElement(SelectHandle, {
|
|
145
133
|
ref: boxRef,
|
|
146
134
|
theme: theme,
|
|
147
|
-
size: size,
|
|
135
|
+
size: props.size,
|
|
148
136
|
label: (currentAttr === null || currentAttr === void 0 ? void 0 : currentAttr.alias) || (currentAttr === null || currentAttr === void 0 ? void 0 : currentAttr.label),
|
|
149
137
|
placeholder: placeholder,
|
|
150
138
|
status: props.status,
|
|
151
139
|
open: visible
|
|
152
|
-
}))), enableDelete ?
|
|
140
|
+
}))), enableDelete ? /*#__PURE__*/React.createElement(BizTargetOptionIcon, {
|
|
153
141
|
name: "delete",
|
|
154
142
|
icon: "qingchu",
|
|
155
143
|
title: "\u5220\u9664",
|
|
156
144
|
enabled: enableDelete,
|
|
157
145
|
onClick: onDelete
|
|
158
|
-
})
|
|
146
|
+
}) : null));
|
|
147
|
+
};
|
|
148
|
+
BizAttributeSelector.defaultProps = {
|
|
149
|
+
enableDelete: false,
|
|
150
|
+
placeholder: '请选择',
|
|
151
|
+
size: 'middle',
|
|
152
|
+
propSymbol: '*',
|
|
153
|
+
optionsHeaderTip: '带*的属性每日凌晨更新',
|
|
154
|
+
destroyPopupOnHide: false
|
|
159
155
|
};
|
|
160
156
|
export default BizAttributeSelector;
|