@zgfe/business-lib 1.2.38 → 1.2.39
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/es/AUMFormulaTarget/components/formula/util.d.ts +2 -1
- package/es/AUMFormulaTarget/components/formula/util.js +2 -2
- package/es/AUMFormulaTarget/components/formulaItem/index.js +3 -2
- package/es/AUMFormulaTarget/components/panel/cdpCshCondition.js +25 -32
- package/es/AUMFormulaTarget/components/panel/index.js +3 -2
- package/es/AUMFormulaTarget/components/panel/types.d.ts +1 -0
- package/es/attrConditions/components/operateList.js +19 -7
- package/es/attrConditions/utils/operates.d.ts +8 -0
- package/es/attrConditions/utils/operates.js +27 -7
- package/es/attributeSelector/listPanel.js +4 -3
- package/es/constants/apis.d.ts +3 -0
- package/es/constants/apis.js +4 -1
- package/es/constants/common.d.ts +2 -2
- package/es/constants/common.js +43 -39
- package/es/context/index.d.ts +19 -5
- package/es/dataSetGroup/index.js +8 -16
- package/es/dataSetGroup/overlay.js +8 -5
- package/es/dataSetGroup/types.d.ts +1 -0
- package/es/demoWrapper/content.d.ts +2 -0
- package/es/demoWrapper/content.js +28 -11
- package/es/demoWrapper/demo/index.js +15 -2
- package/es/demoWrapper/index.js +78 -14
- package/es/eventSelector/index.js +3 -2
- package/es/eventSelector/listPanel.js +5 -4
- package/es/formulaTarget/components/formula/util.d.ts +2 -1
- package/es/formulaTarget/components/formula/util.js +2 -2
- package/es/formulaTarget/components/formulaItem/index.js +3 -2
- package/es/formulaTarget/components/panel/index.js +3 -2
- package/es/hooks/useBizStore.d.ts +8 -4
- package/es/hooks/useBizStore.js +129 -45
- package/es/hooks/useSubject.js +17 -4
- package/es/productCondition/conditions/cdpCshCondition.js +27 -27
- package/es/productCondition/conditions/textDesc.js +0 -3
- package/es/productCondition/index.js +3 -5
- package/es/productCondition/orConditions.js +0 -1
- package/es/productCondition/types.d.ts +4 -0
- package/es/targetConditionGroup/components/targetDimension.js +7 -5
- package/es/targetConditionGroup/data/operates.d.ts +1 -13
- package/es/targetConditionGroup/data/operates.js +10 -37
- package/es/targetConditionGroup/index.js +3 -2
- package/es/userCondition/conditionTypeList.js +4 -4
- package/es/userCondition/conditions/cdpCondition.js +21 -22
- package/es/userCondition/conditions/cdpCshCondition.js +31 -29
- package/es/userCondition/conditions/tagsCondition.js +4 -1
- package/es/userCondition/demo/index.js +1 -1
- package/es/userCondition/index.js +42 -53
- package/es/userCondition/types.d.ts +5 -0
- package/es/userGroup/index.js +0 -1
- package/es/userGroup/overlay.js +1 -3
- package/es/userGroup/styles/index.less +0 -1
- package/es/utils/util.d.ts +1 -0
- package/es/utils/util.js +9 -0
- package/package.json +2 -2
- package/es/demoWrapper/head.d.ts +0 -9
- package/es/demoWrapper/head.js +0 -67
package/es/demoWrapper/head.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
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(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
|
-
import { Select, Skeleton, message } from 'antd';
|
|
8
|
-
import React, { useEffect, useState } from 'react';
|
|
9
|
-
import request from '../utils/ajax';
|
|
10
|
-
var DemoHeader = function DemoHeader(_ref) {
|
|
11
|
-
var defaultApp = _ref.defaultApp,
|
|
12
|
-
onChangeApp = _ref.onChangeApp,
|
|
13
|
-
onLoading = _ref.onLoading,
|
|
14
|
-
onLogin = _ref.onLogin;
|
|
15
|
-
var _useState = useState([]),
|
|
16
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
17
|
-
appList = _useState2[0],
|
|
18
|
-
setAppList = _useState2[1];
|
|
19
|
-
var _useState3 = useState(true),
|
|
20
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
21
|
-
loading = _useState4[0],
|
|
22
|
-
setLoading = _useState4[1];
|
|
23
|
-
useEffect(function () {
|
|
24
|
-
queryAppList();
|
|
25
|
-
}, []);
|
|
26
|
-
useEffect(function () {
|
|
27
|
-
if (onLoading) onLoading(loading);
|
|
28
|
-
}, [loading, appList]);
|
|
29
|
-
function queryAppList() {
|
|
30
|
-
setLoading(true);
|
|
31
|
-
request('/zg/web/v2/data/v2ajaxGetDataByApp').then(function (res) {
|
|
32
|
-
if (!res.data) {
|
|
33
|
-
message.error('获取应用列表失败,请重新登录');
|
|
34
|
-
onLogin && onLogin();
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
setAppList(res.data.appList);
|
|
38
|
-
if (defaultApp) {
|
|
39
|
-
_onChange(res.data.appList.find(function (item) {
|
|
40
|
-
return item.id === defaultApp;
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
if (!defaultApp && res.data.appList.length) _onChange(res.data.appList[0]);
|
|
44
|
-
}).finally(function () {
|
|
45
|
-
setLoading(false);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
function _onChange(item) {
|
|
49
|
-
if (onChangeApp) onChangeApp(item);
|
|
50
|
-
}
|
|
51
|
-
if (loading) return /*#__PURE__*/React.createElement(Skeleton.Input, null);
|
|
52
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, {
|
|
53
|
-
defaultValue: defaultApp || appList[0].id,
|
|
54
|
-
options: appList,
|
|
55
|
-
fieldNames: {
|
|
56
|
-
label: 'appName',
|
|
57
|
-
value: 'id'
|
|
58
|
-
},
|
|
59
|
-
onChange: function onChange(_id, app) {
|
|
60
|
-
_onChange(app);
|
|
61
|
-
},
|
|
62
|
-
style: {
|
|
63
|
-
width: '200px'
|
|
64
|
-
}
|
|
65
|
-
}));
|
|
66
|
-
};
|
|
67
|
-
export default DemoHeader;
|