@cuvp1225/antd 0.2.74 → 0.2.75
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 +334 -15
- package/dist/index.js +327 -8
- package/lib/cjs/components/anchor.d.ts +3 -0
- package/lib/cjs/components/anchor.js +34 -0
- package/lib/cjs/components/auto-complete.d.ts +7 -0
- package/lib/cjs/components/auto-complete.js +34 -0
- package/lib/cjs/components/avatar.d.ts +3 -0
- package/lib/cjs/components/avatar.js +34 -0
- package/lib/cjs/components/badge.d.ts +3 -0
- package/lib/cjs/components/badge.js +34 -0
- package/lib/cjs/components/calendar.d.ts +3 -0
- package/lib/cjs/components/calendar.js +34 -0
- package/lib/cjs/components/card.d.ts +3 -0
- package/lib/cjs/components/card.js +34 -0
- package/lib/cjs/components/carousel.d.ts +3 -0
- package/lib/cjs/components/carousel.js +34 -0
- package/lib/cjs/components/checkbox.js +13 -2
- package/lib/cjs/components/comment.d.ts +3 -0
- package/lib/cjs/components/comment.js +36 -0
- package/lib/cjs/components/date-picker.d.ts +1 -1
- package/lib/cjs/components/date-picker.js +23 -5
- package/lib/cjs/components/divider.d.ts +3 -0
- package/lib/cjs/components/divider.js +34 -0
- package/lib/cjs/components/empty.d.ts +3 -0
- package/lib/cjs/components/empty.js +34 -0
- package/lib/cjs/components/image.d.ts +3 -0
- package/lib/cjs/components/image.js +34 -0
- package/lib/cjs/components/index.d.ts +29 -0
- package/lib/cjs/components/index.js +60 -1
- package/lib/cjs/components/mentions.d.ts +3 -0
- package/lib/cjs/components/mentions.js +34 -0
- package/lib/cjs/components/pageheader.d.ts +3 -0
- package/lib/cjs/components/pageheader.js +51 -0
- package/lib/cjs/components/pagination.d.ts +3 -0
- package/lib/cjs/components/pagination.js +34 -0
- package/lib/cjs/components/placeholder.js +10 -1
- package/lib/cjs/components/popconfirm.js +16 -26
- package/lib/cjs/components/popover.d.ts +3 -0
- package/lib/cjs/components/popover.js +40 -0
- package/lib/cjs/components/radio.js +22 -8
- package/lib/cjs/components/rate.d.ts +3 -0
- package/lib/cjs/components/rate.js +51 -0
- package/lib/cjs/components/result.d.ts +3 -0
- package/lib/cjs/components/result.js +51 -0
- package/lib/cjs/components/row.js +12 -5
- package/lib/cjs/components/skeleton.d.ts +3 -0
- package/lib/cjs/components/skeleton.js +51 -0
- package/lib/cjs/components/slider.d.ts +2 -0
- package/lib/cjs/components/slider.js +51 -0
- package/lib/cjs/components/spin.d.ts +3 -0
- package/lib/cjs/components/spin.js +34 -0
- package/lib/cjs/components/statistic.d.ts +3 -0
- package/lib/cjs/components/statistic.js +51 -0
- package/lib/cjs/components/switch.d.ts +3 -0
- package/lib/cjs/components/switch.js +34 -0
- package/lib/cjs/components/table.d.ts +7 -0
- package/lib/cjs/components/table.js +34 -0
- package/lib/cjs/components/tag.d.ts +3 -0
- package/lib/cjs/components/tag.js +34 -0
- package/lib/cjs/components/time-picker.d.ts +3 -0
- package/lib/cjs/components/time-picker.js +33 -0
- package/lib/cjs/components/tooltip.d.ts +2 -0
- package/lib/cjs/components/tooltip.js +40 -0
- package/lib/cjs/components/transfer.d.ts +3 -0
- package/lib/cjs/components/transfer.js +51 -0
- package/lib/cjs/components/tree-select.d.ts +7 -0
- package/lib/cjs/components/tree-select.js +34 -0
- package/lib/cjs/components/typography.js +2 -1
- package/lib/cjs/components/upload.d.ts +3 -0
- package/lib/cjs/components/upload.js +50 -0
- package/lib/cjs/prototypes/auto-complete.js +6 -5
- package/lib/cjs/prototypes/breadcrumb.js +33 -4
- package/lib/cjs/prototypes/divider.js +1 -1
- package/lib/cjs/prototypes/page-header.js +2 -1
- package/lib/cjs/prototypes/radio.js +11 -10
- package/lib/cjs/prototypes/steps.js +6 -5
- package/lib/cjs/prototypes/tree-select.js +7 -6
- package/lib/esm/components/anchor.d.ts +3 -0
- package/lib/esm/components/anchor.js +31 -0
- package/lib/esm/components/auto-complete.d.ts +7 -0
- package/lib/esm/components/auto-complete.js +31 -0
- package/lib/esm/components/avatar.d.ts +3 -0
- package/lib/esm/components/avatar.js +31 -0
- package/lib/esm/components/badge.d.ts +3 -0
- package/lib/esm/components/badge.js +31 -0
- package/lib/esm/components/calendar.d.ts +3 -0
- package/lib/esm/components/calendar.js +31 -0
- package/lib/esm/components/card.d.ts +3 -0
- package/lib/esm/components/card.js +31 -0
- package/lib/esm/components/carousel.d.ts +3 -0
- package/lib/esm/components/carousel.js +31 -0
- package/lib/esm/components/checkbox.js +13 -2
- package/lib/esm/components/comment.d.ts +3 -0
- package/lib/esm/components/comment.js +33 -0
- package/lib/esm/components/date-picker.d.ts +1 -1
- package/lib/esm/components/date-picker.js +23 -5
- package/lib/esm/components/divider.d.ts +3 -0
- package/lib/esm/components/divider.js +31 -0
- package/lib/esm/components/empty.d.ts +3 -0
- package/lib/esm/components/empty.js +31 -0
- package/lib/esm/components/image.d.ts +3 -0
- package/lib/esm/components/image.js +31 -0
- package/lib/esm/components/index.d.ts +29 -0
- package/lib/esm/components/index.js +29 -0
- package/lib/esm/components/mentions.d.ts +3 -0
- package/lib/esm/components/mentions.js +31 -0
- package/lib/esm/components/pageheader.d.ts +3 -0
- package/lib/esm/components/pageheader.js +48 -0
- package/lib/esm/components/pagination.d.ts +3 -0
- package/lib/esm/components/pagination.js +31 -0
- package/lib/esm/components/placeholder.js +10 -1
- package/lib/esm/components/popconfirm.js +17 -27
- package/lib/esm/components/popover.d.ts +3 -0
- package/lib/esm/components/popover.js +37 -0
- package/lib/esm/components/radio.js +22 -8
- package/lib/esm/components/rate.d.ts +3 -0
- package/lib/esm/components/rate.js +48 -0
- package/lib/esm/components/result.d.ts +3 -0
- package/lib/esm/components/result.js +48 -0
- package/lib/esm/components/row.js +12 -5
- package/lib/esm/components/skeleton.d.ts +3 -0
- package/lib/esm/components/skeleton.js +48 -0
- package/lib/esm/components/slider.d.ts +2 -0
- package/lib/esm/components/slider.js +48 -0
- package/lib/esm/components/spin.d.ts +3 -0
- package/lib/esm/components/spin.js +31 -0
- package/lib/esm/components/statistic.d.ts +3 -0
- package/lib/esm/components/statistic.js +48 -0
- package/lib/esm/components/switch.d.ts +3 -0
- package/lib/esm/components/switch.js +31 -0
- package/lib/esm/components/table.d.ts +7 -0
- package/lib/esm/components/table.js +31 -0
- package/lib/esm/components/tag.d.ts +3 -0
- package/lib/esm/components/tag.js +31 -0
- package/lib/esm/components/time-picker.d.ts +3 -0
- package/lib/esm/components/time-picker.js +30 -0
- package/lib/esm/components/tooltip.d.ts +2 -0
- package/lib/esm/components/tooltip.js +37 -0
- package/lib/esm/components/transfer.d.ts +3 -0
- package/lib/esm/components/transfer.js +48 -0
- package/lib/esm/components/tree-select.d.ts +7 -0
- package/lib/esm/components/tree-select.js +31 -0
- package/lib/esm/components/typography.js +2 -1
- package/lib/esm/components/upload.d.ts +3 -0
- package/lib/esm/components/upload.js +47 -0
- package/lib/esm/prototypes/auto-complete.js +6 -5
- package/lib/esm/prototypes/breadcrumb.js +33 -4
- package/lib/esm/prototypes/divider.js +1 -1
- package/lib/esm/prototypes/page-header.js +2 -1
- package/lib/esm/prototypes/radio.js +11 -10
- package/lib/esm/prototypes/steps.js +6 -5
- package/lib/esm/prototypes/tree-select.js +7 -6
- package/package.json +2 -2
@@ -34,16 +34,17 @@ exports.Radio = {
|
|
34
34
|
initValue: '单项1',
|
35
35
|
setter: 'textSetter',
|
36
36
|
},
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
37
|
+
// `optionType` is only support in Radio.Group
|
38
|
+
// {
|
39
|
+
// name: 'optionType',
|
40
|
+
// title: '选项类型',
|
41
|
+
// setter: 'choiceSetter',
|
42
|
+
// initValue: 'default',
|
43
|
+
// options: [
|
44
|
+
// { label: '默认', value: 'default' },
|
45
|
+
// { label: '按钮类型', value: 'button' },
|
46
|
+
// ],
|
47
|
+
// },
|
47
48
|
{
|
48
49
|
name: 'defaultChecked',
|
49
50
|
title: '初始选中',
|
@@ -18,13 +18,14 @@ exports.Steps = {
|
|
18
18
|
{
|
19
19
|
name: 'style',
|
20
20
|
title: '样式对象',
|
21
|
-
setter: 'expressionSetter',
|
22
|
-
setterProps: {
|
23
|
-
|
24
|
-
},
|
21
|
+
// setter: 'expressionSetter',
|
22
|
+
// setterProps: {
|
23
|
+
// expressionType: 'cssObject',
|
24
|
+
// },
|
25
|
+
setter: 'cssSetter',
|
25
26
|
group: 'style',
|
26
27
|
initValue: '{{{width: "100%"}}}',
|
27
|
-
autoCompleteOptions: ['{}'],
|
28
|
+
// autoCompleteOptions: ['{}'],
|
28
29
|
},
|
29
30
|
{
|
30
31
|
name: 'className',
|
@@ -13,17 +13,17 @@ exports.TreeSelect = {
|
|
13
13
|
childrenName: 'TreeNode',
|
14
14
|
relatedImports: ['TreeNode'],
|
15
15
|
props: [
|
16
|
-
// ...StylePrototypes,
|
17
16
|
{
|
18
17
|
name: 'style',
|
19
18
|
title: '样式对象',
|
20
|
-
setter: 'expressionSetter',
|
21
|
-
setterProps: {
|
22
|
-
|
23
|
-
},
|
19
|
+
// setter: 'expressionSetter',
|
20
|
+
// setterProps: {
|
21
|
+
// expressionType: 'cssObject',
|
22
|
+
// },
|
23
|
+
setter: 'cssSetter',
|
24
24
|
group: 'style',
|
25
25
|
initValue: '{{{width: "100%"}}}',
|
26
|
-
autoCompleteOptions: ['{}'],
|
26
|
+
// autoCompleteOptions: ['{}'],
|
27
27
|
},
|
28
28
|
{
|
29
29
|
name: 'className',
|
@@ -31,6 +31,7 @@ exports.TreeSelect = {
|
|
31
31
|
setter: 'classNameSetter',
|
32
32
|
group: 'style',
|
33
33
|
},
|
34
|
+
// ...StylePrototypes,
|
34
35
|
...common_1.InstancePrototypes,
|
35
36
|
{
|
36
37
|
name: 'treeData',
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Anchor as AntAnchor } from 'antd';
|
3
|
+
import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React, { useEffect, useRef } from 'react';
|
5
|
+
import { SLOT } from '@music163/tango-helpers';
|
6
|
+
function AnchorDesigner(_a) {
|
7
|
+
var { children } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, ["children", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
8
|
+
const anchorRef = useRef(null);
|
9
|
+
useEffect(() => {
|
10
|
+
Promise.resolve().then(() => {
|
11
|
+
const popoverNode = document.querySelector('.ant-anchor');
|
12
|
+
console.log('spinNode', popoverNode);
|
13
|
+
if (popoverNode) {
|
14
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
15
|
+
popoverNode.setAttribute('data-id', dataId);
|
16
|
+
popoverNode.setAttribute('draggable', 'true');
|
17
|
+
}
|
18
|
+
});
|
19
|
+
}, [dataDnd, dataId]);
|
20
|
+
return (React.createElement("div", { ref: anchorRef, draggable: 'true' },
|
21
|
+
React.createElement(AntAnchor, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children)));
|
22
|
+
}
|
23
|
+
export const Anchor = defineComponent(AntAnchor, {
|
24
|
+
name: 'Anchor',
|
25
|
+
designerConfig: {
|
26
|
+
render({ designerProps, originalProps }) {
|
27
|
+
console.log("Anchor: designerProps:", designerProps, "originalProps:", originalProps);
|
28
|
+
return React.createElement(AnchorDesigner, Object.assign({}, designerProps, originalProps));
|
29
|
+
},
|
30
|
+
},
|
31
|
+
});
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { AutoCompleteProps } from 'antd';
|
2
|
+
import React from 'react';
|
3
|
+
export declare const AutoComplete: React.ForwardRefExoticComponent<Omit<AutoCompleteProps<unknown, import("rc-select/lib/Select").BaseOptionType | import("rc-select/lib/Select").DefaultOptionType> & {
|
4
|
+
children?: React.ReactNode;
|
5
|
+
} & {
|
6
|
+
ref?: React.Ref<import("antd").RefSelectProps> | undefined;
|
7
|
+
} & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { AutoComplete as AntAutoComplete } from 'antd';
|
3
|
+
import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React, { useEffect, useRef } from 'react';
|
5
|
+
import { SLOT } from '@music163/tango-helpers';
|
6
|
+
function AutoCompleteDesigner(_a) {
|
7
|
+
var { children } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, ["children", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
8
|
+
const autocompleteRef = useRef(null);
|
9
|
+
useEffect(() => {
|
10
|
+
Promise.resolve().then(() => {
|
11
|
+
const popoverNode = document.querySelector('.ant-autocomplete');
|
12
|
+
// console.log('spinNode', popoverNode);
|
13
|
+
if (popoverNode) {
|
14
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
15
|
+
popoverNode.setAttribute('data-id', dataId);
|
16
|
+
popoverNode.setAttribute('draggable', 'true');
|
17
|
+
}
|
18
|
+
});
|
19
|
+
}, [dataDnd, dataId]);
|
20
|
+
return (React.createElement("div", { ref: autocompleteRef },
|
21
|
+
React.createElement(AntAutoComplete, Object.assign({ className: 'ant-autocomplete', "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children)));
|
22
|
+
}
|
23
|
+
export const AutoComplete = defineComponent(AntAutoComplete, {
|
24
|
+
name: 'AutoComplete',
|
25
|
+
designerConfig: {
|
26
|
+
render({ designerProps, originalProps }) {
|
27
|
+
// console.log("AutoComplete: designerProps:", designerProps, "originalProps:", originalProps);
|
28
|
+
return React.createElement(AutoCompleteDesigner, Object.assign({}, designerProps, originalProps));
|
29
|
+
}
|
30
|
+
}
|
31
|
+
});
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { AvatarProps } from 'antd';
|
2
|
+
import React from 'react';
|
3
|
+
export declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarProps & React.RefAttributes<HTMLSpanElement> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Avatar as AntAvatar } from 'antd';
|
3
|
+
import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React, { useEffect, useRef } from 'react';
|
5
|
+
import { SLOT } from '@music163/tango-helpers';
|
6
|
+
function AvatarDesigner(_a) {
|
7
|
+
var { children } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, ["children", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
8
|
+
const avatarRef = useRef(null);
|
9
|
+
useEffect(() => {
|
10
|
+
Promise.resolve().then(() => {
|
11
|
+
const popoverNode = document.querySelector('.ant-avatar');
|
12
|
+
// console.log('spinNode', popoverNode);
|
13
|
+
if (popoverNode) {
|
14
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
15
|
+
popoverNode.setAttribute('data-id', dataId);
|
16
|
+
popoverNode.setAttribute('draggable', 'true');
|
17
|
+
}
|
18
|
+
});
|
19
|
+
}, [dataDnd, dataId]);
|
20
|
+
return (React.createElement("div", { ref: avatarRef },
|
21
|
+
React.createElement(AntAvatar, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children)));
|
22
|
+
}
|
23
|
+
export const Avatar = defineComponent(AntAvatar, {
|
24
|
+
name: 'Avatar',
|
25
|
+
designerConfig: {
|
26
|
+
render({ designerProps, originalProps }) {
|
27
|
+
// console.log("Avatar: designerProps:", designerProps, "originalProps:", originalProps);
|
28
|
+
return React.createElement(AvatarDesigner, Object.assign({}, designerProps, originalProps));
|
29
|
+
}
|
30
|
+
}
|
31
|
+
});
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Badge as AntBadge } from 'antd';
|
3
|
+
import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React, { useEffect, useRef } from 'react';
|
5
|
+
import { SLOT } from '@music163/tango-helpers';
|
6
|
+
function BadgeDesigner(_a) {
|
7
|
+
var { children } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, ["children", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
8
|
+
const badgeRef = useRef(null);
|
9
|
+
useEffect(() => {
|
10
|
+
Promise.resolve().then(() => {
|
11
|
+
const popoverNode = document.querySelector('.ant-badge');
|
12
|
+
// console.log('spinNode', popoverNode);
|
13
|
+
if (popoverNode) {
|
14
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
15
|
+
popoverNode.setAttribute('data-id', dataId);
|
16
|
+
popoverNode.setAttribute('draggable', 'true');
|
17
|
+
}
|
18
|
+
});
|
19
|
+
}, [dataDnd, dataId]);
|
20
|
+
return (React.createElement("div", { ref: badgeRef, draggable: 'true' },
|
21
|
+
React.createElement(AntBadge, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children)));
|
22
|
+
}
|
23
|
+
export const Badge = defineComponent(AntBadge, {
|
24
|
+
name: 'Badge',
|
25
|
+
designerConfig: {
|
26
|
+
render({ designerProps, originalProps }) {
|
27
|
+
// console.log("Badge: designerProps:", designerProps, "originalProps:", originalProps);
|
28
|
+
return React.createElement(BadgeDesigner, Object.assign({}, designerProps, originalProps));
|
29
|
+
}
|
30
|
+
}
|
31
|
+
});
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Calendar as AntCalendar } from 'antd';
|
3
|
+
import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React, { useEffect, useRef } from 'react';
|
5
|
+
import { SLOT } from '@music163/tango-helpers';
|
6
|
+
function CalendarDesigner(_a) {
|
7
|
+
var _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
8
|
+
const calendarRef = useRef(null);
|
9
|
+
useEffect(() => {
|
10
|
+
Promise.resolve().then(() => {
|
11
|
+
const popoverNode = document.querySelector('.ant-picker-calendar');
|
12
|
+
console.log('spinNode', popoverNode);
|
13
|
+
if (popoverNode) {
|
14
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
15
|
+
popoverNode.setAttribute('data-id', dataId);
|
16
|
+
popoverNode.setAttribute('draggable', 'true');
|
17
|
+
}
|
18
|
+
});
|
19
|
+
}, [dataDnd, dataId]);
|
20
|
+
return (React.createElement("div", { ref: calendarRef },
|
21
|
+
React.createElement(AntCalendar, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest))));
|
22
|
+
}
|
23
|
+
export const Calendar = defineComponent(AntCalendar, {
|
24
|
+
name: 'Calendar',
|
25
|
+
designerConfig: {
|
26
|
+
render({ designerProps, originalProps }) {
|
27
|
+
console.log("Calendar: designerProps:", designerProps, "originalProps:", originalProps);
|
28
|
+
return React.createElement(CalendarDesigner, Object.assign({}, designerProps, originalProps));
|
29
|
+
},
|
30
|
+
},
|
31
|
+
});
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Card as AntCard } from 'antd';
|
3
|
+
import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React, { useEffect, useRef } from 'react';
|
5
|
+
import { SLOT } from '@music163/tango-helpers';
|
6
|
+
function CardDesigner(_a) {
|
7
|
+
var { children } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, ["children", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
8
|
+
const cardRef = useRef(null);
|
9
|
+
useEffect(() => {
|
10
|
+
Promise.resolve().then(() => {
|
11
|
+
const popoverNode = document.querySelector('.ant-card');
|
12
|
+
// console.log('spinNode', popoverNode);
|
13
|
+
if (popoverNode) {
|
14
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
15
|
+
popoverNode.setAttribute('data-id', dataId);
|
16
|
+
popoverNode.setAttribute('draggable', 'true');
|
17
|
+
}
|
18
|
+
});
|
19
|
+
}, [dataDnd, dataId]);
|
20
|
+
return (React.createElement("div", { ref: cardRef },
|
21
|
+
React.createElement(AntCard, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children)));
|
22
|
+
}
|
23
|
+
export const Card = defineComponent(AntCard, {
|
24
|
+
name: 'Card',
|
25
|
+
designerConfig: {
|
26
|
+
render({ designerProps, originalProps }) {
|
27
|
+
// console.log("Card: designerProps:", designerProps, "originalProps:", originalProps);
|
28
|
+
return React.createElement(CardDesigner, Object.assign({}, designerProps, originalProps));
|
29
|
+
}
|
30
|
+
}
|
31
|
+
});
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { CarouselProps } from 'antd';
|
2
|
+
import React from 'react';
|
3
|
+
export declare const Carousel: React.ForwardRefExoticComponent<Omit<CarouselProps & React.RefAttributes<import("antd/lib/carousel").CarouselRef> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Carousel as AntCarousel } from 'antd';
|
3
|
+
import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React, { useEffect, useRef } from 'react';
|
5
|
+
import { SLOT } from '@music163/tango-helpers';
|
6
|
+
function CarouselDesigner(_a) {
|
7
|
+
var { children } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, ["children", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
8
|
+
const carouselRef = useRef(null);
|
9
|
+
useEffect(() => {
|
10
|
+
Promise.resolve().then(() => {
|
11
|
+
const popoverNode = document.querySelector('.ant-carousel');
|
12
|
+
console.log('spinNode', popoverNode);
|
13
|
+
if (popoverNode) {
|
14
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
15
|
+
popoverNode.setAttribute('data-id', dataId);
|
16
|
+
popoverNode.setAttribute('draggable', 'true');
|
17
|
+
}
|
18
|
+
});
|
19
|
+
}, [dataDnd, dataId]);
|
20
|
+
return (React.createElement("div", { ref: carouselRef },
|
21
|
+
React.createElement(AntCarousel, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children)));
|
22
|
+
}
|
23
|
+
export const Carousel = defineComponent(AntCarousel, {
|
24
|
+
name: 'Carousel',
|
25
|
+
designerConfig: {
|
26
|
+
render({ designerProps, originalProps }) {
|
27
|
+
console.log("Carousel: designerProps:", designerProps, "originalProps:", originalProps);
|
28
|
+
return React.createElement(CarouselDesigner, Object.assign({}, designerProps, originalProps));
|
29
|
+
},
|
30
|
+
},
|
31
|
+
});
|
@@ -1,10 +1,21 @@
|
|
1
1
|
import { __rest } from "tslib";
|
2
2
|
import { defineComponent } from '@music163/tango-boot';
|
3
3
|
import { Checkbox as AntCheckbox } from 'antd';
|
4
|
-
import React from 'react';
|
4
|
+
import React, { useRef, useEffect } from 'react';
|
5
5
|
function CheckboxDesigner(_a) {
|
6
6
|
var { style } = _a, rest = __rest(_a, ["style"]);
|
7
|
-
|
7
|
+
const checkBoxRef = useRef(null);
|
8
|
+
useEffect(() => {
|
9
|
+
Promise.resolve().then(() => {
|
10
|
+
const popoverNode = document.querySelector('.ant-checkbox');
|
11
|
+
// console.log('spinNode', popoverNode);
|
12
|
+
if (popoverNode) {
|
13
|
+
popoverNode.setAttribute('draggable', 'true');
|
14
|
+
}
|
15
|
+
});
|
16
|
+
}, []);
|
17
|
+
return (React.createElement("div", { ref: checkBoxRef },
|
18
|
+
React.createElement(AntCheckbox, Object.assign({}, rest, { style: style }), rest.label)));
|
8
19
|
}
|
9
20
|
export const Checkbox = defineComponent(AntCheckbox, {
|
10
21
|
name: 'Checkbox',
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Comment as AntComment } from 'antd';
|
3
|
+
import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React, { useEffect, useRef } from 'react';
|
5
|
+
import { SLOT } from '@music163/tango-helpers';
|
6
|
+
import { Placeholder } from './placeholder';
|
7
|
+
function CommentDesigner(_a) {
|
8
|
+
var { children, content } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, ["children", "content", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
9
|
+
const commentRef = useRef(null);
|
10
|
+
useEffect(() => {
|
11
|
+
Promise.resolve().then(() => {
|
12
|
+
const popoverNode = document.querySelector('.ant-comment');
|
13
|
+
// console.log('spinNode', popoverNode);
|
14
|
+
if (popoverNode) {
|
15
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
16
|
+
popoverNode.setAttribute('data-id', dataId);
|
17
|
+
popoverNode.setAttribute('draggable', 'true');
|
18
|
+
}
|
19
|
+
});
|
20
|
+
}, [dataDnd, dataId]);
|
21
|
+
return (React.createElement("div", { ref: commentRef },
|
22
|
+
React.createElement(AntComment, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, content: content, style: style }, rest), children)));
|
23
|
+
}
|
24
|
+
export const Comment = defineComponent(AntComment, {
|
25
|
+
name: 'Comment',
|
26
|
+
designerConfig: {
|
27
|
+
render({ designerProps, originalProps }) {
|
28
|
+
// console.log("Comment: designerProps:", designerProps, "originalProps:", originalProps);
|
29
|
+
return React.createElement(CommentDesigner, Object.assign({ content: React.createElement("div", null,
|
30
|
+
React.createElement(Placeholder, { placeholder: "\u653E\u7F6E\u66FF\u6362" })) }, designerProps, originalProps));
|
31
|
+
}
|
32
|
+
}
|
33
|
+
});
|
@@ -1,6 +1,6 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import moment from 'moment';
|
2
3
|
import 'moment/locale/zh-cn';
|
3
|
-
import React from 'react';
|
4
4
|
export declare const DatePicker: React.ForwardRefExoticComponent<((import("antd/lib/date-picker/generatePicker").PickerProps<moment.Moment> & {
|
5
5
|
status?: "" | "warning" | "error" | undefined;
|
6
6
|
dropdownClassName?: string | undefined;
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { __rest } from "tslib";
|
2
2
|
import { defineComponent } from '@music163/tango-boot';
|
3
|
+
import React, { useEffect, useRef } from 'react';
|
3
4
|
import { DatePicker as AntDataPicker, ConfigProvider } from 'antd';
|
4
5
|
import 'moment/locale/zh-cn';
|
5
6
|
import locale from 'antd/es/locale/zh_CN';
|
6
|
-
import
|
7
|
-
// moment.locale('zh-cn');
|
7
|
+
import { SLOT } from '@music163/tango-helpers';
|
8
|
+
// moment.locale('zh-cn');S
|
8
9
|
const local = {
|
9
10
|
"lang": {
|
10
11
|
"locale": "zh-cn",
|
@@ -66,14 +67,31 @@ const local = {
|
|
66
67
|
"monthFormat": "YYYY-MM"
|
67
68
|
};
|
68
69
|
function DataPickerDesigner(_a) {
|
69
|
-
var { style } = _a, rest = __rest(_a, ["style"]);
|
70
|
-
|
71
|
-
|
70
|
+
var { style } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], rest = __rest(_a, ["style", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + ""]);
|
71
|
+
const dateRef = useRef(null);
|
72
|
+
useEffect(() => {
|
73
|
+
Promise.resolve().then(() => {
|
74
|
+
const popoverNode = document.querySelector('.ant-datePicker');
|
75
|
+
console.log('spinNode', popoverNode);
|
76
|
+
if (popoverNode) {
|
77
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
78
|
+
popoverNode.setAttribute('data-id', dataId);
|
79
|
+
popoverNode.setAttribute('draggable', 'true');
|
80
|
+
}
|
81
|
+
});
|
82
|
+
}, [dataDnd, dataId]);
|
83
|
+
return (
|
84
|
+
// <div ref={dateRef}>
|
85
|
+
React.createElement(ConfigProvider, { locale: locale },
|
86
|
+
React.createElement(AntDataPicker, Object.assign({ className: 'ant-datePicker', "data-dnd": dataDnd, "data-id": dataId, style: style, locale: local }, rest)))
|
87
|
+
// </div>
|
88
|
+
);
|
72
89
|
}
|
73
90
|
export const DatePicker = defineComponent(AntDataPicker, {
|
74
91
|
name: 'DatePicker',
|
75
92
|
designerConfig: {
|
76
93
|
render({ designerProps, originalProps, }) {
|
94
|
+
console.log("DatePicker: designerProps:", designerProps, "originalProps:", originalProps);
|
77
95
|
return React.createElement(DataPickerDesigner, Object.assign({}, designerProps, originalProps));
|
78
96
|
},
|
79
97
|
},
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Divider as AntDivider } from 'antd';
|
3
|
+
import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React, { useEffect, useRef } from 'react';
|
5
|
+
import { SLOT } from '@music163/tango-helpers';
|
6
|
+
function DividerDesigner(_a) {
|
7
|
+
var { children } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, ["children", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
8
|
+
const dividerRef = useRef(null);
|
9
|
+
useEffect(() => {
|
10
|
+
Promise.resolve().then(() => {
|
11
|
+
const popoverNode = document.querySelector('.ant-divider');
|
12
|
+
// console.log('spinNode', popoverNode);
|
13
|
+
if (popoverNode) {
|
14
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
15
|
+
popoverNode.setAttribute('data-id', dataId);
|
16
|
+
popoverNode.setAttribute('draggable', 'true');
|
17
|
+
}
|
18
|
+
});
|
19
|
+
}, [dataDnd, dataId]);
|
20
|
+
return (React.createElement("div", { ref: dividerRef },
|
21
|
+
React.createElement(AntDivider, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children)));
|
22
|
+
}
|
23
|
+
export const Divider = defineComponent(AntDivider, {
|
24
|
+
name: 'Divider',
|
25
|
+
designerConfig: {
|
26
|
+
render({ designerProps, originalProps }) {
|
27
|
+
// console.log("Divider: designerProps:", designerProps, "originalProps:", originalProps);
|
28
|
+
return React.createElement(DividerDesigner, Object.assign({}, designerProps, originalProps));
|
29
|
+
}
|
30
|
+
}
|
31
|
+
});
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Empty as AntEmpty } from 'antd';
|
3
|
+
import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React, { useEffect, useRef } from 'react';
|
5
|
+
import { SLOT } from '@music163/tango-helpers';
|
6
|
+
function EmptyDesigner(_a) {
|
7
|
+
var { children } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, ["children", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
8
|
+
const emptyRef = useRef(null);
|
9
|
+
useEffect(() => {
|
10
|
+
Promise.resolve().then(() => {
|
11
|
+
const popoverNode = document.querySelector('.ant-empty');
|
12
|
+
// console.log('spinNode', popoverNode);
|
13
|
+
if (popoverNode) {
|
14
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
15
|
+
popoverNode.setAttribute('data-id', dataId);
|
16
|
+
popoverNode.setAttribute('draggable', 'true');
|
17
|
+
}
|
18
|
+
});
|
19
|
+
}, [dataDnd, dataId]);
|
20
|
+
return (React.createElement("div", { ref: emptyRef },
|
21
|
+
React.createElement(AntEmpty, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children)));
|
22
|
+
}
|
23
|
+
export const Empty = defineComponent(AntEmpty, {
|
24
|
+
name: 'Empty',
|
25
|
+
designerConfig: {
|
26
|
+
render({ designerProps, originalProps }) {
|
27
|
+
// console.log("Empty: designerProps:", designerProps, "originalProps:", originalProps);
|
28
|
+
return React.createElement(EmptyDesigner, Object.assign({}, designerProps, originalProps));
|
29
|
+
}
|
30
|
+
}
|
31
|
+
});
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Image as AntImage } from 'antd';
|
3
|
+
import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React, { useEffect, useRef } from 'react';
|
5
|
+
import { SLOT } from '@music163/tango-helpers';
|
6
|
+
function ImageDesigner(_a) {
|
7
|
+
var _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
8
|
+
const imageRef = useRef(null);
|
9
|
+
useEffect(() => {
|
10
|
+
Promise.resolve().then(() => {
|
11
|
+
const popoverNode = document.querySelector('.ant-image');
|
12
|
+
// console.log('spinNode', popoverNode);
|
13
|
+
if (popoverNode) {
|
14
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
15
|
+
popoverNode.setAttribute('data-id', dataId);
|
16
|
+
popoverNode.setAttribute('draggable', 'true');
|
17
|
+
}
|
18
|
+
});
|
19
|
+
}, [dataDnd, dataId]);
|
20
|
+
return (React.createElement("div", { ref: imageRef },
|
21
|
+
React.createElement(AntImage, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest))));
|
22
|
+
}
|
23
|
+
export const Image = defineComponent(AntImage, {
|
24
|
+
name: 'Image',
|
25
|
+
designerConfig: {
|
26
|
+
render({ designerProps, originalProps }) {
|
27
|
+
// console.log("Image: designerProps:", designerProps, "originalProps:", originalProps);
|
28
|
+
return React.createElement(ImageDesigner, Object.assign({}, designerProps, originalProps));
|
29
|
+
}
|
30
|
+
}
|
31
|
+
});
|
@@ -15,6 +15,9 @@ export { Typography, Title, Paragraph, Text } from './typography';
|
|
15
15
|
export { Columns, Column } from './columns';
|
16
16
|
export { Row1 } from './row';
|
17
17
|
export { Popconfirm } from './popconfirm';
|
18
|
+
export { Popover } from './popover';
|
19
|
+
export { Tooltip } from './tooltip';
|
20
|
+
export { Result } from './result';
|
18
21
|
export { Drawer } from "./drawer";
|
19
22
|
export { DatePicker } from "./date-picker";
|
20
23
|
export { Radio, RadioGroup } from "./radio";
|
@@ -27,3 +30,29 @@ export { Timeline, TimelineItem } from './timeline';
|
|
27
30
|
export { Collapse, CollapsePanel } from './collapse';
|
28
31
|
export { List, ListItem } from './list';
|
29
32
|
export { Dropdown, DropdownButton } from './dropdown';
|
33
|
+
export { Upload } from "./upload";
|
34
|
+
export { Skeleton } from "./skeleton";
|
35
|
+
export { Spin } from './spin';
|
36
|
+
export { Anchor } from './anchor';
|
37
|
+
export { Calendar } from './calendar';
|
38
|
+
export { Carousel } from './carousel';
|
39
|
+
export { Divider } from './divider';
|
40
|
+
export { Badge } from './badge';
|
41
|
+
export { Pagination } from './pagination';
|
42
|
+
export { Table } from './table';
|
43
|
+
export { Card } from './card';
|
44
|
+
export { Tag } from './tag';
|
45
|
+
export { Avatar } from './avatar';
|
46
|
+
export { Empty } from './empty';
|
47
|
+
export { Slider } from './slider';
|
48
|
+
export { Rate } from './rate';
|
49
|
+
export { Comment } from './comment';
|
50
|
+
export { TimePicker } from './time-picker';
|
51
|
+
export { Transfer } from './transfer';
|
52
|
+
export { Statistic } from './statistic';
|
53
|
+
export { PageHeader } from './pageheader';
|
54
|
+
export { Switch } from './switch';
|
55
|
+
export { AutoComplete } from './auto-complete';
|
56
|
+
export { Mentions } from './mentions';
|
57
|
+
export { TreeSelect } from './tree-select';
|
58
|
+
export { Image } from './image';
|