@pisell/common 0.0.15-0 → 0.0.16
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 +29 -25
- package/es/business-components/rechargeOption/index.js +72 -55
- package/es/business-components/selectTag/index.d.ts +1 -1
- package/es/business-components/selectTag/index.js +44 -36
- package/es/business-components/sortModal/index.d.ts +1 -1
- package/es/business-components/sortModal/index.js +19 -14
- package/es/business-components/statistics/index.js +23 -17
- package/es/business-components/tagModal/index.d.ts +1 -1
- package/es/business-components/tagModal/index.js +16 -12
- package/es/business-hooks/useModal/index.d.ts +1 -1
- package/es/business-hooks/useModal/index.js +11 -4
- package/es/business-hooks/useTagModal/index.d.ts +1 -2
- package/es/business-hooks/useTagModal/index.js +16 -12
- package/es/components/ColorPicker/index.js +6 -4
- package/es/components/DragSort/index.d.ts +1 -2
- package/es/components/DragSort/index.js +39 -28
- package/es/components/EditorPreview/index.d.ts +1 -1
- package/es/components/EditorPreview/index.js +8 -3
- package/es/components/Iconfont/index.js +8 -2
- package/es/components/agreement/Detail/index.d.ts +2 -2
- package/es/components/agreement/Detail/index.js +15 -12
- package/es/components/agreement/index.js +18 -14
- package/es/components/avatar/index.js +8 -2
- package/es/components/button/index.d.ts +2 -3
- package/es/components/button/index.js +9 -3
- package/es/components/card/index.d.ts +1 -1
- package/es/components/card/index.js +11 -5
- package/es/components/checkbox/index.d.ts +2 -3
- package/es/components/checkbox/index.js +9 -3
- package/es/components/datePicker/index.d.ts +1 -2
- package/es/components/datePicker/index.js +8 -2
- package/es/components/index.d.ts +1 -1
- package/es/components/input/index.d.ts +5 -6
- package/es/components/input/index.js +12 -6
- package/es/components/inputNumber/index.d.ts +1 -2
- package/es/components/inputNumber/index.js +8 -2
- package/es/components/pagination/index.js +8 -1
- package/es/components/radio/index.d.ts +2 -3
- package/es/components/radio/index.js +9 -3
- package/es/components/select/index.d.ts +6 -2
- package/es/components/select/index.js +13 -2
- package/es/components/switch/index.js +8 -1
- package/es/hooks/useTableModal/index.d.ts +1 -1
- package/es/hooks/useTableModal/index.js +5 -2
- package/lib/business-components/selectTag/index.d.ts +1 -1
- package/lib/business-components/sortModal/index.d.ts +1 -1
- package/lib/business-components/tagModal/index.d.ts +1 -1
- package/lib/business-hooks/useModal/index.d.ts +1 -1
- package/lib/business-hooks/useTagModal/index.d.ts +1 -2
- package/lib/components/DragSort/index.d.ts +1 -2
- package/lib/components/DragSort/index.js +5 -6
- package/lib/components/EditorPreview/index.d.ts +1 -1
- package/lib/components/EditorPreview/index.js +1 -12
- package/lib/components/agreement/Detail/index.d.ts +2 -2
- package/lib/components/agreement/Detail/index.js +2 -2
- package/lib/components/button/index.d.ts +2 -3
- package/lib/components/button/index.js +2 -13
- package/lib/components/card/index.d.ts +1 -1
- package/lib/components/card/index.js +1 -2
- package/lib/components/checkbox/index.d.ts +2 -3
- package/lib/components/checkbox/index.js +2 -13
- package/lib/components/datePicker/index.d.ts +1 -2
- package/lib/components/datePicker/index.js +1 -12
- package/lib/components/index.d.ts +1 -1
- package/lib/components/input/index.d.ts +5 -6
- package/lib/components/input/index.js +5 -16
- package/lib/components/inputNumber/index.d.ts +1 -2
- package/lib/components/inputNumber/index.js +1 -12
- package/lib/components/radio/index.d.ts +2 -3
- package/lib/components/radio/index.js +2 -13
- package/lib/components/select/index.d.ts +6 -2
- package/lib/components/select/index.js +6 -12
- package/lib/hooks/useTableModal/index.d.ts +1 -1
- package/package.json +7 -16
- package/build/lowcode/assets-daily.json +0 -67
- package/build/lowcode/assets-dev.json +0 -67
- package/build/lowcode/assets-prod.json +0 -67
- package/build/lowcode/designer.html +0 -302
- package/build/lowcode/index.html +0 -304
- package/build/lowcode/index.js +0 -1
- package/build/lowcode/meta.js +0 -1
- package/build/lowcode/preview.css +0 -1
- package/build/lowcode/preview.html +0 -33
- package/build/lowcode/preview.js +0 -27
- package/build/lowcode/render/default/view.js +0 -20
- package/build/lowcode/view.js +0 -20
- package/es/lowcode/button/index.d.ts +0 -5
- package/es/lowcode/button/index.js +0 -6
- package/es/lowcode/checkbox/index.d.ts +0 -10
- package/es/lowcode/checkbox/index.js +0 -11
- package/es/lowcode/index.d.ts +0 -4
- package/es/lowcode/index.js +0 -2
- package/lib/lowcode/button/index.d.ts +0 -5
- package/lib/lowcode/button/index.js +0 -42
- package/lib/lowcode/checkbox/index.d.ts +0 -10
- package/lib/lowcode/checkbox/index.js +0 -42
- package/lib/lowcode/index.d.ts +0 -4
- package/lib/lowcode/index.js +0 -42
- package/lowcode/button/meta.ts +0 -324
- package/lowcode/checkbox/meta.ts +0 -92
|
@@ -2,6 +2,8 @@ import { Input } from 'antd5';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ColorPicker } from "../../components";
|
|
4
4
|
import "./index.less";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
7
|
var prefix = 'pisell-';
|
|
6
8
|
var ColorInput = function ColorInput(props) {
|
|
7
9
|
var _props$value = props.value,
|
|
@@ -9,31 +11,33 @@ var ColorInput = function ColorInput(props) {
|
|
|
9
11
|
_onChange = props.onChange,
|
|
10
12
|
_props$colorBlockSize = props.colorBlockSize,
|
|
11
13
|
colorBlockSize = _props$colorBlockSize === void 0 ? 30 : _props$colorBlockSize;
|
|
12
|
-
return /*#__PURE__*/
|
|
13
|
-
className: "".concat(prefix, "color-input-wrap")
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
14
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
15
|
+
className: "".concat(prefix, "color-input-wrap"),
|
|
16
|
+
children: [/*#__PURE__*/_jsx(ColorPicker, {
|
|
17
|
+
onChange: _onChange,
|
|
18
|
+
value: value,
|
|
19
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
20
|
+
style: {
|
|
21
|
+
backgroundColor: value,
|
|
22
|
+
width: colorBlockSize,
|
|
23
|
+
height: colorBlockSize
|
|
24
|
+
},
|
|
25
|
+
className: "".concat(prefix, "color-block")
|
|
26
|
+
})
|
|
27
|
+
}), /*#__PURE__*/_jsx(Input, {
|
|
28
|
+
value: value.replace('#', ''),
|
|
29
|
+
prefix: '#',
|
|
30
|
+
style: {
|
|
31
|
+
width: 120
|
|
32
|
+
},
|
|
33
|
+
onChange: function onChange(e) {
|
|
34
|
+
var reg = /^([0-9a-fA-F]{0,6})$/;
|
|
35
|
+
if (!reg.test(e.target.value)) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
_onChange("#".concat(e.target.value));
|
|
34
39
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}));
|
|
40
|
+
})]
|
|
41
|
+
});
|
|
38
42
|
};
|
|
39
43
|
export default ColorInput;
|
|
@@ -9,6 +9,9 @@ import { Button, Col, Form, Input, Row } from 'antd5';
|
|
|
9
9
|
import React, { useCallback, useImperativeHandle, useMemo, useRef } from 'react';
|
|
10
10
|
import { getUniqueId, isFunction } from "../../utils";
|
|
11
11
|
import { getText } from "../../locales";
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
12
15
|
/**
|
|
13
16
|
* 类充值选项组件
|
|
14
17
|
* @param props
|
|
@@ -55,61 +58,75 @@ var RechargeOption = function RechargeOption(props) {
|
|
|
55
58
|
// [name]
|
|
56
59
|
// );
|
|
57
60
|
|
|
58
|
-
return /*#__PURE__*/
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
61
|
+
return /*#__PURE__*/_jsx("div", {
|
|
62
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
63
|
+
children: [/*#__PURE__*/_jsx(Row, {
|
|
64
|
+
gutter: 10,
|
|
65
|
+
style: {
|
|
66
|
+
marginBottom: '10px'
|
|
67
|
+
},
|
|
68
|
+
children: columnOption.map(function (item) {
|
|
69
|
+
return /*#__PURE__*/_jsx(Col, {
|
|
70
|
+
span: item.span,
|
|
71
|
+
children: item.label
|
|
72
|
+
}, item.label);
|
|
73
|
+
})
|
|
74
|
+
}), /*#__PURE__*/_jsx(Form.List, {
|
|
75
|
+
name: name,
|
|
76
|
+
initialValue: [initValue],
|
|
77
|
+
children: function children(fields, _ref) {
|
|
78
|
+
var add = _ref.add,
|
|
79
|
+
remove = _ref.remove;
|
|
80
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
81
|
+
children: [fields.map(function (bundle, i) {
|
|
82
|
+
return /*#__PURE__*/_jsx(Form.Item, {
|
|
83
|
+
noStyle: true,
|
|
84
|
+
children: /*#__PURE__*/_jsxs(Row, {
|
|
85
|
+
gutter: 10,
|
|
86
|
+
children: [columnOption.map(function (item) {
|
|
87
|
+
return /*#__PURE__*/_jsx(Col, {
|
|
88
|
+
span: item.span,
|
|
89
|
+
children: /*#__PURE__*/_jsx(Form.Item, {
|
|
90
|
+
name: [bundle.name, item.field],
|
|
91
|
+
rules: item.rules,
|
|
92
|
+
children: /*#__PURE__*/_jsx(Input, {
|
|
93
|
+
style: {
|
|
94
|
+
width: '100%'
|
|
95
|
+
}
|
|
96
|
+
})
|
|
97
|
+
})
|
|
98
|
+
}, item.label);
|
|
99
|
+
}), isShowEditButton && /*#__PURE__*/_jsx(Col, {
|
|
100
|
+
span: 3,
|
|
101
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
102
|
+
onClick: function onClick() {
|
|
103
|
+
isFunction(onEditClick) && onEditClick(bundle);
|
|
104
|
+
},
|
|
105
|
+
children: editBtnText || getText('pisell-design.recharge.option.button.edit')
|
|
106
|
+
})
|
|
107
|
+
}), /*#__PURE__*/_jsx(Col, {
|
|
108
|
+
span: 2,
|
|
109
|
+
children: i !== 0 && /*#__PURE__*/_jsx(Button, {
|
|
110
|
+
icon: /*#__PURE__*/_jsx(DeleteOutlined, {}),
|
|
111
|
+
onClick: function onClick() {
|
|
112
|
+
remove(bundle.name);
|
|
113
|
+
}
|
|
114
|
+
})
|
|
115
|
+
})]
|
|
116
|
+
})
|
|
117
|
+
}, bundle.key);
|
|
118
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
119
|
+
onClick: function onClick() {
|
|
120
|
+
add(genDefaultData({
|
|
121
|
+
id: fields.length + 1
|
|
122
|
+
}));
|
|
123
|
+
},
|
|
124
|
+
children: addBtnText || getText('pisell-design.recharge.option.button.add')
|
|
125
|
+
})]
|
|
126
|
+
});
|
|
97
127
|
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
icon: /*#__PURE__*/React.createElement(DeleteOutlined, null),
|
|
102
|
-
onClick: function onClick() {
|
|
103
|
-
remove(bundle.name);
|
|
104
|
-
}
|
|
105
|
-
}))));
|
|
106
|
-
}), /*#__PURE__*/React.createElement(Button, {
|
|
107
|
-
onClick: function onClick() {
|
|
108
|
-
add(genDefaultData({
|
|
109
|
-
id: fields.length + 1
|
|
110
|
-
}));
|
|
111
|
-
}
|
|
112
|
-
}, addBtnText || getText('pisell-design.recharge.option.button.add')));
|
|
113
|
-
})));
|
|
128
|
+
})]
|
|
129
|
+
})
|
|
130
|
+
});
|
|
114
131
|
};
|
|
115
132
|
export default RechargeOption;
|
|
@@ -21,5 +21,5 @@ export interface SelectTagProps<T> extends Omit<SelectProps, 'options'> {
|
|
|
21
21
|
label: string;
|
|
22
22
|
}[];
|
|
23
23
|
}
|
|
24
|
-
declare const SelectTag: <T extends Value>(props: SelectTagProps<T>) =>
|
|
24
|
+
declare const SelectTag: <T extends Value>(props: SelectTagProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
25
25
|
export default SelectTag;
|
|
@@ -5,7 +5,6 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
5
5
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
6
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
7
7
|
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; }
|
|
8
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
9
8
|
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; }
|
|
10
9
|
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; }
|
|
11
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; }
|
|
@@ -20,6 +19,9 @@ import { getText } from "../../locales";
|
|
|
20
19
|
import { isArr, isFunction, isNumber, isString } from "../../utils";
|
|
21
20
|
import ColorInput from "../colorInput";
|
|
22
21
|
import "./index.less";
|
|
22
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
23
25
|
var defaultColor = '#000';
|
|
24
26
|
var prefix = 'pisell-';
|
|
25
27
|
var SelectTag = function SelectTag(props) {
|
|
@@ -97,15 +99,16 @@ var SelectTag = function SelectTag(props) {
|
|
|
97
99
|
event.preventDefault();
|
|
98
100
|
event.stopPropagation();
|
|
99
101
|
};
|
|
100
|
-
return /*#__PURE__*/
|
|
102
|
+
return /*#__PURE__*/_jsx(Tag, {
|
|
101
103
|
onMouseDown: onPreventMouseDown,
|
|
102
104
|
closable: closable,
|
|
103
105
|
onClose: onClose,
|
|
104
106
|
className: "".concat(prefix, "select-tag"),
|
|
105
107
|
style: {
|
|
106
108
|
color: valueColorMap[value] || defaultColor
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
+
},
|
|
110
|
+
children: label
|
|
111
|
+
});
|
|
109
112
|
};
|
|
110
113
|
var handleSelectChange = useCallback(function (val) {
|
|
111
114
|
var newVal = val;
|
|
@@ -134,38 +137,43 @@ var SelectTag = function SelectTag(props) {
|
|
|
134
137
|
});
|
|
135
138
|
}
|
|
136
139
|
}, [value, isColorSelect]);
|
|
137
|
-
return /*#__PURE__*/
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
140
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
141
|
+
children: [/*#__PURE__*/_jsx(Select, _objectSpread(_objectSpread({}, props), {}, {
|
|
142
|
+
value: selectValue,
|
|
143
|
+
mode: "tags",
|
|
144
|
+
options: options,
|
|
145
|
+
onChange: handleSelectChange,
|
|
146
|
+
tagRender: tagRender
|
|
147
|
+
})), isColorSelect && /*#__PURE__*/_jsx(DragSort, {
|
|
148
|
+
list: value || [],
|
|
149
|
+
droppableId: "addressSort",
|
|
150
|
+
draggableIdKey: "value",
|
|
151
|
+
onChange: function onChange(_list) {
|
|
152
|
+
isFunction(_onChange) && _onChange(_list);
|
|
153
|
+
},
|
|
154
|
+
children: function children(item, index) {
|
|
155
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
156
|
+
className: "".concat(prefix, "sort-item"),
|
|
157
|
+
children: [/*#__PURE__*/_jsx(IconFont, {
|
|
158
|
+
type: "icon-drag",
|
|
159
|
+
className: "".concat(prefix, "icon")
|
|
160
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
161
|
+
className: "".concat(prefix, "sort-content"),
|
|
162
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
163
|
+
className: "".concat(prefix, "tag-content"),
|
|
164
|
+
children: valueLabelMap[item.value]
|
|
165
|
+
})
|
|
166
|
+
}), /*#__PURE__*/_jsx(ColorInput, {
|
|
167
|
+
value: item.color,
|
|
168
|
+
onChange: function onChange(val) {
|
|
169
|
+
var _value = value ? _toConsumableArray(value) : [];
|
|
170
|
+
_value[index].color = val;
|
|
171
|
+
isFunction(_onChange) && _onChange(_value);
|
|
172
|
+
}
|
|
173
|
+
})]
|
|
174
|
+
}, item.value);
|
|
167
175
|
}
|
|
168
|
-
})
|
|
169
|
-
})
|
|
176
|
+
}), content]
|
|
177
|
+
});
|
|
170
178
|
};
|
|
171
179
|
export default SelectTag;
|
|
@@ -26,5 +26,5 @@ export interface SortModalProps<T> {
|
|
|
26
26
|
hideModal: () => void;
|
|
27
27
|
}>;
|
|
28
28
|
}
|
|
29
|
-
declare const SortModal: <T extends Record<string, any>>(props: SortModalProps<T>) =>
|
|
29
|
+
declare const SortModal: <T extends Record<string, any>>(props: SortModalProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
export default SortModal;
|
|
@@ -9,6 +9,8 @@ import { isFunction } from "../../utils";
|
|
|
9
9
|
import useModal from "../../business-hooks/useModal";
|
|
10
10
|
import { DragSort, IconFont } from "../../components";
|
|
11
11
|
import "./index.less";
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
14
|
var prefix = 'pisell-';
|
|
13
15
|
var SortModal = function SortModal(props) {
|
|
14
16
|
var title = props.title,
|
|
@@ -27,28 +29,31 @@ var SortModal = function SortModal(props) {
|
|
|
27
29
|
setSortItems(items);
|
|
28
30
|
}, [items]);
|
|
29
31
|
var RenderSortItem = useCallback(function (item, index) {
|
|
30
|
-
return /*#__PURE__*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
33
|
+
className: "".concat(prefix, "sort-item"),
|
|
34
|
+
children: [/*#__PURE__*/_jsx(IconFont, {
|
|
35
|
+
type: "icon-drag",
|
|
36
|
+
className: "".concat(prefix, "item")
|
|
37
|
+
}), /*#__PURE__*/_jsxs("span", {
|
|
38
|
+
className: "".concat(prefix, "sort-content"),
|
|
39
|
+
children: [isShowIndex && index + 1, /*#__PURE__*/_jsx("span", {
|
|
40
|
+
className: "".concat(prefix, "tag-content"),
|
|
41
|
+
children: item[field.name]
|
|
42
|
+
})]
|
|
43
|
+
})]
|
|
44
|
+
}, item[field.key]);
|
|
41
45
|
}, [props]);
|
|
42
46
|
var ModalContent = useMemo(function () {
|
|
43
|
-
var content = /*#__PURE__*/
|
|
47
|
+
var content = /*#__PURE__*/_jsx(DragSort, {
|
|
44
48
|
list: sortItems,
|
|
45
49
|
droppableId: "addressSort",
|
|
46
50
|
draggableIdKey: field.id,
|
|
47
51
|
className: "".concat(prefix, "sort-list"),
|
|
48
52
|
onChange: function onChange(_list) {
|
|
49
53
|
setSortItems(_list);
|
|
50
|
-
}
|
|
51
|
-
|
|
54
|
+
},
|
|
55
|
+
children: isFunction(renderSortItem) ? renderSortItem : RenderSortItem
|
|
56
|
+
});
|
|
52
57
|
if (isFunction(renderContent)) {
|
|
53
58
|
return renderContent(sortItems, content);
|
|
54
59
|
}
|
|
@@ -3,30 +3,36 @@ import classNames from 'classnames';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { useResponsive } from "../../hooks";
|
|
5
5
|
import "./index.less";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
8
|
var Statistics = function Statistics(props) {
|
|
7
9
|
var loading = props.loading,
|
|
8
10
|
_props$options = props.options,
|
|
9
11
|
options = _props$options === void 0 ? [] : _props$options;
|
|
10
12
|
var responsive = useResponsive();
|
|
11
|
-
return /*#__PURE__*/
|
|
13
|
+
return /*#__PURE__*/_jsx("div", {
|
|
12
14
|
className: classNames('pisell-statistics', 'pisell-scrollbar', props.className, {
|
|
13
15
|
'phone-wrap': responsive === 'phone'
|
|
14
16
|
}),
|
|
15
|
-
style: props.style
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
17
|
+
style: props.style,
|
|
18
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
19
|
+
className: 'pisell-statistics-options',
|
|
20
|
+
children: options.map(function (d, i) {
|
|
21
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
22
|
+
className: 'pisell-statistics-item',
|
|
23
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
24
|
+
className: 'pisell-statistics-label',
|
|
25
|
+
children: d.label
|
|
26
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
27
|
+
className: 'pisell-statistics-value',
|
|
28
|
+
children: loading ? /*#__PURE__*/_jsx(Skeleton.Input, {
|
|
29
|
+
active: true,
|
|
30
|
+
size: 'default'
|
|
31
|
+
}) : d.value
|
|
32
|
+
})]
|
|
33
|
+
}, i);
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
});
|
|
31
37
|
};
|
|
32
38
|
export default Statistics;
|
|
@@ -13,5 +13,5 @@ export interface TagModalProps<T> extends useModalProps {
|
|
|
13
13
|
hideModal: () => void;
|
|
14
14
|
}>;
|
|
15
15
|
}
|
|
16
|
-
declare const TagModal: <T extends string | number>(props: TagModalProps<T>) =>
|
|
16
|
+
declare const TagModal: <T extends string | number>(props: TagModalProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export default TagModal;
|
|
@@ -10,6 +10,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
10
10
|
import { Checkbox, Col, Row } from 'antd5';
|
|
11
11
|
import React, { useImperativeHandle, useMemo } from 'react';
|
|
12
12
|
import useModal from "../../business-hooks/useModal";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
var TagModal = function TagModal(props) {
|
|
14
15
|
var data = props.data,
|
|
15
16
|
_onChange = props.onChange,
|
|
@@ -17,24 +18,27 @@ var TagModal = function TagModal(props) {
|
|
|
17
18
|
tagModalRef = props.tagModalRef,
|
|
18
19
|
others = _objectWithoutProperties(props, _excluded);
|
|
19
20
|
var Content = useMemo(function () {
|
|
20
|
-
return /*#__PURE__*/
|
|
21
|
+
return /*#__PURE__*/_jsx(Checkbox.Group, {
|
|
21
22
|
style: {
|
|
22
23
|
width: '100%'
|
|
23
24
|
},
|
|
24
25
|
onChange: function onChange(val) {
|
|
25
26
|
return _onChange(val);
|
|
26
27
|
},
|
|
27
|
-
value: value
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
value: value,
|
|
29
|
+
children: /*#__PURE__*/_jsx(Row, {
|
|
30
|
+
gutter: 10,
|
|
31
|
+
children: data.map(function (d, i) {
|
|
32
|
+
return /*#__PURE__*/_jsx(Col, {
|
|
33
|
+
span: 8,
|
|
34
|
+
children: /*#__PURE__*/_jsx(Checkbox, {
|
|
35
|
+
value: d.value,
|
|
36
|
+
children: d.label
|
|
37
|
+
})
|
|
38
|
+
}, i);
|
|
39
|
+
})
|
|
40
|
+
})
|
|
41
|
+
});
|
|
38
42
|
}, [data]);
|
|
39
43
|
var _useModal = useModal(_objectSpread(_objectSpread({}, others), {}, {
|
|
40
44
|
children: Content,
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
function
|
|
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
|
+
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
|
+
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
|
+
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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); }
|
|
2
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
9
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -21,7 +26,7 @@ import React, { useState } from 'react';
|
|
|
21
26
|
* @Describe: 其余参数与Modal一致
|
|
22
27
|
* @Author: Wzw
|
|
23
28
|
*/
|
|
24
|
-
|
|
29
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
30
|
var useModal = function useModal(props) {
|
|
26
31
|
var _useState = useState(false),
|
|
27
32
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -74,11 +79,13 @@ var useModal = function useModal(props) {
|
|
|
74
79
|
showModal: showModal,
|
|
75
80
|
hideModal: hideModal,
|
|
76
81
|
visible: visible,
|
|
77
|
-
content: /*#__PURE__*/
|
|
82
|
+
content: /*#__PURE__*/_jsx(Modal, _objectSpread(_objectSpread({
|
|
78
83
|
open: visible,
|
|
79
84
|
onOk: _onOk,
|
|
80
85
|
onCancel: _onCancel
|
|
81
|
-
}, props),
|
|
86
|
+
}, props), {}, {
|
|
87
|
+
children: props.children
|
|
88
|
+
}))
|
|
82
89
|
};
|
|
83
90
|
};
|
|
84
91
|
export default useModal;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { useModalProps } from '../useModal';
|
|
3
2
|
export interface TagDataType<T> {
|
|
4
3
|
value: T;
|
|
@@ -13,6 +12,6 @@ declare const useTagModal: <T extends string | number>(props: UseTagModalProps<T
|
|
|
13
12
|
showModal: () => void;
|
|
14
13
|
hideModal: () => void;
|
|
15
14
|
visible: boolean;
|
|
16
|
-
content: import("react").JSX.Element;
|
|
15
|
+
content: import("react/jsx-runtime").JSX.Element;
|
|
17
16
|
};
|
|
18
17
|
export default useTagModal;
|
|
@@ -10,30 +10,34 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
10
10
|
import { Checkbox, Col, Row } from 'antd5';
|
|
11
11
|
import { useMemo } from 'react';
|
|
12
12
|
import useModal from "../useModal";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
var useTagModal = function useTagModal(props) {
|
|
14
15
|
var data = props.data,
|
|
15
16
|
_onChange = props.onChange,
|
|
16
17
|
value = props.value,
|
|
17
18
|
others = _objectWithoutProperties(props, _excluded);
|
|
18
19
|
var Content = useMemo(function () {
|
|
19
|
-
return /*#__PURE__*/
|
|
20
|
+
return /*#__PURE__*/_jsx(Checkbox.Group, {
|
|
20
21
|
style: {
|
|
21
22
|
width: '100%'
|
|
22
23
|
},
|
|
23
24
|
onChange: function onChange(val) {
|
|
24
25
|
return _onChange === null || _onChange === void 0 ? void 0 : _onChange(val);
|
|
25
26
|
},
|
|
26
|
-
value: value
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
value: value,
|
|
28
|
+
children: /*#__PURE__*/_jsx(Row, {
|
|
29
|
+
gutter: 10,
|
|
30
|
+
children: data.map(function (d, i) {
|
|
31
|
+
return /*#__PURE__*/_jsx(Col, {
|
|
32
|
+
span: 8,
|
|
33
|
+
children: /*#__PURE__*/_jsx(Checkbox, {
|
|
34
|
+
value: d.value,
|
|
35
|
+
children: d.label
|
|
36
|
+
})
|
|
37
|
+
}, i);
|
|
38
|
+
})
|
|
39
|
+
})
|
|
40
|
+
});
|
|
37
41
|
}, [data, value]);
|
|
38
42
|
var modalResult = useModal(_objectSpread(_objectSpread({}, others), {}, {
|
|
39
43
|
children: Content
|