@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.
- package/dist/designer.js +1966 -171
- package/dist/index.js +2048 -269
- package/lib/cjs/components/button.js +26 -0
- package/lib/cjs/components/cascader.d.ts +34 -0
- package/lib/cjs/components/cascader.js +23 -0
- package/lib/cjs/components/checkbox.d.ts +6 -0
- package/lib/cjs/components/checkbox.js +22 -0
- package/lib/cjs/components/date-picker.d.ts +8 -0
- package/lib/cjs/components/date-picker.js +24 -0
- package/lib/cjs/components/drawer.d.ts +3 -0
- package/lib/cjs/components/drawer.js +21 -0
- package/lib/cjs/components/icon.d.ts +2 -0
- package/lib/cjs/components/icon.js +48 -0
- package/lib/cjs/components/index.d.ts +8 -3
- package/lib/cjs/components/index.js +18 -5
- package/lib/cjs/components/popconfirm.d.ts +3 -0
- package/lib/cjs/components/popconfirm.js +26 -0
- package/lib/cjs/components/radio.d.ts +6 -0
- package/lib/cjs/components/radio.js +27 -0
- package/lib/cjs/components/row.d.ts +1 -1
- package/lib/cjs/components/row.js +3 -3
- package/lib/cjs/components/select.js +30 -4
- package/lib/cjs/components/typography.d.ts +2 -1
- package/lib/cjs/components/typography.js +5 -2
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/prototypes/alert.js +6 -1
- package/lib/cjs/prototypes/auto-complete.js +69 -18
- package/lib/cjs/prototypes/button.js +8 -6
- package/lib/cjs/prototypes/cascader.js +1 -1
- package/lib/cjs/prototypes/common.js +6 -5
- package/lib/cjs/prototypes/divider.js +6 -1
- package/lib/cjs/prototypes/drawer.js +25 -15
- package/lib/cjs/prototypes/form.js +1 -1
- package/lib/cjs/prototypes/icon.d.ts +2 -0
- package/lib/cjs/prototypes/icon.js +46 -0
- package/lib/cjs/prototypes/popconfirm.js +3 -1
- package/lib/cjs/prototypes/progress.js +1 -0
- package/lib/cjs/prototypes/radio.js +20 -4
- package/lib/cjs/prototypes/row.d.ts +1 -1
- package/lib/cjs/prototypes/row.js +4 -4
- package/lib/cjs/prototypes/select.js +8 -0
- package/lib/cjs/prototypes/space.js +6 -1
- package/lib/cjs/prototypes/spin.js +9 -3
- package/lib/cjs/prototypes/steps.js +30 -4
- package/lib/cjs/prototypes/table.js +5 -5
- package/lib/cjs/prototypes/tabs.js +53 -4
- package/lib/cjs/prototypes/tree-select.js +31 -1
- package/lib/cjs/prototypes/tree.js +1 -1
- package/lib/cjs/prototypes/typography.js +5 -5
- package/lib/cjs/utils/utils.d.ts +2 -0
- package/lib/cjs/utils/utils.js +12 -0
- package/lib/esm/components/button.js +26 -0
- package/lib/esm/components/cascader.d.ts +34 -0
- package/lib/esm/components/cascader.js +20 -0
- package/lib/esm/components/checkbox.d.ts +6 -0
- package/lib/esm/components/checkbox.js +19 -0
- package/lib/esm/components/date-picker.d.ts +8 -0
- package/lib/esm/components/date-picker.js +21 -0
- package/lib/esm/components/drawer.d.ts +3 -0
- package/lib/esm/components/drawer.js +18 -0
- package/lib/esm/components/icon.d.ts +2 -0
- package/lib/esm/components/icon.js +45 -0
- package/lib/esm/components/index.d.ts +8 -3
- package/lib/esm/components/index.js +9 -3
- package/lib/esm/components/popconfirm.d.ts +3 -0
- package/lib/esm/components/popconfirm.js +23 -0
- package/lib/esm/components/radio.d.ts +6 -0
- package/lib/esm/components/radio.js +24 -0
- package/lib/esm/components/row.d.ts +1 -1
- package/lib/esm/components/row.js +2 -2
- package/lib/esm/components/select.js +30 -4
- package/lib/esm/components/typography.d.ts +2 -1
- package/lib/esm/components/typography.js +4 -1
- package/lib/esm/index.d.ts +1 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/prototypes/alert.js +6 -1
- package/lib/esm/prototypes/auto-complete.js +70 -19
- package/lib/esm/prototypes/button.js +8 -6
- package/lib/esm/prototypes/cascader.js +1 -1
- package/lib/esm/prototypes/common.js +6 -5
- package/lib/esm/prototypes/divider.js +6 -1
- package/lib/esm/prototypes/drawer.js +25 -15
- package/lib/esm/prototypes/form.js +1 -1
- package/lib/esm/prototypes/icon.d.ts +2 -0
- package/lib/esm/prototypes/icon.js +43 -0
- package/lib/esm/prototypes/popconfirm.js +3 -1
- package/lib/esm/prototypes/progress.js +1 -0
- package/lib/esm/prototypes/radio.js +20 -4
- package/lib/esm/prototypes/row.d.ts +1 -1
- package/lib/esm/prototypes/row.js +3 -3
- package/lib/esm/prototypes/select.js +8 -0
- package/lib/esm/prototypes/space.js +6 -1
- package/lib/esm/prototypes/spin.js +9 -3
- package/lib/esm/prototypes/steps.js +30 -4
- package/lib/esm/prototypes/table.js +5 -5
- package/lib/esm/prototypes/tabs.js +53 -4
- package/lib/esm/prototypes/tree-select.js +32 -2
- package/lib/esm/prototypes/tree.js +1 -1
- package/lib/esm/prototypes/typography.js +5 -5
- package/lib/esm/utils/utils.d.ts +2 -0
- package/lib/esm/utils/utils.js +5 -0
- package/package.json +3 -3
@@ -1,6 +1,32 @@
|
|
1
1
|
"use strict";
|
2
|
+
// import { defineComponent } from '@music163/tango-boot';
|
3
|
+
// import { Button as AntButton } from 'antd';
|
4
|
+
// import React from 'react';
|
5
|
+
// import SmileOutlined from '@ant-design/icons/SmileOutlined';
|
6
|
+
// import { Placeholder } from './placeholder';
|
2
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
8
|
exports.ButtonGroup = exports.Button = void 0;
|
9
|
+
// function ButtonDesigner({
|
10
|
+
// children,
|
11
|
+
// style,
|
12
|
+
// icon,
|
13
|
+
// ...rest
|
14
|
+
// }: any) {
|
15
|
+
// return (
|
16
|
+
// <AntButton {...rest} style={style} icon={icon || <SmileOutlined/>}/>
|
17
|
+
// );
|
18
|
+
// }
|
19
|
+
// export const Button = defineComponent(AntButton, {
|
20
|
+
// name: 'Button',
|
21
|
+
// designerConfig: {
|
22
|
+
// render({ designerProps, originalProps }) {
|
23
|
+
// return <ButtonDesigner {...designerProps} {...originalProps} />;
|
24
|
+
// },
|
25
|
+
// },
|
26
|
+
// });
|
27
|
+
// export const ButtonGroup = defineComponent(AntButton.Group, {
|
28
|
+
// name: 'ButtonGroup',
|
29
|
+
// });
|
4
30
|
const tango_boot_1 = require("@music163/tango-boot");
|
5
31
|
const antd_1 = require("antd");
|
6
32
|
exports.Button = (0, tango_boot_1.defineComponent)(antd_1.Button, {
|
@@ -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,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Cascader = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const tango_boot_1 = require("@music163/tango-boot");
|
6
|
+
const antd_1 = require("antd");
|
7
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
8
|
+
function CascaderDesigner(_a) {
|
9
|
+
var { style, value } = _a, rest = tslib_1.__rest(_a, ["style", "value"]);
|
10
|
+
if (value && value.length > 0) {
|
11
|
+
return react_1.default.createElement(antd_1.Cascader, Object.assign({ value: value }, rest, { style: style }));
|
12
|
+
}
|
13
|
+
return (react_1.default.createElement(antd_1.Cascader, Object.assign({}, rest, { style: style })));
|
14
|
+
}
|
15
|
+
exports.Cascader = (0, tango_boot_1.defineComponent)(antd_1.Cascader, {
|
16
|
+
name: 'Cascader',
|
17
|
+
designerConfig: {
|
18
|
+
render({ designerProps, originalProps, }) {
|
19
|
+
console.log("Cascader props:", designerProps, originalProps);
|
20
|
+
return react_1.default.createElement(CascaderDesigner, Object.assign({}, designerProps, originalProps));
|
21
|
+
},
|
22
|
+
},
|
23
|
+
});
|
@@ -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,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CheckboxGroup = exports.Checkbox = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const tango_boot_1 = require("@music163/tango-boot");
|
6
|
+
const antd_1 = require("antd");
|
7
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
8
|
+
function CheckboxDesigner(_a) {
|
9
|
+
var { style } = _a, rest = tslib_1.__rest(_a, ["style"]);
|
10
|
+
return (react_1.default.createElement(antd_1.Checkbox, Object.assign({}, rest, { style: style }), rest.label));
|
11
|
+
}
|
12
|
+
exports.Checkbox = (0, tango_boot_1.defineComponent)(antd_1.Checkbox, {
|
13
|
+
name: 'Checkbox',
|
14
|
+
designerConfig: {
|
15
|
+
render({ designerProps, originalProps, }) {
|
16
|
+
return react_1.default.createElement(CheckboxDesigner, Object.assign({ label: '多选项1' }, designerProps, originalProps));
|
17
|
+
},
|
18
|
+
},
|
19
|
+
});
|
20
|
+
exports.CheckboxGroup = (0, tango_boot_1.defineComponent)(antd_1.Checkbox.Group, {
|
21
|
+
name: 'CheckboxGroup',
|
22
|
+
});
|
@@ -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,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DatePicker = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const tango_boot_1 = require("@music163/tango-boot");
|
6
|
+
const antd_1 = require("antd");
|
7
|
+
const zh_CN_1 = tslib_1.__importDefault(require("antd/es/locale/zh_CN"));
|
8
|
+
const moment_1 = tslib_1.__importDefault(require("moment"));
|
9
|
+
require("moment/locale/zh-cn");
|
10
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
11
|
+
moment_1.default.locale('zh-cn');
|
12
|
+
function DataPickerDesigner(_a) {
|
13
|
+
var { style } = _a, rest = tslib_1.__rest(_a, ["style"]);
|
14
|
+
return (react_1.default.createElement(antd_1.ConfigProvider, { locale: zh_CN_1.default },
|
15
|
+
react_1.default.createElement(antd_1.DatePicker, Object.assign({}, rest, { style: style }))));
|
16
|
+
}
|
17
|
+
exports.DatePicker = (0, tango_boot_1.defineComponent)(antd_1.DatePicker, {
|
18
|
+
name: 'DatePicker',
|
19
|
+
designerConfig: {
|
20
|
+
render({ designerProps, originalProps, }) {
|
21
|
+
return react_1.default.createElement(DataPickerDesigner, Object.assign({}, designerProps, originalProps));
|
22
|
+
},
|
23
|
+
},
|
24
|
+
});
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Drawer = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const antd_1 = require("antd");
|
6
|
+
const tango_boot_1 = require("@music163/tango-boot");
|
7
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
8
|
+
const placeholder_1 = require("./placeholder");
|
9
|
+
function DrawerDesigner(_a) {
|
10
|
+
var { children, style } = _a, rest = tslib_1.__rest(_a, ["children", "style"]);
|
11
|
+
return (react_1.default.createElement(antd_1.Drawer, Object.assign({}, rest, { style: style }),
|
12
|
+
react_1.default.createElement(placeholder_1.Placeholder, null)));
|
13
|
+
}
|
14
|
+
exports.Drawer = (0, tango_boot_1.defineComponent)(antd_1.Drawer, {
|
15
|
+
name: 'Drawer',
|
16
|
+
designerConfig: {
|
17
|
+
render({ designerProps, originalProps, }) {
|
18
|
+
return react_1.default.createElement(DrawerDesigner, Object.assign({}, designerProps, originalProps));
|
19
|
+
},
|
20
|
+
},
|
21
|
+
});
|
@@ -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,48 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.AntdIcon = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
6
|
+
// import * as icons from '@ant-design/icons';
|
7
|
+
// import { createFromIconfontCN } from '@ant-design/icons';
|
8
|
+
const HomeOutlined_1 = tslib_1.__importDefault(require("@ant-design/icons/HomeOutlined"));
|
9
|
+
const tango_boot_1 = require("@music163/tango-boot");
|
10
|
+
const icons_1 = tslib_1.__importDefault(require("@ant-design/icons"));
|
11
|
+
// function IconView = (props: IconProps, ref: Ref<any>) => {
|
12
|
+
// const { type = '', size, color, ...rest } = props;
|
13
|
+
// // const IconComp = ((icons || {}) as any)[type];
|
14
|
+
// const style = {
|
15
|
+
// ...rest.style,
|
16
|
+
// fontSize: size,
|
17
|
+
// color,
|
18
|
+
// };
|
19
|
+
// // if (!IconComp) {
|
20
|
+
// // const IconFont = createFromIconfontCN();
|
21
|
+
// // return <IconFont type={type} {...rest} style={style} ref={ref} />;
|
22
|
+
// // }
|
23
|
+
// return <ChromeFilled {...rest} style={style} twoToneColor={color} ref={ref} />;
|
24
|
+
// };
|
25
|
+
// function IconView({
|
26
|
+
// ...props
|
27
|
+
// }) {
|
28
|
+
// const { type = '', size, color, ...rest } = props;
|
29
|
+
// const style = {
|
30
|
+
// ...props.style,
|
31
|
+
// fontSize: size,
|
32
|
+
// color,
|
33
|
+
// };
|
34
|
+
// return <ChromeFilled {...rest} style={style} twoToneColor={color}/>;
|
35
|
+
// }
|
36
|
+
// export const AntdIcon = defineComponent(IconView);
|
37
|
+
function IconDesigner(_a) {
|
38
|
+
var { children, style, icon } = _a, rest = tslib_1.__rest(_a, ["children", "style", "icon"]);
|
39
|
+
return (react_1.default.createElement(icons_1.default, Object.assign({}, rest, { style: style, component: HomeOutlined_1.default })));
|
40
|
+
}
|
41
|
+
exports.AntdIcon = (0, tango_boot_1.defineComponent)(icons_1.default, {
|
42
|
+
name: 'AntdIcon',
|
43
|
+
designerConfig: {
|
44
|
+
render({ designerProps, originalProps }) {
|
45
|
+
return react_1.default.createElement(IconDesigner, Object.assign({}, designerProps, originalProps));
|
46
|
+
},
|
47
|
+
},
|
48
|
+
});
|
@@ -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 {
|
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";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.Cascader = exports.CheckboxGroup = exports.Checkbox = exports.RadioGroup = exports.Radio = exports.DatePicker = exports.Drawer = exports.Popconfirm = exports.Row1 = exports.Column = exports.Columns = exports.Text = exports.Paragraph = exports.Title = exports.Typography = exports.Space = exports.Select = exports.Modalnew = exports.InputNumber = exports.ButtonGroup = exports.Button = exports.Box = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
tslib_1.__exportStar(require("antd"), exports);
|
6
6
|
// export { Each, Link, Text, When } from '@cuvp1225/foundation';
|
@@ -12,9 +12,7 @@ Object.defineProperty(exports, "ButtonGroup", { enumerable: true, get: function
|
|
12
12
|
tslib_1.__exportStar(require("./formily"), exports);
|
13
13
|
var input_number_1 = require("./input-number");
|
14
14
|
Object.defineProperty(exports, "InputNumber", { enumerable: true, get: function () { return input_number_1.InputNumber; } });
|
15
|
-
|
16
|
-
Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return input_1.Input; } });
|
17
|
-
Object.defineProperty(exports, "TextArea", { enumerable: true, get: function () { return input_1.TextArea; } });
|
15
|
+
// export { Input, TextArea } from './input';
|
18
16
|
var modal_1 = require("./modal");
|
19
17
|
Object.defineProperty(exports, "Modalnew", { enumerable: true, get: function () { return modal_1.Modalnew; } });
|
20
18
|
tslib_1.__exportStar(require("./page"), exports);
|
@@ -28,11 +26,26 @@ var typography_1 = require("./typography");
|
|
28
26
|
Object.defineProperty(exports, "Typography", { enumerable: true, get: function () { return typography_1.Typography; } });
|
29
27
|
Object.defineProperty(exports, "Title", { enumerable: true, get: function () { return typography_1.Title; } });
|
30
28
|
Object.defineProperty(exports, "Paragraph", { enumerable: true, get: function () { return typography_1.Paragraph; } });
|
29
|
+
Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return typography_1.Text; } });
|
31
30
|
var columns_1 = require("./columns");
|
32
31
|
Object.defineProperty(exports, "Columns", { enumerable: true, get: function () { return columns_1.Columns; } });
|
33
32
|
Object.defineProperty(exports, "Column", { enumerable: true, get: function () { return columns_1.Column; } });
|
34
33
|
var row_1 = require("./row");
|
35
|
-
Object.defineProperty(exports, "
|
34
|
+
Object.defineProperty(exports, "Row1", { enumerable: true, get: function () { return row_1.Row1; } });
|
35
|
+
var popconfirm_1 = require("./popconfirm");
|
36
|
+
Object.defineProperty(exports, "Popconfirm", { enumerable: true, get: function () { return popconfirm_1.Popconfirm; } });
|
37
|
+
var drawer_1 = require("./drawer");
|
38
|
+
Object.defineProperty(exports, "Drawer", { enumerable: true, get: function () { return drawer_1.Drawer; } });
|
39
|
+
var date_picker_1 = require("./date-picker");
|
40
|
+
Object.defineProperty(exports, "DatePicker", { enumerable: true, get: function () { return date_picker_1.DatePicker; } });
|
41
|
+
var radio_1 = require("./radio");
|
42
|
+
Object.defineProperty(exports, "Radio", { enumerable: true, get: function () { return radio_1.Radio; } });
|
43
|
+
Object.defineProperty(exports, "RadioGroup", { enumerable: true, get: function () { return radio_1.RadioGroup; } });
|
44
|
+
var checkbox_1 = require("./checkbox");
|
45
|
+
Object.defineProperty(exports, "Checkbox", { enumerable: true, get: function () { return checkbox_1.Checkbox; } });
|
46
|
+
Object.defineProperty(exports, "CheckboxGroup", { enumerable: true, get: function () { return checkbox_1.CheckboxGroup; } });
|
47
|
+
var cascader_1 = require("./cascader");
|
48
|
+
Object.defineProperty(exports, "Cascader", { enumerable: true, get: function () { return cascader_1.Cascader; } });
|
36
49
|
//export { MultiColumns } from './multiColumns'
|
37
50
|
//export { Row,Col } from './grid'
|
38
51
|
//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,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Popconfirm = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const antd_1 = require("antd");
|
6
|
+
const tango_boot_1 = require("@music163/tango-boot");
|
7
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
8
|
+
function PopconfirmDesigner(_a) {
|
9
|
+
var { children, title, dataDnd, dataId, style } = _a, rest = tslib_1.__rest(_a, ["children", "title", "dataDnd", "dataId", "style"]);
|
10
|
+
(0, react_1.useEffect)(() => {
|
11
|
+
console.log('PopconfirmDesigner', dataDnd, dataId, rest);
|
12
|
+
}, []);
|
13
|
+
return (react_1.default.createElement("div", { id: "popconfirSwrapper", "data-dnd": dataDnd, "data-id": dataId },
|
14
|
+
react_1.default.createElement(antd_1.Popconfirm, Object.assign({ title: title, "data-dnd": dataDnd, "data-id": dataId }, rest, { style: style }), children)));
|
15
|
+
}
|
16
|
+
exports.Popconfirm = (0, tango_boot_1.defineComponent)(antd_1.Popconfirm, {
|
17
|
+
name: 'Popconfirm',
|
18
|
+
designerConfig: {
|
19
|
+
render({ designerProps, originalProps }) {
|
20
|
+
console.log("Popconfirm: designerProps:", designerProps, "originalProps:", originalProps);
|
21
|
+
return react_1.default.createElement(PopconfirmDesigner, Object.assign({ title: "Are you sure?" }, designerProps, originalProps));
|
22
|
+
},
|
23
|
+
},
|
24
|
+
// designerConfig: {
|
25
|
+
// },
|
26
|
+
});
|
@@ -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,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.RadioGroup = exports.Radio = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const tango_boot_1 = require("@music163/tango-boot");
|
6
|
+
const antd_1 = require("antd");
|
7
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
8
|
+
function RadioDesigner(_a) {
|
9
|
+
var { style } = _a, rest = tslib_1.__rest(_a, ["style"]);
|
10
|
+
const { optionType } = rest;
|
11
|
+
if (optionType === 'button') {
|
12
|
+
return react_1.default.createElement(antd_1.Radio.Button, Object.assign({}, rest, { style: style }), rest.label);
|
13
|
+
}
|
14
|
+
return (react_1.default.createElement(antd_1.Radio, Object.assign({}, rest, { style: style }), rest.label));
|
15
|
+
}
|
16
|
+
exports.Radio = (0, tango_boot_1.defineComponent)(antd_1.Radio, {
|
17
|
+
name: 'Radio',
|
18
|
+
designerConfig: {
|
19
|
+
render({ designerProps, originalProps, }) {
|
20
|
+
console.log("designerProps:", designerProps, "originalProps:", originalProps);
|
21
|
+
return react_1.default.createElement(RadioDesigner, Object.assign({ label: '单项1', optionType: '' }, designerProps, originalProps));
|
22
|
+
},
|
23
|
+
},
|
24
|
+
});
|
25
|
+
exports.RadioGroup = (0, tango_boot_1.defineComponent)(antd_1.Radio.Group, {
|
26
|
+
name: 'RadioGroup',
|
27
|
+
});
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { RowProps } from 'antd';
|
3
|
-
export declare const
|
3
|
+
export declare const Row1: React.ForwardRefExoticComponent<Omit<RowProps & React.RefAttributes<HTMLDivElement> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.Row1 = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
6
6
|
const styled_components_1 = require("styled-components");
|
@@ -27,8 +27,8 @@ function RowDesigner(_a) {
|
|
27
27
|
react_1.default.createElement(BaseRowWrapper, { style: style },
|
28
28
|
react_1.default.createElement("div", { className: "RowNewPanelBody" }, children || react_1.default.createElement(placeholder_1.Placeholder, null)))));
|
29
29
|
}
|
30
|
-
exports.
|
31
|
-
name: '
|
30
|
+
exports.Row1 = (0, tango_boot_1.defineComponent)(antd_1.Row, {
|
31
|
+
name: 'Row1',
|
32
32
|
designerConfig: {
|
33
33
|
render({ designerProps, originalProps }) {
|
34
34
|
return react_1.default.createElement(RowDesigner, Object.assign({}, designerProps, originalProps));
|
@@ -7,16 +7,42 @@ exports.Select = (0, tango_boot_1.defineComponent)(antd_1.Select, {
|
|
7
7
|
name: 'Select',
|
8
8
|
registerState: {
|
9
9
|
getInitStates(_, props) {
|
10
|
-
var _a;
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
var _a, _b;
|
11
|
+
console.log('getInitStates', props);
|
12
|
+
if (props.mode === 'multiple' || props.mode === 'tags') {
|
13
|
+
return {
|
14
|
+
value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : [],
|
15
|
+
};
|
16
|
+
}
|
17
|
+
else {
|
18
|
+
return {
|
19
|
+
value: (_b = props.defaultValue) !== null && _b !== void 0 ? _b : '',
|
20
|
+
};
|
21
|
+
}
|
22
|
+
// return {
|
23
|
+
// value: props.defaultValue ?? '',
|
24
|
+
// };
|
14
25
|
},
|
15
26
|
getTriggerProps({ setPageState, getPageState }) {
|
16
27
|
var _a;
|
28
|
+
console.log('getTriggerProps', setPageState, getPageState);
|
29
|
+
// 监听 props.mode 的变化
|
30
|
+
// const currentPageState = getPageState();
|
31
|
+
// if (props.mode === 'multiple' || props.mode === 'tags') {
|
32
|
+
// if (!Array.isArray(currentPageState?.value)) {
|
33
|
+
// // 如果 mode 是 'multiple' 或 'tags',但当前 value 不是数组,则重置 value
|
34
|
+
// setPageState({ value: props.defaultValue ?? [] });
|
35
|
+
// }
|
36
|
+
// } else {
|
37
|
+
// if (typeof currentPageState?.value !== 'string') {
|
38
|
+
// // 如果 mode 不是 'multiple' 或 'tags',但当前 value 不是字符串,则重置 value
|
39
|
+
// setPageState({ value: props.defaultValue ?? '' });
|
40
|
+
// }
|
41
|
+
// }
|
17
42
|
return {
|
18
43
|
value: (_a = getPageState()) === null || _a === void 0 ? void 0 : _a.value,
|
19
44
|
onChange(value) {
|
45
|
+
console.log('onChange', value);
|
20
46
|
setPageState({ value });
|
21
47
|
},
|
22
48
|
};
|
@@ -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
|
10
|
+
Text: typeof Text;
|
10
11
|
};
|
11
12
|
export declare const Typography: TypographyComponent;
|
12
13
|
export {};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Typography = exports.Paragraph = exports.Title = void 0;
|
3
|
+
exports.Typography = exports.Paragraph = exports.Text = exports.Title = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
const tango_boot_1 = require("@music163/tango-boot");
|
6
6
|
const antd_1 = require("antd");
|
@@ -9,6 +9,9 @@ const placeholder_1 = require("./placeholder");
|
|
9
9
|
exports.Title = (0, tango_boot_1.defineComponent)(antd_1.Typography.Title, {
|
10
10
|
name: 'Title',
|
11
11
|
});
|
12
|
+
exports.Text = (0, tango_boot_1.defineComponent)(antd_1.Typography.Text, {
|
13
|
+
name: 'Text',
|
14
|
+
});
|
12
15
|
exports.Paragraph = (0, tango_boot_1.defineComponent)(antd_1.Typography.Paragraph, {
|
13
16
|
name: 'Paragraph',
|
14
17
|
});
|
@@ -23,4 +26,4 @@ exports.Typography = (0, tango_boot_1.defineComponent)(antd_1.Typography, {
|
|
23
26
|
exports.Typography.Title = exports.Title;
|
24
27
|
exports.Typography.Paragraph = exports.Paragraph;
|
25
28
|
exports.Typography.Link = antd_1.Typography.Link;
|
26
|
-
exports.Typography.Text =
|
29
|
+
exports.Typography.Text = exports.Text;
|
package/lib/cjs/index.d.ts
CHANGED
package/lib/cjs/index.js
CHANGED
@@ -36,7 +36,12 @@ exports.Alert = {
|
|
36
36
|
],
|
37
37
|
},
|
38
38
|
},
|
39
|
-
{
|
39
|
+
{
|
40
|
+
name: 'action',
|
41
|
+
title: '自定义操作项',
|
42
|
+
setter: 'expressionSetter',
|
43
|
+
autoCompleteOptions: [`<Button size="small" danger>Detail</Button>`],
|
44
|
+
},
|
40
45
|
{
|
41
46
|
name: 'afterClose',
|
42
47
|
title: '关闭后的回调函数',
|