@douyinfe/semi-ui 2.1.4-alpha.0 → 2.2.0-beta.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.scss +1 -0
- package/_base/_story/index.stories.js +3 -1
- package/_utils/index.ts +2 -1
- package/button/Button.tsx +1 -0
- package/button/__test__/button.test.js +15 -0
- package/button/_story/button.stories.js +13 -0
- package/button/buttonGroup.tsx +6 -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 +7 -2
- package/checkbox/__test__/checkboxGroup.test.js +37 -5
- package/checkbox/_story/checkbox.stories.js +78 -6
- package/checkbox/checkbox.tsx +3 -0
- package/checkbox/checkboxGroup.tsx +3 -2
- package/datePicker/__test__/datePicker.test.js +67 -2
- package/datePicker/_story/datePicker.stories.js +3 -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 +105 -32
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +801 -227
- 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/form/_story/form.stories.js +0 -67
- package/form/_story/form.stories.tsx +2 -2
- package/form/hoc/withField.tsx +2 -2
- package/lib/cjs/_base/base.css +2 -2
- package/lib/cjs/_utils/index.d.ts +1 -0
- package/lib/cjs/_utils/index.js +3 -2
- package/lib/cjs/button/Button.d.ts +1 -0
- package/lib/cjs/button/buttonGroup.js +11 -3
- 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 +9 -2
- package/lib/cjs/checkbox/checkbox.js +4 -1
- package/lib/cjs/checkbox/checkboxGroup.d.ts +1 -0
- package/lib/cjs/checkbox/checkboxGroup.js +3 -1
- package/lib/cjs/datePicker/dateInput.d.ts +1 -1
- package/lib/cjs/datePicker/datePicker.d.ts +1 -1
- package/lib/cjs/datePicker/monthsGrid.d.ts +2 -1
- 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/form/baseForm.d.ts +6 -0
- package/lib/cjs/form/field.d.ts +6 -0
- package/lib/cjs/form/hoc/withField.js +3 -1
- package/lib/cjs/locale/source/es.d.ts +7 -0
- package/lib/cjs/locale/source/es.js +168 -0
- package/lib/cjs/modal/Modal.d.ts +8 -8
- package/lib/cjs/modal/Modal.js +4 -4
- package/lib/cjs/modal/confirm.d.ts +10 -10
- package/lib/cjs/navigation/index.d.ts +2 -2
- package/lib/cjs/pagination/index.js +9 -4
- package/lib/cjs/radio/radio.d.ts +1 -1
- package/lib/cjs/radio/radio.js +1 -0
- package/lib/cjs/radio/radioGroup.d.ts +1 -1
- package/lib/cjs/rating/item.js +3 -2
- package/lib/cjs/select/index.d.ts +10 -0
- package/lib/cjs/select/index.js +15 -9
- package/lib/cjs/table/Table.d.ts +1 -1
- package/lib/cjs/timePicker/TimePicker.d.ts +2 -2
- package/lib/cjs/timePicker/TimeShape.d.ts +1 -1
- package/lib/cjs/timePicker/index.d.ts +2 -2
- package/lib/cjs/timeline/item.d.ts +5 -2
- package/lib/cjs/timeline/item.js +13 -7
- package/lib/cjs/tree/treeNode.js +0 -2
- package/lib/cjs/treeSelect/index.js +1 -0
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/cjs/upload/fileCard.d.ts +2 -0
- package/lib/cjs/upload/fileCard.js +70 -45
- package/lib/cjs/upload/index.d.ts +34 -4
- package/lib/cjs/upload/index.js +141 -25
- package/lib/cjs/upload/interface.d.ts +3 -0
- package/lib/es/_base/base.css +2 -2
- package/lib/es/_utils/index.d.ts +1 -0
- package/lib/es/_utils/index.js +3 -2
- package/lib/es/button/Button.d.ts +1 -0
- package/lib/es/button/buttonGroup.js +3 -3
- 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 +9 -2
- package/lib/es/checkbox/checkbox.js +4 -1
- package/lib/es/checkbox/checkboxGroup.d.ts +1 -0
- package/lib/es/checkbox/checkboxGroup.js +3 -1
- package/lib/es/datePicker/dateInput.d.ts +1 -1
- package/lib/es/datePicker/datePicker.d.ts +1 -1
- package/lib/es/datePicker/monthsGrid.d.ts +2 -1
- 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/form/baseForm.d.ts +6 -0
- package/lib/es/form/field.d.ts +6 -0
- package/lib/es/form/hoc/withField.js +3 -1
- package/lib/es/locale/source/es.d.ts +7 -0
- package/lib/es/locale/source/es.js +157 -0
- package/lib/es/modal/Modal.d.ts +8 -8
- package/lib/es/modal/Modal.js +4 -4
- package/lib/es/modal/confirm.d.ts +10 -10
- package/lib/es/navigation/index.d.ts +2 -2
- package/lib/es/pagination/index.js +8 -4
- package/lib/es/radio/radio.d.ts +1 -1
- package/lib/es/radio/radio.js +1 -0
- package/lib/es/radio/radioGroup.d.ts +1 -1
- package/lib/es/rating/item.js +3 -2
- package/lib/es/select/index.d.ts +10 -0
- package/lib/es/select/index.js +19 -9
- package/lib/es/table/Table.d.ts +1 -1
- package/lib/es/timePicker/TimePicker.d.ts +2 -2
- package/lib/es/timePicker/TimeShape.d.ts +1 -1
- package/lib/es/timePicker/index.d.ts +2 -2
- package/lib/es/timeline/item.d.ts +5 -2
- package/lib/es/timeline/item.js +12 -7
- package/lib/es/tree/treeNode.js +0 -2
- package/lib/es/treeSelect/index.js +1 -0
- package/lib/es/typography/title.d.ts +1 -1
- package/lib/es/upload/fileCard.d.ts +2 -0
- package/lib/es/upload/fileCard.js +69 -44
- package/lib/es/upload/index.d.ts +34 -4
- package/lib/es/upload/index.js +141 -24
- package/lib/es/upload/interface.d.ts +3 -0
- package/locale/source/es.ts +160 -0
- package/modal/Modal.tsx +6 -6
- 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/navigation/index.tsx +2 -2
- package/package.json +16 -8
- package/pagination/_story/pagination.stories.js +11 -0
- package/pagination/index.tsx +9 -4
- package/popover/Arrow.tsx +1 -1
- package/radio/__test__/radioGroup.test.jsx +41 -6
- package/radio/_story/radio.stories.js +22 -11
- package/radio/radio.tsx +1 -0
- package/rating/item.tsx +2 -1
- package/select/_story/select.stories.js +39 -14
- package/select/index.tsx +21 -7
- package/table/_story/DynamicFilters/index.js +13 -16
- package/timeline/__test__/timeline.test.js +17 -1
- package/timeline/_story/timeline.stories.js +70 -6
- package/timeline/item.tsx +11 -6
- package/tooltip/_story/tooltip.stories.js +1 -1
- package/tree/_story/tree.stories.js +2 -2
- package/tree/treeNode.tsx +0 -2
- package/treeSelect/index.tsx +3 -2
- package/tsconfig.json +2 -1
- package/upload/__test__/upload.test.js +50 -1
- package/upload/fileCard.tsx +110 -95
- package/upload/index.tsx +155 -54
- 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;
|
|
@@ -11339,7 +11339,7 @@ var store = __webpack_require__("yULr");
|
|
|
11339
11339
|
(module.exports = function (key, value) {
|
|
11340
11340
|
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
11341
11341
|
})('versions', []).push({
|
|
11342
|
-
version: '3.19.
|
|
11342
|
+
version: '3.19.3',
|
|
11343
11343
|
mode: IS_PURE ? 'pure' : 'global',
|
|
11344
11344
|
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
|
|
11345
11345
|
});
|
|
@@ -12661,25 +12661,14 @@ module.exports = Symbol;
|
|
|
12661
12661
|
function _typeof(obj) {
|
|
12662
12662
|
"@babel/helpers - typeof";
|
|
12663
12663
|
|
|
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);
|
|
12664
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
12665
|
+
return typeof obj;
|
|
12666
|
+
} : function (obj) {
|
|
12667
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
12668
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
12679
12669
|
}
|
|
12680
12670
|
|
|
12681
|
-
module.exports = _typeof;
|
|
12682
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
12671
|
+
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
12683
12672
|
|
|
12684
12673
|
/***/ }),
|
|
12685
12674
|
|
|
@@ -13763,7 +13752,7 @@ const getHighLightTextHTML = _ref => {
|
|
|
13763
13752
|
const markEle = option.highlightTag || 'mark';
|
|
13764
13753
|
const highlightClassName = option.highlightClassName || '';
|
|
13765
13754
|
const highlightStyle = option.highlightStyle || {};
|
|
13766
|
-
return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(chunks).call(chunks, chunk => {
|
|
13755
|
+
return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(chunks).call(chunks, (chunk, index) => {
|
|
13767
13756
|
const {
|
|
13768
13757
|
end,
|
|
13769
13758
|
start,
|
|
@@ -13774,7 +13763,8 @@ const getHighLightTextHTML = _ref => {
|
|
|
13774
13763
|
if (highlight) {
|
|
13775
13764
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(markEle, {
|
|
13776
13765
|
style: highlightStyle,
|
|
13777
|
-
className: highlightClassName
|
|
13766
|
+
className: highlightClassName,
|
|
13767
|
+
key: text + index
|
|
13778
13768
|
}, text);
|
|
13779
13769
|
} else {
|
|
13780
13770
|
return text;
|
|
@@ -18798,7 +18788,7 @@ var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params
|
|
|
18798
18788
|
if (!step.done) {
|
|
18799
18789
|
step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
|
|
18800
18790
|
} return step;
|
|
18801
|
-
});
|
|
18791
|
+
}, true);
|
|
18802
18792
|
|
|
18803
18793
|
var URLSearchParamsState = function (init) {
|
|
18804
18794
|
this.entries = [];
|
|
@@ -19183,7 +19173,7 @@ var V8_VERSION = __webpack_require__("Qb90");
|
|
|
19183
19173
|
var SPECIES = wellKnownSymbol('species');
|
|
19184
19174
|
var PROMISE = 'Promise';
|
|
19185
19175
|
|
|
19186
|
-
var getInternalState = InternalStateModule.
|
|
19176
|
+
var getInternalState = InternalStateModule.getterFor(PROMISE);
|
|
19187
19177
|
var setInternalState = InternalStateModule.set;
|
|
19188
19178
|
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
|
|
19189
19179
|
var NativePromisePrototype = NativePromise && NativePromise.prototype;
|
|
@@ -27398,20 +27388,6 @@ function requiredArgs(required, args) {
|
|
|
27398
27388
|
throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
|
|
27399
27389
|
}
|
|
27400
27390
|
}
|
|
27401
|
-
// CONCATENATED MODULE: /Users/daiqiang/Project/semi-design/node_modules/date-fns/esm/_lib/toInteger/index.js
|
|
27402
|
-
function toInteger(dirtyNumber) {
|
|
27403
|
-
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
27404
|
-
return NaN;
|
|
27405
|
-
}
|
|
27406
|
-
|
|
27407
|
-
var number = Number(dirtyNumber);
|
|
27408
|
-
|
|
27409
|
-
if (isNaN(number)) {
|
|
27410
|
-
return number;
|
|
27411
|
-
}
|
|
27412
|
-
|
|
27413
|
-
return number < 0 ? Math.ceil(number) : Math.floor(number);
|
|
27414
|
-
}
|
|
27415
27391
|
// CONCATENATED MODULE: /Users/daiqiang/Project/semi-design/node_modules/date-fns/esm/toDate/index.js
|
|
27416
27392
|
|
|
27417
27393
|
/**
|
|
@@ -27465,6 +27441,20 @@ function toDate(argument) {
|
|
|
27465
27441
|
return new Date(NaN);
|
|
27466
27442
|
}
|
|
27467
27443
|
}
|
|
27444
|
+
// CONCATENATED MODULE: /Users/daiqiang/Project/semi-design/node_modules/date-fns/esm/_lib/toInteger/index.js
|
|
27445
|
+
function toInteger(dirtyNumber) {
|
|
27446
|
+
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
27447
|
+
return NaN;
|
|
27448
|
+
}
|
|
27449
|
+
|
|
27450
|
+
var number = Number(dirtyNumber);
|
|
27451
|
+
|
|
27452
|
+
if (isNaN(number)) {
|
|
27453
|
+
return number;
|
|
27454
|
+
}
|
|
27455
|
+
|
|
27456
|
+
return number < 0 ? Math.ceil(number) : Math.floor(number);
|
|
27457
|
+
}
|
|
27468
27458
|
// CONCATENATED MODULE: /Users/daiqiang/Project/semi-design/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js
|
|
27469
27459
|
|
|
27470
27460
|
|
|
@@ -27552,7 +27542,7 @@ function buildLocalizeFn(args) {
|
|
|
27552
27542
|
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
27553
27543
|
}
|
|
27554
27544
|
|
|
27555
|
-
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I
|
|
27545
|
+
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
|
|
27556
27546
|
|
|
27557
27547
|
return valuesArray[index];
|
|
27558
27548
|
};
|
|
@@ -27566,8 +27556,8 @@ var eraValues = {
|
|
|
27566
27556
|
};
|
|
27567
27557
|
var quarterValues = {
|
|
27568
27558
|
narrow: ['1', '2', '3', '4'],
|
|
27569
|
-
abbreviated: ['
|
|
27570
|
-
wide: ['
|
|
27559
|
+
abbreviated: ['第一季', '第二季', '第三季', '第四季'],
|
|
27560
|
+
wide: ['第一季度', '第二季度', '第三季度', '第四季度']
|
|
27571
27561
|
};
|
|
27572
27562
|
var monthValues = {
|
|
27573
27563
|
narrow: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二'],
|
|
@@ -28594,6 +28584,64 @@ function IconCopy_SvgComponent(props) {
|
|
|
28594
28584
|
|
|
28595
28585
|
const IconCopy_IconComponent = convertIcon(IconCopy_SvgComponent, 'copy');
|
|
28596
28586
|
/* harmony default export */ var IconCopy = (IconCopy_IconComponent);
|
|
28587
|
+
// CONCATENATED MODULE: ../semi-icons/lib/es/icons/IconDoubleChevronLeft.js
|
|
28588
|
+
|
|
28589
|
+
|
|
28590
|
+
|
|
28591
|
+
|
|
28592
|
+
function IconDoubleChevronLeft_SvgComponent(props) {
|
|
28593
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("svg", assign_default()({
|
|
28594
|
+
viewBox: "0 0 24 24",
|
|
28595
|
+
fill: "none",
|
|
28596
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28597
|
+
width: "1em",
|
|
28598
|
+
height: "1em",
|
|
28599
|
+
focusable: false,
|
|
28600
|
+
"aria-hidden": true
|
|
28601
|
+
}, props), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("path", {
|
|
28602
|
+
fillRule: "evenodd",
|
|
28603
|
+
clipRule: "evenodd",
|
|
28604
|
+
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",
|
|
28605
|
+
fill: "currentColor"
|
|
28606
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("path", {
|
|
28607
|
+
fillRule: "evenodd",
|
|
28608
|
+
clipRule: "evenodd",
|
|
28609
|
+
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",
|
|
28610
|
+
fill: "currentColor"
|
|
28611
|
+
}));
|
|
28612
|
+
}
|
|
28613
|
+
|
|
28614
|
+
const IconDoubleChevronLeft_IconComponent = convertIcon(IconDoubleChevronLeft_SvgComponent, 'double_chevron_left');
|
|
28615
|
+
/* harmony default export */ var IconDoubleChevronLeft = (IconDoubleChevronLeft_IconComponent);
|
|
28616
|
+
// CONCATENATED MODULE: ../semi-icons/lib/es/icons/IconDoubleChevronRight.js
|
|
28617
|
+
|
|
28618
|
+
|
|
28619
|
+
|
|
28620
|
+
|
|
28621
|
+
function IconDoubleChevronRight_SvgComponent(props) {
|
|
28622
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("svg", assign_default()({
|
|
28623
|
+
viewBox: "0 0 24 24",
|
|
28624
|
+
fill: "none",
|
|
28625
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28626
|
+
width: "1em",
|
|
28627
|
+
height: "1em",
|
|
28628
|
+
focusable: false,
|
|
28629
|
+
"aria-hidden": true
|
|
28630
|
+
}, props), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("path", {
|
|
28631
|
+
fillRule: "evenodd",
|
|
28632
|
+
clipRule: "evenodd",
|
|
28633
|
+
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",
|
|
28634
|
+
fill: "currentColor"
|
|
28635
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("path", {
|
|
28636
|
+
fillRule: "evenodd",
|
|
28637
|
+
clipRule: "evenodd",
|
|
28638
|
+
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",
|
|
28639
|
+
fill: "currentColor"
|
|
28640
|
+
}));
|
|
28641
|
+
}
|
|
28642
|
+
|
|
28643
|
+
const IconDoubleChevronRight_IconComponent = convertIcon(IconDoubleChevronRight_SvgComponent, 'double_chevron_right');
|
|
28644
|
+
/* harmony default export */ var IconDoubleChevronRight = (IconDoubleChevronRight_IconComponent);
|
|
28597
28645
|
// CONCATENATED MODULE: ../semi-icons/lib/es/icons/IconEyeClosedSolid.js
|
|
28598
28646
|
|
|
28599
28647
|
|
|
@@ -29521,6 +29569,8 @@ const IconUpload_IconComponent = convertIcon(IconUpload_SvgComponent, 'upload');
|
|
|
29521
29569
|
|
|
29522
29570
|
|
|
29523
29571
|
|
|
29572
|
+
|
|
29573
|
+
|
|
29524
29574
|
|
|
29525
29575
|
|
|
29526
29576
|
|
|
@@ -36029,13 +36079,13 @@ class buttonGroup_ButtonGroup extends baseComponent_BaseComponent {
|
|
|
36029
36079
|
if (children) {
|
|
36030
36080
|
var _context;
|
|
36031
36081
|
|
|
36032
|
-
inner = map_default()(_context = is_array_default()(children) ? children : [children]).call(_context, (itm, index) => /*#__PURE__*/
|
|
36082
|
+
inner = map_default()(_context = is_array_default()(children) ? children : [children]).call(_context, (itm, index) => /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(itm) ? /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["cloneElement"])(itm, assign_default()(assign_default()(assign_default()({
|
|
36033
36083
|
disabled,
|
|
36034
36084
|
size,
|
|
36035
36085
|
type
|
|
36036
36086
|
}, itm.props), rest), {
|
|
36037
36087
|
key: index
|
|
36038
|
-
})));
|
|
36088
|
+
})) : itm);
|
|
36039
36089
|
}
|
|
36040
36090
|
|
|
36041
36091
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
@@ -36923,7 +36973,7 @@ function getUTCISOWeek(dirtyDate) {
|
|
|
36923
36973
|
|
|
36924
36974
|
function getUTCWeekYear(dirtyDate, dirtyOptions) {
|
|
36925
36975
|
requiredArgs(1, arguments);
|
|
36926
|
-
var date = toDate(dirtyDate
|
|
36976
|
+
var date = toDate(dirtyDate);
|
|
36927
36977
|
var year = date.getUTCFullYear();
|
|
36928
36978
|
var options = dirtyOptions || {};
|
|
36929
36979
|
var locale = options.locale;
|
|
@@ -37824,7 +37874,7 @@ var formatters_formatters = {
|
|
|
37824
37874
|
}
|
|
37825
37875
|
};
|
|
37826
37876
|
|
|
37827
|
-
function formatTimezoneShort(offset,
|
|
37877
|
+
function formatTimezoneShort(offset, delimiter) {
|
|
37828
37878
|
var sign = offset > 0 ? '-' : '+';
|
|
37829
37879
|
var absOffset = Math.abs(offset);
|
|
37830
37880
|
var hours = Math.floor(absOffset / 60);
|
|
@@ -37834,7 +37884,6 @@ function formatTimezoneShort(offset, dirtyDelimiter) {
|
|
|
37834
37884
|
return sign + String(hours);
|
|
37835
37885
|
}
|
|
37836
37886
|
|
|
37837
|
-
var delimiter = dirtyDelimiter || '';
|
|
37838
37887
|
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
37839
37888
|
}
|
|
37840
37889
|
|
|
@@ -37909,7 +37958,7 @@ function timeLongFormatter(pattern, formatLong) {
|
|
|
37909
37958
|
}
|
|
37910
37959
|
|
|
37911
37960
|
function dateTimeLongFormatter(pattern, formatLong) {
|
|
37912
|
-
var matchResult = pattern.match(/(P+)(p+)?/);
|
|
37961
|
+
var matchResult = pattern.match(/(P+)(p+)?/) || [];
|
|
37913
37962
|
var datePattern = matchResult[1];
|
|
37914
37963
|
var timePattern = matchResult[2];
|
|
37915
37964
|
|
|
@@ -38861,6 +38910,11 @@ function isAfter(dirtyDate, dirtyDateToCompare) {
|
|
|
38861
38910
|
* // Are 2 September 2014 and 25 September 2014 in the same month?
|
|
38862
38911
|
* var result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))
|
|
38863
38912
|
* //=> true
|
|
38913
|
+
*
|
|
38914
|
+
* @example
|
|
38915
|
+
* // Are 2 September 2014 and 25 September 2015 in the same month?
|
|
38916
|
+
* var result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))
|
|
38917
|
+
* //=> false
|
|
38864
38918
|
*/
|
|
38865
38919
|
|
|
38866
38920
|
function isSameMonth_isSameMonth(dirtyDateLeft, dirtyDateRight) {
|
|
@@ -42592,6 +42646,10 @@ cardGroup_CardGroup.defaultProps = {
|
|
|
42592
42646
|
spacing: 16
|
|
42593
42647
|
};
|
|
42594
42648
|
/* harmony default export */ var cardGroup = (cardGroup_CardGroup);
|
|
42649
|
+
// EXTERNAL MODULE: /Users/daiqiang/Project/semi-design/node_modules/lodash/flatten.js
|
|
42650
|
+
var lodash_flatten = __webpack_require__("1xil");
|
|
42651
|
+
var flatten_default = /*#__PURE__*/__webpack_require__.n(lodash_flatten);
|
|
42652
|
+
|
|
42595
42653
|
// EXTERNAL MODULE: /Users/daiqiang/Project/semi-design/node_modules/@babel/runtime-corejs3/core-js-stable/promise.js
|
|
42596
42654
|
var promise = __webpack_require__("kNzS");
|
|
42597
42655
|
var promise_default = /*#__PURE__*/__webpack_require__.n(promise);
|
|
@@ -42653,7 +42711,6 @@ var object_entries_default = /*#__PURE__*/__webpack_require__.n(object_entries);
|
|
|
42653
42711
|
|
|
42654
42712
|
|
|
42655
42713
|
|
|
42656
|
-
|
|
42657
42714
|
|
|
42658
42715
|
|
|
42659
42716
|
const DRAG_OFFSET = 0.45;
|
|
@@ -43133,7 +43190,7 @@ function normalizedArr(val) {
|
|
|
43133
43190
|
}
|
|
43134
43191
|
function normalizeKeyList(keyList, keyEntities) {
|
|
43135
43192
|
let leafOnly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
43136
|
-
|
|
43193
|
+
const res = [];
|
|
43137
43194
|
const keyListSet = new set_default.a(keyList);
|
|
43138
43195
|
|
|
43139
43196
|
if (!leafOnly) {
|
|
@@ -43153,9 +43210,11 @@ function normalizeKeyList(keyList, keyEntities) {
|
|
|
43153
43210
|
res.push(key);
|
|
43154
43211
|
});
|
|
43155
43212
|
} else {
|
|
43156
|
-
|
|
43157
|
-
|
|
43158
|
-
|
|
43213
|
+
for_each_default()(keyList).call(keyList, key => {
|
|
43214
|
+
if (keyEntities[key] && !treeUtil_isValid(keyEntities[key].children)) {
|
|
43215
|
+
res.push(key);
|
|
43216
|
+
}
|
|
43217
|
+
});
|
|
43159
43218
|
}
|
|
43160
43219
|
|
|
43161
43220
|
return res;
|
|
@@ -43164,9 +43223,9 @@ function getMotionKeys(eventKey, expandedKeys, keyEntities) {
|
|
|
43164
43223
|
const res = [];
|
|
43165
43224
|
|
|
43166
43225
|
const getChild = itemKey => {
|
|
43167
|
-
var
|
|
43226
|
+
var _context8;
|
|
43168
43227
|
|
|
43169
|
-
keyEntities[itemKey].children && for_each_default()(
|
|
43228
|
+
keyEntities[itemKey].children && for_each_default()(_context8 = keyEntities[itemKey].children).call(_context8, item => {
|
|
43170
43229
|
const {
|
|
43171
43230
|
key
|
|
43172
43231
|
} = item;
|
|
@@ -43282,7 +43341,7 @@ function calcCheckedKeysForUnchecked(key, keyEntities, checkedKeys, halfCheckedK
|
|
|
43282
43341
|
};
|
|
43283
43342
|
}
|
|
43284
43343
|
function filterTreeData(info) {
|
|
43285
|
-
var
|
|
43344
|
+
var _context9, _context10;
|
|
43286
43345
|
|
|
43287
43346
|
const {
|
|
43288
43347
|
showFilteredOnly,
|
|
@@ -43294,7 +43353,7 @@ function filterTreeData(info) {
|
|
|
43294
43353
|
prevExpandedKeys
|
|
43295
43354
|
} = info;
|
|
43296
43355
|
let filteredOptsKeys = [];
|
|
43297
|
-
filteredOptsKeys = map_default()(
|
|
43356
|
+
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);
|
|
43298
43357
|
let expandedOptsKeys = findAncestorKeys(filteredOptsKeys, keyEntities, false);
|
|
43299
43358
|
|
|
43300
43359
|
if (prevExpandedKeys.length) {
|
|
@@ -43335,9 +43394,9 @@ function updateKeys(keySet, keyEntities) {
|
|
|
43335
43394
|
return filter_default()(keyArr).call(keyArr, key => key in keyEntities);
|
|
43336
43395
|
}
|
|
43337
43396
|
function calcDisabledKeys(keyEntities) {
|
|
43338
|
-
var
|
|
43397
|
+
var _context11;
|
|
43339
43398
|
|
|
43340
|
-
const disabledKeys = filter_default()(
|
|
43399
|
+
const disabledKeys = filter_default()(_context11 = keys_default()(keyEntities)).call(_context11, key => keyEntities[key].data.disabled);
|
|
43341
43400
|
|
|
43342
43401
|
const {
|
|
43343
43402
|
checkedKeys
|
|
@@ -43372,6 +43431,27 @@ function calcDropActualPosition(pos, relativeDropPos) {
|
|
|
43372
43431
|
|
|
43373
43432
|
return relativeDropPos + Number(posArr[posArr.length - 1]);
|
|
43374
43433
|
}
|
|
43434
|
+
// CONCATENATED MODULE: ../semi-foundation/cascader/constants.ts
|
|
43435
|
+
|
|
43436
|
+
const cascader_constants_cssClasses = {
|
|
43437
|
+
PREFIX: "".concat(BASE_CLASS_PREFIX, "-cascader"),
|
|
43438
|
+
PREFIX_OPTION: "".concat(BASE_CLASS_PREFIX, "-cascader-option")
|
|
43439
|
+
};
|
|
43440
|
+
const cascader_constants_strings = {
|
|
43441
|
+
SIZE_SET: ['small', 'large', 'default'],
|
|
43442
|
+
VALIDATE_STATUS: ['default', 'error', 'warning'],
|
|
43443
|
+
IS_KEY: 'isKey',
|
|
43444
|
+
IS_VALUE: 'isValue',
|
|
43445
|
+
SHOW_NEXT_BY_CLICK: 'click',
|
|
43446
|
+
SHOW_NEXT_BY_HOVER: 'hover',
|
|
43447
|
+
|
|
43448
|
+
/* Merge Type */
|
|
43449
|
+
LEAF_ONLY_MERGE_TYPE: 'leafOnly',
|
|
43450
|
+
AUTO_MERGE_VALUE_MERGE_TYPE: 'autoMergeValue',
|
|
43451
|
+
NONE_MERGE_TYPE: 'none'
|
|
43452
|
+
};
|
|
43453
|
+
const cascader_constants_numbers = {};
|
|
43454
|
+
|
|
43375
43455
|
// CONCATENATED MODULE: ../semi-foundation/cascader/util.ts
|
|
43376
43456
|
|
|
43377
43457
|
|
|
@@ -43384,6 +43464,7 @@ function calcDropActualPosition(pos, relativeDropPos) {
|
|
|
43384
43464
|
|
|
43385
43465
|
|
|
43386
43466
|
|
|
43467
|
+
|
|
43387
43468
|
function util_getPosition(level, index) {
|
|
43388
43469
|
var _context;
|
|
43389
43470
|
|
|
@@ -43464,6 +43545,19 @@ function util_findKeysForValues(value, keyEntities) {
|
|
|
43464
43545
|
|
|
43465
43546
|
return res;
|
|
43466
43547
|
}
|
|
43548
|
+
function calcMergeType(autoMergeValue, leafOnly) {
|
|
43549
|
+
let mergeType;
|
|
43550
|
+
|
|
43551
|
+
if (leafOnly) {
|
|
43552
|
+
mergeType = cascader_constants_strings.LEAF_ONLY_MERGE_TYPE;
|
|
43553
|
+
} else if (autoMergeValue) {
|
|
43554
|
+
mergeType = cascader_constants_strings.AUTO_MERGE_VALUE_MERGE_TYPE;
|
|
43555
|
+
} else {
|
|
43556
|
+
mergeType = cascader_constants_strings.NONE_MERGE_TYPE;
|
|
43557
|
+
}
|
|
43558
|
+
|
|
43559
|
+
return mergeType;
|
|
43560
|
+
}
|
|
43467
43561
|
// CONCATENATED MODULE: ../semi-foundation/cascader/foundation.ts
|
|
43468
43562
|
|
|
43469
43563
|
|
|
@@ -43487,6 +43581,7 @@ function util_findKeysForValues(value, keyEntities) {
|
|
|
43487
43581
|
|
|
43488
43582
|
|
|
43489
43583
|
|
|
43584
|
+
|
|
43490
43585
|
|
|
43491
43586
|
|
|
43492
43587
|
// eslint-disable-next-line max-len
|
|
@@ -44002,10 +44097,12 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44002
44097
|
}
|
|
44003
44098
|
|
|
44004
44099
|
_defaultRenderText(path, displayRender) {
|
|
44100
|
+
const separator = this.getProp('separator');
|
|
44101
|
+
|
|
44005
44102
|
if (displayRender && typeof displayRender === 'function') {
|
|
44006
44103
|
return displayRender(path);
|
|
44007
44104
|
} else {
|
|
44008
|
-
return path.join(
|
|
44105
|
+
return path.join(separator);
|
|
44009
44106
|
}
|
|
44010
44107
|
}
|
|
44011
44108
|
|
|
@@ -44079,7 +44176,8 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44079
44176
|
const {
|
|
44080
44177
|
changeOnSelect: allowChange,
|
|
44081
44178
|
filterLeafOnly,
|
|
44082
|
-
multiple
|
|
44179
|
+
multiple,
|
|
44180
|
+
enableLeafClick
|
|
44083
44181
|
} = this.getProps();
|
|
44084
44182
|
const {
|
|
44085
44183
|
keyEntities,
|
|
@@ -44113,6 +44211,10 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44113
44211
|
this._adapter.updateStates({
|
|
44114
44212
|
activeKeys: new set_default.a(activeKeys)
|
|
44115
44213
|
});
|
|
44214
|
+
|
|
44215
|
+
if (isLeaf && enableLeafClick) {
|
|
44216
|
+
this.onItemCheckboxClick(item);
|
|
44217
|
+
}
|
|
44116
44218
|
} else {
|
|
44117
44219
|
this._adapter.notifySelect(data.value);
|
|
44118
44220
|
|
|
@@ -44162,12 +44264,13 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44162
44264
|
const {
|
|
44163
44265
|
checkedKeys,
|
|
44164
44266
|
keyEntities,
|
|
44165
|
-
|
|
44267
|
+
resolvedCheckedKeys
|
|
44166
44268
|
} = this.getStates();
|
|
44167
44269
|
const {
|
|
44168
44270
|
autoMergeValue,
|
|
44169
44271
|
max,
|
|
44170
|
-
disableStrictly
|
|
44272
|
+
disableStrictly,
|
|
44273
|
+
leafOnly
|
|
44171
44274
|
} = this.getProps(); // prev checked status
|
|
44172
44275
|
|
|
44173
44276
|
const prevCheckedStatus = checkedKeys.has(key); // next checked status
|
|
@@ -44178,16 +44281,19 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44178
44281
|
checkedKeys: curCheckedKeys,
|
|
44179
44282
|
halfCheckedKeys: curHalfCheckedKeys
|
|
44180
44283
|
} = disableStrictly ? this.calcNonDisabedCheckedKeys(key, curCheckedStatus) : this.calcCheckedKeys(key, curCheckedStatus);
|
|
44181
|
-
const
|
|
44182
|
-
const
|
|
44284
|
+
const mergeType = calcMergeType(autoMergeValue, leafOnly);
|
|
44285
|
+
const isLeafOnlyMerge = mergeType === cascader_constants_strings.LEAF_ONLY_MERGE_TYPE;
|
|
44286
|
+
const isNoneMerge = mergeType === cascader_constants_strings.NONE_MERGE_TYPE;
|
|
44287
|
+
const curResolvedCheckedKeys = new set_default.a(normalizeKeyList(curCheckedKeys, keyEntities, isLeafOnlyMerge));
|
|
44288
|
+
const curRealCheckedKeys = isNoneMerge ? curCheckedKeys : curResolvedCheckedKeys;
|
|
44183
44289
|
|
|
44184
44290
|
if (isNumber_default()(max)) {
|
|
44185
|
-
if (
|
|
44291
|
+
if (!isNoneMerge) {
|
|
44186
44292
|
// When it exceeds max, the quantity is allowed to be reduced, and no further increase is allowed
|
|
44187
|
-
if (
|
|
44293
|
+
if (resolvedCheckedKeys.size < curResolvedCheckedKeys.size && curResolvedCheckedKeys.size > max) {
|
|
44188
44294
|
const checkedEntities = [];
|
|
44189
44295
|
|
|
44190
|
-
for_each_default()(
|
|
44296
|
+
for_each_default()(curResolvedCheckedKeys).call(curResolvedCheckedKeys, itemKey => {
|
|
44191
44297
|
checkedEntities.push(keyEntities[itemKey]);
|
|
44192
44298
|
});
|
|
44193
44299
|
|
|
@@ -44215,7 +44321,7 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44215
44321
|
this._adapter.updateStates({
|
|
44216
44322
|
checkedKeys: curCheckedKeys,
|
|
44217
44323
|
halfCheckedKeys: curHalfCheckedKeys,
|
|
44218
|
-
|
|
44324
|
+
resolvedCheckedKeys: curResolvedCheckedKeys
|
|
44219
44325
|
});
|
|
44220
44326
|
} // The click event during multiple selection will definitely cause the checked state of node to change,
|
|
44221
44327
|
// so there is no need to judge the value to change.
|
|
@@ -44378,7 +44484,7 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44378
44484
|
newState.halfCheckedKeys = new set_default.a([]);
|
|
44379
44485
|
newState.selectedKeys = new set_default.a([]);
|
|
44380
44486
|
newState.activeKeys = new set_default.a([]);
|
|
44381
|
-
newState.
|
|
44487
|
+
newState.resolvedCheckedKeys = new set_default.a([]);
|
|
44382
44488
|
|
|
44383
44489
|
this._adapter.notifyChange([]);
|
|
44384
44490
|
} else {
|
|
@@ -44503,22 +44609,6 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44503
44609
|
}
|
|
44504
44610
|
|
|
44505
44611
|
}
|
|
44506
|
-
// CONCATENATED MODULE: ../semi-foundation/cascader/constants.ts
|
|
44507
|
-
|
|
44508
|
-
const cascader_constants_cssClasses = {
|
|
44509
|
-
PREFIX: "".concat(BASE_CLASS_PREFIX, "-cascader"),
|
|
44510
|
-
PREFIX_OPTION: "".concat(BASE_CLASS_PREFIX, "-cascader-option")
|
|
44511
|
-
};
|
|
44512
|
-
const cascader_constants_strings = {
|
|
44513
|
-
SIZE_SET: ['small', 'large', 'default'],
|
|
44514
|
-
VALIDATE_STATUS: ['default', 'error', 'warning'],
|
|
44515
|
-
IS_KEY: 'isKey',
|
|
44516
|
-
IS_VALUE: 'isValue',
|
|
44517
|
-
SHOW_NEXT_BY_CLICK: 'click',
|
|
44518
|
-
SHOW_NEXT_BY_HOVER: 'hover'
|
|
44519
|
-
};
|
|
44520
|
-
const cascader_constants_numbers = {};
|
|
44521
|
-
|
|
44522
44612
|
// EXTERNAL MODULE: ../semi-foundation/cascader/cascader.scss
|
|
44523
44613
|
var cascader = __webpack_require__("7u0x");
|
|
44524
44614
|
|
|
@@ -44579,6 +44669,13 @@ class checkboxFoundation_CheckboxFoundation extends foundation {
|
|
|
44579
44669
|
},
|
|
44580
44670
|
preventDefault: () => {
|
|
44581
44671
|
e.preventDefault();
|
|
44672
|
+
},
|
|
44673
|
+
nativeEvent: {
|
|
44674
|
+
stopImmediatePropagation: () => {
|
|
44675
|
+
if (e.nativeEvent && typeof e.nativeEvent.stopImmediatePropagation === 'function') {
|
|
44676
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
44677
|
+
}
|
|
44678
|
+
}
|
|
44582
44679
|
}
|
|
44583
44680
|
};
|
|
44584
44681
|
return cbValue;
|
|
@@ -44813,7 +44910,8 @@ class checkbox_Checkbox extends baseComponent_BaseComponent {
|
|
|
44813
44910
|
onMouseEnter,
|
|
44814
44911
|
onMouseLeave,
|
|
44815
44912
|
extra,
|
|
44816
|
-
value
|
|
44913
|
+
value,
|
|
44914
|
+
id
|
|
44817
44915
|
} = this.props;
|
|
44818
44916
|
const {
|
|
44819
44917
|
checked
|
|
@@ -44854,6 +44952,7 @@ class checkbox_Checkbox extends baseComponent_BaseComponent {
|
|
|
44854
44952
|
["".concat(prefix, "-cardType_disabled")]: props.disabled && props.isCardType,
|
|
44855
44953
|
["".concat(prefix, "-cardType_unDisabled")]: !(props.disabled && props.isCardType),
|
|
44856
44954
|
["".concat(prefix, "-cardType_checked")]: props.isCardType && props.checked && !props.disabled,
|
|
44955
|
+
["".concat(prefix, "-cardType_checked_disabled")]: props.isCardType && props.checked && props.disabled,
|
|
44857
44956
|
[className]: Boolean(className)
|
|
44858
44957
|
});
|
|
44859
44958
|
const extraCls = classnames_default()("".concat(prefix, "-extra"), {
|
|
@@ -44870,6 +44969,7 @@ class checkbox_Checkbox extends baseComponent_BaseComponent {
|
|
|
44870
44969
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
44871
44970
|
style: style,
|
|
44872
44971
|
className: wrapper,
|
|
44972
|
+
id: id,
|
|
44873
44973
|
onMouseEnter: onMouseEnter,
|
|
44874
44974
|
onMouseLeave: onMouseLeave,
|
|
44875
44975
|
onClick: this.handleChange
|
|
@@ -45069,6 +45169,7 @@ class checkboxGroup_CheckboxGroup extends baseComponent_BaseComponent {
|
|
|
45069
45169
|
prefixCls,
|
|
45070
45170
|
direction,
|
|
45071
45171
|
className,
|
|
45172
|
+
id,
|
|
45072
45173
|
style,
|
|
45073
45174
|
type
|
|
45074
45175
|
} = this.props;
|
|
@@ -45120,7 +45221,8 @@ class checkboxGroup_CheckboxGroup extends baseComponent_BaseComponent {
|
|
|
45120
45221
|
|
|
45121
45222
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
45122
45223
|
className: prefixClsDisplay,
|
|
45123
|
-
style: style
|
|
45224
|
+
style: style,
|
|
45225
|
+
id: id
|
|
45124
45226
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(Context.Provider, {
|
|
45125
45227
|
value: {
|
|
45126
45228
|
checkboxGroup: {
|
|
@@ -45222,6 +45324,11 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
45222
45324
|
} = this.props; // Prevent Checkbox's click event bubbling to trigger the li click event
|
|
45223
45325
|
|
|
45224
45326
|
e.stopPropagation();
|
|
45327
|
+
|
|
45328
|
+
if (e.nativeEvent && typeof e.nativeEvent.stopImmediatePropagation === 'function') {
|
|
45329
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
45330
|
+
}
|
|
45331
|
+
|
|
45225
45332
|
onItemCheckboxClick(item);
|
|
45226
45333
|
};
|
|
45227
45334
|
|
|
@@ -45285,7 +45392,8 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
45285
45392
|
this.highlight = searchText => {
|
|
45286
45393
|
const content = [];
|
|
45287
45394
|
const {
|
|
45288
|
-
keyword
|
|
45395
|
+
keyword,
|
|
45396
|
+
separator
|
|
45289
45397
|
} = this.props;
|
|
45290
45398
|
|
|
45291
45399
|
for_each_default()(searchText).call(searchText, (item, idx) => {
|
|
@@ -45309,7 +45417,7 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
45309
45417
|
}
|
|
45310
45418
|
|
|
45311
45419
|
if (idx !== searchText.length - 1) {
|
|
45312
|
-
content.push(
|
|
45420
|
+
content.push(separator);
|
|
45313
45421
|
}
|
|
45314
45422
|
});
|
|
45315
45423
|
|
|
@@ -45481,6 +45589,7 @@ item_Item.propTypes = {
|
|
|
45481
45589
|
checkedKeys: prop_types_default.a.object,
|
|
45482
45590
|
halfCheckedKeys: prop_types_default.a.object,
|
|
45483
45591
|
onItemCheckboxClick: prop_types_default.a.func,
|
|
45592
|
+
separator: prop_types_default.a.string,
|
|
45484
45593
|
keyword: prop_types_default.a.string
|
|
45485
45594
|
};
|
|
45486
45595
|
item_Item.defaultProps = {
|
|
@@ -46390,6 +46499,7 @@ tagInput_TagInput.defaultProps = {
|
|
|
46390
46499
|
|
|
46391
46500
|
|
|
46392
46501
|
|
|
46502
|
+
|
|
46393
46503
|
|
|
46394
46504
|
|
|
46395
46505
|
const cascader_prefixcls = cascader_constants_cssClasses.PREFIX;
|
|
@@ -46483,6 +46593,7 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
46483
46593
|
dropdownStyle,
|
|
46484
46594
|
loadData,
|
|
46485
46595
|
emptyContent,
|
|
46596
|
+
separator,
|
|
46486
46597
|
topSlot,
|
|
46487
46598
|
bottomSlot,
|
|
46488
46599
|
showNext,
|
|
@@ -46498,6 +46609,7 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
46498
46609
|
}, topSlot, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(item_Item, {
|
|
46499
46610
|
activeKeys: activeKeys,
|
|
46500
46611
|
selectedKeys: selectedKeys,
|
|
46612
|
+
separator: separator,
|
|
46501
46613
|
loadedKeys: loadedKeys,
|
|
46502
46614
|
loadingKeys: loadingKeys,
|
|
46503
46615
|
onItemClick: this.handleItemClick,
|
|
@@ -46547,9 +46659,9 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
46547
46659
|
} = this.props;
|
|
46548
46660
|
const {
|
|
46549
46661
|
checkedKeys,
|
|
46550
|
-
|
|
46662
|
+
resolvedCheckedKeys
|
|
46551
46663
|
} = this.state;
|
|
46552
|
-
const realKeys =
|
|
46664
|
+
const realKeys = this.mergeType === cascader_constants_strings.NONE_MERGE_TYPE ? checkedKeys : resolvedCheckedKeys;
|
|
46553
46665
|
const displayTag = [];
|
|
46554
46666
|
const hiddenTag = [];
|
|
46555
46667
|
|
|
@@ -46639,20 +46751,23 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
46639
46751
|
const {
|
|
46640
46752
|
disabled,
|
|
46641
46753
|
triggerRender,
|
|
46642
|
-
multiple
|
|
46643
|
-
autoMergeValue
|
|
46754
|
+
multiple
|
|
46644
46755
|
} = this.props;
|
|
46645
46756
|
const {
|
|
46646
46757
|
selectedKeys,
|
|
46647
46758
|
inputValue,
|
|
46648
46759
|
inputPlaceHolder,
|
|
46649
|
-
|
|
46760
|
+
resolvedCheckedKeys,
|
|
46650
46761
|
checkedKeys
|
|
46651
46762
|
} = this.state;
|
|
46652
46763
|
let realValue;
|
|
46653
46764
|
|
|
46654
46765
|
if (multiple) {
|
|
46655
|
-
|
|
46766
|
+
if (this.mergeType === cascader_constants_strings.NONE_MERGE_TYPE) {
|
|
46767
|
+
realValue = checkedKeys;
|
|
46768
|
+
} else {
|
|
46769
|
+
realValue = resolvedCheckedKeys;
|
|
46770
|
+
}
|
|
46656
46771
|
} else {
|
|
46657
46772
|
realValue = [...selectedKeys][0];
|
|
46658
46773
|
}
|
|
@@ -46832,8 +46947,8 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
46832
46947
|
/* Key of half checked node, when multiple */
|
|
46833
46948
|
halfCheckedKeys: new set_default.a([]),
|
|
46834
46949
|
|
|
46835
|
-
/* Auto merged checkedKeys, when multiple */
|
|
46836
|
-
|
|
46950
|
+
/* Auto merged checkedKeys or leaf checkedKeys, when multiple */
|
|
46951
|
+
resolvedCheckedKeys: new set_default.a([]),
|
|
46837
46952
|
|
|
46838
46953
|
/* Keys of loaded item */
|
|
46839
46954
|
loadedKeys: new set_default.a(),
|
|
@@ -46846,6 +46961,7 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
46846
46961
|
};
|
|
46847
46962
|
this.options = {};
|
|
46848
46963
|
this.isEmpty = false;
|
|
46964
|
+
this.mergeType = calcMergeType(props.autoMergeValue, props.leafOnly);
|
|
46849
46965
|
this.inputRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
|
|
46850
46966
|
this.triggerRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
|
|
46851
46967
|
this.optionsRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
|
|
@@ -46988,7 +47104,9 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
46988
47104
|
multiple,
|
|
46989
47105
|
value,
|
|
46990
47106
|
defaultValue,
|
|
46991
|
-
onChangeWithObject
|
|
47107
|
+
onChangeWithObject,
|
|
47108
|
+
leafOnly,
|
|
47109
|
+
autoMergeValue
|
|
46992
47110
|
} = props;
|
|
46993
47111
|
const {
|
|
46994
47112
|
prevProps
|
|
@@ -47053,24 +47171,19 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
47053
47171
|
realKeys = formatKeys;
|
|
47054
47172
|
}
|
|
47055
47173
|
|
|
47056
|
-
|
|
47057
|
-
|
|
47058
|
-
|
|
47059
|
-
for_each_default()(realKeys).call(realKeys, v => {
|
|
47060
|
-
const calRes = calcCheckedKeys(v, keyEntities);
|
|
47061
|
-
checkedKeys = new set_default.a([...checkedKeys, ...calRes.checkedKeys]);
|
|
47062
|
-
halfCheckedKeys = new set_default.a([...halfCheckedKeys, ...calRes.halfCheckedKeys]);
|
|
47063
|
-
}); // disableStrictly
|
|
47064
|
-
|
|
47174
|
+
const calRes = calcCheckedKeys(flatten_default()(realKeys), keyEntities);
|
|
47175
|
+
const checkedKeys = new set_default.a(calRes.checkedKeys);
|
|
47176
|
+
const halfCheckedKeys = new set_default.a(calRes.halfCheckedKeys); // disableStrictly
|
|
47065
47177
|
|
|
47066
47178
|
if (props.disableStrictly) {
|
|
47067
47179
|
newState.disabledKeys = calcDisabledKeys(keyEntities);
|
|
47068
47180
|
}
|
|
47069
47181
|
|
|
47182
|
+
const isLeafOnlyMerge = calcMergeType(autoMergeValue, leafOnly) === cascader_constants_strings.LEAF_ONLY_MERGE_TYPE;
|
|
47070
47183
|
newState.prevProps = props;
|
|
47071
47184
|
newState.checkedKeys = checkedKeys;
|
|
47072
47185
|
newState.halfCheckedKeys = halfCheckedKeys;
|
|
47073
|
-
newState.
|
|
47186
|
+
newState.resolvedCheckedKeys = new set_default.a(normalizeKeyList(checkedKeys, keyEntities, isLeafOnlyMerge));
|
|
47074
47187
|
}
|
|
47075
47188
|
}
|
|
47076
47189
|
|
|
@@ -47104,7 +47217,6 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
47104
47217
|
const {
|
|
47105
47218
|
size,
|
|
47106
47219
|
disabled,
|
|
47107
|
-
autoMergeValue,
|
|
47108
47220
|
placeholder,
|
|
47109
47221
|
maxTagCount,
|
|
47110
47222
|
showRestTagsPopover,
|
|
@@ -47114,11 +47226,11 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
47114
47226
|
inputValue,
|
|
47115
47227
|
checkedKeys,
|
|
47116
47228
|
keyEntities,
|
|
47117
|
-
|
|
47229
|
+
resolvedCheckedKeys
|
|
47118
47230
|
} = this.state;
|
|
47119
47231
|
const tagInputcls = classnames_default()("".concat(cascader_prefixcls, "-tagInput-wrapper"));
|
|
47120
47232
|
const tagValue = [];
|
|
47121
|
-
const realKeys =
|
|
47233
|
+
const realKeys = this.mergeType === cascader_constants_strings.NONE_MERGE_TYPE ? checkedKeys : resolvedCheckedKeys;
|
|
47122
47234
|
|
|
47123
47235
|
for_each_default()(_context3 = [...realKeys]).call(_context3, checkedKey => {
|
|
47124
47236
|
if (!isEmpty_default()(keyEntities[checkedKey])) {
|
|
@@ -47268,14 +47380,18 @@ cascader_Cascader.propTypes = {
|
|
|
47268
47380
|
showRestTagsPopover: prop_types_default.a.bool,
|
|
47269
47381
|
restTagsPopoverProps: prop_types_default.a.object,
|
|
47270
47382
|
max: prop_types_default.a.number,
|
|
47383
|
+
separator: prop_types_default.a.string,
|
|
47271
47384
|
onExceed: prop_types_default.a.func,
|
|
47272
47385
|
onClear: prop_types_default.a.func,
|
|
47273
47386
|
loadData: prop_types_default.a.func,
|
|
47274
47387
|
onLoad: prop_types_default.a.func,
|
|
47275
47388
|
loadedKeys: prop_types_default.a.array,
|
|
47276
|
-
disableStrictly: prop_types_default.a.bool
|
|
47389
|
+
disableStrictly: prop_types_default.a.bool,
|
|
47390
|
+
leafOnly: prop_types_default.a.bool,
|
|
47391
|
+
enableLeafClick: prop_types_default.a.bool
|
|
47277
47392
|
};
|
|
47278
47393
|
cascader_Cascader.defaultProps = {
|
|
47394
|
+
leafOnly: false,
|
|
47279
47395
|
arrowIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronDown, null),
|
|
47280
47396
|
stopPropagation: true,
|
|
47281
47397
|
motion: true,
|
|
@@ -47292,6 +47408,7 @@ cascader_Cascader.defaultProps = {
|
|
|
47292
47408
|
filterLeafOnly: true,
|
|
47293
47409
|
showRestTagsPopover: false,
|
|
47294
47410
|
restTagsPopoverProps: {},
|
|
47411
|
+
separator: ' / ',
|
|
47295
47412
|
size: 'default',
|
|
47296
47413
|
treeNodeFilterProp: 'label',
|
|
47297
47414
|
displayProp: 'label',
|
|
@@ -47300,7 +47417,8 @@ cascader_Cascader.defaultProps = {
|
|
|
47300
47417
|
onExceed: noop_default.a,
|
|
47301
47418
|
onClear: noop_default.a,
|
|
47302
47419
|
onDropdownVisibleChange: noop_default.a,
|
|
47303
|
-
onListScroll: noop_default.a
|
|
47420
|
+
onListScroll: noop_default.a,
|
|
47421
|
+
enableLeafClick: false
|
|
47304
47422
|
};
|
|
47305
47423
|
/* harmony default export */ var cascader_0 = (cascader_Cascader);
|
|
47306
47424
|
// CONCATENATED MODULE: ../semi-foundation/collapse/constants.ts
|
|
@@ -54548,11 +54666,99 @@ class monthsGridFoundation_MonthsGridFoundation extends foundation {
|
|
|
54548
54666
|
|
|
54549
54667
|
|
|
54550
54668
|
destroy() {}
|
|
54669
|
+
/**
|
|
54670
|
+
* sync change another panel month when change months from the else yam panel
|
|
54671
|
+
* call it when
|
|
54672
|
+
* - current change panel targe date month is same with another panel date
|
|
54673
|
+
*
|
|
54674
|
+
* @example
|
|
54675
|
+
* - 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'
|
|
54676
|
+
* - 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'
|
|
54677
|
+
*/
|
|
54678
|
+
|
|
54679
|
+
|
|
54680
|
+
handleSyncChangeMonths(options) {
|
|
54681
|
+
const {
|
|
54682
|
+
panelType,
|
|
54683
|
+
target
|
|
54684
|
+
} = options;
|
|
54685
|
+
|
|
54686
|
+
const {
|
|
54687
|
+
type
|
|
54688
|
+
} = this._adapter.getProps();
|
|
54689
|
+
|
|
54690
|
+
const {
|
|
54691
|
+
monthLeft,
|
|
54692
|
+
monthRight
|
|
54693
|
+
} = this._adapter.getStates();
|
|
54694
|
+
|
|
54695
|
+
if (this.isRangeType(type)) {
|
|
54696
|
+
if (panelType === 'right' && differenceInCalendarMonths(target, monthLeft.pickerDate) === 0) {
|
|
54697
|
+
this.handleYearOrMonthChange('prevMonth', 'left', 1, true);
|
|
54698
|
+
} else if (panelType === 'left' && differenceInCalendarMonths(monthRight.pickerDate, target) === 0) {
|
|
54699
|
+
this.handleYearOrMonthChange('nextMonth', 'right', 1, true);
|
|
54700
|
+
}
|
|
54701
|
+
}
|
|
54702
|
+
}
|
|
54703
|
+
/**
|
|
54704
|
+
* Get the target date based on the panel type and switch type
|
|
54705
|
+
*/
|
|
54706
|
+
|
|
54707
|
+
|
|
54708
|
+
getTargetChangeDate(options) {
|
|
54709
|
+
const {
|
|
54710
|
+
panelType,
|
|
54711
|
+
switchType
|
|
54712
|
+
} = options;
|
|
54713
|
+
|
|
54714
|
+
const {
|
|
54715
|
+
monthRight,
|
|
54716
|
+
monthLeft
|
|
54717
|
+
} = this._adapter.getStates();
|
|
54718
|
+
|
|
54719
|
+
const currentDate = panelType === 'left' ? monthLeft.pickerDate : monthRight.pickerDate;
|
|
54720
|
+
let target;
|
|
54721
|
+
|
|
54722
|
+
switch (switchType) {
|
|
54723
|
+
case 'prevMonth':
|
|
54724
|
+
target = addMonths(currentDate, -1);
|
|
54725
|
+
break;
|
|
54726
|
+
|
|
54727
|
+
case 'nextMonth':
|
|
54728
|
+
target = addMonths(currentDate, 1);
|
|
54729
|
+
break;
|
|
54730
|
+
|
|
54731
|
+
case 'prevYear':
|
|
54732
|
+
target = addYears(currentDate, -1);
|
|
54733
|
+
break;
|
|
54734
|
+
|
|
54735
|
+
case 'nextYear':
|
|
54736
|
+
target = addYears(currentDate, 1);
|
|
54737
|
+
break;
|
|
54738
|
+
}
|
|
54739
|
+
|
|
54740
|
+
return target;
|
|
54741
|
+
}
|
|
54742
|
+
/**
|
|
54743
|
+
* Change month by yam panel
|
|
54744
|
+
*/
|
|
54745
|
+
|
|
54551
54746
|
|
|
54552
54747
|
toMonth(panelType, target) {
|
|
54748
|
+
const {
|
|
54749
|
+
type
|
|
54750
|
+
} = this._adapter.getProps();
|
|
54751
|
+
|
|
54553
54752
|
const diff = this._getDiff('month', target, panelType);
|
|
54554
54753
|
|
|
54555
54754
|
this.handleYearOrMonthChange(diff < 0 ? 'prevMonth' : 'nextMonth', panelType, Math.abs(diff), false);
|
|
54755
|
+
|
|
54756
|
+
if (this.isRangeType(type)) {
|
|
54757
|
+
this.handleSyncChangeMonths({
|
|
54758
|
+
panelType,
|
|
54759
|
+
target
|
|
54760
|
+
});
|
|
54761
|
+
}
|
|
54556
54762
|
}
|
|
54557
54763
|
|
|
54558
54764
|
toYear(panelType, target) {
|
|
@@ -54574,34 +54780,51 @@ class monthsGridFoundation_MonthsGridFoundation extends foundation {
|
|
|
54574
54780
|
return typeof realType === 'string' && /range/i.test(realType);
|
|
54575
54781
|
}
|
|
54576
54782
|
|
|
54577
|
-
|
|
54783
|
+
handleSwitchMonthOrYear(switchType, panelType) {
|
|
54578
54784
|
const {
|
|
54579
54785
|
type,
|
|
54580
54786
|
syncSwitchMonth
|
|
54581
54787
|
} = this.getProps();
|
|
54788
|
+
const rangeType = this.isRangeType(type); // range type and syncSwitchMonth, we should change panels at same time
|
|
54582
54789
|
|
|
54583
|
-
if (
|
|
54790
|
+
if (rangeType && syncSwitchMonth) {
|
|
54584
54791
|
this.handleYearOrMonthChange(switchType, 'left', 1, true);
|
|
54585
54792
|
this.handleYearOrMonthChange(switchType, 'right', 1, true);
|
|
54586
54793
|
} else {
|
|
54587
54794
|
this.handleYearOrMonthChange(switchType, panelType);
|
|
54795
|
+
/**
|
|
54796
|
+
* default behavior (v2.2.0)
|
|
54797
|
+
* In order to prevent the two panels from being the same month, this will confuse the user when selecting the range
|
|
54798
|
+
* https://github.com/DouyinFE/semi-design/issues/260
|
|
54799
|
+
*/
|
|
54800
|
+
|
|
54801
|
+
if (rangeType) {
|
|
54802
|
+
const target = this.getTargetChangeDate({
|
|
54803
|
+
panelType,
|
|
54804
|
+
switchType
|
|
54805
|
+
});
|
|
54806
|
+
this.handleSyncChangeMonths({
|
|
54807
|
+
panelType,
|
|
54808
|
+
target
|
|
54809
|
+
});
|
|
54810
|
+
}
|
|
54588
54811
|
}
|
|
54589
54812
|
}
|
|
54590
54813
|
|
|
54591
54814
|
prevMonth(panelType) {
|
|
54592
|
-
this.
|
|
54815
|
+
this.handleSwitchMonthOrYear('prevMonth', panelType);
|
|
54593
54816
|
}
|
|
54594
54817
|
|
|
54595
54818
|
nextMonth(panelType) {
|
|
54596
|
-
this.
|
|
54819
|
+
this.handleSwitchMonthOrYear('nextMonth', panelType);
|
|
54597
54820
|
}
|
|
54598
54821
|
|
|
54599
54822
|
prevYear(panelType) {
|
|
54600
|
-
this.
|
|
54823
|
+
this.handleSwitchMonthOrYear('prevYear', panelType);
|
|
54601
54824
|
}
|
|
54602
54825
|
|
|
54603
54826
|
nextYear(panelType) {
|
|
54604
|
-
this.
|
|
54827
|
+
this.handleSwitchMonthOrYear('nextYear', panelType);
|
|
54605
54828
|
}
|
|
54606
54829
|
/**
|
|
54607
54830
|
* Calculate the year and month difference
|
|
@@ -55258,6 +55481,34 @@ class monthsGridFoundation_MonthsGridFoundation extends foundation {
|
|
|
55258
55481
|
isYearPickerOpen: false
|
|
55259
55482
|
});
|
|
55260
55483
|
}
|
|
55484
|
+
/**
|
|
55485
|
+
* Get year and month panel open type
|
|
55486
|
+
*
|
|
55487
|
+
* It is useful info to set minHeight of weeks.
|
|
55488
|
+
* - When yam open type is 'left' or 'right', weeks minHeight should be set
|
|
55489
|
+
* If the minHeight is not set, the change of the number of weeks will cause the scrollList to be unstable
|
|
55490
|
+
*/
|
|
55491
|
+
|
|
55492
|
+
|
|
55493
|
+
getYAMOpenType() {
|
|
55494
|
+
const {
|
|
55495
|
+
monthLeft,
|
|
55496
|
+
monthRight
|
|
55497
|
+
} = this._adapter.getStates();
|
|
55498
|
+
|
|
55499
|
+
const leftYearPickerOpen = monthLeft.isYearPickerOpen;
|
|
55500
|
+
const rightYearPickerOpen = monthRight.isYearPickerOpen;
|
|
55501
|
+
|
|
55502
|
+
if (leftYearPickerOpen && rightYearPickerOpen) {
|
|
55503
|
+
return 'both';
|
|
55504
|
+
} else if (leftYearPickerOpen) {
|
|
55505
|
+
return 'left';
|
|
55506
|
+
} else if (rightYearPickerOpen) {
|
|
55507
|
+
return 'right';
|
|
55508
|
+
} else {
|
|
55509
|
+
return 'none';
|
|
55510
|
+
}
|
|
55511
|
+
}
|
|
55261
55512
|
|
|
55262
55513
|
}
|
|
55263
55514
|
// CONCATENATED MODULE: ./datePicker/navigation.tsx
|
|
@@ -55283,6 +55534,8 @@ class navigation_Navigation extends external_root_React_commonjs2_react_commonjs
|
|
|
55283
55534
|
onMonthClick,
|
|
55284
55535
|
onNextMonth,
|
|
55285
55536
|
onPrevMonth,
|
|
55537
|
+
onPrevYear,
|
|
55538
|
+
onNextYear,
|
|
55286
55539
|
density,
|
|
55287
55540
|
shouldBimonthSwitch,
|
|
55288
55541
|
panelType
|
|
@@ -55290,37 +55543,75 @@ class navigation_Navigation extends external_root_React_commonjs2_react_commonjs
|
|
|
55290
55543
|
const btnTheme = 'borderless';
|
|
55291
55544
|
const iconBtnSize = density === 'compact' ? 'default' : 'large';
|
|
55292
55545
|
const btnNoHorizontalPadding = true;
|
|
55293
|
-
const buttonSize = density === 'compact' ? 'small' : 'default';
|
|
55546
|
+
const buttonSize = density === 'compact' ? 'small' : 'default';
|
|
55547
|
+
const isLeftPanel = panelType === datePicker_constants_strings.PANEL_TYPE_LEFT;
|
|
55548
|
+
const isRightPanel = panelType === datePicker_constants_strings.PANEL_TYPE_RIGHT; // syncSwitchMonth and the current panel is the left
|
|
55549
|
+
|
|
55550
|
+
const hiddenLeftPanelRightButtons = shouldBimonthSwitch && isLeftPanel; // syncSwitchMonth and the current panel is the right
|
|
55551
|
+
|
|
55552
|
+
const hiddenRightPanelLeftButtons = shouldBimonthSwitch && isRightPanel; // `visibility: hidden` will keep the icon in position
|
|
55553
|
+
|
|
55554
|
+
const leftButtonStyle = {};
|
|
55555
|
+
const rightButtonStyle = {};
|
|
55294
55556
|
|
|
55295
|
-
|
|
55557
|
+
if (hiddenRightPanelLeftButtons) {
|
|
55558
|
+
leftButtonStyle.visibility = 'hidden';
|
|
55559
|
+
}
|
|
55560
|
+
|
|
55561
|
+
if (hiddenLeftPanelRightButtons) {
|
|
55562
|
+
rightButtonStyle.visibility = 'hidden';
|
|
55563
|
+
}
|
|
55296
55564
|
|
|
55297
|
-
const bimonthSwitchWithRightPanel = shouldBimonthSwitch && panelType === datePicker_constants_strings.PANEL_TYPE_RIGHT;
|
|
55298
55565
|
const ref = forwardRef || this.navRef;
|
|
55299
55566
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
55300
55567
|
className: navigation_prefixCls,
|
|
55301
55568
|
ref: ref
|
|
55302
|
-
},
|
|
55569
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
|
|
55570
|
+
key: "double-chevron-left",
|
|
55571
|
+
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconDoubleChevronLeft, {
|
|
55572
|
+
size: iconBtnSize
|
|
55573
|
+
}),
|
|
55574
|
+
size: buttonSize,
|
|
55575
|
+
theme: btnTheme,
|
|
55576
|
+
noHorizontalPadding: btnNoHorizontalPadding,
|
|
55577
|
+
onClick: onPrevYear,
|
|
55578
|
+
style: leftButtonStyle
|
|
55579
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
|
|
55580
|
+
key: "chevron-left",
|
|
55303
55581
|
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronLeft, {
|
|
55304
55582
|
size: iconBtnSize
|
|
55305
55583
|
}),
|
|
55306
55584
|
size: buttonSize,
|
|
55307
55585
|
onClick: onPrevMonth,
|
|
55308
55586
|
theme: btnTheme,
|
|
55309
|
-
noHorizontalPadding: btnNoHorizontalPadding
|
|
55587
|
+
noHorizontalPadding: btnNoHorizontalPadding,
|
|
55588
|
+
style: leftButtonStyle
|
|
55310
55589
|
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
55311
55590
|
className: "".concat(navigation_prefixCls, "-month")
|
|
55312
55591
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(button_0, {
|
|
55313
55592
|
onClick: onMonthClick,
|
|
55314
55593
|
theme: btnTheme,
|
|
55315
55594
|
size: buttonSize
|
|
55316
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", null, monthText))),
|
|
55595
|
+
}, /*#__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, {
|
|
55596
|
+
key: "chevron-right",
|
|
55317
55597
|
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronRight, {
|
|
55318
55598
|
size: iconBtnSize
|
|
55319
55599
|
}),
|
|
55320
55600
|
size: buttonSize,
|
|
55321
55601
|
onClick: onNextMonth,
|
|
55322
55602
|
theme: btnTheme,
|
|
55323
|
-
noHorizontalPadding: btnNoHorizontalPadding
|
|
55603
|
+
noHorizontalPadding: btnNoHorizontalPadding,
|
|
55604
|
+
style: rightButtonStyle
|
|
55605
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
|
|
55606
|
+
key: "double-chevron-right",
|
|
55607
|
+
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconDoubleChevronRight, {
|
|
55608
|
+
size: iconBtnSize
|
|
55609
|
+
}),
|
|
55610
|
+
size: buttonSize,
|
|
55611
|
+
theme: btnTheme,
|
|
55612
|
+
noHorizontalPadding: btnNoHorizontalPadding,
|
|
55613
|
+
onClick: onNextYear,
|
|
55614
|
+
style: rightButtonStyle
|
|
55324
55615
|
}));
|
|
55325
55616
|
}
|
|
55326
55617
|
|
|
@@ -58007,6 +58298,10 @@ class monthsGrid_MonthsGrid extends baseComponent_BaseComponent {
|
|
|
58007
58298
|
});
|
|
58008
58299
|
};
|
|
58009
58300
|
|
|
58301
|
+
this.getYAMOpenType = () => {
|
|
58302
|
+
return this.foundation.getYAMOpenType();
|
|
58303
|
+
};
|
|
58304
|
+
|
|
58010
58305
|
let nowDate = is_array_default()(props.defaultPickerValue) ? props.defaultPickerValue[0] : props.defaultPickerValue;
|
|
58011
58306
|
const validFormat = props.format || getDefaultFormatTokenByType(props.type);
|
|
58012
58307
|
|
|
@@ -58498,9 +58793,11 @@ class monthsGrid_MonthsGrid extends baseComponent_BaseComponent {
|
|
|
58498
58793
|
content = 'year month';
|
|
58499
58794
|
}
|
|
58500
58795
|
|
|
58796
|
+
const yearOpenType = this.getYAMOpenType();
|
|
58501
58797
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
58502
58798
|
className: monthGridCls,
|
|
58503
58799
|
"x-type": type,
|
|
58800
|
+
"x-panel-yearandmonth-open-type": yearOpenType,
|
|
58504
58801
|
ref: current => this.cacheRefCurrent('monthGrid', current)
|
|
58505
58802
|
}, content);
|
|
58506
58803
|
}
|
|
@@ -59448,7 +59745,7 @@ class descriptions_item_Item extends external_root_React_commonjs2_react_commonj
|
|
|
59448
59745
|
className: "".concat(item_prefixCls, "-item")
|
|
59449
59746
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
59450
59747
|
className: keyCls
|
|
59451
|
-
},
|
|
59748
|
+
}, itemKey, ":"), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
59452
59749
|
className: valCls
|
|
59453
59750
|
}, typeof children === 'function' ? children() : children))) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("tr", {
|
|
59454
59751
|
className: className,
|
|
@@ -60735,8 +61032,8 @@ Modal_Modal.propTypes = {
|
|
|
60735
61032
|
closable: prop_types_default.a.bool,
|
|
60736
61033
|
centered: prop_types_default.a.bool,
|
|
60737
61034
|
visible: prop_types_default.a.bool,
|
|
60738
|
-
width: prop_types_default.a.number,
|
|
60739
|
-
height: prop_types_default.a.number,
|
|
61035
|
+
width: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]),
|
|
61036
|
+
height: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]),
|
|
60740
61037
|
confirmLoading: prop_types_default.a.bool,
|
|
60741
61038
|
cancelLoading: prop_types_default.a.bool,
|
|
60742
61039
|
okText: prop_types_default.a.string,
|
|
@@ -72275,39 +72572,44 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
72275
72572
|
const {
|
|
72276
72573
|
size,
|
|
72277
72574
|
multiple,
|
|
72278
|
-
disabled
|
|
72575
|
+
disabled,
|
|
72576
|
+
inputProps
|
|
72279
72577
|
} = this.props;
|
|
72578
|
+
|
|
72579
|
+
const inputPropsCls = get_default()(inputProps, 'className');
|
|
72580
|
+
|
|
72280
72581
|
const inputcls = classnames_default()("".concat(select_prefixcls, "-input"), {
|
|
72281
72582
|
["".concat(select_prefixcls, "-input-single")]: !multiple,
|
|
72282
72583
|
["".concat(select_prefixcls, "-input-multiple")]: multiple
|
|
72283
|
-
});
|
|
72584
|
+
}, inputPropsCls);
|
|
72284
72585
|
const {
|
|
72285
72586
|
inputValue
|
|
72286
72587
|
} = this.state;
|
|
72287
|
-
|
|
72588
|
+
|
|
72589
|
+
const selectInputProps = assign_default()({
|
|
72288
72590
|
value: inputValue,
|
|
72289
72591
|
disabled,
|
|
72290
72592
|
className: inputcls,
|
|
72291
72593
|
onChange: this.handleInputChange
|
|
72292
|
-
};
|
|
72594
|
+
}, inputProps);
|
|
72595
|
+
|
|
72293
72596
|
let style = {}; // Multiple choice mode
|
|
72294
72597
|
|
|
72295
72598
|
if (multiple) {
|
|
72296
72599
|
style = {
|
|
72297
72600
|
width: inputValue ? "".concat(inputValue.length * 16, "px") : '2px'
|
|
72298
72601
|
};
|
|
72299
|
-
|
|
72602
|
+
selectInputProps.style = style;
|
|
72300
72603
|
}
|
|
72301
72604
|
|
|
72302
72605
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(input_0, assign_default()({
|
|
72303
72606
|
ref: this.inputRef,
|
|
72304
|
-
size: size
|
|
72305
|
-
}, inputProps, {
|
|
72607
|
+
size: size,
|
|
72306
72608
|
onFocus: e => {
|
|
72307
72609
|
// prevent event bubbling which will fire trigger onFocus event
|
|
72308
72610
|
e.stopPropagation(); // e.nativeEvent.stopImmediatePropagation();
|
|
72309
72611
|
}
|
|
72310
|
-
}));
|
|
72612
|
+
}, selectInputProps));
|
|
72311
72613
|
}
|
|
72312
72614
|
|
|
72313
72615
|
close() {
|
|
@@ -72637,7 +72939,9 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
72637
72939
|
key: value
|
|
72638
72940
|
}), content);
|
|
72639
72941
|
} else {
|
|
72640
|
-
return
|
|
72942
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_["Fragment"], {
|
|
72943
|
+
key: value
|
|
72944
|
+
}, content);
|
|
72641
72945
|
}
|
|
72642
72946
|
});
|
|
72643
72947
|
|
|
@@ -72751,6 +73055,7 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
72751
73055
|
multiple,
|
|
72752
73056
|
filter,
|
|
72753
73057
|
style,
|
|
73058
|
+
id,
|
|
72754
73059
|
size,
|
|
72755
73060
|
className,
|
|
72756
73061
|
validateStatus,
|
|
@@ -72824,6 +73129,7 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
72824
73129
|
ref: ref => this.triggerRef.current = ref,
|
|
72825
73130
|
onClick: e => this.foundation.handleClick(e),
|
|
72826
73131
|
style: style,
|
|
73132
|
+
id: id,
|
|
72827
73133
|
tabIndex: tabIndex,
|
|
72828
73134
|
onMouseEnter: this.onMouseEnter,
|
|
72829
73135
|
onMouseLeave: this.onMouseLeave,
|
|
@@ -72909,6 +73215,7 @@ select_Select.propTypes = {
|
|
|
72909
73215
|
dropdownStyle: prop_types_default.a.object,
|
|
72910
73216
|
outerTopSlot: prop_types_default.a.node,
|
|
72911
73217
|
innerTopSlot: prop_types_default.a.node,
|
|
73218
|
+
inputProps: prop_types_default.a.object,
|
|
72912
73219
|
outerBottomSlot: prop_types_default.a.node,
|
|
72913
73220
|
innerBottomSlot: prop_types_default.a.node,
|
|
72914
73221
|
optionList: prop_types_default.a.array,
|
|
@@ -73016,6 +73323,7 @@ select_Select.defaultProps = {
|
|
|
73016
73323
|
|
|
73017
73324
|
|
|
73018
73325
|
|
|
73326
|
+
|
|
73019
73327
|
const pagination_prefixCls = pagination_constants_cssClasses.PREFIX;
|
|
73020
73328
|
const {
|
|
73021
73329
|
Option: pagination_Option
|
|
@@ -73041,6 +73349,7 @@ class pagination_Pagination extends baseComponent_BaseComponent {
|
|
|
73041
73349
|
this.foundation = new pagination_foundation(this.adapter);
|
|
73042
73350
|
this.renderDefaultPage = bind_default()(_context = this.renderDefaultPage).call(_context, this);
|
|
73043
73351
|
this.renderSmallPage = bind_default()(_context2 = this.renderSmallPage).call(_context2, this);
|
|
73352
|
+
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');
|
|
73044
73353
|
}
|
|
73045
73354
|
|
|
73046
73355
|
get adapter() {
|
|
@@ -73334,7 +73643,8 @@ class pagination_Pagination extends baseComponent_BaseComponent {
|
|
|
73334
73643
|
className,
|
|
73335
73644
|
style,
|
|
73336
73645
|
hideOnSinglePage,
|
|
73337
|
-
hoverShowPageSelect
|
|
73646
|
+
hoverShowPageSelect,
|
|
73647
|
+
showSizeChanger
|
|
73338
73648
|
} = this.props;
|
|
73339
73649
|
const paginationCls = classnames_default()("".concat(pagination_prefixCls, "-small"), pagination_prefixCls, className);
|
|
73340
73650
|
const {
|
|
@@ -73344,7 +73654,7 @@ class pagination_Pagination extends baseComponent_BaseComponent {
|
|
|
73344
73654
|
} = this.state;
|
|
73345
73655
|
const totalPageNum = Math.ceil(total / pageSize);
|
|
73346
73656
|
|
|
73347
|
-
if (totalPageNum < 2 && hideOnSinglePage) {
|
|
73657
|
+
if (totalPageNum < 2 && hideOnSinglePage && !showSizeChanger) {
|
|
73348
73658
|
return null;
|
|
73349
73659
|
}
|
|
73350
73660
|
|
|
@@ -73373,13 +73683,14 @@ class pagination_Pagination extends baseComponent_BaseComponent {
|
|
|
73373
73683
|
showTotal,
|
|
73374
73684
|
className,
|
|
73375
73685
|
style,
|
|
73376
|
-
hideOnSinglePage
|
|
73686
|
+
hideOnSinglePage,
|
|
73687
|
+
showSizeChanger
|
|
73377
73688
|
} = this.props;
|
|
73378
73689
|
const paginationCls = classnames_default()(className, "".concat(pagination_prefixCls));
|
|
73379
73690
|
const showTotalCls = "".concat(pagination_prefixCls, "-total");
|
|
73380
73691
|
const totalPageNum = Math.ceil(total / pageSize);
|
|
73381
73692
|
|
|
73382
|
-
if (totalPageNum < 2 && hideOnSinglePage) {
|
|
73693
|
+
if (totalPageNum < 2 && hideOnSinglePage && !showSizeChanger) {
|
|
73383
73694
|
return null;
|
|
73384
73695
|
}
|
|
73385
73696
|
|
|
@@ -74452,6 +74763,7 @@ class radio_Radio extends baseComponent_BaseComponent {
|
|
|
74452
74763
|
["".concat(prefix, "-cardRadioGroup")]: isCardRadioGroup,
|
|
74453
74764
|
["".concat(prefix, "-cardRadioGroup_disabled")]: isDisabled && isCardRadioGroup,
|
|
74454
74765
|
["".concat(prefix, "-cardRadioGroup_checked")]: isCardRadioGroup && realChecked && !isDisabled,
|
|
74766
|
+
["".concat(prefix, "-cardRadioGroup_checked_disabled")]: isCardRadioGroup && realChecked && isDisabled,
|
|
74455
74767
|
["".concat(prefix, "-cardRadioGroup_hover")]: isCardRadioGroup && !realChecked && isHover && !isDisabled,
|
|
74456
74768
|
[className]: Boolean(className)
|
|
74457
74769
|
});
|
|
@@ -74789,7 +75101,7 @@ class rating_item_Item extends external_root_React_commonjs2_react_commonjs_reac
|
|
|
74789
75101
|
height: size,
|
|
74790
75102
|
fontSize: size
|
|
74791
75103
|
} : {};
|
|
74792
|
-
const iconSize = size === 'small' ? 'default' : 'extra-large';
|
|
75104
|
+
const iconSize = isCustomSize ? 'inherit' : size === 'small' ? 'default' : 'extra-large';
|
|
74793
75105
|
const content = character ? character : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconStar, {
|
|
74794
75106
|
size: iconSize
|
|
74795
75107
|
});
|
|
@@ -74804,7 +75116,8 @@ class rating_item_Item extends external_root_React_commonjs2_react_commonjs_reac
|
|
|
74804
75116
|
"aria-checked": value > index ? 'true' : 'false',
|
|
74805
75117
|
"aria-posinset": index + 1,
|
|
74806
75118
|
"aria-setsize": count,
|
|
74807
|
-
tabIndex: 0
|
|
75119
|
+
tabIndex: 0,
|
|
75120
|
+
className: "".concat(prefixCls, "-wrapper")
|
|
74808
75121
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
74809
75122
|
className: "".concat(prefixCls, "-first"),
|
|
74810
75123
|
style: {
|
|
@@ -86742,6 +87055,7 @@ const timeline_constants_strings = {
|
|
|
86742
87055
|
|
|
86743
87056
|
|
|
86744
87057
|
|
|
87058
|
+
|
|
86745
87059
|
const timeline_item_prefixCls = timeline_constants_cssClasses.ITEM;
|
|
86746
87060
|
class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_react_["PureComponent"] {
|
|
86747
87061
|
render() {
|
|
@@ -86755,7 +87069,8 @@ class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_re
|
|
|
86755
87069
|
type,
|
|
86756
87070
|
style,
|
|
86757
87071
|
time,
|
|
86758
|
-
extra
|
|
87072
|
+
extra,
|
|
87073
|
+
onClick
|
|
86759
87074
|
} = this.props;
|
|
86760
87075
|
const itemCls = classnames_default()(timeline_item_prefixCls, className);
|
|
86761
87076
|
const dotCls = classnames_default()({
|
|
@@ -86770,16 +87085,17 @@ class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_re
|
|
|
86770
87085
|
} : null;
|
|
86771
87086
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("li", {
|
|
86772
87087
|
className: itemCls,
|
|
86773
|
-
style: style
|
|
87088
|
+
style: style,
|
|
87089
|
+
onClick: onClick
|
|
86774
87090
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
86775
87091
|
className: "".concat(timeline_item_prefixCls, "-tail")
|
|
86776
87092
|
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", assign_default()({
|
|
86777
87093
|
className: dotCls
|
|
86778
87094
|
}, dotStyle), dot), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
86779
87095
|
className: "".concat(timeline_item_prefixCls, "-content")
|
|
86780
|
-
}, children, extra
|
|
87096
|
+
}, children, extra && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
86781
87097
|
className: "".concat(timeline_item_prefixCls, "-content-extra")
|
|
86782
|
-
}, extra)
|
|
87098
|
+
}, extra), time && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
86783
87099
|
className: "".concat(timeline_item_prefixCls, "-content-time")
|
|
86784
87100
|
}, time)));
|
|
86785
87101
|
}
|
|
@@ -86787,17 +87103,19 @@ class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_re
|
|
|
86787
87103
|
}
|
|
86788
87104
|
timeline_item_Item.propTypes = {
|
|
86789
87105
|
color: prop_types_default.a.string,
|
|
86790
|
-
time: prop_types_default.a.
|
|
87106
|
+
time: prop_types_default.a.node,
|
|
86791
87107
|
type: prop_types_default.a.oneOf(timeline_constants_strings.ITEM_TYPE),
|
|
86792
87108
|
dot: prop_types_default.a.node,
|
|
86793
87109
|
extra: prop_types_default.a.node,
|
|
86794
87110
|
position: prop_types_default.a.oneOf(timeline_constants_strings.ITEM_POS),
|
|
86795
87111
|
className: prop_types_default.a.string,
|
|
86796
|
-
style: prop_types_default.a.object
|
|
87112
|
+
style: prop_types_default.a.object,
|
|
87113
|
+
onClick: prop_types_default.a.func
|
|
86797
87114
|
};
|
|
86798
87115
|
timeline_item_Item.defaultProps = {
|
|
86799
87116
|
type: 'default',
|
|
86800
|
-
time: ''
|
|
87117
|
+
time: '',
|
|
87118
|
+
onClick: noop_default.a
|
|
86801
87119
|
};
|
|
86802
87120
|
// CONCATENATED MODULE: ./timeline/index.tsx
|
|
86803
87121
|
|
|
@@ -89918,8 +90236,6 @@ class treeNode_TreeNode extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
89918
90236
|
const {
|
|
89919
90237
|
onNodeRightClick
|
|
89920
90238
|
} = this.context;
|
|
89921
|
-
e.stopPropagation();
|
|
89922
|
-
e.nativeEvent.stopImmediatePropagation();
|
|
89923
90239
|
onNodeRightClick(e, this.props);
|
|
89924
90240
|
};
|
|
89925
90241
|
|
|
@@ -92854,6 +93170,7 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
92854
93170
|
itemSize: virtualize.itemSize,
|
|
92855
93171
|
height: height,
|
|
92856
93172
|
width: width,
|
|
93173
|
+
// @ts-ignore avoid strict check of itemKey
|
|
92857
93174
|
itemKey: this.itemKey,
|
|
92858
93175
|
itemData: flattenNodes,
|
|
92859
93176
|
className: "".concat(prefixTree, "-virtual-list"),
|
|
@@ -93948,6 +94265,113 @@ class foundation_UploadFoundation extends foundation {
|
|
|
93948
94265
|
this.startUpload(currentFiles);
|
|
93949
94266
|
}
|
|
93950
94267
|
});
|
|
94268
|
+
} // 插入多个文件到指定位置
|
|
94269
|
+
// Insert files to the specified location
|
|
94270
|
+
|
|
94271
|
+
|
|
94272
|
+
insertFileToList(files, index) {
|
|
94273
|
+
const {
|
|
94274
|
+
limit,
|
|
94275
|
+
transformFile,
|
|
94276
|
+
accept,
|
|
94277
|
+
uploadTrigger
|
|
94278
|
+
} = this.getProps();
|
|
94279
|
+
const {
|
|
94280
|
+
fileList
|
|
94281
|
+
} = this.getStates();
|
|
94282
|
+
const unAcceptFileList = []; // 当次选中的文件
|
|
94283
|
+
// current selected file
|
|
94284
|
+
|
|
94285
|
+
let currentFileList = from_default()(files);
|
|
94286
|
+
|
|
94287
|
+
if (typeof accept !== 'undefined') {
|
|
94288
|
+
currentFileList = filter_default()(currentFileList).call(currentFileList, item => {
|
|
94289
|
+
const isValid = this.checkFileFormat(accept, item);
|
|
94290
|
+
|
|
94291
|
+
if (!isValid) {
|
|
94292
|
+
unAcceptFileList.push(item);
|
|
94293
|
+
}
|
|
94294
|
+
|
|
94295
|
+
return isValid;
|
|
94296
|
+
});
|
|
94297
|
+
|
|
94298
|
+
if (unAcceptFileList.length !== 0) {
|
|
94299
|
+
this._adapter.notifyAcceptInvalid(unAcceptFileList);
|
|
94300
|
+
}
|
|
94301
|
+
|
|
94302
|
+
if (currentFileList.length === 0) {
|
|
94303
|
+
return;
|
|
94304
|
+
}
|
|
94305
|
+
}
|
|
94306
|
+
|
|
94307
|
+
currentFileList = map_default()(currentFileList).call(currentFileList, file => {
|
|
94308
|
+
if (!file.uid) {
|
|
94309
|
+
file.uid = getUuidv4();
|
|
94310
|
+
}
|
|
94311
|
+
|
|
94312
|
+
if (this.checkFileSize(file)) {
|
|
94313
|
+
file._sizeInvalid = true;
|
|
94314
|
+
file.status = FILE_STATUS_VALID_FAIL;
|
|
94315
|
+
|
|
94316
|
+
this._adapter.notifySizeError(file, fileList);
|
|
94317
|
+
}
|
|
94318
|
+
|
|
94319
|
+
if (transformFile) {
|
|
94320
|
+
file = transformFile(file);
|
|
94321
|
+
}
|
|
94322
|
+
|
|
94323
|
+
return file;
|
|
94324
|
+
});
|
|
94325
|
+
const total = fileList.length + currentFileList.length;
|
|
94326
|
+
|
|
94327
|
+
if (typeof limit !== 'undefined') {
|
|
94328
|
+
// 判断是否超出限制
|
|
94329
|
+
// Determine whether the limit is exceeded
|
|
94330
|
+
if (total > limit) {
|
|
94331
|
+
if (limit === 1) {
|
|
94332
|
+
// 使用最后面的文件对当前文件进行替换
|
|
94333
|
+
// Use the last file to replace the current file
|
|
94334
|
+
currentFileList = slice_default()(currentFileList).call(currentFileList, -1);
|
|
94335
|
+
|
|
94336
|
+
this._adapter.notifyFileSelect(currentFileList);
|
|
94337
|
+
|
|
94338
|
+
this._adapter.resetInput();
|
|
94339
|
+
|
|
94340
|
+
this.replaceFileList(currentFileList);
|
|
94341
|
+
return;
|
|
94342
|
+
} // 如果超出了限制,则计算还能添加几个文件,将剩余的文件继续上传
|
|
94343
|
+
// If the limit is exceeded, several files can be added to the calculation, and the remaining files will continue to be uploaded
|
|
94344
|
+
|
|
94345
|
+
|
|
94346
|
+
const restNum = limit - fileList.length;
|
|
94347
|
+
currentFileList = slice_default()(currentFileList).call(currentFileList, 0, restNum);
|
|
94348
|
+
|
|
94349
|
+
this._adapter.notifyExceed(currentFileList);
|
|
94350
|
+
}
|
|
94351
|
+
}
|
|
94352
|
+
|
|
94353
|
+
const fileItemList = map_default()(currentFileList).call(currentFileList, file => this.buildFileItem(file, uploadTrigger));
|
|
94354
|
+
|
|
94355
|
+
const newFileList = slice_default()(fileList).call(fileList);
|
|
94356
|
+
|
|
94357
|
+
if (typeof index !== 'undefined') {
|
|
94358
|
+
splice_default()(newFileList).call(newFileList, index, 0, ...fileItemList);
|
|
94359
|
+
} else {
|
|
94360
|
+
newFileList.push(...fileItemList);
|
|
94361
|
+
}
|
|
94362
|
+
|
|
94363
|
+
this._adapter.notifyFileSelect(currentFileList);
|
|
94364
|
+
|
|
94365
|
+
this._adapter.notifyChange({
|
|
94366
|
+
fileList: newFileList,
|
|
94367
|
+
currentFile: null
|
|
94368
|
+
});
|
|
94369
|
+
|
|
94370
|
+
this._adapter.updateFileList(newFileList, () => {
|
|
94371
|
+
if (uploadTrigger === foundation_TRIGGER_AUTO) {
|
|
94372
|
+
this.startUpload(fileItemList);
|
|
94373
|
+
}
|
|
94374
|
+
});
|
|
93951
94375
|
}
|
|
93952
94376
|
|
|
93953
94377
|
manualUpload() {
|
|
@@ -94817,16 +95241,23 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
94817
95241
|
status,
|
|
94818
95242
|
disabled,
|
|
94819
95243
|
style,
|
|
94820
|
-
onPreviewClick
|
|
95244
|
+
onPreviewClick,
|
|
95245
|
+
showPicInfo,
|
|
95246
|
+
renderPicInfo,
|
|
95247
|
+
renderThumbnail,
|
|
95248
|
+
name,
|
|
95249
|
+
index
|
|
94821
95250
|
} = this.props;
|
|
95251
|
+
const showProgress = status === upload_constants_strings.FILE_STATUS_UPLOADING && percent !== 100;
|
|
95252
|
+
const showRetry = status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL && this.props.showRetry;
|
|
95253
|
+
const showReplace = status === upload_constants_strings.FILE_STATUS_SUCCESS && this.props.showReplace;
|
|
94822
95254
|
const filePicCardCls = classnames_default()({
|
|
94823
95255
|
["".concat(fileCard_prefixCls, "-picture-file-card")]: true,
|
|
94824
95256
|
["".concat(fileCard_prefixCls, "-picture-file-card-disabled")]: disabled,
|
|
94825
|
-
["".concat(fileCard_prefixCls, "-picture-file-card-show-pointer")]: typeof onPreviewClick !== 'undefined'
|
|
95257
|
+
["".concat(fileCard_prefixCls, "-picture-file-card-show-pointer")]: typeof onPreviewClick !== 'undefined',
|
|
95258
|
+
["".concat(fileCard_prefixCls, "-picture-file-card-error")]: status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL,
|
|
95259
|
+
["".concat(fileCard_prefixCls, "-picture-file-card-uploading")]: showProgress
|
|
94826
95260
|
});
|
|
94827
|
-
const showProgress = status === upload_constants_strings.FILE_STATUS_UPLOADING && percent !== 100;
|
|
94828
|
-
const showRetry = status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL && this.props.showRetry;
|
|
94829
|
-
const showReplace = status === upload_constants_strings.FILE_STATUS_SUCCESS && this.props.showReplace;
|
|
94830
95261
|
const closeCls = "".concat(fileCard_prefixCls, "-picture-file-card-close");
|
|
94831
95262
|
const retry = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
94832
95263
|
className: "".concat(fileCard_prefixCls, "-picture-file-card-retry"),
|
|
@@ -94846,47 +95277,38 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
94846
95277
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(ReplaceSvg, {
|
|
94847
95278
|
className: "".concat(fileCard_prefixCls, "-picture-file-card-icon-replace")
|
|
94848
95279
|
})));
|
|
95280
|
+
const picInfo = typeof renderPicInfo === 'function' ? renderPicInfo(this.props) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95281
|
+
className: "".concat(fileCard_prefixCls, "-picture-file-card-pic-info")
|
|
95282
|
+
}, index + 1);
|
|
95283
|
+
const thumbnail = typeof renderThumbnail === 'function' ? renderThumbnail(this.props) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("img", {
|
|
95284
|
+
src: url,
|
|
95285
|
+
alt: "picture of ".concat(name)
|
|
95286
|
+
});
|
|
94849
95287
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
94850
95288
|
className: filePicCardCls,
|
|
94851
95289
|
style: style,
|
|
94852
95290
|
onClick: onPreviewClick
|
|
94853
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
|
94854
|
-
src: url
|
|
94855
|
-
}), showProgress ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(progress_0, {
|
|
95291
|
+
}, thumbnail, showProgress ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(progress_0, {
|
|
94856
95292
|
percent: percent,
|
|
94857
95293
|
type: "circle",
|
|
94858
95294
|
size: "small",
|
|
94859
95295
|
orbitStroke: '#FFF'
|
|
94860
|
-
}) : null, showRetry ? retry : null, showReplace && replace,
|
|
94861
|
-
className: closeCls
|
|
94862
|
-
onClick: e => this.onRemove(e)
|
|
95296
|
+
}) : null, showRetry ? retry : null, showReplace && replace, showPicInfo && picInfo, !disabled && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95297
|
+
className: closeCls
|
|
94863
95298
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, {
|
|
94864
|
-
size: "extra-small"
|
|
95299
|
+
size: "extra-small",
|
|
95300
|
+
onClick: e => this.onRemove(e)
|
|
94865
95301
|
})), this.renderPicValidateMsg());
|
|
94866
95302
|
}
|
|
94867
95303
|
|
|
94868
|
-
|
|
94869
|
-
e.stopPropagation();
|
|
94870
|
-
this.props.onRemove(this.props, e);
|
|
94871
|
-
}
|
|
94872
|
-
|
|
94873
|
-
onReplace(e) {
|
|
94874
|
-
e.stopPropagation();
|
|
94875
|
-
this.props.onReplace(this.props, e);
|
|
94876
|
-
}
|
|
94877
|
-
|
|
94878
|
-
onRetry(e) {
|
|
94879
|
-
e.stopPropagation();
|
|
94880
|
-
this.props.onRetry(this.props, e);
|
|
94881
|
-
}
|
|
94882
|
-
|
|
94883
|
-
render() {
|
|
95304
|
+
renderFile(locale) {
|
|
94884
95305
|
const {
|
|
94885
95306
|
name,
|
|
94886
95307
|
size,
|
|
94887
95308
|
percent,
|
|
94888
95309
|
url,
|
|
94889
|
-
|
|
95310
|
+
showRetry: propsShowRetry,
|
|
95311
|
+
showReplace: propsShowReplace,
|
|
94890
95312
|
preview,
|
|
94891
95313
|
previewFile,
|
|
94892
95314
|
status,
|
|
@@ -94907,15 +95329,8 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
94907
95329
|
const replaceCls = "".concat(fileCard_prefixCls, "-file-card-replace");
|
|
94908
95330
|
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
|
|
94909
95331
|
|
|
94910
|
-
const showRetry = status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL &&
|
|
94911
|
-
const showReplace = status === upload_constants_strings.FILE_STATUS_SUCCESS &&
|
|
94912
|
-
|
|
94913
|
-
if (listType === upload_constants_strings.FILE_LIST_PIC) {
|
|
94914
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
|
|
94915
|
-
componentName: "Upload"
|
|
94916
|
-
}, locale => this.renderPic(locale));
|
|
94917
|
-
}
|
|
94918
|
-
|
|
95332
|
+
const showRetry = status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL && propsShowRetry;
|
|
95333
|
+
const showReplace = status === upload_constants_strings.FILE_STATUS_SUCCESS && propsShowReplace;
|
|
94919
95334
|
const fileSize = this.transSize(size);
|
|
94920
95335
|
let previewContent = preview ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("img", {
|
|
94921
95336
|
src: url
|
|
@@ -94927,9 +95342,7 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
94927
95342
|
previewContent = previewFile(this.props);
|
|
94928
95343
|
}
|
|
94929
95344
|
|
|
94930
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
|
94931
|
-
componentName: "Upload"
|
|
94932
|
-
}, locale => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95345
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
94933
95346
|
className: fileCardCls,
|
|
94934
95347
|
style: style,
|
|
94935
95348
|
onClick: onPreviewClick
|
|
@@ -94974,7 +95387,42 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
94974
95387
|
theme: "borderless",
|
|
94975
95388
|
size: "small",
|
|
94976
95389
|
className: closeCls
|
|
94977
|
-
}))
|
|
95390
|
+
}));
|
|
95391
|
+
}
|
|
95392
|
+
|
|
95393
|
+
onRemove(e) {
|
|
95394
|
+
e.stopPropagation();
|
|
95395
|
+
this.props.onRemove(this.props, e);
|
|
95396
|
+
}
|
|
95397
|
+
|
|
95398
|
+
onReplace(e) {
|
|
95399
|
+
e.stopPropagation();
|
|
95400
|
+
this.props.onReplace(this.props, e);
|
|
95401
|
+
}
|
|
95402
|
+
|
|
95403
|
+
onRetry(e) {
|
|
95404
|
+
e.stopPropagation();
|
|
95405
|
+
this.props.onRetry(this.props, e);
|
|
95406
|
+
}
|
|
95407
|
+
|
|
95408
|
+
render() {
|
|
95409
|
+
const {
|
|
95410
|
+
listType
|
|
95411
|
+
} = this.props;
|
|
95412
|
+
|
|
95413
|
+
if (listType === upload_constants_strings.FILE_LIST_PIC) {
|
|
95414
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
|
|
95415
|
+
componentName: "Upload"
|
|
95416
|
+
}, locale => this.renderPic(locale));
|
|
95417
|
+
}
|
|
95418
|
+
|
|
95419
|
+
if (listType === upload_constants_strings.FILE_LIST_DEFAULT) {
|
|
95420
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
|
|
95421
|
+
componentName: "Upload"
|
|
95422
|
+
}, locale => this.renderFile(locale));
|
|
95423
|
+
}
|
|
95424
|
+
|
|
95425
|
+
return null;
|
|
94978
95426
|
}
|
|
94979
95427
|
|
|
94980
95428
|
}
|
|
@@ -94997,7 +95445,8 @@ fileCard_FileCard.propTypes = {
|
|
|
94997
95445
|
status: prop_types_default.a.string,
|
|
94998
95446
|
style: prop_types_default.a.object,
|
|
94999
95447
|
url: prop_types_default.a.string,
|
|
95000
|
-
validateMessage: prop_types_default.a.node
|
|
95448
|
+
validateMessage: prop_types_default.a.node,
|
|
95449
|
+
index: prop_types_default.a.number
|
|
95001
95450
|
};
|
|
95002
95451
|
fileCard_FileCard.defaultProps = {
|
|
95003
95452
|
listType: upload_constants_strings.FILE_LIST_DEFAULT,
|
|
@@ -95088,6 +95537,23 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95088
95537
|
this.remove = fileItem => {
|
|
95089
95538
|
this.foundation.handleRemove(fileItem);
|
|
95090
95539
|
};
|
|
95540
|
+
/**
|
|
95541
|
+
* ref method
|
|
95542
|
+
* insert files at index
|
|
95543
|
+
* @param files Array<CustomFile>
|
|
95544
|
+
* @param index number
|
|
95545
|
+
* @returns
|
|
95546
|
+
*/
|
|
95547
|
+
|
|
95548
|
+
|
|
95549
|
+
this.insert = (files, index) => {
|
|
95550
|
+
return this.foundation.insertFileToList(files, index);
|
|
95551
|
+
};
|
|
95552
|
+
/**
|
|
95553
|
+
* ref method
|
|
95554
|
+
* manual upload by user
|
|
95555
|
+
*/
|
|
95556
|
+
|
|
95091
95557
|
|
|
95092
95558
|
this.upload = () => {
|
|
95093
95559
|
const {
|
|
@@ -95103,14 +95569,18 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95103
95569
|
name,
|
|
95104
95570
|
status,
|
|
95105
95571
|
validateMessage,
|
|
95106
|
-
_sizeInvalid
|
|
95572
|
+
_sizeInvalid,
|
|
95573
|
+
uid
|
|
95107
95574
|
} = file;
|
|
95108
95575
|
const {
|
|
95109
95576
|
previewFile,
|
|
95110
95577
|
listType,
|
|
95111
95578
|
itemStyle,
|
|
95112
95579
|
showRetry,
|
|
95580
|
+
showPicInfo,
|
|
95581
|
+
renderPicInfo,
|
|
95113
95582
|
renderFileItem,
|
|
95583
|
+
renderThumbnail,
|
|
95114
95584
|
disabled,
|
|
95115
95585
|
onPreviewClick,
|
|
95116
95586
|
showReplace
|
|
@@ -95131,10 +95601,14 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95131
95601
|
listType,
|
|
95132
95602
|
onRemove,
|
|
95133
95603
|
onRetry,
|
|
95134
|
-
|
|
95604
|
+
index,
|
|
95605
|
+
key: uid || concat_default()(_context = "".concat(name)).call(_context, index),
|
|
95135
95606
|
showRetry: typeof file.showRetry !== 'undefined' ? file.showRetry : showRetry,
|
|
95136
95607
|
style: itemStyle,
|
|
95137
95608
|
disabled,
|
|
95609
|
+
showPicInfo,
|
|
95610
|
+
renderPicInfo,
|
|
95611
|
+
renderThumbnail,
|
|
95138
95612
|
showReplace: typeof file.showReplace !== 'undefined' ? file.showReplace : showReplace,
|
|
95139
95613
|
onReplace,
|
|
95140
95614
|
onPreviewClick: typeof onPreviewClick !== 'undefined' ? () => this.foundation.handlePreviewClick(file) : undefined
|
|
@@ -95156,27 +95630,69 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95156
95630
|
};
|
|
95157
95631
|
|
|
95158
95632
|
this.renderFileList = () => {
|
|
95633
|
+
const {
|
|
95634
|
+
listType
|
|
95635
|
+
} = this.props;
|
|
95636
|
+
|
|
95637
|
+
if (listType === upload_constants_strings.FILE_LIST_PIC) {
|
|
95638
|
+
return this.renderFileListPic();
|
|
95639
|
+
}
|
|
95640
|
+
|
|
95641
|
+
if (listType === upload_constants_strings.FILE_LIST_DEFAULT) {
|
|
95642
|
+
return this.renderFileListDefault();
|
|
95643
|
+
}
|
|
95644
|
+
|
|
95645
|
+
return null;
|
|
95646
|
+
};
|
|
95647
|
+
|
|
95648
|
+
this.renderFileListPic = () => {
|
|
95159
95649
|
const {
|
|
95160
95650
|
showUploadList,
|
|
95161
|
-
listType,
|
|
95162
95651
|
limit,
|
|
95163
95652
|
disabled,
|
|
95164
|
-
children
|
|
95653
|
+
children,
|
|
95654
|
+
draggable
|
|
95165
95655
|
} = this.props;
|
|
95166
95656
|
const {
|
|
95167
|
-
fileList: stateFileList
|
|
95657
|
+
fileList: stateFileList,
|
|
95658
|
+
dragAreaStatus
|
|
95168
95659
|
} = this.state;
|
|
95169
95660
|
const fileList = this.props.fileList || stateFileList;
|
|
95170
|
-
const
|
|
95171
|
-
const
|
|
95661
|
+
const showAddTriggerInList = limit ? limit > fileList.length : true;
|
|
95662
|
+
const dragAreaBaseCls = "".concat(upload_prefixCls, "-drag-area");
|
|
95172
95663
|
const uploadAddCls = classnames_default()("".concat(upload_prefixCls, "-add"), {
|
|
95173
|
-
["".concat(upload_prefixCls, "-picture-add")]:
|
|
95664
|
+
["".concat(upload_prefixCls, "-picture-add")]: true,
|
|
95174
95665
|
["".concat(upload_prefixCls, "-picture-add-disabled")]: disabled
|
|
95175
95666
|
});
|
|
95176
|
-
const
|
|
95667
|
+
const fileListCls = classnames_default()("".concat(upload_prefixCls, "-file-list"), {
|
|
95668
|
+
["".concat(upload_prefixCls, "-picture-file-list")]: true
|
|
95669
|
+
});
|
|
95670
|
+
const dragAreaCls = classnames_default()({
|
|
95671
|
+
["".concat(dragAreaBaseCls, "-legal")]: dragAreaStatus === upload_constants_strings.DRAG_AREA_LEGAL,
|
|
95672
|
+
["".concat(dragAreaBaseCls, "-illegal")]: dragAreaStatus === upload_constants_strings.DRAG_AREA_ILLEGAL
|
|
95673
|
+
});
|
|
95674
|
+
const mainCls = "".concat(upload_prefixCls, "-file-list-main");
|
|
95675
|
+
const addContentProps = {
|
|
95177
95676
|
className: uploadAddCls,
|
|
95178
95677
|
onClick: this.onClick
|
|
95179
|
-
}
|
|
95678
|
+
};
|
|
95679
|
+
const containerProps = {
|
|
95680
|
+
className: fileListCls
|
|
95681
|
+
};
|
|
95682
|
+
const draggableProps = {
|
|
95683
|
+
onDrop: this.onDrop,
|
|
95684
|
+
onDragOver: this.onDragOver,
|
|
95685
|
+
onDragLeave: this.onDragLeave,
|
|
95686
|
+
onDragEnter: this.onDragEnter
|
|
95687
|
+
};
|
|
95688
|
+
|
|
95689
|
+
if (draggable) {
|
|
95690
|
+
assign_default()(addContentProps, draggableProps, {
|
|
95691
|
+
className: classnames_default()(uploadAddCls, dragAreaCls)
|
|
95692
|
+
});
|
|
95693
|
+
}
|
|
95694
|
+
|
|
95695
|
+
const addContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", assign_default()({}, addContentProps), children);
|
|
95180
95696
|
|
|
95181
95697
|
if (!showUploadList || !fileList.length) {
|
|
95182
95698
|
if (showAddTriggerInList) {
|
|
@@ -95186,18 +95702,39 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95186
95702
|
return null;
|
|
95187
95703
|
}
|
|
95188
95704
|
|
|
95189
|
-
|
|
95190
|
-
|
|
95191
|
-
})
|
|
95705
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
|
|
95706
|
+
componentName: "Upload"
|
|
95707
|
+
}, 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", {
|
|
95708
|
+
className: mainCls
|
|
95709
|
+
}, map_default()(fileList).call(fileList, (file, index) => this.renderFile(file, index, locale)), showAddTriggerInList ? addContent : null)));
|
|
95710
|
+
};
|
|
95711
|
+
|
|
95712
|
+
this.renderFileListDefault = () => {
|
|
95713
|
+
const {
|
|
95714
|
+
showUploadList,
|
|
95715
|
+
limit,
|
|
95716
|
+
disabled
|
|
95717
|
+
} = this.props;
|
|
95718
|
+
const {
|
|
95719
|
+
fileList: stateFileList
|
|
95720
|
+
} = this.state;
|
|
95721
|
+
const fileList = this.props.fileList || stateFileList;
|
|
95722
|
+
const fileListCls = classnames_default()("".concat(upload_prefixCls, "-file-list"));
|
|
95192
95723
|
const titleCls = "".concat(upload_prefixCls, "-file-list-title");
|
|
95193
95724
|
const mainCls = "".concat(upload_prefixCls, "-file-list-main");
|
|
95194
|
-
const showTitle = limit !== 1 && fileList.length
|
|
95725
|
+
const showTitle = limit !== 1 && fileList.length;
|
|
95195
95726
|
const showClear = this.props.showClear && !disabled;
|
|
95727
|
+
const containerProps = {
|
|
95728
|
+
className: fileListCls
|
|
95729
|
+
};
|
|
95730
|
+
|
|
95731
|
+
if (!showUploadList || !fileList.length) {
|
|
95732
|
+
return null;
|
|
95733
|
+
}
|
|
95734
|
+
|
|
95196
95735
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
|
|
95197
95736
|
componentName: "Upload"
|
|
95198
|
-
}, locale => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95199
|
-
className: fileListCls
|
|
95200
|
-
}, showTitle ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95737
|
+
}, 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", {
|
|
95201
95738
|
className: titleCls
|
|
95202
95739
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
95203
95740
|
className: "".concat(titleCls, "-choosen")
|
|
@@ -95206,7 +95743,7 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95206
95743
|
className: "".concat(titleCls, "-clear")
|
|
95207
95744
|
}, locale.clear) : null) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95208
95745
|
className: mainCls
|
|
95209
|
-
}, map_default()(fileList).call(fileList, (file, index) => this.renderFile(file, index, locale))
|
|
95746
|
+
}, map_default()(fileList).call(fileList, (file, index) => this.renderFile(file, index, locale)))));
|
|
95210
95747
|
};
|
|
95211
95748
|
|
|
95212
95749
|
this.onDrop = e => {
|
|
@@ -95226,6 +95763,28 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95226
95763
|
this.foundation.handleDragEnter(e);
|
|
95227
95764
|
};
|
|
95228
95765
|
|
|
95766
|
+
this.renderAddContent = () => {
|
|
95767
|
+
const {
|
|
95768
|
+
draggable,
|
|
95769
|
+
children,
|
|
95770
|
+
listType
|
|
95771
|
+
} = this.props;
|
|
95772
|
+
const uploadAddCls = classnames_default()("".concat(upload_prefixCls, "-add"));
|
|
95773
|
+
|
|
95774
|
+
if (listType === upload_constants_strings.FILE_LIST_PIC) {
|
|
95775
|
+
return null;
|
|
95776
|
+
}
|
|
95777
|
+
|
|
95778
|
+
if (draggable) {
|
|
95779
|
+
return this.renderDragArea();
|
|
95780
|
+
}
|
|
95781
|
+
|
|
95782
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95783
|
+
className: uploadAddCls,
|
|
95784
|
+
onClick: this.onClick
|
|
95785
|
+
}, children);
|
|
95786
|
+
};
|
|
95787
|
+
|
|
95229
95788
|
this.renderDragArea = () => {
|
|
95230
95789
|
const {
|
|
95231
95790
|
dragAreaStatus
|
|
@@ -95283,6 +95842,14 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95283
95842
|
this.inputRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
|
|
95284
95843
|
this.replaceInputRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
|
|
95285
95844
|
}
|
|
95845
|
+
/**
|
|
95846
|
+
* Notes:
|
|
95847
|
+
* The input parameter and return value here do not declare the type, otherwise tsc may report an error in form/fields.tsx when wrap after withField
|
|
95848
|
+
* `The types of the parameters "props" and "nextProps" are incompatible.
|
|
95849
|
+
The attribute "action" is missing in the type "Readonly<any>", but it is required in the type "UploadProps".`
|
|
95850
|
+
* which seems to be a bug, remove props type declare here
|
|
95851
|
+
*/
|
|
95852
|
+
|
|
95286
95853
|
|
|
95287
95854
|
static getDerivedStateFromProps(props) {
|
|
95288
95855
|
const {
|
|
@@ -95404,7 +95971,6 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95404
95971
|
["".concat(upload_prefixCls, "-warning")]: validateStatus === 'warning',
|
|
95405
95972
|
["".concat(upload_prefixCls, "-success")]: validateStatus === 'success'
|
|
95406
95973
|
}, className);
|
|
95407
|
-
const uploadAddCls = classnames_default()("".concat(upload_prefixCls, "-add"));
|
|
95408
95974
|
const inputCls = classnames_default()("".concat(upload_prefixCls, "-hidden-input"));
|
|
95409
95975
|
const inputReplaceCls = classnames_default()("".concat(upload_prefixCls, "-hidden-input-replace"));
|
|
95410
95976
|
const promptCls = classnames_default()("".concat(upload_prefixCls, "-prompt"));
|
|
@@ -95413,10 +95979,6 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95413
95979
|
directory: 'directory',
|
|
95414
95980
|
webkitdirectory: 'webkitdirectory'
|
|
95415
95981
|
} : {};
|
|
95416
|
-
const addContent = listType !== upload_constants_strings.FILE_LIST_PIC ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95417
|
-
className: uploadAddCls,
|
|
95418
|
-
onClick: this.onClick
|
|
95419
|
-
}, children) : null;
|
|
95420
95982
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95421
95983
|
className: uploadCls,
|
|
95422
95984
|
style: style,
|
|
@@ -95442,7 +96004,7 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
95442
96004
|
tabIndex: -1,
|
|
95443
96005
|
className: inputReplaceCls,
|
|
95444
96006
|
ref: this.replaceInputRef
|
|
95445
|
-
}),
|
|
96007
|
+
}), this.renderAddContent(), prompt ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95446
96008
|
className: promptCls
|
|
95447
96009
|
}, prompt) : null, validateMessage ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
95448
96010
|
className: validateMsgCls
|
|
@@ -95497,7 +96059,10 @@ upload_Upload.propTypes = {
|
|
|
95497
96059
|
prompt: prop_types_default.a.node,
|
|
95498
96060
|
promptPosition: prop_types_default.a.oneOf(upload_constants_strings.PROMPT_POSITION),
|
|
95499
96061
|
renderFileItem: prop_types_default.a.func,
|
|
96062
|
+
renderPicInfo: prop_types_default.a.func,
|
|
96063
|
+
renderThumbnail: prop_types_default.a.func,
|
|
95500
96064
|
showClear: prop_types_default.a.bool,
|
|
96065
|
+
showPicInfo: prop_types_default.a.bool,
|
|
95501
96066
|
showReplace: prop_types_default.a.bool,
|
|
95502
96067
|
showRetry: prop_types_default.a.bool,
|
|
95503
96068
|
showUploadList: prop_types_default.a.bool,
|
|
@@ -95531,6 +96096,7 @@ upload_Upload.defaultProps = {
|
|
|
95531
96096
|
onSuccess: noop_default.a,
|
|
95532
96097
|
promptPosition: 'right',
|
|
95533
96098
|
showClear: true,
|
|
96099
|
+
showPicInfo: false,
|
|
95534
96100
|
showReplace: false,
|
|
95535
96101
|
showRetry: true,
|
|
95536
96102
|
showUploadList: true,
|
|
@@ -95660,6 +96226,9 @@ function _defineProperties(target, props) {
|
|
|
95660
96226
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
95661
96227
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
95662
96228
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
96229
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
96230
|
+
writable: false
|
|
96231
|
+
});
|
|
95663
96232
|
return Constructor;
|
|
95664
96233
|
}
|
|
95665
96234
|
// EXTERNAL MODULE: /Users/daiqiang/Project/semi-design/node_modules/@babel/runtime/helpers/typeof.js
|
|
@@ -95692,12 +96261,15 @@ function _inherits(subClass, superClass) {
|
|
|
95692
96261
|
throw new TypeError("Super expression must either be null or a function");
|
|
95693
96262
|
}
|
|
95694
96263
|
|
|
95695
|
-
|
|
95696
|
-
|
|
95697
|
-
|
|
95698
|
-
|
|
95699
|
-
|
|
95700
|
-
|
|
96264
|
+
Object.defineProperty(subClass, "prototype", {
|
|
96265
|
+
value: Object.create(superClass && superClass.prototype, {
|
|
96266
|
+
constructor: {
|
|
96267
|
+
value: subClass,
|
|
96268
|
+
writable: true,
|
|
96269
|
+
configurable: true
|
|
96270
|
+
}
|
|
96271
|
+
}),
|
|
96272
|
+
writable: false
|
|
95701
96273
|
});
|
|
95702
96274
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
95703
96275
|
}
|
|
@@ -99952,7 +100524,9 @@ function withField(Component, opts) {
|
|
|
99952
100524
|
// Return without injection, eg: <Checkbox> / <Radio> inside CheckboxGroup/RadioGroup
|
|
99953
100525
|
|
|
99954
100526
|
if (!shouldInject) {
|
|
99955
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(Component, assign_default()({}, rest
|
|
100527
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(Component, assign_default()({}, rest, {
|
|
100528
|
+
ref: ref
|
|
100529
|
+
}));
|
|
99956
100530
|
} // grab formState from context
|
|
99957
100531
|
|
|
99958
100532
|
|