@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.
- package/AutoTips/index.js +2 -2
- package/Cascader/index.js +2 -2
- package/ComboSelect/index.js +1 -1
- package/DatePicker/util.d.ts +6 -6
- package/DynamicMultiBox/index.js +4 -558
- package/Form/index.js +2 -2
- package/FormItem/index.js +2 -2
- package/FunctionModal/index.js +2 -2
- package/Menu/index.js +1 -1
- package/OperateBtn/index.js +8 -6
- package/Pagination/index.js +1 -1
- package/QuickReply/QuickReplyCode/index.d.ts +10 -0
- package/QuickReply/index.d.ts +87 -0
- package/QuickReply/index.js +550 -0
- package/QuickReply/lang/en_US.d.ts +14 -0
- package/QuickReply/lang/index.d.ts +29 -0
- package/QuickReply/lang/zh_CN.d.ts +14 -0
- package/README.md +1 -0
- package/Select/index.js +4 -3
- package/SelectorPicker/index.js +4 -2
- package/Stepper/index.js +1 -1
- package/Styles/theme.scss +1 -0
- package/Switch/index.js +2 -2
- package/Table/index.js +1 -1
- package/Tabs/index.js +1 -1
- package/Tag/index.js +2 -2
- package/Transfer/index.js +1 -1
- package/Tree/index.js +2 -2
- package/Upload/index.js +2 -2
- package/_verture/index-d6093d1c.js +559 -0
- package/index.d.ts +2 -0
- package/index.js +10 -6
- package/locale/en-US.d.ts +13 -0
- package/locale/index.d.ts +26 -0
- package/locale/index.js +26 -0
- package/locale/zh-CN.d.ts +13 -0
- package/package.json +1 -1
- package/umd/AutoTips.js +1 -1
- package/umd/Breadcrumbs.js +1 -1
- package/umd/Button.js +7 -7
- package/umd/ButtonGroup.js +1 -1
- package/umd/Cascader.js +1 -1
- package/umd/ComboSelect.js +4 -4
- package/umd/CopyText.js +1 -1
- package/umd/DatePicker.js +7 -7
- package/umd/Descriptions.js +1 -1
- package/umd/Desktop.js +1 -1
- package/umd/Drawer.js +1 -1
- package/umd/DynamicMultiBox.js +4 -4
- package/umd/Form.js +4 -4
- package/umd/FormItem.js +4 -4
- package/umd/FunctionModal.js +1 -1
- package/umd/InputLang.js +1 -1
- package/umd/Menu.js +1 -1
- package/umd/Modal.js +1 -1
- package/umd/MultiBox.js +1 -1
- package/umd/OperateBtn.js +2 -2
- package/umd/PageHeader.js +1 -1
- package/umd/Pagination.js +2 -2
- package/umd/PopConfirm.js +1 -1
- package/umd/QuickReply.js +55 -0
- package/umd/Search.js +1 -1
- package/umd/Select.js +2 -2
- package/umd/SelectInput.js +2 -2
- package/umd/Selector.js +1 -1
- package/umd/SelectorPicker.js +2 -2
- package/umd/SingleBox.js +1 -1
- package/umd/Stepper.js +1 -1
- package/umd/Table.js +2 -2
- package/umd/Tabs.js +1 -1
- package/umd/Tag.js +1 -1
- package/umd/TextField.js +1 -1
- package/umd/TimePicker.js +5 -5
- package/umd/Title.js +1 -1
- package/umd/ToggleButton.js +1 -1
- package/umd/Transfer.js +1 -1
- package/umd/Tree.js +4 -4
- package/umd/Upload.js +1 -1
- package/umd/locale.js +1 -1
- /package/_verture/{index-4fafd0a0.js → index-3156e3ef.js} +0 -0
- /package/_verture/{index-3cdaba96.js → index-466a3496.js} +0 -0
- /package/_verture/{index-e0f9064d.js → index-f518e244.js} +0 -0
- /package/_verture/{modalContext-8534f23d.js → modalContext-7b512b0c.js} +0 -0
|
@@ -0,0 +1,559 @@
|
|
|
1
|
+
import { s as sortable_esm } from './sortable.esm-49896035.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
function getAugmentedNamespace(n) {
|
|
5
|
+
var f = n.default;
|
|
6
|
+
if (typeof f == "function") {
|
|
7
|
+
var a = function () {
|
|
8
|
+
return f.apply(this, arguments);
|
|
9
|
+
};
|
|
10
|
+
a.prototype = f.prototype;
|
|
11
|
+
} else a = {};
|
|
12
|
+
Object.defineProperty(a, '__esModule', {value: true});
|
|
13
|
+
Object.keys(n).forEach(function (k) {
|
|
14
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
15
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () {
|
|
18
|
+
return n[k];
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
return a;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var dist = {exports: {}};
|
|
26
|
+
|
|
27
|
+
var require$$0 = /*@__PURE__*/getAugmentedNamespace(sortable_esm);
|
|
28
|
+
|
|
29
|
+
var classnames = {exports: {}};
|
|
30
|
+
|
|
31
|
+
/*!
|
|
32
|
+
Copyright (c) 2018 Jed Watson.
|
|
33
|
+
Licensed under the MIT License (MIT), see
|
|
34
|
+
http://jedwatson.github.io/classnames
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
(function (module) {
|
|
38
|
+
/* global define */
|
|
39
|
+
|
|
40
|
+
(function () {
|
|
41
|
+
|
|
42
|
+
var hasOwn = {}.hasOwnProperty;
|
|
43
|
+
|
|
44
|
+
function classNames() {
|
|
45
|
+
var classes = [];
|
|
46
|
+
|
|
47
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
48
|
+
var arg = arguments[i];
|
|
49
|
+
if (!arg) continue;
|
|
50
|
+
|
|
51
|
+
var argType = typeof arg;
|
|
52
|
+
|
|
53
|
+
if (argType === 'string' || argType === 'number') {
|
|
54
|
+
classes.push(arg);
|
|
55
|
+
} else if (Array.isArray(arg)) {
|
|
56
|
+
if (arg.length) {
|
|
57
|
+
var inner = classNames.apply(null, arg);
|
|
58
|
+
if (inner) {
|
|
59
|
+
classes.push(inner);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
} else if (argType === 'object') {
|
|
63
|
+
if (arg.toString === Object.prototype.toString) {
|
|
64
|
+
for (var key in arg) {
|
|
65
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
66
|
+
classes.push(key);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
} else {
|
|
70
|
+
classes.push(arg.toString());
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return classes.join(' ');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (module.exports) {
|
|
79
|
+
classNames.default = classNames;
|
|
80
|
+
module.exports = classNames;
|
|
81
|
+
} else {
|
|
82
|
+
window.classNames = classNames;
|
|
83
|
+
}
|
|
84
|
+
}());
|
|
85
|
+
} (classnames));
|
|
86
|
+
|
|
87
|
+
var isProduction = process.env.NODE_ENV === 'production';
|
|
88
|
+
var prefix = 'Invariant failed';
|
|
89
|
+
function invariant(condition, message) {
|
|
90
|
+
if (condition) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (isProduction) {
|
|
94
|
+
throw new Error(prefix);
|
|
95
|
+
}
|
|
96
|
+
var provided = typeof message === 'function' ? message() : message;
|
|
97
|
+
var value = provided ? prefix + ": " + provided : prefix;
|
|
98
|
+
throw new Error(value);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
var tinyInvariant_esm = /*#__PURE__*/Object.freeze({
|
|
102
|
+
__proto__: null,
|
|
103
|
+
'default': invariant
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
var require$$3 = /*@__PURE__*/getAugmentedNamespace(tinyInvariant_esm);
|
|
107
|
+
|
|
108
|
+
(function (module) {
|
|
109
|
+
var $8zHUo$sortablejs = require$$0;
|
|
110
|
+
var $8zHUo$classnames = classnames.exports;
|
|
111
|
+
var $8zHUo$react = React__default;
|
|
112
|
+
var $8zHUo$tinyinvariant = require$$3;
|
|
113
|
+
|
|
114
|
+
function $parcel$interopDefault(a) {
|
|
115
|
+
return a && a.__esModule ? a.default : a;
|
|
116
|
+
}
|
|
117
|
+
function $parcel$export(e, n, v, s) {
|
|
118
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
119
|
+
}
|
|
120
|
+
function $parcel$exportWildcard(dest, source) {
|
|
121
|
+
Object.keys(source).forEach(function(key) {
|
|
122
|
+
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
Object.defineProperty(dest, key, {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function get() {
|
|
129
|
+
return source[key];
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
return dest;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
$parcel$export(module.exports, "Sortable", () => $882b6d93070905b3$re_export$Sortable);
|
|
138
|
+
$parcel$export(module.exports, "Direction", () => $882b6d93070905b3$re_export$Direction);
|
|
139
|
+
$parcel$export(module.exports, "DOMRect", () => $882b6d93070905b3$re_export$DOMRect);
|
|
140
|
+
$parcel$export(module.exports, "GroupOptions", () => $882b6d93070905b3$re_export$GroupOptions);
|
|
141
|
+
$parcel$export(module.exports, "MoveEvent", () => $882b6d93070905b3$re_export$MoveEvent);
|
|
142
|
+
$parcel$export(module.exports, "Options", () => $882b6d93070905b3$re_export$Options);
|
|
143
|
+
$parcel$export(module.exports, "PullResult", () => $882b6d93070905b3$re_export$PullResult);
|
|
144
|
+
$parcel$export(module.exports, "PutResult", () => $882b6d93070905b3$re_export$PutResult);
|
|
145
|
+
$parcel$export(module.exports, "SortableEvent", () => $882b6d93070905b3$re_export$SortableEvent);
|
|
146
|
+
$parcel$export(module.exports, "SortableOptions", () => $882b6d93070905b3$re_export$SortableOptions);
|
|
147
|
+
$parcel$export(module.exports, "Utils", () => $882b6d93070905b3$re_export$Utils);
|
|
148
|
+
$parcel$export(module.exports, "ReactSortable", () => $7fe8e3ea572bda7a$export$11bbed9ee0012c13);
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
function $eb03e74f8f7db1f3$export$1d0aa160432dfea5(node) {
|
|
155
|
+
if (node.parentElement !== null) node.parentElement.removeChild(node);
|
|
156
|
+
}
|
|
157
|
+
function $eb03e74f8f7db1f3$export$6d240faa51aa562f(parent, newChild, index) {
|
|
158
|
+
const refChild = parent.children[index] || null;
|
|
159
|
+
parent.insertBefore(newChild, refChild);
|
|
160
|
+
}
|
|
161
|
+
function $eb03e74f8f7db1f3$export$77f49a256021c8de(customs) {
|
|
162
|
+
customs.forEach((curr)=>$eb03e74f8f7db1f3$export$1d0aa160432dfea5(curr.element)
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
function $eb03e74f8f7db1f3$export$a6177d5829f70ebc(customs) {
|
|
166
|
+
customs.forEach((curr)=>{
|
|
167
|
+
$eb03e74f8f7db1f3$export$6d240faa51aa562f(curr.parentElement, curr.element, curr.oldIndex);
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
function $eb03e74f8f7db1f3$export$4655efe700f887a(evt, list) {
|
|
171
|
+
const mode = $eb03e74f8f7db1f3$export$1fc0f6205829e19c(evt);
|
|
172
|
+
const parentElement = {
|
|
173
|
+
parentElement: evt.from
|
|
174
|
+
};
|
|
175
|
+
let custom = [];
|
|
176
|
+
switch(mode){
|
|
177
|
+
case "normal":
|
|
178
|
+
/* eslint-disable */ const item = {
|
|
179
|
+
element: evt.item,
|
|
180
|
+
newIndex: evt.newIndex,
|
|
181
|
+
oldIndex: evt.oldIndex,
|
|
182
|
+
parentElement: evt.from
|
|
183
|
+
};
|
|
184
|
+
custom = [
|
|
185
|
+
item
|
|
186
|
+
];
|
|
187
|
+
break;
|
|
188
|
+
case "swap":
|
|
189
|
+
const drag = {
|
|
190
|
+
element: evt.item,
|
|
191
|
+
oldIndex: evt.oldIndex,
|
|
192
|
+
newIndex: evt.newIndex,
|
|
193
|
+
...parentElement
|
|
194
|
+
};
|
|
195
|
+
const swap = {
|
|
196
|
+
element: evt.swapItem,
|
|
197
|
+
oldIndex: evt.newIndex,
|
|
198
|
+
newIndex: evt.oldIndex,
|
|
199
|
+
...parentElement
|
|
200
|
+
};
|
|
201
|
+
custom = [
|
|
202
|
+
drag,
|
|
203
|
+
swap
|
|
204
|
+
];
|
|
205
|
+
break;
|
|
206
|
+
case "multidrag":
|
|
207
|
+
custom = evt.oldIndicies.map((curr, index)=>({
|
|
208
|
+
element: curr.multiDragElement,
|
|
209
|
+
oldIndex: curr.index,
|
|
210
|
+
newIndex: evt.newIndicies[index].index,
|
|
211
|
+
...parentElement
|
|
212
|
+
})
|
|
213
|
+
);
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
/* eslint-enable */ const customs = $eb03e74f8f7db1f3$export$bc06a3af7dc65f53(custom, list);
|
|
217
|
+
return customs;
|
|
218
|
+
}
|
|
219
|
+
function $eb03e74f8f7db1f3$export$c25cf8080bd305ec(normalized, list) {
|
|
220
|
+
const a = $eb03e74f8f7db1f3$export$be2da95e6167b0bd(normalized, list);
|
|
221
|
+
const b = $eb03e74f8f7db1f3$export$eca851ee65ae17e4(normalized, a);
|
|
222
|
+
return b;
|
|
223
|
+
}
|
|
224
|
+
function $eb03e74f8f7db1f3$export$be2da95e6167b0bd(normalized, list) {
|
|
225
|
+
const newList = [
|
|
226
|
+
...list
|
|
227
|
+
];
|
|
228
|
+
normalized.concat().reverse().forEach((curr)=>newList.splice(curr.oldIndex, 1)
|
|
229
|
+
);
|
|
230
|
+
return newList;
|
|
231
|
+
}
|
|
232
|
+
function $eb03e74f8f7db1f3$export$eca851ee65ae17e4(normalized, list, evt, clone) {
|
|
233
|
+
const newList = [
|
|
234
|
+
...list
|
|
235
|
+
];
|
|
236
|
+
normalized.forEach((curr)=>{
|
|
237
|
+
const newItem = clone && evt && clone(curr.item, evt);
|
|
238
|
+
newList.splice(curr.newIndex, 0, newItem || curr.item);
|
|
239
|
+
});
|
|
240
|
+
return newList;
|
|
241
|
+
}
|
|
242
|
+
function $eb03e74f8f7db1f3$export$1fc0f6205829e19c(evt) {
|
|
243
|
+
if (evt.oldIndicies && evt.oldIndicies.length > 0) return "multidrag";
|
|
244
|
+
if (evt.swapItem) return "swap";
|
|
245
|
+
return "normal";
|
|
246
|
+
}
|
|
247
|
+
function $eb03e74f8f7db1f3$export$bc06a3af7dc65f53(inputs, list) {
|
|
248
|
+
const normalized = inputs.map((curr)=>({
|
|
249
|
+
...curr,
|
|
250
|
+
item: list[curr.oldIndex]
|
|
251
|
+
})
|
|
252
|
+
).sort((a, b)=>a.oldIndex - b.oldIndex
|
|
253
|
+
);
|
|
254
|
+
return normalized;
|
|
255
|
+
}
|
|
256
|
+
function $eb03e74f8f7db1f3$export$7553c81e62e31b7e(props) {
|
|
257
|
+
/* eslint-disable */ const { list: // react sortable props
|
|
258
|
+
list , setList: setList , children: children , tag: tag , style: style , className: className , clone: clone , onAdd: // sortable options that have methods we want to overwrite
|
|
259
|
+
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;
|
|
260
|
+
/* eslint-enable */ return options;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
/** Holds a global reference for which react element is being dragged */ // @todo - use context to manage this. How does one use 2 different providers?
|
|
265
|
+
const $7fe8e3ea572bda7a$var$store = {
|
|
266
|
+
dragging: null
|
|
267
|
+
};
|
|
268
|
+
class $7fe8e3ea572bda7a$export$11bbed9ee0012c13 extends $8zHUo$react.Component {
|
|
269
|
+
constructor(props){
|
|
270
|
+
super(props);
|
|
271
|
+
// @todo forward ref this component
|
|
272
|
+
this.ref = /*#__PURE__*/ $8zHUo$react.createRef();
|
|
273
|
+
// make all state false because we can't change sortable unless a mouse gesture is made.
|
|
274
|
+
const newList = [
|
|
275
|
+
...props.list
|
|
276
|
+
];
|
|
277
|
+
newList.forEach((item)=>{
|
|
278
|
+
Object.assign(item, {
|
|
279
|
+
chosen: false,
|
|
280
|
+
selected: false
|
|
281
|
+
});
|
|
282
|
+
});
|
|
283
|
+
props.setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
|
|
284
|
+
($parcel$interopDefault($8zHUo$tinyinvariant))(//@ts-expect-error: Doesn't exist. Will deprecate soon.
|
|
285
|
+
!props.plugins, `
|
|
286
|
+
Plugins prop is no longer supported.
|
|
287
|
+
Instead, mount it with "Sortable.mount(new MultiDrag())"
|
|
288
|
+
Please read the updated README.md at https://github.com/SortableJS/react-sortablejs.
|
|
289
|
+
`);
|
|
290
|
+
}
|
|
291
|
+
componentDidMount() {
|
|
292
|
+
if (this.ref.current === null) return;
|
|
293
|
+
const newOptions = this.makeOptions();
|
|
294
|
+
($parcel$interopDefault($8zHUo$sortablejs)).create(this.ref.current, newOptions);
|
|
295
|
+
}
|
|
296
|
+
componentDidUpdate(prevProps) {
|
|
297
|
+
if (prevProps.disabled !== this.props.disabled && this.sortable) this.sortable.option("disabled", this.props.disabled);
|
|
298
|
+
}
|
|
299
|
+
render() {
|
|
300
|
+
const { tag: tag , style: style , className: className , id: id } = this.props;
|
|
301
|
+
const classicProps = {
|
|
302
|
+
style: style,
|
|
303
|
+
className: className,
|
|
304
|
+
id: id
|
|
305
|
+
};
|
|
306
|
+
// if no tag, default to a `div` element.
|
|
307
|
+
const newTag = !tag || tag === null ? "div" : tag;
|
|
308
|
+
return(/*#__PURE__*/ $8zHUo$react.createElement(newTag, {
|
|
309
|
+
// @todo - find a way (perhaps with the callback) to allow AntD components to work
|
|
310
|
+
ref: this.ref,
|
|
311
|
+
...classicProps
|
|
312
|
+
}, this.getChildren()));
|
|
313
|
+
}
|
|
314
|
+
getChildren() {
|
|
315
|
+
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;
|
|
316
|
+
// if no children, don't do anything.
|
|
317
|
+
if (!children || children == null) return null;
|
|
318
|
+
const dataid = dataIdAttr || "data-id";
|
|
319
|
+
/* eslint-disable-next-line */ return $8zHUo$react.Children.map(children, (child, index)=>{
|
|
320
|
+
if (child === undefined) return undefined;
|
|
321
|
+
const item = list[index] || {
|
|
322
|
+
};
|
|
323
|
+
const { className: prevClassName } = child.props;
|
|
324
|
+
// @todo - handle the function if avalable. I don't think anyone will be doing this soon.
|
|
325
|
+
const filtered = typeof filter === "string" && {
|
|
326
|
+
[filter.replace(".", "")]: !!item.filtered
|
|
327
|
+
};
|
|
328
|
+
const className = ($parcel$interopDefault($8zHUo$classnames))(prevClassName, {
|
|
329
|
+
[selectedClass]: item.selected,
|
|
330
|
+
[chosenClass]: item.chosen,
|
|
331
|
+
...filtered
|
|
332
|
+
});
|
|
333
|
+
return(/*#__PURE__*/ $8zHUo$react.cloneElement(child, {
|
|
334
|
+
[dataid]: child.key,
|
|
335
|
+
className: className
|
|
336
|
+
}));
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
/** Appends the `sortable` property to this component */ get sortable() {
|
|
340
|
+
const el = this.ref.current;
|
|
341
|
+
if (el === null) return null;
|
|
342
|
+
const key = Object.keys(el).find((k)=>k.includes("Sortable")
|
|
343
|
+
);
|
|
344
|
+
if (!key) return null;
|
|
345
|
+
//@ts-expect-error: fix me.
|
|
346
|
+
return el[key];
|
|
347
|
+
}
|
|
348
|
+
/** Converts all the props from `ReactSortable` into the `options` object that `Sortable.create(el, [options])` can use. */ makeOptions() {
|
|
349
|
+
const DOMHandlers = [
|
|
350
|
+
"onAdd",
|
|
351
|
+
"onChoose",
|
|
352
|
+
"onDeselect",
|
|
353
|
+
"onEnd",
|
|
354
|
+
"onRemove",
|
|
355
|
+
"onSelect",
|
|
356
|
+
"onSpill",
|
|
357
|
+
"onStart",
|
|
358
|
+
"onUnchoose",
|
|
359
|
+
"onUpdate",
|
|
360
|
+
];
|
|
361
|
+
const NonDOMHandlers = [
|
|
362
|
+
"onChange",
|
|
363
|
+
"onClone",
|
|
364
|
+
"onFilter",
|
|
365
|
+
"onSort",
|
|
366
|
+
];
|
|
367
|
+
const newOptions = $eb03e74f8f7db1f3$export$7553c81e62e31b7e(this.props);
|
|
368
|
+
DOMHandlers.forEach((name)=>newOptions[name] = this.prepareOnHandlerPropAndDOM(name)
|
|
369
|
+
);
|
|
370
|
+
NonDOMHandlers.forEach((name)=>newOptions[name] = this.prepareOnHandlerProp(name)
|
|
371
|
+
);
|
|
372
|
+
/** onMove has 2 arguments and needs to be handled seperately. */ const onMove1 = (evt, originalEvt)=>{
|
|
373
|
+
const { onMove: onMove } = this.props;
|
|
374
|
+
const defaultValue = evt.willInsertAfter || -1;
|
|
375
|
+
if (!onMove) return defaultValue;
|
|
376
|
+
const result = onMove(evt, originalEvt, this.sortable, $7fe8e3ea572bda7a$var$store);
|
|
377
|
+
if (typeof result === "undefined") return false;
|
|
378
|
+
return result;
|
|
379
|
+
};
|
|
380
|
+
return {
|
|
381
|
+
...newOptions,
|
|
382
|
+
onMove: onMove1
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
/** Prepares a method that will be used in the sortable options to call an `on[Handler]` prop & an `on[Handler]` ReactSortable method. */ prepareOnHandlerPropAndDOM(evtName) {
|
|
386
|
+
return (evt)=>{
|
|
387
|
+
// call the component prop
|
|
388
|
+
this.callOnHandlerProp(evt, evtName);
|
|
389
|
+
// calls state change
|
|
390
|
+
//@ts-expect-error: until @types multidrag item is in
|
|
391
|
+
this[evtName](evt);
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
/** Prepares a method that will be used in the sortable options to call an `on[Handler]` prop */ prepareOnHandlerProp(evtName) {
|
|
395
|
+
return (evt)=>{
|
|
396
|
+
// call the component prop
|
|
397
|
+
this.callOnHandlerProp(evt, evtName);
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
/** Calls the `props.on[Handler]` function */ callOnHandlerProp(evt, evtName) {
|
|
401
|
+
const propEvent = this.props[evtName];
|
|
402
|
+
if (propEvent) propEvent(evt, this.sortable, $7fe8e3ea572bda7a$var$store);
|
|
403
|
+
}
|
|
404
|
+
// SORTABLE DOM HANDLING
|
|
405
|
+
onAdd(evt) {
|
|
406
|
+
const { list: list , setList: setList , clone: clone } = this.props;
|
|
407
|
+
/* eslint-disable-next-line */ const otherList = [
|
|
408
|
+
...$7fe8e3ea572bda7a$var$store.dragging.props.list
|
|
409
|
+
];
|
|
410
|
+
const customs = $eb03e74f8f7db1f3$export$4655efe700f887a(evt, otherList);
|
|
411
|
+
$eb03e74f8f7db1f3$export$77f49a256021c8de(customs);
|
|
412
|
+
const newList = $eb03e74f8f7db1f3$export$eca851ee65ae17e4(customs, list, evt, clone);
|
|
413
|
+
newList.forEach((item)=>{
|
|
414
|
+
Object.assign(item, {
|
|
415
|
+
selected: false
|
|
416
|
+
});
|
|
417
|
+
});
|
|
418
|
+
setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
|
|
419
|
+
}
|
|
420
|
+
onRemove(evt) {
|
|
421
|
+
const { list: list , setList: setList } = this.props;
|
|
422
|
+
const mode = $eb03e74f8f7db1f3$export$1fc0f6205829e19c(evt);
|
|
423
|
+
const customs = $eb03e74f8f7db1f3$export$4655efe700f887a(evt, list);
|
|
424
|
+
$eb03e74f8f7db1f3$export$a6177d5829f70ebc(customs);
|
|
425
|
+
let newList = [
|
|
426
|
+
...list
|
|
427
|
+
];
|
|
428
|
+
// remove state if not in clone mode. otherwise, keep.
|
|
429
|
+
if (evt.pullMode !== "clone") newList = $eb03e74f8f7db1f3$export$be2da95e6167b0bd(customs, newList);
|
|
430
|
+
else {
|
|
431
|
+
// switch used to get the clone
|
|
432
|
+
let customClones = customs;
|
|
433
|
+
switch(mode){
|
|
434
|
+
case "multidrag":
|
|
435
|
+
customClones = customs.map((item, index)=>({
|
|
436
|
+
...item,
|
|
437
|
+
element: evt.clones[index]
|
|
438
|
+
})
|
|
439
|
+
);
|
|
440
|
+
break;
|
|
441
|
+
case "normal":
|
|
442
|
+
customClones = customs.map((item)=>({
|
|
443
|
+
...item,
|
|
444
|
+
element: evt.clone
|
|
445
|
+
})
|
|
446
|
+
);
|
|
447
|
+
break;
|
|
448
|
+
case "swap":
|
|
449
|
+
default:
|
|
450
|
+
($parcel$interopDefault($8zHUo$tinyinvariant))(true, `mode "${mode}" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "${mode}" plugin`);
|
|
451
|
+
}
|
|
452
|
+
$eb03e74f8f7db1f3$export$77f49a256021c8de(customClones);
|
|
453
|
+
// replace selected items with cloned items
|
|
454
|
+
customs.forEach((curr)=>{
|
|
455
|
+
const index = curr.oldIndex;
|
|
456
|
+
/* eslint-disable-next-line */ const newItem = this.props.clone(curr.item, evt);
|
|
457
|
+
newList.splice(index, 1, newItem);
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
// remove item.selected from list
|
|
461
|
+
newList.forEach((item)=>{
|
|
462
|
+
Object.assign(item, {
|
|
463
|
+
selected: false
|
|
464
|
+
});
|
|
465
|
+
});
|
|
466
|
+
setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
|
|
467
|
+
}
|
|
468
|
+
onUpdate(evt) {
|
|
469
|
+
const { list: list , setList: setList } = this.props;
|
|
470
|
+
const customs = $eb03e74f8f7db1f3$export$4655efe700f887a(evt, list);
|
|
471
|
+
$eb03e74f8f7db1f3$export$77f49a256021c8de(customs);
|
|
472
|
+
$eb03e74f8f7db1f3$export$a6177d5829f70ebc(customs);
|
|
473
|
+
const newList = $eb03e74f8f7db1f3$export$c25cf8080bd305ec(customs, list);
|
|
474
|
+
return setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
|
|
475
|
+
}
|
|
476
|
+
onStart() {
|
|
477
|
+
$7fe8e3ea572bda7a$var$store.dragging = this;
|
|
478
|
+
}
|
|
479
|
+
onEnd() {
|
|
480
|
+
$7fe8e3ea572bda7a$var$store.dragging = null;
|
|
481
|
+
}
|
|
482
|
+
onChoose(evt) {
|
|
483
|
+
const { list: list , setList: setList } = this.props;
|
|
484
|
+
const newList = list.map((item, index)=>{
|
|
485
|
+
if (index === evt.oldIndex) Object.assign(item, {
|
|
486
|
+
chosen: true
|
|
487
|
+
});
|
|
488
|
+
return item;
|
|
489
|
+
});
|
|
490
|
+
setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
|
|
491
|
+
}
|
|
492
|
+
onUnchoose(evt) {
|
|
493
|
+
const { list: list , setList: setList } = this.props;
|
|
494
|
+
const newList = list.map((item, index)=>{
|
|
495
|
+
if (index === evt.oldIndex) Object.assign(item, {
|
|
496
|
+
chosen: false
|
|
497
|
+
});
|
|
498
|
+
return item;
|
|
499
|
+
});
|
|
500
|
+
setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
|
|
501
|
+
}
|
|
502
|
+
onSpill(evt) {
|
|
503
|
+
const { removeOnSpill: removeOnSpill , revertOnSpill: revertOnSpill } = this.props;
|
|
504
|
+
if (removeOnSpill && !revertOnSpill) $eb03e74f8f7db1f3$export$1d0aa160432dfea5(evt.item);
|
|
505
|
+
}
|
|
506
|
+
onSelect(evt) {
|
|
507
|
+
const { list: list , setList: setList } = this.props;
|
|
508
|
+
const newList = [
|
|
509
|
+
...list
|
|
510
|
+
];
|
|
511
|
+
newList.forEach((item)=>{
|
|
512
|
+
Object.assign(item, {
|
|
513
|
+
chosen: false
|
|
514
|
+
});
|
|
515
|
+
});
|
|
516
|
+
evt.newIndicies.forEach((curr)=>{
|
|
517
|
+
const index = curr.index;
|
|
518
|
+
if (index === -1) {
|
|
519
|
+
console.log(`"${evt.type}" had indice of "${curr.index}", which is probably -1 and doesn't usually happen here.`);
|
|
520
|
+
console.log(evt);
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
newList[index].selected = true;
|
|
524
|
+
});
|
|
525
|
+
setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
|
|
526
|
+
}
|
|
527
|
+
onDeselect(evt) {
|
|
528
|
+
const { list: list , setList: setList } = this.props;
|
|
529
|
+
const newList = [
|
|
530
|
+
...list
|
|
531
|
+
];
|
|
532
|
+
newList.forEach((item)=>{
|
|
533
|
+
Object.assign(item, {
|
|
534
|
+
chosen: false
|
|
535
|
+
});
|
|
536
|
+
});
|
|
537
|
+
evt.newIndicies.forEach((curr)=>{
|
|
538
|
+
const index = curr.index;
|
|
539
|
+
if (index === -1) return;
|
|
540
|
+
newList[index].selected = true;
|
|
541
|
+
});
|
|
542
|
+
setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
$7fe8e3ea572bda7a$export$11bbed9ee0012c13.defaultProps = {
|
|
546
|
+
clone: (item)=>item
|
|
547
|
+
};
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
var $faefaad95e5fcca0$exports = {};
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
$parcel$exportWildcard(module.exports, $faefaad95e5fcca0$exports);
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
} (dist));
|
|
558
|
+
|
|
559
|
+
export { dist as d };
|
package/index.d.ts
CHANGED
|
@@ -96,6 +96,8 @@ export { default as Progress } from './Progress';
|
|
|
96
96
|
export * from './Progress';
|
|
97
97
|
export { default as Querying } from './Querying';
|
|
98
98
|
export * from './Querying';
|
|
99
|
+
export { default as QuickReply } from './QuickReply';
|
|
100
|
+
export * from './QuickReply';
|
|
99
101
|
export { default as Radio } from './Radio';
|
|
100
102
|
export * from './Radio';
|
|
101
103
|
export { default as RadioGroup } from './RadioGroup';
|
package/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { Breadcrumbs } from './Breadcrumbs/index.js';
|
|
|
5
5
|
export { Button } from './Button/index.js';
|
|
6
6
|
export { ButtonGroup } from './ButtonGroup/index.js';
|
|
7
7
|
export { Carousel } from './Carousel/index.js';
|
|
8
|
-
export { C as Cascader } from './_verture/index-
|
|
8
|
+
export { C as Cascader } from './_verture/index-466a3496.js';
|
|
9
9
|
export { Checkbox } from './Checkbox/index.js';
|
|
10
10
|
export { CheckboxGroup } from './CheckboxGroup/index.js';
|
|
11
11
|
export { Collapse } from './Collapse/index.js';
|
|
@@ -24,8 +24,8 @@ export { D as Dropdown } from './_verture/index-da9097d3.js';
|
|
|
24
24
|
export { default as DynamicMultiBox } from './DynamicMultiBox/index.js';
|
|
25
25
|
export { default as Empty } from './Empty/index.js';
|
|
26
26
|
export { default as Form } from './Form/index.js';
|
|
27
|
-
export { F as FormItem } from './_verture/index-
|
|
28
|
-
export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-
|
|
27
|
+
export { F as FormItem } from './_verture/index-f518e244.js';
|
|
28
|
+
export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-7b512b0c.js';
|
|
29
29
|
export { default as GlobalContext, changeConfirmLocale, getConfirmLocale } from './GlobalContext/index.js';
|
|
30
30
|
export { default as Help } from './Help/index.js';
|
|
31
31
|
export { default as HelperText } from './HelperText/index.js';
|
|
@@ -47,6 +47,7 @@ export { PopConfirm } from './PopConfirm/index.js';
|
|
|
47
47
|
export { Popover } from './Popover/index.js';
|
|
48
48
|
export { Progress } from './Progress/index.js';
|
|
49
49
|
export { default as Querying } from './Querying/index.js';
|
|
50
|
+
export { QuickReply, QuickReplyCode } from './QuickReply/index.js';
|
|
50
51
|
export { Radio } from './Radio/index.js';
|
|
51
52
|
export { RadioGroup } from './RadioGroup/index.js';
|
|
52
53
|
export { Search } from './Search/index.js';
|
|
@@ -70,7 +71,7 @@ export { Title } from './Title/index.js';
|
|
|
70
71
|
export { ToggleButton, ToggleButtonGroup } from './ToggleButton/index.js';
|
|
71
72
|
export { Tooltip } from './Tooltip/index.js';
|
|
72
73
|
export { SSortablejs, Transfer } from './Transfer/index.js';
|
|
73
|
-
export { T as Tree } from './_verture/index-
|
|
74
|
+
export { T as Tree } from './_verture/index-3156e3ef.js';
|
|
74
75
|
export { default as Upload } from './Upload/index.js';
|
|
75
76
|
export { default as locale } from './locale/index.js';
|
|
76
77
|
import 'react/jsx-runtime';
|
|
@@ -133,6 +134,7 @@ import '@para-ui/icons/Panel';
|
|
|
133
134
|
import '@para-ui/icons/PlusCircleF';
|
|
134
135
|
import '@para-ui/icons/Delete';
|
|
135
136
|
import '@para-ui/icons/Drag';
|
|
137
|
+
import './_verture/index-d6093d1c.js';
|
|
136
138
|
import './_verture/sortable.esm-49896035.js';
|
|
137
139
|
import '@para-ui/icons/LinkGroup';
|
|
138
140
|
import '@para-ui/icons/UploadFile';
|
|
@@ -152,6 +154,10 @@ import 'rc-pagination';
|
|
|
152
154
|
import '@para-ui/icons/DoubleLeft';
|
|
153
155
|
import '@para-ui/icons/WarningCircle';
|
|
154
156
|
import 'rc-progress';
|
|
157
|
+
import '@para-ui/icons/Plus';
|
|
158
|
+
import '@para-ui/icons/EditOutline';
|
|
159
|
+
import '@para-ui/icons/Message';
|
|
160
|
+
import '@para-ui/icons/Set';
|
|
155
161
|
import './_verture/index-d63bd287.js';
|
|
156
162
|
import 'rc-slider';
|
|
157
163
|
import './_verture/tinycolor-ece3542d.js';
|
|
@@ -170,8 +176,6 @@ import '@para-ui/icons/ScreenF';
|
|
|
170
176
|
import '@para-ui/icons/UpTriangleF';
|
|
171
177
|
import '@para-ui/icons/DownTriangleF';
|
|
172
178
|
import 'rc-tabs';
|
|
173
|
-
import '@para-ui/icons/Plus';
|
|
174
|
-
import '@para-ui/icons/EditOutline';
|
|
175
179
|
import '@wangeditor/editor-for-react';
|
|
176
180
|
import '@wangeditor/editor';
|
|
177
181
|
import '@para-ui/icons/PreviewClose';
|
package/locale/en-US.d.ts
CHANGED
|
@@ -109,6 +109,19 @@ declare const _default: {
|
|
|
109
109
|
Querying: {
|
|
110
110
|
querying: string;
|
|
111
111
|
};
|
|
112
|
+
QuickReply: {
|
|
113
|
+
back: string;
|
|
114
|
+
add: string;
|
|
115
|
+
edit: string;
|
|
116
|
+
sort: string;
|
|
117
|
+
del: string;
|
|
118
|
+
delTip: string;
|
|
119
|
+
batchDel: string;
|
|
120
|
+
quickReply: string;
|
|
121
|
+
confirm: string;
|
|
122
|
+
cancel: string;
|
|
123
|
+
pleaseEnter: string;
|
|
124
|
+
};
|
|
112
125
|
Select: {
|
|
113
126
|
searchPlaceholder: string;
|
|
114
127
|
more: string;
|
package/locale/index.d.ts
CHANGED
|
@@ -110,6 +110,19 @@ declare const _default: {
|
|
|
110
110
|
Querying: {
|
|
111
111
|
querying: string;
|
|
112
112
|
};
|
|
113
|
+
QuickReply: {
|
|
114
|
+
back: string;
|
|
115
|
+
add: string;
|
|
116
|
+
edit: string;
|
|
117
|
+
sort: string;
|
|
118
|
+
del: string;
|
|
119
|
+
delTip: string;
|
|
120
|
+
batchDel: string;
|
|
121
|
+
quickReply: string;
|
|
122
|
+
confirm: string;
|
|
123
|
+
cancel: string;
|
|
124
|
+
pleaseEnter: string;
|
|
125
|
+
};
|
|
113
126
|
Select: {
|
|
114
127
|
searchPlaceholder: string;
|
|
115
128
|
more: string;
|
|
@@ -290,6 +303,19 @@ declare const _default: {
|
|
|
290
303
|
Querying: {
|
|
291
304
|
querying: string;
|
|
292
305
|
};
|
|
306
|
+
QuickReply: {
|
|
307
|
+
back: string;
|
|
308
|
+
add: string;
|
|
309
|
+
edit: string;
|
|
310
|
+
sort: string;
|
|
311
|
+
del: string;
|
|
312
|
+
delTip: string;
|
|
313
|
+
batchDel: string;
|
|
314
|
+
quickReply: string;
|
|
315
|
+
confirm: string;
|
|
316
|
+
cancel: string;
|
|
317
|
+
pleaseEnter: string;
|
|
318
|
+
};
|
|
293
319
|
Select: {
|
|
294
320
|
searchPlaceholder: string;
|
|
295
321
|
more: string;
|