@para-ui/core 4.0.29 → 4.0.30

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/Selector/index.js CHANGED
@@ -2,7 +2,7 @@ import { a as __awaiter, _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
2
2
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
3
  import { useState, useRef, useEffect, Fragment as Fragment$1 } from 'react';
4
4
  import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
5
- import { _ as _typeof } from '../_verture/typeof-6ec38efd.js';
5
+ import { r as regenerator } from '../_verture/index-8ac46bd9.js';
6
6
  import { Radio } from '../Radio/index.js';
7
7
  import { Checkbox } from '../Checkbox/index.js';
8
8
  import { Popover } from '../Popover/index.js';
@@ -20,6 +20,7 @@ import Refresh from '@para-ui/icons/Refresh';
20
20
  import { ArrayToObject, Get, Post, Cancel } from '@paraview/lib';
21
21
  import { u as useGlobalProps } from '../_verture/useGlobalProps-4ae1a007.js';
22
22
  import '../_verture/unsupportedIterableToArray-cb478f24.js';
23
+ import '../_verture/typeof-6ec38efd.js';
23
24
  import '../Label/index.js';
24
25
  import '../Help/index.js';
25
26
  import '../Tooltip/index.js';
@@ -42,330 +43,6 @@ import 'dayjs';
42
43
  import '@para-ui/icons/More';
43
44
  import '@para-ui/icons/Return';
44
45
 
45
- var regeneratorRuntime$1 = {exports: {}};
46
-
47
- (function (module) {
48
- var _typeof$1 = _typeof.exports["default"];
49
- function _regeneratorRuntime() {
50
- module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
51
- return e;
52
- }, module.exports.__esModule = true, module.exports["default"] = module.exports;
53
- var t,
54
- e = {},
55
- r = Object.prototype,
56
- n = r.hasOwnProperty,
57
- o = Object.defineProperty || function (t, e, r) {
58
- t[e] = r.value;
59
- },
60
- i = "function" == typeof Symbol ? Symbol : {},
61
- a = i.iterator || "@@iterator",
62
- c = i.asyncIterator || "@@asyncIterator",
63
- u = i.toStringTag || "@@toStringTag";
64
- function define(t, e, r) {
65
- return Object.defineProperty(t, e, {
66
- value: r,
67
- enumerable: !0,
68
- configurable: !0,
69
- writable: !0
70
- }), t[e];
71
- }
72
- try {
73
- define({}, "");
74
- } catch (t) {
75
- define = function define(t, e, r) {
76
- return t[e] = r;
77
- };
78
- }
79
- function wrap(t, e, r, n) {
80
- var i = e && e.prototype instanceof Generator ? e : Generator,
81
- a = Object.create(i.prototype),
82
- c = new Context(n || []);
83
- return o(a, "_invoke", {
84
- value: makeInvokeMethod(t, r, c)
85
- }), a;
86
- }
87
- function tryCatch(t, e, r) {
88
- try {
89
- return {
90
- type: "normal",
91
- arg: t.call(e, r)
92
- };
93
- } catch (t) {
94
- return {
95
- type: "throw",
96
- arg: t
97
- };
98
- }
99
- }
100
- e.wrap = wrap;
101
- var h = "suspendedStart",
102
- l = "suspendedYield",
103
- f = "executing",
104
- s = "completed",
105
- y = {};
106
- function Generator() {}
107
- function GeneratorFunction() {}
108
- function GeneratorFunctionPrototype() {}
109
- var p = {};
110
- define(p, a, function () {
111
- return this;
112
- });
113
- var d = Object.getPrototypeOf,
114
- v = d && d(d(values([])));
115
- v && v !== r && n.call(v, a) && (p = v);
116
- var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
117
- function defineIteratorMethods(t) {
118
- ["next", "throw", "return"].forEach(function (e) {
119
- define(t, e, function (t) {
120
- return this._invoke(e, t);
121
- });
122
- });
123
- }
124
- function AsyncIterator(t, e) {
125
- function invoke(r, o, i, a) {
126
- var c = tryCatch(t[r], t, o);
127
- if ("throw" !== c.type) {
128
- var u = c.arg,
129
- h = u.value;
130
- return h && "object" == _typeof$1(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
131
- invoke("next", t, i, a);
132
- }, function (t) {
133
- invoke("throw", t, i, a);
134
- }) : e.resolve(h).then(function (t) {
135
- u.value = t, i(u);
136
- }, function (t) {
137
- return invoke("throw", t, i, a);
138
- });
139
- }
140
- a(c.arg);
141
- }
142
- var r;
143
- o(this, "_invoke", {
144
- value: function value(t, n) {
145
- function callInvokeWithMethodAndArg() {
146
- return new e(function (e, r) {
147
- invoke(t, n, e, r);
148
- });
149
- }
150
- return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
151
- }
152
- });
153
- }
154
- function makeInvokeMethod(e, r, n) {
155
- var o = h;
156
- return function (i, a) {
157
- if (o === f) throw Error("Generator is already running");
158
- if (o === s) {
159
- if ("throw" === i) throw a;
160
- return {
161
- value: t,
162
- done: !0
163
- };
164
- }
165
- for (n.method = i, n.arg = a;;) {
166
- var c = n.delegate;
167
- if (c) {
168
- var u = maybeInvokeDelegate(c, n);
169
- if (u) {
170
- if (u === y) continue;
171
- return u;
172
- }
173
- }
174
- if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
175
- if (o === h) throw o = s, n.arg;
176
- n.dispatchException(n.arg);
177
- } else "return" === n.method && n.abrupt("return", n.arg);
178
- o = f;
179
- var p = tryCatch(e, r, n);
180
- if ("normal" === p.type) {
181
- if (o = n.done ? s : l, p.arg === y) continue;
182
- return {
183
- value: p.arg,
184
- done: n.done
185
- };
186
- }
187
- "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
188
- }
189
- };
190
- }
191
- function maybeInvokeDelegate(e, r) {
192
- var n = r.method,
193
- o = e.iterator[n];
194
- if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
195
- var i = tryCatch(o, e.iterator, r.arg);
196
- if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
197
- var a = i.arg;
198
- return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
199
- }
200
- function pushTryEntry(t) {
201
- var e = {
202
- tryLoc: t[0]
203
- };
204
- 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
205
- }
206
- function resetTryEntry(t) {
207
- var e = t.completion || {};
208
- e.type = "normal", delete e.arg, t.completion = e;
209
- }
210
- function Context(t) {
211
- this.tryEntries = [{
212
- tryLoc: "root"
213
- }], t.forEach(pushTryEntry, this), this.reset(!0);
214
- }
215
- function values(e) {
216
- if (e || "" === e) {
217
- var r = e[a];
218
- if (r) return r.call(e);
219
- if ("function" == typeof e.next) return e;
220
- if (!isNaN(e.length)) {
221
- var o = -1,
222
- i = function next() {
223
- for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
224
- return next.value = t, next.done = !0, next;
225
- };
226
- return i.next = i;
227
- }
228
- }
229
- throw new TypeError(_typeof$1(e) + " is not iterable");
230
- }
231
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
232
- value: GeneratorFunctionPrototype,
233
- configurable: !0
234
- }), o(GeneratorFunctionPrototype, "constructor", {
235
- value: GeneratorFunction,
236
- configurable: !0
237
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
238
- var e = "function" == typeof t && t.constructor;
239
- return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
240
- }, e.mark = function (t) {
241
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
242
- }, e.awrap = function (t) {
243
- return {
244
- __await: t
245
- };
246
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
247
- return this;
248
- }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
249
- void 0 === i && (i = Promise);
250
- var a = new AsyncIterator(wrap(t, r, n, o), i);
251
- return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
252
- return t.done ? t.value : a.next();
253
- });
254
- }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
255
- return this;
256
- }), define(g, "toString", function () {
257
- return "[object Generator]";
258
- }), e.keys = function (t) {
259
- var e = Object(t),
260
- r = [];
261
- for (var n in e) r.push(n);
262
- return r.reverse(), function next() {
263
- for (; r.length;) {
264
- var t = r.pop();
265
- if (t in e) return next.value = t, next.done = !1, next;
266
- }
267
- return next.done = !0, next;
268
- };
269
- }, e.values = values, Context.prototype = {
270
- constructor: Context,
271
- reset: function reset(e) {
272
- if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
273
- },
274
- stop: function stop() {
275
- this.done = !0;
276
- var t = this.tryEntries[0].completion;
277
- if ("throw" === t.type) throw t.arg;
278
- return this.rval;
279
- },
280
- dispatchException: function dispatchException(e) {
281
- if (this.done) throw e;
282
- var r = this;
283
- function handle(n, o) {
284
- return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
285
- }
286
- for (var o = this.tryEntries.length - 1; o >= 0; --o) {
287
- var i = this.tryEntries[o],
288
- a = i.completion;
289
- if ("root" === i.tryLoc) return handle("end");
290
- if (i.tryLoc <= this.prev) {
291
- var c = n.call(i, "catchLoc"),
292
- u = n.call(i, "finallyLoc");
293
- if (c && u) {
294
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
295
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
296
- } else if (c) {
297
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
298
- } else {
299
- if (!u) throw Error("try statement without catch or finally");
300
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
301
- }
302
- }
303
- }
304
- },
305
- abrupt: function abrupt(t, e) {
306
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
307
- var o = this.tryEntries[r];
308
- if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
309
- var i = o;
310
- break;
311
- }
312
- }
313
- i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
314
- var a = i ? i.completion : {};
315
- return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
316
- },
317
- complete: function complete(t, e) {
318
- if ("throw" === t.type) throw t.arg;
319
- return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
320
- },
321
- finish: function finish(t) {
322
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
323
- var r = this.tryEntries[e];
324
- if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
325
- }
326
- },
327
- "catch": function _catch(t) {
328
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
329
- var r = this.tryEntries[e];
330
- if (r.tryLoc === t) {
331
- var n = r.completion;
332
- if ("throw" === n.type) {
333
- var o = n.arg;
334
- resetTryEntry(r);
335
- }
336
- return o;
337
- }
338
- }
339
- throw Error("illegal catch attempt");
340
- },
341
- delegateYield: function delegateYield(e, r, n) {
342
- return this.delegate = {
343
- iterator: values(e),
344
- resultName: r,
345
- nextLoc: n
346
- }, "next" === this.method && (this.arg = t), y;
347
- }
348
- }, e;
349
- }
350
- module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
351
- } (regeneratorRuntime$1));
352
-
353
- // TODO(Babel 8): Remove this file.
354
-
355
- var runtime = regeneratorRuntime$1.exports();
356
- var regenerator = runtime;
357
-
358
- // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
359
- try {
360
- regeneratorRuntime = runtime;
361
- } catch (accidentalStrictMode) {
362
- if (typeof globalThis === "object") {
363
- globalThis.regeneratorRuntime = runtime;
364
- } else {
365
- Function("r", "regeneratorRuntime = r")(runtime);
366
- }
367
- }
368
-
369
46
  var en = {
370
47
  root: 'root',
371
48
  selectAll: 'Select all',
@@ -26,6 +26,7 @@ import 'dayjs';
26
26
  import '@paraview/lib';
27
27
  import '../_verture/slicedToArray-a8206399.js';
28
28
  import '../_verture/unsupportedIterableToArray-cb478f24.js';
29
+ import '../_verture/index-8ac46bd9.js';
29
30
  import '../_verture/typeof-6ec38efd.js';
30
31
  import '../Radio/index.js';
31
32
  import '../Checkbox/index.js';
@@ -26,8 +26,7 @@ import '@para-ui/icons/Close';
26
26
  import '@para-ui/icons/EditOutline';
27
27
  import '../_verture/tinycolor-ece3542d.js';
28
28
  import '@para-ui/icons/Plus';
29
- import '../_verture/defineProperty-6f62bb2a.js';
30
- import '../_verture/typeof-adeedc13.js';
29
+ import '../_verture/defineProperty-f0e15205.js';
31
30
  import 'rc-picker';
32
31
  import '@para-ui/icons/CloseCircleF';
33
32
  import '@para-ui/icons/Calendar';
package/Tooltip/index.js CHANGED
@@ -9,12 +9,12 @@ import Forbid from '@para-ui/icons/Forbid';
9
9
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
10
10
 
11
11
  //自动调整位置
12
- var autoAdjustOverflowEnabled = {
12
+ const autoAdjustOverflowEnabled = {
13
13
  adjustX: 1,
14
14
  adjustY: 1
15
15
  };
16
16
  //非自动调整位置
17
- var autoAdjustOverflowDisabled = {
17
+ const autoAdjustOverflowDisabled = {
18
18
  adjustX: 0,
19
19
  adjustY: 0
20
20
  };
@@ -27,12 +27,12 @@ function getOverflowOptions(autoAdjustOverflow) {
27
27
  }
28
28
  //tooltip placement
29
29
  function getPlacements(config) {
30
- var _config$horizontalArr = config.horizontalArrowShift,
31
- horizontalArrowShift = _config$horizontalArr === void 0 ? 16 : _config$horizontalArr,
32
- _config$verticalArrow = config.verticalArrowShift,
33
- verticalArrowShift = _config$verticalArrow === void 0 ? 8 : _config$verticalArrow,
34
- autoAdjustOverflow = config.autoAdjustOverflow;
35
- var placementMap = {
30
+ const {
31
+ horizontalArrowShift = 16,
32
+ verticalArrowShift = 8,
33
+ autoAdjustOverflow
34
+ } = config;
35
+ const placementMap = {
36
36
  left: {
37
37
  points: ['cr', 'cl'],
38
38
  offset: [-8, 0]
@@ -82,7 +82,7 @@ function getPlacements(config) {
82
82
  offset: [-8, verticalArrowShift]
83
83
  }
84
84
  };
85
- Object.keys(placementMap).forEach(function (key) {
85
+ Object.keys(placementMap).forEach(key => {
86
86
  placementMap[key] = Object.assign(Object.assign({}, placements[key]), {
87
87
  offset: getAlignOffset(key).offset,
88
88
  overflow: getOverflowOptions(autoAdjustOverflow)
@@ -91,39 +91,40 @@ function getPlacements(config) {
91
91
  });
92
92
  return placementMap;
93
93
  }
94
- var splitObject = function splitObject(obj, keys) {
95
- var picked = {};
96
- var omitted = Object.assign({}, obj);
97
- keys.forEach(function (key) {
94
+ const splitObject = (obj, keys) => {
95
+ const picked = {};
96
+ const omitted = Object.assign({}, obj);
97
+ keys.forEach(key => {
98
98
  if (obj && key in obj) {
99
99
  picked[key] = obj[key];
100
100
  delete omitted[key];
101
101
  }
102
102
  });
103
103
  return {
104
- picked: picked,
105
- omitted: omitted
104
+ picked,
105
+ omitted
106
106
  };
107
107
  };
108
108
  //兼容禁用title
109
109
  function getDisabledCompatibleChildren(child) {
110
- var element = /*#__PURE__*/React__default.isValidElement(child) ? child : jsx("span", {
110
+ const element = /*#__PURE__*/React__default.isValidElement(child) ? child : jsx("span", {
111
111
  children: child
112
112
  });
113
113
  if (element.type === 'button' && element.props.disabled) {
114
- var _splitObject = splitObject(element.props.style, ['position', 'left', 'right', 'top', 'bottom', 'float', 'display', 'zIndex']),
115
- picked = _splitObject.picked,
116
- omitted = _splitObject.omitted;
117
- var spanStyle = Object.assign(Object.assign({
114
+ const {
115
+ picked,
116
+ omitted
117
+ } = splitObject(element.props.style, ['position', 'left', 'right', 'top', 'bottom', 'float', 'display', 'zIndex']);
118
+ const spanStyle = Object.assign(Object.assign({
118
119
  display: 'inline-block'
119
120
  }, picked), {
120
121
  cursor: 'not-allowed',
121
122
  width: element.props.block ? '100%' : null
122
123
  });
123
- var buttonStyle = Object.assign(Object.assign({}, omitted), {
124
+ const buttonStyle = Object.assign(Object.assign({}, omitted), {
124
125
  pointerEvents: 'none'
125
126
  });
126
- var _child = /*#__PURE__*/React__default.cloneElement(element, {
127
+ const child = /*#__PURE__*/React__default.cloneElement(element, {
127
128
  style: buttonStyle,
128
129
  className: null
129
130
  });
@@ -131,14 +132,14 @@ function getDisabledCompatibleChildren(child) {
131
132
  style: spanStyle,
132
133
  className: clsx(element.props.className, "".concat($rcPrefixCls, "-tooltip-disabled-compatible-wrapper"))
133
134
  }, {
134
- children: _child
135
+ children: child
135
136
  }));
136
137
  }
137
138
  return element;
138
139
  }
139
140
  //映射placement
140
141
  function mapLegacyPlacement(place) {
141
- var legacyPlacement = {
142
+ const legacyPlacement = {
142
143
  'bottom-end': 'bottomRight',
143
144
  'bottom-start': 'bottomLeft',
144
145
  'left-end': 'leftBottom',
@@ -152,8 +153,8 @@ function mapLegacyPlacement(place) {
152
153
  }
153
154
  //浮层偏移量
154
155
  function getAlignOffset(place) {
155
- var mPlace = mapLegacyPlacement(place);
156
- var offsetMap = {
156
+ const mPlace = mapLegacyPlacement(place);
157
+ const offsetMap = {
157
158
  left: {
158
159
  offset: [-8, 0]
159
160
  },
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);