@pisell/common 0.0.4 → 0.0.5
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/es/business-components/colorInput/index.js +1 -1
- package/es/business-components/rechargeOption/index.d.ts +4 -4
- package/es/business-components/rechargeOption/index.js +17 -21
- package/es/business-components/selectTag/index.d.ts +1 -1
- package/es/business-components/selectTag/index.js +1 -2
- package/es/business-components/statistics/index.js +2 -2
- package/es/business-components/tagModal/index.js +1 -2
- package/es/business-hooks/useModal/index.js +1 -1
- package/es/business-hooks/useTagModal/index.js +2 -2
- package/es/components/ColorPicker/index.js +1 -1
- package/es/components/Iconfont/index.js +2 -1
- package/es/components/button/index.d.ts +1 -2
- package/es/components/button/index.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/lib/business-components/colorInput/index.js +2 -2
- package/lib/business-components/rechargeOption/index.d.ts +4 -4
- package/lib/business-components/rechargeOption/index.js +18 -39
- package/lib/business-components/selectTag/index.d.ts +1 -1
- package/lib/business-components/selectTag/index.js +4 -4
- package/lib/business-components/statistics/index.js +3 -3
- package/lib/business-components/tagModal/index.js +5 -5
- package/lib/business-hooks/useModal/index.js +2 -2
- package/lib/business-hooks/useTagModal/index.js +6 -6
- package/lib/components/ColorPicker/index.js +2 -2
- package/lib/components/Iconfont/index.js +2 -1
- package/lib/components/button/index.d.ts +1 -2
- package/lib/components/button/index.js +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import type { ColProps } from 'antd5/lib/col';
|
|
2
|
+
import type { FormItemProps } from 'antd5/lib/form/FormItem';
|
|
3
|
+
import type { FormListFieldData, FormListProps } from 'antd5/lib/form/FormList';
|
|
1
4
|
import React from 'react';
|
|
2
|
-
import type { ColProps } from 'antd/lib/col';
|
|
3
|
-
import type { FormListFieldData, FormListProps } from 'antd/lib/form/FormList';
|
|
4
|
-
import type { FormItemProps } from 'antd/lib/form/FormItem';
|
|
5
5
|
import type { SortModalProps } from '../sortModal';
|
|
6
|
-
import type { FormInstance } from '
|
|
6
|
+
import type { FormInstance } from 'antd5/es/form/hooks/useForm';
|
|
7
7
|
export interface RechargeOptionProps {
|
|
8
8
|
name: FormListProps['name'];
|
|
9
9
|
/** 是否展示编辑按钮 */
|
|
@@ -4,11 +4,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
import { DeleteOutlined } from '@ant-design/icons';
|
|
8
|
+
import { Button, Col, Form, Input, Row } from 'antd5';
|
|
7
9
|
import React, { useCallback, useImperativeHandle, useMemo, useRef } from 'react';
|
|
8
|
-
import { Button, Col, Form, Input, Row } from 'antd';
|
|
9
10
|
import { getUniqueId, isFunction } from "../../utils";
|
|
10
|
-
import { DeleteOutlined } from '@ant-design/icons';
|
|
11
|
-
import SortModal from "../sortModal";
|
|
12
11
|
import { getText } from "../../locales";
|
|
13
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -26,9 +25,7 @@ var RechargeOption = function RechargeOption(props) {
|
|
|
26
25
|
addBtnText = props.addBtnText,
|
|
27
26
|
editBtnText = props.editBtnText,
|
|
28
27
|
onEditClick = props.onEditClick,
|
|
29
|
-
rechargeOptionRef = props.rechargeOptionRef
|
|
30
|
-
sortModalProps = props.sortModalProps,
|
|
31
|
-
form = props.form;
|
|
28
|
+
rechargeOptionRef = props.rechargeOptionRef;
|
|
32
29
|
var sortModalRef = useRef(null);
|
|
33
30
|
var genDefaultData = useCallback(function (others) {
|
|
34
31
|
return columnOption.reduce(function (acc, cur) {
|
|
@@ -50,13 +47,19 @@ var RechargeOption = function RechargeOption(props) {
|
|
|
50
47
|
}
|
|
51
48
|
};
|
|
52
49
|
});
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
|
|
51
|
+
// const handleSortModalOk = useCallback(
|
|
52
|
+
// (list: any[]) => {
|
|
53
|
+
// form.setFieldsValue({
|
|
54
|
+
// [name as string]: list,
|
|
55
|
+
// });
|
|
56
|
+
// sortModalRef.current?.hideModal();
|
|
57
|
+
// },
|
|
58
|
+
// [name]
|
|
59
|
+
// );
|
|
60
|
+
|
|
61
|
+
return /*#__PURE__*/_jsx("div", {
|
|
62
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
60
63
|
children: [/*#__PURE__*/_jsx(Row, {
|
|
61
64
|
gutter: 10,
|
|
62
65
|
style: {
|
|
@@ -123,14 +126,7 @@ var RechargeOption = function RechargeOption(props) {
|
|
|
123
126
|
});
|
|
124
127
|
}
|
|
125
128
|
})]
|
|
126
|
-
})
|
|
127
|
-
isShowIndex: false,
|
|
128
|
-
field: sortModalProps === null || sortModalProps === void 0 ? void 0 : sortModalProps.field,
|
|
129
|
-
title: sortModalProps === null || sortModalProps === void 0 ? void 0 : sortModalProps.title,
|
|
130
|
-
items: form.getFieldValue(name) || [],
|
|
131
|
-
sortModalRef: sortModalRef,
|
|
132
|
-
onOk: handleSortModalOk
|
|
133
|
-
})]
|
|
129
|
+
})
|
|
134
130
|
});
|
|
135
131
|
};
|
|
136
132
|
export default RechargeOption;
|
|
@@ -10,7 +10,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
10
10
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
11
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
12
12
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
|
-
import { Select, Tag } from '
|
|
13
|
+
import { Select, Tag } from 'antd5';
|
|
14
14
|
import React, { useCallback, useImperativeHandle, useMemo } from 'react';
|
|
15
15
|
import { useTagModal } from "../../business-hooks";
|
|
16
16
|
import DragSort from "../../components/DragSort";
|
|
@@ -83,7 +83,6 @@ var SelectTag = function SelectTag(props) {
|
|
|
83
83
|
}),
|
|
84
84
|
content = _useTagModal.content,
|
|
85
85
|
hideModal = _useTagModal.hideModal,
|
|
86
|
-
visible = _useTagModal.visible,
|
|
87
86
|
showModal = _useTagModal.showModal;
|
|
88
87
|
useImperativeHandle(selectTagRef, function () {
|
|
89
88
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Skeleton } from 'antd';
|
|
1
|
+
import { Skeleton } from 'antd5';
|
|
3
2
|
import classNames from 'classnames';
|
|
3
|
+
import React from 'react';
|
|
4
4
|
import { useResponsive } from "../../hooks";
|
|
5
5
|
import "./index.less";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -7,8 +7,8 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
7
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
8
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
+
import { Checkbox, Col, Row } from 'antd5';
|
|
10
11
|
import React, { useImperativeHandle, useMemo } from 'react';
|
|
11
|
-
import { Checkbox, Col, Row } from 'antd';
|
|
12
12
|
import useModal from "../../business-hooks/useModal";
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
var TagModal = function TagModal(props) {
|
|
@@ -45,7 +45,6 @@ var TagModal = function TagModal(props) {
|
|
|
45
45
|
destroyOnClose: true
|
|
46
46
|
})),
|
|
47
47
|
showModal = _useModal.showModal,
|
|
48
|
-
visible = _useModal.visible,
|
|
49
48
|
hideModal = _useModal.hideModal,
|
|
50
49
|
content = _useModal.content;
|
|
51
50
|
useImperativeHandle(tagModalRef, function () {
|
|
@@ -18,7 +18,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
18
18
|
* @LastEditors: wzw 445595671@qq.com
|
|
19
19
|
* @LastEditTime: 2022-11-14 09:30
|
|
20
20
|
*/
|
|
21
|
-
import { Modal } from '
|
|
21
|
+
import { Modal } from 'antd5';
|
|
22
22
|
import React, { useState } from 'react';
|
|
23
23
|
|
|
24
24
|
/**
|
|
@@ -7,9 +7,9 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
7
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
8
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
+
import { Checkbox, Col, Row } from 'antd5';
|
|
11
|
+
import { useMemo } from 'react';
|
|
10
12
|
import useModal from "../useModal";
|
|
11
|
-
import React, { useMemo } from 'react';
|
|
12
|
-
import { Checkbox, Col, Row } from 'antd';
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
var useTagModal = function useTagModal(props) {
|
|
15
15
|
var data = props.data,
|
|
@@ -4,7 +4,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
5
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import { Popover } from '
|
|
7
|
+
import { Popover } from 'antd5';
|
|
8
8
|
import React, { useEffect, useState } from 'react';
|
|
9
9
|
//@ts-ignore
|
|
10
10
|
import { SwatchesPicker } from 'react-color';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
var _getConfig, _getConfig$ENV;
|
|
2
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
4
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -17,7 +18,7 @@ import React from 'react';
|
|
|
17
18
|
import { getConfig } from "../../config";
|
|
18
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
20
|
var MyIcon = createFromIconfontCN({
|
|
20
|
-
scriptUrl: getConfig().ENV.static + '/static/fonts/iconfont/iconfont.js?q=' + new Date().getTime() // 在 iconfont.cn 上生成
|
|
21
|
+
scriptUrl: ((_getConfig = getConfig()) === null || _getConfig === void 0 ? void 0 : (_getConfig$ENV = _getConfig.ENV) === null || _getConfig$ENV === void 0 ? void 0 : _getConfig$ENV.static) + '/static/fonts/iconfont/iconfont.js?q=' + new Date().getTime() // 在 iconfont.cn 上生成
|
|
21
22
|
});
|
|
22
23
|
|
|
23
24
|
var IconFont = function IconFont(props) {
|
|
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
import { Button } from '
|
|
7
|
+
import { Button } from 'antd5';
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
var TestButton = function TestButton(props) {
|
|
10
10
|
return /*#__PURE__*/_jsx(Button, _objectSpread({}, props));
|
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
|
@@ -32,7 +32,7 @@ __export(colorInput_exports, {
|
|
|
32
32
|
default: () => colorInput_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(colorInput_exports);
|
|
35
|
-
var
|
|
35
|
+
var import_antd5 = require("antd5");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var import_components = require("../../components");
|
|
38
38
|
var import_index = require("./index.less");
|
|
@@ -50,7 +50,7 @@ var ColorInput = (props) => {
|
|
|
50
50
|
className: `${prefix}color-block`
|
|
51
51
|
}
|
|
52
52
|
)), /* @__PURE__ */ import_react.default.createElement(
|
|
53
|
-
|
|
53
|
+
import_antd5.Input,
|
|
54
54
|
{
|
|
55
55
|
value: value.replace("#", ""),
|
|
56
56
|
prefix: "#",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import type { ColProps } from 'antd5/lib/col';
|
|
2
|
+
import type { FormItemProps } from 'antd5/lib/form/FormItem';
|
|
3
|
+
import type { FormListFieldData, FormListProps } from 'antd5/lib/form/FormList';
|
|
1
4
|
import React from 'react';
|
|
2
|
-
import type { ColProps } from 'antd/lib/col';
|
|
3
|
-
import type { FormListFieldData, FormListProps } from 'antd/lib/form/FormList';
|
|
4
|
-
import type { FormItemProps } from 'antd/lib/form/FormItem';
|
|
5
5
|
import type { SortModalProps } from '../sortModal';
|
|
6
|
-
import type { FormInstance } from '
|
|
6
|
+
import type { FormInstance } from 'antd5/es/form/hooks/useForm';
|
|
7
7
|
export interface RechargeOptionProps {
|
|
8
8
|
name: FormListProps['name'];
|
|
9
9
|
/** 是否展示编辑按钮 */
|
|
@@ -32,11 +32,10 @@ __export(rechargeOption_exports, {
|
|
|
32
32
|
default: () => rechargeOption_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(rechargeOption_exports);
|
|
35
|
+
var import_icons = require("@ant-design/icons");
|
|
36
|
+
var import_antd5 = require("antd5");
|
|
35
37
|
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_antd = require("antd");
|
|
37
38
|
var import_utils = require("../../utils");
|
|
38
|
-
var import_icons = require("@ant-design/icons");
|
|
39
|
-
var import_sortModal = __toESM(require("../sortModal"));
|
|
40
39
|
var import_locales = require("../../locales");
|
|
41
40
|
var RechargeOption = (props) => {
|
|
42
41
|
const {
|
|
@@ -46,9 +45,9 @@ var RechargeOption = (props) => {
|
|
|
46
45
|
addBtnText,
|
|
47
46
|
editBtnText,
|
|
48
47
|
onEditClick,
|
|
49
|
-
rechargeOptionRef
|
|
50
|
-
sortModalProps,
|
|
51
|
-
form
|
|
48
|
+
rechargeOptionRef
|
|
49
|
+
// sortModalProps,
|
|
50
|
+
// form,
|
|
52
51
|
} = props;
|
|
53
52
|
const sortModalRef = (0, import_react.useRef)(null);
|
|
54
53
|
const genDefaultData = (0, import_react.useCallback)(
|
|
@@ -67,30 +66,20 @@ var RechargeOption = (props) => {
|
|
|
67
66
|
(_a = sortModalRef.current) == null ? void 0 : _a.showModal();
|
|
68
67
|
}
|
|
69
68
|
}));
|
|
70
|
-
|
|
71
|
-
(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
(_a = sortModalRef.current) == null ? void 0 : _a.hideModal();
|
|
77
|
-
},
|
|
78
|
-
[name]
|
|
79
|
-
);
|
|
80
|
-
return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { gutter: 10, style: { marginBottom: "10px" } }, columnOption.map((item) => {
|
|
81
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: item.span, key: item.label }, item.label);
|
|
82
|
-
})), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.List, { name, initialValue: [initValue] }, (fields, { add, remove }) => /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, fields.map((bundle, i) => {
|
|
83
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { key: bundle.key, noStyle: true }, /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { gutter: 10 }, columnOption.map((item) => {
|
|
84
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: item.span, key: item.label }, /* @__PURE__ */ import_react.default.createElement(
|
|
85
|
-
import_antd.Form.Item,
|
|
69
|
+
return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(import_antd5.Row, { gutter: 10, style: { marginBottom: "10px" } }, columnOption.map((item) => {
|
|
70
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd5.Col, { span: item.span, key: item.label }, item.label);
|
|
71
|
+
})), /* @__PURE__ */ import_react.default.createElement(import_antd5.Form.List, { name, initialValue: [initValue] }, (fields, { add, remove }) => /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, fields.map((bundle, i) => {
|
|
72
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd5.Form.Item, { key: bundle.key, noStyle: true }, /* @__PURE__ */ import_react.default.createElement(import_antd5.Row, { gutter: 10 }, columnOption.map((item) => {
|
|
73
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd5.Col, { span: item.span, key: item.label }, /* @__PURE__ */ import_react.default.createElement(
|
|
74
|
+
import_antd5.Form.Item,
|
|
86
75
|
{
|
|
87
76
|
name: [bundle.name, item.field],
|
|
88
77
|
rules: item.rules
|
|
89
78
|
},
|
|
90
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
79
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd5.Input, { style: { width: "100%" } })
|
|
91
80
|
));
|
|
92
|
-
}), isShowEditButton && /* @__PURE__ */ import_react.default.createElement(
|
|
93
|
-
|
|
81
|
+
}), isShowEditButton && /* @__PURE__ */ import_react.default.createElement(import_antd5.Col, { span: 3 }, /* @__PURE__ */ import_react.default.createElement(
|
|
82
|
+
import_antd5.Button,
|
|
94
83
|
{
|
|
95
84
|
onClick: () => {
|
|
96
85
|
(0, import_utils.isFunction)(onEditClick) && onEditClick(bundle);
|
|
@@ -99,8 +88,8 @@ var RechargeOption = (props) => {
|
|
|
99
88
|
editBtnText || (0, import_locales.getText)(
|
|
100
89
|
"pisell-design.recharge.option.button.edit"
|
|
101
90
|
)
|
|
102
|
-
)), /* @__PURE__ */ import_react.default.createElement(
|
|
103
|
-
|
|
91
|
+
)), /* @__PURE__ */ import_react.default.createElement(import_antd5.Col, { span: 2 }, i !== 0 && /* @__PURE__ */ import_react.default.createElement(
|
|
92
|
+
import_antd5.Button,
|
|
104
93
|
{
|
|
105
94
|
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.DeleteOutlined, null),
|
|
106
95
|
onClick: () => {
|
|
@@ -109,24 +98,14 @@ var RechargeOption = (props) => {
|
|
|
109
98
|
}
|
|
110
99
|
))));
|
|
111
100
|
}), /* @__PURE__ */ import_react.default.createElement(
|
|
112
|
-
|
|
101
|
+
import_antd5.Button,
|
|
113
102
|
{
|
|
114
103
|
onClick: () => {
|
|
115
104
|
add(genDefaultData({ id: fields.length + 1 }));
|
|
116
105
|
}
|
|
117
106
|
},
|
|
118
107
|
addBtnText || (0, import_locales.getText)("pisell-design.recharge.option.button.add")
|
|
119
|
-
))))
|
|
120
|
-
import_sortModal.default,
|
|
121
|
-
{
|
|
122
|
-
isShowIndex: false,
|
|
123
|
-
field: sortModalProps == null ? void 0 : sortModalProps.field,
|
|
124
|
-
title: sortModalProps == null ? void 0 : sortModalProps.title,
|
|
125
|
-
items: form.getFieldValue(name) || [],
|
|
126
|
-
sortModalRef,
|
|
127
|
-
onOk: handleSortModalOk
|
|
128
|
-
}
|
|
129
|
-
));
|
|
108
|
+
)))));
|
|
130
109
|
};
|
|
131
110
|
var rechargeOption_default = RechargeOption;
|
|
132
111
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -32,7 +32,7 @@ __export(selectTag_exports, {
|
|
|
32
32
|
default: () => selectTag_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(selectTag_exports);
|
|
35
|
-
var
|
|
35
|
+
var import_antd5 = require("antd5");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var import_business_hooks = require("../../business-hooks");
|
|
38
38
|
var import_DragSort = __toESM(require("../../components/DragSort"));
|
|
@@ -83,7 +83,7 @@ var SelectTag = (props) => {
|
|
|
83
83
|
},
|
|
84
84
|
[isColorSelect, onChange, valueColorMap]
|
|
85
85
|
);
|
|
86
|
-
const { content, hideModal,
|
|
86
|
+
const { content, hideModal, showModal } = (0, import_business_hooks.useTagModal)({
|
|
87
87
|
value: tagValue,
|
|
88
88
|
onChange: handleTagChange,
|
|
89
89
|
data: options,
|
|
@@ -106,7 +106,7 @@ var SelectTag = (props) => {
|
|
|
106
106
|
event.stopPropagation();
|
|
107
107
|
};
|
|
108
108
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
109
|
-
|
|
109
|
+
import_antd5.Tag,
|
|
110
110
|
{
|
|
111
111
|
onMouseDown: onPreventMouseDown,
|
|
112
112
|
closable,
|
|
@@ -142,7 +142,7 @@ var SelectTag = (props) => {
|
|
|
142
142
|
}
|
|
143
143
|
}, [value, isColorSelect]);
|
|
144
144
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
145
|
-
|
|
145
|
+
import_antd5.Select,
|
|
146
146
|
{
|
|
147
147
|
...props,
|
|
148
148
|
value: selectValue,
|
|
@@ -32,9 +32,9 @@ __export(statistics_exports, {
|
|
|
32
32
|
default: () => statistics_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(statistics_exports);
|
|
35
|
-
var
|
|
36
|
-
var import_antd = require("antd");
|
|
35
|
+
var import_antd5 = require("antd5");
|
|
37
36
|
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_react = __toESM(require("react"));
|
|
38
38
|
var import_hooks = require("../../hooks");
|
|
39
39
|
var import_index = require("./index.less");
|
|
40
40
|
var Statistics = (props) => {
|
|
@@ -54,7 +54,7 @@ var Statistics = (props) => {
|
|
|
54
54
|
style: props.style
|
|
55
55
|
},
|
|
56
56
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-statistics-options" }, options.map((d, i) => {
|
|
57
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { key: i, className: "pisell-statistics-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-statistics-label" }, d.label), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-statistics-value" }, loading ? /* @__PURE__ */ import_react.default.createElement(
|
|
57
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { key: i, className: "pisell-statistics-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-statistics-label" }, d.label), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-statistics-value" }, loading ? /* @__PURE__ */ import_react.default.createElement(import_antd5.Skeleton.Input, { active: true, size: "default" }) : d.value));
|
|
58
58
|
}))
|
|
59
59
|
);
|
|
60
60
|
};
|
|
@@ -32,25 +32,25 @@ __export(tagModal_exports, {
|
|
|
32
32
|
default: () => tagModal_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(tagModal_exports);
|
|
35
|
+
var import_antd5 = require("antd5");
|
|
35
36
|
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_antd = require("antd");
|
|
37
37
|
var import_useModal = __toESM(require("../../business-hooks/useModal"));
|
|
38
38
|
var TagModal = (props) => {
|
|
39
39
|
const { data, onChange, value, tagModalRef, ...others } = props;
|
|
40
40
|
const Content = (0, import_react.useMemo)(() => {
|
|
41
41
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
42
|
-
|
|
42
|
+
import_antd5.Checkbox.Group,
|
|
43
43
|
{
|
|
44
44
|
style: { width: "100%" },
|
|
45
45
|
onChange: (val) => onChange(val),
|
|
46
46
|
value
|
|
47
47
|
},
|
|
48
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
49
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
48
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd5.Row, { gutter: 10 }, data.map((d, i) => {
|
|
49
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd5.Col, { span: 8, key: i }, /* @__PURE__ */ import_react.default.createElement(import_antd5.Checkbox, { value: d.value }, d.label));
|
|
50
50
|
}))
|
|
51
51
|
);
|
|
52
52
|
}, [data]);
|
|
53
|
-
const { showModal,
|
|
53
|
+
const { showModal, hideModal, content } = (0, import_useModal.default)({
|
|
54
54
|
...others,
|
|
55
55
|
children: Content,
|
|
56
56
|
destroyOnClose: true
|
|
@@ -32,7 +32,7 @@ __export(useModal_exports, {
|
|
|
32
32
|
default: () => useModal_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(useModal_exports);
|
|
35
|
-
var
|
|
35
|
+
var import_antd5 = require("antd5");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var useModal = (props) => {
|
|
38
38
|
const [visible, setVisible] = (0, import_react.useState)(false);
|
|
@@ -60,7 +60,7 @@ var useModal = (props) => {
|
|
|
60
60
|
showModal,
|
|
61
61
|
hideModal,
|
|
62
62
|
visible,
|
|
63
|
-
content: /* @__PURE__ */ import_react.default.createElement(
|
|
63
|
+
content: /* @__PURE__ */ import_react.default.createElement(import_antd5.Modal, { open: visible, onOk: _onOk, onCancel: _onCancel, ...props }, props.children)
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
66
|
var useModal_default = useModal;
|
|
@@ -32,21 +32,21 @@ __export(useTagModal_exports, {
|
|
|
32
32
|
default: () => useTagModal_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(useTagModal_exports);
|
|
35
|
+
var import_antd5 = require("antd5");
|
|
36
|
+
var import_react = require("react");
|
|
35
37
|
var import_useModal = __toESM(require("../useModal"));
|
|
36
|
-
var import_react = __toESM(require("react"));
|
|
37
|
-
var import_antd = require("antd");
|
|
38
38
|
var useTagModal = (props) => {
|
|
39
39
|
const { data, onChange, value, ...others } = props;
|
|
40
40
|
const Content = (0, import_react.useMemo)(() => {
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
|
|
41
|
+
return /* @__PURE__ */ React.createElement(
|
|
42
|
+
import_antd5.Checkbox.Group,
|
|
43
43
|
{
|
|
44
44
|
style: { width: "100%" },
|
|
45
45
|
onChange: (val) => onChange == null ? void 0 : onChange(val),
|
|
46
46
|
value
|
|
47
47
|
},
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
return /* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ React.createElement(import_antd5.Row, { gutter: 10 }, data.map((d, i) => {
|
|
49
|
+
return /* @__PURE__ */ React.createElement(import_antd5.Col, { span: 8, key: i }, /* @__PURE__ */ React.createElement(import_antd5.Checkbox, { value: d.value }, d.label));
|
|
50
50
|
}))
|
|
51
51
|
);
|
|
52
52
|
}, [data, value]);
|
|
@@ -32,7 +32,7 @@ __export(ColorPicker_exports, {
|
|
|
32
32
|
default: () => ColorPicker_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(ColorPicker_exports);
|
|
35
|
-
var
|
|
35
|
+
var import_antd5 = require("antd5");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var import_react_color = require("react-color");
|
|
38
38
|
var import_index = require("./index.less");
|
|
@@ -54,7 +54,7 @@ var ColorPicker = ({
|
|
|
54
54
|
setVal(value);
|
|
55
55
|
}, [value]);
|
|
56
56
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
57
|
-
|
|
57
|
+
import_antd5.Popover,
|
|
58
58
|
{
|
|
59
59
|
trigger: "click",
|
|
60
60
|
overlayClassName: "colorPickerBtn-Popover",
|
|
@@ -35,8 +35,9 @@ module.exports = __toCommonJS(Iconfont_exports);
|
|
|
35
35
|
var import_icons = require("@ant-design/icons");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var import_config = require("../../config");
|
|
38
|
+
var _a, _b;
|
|
38
39
|
var MyIcon = (0, import_icons.createFromIconfontCN)({
|
|
39
|
-
scriptUrl: (0, import_config.getConfig)().ENV.static + "/static/fonts/iconfont/iconfont.js?q=" + new Date().getTime()
|
|
40
|
+
scriptUrl: ((_b = (_a = (0, import_config.getConfig)()) == null ? void 0 : _a.ENV) == null ? void 0 : _b.static) + "/static/fonts/iconfont/iconfont.js?q=" + new Date().getTime()
|
|
40
41
|
// 在 iconfont.cn 上生成
|
|
41
42
|
});
|
|
42
43
|
var IconFont = (props) => {
|
|
@@ -22,9 +22,9 @@ __export(button_exports, {
|
|
|
22
22
|
default: () => button_default
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(button_exports);
|
|
25
|
-
var
|
|
25
|
+
var import_antd5 = require("antd5");
|
|
26
26
|
var TestButton = (props) => {
|
|
27
|
-
return /* @__PURE__ */ React.createElement(
|
|
27
|
+
return /* @__PURE__ */ React.createElement(import_antd5.Button, { ...props });
|
|
28
28
|
};
|
|
29
29
|
var button_default = TestButton;
|
|
30
30
|
// Annotate the CommonJS export names for ESM import in node:
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -20,10 +20,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
|
-
ConfigProvider: () =>
|
|
23
|
+
ConfigProvider: () => import_antd5.ConfigProvider
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(src_exports);
|
|
26
|
-
var
|
|
26
|
+
var import_antd5 = require("antd5");
|
|
27
27
|
__reExport(src_exports, require("./business-components"), module.exports);
|
|
28
28
|
__reExport(src_exports, require("./business-hooks"), module.exports);
|
|
29
29
|
__reExport(src_exports, require("./components"), module.exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/common",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "A collection of reusable UI components for web development",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": [
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
]
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"
|
|
58
|
+
"antd5": "npm:antd@^5.5.0",
|
|
59
59
|
"array-move": "^3.0.1",
|
|
60
60
|
"react-beautiful-dnd": "^13.1.0",
|
|
61
61
|
"react-color": "^2.19.3"
|