@cuvp1225/antd 0.3.50 → 0.3.52
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 +100 -1
- package/dist/index.js +100 -1
- 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/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/pagination.d.ts +3 -0
- package/lib/cjs/components/pagination.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/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/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/pagination.d.ts +3 -0
- package/lib/esm/components/pagination.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/package.json +2 -2
@@ -0,0 +1,34 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Card = 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
|
+
const tango_helpers_1 = require("@music163/tango-helpers");
|
9
|
+
function CardDesigner(_a) {
|
10
|
+
var { children } = _a, _b = tango_helpers_1.SLOT.dnd, dataDnd = _a[_b], _c = tango_helpers_1.SLOT.id, dataId = _a[_c], { style } = _a, rest = tslib_1.__rest(_a, ["children", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
11
|
+
const cardRef = (0, react_1.useRef)(null);
|
12
|
+
(0, react_1.useEffect)(() => {
|
13
|
+
Promise.resolve().then(() => {
|
14
|
+
const popoverNode = document.querySelector('.ant-card');
|
15
|
+
// console.log('spinNode', popoverNode);
|
16
|
+
if (popoverNode) {
|
17
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
18
|
+
popoverNode.setAttribute('data-id', dataId);
|
19
|
+
popoverNode.setAttribute('draggable', 'true');
|
20
|
+
}
|
21
|
+
});
|
22
|
+
}, [dataDnd, dataId]);
|
23
|
+
return (react_1.default.createElement("div", { ref: cardRef, draggable: 'true' },
|
24
|
+
react_1.default.createElement(antd_1.Card, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children)));
|
25
|
+
}
|
26
|
+
exports.Card = (0, tango_boot_1.defineComponent)(antd_1.Card, {
|
27
|
+
name: 'Card',
|
28
|
+
designerConfig: {
|
29
|
+
render({ designerProps, originalProps }) {
|
30
|
+
// console.log("Card: designerProps:", designerProps, "originalProps:", originalProps);
|
31
|
+
return react_1.default.createElement(CardDesigner, Object.assign({}, designerProps, originalProps));
|
32
|
+
}
|
33
|
+
}
|
34
|
+
});
|
@@ -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,34 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Carousel = 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
|
+
const tango_helpers_1 = require("@music163/tango-helpers");
|
9
|
+
function CarouselDesigner(_a) {
|
10
|
+
var { children } = _a, _b = tango_helpers_1.SLOT.dnd, dataDnd = _a[_b], _c = tango_helpers_1.SLOT.id, dataId = _a[_c], { style } = _a, rest = tslib_1.__rest(_a, ["children", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
11
|
+
const carouselRef = (0, react_1.useRef)(null);
|
12
|
+
(0, react_1.useEffect)(() => {
|
13
|
+
Promise.resolve().then(() => {
|
14
|
+
const popoverNode = document.querySelector('.ant-spin');
|
15
|
+
console.log('spinNode', popoverNode);
|
16
|
+
if (popoverNode) {
|
17
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
18
|
+
popoverNode.setAttribute('data-id', dataId);
|
19
|
+
popoverNode.setAttribute('draggable', 'true');
|
20
|
+
}
|
21
|
+
});
|
22
|
+
}, [dataDnd, dataId]);
|
23
|
+
return (react_1.default.createElement("div", { ref: carouselRef, draggable: 'true' },
|
24
|
+
react_1.default.createElement(antd_1.Carousel, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children)));
|
25
|
+
}
|
26
|
+
exports.Carousel = (0, tango_boot_1.defineComponent)(antd_1.Carousel, {
|
27
|
+
name: 'Carousel',
|
28
|
+
designerConfig: {
|
29
|
+
render({ designerProps, originalProps }) {
|
30
|
+
console.log("Carousel: designerProps:", designerProps, "originalProps:", originalProps);
|
31
|
+
return react_1.default.createElement(CarouselDesigner, Object.assign({}, designerProps, originalProps));
|
32
|
+
},
|
33
|
+
},
|
34
|
+
});
|
@@ -0,0 +1,34 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Empty = 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
|
+
const tango_helpers_1 = require("@music163/tango-helpers");
|
9
|
+
function EmptyDesigner(_a) {
|
10
|
+
var { children } = _a, _b = tango_helpers_1.SLOT.dnd, dataDnd = _a[_b], _c = tango_helpers_1.SLOT.id, dataId = _a[_c], { style } = _a, rest = tslib_1.__rest(_a, ["children", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
11
|
+
const emptyRef = (0, react_1.useRef)(null);
|
12
|
+
(0, react_1.useEffect)(() => {
|
13
|
+
Promise.resolve().then(() => {
|
14
|
+
const popoverNode = document.querySelector('.ant-empty');
|
15
|
+
// console.log('spinNode', popoverNode);
|
16
|
+
if (popoverNode) {
|
17
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
18
|
+
popoverNode.setAttribute('data-id', dataId);
|
19
|
+
popoverNode.setAttribute('draggable', 'true');
|
20
|
+
}
|
21
|
+
});
|
22
|
+
}, [dataDnd, dataId]);
|
23
|
+
return (react_1.default.createElement("div", { ref: emptyRef, draggable: 'true' },
|
24
|
+
react_1.default.createElement(antd_1.Empty, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children)));
|
25
|
+
}
|
26
|
+
exports.Empty = (0, tango_boot_1.defineComponent)(antd_1.Empty, {
|
27
|
+
name: 'Empty',
|
28
|
+
designerConfig: {
|
29
|
+
render({ designerProps, originalProps }) {
|
30
|
+
// console.log("Empty: designerProps:", designerProps, "originalProps:", originalProps);
|
31
|
+
return react_1.default.createElement(EmptyDesigner, Object.assign({}, designerProps, originalProps));
|
32
|
+
}
|
33
|
+
}
|
34
|
+
});
|
@@ -33,5 +33,14 @@ 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';
|
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';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.Spin = exports.Skeleton = exports.Upload = exports.DropdownButton = exports.Dropdown = exports.ListItem = exports.List = exports.CollapsePanel = exports.Collapse = exports.TimelineItem = exports.Timeline = exports.Menu = exports.MenuItem = exports.BreadcrumbItem = exports.Breadcrumb = exports.FormFooter = exports.FormItem = exports.Fieldset = exports.Form = exports.Cascader = exports.CheckboxGroup = exports.Checkbox = exports.RadioGroup = exports.Radio = exports.DatePicker = exports.Drawer = exports.Result = exports.Tooltip = exports.Popover = exports.Popconfirm = exports.Row1 = exports.Column = exports.Columns = exports.Text = exports.Paragraph = exports.Title = exports.Typography = exports.Space = exports.Select = exports.Modalnew = exports.Password = exports.TextArea = exports.Input = exports.InputNumber = exports.ButtonGroup = exports.Button = exports.Box = exports.When = exports.Link = exports.Each = void 0;
|
4
|
-
exports.Badge = exports.Divider = void 0;
|
4
|
+
exports.Empty = exports.Avatar = exports.Tag = exports.Card = exports.Table = exports.Pagination = exports.Badge = exports.Divider = exports.Carousel = exports.Calendar = exports.Anchor = void 0;
|
5
5
|
const tslib_1 = require("tslib");
|
6
6
|
tslib_1.__exportStar(require("antd"), exports);
|
7
7
|
//export { Each, Link, Text, When } from '@cuvp1225/foundation';
|
@@ -93,7 +93,25 @@ var skeleton_1 = require("./skeleton");
|
|
93
93
|
Object.defineProperty(exports, "Skeleton", { enumerable: true, get: function () { return skeleton_1.Skeleton; } });
|
94
94
|
var spin_1 = require("./spin");
|
95
95
|
Object.defineProperty(exports, "Spin", { enumerable: true, get: function () { return spin_1.Spin; } });
|
96
|
+
var anchor_1 = require("./anchor");
|
97
|
+
Object.defineProperty(exports, "Anchor", { enumerable: true, get: function () { return anchor_1.Anchor; } });
|
98
|
+
var calendar_1 = require("./calendar");
|
99
|
+
Object.defineProperty(exports, "Calendar", { enumerable: true, get: function () { return calendar_1.Calendar; } });
|
100
|
+
var carousel_1 = require("./carousel");
|
101
|
+
Object.defineProperty(exports, "Carousel", { enumerable: true, get: function () { return carousel_1.Carousel; } });
|
96
102
|
var divider_1 = require("./divider");
|
97
103
|
Object.defineProperty(exports, "Divider", { enumerable: true, get: function () { return divider_1.Divider; } });
|
98
104
|
var badge_1 = require("./badge");
|
99
105
|
Object.defineProperty(exports, "Badge", { enumerable: true, get: function () { return badge_1.Badge; } });
|
106
|
+
var pagination_1 = require("./pagination");
|
107
|
+
Object.defineProperty(exports, "Pagination", { enumerable: true, get: function () { return pagination_1.Pagination; } });
|
108
|
+
var table_1 = require("./table");
|
109
|
+
Object.defineProperty(exports, "Table", { enumerable: true, get: function () { return table_1.Table; } });
|
110
|
+
var card_1 = require("./card");
|
111
|
+
Object.defineProperty(exports, "Card", { enumerable: true, get: function () { return card_1.Card; } });
|
112
|
+
var tag_1 = require("./tag");
|
113
|
+
Object.defineProperty(exports, "Tag", { enumerable: true, get: function () { return tag_1.Tag; } });
|
114
|
+
var avatar_1 = require("./avatar");
|
115
|
+
Object.defineProperty(exports, "Avatar", { enumerable: true, get: function () { return avatar_1.Avatar; } });
|
116
|
+
var empty_1 = require("./empty");
|
117
|
+
Object.defineProperty(exports, "Empty", { enumerable: true, get: function () { return empty_1.Empty; } });
|
@@ -0,0 +1,34 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Pagination = 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
|
+
const tango_helpers_1 = require("@music163/tango-helpers");
|
9
|
+
function PaginationDesigner(_a) {
|
10
|
+
var _b = tango_helpers_1.SLOT.dnd, dataDnd = _a[_b], _c = tango_helpers_1.SLOT.id, dataId = _a[_c], { style } = _a, rest = tslib_1.__rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
11
|
+
const paginationRef = (0, react_1.useRef)(null);
|
12
|
+
(0, react_1.useEffect)(() => {
|
13
|
+
Promise.resolve().then(() => {
|
14
|
+
const popoverNode = document.querySelector('.ant-pagination');
|
15
|
+
// console.log('spinNode', popoverNode);
|
16
|
+
if (popoverNode) {
|
17
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
18
|
+
popoverNode.setAttribute('data-id', dataId);
|
19
|
+
popoverNode.setAttribute('draggable', 'true');
|
20
|
+
}
|
21
|
+
});
|
22
|
+
}, [dataDnd, dataId]);
|
23
|
+
return (react_1.default.createElement("div", { ref: paginationRef, draggable: 'true' },
|
24
|
+
react_1.default.createElement(antd_1.Pagination, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest))));
|
25
|
+
}
|
26
|
+
exports.Pagination = (0, tango_boot_1.defineComponent)(antd_1.Pagination, {
|
27
|
+
name: 'Pagination',
|
28
|
+
designerConfig: {
|
29
|
+
render({ designerProps, originalProps }) {
|
30
|
+
// console.log("Pagination: designerProps:", designerProps, "originalProps:", originalProps);
|
31
|
+
return react_1.default.createElement(PaginationDesigner, Object.assign({}, designerProps, originalProps));
|
32
|
+
}
|
33
|
+
}
|
34
|
+
});
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { TableProps } from 'antd';
|
2
|
+
import React from 'react';
|
3
|
+
export declare const Table: React.ForwardRefExoticComponent<Omit<TableProps<object> & {
|
4
|
+
children?: React.ReactNode;
|
5
|
+
} & {
|
6
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
7
|
+
} & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Table = 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
|
+
const tango_helpers_1 = require("@music163/tango-helpers");
|
9
|
+
function TableDesigner(_a) {
|
10
|
+
var { children, columns, dataSource } = _a, _b = tango_helpers_1.SLOT.dnd, dataDnd = _a[_b], _c = tango_helpers_1.SLOT.id, dataId = _a[_c], { style } = _a, rest = tslib_1.__rest(_a, ["children", "columns", "dataSource", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
11
|
+
const tableRef = (0, react_1.useRef)(null);
|
12
|
+
(0, react_1.useEffect)(() => {
|
13
|
+
Promise.resolve().then(() => {
|
14
|
+
const popoverNode = document.querySelector('.ant-table');
|
15
|
+
// console.log('spinNode', popoverNode);
|
16
|
+
if (popoverNode) {
|
17
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
18
|
+
popoverNode.setAttribute('data-id', dataId);
|
19
|
+
popoverNode.setAttribute('draggable', 'true');
|
20
|
+
}
|
21
|
+
});
|
22
|
+
}, [dataDnd, dataId]);
|
23
|
+
return (react_1.default.createElement("div", { ref: tableRef, draggable: 'true' },
|
24
|
+
react_1.default.createElement(antd_1.Table, Object.assign({ columns: columns, dataSource: dataSource, "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children)));
|
25
|
+
}
|
26
|
+
exports.Table = (0, tango_boot_1.defineComponent)(antd_1.Table, {
|
27
|
+
name: 'Table',
|
28
|
+
designerConfig: {
|
29
|
+
render({ designerProps, originalProps }) {
|
30
|
+
// console.log("Table: designerProps:", designerProps, "originalProps:", originalProps);
|
31
|
+
return react_1.default.createElement(TableDesigner, Object.assign({}, designerProps, originalProps));
|
32
|
+
}
|
33
|
+
}
|
34
|
+
});
|
@@ -0,0 +1,34 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Tag = 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
|
+
const tango_helpers_1 = require("@music163/tango-helpers");
|
9
|
+
function TagDesigner(_a) {
|
10
|
+
var { children } = _a, _b = tango_helpers_1.SLOT.dnd, dataDnd = _a[_b], _c = tango_helpers_1.SLOT.id, dataId = _a[_c], { style } = _a, rest = tslib_1.__rest(_a, ["children", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
11
|
+
const tagRef = (0, react_1.useRef)(null);
|
12
|
+
(0, react_1.useEffect)(() => {
|
13
|
+
Promise.resolve().then(() => {
|
14
|
+
const popoverNode = document.querySelector('.ant-tag');
|
15
|
+
// console.log('spinNode', popoverNode);
|
16
|
+
if (popoverNode) {
|
17
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
18
|
+
popoverNode.setAttribute('data-id', dataId);
|
19
|
+
popoverNode.setAttribute('draggable', 'true');
|
20
|
+
}
|
21
|
+
});
|
22
|
+
}, [dataDnd, dataId]);
|
23
|
+
return (react_1.default.createElement("div", { ref: tagRef, draggable: 'true' },
|
24
|
+
react_1.default.createElement(antd_1.Tag, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children)));
|
25
|
+
}
|
26
|
+
exports.Tag = (0, tango_boot_1.defineComponent)(antd_1.Tag, {
|
27
|
+
name: 'Tag',
|
28
|
+
designerConfig: {
|
29
|
+
render({ designerProps, originalProps }) {
|
30
|
+
// console.log("Tag: designerProps:", designerProps, "originalProps:", originalProps);
|
31
|
+
return react_1.default.createElement(TagDesigner, Object.assign({}, designerProps, originalProps));
|
32
|
+
}
|
33
|
+
}
|
34
|
+
});
|
@@ -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-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: 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,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, draggable: 'true' },
|
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 { 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-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: calendarRef, draggable: 'true' },
|
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, draggable: 'true' },
|
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-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,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,5 +33,14 @@ 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';
|
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';
|
@@ -38,5 +38,14 @@ 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';
|
46
|
+
export { Pagination } from './pagination';
|
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';
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Pagination as AntPagination } 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 PaginationDesigner(_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 paginationRef = useRef(null);
|
9
|
+
useEffect(() => {
|
10
|
+
Promise.resolve().then(() => {
|
11
|
+
const popoverNode = document.querySelector('.ant-pagination');
|
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: paginationRef, draggable: 'true' },
|
21
|
+
React.createElement(AntPagination, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest))));
|
22
|
+
}
|
23
|
+
export const Pagination = defineComponent(AntPagination, {
|
24
|
+
name: 'Pagination',
|
25
|
+
designerConfig: {
|
26
|
+
render({ designerProps, originalProps }) {
|
27
|
+
// console.log("Pagination: designerProps:", designerProps, "originalProps:", originalProps);
|
28
|
+
return React.createElement(PaginationDesigner, Object.assign({}, designerProps, originalProps));
|
29
|
+
}
|
30
|
+
}
|
31
|
+
});
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { TableProps } from 'antd';
|
2
|
+
import React from 'react';
|
3
|
+
export declare const Table: React.ForwardRefExoticComponent<Omit<TableProps<object> & {
|
4
|
+
children?: React.ReactNode;
|
5
|
+
} & {
|
6
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
7
|
+
} & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Table as AntTable } 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 TableDesigner(_a) {
|
7
|
+
var { children, columns, dataSource } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, ["children", "columns", "dataSource", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
8
|
+
const tableRef = useRef(null);
|
9
|
+
useEffect(() => {
|
10
|
+
Promise.resolve().then(() => {
|
11
|
+
const popoverNode = document.querySelector('.ant-table');
|
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: tableRef, draggable: 'true' },
|
21
|
+
React.createElement(AntTable, Object.assign({ columns: columns, dataSource: dataSource, "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children)));
|
22
|
+
}
|
23
|
+
export const Table = defineComponent(AntTable, {
|
24
|
+
name: 'Table',
|
25
|
+
designerConfig: {
|
26
|
+
render({ designerProps, originalProps }) {
|
27
|
+
// console.log("Table: designerProps:", designerProps, "originalProps:", originalProps);
|
28
|
+
return React.createElement(TableDesigner, Object.assign({}, designerProps, originalProps));
|
29
|
+
}
|
30
|
+
}
|
31
|
+
});
|