@para-ui/core 4.0.24 → 4.0.25

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 (65) hide show
  1. package/AutoTips/index.js +14 -14
  2. package/Cascader/index.js +2 -2
  3. package/ComboSelect/index.js +1 -1
  4. package/CycleSelector/index.d.ts +14 -2
  5. package/CycleSelector/index.js +42 -3
  6. package/DynamicMultiBox/index.js +1 -1
  7. package/Form/index.js +2 -2
  8. package/FormItem/index.js +2 -2
  9. package/FunctionModal/index.js +2 -2
  10. package/README.md +7 -0
  11. package/Selector/index.js +325 -2
  12. package/SelectorPicker/index.js +0 -1
  13. package/Transfer/index.js +49 -43
  14. package/Tree/index.js +2 -2
  15. package/Upload/index.js +479 -756
  16. package/index.js +4 -5
  17. package/package.json +1 -1
  18. package/umd/AutoTips.js +1 -1
  19. package/umd/Breadcrumbs.js +1 -1
  20. package/umd/Button.js +1 -1
  21. package/umd/ButtonGroup.js +1 -1
  22. package/umd/Cascader.js +1 -1
  23. package/umd/ComboSelect.js +1 -1
  24. package/umd/CopyText.js +1 -1
  25. package/umd/CycleSelector.js +2 -2
  26. package/umd/DatePicker.js +1 -1
  27. package/umd/Descriptions.js +1 -1
  28. package/umd/Desktop.js +1 -1
  29. package/umd/Drawer.js +1 -1
  30. package/umd/DynamicMultiBox.js +1 -1
  31. package/umd/Form.js +1 -1
  32. package/umd/FormItem.js +1 -1
  33. package/umd/FunctionModal.js +1 -1
  34. package/umd/InputLang.js +1 -1
  35. package/umd/Menu.js +1 -1
  36. package/umd/Modal.js +1 -1
  37. package/umd/MultiBox.js +1 -1
  38. package/umd/OperateBtn.js +1 -1
  39. package/umd/PageHeader.js +1 -1
  40. package/umd/Pagination.js +1 -1
  41. package/umd/PopConfirm.js +1 -1
  42. package/umd/PopMenu.js +1 -1
  43. package/umd/QuickReply.js +1 -1
  44. package/umd/Search.js +1 -1
  45. package/umd/Select.js +1 -1
  46. package/umd/SelectInput.js +1 -1
  47. package/umd/Selector.js +1 -1
  48. package/umd/SelectorPicker.js +1 -1
  49. package/umd/SingleBox.js +1 -1
  50. package/umd/Stepper.js +1 -1
  51. package/umd/Table.js +1 -1
  52. package/umd/Tabs.js +1 -1
  53. package/umd/Tag.js +1 -1
  54. package/umd/TextField.js +1 -1
  55. package/umd/TimePicker.js +1 -1
  56. package/umd/Title.js +1 -1
  57. package/umd/ToggleButton.js +1 -1
  58. package/umd/Transfer.js +1 -1
  59. package/umd/Tree.js +1 -1
  60. package/umd/Upload.js +1 -1
  61. package/_verture/index-8ac46bd9.js +0 -327
  62. /package/_verture/{index-8cfd01fd.js → index-0eca82dc.js} +0 -0
  63. /package/_verture/{index-2a6adf4d.js → index-5f205d87.js} +0 -0
  64. /package/_verture/{index-bbe5660a.js → index-93662604.js} +0 -0
  65. /package/_verture/{modalContext-0c08a396.js → modalContext-c57b51b7.js} +0 -0
package/Transfer/index.js CHANGED
@@ -8,6 +8,7 @@ import ExpandLess from '@para-ui/icons/Up';
8
8
  import Down from '@para-ui/icons/Down';
9
9
  import { u as useFormatMessage } from '../_verture/useFormatMessage-1fc7c957.js';
10
10
  import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
11
+ import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
11
12
  import { Search } from '../Search/index.js';
12
13
  import SearchIcon from '@para-ui/icons/Search';
13
14
  import AutoTips from '../AutoTips/index.js';
@@ -27,6 +28,7 @@ import '../_verture/usePopupContainer-635f66f4.js';
27
28
  import 'dayjs';
28
29
  import '@paraview/lib';
29
30
  import '../_verture/index-ca413216.js';
31
+ import '../_verture/unsupportedIterableToArray-cb478f24.js';
30
32
  import '../TextField/index.js';
31
33
  import '../Label/index.js';
32
34
  import '../Help/index.js';
@@ -59,8 +61,8 @@ var zh = {
59
61
  };
60
62
 
61
63
  var localeJson = {
62
- zh,
63
- en
64
+ zh: zh,
65
+ en: en
64
66
  };
65
67
 
66
68
  var useClick = function useClick(callback, doubleCallback) {
@@ -88,32 +90,36 @@ var useClick = function useClick(callback, doubleCallback) {
88
90
  };
89
91
  };
90
92
 
91
- const Box = props => {
92
- const {
93
- title,
94
- data,
95
- onSearch,
96
- onchange,
97
- onMove,
98
- queryAll,
99
- inverse,
100
- direction,
101
- fluctuationPosition,
102
- fluctuationOrther,
103
- onEndSort,
104
- multiple,
105
- rightIcon,
106
- style,
107
- customKey
108
- } = props;
109
- const intl = useFormatMessage('Transfer', localeJson);
110
- const [checkCount, setCheckCount] = useState([]);
111
- const [disabledCount, setDisabledCount] = useState(0);
112
- const ref = useRef();
113
- useEffect(() => {
114
- const arr = [];
115
- let count = 0;
116
- data.forEach((item, index) => {
93
+ var Box = function Box(props) {
94
+ var title = props.title,
95
+ data = props.data,
96
+ onSearch = props.onSearch,
97
+ onchange = props.onchange,
98
+ onMove = props.onMove,
99
+ queryAll = props.queryAll,
100
+ inverse = props.inverse,
101
+ direction = props.direction,
102
+ fluctuationPosition = props.fluctuationPosition,
103
+ fluctuationOrther = props.fluctuationOrther,
104
+ onEndSort = props.onEndSort,
105
+ multiple = props.multiple,
106
+ rightIcon = props.rightIcon,
107
+ style = props.style,
108
+ customKey = props.customKey;
109
+ var intl = useFormatMessage('Transfer', localeJson);
110
+ var _useState = useState([]),
111
+ _useState2 = _slicedToArray(_useState, 2),
112
+ checkCount = _useState2[0],
113
+ setCheckCount = _useState2[1];
114
+ var _useState3 = useState(0),
115
+ _useState4 = _slicedToArray(_useState3, 2),
116
+ disabledCount = _useState4[0],
117
+ setDisabledCount = _useState4[1];
118
+ var ref = useRef();
119
+ useEffect(function () {
120
+ var arr = [];
121
+ var count = 0;
122
+ data.forEach(function (item, index) {
117
123
  if (item.checked && !item.hide) {
118
124
  arr.push(index);
119
125
  }
@@ -124,29 +130,29 @@ const Box = props => {
124
130
  setDisabledCount(count);
125
131
  setCheckCount(arr);
126
132
  }, [data]);
127
- useEffect(() => {
133
+ useEffect(function () {
128
134
  if (direction == 'right') {
129
135
  new Sortable(ref.current, {
130
136
  animation: 180,
131
137
  ghostClass: 'blue-background-class',
132
138
  dragClass: 'drag-item',
133
139
  easing: 'step-start',
134
- onEnd: evt => {
140
+ onEnd: function onEnd(evt) {
135
141
  onEndSort === null || onEndSort === void 0 ? void 0 : onEndSort(evt.oldIndex, evt.newIndex);
136
142
  }
137
143
  });
138
144
  }
139
145
  }, []);
140
- const handler = useClick((e, index, item) => {
146
+ var handler = useClick(function (e, index, item) {
141
147
  if (item.disabled) return;
142
148
  onchange(e, !item.checked, index, direction, multiple);
143
- }, (e, index, item) => {
149
+ }, function (e, index, item) {
144
150
  if (item === null || item === void 0 ? void 0 : item.disabled) return;
145
151
  onchange(e, true, index, direction, false);
146
152
  onMove(direction === 'right' ? 'left' : 'right');
147
153
  });
148
- const itemStyle = data => {
149
- const stlye = {};
154
+ var itemStyle = function itemStyle(data) {
155
+ var stlye = {};
150
156
  if (data === null || data === void 0 ? void 0 : data.tagColor) {
151
157
  stlye.borderLeft = "4px solid ".concat(data.tagColor);
152
158
  }
@@ -171,15 +177,15 @@ const Box = props => {
171
177
  showBtn: false,
172
178
  rightIcon: jsx(SearchIcon, {}),
173
179
  rightIconExist: true,
174
- onChange: val => {
180
+ onChange: function onChange(val) {
175
181
  onSearch(val, direction);
176
182
  },
177
- onClickRightIcon: val => {
183
+ onClickRightIcon: function onClickRightIcon(val) {
178
184
  onSearch(val, direction);
179
185
  },
180
- onEnter: event => {
186
+ onEnter: function onEnter(event) {
181
187
  var _a;
182
- const val = ((_a = event.target) === null || _a === void 0 ? void 0 : _a.value) || '';
188
+ var val = ((_a = event.target) === null || _a === void 0 ? void 0 : _a.value) || '';
183
189
  onSearch(val, direction);
184
190
  },
185
191
  allowClear: false
@@ -187,11 +193,11 @@ const Box = props => {
187
193
  className: "context",
188
194
  ref: ref
189
195
  }, {
190
- children: data.map((item, index) => {
196
+ children: data.map(function (item, index) {
191
197
  return jsxs("div", Object.assign({
192
198
  className: clsx('item', (item === null || item === void 0 ? void 0 : item.tagColor) && 'item-border', (item === null || item === void 0 ? void 0 : item.disabled) && 'item-disabled', (item === null || item === void 0 ? void 0 : item.checked) && 'item-checked', fluctuationPosition === index && 'item-fluctuation', fluctuationOrther === index && 'item-fluctuationOrther'),
193
199
  style: itemStyle(item),
194
- onClick: e => {
200
+ onClick: function onClick(e) {
195
201
  handler(e, index, item);
196
202
  }
197
203
  }, {
@@ -223,7 +229,7 @@ const Box = props => {
223
229
  children: [jsx(Button, Object.assign({
224
230
  variant: "text",
225
231
  className: "".concat(checkCount.length === data.length - disabledCount && data.length > 0 ? 'btn-on' : ''),
226
- onClick: () => {
232
+ onClick: function onClick() {
227
233
  queryAll(checkCount.length !== data.length - disabledCount, direction);
228
234
  }
229
235
  }, {
@@ -234,7 +240,7 @@ const Box = props => {
234
240
  variant: "text",
235
241
  className: "".concat(checkCount.length === 0 || checkCount.length === data.length - disabledCount ? 'btn-off' : ''),
236
242
  disabled: checkCount.length === 0 || checkCount.length === data.length - disabledCount,
237
- onClick: () => {
243
+ onClick: function onClick() {
238
244
  inverse(direction);
239
245
  }
240
246
  }, {
@@ -250,7 +256,7 @@ const Box = props => {
250
256
  }))]
251
257
  }));
252
258
  };
253
- const Sortablejs = Sortable;
259
+ var Sortablejs = Sortable;
254
260
 
255
261
  var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-transfer {\n display: flex;\n font-size: 14px;\n user-select: none;\n}\n.paraui-v4-transfer .blue-background-class {\n background-color: rgb(240, 245, 255);\n}\n.paraui-v4-transfer .drag-item {\n background: rgb(255, 255, 255) !important;\n box-shadow: rgba(212, 218, 227, 0.4);\n}\n.paraui-v4-transfer .box {\n border-radius: 4px;\n border: 1px solid rgb(212, 218, 227);\n overflow: hidden;\n}\n.paraui-v4-transfer .box .box-header {\n background: rgb(247, 248, 250);\n color: rgb(29, 33, 38);\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-left: 10px;\n height: 36px;\n border-bottom: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-transfer .box .count {\n color: rgb(29, 33, 38);\n letter-spacing: 1px;\n}\n.paraui-v4-transfer .box .context {\n height: 400px;\n overflow: auto;\n margin-top: 4px;\n}\n.paraui-v4-transfer .box .context .item-fluctuation {\n animation: flucturation 0.4s forwards;\n}\n.paraui-v4-transfer .box .context .item-fluctuationOrther {\n animation: flucturationOrther 0.5s forwards;\n}\n.paraui-v4-transfer .box .context .item {\n padding: 0px 10px;\n height: 30px;\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n.paraui-v4-transfer .box .context .item.item-checked:hover {\n background-color: rgb(247, 248, 250) !important;\n}\n.paraui-v4-transfer .box .context .item.item-checked > .item-label {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-transfer .box .context .item > .item-label {\n flex: 1;\n overflow: hidden;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-transfer .box .context .item:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-transfer .box .context .item.item-disabled:hover {\n background: inherit;\n cursor: no-drop;\n}\n.paraui-v4-transfer .box .context .item.item-disabled > .item-label {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-transfer .box .context .item .handle {\n margin-left: 8px;\n display: flex;\n align-content: center;\n}\n.paraui-v4-transfer .box .context .item .handle .handle-line {\n height: 12px;\n border-left: 1px solid rgb(212, 218, 227);\n margin: auto 10px auto 0;\n}\n.paraui-v4-transfer .box .context .item .handle svg {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-transfer .box .context .item .handle:hover svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-transfer .box .context .item-border {\n padding-left: 6px;\n}\n.paraui-v4-transfer .box .text-field-content {\n border: none;\n border-radius: 0;\n border-bottom: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-transfer .box .footer {\n display: flex;\n align-items: center;\n border-top: 1px solid rgb(212, 218, 227);\n height: 36px;\n justify-content: space-between;\n padding: 0 10px;\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) button {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) button:hover {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) .btn-off {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) .btn-off:hover {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) > button {\n padding: 0;\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) > button:nth-child(2) {\n margin-left: 16px;\n}\n.paraui-v4-transfer .moveBtn {\n display: flex;\n height: 500px;\n flex-direction: column;\n justify-content: center;\n margin: 0 20px;\n}\n.paraui-v4-transfer .moveBtn > button {\n background-color: rgb(46, 101, 230);\n color: rgb(255, 255, 255);\n}\n.paraui-v4-transfer .moveBtn .btn-left {\n margin-top: 16px;\n}\n\n@keyframes flucturation {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(36px);\n }\n}\n@keyframes flucturationOrther {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(-36px);\n }\n}";
256
262
  styleInject(css_248z);
package/Tree/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { T as Tree } from '../_verture/index-bbe5660a.js';
2
- export { T as default } from '../_verture/index-bbe5660a.js';
1
+ import { T as Tree } from '../_verture/index-93662604.js';
2
+ export { T as default } from '../_verture/index-93662604.js';
3
3
  import '../_verture/tslib.es6-55ed4bd2.js';
4
4
  import 'react/jsx-runtime';
5
5
  import 'react';