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

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 (101) hide show
  1. package/AutoTips/index.js +2 -2
  2. package/Cascader/index.js +4 -5
  3. package/ComboSelect/index.js +13 -15
  4. package/ComboSelect/lang/en_US.d.ts +1 -0
  5. package/ComboSelect/lang/index.d.ts +2 -0
  6. package/ComboSelect/lang/zh_CN.d.ts +1 -0
  7. package/CopyText/index.js +7 -5
  8. package/DatePicker/index.js +1 -3
  9. package/DatePicker/util.d.ts +6 -6
  10. package/DynamicMultiBox/index.js +7 -564
  11. package/Form/index.js +4 -8
  12. package/FormItem/index.js +4 -8
  13. package/FunctionModal/index.js +2 -2
  14. package/Menu/index.js +1 -1
  15. package/OperateBtn/index.js +8 -6
  16. package/Pagination/index.js +1 -1
  17. package/QuickReply/QuickReplyCode/index.d.ts +10 -0
  18. package/QuickReply/index.d.ts +87 -0
  19. package/QuickReply/index.js +550 -0
  20. package/QuickReply/lang/en_US.d.ts +14 -0
  21. package/QuickReply/lang/index.d.ts +29 -0
  22. package/QuickReply/lang/zh_CN.d.ts +14 -0
  23. package/README.md +2 -105
  24. package/Select/index.js +5 -3
  25. package/SelectInput/index.js +1 -1
  26. package/Selector/index.js +326 -3
  27. package/SelectorPicker/index.js +6 -5
  28. package/Stepper/index.js +1 -1
  29. package/Styles/theme.scss +1 -0
  30. package/Switch/index.js +6 -6
  31. package/Table/index.js +410 -472
  32. package/Tabs/index.js +3 -3
  33. package/Tag/index.js +55 -84
  34. package/TextEditor/index.js +3 -3
  35. package/TextField/index.js +1 -1
  36. package/TimePicker/index.js +1 -3
  37. package/Timeline/index.js +20 -14
  38. package/ToggleButton/index.js +26 -25
  39. package/Tooltip/index.js +27 -26
  40. package/Transfer/index.js +44 -49
  41. package/Tree/index.js +4 -8
  42. package/Upload/index.js +410 -627
  43. package/_verture/index-28a6bc3a.js +559 -0
  44. package/_verture/{index-3cdaba96.js → index-9784b09c.js} +18 -3
  45. package/_verture/{index-e0f9064d.js → index-bd14bb50.js} +1 -1
  46. package/_verture/{index-4fafd0a0.js → index-e3011376.js} +312 -394
  47. package/_verture/{slicedToArray-75fa4188.js → slicedToArray-8223a2ef.js} +1 -1
  48. package/index.d.ts +2 -0
  49. package/index.js +12 -10
  50. package/locale/en-US.d.ts +14 -0
  51. package/locale/index.d.ts +28 -0
  52. package/locale/index.js +30 -2
  53. package/locale/zh-CN.d.ts +14 -0
  54. package/package.json +3 -2
  55. package/umd/AutoTips.js +1 -1
  56. package/umd/Breadcrumbs.js +1 -1
  57. package/umd/Button.js +7 -7
  58. package/umd/ButtonGroup.js +1 -1
  59. package/umd/Cascader.js +1 -1
  60. package/umd/ComboSelect.js +4 -4
  61. package/umd/CopyText.js +2 -2
  62. package/umd/DatePicker.js +7 -7
  63. package/umd/Descriptions.js +1 -1
  64. package/umd/Desktop.js +1 -1
  65. package/umd/Drawer.js +1 -1
  66. package/umd/DynamicMultiBox.js +4 -4
  67. package/umd/Form.js +4 -4
  68. package/umd/FormItem.js +4 -4
  69. package/umd/FunctionModal.js +1 -1
  70. package/umd/InputLang.js +1 -1
  71. package/umd/Menu.js +1 -1
  72. package/umd/Modal.js +1 -1
  73. package/umd/MultiBox.js +1 -1
  74. package/umd/OperateBtn.js +2 -2
  75. package/umd/PageHeader.js +1 -1
  76. package/umd/Pagination.js +2 -2
  77. package/umd/PopConfirm.js +1 -1
  78. package/umd/QuickReply.js +55 -0
  79. package/umd/Search.js +1 -1
  80. package/umd/Select.js +2 -2
  81. package/umd/SelectInput.js +2 -2
  82. package/umd/Selector.js +1 -1
  83. package/umd/SelectorPicker.js +2 -2
  84. package/umd/SingleBox.js +1 -1
  85. package/umd/Stepper.js +1 -1
  86. package/umd/Switch.js +1 -1
  87. package/umd/Table.js +2 -2
  88. package/umd/Tabs.js +1 -1
  89. package/umd/Tag.js +1 -1
  90. package/umd/TextField.js +1 -1
  91. package/umd/TimePicker.js +5 -5
  92. package/umd/Title.js +1 -1
  93. package/umd/ToggleButton.js +1 -1
  94. package/umd/Transfer.js +1 -1
  95. package/umd/Tree.js +4 -4
  96. package/umd/Upload.js +1 -1
  97. package/umd/locale.js +1 -1
  98. package/_verture/index-d63bd287.js +0 -327
  99. package/_verture/toConsumableArray-c7a8028f.js +0 -19
  100. /package/_verture/{modalContext-8534f23d.js → modalContext-e4361800.js} +0 -0
  101. /package/_verture/{typeof-b240b062.js → typeof-c310ee4a.js} +0 -0
@@ -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-28a6bc3a.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';
@@ -52,13 +52,10 @@ import '@para-ui/icons/Up';
52
52
  import '../MultiBox/index.js';
53
53
  import '@para-ui/icons/Internet';
54
54
  import '../Table/index.js';
55
- import '../_verture/typeof-adeedc13.js';
56
- import '../_verture/slicedToArray-75fa4188.js';
57
55
  import '../Button/index.js';
58
56
  import '@para-ui/icons/ScreenF';
59
57
  import '@para-ui/icons/UpTriangleF';
60
58
  import '@para-ui/icons/DownTriangleF';
61
- import '../_verture/defineProperty-1d116156.js';
62
59
  import '../Radio/index.js';
63
60
  import '../OperateBtn/index.js';
64
61
  import '@para-ui/icons/More';
@@ -73,12 +70,11 @@ import 'rc-pagination';
73
70
  import '@para-ui/icons/Right';
74
71
  import '@para-ui/icons/DoubleLeft';
75
72
  import '@para-ui/icons/DoubleRight';
76
- import '../_verture/index-4fafd0a0.js';
77
- import '../_verture/toConsumableArray-c7a8028f.js';
78
- import '../_verture/index-d63bd287.js';
79
- import '../_verture/typeof-b240b062.js';
73
+ import '../_verture/index-e3011376.js';
80
74
  import 'rc-tree';
75
+ import '../_verture/typeof-adeedc13.js';
81
76
  import '@para-ui/icons/Document';
77
+ import '../_verture/slicedToArray-8223a2ef.js';
82
78
  import 'react-dom';
83
79
  import '@para-ui/icons/EditFile';
84
80
  import '@para-ui/icons/PlusCircle';
@@ -90,33 +86,14 @@ import '../Tag/index.js';
90
86
  import '@para-ui/icons/EditOutline';
91
87
  import '../_verture/tinycolor-ece3542d.js';
92
88
  import '@para-ui/icons/Plus';
89
+ import '../_verture/defineProperty-1d116156.js';
93
90
  import 'rc-picker';
94
91
  import '@para-ui/icons/Calendar';
95
92
  import '@para-ui/icons/Time';
96
93
  import 'rc-picker/lib/locale/en_US';
97
94
  import 'rc-picker/lib/locale/zh_CN';
98
95
  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
- }
96
+ import '../_verture/sortable.esm-49896035.js';
120
97
 
121
98
  var FormItem = function FormItem(props) {
122
99
  var onChange = props.onChange,
@@ -379,540 +356,6 @@ const RowForm = props => {
379
356
  });
380
357
  };
381
358
 
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
359
  var en = {
917
360
  add: 'Newly Added',
918
361
  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-bd14bb50.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';
@@ -28,7 +28,7 @@ import '../_verture/index-da9097d3.js';
28
28
  import 'rc-dropdown';
29
29
  import '../_verture/usePopupContainer-635f66f4.js';
30
30
  import 'dayjs';
31
- import '../_verture/slicedToArray-75fa4188.js';
31
+ import '../_verture/slicedToArray-8223a2ef.js';
32
32
  import '../RadioGroup/index.js';
33
33
  import '../Radio/index.js';
34
34
  import '../Select/index.js';
@@ -51,12 +51,10 @@ import 'rc-input-number';
51
51
  import '@para-ui/icons/Up';
52
52
  import '../ComboSelect/index.js';
53
53
  import '../Table/index.js';
54
- import '../_verture/typeof-adeedc13.js';
55
54
  import '@para-ui/icons/ScreenF';
56
55
  import '@para-ui/icons/UpTriangleF';
57
56
  import '@para-ui/icons/DownTriangleF';
58
57
  import '@para-ui/icons/Panel';
59
- import '../_verture/defineProperty-1d116156.js';
60
58
  import '../OperateBtn/index.js';
61
59
  import '@para-ui/icons/More';
62
60
  import '../PopConfirm/index.js';
@@ -70,11 +68,9 @@ import 'rc-pagination';
70
68
  import '@para-ui/icons/Right';
71
69
  import '@para-ui/icons/DoubleLeft';
72
70
  import '@para-ui/icons/DoubleRight';
73
- import '../_verture/index-4fafd0a0.js';
74
- import '../_verture/toConsumableArray-c7a8028f.js';
75
- import '../_verture/index-d63bd287.js';
76
- import '../_verture/typeof-b240b062.js';
71
+ import '../_verture/index-e3011376.js';
77
72
  import 'rc-tree';
73
+ import '../_verture/typeof-adeedc13.js';
78
74
  import '@para-ui/icons/Document';
79
75
  import 'react-dom';
80
76
  import '@para-ui/icons/EditFile';