@cuvp1225/antd 0.3.51 → 0.3.53
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 +102 -3
- package/dist/index.js +102 -3
- package/lib/cjs/components/anchor.d.ts +3 -0
- package/lib/cjs/components/anchor.js +34 -0
- package/lib/cjs/components/avatar.d.ts +3 -0
- package/lib/cjs/components/avatar.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/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 +19 -5
- package/lib/cjs/components/empty.d.ts +3 -0
- package/lib/cjs/components/empty.js +34 -0
- package/lib/cjs/components/index.d.ts +9 -0
- package/lib/cjs/components/index.js +19 -1
- 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 +34 -0
- package/lib/cjs/components/typography.js +2 -1
- package/lib/esm/components/anchor.d.ts +3 -0
- package/lib/esm/components/anchor.js +31 -0
- package/lib/esm/components/avatar.d.ts +3 -0
- package/lib/esm/components/avatar.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/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 +19 -5
- package/lib/esm/components/empty.d.ts +3 -0
- package/lib/esm/components/empty.js +31 -0
- package/lib/esm/components/index.d.ts +9 -0
- package/lib/esm/components/index.js +9 -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 +31 -0
- package/lib/esm/components/typography.js +2 -1
- package/package.json +2 -2
@@ -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-spin');
|
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, draggable: 'true' },
|
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
|
+
});
|
@@ -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, draggable: 'true' },
|
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,9 +67,22 @@ 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-comment');
|
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 (React.createElement("div", { ref: dateRef, draggable: 'true' },
|
84
|
+
React.createElement(ConfigProvider, { locale: locale },
|
85
|
+
React.createElement(AntDataPicker, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style, locale: local }, rest)))));
|
72
86
|
}
|
73
87
|
export const DatePicker = defineComponent(AntDataPicker, {
|
74
88
|
name: 'DatePicker',
|
@@ -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, draggable: 'true' },
|
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
|
+
});
|
@@ -33,7 +33,16 @@ export { Dropdown, DropdownButton } from './dropdown';
|
|
33
33
|
export { Upload } from "./upload";
|
34
34
|
export { Skeleton } from "./skeleton";
|
35
35
|
export { Spin } from './spin';
|
36
|
+
export { Anchor } from './anchor';
|
37
|
+
export { Calendar } from './calendar';
|
38
|
+
export { Carousel } from './carousel';
|
36
39
|
export { Divider } from './divider';
|
37
40
|
export { Badge } from './badge';
|
38
41
|
export { Pagination } from './pagination';
|
39
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 { Comment } from './comment';
|
48
|
+
export { TimePicker } from './time-picker';
|
@@ -38,7 +38,16 @@ export { Dropdown, DropdownButton } from './dropdown';
|
|
38
38
|
export { Upload } from "./upload";
|
39
39
|
export { Skeleton } from "./skeleton";
|
40
40
|
export { Spin } from './spin';
|
41
|
+
export { Anchor } from './anchor';
|
42
|
+
export { Calendar } from './calendar';
|
43
|
+
export { Carousel } from './carousel';
|
41
44
|
export { Divider } from './divider';
|
42
45
|
export { Badge } from './badge';
|
43
46
|
export { Pagination } from './pagination';
|
44
47
|
export { Table } from './table';
|
48
|
+
export { Card } from './card';
|
49
|
+
export { Tag } from './tag';
|
50
|
+
export { Avatar } from './avatar';
|
51
|
+
export { Empty } from './empty';
|
52
|
+
export { Comment } from './comment';
|
53
|
+
export { TimePicker } from './time-picker';
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Tag as AntTag } 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 TagDesigner(_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 tagRef = useRef(null);
|
9
|
+
useEffect(() => {
|
10
|
+
Promise.resolve().then(() => {
|
11
|
+
const popoverNode = document.querySelector('.ant-tag');
|
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: tagRef, draggable: 'true' },
|
21
|
+
React.createElement(AntTag, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children)));
|
22
|
+
}
|
23
|
+
export const Tag = defineComponent(AntTag, {
|
24
|
+
name: 'Tag',
|
25
|
+
designerConfig: {
|
26
|
+
render({ designerProps, originalProps }) {
|
27
|
+
// console.log("Tag: designerProps:", designerProps, "originalProps:", originalProps);
|
28
|
+
return React.createElement(TagDesigner, Object.assign({}, designerProps, originalProps));
|
29
|
+
}
|
30
|
+
}
|
31
|
+
});
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { TimePickerProps } from 'antd';
|
2
|
+
import React from 'react';
|
3
|
+
export declare const TimePicker: React.ForwardRefExoticComponent<Omit<TimePickerProps & React.RefAttributes<any> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { TimePicker as AntTimePicker } 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 TimePickerDesigner(_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 timePickerRef = useRef(null);
|
9
|
+
useEffect(() => {
|
10
|
+
Promise.resolve().then(() => {
|
11
|
+
const popoverNode = document.querySelector('.ant-timepicker');
|
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: timePickerRef, draggable: 'true' },
|
21
|
+
React.createElement(AntTimePicker, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest))));
|
22
|
+
}
|
23
|
+
export const TimePicker = defineComponent(AntTimePicker, {
|
24
|
+
name: 'TimePicker',
|
25
|
+
designerConfig: {
|
26
|
+
render({ designerProps, originalProps }) {
|
27
|
+
// console.log("TimePicker: designerProps:", designerProps, "originalProps:", originalProps);
|
28
|
+
return React.createElement(TimePickerDesigner, Object.assign({}, designerProps, originalProps));
|
29
|
+
}
|
30
|
+
}
|
31
|
+
});
|
@@ -15,7 +15,8 @@ export const Typography = defineComponent(AntTypography, {
|
|
15
15
|
name: 'Typography',
|
16
16
|
designerConfig: {
|
17
17
|
defaultProps: {
|
18
|
-
children: React.createElement(
|
18
|
+
children: React.createElement("div", null,
|
19
|
+
React.createElement(Placeholder, { placeholder: "\u6DFB\u52A0\u6807\u9898\u6216\u6BB5\u843D\u5230\u8FD9\u91CC" })),
|
19
20
|
},
|
20
21
|
},
|
21
22
|
});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@cuvp1225/antd",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.53",
|
4
4
|
"description": "antd components for tango app",
|
5
5
|
"author": "wwsun <ww.sww@outlook.com>",
|
6
6
|
"homepage": "https://github.com/netease/tango-components#readme",
|
@@ -54,5 +54,5 @@
|
|
54
54
|
"classnames": "^2.3.2",
|
55
55
|
"coral-system": "^1.0.6"
|
56
56
|
},
|
57
|
-
"gitHead": "
|
57
|
+
"gitHead": "16e37dcdbe8d36c4ff02c41e79a257578a760a64"
|
58
58
|
}
|