@zgfe/business-lib 1.1.49 → 1.1.50-title.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.
Files changed (44) hide show
  1. package/es/addToPanel/components/styleList.js +1 -1
  2. package/es/addToPanel/demo/edit.js +0 -32
  3. package/es/addToPanel/demo/index.js +1 -32
  4. package/es/addToPanel/index.js +22 -15
  5. package/es/addToPanel/types.d.ts +3 -3
  6. package/es/constants/apis.d.ts +2 -0
  7. package/es/constants/apis.js +2 -0
  8. package/es/constants/common.d.ts +29 -0
  9. package/es/constants/common.js +38 -1
  10. package/es/index.d.ts +3 -1
  11. package/es/index.js +3 -1
  12. package/es/layout/optionTitle/components/btnMenu/api.d.ts +4 -0
  13. package/es/layout/optionTitle/components/btnMenu/api.js +7 -0
  14. package/es/layout/optionTitle/components/btnMenu/demo.d.ts +2 -0
  15. package/es/layout/optionTitle/components/btnMenu/demo.js +80 -0
  16. package/es/layout/optionTitle/components/btnMenu/index.d.ts +5 -0
  17. package/es/layout/optionTitle/components/btnMenu/index.js +48 -0
  18. package/es/layout/optionTitle/components/btnMenu/index.less +18 -0
  19. package/es/layout/optionTitle/components/title/demo.d.ts +2 -0
  20. package/es/layout/optionTitle/components/title/demo.js +50 -0
  21. package/es/layout/optionTitle/components/title/index.d.ts +5 -0
  22. package/es/layout/optionTitle/components/title/index.js +106 -0
  23. package/es/layout/optionTitle/components/title/index.less +42 -0
  24. package/es/layout/optionTitle/data.d.ts +3 -0
  25. package/es/layout/optionTitle/data.js +77 -0
  26. package/es/layout/optionTitle/demo/index.d.ts +2 -0
  27. package/es/layout/optionTitle/demo/index.js +84 -0
  28. package/es/layout/optionTitle/demo/index.less +12 -0
  29. package/es/layout/optionTitle/demo/layout.d.ts +3 -0
  30. package/es/layout/optionTitle/demo/layout.js +41 -0
  31. package/es/layout/optionTitle/demo/panelCreate.d.ts +2 -0
  32. package/es/layout/optionTitle/demo/panelCreate.js +82 -0
  33. package/es/layout/optionTitle/index.d.ts +6 -0
  34. package/es/layout/optionTitle/index.js +154 -0
  35. package/es/layout/optionTitle/layout.d.ts +5 -0
  36. package/es/layout/optionTitle/layout.js +38 -0
  37. package/es/layout/optionTitle/styles/index.less +19 -0
  38. package/es/layout/optionTitle/styles/layout.less +43 -0
  39. package/es/layout/optionTitle/styles/search.less +27 -0
  40. package/es/layout/optionTitle/types.d.ts +83 -0
  41. package/es/layout/optionTitle/types.js +15 -0
  42. package/es/layout/optionTitle/typesValue.d.ts +4 -0
  43. package/es/layout/optionTitle/typesValue.js +7 -0
  44. package/package.json +2 -2
@@ -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
- overlay: function overlay() {
60
+ dropdownRender: function dropdownRender() {
61
61
  return ChildList(item);
62
62
  }
63
63
  }, /*#__PURE__*/React.createElement("div", {
@@ -7,37 +7,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { useState } from 'react';
8
8
  import { BizAddToPanel, DemoWrapper } 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
- }];
41
10
  var defaultValue = {
42
11
  panel: {
43
12
  id: 52397,
@@ -64,7 +33,6 @@ export default (function () {
64
33
  type: "edit",
65
34
  params: {},
66
35
  elementId: 1,
67
- styleOptions: chartTypes,
68
36
  onCancel: function onCancel() {
69
37
  setShowDialog(false);
70
38
  },
@@ -7,37 +7,6 @@ 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
- }];
41
10
  var defaultValue = {
42
11
  panel: {
43
12
  id: 52397,
@@ -60,7 +29,7 @@ export default (function () {
60
29
  }, "\u6DFB\u52A0\u5230\u770B\u677F"), showDialog && /*#__PURE__*/React.createElement(BizAddToPanel, {
61
30
  defaultValue: defaultValue,
62
31
  params: {},
63
- styleOptions: chartTypes,
32
+ showMap: true,
64
33
  onCancel: function onCancel() {
65
34
  setShowDialog(false);
66
35
  },
@@ -23,6 +23,7 @@ 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';
26
27
  export var classPrefix = 'biz-addtopanel';
27
28
  var BizAddToPanel = function BizAddToPanel(props) {
28
29
  var refForm = useRef();
@@ -43,8 +44,20 @@ var BizAddToPanel = function BizAddToPanel(props) {
43
44
  router = _useContext.router,
44
45
  routes = _useContext.routes,
45
46
  isDemo = _useContext.isDemo;
47
+ var _useState7 = useState(chartTypes),
48
+ _useState8 = _slicedToArray(_useState7, 2),
49
+ styleOptions = _useState8[0],
50
+ setStyleOptions = _useState8[1];
46
51
  useEffect(function () {
47
52
  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
+ }
48
61
  }, []);
49
62
  function queryGroups() {
50
63
  request(Apis.queryPanelGroup, {
@@ -90,23 +103,17 @@ var BizAddToPanel = function BizAddToPanel(props) {
90
103
  data: searchParam,
91
104
  chosen_data: form.showList && form.showList === 'dynamic' ? [] : props.showList
92
105
  };
93
- var data = {},
94
- url = Apis.updatePanelTarget,
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,
95
112
  msgType = '保存';
96
113
  if (props.type === 'edit') {
97
- data = {
98
- name: form.name,
99
- panel_id: form.panel.id,
100
- element_id: props.elementId,
101
- web_data: JSON.stringify(resData)
102
- };
114
+ data.element_id = props.elementId;
103
115
  } else {
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
- };
116
+ data.mobile_data = JSON.stringify(resData);
110
117
  if (form.panel.id === 0) {
111
118
  data.app_id = currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId;
112
119
  data.platform = (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0;
@@ -239,7 +246,7 @@ var BizAddToPanel = function BizAddToPanel(props) {
239
246
  message: '请选择样式'
240
247
  }]
241
248
  }, /*#__PURE__*/React.createElement(StyleList, {
242
- options: props.styleOptions
249
+ options: styleOptions
243
250
  })), /*#__PURE__*/React.createElement(Form.Item, {
244
251
  noStyle: true,
245
252
  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[];
16
15
  showOptions?: Option[];
17
16
  showList?: string[];
18
17
  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,6 +8,8 @@ declare const Apis: {
8
8
  queryDatasetList: string;
9
9
  queryDatasetDetail: string;
10
10
  getSocketToken: string;
11
+ delPanelElement: string;
12
+ updateElementName: string;
11
13
  bizDataTypeList: string;
12
14
  orderAttributeMaster: string;
13
15
  orderAttributeSon: string;
@@ -8,6 +8,8 @@ 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',
11
13
  bizDataTypeList: '/cep-console/api/v1/bizdata/type/list',
12
14
  orderAttributeMaster: '/cep-console/api/v1/cdp/orderAttribute/master',
13
15
  orderAttributeSon: '/cep-console/api/v1/cdp/orderAttribute/son',
@@ -9,3 +9,32 @@ 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,4 +32,41 @@ export var BuiltinIndicators = {
32
32
  isBuiltIn: true,
33
33
  attrList: []
34
34
  }]
35
- };
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
+ }];
package/es/index.d.ts CHANGED
@@ -18,6 +18,7 @@ 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';
21
22
  import BizUserCondition from './userCondition';
22
23
  import BizSearchInput from './searchInput';
23
24
  import BizUserTagsSelect from './userTagsSelector';
@@ -30,7 +31,8 @@ import BizDetailLayout from './layout/detail';
30
31
  import BizLoginForm from './loginForm';
31
32
  import DemoWrapper from './demoWrapper';
32
33
  import SocketClient from './socket';
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, };
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, };
34
36
  export type { UserGroupTypes } from './userGroup/types';
35
37
  export type { BizSelectTypes } from './select/types';
36
38
  export type { AttributeSelect } from './attributeSelector/types';
package/es/index.js CHANGED
@@ -17,6 +17,7 @@ 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';
20
21
  import BizUserCondition from './userCondition';
21
22
  import BizSearchInput from './searchInput';
22
23
  import BizUserTagsSelect from './userTagsSelector';
@@ -29,4 +30,5 @@ import BizDetailLayout from './layout/detail';
29
30
  import BizLoginForm from './loginForm';
30
31
  import DemoWrapper from './demoWrapper';
31
32
  import SocketClient from './socket';
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 };
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 };
@@ -0,0 +1,4 @@
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>;
@@ -0,0 +1,7 @@
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
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,80 @@
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
+ });
@@ -0,0 +1,5 @@
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;
@@ -0,0 +1,48 @@
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;
@@ -0,0 +1,18 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,50 @@
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 React, { useState } from 'react';
8
+ import BizEditText from '.';
9
+ export default (function () {
10
+ var _useState = useState('洞察'),
11
+ _useState2 = _slicedToArray(_useState, 2),
12
+ title = _useState2[0],
13
+ setTitle = _useState2[1];
14
+ var _useState3 = useState('洞察'),
15
+ _useState4 = _slicedToArray(_useState3, 2),
16
+ title2 = _useState4[0],
17
+ setTitle2 = _useState4[1];
18
+ var onChange = function onChange(value) {
19
+ setTitle(value || '');
20
+ };
21
+ var onChange2 = function onChange2(value) {
22
+ setTitle2(value || '');
23
+ };
24
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h2", null, "\u8F93\u5165\u6846\u5931\u7126\u53D8\u4E3A\u6587\u672C"), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("div", {
25
+ style: {
26
+ border: '1px solid #f5f5f5',
27
+ height: 60,
28
+ padding: 24,
29
+ display: 'flex',
30
+ alignItems: 'center'
31
+ }
32
+ }, /*#__PURE__*/React.createElement(BizEditText, {
33
+ name: "\u6D4B\u8BD5",
34
+ value: title,
35
+ onChange: onChange
36
+ })), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("h2", null, "\u8F93\u5165\u6846\u5931\u7126\u8FD8\u662F\u8F93\u5165\u6846"), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("div", {
37
+ style: {
38
+ border: '1px solid #f5f5f5',
39
+ height: 60,
40
+ padding: 24,
41
+ display: 'flex',
42
+ alignItems: 'center'
43
+ }
44
+ }, /*#__PURE__*/React.createElement(BizEditText, {
45
+ name: "\u6D4B\u8BD52",
46
+ value: title2,
47
+ isInput: true,
48
+ onChange: onChange2
49
+ })));
50
+ });
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ import { BizOptionTitleProps } from '../../types';
4
+ declare const BizEditText: React.ForwardRefExoticComponent<BizOptionTitleProps.TitleProps & React.RefAttributes<any>>;
5
+ export default BizEditText;