@zgfe/business-lib 1.1.37-insight.0 → 1.1.37

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.
Files changed (48) hide show
  1. package/es/addToPanel/components/styleList.js +1 -1
  2. package/es/addToPanel/demo/edit.js +32 -0
  3. package/es/addToPanel/demo/index.js +32 -1
  4. package/es/addToPanel/index.js +21 -22
  5. package/es/addToPanel/types.d.ts +3 -3
  6. package/es/constants/apis.d.ts +0 -2
  7. package/es/constants/apis.js +0 -2
  8. package/es/constants/common.d.ts +0 -29
  9. package/es/constants/common.js +1 -38
  10. package/es/index.d.ts +1 -3
  11. package/es/index.js +1 -3
  12. package/es/select/overlay.js +3 -2
  13. package/es/userCondition/conditions/business/operatorCondition.js +3 -5
  14. package/es/userCondition/conditions/businessCondition.js +0 -6
  15. package/es/userCondition/conditions/dataAttribute.js +2 -9
  16. package/package.json +2 -2
  17. package/es/layout/optionTitle/components/btnMenu/api.d.ts +0 -4
  18. package/es/layout/optionTitle/components/btnMenu/api.js +0 -7
  19. package/es/layout/optionTitle/components/btnMenu/demo.d.ts +0 -2
  20. package/es/layout/optionTitle/components/btnMenu/demo.js +0 -80
  21. package/es/layout/optionTitle/components/btnMenu/index.d.ts +0 -5
  22. package/es/layout/optionTitle/components/btnMenu/index.js +0 -48
  23. package/es/layout/optionTitle/components/btnMenu/index.less +0 -18
  24. package/es/layout/optionTitle/components/title/demo.d.ts +0 -2
  25. package/es/layout/optionTitle/components/title/demo.js +0 -50
  26. package/es/layout/optionTitle/components/title/index.d.ts +0 -5
  27. package/es/layout/optionTitle/components/title/index.js +0 -106
  28. package/es/layout/optionTitle/components/title/index.less +0 -42
  29. package/es/layout/optionTitle/data.d.ts +0 -3
  30. package/es/layout/optionTitle/data.js +0 -77
  31. package/es/layout/optionTitle/demo/index.d.ts +0 -2
  32. package/es/layout/optionTitle/demo/index.js +0 -84
  33. package/es/layout/optionTitle/demo/index.less +0 -12
  34. package/es/layout/optionTitle/demo/layout.d.ts +0 -3
  35. package/es/layout/optionTitle/demo/layout.js +0 -41
  36. package/es/layout/optionTitle/demo/panelCreate.d.ts +0 -2
  37. package/es/layout/optionTitle/demo/panelCreate.js +0 -82
  38. package/es/layout/optionTitle/index.d.ts +0 -6
  39. package/es/layout/optionTitle/index.js +0 -154
  40. package/es/layout/optionTitle/layout.d.ts +0 -5
  41. package/es/layout/optionTitle/layout.js +0 -38
  42. package/es/layout/optionTitle/styles/index.less +0 -19
  43. package/es/layout/optionTitle/styles/layout.less +0 -43
  44. package/es/layout/optionTitle/styles/search.less +0 -27
  45. package/es/layout/optionTitle/types.d.ts +0 -83
  46. package/es/layout/optionTitle/types.js +0 -15
  47. package/es/layout/optionTitle/typesValue.d.ts +0 -4
  48. package/es/layout/optionTitle/typesValue.js +0 -7
@@ -57,7 +57,7 @@ var StyleList = function StyleList(props) {
57
57
  key: item.value,
58
58
  placement: "top",
59
59
  disabled: item.disabled || !item.children,
60
- dropdownRender: function dropdownRender() {
60
+ overlay: function overlay() {
61
61
  return ChildList(item);
62
62
  }
63
63
  }, /*#__PURE__*/React.createElement("div", {
@@ -7,6 +7,37 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { useState } from 'react';
8
8
  import { BizAddToPanel } from '@zgfe/business-lib';
9
9
  import { Button } from 'antd';
10
+ var chartTypes = [{
11
+ label: '趋势图',
12
+ value: 'line',
13
+ icon: 'qushitu1'
14
+ }, {
15
+ label: '汇总图',
16
+ value: 'bar',
17
+ icon: 'huizongtu'
18
+ }, {
19
+ label: '地图',
20
+ value: 'map',
21
+ icon: 'ditu',
22
+ disabled: true
23
+ }, {
24
+ label: '表格',
25
+ value: 'table',
26
+ icon: 'biaoge',
27
+ children: [{
28
+ label: '趋势图',
29
+ value: 'line',
30
+ icon: 'qushitu1'
31
+ }, {
32
+ label: '汇总图',
33
+ value: 'bar',
34
+ icon: 'huizongtu'
35
+ }]
36
+ }, {
37
+ label: '分数',
38
+ value: 'fraction',
39
+ icon: 'fenshu'
40
+ }];
10
41
  var defaultValue = {
11
42
  panel: {
12
43
  id: 52397,
@@ -31,6 +62,7 @@ export default (function () {
31
62
  type: "edit",
32
63
  params: {},
33
64
  elementId: 1,
65
+ styleOptions: chartTypes,
34
66
  onCancel: function onCancel() {
35
67
  setShowDialog(false);
36
68
  },
@@ -7,6 +7,37 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { useState } from 'react';
8
8
  import { BizAddToPanel } from '@zgfe/business-lib';
9
9
  import { Button } from 'antd';
10
+ var chartTypes = [{
11
+ label: '趋势图',
12
+ value: 'line',
13
+ icon: 'qushitu1'
14
+ }, {
15
+ label: '汇总图',
16
+ value: 'bar',
17
+ icon: 'huizongtu'
18
+ }, {
19
+ label: '地图',
20
+ value: 'map',
21
+ icon: 'ditu',
22
+ disabled: true
23
+ }, {
24
+ label: '表格',
25
+ value: 'table',
26
+ icon: 'biaoge',
27
+ children: [{
28
+ label: '趋势图',
29
+ value: 'line',
30
+ icon: 'qushitu1'
31
+ }, {
32
+ label: '汇总图',
33
+ value: 'bar',
34
+ icon: 'huizongtu'
35
+ }]
36
+ }, {
37
+ label: '分数',
38
+ value: 'fraction',
39
+ icon: 'fenshu'
40
+ }];
10
41
  var defaultValue = {
11
42
  panel: {
12
43
  id: 52397,
@@ -29,7 +60,7 @@ export default (function () {
29
60
  }, "\u6DFB\u52A0\u5230\u770B\u677F"), showDialog && /*#__PURE__*/React.createElement(BizAddToPanel, {
30
61
  defaultValue: defaultValue,
31
62
  params: {},
32
- showMap: true,
63
+ styleOptions: chartTypes,
33
64
  onCancel: function onCancel() {
34
65
  setShowDialog(false);
35
66
  },
@@ -23,7 +23,6 @@ import request from '../utils/ajax';
23
23
  import Apis from '../constants/apis';
24
24
  import BizGlobalDataContext from '../context';
25
25
  import _ from 'lodash';
26
- import { chartTypes } from '../constants/common';
27
26
  export var classPrefix = 'biz-addtopanel';
28
27
  var BizAddToPanel = function BizAddToPanel(props) {
29
28
  var refForm = useRef();
@@ -44,20 +43,8 @@ var BizAddToPanel = function BizAddToPanel(props) {
44
43
  router = _useContext.router,
45
44
  routes = _useContext.routes,
46
45
  isDemo = _useContext.isDemo;
47
- var _useState7 = useState(chartTypes),
48
- _useState8 = _slicedToArray(_useState7, 2),
49
- styleOptions = _useState8[0],
50
- setStyleOptions = _useState8[1];
51
46
  useEffect(function () {
52
47
  queryGroups();
53
- if (props.showMap) {
54
- setStyleOptions(function () {
55
- var styleData = _.cloneDeep(chartTypes);
56
- styleData[2].children[2].disabled = false;
57
- styleData[3].disabled = false;
58
- return styleData;
59
- });
60
- }
61
48
  }, []);
62
49
  function queryGroups() {
63
50
  request(Apis.queryPanelGroup, {
@@ -103,17 +90,23 @@ var BizAddToPanel = function BizAddToPanel(props) {
103
90
  data: searchParam,
104
91
  chosen_data: form.showList && form.showList === 'dynamic' ? [] : props.showList
105
92
  };
106
- var data = {
107
- name: form.name,
108
- panel_id: form.panel.id,
109
- web_data: JSON.stringify(resData)
110
- };
111
- var url = Apis.updatePanelTarget,
93
+ var data = {},
94
+ url = Apis.updatePanelTarget,
112
95
  msgType = '保存';
113
96
  if (props.type === 'edit') {
114
- data.element_id = props.elementId;
97
+ data = {
98
+ name: form.name,
99
+ panel_id: form.panel.id,
100
+ element_id: props.elementId,
101
+ web_data: JSON.stringify(resData)
102
+ };
115
103
  } else {
116
- data.mobile_data = JSON.stringify(resData);
104
+ data = {
105
+ name: form.name,
106
+ panel_id: form.panel.id,
107
+ web_data: JSON.stringify(resData),
108
+ mobile_data: JSON.stringify(resData)
109
+ };
117
110
  if (form.panel.id === 0) {
118
111
  data.app_id = currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId;
119
112
  data.platform = (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0;
@@ -222,6 +215,12 @@ var BizAddToPanel = function BizAddToPanel(props) {
222
215
  hidden: props.type === 'edit',
223
216
  rules: [{
224
217
  validator: function validator(_, value) {
218
+ if (props.type === 'edit') {
219
+ notification.error({
220
+ message: '指标名称不能为空'
221
+ });
222
+ return Promise.reject();
223
+ }
225
224
  if (!value || !/\S+/.test(value)) return Promise.reject('请输入指标名称!');
226
225
  if (!/^[\S\s]{1,20}$/.test(value)) return Promise.reject('指标名称最多为20个字符!');
227
226
  return Promise.resolve();
@@ -243,7 +242,7 @@ var BizAddToPanel = function BizAddToPanel(props) {
243
242
  message: '请选择样式'
244
243
  }]
245
244
  }, /*#__PURE__*/React.createElement(StyleList, {
246
- options: styleOptions
245
+ options: props.styleOptions
247
246
  })), /*#__PURE__*/React.createElement(Form.Item, {
248
247
  noStyle: true,
249
248
  shouldUpdate: true
@@ -12,17 +12,17 @@ declare namespace AddToPanel {
12
12
  defaultValue?: Value;
13
13
  params: Record<string, any>;
14
14
  type?: string;
15
+ styleOptions: TabItem[];
15
16
  showOptions?: Option[];
16
17
  showList?: string[];
17
18
  elementId?: number;
18
- showMap?: boolean;
19
19
  onOk?: (responseData: any) => void;
20
20
  onCancel?: () => void;
21
21
  }
22
22
  interface PanelValue {
23
23
  id: number;
24
- name?: string;
25
- open_type?: number;
24
+ name: string;
25
+ open_type: number;
26
26
  }
27
27
  export interface Value {
28
28
  panel: PanelValue;
@@ -8,8 +8,6 @@ declare const Apis: {
8
8
  queryDatasetList: string;
9
9
  queryDatasetDetail: string;
10
10
  getSocketToken: string;
11
- delPanelElement: string;
12
- updateElementName: string;
13
11
  bizDataTypeList: string;
14
12
  orderAttributeMaster: string;
15
13
  orderAttributeSon: string;
@@ -8,8 +8,6 @@ var Apis = {
8
8
  queryDatasetList: '/zg/web/cdp/inner/dataset/list',
9
9
  queryDatasetDetail: '/zg/web/cdp/inner/dataset/detail',
10
10
  getSocketToken: '/zg/web/v2/tracking/view/websocket/token',
11
- delPanelElement: '/apppanel/delPanelElement.jsp',
12
- updateElementName: '/apppanel/updateElementName.jsp',
13
11
  bizDataTypeList: '/cep-console/api/v1/bizdata/type/list',
14
12
  orderAttributeMaster: '/cep-console/api/v1/cdp/orderAttribute/master',
15
13
  orderAttributeSon: '/cep-console/api/v1/cdp/orderAttribute/son',
@@ -9,32 +9,3 @@ export declare const BuiltinIndicators: {
9
9
  attrList: never[];
10
10
  }[];
11
11
  };
12
- export declare const chartTypes: ({
13
- label: string;
14
- value: string;
15
- icon: string;
16
- children?: undefined;
17
- disabled?: undefined;
18
- } | {
19
- label: string;
20
- icon: string;
21
- value: string;
22
- children: ({
23
- label: string;
24
- value: string;
25
- icon: string;
26
- disabled?: undefined;
27
- } | {
28
- label: string;
29
- value: string;
30
- icon: string;
31
- disabled: boolean;
32
- })[];
33
- disabled?: undefined;
34
- } | {
35
- label: string;
36
- value: string;
37
- icon: string;
38
- disabled: boolean;
39
- children?: undefined;
40
- })[];
@@ -32,41 +32,4 @@ export var BuiltinIndicators = {
32
32
  isBuiltIn: true,
33
33
  attrList: []
34
34
  }]
35
- };
36
- export var chartTypes = [{
37
- label: '趋势图',
38
- value: 'line',
39
- icon: 'qushitu1'
40
- }, {
41
- label: '汇总图',
42
- value: 'bar',
43
- icon: 'huizongtu'
44
- }, {
45
- label: '表格',
46
- icon: 'biaoge',
47
- value: 'grid',
48
- children: [{
49
- label: '',
50
- value: 'line',
51
- icon: 'qushitu1'
52
- }, {
53
- label: '',
54
- value: 'bar',
55
- icon: 'huizongtu'
56
- }, {
57
- label: '',
58
- value: 'map',
59
- icon: 'ditu',
60
- disabled: true
61
- }]
62
- }, {
63
- label: '地图',
64
- value: 'map',
65
- icon: 'ditu',
66
- disabled: true
67
- }, {
68
- label: '数值',
69
- value: 'number',
70
- icon: 'fenshu',
71
- disabled: true
72
- }];
35
+ };
package/es/index.d.ts CHANGED
@@ -18,7 +18,6 @@ import { util, ajax } from './utils';
18
18
  import theme from './assets/theme.js';
19
19
  import convertAttributeData from './attributeSelector/util';
20
20
  import BizGlobalDataContext from './context';
21
- import { BizTargetFromPanelContext } from './layout/optionTitle/types';
22
21
  import BizUserCondition from './userCondition';
23
22
  import BizSearchInput from './searchInput';
24
23
  import BizUserTagsSelect from './userTagsSelector';
@@ -31,8 +30,7 @@ import BizDetailLayout from './layout/detail';
31
30
  import BizLoginForm from './loginForm';
32
31
  import DemoWrapper from './demoWrapper';
33
32
  import SocketClient from './socket';
34
- import BizTargetFromPanel from './layout/optionTitle';
35
- export { BizTargetFromPanel, BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizDetailLayout, BizUserGroup, IconFont, ColorIcon, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, BizLoginForm, DemoWrapper, SocketClient, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig, BizTargetFromPanelContext, };
33
+ export { BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizDetailLayout, BizUserGroup, IconFont, ColorIcon, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, BizLoginForm, DemoWrapper, SocketClient, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig, };
36
34
  export type { UserGroupTypes } from './userGroup/types';
37
35
  export type { BizSelectTypes } from './select/types';
38
36
  export type { AttributeSelect } from './attributeSelector/types';
package/es/index.js CHANGED
@@ -17,7 +17,6 @@ import { util, ajax } from './utils';
17
17
  import theme from './assets/theme.js';
18
18
  import convertAttributeData from './attributeSelector/util';
19
19
  import BizGlobalDataContext from './context';
20
- import { BizTargetFromPanelContext } from './layout/optionTitle/types';
21
20
  import BizUserCondition from './userCondition';
22
21
  import BizSearchInput from './searchInput';
23
22
  import BizUserTagsSelect from './userTagsSelector';
@@ -30,5 +29,4 @@ import BizDetailLayout from './layout/detail';
30
29
  import BizLoginForm from './loginForm';
31
30
  import DemoWrapper from './demoWrapper';
32
31
  import SocketClient from './socket';
33
- import BizTargetFromPanel from './layout/optionTitle';
34
- export { BizTargetFromPanel, BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizDetailLayout, BizUserGroup, IconFont, ColorIcon, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, BizLoginForm, DemoWrapper, SocketClient, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig, BizTargetFromPanelContext };
32
+ export { BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizDetailLayout, BizUserGroup, IconFont, ColorIcon, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, BizLoginForm, DemoWrapper, SocketClient, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig };
@@ -65,7 +65,7 @@ var SelectOverlay = /*#__PURE__*/React.forwardRef(function (props, ref) {
65
65
  setShowList(function () {
66
66
  var list = [];
67
67
  if (props.type === 'group') {
68
- list = options.map(function (group) {
68
+ list = options === null || options === void 0 ? void 0 : options.map(function (group) {
69
69
  var groupDom = /*#__PURE__*/React.createElement(SelectOption, {
70
70
  group: group,
71
71
  key: group.name || String(Math.random())
@@ -175,7 +175,8 @@ var SelectOverlay = /*#__PURE__*/React.forwardRef(function (props, ref) {
175
175
  var selectOptions = [];
176
176
  if (checked) {
177
177
  if (props.type === 'group') {
178
- props.options.forEach(function (item) {
178
+ var _props$options;
179
+ (_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.forEach(function (item) {
179
180
  selectOptions = selectOptions.concat(item.children || []);
180
181
  });
181
182
  } else {
@@ -19,7 +19,7 @@ import request from '../../../utils/ajax';
19
19
  import BizGlobalDataContext from '../../../context';
20
20
  import Apis from '../../../constants/apis';
21
21
  var OperatorCondition = function OperatorCondition(props) {
22
- var _condition$attrs$inde, _condition$attrs$inde2, _condition$paramsList;
22
+ var _condition$attrs$inde, _condition$attrs$inde2;
23
23
  var condition = props.condition,
24
24
  index = props.index,
25
25
  stringOperateList = props.stringOperateList,
@@ -84,15 +84,12 @@ var OperatorCondition = function OperatorCondition(props) {
84
84
  value: !isString(item) ? JSON.stringify(item) : item
85
85
  };
86
86
  });
87
- condition.paramsList[index].paramsList = list;
88
87
  setParamsList(list);
89
88
  } else {
90
89
  setParamsList([]);
91
- condition.paramsList[index].paramsList = [];
92
90
  }
93
91
  }).catch(function () {
94
92
  setParamsList([]);
95
- condition.paramsList[index].paramsList = [];
96
93
  });
97
94
  };
98
95
  if (timer) clearTimeout(timer);
@@ -102,6 +99,7 @@ var OperatorCondition = function OperatorCondition(props) {
102
99
  onChange(_objectSpread({}, condition));
103
100
  }
104
101
  var onStringOperateChange = function onStringOperateChange(operate) {
102
+ condition.attrs[index].operator = operate.value;
105
103
  if (condition.attrs[index].operator !== 'absolute') {
106
104
  condition.attrs[index].params = [];
107
105
  }
@@ -170,7 +168,7 @@ var OperatorCondition = function OperatorCondition(props) {
170
168
  size: "middle",
171
169
  labelField: "name",
172
170
  keyField: "value",
173
- options: paramsList.length > 0 ? paramsList : condition === null || condition === void 0 ? void 0 : (_condition$paramsList = condition.paramsList[index]) === null || _condition$paramsList === void 0 ? void 0 : _condition$paramsList.paramsList,
171
+ options: paramsList,
174
172
  value: current,
175
173
  onChange: onParamsChange,
176
174
  onSearch: setSearchValue,
@@ -123,14 +123,8 @@ var BusinessCondition = function BusinessCondition(props) {
123
123
  attrType: '',
124
124
  category: ''
125
125
  };
126
- var params = {
127
- masterList: [],
128
- bizDataAttrList: [],
129
- paramsList: []
130
- };
131
126
  if (condition.attrs.length < 6) {
132
127
  condition.attrs.push(_obj);
133
- condition.paramsList.push(params);
134
128
  } else {
135
129
  notification.info({
136
130
  message: '事件属性最多增加6条'
@@ -22,7 +22,6 @@ import ParamsCondition from './business/paramsCondition';
22
22
  import OperatorCondition from './business/operatorCondition';
23
23
  import Apis from '../../constants/apis';
24
24
  var DataAttribute = function DataAttribute(props) {
25
- var _condition$paramsList, _condition$paramsList2;
26
25
  var condition = props.condition,
27
26
  index = props.index,
28
27
  onChange = props.onChange;
@@ -84,14 +83,11 @@ var DataAttribute = function DataAttribute(props) {
84
83
  });
85
84
  });
86
85
  setMasterList(_list);
87
- condition.paramsList[index].masterList = _list;
88
86
  } else {
89
- condition.paramsList[index].masterList = [];
90
87
  setMasterList([]);
91
88
  }
92
89
  }).catch(function () {
93
90
  setMasterList([]);
94
- condition.paramsList[index].masterList = [];
95
91
  });
96
92
  onChange(_objectSpread({}, condition));
97
93
  }
@@ -109,14 +105,11 @@ var DataAttribute = function DataAttribute(props) {
109
105
  value: item.id
110
106
  });
111
107
  });
112
- condition.paramsList[index].bizDataAttrList = _list2;
113
108
  setBizDataAttrList(_list2);
114
109
  } else {
115
- condition.paramsList[index].bizDataAttrList = [];
116
110
  setBizDataAttrList([]);
117
111
  }
118
112
  }).catch(function () {
119
- condition.paramsList[index].bizDataAttrList = [];
120
113
  setBizDataAttrList([]);
121
114
  });
122
115
  onChange(_objectSpread({}, condition));
@@ -215,7 +208,7 @@ var DataAttribute = function DataAttribute(props) {
215
208
  className: "".concat(classPrefix, "-period-condition-operator")
216
209
  }, /*#__PURE__*/React.createElement(BizSelect, {
217
210
  className: "".concat(classPrefix, "-select-condition"),
218
- options: bizDataAttrList.length > 0 ? bizDataAttrList : condition === null || condition === void 0 ? void 0 : (_condition$paramsList = condition.paramsList[index]) === null || _condition$paramsList === void 0 ? void 0 : _condition$paramsList.bizDataAttrList,
211
+ options: bizDataAttrList,
219
212
  labelField: "name",
220
213
  keyField: "value",
221
214
  value: {
@@ -228,7 +221,7 @@ var DataAttribute = function DataAttribute(props) {
228
221
  className: "".concat(classPrefix, "-period-condition-operator")
229
222
  }, /*#__PURE__*/React.createElement(BizSelect, {
230
223
  className: "".concat(classPrefix, "-select-condition"),
231
- options: masterList.length > 0 ? masterList : condition === null || condition === void 0 ? void 0 : (_condition$paramsList2 = condition.paramsList[index]) === null || _condition$paramsList2 === void 0 ? void 0 : _condition$paramsList2.masterList,
224
+ options: masterList,
232
225
  value: {
233
226
  name: condition.typeId ? condition.attrs[index].attrType === 'cont-string' || condition.attrs[index].attrType === 'cont-date' ? condition.attrs[index].operator : condition.attrs[index].computeType : condition.attrs[index].attrName,
234
227
  value: condition.typeId ? condition.attrs[index].attrType === 'cont-string' || condition.attrs[index].attrType === 'cont-date' ? condition.attrs[index].operator : condition.attrs[index].computeType : condition.attrs[index].attrId
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.1.37-insight.0",
3
+ "version": "1.1.37",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -59,5 +59,5 @@
59
59
  "react": "^16.12.0 || ^17.0.0",
60
60
  "yorkie": "^2.0.0"
61
61
  },
62
- "gitHead": "3ba360c7f304ae42baee2458e813d8cf2215a94d"
62
+ "gitHead": "b2e287ebcfeaa841e1f4e10bd9891e58f3223e95"
63
63
  }
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { BizOptionTitleProps } from '../../types';
3
- export declare const BtnMenuProps_: React.FC<BizOptionTitleProps.BtnMenuProps>;
4
- export declare const BtnItem_: React.FC<BizOptionTitleProps.BtnItem>;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- export var BtnMenuProps_ = function BtnMenuProps_() {
3
- return /*#__PURE__*/React.createElement(React.Fragment, null);
4
- };
5
- export var BtnItem_ = function BtnItem_() {
6
- return /*#__PURE__*/React.createElement(React.Fragment, null);
7
- };
@@ -1,2 +0,0 @@
1
- declare const _default: () => JSX.Element;
2
- export default _default;
@@ -1,80 +0,0 @@
1
- import React from 'react';
2
- import BizBtnMenu from '.';
3
- import { IconFont } from '../../../..';
4
- var menu = [{
5
- key: '10',
6
- label: '下载',
7
- itemType: 'dropdownBtn',
8
- type: 'default',
9
- children: [{
10
- key: '100',
11
- label: 'JPG',
12
- onClick: function onClick() {
13
- console.log('JPG');
14
- }
15
- }, {
16
- key: '101',
17
- label: 'PNG',
18
- onClick: function onClick() {
19
- console.log('PNG');
20
- }
21
- }]
22
- }, {
23
- key: '11',
24
- label: /*#__PURE__*/React.createElement("a", {
25
- style: {
26
- width: 32,
27
- height: 32,
28
- color: '#5f6085',
29
- fontSize: 16,
30
- textAlign: 'center',
31
- transform: 'rotate(90deg)'
32
- }
33
- }, /*#__PURE__*/React.createElement(IconFont, {
34
- type: "gengduocaozuo1"
35
- })),
36
- itemType: 'dropdown',
37
- type: 'default',
38
- children: [{
39
- key: '110',
40
- label: '编辑',
41
- onClick: function onClick() {
42
- console.log('编辑');
43
- }
44
- }, {
45
- key: '111',
46
- label: '删除',
47
- onClick: function onClick() {
48
- console.log('删除');
49
- }
50
- }]
51
- }, {
52
- key: '12',
53
- label: '',
54
- itemType: 'divider'
55
- }, {
56
- key: '1',
57
- label: '测试按钮1',
58
- onClick: function onClick() {
59
- console.log('测试按钮1');
60
- }
61
- }, {
62
- key: '2',
63
- label: '测试按钮2',
64
- type: 'text',
65
- onClick: function onClick() {
66
- console.log('测试按钮2');
67
- }
68
- }, {
69
- key: '3',
70
- label: '测试按钮3',
71
- disabled: true,
72
- onClick: function onClick() {
73
- console.log('测试按钮3');
74
- }
75
- }];
76
- export default (function () {
77
- return /*#__PURE__*/React.createElement(BizBtnMenu, {
78
- menu: menu
79
- });
80
- });
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { BizOptionTitleProps } from '../../types';
3
- import './index.less';
4
- export declare const BizBtnMenu: React.FC<BizOptionTitleProps.BtnMenuProps>;
5
- export default BizBtnMenu;
@@ -1,48 +0,0 @@
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
- import { Button, Dropdown } from 'antd';
8
- import React from 'react';
9
- import './index.less';
10
- export var BizBtnMenu = function BizBtnMenu(props) {
11
- var classPrefix = 'btn-menu';
12
- return /*#__PURE__*/React.createElement("div", {
13
- className: "".concat(classPrefix, " ").concat(props.className || '')
14
- }, props.menu.map(function (item) {
15
- var config = {
16
- key: item.key,
17
- type: item.type || 'primary',
18
- disabled: item.disabled,
19
- icon: item.icon,
20
- className: "".concat(classPrefix, "-btn ").concat(item.className || ''),
21
- onClick: item.onClick
22
- };
23
- switch (item.itemType) {
24
- case 'dropdownBtn':
25
- return /*#__PURE__*/React.createElement(Dropdown.Button, _objectSpread(_objectSpread({}, config), {}, {
26
- overlayClassName: "".concat(item.overlayClassName || ''),
27
- menu: {
28
- items: item.children
29
- }
30
- }), item.label);
31
- case 'dropdown':
32
- return /*#__PURE__*/React.createElement(Dropdown, _objectSpread(_objectSpread({}, config), {}, {
33
- overlayClassName: "".concat(item.overlayClassName || ''),
34
- menu: {
35
- items: item.children
36
- }
37
- }), item.label);
38
- case 'divider':
39
- return /*#__PURE__*/React.createElement("div", {
40
- key: item.key,
41
- className: "".concat(classPrefix, "-divider ").concat(item.className || '')
42
- });
43
- default:
44
- return /*#__PURE__*/React.createElement(Button, _objectSpread({}, config), item.label);
45
- }
46
- }));
47
- };
48
- export default BizBtnMenu;
@@ -1,18 +0,0 @@
1
- @import '~@zgfe/business-lib/es/assets/styles/variable.less';
2
- .btn-menu {
3
- display: flex;
4
- align-items: center;
5
-
6
- &-btn {
7
- margin-right: 16px;
8
- border-radius: @border-radius-small;
9
- }
10
-
11
- &-divider {
12
- width: 1px;
13
- height: 32px;
14
- margin-right: 32px;
15
- margin-left: 16px;
16
- background-color: #ecedf0;
17
- }
18
- }
@@ -1,2 +0,0 @@
1
- declare const _default: () => JSX.Element;
2
- export default _default;