@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.
Files changed (100) hide show
  1. package/es/business-components/colorInput/index.js +29 -25
  2. package/es/business-components/rechargeOption/index.js +72 -55
  3. package/es/business-components/selectTag/index.d.ts +1 -1
  4. package/es/business-components/selectTag/index.js +44 -36
  5. package/es/business-components/sortModal/index.d.ts +1 -1
  6. package/es/business-components/sortModal/index.js +19 -14
  7. package/es/business-components/statistics/index.js +23 -17
  8. package/es/business-components/tagModal/index.d.ts +1 -1
  9. package/es/business-components/tagModal/index.js +16 -12
  10. package/es/business-hooks/useModal/index.d.ts +1 -1
  11. package/es/business-hooks/useModal/index.js +11 -4
  12. package/es/business-hooks/useTagModal/index.d.ts +1 -2
  13. package/es/business-hooks/useTagModal/index.js +16 -12
  14. package/es/components/ColorPicker/index.js +6 -4
  15. package/es/components/DragSort/index.d.ts +1 -2
  16. package/es/components/DragSort/index.js +39 -28
  17. package/es/components/EditorPreview/index.d.ts +1 -1
  18. package/es/components/EditorPreview/index.js +8 -3
  19. package/es/components/Iconfont/index.js +8 -2
  20. package/es/components/agreement/Detail/index.d.ts +2 -2
  21. package/es/components/agreement/Detail/index.js +15 -12
  22. package/es/components/agreement/index.js +18 -14
  23. package/es/components/avatar/index.js +8 -2
  24. package/es/components/button/index.d.ts +2 -3
  25. package/es/components/button/index.js +9 -3
  26. package/es/components/card/index.d.ts +1 -1
  27. package/es/components/card/index.js +11 -5
  28. package/es/components/checkbox/index.d.ts +2 -3
  29. package/es/components/checkbox/index.js +9 -3
  30. package/es/components/datePicker/index.d.ts +1 -2
  31. package/es/components/datePicker/index.js +8 -2
  32. package/es/components/index.d.ts +1 -1
  33. package/es/components/input/index.d.ts +5 -6
  34. package/es/components/input/index.js +12 -6
  35. package/es/components/inputNumber/index.d.ts +1 -2
  36. package/es/components/inputNumber/index.js +8 -2
  37. package/es/components/pagination/index.js +8 -1
  38. package/es/components/radio/index.d.ts +2 -3
  39. package/es/components/radio/index.js +9 -3
  40. package/es/components/select/index.d.ts +6 -2
  41. package/es/components/select/index.js +13 -2
  42. package/es/components/switch/index.js +8 -1
  43. package/es/hooks/useTableModal/index.d.ts +1 -1
  44. package/es/hooks/useTableModal/index.js +5 -2
  45. package/lib/business-components/selectTag/index.d.ts +1 -1
  46. package/lib/business-components/sortModal/index.d.ts +1 -1
  47. package/lib/business-components/tagModal/index.d.ts +1 -1
  48. package/lib/business-hooks/useModal/index.d.ts +1 -1
  49. package/lib/business-hooks/useTagModal/index.d.ts +1 -2
  50. package/lib/components/DragSort/index.d.ts +1 -2
  51. package/lib/components/DragSort/index.js +5 -6
  52. package/lib/components/EditorPreview/index.d.ts +1 -1
  53. package/lib/components/EditorPreview/index.js +1 -12
  54. package/lib/components/agreement/Detail/index.d.ts +2 -2
  55. package/lib/components/agreement/Detail/index.js +2 -2
  56. package/lib/components/button/index.d.ts +2 -3
  57. package/lib/components/button/index.js +2 -13
  58. package/lib/components/card/index.d.ts +1 -1
  59. package/lib/components/card/index.js +1 -2
  60. package/lib/components/checkbox/index.d.ts +2 -3
  61. package/lib/components/checkbox/index.js +2 -13
  62. package/lib/components/datePicker/index.d.ts +1 -2
  63. package/lib/components/datePicker/index.js +1 -12
  64. package/lib/components/index.d.ts +1 -1
  65. package/lib/components/input/index.d.ts +5 -6
  66. package/lib/components/input/index.js +5 -16
  67. package/lib/components/inputNumber/index.d.ts +1 -2
  68. package/lib/components/inputNumber/index.js +1 -12
  69. package/lib/components/radio/index.d.ts +2 -3
  70. package/lib/components/radio/index.js +2 -13
  71. package/lib/components/select/index.d.ts +6 -2
  72. package/lib/components/select/index.js +6 -12
  73. package/lib/hooks/useTableModal/index.d.ts +1 -1
  74. package/package.json +7 -16
  75. package/build/lowcode/assets-daily.json +0 -67
  76. package/build/lowcode/assets-dev.json +0 -67
  77. package/build/lowcode/assets-prod.json +0 -67
  78. package/build/lowcode/designer.html +0 -302
  79. package/build/lowcode/index.html +0 -304
  80. package/build/lowcode/index.js +0 -1
  81. package/build/lowcode/meta.js +0 -1
  82. package/build/lowcode/preview.css +0 -1
  83. package/build/lowcode/preview.html +0 -33
  84. package/build/lowcode/preview.js +0 -27
  85. package/build/lowcode/render/default/view.js +0 -20
  86. package/build/lowcode/view.js +0 -20
  87. package/es/lowcode/button/index.d.ts +0 -5
  88. package/es/lowcode/button/index.js +0 -6
  89. package/es/lowcode/checkbox/index.d.ts +0 -10
  90. package/es/lowcode/checkbox/index.js +0 -11
  91. package/es/lowcode/index.d.ts +0 -4
  92. package/es/lowcode/index.js +0 -2
  93. package/lib/lowcode/button/index.d.ts +0 -5
  94. package/lib/lowcode/button/index.js +0 -42
  95. package/lib/lowcode/checkbox/index.d.ts +0 -10
  96. package/lib/lowcode/checkbox/index.js +0 -42
  97. package/lib/lowcode/index.d.ts +0 -4
  98. package/lib/lowcode/index.js +0 -42
  99. package/lowcode/button/meta.ts +0 -324
  100. 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__*/React.createElement("div", {
13
- className: "".concat(prefix, "color-input-wrap")
14
- }, /*#__PURE__*/React.createElement(ColorPicker, {
15
- onChange: _onChange,
16
- value: value
17
- }, /*#__PURE__*/React.createElement("div", {
18
- style: {
19
- backgroundColor: value,
20
- width: colorBlockSize,
21
- height: colorBlockSize
22
- },
23
- className: "".concat(prefix, "color-block")
24
- })), /*#__PURE__*/React.createElement(Input, {
25
- value: value.replace('#', ''),
26
- prefix: '#',
27
- style: {
28
- width: 120
29
- },
30
- onChange: function onChange(e) {
31
- var reg = /^([0-9a-fA-F]{0,6})$/;
32
- if (!reg.test(e.target.value)) {
33
- return;
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
- _onChange("#".concat(e.target.value));
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__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
59
- gutter: 10,
60
- style: {
61
- marginBottom: '10px'
62
- }
63
- }, columnOption.map(function (item) {
64
- return /*#__PURE__*/React.createElement(Col, {
65
- span: item.span,
66
- key: item.label
67
- }, item.label);
68
- })), /*#__PURE__*/React.createElement(Form.List, {
69
- name: name,
70
- initialValue: [initValue]
71
- }, function (fields, _ref) {
72
- var add = _ref.add,
73
- remove = _ref.remove;
74
- return /*#__PURE__*/React.createElement(React.Fragment, null, fields.map(function (bundle, i) {
75
- return /*#__PURE__*/React.createElement(Form.Item, {
76
- key: bundle.key,
77
- noStyle: true
78
- }, /*#__PURE__*/React.createElement(Row, {
79
- gutter: 10
80
- }, columnOption.map(function (item) {
81
- return /*#__PURE__*/React.createElement(Col, {
82
- span: item.span,
83
- key: item.label
84
- }, /*#__PURE__*/React.createElement(Form.Item, {
85
- name: [bundle.name, item.field],
86
- rules: item.rules
87
- }, /*#__PURE__*/React.createElement(Input, {
88
- style: {
89
- width: '100%'
90
- }
91
- })));
92
- }), isShowEditButton && /*#__PURE__*/React.createElement(Col, {
93
- span: 3
94
- }, /*#__PURE__*/React.createElement(Button, {
95
- onClick: function onClick() {
96
- isFunction(onEditClick) && onEditClick(bundle);
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
- }, editBtnText || getText('pisell-design.recharge.option.button.edit'))), /*#__PURE__*/React.createElement(Col, {
99
- span: 2
100
- }, i !== 0 && /*#__PURE__*/React.createElement(Button, {
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>) => React.JSX.Element;
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__*/React.createElement(Tag, {
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
- }, label);
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__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Select, _extends({}, props, {
138
- value: selectValue,
139
- mode: "tags",
140
- options: options,
141
- onChange: handleSelectChange,
142
- tagRender: tagRender
143
- })), isColorSelect && /*#__PURE__*/React.createElement(DragSort, {
144
- list: value || [],
145
- droppableId: "addressSort",
146
- draggableIdKey: "value",
147
- onChange: function onChange(_list) {
148
- isFunction(_onChange) && _onChange(_list);
149
- }
150
- }, function (item, index) {
151
- return /*#__PURE__*/React.createElement("div", {
152
- key: item.value,
153
- className: "".concat(prefix, "sort-item")
154
- }, /*#__PURE__*/React.createElement(IconFont, {
155
- type: "icon-drag",
156
- className: "".concat(prefix, "icon")
157
- }), /*#__PURE__*/React.createElement("span", {
158
- className: "".concat(prefix, "sort-content")
159
- }, /*#__PURE__*/React.createElement("span", {
160
- className: "".concat(prefix, "tag-content")
161
- }, valueLabelMap[item.value])), /*#__PURE__*/React.createElement(ColorInput, {
162
- value: item.color,
163
- onChange: function onChange(val) {
164
- var _value = value ? _toConsumableArray(value) : [];
165
- _value[index].color = val;
166
- isFunction(_onChange) && _onChange(_value);
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
- }), content);
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>) => React.JSX.Element;
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__*/React.createElement("div", {
31
- key: item[field.key],
32
- className: "".concat(prefix, "sort-item")
33
- }, /*#__PURE__*/React.createElement(IconFont, {
34
- type: "icon-drag",
35
- className: "".concat(prefix, "item")
36
- }), /*#__PURE__*/React.createElement("span", {
37
- className: "".concat(prefix, "sort-content")
38
- }, isShowIndex && index + 1, /*#__PURE__*/React.createElement("span", {
39
- className: "".concat(prefix, "tag-content")
40
- }, item[field.name])));
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__*/React.createElement(DragSort, {
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
- }, isFunction(renderSortItem) ? renderSortItem : RenderSortItem);
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__*/React.createElement("div", {
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
- }, /*#__PURE__*/React.createElement("div", {
17
- className: 'pisell-statistics-options'
18
- }, options.map(function (d, i) {
19
- return /*#__PURE__*/React.createElement("div", {
20
- key: i,
21
- className: 'pisell-statistics-item'
22
- }, /*#__PURE__*/React.createElement("div", {
23
- className: 'pisell-statistics-label'
24
- }, d.label), /*#__PURE__*/React.createElement("div", {
25
- className: 'pisell-statistics-value'
26
- }, loading ? /*#__PURE__*/React.createElement(Skeleton.Input, {
27
- active: true,
28
- size: 'default'
29
- }) : d.value));
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>) => React.JSX.Element;
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__*/React.createElement(Checkbox.Group, {
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
- }, /*#__PURE__*/React.createElement(Row, {
29
- gutter: 10
30
- }, data.map(function (d, i) {
31
- return /*#__PURE__*/React.createElement(Col, {
32
- span: 8,
33
- key: i
34
- }, /*#__PURE__*/React.createElement(Checkbox, {
35
- value: d.value
36
- }, d.label));
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,
@@ -26,6 +26,6 @@ declare const useModal: (props: Partial<useModalProps>) => {
26
26
  showModal: () => void;
27
27
  hideModal: () => void;
28
28
  visible: boolean;
29
- content: React.JSX.Element;
29
+ content: import("react/jsx-runtime").JSX.Element;
30
30
  };
31
31
  export default useModal;
@@ -1,4 +1,9 @@
1
- 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); }
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__*/React.createElement(Modal, _extends({
82
+ content: /*#__PURE__*/_jsx(Modal, _objectSpread(_objectSpread({
78
83
  open: visible,
79
84
  onOk: _onOk,
80
85
  onCancel: _onCancel
81
- }, props), props.children)
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__*/React.createElement(Checkbox.Group, {
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
- }, /*#__PURE__*/React.createElement(Row, {
28
- gutter: 10
29
- }, data.map(function (d, i) {
30
- return /*#__PURE__*/React.createElement(Col, {
31
- span: 8,
32
- key: i
33
- }, /*#__PURE__*/React.createElement(Checkbox, {
34
- value: d.value
35
- }, d.label));
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