@para-ui/core 4.0.0-rc.6 → 4.0.0-rc.7

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 (83) hide show
  1. package/AutoTips/index.js +2 -2
  2. package/Cascader/index.js +2 -2
  3. package/ComboSelect/index.js +1 -1
  4. package/DatePicker/util.d.ts +6 -6
  5. package/DynamicMultiBox/index.js +4 -558
  6. package/Form/index.js +2 -2
  7. package/FormItem/index.js +2 -2
  8. package/FunctionModal/index.js +2 -2
  9. package/Menu/index.js +1 -1
  10. package/OperateBtn/index.js +8 -6
  11. package/Pagination/index.js +1 -1
  12. package/QuickReply/QuickReplyCode/index.d.ts +10 -0
  13. package/QuickReply/index.d.ts +87 -0
  14. package/QuickReply/index.js +550 -0
  15. package/QuickReply/lang/en_US.d.ts +14 -0
  16. package/QuickReply/lang/index.d.ts +29 -0
  17. package/QuickReply/lang/zh_CN.d.ts +14 -0
  18. package/README.md +1 -0
  19. package/Select/index.js +4 -3
  20. package/SelectorPicker/index.js +4 -2
  21. package/Stepper/index.js +1 -1
  22. package/Styles/theme.scss +1 -0
  23. package/Switch/index.js +2 -2
  24. package/Table/index.js +1 -1
  25. package/Tabs/index.js +1 -1
  26. package/Tag/index.js +2 -2
  27. package/Transfer/index.js +1 -1
  28. package/Tree/index.js +2 -2
  29. package/Upload/index.js +2 -2
  30. package/_verture/index-d6093d1c.js +559 -0
  31. package/index.d.ts +2 -0
  32. package/index.js +10 -6
  33. package/locale/en-US.d.ts +13 -0
  34. package/locale/index.d.ts +26 -0
  35. package/locale/index.js +26 -0
  36. package/locale/zh-CN.d.ts +13 -0
  37. package/package.json +1 -1
  38. package/umd/AutoTips.js +1 -1
  39. package/umd/Breadcrumbs.js +1 -1
  40. package/umd/Button.js +7 -7
  41. package/umd/ButtonGroup.js +1 -1
  42. package/umd/Cascader.js +1 -1
  43. package/umd/ComboSelect.js +4 -4
  44. package/umd/CopyText.js +1 -1
  45. package/umd/DatePicker.js +7 -7
  46. package/umd/Descriptions.js +1 -1
  47. package/umd/Desktop.js +1 -1
  48. package/umd/Drawer.js +1 -1
  49. package/umd/DynamicMultiBox.js +4 -4
  50. package/umd/Form.js +4 -4
  51. package/umd/FormItem.js +4 -4
  52. package/umd/FunctionModal.js +1 -1
  53. package/umd/InputLang.js +1 -1
  54. package/umd/Menu.js +1 -1
  55. package/umd/Modal.js +1 -1
  56. package/umd/MultiBox.js +1 -1
  57. package/umd/OperateBtn.js +2 -2
  58. package/umd/PageHeader.js +1 -1
  59. package/umd/Pagination.js +2 -2
  60. package/umd/PopConfirm.js +1 -1
  61. package/umd/QuickReply.js +55 -0
  62. package/umd/Search.js +1 -1
  63. package/umd/Select.js +2 -2
  64. package/umd/SelectInput.js +2 -2
  65. package/umd/Selector.js +1 -1
  66. package/umd/SelectorPicker.js +2 -2
  67. package/umd/SingleBox.js +1 -1
  68. package/umd/Stepper.js +1 -1
  69. package/umd/Table.js +2 -2
  70. package/umd/Tabs.js +1 -1
  71. package/umd/Tag.js +1 -1
  72. package/umd/TextField.js +1 -1
  73. package/umd/TimePicker.js +5 -5
  74. package/umd/Title.js +1 -1
  75. package/umd/ToggleButton.js +1 -1
  76. package/umd/Transfer.js +1 -1
  77. package/umd/Tree.js +4 -4
  78. package/umd/Upload.js +1 -1
  79. package/umd/locale.js +1 -1
  80. /package/_verture/{index-4fafd0a0.js → index-3156e3ef.js} +0 -0
  81. /package/_verture/{index-3cdaba96.js → index-466a3496.js} +0 -0
  82. /package/_verture/{index-e0f9064d.js → index-f518e244.js} +0 -0
  83. /package/_verture/{modalContext-8534f23d.js → modalContext-7b512b0c.js} +0 -0
package/AutoTips/index.js CHANGED
@@ -10,7 +10,7 @@ import 'rc-tooltip/lib/placements';
10
10
  import 'clsx';
11
11
  import '@para-ui/icons/Forbid';
12
12
 
13
- var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 文字隐藏...\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-auto-tips-multiline {\n max-width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v4-auto-tips-multiline > .auto-tips-multiline-content-box {\n position: relative;\n}\n.paraui-v4-auto-tips-multiline > .auto-tips-multiline-content-box > .auto-tips-multiline-content > .last-line {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.paraui-v4-auto-tips-multiline > .auto-tips-multiline-content-box > .hidden {\n opacity: 0;\n visibility: hidden;\n position: absolute;\n bottom: 0;\n left: 0;\n z-index: -100000;\n}\n.paraui-v4-auto-tips-multiline.paraui-v4-auto-tips-multiline-safari > .auto-tips-multiline-content-box > .auto-tips-multiline-content > .last-line::before {\n content: \"\";\n display: block;\n}\n\n.paraui-v4-auto-tips-multiline-tooltip .component-tooltip-inner {\n max-height: calc(100vh - 25px);\n overflow: auto;\n}";
13
+ var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 文字隐藏...\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-auto-tips-multiline {\n max-width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v4-auto-tips-multiline > .auto-tips-multiline-content-box {\n position: relative;\n}\n.paraui-v4-auto-tips-multiline > .auto-tips-multiline-content-box > .auto-tips-multiline-content > .last-line {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.paraui-v4-auto-tips-multiline > .auto-tips-multiline-content-box > .hidden {\n opacity: 0;\n visibility: hidden;\n position: absolute;\n bottom: 0;\n left: 0;\n z-index: -100000;\n}\n.paraui-v4-auto-tips-multiline.paraui-v4-auto-tips-multiline-safari > .auto-tips-multiline-content-box > .auto-tips-multiline-content > .last-line::before {\n content: \"\";\n display: block;\n}\n\n.paraui-v4-auto-tips-multiline-tooltip .component-tooltip-inner {\n max-height: 80vh;\n overflow: auto;\n}";
14
14
  styleInject(css_248z$1);
15
15
 
16
16
  const AutoTipsMultiline = props => {
@@ -146,7 +146,7 @@ const AutoTipsMultiline = props => {
146
146
  }));
147
147
  };
148
148
 
149
- var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 文字隐藏...\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-auto-tips {\n max-width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v4-auto-tips > .auto-tips-content {\n display: inline;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v4-auto-tips.paraui-v4-auto-tips-safari > .auto-tips-content::before {\n content: \"\";\n display: block;\n}\n\n.paraui-v4-auto-tips-tooltip .component-tooltip-inner {\n max-height: calc(100vh - 25px);\n overflow: auto;\n}";
149
+ var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 文字隐藏...\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-auto-tips {\n max-width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v4-auto-tips > .auto-tips-content {\n display: inline;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v4-auto-tips.paraui-v4-auto-tips-safari > .auto-tips-content::before {\n content: \"\";\n display: block;\n}\n\n.paraui-v4-auto-tips-tooltip .component-tooltip-inner {\n max-height: 80vh;\n overflow: auto;\n}";
150
150
  styleInject(css_248z);
151
151
 
152
152
  const AutoTips = props => {
package/Cascader/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { C as Cascader } from '../_verture/index-3cdaba96.js';
2
- export { C as default } from '../_verture/index-3cdaba96.js';
1
+ import { C as Cascader } from '../_verture/index-466a3496.js';
2
+ export { C as default } from '../_verture/index-466a3496.js';
3
3
  import '../_verture/tslib.es6-55ed4bd2.js';
4
4
  import 'react/jsx-runtime';
5
5
  import '../_verture/toConsumableArray-c7a8028f.js';
@@ -6,7 +6,7 @@ import SearchIcon from '@para-ui/icons/Search';
6
6
  import CloseIcon from '@para-ui/icons/Close';
7
7
  import CloseCircleF from '@para-ui/icons/CloseCircleF';
8
8
  import Table from '../Table/index.js';
9
- import { T as Tree } from '../_verture/index-4fafd0a0.js';
9
+ import { T as Tree } from '../_verture/index-3156e3ef.js';
10
10
  import { Button } from '../Button/index.js';
11
11
  import { D as Dropdown } from '../_verture/index-da9097d3.js';
12
12
  import { Popover } from '../Popover/index.js';
@@ -16,9 +16,9 @@ export declare function getTimeProps<DateType, DisabledTime>(props: {
16
16
  showMinute?: boolean | undefined;
17
17
  showSecond?: boolean | undefined;
18
18
  use12Hours?: boolean | undefined;
19
- hourStep?: 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | undefined;
20
- minuteStep?: 2 | 1 | 23 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | undefined;
21
- secondStep?: 2 | 1 | 23 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | undefined;
19
+ hourStep?: number | undefined;
20
+ minuteStep?: number | undefined;
21
+ secondStep?: number | undefined;
22
22
  hideDisabledOptions?: boolean | undefined;
23
23
  defaultValue?: DateType | undefined;
24
24
  disabledHours?: (() => number[]) | undefined;
@@ -34,9 +34,9 @@ export declare function getTimeProps<DateType, DisabledTime>(props: {
34
34
  showMinute?: boolean | undefined;
35
35
  showSecond?: boolean | undefined;
36
36
  use12Hours?: boolean | undefined;
37
- hourStep?: 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | undefined;
38
- minuteStep?: 2 | 1 | 23 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | undefined;
39
- secondStep?: 2 | 1 | 23 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | undefined;
37
+ hourStep?: number | undefined;
38
+ minuteStep?: number | undefined;
39
+ secondStep?: number | undefined;
40
40
  hideDisabledOptions?: boolean | undefined;
41
41
  defaultValue?: DateType | undefined;
42
42
  disabledHours?: (() => number[]) | undefined;
@@ -1,5 +1,5 @@
1
1
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
- import React__default, { useState, useRef, useEffect, useMemo } from 'react';
2
+ import { useState, useRef, useEffect, useMemo } from 'react';
3
3
  import { Popover } from '../Popover/index.js';
4
4
  import Label from '../Label/index.js';
5
5
  import { CheckboxGroup } from '../CheckboxGroup/index.js';
@@ -17,7 +17,7 @@ import { ComboSelect } from '../ComboSelect/index.js';
17
17
  import DatePicker from '../DatePicker/index.js';
18
18
  import AutoTips from '../AutoTips/index.js';
19
19
  import { UUID } from '@paraview/lib';
20
- import { s as sortable_esm } from '../_verture/sortable.esm-49896035.js';
20
+ import { d as dist } from '../_verture/index-d6093d1c.js';
21
21
  import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
22
22
  import { u as useFormatMessage } from '../_verture/useFormatMessage-eb13cf56.js';
23
23
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
@@ -73,7 +73,7 @@ import 'rc-pagination';
73
73
  import '@para-ui/icons/Right';
74
74
  import '@para-ui/icons/DoubleLeft';
75
75
  import '@para-ui/icons/DoubleRight';
76
- import '../_verture/index-4fafd0a0.js';
76
+ import '../_verture/index-3156e3ef.js';
77
77
  import '../_verture/toConsumableArray-c7a8028f.js';
78
78
  import '../_verture/index-d63bd287.js';
79
79
  import '../_verture/typeof-b240b062.js';
@@ -96,27 +96,7 @@ import '@para-ui/icons/Time';
96
96
  import 'rc-picker/lib/locale/en_US';
97
97
  import 'rc-picker/lib/locale/zh_CN';
98
98
  import '@para-ui/icons/SortRight';
99
-
100
- function getAugmentedNamespace(n) {
101
- var f = n.default;
102
- if (typeof f == "function") {
103
- var a = function () {
104
- return f.apply(this, arguments);
105
- };
106
- a.prototype = f.prototype;
107
- } else a = {};
108
- Object.defineProperty(a, '__esModule', {value: true});
109
- Object.keys(n).forEach(function (k) {
110
- var d = Object.getOwnPropertyDescriptor(n, k);
111
- Object.defineProperty(a, k, d.get ? d : {
112
- enumerable: true,
113
- get: function () {
114
- return n[k];
115
- }
116
- });
117
- });
118
- return a;
119
- }
99
+ import '../_verture/sortable.esm-49896035.js';
120
100
 
121
101
  var FormItem = function FormItem(props) {
122
102
  var onChange = props.onChange,
@@ -379,540 +359,6 @@ const RowForm = props => {
379
359
  });
380
360
  };
381
361
 
382
- var dist = {exports: {}};
383
-
384
- var require$$0 = /*@__PURE__*/getAugmentedNamespace(sortable_esm);
385
-
386
- var classnames = {exports: {}};
387
-
388
- /*!
389
- Copyright (c) 2018 Jed Watson.
390
- Licensed under the MIT License (MIT), see
391
- http://jedwatson.github.io/classnames
392
- */
393
-
394
- (function (module) {
395
- /* global define */
396
-
397
- (function () {
398
-
399
- var hasOwn = {}.hasOwnProperty;
400
-
401
- function classNames() {
402
- var classes = [];
403
-
404
- for (var i = 0; i < arguments.length; i++) {
405
- var arg = arguments[i];
406
- if (!arg) continue;
407
-
408
- var argType = typeof arg;
409
-
410
- if (argType === 'string' || argType === 'number') {
411
- classes.push(arg);
412
- } else if (Array.isArray(arg)) {
413
- if (arg.length) {
414
- var inner = classNames.apply(null, arg);
415
- if (inner) {
416
- classes.push(inner);
417
- }
418
- }
419
- } else if (argType === 'object') {
420
- if (arg.toString === Object.prototype.toString) {
421
- for (var key in arg) {
422
- if (hasOwn.call(arg, key) && arg[key]) {
423
- classes.push(key);
424
- }
425
- }
426
- } else {
427
- classes.push(arg.toString());
428
- }
429
- }
430
- }
431
-
432
- return classes.join(' ');
433
- }
434
-
435
- if (module.exports) {
436
- classNames.default = classNames;
437
- module.exports = classNames;
438
- } else {
439
- window.classNames = classNames;
440
- }
441
- }());
442
- } (classnames));
443
-
444
- var isProduction = process.env.NODE_ENV === 'production';
445
- var prefix = 'Invariant failed';
446
- function invariant(condition, message) {
447
- if (condition) {
448
- return;
449
- }
450
- if (isProduction) {
451
- throw new Error(prefix);
452
- }
453
- var provided = typeof message === 'function' ? message() : message;
454
- var value = provided ? prefix + ": " + provided : prefix;
455
- throw new Error(value);
456
- }
457
-
458
- var tinyInvariant_esm = /*#__PURE__*/Object.freeze({
459
- __proto__: null,
460
- 'default': invariant
461
- });
462
-
463
- var require$$3 = /*@__PURE__*/getAugmentedNamespace(tinyInvariant_esm);
464
-
465
- (function (module) {
466
- var $8zHUo$sortablejs = require$$0;
467
- var $8zHUo$classnames = classnames.exports;
468
- var $8zHUo$react = React__default;
469
- var $8zHUo$tinyinvariant = require$$3;
470
-
471
- function $parcel$interopDefault(a) {
472
- return a && a.__esModule ? a.default : a;
473
- }
474
- function $parcel$export(e, n, v, s) {
475
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
476
- }
477
- function $parcel$exportWildcard(dest, source) {
478
- Object.keys(source).forEach(function(key) {
479
- if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
480
- return;
481
- }
482
-
483
- Object.defineProperty(dest, key, {
484
- enumerable: true,
485
- get: function get() {
486
- return source[key];
487
- }
488
- });
489
- });
490
-
491
- return dest;
492
- }
493
-
494
- $parcel$export(module.exports, "Sortable", () => $882b6d93070905b3$re_export$Sortable);
495
- $parcel$export(module.exports, "Direction", () => $882b6d93070905b3$re_export$Direction);
496
- $parcel$export(module.exports, "DOMRect", () => $882b6d93070905b3$re_export$DOMRect);
497
- $parcel$export(module.exports, "GroupOptions", () => $882b6d93070905b3$re_export$GroupOptions);
498
- $parcel$export(module.exports, "MoveEvent", () => $882b6d93070905b3$re_export$MoveEvent);
499
- $parcel$export(module.exports, "Options", () => $882b6d93070905b3$re_export$Options);
500
- $parcel$export(module.exports, "PullResult", () => $882b6d93070905b3$re_export$PullResult);
501
- $parcel$export(module.exports, "PutResult", () => $882b6d93070905b3$re_export$PutResult);
502
- $parcel$export(module.exports, "SortableEvent", () => $882b6d93070905b3$re_export$SortableEvent);
503
- $parcel$export(module.exports, "SortableOptions", () => $882b6d93070905b3$re_export$SortableOptions);
504
- $parcel$export(module.exports, "Utils", () => $882b6d93070905b3$re_export$Utils);
505
- $parcel$export(module.exports, "ReactSortable", () => $7fe8e3ea572bda7a$export$11bbed9ee0012c13);
506
-
507
-
508
-
509
-
510
-
511
- function $eb03e74f8f7db1f3$export$1d0aa160432dfea5(node) {
512
- if (node.parentElement !== null) node.parentElement.removeChild(node);
513
- }
514
- function $eb03e74f8f7db1f3$export$6d240faa51aa562f(parent, newChild, index) {
515
- const refChild = parent.children[index] || null;
516
- parent.insertBefore(newChild, refChild);
517
- }
518
- function $eb03e74f8f7db1f3$export$77f49a256021c8de(customs) {
519
- customs.forEach((curr)=>$eb03e74f8f7db1f3$export$1d0aa160432dfea5(curr.element)
520
- );
521
- }
522
- function $eb03e74f8f7db1f3$export$a6177d5829f70ebc(customs) {
523
- customs.forEach((curr)=>{
524
- $eb03e74f8f7db1f3$export$6d240faa51aa562f(curr.parentElement, curr.element, curr.oldIndex);
525
- });
526
- }
527
- function $eb03e74f8f7db1f3$export$4655efe700f887a(evt, list) {
528
- const mode = $eb03e74f8f7db1f3$export$1fc0f6205829e19c(evt);
529
- const parentElement = {
530
- parentElement: evt.from
531
- };
532
- let custom = [];
533
- switch(mode){
534
- case "normal":
535
- /* eslint-disable */ const item = {
536
- element: evt.item,
537
- newIndex: evt.newIndex,
538
- oldIndex: evt.oldIndex,
539
- parentElement: evt.from
540
- };
541
- custom = [
542
- item
543
- ];
544
- break;
545
- case "swap":
546
- const drag = {
547
- element: evt.item,
548
- oldIndex: evt.oldIndex,
549
- newIndex: evt.newIndex,
550
- ...parentElement
551
- };
552
- const swap = {
553
- element: evt.swapItem,
554
- oldIndex: evt.newIndex,
555
- newIndex: evt.oldIndex,
556
- ...parentElement
557
- };
558
- custom = [
559
- drag,
560
- swap
561
- ];
562
- break;
563
- case "multidrag":
564
- custom = evt.oldIndicies.map((curr, index)=>({
565
- element: curr.multiDragElement,
566
- oldIndex: curr.index,
567
- newIndex: evt.newIndicies[index].index,
568
- ...parentElement
569
- })
570
- );
571
- break;
572
- }
573
- /* eslint-enable */ const customs = $eb03e74f8f7db1f3$export$bc06a3af7dc65f53(custom, list);
574
- return customs;
575
- }
576
- function $eb03e74f8f7db1f3$export$c25cf8080bd305ec(normalized, list) {
577
- const a = $eb03e74f8f7db1f3$export$be2da95e6167b0bd(normalized, list);
578
- const b = $eb03e74f8f7db1f3$export$eca851ee65ae17e4(normalized, a);
579
- return b;
580
- }
581
- function $eb03e74f8f7db1f3$export$be2da95e6167b0bd(normalized, list) {
582
- const newList = [
583
- ...list
584
- ];
585
- normalized.concat().reverse().forEach((curr)=>newList.splice(curr.oldIndex, 1)
586
- );
587
- return newList;
588
- }
589
- function $eb03e74f8f7db1f3$export$eca851ee65ae17e4(normalized, list, evt, clone) {
590
- const newList = [
591
- ...list
592
- ];
593
- normalized.forEach((curr)=>{
594
- const newItem = clone && evt && clone(curr.item, evt);
595
- newList.splice(curr.newIndex, 0, newItem || curr.item);
596
- });
597
- return newList;
598
- }
599
- function $eb03e74f8f7db1f3$export$1fc0f6205829e19c(evt) {
600
- if (evt.oldIndicies && evt.oldIndicies.length > 0) return "multidrag";
601
- if (evt.swapItem) return "swap";
602
- return "normal";
603
- }
604
- function $eb03e74f8f7db1f3$export$bc06a3af7dc65f53(inputs, list) {
605
- const normalized = inputs.map((curr)=>({
606
- ...curr,
607
- item: list[curr.oldIndex]
608
- })
609
- ).sort((a, b)=>a.oldIndex - b.oldIndex
610
- );
611
- return normalized;
612
- }
613
- function $eb03e74f8f7db1f3$export$7553c81e62e31b7e(props) {
614
- /* eslint-disable */ const { list: // react sortable props
615
- list , setList: setList , children: children , tag: tag , style: style , className: className , clone: clone , onAdd: // sortable options that have methods we want to overwrite
616
- onAdd , onChange: onChange , onChoose: onChoose , onClone: onClone , onEnd: onEnd , onFilter: onFilter , onRemove: onRemove , onSort: onSort , onStart: onStart , onUnchoose: onUnchoose , onUpdate: onUpdate , onMove: onMove , onSpill: onSpill , onSelect: onSelect , onDeselect: onDeselect , ...options } = props;
617
- /* eslint-enable */ return options;
618
- }
619
-
620
-
621
- /** Holds a global reference for which react element is being dragged */ // @todo - use context to manage this. How does one use 2 different providers?
622
- const $7fe8e3ea572bda7a$var$store = {
623
- dragging: null
624
- };
625
- class $7fe8e3ea572bda7a$export$11bbed9ee0012c13 extends $8zHUo$react.Component {
626
- constructor(props){
627
- super(props);
628
- // @todo forward ref this component
629
- this.ref = /*#__PURE__*/ $8zHUo$react.createRef();
630
- // make all state false because we can't change sortable unless a mouse gesture is made.
631
- const newList = [
632
- ...props.list
633
- ];
634
- newList.forEach((item)=>{
635
- Object.assign(item, {
636
- chosen: false,
637
- selected: false
638
- });
639
- });
640
- props.setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
641
- ($parcel$interopDefault($8zHUo$tinyinvariant))(//@ts-expect-error: Doesn't exist. Will deprecate soon.
642
- !props.plugins, `
643
- Plugins prop is no longer supported.
644
- Instead, mount it with "Sortable.mount(new MultiDrag())"
645
- Please read the updated README.md at https://github.com/SortableJS/react-sortablejs.
646
- `);
647
- }
648
- componentDidMount() {
649
- if (this.ref.current === null) return;
650
- const newOptions = this.makeOptions();
651
- ($parcel$interopDefault($8zHUo$sortablejs)).create(this.ref.current, newOptions);
652
- }
653
- componentDidUpdate(prevProps) {
654
- if (prevProps.disabled !== this.props.disabled && this.sortable) this.sortable.option("disabled", this.props.disabled);
655
- }
656
- render() {
657
- const { tag: tag , style: style , className: className , id: id } = this.props;
658
- const classicProps = {
659
- style: style,
660
- className: className,
661
- id: id
662
- };
663
- // if no tag, default to a `div` element.
664
- const newTag = !tag || tag === null ? "div" : tag;
665
- return(/*#__PURE__*/ $8zHUo$react.createElement(newTag, {
666
- // @todo - find a way (perhaps with the callback) to allow AntD components to work
667
- ref: this.ref,
668
- ...classicProps
669
- }, this.getChildren()));
670
- }
671
- getChildren() {
672
- const { children: children , dataIdAttr: dataIdAttr , selectedClass: selectedClass = "sortable-selected" , chosenClass: chosenClass = "sortable-chosen" , dragClass: /* eslint-disable */ dragClass = "sortable-drag" , fallbackClass: fallbackClass = "sortable-falback" , ghostClass: ghostClass = "sortable-ghost" , swapClass: swapClass = "sortable-swap-highlight" , filter: /* eslint-enable */ filter = "sortable-filter" , list: list , } = this.props;
673
- // if no children, don't do anything.
674
- if (!children || children == null) return null;
675
- const dataid = dataIdAttr || "data-id";
676
- /* eslint-disable-next-line */ return $8zHUo$react.Children.map(children, (child, index)=>{
677
- if (child === undefined) return undefined;
678
- const item = list[index] || {
679
- };
680
- const { className: prevClassName } = child.props;
681
- // @todo - handle the function if avalable. I don't think anyone will be doing this soon.
682
- const filtered = typeof filter === "string" && {
683
- [filter.replace(".", "")]: !!item.filtered
684
- };
685
- const className = ($parcel$interopDefault($8zHUo$classnames))(prevClassName, {
686
- [selectedClass]: item.selected,
687
- [chosenClass]: item.chosen,
688
- ...filtered
689
- });
690
- return(/*#__PURE__*/ $8zHUo$react.cloneElement(child, {
691
- [dataid]: child.key,
692
- className: className
693
- }));
694
- });
695
- }
696
- /** Appends the `sortable` property to this component */ get sortable() {
697
- const el = this.ref.current;
698
- if (el === null) return null;
699
- const key = Object.keys(el).find((k)=>k.includes("Sortable")
700
- );
701
- if (!key) return null;
702
- //@ts-expect-error: fix me.
703
- return el[key];
704
- }
705
- /** Converts all the props from `ReactSortable` into the `options` object that `Sortable.create(el, [options])` can use. */ makeOptions() {
706
- const DOMHandlers = [
707
- "onAdd",
708
- "onChoose",
709
- "onDeselect",
710
- "onEnd",
711
- "onRemove",
712
- "onSelect",
713
- "onSpill",
714
- "onStart",
715
- "onUnchoose",
716
- "onUpdate",
717
- ];
718
- const NonDOMHandlers = [
719
- "onChange",
720
- "onClone",
721
- "onFilter",
722
- "onSort",
723
- ];
724
- const newOptions = $eb03e74f8f7db1f3$export$7553c81e62e31b7e(this.props);
725
- DOMHandlers.forEach((name)=>newOptions[name] = this.prepareOnHandlerPropAndDOM(name)
726
- );
727
- NonDOMHandlers.forEach((name)=>newOptions[name] = this.prepareOnHandlerProp(name)
728
- );
729
- /** onMove has 2 arguments and needs to be handled seperately. */ const onMove1 = (evt, originalEvt)=>{
730
- const { onMove: onMove } = this.props;
731
- const defaultValue = evt.willInsertAfter || -1;
732
- if (!onMove) return defaultValue;
733
- const result = onMove(evt, originalEvt, this.sortable, $7fe8e3ea572bda7a$var$store);
734
- if (typeof result === "undefined") return false;
735
- return result;
736
- };
737
- return {
738
- ...newOptions,
739
- onMove: onMove1
740
- };
741
- }
742
- /** Prepares a method that will be used in the sortable options to call an `on[Handler]` prop & an `on[Handler]` ReactSortable method. */ prepareOnHandlerPropAndDOM(evtName) {
743
- return (evt)=>{
744
- // call the component prop
745
- this.callOnHandlerProp(evt, evtName);
746
- // calls state change
747
- //@ts-expect-error: until @types multidrag item is in
748
- this[evtName](evt);
749
- };
750
- }
751
- /** Prepares a method that will be used in the sortable options to call an `on[Handler]` prop */ prepareOnHandlerProp(evtName) {
752
- return (evt)=>{
753
- // call the component prop
754
- this.callOnHandlerProp(evt, evtName);
755
- };
756
- }
757
- /** Calls the `props.on[Handler]` function */ callOnHandlerProp(evt, evtName) {
758
- const propEvent = this.props[evtName];
759
- if (propEvent) propEvent(evt, this.sortable, $7fe8e3ea572bda7a$var$store);
760
- }
761
- // SORTABLE DOM HANDLING
762
- onAdd(evt) {
763
- const { list: list , setList: setList , clone: clone } = this.props;
764
- /* eslint-disable-next-line */ const otherList = [
765
- ...$7fe8e3ea572bda7a$var$store.dragging.props.list
766
- ];
767
- const customs = $eb03e74f8f7db1f3$export$4655efe700f887a(evt, otherList);
768
- $eb03e74f8f7db1f3$export$77f49a256021c8de(customs);
769
- const newList = $eb03e74f8f7db1f3$export$eca851ee65ae17e4(customs, list, evt, clone);
770
- newList.forEach((item)=>{
771
- Object.assign(item, {
772
- selected: false
773
- });
774
- });
775
- setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
776
- }
777
- onRemove(evt) {
778
- const { list: list , setList: setList } = this.props;
779
- const mode = $eb03e74f8f7db1f3$export$1fc0f6205829e19c(evt);
780
- const customs = $eb03e74f8f7db1f3$export$4655efe700f887a(evt, list);
781
- $eb03e74f8f7db1f3$export$a6177d5829f70ebc(customs);
782
- let newList = [
783
- ...list
784
- ];
785
- // remove state if not in clone mode. otherwise, keep.
786
- if (evt.pullMode !== "clone") newList = $eb03e74f8f7db1f3$export$be2da95e6167b0bd(customs, newList);
787
- else {
788
- // switch used to get the clone
789
- let customClones = customs;
790
- switch(mode){
791
- case "multidrag":
792
- customClones = customs.map((item, index)=>({
793
- ...item,
794
- element: evt.clones[index]
795
- })
796
- );
797
- break;
798
- case "normal":
799
- customClones = customs.map((item)=>({
800
- ...item,
801
- element: evt.clone
802
- })
803
- );
804
- break;
805
- case "swap":
806
- default:
807
- ($parcel$interopDefault($8zHUo$tinyinvariant))(true, `mode "${mode}" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "${mode}" plugin`);
808
- }
809
- $eb03e74f8f7db1f3$export$77f49a256021c8de(customClones);
810
- // replace selected items with cloned items
811
- customs.forEach((curr)=>{
812
- const index = curr.oldIndex;
813
- /* eslint-disable-next-line */ const newItem = this.props.clone(curr.item, evt);
814
- newList.splice(index, 1, newItem);
815
- });
816
- }
817
- // remove item.selected from list
818
- newList.forEach((item)=>{
819
- Object.assign(item, {
820
- selected: false
821
- });
822
- });
823
- setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
824
- }
825
- onUpdate(evt) {
826
- const { list: list , setList: setList } = this.props;
827
- const customs = $eb03e74f8f7db1f3$export$4655efe700f887a(evt, list);
828
- $eb03e74f8f7db1f3$export$77f49a256021c8de(customs);
829
- $eb03e74f8f7db1f3$export$a6177d5829f70ebc(customs);
830
- const newList = $eb03e74f8f7db1f3$export$c25cf8080bd305ec(customs, list);
831
- return setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
832
- }
833
- onStart() {
834
- $7fe8e3ea572bda7a$var$store.dragging = this;
835
- }
836
- onEnd() {
837
- $7fe8e3ea572bda7a$var$store.dragging = null;
838
- }
839
- onChoose(evt) {
840
- const { list: list , setList: setList } = this.props;
841
- const newList = list.map((item, index)=>{
842
- if (index === evt.oldIndex) Object.assign(item, {
843
- chosen: true
844
- });
845
- return item;
846
- });
847
- setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
848
- }
849
- onUnchoose(evt) {
850
- const { list: list , setList: setList } = this.props;
851
- const newList = list.map((item, index)=>{
852
- if (index === evt.oldIndex) Object.assign(item, {
853
- chosen: false
854
- });
855
- return item;
856
- });
857
- setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
858
- }
859
- onSpill(evt) {
860
- const { removeOnSpill: removeOnSpill , revertOnSpill: revertOnSpill } = this.props;
861
- if (removeOnSpill && !revertOnSpill) $eb03e74f8f7db1f3$export$1d0aa160432dfea5(evt.item);
862
- }
863
- onSelect(evt) {
864
- const { list: list , setList: setList } = this.props;
865
- const newList = [
866
- ...list
867
- ];
868
- newList.forEach((item)=>{
869
- Object.assign(item, {
870
- chosen: false
871
- });
872
- });
873
- evt.newIndicies.forEach((curr)=>{
874
- const index = curr.index;
875
- if (index === -1) {
876
- console.log(`"${evt.type}" had indice of "${curr.index}", which is probably -1 and doesn't usually happen here.`);
877
- console.log(evt);
878
- return;
879
- }
880
- newList[index].selected = true;
881
- });
882
- setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
883
- }
884
- onDeselect(evt) {
885
- const { list: list , setList: setList } = this.props;
886
- const newList = [
887
- ...list
888
- ];
889
- newList.forEach((item)=>{
890
- Object.assign(item, {
891
- chosen: false
892
- });
893
- });
894
- evt.newIndicies.forEach((curr)=>{
895
- const index = curr.index;
896
- if (index === -1) return;
897
- newList[index].selected = true;
898
- });
899
- setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
900
- }
901
- }
902
- $7fe8e3ea572bda7a$export$11bbed9ee0012c13.defaultProps = {
903
- clone: (item)=>item
904
- };
905
-
906
-
907
- var $faefaad95e5fcca0$exports = {};
908
-
909
-
910
- $parcel$exportWildcard(module.exports, $faefaad95e5fcca0$exports);
911
-
912
-
913
-
914
- } (dist));
915
-
916
362
  var en = {
917
363
  add: 'Newly Added',
918
364
  titleForm: 'Form configuration (non mandatory)',
package/Form/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { DeepClone } from '@paraview/lib';
3
3
  import React__default from 'react';
4
- import { F as FormItem, l as localeJson, v as validate } from '../_verture/index-e0f9064d.js';
4
+ import { F as FormItem, l as localeJson, v as validate } from '../_verture/index-f518e244.js';
5
5
  import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
6
6
  import { u as useFormatMessage } from '../_verture/useFormatMessage-eb13cf56.js';
7
7
  import '../TextField/index.js';
@@ -70,7 +70,7 @@ import 'rc-pagination';
70
70
  import '@para-ui/icons/Right';
71
71
  import '@para-ui/icons/DoubleLeft';
72
72
  import '@para-ui/icons/DoubleRight';
73
- import '../_verture/index-4fafd0a0.js';
73
+ import '../_verture/index-3156e3ef.js';
74
74
  import '../_verture/toConsumableArray-c7a8028f.js';
75
75
  import '../_verture/index-d63bd287.js';
76
76
  import '../_verture/typeof-b240b062.js';