@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.
Files changed (153) hide show
  1. package/dist/designer.js +334 -15
  2. package/dist/index.js +327 -8
  3. package/lib/cjs/components/anchor.d.ts +3 -0
  4. package/lib/cjs/components/anchor.js +34 -0
  5. package/lib/cjs/components/auto-complete.d.ts +7 -0
  6. package/lib/cjs/components/auto-complete.js +34 -0
  7. package/lib/cjs/components/avatar.d.ts +3 -0
  8. package/lib/cjs/components/avatar.js +34 -0
  9. package/lib/cjs/components/badge.d.ts +3 -0
  10. package/lib/cjs/components/badge.js +34 -0
  11. package/lib/cjs/components/calendar.d.ts +3 -0
  12. package/lib/cjs/components/calendar.js +34 -0
  13. package/lib/cjs/components/card.d.ts +3 -0
  14. package/lib/cjs/components/card.js +34 -0
  15. package/lib/cjs/components/carousel.d.ts +3 -0
  16. package/lib/cjs/components/carousel.js +34 -0
  17. package/lib/cjs/components/checkbox.js +13 -2
  18. package/lib/cjs/components/comment.d.ts +3 -0
  19. package/lib/cjs/components/comment.js +36 -0
  20. package/lib/cjs/components/date-picker.d.ts +1 -1
  21. package/lib/cjs/components/date-picker.js +23 -5
  22. package/lib/cjs/components/divider.d.ts +3 -0
  23. package/lib/cjs/components/divider.js +34 -0
  24. package/lib/cjs/components/empty.d.ts +3 -0
  25. package/lib/cjs/components/empty.js +34 -0
  26. package/lib/cjs/components/image.d.ts +3 -0
  27. package/lib/cjs/components/image.js +34 -0
  28. package/lib/cjs/components/index.d.ts +29 -0
  29. package/lib/cjs/components/index.js +60 -1
  30. package/lib/cjs/components/mentions.d.ts +3 -0
  31. package/lib/cjs/components/mentions.js +34 -0
  32. package/lib/cjs/components/pageheader.d.ts +3 -0
  33. package/lib/cjs/components/pageheader.js +51 -0
  34. package/lib/cjs/components/pagination.d.ts +3 -0
  35. package/lib/cjs/components/pagination.js +34 -0
  36. package/lib/cjs/components/placeholder.js +10 -1
  37. package/lib/cjs/components/popconfirm.js +16 -26
  38. package/lib/cjs/components/popover.d.ts +3 -0
  39. package/lib/cjs/components/popover.js +40 -0
  40. package/lib/cjs/components/radio.js +22 -8
  41. package/lib/cjs/components/rate.d.ts +3 -0
  42. package/lib/cjs/components/rate.js +51 -0
  43. package/lib/cjs/components/result.d.ts +3 -0
  44. package/lib/cjs/components/result.js +51 -0
  45. package/lib/cjs/components/row.js +12 -5
  46. package/lib/cjs/components/skeleton.d.ts +3 -0
  47. package/lib/cjs/components/skeleton.js +51 -0
  48. package/lib/cjs/components/slider.d.ts +2 -0
  49. package/lib/cjs/components/slider.js +51 -0
  50. package/lib/cjs/components/spin.d.ts +3 -0
  51. package/lib/cjs/components/spin.js +34 -0
  52. package/lib/cjs/components/statistic.d.ts +3 -0
  53. package/lib/cjs/components/statistic.js +51 -0
  54. package/lib/cjs/components/switch.d.ts +3 -0
  55. package/lib/cjs/components/switch.js +34 -0
  56. package/lib/cjs/components/table.d.ts +7 -0
  57. package/lib/cjs/components/table.js +34 -0
  58. package/lib/cjs/components/tag.d.ts +3 -0
  59. package/lib/cjs/components/tag.js +34 -0
  60. package/lib/cjs/components/time-picker.d.ts +3 -0
  61. package/lib/cjs/components/time-picker.js +33 -0
  62. package/lib/cjs/components/tooltip.d.ts +2 -0
  63. package/lib/cjs/components/tooltip.js +40 -0
  64. package/lib/cjs/components/transfer.d.ts +3 -0
  65. package/lib/cjs/components/transfer.js +51 -0
  66. package/lib/cjs/components/tree-select.d.ts +7 -0
  67. package/lib/cjs/components/tree-select.js +34 -0
  68. package/lib/cjs/components/typography.js +2 -1
  69. package/lib/cjs/components/upload.d.ts +3 -0
  70. package/lib/cjs/components/upload.js +50 -0
  71. package/lib/cjs/prototypes/auto-complete.js +6 -5
  72. package/lib/cjs/prototypes/breadcrumb.js +33 -4
  73. package/lib/cjs/prototypes/divider.js +1 -1
  74. package/lib/cjs/prototypes/page-header.js +2 -1
  75. package/lib/cjs/prototypes/radio.js +11 -10
  76. package/lib/cjs/prototypes/steps.js +6 -5
  77. package/lib/cjs/prototypes/tree-select.js +7 -6
  78. package/lib/esm/components/anchor.d.ts +3 -0
  79. package/lib/esm/components/anchor.js +31 -0
  80. package/lib/esm/components/auto-complete.d.ts +7 -0
  81. package/lib/esm/components/auto-complete.js +31 -0
  82. package/lib/esm/components/avatar.d.ts +3 -0
  83. package/lib/esm/components/avatar.js +31 -0
  84. package/lib/esm/components/badge.d.ts +3 -0
  85. package/lib/esm/components/badge.js +31 -0
  86. package/lib/esm/components/calendar.d.ts +3 -0
  87. package/lib/esm/components/calendar.js +31 -0
  88. package/lib/esm/components/card.d.ts +3 -0
  89. package/lib/esm/components/card.js +31 -0
  90. package/lib/esm/components/carousel.d.ts +3 -0
  91. package/lib/esm/components/carousel.js +31 -0
  92. package/lib/esm/components/checkbox.js +13 -2
  93. package/lib/esm/components/comment.d.ts +3 -0
  94. package/lib/esm/components/comment.js +33 -0
  95. package/lib/esm/components/date-picker.d.ts +1 -1
  96. package/lib/esm/components/date-picker.js +23 -5
  97. package/lib/esm/components/divider.d.ts +3 -0
  98. package/lib/esm/components/divider.js +31 -0
  99. package/lib/esm/components/empty.d.ts +3 -0
  100. package/lib/esm/components/empty.js +31 -0
  101. package/lib/esm/components/image.d.ts +3 -0
  102. package/lib/esm/components/image.js +31 -0
  103. package/lib/esm/components/index.d.ts +29 -0
  104. package/lib/esm/components/index.js +29 -0
  105. package/lib/esm/components/mentions.d.ts +3 -0
  106. package/lib/esm/components/mentions.js +31 -0
  107. package/lib/esm/components/pageheader.d.ts +3 -0
  108. package/lib/esm/components/pageheader.js +48 -0
  109. package/lib/esm/components/pagination.d.ts +3 -0
  110. package/lib/esm/components/pagination.js +31 -0
  111. package/lib/esm/components/placeholder.js +10 -1
  112. package/lib/esm/components/popconfirm.js +17 -27
  113. package/lib/esm/components/popover.d.ts +3 -0
  114. package/lib/esm/components/popover.js +37 -0
  115. package/lib/esm/components/radio.js +22 -8
  116. package/lib/esm/components/rate.d.ts +3 -0
  117. package/lib/esm/components/rate.js +48 -0
  118. package/lib/esm/components/result.d.ts +3 -0
  119. package/lib/esm/components/result.js +48 -0
  120. package/lib/esm/components/row.js +12 -5
  121. package/lib/esm/components/skeleton.d.ts +3 -0
  122. package/lib/esm/components/skeleton.js +48 -0
  123. package/lib/esm/components/slider.d.ts +2 -0
  124. package/lib/esm/components/slider.js +48 -0
  125. package/lib/esm/components/spin.d.ts +3 -0
  126. package/lib/esm/components/spin.js +31 -0
  127. package/lib/esm/components/statistic.d.ts +3 -0
  128. package/lib/esm/components/statistic.js +48 -0
  129. package/lib/esm/components/switch.d.ts +3 -0
  130. package/lib/esm/components/switch.js +31 -0
  131. package/lib/esm/components/table.d.ts +7 -0
  132. package/lib/esm/components/table.js +31 -0
  133. package/lib/esm/components/tag.d.ts +3 -0
  134. package/lib/esm/components/tag.js +31 -0
  135. package/lib/esm/components/time-picker.d.ts +3 -0
  136. package/lib/esm/components/time-picker.js +30 -0
  137. package/lib/esm/components/tooltip.d.ts +2 -0
  138. package/lib/esm/components/tooltip.js +37 -0
  139. package/lib/esm/components/transfer.d.ts +3 -0
  140. package/lib/esm/components/transfer.js +48 -0
  141. package/lib/esm/components/tree-select.d.ts +7 -0
  142. package/lib/esm/components/tree-select.js +31 -0
  143. package/lib/esm/components/typography.js +2 -1
  144. package/lib/esm/components/upload.d.ts +3 -0
  145. package/lib/esm/components/upload.js +47 -0
  146. package/lib/esm/prototypes/auto-complete.js +6 -5
  147. package/lib/esm/prototypes/breadcrumb.js +33 -4
  148. package/lib/esm/prototypes/divider.js +1 -1
  149. package/lib/esm/prototypes/page-header.js +2 -1
  150. package/lib/esm/prototypes/radio.js +11 -10
  151. package/lib/esm/prototypes/steps.js +6 -5
  152. package/lib/esm/prototypes/tree-select.js +7 -6
  153. package/package.json +2 -2
@@ -34,16 +34,17 @@ exports.Radio = {
34
34
  initValue: '单项1',
35
35
  setter: 'textSetter',
36
36
  },
37
- {
38
- name: 'optionType',
39
- title: '选项类型',
40
- setter: 'choiceSetter',
41
- initValue: 'default',
42
- options: [
43
- { label: '默认', value: 'default' },
44
- { label: '按钮类型', value: 'button' },
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
- expressionType: 'cssObject',
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
- expressionType: 'cssObject',
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,3 @@
1
+ import { AnchorProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Anchor: React.ForwardRefExoticComponent<AnchorProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
@@ -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,3 @@
1
+ import { BadgeProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Badge: React.ForwardRefExoticComponent<BadgeProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
@@ -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,3 @@
1
+ import { CalendarProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Calendar: React.ForwardRefExoticComponent<CalendarProps<import("moment").Moment> & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
@@ -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,3 @@
1
+ import { CardProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Card: React.ForwardRefExoticComponent<Omit<CardProps & React.RefAttributes<HTMLDivElement> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
@@ -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
- return (React.createElement(AntCheckbox, Object.assign({}, rest, { style: style }), rest.label));
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,3 @@
1
+ import { CommentProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Comment: React.ForwardRefExoticComponent<CommentProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
@@ -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 React from 'react';
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
- return (React.createElement(ConfigProvider, { locale: locale },
71
- React.createElement(AntDataPicker, Object.assign({}, rest, { style: style, locale: local }))));
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,3 @@
1
+ import { DividerProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Divider: React.ForwardRefExoticComponent<DividerProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
@@ -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,3 @@
1
+ import { EmptyProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Empty: React.ForwardRefExoticComponent<EmptyProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
@@ -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,3 @@
1
+ import { ImageProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Image: React.ForwardRefExoticComponent<ImageProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
@@ -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';