@douyinfe/semi-ui 2.53.3-alpha.0 → 2.54.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/dist/css/semi.css +9 -0
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +193 -64
- 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/lib/cjs/anchor/index.d.ts +1 -1
- package/lib/cjs/autoComplete/index.d.ts +1 -1
- package/lib/cjs/button/Button.d.ts +1 -1
- package/lib/cjs/button/buttonGroup.d.ts +1 -1
- package/lib/cjs/button/index.d.ts +1 -1
- package/lib/cjs/cascader/index.d.ts +3 -0
- package/lib/cjs/cascader/index.js +11 -4
- package/lib/cjs/collapsible/index.d.ts +1 -0
- package/lib/cjs/collapsible/index.js +4 -3
- package/lib/cjs/datePicker/datePicker.d.ts +1 -1
- package/lib/cjs/descriptions/descriptions-context.d.ts +2 -0
- package/lib/cjs/descriptions/index.d.ts +17 -4
- package/lib/cjs/descriptions/index.js +52 -16
- package/lib/cjs/descriptions/item.d.ts +1 -0
- package/lib/cjs/descriptions/item.js +20 -13
- package/lib/cjs/form/baseForm.d.ts +2 -2
- package/lib/cjs/form/field.d.ts +2 -2
- package/lib/cjs/image/interface.d.ts +1 -0
- package/lib/cjs/image/previewInner.js +6 -0
- package/lib/cjs/input/index.d.ts +1 -1
- package/lib/cjs/input/inputGroup.d.ts +1 -1
- package/lib/cjs/modal/Modal.d.ts +4 -4
- package/lib/cjs/modal/Modal.js +12 -11
- package/lib/cjs/modal/confirm.d.ts +9 -9
- package/lib/cjs/rating/index.d.ts +1 -1
- package/lib/cjs/rating/item.d.ts +1 -1
- package/lib/cjs/switch/index.d.ts +1 -1
- package/lib/cjs/table/Table.d.ts +2 -2
- package/lib/cjs/table/index.d.ts +1 -1
- package/lib/cjs/tagInput/index.d.ts +1 -1
- package/lib/cjs/timePicker/TimePicker.d.ts +1 -1
- package/lib/cjs/timePicker/index.d.ts +1 -1
- package/lib/cjs/toast/index.js +3 -0
- package/lib/cjs/typography/base.js +4 -4
- package/lib/cjs/typography/title.d.ts +2 -2
- package/lib/es/anchor/index.d.ts +1 -1
- package/lib/es/autoComplete/index.d.ts +1 -1
- package/lib/es/button/Button.d.ts +1 -1
- package/lib/es/button/buttonGroup.d.ts +1 -1
- package/lib/es/button/index.d.ts +1 -1
- package/lib/es/cascader/index.d.ts +3 -0
- package/lib/es/cascader/index.js +11 -4
- package/lib/es/collapsible/index.d.ts +1 -0
- package/lib/es/collapsible/index.js +4 -3
- package/lib/es/datePicker/datePicker.d.ts +1 -1
- package/lib/es/descriptions/descriptions-context.d.ts +2 -0
- package/lib/es/descriptions/index.d.ts +17 -4
- package/lib/es/descriptions/index.js +52 -14
- package/lib/es/descriptions/item.d.ts +1 -0
- package/lib/es/descriptions/item.js +20 -13
- package/lib/es/form/baseForm.d.ts +2 -2
- package/lib/es/form/field.d.ts +2 -2
- package/lib/es/image/interface.d.ts +1 -0
- package/lib/es/image/previewInner.js +6 -0
- package/lib/es/input/index.d.ts +1 -1
- package/lib/es/input/inputGroup.d.ts +1 -1
- package/lib/es/modal/Modal.d.ts +4 -4
- package/lib/es/modal/Modal.js +12 -11
- package/lib/es/modal/confirm.d.ts +9 -9
- package/lib/es/rating/index.d.ts +1 -1
- package/lib/es/rating/item.d.ts +1 -1
- package/lib/es/switch/index.d.ts +1 -1
- package/lib/es/table/Table.d.ts +2 -2
- package/lib/es/table/index.d.ts +1 -1
- package/lib/es/tagInput/index.d.ts +1 -1
- package/lib/es/timePicker/TimePicker.d.ts +1 -1
- package/lib/es/timePicker/index.d.ts +1 -1
- package/lib/es/toast/index.js +3 -0
- package/lib/es/typography/base.js +4 -4
- package/lib/es/typography/title.d.ts +2 -2
- package/package.json +8 -8
package/dist/umd/semi-ui.js
CHANGED
|
@@ -23257,11 +23257,11 @@ class Base extends external_root_React_commonjs2_react_commonjs_react_amd_react_
|
|
|
23257
23257
|
copied: false,
|
|
23258
23258
|
// ellipsis
|
|
23259
23259
|
// if text is overflow in container
|
|
23260
|
-
isOverflowed:
|
|
23260
|
+
isOverflowed: false,
|
|
23261
23261
|
ellipsisContent: props.children,
|
|
23262
23262
|
expanded: false,
|
|
23263
23263
|
// if text is truncated with js
|
|
23264
|
-
isTruncated:
|
|
23264
|
+
isTruncated: false,
|
|
23265
23265
|
prevChildren: null
|
|
23266
23266
|
};
|
|
23267
23267
|
this.wrapperRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createRef();
|
|
@@ -23282,10 +23282,10 @@ class Base extends external_root_React_commonjs2_react_commonjs_react_amd_react_
|
|
|
23282
23282
|
newState.prevChildren = props.children;
|
|
23283
23283
|
if (props.ellipsis && prevChildren !== props.children) {
|
|
23284
23284
|
// reset ellipsis state if children update
|
|
23285
|
-
newState.isOverflowed =
|
|
23285
|
+
newState.isOverflowed = false;
|
|
23286
23286
|
newState.ellipsisContent = props.children;
|
|
23287
23287
|
newState.expanded = false;
|
|
23288
|
-
newState.isTruncated =
|
|
23288
|
+
newState.isTruncated = false;
|
|
23289
23289
|
}
|
|
23290
23290
|
return newState;
|
|
23291
23291
|
}
|
|
@@ -36386,7 +36386,9 @@ const cascader_constants_strings = {
|
|
|
36386
36386
|
/* Merge Type */
|
|
36387
36387
|
LEAF_ONLY_MERGE_TYPE: 'leafOnly',
|
|
36388
36388
|
AUTO_MERGE_VALUE_MERGE_TYPE: 'autoMergeValue',
|
|
36389
|
-
NONE_MERGE_TYPE: 'none'
|
|
36389
|
+
NONE_MERGE_TYPE: 'none',
|
|
36390
|
+
SEARCH_POSITION_TRIGGER: 'trigger',
|
|
36391
|
+
SEARCH_POSITION_CUSTOM: 'custom'
|
|
36390
36392
|
};
|
|
36391
36393
|
const cascader_constants_numbers = {};
|
|
36392
36394
|
|
|
@@ -47047,6 +47049,10 @@ const resetkey = 0;
|
|
|
47047
47049
|
class Cascader extends BaseComponent {
|
|
47048
47050
|
constructor(props) {
|
|
47049
47051
|
super(props);
|
|
47052
|
+
// ref method
|
|
47053
|
+
this.search = value => {
|
|
47054
|
+
this.handleInputChange(value);
|
|
47055
|
+
};
|
|
47050
47056
|
this.handleInputChange = value => {
|
|
47051
47057
|
this.foundation.handleInputChange(value);
|
|
47052
47058
|
};
|
|
@@ -47233,12 +47239,13 @@ class Cascader extends BaseComponent {
|
|
|
47233
47239
|
const {
|
|
47234
47240
|
placeholder,
|
|
47235
47241
|
filterTreeNode,
|
|
47236
|
-
multiple
|
|
47242
|
+
multiple,
|
|
47243
|
+
searchPosition
|
|
47237
47244
|
} = this.props;
|
|
47238
47245
|
const {
|
|
47239
47246
|
checkedKeys
|
|
47240
47247
|
} = this.state;
|
|
47241
|
-
const searchable = Boolean(filterTreeNode);
|
|
47248
|
+
const searchable = Boolean(filterTreeNode) && searchPosition === cascader_constants_strings.SEARCH_POSITION_TRIGGER;
|
|
47242
47249
|
if (!searchable) {
|
|
47243
47250
|
if (multiple) {
|
|
47244
47251
|
if (checkedKeys.size === 0) {
|
|
@@ -47998,7 +48005,8 @@ Cascader.propTypes = {
|
|
|
47998
48005
|
leafOnly: (prop_types_default()).bool,
|
|
47999
48006
|
enableLeafClick: (prop_types_default()).bool,
|
|
48000
48007
|
preventScroll: (prop_types_default()).bool,
|
|
48001
|
-
position: (prop_types_default()).string
|
|
48008
|
+
position: (prop_types_default()).string,
|
|
48009
|
+
searchPosition: (prop_types_default()).string
|
|
48002
48010
|
};
|
|
48003
48011
|
Cascader.defaultProps = getDefaultPropsFromGlobalConfig(Cascader.__SemiComponentName__, {
|
|
48004
48012
|
borderless: false,
|
|
@@ -48029,7 +48037,8 @@ Cascader.defaultProps = getDefaultPropsFromGlobalConfig(Cascader.__SemiComponent
|
|
|
48029
48037
|
onDropdownVisibleChange: (noop_default()),
|
|
48030
48038
|
onListScroll: (noop_default()),
|
|
48031
48039
|
enableLeafClick: false,
|
|
48032
|
-
'aria-label': 'Cascader'
|
|
48040
|
+
'aria-label': 'Cascader',
|
|
48041
|
+
searchPosition: cascader_constants_strings.SEARCH_POSITION_TRIGGER
|
|
48033
48042
|
});
|
|
48034
48043
|
/* harmony default export */ const cascader_0 = (Cascader);
|
|
48035
48044
|
;// CONCATENATED MODULE: ../semi-foundation/collapse/constants.ts
|
|
@@ -48142,9 +48151,8 @@ class Collapsible extends BaseComponent {
|
|
|
48142
48151
|
this.isChildrenInRenderTree = () => {
|
|
48143
48152
|
if (this.domRef.current) {
|
|
48144
48153
|
return this.domRef.current.offsetHeight > 0;
|
|
48145
|
-
} else {
|
|
48146
|
-
return false;
|
|
48147
48154
|
}
|
|
48155
|
+
return false;
|
|
48148
48156
|
};
|
|
48149
48157
|
this.state = {
|
|
48150
48158
|
domInRenderTree: false,
|
|
@@ -48228,6 +48236,7 @@ class Collapsible extends BaseComponent {
|
|
|
48228
48236
|
const wrapperCls = classnames_default()(`${collapsible_constants_cssClasses.PREFIX}-wrapper`, {
|
|
48229
48237
|
[`${collapsible_constants_cssClasses.PREFIX}-transition`]: this.props.motion && this.state.isTransitioning
|
|
48230
48238
|
}, this.props.className);
|
|
48239
|
+
const shouldRender = this.props.keepDOM && !this.props.lazyRender || this.props.collapseHeight !== 0 || this.state.visible || this.props.isOpen;
|
|
48231
48240
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", Object.assign({
|
|
48232
48241
|
className: wrapperCls,
|
|
48233
48242
|
style: wrapperStyle,
|
|
@@ -48246,7 +48255,7 @@ class Collapsible extends BaseComponent {
|
|
|
48246
48255
|
overflow: 'hidden'
|
|
48247
48256
|
},
|
|
48248
48257
|
id: this.props.id
|
|
48249
|
-
},
|
|
48258
|
+
}, shouldRender && this.props.children));
|
|
48250
48259
|
}
|
|
48251
48260
|
}
|
|
48252
48261
|
Collapsible.__SemiComponentName__ = "Collapsible";
|
|
@@ -48255,6 +48264,7 @@ Collapsible.defaultProps = getDefaultPropsFromGlobalConfig(Collapsible.__SemiCom
|
|
|
48255
48264
|
duration: 250,
|
|
48256
48265
|
motion: true,
|
|
48257
48266
|
keepDOM: false,
|
|
48267
|
+
lazyRender: true,
|
|
48258
48268
|
collapseHeight: 0,
|
|
48259
48269
|
fade: false
|
|
48260
48270
|
});
|
|
@@ -60768,7 +60778,8 @@ const descriptions_constants_cssClasses = {
|
|
|
60768
60778
|
};
|
|
60769
60779
|
const descriptions_constants_strings = {
|
|
60770
60780
|
ALIGN_SET: ['left', 'justify', 'plain', 'center'],
|
|
60771
|
-
SIZE_SET: ['small', 'medium', 'large']
|
|
60781
|
+
SIZE_SET: ['small', 'medium', 'large'],
|
|
60782
|
+
LAYOUT_SET: ['horizontal', 'vertical']
|
|
60772
60783
|
};
|
|
60773
60784
|
const descriptions_constants_numbers = {};
|
|
60774
60785
|
|
|
@@ -60803,38 +60814,45 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
60803
60814
|
itemKey,
|
|
60804
60815
|
hidden,
|
|
60805
60816
|
className,
|
|
60817
|
+
span,
|
|
60806
60818
|
style,
|
|
60807
60819
|
children
|
|
60808
60820
|
} = _a,
|
|
60809
|
-
rest = descriptions_item_rest(_a, ["itemKey", "hidden", "className", "style", "children"]);
|
|
60821
|
+
rest = descriptions_item_rest(_a, ["itemKey", "hidden", "className", "span", "style", "children"]);
|
|
60810
60822
|
const {
|
|
60811
|
-
align
|
|
60823
|
+
align,
|
|
60824
|
+
layout
|
|
60812
60825
|
} = this.context;
|
|
60813
60826
|
if (hidden) {
|
|
60814
60827
|
return null;
|
|
60815
60828
|
}
|
|
60816
|
-
const
|
|
60817
|
-
className:
|
|
60818
|
-
|
|
60819
|
-
}, getDataAttr(rest)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("td", {
|
|
60820
|
-
className: `${item_prefixCls}-item`
|
|
60829
|
+
const plainItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("td", {
|
|
60830
|
+
className: `${item_prefixCls}-item`,
|
|
60831
|
+
colSpan: span || 1
|
|
60821
60832
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
60822
60833
|
className: keyCls
|
|
60823
60834
|
}, itemKey, ":"), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
60824
60835
|
className: valCls
|
|
60825
|
-
}, typeof children === 'function' ? children() : children))
|
|
60826
|
-
|
|
60827
|
-
style: style
|
|
60828
|
-
}, getDataAttr(rest)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("th", {
|
|
60836
|
+
}, typeof children === 'function' ? children() : children));
|
|
60837
|
+
const alignItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("th", {
|
|
60829
60838
|
className: `${item_prefixCls}-item ${item_prefixCls}-item-th`
|
|
60830
60839
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
60831
60840
|
className: keyCls
|
|
60832
60841
|
}, itemKey)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("td", {
|
|
60833
|
-
className: `${item_prefixCls}-item ${item_prefixCls}-item-td
|
|
60842
|
+
className: `${item_prefixCls}-item ${item_prefixCls}-item-td`,
|
|
60843
|
+
colSpan: span || 1
|
|
60834
60844
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
60835
60845
|
className: valCls
|
|
60836
60846
|
}, typeof children === 'function' ? children() : children)));
|
|
60837
|
-
|
|
60847
|
+
const item = align === 'plain' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("tr", Object.assign({
|
|
60848
|
+
className: className,
|
|
60849
|
+
style: style
|
|
60850
|
+
}, getDataAttr(rest)), plainItem) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("tr", Object.assign({
|
|
60851
|
+
className: className,
|
|
60852
|
+
style: style
|
|
60853
|
+
}, getDataAttr(rest)), alignItem);
|
|
60854
|
+
const horizontalItem = align === 'plain' ? plainItem : alignItem;
|
|
60855
|
+
return layout === 'horizontal' ? horizontalItem : item;
|
|
60838
60856
|
}
|
|
60839
60857
|
}
|
|
60840
60858
|
item_Item.propTypes = {
|
|
@@ -60844,6 +60862,44 @@ item_Item.propTypes = {
|
|
|
60844
60862
|
style: (prop_types_default()).object
|
|
60845
60863
|
};
|
|
60846
60864
|
item_Item.contextType = descriptions_context;
|
|
60865
|
+
;// CONCATENATED MODULE: ../semi-foundation/descriptions/foundation.ts
|
|
60866
|
+
|
|
60867
|
+
class DescriptionsFoundation extends foundation {
|
|
60868
|
+
constructor(adapter) {
|
|
60869
|
+
super(Object.assign({}, adapter));
|
|
60870
|
+
}
|
|
60871
|
+
getHorizontalList() {
|
|
60872
|
+
const {
|
|
60873
|
+
column,
|
|
60874
|
+
data,
|
|
60875
|
+
children
|
|
60876
|
+
} = this.getProps();
|
|
60877
|
+
let columns;
|
|
60878
|
+
if (data === null || data === void 0 ? void 0 : data.length) {
|
|
60879
|
+
columns = data || [];
|
|
60880
|
+
} else {
|
|
60881
|
+
columns = (children === null || children === void 0 ? void 0 : children.map(item => Object.assign({
|
|
60882
|
+
value: item.props.children
|
|
60883
|
+
}, item.props))) || [];
|
|
60884
|
+
}
|
|
60885
|
+
const horizontalList = [];
|
|
60886
|
+
const curSpan = {
|
|
60887
|
+
totalSpan: 0,
|
|
60888
|
+
itemList: []
|
|
60889
|
+
};
|
|
60890
|
+
for (const item of columns) {
|
|
60891
|
+
curSpan.totalSpan += item.span || 1;
|
|
60892
|
+
curSpan.itemList.push(item);
|
|
60893
|
+
if (curSpan.totalSpan >= column) {
|
|
60894
|
+
horizontalList.push(curSpan.itemList);
|
|
60895
|
+
curSpan.itemList = [];
|
|
60896
|
+
curSpan.totalSpan = 0;
|
|
60897
|
+
}
|
|
60898
|
+
}
|
|
60899
|
+
if (curSpan.itemList.length != 0) horizontalList.push(curSpan.itemList);
|
|
60900
|
+
return horizontalList;
|
|
60901
|
+
}
|
|
60902
|
+
}
|
|
60847
60903
|
;// CONCATENATED MODULE: ./descriptions/index.tsx
|
|
60848
60904
|
|
|
60849
60905
|
var descriptions_rest = undefined && undefined.__rest || function (s, e) {
|
|
@@ -60862,8 +60918,43 @@ var descriptions_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
60862
60918
|
|
|
60863
60919
|
|
|
60864
60920
|
|
|
60921
|
+
|
|
60922
|
+
|
|
60865
60923
|
const descriptions_prefixCls = descriptions_constants_cssClasses.PREFIX;
|
|
60866
|
-
class Descriptions extends
|
|
60924
|
+
class Descriptions extends BaseComponent {
|
|
60925
|
+
constructor(props) {
|
|
60926
|
+
super(props);
|
|
60927
|
+
this.renderChildrenList = () => {
|
|
60928
|
+
const props = this.props;
|
|
60929
|
+
const {
|
|
60930
|
+
layout,
|
|
60931
|
+
data,
|
|
60932
|
+
children
|
|
60933
|
+
} = props;
|
|
60934
|
+
if (layout === 'horizontal') {
|
|
60935
|
+
const horizontalList = this.foundation.getHorizontalList();
|
|
60936
|
+
return horizontalList.map((row, index) => {
|
|
60937
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("tr", {
|
|
60938
|
+
key: index
|
|
60939
|
+
}, row.map((item, itemIndex) => isPlainObject_default()(item) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(item_Item, Object.assign({
|
|
60940
|
+
itemKey: item.key
|
|
60941
|
+
}, item, {
|
|
60942
|
+
key: index + '-' + itemIndex
|
|
60943
|
+
}), item.value) : null));
|
|
60944
|
+
});
|
|
60945
|
+
} else {
|
|
60946
|
+
return data && data.length ? data.map((item, index) => isPlainObject_default()(item) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(item_Item, Object.assign({
|
|
60947
|
+
itemKey: item.key
|
|
60948
|
+
}, item, {
|
|
60949
|
+
key: index
|
|
60950
|
+
}), item.value) : null) : children;
|
|
60951
|
+
}
|
|
60952
|
+
};
|
|
60953
|
+
this.foundation = new DescriptionsFoundation(this.adapter);
|
|
60954
|
+
}
|
|
60955
|
+
get adapter() {
|
|
60956
|
+
return Object.assign({}, super.adapter);
|
|
60957
|
+
}
|
|
60867
60958
|
render() {
|
|
60868
60959
|
const _a = this.props,
|
|
60869
60960
|
{
|
|
@@ -60873,27 +60964,26 @@ class Descriptions extends external_root_React_commonjs2_react_commonjs_react_am
|
|
|
60873
60964
|
className,
|
|
60874
60965
|
style,
|
|
60875
60966
|
children,
|
|
60876
|
-
data
|
|
60967
|
+
data,
|
|
60968
|
+
layout
|
|
60877
60969
|
} = _a,
|
|
60878
|
-
rest = descriptions_rest(_a, ["align", "row", "size", "className", "style", "children", "data"]);
|
|
60970
|
+
rest = descriptions_rest(_a, ["align", "row", "size", "className", "style", "children", "data", "layout"]);
|
|
60879
60971
|
const classNames = classnames_default()(descriptions_prefixCls, className, {
|
|
60880
60972
|
[`${descriptions_prefixCls}-${align}`]: !row,
|
|
60881
60973
|
[`${descriptions_prefixCls}-double`]: row,
|
|
60882
|
-
[`${descriptions_prefixCls}-double-${size}`]: row
|
|
60974
|
+
[`${descriptions_prefixCls}-double-${size}`]: row,
|
|
60975
|
+
[`${descriptions_prefixCls}-horizontal`]: layout === 'horizontal',
|
|
60976
|
+
[`${descriptions_prefixCls}-vertical`]: layout === 'vertical'
|
|
60883
60977
|
});
|
|
60884
|
-
const childrenList = data && data.length ? data.map((item, index) => isPlainObject_default()(item) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(item_Item, Object.assign({
|
|
60885
|
-
itemKey: item.key
|
|
60886
|
-
}, item, {
|
|
60887
|
-
key: index
|
|
60888
|
-
}), item.value) : null) : children;
|
|
60889
60978
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", Object.assign({
|
|
60890
60979
|
className: classNames,
|
|
60891
60980
|
style: style
|
|
60892
60981
|
}, getDataAttr(rest)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("table", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("tbody", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(descriptions_context.Provider, {
|
|
60893
60982
|
value: {
|
|
60894
|
-
align
|
|
60983
|
+
align,
|
|
60984
|
+
layout
|
|
60895
60985
|
}
|
|
60896
|
-
},
|
|
60986
|
+
}, this.renderChildrenList()))));
|
|
60897
60987
|
}
|
|
60898
60988
|
}
|
|
60899
60989
|
Descriptions.Item = item_Item;
|
|
@@ -60910,13 +61000,17 @@ Descriptions.propTypes = {
|
|
|
60910
61000
|
hidden: (prop_types_default()).bool,
|
|
60911
61001
|
className: (prop_types_default()).string,
|
|
60912
61002
|
style: (prop_types_default()).object
|
|
60913
|
-
}))
|
|
61003
|
+
})),
|
|
61004
|
+
layout: prop_types_default().oneOf(descriptions_constants_strings.LAYOUT_SET),
|
|
61005
|
+
column: (prop_types_default()).number
|
|
60914
61006
|
};
|
|
60915
61007
|
Descriptions.defaultProps = {
|
|
60916
61008
|
align: 'center',
|
|
60917
61009
|
row: false,
|
|
60918
61010
|
size: 'medium',
|
|
60919
|
-
data: []
|
|
61011
|
+
data: [],
|
|
61012
|
+
layout: 'vertical',
|
|
61013
|
+
column: 3
|
|
60920
61014
|
};
|
|
60921
61015
|
/* harmony default export */ const descriptions_0 = (Descriptions);
|
|
60922
61016
|
;// CONCATENATED MODULE: ../semi-foundation/divider/constants.ts
|
|
@@ -62032,7 +62126,7 @@ var Modal_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
62032
62126
|
|
|
62033
62127
|
|
|
62034
62128
|
|
|
62035
|
-
|
|
62129
|
+
let destroyFns = [];
|
|
62036
62130
|
class Modal extends BaseComponent {
|
|
62037
62131
|
constructor(props) {
|
|
62038
62132
|
super(props);
|
|
@@ -62359,12 +62453,13 @@ Modal.confirm = function (props) {
|
|
|
62359
62453
|
return confirm_confirm(withConfirm(props));
|
|
62360
62454
|
};
|
|
62361
62455
|
Modal.destroyAll = function destroyAllFn() {
|
|
62362
|
-
|
|
62363
|
-
const close = destroyFns
|
|
62456
|
+
for (let i = 0, len = destroyFns.length; i < len; i++) {
|
|
62457
|
+
const close = destroyFns[i];
|
|
62364
62458
|
if (close) {
|
|
62365
62459
|
close();
|
|
62366
62460
|
}
|
|
62367
62461
|
}
|
|
62462
|
+
destroyFns = [];
|
|
62368
62463
|
};
|
|
62369
62464
|
/* harmony default export */ const modal_Modal = (Modal);
|
|
62370
62465
|
;// CONCATENATED MODULE: ./modal/index.tsx
|
|
@@ -87407,6 +87502,9 @@ const createBaseToast = () => {
|
|
|
87407
87502
|
ToastList.defaultOpts[pos] = opts[pos];
|
|
87408
87503
|
}
|
|
87409
87504
|
});
|
|
87505
|
+
if (typeof opts.theme === 'string' && toast_constants_strings.themes.includes(opts.theme)) {
|
|
87506
|
+
ToastList.defaultOpts.theme = opts.theme;
|
|
87507
|
+
}
|
|
87410
87508
|
if (typeof opts.zIndex === 'number') {
|
|
87411
87509
|
ToastList.defaultOpts.zIndex = opts.zIndex;
|
|
87412
87510
|
}
|
|
@@ -100119,6 +100217,33 @@ PreviewImage.defaultProps = {
|
|
|
100119
100217
|
zoom: undefined
|
|
100120
100218
|
};
|
|
100121
100219
|
;// CONCATENATED MODULE: ../semi-foundation/image/utils.ts
|
|
100220
|
+
var image_utils_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
100221
|
+
function adopt(value) {
|
|
100222
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
100223
|
+
resolve(value);
|
|
100224
|
+
});
|
|
100225
|
+
}
|
|
100226
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
100227
|
+
function fulfilled(value) {
|
|
100228
|
+
try {
|
|
100229
|
+
step(generator.next(value));
|
|
100230
|
+
} catch (e) {
|
|
100231
|
+
reject(e);
|
|
100232
|
+
}
|
|
100233
|
+
}
|
|
100234
|
+
function rejected(value) {
|
|
100235
|
+
try {
|
|
100236
|
+
step(generator["throw"](value));
|
|
100237
|
+
} catch (e) {
|
|
100238
|
+
reject(e);
|
|
100239
|
+
}
|
|
100240
|
+
}
|
|
100241
|
+
function step(result) {
|
|
100242
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
100243
|
+
}
|
|
100244
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
100245
|
+
});
|
|
100246
|
+
};
|
|
100122
100247
|
const isTargetEmit = (event, targetClasses) => {
|
|
100123
100248
|
// event.path usage is discouraged, use event.composedPath() as it's standard and is more future-proof
|
|
100124
100249
|
// path is the event-triggered bubbling path, which stores each node through which bubbling passes.
|
|
@@ -100132,27 +100257,25 @@ const isTargetEmit = (event, targetClasses) => {
|
|
|
100132
100257
|
});
|
|
100133
100258
|
return isTarget;
|
|
100134
100259
|
};
|
|
100135
|
-
const downloadImage = (src, filename) => {
|
|
100136
|
-
|
|
100137
|
-
|
|
100138
|
-
|
|
100139
|
-
|
|
100140
|
-
|
|
100141
|
-
|
|
100142
|
-
|
|
100143
|
-
|
|
100144
|
-
|
|
100145
|
-
|
|
100146
|
-
|
|
100147
|
-
|
|
100148
|
-
|
|
100149
|
-
|
|
100150
|
-
|
|
100151
|
-
|
|
100152
|
-
|
|
100153
|
-
|
|
100154
|
-
};
|
|
100155
|
-
};
|
|
100260
|
+
const downloadImage = (src, filename, downloadErrorCb) => image_utils_awaiter(void 0, void 0, void 0, function* () {
|
|
100261
|
+
try {
|
|
100262
|
+
const response = yield fetch(src);
|
|
100263
|
+
if (response.ok) {
|
|
100264
|
+
const blob = yield response.blob();
|
|
100265
|
+
const url = URL.createObjectURL(blob);
|
|
100266
|
+
const link = document.createElement('a');
|
|
100267
|
+
link.href = url;
|
|
100268
|
+
link.download = filename;
|
|
100269
|
+
link.click();
|
|
100270
|
+
URL.revokeObjectURL(url);
|
|
100271
|
+
link.remove();
|
|
100272
|
+
} else {
|
|
100273
|
+
downloadErrorCb(src);
|
|
100274
|
+
}
|
|
100275
|
+
} catch (error) {
|
|
100276
|
+
downloadErrorCb(src);
|
|
100277
|
+
}
|
|
100278
|
+
});
|
|
100156
100279
|
const crossMerge = function () {
|
|
100157
100280
|
let leftArr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
100158
100281
|
let rightArr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
@@ -100375,7 +100498,7 @@ class PreviewInnerFoundation extends foundation {
|
|
|
100375
100498
|
const setDownloadName = this._adapter.getSetDownloadFunc();
|
|
100376
100499
|
const downloadSrc = imgSrc[currentIndex];
|
|
100377
100500
|
const downloadName = setDownloadName ? setDownloadName(downloadSrc) : downloadSrc.slice(downloadSrc.lastIndexOf("/") + 1).split('?')[0];
|
|
100378
|
-
downloadImage(downloadSrc, downloadName);
|
|
100501
|
+
downloadImage(downloadSrc, downloadName, this._adapter.notifyDownloadError);
|
|
100379
100502
|
this._adapter.notifyDownload(downloadSrc, currentIndex);
|
|
100380
100503
|
};
|
|
100381
100504
|
this.handlePreviewClose = e => {
|
|
@@ -100632,6 +100755,12 @@ class PreviewInner extends BaseComponent {
|
|
|
100632
100755
|
} = this.props;
|
|
100633
100756
|
isFunction_default()(onDownload) && onDownload(src, index);
|
|
100634
100757
|
},
|
|
100758
|
+
notifyDownloadError: src => {
|
|
100759
|
+
const {
|
|
100760
|
+
onDownloadError
|
|
100761
|
+
} = this.props;
|
|
100762
|
+
isFunction_default()(onDownloadError) && onDownloadError(src);
|
|
100763
|
+
},
|
|
100635
100764
|
registerKeyDownListener: () => {
|
|
100636
100765
|
window && window.addEventListener("keydown", this.handleKeyDown);
|
|
100637
100766
|
},
|