@cuvp1225/antd 0.2.74 → 0.2.76
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 +399 -25
- package/dist/index.js +386 -12
- package/lib/cjs/components/affix.d.ts +1 -0
- package/lib/cjs/components/affix.js +18 -0
- package/lib/cjs/components/alert.d.ts +3 -0
- package/lib/cjs/components/alert.js +32 -0
- package/lib/cjs/components/anchor.d.ts +3 -0
- package/lib/cjs/components/anchor.js +47 -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 +37 -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 +32 -0
- package/lib/cjs/components/checkbox.js +17 -3
- package/lib/cjs/components/collapse.d.ts +4 -2
- package/lib/cjs/components/collapse.js +25 -1
- 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/descriptions.d.ts +3 -0
- package/lib/cjs/components/descriptions.js +32 -0
- package/lib/cjs/components/divider.d.ts +3 -0
- package/lib/cjs/components/divider.js +34 -0
- package/lib/cjs/components/drawer.js +1 -2
- 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 +35 -0
- package/lib/cjs/components/index.d.ts +34 -0
- package/lib/cjs/components/index.js +71 -1
- package/lib/cjs/components/input-number.js +27 -24
- 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 +9 -0
- package/lib/cjs/components/popconfirm.js +17 -26
- package/lib/cjs/components/popover.d.ts +3 -0
- package/lib/cjs/components/popover.js +41 -0
- package/lib/cjs/components/progress.d.ts +3 -0
- package/lib/cjs/components/progress.js +38 -0
- package/lib/cjs/components/radio.js +25 -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 +37 -0
- package/lib/cjs/components/statistic.d.ts +3 -0
- package/lib/cjs/components/statistic.js +57 -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 +37 -0
- package/lib/cjs/components/tabs.d.ts +3 -0
- package/lib/cjs/components/tabs.js +32 -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/timeline.d.ts +4 -2
- package/lib/cjs/components/timeline.js +37 -1
- package/lib/cjs/components/tooltip.d.ts +2 -0
- package/lib/cjs/components/tooltip.js +41 -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/tree.d.ts +7 -0
- package/lib/cjs/components/tree.js +32 -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/anchor.js +1 -0
- package/lib/cjs/prototypes/auto-complete.js +6 -5
- package/lib/cjs/prototypes/breadcrumb.js +33 -4
- package/lib/cjs/prototypes/descriptions.js +12 -0
- package/lib/cjs/prototypes/divider.js +1 -1
- package/lib/cjs/prototypes/modal.js +1 -0
- package/lib/cjs/prototypes/page-header.js +2 -1
- package/lib/cjs/prototypes/radio.js +11 -10
- package/lib/cjs/prototypes/slider.js +1 -1
- package/lib/cjs/prototypes/steps.js +6 -5
- package/lib/cjs/prototypes/tabs.js +2 -1
- package/lib/cjs/prototypes/tree-select.js +7 -6
- package/lib/esm/components/affix.d.ts +1 -0
- package/lib/esm/components/affix.js +16 -0
- package/lib/esm/components/alert.d.ts +3 -0
- package/lib/esm/components/alert.js +29 -0
- package/lib/esm/components/anchor.d.ts +3 -0
- package/lib/esm/components/anchor.js +44 -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 +34 -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 +29 -0
- package/lib/esm/components/checkbox.js +17 -3
- package/lib/esm/components/collapse.d.ts +4 -2
- package/lib/esm/components/collapse.js +25 -1
- 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/descriptions.d.ts +3 -0
- package/lib/esm/components/descriptions.js +29 -0
- package/lib/esm/components/divider.d.ts +3 -0
- package/lib/esm/components/divider.js +31 -0
- package/lib/esm/components/drawer.js +1 -2
- 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 +32 -0
- package/lib/esm/components/index.d.ts +34 -0
- package/lib/esm/components/index.js +35 -0
- package/lib/esm/components/input-number.js +27 -24
- 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 +9 -0
- package/lib/esm/components/popconfirm.js +18 -27
- package/lib/esm/components/popover.d.ts +3 -0
- package/lib/esm/components/popover.js +38 -0
- package/lib/esm/components/progress.d.ts +3 -0
- package/lib/esm/components/progress.js +35 -0
- package/lib/esm/components/radio.js +25 -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 +34 -0
- package/lib/esm/components/statistic.d.ts +3 -0
- package/lib/esm/components/statistic.js +54 -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 +34 -0
- package/lib/esm/components/tabs.d.ts +3 -0
- package/lib/esm/components/tabs.js +29 -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/timeline.d.ts +4 -2
- package/lib/esm/components/timeline.js +37 -1
- package/lib/esm/components/tooltip.d.ts +2 -0
- package/lib/esm/components/tooltip.js +38 -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/tree.d.ts +7 -0
- package/lib/esm/components/tree.js +29 -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/anchor.js +1 -0
- package/lib/esm/prototypes/auto-complete.js +6 -5
- package/lib/esm/prototypes/breadcrumb.js +33 -4
- package/lib/esm/prototypes/descriptions.js +12 -0
- package/lib/esm/prototypes/divider.js +1 -1
- package/lib/esm/prototypes/modal.js +1 -0
- package/lib/esm/prototypes/page-header.js +2 -1
- package/lib/esm/prototypes/radio.js +11 -10
- package/lib/esm/prototypes/slider.js +1 -1
- package/lib/esm/prototypes/steps.js +6 -5
- package/lib/esm/prototypes/tabs.js +2 -1
- package/lib/esm/prototypes/tree-select.js +7 -6
- package/package.json +2 -2
@@ -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(`.${dataId}`);
|
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: dataId, "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(`.${dataId}`);
|
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({ className: dataId, "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,34 @@
|
|
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(`.${dataId}`);
|
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 },
|
21
|
+
React.createElement(AntBadge, Object.assign({ className: dataId,
|
22
|
+
// data-dnd={dataDnd}
|
23
|
+
// data-id={dataId}
|
24
|
+
style: style }, rest), children)));
|
25
|
+
}
|
26
|
+
export const Badge = defineComponent(AntBadge, {
|
27
|
+
name: 'Badge',
|
28
|
+
designerConfig: {
|
29
|
+
render({ designerProps, originalProps }) {
|
30
|
+
// console.log("Badge: designerProps:", designerProps, "originalProps:", originalProps);
|
31
|
+
return React.createElement(BadgeDesigner, Object.assign({}, designerProps, originalProps));
|
32
|
+
}
|
33
|
+
}
|
34
|
+
});
|
@@ -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(`.${dataId}`);
|
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({ className: dataId, "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(`.${dataId}`);
|
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({ className: dataId, "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,29 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Carousel as AntCarousel } from 'antd';
|
3
|
+
import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React, { useEffect } 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
|
+
useEffect(() => {
|
9
|
+
Promise.resolve().then(() => {
|
10
|
+
const popoverNode = document.querySelector(`.${dataId}`);
|
11
|
+
console.log('spinNode', popoverNode);
|
12
|
+
if (popoverNode) {
|
13
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
14
|
+
popoverNode.setAttribute('data-id', dataId);
|
15
|
+
popoverNode.setAttribute('draggable', 'true');
|
16
|
+
}
|
17
|
+
});
|
18
|
+
}, [dataDnd, dataId]);
|
19
|
+
return (React.createElement(AntCarousel, Object.assign({ className: dataId, "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children));
|
20
|
+
}
|
21
|
+
export const Carousel = defineComponent(AntCarousel, {
|
22
|
+
name: 'Carousel',
|
23
|
+
designerConfig: {
|
24
|
+
render({ designerProps, originalProps }) {
|
25
|
+
console.log("Carousel: designerProps:", designerProps, "originalProps:", originalProps);
|
26
|
+
return React.createElement(CarouselDesigner, Object.assign({}, designerProps, originalProps));
|
27
|
+
},
|
28
|
+
},
|
29
|
+
});
|
@@ -1,10 +1,24 @@
|
|
1
1
|
import { __rest } from "tslib";
|
2
2
|
import { defineComponent } from '@music163/tango-boot';
|
3
|
+
import { SLOT } from '@music163/tango-helpers';
|
3
4
|
import { Checkbox as AntCheckbox } from 'antd';
|
4
|
-
import React from 'react';
|
5
|
+
import React, { useRef, useEffect } from 'react';
|
5
6
|
function CheckboxDesigner(_a) {
|
6
|
-
var { style } = _a, rest = __rest(_a, ["style"]);
|
7
|
-
|
7
|
+
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 + ""]);
|
8
|
+
const checkBoxRef = useRef(null);
|
9
|
+
useEffect(() => {
|
10
|
+
Promise.resolve().then(() => {
|
11
|
+
const popoverNode = document.querySelector(`.${dataId}`);
|
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: checkBoxRef },
|
21
|
+
React.createElement(AntCheckbox, Object.assign({}, rest, { style: style, className: dataId, "data-dnd": dataDnd, "data-id": dataId }), rest.label)));
|
8
22
|
}
|
9
23
|
export const Checkbox = defineComponent(AntCheckbox, {
|
10
24
|
name: 'Checkbox',
|
@@ -1,2 +1,4 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import { CollapseProps } from 'antd';
|
2
|
+
import React from 'react';
|
3
|
+
export declare const Collapse: React.ForwardRefExoticComponent<CollapseProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
|
4
|
+
export declare const CollapsePanel: React.ForwardRefExoticComponent<import("antd").CollapsePanelProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
|
@@ -1,7 +1,31 @@
|
|
1
|
+
import { __rest } from "tslib";
|
1
2
|
import { defineComponent } from '@music163/tango-boot';
|
2
3
|
import { Collapse as AntCollapse } from 'antd';
|
4
|
+
import React, { useEffect } from 'react';
|
5
|
+
import { SLOT } from '@music163/tango-helpers';
|
6
|
+
function CollapseDesigner(_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
|
+
useEffect(() => {
|
9
|
+
Promise.resolve().then(() => {
|
10
|
+
const popoverNode = document.querySelector(`.${dataId}`);
|
11
|
+
console.log('spinNode', popoverNode);
|
12
|
+
if (popoverNode) {
|
13
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
14
|
+
popoverNode.setAttribute('data-id', dataId);
|
15
|
+
popoverNode.setAttribute('draggable', 'true');
|
16
|
+
}
|
17
|
+
});
|
18
|
+
}, [dataDnd, dataId]);
|
19
|
+
return (React.createElement(AntCollapse, Object.assign({ className: dataId, "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children));
|
20
|
+
}
|
3
21
|
export const Collapse = defineComponent(AntCollapse, {
|
4
|
-
name: 'Collapse'
|
22
|
+
name: 'Collapse',
|
23
|
+
designerConfig: {
|
24
|
+
render({ designerProps, originalProps }) {
|
25
|
+
console.log("Collapse: designerProps:", designerProps, "originalProps:", originalProps);
|
26
|
+
return React.createElement(CollapseDesigner, Object.assign({}, designerProps, originalProps));
|
27
|
+
},
|
28
|
+
},
|
5
29
|
});
|
6
30
|
export const CollapsePanel = defineComponent(AntCollapse.Panel, {
|
7
31
|
name: 'CollapsePanel',
|
@@ -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(`.${dataId}`);
|
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({ className: dataId, "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(`.${dataId}`);
|
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: dataId, "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,29 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Descriptions as AntDescriptions } from 'antd';
|
3
|
+
import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React, { useEffect } from 'react';
|
5
|
+
import { SLOT } from '@music163/tango-helpers';
|
6
|
+
function DescriptionsDesigner(_a) {
|
7
|
+
var { items } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, ["items", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
8
|
+
useEffect(() => {
|
9
|
+
Promise.resolve().then(() => {
|
10
|
+
const popoverNode = document.querySelector(`.${dataId}`);
|
11
|
+
console.log('spinNode', popoverNode);
|
12
|
+
if (popoverNode) {
|
13
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
14
|
+
popoverNode.setAttribute('data-id', dataId);
|
15
|
+
popoverNode.setAttribute('draggable', 'true');
|
16
|
+
}
|
17
|
+
});
|
18
|
+
}, [dataDnd, dataId]);
|
19
|
+
return (React.createElement(AntDescriptions, Object.assign({ className: dataId, "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), items.map((item) => (React.createElement(AntDescriptions.Item, { label: item.label, key: item.label }, item.value)))));
|
20
|
+
}
|
21
|
+
export const Descriptions = defineComponent(AntDescriptions, {
|
22
|
+
name: 'Descriptions',
|
23
|
+
designerConfig: {
|
24
|
+
render({ designerProps, originalProps }) {
|
25
|
+
console.log("Descriptions: designerProps:", designerProps, "originalProps:", originalProps);
|
26
|
+
return React.createElement(DescriptionsDesigner, Object.assign({}, designerProps, originalProps));
|
27
|
+
},
|
28
|
+
},
|
29
|
+
});
|
@@ -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(`.${dataId}`);
|
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({ className: dataId, "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
|
+
});
|
@@ -5,8 +5,7 @@ import React from 'react';
|
|
5
5
|
import { Placeholder } from './placeholder';
|
6
6
|
function DrawerDesigner(_a) {
|
7
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)));
|
8
|
+
return (React.createElement(AntDrawer, Object.assign({}, rest, { style: style }), children || React.createElement(Placeholder, null)));
|
10
9
|
}
|
11
10
|
export const Drawer = defineComponent(AntDrawer, {
|
12
11
|
name: 'Drawer',
|
@@ -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(`.${dataId}`);
|
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({ className: dataId, "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,32 @@
|
|
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
|
+
console.log("wxy-image-rest: ", Object.assign({}, rest));
|
10
|
+
useEffect(() => {
|
11
|
+
Promise.resolve().then(() => {
|
12
|
+
const popoverNode = document.querySelector(`.${dataId}`);
|
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: imageRef },
|
22
|
+
React.createElement(AntImage, Object.assign({ className: dataId, "data-dnd": dataDnd, "data-id": dataId, style: style }, rest))));
|
23
|
+
}
|
24
|
+
export const Image = defineComponent(AntImage, {
|
25
|
+
name: 'Image',
|
26
|
+
designerConfig: {
|
27
|
+
render({ designerProps, originalProps }) {
|
28
|
+
// console.log("Image: designerProps:", designerProps, "originalProps:", originalProps);
|
29
|
+
return React.createElement(ImageDesigner, Object.assign({}, designerProps, originalProps));
|
30
|
+
}
|
31
|
+
}
|
32
|
+
});
|
@@ -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,34 @@ 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';
|
59
|
+
export { Tabs } from './tabs';
|
60
|
+
export { Descriptions } from './descriptions';
|
61
|
+
export { Tree } from './tree';
|
62
|
+
export { Alert } from "./alert";
|
63
|
+
export { Progress } from './progress';
|