@cuvp1225/antd 0.2.57 → 0.2.59

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 (103) hide show
  1. package/dist/designer.js +1966 -171
  2. package/dist/index.js +2048 -269
  3. package/lib/cjs/components/button.js +26 -0
  4. package/lib/cjs/components/cascader.d.ts +34 -0
  5. package/lib/cjs/components/cascader.js +23 -0
  6. package/lib/cjs/components/checkbox.d.ts +6 -0
  7. package/lib/cjs/components/checkbox.js +22 -0
  8. package/lib/cjs/components/date-picker.d.ts +8 -0
  9. package/lib/cjs/components/date-picker.js +24 -0
  10. package/lib/cjs/components/drawer.d.ts +3 -0
  11. package/lib/cjs/components/drawer.js +21 -0
  12. package/lib/cjs/components/icon.d.ts +2 -0
  13. package/lib/cjs/components/icon.js +48 -0
  14. package/lib/cjs/components/index.d.ts +8 -3
  15. package/lib/cjs/components/index.js +18 -5
  16. package/lib/cjs/components/popconfirm.d.ts +3 -0
  17. package/lib/cjs/components/popconfirm.js +26 -0
  18. package/lib/cjs/components/radio.d.ts +6 -0
  19. package/lib/cjs/components/radio.js +27 -0
  20. package/lib/cjs/components/row.d.ts +1 -1
  21. package/lib/cjs/components/row.js +3 -3
  22. package/lib/cjs/components/select.js +30 -4
  23. package/lib/cjs/components/typography.d.ts +2 -1
  24. package/lib/cjs/components/typography.js +5 -2
  25. package/lib/cjs/index.d.ts +1 -0
  26. package/lib/cjs/index.js +1 -0
  27. package/lib/cjs/prototypes/alert.js +6 -1
  28. package/lib/cjs/prototypes/auto-complete.js +69 -18
  29. package/lib/cjs/prototypes/button.js +8 -6
  30. package/lib/cjs/prototypes/cascader.js +1 -1
  31. package/lib/cjs/prototypes/common.js +6 -5
  32. package/lib/cjs/prototypes/divider.js +6 -1
  33. package/lib/cjs/prototypes/drawer.js +25 -15
  34. package/lib/cjs/prototypes/form.js +1 -1
  35. package/lib/cjs/prototypes/icon.d.ts +2 -0
  36. package/lib/cjs/prototypes/icon.js +46 -0
  37. package/lib/cjs/prototypes/popconfirm.js +3 -1
  38. package/lib/cjs/prototypes/progress.js +1 -0
  39. package/lib/cjs/prototypes/radio.js +20 -4
  40. package/lib/cjs/prototypes/row.d.ts +1 -1
  41. package/lib/cjs/prototypes/row.js +4 -4
  42. package/lib/cjs/prototypes/select.js +8 -0
  43. package/lib/cjs/prototypes/space.js +6 -1
  44. package/lib/cjs/prototypes/spin.js +9 -3
  45. package/lib/cjs/prototypes/steps.js +30 -4
  46. package/lib/cjs/prototypes/table.js +5 -5
  47. package/lib/cjs/prototypes/tabs.js +53 -4
  48. package/lib/cjs/prototypes/tree-select.js +31 -1
  49. package/lib/cjs/prototypes/tree.js +1 -1
  50. package/lib/cjs/prototypes/typography.js +5 -5
  51. package/lib/cjs/utils/utils.d.ts +2 -0
  52. package/lib/cjs/utils/utils.js +12 -0
  53. package/lib/esm/components/button.js +26 -0
  54. package/lib/esm/components/cascader.d.ts +34 -0
  55. package/lib/esm/components/cascader.js +20 -0
  56. package/lib/esm/components/checkbox.d.ts +6 -0
  57. package/lib/esm/components/checkbox.js +19 -0
  58. package/lib/esm/components/date-picker.d.ts +8 -0
  59. package/lib/esm/components/date-picker.js +21 -0
  60. package/lib/esm/components/drawer.d.ts +3 -0
  61. package/lib/esm/components/drawer.js +18 -0
  62. package/lib/esm/components/icon.d.ts +2 -0
  63. package/lib/esm/components/icon.js +45 -0
  64. package/lib/esm/components/index.d.ts +8 -3
  65. package/lib/esm/components/index.js +9 -3
  66. package/lib/esm/components/popconfirm.d.ts +3 -0
  67. package/lib/esm/components/popconfirm.js +23 -0
  68. package/lib/esm/components/radio.d.ts +6 -0
  69. package/lib/esm/components/radio.js +24 -0
  70. package/lib/esm/components/row.d.ts +1 -1
  71. package/lib/esm/components/row.js +2 -2
  72. package/lib/esm/components/select.js +30 -4
  73. package/lib/esm/components/typography.d.ts +2 -1
  74. package/lib/esm/components/typography.js +4 -1
  75. package/lib/esm/index.d.ts +1 -0
  76. package/lib/esm/index.js +1 -0
  77. package/lib/esm/prototypes/alert.js +6 -1
  78. package/lib/esm/prototypes/auto-complete.js +70 -19
  79. package/lib/esm/prototypes/button.js +8 -6
  80. package/lib/esm/prototypes/cascader.js +1 -1
  81. package/lib/esm/prototypes/common.js +6 -5
  82. package/lib/esm/prototypes/divider.js +6 -1
  83. package/lib/esm/prototypes/drawer.js +25 -15
  84. package/lib/esm/prototypes/form.js +1 -1
  85. package/lib/esm/prototypes/icon.d.ts +2 -0
  86. package/lib/esm/prototypes/icon.js +43 -0
  87. package/lib/esm/prototypes/popconfirm.js +3 -1
  88. package/lib/esm/prototypes/progress.js +1 -0
  89. package/lib/esm/prototypes/radio.js +20 -4
  90. package/lib/esm/prototypes/row.d.ts +1 -1
  91. package/lib/esm/prototypes/row.js +3 -3
  92. package/lib/esm/prototypes/select.js +8 -0
  93. package/lib/esm/prototypes/space.js +6 -1
  94. package/lib/esm/prototypes/spin.js +9 -3
  95. package/lib/esm/prototypes/steps.js +30 -4
  96. package/lib/esm/prototypes/table.js +5 -5
  97. package/lib/esm/prototypes/tabs.js +53 -4
  98. package/lib/esm/prototypes/tree-select.js +32 -2
  99. package/lib/esm/prototypes/tree.js +1 -1
  100. package/lib/esm/prototypes/typography.js +5 -5
  101. package/lib/esm/utils/utils.d.ts +2 -0
  102. package/lib/esm/utils/utils.js +5 -0
  103. package/package.json +3 -3
@@ -10,16 +10,38 @@ exports.Tabs = {
10
10
  type: 'container',
11
11
  package: '@cuvp1225/antd',
12
12
  help: '提供平级的区域将大块内容进行收纳和展现,保持界面整洁',
13
- hasChildren: true,
14
- initChildren: '<TabPane key="1" tab="选项卡1"></TabPane><TabPane key="2" tab="选项卡2"></TabPane>',
13
+ hasChildren: false,
14
+ initChildren: `<TabPane key="1" tab="选项卡1"><Placeholder text="放置替换" style={{ margin: "15px"}} /></TabPane><TabPane key="2" tab="选项卡2"><Placeholder text="放置替换" style={{ margin: "15px" }}/></TabPane>`,
15
15
  childrenName: 'TabPane',
16
16
  relatedImports: ['TabPane'],
17
17
  props: [
18
18
  ...common_1.StylePrototypes,
19
+ {
20
+ name: 'items',
21
+ title: '标签项',
22
+ setter: 'tabPaneSetter',
23
+ initValue: [
24
+ {
25
+ key: '1',
26
+ label: '选项卡1',
27
+ forceRender: false,
28
+ disabled: false,
29
+ // children: '选项卡1',
30
+ },
31
+ {
32
+ key: '2',
33
+ label: '选项卡2',
34
+ forceRender: false,
35
+ disabled: false,
36
+ // children: '选项卡2',
37
+ },
38
+ ]
39
+ },
19
40
  {
20
41
  name: 'defaultActiveKey',
21
42
  title: '默认选中的面板',
22
43
  setter: 'textSetter',
44
+ initValue: '1',
23
45
  },
24
46
  {
25
47
  name: 'centered',
@@ -34,9 +56,20 @@ exports.Tabs = {
34
56
  { label: '基本', value: 'line' },
35
57
  { label: '卡片', value: 'card' },
36
58
  { label: '可编辑卡片', value: 'editable-card' },
37
- { label: '胶囊', value: 'capsule' },
38
- { label: '文本', value: 'text' },
59
+ // { label: '胶囊', value: 'capsule' },
60
+ // { label: '文本', value: 'text' },
61
+ ],
62
+ },
63
+ {
64
+ name: 'size',
65
+ title: '选项卡大小',
66
+ setter: 'choiceSetter',
67
+ options: [
68
+ { label: '大', value: 'large' },
69
+ { label: '中', value: 'middle' },
70
+ { label: '小', value: 'small' },
39
71
  ],
72
+ tip: '提供large、middle和small三种大小',
40
73
  },
41
74
  {
42
75
  name: 'tabPosition',
@@ -49,6 +82,13 @@ exports.Tabs = {
49
82
  { label: '左', value: 'left' },
50
83
  ],
51
84
  },
85
+ {
86
+ name: 'hideAdd',
87
+ title: '是否隐藏加号图标',
88
+ tip: '仅在选项卡类型为可编辑卡片时有效',
89
+ setter: 'boolSetter',
90
+ getVisible: (form) => form.getValue('type') === 'editable-card',
91
+ },
52
92
  {
53
93
  name: 'onChange',
54
94
  title: '当面板切换时',
@@ -56,6 +96,15 @@ exports.Tabs = {
56
96
  group: 'event',
57
97
  autoCompleteOptions: ['(activeKey)=>{}'],
58
98
  },
99
+ {
100
+ name: 'onEdit',
101
+ title: '新增和删除页签的回调',
102
+ tip: '仅在选项卡类型为可编辑卡片时有效',
103
+ setter: 'expressionSetter',
104
+ group: 'event',
105
+ // autoCompleteOptions: ["(action === 'add' ? event : targetKey, action): void"],
106
+ getVisible: (form) => form.getValue('type') === 'editable-card',
107
+ },
59
108
  {
60
109
  name: 'tabBarExtraContent',
61
110
  title: 'tab bar 上额外的元素',
@@ -13,7 +13,24 @@ exports.TreeSelect = {
13
13
  childrenName: 'TreeNode',
14
14
  relatedImports: ['TreeNode'],
15
15
  props: [
16
- ...common_1.StylePrototypes,
16
+ // ...StylePrototypes,
17
+ {
18
+ name: 'style',
19
+ title: '样式对象',
20
+ setter: 'expressionSetter',
21
+ setterProps: {
22
+ expressionType: 'cssObject',
23
+ },
24
+ group: 'style',
25
+ initValue: '{{{width: "100%"}}}',
26
+ autoCompleteOptions: ['{}'],
27
+ },
28
+ {
29
+ name: 'className',
30
+ title: '自定义样式类名',
31
+ setter: 'classNameSetter',
32
+ group: 'style',
33
+ },
17
34
  ...common_1.InstancePrototypes,
18
35
  {
19
36
  name: 'treeData',
@@ -200,6 +217,19 @@ exports.TreeSelect = {
200
217
  name: 'loadData',
201
218
  title: '异步加载数据',
202
219
  setter: 'expressionSetter',
220
+ autoCompleteOptions: [`({ id }) =>
221
+ new Promise((resolve) => {
222
+ setTimeout(() => {
223
+ this.setState({
224
+ treeData: this.state.treeData.concat([
225
+ genTreeNode(id, false),
226
+ genTreeNode(id, true),
227
+ genTreeNode(id, true),
228
+ ]),
229
+ });
230
+ resolve(undefined);
231
+ }, 300);
232
+ })`]
203
233
  },
204
234
  {
205
235
  name: 'maxTagCount',
@@ -12,7 +12,7 @@ exports.Tree = {
12
12
  props: [
13
13
  ...common_1.StylePrototypes,
14
14
  {
15
- name: 'dataSource',
15
+ name: 'treeData',
16
16
  title: '数据源',
17
17
  tip: '支持异步数据载入',
18
18
  setter: 'expressionSetter',
@@ -133,11 +133,11 @@ exports.Title = {
133
133
  title: '标题级别',
134
134
  setter: 'pickerSetter',
135
135
  options: [
136
- { label: 'h1', value: '1' },
137
- { label: 'h2', value: '2' },
138
- { label: 'h3', value: '3' },
139
- { label: 'h4', value: '4' },
140
- { label: 'h5', value: '5' },
136
+ { label: 'h1', value: 1 },
137
+ { label: 'h2', value: 2 },
138
+ { label: 'h3', value: 3 },
139
+ { label: 'h4', value: 4 },
140
+ { label: 'h5', value: 5 },
141
141
  ],
142
142
  tip: '数字越小,级别越大',
143
143
  },
@@ -0,0 +1,2 @@
1
+ export { get, set, has } from 'lodash';
2
+ export declare function uuid(): string;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.has = exports.set = exports.get = void 0;
4
+ exports.uuid = uuid;
5
+ var lodash_1 = require("lodash");
6
+ Object.defineProperty(exports, "get", { enumerable: true, get: function () { return lodash_1.get; } });
7
+ Object.defineProperty(exports, "set", { enumerable: true, get: function () { return lodash_1.set; } });
8
+ Object.defineProperty(exports, "has", { enumerable: true, get: function () { return lodash_1.has; } });
9
+ // simple uuid
10
+ function uuid() {
11
+ return ((Math.random() * 1e6) >> 0).toString(36);
12
+ }
@@ -1,3 +1,29 @@
1
+ // import { defineComponent } from '@music163/tango-boot';
2
+ // import { Button as AntButton } from 'antd';
3
+ // import React from 'react';
4
+ // import SmileOutlined from '@ant-design/icons/SmileOutlined';
5
+ // import { Placeholder } from './placeholder';
6
+ // function ButtonDesigner({
7
+ // children,
8
+ // style,
9
+ // icon,
10
+ // ...rest
11
+ // }: any) {
12
+ // return (
13
+ // <AntButton {...rest} style={style} icon={icon || <SmileOutlined/>}/>
14
+ // );
15
+ // }
16
+ // export const Button = defineComponent(AntButton, {
17
+ // name: 'Button',
18
+ // designerConfig: {
19
+ // render({ designerProps, originalProps }) {
20
+ // return <ButtonDesigner {...designerProps} {...originalProps} />;
21
+ // },
22
+ // },
23
+ // });
24
+ // export const ButtonGroup = defineComponent(AntButton.Group, {
25
+ // name: 'ButtonGroup',
26
+ // });
1
27
  import { defineComponent } from '@music163/tango-boot';
2
28
  import { Button as AntButton } from 'antd';
3
29
  export const Button = defineComponent(AntButton, {
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ export declare const Cascader: React.ForwardRefExoticComponent<(Omit<Omit<import("rc-cascader").SingleCascaderProps<import("rc-cascader").DefaultOptionType>, "options" | "checkable"> & {
3
+ multiple?: false;
4
+ } & {
5
+ multiple?: boolean;
6
+ size?: import("antd/lib/button").ButtonSize;
7
+ disabled?: boolean;
8
+ bordered?: boolean;
9
+ placement?: import("antd/lib/_util/motion").SelectCommonPlacement;
10
+ suffixIcon?: React.ReactNode;
11
+ options?: (import("rc-cascader").DefaultOptionType | import("rc-cascader").BaseOptionType)[];
12
+ status?: import("antd/lib/_util/statusUtils").InputStatus;
13
+ dropdownClassName?: string;
14
+ } & {
15
+ children?: React.ReactNode | undefined;
16
+ } & {
17
+ ref?: React.Ref<import("antd/lib/cascader").CascaderRef> | undefined;
18
+ } & import("@music163/tango-boot").TangoComponentProps, "ref"> | Omit<Omit<import("rc-cascader").MultipleCascaderProps<import("rc-cascader").DefaultOptionType>, "options" | "checkable"> & {
19
+ multiple: true;
20
+ } & {
21
+ multiple?: boolean;
22
+ size?: import("antd/lib/button").ButtonSize;
23
+ disabled?: boolean;
24
+ bordered?: boolean;
25
+ placement?: import("antd/lib/_util/motion").SelectCommonPlacement;
26
+ suffixIcon?: React.ReactNode;
27
+ options?: (import("rc-cascader").DefaultOptionType | import("rc-cascader").BaseOptionType)[];
28
+ status?: import("antd/lib/_util/statusUtils").InputStatus;
29
+ dropdownClassName?: string;
30
+ } & {
31
+ children?: React.ReactNode | undefined;
32
+ } & {
33
+ ref?: React.Ref<import("antd/lib/cascader").CascaderRef> | undefined;
34
+ } & import("@music163/tango-boot").TangoComponentProps, "ref">) & React.RefAttributes<unknown>>;
@@ -0,0 +1,20 @@
1
+ import { __rest } from "tslib";
2
+ import { defineComponent } from '@music163/tango-boot';
3
+ import { Cascader as AntCascader } from 'antd';
4
+ import React from 'react';
5
+ function CascaderDesigner(_a) {
6
+ var { style, value } = _a, rest = __rest(_a, ["style", "value"]);
7
+ if (value && value.length > 0) {
8
+ return React.createElement(AntCascader, Object.assign({ value: value }, rest, { style: style }));
9
+ }
10
+ return (React.createElement(AntCascader, Object.assign({}, rest, { style: style })));
11
+ }
12
+ export const Cascader = defineComponent(AntCascader, {
13
+ name: 'Cascader',
14
+ designerConfig: {
15
+ render({ designerProps, originalProps, }) {
16
+ console.log("Cascader props:", designerProps, originalProps);
17
+ return React.createElement(CascaderDesigner, Object.assign({}, designerProps, originalProps));
18
+ },
19
+ },
20
+ });
@@ -0,0 +1,6 @@
1
+ import { CheckboxProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxProps & React.RefAttributes<HTMLInputElement> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
4
+ export declare const CheckboxGroup: React.ForwardRefExoticComponent<Omit<Omit<import("antd/lib/checkbox").CheckboxGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
5
+ ref?: React.Ref<HTMLDivElement>;
6
+ } & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
@@ -0,0 +1,19 @@
1
+ import { __rest } from "tslib";
2
+ import { defineComponent } from '@music163/tango-boot';
3
+ import { Checkbox as AntCheckbox } from 'antd';
4
+ import React from 'react';
5
+ function CheckboxDesigner(_a) {
6
+ var { style } = _a, rest = __rest(_a, ["style"]);
7
+ return (React.createElement(AntCheckbox, Object.assign({}, rest, { style: style }), rest.label));
8
+ }
9
+ export const Checkbox = defineComponent(AntCheckbox, {
10
+ name: 'Checkbox',
11
+ designerConfig: {
12
+ render({ designerProps, originalProps, }) {
13
+ return React.createElement(CheckboxDesigner, Object.assign({ label: '多选项1' }, designerProps, originalProps));
14
+ },
15
+ },
16
+ });
17
+ export const CheckboxGroup = defineComponent(AntCheckbox.Group, {
18
+ name: 'CheckboxGroup',
19
+ });
@@ -0,0 +1,8 @@
1
+ import moment from 'moment';
2
+ import 'moment/locale/zh-cn';
3
+ import React from 'react';
4
+ export declare const DatePicker: React.ForwardRefExoticComponent<((import("antd/lib/date-picker/generatePicker").PickerProps<moment.Moment> & {
5
+ status?: "" | "warning" | "error" | undefined;
6
+ dropdownClassName?: string | undefined;
7
+ popupClassName?: string | undefined;
8
+ }) & import("@music163/tango-boot").TangoComponentProps) & React.RefAttributes<unknown>>;
@@ -0,0 +1,21 @@
1
+ import { __rest } from "tslib";
2
+ import { defineComponent } from '@music163/tango-boot';
3
+ import { DatePicker as AntDataPicker, ConfigProvider } from 'antd';
4
+ import zhCN from 'antd/es/locale/zh_CN';
5
+ import moment from 'moment';
6
+ import 'moment/locale/zh-cn';
7
+ import React from 'react';
8
+ moment.locale('zh-cn');
9
+ function DataPickerDesigner(_a) {
10
+ var { style } = _a, rest = __rest(_a, ["style"]);
11
+ return (React.createElement(ConfigProvider, { locale: zhCN },
12
+ React.createElement(AntDataPicker, Object.assign({}, rest, { style: style }))));
13
+ }
14
+ export const DatePicker = defineComponent(AntDataPicker, {
15
+ name: 'DatePicker',
16
+ designerConfig: {
17
+ render({ designerProps, originalProps, }) {
18
+ return React.createElement(DataPickerDesigner, Object.assign({}, designerProps, originalProps));
19
+ },
20
+ },
21
+ });
@@ -0,0 +1,3 @@
1
+ import { DrawerProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Drawer: React.ForwardRefExoticComponent<DrawerProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
@@ -0,0 +1,18 @@
1
+ import { __rest } from "tslib";
2
+ import { Drawer as AntDrawer } from 'antd';
3
+ import { defineComponent } from '@music163/tango-boot';
4
+ import React from 'react';
5
+ import { Placeholder } from './placeholder';
6
+ function DrawerDesigner(_a) {
7
+ var { children, style } = _a, rest = __rest(_a, ["children", "style"]);
8
+ return (React.createElement(AntDrawer, Object.assign({}, rest, { style: style }),
9
+ React.createElement(Placeholder, null)));
10
+ }
11
+ export const Drawer = defineComponent(AntDrawer, {
12
+ name: 'Drawer',
13
+ designerConfig: {
14
+ render({ designerProps, originalProps, }) {
15
+ return React.createElement(DrawerDesigner, Object.assign({}, designerProps, originalProps));
16
+ },
17
+ },
18
+ });
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const AntdIcon: React.ForwardRefExoticComponent<Omit<Omit<import("@ant-design/icons/lib/components/Icon").IconComponentProps, "ref"> & React.RefAttributes<HTMLSpanElement> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
@@ -0,0 +1,45 @@
1
+ import { __rest } from "tslib";
2
+ import React from 'react';
3
+ // import * as icons from '@ant-design/icons';
4
+ // import { createFromIconfontCN } from '@ant-design/icons';
5
+ import HomeOutlined from "@ant-design/icons/HomeOutlined";
6
+ import { defineComponent } from '@music163/tango-boot';
7
+ import Icon from '@ant-design/icons';
8
+ // function IconView = (props: IconProps, ref: Ref<any>) => {
9
+ // const { type = '', size, color, ...rest } = props;
10
+ // // const IconComp = ((icons || {}) as any)[type];
11
+ // const style = {
12
+ // ...rest.style,
13
+ // fontSize: size,
14
+ // color,
15
+ // };
16
+ // // if (!IconComp) {
17
+ // // const IconFont = createFromIconfontCN();
18
+ // // return <IconFont type={type} {...rest} style={style} ref={ref} />;
19
+ // // }
20
+ // return <ChromeFilled {...rest} style={style} twoToneColor={color} ref={ref} />;
21
+ // };
22
+ // function IconView({
23
+ // ...props
24
+ // }) {
25
+ // const { type = '', size, color, ...rest } = props;
26
+ // const style = {
27
+ // ...props.style,
28
+ // fontSize: size,
29
+ // color,
30
+ // };
31
+ // return <ChromeFilled {...rest} style={style} twoToneColor={color}/>;
32
+ // }
33
+ // export const AntdIcon = defineComponent(IconView);
34
+ function IconDesigner(_a) {
35
+ var { children, style, icon } = _a, rest = __rest(_a, ["children", "style", "icon"]);
36
+ return (React.createElement(Icon, Object.assign({}, rest, { style: style, component: HomeOutlined })));
37
+ }
38
+ export const AntdIcon = defineComponent(Icon, {
39
+ name: 'AntdIcon',
40
+ designerConfig: {
41
+ render({ designerProps, originalProps }) {
42
+ return React.createElement(IconDesigner, Object.assign({}, designerProps, originalProps));
43
+ },
44
+ },
45
+ });
@@ -3,13 +3,18 @@ export { Box } from './box';
3
3
  export { Button, ButtonGroup } from './button';
4
4
  export * from './formily';
5
5
  export { InputNumber } from './input-number';
6
- export { Input, TextArea } from './input';
7
6
  export { Modalnew } from './modal';
8
7
  export * from './page';
9
8
  export * from './placeholder';
10
9
  export * from './section';
11
10
  export { Select } from './select';
12
11
  export { Space } from './space';
13
- export { Typography, Title, Paragraph } from './typography';
12
+ export { Typography, Title, Paragraph, Text } from './typography';
14
13
  export { Columns, Column } from './columns';
15
- export { Row } from './row';
14
+ export { Row1 } from './row';
15
+ export { Popconfirm } from './popconfirm';
16
+ export { Drawer } from "./drawer";
17
+ export { DatePicker } from "./date-picker";
18
+ export { Radio, RadioGroup } from "./radio";
19
+ export { Checkbox, CheckboxGroup } from "./checkbox";
20
+ export { Cascader } from "./cascader";
@@ -4,16 +4,22 @@ export { Box } from './box';
4
4
  export { Button, ButtonGroup } from './button';
5
5
  export * from './formily';
6
6
  export { InputNumber } from './input-number';
7
- export { Input, TextArea } from './input';
7
+ // export { Input, TextArea } from './input';
8
8
  export { Modalnew } from './modal';
9
9
  export * from './page';
10
10
  export * from './placeholder';
11
11
  export * from './section';
12
12
  export { Select } from './select';
13
13
  export { Space } from './space';
14
- export { Typography, Title, Paragraph } from './typography';
14
+ export { Typography, Title, Paragraph, Text } from './typography';
15
15
  export { Columns, Column } from './columns';
16
- export { Row } from './row';
16
+ export { Row1 } from './row';
17
+ export { Popconfirm } from './popconfirm';
18
+ export { Drawer } from "./drawer";
19
+ export { DatePicker } from "./date-picker";
20
+ export { Radio, RadioGroup } from "./radio";
21
+ export { Checkbox, CheckboxGroup } from "./checkbox";
22
+ export { Cascader } from "./cascader";
17
23
  //export { MultiColumns } from './multiColumns'
18
24
  //export { Row,Col } from './grid'
19
25
  //export { RowCombination,ColCombination } from './gridCombination'
@@ -0,0 +1,3 @@
1
+ import { PopconfirmProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Popconfirm: React.ForwardRefExoticComponent<Omit<PopconfirmProps & React.RefAttributes<unknown> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
@@ -0,0 +1,23 @@
1
+ import { __rest } from "tslib";
2
+ import { Popconfirm as AntPopconfirm } from 'antd';
3
+ import { defineComponent } from '@music163/tango-boot';
4
+ import React, { useEffect } from 'react';
5
+ function PopconfirmDesigner(_a) {
6
+ var { children, title, dataDnd, dataId, style } = _a, rest = __rest(_a, ["children", "title", "dataDnd", "dataId", "style"]);
7
+ useEffect(() => {
8
+ console.log('PopconfirmDesigner', dataDnd, dataId, rest);
9
+ }, []);
10
+ return (React.createElement("div", { id: "popconfirSwrapper", "data-dnd": dataDnd, "data-id": dataId },
11
+ React.createElement(AntPopconfirm, Object.assign({ title: title, "data-dnd": dataDnd, "data-id": dataId }, rest, { style: style }), children)));
12
+ }
13
+ export const Popconfirm = defineComponent(AntPopconfirm, {
14
+ name: 'Popconfirm',
15
+ designerConfig: {
16
+ render({ designerProps, originalProps }) {
17
+ console.log("Popconfirm: designerProps:", designerProps, "originalProps:", originalProps);
18
+ return React.createElement(PopconfirmDesigner, Object.assign({ title: "Are you sure?" }, designerProps, originalProps));
19
+ },
20
+ },
21
+ // designerConfig: {
22
+ // },
23
+ });
@@ -0,0 +1,6 @@
1
+ import { RadioProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Radio: React.ForwardRefExoticComponent<Omit<RadioProps & React.RefAttributes<HTMLElement> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
4
+ export declare const RadioGroup: React.ForwardRefExoticComponent<Omit<Omit<import("antd").RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
5
+ ref?: React.Ref<HTMLDivElement>;
6
+ } & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
@@ -0,0 +1,24 @@
1
+ import { __rest } from "tslib";
2
+ import { defineComponent } from '@music163/tango-boot';
3
+ import { Radio as AntRadio } from 'antd';
4
+ import React from 'react';
5
+ function RadioDesigner(_a) {
6
+ var { style } = _a, rest = __rest(_a, ["style"]);
7
+ const { optionType } = rest;
8
+ if (optionType === 'button') {
9
+ return React.createElement(AntRadio.Button, Object.assign({}, rest, { style: style }), rest.label);
10
+ }
11
+ return (React.createElement(AntRadio, Object.assign({}, rest, { style: style }), rest.label));
12
+ }
13
+ export const Radio = defineComponent(AntRadio, {
14
+ name: 'Radio',
15
+ designerConfig: {
16
+ render({ designerProps, originalProps, }) {
17
+ console.log("designerProps:", designerProps, "originalProps:", originalProps);
18
+ return React.createElement(RadioDesigner, Object.assign({ label: '单项1', optionType: '' }, designerProps, originalProps));
19
+ },
20
+ },
21
+ });
22
+ export const RadioGroup = defineComponent(AntRadio.Group, {
23
+ name: 'RadioGroup',
24
+ });
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { RowProps } from 'antd';
3
- export declare const Row: React.ForwardRefExoticComponent<Omit<RowProps & React.RefAttributes<HTMLDivElement> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
3
+ export declare const Row1: React.ForwardRefExoticComponent<Omit<RowProps & React.RefAttributes<HTMLDivElement> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
@@ -24,8 +24,8 @@ function RowDesigner(_a) {
24
24
  React.createElement(BaseRowWrapper, { style: style },
25
25
  React.createElement("div", { className: "RowNewPanelBody" }, children || React.createElement(Placeholder, null)))));
26
26
  }
27
- export const Row = defineComponent(AntRow, {
28
- name: 'Row',
27
+ export const Row1 = defineComponent(AntRow, {
28
+ name: 'Row1',
29
29
  designerConfig: {
30
30
  render({ designerProps, originalProps }) {
31
31
  return React.createElement(RowDesigner, Object.assign({}, designerProps, originalProps));
@@ -4,16 +4,42 @@ export const Select = defineComponent(AntSelect, {
4
4
  name: 'Select',
5
5
  registerState: {
6
6
  getInitStates(_, props) {
7
- var _a;
8
- return {
9
- value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : '',
10
- };
7
+ var _a, _b;
8
+ console.log('getInitStates', props);
9
+ if (props.mode === 'multiple' || props.mode === 'tags') {
10
+ return {
11
+ value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : [],
12
+ };
13
+ }
14
+ else {
15
+ return {
16
+ value: (_b = props.defaultValue) !== null && _b !== void 0 ? _b : '',
17
+ };
18
+ }
19
+ // return {
20
+ // value: props.defaultValue ?? '',
21
+ // };
11
22
  },
12
23
  getTriggerProps({ setPageState, getPageState }) {
13
24
  var _a;
25
+ console.log('getTriggerProps', setPageState, getPageState);
26
+ // 监听 props.mode 的变化
27
+ // const currentPageState = getPageState();
28
+ // if (props.mode === 'multiple' || props.mode === 'tags') {
29
+ // if (!Array.isArray(currentPageState?.value)) {
30
+ // // 如果 mode 是 'multiple' 或 'tags',但当前 value 不是数组,则重置 value
31
+ // setPageState({ value: props.defaultValue ?? [] });
32
+ // }
33
+ // } else {
34
+ // if (typeof currentPageState?.value !== 'string') {
35
+ // // 如果 mode 不是 'multiple' 或 'tags',但当前 value 不是字符串,则重置 value
36
+ // setPageState({ value: props.defaultValue ?? '' });
37
+ // }
38
+ // }
14
39
  return {
15
40
  value: (_a = getPageState()) === null || _a === void 0 ? void 0 : _a.value,
16
41
  onChange(value) {
42
+ console.log('onChange', value);
17
43
  setPageState({ value });
18
44
  },
19
45
  };
@@ -1,12 +1,13 @@
1
1
  import { Typography as AntTypography } from 'antd';
2
2
  import React from 'react';
3
3
  export declare const Title: React.ForwardRefExoticComponent<Omit<import("antd/lib/typography/Title").TitleProps & React.RefAttributes<HTMLElement> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
4
+ export declare const Text: React.ForwardRefExoticComponent<Omit<import("antd/lib/typography/Text").TextProps & React.RefAttributes<HTMLSpanElement> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
4
5
  export declare const Paragraph: React.ForwardRefExoticComponent<Omit<import("antd/lib/typography/Paragraph").ParagraphProps & React.RefAttributes<HTMLElement> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
5
6
  type TypographyComponent = React.ForwardRefExoticComponent<any & React.RefAttributes<React.ReactElement>> & {
6
7
  Title: typeof Title;
7
8
  Paragraph: typeof Paragraph;
8
9
  Link: typeof AntTypography.Link;
9
- Text: typeof AntTypography.Text;
10
+ Text: typeof Text;
10
11
  };
11
12
  export declare const Typography: TypographyComponent;
12
13
  export {};
@@ -5,6 +5,9 @@ import { Placeholder } from './placeholder';
5
5
  export const Title = defineComponent(AntTypography.Title, {
6
6
  name: 'Title',
7
7
  });
8
+ export const Text = defineComponent(AntTypography.Text, {
9
+ name: 'Text',
10
+ });
8
11
  export const Paragraph = defineComponent(AntTypography.Paragraph, {
9
12
  name: 'Paragraph',
10
13
  });
@@ -19,4 +22,4 @@ export const Typography = defineComponent(AntTypography, {
19
22
  Typography.Title = Title;
20
23
  Typography.Paragraph = Paragraph;
21
24
  Typography.Link = AntTypography.Link;
22
- Typography.Text = AntTypography.Text;
25
+ Typography.Text = Text;
@@ -1 +1,2 @@
1
+ import 'antd/dist/antd.css';
1
2
  export * from './components';
package/lib/esm/index.js CHANGED
@@ -1 +1,2 @@
1
+ import 'antd/dist/antd.css';
1
2
  export * from './components';
@@ -33,7 +33,12 @@ export const Alert = {
33
33
  ],
34
34
  },
35
35
  },
36
- { name: 'action', title: '自定义操作项', setter: 'expressionSetter' },
36
+ {
37
+ name: 'action',
38
+ title: '自定义操作项',
39
+ setter: 'expressionSetter',
40
+ autoCompleteOptions: [`<Button size="small" danger>Detail</Button>`],
41
+ },
37
42
  {
38
43
  name: 'afterClose',
39
44
  title: '关闭后的回调函数',