@zgfe/modules-dm 1.0.57-zhongyuan.80 → 1.0.57-zhongyuan.82
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/modules/dataManage/collectionAttributeList.js +7 -20
- package/es/modules/dataManage/collectionEventList.js +3 -1
- package/es/modules/dataManage/components/createMetaDrawer.js +3 -1
- package/es/modules/dataManage/components/tablePlus.js +10 -5
- package/es/utils/index.d.ts +2 -0
- package/es/utils/index.js +20 -1
- package/package.json +2 -2
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
3
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
5
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
2
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
8
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -6,14 +10,10 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
6
10
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
11
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
12
|
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 _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
11
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
12
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
13
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
15
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
16
14
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
16
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
17
17
|
import { BizGlobalDataContext, IconFont, ajax } from '@zgfe/business-lib';
|
|
18
18
|
import { Input, Button, Select, Table, message, Modal, Upload, Popover, Checkbox, notification } from 'antd';
|
|
19
19
|
import React, { useEffect, useState, useContext } from 'react';
|
|
@@ -21,7 +21,7 @@ import './styles/index.less';
|
|
|
21
21
|
import request from '../../utils/ajax';
|
|
22
22
|
import apis from '../../constants/api';
|
|
23
23
|
import { DmContext } from '../../store';
|
|
24
|
-
import { getAppID, getTableScroll } from '../../utils';
|
|
24
|
+
import { getAppID, getTableScroll, ownerWhiteListDataList, eventWhiteList } from '../../utils';
|
|
25
25
|
import CreateAttrDrawer from './components/createAttrDrawer';
|
|
26
26
|
import ImportModal from './components/importAttrDialog';
|
|
27
27
|
import DelConfirm from './components/deleteUserAttrConfirm';
|
|
@@ -29,19 +29,6 @@ import BizEditText from './components/editTxt';
|
|
|
29
29
|
import _ from 'lodash';
|
|
30
30
|
import moment from 'moment';
|
|
31
31
|
import UseModal from '../CutsModal';
|
|
32
|
-
// 内置属性白名单
|
|
33
|
-
var ownerWhiteList = [{
|
|
34
|
-
dt: 'evt',
|
|
35
|
-
pr: ['ct', 'tz', 'an', 'vn', 'cr', 'cn', 'os', 'ov', 'mnet', 'net', 'dru', 'cuid', 'sid', 'ref', 'eid', 'referrer_domain', 'utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term']
|
|
36
|
-
}, {
|
|
37
|
-
dt: 'abp',
|
|
38
|
-
pr: ['ct', 'tz', 'sid', 'vn', 'cuid', 'url', 'ref', 'referrer_domain', 'cr', 'net', 'vn', 'ov', 'os', 'an', 'cn', 'mnet', 'scroll', 'dr', 'page_url', 'page_title', 'landing_page', 'title', 'share_level', 'uid', 'share_id', 'path', 'productID', 'revenueType', 'price', 'total', 'productQuantity', 'element_id', 'element_content', 'element_type', 'element_style', 'element_selector', 'eid']
|
|
39
|
-
}];
|
|
40
|
-
//事件名称(包含:pv(⻚⾯访问)、click(⻚⾯点击)、scroll(滚动)、dr(⻚⾯停留时⻓)、wxsopen(分享打开)、wxshare(微信分享)、revenue(收⼊))
|
|
41
|
-
var eventWhiteList = ['pv', 'click', 'scroll', 'dr', 'wxsopen', 'wxshare', 'revenue'];
|
|
42
|
-
var ownerWhiteListDataList = ownerWhiteList.map(function (item) {
|
|
43
|
-
return _toConsumableArray(item.pr);
|
|
44
|
-
}).flat();
|
|
45
32
|
var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
46
33
|
var classPrefix = 'attr-list';
|
|
47
34
|
var _useContext = useContext(BizGlobalDataContext),
|
|
@@ -494,7 +494,9 @@ var TablePlus = function TablePlus(props) {
|
|
|
494
494
|
_useState28 = _slicedToArray(_useState27, 2),
|
|
495
495
|
currentRow = _useState28[0],
|
|
496
496
|
setCurrentRow = _useState28[1];
|
|
497
|
-
var _useState29 = useState([
|
|
497
|
+
var _useState29 = useState([
|
|
498
|
+
// { label: 'Unknown', value: '0' },
|
|
499
|
+
{
|
|
498
500
|
label: 'JS',
|
|
499
501
|
value: '3'
|
|
500
502
|
}, {
|
|
@@ -865,26 +867,29 @@ var TablePlus = function TablePlus(props) {
|
|
|
865
867
|
key: 'plats',
|
|
866
868
|
width: 260,
|
|
867
869
|
render: function render(text, record) {
|
|
870
|
+
var arr = text ? text.filter(function (o) {
|
|
871
|
+
return o != 0;
|
|
872
|
+
}) : [];
|
|
868
873
|
return /*#__PURE__*/React.createElement("div", {
|
|
869
874
|
className: "event_attrs"
|
|
870
|
-
},
|
|
875
|
+
}, arr && (arr.length <= 3 ? arr.map(function (item, index) {
|
|
871
876
|
var _maidianList$find2;
|
|
872
877
|
return /*#__PURE__*/React.createElement(Tag, {
|
|
873
878
|
key: index
|
|
874
879
|
}, (_maidianList$find2 = maidianList.find(function (obj) {
|
|
875
880
|
return obj.value == item + '';
|
|
876
881
|
})) === null || _maidianList$find2 === void 0 ? void 0 : _maidianList$find2.label);
|
|
877
|
-
}) :
|
|
882
|
+
}) : arr.slice(0, 3).map(function (item, index) {
|
|
878
883
|
var _maidianList$find3;
|
|
879
884
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
880
885
|
placement: "top",
|
|
881
|
-
title: getName(
|
|
886
|
+
title: getName(arr.join()).join()
|
|
882
887
|
}, /*#__PURE__*/React.createElement(Tag, {
|
|
883
888
|
key: index
|
|
884
889
|
}, (_maidianList$find3 = maidianList.find(function (obj) {
|
|
885
890
|
return obj.value == item + '';
|
|
886
891
|
})) === null || _maidianList$find3 === void 0 ? void 0 : _maidianList$find3.label)));
|
|
887
|
-
})),
|
|
892
|
+
})), arr && arr.length > 3 && /*#__PURE__*/React.createElement("span", null, "..."));
|
|
888
893
|
}
|
|
889
894
|
}, {
|
|
890
895
|
title: '预期埋点平台',
|
package/es/utils/index.d.ts
CHANGED
|
@@ -57,3 +57,5 @@ export declare const nullToEmptyString: (data: any) => any;
|
|
|
57
57
|
*/
|
|
58
58
|
export declare function getTableScroll(extraHeight?: any, id?: any): string;
|
|
59
59
|
export declare const guid: () => string;
|
|
60
|
+
export declare const eventWhiteList: string[];
|
|
61
|
+
export declare const ownerWhiteListDataList: string[];
|
package/es/utils/index.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
5
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
6
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
1
7
|
/**随机id */
|
|
2
8
|
export var generateUniqueId = function generateUniqueId() {
|
|
3
9
|
// 时间戳(毫秒级,确保随时间递增)
|
|
@@ -364,4 +370,17 @@ export var guid = function guid() {
|
|
|
364
370
|
return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
|
|
365
371
|
}
|
|
366
372
|
return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
|
|
367
|
-
};
|
|
373
|
+
};
|
|
374
|
+
// 内置属性白名单
|
|
375
|
+
var ownerWhiteList = [{
|
|
376
|
+
dt: 'evt',
|
|
377
|
+
pr: ['ct', 'tz', 'an', 'vn', 'cr', 'cn', 'os', 'ov', 'mnet', 'net', 'dru', 'cuid', 'sid', 'ref', 'eid', 'referrer_domain', 'utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term']
|
|
378
|
+
}, {
|
|
379
|
+
dt: 'abp',
|
|
380
|
+
pr: ['ct', 'tz', 'sid', 'vn', 'cuid', 'url', 'ref', 'referrer_domain', 'cr', 'net', 'vn', 'ov', 'os', 'an', 'cn', 'mnet', 'scroll', 'dr', 'page_url', 'page_title', 'landing_page', 'title', 'share_level', 'uid', 'share_id', 'path', 'productID', 'revenueType', 'price', 'total', 'productQuantity', 'element_id', 'element_content', 'element_type', 'element_style', 'element_selector', 'eid']
|
|
381
|
+
}];
|
|
382
|
+
//事件名称(包含:pv(⻚⾯访问)、click(⻚⾯点击)、scroll(滚动)、dr(⻚⾯停留时⻓)、wxsopen(分享打开)、wxshare(微信分享)、revenue(收⼊))
|
|
383
|
+
export var eventWhiteList = ['pv', 'click', 'scroll', 'dr', 'wxsopen', 'wxshare', 'revenue'];
|
|
384
|
+
export var ownerWhiteListDataList = ownerWhiteList.map(function (item) {
|
|
385
|
+
return _toConsumableArray(item.pr);
|
|
386
|
+
}).flat();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-dm",
|
|
3
|
-
"version": "1.0.57-zhongyuan.
|
|
3
|
+
"version": "1.0.57-zhongyuan.82",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"typings": "es/index.d.ts",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"umi-request": "^1.4.0",
|
|
58
58
|
"yorkie": "^2.0.0"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "9bc823b835e5613e4da0aadfaf4ffefd6fb02184",
|
|
61
61
|
"gitHooks": {
|
|
62
62
|
"pre-commit": "lint-staged"
|
|
63
63
|
}
|