@zgfe/modules-interval 1.0.2 → 1.0.3-alpha.0

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.
@@ -1,6 +1,2 @@
1
- declare const Apis: {
2
- dataList: string;
3
- getEventDataSql: string;
4
- eventDownloadReport: string;
5
- };
1
+ declare const Apis: Record<string, string>;
6
2
  export default Apis;
@@ -1,7 +1,10 @@
1
1
  var Apis = {
2
- // dataList: '/zg/web/v2/data/eventDataList',
3
- dataList: '/zg/web/v2/interval/intervalData',
4
- getEventDataSql: '/zg/web/v2/dataSql/getEventDataSql',
5
- eventDownloadReport: '/zg/web/v2/interval/downLoadintervalData'
2
+ dataList: '/interval/intervalData',
3
+ getEventDataSql: '/dataSql/getEventDataSql',
4
+ eventDownloadReport: '/interval/downLoadintervalData',
5
+ querySubject: '/analysisSubject/queryAllSubject'
6
6
  };
7
+ for (var key in Apis) {
8
+ Apis[key] = "/zg/web/v2".concat(Apis[key]);
9
+ }
7
10
  export default Apis;
@@ -10,11 +10,13 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
10
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
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
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import React, { useState } from 'react';
14
- import { Form, Button } from 'antd';
15
- import { BizAttributeSelector, BizUserGroupHeader } from '@zgfe/business-lib';
13
+ import React, { useContext, useState } from 'react';
14
+ import { Form, Button, Radio } from 'antd';
15
+ import { BizAttributeSelector, BizGlobalDataContext, BizSelect, BizUserGroupHeader, ajax, useChanged } from '@zgfe/business-lib';
16
16
  import EventFilter from "../../components/eventFilter";
17
17
  import "./styles/index.less";
18
+ import { AnalysisMode } from "./types";
19
+ import { Apis } from "../../constants";
18
20
  var classPrefix = 'top-panel-interval';
19
21
  var TopPanel = function TopPanel(props) {
20
22
  var _props$urlParam, _props$urlParam2, _defaultValue$associa, _defaultValue$associa2, _finalSearchData$asso, _finalSearchData$asso2, _defaultValue$associa3, _finalSearchData$asso3, _defaultValue$associa4, _finalSearchData$asso4, _defaultValue$associa5, _finalSearchData$asso5, _defaultValue$associa6, _finalSearchData$asso6, _defaultValue$associa7, _finalSearchData$asso7, _defaultValue$associa8, _finalSearchData$asso8, _defaultValue$associa9, _finalSearchData$asso9, _defaultValue$associa10, _finalSearchData$asso10, _defaultValue$dimensi, _finalSearchData$dime, _defaultValue$dimensi2, _finalSearchData$dime2, _defaultValue$dimensi3, _finalSearchData$dime3, _defaultValue$dimensi4, _finalSearchData$dime4;
@@ -43,6 +45,8 @@ var TopPanel = function TopPanel(props) {
43
45
  _useState8 = _slicedToArray(_useState7, 2),
44
46
  relevancyFl = _useState8[0],
45
47
  setRelevancyFl = _useState8[1];
48
+ var _useContext = useContext(BizGlobalDataContext),
49
+ currentApp = _useContext.currentApp;
46
50
  var _ref = defaultValue,
47
51
  userGroup = _ref.userGroup;
48
52
  // 细分属性初始值
@@ -143,6 +147,14 @@ var TopPanel = function TopPanel(props) {
143
147
  });
144
148
  }
145
149
  };
150
+ useChanged(function () {
151
+ ajax(Apis.querySubject, {
152
+ method: 'post',
153
+ data: {
154
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.id
155
+ }
156
+ });
157
+ }, currentApp === null || currentApp === void 0 ? void 0 : currentApp.id);
146
158
  return /*#__PURE__*/React.createElement(Form, {
147
159
  form: form,
148
160
  component: "div",
@@ -177,6 +189,24 @@ var TopPanel = function TopPanel(props) {
177
189
  scrollToFirstError: true,
178
190
  onValuesChange: onValuesChange
179
191
  }, /*#__PURE__*/React.createElement(Form.Item, {
192
+ label: "\u5206\u6790\u4E3B\u4F53",
193
+ className: "panel-form-interval-item"
194
+ }, /*#__PURE__*/React.createElement(BizSelect, {
195
+ options: [{
196
+ label: '用户',
197
+ value: 'user'
198
+ }, {
199
+ label: '事件属性',
200
+ value: 'eventProp'
201
+ }],
202
+ keyField: "value"
203
+ })), /*#__PURE__*/React.createElement(Form.Item, {
204
+ label: "\u4E3B\u4F53\u540D\u79F0",
205
+ name: "analysisSubject",
206
+ className: "panel-form-interval-item"
207
+ }, /*#__PURE__*/React.createElement(BizSelect, {
208
+ options: []
209
+ })), /*#__PURE__*/React.createElement(Form.Item, {
180
210
  label: "",
181
211
  name: "userGroup",
182
212
  className: "space-item interval-item",
@@ -272,7 +302,15 @@ var TopPanel = function TopPanel(props) {
272
302
  onDelete: function onDelete() {
273
303
  onChangeAttr(undefined, 'dimension');
274
304
  }
275
- })), /*#__PURE__*/React.createElement("div", {
305
+ })), /*#__PURE__*/React.createElement(Form.Item, {
306
+ label: "\u5206\u6790\u6A21\u578B",
307
+ name: "analysisModel",
308
+ className: "panel-form-interval-item"
309
+ }, /*#__PURE__*/React.createElement(Radio.Group, null, /*#__PURE__*/React.createElement(Radio, {
310
+ value: AnalysisMode.common
311
+ }, "\u5E38\u89C4\u95F4\u9694\u5206\u6790"), /*#__PURE__*/React.createElement(Radio, {
312
+ value: AnalysisMode.firstAndLast
313
+ }, "\u9996\u672B\u6B21\u95F4\u9694\u5206\u6790"))), /*#__PURE__*/React.createElement("div", {
276
314
  className: "".concat(classPrefix, "-form-botton-box")
277
315
  }, /*#__PURE__*/React.createElement(Button, {
278
316
  onClick: resetting
@@ -1,5 +1,4 @@
1
- @import '../../../assets/icons/iconfont.css';
2
- @import '../../../assets/business/iconfont.css';
1
+ @import '~@zgfe/business-lib/es/assets/styles/inner.less';
3
2
 
4
3
  .top-panel-interval {
5
4
  &-form-botton-box {
@@ -18,6 +17,28 @@
18
17
  }
19
18
 
20
19
  .panel-form-interval {
20
+ &-item {
21
+ .ant-form-item-label {
22
+ padding-left: 24px;
23
+ font-weight: 500;
24
+ }
25
+ .ant-form-item-control-input-content {
26
+ height: 40px;
27
+ padding: 0 24px;
28
+ line-height: 40px;
29
+ .biz-select-handle {
30
+ display: inline-block;
31
+ width: 208px;
32
+ }
33
+ span.ant-radio + * {
34
+ padding-right: 40px;
35
+ padding-left: 12px;
36
+ }
37
+ &:hover {
38
+ background-color: #e8efff;
39
+ }
40
+ }
41
+ }
21
42
  .interval-item {
22
43
  margin-top: -2px;
23
44
  .ant-space-vertical {
@@ -1,5 +1,9 @@
1
1
  import { AttrConditionTypes } from '@zgfe/business-lib';
2
2
  import { bizAttributeSelectorValueProp, SearchValue } from '../../types';
3
+ export declare enum AnalysisMode {
4
+ common = "commonInterval",
5
+ firstAndLast = "firstLastInterval"
6
+ }
3
7
  export interface start {
4
8
  eventId?: number;
5
9
  id?: number;
@@ -1 +1,5 @@
1
- export {};
1
+ export var AnalysisMode = /*#__PURE__*/function (AnalysisMode) {
2
+ AnalysisMode["common"] = "commonInterval";
3
+ AnalysisMode["firstAndLast"] = "firstLastInterval";
4
+ return AnalysisMode;
5
+ }({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-interval",
3
- "version": "1.0.2",
3
+ "version": "1.0.3-alpha.0",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -9,12 +9,16 @@
9
9
  "deploy": "npm run docs:build && npm run docs:deploy",
10
10
  "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
11
11
  "test": "umi-test",
12
+ "pub": "lerna publish",
12
13
  "test:coverage": "umi-test --coverage",
13
14
  "prepublishOnly": "npm run build"
14
15
  },
15
16
  "files": [
16
17
  "dist"
17
18
  ],
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
18
22
  "module": "dist/esm/index.js",
19
23
  "typings": "dist/esm/index.d.ts",
20
24
  "gitHooks": {
@@ -43,7 +47,7 @@
43
47
  "@types/uuid": "^9.0.2",
44
48
  "@umijs/fabric": "^2.8.1",
45
49
  "@umijs/test": "^3.0.5",
46
- "@zgfe/business-lib": "1.1.84-panel.6",
50
+ "@zgfe/business-lib": "^1.1.88",
47
51
  "@zgfe/modules-demo-manage": "^1.0.1",
48
52
  "antd": "^4.22.6",
49
53
  "dumi": "^1.1.0",
@@ -51,11 +55,12 @@
51
55
  "echarts-for-react": "^3.0.2",
52
56
  "father-build": "^1.17.2",
53
57
  "gh-pages": "^3.0.0",
54
- "lerna": "^5.1.7",
58
+ "lerna": "5.1.8",
55
59
  "lint-staged": "^10.0.7",
56
60
  "lodash": "^4.17.21",
57
61
  "prettier": "^2.2.1",
58
62
  "umi-request": "^1.4.0",
59
63
  "yorkie": "^2.0.0"
60
- }
64
+ },
65
+ "gitHead": "728b3ca2a91011150266aed6e52bcae3ec9962de"
61
66
  }