@douyinfe/semi-ui 2.1.5 → 2.2.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.
- package/_base/_story/a11y.jsx +1302 -0
- package/_base/_story/a11y.scss +49 -0
- package/_base/_story/index.stories.js +3 -1
- package/_utils/index.ts +9 -4
- package/cascader/__test__/cascader.test.js +221 -0
- package/cascader/_story/cascader.stories.js +138 -0
- package/cascader/index.tsx +37 -21
- package/cascader/item.tsx +4 -2
- package/datePicker/__test__/datePicker.test.js +85 -2
- package/datePicker/_story/datePicker.stories.js +29 -1
- package/datePicker/_story/v2/YearButton.jsx +17 -0
- package/datePicker/_story/v2/index.js +1 -0
- package/datePicker/monthsGrid.tsx +12 -1
- package/datePicker/navigation.tsx +55 -29
- package/descriptions/__test__/descriptions.test.js +27 -1
- package/descriptions/_story/descriptions.stories.js +52 -2
- package/descriptions/item.tsx +1 -1
- package/dist/css/semi.css +49 -25
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +839 -253
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/empty/index.tsx +2 -2
- package/form/_story/form.stories.js +0 -67
- package/gulpfile.js +2 -1
- package/lib/cjs/_utils/index.d.ts +1 -0
- package/lib/cjs/_utils/index.js +12 -5
- package/lib/cjs/cascader/index.d.ts +7 -0
- package/lib/cjs/cascader/index.js +35 -22
- package/lib/cjs/cascader/item.d.ts +2 -0
- package/lib/cjs/cascader/item.js +4 -2
- package/lib/cjs/datePicker/monthsGrid.d.ts +1 -0
- package/lib/cjs/datePicker/monthsGrid.js +6 -0
- package/lib/cjs/datePicker/navigation.js +47 -7
- package/lib/cjs/descriptions/item.js +1 -1
- package/lib/cjs/empty/index.d.ts +2 -2
- package/lib/cjs/empty/index.js +19 -18
- package/lib/cjs/form/baseForm.d.ts +5 -0
- package/lib/cjs/form/field.d.ts +5 -0
- package/lib/cjs/locale/source/es.d.ts +7 -0
- package/lib/cjs/locale/source/es.js +168 -0
- package/lib/cjs/pagination/index.js +9 -4
- package/lib/cjs/rating/item.js +1 -1
- package/lib/cjs/select/index.d.ts +9 -0
- package/lib/cjs/select/index.js +13 -9
- package/lib/cjs/tabs/index.js +3 -7
- package/lib/cjs/timeline/item.d.ts +3 -0
- package/lib/cjs/timeline/item.js +10 -4
- package/lib/cjs/upload/fileCard.d.ts +2 -0
- package/lib/cjs/upload/fileCard.js +70 -45
- package/lib/cjs/upload/index.d.ts +23 -2
- package/lib/cjs/upload/index.js +133 -25
- package/lib/cjs/upload/interface.d.ts +3 -0
- package/lib/es/_utils/index.d.ts +1 -0
- package/lib/es/_utils/index.js +12 -5
- package/lib/es/cascader/index.d.ts +7 -0
- package/lib/es/cascader/index.js +34 -25
- package/lib/es/cascader/item.d.ts +2 -0
- package/lib/es/cascader/item.js +4 -2
- package/lib/es/datePicker/monthsGrid.d.ts +1 -0
- package/lib/es/datePicker/monthsGrid.js +6 -0
- package/lib/es/datePicker/navigation.js +48 -8
- package/lib/es/descriptions/item.js +1 -1
- package/lib/es/empty/index.d.ts +2 -2
- package/lib/es/empty/index.js +19 -18
- package/lib/es/form/baseForm.d.ts +5 -0
- package/lib/es/form/field.d.ts +5 -0
- package/lib/es/locale/source/es.d.ts +7 -0
- package/lib/es/locale/source/es.js +157 -0
- package/lib/es/pagination/index.js +8 -4
- package/lib/es/rating/item.js +1 -1
- package/lib/es/select/index.d.ts +9 -0
- package/lib/es/select/index.js +17 -9
- package/lib/es/tabs/index.js +1 -5
- package/lib/es/timeline/item.d.ts +3 -0
- package/lib/es/timeline/item.js +9 -4
- package/lib/es/upload/fileCard.d.ts +2 -0
- package/lib/es/upload/fileCard.js +69 -44
- package/lib/es/upload/index.d.ts +23 -2
- package/lib/es/upload/index.js +133 -24
- package/lib/es/upload/interface.d.ts +3 -0
- package/locale/source/es.ts +160 -0
- package/navigation/__test__/navigation.test.js +4 -4
- package/navigation/_story/AutoOpen/index.js +1 -1
- package/navigation/_story/WithChildren/index.js +1 -1
- package/navigation/_story/navigation.stories.js +1 -1
- package/navigation/_story/navigation.stories.tsx +4 -4
- package/package.json +17 -9
- package/pagination/_story/pagination.stories.js +11 -0
- package/pagination/index.tsx +9 -4
- package/popover/Arrow.tsx +1 -1
- package/rating/item.tsx +1 -1
- package/select/_story/select.stories.js +39 -14
- package/select/index.tsx +18 -7
- package/table/_story/DynamicFilters/index.js +13 -16
- package/tabs/index.tsx +1 -1
- package/timeline/_story/timeline.stories.js +70 -6
- package/timeline/item.tsx +7 -2
- package/tooltip/_story/tooltip.stories.js +1 -1
- package/upload/__test__/upload.test.js +50 -1
- package/upload/fileCard.tsx +110 -95
- package/upload/index.tsx +147 -53
- package/upload/interface.ts +3 -0
package/dist/umd/semi-ui.js
CHANGED
|
@@ -5993,9 +5993,9 @@ var Iterators = __webpack_require__("m/wn");
|
|
|
5993
5993
|
|
|
5994
5994
|
var returnThis = function () { return this; };
|
|
5995
5995
|
|
|
5996
|
-
module.exports = function (IteratorConstructor, NAME, next) {
|
|
5996
|
+
module.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
5997
5997
|
var TO_STRING_TAG = NAME + ' Iterator';
|
|
5998
|
-
IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(
|
|
5998
|
+
IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
|
|
5999
5999
|
setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
|
|
6000
6000
|
Iterators[TO_STRING_TAG] = returnThis;
|
|
6001
6001
|
return IteratorConstructor;
|
|
@@ -7235,6 +7235,16 @@ module.exports = copyTextToClipboard;
|
|
|
7235
7235
|
module.exports.default = copyTextToClipboard;
|
|
7236
7236
|
|
|
7237
7237
|
|
|
7238
|
+
/***/ }),
|
|
7239
|
+
|
|
7240
|
+
/***/ "HR5x":
|
|
7241
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
7242
|
+
|
|
7243
|
+
var parent = __webpack_require__("vut1");
|
|
7244
|
+
|
|
7245
|
+
module.exports = parent;
|
|
7246
|
+
|
|
7247
|
+
|
|
7238
7248
|
/***/ }),
|
|
7239
7249
|
|
|
7240
7250
|
/***/ "HUEr":
|
|
@@ -8412,12 +8422,12 @@ var $AggregateError = function AggregateError(errors, message /* , options */) {
|
|
|
8412
8422
|
var isInstance = isPrototypeOf(AggregateErrorPrototype, this);
|
|
8413
8423
|
var that;
|
|
8414
8424
|
if (setPrototypeOf) {
|
|
8415
|
-
that = setPrototypeOf(new Error(
|
|
8425
|
+
that = setPrototypeOf(new Error(), isInstance ? getPrototypeOf(this) : AggregateErrorPrototype);
|
|
8416
8426
|
} else {
|
|
8417
8427
|
that = isInstance ? this : create(AggregateErrorPrototype);
|
|
8418
8428
|
createNonEnumerableProperty(that, TO_STRING_TAG, 'Error');
|
|
8419
8429
|
}
|
|
8420
|
-
createNonEnumerableProperty(that, 'message', normalizeStringArgument(message
|
|
8430
|
+
if (message !== undefined) createNonEnumerableProperty(that, 'message', normalizeStringArgument(message));
|
|
8421
8431
|
if (ERROR_STACK_INSTALLABLE) createNonEnumerableProperty(that, 'stack', clearErrorStack(that.stack, 1));
|
|
8422
8432
|
installErrorCause(that, options);
|
|
8423
8433
|
var errorsArray = [];
|
|
@@ -8427,7 +8437,7 @@ var $AggregateError = function AggregateError(errors, message /* , options */) {
|
|
|
8427
8437
|
};
|
|
8428
8438
|
|
|
8429
8439
|
if (setPrototypeOf) setPrototypeOf($AggregateError, Error);
|
|
8430
|
-
else copyConstructorProperties($AggregateError, Error);
|
|
8440
|
+
else copyConstructorProperties($AggregateError, Error, { name: true });
|
|
8431
8441
|
|
|
8432
8442
|
var AggregateErrorPrototype = $AggregateError.prototype = create(Error.prototype, {
|
|
8433
8443
|
constructor: createPropertyDescriptor(1, $AggregateError),
|
|
@@ -11339,7 +11349,7 @@ var store = __webpack_require__("yULr");
|
|
|
11339
11349
|
(module.exports = function (key, value) {
|
|
11340
11350
|
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
11341
11351
|
})('versions', []).push({
|
|
11342
|
-
version: '3.
|
|
11352
|
+
version: '3.20.0',
|
|
11343
11353
|
mode: IS_PURE ? 'pure' : 'global',
|
|
11344
11354
|
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
|
|
11345
11355
|
});
|
|
@@ -12350,23 +12360,16 @@ module.exports = function (it) {
|
|
|
12350
12360
|
/***/ (function(module, exports, __webpack_require__) {
|
|
12351
12361
|
|
|
12352
12362
|
var uncurryThis = __webpack_require__("XQ/X");
|
|
12353
|
-
var arraySlice = __webpack_require__("PtsP");
|
|
12354
12363
|
|
|
12355
12364
|
var replace = uncurryThis(''.replace);
|
|
12356
|
-
var split = uncurryThis(''.split);
|
|
12357
|
-
var join = uncurryThis([].join);
|
|
12358
12365
|
|
|
12359
12366
|
var TEST = (function (arg) { return String(Error(arg).stack); })('zxcasd');
|
|
12360
12367
|
var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
|
|
12361
12368
|
var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
|
|
12362
|
-
var IS_FIREFOX_OR_SAFARI_STACK = /@[^\n]*\n/.test(TEST) && !/zxcasd/.test(TEST);
|
|
12363
12369
|
|
|
12364
12370
|
module.exports = function (stack, dropEntries) {
|
|
12365
|
-
if (typeof stack
|
|
12366
|
-
if (IS_V8_OR_CHAKRA_STACK) {
|
|
12371
|
+
if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string') {
|
|
12367
12372
|
while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
|
|
12368
|
-
} else if (IS_FIREFOX_OR_SAFARI_STACK) {
|
|
12369
|
-
return join(arraySlice(split(stack, '\n'), dropEntries), '\n');
|
|
12370
12373
|
} return stack;
|
|
12371
12374
|
};
|
|
12372
12375
|
|
|
@@ -12661,25 +12664,14 @@ module.exports = Symbol;
|
|
|
12661
12664
|
function _typeof(obj) {
|
|
12662
12665
|
"@babel/helpers - typeof";
|
|
12663
12666
|
|
|
12664
|
-
|
|
12665
|
-
|
|
12666
|
-
|
|
12667
|
-
|
|
12668
|
-
|
|
12669
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
12670
|
-
} else {
|
|
12671
|
-
module.exports = _typeof = function _typeof(obj) {
|
|
12672
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
12673
|
-
};
|
|
12674
|
-
|
|
12675
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
12676
|
-
}
|
|
12677
|
-
|
|
12678
|
-
return _typeof(obj);
|
|
12667
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
12668
|
+
return typeof obj;
|
|
12669
|
+
} : function (obj) {
|
|
12670
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
12671
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
12679
12672
|
}
|
|
12680
12673
|
|
|
12681
|
-
module.exports = _typeof;
|
|
12682
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
12674
|
+
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
12683
12675
|
|
|
12684
12676
|
/***/ }),
|
|
12685
12677
|
|
|
@@ -13763,7 +13755,7 @@ const getHighLightTextHTML = _ref => {
|
|
|
13763
13755
|
const markEle = option.highlightTag || 'mark';
|
|
13764
13756
|
const highlightClassName = option.highlightClassName || '';
|
|
13765
13757
|
const highlightStyle = option.highlightStyle || {};
|
|
13766
|
-
return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(chunks).call(chunks, chunk => {
|
|
13758
|
+
return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(chunks).call(chunks, (chunk, index) => {
|
|
13767
13759
|
const {
|
|
13768
13760
|
end,
|
|
13769
13761
|
start,
|
|
@@ -13774,7 +13766,8 @@ const getHighLightTextHTML = _ref => {
|
|
|
13774
13766
|
if (highlight) {
|
|
13775
13767
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(markEle, {
|
|
13776
13768
|
style: highlightStyle,
|
|
13777
|
-
className: highlightClassName
|
|
13769
|
+
className: highlightClassName,
|
|
13770
|
+
key: text + index
|
|
13778
13771
|
}, text);
|
|
13779
13772
|
} else {
|
|
13780
13773
|
return text;
|
|
@@ -13807,11 +13800,17 @@ const registerMediaQuery = (media, _ref2) => {
|
|
|
13807
13800
|
}
|
|
13808
13801
|
|
|
13809
13802
|
callInInit && handlerMediaChange(mediaQueryList);
|
|
13810
|
-
|
|
13811
|
-
|
|
13803
|
+
|
|
13804
|
+
if (Object.prototype.hasOwnProperty.call(mediaQueryList, 'addEventListener')) {
|
|
13805
|
+
mediaQueryList.addEventListener('change', handlerMediaChange);
|
|
13806
|
+
return () => mediaQueryList.removeEventListener('change', handlerMediaChange);
|
|
13807
|
+
}
|
|
13808
|
+
|
|
13809
|
+
mediaQueryList.addListener(handlerMediaChange);
|
|
13810
|
+
return () => mediaQueryList.removeListener(handlerMediaChange);
|
|
13812
13811
|
}
|
|
13813
13812
|
|
|
13814
|
-
return
|
|
13813
|
+
return () => undefined;
|
|
13815
13814
|
};
|
|
13816
13815
|
/**
|
|
13817
13816
|
* Determine whether the incoming element is a built-in icon
|
|
@@ -18403,13 +18402,15 @@ var ownKeys = __webpack_require__("pDLF");
|
|
|
18403
18402
|
var getOwnPropertyDescriptorModule = __webpack_require__("c9aA");
|
|
18404
18403
|
var definePropertyModule = __webpack_require__("JliG");
|
|
18405
18404
|
|
|
18406
|
-
module.exports = function (target, source) {
|
|
18405
|
+
module.exports = function (target, source, exceptions) {
|
|
18407
18406
|
var keys = ownKeys(source);
|
|
18408
18407
|
var defineProperty = definePropertyModule.f;
|
|
18409
18408
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
18410
18409
|
for (var i = 0; i < keys.length; i++) {
|
|
18411
18410
|
var key = keys[i];
|
|
18412
|
-
if (!hasOwn(target, key)
|
|
18411
|
+
if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
|
|
18412
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
18413
|
+
}
|
|
18413
18414
|
}
|
|
18414
18415
|
};
|
|
18415
18416
|
|
|
@@ -18798,7 +18799,7 @@ var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params
|
|
|
18798
18799
|
if (!step.done) {
|
|
18799
18800
|
step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
|
|
18800
18801
|
} return step;
|
|
18801
|
-
});
|
|
18802
|
+
}, true);
|
|
18802
18803
|
|
|
18803
18804
|
var URLSearchParamsState = function (init) {
|
|
18804
18805
|
this.entries = [];
|
|
@@ -19183,7 +19184,7 @@ var V8_VERSION = __webpack_require__("Qb90");
|
|
|
19183
19184
|
var SPECIES = wellKnownSymbol('species');
|
|
19184
19185
|
var PROMISE = 'Promise';
|
|
19185
19186
|
|
|
19186
|
-
var getInternalState = InternalStateModule.
|
|
19187
|
+
var getInternalState = InternalStateModule.getterFor(PROMISE);
|
|
19187
19188
|
var setInternalState = InternalStateModule.set;
|
|
19188
19189
|
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
|
|
19189
19190
|
var NativePromisePrototype = NativePromise && NativePromise.prototype;
|
|
@@ -20786,7 +20787,10 @@ var toIndexedObject = __webpack_require__("VcbD");
|
|
|
20786
20787
|
var addToUnscopables = __webpack_require__("Uh/D");
|
|
20787
20788
|
var Iterators = __webpack_require__("m/wn");
|
|
20788
20789
|
var InternalStateModule = __webpack_require__("WRdu");
|
|
20790
|
+
var defineProperty = __webpack_require__("JliG").f;
|
|
20789
20791
|
var defineIterator = __webpack_require__("kYm/");
|
|
20792
|
+
var IS_PURE = __webpack_require__("Vl7J");
|
|
20793
|
+
var DESCRIPTORS = __webpack_require__("5Jdw");
|
|
20790
20794
|
|
|
20791
20795
|
var ARRAY_ITERATOR = 'Array Iterator';
|
|
20792
20796
|
var setInternalState = InternalStateModule.set;
|
|
@@ -20828,13 +20832,18 @@ module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
|
|
|
20828
20832
|
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
20829
20833
|
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
|
|
20830
20834
|
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
|
|
20831
|
-
Iterators.Arguments = Iterators.Array;
|
|
20835
|
+
var values = Iterators.Arguments = Iterators.Array;
|
|
20832
20836
|
|
|
20833
20837
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
20834
20838
|
addToUnscopables('keys');
|
|
20835
20839
|
addToUnscopables('values');
|
|
20836
20840
|
addToUnscopables('entries');
|
|
20837
20841
|
|
|
20842
|
+
// V8 ~ Chrome 45- bug
|
|
20843
|
+
if (!IS_PURE && DESCRIPTORS && values.name !== 'values') try {
|
|
20844
|
+
defineProperty(values, 'name', { value: 'values' });
|
|
20845
|
+
} catch (error) { /* empty */ }
|
|
20846
|
+
|
|
20838
20847
|
|
|
20839
20848
|
/***/ }),
|
|
20840
20849
|
|
|
@@ -21269,7 +21278,7 @@ var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
|
21269
21278
|
var exec = uncurryThis(constructorRegExp.exec);
|
|
21270
21279
|
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
|
21271
21280
|
|
|
21272
|
-
var isConstructorModern = function (argument) {
|
|
21281
|
+
var isConstructorModern = function isConstructor(argument) {
|
|
21273
21282
|
if (!isCallable(argument)) return false;
|
|
21274
21283
|
try {
|
|
21275
21284
|
construct(noop, empty, argument);
|
|
@@ -21279,16 +21288,25 @@ var isConstructorModern = function (argument) {
|
|
|
21279
21288
|
}
|
|
21280
21289
|
};
|
|
21281
21290
|
|
|
21282
|
-
var isConstructorLegacy = function (argument) {
|
|
21291
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
|
21283
21292
|
if (!isCallable(argument)) return false;
|
|
21284
21293
|
switch (classof(argument)) {
|
|
21285
21294
|
case 'AsyncFunction':
|
|
21286
21295
|
case 'GeneratorFunction':
|
|
21287
21296
|
case 'AsyncGeneratorFunction': return false;
|
|
21297
|
+
}
|
|
21298
|
+
try {
|
|
21288
21299
|
// we can't check .prototype since constructors produced by .bind haven't it
|
|
21289
|
-
|
|
21300
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
|
21301
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
|
21302
|
+
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
|
|
21303
|
+
} catch (error) {
|
|
21304
|
+
return true;
|
|
21305
|
+
}
|
|
21290
21306
|
};
|
|
21291
21307
|
|
|
21308
|
+
isConstructorLegacy.sham = true;
|
|
21309
|
+
|
|
21292
21310
|
// `IsConstructor` abstract operation
|
|
21293
21311
|
// https://tc39.es/ecma262/#sec-isconstructor
|
|
21294
21312
|
module.exports = !construct || fails(function () {
|
|
@@ -28594,6 +28612,64 @@ function IconCopy_SvgComponent(props) {
|
|
|
28594
28612
|
|
|
28595
28613
|
const IconCopy_IconComponent = convertIcon(IconCopy_SvgComponent, 'copy');
|
|
28596
28614
|
/* harmony default export */ var IconCopy = (IconCopy_IconComponent);
|
|
28615
|
+
// CONCATENATED MODULE: ../semi-icons/lib/es/icons/IconDoubleChevronLeft.js
|
|
28616
|
+
|
|
28617
|
+
|
|
28618
|
+
|
|
28619
|
+
|
|
28620
|
+
function IconDoubleChevronLeft_SvgComponent(props) {
|
|
28621
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("svg", assign_default()({
|
|
28622
|
+
viewBox: "0 0 24 24",
|
|
28623
|
+
fill: "none",
|
|
28624
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28625
|
+
width: "1em",
|
|
28626
|
+
height: "1em",
|
|
28627
|
+
focusable: false,
|
|
28628
|
+
"aria-hidden": true
|
|
28629
|
+
}, props), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("path", {
|
|
28630
|
+
fillRule: "evenodd",
|
|
28631
|
+
clipRule: "evenodd",
|
|
28632
|
+
d: "M12.6185 4.39653C13.1272 4.92524 13.1272 5.78245 12.6185 6.31116L7.14483 12L12.6185 17.6888C13.1272 18.2176 13.1272 19.0748 12.6185 19.6035C12.1098 20.1322 11.285 20.1322 10.7763 19.6035L4.38153 12.9573C3.87282 12.4286 3.87282 11.5714 4.38153 11.0427L10.7763 4.39653C11.285 3.86782 12.1098 3.86782 12.6185 4.39653Z",
|
|
28633
|
+
fill: "currentColor"
|
|
28634
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("path", {
|
|
28635
|
+
fillRule: "evenodd",
|
|
28636
|
+
clipRule: "evenodd",
|
|
28637
|
+
d: "M19.6185 4.39653C20.1272 4.92524 20.1272 5.78245 19.6185 6.31116L14.1448 12L19.6185 17.6888C20.1272 18.2176 20.1272 19.0748 19.6185 19.6035C19.1098 20.1322 18.285 20.1322 17.7763 19.6035L11.3815 12.9573C10.8728 12.4286 10.8728 11.5714 11.3815 11.0427L17.7763 4.39653C18.285 3.86782 19.1098 3.86782 19.6185 4.39653Z",
|
|
28638
|
+
fill: "currentColor"
|
|
28639
|
+
}));
|
|
28640
|
+
}
|
|
28641
|
+
|
|
28642
|
+
const IconDoubleChevronLeft_IconComponent = convertIcon(IconDoubleChevronLeft_SvgComponent, 'double_chevron_left');
|
|
28643
|
+
/* harmony default export */ var IconDoubleChevronLeft = (IconDoubleChevronLeft_IconComponent);
|
|
28644
|
+
// CONCATENATED MODULE: ../semi-icons/lib/es/icons/IconDoubleChevronRight.js
|
|
28645
|
+
|
|
28646
|
+
|
|
28647
|
+
|
|
28648
|
+
|
|
28649
|
+
function IconDoubleChevronRight_SvgComponent(props) {
|
|
28650
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("svg", assign_default()({
|
|
28651
|
+
viewBox: "0 0 24 24",
|
|
28652
|
+
fill: "none",
|
|
28653
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28654
|
+
width: "1em",
|
|
28655
|
+
height: "1em",
|
|
28656
|
+
focusable: false,
|
|
28657
|
+
"aria-hidden": true
|
|
28658
|
+
}, props), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("path", {
|
|
28659
|
+
fillRule: "evenodd",
|
|
28660
|
+
clipRule: "evenodd",
|
|
28661
|
+
d: "M4.38153 4.39653C4.89024 3.86782 5.71502 3.86782 6.22373 4.39653L12.6185 11.0427C13.1272 11.5714 13.1272 12.4286 12.6185 12.9573L6.22373 19.6035C5.71502 20.1322 4.89024 20.1322 4.38153 19.6035C3.87282 19.0748 3.87282 18.2176 4.38153 17.6888L9.85517 12L4.38153 6.31116C3.87282 5.78245 3.87282 4.92524 4.38153 4.39653Z",
|
|
28662
|
+
fill: "currentColor"
|
|
28663
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("path", {
|
|
28664
|
+
fillRule: "evenodd",
|
|
28665
|
+
clipRule: "evenodd",
|
|
28666
|
+
d: "M11.3815 4.39653C11.8902 3.86782 12.715 3.86782 13.2237 4.39653L19.6185 11.0427C20.1272 11.5714 20.1272 12.4286 19.6185 12.9573L13.2237 19.6035C12.715 20.1322 11.8902 20.1322 11.3815 19.6035C10.8728 19.0748 10.8728 18.2176 11.3815 17.6888L16.8552 12L11.3815 6.31116C10.8728 5.78245 10.8728 4.92524 11.3815 4.39653Z",
|
|
28667
|
+
fill: "currentColor"
|
|
28668
|
+
}));
|
|
28669
|
+
}
|
|
28670
|
+
|
|
28671
|
+
const IconDoubleChevronRight_IconComponent = convertIcon(IconDoubleChevronRight_SvgComponent, 'double_chevron_right');
|
|
28672
|
+
/* harmony default export */ var IconDoubleChevronRight = (IconDoubleChevronRight_IconComponent);
|
|
28597
28673
|
// CONCATENATED MODULE: ../semi-icons/lib/es/icons/IconEyeClosedSolid.js
|
|
28598
28674
|
|
|
28599
28675
|
|
|
@@ -29521,6 +29597,8 @@ const IconUpload_IconComponent = convertIcon(IconUpload_SvgComponent, 'upload');
|
|
|
29521
29597
|
|
|
29522
29598
|
|
|
29523
29599
|
|
|
29600
|
+
|
|
29601
|
+
|
|
29524
29602
|
|
|
29525
29603
|
|
|
29526
29604
|
|
|
@@ -42596,6 +42674,10 @@ cardGroup_CardGroup.defaultProps = {
|
|
|
42596
42674
|
spacing: 16
|
|
42597
42675
|
};
|
|
42598
42676
|
/* harmony default export */ var cardGroup = (cardGroup_CardGroup);
|
|
42677
|
+
// EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/lodash/flatten.js
|
|
42678
|
+
var lodash_flatten = __webpack_require__("1xil");
|
|
42679
|
+
var flatten_default = /*#__PURE__*/__webpack_require__.n(lodash_flatten);
|
|
42680
|
+
|
|
42599
42681
|
// EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/@babel/runtime-corejs3/core-js-stable/promise.js
|
|
42600
42682
|
var promise = __webpack_require__("kNzS");
|
|
42601
42683
|
var promise_default = /*#__PURE__*/__webpack_require__.n(promise);
|
|
@@ -42657,7 +42739,6 @@ var object_entries_default = /*#__PURE__*/__webpack_require__.n(object_entries);
|
|
|
42657
42739
|
|
|
42658
42740
|
|
|
42659
42741
|
|
|
42660
|
-
|
|
42661
42742
|
|
|
42662
42743
|
|
|
42663
42744
|
const DRAG_OFFSET = 0.45;
|
|
@@ -43137,7 +43218,7 @@ function normalizedArr(val) {
|
|
|
43137
43218
|
}
|
|
43138
43219
|
function normalizeKeyList(keyList, keyEntities) {
|
|
43139
43220
|
let leafOnly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
43140
|
-
|
|
43221
|
+
const res = [];
|
|
43141
43222
|
const keyListSet = new set_default.a(keyList);
|
|
43142
43223
|
|
|
43143
43224
|
if (!leafOnly) {
|
|
@@ -43157,9 +43238,11 @@ function normalizeKeyList(keyList, keyEntities) {
|
|
|
43157
43238
|
res.push(key);
|
|
43158
43239
|
});
|
|
43159
43240
|
} else {
|
|
43160
|
-
|
|
43161
|
-
|
|
43162
|
-
|
|
43241
|
+
for_each_default()(keyList).call(keyList, key => {
|
|
43242
|
+
if (keyEntities[key] && !treeUtil_isValid(keyEntities[key].children)) {
|
|
43243
|
+
res.push(key);
|
|
43244
|
+
}
|
|
43245
|
+
});
|
|
43163
43246
|
}
|
|
43164
43247
|
|
|
43165
43248
|
return res;
|
|
@@ -43168,9 +43251,9 @@ function getMotionKeys(eventKey, expandedKeys, keyEntities) {
|
|
|
43168
43251
|
const res = [];
|
|
43169
43252
|
|
|
43170
43253
|
const getChild = itemKey => {
|
|
43171
|
-
var
|
|
43254
|
+
var _context8;
|
|
43172
43255
|
|
|
43173
|
-
keyEntities[itemKey].children && for_each_default()(
|
|
43256
|
+
keyEntities[itemKey].children && for_each_default()(_context8 = keyEntities[itemKey].children).call(_context8, item => {
|
|
43174
43257
|
const {
|
|
43175
43258
|
key
|
|
43176
43259
|
} = item;
|
|
@@ -43286,7 +43369,7 @@ function calcCheckedKeysForUnchecked(key, keyEntities, checkedKeys, halfCheckedK
|
|
|
43286
43369
|
};
|
|
43287
43370
|
}
|
|
43288
43371
|
function filterTreeData(info) {
|
|
43289
|
-
var
|
|
43372
|
+
var _context9, _context10;
|
|
43290
43373
|
|
|
43291
43374
|
const {
|
|
43292
43375
|
showFilteredOnly,
|
|
@@ -43298,7 +43381,7 @@ function filterTreeData(info) {
|
|
|
43298
43381
|
prevExpandedKeys
|
|
43299
43382
|
} = info;
|
|
43300
43383
|
let filteredOptsKeys = [];
|
|
43301
|
-
filteredOptsKeys = map_default()(
|
|
43384
|
+
filteredOptsKeys = map_default()(_context9 = filter_default()(_context10 = values_default()(keyEntities)).call(_context10, item => treeUtil_filter(inputValue, item.data, filterTreeNode, filterProps))).call(_context9, item => item.key);
|
|
43302
43385
|
let expandedOptsKeys = findAncestorKeys(filteredOptsKeys, keyEntities, false);
|
|
43303
43386
|
|
|
43304
43387
|
if (prevExpandedKeys.length) {
|
|
@@ -43339,9 +43422,9 @@ function updateKeys(keySet, keyEntities) {
|
|
|
43339
43422
|
return filter_default()(keyArr).call(keyArr, key => key in keyEntities);
|
|
43340
43423
|
}
|
|
43341
43424
|
function calcDisabledKeys(keyEntities) {
|
|
43342
|
-
var
|
|
43425
|
+
var _context11;
|
|
43343
43426
|
|
|
43344
|
-
const disabledKeys = filter_default()(
|
|
43427
|
+
const disabledKeys = filter_default()(_context11 = keys_default()(keyEntities)).call(_context11, key => keyEntities[key].data.disabled);
|
|
43345
43428
|
|
|
43346
43429
|
const {
|
|
43347
43430
|
checkedKeys
|
|
@@ -43376,6 +43459,27 @@ function calcDropActualPosition(pos, relativeDropPos) {
|
|
|
43376
43459
|
|
|
43377
43460
|
return relativeDropPos + Number(posArr[posArr.length - 1]);
|
|
43378
43461
|
}
|
|
43462
|
+
// CONCATENATED MODULE: ../semi-foundation/cascader/constants.ts
|
|
43463
|
+
|
|
43464
|
+
const cascader_constants_cssClasses = {
|
|
43465
|
+
PREFIX: "".concat(BASE_CLASS_PREFIX, "-cascader"),
|
|
43466
|
+
PREFIX_OPTION: "".concat(BASE_CLASS_PREFIX, "-cascader-option")
|
|
43467
|
+
};
|
|
43468
|
+
const cascader_constants_strings = {
|
|
43469
|
+
SIZE_SET: ['small', 'large', 'default'],
|
|
43470
|
+
VALIDATE_STATUS: ['default', 'error', 'warning'],
|
|
43471
|
+
IS_KEY: 'isKey',
|
|
43472
|
+
IS_VALUE: 'isValue',
|
|
43473
|
+
SHOW_NEXT_BY_CLICK: 'click',
|
|
43474
|
+
SHOW_NEXT_BY_HOVER: 'hover',
|
|
43475
|
+
|
|
43476
|
+
/* Merge Type */
|
|
43477
|
+
LEAF_ONLY_MERGE_TYPE: 'leafOnly',
|
|
43478
|
+
AUTO_MERGE_VALUE_MERGE_TYPE: 'autoMergeValue',
|
|
43479
|
+
NONE_MERGE_TYPE: 'none'
|
|
43480
|
+
};
|
|
43481
|
+
const cascader_constants_numbers = {};
|
|
43482
|
+
|
|
43379
43483
|
// CONCATENATED MODULE: ../semi-foundation/cascader/util.ts
|
|
43380
43484
|
|
|
43381
43485
|
|
|
@@ -43388,6 +43492,7 @@ function calcDropActualPosition(pos, relativeDropPos) {
|
|
|
43388
43492
|
|
|
43389
43493
|
|
|
43390
43494
|
|
|
43495
|
+
|
|
43391
43496
|
function util_getPosition(level, index) {
|
|
43392
43497
|
var _context;
|
|
43393
43498
|
|
|
@@ -43468,6 +43573,19 @@ function util_findKeysForValues(value, keyEntities) {
|
|
|
43468
43573
|
|
|
43469
43574
|
return res;
|
|
43470
43575
|
}
|
|
43576
|
+
function calcMergeType(autoMergeValue, leafOnly) {
|
|
43577
|
+
let mergeType;
|
|
43578
|
+
|
|
43579
|
+
if (leafOnly) {
|
|
43580
|
+
mergeType = cascader_constants_strings.LEAF_ONLY_MERGE_TYPE;
|
|
43581
|
+
} else if (autoMergeValue) {
|
|
43582
|
+
mergeType = cascader_constants_strings.AUTO_MERGE_VALUE_MERGE_TYPE;
|
|
43583
|
+
} else {
|
|
43584
|
+
mergeType = cascader_constants_strings.NONE_MERGE_TYPE;
|
|
43585
|
+
}
|
|
43586
|
+
|
|
43587
|
+
return mergeType;
|
|
43588
|
+
}
|
|
43471
43589
|
// CONCATENATED MODULE: ../semi-foundation/cascader/foundation.ts
|
|
43472
43590
|
|
|
43473
43591
|
|
|
@@ -43491,6 +43609,7 @@ function util_findKeysForValues(value, keyEntities) {
|
|
|
43491
43609
|
|
|
43492
43610
|
|
|
43493
43611
|
|
|
43612
|
+
|
|
43494
43613
|
|
|
43495
43614
|
|
|
43496
43615
|
// eslint-disable-next-line max-len
|
|
@@ -44006,10 +44125,12 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44006
44125
|
}
|
|
44007
44126
|
|
|
44008
44127
|
_defaultRenderText(path, displayRender) {
|
|
44128
|
+
const separator = this.getProp('separator');
|
|
44129
|
+
|
|
44009
44130
|
if (displayRender && typeof displayRender === 'function') {
|
|
44010
44131
|
return displayRender(path);
|
|
44011
44132
|
} else {
|
|
44012
|
-
return path.join(
|
|
44133
|
+
return path.join(separator);
|
|
44013
44134
|
}
|
|
44014
44135
|
}
|
|
44015
44136
|
|
|
@@ -44083,7 +44204,8 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44083
44204
|
const {
|
|
44084
44205
|
changeOnSelect: allowChange,
|
|
44085
44206
|
filterLeafOnly,
|
|
44086
|
-
multiple
|
|
44207
|
+
multiple,
|
|
44208
|
+
enableLeafClick
|
|
44087
44209
|
} = this.getProps();
|
|
44088
44210
|
const {
|
|
44089
44211
|
keyEntities,
|
|
@@ -44117,6 +44239,10 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44117
44239
|
this._adapter.updateStates({
|
|
44118
44240
|
activeKeys: new set_default.a(activeKeys)
|
|
44119
44241
|
});
|
|
44242
|
+
|
|
44243
|
+
if (isLeaf && enableLeafClick) {
|
|
44244
|
+
this.onItemCheckboxClick(item);
|
|
44245
|
+
}
|
|
44120
44246
|
} else {
|
|
44121
44247
|
this._adapter.notifySelect(data.value);
|
|
44122
44248
|
|
|
@@ -44166,12 +44292,13 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44166
44292
|
const {
|
|
44167
44293
|
checkedKeys,
|
|
44168
44294
|
keyEntities,
|
|
44169
|
-
|
|
44295
|
+
resolvedCheckedKeys
|
|
44170
44296
|
} = this.getStates();
|
|
44171
44297
|
const {
|
|
44172
44298
|
autoMergeValue,
|
|
44173
44299
|
max,
|
|
44174
|
-
disableStrictly
|
|
44300
|
+
disableStrictly,
|
|
44301
|
+
leafOnly
|
|
44175
44302
|
} = this.getProps(); // prev checked status
|
|
44176
44303
|
|
|
44177
44304
|
const prevCheckedStatus = checkedKeys.has(key); // next checked status
|
|
@@ -44182,16 +44309,19 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44182
44309
|
checkedKeys: curCheckedKeys,
|
|
44183
44310
|
halfCheckedKeys: curHalfCheckedKeys
|
|
44184
44311
|
} = disableStrictly ? this.calcNonDisabedCheckedKeys(key, curCheckedStatus) : this.calcCheckedKeys(key, curCheckedStatus);
|
|
44185
|
-
const
|
|
44186
|
-
const
|
|
44312
|
+
const mergeType = calcMergeType(autoMergeValue, leafOnly);
|
|
44313
|
+
const isLeafOnlyMerge = mergeType === cascader_constants_strings.LEAF_ONLY_MERGE_TYPE;
|
|
44314
|
+
const isNoneMerge = mergeType === cascader_constants_strings.NONE_MERGE_TYPE;
|
|
44315
|
+
const curResolvedCheckedKeys = new set_default.a(normalizeKeyList(curCheckedKeys, keyEntities, isLeafOnlyMerge));
|
|
44316
|
+
const curRealCheckedKeys = isNoneMerge ? curCheckedKeys : curResolvedCheckedKeys;
|
|
44187
44317
|
|
|
44188
44318
|
if (isNumber_default()(max)) {
|
|
44189
|
-
if (
|
|
44319
|
+
if (!isNoneMerge) {
|
|
44190
44320
|
// When it exceeds max, the quantity is allowed to be reduced, and no further increase is allowed
|
|
44191
|
-
if (
|
|
44321
|
+
if (resolvedCheckedKeys.size < curResolvedCheckedKeys.size && curResolvedCheckedKeys.size > max) {
|
|
44192
44322
|
const checkedEntities = [];
|
|
44193
44323
|
|
|
44194
|
-
for_each_default()(
|
|
44324
|
+
for_each_default()(curResolvedCheckedKeys).call(curResolvedCheckedKeys, itemKey => {
|
|
44195
44325
|
checkedEntities.push(keyEntities[itemKey]);
|
|
44196
44326
|
});
|
|
44197
44327
|
|
|
@@ -44219,7 +44349,7 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44219
44349
|
this._adapter.updateStates({
|
|
44220
44350
|
checkedKeys: curCheckedKeys,
|
|
44221
44351
|
halfCheckedKeys: curHalfCheckedKeys,
|
|
44222
|
-
|
|
44352
|
+
resolvedCheckedKeys: curResolvedCheckedKeys
|
|
44223
44353
|
});
|
|
44224
44354
|
} // The click event during multiple selection will definitely cause the checked state of node to change,
|
|
44225
44355
|
// so there is no need to judge the value to change.
|
|
@@ -44382,7 +44512,7 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44382
44512
|
newState.halfCheckedKeys = new set_default.a([]);
|
|
44383
44513
|
newState.selectedKeys = new set_default.a([]);
|
|
44384
44514
|
newState.activeKeys = new set_default.a([]);
|
|
44385
|
-
newState.
|
|
44515
|
+
newState.resolvedCheckedKeys = new set_default.a([]);
|
|
44386
44516
|
|
|
44387
44517
|
this._adapter.notifyChange([]);
|
|
44388
44518
|
} else {
|
|
@@ -44507,22 +44637,6 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44507
44637
|
}
|
|
44508
44638
|
|
|
44509
44639
|
}
|
|
44510
|
-
// CONCATENATED MODULE: ../semi-foundation/cascader/constants.ts
|
|
44511
|
-
|
|
44512
|
-
const cascader_constants_cssClasses = {
|
|
44513
|
-
PREFIX: "".concat(BASE_CLASS_PREFIX, "-cascader"),
|
|
44514
|
-
PREFIX_OPTION: "".concat(BASE_CLASS_PREFIX, "-cascader-option")
|
|
44515
|
-
};
|
|
44516
|
-
const cascader_constants_strings = {
|
|
44517
|
-
SIZE_SET: ['small', 'large', 'default'],
|
|
44518
|
-
VALIDATE_STATUS: ['default', 'error', 'warning'],
|
|
44519
|
-
IS_KEY: 'isKey',
|
|
44520
|
-
IS_VALUE: 'isValue',
|
|
44521
|
-
SHOW_NEXT_BY_CLICK: 'click',
|
|
44522
|
-
SHOW_NEXT_BY_HOVER: 'hover'
|
|
44523
|
-
};
|
|
44524
|
-
const cascader_constants_numbers = {};
|
|
44525
|
-
|
|
44526
44640
|
// EXTERNAL MODULE: ../semi-foundation/cascader/cascader.scss
|
|
44527
44641
|
var cascader = __webpack_require__("7u0x");
|
|
44528
44642
|
|
|
@@ -45306,7 +45420,8 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
45306
45420
|
this.highlight = searchText => {
|
|
45307
45421
|
const content = [];
|
|
45308
45422
|
const {
|
|
45309
|
-
keyword
|
|
45423
|
+
keyword,
|
|
45424
|
+
separator
|
|
45310
45425
|
} = this.props;
|
|
45311
45426
|
|
|
45312
45427
|
for_each_default()(searchText).call(searchText, (item, idx) => {
|
|
@@ -45330,7 +45445,7 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
45330
45445
|
}
|
|
45331
45446
|
|
|
45332
45447
|
if (idx !== searchText.length - 1) {
|
|
45333
|
-
content.push(
|
|
45448
|
+
content.push(separator);
|
|
45334
45449
|
}
|
|
45335
45450
|
});
|
|
45336
45451
|
|
|
@@ -45502,6 +45617,7 @@ item_Item.propTypes = {
|
|
|
45502
45617
|
checkedKeys: prop_types_default.a.object,
|
|
45503
45618
|
halfCheckedKeys: prop_types_default.a.object,
|
|
45504
45619
|
onItemCheckboxClick: prop_types_default.a.func,
|
|
45620
|
+
separator: prop_types_default.a.string,
|
|
45505
45621
|
keyword: prop_types_default.a.string
|
|
45506
45622
|
};
|
|
45507
45623
|
item_Item.defaultProps = {
|
|
@@ -46411,6 +46527,7 @@ tagInput_TagInput.defaultProps = {
|
|
|
46411
46527
|
|
|
46412
46528
|
|
|
46413
46529
|
|
|
46530
|
+
|
|
46414
46531
|
|
|
46415
46532
|
|
|
46416
46533
|
const cascader_prefixcls = cascader_constants_cssClasses.PREFIX;
|
|
@@ -46504,6 +46621,7 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
46504
46621
|
dropdownStyle,
|
|
46505
46622
|
loadData,
|
|
46506
46623
|
emptyContent,
|
|
46624
|
+
separator,
|
|
46507
46625
|
topSlot,
|
|
46508
46626
|
bottomSlot,
|
|
46509
46627
|
showNext,
|
|
@@ -46519,6 +46637,7 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
46519
46637
|
}, topSlot, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(item_Item, {
|
|
46520
46638
|
activeKeys: activeKeys,
|
|
46521
46639
|
selectedKeys: selectedKeys,
|
|
46640
|
+
separator: separator,
|
|
46522
46641
|
loadedKeys: loadedKeys,
|
|
46523
46642
|
loadingKeys: loadingKeys,
|
|
46524
46643
|
onItemClick: this.handleItemClick,
|
|
@@ -46568,9 +46687,9 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
46568
46687
|
} = this.props;
|
|
46569
46688
|
const {
|
|
46570
46689
|
checkedKeys,
|
|
46571
|
-
|
|
46690
|
+
resolvedCheckedKeys
|
|
46572
46691
|
} = this.state;
|
|
46573
|
-
const realKeys =
|
|
46692
|
+
const realKeys = this.mergeType === cascader_constants_strings.NONE_MERGE_TYPE ? checkedKeys : resolvedCheckedKeys;
|
|
46574
46693
|
const displayTag = [];
|
|
46575
46694
|
const hiddenTag = [];
|
|
46576
46695
|
|
|
@@ -46660,20 +46779,23 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
46660
46779
|
const {
|
|
46661
46780
|
disabled,
|
|
46662
46781
|
triggerRender,
|
|
46663
|
-
multiple
|
|
46664
|
-
autoMergeValue
|
|
46782
|
+
multiple
|
|
46665
46783
|
} = this.props;
|
|
46666
46784
|
const {
|
|
46667
46785
|
selectedKeys,
|
|
46668
46786
|
inputValue,
|
|
46669
46787
|
inputPlaceHolder,
|
|
46670
|
-
|
|
46788
|
+
resolvedCheckedKeys,
|
|
46671
46789
|
checkedKeys
|
|
46672
46790
|
} = this.state;
|
|
46673
46791
|
let realValue;
|
|
46674
46792
|
|
|
46675
46793
|
if (multiple) {
|
|
46676
|
-
|
|
46794
|
+
if (this.mergeType === cascader_constants_strings.NONE_MERGE_TYPE) {
|
|
46795
|
+
realValue = checkedKeys;
|
|
46796
|
+
} else {
|
|
46797
|
+
realValue = resolvedCheckedKeys;
|
|
46798
|
+
}
|
|
46677
46799
|
} else {
|
|
46678
46800
|
realValue = [...selectedKeys][0];
|
|
46679
46801
|
}
|
|
@@ -46853,8 +46975,8 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
46853
46975
|
/* Key of half checked node, when multiple */
|
|
46854
46976
|
halfCheckedKeys: new set_default.a([]),
|
|
46855
46977
|
|
|
46856
|
-
/* Auto merged checkedKeys, when multiple */
|
|
46857
|
-
|
|
46978
|
+
/* Auto merged checkedKeys or leaf checkedKeys, when multiple */
|
|
46979
|
+
resolvedCheckedKeys: new set_default.a([]),
|
|
46858
46980
|
|
|
46859
46981
|
/* Keys of loaded item */
|
|
46860
46982
|
loadedKeys: new set_default.a(),
|
|
@@ -46867,6 +46989,7 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
46867
46989
|
};
|
|
46868
46990
|
this.options = {};
|
|
46869
46991
|
this.isEmpty = false;
|
|
46992
|
+
this.mergeType = calcMergeType(props.autoMergeValue, props.leafOnly);
|
|
46870
46993
|
this.inputRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
|
|
46871
46994
|
this.triggerRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
|
|
46872
46995
|
this.optionsRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
|
|
@@ -47009,7 +47132,9 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
47009
47132
|
multiple,
|
|
47010
47133
|
value,
|
|
47011
47134
|
defaultValue,
|
|
47012
|
-
onChangeWithObject
|
|
47135
|
+
onChangeWithObject,
|
|
47136
|
+
leafOnly,
|
|
47137
|
+
autoMergeValue
|
|
47013
47138
|
} = props;
|
|
47014
47139
|
const {
|
|
47015
47140
|
prevProps
|
|
@@ -47074,24 +47199,19 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
47074
47199
|
realKeys = formatKeys;
|
|
47075
47200
|
}
|
|
47076
47201
|
|
|
47077
|
-
|
|
47078
|
-
|
|
47079
|
-
|
|
47080
|
-
for_each_default()(realKeys).call(realKeys, v => {
|
|
47081
|
-
const calRes = calcCheckedKeys(v, keyEntities);
|
|
47082
|
-
checkedKeys = new set_default.a([...checkedKeys, ...calRes.checkedKeys]);
|
|
47083
|
-
halfCheckedKeys = new set_default.a([...halfCheckedKeys, ...calRes.halfCheckedKeys]);
|
|
47084
|
-
}); // disableStrictly
|
|
47085
|
-
|
|
47202
|
+
const calRes = calcCheckedKeys(flatten_default()(realKeys), keyEntities);
|
|
47203
|
+
const checkedKeys = new set_default.a(calRes.checkedKeys);
|
|
47204
|
+
const halfCheckedKeys = new set_default.a(calRes.halfCheckedKeys); // disableStrictly
|
|
47086
47205
|
|
|
47087
47206
|
if (props.disableStrictly) {
|
|
47088
47207
|
newState.disabledKeys = calcDisabledKeys(keyEntities);
|
|
47089
47208
|
}
|
|
47090
47209
|
|
|
47210
|
+
const isLeafOnlyMerge = calcMergeType(autoMergeValue, leafOnly) === cascader_constants_strings.LEAF_ONLY_MERGE_TYPE;
|
|
47091
47211
|
newState.prevProps = props;
|
|
47092
47212
|
newState.checkedKeys = checkedKeys;
|
|
47093
47213
|
newState.halfCheckedKeys = halfCheckedKeys;
|
|
47094
|
-
newState.
|
|
47214
|
+
newState.resolvedCheckedKeys = new set_default.a(normalizeKeyList(checkedKeys, keyEntities, isLeafOnlyMerge));
|
|
47095
47215
|
}
|
|
47096
47216
|
}
|
|
47097
47217
|
|
|
@@ -47125,7 +47245,6 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
47125
47245
|
const {
|
|
47126
47246
|
size,
|
|
47127
47247
|
disabled,
|
|
47128
|
-
autoMergeValue,
|
|
47129
47248
|
placeholder,
|
|
47130
47249
|
maxTagCount,
|
|
47131
47250
|
showRestTagsPopover,
|
|
@@ -47135,11 +47254,11 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
47135
47254
|
inputValue,
|
|
47136
47255
|
checkedKeys,
|
|
47137
47256
|
keyEntities,
|
|
47138
|
-
|
|
47257
|
+
resolvedCheckedKeys
|
|
47139
47258
|
} = this.state;
|
|
47140
47259
|
const tagInputcls = classnames_default()("".concat(cascader_prefixcls, "-tagInput-wrapper"));
|
|
47141
47260
|
const tagValue = [];
|
|
47142
|
-
const realKeys =
|
|
47261
|
+
const realKeys = this.mergeType === cascader_constants_strings.NONE_MERGE_TYPE ? checkedKeys : resolvedCheckedKeys;
|
|
47143
47262
|
|
|
47144
47263
|
for_each_default()(_context3 = [...realKeys]).call(_context3, checkedKey => {
|
|
47145
47264
|
if (!isEmpty_default()(keyEntities[checkedKey])) {
|
|
@@ -47289,14 +47408,18 @@ cascader_Cascader.propTypes = {
|
|
|
47289
47408
|
showRestTagsPopover: prop_types_default.a.bool,
|
|
47290
47409
|
restTagsPopoverProps: prop_types_default.a.object,
|
|
47291
47410
|
max: prop_types_default.a.number,
|
|
47411
|
+
separator: prop_types_default.a.string,
|
|
47292
47412
|
onExceed: prop_types_default.a.func,
|
|
47293
47413
|
onClear: prop_types_default.a.func,
|
|
47294
47414
|
loadData: prop_types_default.a.func,
|
|
47295
47415
|
onLoad: prop_types_default.a.func,
|
|
47296
47416
|
loadedKeys: prop_types_default.a.array,
|
|
47297
|
-
disableStrictly: prop_types_default.a.bool
|
|
47417
|
+
disableStrictly: prop_types_default.a.bool,
|
|
47418
|
+
leafOnly: prop_types_default.a.bool,
|
|
47419
|
+
enableLeafClick: prop_types_default.a.bool
|
|
47298
47420
|
};
|
|
47299
47421
|
cascader_Cascader.defaultProps = {
|
|
47422
|
+
leafOnly: false,
|
|
47300
47423
|
arrowIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronDown, null),
|
|
47301
47424
|
stopPropagation: true,
|
|
47302
47425
|
motion: true,
|
|
@@ -47313,6 +47436,7 @@ cascader_Cascader.defaultProps = {
|
|
|
47313
47436
|
filterLeafOnly: true,
|
|
47314
47437
|
showRestTagsPopover: false,
|
|
47315
47438
|
restTagsPopoverProps: {},
|
|
47439
|
+
separator: ' / ',
|
|
47316
47440
|
size: 'default',
|
|
47317
47441
|
treeNodeFilterProp: 'label',
|
|
47318
47442
|
displayProp: 'label',
|
|
@@ -47321,7 +47445,8 @@ cascader_Cascader.defaultProps = {
|
|
|
47321
47445
|
onExceed: noop_default.a,
|
|
47322
47446
|
onClear: noop_default.a,
|
|
47323
47447
|
onDropdownVisibleChange: noop_default.a,
|
|
47324
|
-
onListScroll: noop_default.a
|
|
47448
|
+
onListScroll: noop_default.a,
|
|
47449
|
+
enableLeafClick: false
|
|
47325
47450
|
};
|
|
47326
47451
|
/* harmony default export */ var cascader_0 = (cascader_Cascader);
|
|
47327
47452
|
// CONCATENATED MODULE: ../semi-foundation/collapse/constants.ts
|
|
@@ -48274,7 +48399,7 @@ var patterns = {
|
|
|
48274
48399
|
timezone: /([Z+-].*)$/,
|
|
48275
48400
|
timezoneZ: /^(Z)$/,
|
|
48276
48401
|
timezoneHH: /^([+-])(\d{2})$/,
|
|
48277
|
-
timezoneHHMM: /^([+-])(\d{2}):?(\d{2})
|
|
48402
|
+
timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/,
|
|
48278
48403
|
}
|
|
48279
48404
|
|
|
48280
48405
|
// Parse various time zone offset formats to an offset in milliseconds
|
|
@@ -48392,12 +48517,15 @@ function validateTimezone(hours, minutes) {
|
|
|
48392
48517
|
return true
|
|
48393
48518
|
}
|
|
48394
48519
|
|
|
48520
|
+
var validIANATimezoneCache = {}
|
|
48395
48521
|
function isValidTimezoneIANAString(timeZoneString) {
|
|
48522
|
+
if (validIANATimezoneCache[timeZoneString]) return true
|
|
48396
48523
|
try {
|
|
48397
|
-
Intl.DateTimeFormat(undefined, {timeZone: timeZoneString})
|
|
48398
|
-
|
|
48524
|
+
Intl.DateTimeFormat(undefined, { timeZone: timeZoneString })
|
|
48525
|
+
validIANATimezoneCache[timeZoneString] = true
|
|
48526
|
+
return true
|
|
48399
48527
|
} catch (error) {
|
|
48400
|
-
return false
|
|
48528
|
+
return false
|
|
48401
48529
|
}
|
|
48402
48530
|
}
|
|
48403
48531
|
|
|
@@ -49408,10 +49536,23 @@ function esm_format_format(dirtyDate, dirtyFormatStr, dirtyOptions) {
|
|
|
49408
49536
|
var matches = formatStr.match(tzFormattingTokensRegExp)
|
|
49409
49537
|
if (matches) {
|
|
49410
49538
|
var date = toDate_toDate(dirtyDate, options)
|
|
49539
|
+
// Work through each match and replace the tz token in the format string with the quoted
|
|
49540
|
+
// formatted time zone so the remaining tokens can be filled in by date-fns#format.
|
|
49411
49541
|
formatStr = matches.reduce(function (result, token) {
|
|
49412
|
-
|
|
49413
|
-
|
|
49414
|
-
|
|
49542
|
+
if (token[0] === "'") {
|
|
49543
|
+
return result // This is a quoted portion, matched only to ensure we don't match inside it
|
|
49544
|
+
}
|
|
49545
|
+
var pos = result.indexOf(token)
|
|
49546
|
+
var precededByQuotedSection = result[pos - 1] === "'"
|
|
49547
|
+
var replaced = result.replace(
|
|
49548
|
+
token,
|
|
49549
|
+
"'" + esm_format_formatters[token[0]](date, token, null, options) + "'"
|
|
49550
|
+
)
|
|
49551
|
+
// If the replacement results in two adjoining quoted strings, the back to back quotes
|
|
49552
|
+
// are removed so it doesn't look like an escaped quote.
|
|
49553
|
+
return precededByQuotedSection
|
|
49554
|
+
? replaced.substring(0, pos - 1) + replaced.substring(pos + 1)
|
|
49555
|
+
: replaced
|
|
49415
49556
|
}, formatStr)
|
|
49416
49557
|
}
|
|
49417
49558
|
|
|
@@ -52059,7 +52200,9 @@ function compatiableParse(value, formatToken, baseDate, locale) {
|
|
|
52059
52200
|
result = new Date(Date.parse(value));
|
|
52060
52201
|
}
|
|
52061
52202
|
|
|
52062
|
-
|
|
52203
|
+
const yearInvalid = isValid(result) && String(result.getFullYear()).length > 4;
|
|
52204
|
+
|
|
52205
|
+
if (!isValid(result) || yearInvalid) {
|
|
52063
52206
|
result = null;
|
|
52064
52207
|
}
|
|
52065
52208
|
}
|
|
@@ -54569,11 +54712,99 @@ class monthsGridFoundation_MonthsGridFoundation extends foundation {
|
|
|
54569
54712
|
|
|
54570
54713
|
|
|
54571
54714
|
destroy() {}
|
|
54715
|
+
/**
|
|
54716
|
+
* sync change another panel month when change months from the else yam panel
|
|
54717
|
+
* call it when
|
|
54718
|
+
* - current change panel targe date month is same with another panel date
|
|
54719
|
+
*
|
|
54720
|
+
* @example
|
|
54721
|
+
* - panelType=right, target=new Date('2022-09-01') and left panel is in '2022-09' => call it, left panel minus one month to '2022-08'
|
|
54722
|
+
* - panelType=left, target=new Date('2021-12-01') and right panel is in '2021-12' => call it, right panel add one month to '2021-01'
|
|
54723
|
+
*/
|
|
54724
|
+
|
|
54725
|
+
|
|
54726
|
+
handleSyncChangeMonths(options) {
|
|
54727
|
+
const {
|
|
54728
|
+
panelType,
|
|
54729
|
+
target
|
|
54730
|
+
} = options;
|
|
54731
|
+
|
|
54732
|
+
const {
|
|
54733
|
+
type
|
|
54734
|
+
} = this._adapter.getProps();
|
|
54735
|
+
|
|
54736
|
+
const {
|
|
54737
|
+
monthLeft,
|
|
54738
|
+
monthRight
|
|
54739
|
+
} = this._adapter.getStates();
|
|
54740
|
+
|
|
54741
|
+
if (this.isRangeType(type)) {
|
|
54742
|
+
if (panelType === 'right' && differenceInCalendarMonths(target, monthLeft.pickerDate) === 0) {
|
|
54743
|
+
this.handleYearOrMonthChange('prevMonth', 'left', 1, true);
|
|
54744
|
+
} else if (panelType === 'left' && differenceInCalendarMonths(monthRight.pickerDate, target) === 0) {
|
|
54745
|
+
this.handleYearOrMonthChange('nextMonth', 'right', 1, true);
|
|
54746
|
+
}
|
|
54747
|
+
}
|
|
54748
|
+
}
|
|
54749
|
+
/**
|
|
54750
|
+
* Get the target date based on the panel type and switch type
|
|
54751
|
+
*/
|
|
54752
|
+
|
|
54753
|
+
|
|
54754
|
+
getTargetChangeDate(options) {
|
|
54755
|
+
const {
|
|
54756
|
+
panelType,
|
|
54757
|
+
switchType
|
|
54758
|
+
} = options;
|
|
54759
|
+
|
|
54760
|
+
const {
|
|
54761
|
+
monthRight,
|
|
54762
|
+
monthLeft
|
|
54763
|
+
} = this._adapter.getStates();
|
|
54764
|
+
|
|
54765
|
+
const currentDate = panelType === 'left' ? monthLeft.pickerDate : monthRight.pickerDate;
|
|
54766
|
+
let target;
|
|
54767
|
+
|
|
54768
|
+
switch (switchType) {
|
|
54769
|
+
case 'prevMonth':
|
|
54770
|
+
target = addMonths(currentDate, -1);
|
|
54771
|
+
break;
|
|
54772
|
+
|
|
54773
|
+
case 'nextMonth':
|
|
54774
|
+
target = addMonths(currentDate, 1);
|
|
54775
|
+
break;
|
|
54776
|
+
|
|
54777
|
+
case 'prevYear':
|
|
54778
|
+
target = addYears(currentDate, -1);
|
|
54779
|
+
break;
|
|
54780
|
+
|
|
54781
|
+
case 'nextYear':
|
|
54782
|
+
target = addYears(currentDate, 1);
|
|
54783
|
+
break;
|
|
54784
|
+
}
|
|
54785
|
+
|
|
54786
|
+
return target;
|
|
54787
|
+
}
|
|
54788
|
+
/**
|
|
54789
|
+
* Change month by yam panel
|
|
54790
|
+
*/
|
|
54791
|
+
|
|
54572
54792
|
|
|
54573
54793
|
toMonth(panelType, target) {
|
|
54794
|
+
const {
|
|
54795
|
+
type
|
|
54796
|
+
} = this._adapter.getProps();
|
|
54797
|
+
|
|
54574
54798
|
const diff = this._getDiff('month', target, panelType);
|
|
54575
54799
|
|
|
54576
54800
|
this.handleYearOrMonthChange(diff < 0 ? 'prevMonth' : 'nextMonth', panelType, Math.abs(diff), false);
|
|
54801
|
+
|
|
54802
|
+
if (this.isRangeType(type)) {
|
|
54803
|
+
this.handleSyncChangeMonths({
|
|
54804
|
+
panelType,
|
|
54805
|
+
target
|
|
54806
|
+
});
|
|
54807
|
+
}
|
|
54577
54808
|
}
|
|
54578
54809
|
|
|
54579
54810
|
toYear(panelType, target) {
|
|
@@ -54595,34 +54826,51 @@ class monthsGridFoundation_MonthsGridFoundation extends foundation {
|
|
|
54595
54826
|
return typeof realType === 'string' && /range/i.test(realType);
|
|
54596
54827
|
}
|
|
54597
54828
|
|
|
54598
|
-
|
|
54829
|
+
handleSwitchMonthOrYear(switchType, panelType) {
|
|
54599
54830
|
const {
|
|
54600
54831
|
type,
|
|
54601
54832
|
syncSwitchMonth
|
|
54602
54833
|
} = this.getProps();
|
|
54834
|
+
const rangeType = this.isRangeType(type); // range type and syncSwitchMonth, we should change panels at same time
|
|
54603
54835
|
|
|
54604
|
-
if (
|
|
54836
|
+
if (rangeType && syncSwitchMonth) {
|
|
54605
54837
|
this.handleYearOrMonthChange(switchType, 'left', 1, true);
|
|
54606
54838
|
this.handleYearOrMonthChange(switchType, 'right', 1, true);
|
|
54607
54839
|
} else {
|
|
54608
54840
|
this.handleYearOrMonthChange(switchType, panelType);
|
|
54841
|
+
/**
|
|
54842
|
+
* default behavior (v2.2.0)
|
|
54843
|
+
* In order to prevent the two panels from being the same month, this will confuse the user when selecting the range
|
|
54844
|
+
* https://github.com/DouyinFE/semi-design/issues/260
|
|
54845
|
+
*/
|
|
54846
|
+
|
|
54847
|
+
if (rangeType) {
|
|
54848
|
+
const target = this.getTargetChangeDate({
|
|
54849
|
+
panelType,
|
|
54850
|
+
switchType
|
|
54851
|
+
});
|
|
54852
|
+
this.handleSyncChangeMonths({
|
|
54853
|
+
panelType,
|
|
54854
|
+
target
|
|
54855
|
+
});
|
|
54856
|
+
}
|
|
54609
54857
|
}
|
|
54610
54858
|
}
|
|
54611
54859
|
|
|
54612
54860
|
prevMonth(panelType) {
|
|
54613
|
-
this.
|
|
54861
|
+
this.handleSwitchMonthOrYear('prevMonth', panelType);
|
|
54614
54862
|
}
|
|
54615
54863
|
|
|
54616
54864
|
nextMonth(panelType) {
|
|
54617
|
-
this.
|
|
54865
|
+
this.handleSwitchMonthOrYear('nextMonth', panelType);
|
|
54618
54866
|
}
|
|
54619
54867
|
|
|
54620
54868
|
prevYear(panelType) {
|
|
54621
|
-
this.
|
|
54869
|
+
this.handleSwitchMonthOrYear('prevYear', panelType);
|
|
54622
54870
|
}
|
|
54623
54871
|
|
|
54624
54872
|
nextYear(panelType) {
|
|
54625
|
-
this.
|
|
54873
|
+
this.handleSwitchMonthOrYear('nextYear', panelType);
|
|
54626
54874
|
}
|
|
54627
54875
|
/**
|
|
54628
54876
|
* Calculate the year and month difference
|
|
@@ -55279,6 +55527,34 @@ class monthsGridFoundation_MonthsGridFoundation extends foundation {
|
|
|
55279
55527
|
isYearPickerOpen: false
|
|
55280
55528
|
});
|
|
55281
55529
|
}
|
|
55530
|
+
/**
|
|
55531
|
+
* Get year and month panel open type
|
|
55532
|
+
*
|
|
55533
|
+
* It is useful info to set minHeight of weeks.
|
|
55534
|
+
* - When yam open type is 'left' or 'right', weeks minHeight should be set
|
|
55535
|
+
* If the minHeight is not set, the change of the number of weeks will cause the scrollList to be unstable
|
|
55536
|
+
*/
|
|
55537
|
+
|
|
55538
|
+
|
|
55539
|
+
getYAMOpenType() {
|
|
55540
|
+
const {
|
|
55541
|
+
monthLeft,
|
|
55542
|
+
monthRight
|
|
55543
|
+
} = this._adapter.getStates();
|
|
55544
|
+
|
|
55545
|
+
const leftYearPickerOpen = monthLeft.isYearPickerOpen;
|
|
55546
|
+
const rightYearPickerOpen = monthRight.isYearPickerOpen;
|
|
55547
|
+
|
|
55548
|
+
if (leftYearPickerOpen && rightYearPickerOpen) {
|
|
55549
|
+
return 'both';
|
|
55550
|
+
} else if (leftYearPickerOpen) {
|
|
55551
|
+
return 'left';
|
|
55552
|
+
} else if (rightYearPickerOpen) {
|
|
55553
|
+
return 'right';
|
|
55554
|
+
} else {
|
|
55555
|
+
return 'none';
|
|
55556
|
+
}
|
|
55557
|
+
}
|
|
55282
55558
|
|
|
55283
55559
|
}
|
|
55284
55560
|
// CONCATENATED MODULE: ./datePicker/navigation.tsx
|
|
@@ -55304,6 +55580,8 @@ class navigation_Navigation extends external_root_React_commonjs2_react_commonjs
|
|
|
55304
55580
|
onMonthClick,
|
|
55305
55581
|
onNextMonth,
|
|
55306
55582
|
onPrevMonth,
|
|
55583
|
+
onPrevYear,
|
|
55584
|
+
onNextYear,
|
|
55307
55585
|
density,
|
|
55308
55586
|
shouldBimonthSwitch,
|
|
55309
55587
|
panelType
|
|
@@ -55311,37 +55589,75 @@ class navigation_Navigation extends external_root_React_commonjs2_react_commonjs
|
|
|
55311
55589
|
const btnTheme = 'borderless';
|
|
55312
55590
|
const iconBtnSize = density === 'compact' ? 'default' : 'large';
|
|
55313
55591
|
const btnNoHorizontalPadding = true;
|
|
55314
|
-
const buttonSize = density === 'compact' ? 'small' : 'default';
|
|
55592
|
+
const buttonSize = density === 'compact' ? 'small' : 'default';
|
|
55593
|
+
const isLeftPanel = panelType === datePicker_constants_strings.PANEL_TYPE_LEFT;
|
|
55594
|
+
const isRightPanel = panelType === datePicker_constants_strings.PANEL_TYPE_RIGHT; // syncSwitchMonth and the current panel is the left
|
|
55595
|
+
|
|
55596
|
+
const hiddenLeftPanelRightButtons = shouldBimonthSwitch && isLeftPanel; // syncSwitchMonth and the current panel is the right
|
|
55597
|
+
|
|
55598
|
+
const hiddenRightPanelLeftButtons = shouldBimonthSwitch && isRightPanel; // `visibility: hidden` will keep the icon in position
|
|
55315
55599
|
|
|
55316
|
-
const
|
|
55600
|
+
const leftButtonStyle = {};
|
|
55601
|
+
const rightButtonStyle = {};
|
|
55602
|
+
|
|
55603
|
+
if (hiddenRightPanelLeftButtons) {
|
|
55604
|
+
leftButtonStyle.visibility = 'hidden';
|
|
55605
|
+
}
|
|
55606
|
+
|
|
55607
|
+
if (hiddenLeftPanelRightButtons) {
|
|
55608
|
+
rightButtonStyle.visibility = 'hidden';
|
|
55609
|
+
}
|
|
55317
55610
|
|
|
55318
|
-
const bimonthSwitchWithRightPanel = shouldBimonthSwitch && panelType === datePicker_constants_strings.PANEL_TYPE_RIGHT;
|
|
55319
55611
|
const ref = forwardRef || this.navRef;
|
|
55320
55612
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
55321
55613
|
className: navigation_prefixCls,
|
|
55322
55614
|
ref: ref
|
|
55323
|
-
},
|
|
55615
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
|
|
55616
|
+
key: "double-chevron-left",
|
|
55617
|
+
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconDoubleChevronLeft, {
|
|
55618
|
+
size: iconBtnSize
|
|
55619
|
+
}),
|
|
55620
|
+
size: buttonSize,
|
|
55621
|
+
theme: btnTheme,
|
|
55622
|
+
noHorizontalPadding: btnNoHorizontalPadding,
|
|
55623
|
+
onClick: onPrevYear,
|
|
55624
|
+
style: leftButtonStyle
|
|
55625
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
|
|
55626
|
+
key: "chevron-left",
|
|
55324
55627
|
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronLeft, {
|
|
55325
55628
|
size: iconBtnSize
|
|
55326
55629
|
}),
|
|
55327
55630
|
size: buttonSize,
|
|
55328
55631
|
onClick: onPrevMonth,
|
|
55329
55632
|
theme: btnTheme,
|
|
55330
|
-
noHorizontalPadding: btnNoHorizontalPadding
|
|
55633
|
+
noHorizontalPadding: btnNoHorizontalPadding,
|
|
55634
|
+
style: leftButtonStyle
|
|
55331
55635
|
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
55332
55636
|
className: "".concat(navigation_prefixCls, "-month")
|
|
55333
55637
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(button_0, {
|
|
55334
55638
|
onClick: onMonthClick,
|
|
55335
55639
|
theme: btnTheme,
|
|
55336
55640
|
size: buttonSize
|
|
55337
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", null, monthText))),
|
|
55641
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", null, monthText))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
|
|
55642
|
+
key: "chevron-right",
|
|
55338
55643
|
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronRight, {
|
|
55339
55644
|
size: iconBtnSize
|
|
55340
55645
|
}),
|
|
55341
55646
|
size: buttonSize,
|
|
55342
55647
|
onClick: onNextMonth,
|
|
55343
55648
|
theme: btnTheme,
|
|
55344
|
-
noHorizontalPadding: btnNoHorizontalPadding
|
|
55649
|
+
noHorizontalPadding: btnNoHorizontalPadding,
|
|
55650
|
+
style: rightButtonStyle
|
|
55651
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
|
|
55652
|
+
key: "double-chevron-right",
|
|
55653
|
+
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconDoubleChevronRight, {
|
|
55654
|
+
size: iconBtnSize
|
|
55655
|
+
}),
|
|
55656
|
+
size: buttonSize,
|
|
55657
|
+
theme: btnTheme,
|
|
55658
|
+
noHorizontalPadding: btnNoHorizontalPadding,
|
|
55659
|
+
onClick: onNextYear,
|
|
55660
|
+
style: rightButtonStyle
|
|
55345
55661
|
}));
|
|
55346
55662
|
}
|
|
55347
55663
|
|
|
@@ -58028,6 +58344,10 @@ class monthsGrid_MonthsGrid extends baseComponent_BaseComponent {
|
|
|
58028
58344
|
});
|
|
58029
58345
|
};
|
|
58030
58346
|
|
|
58347
|
+
this.getYAMOpenType = () => {
|
|
58348
|
+
return this.foundation.getYAMOpenType();
|
|
58349
|
+
};
|
|
58350
|
+
|
|
58031
58351
|
let nowDate = is_array_default()(props.defaultPickerValue) ? props.defaultPickerValue[0] : props.defaultPickerValue;
|
|
58032
58352
|
const validFormat = props.format || getDefaultFormatTokenByType(props.type);
|
|
58033
58353
|
|
|
@@ -58519,9 +58839,11 @@ class monthsGrid_MonthsGrid extends baseComponent_BaseComponent {
|
|
|
58519
58839
|
content = 'year month';
|
|
58520
58840
|
}
|
|
58521
58841
|
|
|
58842
|
+
const yearOpenType = this.getYAMOpenType();
|
|
58522
58843
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
58523
58844
|
className: monthGridCls,
|
|
58524
58845
|
"x-type": type,
|
|
58846
|
+
"x-panel-yearandmonth-open-type": yearOpenType,
|
|
58525
58847
|
ref: current => this.cacheRefCurrent('monthGrid', current)
|
|
58526
58848
|
}, content);
|
|
58527
58849
|
}
|
|
@@ -59469,7 +59791,7 @@ class descriptions_item_Item extends external_root_React_commonjs2_react_commonj
|
|
|
59469
59791
|
className: "".concat(item_prefixCls, "-item")
|
|
59470
59792
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
59471
59793
|
className: keyCls
|
|
59472
|
-
},
|
|
59794
|
+
}, itemKey, ":"), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
59473
59795
|
className: valCls
|
|
59474
59796
|
}, typeof children === 'function' ? children() : children))) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("tr", {
|
|
59475
59797
|
className: className,
|
|
@@ -59591,6 +59913,25 @@ const empty_prefixCls = empty_constants_cssClasses.PREFIX;
|
|
|
59591
59913
|
class empty_Empty extends baseComponent_BaseComponent {
|
|
59592
59914
|
constructor(props) {
|
|
59593
59915
|
super(props);
|
|
59916
|
+
|
|
59917
|
+
this.observe = mutationsList => {
|
|
59918
|
+
for (const mutation of mutationsList) {
|
|
59919
|
+
if (mutation.type === 'attributes' && mutation.attributeName === 'theme-mode') {
|
|
59920
|
+
this.updateMode();
|
|
59921
|
+
}
|
|
59922
|
+
}
|
|
59923
|
+
};
|
|
59924
|
+
|
|
59925
|
+
this.updateMode = () => {
|
|
59926
|
+
const val = this.body.getAttribute('theme-mode');
|
|
59927
|
+
|
|
59928
|
+
if (val !== this.state.mode) {
|
|
59929
|
+
this.setState({
|
|
59930
|
+
mode: val
|
|
59931
|
+
});
|
|
59932
|
+
}
|
|
59933
|
+
};
|
|
59934
|
+
|
|
59594
59935
|
this.state = {
|
|
59595
59936
|
mode: null
|
|
59596
59937
|
};
|
|
@@ -59614,24 +59955,6 @@ class empty_Empty extends baseComponent_BaseComponent {
|
|
|
59614
59955
|
this.observer && this.observer.disconnect();
|
|
59615
59956
|
}
|
|
59616
59957
|
|
|
59617
|
-
observe(mutationsList) {
|
|
59618
|
-
for (const mutation of mutationsList) {
|
|
59619
|
-
if (mutation.type === 'attributes' && mutation.attributeName === 'theme-mode') {
|
|
59620
|
-
this.updateMode();
|
|
59621
|
-
}
|
|
59622
|
-
}
|
|
59623
|
-
}
|
|
59624
|
-
|
|
59625
|
-
updateMode() {
|
|
59626
|
-
const val = this.body.getAttribute('theme-mode');
|
|
59627
|
-
|
|
59628
|
-
if (val !== this.state.mode) {
|
|
59629
|
-
this.setState({
|
|
59630
|
-
mode: val
|
|
59631
|
-
});
|
|
59632
|
-
}
|
|
59633
|
-
}
|
|
59634
|
-
|
|
59635
59958
|
render() {
|
|
59636
59959
|
var _context;
|
|
59637
59960
|
|
|
@@ -71468,17 +71791,20 @@ class foundation_SelectFoundation extends foundation {
|
|
|
71468
71791
|
}
|
|
71469
71792
|
|
|
71470
71793
|
_removeInternalKey(option) {
|
|
71471
|
-
|
|
71472
|
-
|
|
71473
|
-
|
|
71474
|
-
delete
|
|
71794
|
+
// eslint-disable-next-line
|
|
71795
|
+
let newOption = assign_default()({}, option);
|
|
71796
|
+
|
|
71797
|
+
delete newOption._parentGroup;
|
|
71798
|
+
delete newOption._show;
|
|
71799
|
+
delete newOption._selected;
|
|
71800
|
+
delete newOption._scrollIndex;
|
|
71475
71801
|
|
|
71476
|
-
if ('_keyInOptionList' in
|
|
71477
|
-
|
|
71478
|
-
delete
|
|
71802
|
+
if ('_keyInOptionList' in newOption) {
|
|
71803
|
+
newOption.key = newOption._keyInOptionList;
|
|
71804
|
+
delete newOption._keyInOptionList;
|
|
71479
71805
|
}
|
|
71480
71806
|
|
|
71481
|
-
return
|
|
71807
|
+
return newOption;
|
|
71482
71808
|
}
|
|
71483
71809
|
|
|
71484
71810
|
_notifySelect(value, option) {
|
|
@@ -72296,39 +72622,44 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
72296
72622
|
const {
|
|
72297
72623
|
size,
|
|
72298
72624
|
multiple,
|
|
72299
|
-
disabled
|
|
72625
|
+
disabled,
|
|
72626
|
+
inputProps
|
|
72300
72627
|
} = this.props;
|
|
72628
|
+
|
|
72629
|
+
const inputPropsCls = get_default()(inputProps, 'className');
|
|
72630
|
+
|
|
72301
72631
|
const inputcls = classnames_default()("".concat(select_prefixcls, "-input"), {
|
|
72302
72632
|
["".concat(select_prefixcls, "-input-single")]: !multiple,
|
|
72303
72633
|
["".concat(select_prefixcls, "-input-multiple")]: multiple
|
|
72304
|
-
});
|
|
72634
|
+
}, inputPropsCls);
|
|
72305
72635
|
const {
|
|
72306
72636
|
inputValue
|
|
72307
72637
|
} = this.state;
|
|
72308
|
-
|
|
72638
|
+
|
|
72639
|
+
const selectInputProps = assign_default()({
|
|
72309
72640
|
value: inputValue,
|
|
72310
72641
|
disabled,
|
|
72311
72642
|
className: inputcls,
|
|
72312
72643
|
onChange: this.handleInputChange
|
|
72313
|
-
};
|
|
72644
|
+
}, inputProps);
|
|
72645
|
+
|
|
72314
72646
|
let style = {}; // Multiple choice mode
|
|
72315
72647
|
|
|
72316
72648
|
if (multiple) {
|
|
72317
72649
|
style = {
|
|
72318
72650
|
width: inputValue ? "".concat(inputValue.length * 16, "px") : '2px'
|
|
72319
72651
|
};
|
|
72320
|
-
|
|
72652
|
+
selectInputProps.style = style;
|
|
72321
72653
|
}
|
|
72322
72654
|
|
|
72323
72655
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(input_0, assign_default()({
|
|
72324
72656
|
ref: this.inputRef,
|
|
72325
|
-
size: size
|
|
72326
|
-
}, inputProps, {
|
|
72657
|
+
size: size,
|
|
72327
72658
|
onFocus: e => {
|
|
72328
72659
|
// prevent event bubbling which will fire trigger onFocus event
|
|
72329
72660
|
e.stopPropagation(); // e.nativeEvent.stopImmediatePropagation();
|
|
72330
72661
|
}
|
|
72331
|
-
}));
|
|
72662
|
+
}, selectInputProps));
|
|
72332
72663
|
}
|
|
72333
72664
|
|
|
72334
72665
|
close() {
|
|
@@ -72658,7 +72989,9 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
72658
72989
|
key: value
|
|
72659
72990
|
}), content);
|
|
72660
72991
|
} else {
|
|
72661
|
-
return
|
|
72992
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_["Fragment"], {
|
|
72993
|
+
key: value
|
|
72994
|
+
}, content);
|
|
72662
72995
|
}
|
|
72663
72996
|
});
|
|
72664
72997
|
|
|
@@ -72932,6 +73265,7 @@ select_Select.propTypes = {
|
|
|
72932
73265
|
dropdownStyle: prop_types_default.a.object,
|
|
72933
73266
|
outerTopSlot: prop_types_default.a.node,
|
|
72934
73267
|
innerTopSlot: prop_types_default.a.node,
|
|
73268
|
+
inputProps: prop_types_default.a.object,
|
|
72935
73269
|
outerBottomSlot: prop_types_default.a.node,
|
|
72936
73270
|
innerBottomSlot: prop_types_default.a.node,
|
|
72937
73271
|
optionList: prop_types_default.a.array,
|
|
@@ -73039,6 +73373,7 @@ select_Select.defaultProps = {
|
|
|
73039
73373
|
|
|
73040
73374
|
|
|
73041
73375
|
|
|
73376
|
+
|
|
73042
73377
|
const pagination_prefixCls = pagination_constants_cssClasses.PREFIX;
|
|
73043
73378
|
const {
|
|
73044
73379
|
Option: pagination_Option
|
|
@@ -73064,6 +73399,7 @@ class pagination_Pagination extends baseComponent_BaseComponent {
|
|
|
73064
73399
|
this.foundation = new pagination_foundation(this.adapter);
|
|
73065
73400
|
this.renderDefaultPage = bind_default()(_context = this.renderDefaultPage).call(_context, this);
|
|
73066
73401
|
this.renderSmallPage = bind_default()(_context2 = this.renderSmallPage).call(_context2, this);
|
|
73402
|
+
Object(warning["a" /* default */])(Boolean(props.showSizeChanger && props.hideOnSinglePage), '[Semi Pagination] You should not use showSizeChanger and hideOnSinglePage in ths same time. At this time, hideOnSinglePage no longer takes effect, otherwise there may be a problem that the switch entry disappears');
|
|
73067
73403
|
}
|
|
73068
73404
|
|
|
73069
73405
|
get adapter() {
|
|
@@ -73357,7 +73693,8 @@ class pagination_Pagination extends baseComponent_BaseComponent {
|
|
|
73357
73693
|
className,
|
|
73358
73694
|
style,
|
|
73359
73695
|
hideOnSinglePage,
|
|
73360
|
-
hoverShowPageSelect
|
|
73696
|
+
hoverShowPageSelect,
|
|
73697
|
+
showSizeChanger
|
|
73361
73698
|
} = this.props;
|
|
73362
73699
|
const paginationCls = classnames_default()("".concat(pagination_prefixCls, "-small"), pagination_prefixCls, className);
|
|
73363
73700
|
const {
|
|
@@ -73367,7 +73704,7 @@ class pagination_Pagination extends baseComponent_BaseComponent {
|
|
|
73367
73704
|
} = this.state;
|
|
73368
73705
|
const totalPageNum = Math.ceil(total / pageSize);
|
|
73369
73706
|
|
|
73370
|
-
if (totalPageNum < 2 && hideOnSinglePage) {
|
|
73707
|
+
if (totalPageNum < 2 && hideOnSinglePage && !showSizeChanger) {
|
|
73371
73708
|
return null;
|
|
73372
73709
|
}
|
|
73373
73710
|
|
|
@@ -73396,13 +73733,14 @@ class pagination_Pagination extends baseComponent_BaseComponent {
|
|
|
73396
73733
|
showTotal,
|
|
73397
73734
|
className,
|
|
73398
73735
|
style,
|
|
73399
|
-
hideOnSinglePage
|
|
73736
|
+
hideOnSinglePage,
|
|
73737
|
+
showSizeChanger
|
|
73400
73738
|
} = this.props;
|
|
73401
73739
|
const paginationCls = classnames_default()(className, "".concat(pagination_prefixCls));
|
|
73402
73740
|
const showTotalCls = "".concat(pagination_prefixCls, "-total");
|
|
73403
73741
|
const totalPageNum = Math.ceil(total / pageSize);
|
|
73404
73742
|
|
|
73405
|
-
if (totalPageNum < 2 && hideOnSinglePage) {
|
|
73743
|
+
if (totalPageNum < 2 && hideOnSinglePage && !showSizeChanger) {
|
|
73406
73744
|
return null;
|
|
73407
73745
|
}
|
|
73408
73746
|
|
|
@@ -74813,7 +75151,7 @@ class rating_item_Item extends external_root_React_commonjs2_react_commonjs_reac
|
|
|
74813
75151
|
height: size,
|
|
74814
75152
|
fontSize: size
|
|
74815
75153
|
} : {};
|
|
74816
|
-
const iconSize = size === 'small' ? 'default' : 'extra-large';
|
|
75154
|
+
const iconSize = isCustomSize ? 'inherit' : size === 'small' ? 'default' : 'extra-large';
|
|
74817
75155
|
const content = character ? character : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconStar, {
|
|
74818
75156
|
size: iconSize
|
|
74819
75157
|
});
|
|
@@ -86377,8 +86715,6 @@ TabPane_TabPane.propTypes = {
|
|
|
86377
86715
|
|
|
86378
86716
|
|
|
86379
86717
|
|
|
86380
|
-
|
|
86381
|
-
|
|
86382
86718
|
var tabs_rest = undefined && undefined.__rest || function (s, e) {
|
|
86383
86719
|
var t = {};
|
|
86384
86720
|
|
|
@@ -86402,9 +86738,7 @@ var tabs_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
86402
86738
|
|
|
86403
86739
|
|
|
86404
86740
|
|
|
86405
|
-
|
|
86406
|
-
const panePickKeys = keys_default()(omit_default()(tabs_TabPane.propTypes, ['children']));
|
|
86407
|
-
|
|
86741
|
+
const panePickKeys = ['className', 'style', 'disabled', 'itemKey', 'tab', 'icon'];
|
|
86408
86742
|
|
|
86409
86743
|
|
|
86410
86744
|
class tabs_Tabs extends baseComponent_BaseComponent {
|
|
@@ -86767,6 +87101,7 @@ const timeline_constants_strings = {
|
|
|
86767
87101
|
|
|
86768
87102
|
|
|
86769
87103
|
|
|
87104
|
+
|
|
86770
87105
|
const timeline_item_prefixCls = timeline_constants_cssClasses.ITEM;
|
|
86771
87106
|
class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_react_["PureComponent"] {
|
|
86772
87107
|
render() {
|
|
@@ -86780,7 +87115,8 @@ class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_re
|
|
|
86780
87115
|
type,
|
|
86781
87116
|
style,
|
|
86782
87117
|
time,
|
|
86783
|
-
extra
|
|
87118
|
+
extra,
|
|
87119
|
+
onClick
|
|
86784
87120
|
} = this.props;
|
|
86785
87121
|
const itemCls = classnames_default()(timeline_item_prefixCls, className);
|
|
86786
87122
|
const dotCls = classnames_default()({
|
|
@@ -86795,7 +87131,8 @@ class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_re
|
|
|
86795
87131
|
} : null;
|
|
86796
87132
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("li", {
|
|
86797
87133
|
className: itemCls,
|
|
86798
|
-
style: style
|
|
87134
|
+
style: style,
|
|
87135
|
+
onClick: onClick
|
|
86799
87136
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
86800
87137
|
className: "".concat(timeline_item_prefixCls, "-tail")
|
|
86801
87138
|
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", assign_default()({
|
|
@@ -86818,11 +87155,13 @@ timeline_item_Item.propTypes = {
|
|
|
86818
87155
|
extra: prop_types_default.a.node,
|
|
86819
87156
|
position: prop_types_default.a.oneOf(timeline_constants_strings.ITEM_POS),
|
|
86820
87157
|
className: prop_types_default.a.string,
|
|
86821
|
-
style: prop_types_default.a.object
|
|
87158
|
+
style: prop_types_default.a.object,
|
|
87159
|
+
onClick: prop_types_default.a.func
|
|
86822
87160
|
};
|
|
86823
87161
|
timeline_item_Item.defaultProps = {
|
|
86824
87162
|
type: 'default',
|
|
86825
|
-
time: ''
|
|
87163
|
+
time: '',
|
|
87164
|
+
onClick: noop_default.a
|
|
86826
87165
|
};
|
|
86827
87166
|
// CONCATENATED MODULE: ./timeline/index.tsx
|
|
86828
87167
|
|
|
@@ -93972,6 +94311,113 @@ class foundation_UploadFoundation extends foundation {
|
|
|
93972
94311
|
this.startUpload(currentFiles);
|
|
93973
94312
|
}
|
|
93974
94313
|
});
|
|
94314
|
+
} // 插入多个文件到指定位置
|
|
94315
|
+
// Insert files to the specified location
|
|
94316
|
+
|
|
94317
|
+
|
|
94318
|
+
insertFileToList(files, index) {
|
|
94319
|
+
const {
|
|
94320
|
+
limit,
|
|
94321
|
+
transformFile,
|
|
94322
|
+
accept,
|
|
94323
|
+
uploadTrigger
|
|
94324
|
+
} = this.getProps();
|
|
94325
|
+
const {
|
|
94326
|
+
fileList
|
|
94327
|
+
} = this.getStates();
|
|
94328
|
+
const unAcceptFileList = []; // 当次选中的文件
|
|
94329
|
+
// current selected file
|
|
94330
|
+
|
|
94331
|
+
let currentFileList = from_default()(files);
|
|
94332
|
+
|
|
94333
|
+
if (typeof accept !== 'undefined') {
|
|
94334
|
+
currentFileList = filter_default()(currentFileList).call(currentFileList, item => {
|
|
94335
|
+
const isValid = this.checkFileFormat(accept, item);
|
|
94336
|
+
|
|
94337
|
+
if (!isValid) {
|
|
94338
|
+
unAcceptFileList.push(item);
|
|
94339
|
+
}
|
|
94340
|
+
|
|
94341
|
+
return isValid;
|
|
94342
|
+
});
|
|
94343
|
+
|
|
94344
|
+
if (unAcceptFileList.length !== 0) {
|
|
94345
|
+
this._adapter.notifyAcceptInvalid(unAcceptFileList);
|
|
94346
|
+
}
|
|
94347
|
+
|
|
94348
|
+
if (currentFileList.length === 0) {
|
|
94349
|
+
return;
|
|
94350
|
+
}
|
|
94351
|
+
}
|
|
94352
|
+
|
|
94353
|
+
currentFileList = map_default()(currentFileList).call(currentFileList, file => {
|
|
94354
|
+
if (!file.uid) {
|
|
94355
|
+
file.uid = getUuidv4();
|
|
94356
|
+
}
|
|
94357
|
+
|
|
94358
|
+
if (this.checkFileSize(file)) {
|
|
94359
|
+
file._sizeInvalid = true;
|
|
94360
|
+
file.status = FILE_STATUS_VALID_FAIL;
|
|
94361
|
+
|
|
94362
|
+
this._adapter.notifySizeError(file, fileList);
|
|
94363
|
+
}
|
|
94364
|
+
|
|
94365
|
+
if (transformFile) {
|
|
94366
|
+
file = transformFile(file);
|
|
94367
|
+
}
|
|
94368
|
+
|
|
94369
|
+
return file;
|
|
94370
|
+
});
|
|
94371
|
+
const total = fileList.length + currentFileList.length;
|
|
94372
|
+
|
|
94373
|
+
if (typeof limit !== 'undefined') {
|
|
94374
|
+
// 判断是否超出限制
|
|
94375
|
+
// Determine whether the limit is exceeded
|
|
94376
|
+
if (total > limit) {
|
|
94377
|
+
if (limit === 1) {
|
|
94378
|
+
// 使用最后面的文件对当前文件进行替换
|
|
94379
|
+
// Use the last file to replace the current file
|
|
94380
|
+
currentFileList = slice_default()(currentFileList).call(currentFileList, -1);
|
|
94381
|
+
|
|
94382
|
+
this._adapter.notifyFileSelect(currentFileList);
|
|
94383
|
+
|
|
94384
|
+
this._adapter.resetInput();
|
|
94385
|
+
|
|
94386
|
+
this.replaceFileList(currentFileList);
|
|
94387
|
+
return;
|
|
94388
|
+
} // 如果超出了限制,则计算还能添加几个文件,将剩余的文件继续上传
|
|
94389
|
+
// If the limit is exceeded, several files can be added to the calculation, and the remaining files will continue to be uploaded
|
|
94390
|
+
|
|
94391
|
+
|
|
94392
|
+
const restNum = limit - fileList.length;
|
|
94393
|
+
currentFileList = slice_default()(currentFileList).call(currentFileList, 0, restNum);
|
|
94394
|
+
|
|
94395
|
+
this._adapter.notifyExceed(currentFileList);
|
|
94396
|
+
}
|
|
94397
|
+
}
|
|
94398
|
+
|
|
94399
|
+
const fileItemList = map_default()(currentFileList).call(currentFileList, file => this.buildFileItem(file, uploadTrigger));
|
|
94400
|
+
|
|
94401
|
+
const newFileList = slice_default()(fileList).call(fileList);
|
|
94402
|
+
|
|
94403
|
+
if (typeof index !== 'undefined') {
|
|
94404
|
+
splice_default()(newFileList).call(newFileList, index, 0, ...fileItemList);
|
|
94405
|
+
} else {
|
|
94406
|
+
newFileList.push(...fileItemList);
|
|
94407
|
+
}
|
|
94408
|
+
|
|
94409
|
+
this._adapter.notifyFileSelect(currentFileList);
|
|
94410
|
+
|
|
94411
|
+
this._adapter.notifyChange({
|
|
94412
|
+
fileList: newFileList,
|
|
94413
|
+
currentFile: null
|
|
94414
|
+
});
|
|
94415
|
+
|
|
94416
|
+
this._adapter.updateFileList(newFileList, () => {
|
|
94417
|
+
if (uploadTrigger === foundation_TRIGGER_AUTO) {
|
|
94418
|
+
this.startUpload(fileItemList);
|
|
94419
|
+
}
|
|
94420
|
+
});
|
|
93975
94421
|
}
|
|
93976
94422
|
|
|
93977
94423
|
manualUpload() {
|
|
@@ -94841,16 +95287,23 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
94841
95287
|
status,
|
|
94842
95288
|
disabled,
|
|
94843
95289
|
style,
|
|
94844
|
-
onPreviewClick
|
|
95290
|
+
onPreviewClick,
|
|
95291
|
+
showPicInfo,
|
|
95292
|
+
renderPicInfo,
|
|
95293
|
+
renderThumbnail,
|
|
95294
|
+
name,
|
|
95295
|
+
index
|
|
94845
95296
|
} = this.props;
|
|
95297
|
+
const showProgress = status === upload_constants_strings.FILE_STATUS_UPLOADING && percent !== 100;
|
|
95298
|
+
const showRetry = status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL && this.props.showRetry;
|
|
95299
|
+
const showReplace = status === upload_constants_strings.FILE_STATUS_SUCCESS && this.props.showReplace;
|
|
94846
95300
|
const filePicCardCls = classnames_default()({
|
|
94847
95301
|
["".concat(fileCard_prefixCls, "-picture-file-card")]: true,
|
|
94848
95302
|
["".concat(fileCard_prefixCls, "-picture-file-card-disabled")]: disabled,
|
|
94849
|
-
["".concat(fileCard_prefixCls, "-picture-file-card-show-pointer")]: typeof onPreviewClick !== 'undefined'
|
|
95303
|
+
["".concat(fileCard_prefixCls, "-picture-file-card-show-pointer")]: typeof onPreviewClick !== 'undefined',
|
|
95304
|
+
["".concat(fileCard_prefixCls, "-picture-file-card-error")]: status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL,
|
|
95305
|
+
["".concat(fileCard_prefixCls, "-picture-file-card-uploading")]: showProgress
|
|
94850
95306
|
});
|
|
94851
|
-
const showProgress = status === upload_constants_strings.FILE_STATUS_UPLOADING && percent !== 100;
|
|
94852
|
-
const showRetry = status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL && this.props.showRetry;
|
|
94853
|
-
const showReplace = status === upload_constants_strings.FILE_STATUS_SUCCESS && this.props.showReplace;
|
|
94854
95307
|
const closeCls = "".concat(fileCard_prefixCls, "-picture-file-card-close");
|
|
94855
95308
|
const retry = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
94856
95309
|
className: "".concat(fileCard_prefixCls, "-picture-file-card-retry"),
|
|
@@ -94870,47 +95323,38 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
94870
95323
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(ReplaceSvg, {
|
|
94871
95324
|
className: "".concat(fileCard_prefixCls, "-picture-file-card-icon-replace")
|
|
94872
95325
|
})));
|
|
95326
|
+
const picInfo = typeof renderPicInfo === 'function' ? renderPicInfo(this.props) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95327
|
+
className: "".concat(fileCard_prefixCls, "-picture-file-card-pic-info")
|
|
95328
|
+
}, index + 1);
|
|
95329
|
+
const thumbnail = typeof renderThumbnail === 'function' ? renderThumbnail(this.props) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("img", {
|
|
95330
|
+
src: url,
|
|
95331
|
+
alt: "picture of ".concat(name)
|
|
95332
|
+
});
|
|
94873
95333
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
94874
95334
|
className: filePicCardCls,
|
|
94875
95335
|
style: style,
|
|
94876
95336
|
onClick: onPreviewClick
|
|
94877
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
|
94878
|
-
src: url
|
|
94879
|
-
}), showProgress ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(progress_0, {
|
|
95337
|
+
}, thumbnail, showProgress ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(progress_0, {
|
|
94880
95338
|
percent: percent,
|
|
94881
95339
|
type: "circle",
|
|
94882
95340
|
size: "small",
|
|
94883
95341
|
orbitStroke: '#FFF'
|
|
94884
|
-
}) : null, showRetry ? retry : null, showReplace && replace,
|
|
94885
|
-
className: closeCls
|
|
94886
|
-
onClick: e => this.onRemove(e)
|
|
95342
|
+
}) : null, showRetry ? retry : null, showReplace && replace, showPicInfo && picInfo, !disabled && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95343
|
+
className: closeCls
|
|
94887
95344
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, {
|
|
94888
|
-
size: "extra-small"
|
|
95345
|
+
size: "extra-small",
|
|
95346
|
+
onClick: e => this.onRemove(e)
|
|
94889
95347
|
})), this.renderPicValidateMsg());
|
|
94890
95348
|
}
|
|
94891
95349
|
|
|
94892
|
-
|
|
94893
|
-
e.stopPropagation();
|
|
94894
|
-
this.props.onRemove(this.props, e);
|
|
94895
|
-
}
|
|
94896
|
-
|
|
94897
|
-
onReplace(e) {
|
|
94898
|
-
e.stopPropagation();
|
|
94899
|
-
this.props.onReplace(this.props, e);
|
|
94900
|
-
}
|
|
94901
|
-
|
|
94902
|
-
onRetry(e) {
|
|
94903
|
-
e.stopPropagation();
|
|
94904
|
-
this.props.onRetry(this.props, e);
|
|
94905
|
-
}
|
|
94906
|
-
|
|
94907
|
-
render() {
|
|
95350
|
+
renderFile(locale) {
|
|
94908
95351
|
const {
|
|
94909
95352
|
name,
|
|
94910
95353
|
size,
|
|
94911
95354
|
percent,
|
|
94912
95355
|
url,
|
|
94913
|
-
|
|
95356
|
+
showRetry: propsShowRetry,
|
|
95357
|
+
showReplace: propsShowReplace,
|
|
94914
95358
|
preview,
|
|
94915
95359
|
previewFile,
|
|
94916
95360
|
status,
|
|
@@ -94931,15 +95375,8 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
94931
95375
|
const replaceCls = "".concat(fileCard_prefixCls, "-file-card-replace");
|
|
94932
95376
|
const showProgress = !(percent === 100 || typeof percent === 'undefined') && status === upload_constants_strings.FILE_STATUS_UPLOADING; // only show retry when upload fail & showRetry is true, no need to show during validate fail
|
|
94933
95377
|
|
|
94934
|
-
const showRetry = status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL &&
|
|
94935
|
-
const showReplace = status === upload_constants_strings.FILE_STATUS_SUCCESS &&
|
|
94936
|
-
|
|
94937
|
-
if (listType === upload_constants_strings.FILE_LIST_PIC) {
|
|
94938
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
|
|
94939
|
-
componentName: "Upload"
|
|
94940
|
-
}, locale => this.renderPic(locale));
|
|
94941
|
-
}
|
|
94942
|
-
|
|
95378
|
+
const showRetry = status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL && propsShowRetry;
|
|
95379
|
+
const showReplace = status === upload_constants_strings.FILE_STATUS_SUCCESS && propsShowReplace;
|
|
94943
95380
|
const fileSize = this.transSize(size);
|
|
94944
95381
|
let previewContent = preview ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("img", {
|
|
94945
95382
|
src: url
|
|
@@ -94951,9 +95388,7 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
94951
95388
|
previewContent = previewFile(this.props);
|
|
94952
95389
|
}
|
|
94953
95390
|
|
|
94954
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
|
94955
|
-
componentName: "Upload"
|
|
94956
|
-
}, locale => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95391
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
94957
95392
|
className: fileCardCls,
|
|
94958
95393
|
style: style,
|
|
94959
95394
|
onClick: onPreviewClick
|
|
@@ -94998,7 +95433,42 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
94998
95433
|
theme: "borderless",
|
|
94999
95434
|
size: "small",
|
|
95000
95435
|
className: closeCls
|
|
95001
|
-
}))
|
|
95436
|
+
}));
|
|
95437
|
+
}
|
|
95438
|
+
|
|
95439
|
+
onRemove(e) {
|
|
95440
|
+
e.stopPropagation();
|
|
95441
|
+
this.props.onRemove(this.props, e);
|
|
95442
|
+
}
|
|
95443
|
+
|
|
95444
|
+
onReplace(e) {
|
|
95445
|
+
e.stopPropagation();
|
|
95446
|
+
this.props.onReplace(this.props, e);
|
|
95447
|
+
}
|
|
95448
|
+
|
|
95449
|
+
onRetry(e) {
|
|
95450
|
+
e.stopPropagation();
|
|
95451
|
+
this.props.onRetry(this.props, e);
|
|
95452
|
+
}
|
|
95453
|
+
|
|
95454
|
+
render() {
|
|
95455
|
+
const {
|
|
95456
|
+
listType
|
|
95457
|
+
} = this.props;
|
|
95458
|
+
|
|
95459
|
+
if (listType === upload_constants_strings.FILE_LIST_PIC) {
|
|
95460
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
|
|
95461
|
+
componentName: "Upload"
|
|
95462
|
+
}, locale => this.renderPic(locale));
|
|
95463
|
+
}
|
|
95464
|
+
|
|
95465
|
+
if (listType === upload_constants_strings.FILE_LIST_DEFAULT) {
|
|
95466
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
|
|
95467
|
+
componentName: "Upload"
|
|
95468
|
+
}, locale => this.renderFile(locale));
|
|
95469
|
+
}
|
|
95470
|
+
|
|
95471
|
+
return null;
|
|
95002
95472
|
}
|
|
95003
95473
|
|
|
95004
95474
|
}
|
|
@@ -95021,7 +95491,8 @@ fileCard_FileCard.propTypes = {
|
|
|
95021
95491
|
status: prop_types_default.a.string,
|
|
95022
95492
|
style: prop_types_default.a.object,
|
|
95023
95493
|
url: prop_types_default.a.string,
|
|
95024
|
-
validateMessage: prop_types_default.a.node
|
|
95494
|
+
validateMessage: prop_types_default.a.node,
|
|
95495
|
+
index: prop_types_default.a.number
|
|
95025
95496
|
};
|
|
95026
95497
|
fileCard_FileCard.defaultProps = {
|
|
95027
95498
|
listType: upload_constants_strings.FILE_LIST_DEFAULT,
|
|
@@ -95112,6 +95583,23 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95112
95583
|
this.remove = fileItem => {
|
|
95113
95584
|
this.foundation.handleRemove(fileItem);
|
|
95114
95585
|
};
|
|
95586
|
+
/**
|
|
95587
|
+
* ref method
|
|
95588
|
+
* insert files at index
|
|
95589
|
+
* @param files Array<CustomFile>
|
|
95590
|
+
* @param index number
|
|
95591
|
+
* @returns
|
|
95592
|
+
*/
|
|
95593
|
+
|
|
95594
|
+
|
|
95595
|
+
this.insert = (files, index) => {
|
|
95596
|
+
return this.foundation.insertFileToList(files, index);
|
|
95597
|
+
};
|
|
95598
|
+
/**
|
|
95599
|
+
* ref method
|
|
95600
|
+
* manual upload by user
|
|
95601
|
+
*/
|
|
95602
|
+
|
|
95115
95603
|
|
|
95116
95604
|
this.upload = () => {
|
|
95117
95605
|
const {
|
|
@@ -95127,14 +95615,18 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95127
95615
|
name,
|
|
95128
95616
|
status,
|
|
95129
95617
|
validateMessage,
|
|
95130
|
-
_sizeInvalid
|
|
95618
|
+
_sizeInvalid,
|
|
95619
|
+
uid
|
|
95131
95620
|
} = file;
|
|
95132
95621
|
const {
|
|
95133
95622
|
previewFile,
|
|
95134
95623
|
listType,
|
|
95135
95624
|
itemStyle,
|
|
95136
95625
|
showRetry,
|
|
95626
|
+
showPicInfo,
|
|
95627
|
+
renderPicInfo,
|
|
95137
95628
|
renderFileItem,
|
|
95629
|
+
renderThumbnail,
|
|
95138
95630
|
disabled,
|
|
95139
95631
|
onPreviewClick,
|
|
95140
95632
|
showReplace
|
|
@@ -95155,10 +95647,14 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95155
95647
|
listType,
|
|
95156
95648
|
onRemove,
|
|
95157
95649
|
onRetry,
|
|
95158
|
-
|
|
95650
|
+
index,
|
|
95651
|
+
key: uid || concat_default()(_context = "".concat(name)).call(_context, index),
|
|
95159
95652
|
showRetry: typeof file.showRetry !== 'undefined' ? file.showRetry : showRetry,
|
|
95160
95653
|
style: itemStyle,
|
|
95161
95654
|
disabled,
|
|
95655
|
+
showPicInfo,
|
|
95656
|
+
renderPicInfo,
|
|
95657
|
+
renderThumbnail,
|
|
95162
95658
|
showReplace: typeof file.showReplace !== 'undefined' ? file.showReplace : showReplace,
|
|
95163
95659
|
onReplace,
|
|
95164
95660
|
onPreviewClick: typeof onPreviewClick !== 'undefined' ? () => this.foundation.handlePreviewClick(file) : undefined
|
|
@@ -95180,27 +95676,69 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95180
95676
|
};
|
|
95181
95677
|
|
|
95182
95678
|
this.renderFileList = () => {
|
|
95679
|
+
const {
|
|
95680
|
+
listType
|
|
95681
|
+
} = this.props;
|
|
95682
|
+
|
|
95683
|
+
if (listType === upload_constants_strings.FILE_LIST_PIC) {
|
|
95684
|
+
return this.renderFileListPic();
|
|
95685
|
+
}
|
|
95686
|
+
|
|
95687
|
+
if (listType === upload_constants_strings.FILE_LIST_DEFAULT) {
|
|
95688
|
+
return this.renderFileListDefault();
|
|
95689
|
+
}
|
|
95690
|
+
|
|
95691
|
+
return null;
|
|
95692
|
+
};
|
|
95693
|
+
|
|
95694
|
+
this.renderFileListPic = () => {
|
|
95183
95695
|
const {
|
|
95184
95696
|
showUploadList,
|
|
95185
|
-
listType,
|
|
95186
95697
|
limit,
|
|
95187
95698
|
disabled,
|
|
95188
|
-
children
|
|
95699
|
+
children,
|
|
95700
|
+
draggable
|
|
95189
95701
|
} = this.props;
|
|
95190
95702
|
const {
|
|
95191
|
-
fileList: stateFileList
|
|
95703
|
+
fileList: stateFileList,
|
|
95704
|
+
dragAreaStatus
|
|
95192
95705
|
} = this.state;
|
|
95193
95706
|
const fileList = this.props.fileList || stateFileList;
|
|
95194
|
-
const
|
|
95195
|
-
const
|
|
95707
|
+
const showAddTriggerInList = limit ? limit > fileList.length : true;
|
|
95708
|
+
const dragAreaBaseCls = "".concat(upload_prefixCls, "-drag-area");
|
|
95196
95709
|
const uploadAddCls = classnames_default()("".concat(upload_prefixCls, "-add"), {
|
|
95197
|
-
["".concat(upload_prefixCls, "-picture-add")]:
|
|
95710
|
+
["".concat(upload_prefixCls, "-picture-add")]: true,
|
|
95198
95711
|
["".concat(upload_prefixCls, "-picture-add-disabled")]: disabled
|
|
95199
95712
|
});
|
|
95200
|
-
const
|
|
95713
|
+
const fileListCls = classnames_default()("".concat(upload_prefixCls, "-file-list"), {
|
|
95714
|
+
["".concat(upload_prefixCls, "-picture-file-list")]: true
|
|
95715
|
+
});
|
|
95716
|
+
const dragAreaCls = classnames_default()({
|
|
95717
|
+
["".concat(dragAreaBaseCls, "-legal")]: dragAreaStatus === upload_constants_strings.DRAG_AREA_LEGAL,
|
|
95718
|
+
["".concat(dragAreaBaseCls, "-illegal")]: dragAreaStatus === upload_constants_strings.DRAG_AREA_ILLEGAL
|
|
95719
|
+
});
|
|
95720
|
+
const mainCls = "".concat(upload_prefixCls, "-file-list-main");
|
|
95721
|
+
const addContentProps = {
|
|
95201
95722
|
className: uploadAddCls,
|
|
95202
95723
|
onClick: this.onClick
|
|
95203
|
-
}
|
|
95724
|
+
};
|
|
95725
|
+
const containerProps = {
|
|
95726
|
+
className: fileListCls
|
|
95727
|
+
};
|
|
95728
|
+
const draggableProps = {
|
|
95729
|
+
onDrop: this.onDrop,
|
|
95730
|
+
onDragOver: this.onDragOver,
|
|
95731
|
+
onDragLeave: this.onDragLeave,
|
|
95732
|
+
onDragEnter: this.onDragEnter
|
|
95733
|
+
};
|
|
95734
|
+
|
|
95735
|
+
if (draggable) {
|
|
95736
|
+
assign_default()(addContentProps, draggableProps, {
|
|
95737
|
+
className: classnames_default()(uploadAddCls, dragAreaCls)
|
|
95738
|
+
});
|
|
95739
|
+
}
|
|
95740
|
+
|
|
95741
|
+
const addContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", assign_default()({}, addContentProps), children);
|
|
95204
95742
|
|
|
95205
95743
|
if (!showUploadList || !fileList.length) {
|
|
95206
95744
|
if (showAddTriggerInList) {
|
|
@@ -95210,18 +95748,39 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95210
95748
|
return null;
|
|
95211
95749
|
}
|
|
95212
95750
|
|
|
95213
|
-
|
|
95214
|
-
|
|
95215
|
-
})
|
|
95751
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
|
|
95752
|
+
componentName: "Upload"
|
|
95753
|
+
}, locale => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", assign_default()({}, containerProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95754
|
+
className: mainCls
|
|
95755
|
+
}, map_default()(fileList).call(fileList, (file, index) => this.renderFile(file, index, locale)), showAddTriggerInList ? addContent : null)));
|
|
95756
|
+
};
|
|
95757
|
+
|
|
95758
|
+
this.renderFileListDefault = () => {
|
|
95759
|
+
const {
|
|
95760
|
+
showUploadList,
|
|
95761
|
+
limit,
|
|
95762
|
+
disabled
|
|
95763
|
+
} = this.props;
|
|
95764
|
+
const {
|
|
95765
|
+
fileList: stateFileList
|
|
95766
|
+
} = this.state;
|
|
95767
|
+
const fileList = this.props.fileList || stateFileList;
|
|
95768
|
+
const fileListCls = classnames_default()("".concat(upload_prefixCls, "-file-list"));
|
|
95216
95769
|
const titleCls = "".concat(upload_prefixCls, "-file-list-title");
|
|
95217
95770
|
const mainCls = "".concat(upload_prefixCls, "-file-list-main");
|
|
95218
|
-
const showTitle = limit !== 1 && fileList.length
|
|
95771
|
+
const showTitle = limit !== 1 && fileList.length;
|
|
95219
95772
|
const showClear = this.props.showClear && !disabled;
|
|
95773
|
+
const containerProps = {
|
|
95774
|
+
className: fileListCls
|
|
95775
|
+
};
|
|
95776
|
+
|
|
95777
|
+
if (!showUploadList || !fileList.length) {
|
|
95778
|
+
return null;
|
|
95779
|
+
}
|
|
95780
|
+
|
|
95220
95781
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
|
|
95221
95782
|
componentName: "Upload"
|
|
95222
|
-
}, locale => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95223
|
-
className: fileListCls
|
|
95224
|
-
}, showTitle ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95783
|
+
}, locale => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", assign_default()({}, containerProps), showTitle ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95225
95784
|
className: titleCls
|
|
95226
95785
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
95227
95786
|
className: "".concat(titleCls, "-choosen")
|
|
@@ -95230,7 +95789,7 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95230
95789
|
className: "".concat(titleCls, "-clear")
|
|
95231
95790
|
}, locale.clear) : null) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95232
95791
|
className: mainCls
|
|
95233
|
-
}, map_default()(fileList).call(fileList, (file, index) => this.renderFile(file, index, locale))
|
|
95792
|
+
}, map_default()(fileList).call(fileList, (file, index) => this.renderFile(file, index, locale)))));
|
|
95234
95793
|
};
|
|
95235
95794
|
|
|
95236
95795
|
this.onDrop = e => {
|
|
@@ -95250,6 +95809,28 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95250
95809
|
this.foundation.handleDragEnter(e);
|
|
95251
95810
|
};
|
|
95252
95811
|
|
|
95812
|
+
this.renderAddContent = () => {
|
|
95813
|
+
const {
|
|
95814
|
+
draggable,
|
|
95815
|
+
children,
|
|
95816
|
+
listType
|
|
95817
|
+
} = this.props;
|
|
95818
|
+
const uploadAddCls = classnames_default()("".concat(upload_prefixCls, "-add"));
|
|
95819
|
+
|
|
95820
|
+
if (listType === upload_constants_strings.FILE_LIST_PIC) {
|
|
95821
|
+
return null;
|
|
95822
|
+
}
|
|
95823
|
+
|
|
95824
|
+
if (draggable) {
|
|
95825
|
+
return this.renderDragArea();
|
|
95826
|
+
}
|
|
95827
|
+
|
|
95828
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95829
|
+
className: uploadAddCls,
|
|
95830
|
+
onClick: this.onClick
|
|
95831
|
+
}, children);
|
|
95832
|
+
};
|
|
95833
|
+
|
|
95253
95834
|
this.renderDragArea = () => {
|
|
95254
95835
|
const {
|
|
95255
95836
|
dragAreaStatus
|
|
@@ -95436,7 +96017,6 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95436
96017
|
["".concat(upload_prefixCls, "-warning")]: validateStatus === 'warning',
|
|
95437
96018
|
["".concat(upload_prefixCls, "-success")]: validateStatus === 'success'
|
|
95438
96019
|
}, className);
|
|
95439
|
-
const uploadAddCls = classnames_default()("".concat(upload_prefixCls, "-add"));
|
|
95440
96020
|
const inputCls = classnames_default()("".concat(upload_prefixCls, "-hidden-input"));
|
|
95441
96021
|
const inputReplaceCls = classnames_default()("".concat(upload_prefixCls, "-hidden-input-replace"));
|
|
95442
96022
|
const promptCls = classnames_default()("".concat(upload_prefixCls, "-prompt"));
|
|
@@ -95445,10 +96025,6 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95445
96025
|
directory: 'directory',
|
|
95446
96026
|
webkitdirectory: 'webkitdirectory'
|
|
95447
96027
|
} : {};
|
|
95448
|
-
const addContent = listType !== upload_constants_strings.FILE_LIST_PIC ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95449
|
-
className: uploadAddCls,
|
|
95450
|
-
onClick: this.onClick
|
|
95451
|
-
}, children) : null;
|
|
95452
96028
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95453
96029
|
className: uploadCls,
|
|
95454
96030
|
style: style,
|
|
@@ -95474,7 +96050,7 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95474
96050
|
tabIndex: -1,
|
|
95475
96051
|
className: inputReplaceCls,
|
|
95476
96052
|
ref: this.replaceInputRef
|
|
95477
|
-
}),
|
|
96053
|
+
}), this.renderAddContent(), prompt ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95478
96054
|
className: promptCls
|
|
95479
96055
|
}, prompt) : null, validateMessage ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95480
96056
|
className: validateMsgCls
|
|
@@ -95529,7 +96105,10 @@ upload_Upload.propTypes = {
|
|
|
95529
96105
|
prompt: prop_types_default.a.node,
|
|
95530
96106
|
promptPosition: prop_types_default.a.oneOf(upload_constants_strings.PROMPT_POSITION),
|
|
95531
96107
|
renderFileItem: prop_types_default.a.func,
|
|
96108
|
+
renderPicInfo: prop_types_default.a.func,
|
|
96109
|
+
renderThumbnail: prop_types_default.a.func,
|
|
95532
96110
|
showClear: prop_types_default.a.bool,
|
|
96111
|
+
showPicInfo: prop_types_default.a.bool,
|
|
95533
96112
|
showReplace: prop_types_default.a.bool,
|
|
95534
96113
|
showRetry: prop_types_default.a.bool,
|
|
95535
96114
|
showUploadList: prop_types_default.a.bool,
|
|
@@ -95563,6 +96142,7 @@ upload_Upload.defaultProps = {
|
|
|
95563
96142
|
onSuccess: noop_default.a,
|
|
95564
96143
|
promptPosition: 'right',
|
|
95565
96144
|
showClear: true,
|
|
96145
|
+
showPicInfo: false,
|
|
95566
96146
|
showReplace: false,
|
|
95567
96147
|
showRetry: true,
|
|
95568
96148
|
showUploadList: true,
|
|
@@ -95692,6 +96272,9 @@ function _defineProperties(target, props) {
|
|
|
95692
96272
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
95693
96273
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
95694
96274
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
96275
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
96276
|
+
writable: false
|
|
96277
|
+
});
|
|
95695
96278
|
return Constructor;
|
|
95696
96279
|
}
|
|
95697
96280
|
// EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/@babel/runtime/helpers/typeof.js
|
|
@@ -95724,12 +96307,15 @@ function _inherits(subClass, superClass) {
|
|
|
95724
96307
|
throw new TypeError("Super expression must either be null or a function");
|
|
95725
96308
|
}
|
|
95726
96309
|
|
|
95727
|
-
|
|
95728
|
-
|
|
95729
|
-
|
|
95730
|
-
|
|
95731
|
-
|
|
95732
|
-
|
|
96310
|
+
Object.defineProperty(subClass, "prototype", {
|
|
96311
|
+
value: Object.create(superClass && superClass.prototype, {
|
|
96312
|
+
constructor: {
|
|
96313
|
+
value: subClass,
|
|
96314
|
+
writable: true,
|
|
96315
|
+
configurable: true
|
|
96316
|
+
}
|
|
96317
|
+
}),
|
|
96318
|
+
writable: false
|
|
95733
96319
|
});
|
|
95734
96320
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
95735
96321
|
}
|
|
@@ -103015,7 +103601,7 @@ exports.f = wellKnownSymbol;
|
|
|
103015
103601
|
// TODO: remove from `core-js@4`
|
|
103016
103602
|
__webpack_require__("/E8B");
|
|
103017
103603
|
|
|
103018
|
-
var parent = __webpack_require__("
|
|
103604
|
+
var parent = __webpack_require__("HR5x");
|
|
103019
103605
|
|
|
103020
103606
|
module.exports = parent;
|
|
103021
103607
|
|