@cuvp1225/antd 0.3.64 → 0.3.65

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.
@@ -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,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AutoComplete = 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 AutoCompleteDesigner(_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 autocompleteRef = (0, react_1.useRef)(null);
12
+ (0, react_1.useEffect)(() => {
13
+ Promise.resolve().then(() => {
14
+ const popoverNode = document.querySelector('.ant-autocomplete');
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: autocompleteRef },
24
+ react_1.default.createElement(antd_1.AutoComplete, Object.assign({ className: 'ant-autocomplete', "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children)));
25
+ }
26
+ exports.AutoComplete = (0, tango_boot_1.defineComponent)(antd_1.AutoComplete, {
27
+ name: 'AutoComplete',
28
+ designerConfig: {
29
+ render({ designerProps, originalProps }) {
30
+ // console.log("AutoComplete: designerProps:", designerProps, "originalProps:", originalProps);
31
+ return react_1.default.createElement(AutoCompleteDesigner, Object.assign({}, designerProps, originalProps));
32
+ }
33
+ }
34
+ });
@@ -0,0 +1,3 @@
1
+ import { SwitchProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchProps & React.RefAttributes<HTMLElement> & 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.Switch = 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 SwitchDesigner(_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 switchRef = (0, react_1.useRef)(null);
12
+ (0, react_1.useEffect)(() => {
13
+ Promise.resolve().then(() => {
14
+ const popoverNode = document.querySelector('.ant-switch');
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: switchRef },
24
+ react_1.default.createElement(antd_1.Switch, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest))));
25
+ }
26
+ exports.Switch = (0, tango_boot_1.defineComponent)(antd_1.Switch, {
27
+ name: 'Switch',
28
+ designerConfig: {
29
+ render({ designerProps, originalProps }) {
30
+ // console.log("Switch: designerProps:", designerProps, "originalProps:", originalProps);
31
+ return react_1.default.createElement(SwitchDesigner, Object.assign({}, designerProps, originalProps));
32
+ }
33
+ }
34
+ });
@@ -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 { SwitchProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchProps & React.RefAttributes<HTMLElement> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
@@ -0,0 +1,31 @@
1
+ import { __rest } from "tslib";
2
+ import { Switch as AntSwitch } 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 SwitchDesigner(_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 switchRef = useRef(null);
9
+ useEffect(() => {
10
+ Promise.resolve().then(() => {
11
+ const popoverNode = document.querySelector('.ant-switch');
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: switchRef },
21
+ React.createElement(AntSwitch, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest))));
22
+ }
23
+ export const Switch = defineComponent(AntSwitch, {
24
+ name: 'Switch',
25
+ designerConfig: {
26
+ render({ designerProps, originalProps }) {
27
+ // console.log("Switch: designerProps:", designerProps, "originalProps:", originalProps);
28
+ return React.createElement(SwitchDesigner, Object.assign({}, designerProps, originalProps));
29
+ }
30
+ }
31
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuvp1225/antd",
3
- "version": "0.3.64",
3
+ "version": "0.3.65",
4
4
  "description": "antd components for tango app",
5
5
  "author": "wwsun <ww.sww@outlook.com>",
6
6
  "homepage": "https://github.com/netease/tango-components#readme",
@@ -54,5 +54,5 @@
54
54
  "classnames": "^2.3.2",
55
55
  "coral-system": "^1.0.6"
56
56
  },
57
- "gitHead": "a8dfb92578d4a56d7f06eb74ccac2d1e17a79fae"
57
+ "gitHead": "8e9d9f67766674e8c366bf4b796ea1cd8ff77af7"
58
58
  }