@zgfe/modules-dm 1.0.57-zhongyuan.80 → 1.0.57-zhongyuan.81
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 +7 -2
- package/es/modules/dataManage/components/createMetaDrawer.js +3 -0
- package/es/modules/dataManage/components/tablePlus.js +3 -0
- 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),
|
|
@@ -105,6 +105,9 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
105
105
|
var _useState27 = useState([{
|
|
106
106
|
label: '全部埋点平台',
|
|
107
107
|
value: -1
|
|
108
|
+
}, {
|
|
109
|
+
label: 'Unknown',
|
|
110
|
+
value: 0
|
|
108
111
|
}, {
|
|
109
112
|
label: 'JS',
|
|
110
113
|
value: 3
|
|
@@ -450,8 +453,10 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
450
453
|
if (_renderData && _renderData.length > 0 && _renderData[0].groupId == undefined) {
|
|
451
454
|
_renderData.map(function (item) {
|
|
452
455
|
groupData.map(function (_item) {
|
|
453
|
-
|
|
454
|
-
|
|
456
|
+
var _item$_groupId;
|
|
457
|
+
if (_item.groupId === item._groupId && _tempGroupIdList.indexOf((_item$_groupId = item._groupId) !== null && _item$_groupId !== void 0 ? _item$_groupId : _item.groupId) === -1) {
|
|
458
|
+
var _item$_groupId2;
|
|
459
|
+
_tempGroupIdList.push((_item$_groupId2 = item._groupId) !== null && _item$_groupId2 !== void 0 ? _item$_groupId2 : _item.groupId);
|
|
455
460
|
_tempRenderData.push(_item);
|
|
456
461
|
}
|
|
457
462
|
});
|
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.81",
|
|
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": "f1e41104a179e948fa261bef89c3120f64e8eb22",
|
|
61
61
|
"gitHooks": {
|
|
62
62
|
"pre-commit": "lint-staged"
|
|
63
63
|
}
|