shineout 3.6.0-beta.1 → 3.6.0-beta.3
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/cjs/index.js +1 -1
- package/cjs/tabs/tabs-panel.type.d.ts +1 -1
- package/dist/shineout.js +342 -111
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/index.js +1 -1
- package/esm/tabs/tabs-panel.type.d.ts +1 -1
- package/package.json +5 -5
package/dist/shineout.js
CHANGED
|
@@ -12040,7 +12040,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12040
12040
|
};
|
|
12041
12041
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12042
12042
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12043
|
-
/* harmony default export */ var version = ('3.6.0-beta.
|
|
12043
|
+
/* harmony default export */ var version = ('3.6.0-beta.3');
|
|
12044
12044
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12045
12045
|
|
|
12046
12046
|
|
|
@@ -21467,7 +21467,8 @@ var setToken = function setToken(options) {
|
|
|
21467
21467
|
_ref$selector = _ref.selector,
|
|
21468
21468
|
selector = _ref$selector === void 0 ? 'body' : _ref$selector,
|
|
21469
21469
|
target = _ref.target,
|
|
21470
|
-
tokenName = _ref.tokenName,
|
|
21470
|
+
_ref$tokenName = _ref.tokenName,
|
|
21471
|
+
tokenName = _ref$tokenName === void 0 ? 'shineout-token' : _ref$tokenName,
|
|
21471
21472
|
token = _ref.token,
|
|
21472
21473
|
attributes = _ref.attributes,
|
|
21473
21474
|
onlyExtra = _ref.onlyExtra,
|
|
@@ -21476,7 +21477,7 @@ var setToken = function setToken(options) {
|
|
|
21476
21477
|
var _getConfig = getConfig(),
|
|
21477
21478
|
prefix = _getConfig.prefix;
|
|
21478
21479
|
if (typeof window === 'undefined') return;
|
|
21479
|
-
var id = "
|
|
21480
|
+
var id = "shineout-next-token-".concat(createHash(selector));
|
|
21480
21481
|
var cacheTag = document.querySelector("[data-token-id=\"".concat(id, "\"]"));
|
|
21481
21482
|
var tag = cacheTag || document.createElement(tagName);
|
|
21482
21483
|
var tokens = [];
|
|
@@ -21599,8 +21600,6 @@ var scopeNormalizeStyle = function scopeNormalizeStyle() {
|
|
|
21599
21600
|
appendNormalizeStyle(scopedStyleString, uniqueStyleId);
|
|
21600
21601
|
};
|
|
21601
21602
|
token_setter({
|
|
21602
|
-
onlyExtra: true,
|
|
21603
|
-
tokenName: 'shineout-extra',
|
|
21604
21603
|
selector: 'html'
|
|
21605
21604
|
});
|
|
21606
21605
|
;// CONCATENATED MODULE: ../shineout-style/src/pagination/pagination.ts
|
|
@@ -21778,7 +21777,7 @@ var popoverStyle = {
|
|
|
21778
21777
|
},
|
|
21779
21778
|
'&::after': {
|
|
21780
21779
|
// left: arrowGap * -1,
|
|
21781
|
-
|
|
21780
|
+
right: "calc(".concat(hideArrowGap, " * -1)"),
|
|
21782
21781
|
top: '0',
|
|
21783
21782
|
bottom: '0',
|
|
21784
21783
|
content: '" "',
|
|
@@ -23530,10 +23529,9 @@ var scale_circle_loop = function loop() {
|
|
|
23530
23529
|
boxSizing: 'border-box',
|
|
23531
23530
|
position: 'relative',
|
|
23532
23531
|
borderStyle: 'solid',
|
|
23533
|
-
borderColor: src.spinColor,
|
|
23532
|
+
borderColor: "transparent ".concat(src.spinColor, " ").concat(src.spinColor, " ").concat(src.spinColor),
|
|
23534
23533
|
borderRadius: '50%',
|
|
23535
|
-
animation: '$ring 1s linear infinite'
|
|
23536
|
-
borderTopColor: 'transparent'
|
|
23534
|
+
animation: '$ring 1s linear infinite'
|
|
23537
23535
|
});
|
|
23538
23536
|
;// CONCATENATED MODULE: ../shineout-style/src/spin/tree-bounce.ts
|
|
23539
23537
|
|
|
@@ -23960,16 +23958,66 @@ var stepsStyle = {
|
|
|
23960
23958
|
small: {
|
|
23961
23959
|
fontSize: src.stepsIconFontSize,
|
|
23962
23960
|
'&$arrow': {
|
|
23961
|
+
'& $step[dir=rtl]:after': {
|
|
23962
|
+
left: -12
|
|
23963
|
+
},
|
|
23963
23964
|
'& $step:not(:last-child)': {
|
|
23965
|
+
'&$widthDescription': {
|
|
23966
|
+
'&:after': {
|
|
23967
|
+
borderLeftWidth: 22,
|
|
23968
|
+
borderTopWidth: 28,
|
|
23969
|
+
borderBottomWidth: 28
|
|
23970
|
+
},
|
|
23971
|
+
'&:before': {
|
|
23972
|
+
borderLeftWidth: 22,
|
|
23973
|
+
borderTopWidth: 28,
|
|
23974
|
+
borderBottomWidth: 28
|
|
23975
|
+
},
|
|
23976
|
+
'&[dir=ltr]:after': {
|
|
23977
|
+
right: -22
|
|
23978
|
+
},
|
|
23979
|
+
'&[dir=rtl]:after': {
|
|
23980
|
+
left: -22
|
|
23981
|
+
}
|
|
23982
|
+
},
|
|
23983
|
+
'&[dir=rtl]:after': {
|
|
23984
|
+
left: -12,
|
|
23985
|
+
right: 'auto'
|
|
23986
|
+
},
|
|
23964
23987
|
'&:after': {
|
|
23965
|
-
top:
|
|
23966
|
-
|
|
23967
|
-
|
|
23988
|
+
top: 0,
|
|
23989
|
+
right: -12,
|
|
23990
|
+
width: 12,
|
|
23991
|
+
height: 32,
|
|
23992
|
+
borderLeftWidth: 12,
|
|
23993
|
+
borderTopWidth: 16,
|
|
23994
|
+
borderBottomWidth: 16
|
|
23995
|
+
},
|
|
23996
|
+
'&:before': {
|
|
23997
|
+
top: 0,
|
|
23998
|
+
width: 12,
|
|
23999
|
+
height: 32,
|
|
24000
|
+
borderLeftWidth: 12,
|
|
24001
|
+
borderTopWidth: 16,
|
|
24002
|
+
borderBottomWidth: 16,
|
|
24003
|
+
right: -12
|
|
24004
|
+
},
|
|
24005
|
+
'&[dir=rtl]:before': {
|
|
24006
|
+
right: 0
|
|
24007
|
+
}
|
|
24008
|
+
},
|
|
24009
|
+
'& $step:last-child': {
|
|
24010
|
+
'&$widthDescription': {
|
|
24011
|
+
'&:before': {
|
|
24012
|
+
borderLeftWidth: 22,
|
|
24013
|
+
borderTopWidth: 28,
|
|
24014
|
+
borderBottomWidth: 28
|
|
24015
|
+
}
|
|
23968
24016
|
},
|
|
23969
24017
|
'&:before': {
|
|
23970
|
-
|
|
23971
|
-
|
|
23972
|
-
|
|
24018
|
+
borderLeftWidth: 12,
|
|
24019
|
+
borderTopWidth: 16,
|
|
24020
|
+
borderBottomWidth: 16
|
|
23973
24021
|
}
|
|
23974
24022
|
},
|
|
23975
24023
|
'& $content': {
|
|
@@ -24058,9 +24106,67 @@ var stepsStyle = {
|
|
|
24058
24106
|
},
|
|
24059
24107
|
large: {
|
|
24060
24108
|
'&$arrow': {
|
|
24061
|
-
'& $step': {
|
|
24062
|
-
'
|
|
24063
|
-
|
|
24109
|
+
'& $step:not(:last-child)': {
|
|
24110
|
+
'&$widthDescription': {
|
|
24111
|
+
'&:after': {
|
|
24112
|
+
top: 0,
|
|
24113
|
+
width: 30,
|
|
24114
|
+
height: 72,
|
|
24115
|
+
borderLeftWidth: 30,
|
|
24116
|
+
borderTopWidth: 36,
|
|
24117
|
+
borderBottomWidth: 36
|
|
24118
|
+
},
|
|
24119
|
+
'&:before': {
|
|
24120
|
+
borderLeftWidth: 30,
|
|
24121
|
+
borderTopWidth: 36,
|
|
24122
|
+
borderBottomWidth: 36
|
|
24123
|
+
},
|
|
24124
|
+
'&[dir=ltr]:after': {
|
|
24125
|
+
right: -30
|
|
24126
|
+
},
|
|
24127
|
+
'&[dir=rtl]:after': {
|
|
24128
|
+
left: -30
|
|
24129
|
+
}
|
|
24130
|
+
},
|
|
24131
|
+
'&[dir=rtl]:after': {
|
|
24132
|
+
left: -20,
|
|
24133
|
+
right: 'auto'
|
|
24134
|
+
},
|
|
24135
|
+
'&[dir=rtl]:before': {
|
|
24136
|
+
right: 0
|
|
24137
|
+
},
|
|
24138
|
+
'&:after': {
|
|
24139
|
+
top: 0,
|
|
24140
|
+
width: 20,
|
|
24141
|
+
height: 48,
|
|
24142
|
+
borderLeftWidth: 20,
|
|
24143
|
+
borderTopWidth: 24,
|
|
24144
|
+
borderBottomWidth: 24,
|
|
24145
|
+
right: -20
|
|
24146
|
+
},
|
|
24147
|
+
'&:before': {
|
|
24148
|
+
top: 0,
|
|
24149
|
+
width: 20,
|
|
24150
|
+
height: 48,
|
|
24151
|
+
borderLeftWidth: 20,
|
|
24152
|
+
borderTopWidth: 24,
|
|
24153
|
+
borderBottomWidth: 24,
|
|
24154
|
+
right: -20
|
|
24155
|
+
}
|
|
24156
|
+
},
|
|
24157
|
+
'& $step:last-child': {
|
|
24158
|
+
'&$widthDescription': {
|
|
24159
|
+
'&:before': {
|
|
24160
|
+
borderLeftWidth: 30,
|
|
24161
|
+
borderTopWidth: 36,
|
|
24162
|
+
borderBottomWidth: 36
|
|
24163
|
+
}
|
|
24164
|
+
},
|
|
24165
|
+
'&:before': {
|
|
24166
|
+
borderLeftWidth: 20,
|
|
24167
|
+
borderTopWidth: 24,
|
|
24168
|
+
borderBottomWidth: 24
|
|
24169
|
+
}
|
|
24064
24170
|
},
|
|
24065
24171
|
'& $content': {
|
|
24066
24172
|
padding: "".concat(src.stepsLargeArrowPaddingY, " ").concat(src.stepsLargeArrowPaddingX),
|
|
@@ -29679,7 +29785,7 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
29679
29785
|
style: hideStyle
|
|
29680
29786
|
};
|
|
29681
29787
|
var rect = context.parentRect;
|
|
29682
|
-
if (scrollElRef !== null && scrollElRef !== void 0 && scrollElRef.current && (_scrollElRef$current = scrollElRef.current) !== null && _scrollElRef$current !== void 0 && _scrollElRef$current.contains(parentElRef.current)) {
|
|
29788
|
+
if (!show && scrollElRef !== null && scrollElRef !== void 0 && scrollElRef.current && (_scrollElRef$current = scrollElRef.current) !== null && _scrollElRef$current !== void 0 && _scrollElRef$current.contains(parentElRef.current)) {
|
|
29683
29789
|
var _scrollElRef$current2;
|
|
29684
29790
|
var visibleRect = ((_scrollElRef$current2 = scrollElRef.current) === null || _scrollElRef$current2 === void 0 ? void 0 : _scrollElRef$current2.getBoundingClientRect()) || {};
|
|
29685
29791
|
if (rect.bottom < visibleRect.top || rect.top > visibleRect.bottom || rect.right < visibleRect.left || rect.left > visibleRect.right) {
|
|
@@ -32477,7 +32583,13 @@ var FormFooterProvider = function FormFooterProvider(props) {
|
|
|
32477
32583
|
if (!context.hasSubmit) {
|
|
32478
32584
|
context.submit = info.submit;
|
|
32479
32585
|
context.hasSubmit = true;
|
|
32586
|
+
return true;
|
|
32480
32587
|
}
|
|
32588
|
+
return false;
|
|
32589
|
+
});
|
|
32590
|
+
var deleteFormInfo = usePersistFn(function () {
|
|
32591
|
+
context.hasSubmit = false;
|
|
32592
|
+
context.submit = function () {};
|
|
32481
32593
|
});
|
|
32482
32594
|
var setFormStats = usePersistFn(function (disabled) {
|
|
32483
32595
|
if (disabled !== formStats) {
|
|
@@ -32488,6 +32600,7 @@ var FormFooterProvider = function FormFooterProvider(props) {
|
|
|
32488
32600
|
return {
|
|
32489
32601
|
setFormStats: setFormStats,
|
|
32490
32602
|
setFormInfo: setFormInfo,
|
|
32603
|
+
deleteFormInfo: deleteFormInfo,
|
|
32491
32604
|
formStats: formStats,
|
|
32492
32605
|
func: context
|
|
32493
32606
|
};
|
|
@@ -34202,6 +34315,34 @@ var getAllKeyPaths = function getAllKeyPaths(obj) {
|
|
|
34202
34315
|
return keys.concat(obj[key] !== null && typeof_default()(obj[key]) === 'object' ? getAllKeyPaths(obj[key], newKey) : newKey);
|
|
34203
34316
|
}, []);
|
|
34204
34317
|
};
|
|
34318
|
+
|
|
34319
|
+
/**
|
|
34320
|
+
* 获取完整的字段key
|
|
34321
|
+
* @param fields 字段key
|
|
34322
|
+
* @param allFields 所有字段key
|
|
34323
|
+
* @returns 完整的字段key
|
|
34324
|
+
* @example
|
|
34325
|
+
* const fields = ['user']
|
|
34326
|
+
* const allFields = ['user', 'user.name', 'user.age', 'user[0].name', 'user[0].age', 'user[1].name', 'user[1].age']
|
|
34327
|
+
* const completeFields = getCompleteFieldKeys(fields, allFields)
|
|
34328
|
+
* console.log(completeFields) // ['user', 'user.name', 'user.age', 'user[0].name', 'user[0].age', 'user[1].name', 'user[1].age']
|
|
34329
|
+
*/
|
|
34330
|
+
var getCompleteFieldKeys = function getCompleteFieldKeys(fields, allFields) {
|
|
34331
|
+
var fieldsArray = isArray(fields) ? fields : [fields];
|
|
34332
|
+
var completeFields = [];
|
|
34333
|
+
fieldsArray.forEach(function (field) {
|
|
34334
|
+
var na = "".concat(field, "[");
|
|
34335
|
+
var no = "".concat(field, ".");
|
|
34336
|
+
completeFields.push(field);
|
|
34337
|
+
var childFields = allFields.filter(function (f) {
|
|
34338
|
+
return f.startsWith(na) || f.startsWith(no);
|
|
34339
|
+
});
|
|
34340
|
+
if (childFields.length) {
|
|
34341
|
+
completeFields.push.apply(completeFields, toConsumableArray_default()(childFields));
|
|
34342
|
+
}
|
|
34343
|
+
});
|
|
34344
|
+
return completeFields;
|
|
34345
|
+
};
|
|
34205
34346
|
;// CONCATENATED MODULE: ../base/src/common/use-clear.ts
|
|
34206
34347
|
|
|
34207
34348
|
var useClear = function useClear(props) {
|
|
@@ -34861,6 +35002,9 @@ var checkbox_Checkbox = function Checkbox(props) {
|
|
|
34861
35002
|
if ('value' in props && props.checked === undefined) {
|
|
34862
35003
|
onInputableCheckboxChange(checked);
|
|
34863
35004
|
}
|
|
35005
|
+
if (props.onRawChange) {
|
|
35006
|
+
props.onRawChange(checked ? htmlValue : undefined, checked, htmlValue);
|
|
35007
|
+
}
|
|
34864
35008
|
onChange === null || onChange === void 0 || onChange(checked ? htmlValue : undefined, checked, htmlValue);
|
|
34865
35009
|
});
|
|
34866
35010
|
var getChecked = function getChecked() {
|
|
@@ -34901,7 +35045,10 @@ var checkbox_Checkbox = function Checkbox(props) {
|
|
|
34901
35045
|
var CheckboxWithContext = function CheckboxWithContext(props) {
|
|
34902
35046
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(group_context.Consumer, {
|
|
34903
35047
|
children: function children(value) {
|
|
34904
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(checkbox_Checkbox, objectSpread2_default()(objectSpread2_default()({}, props), value)
|
|
35048
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(checkbox_Checkbox, objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, props), value), {}, {
|
|
35049
|
+
onRawChange: props.onChange,
|
|
35050
|
+
checked: 'checked' in props ? props.checked : value.checked
|
|
35051
|
+
}));
|
|
34905
35052
|
}
|
|
34906
35053
|
});
|
|
34907
35054
|
};
|
|
@@ -36581,19 +36728,13 @@ var getFilterTree = function getFilterTree(treeNodes, filterFunc, filterExpandKe
|
|
|
36581
36728
|
return node;
|
|
36582
36729
|
});
|
|
36583
36730
|
};
|
|
36584
|
-
var mergeFilteredTree = function mergeFilteredTree(
|
|
36585
|
-
var
|
|
36586
|
-
var childrenKey = filterDatum.childrenKey;
|
|
36731
|
+
var mergeFilteredTree = function mergeFilteredTree(filterData, rawDatum, tiledId) {
|
|
36732
|
+
var childrenKey = rawDatum.childrenKey;
|
|
36587
36733
|
if (tiledId.length === 0) return filterData;
|
|
36588
36734
|
var recursion = function recursion(node) {
|
|
36589
|
-
var nodeKey =
|
|
36735
|
+
var nodeKey = rawDatum.getKey(node);
|
|
36590
36736
|
if (tiledId.indexOf(nodeKey) >= 0) {
|
|
36591
36737
|
node[childrenKey] = deepClone(rawDatum.getDataById(nodeKey)[childrenKey] || []);
|
|
36592
|
-
} else {
|
|
36593
|
-
var item = filterDatum.getDataById(nodeKey);
|
|
36594
|
-
if (item && item[childrenKey]) {
|
|
36595
|
-
node[childrenKey] = deepClone(item[childrenKey] || []);
|
|
36596
|
-
}
|
|
36597
36738
|
}
|
|
36598
36739
|
var children = node[childrenKey] || [];
|
|
36599
36740
|
children.map(recursion);
|
|
@@ -36767,6 +36908,7 @@ function use_tree_toArray(value) {
|
|
|
36767
36908
|
if (!Array.isArray(value)) return [value];
|
|
36768
36909
|
return value;
|
|
36769
36910
|
}
|
|
36911
|
+
var global_tree_map = new Map();
|
|
36770
36912
|
var MODE = {
|
|
36771
36913
|
/**
|
|
36772
36914
|
* 返回全选数据,包含父节点和子节点
|
|
@@ -37086,6 +37228,15 @@ var useTree = function useTree(props) {
|
|
|
37086
37228
|
return 2;
|
|
37087
37229
|
};
|
|
37088
37230
|
var setData = function setData(data) {
|
|
37231
|
+
// if(data && global_tree_map.get(data)){
|
|
37232
|
+
// context.cachedValue = global_tree_map.get(data)?.cachedValue || []
|
|
37233
|
+
// context.pathMap = global_tree_map.get(data)?.pathMap || new Map()
|
|
37234
|
+
// context.dataMap = global_tree_map.get(data)?.dataMap || new Map()
|
|
37235
|
+
// context.valueMap = global_tree_map.get(data)?.valueMap || new Map()
|
|
37236
|
+
// context.unmatchedValueMap = global_tree_map.get(data)?.unmatchedValueMap || new Map()
|
|
37237
|
+
// return
|
|
37238
|
+
// }
|
|
37239
|
+
|
|
37089
37240
|
var prevValue = context.value || [];
|
|
37090
37241
|
context.cachedValue = [];
|
|
37091
37242
|
context.pathMap = new Map();
|
|
@@ -37097,6 +37248,8 @@ var useTree = function useTree(props) {
|
|
|
37097
37248
|
initData(context.data, []);
|
|
37098
37249
|
initValue();
|
|
37099
37250
|
setValue(prevValue);
|
|
37251
|
+
|
|
37252
|
+
// global_tree_map.set(data, context)
|
|
37100
37253
|
};
|
|
37101
37254
|
var set = function set(id, checked, direction) {
|
|
37102
37255
|
if (!isDisabled(id)) {
|
|
@@ -37905,7 +38058,7 @@ var FilterNode = function FilterNode(props) {
|
|
|
37905
38058
|
onChange = props.onChange,
|
|
37906
38059
|
onPathChange = props.onPathChange;
|
|
37907
38060
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$cascader = jssStyle.cascader) === null || _jssStyle$cascader === void 0 ? void 0 : _jssStyle$cascader.call(jssStyle);
|
|
37908
|
-
var handleSelectItem = function handleSelectItem(index, e) {
|
|
38061
|
+
var handleSelectItem = function handleSelectItem(index, d, e) {
|
|
37909
38062
|
var isFinal = data && index === data.length - 1;
|
|
37910
38063
|
if (shouldFinal && !isFinal) return;
|
|
37911
38064
|
if (e) e.stopPropagation();
|
|
@@ -37915,13 +38068,13 @@ var FilterNode = function FilterNode(props) {
|
|
|
37915
38068
|
var keys = data.slice(0, index + 1).map(function (i) {
|
|
37916
38069
|
return datum.getKey(i);
|
|
37917
38070
|
});
|
|
37918
|
-
if (onChange) onChange(keys);
|
|
38071
|
+
if (onChange) onChange(keys, d);
|
|
37919
38072
|
onPathChange(datum.getKey(item), item, keys.slice(0, keys.length - 1), true);
|
|
37920
38073
|
setInputText('');
|
|
37921
38074
|
setFilterText('');
|
|
37922
38075
|
};
|
|
37923
38076
|
var handleSelect = function handleSelect() {
|
|
37924
|
-
handleSelectItem(data.length - 1);
|
|
38077
|
+
handleSelectItem(data.length - 1, data === null || data === void 0 ? void 0 : data[data.length - 1]);
|
|
37925
38078
|
};
|
|
37926
38079
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
37927
38080
|
className: classnames_default()(styles.option, styles.filterOption),
|
|
@@ -37930,7 +38083,7 @@ var FilterNode = function FilterNode(props) {
|
|
|
37930
38083
|
className: classnames_default()(styles.optionInner),
|
|
37931
38084
|
children: data.map(function (item, index) {
|
|
37932
38085
|
var handleClick = function handleClick(e) {
|
|
37933
|
-
handleSelectItem(index, e);
|
|
38086
|
+
handleSelectItem(index, item, e);
|
|
37934
38087
|
};
|
|
37935
38088
|
var isDisabled = datum.isDisabled(datum.getKey(item));
|
|
37936
38089
|
var content = /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
@@ -39149,6 +39302,13 @@ var result_Result = function Result(props) {
|
|
|
39149
39302
|
}
|
|
39150
39303
|
mounted.current = true;
|
|
39151
39304
|
}, [focus, placeholder, multiple]);
|
|
39305
|
+
|
|
39306
|
+
// Select多选模式下,且开启了onFilter,自动聚焦
|
|
39307
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
39308
|
+
if (multiple && focus && inputRef !== null && inputRef !== void 0 && inputRef.current) {
|
|
39309
|
+
inputRef.current.focus();
|
|
39310
|
+
}
|
|
39311
|
+
}, [focus, multiple]);
|
|
39152
39312
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
39153
39313
|
handleResetMore();
|
|
39154
39314
|
}, [valueProp, data]);
|
|
@@ -39552,12 +39712,13 @@ var Cascader = function Cascader(props0) {
|
|
|
39552
39712
|
onClick: handleResultClick,
|
|
39553
39713
|
children: defaultIcon
|
|
39554
39714
|
});
|
|
39715
|
+
var close = /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
39716
|
+
className: styles.clearIcon,
|
|
39717
|
+
onClick: handleClear,
|
|
39718
|
+
children: icons_config.cascader.Close
|
|
39719
|
+
});
|
|
39555
39720
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
39556
|
-
children: [
|
|
39557
|
-
className: styles.clearIcon,
|
|
39558
|
-
onClick: handleClear,
|
|
39559
|
-
children: icons_config.cascader.Close
|
|
39560
|
-
}), !open && !isEmpty && arrow]
|
|
39721
|
+
children: [close, !open && !isEmpty && !focused && arrow]
|
|
39561
39722
|
});
|
|
39562
39723
|
};
|
|
39563
39724
|
var renderIcon = function renderIcon() {
|
|
@@ -45071,11 +45232,23 @@ var DatePicker = function DatePicker(props0) {
|
|
|
45071
45232
|
}
|
|
45072
45233
|
} else {
|
|
45073
45234
|
func.finishEdit();
|
|
45235
|
+
|
|
45236
|
+
// 如果是通过 props.open 控制的,那么需要在关闭时,将组件再次进入编辑状态
|
|
45237
|
+
if (props.open === true) {
|
|
45238
|
+
func.startEdit();
|
|
45239
|
+
}
|
|
45074
45240
|
}
|
|
45075
45241
|
setIsCloseFromConfirm(false);
|
|
45076
45242
|
}
|
|
45077
45243
|
(_props$onCollapse = props.onCollapse) === null || _props$onCollapse === void 0 || _props$onCollapse.call(props, isOpen);
|
|
45078
45244
|
});
|
|
45245
|
+
|
|
45246
|
+
// 如果一开始就打开了板子,那么需要初始化让组件进入编辑状态
|
|
45247
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
45248
|
+
if (props.open) {
|
|
45249
|
+
func.startEdit();
|
|
45250
|
+
}
|
|
45251
|
+
}, []);
|
|
45079
45252
|
var _usePopup = use_popup({
|
|
45080
45253
|
open: props.open,
|
|
45081
45254
|
onCollapse: onCollapse,
|
|
@@ -47653,6 +47826,7 @@ var useForm = function useForm(props) {
|
|
|
47653
47826
|
var _React$useRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
|
|
47654
47827
|
defaultValues: {},
|
|
47655
47828
|
validateMap: {},
|
|
47829
|
+
ignoreValidateFields: [],
|
|
47656
47830
|
updateMap: {},
|
|
47657
47831
|
flowMap: {},
|
|
47658
47832
|
removeArr: new Set(),
|
|
@@ -47685,10 +47859,21 @@ var useForm = function useForm(props) {
|
|
|
47685
47859
|
} else {
|
|
47686
47860
|
var names = isArray(name) ? name : [name];
|
|
47687
47861
|
names.forEach(function (key) {
|
|
47688
|
-
var _context$
|
|
47689
|
-
|
|
47690
|
-
|
|
47691
|
-
|
|
47862
|
+
var _context$flowMap$key;
|
|
47863
|
+
// 外部直接设置user.name这种格式的,但是又没有显性的声明user.name绑定的表单元素;
|
|
47864
|
+
// 这里需要手动触发,否则会导致Input输入过程中光标跳到末尾的异常
|
|
47865
|
+
if (!context.updateMap[key]) {
|
|
47866
|
+
var _context$updateMap$pa;
|
|
47867
|
+
var parentKey = key.split('.')[0];
|
|
47868
|
+
(_context$updateMap$pa = context.updateMap[parentKey]) === null || _context$updateMap$pa === void 0 || _context$updateMap$pa.forEach(function (update) {
|
|
47869
|
+
update(context.value, context.errors, context.serverErrors);
|
|
47870
|
+
});
|
|
47871
|
+
} else {
|
|
47872
|
+
var _context$updateMap$ke2;
|
|
47873
|
+
(_context$updateMap$ke2 = context.updateMap[key]) === null || _context$updateMap$ke2 === void 0 || _context$updateMap$ke2.forEach(function (update) {
|
|
47874
|
+
update(context.value, context.errors, context.serverErrors);
|
|
47875
|
+
});
|
|
47876
|
+
}
|
|
47692
47877
|
(_context$flowMap$key = context.flowMap[key]) === null || _context$flowMap$key === void 0 || _context$flowMap$key.forEach(function (update) {
|
|
47693
47878
|
update();
|
|
47694
47879
|
});
|
|
@@ -47745,9 +47930,25 @@ var useForm = function useForm(props) {
|
|
|
47745
47930
|
var validateFields = use_persist_fn(function (fields) {
|
|
47746
47931
|
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
47747
47932
|
return new Promise(function (resolve, reject) {
|
|
47748
|
-
var finalFields =
|
|
47749
|
-
|
|
47750
|
-
|
|
47933
|
+
var finalFields = Object.keys(context.validateMap);
|
|
47934
|
+
if (fields) {
|
|
47935
|
+
if (config.ignoreChildren) {
|
|
47936
|
+
// 旧行为:仅校验当前字段
|
|
47937
|
+
finalFields = (isArray(fields) ? fields : [fields]).filter(function (key) {
|
|
47938
|
+
return context.validateMap[key];
|
|
47939
|
+
});
|
|
47940
|
+
} else {
|
|
47941
|
+
// 新行为:校验当前字段及其所有子字段
|
|
47942
|
+
// 假设进去的是['user'],那么最终的finalFields是['user', 'user.name', 'user.age']
|
|
47943
|
+
// 假设进去的是['users'],那么最终的finalFields是['users', 'users[0].name', 'users[0].age', 'users[1].name', 'users[1].age']
|
|
47944
|
+
finalFields = getCompleteFieldKeys(fields, finalFields);
|
|
47945
|
+
}
|
|
47946
|
+
}
|
|
47947
|
+
if (context.ignoreValidateFields.length > 0) {
|
|
47948
|
+
finalFields = finalFields.filter(function (key) {
|
|
47949
|
+
return !context.ignoreValidateFields.includes(key);
|
|
47950
|
+
});
|
|
47951
|
+
}
|
|
47751
47952
|
var validates = finalFields.map(function (key) {
|
|
47752
47953
|
var validateField = context.validateMap[key];
|
|
47753
47954
|
return Array.from(validateField).map(function (validate) {
|
|
@@ -47982,7 +48183,7 @@ var useForm = function useForm(props) {
|
|
|
47982
48183
|
}, 10);
|
|
47983
48184
|
};
|
|
47984
48185
|
};
|
|
47985
|
-
var validateFieldset = function validateFieldset(name) {
|
|
48186
|
+
var validateFieldset = function validateFieldset(name, config) {
|
|
47986
48187
|
var na = "".concat(name, "[");
|
|
47987
48188
|
var no = "".concat(name, ".");
|
|
47988
48189
|
var fields = [];
|
|
@@ -47991,6 +48192,15 @@ var useForm = function useForm(props) {
|
|
|
47991
48192
|
fields.push(key);
|
|
47992
48193
|
}
|
|
47993
48194
|
});
|
|
48195
|
+
|
|
48196
|
+
// 用户声明了跳过校验子字段
|
|
48197
|
+
if (config !== null && config !== void 0 && config.ignoreChildren) {
|
|
48198
|
+
var parentName = name.split('[')[0];
|
|
48199
|
+
context.ignoreValidateFields = getCompleteFieldKeys(parentName, Array.from(context.names));
|
|
48200
|
+
setTimeout(function () {
|
|
48201
|
+
context.ignoreValidateFields = [];
|
|
48202
|
+
});
|
|
48203
|
+
}
|
|
47994
48204
|
validateFields(fields).catch(function () {});
|
|
47995
48205
|
};
|
|
47996
48206
|
var getDefaultValue = function getDefaultValue() {
|
|
@@ -48279,6 +48489,10 @@ var Form = function Form(props) {
|
|
|
48279
48489
|
props.setForm(formRefObj);
|
|
48280
48490
|
}
|
|
48281
48491
|
}, [formRefObj]);
|
|
48492
|
+
var _React$useRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef({
|
|
48493
|
+
bindindModalFormContextSuccess: false
|
|
48494
|
+
}),
|
|
48495
|
+
context = _React$useRef.current;
|
|
48282
48496
|
var handleFormModalInfo = function handleFormModalInfo() {
|
|
48283
48497
|
var status = undefined;
|
|
48284
48498
|
if (props.disabled) {
|
|
@@ -48291,11 +48505,17 @@ var Form = function Form(props) {
|
|
|
48291
48505
|
modalFormContext === null || modalFormContext === void 0 || modalFormContext.setFormStats(status);
|
|
48292
48506
|
}
|
|
48293
48507
|
if (props.onSubmit) {
|
|
48294
|
-
modalFormContext === null || modalFormContext === void 0
|
|
48508
|
+
var ok = modalFormContext === null || modalFormContext === void 0 ? void 0 : modalFormContext.setFormInfo(formRefObj);
|
|
48509
|
+
context.bindindModalFormContextSuccess = !!ok;
|
|
48295
48510
|
}
|
|
48296
48511
|
};
|
|
48297
48512
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
48298
48513
|
handleFormModalInfo();
|
|
48514
|
+
return function () {
|
|
48515
|
+
if (context.bindindModalFormContextSuccess) {
|
|
48516
|
+
modalFormContext === null || modalFormContext === void 0 || modalFormContext.deleteFormInfo();
|
|
48517
|
+
}
|
|
48518
|
+
};
|
|
48299
48519
|
}, [props.disabled, props.pending]);
|
|
48300
48520
|
var rootClass = classnames_default()([formClasses === null || formClasses === void 0 ? void 0 : formClasses.rootClass, formClasses === null || formClasses === void 0 ? void 0 : formClasses.wrapper, className, props.inline && (formClasses === null || formClasses === void 0 ? void 0 : formClasses.wrapperInline)]);
|
|
48301
48521
|
var formProps = getFormProps({
|
|
@@ -48701,13 +48921,13 @@ var form_fieldset_produce = utils_immer_produce;
|
|
|
48701
48921
|
var FormFieldSet = function FormFieldSet(props) {
|
|
48702
48922
|
var children = props.children,
|
|
48703
48923
|
empty = props.empty;
|
|
48704
|
-
|
|
48705
|
-
|
|
48706
|
-
}),
|
|
48707
|
-
context = _React$useRef.current;
|
|
48924
|
+
// const { current: context } = React.useRef<{ ids: string[] }>({ ids: [] });
|
|
48925
|
+
|
|
48708
48926
|
var formFunc = useFormFunc();
|
|
48709
48927
|
var validateFieldSet = function validateFieldSet() {
|
|
48710
|
-
formFunc === null || formFunc === void 0 || formFunc.validateFields(props.name
|
|
48928
|
+
formFunc === null || formFunc === void 0 || formFunc.validateFields(props.name, {
|
|
48929
|
+
ignoreChildren: true
|
|
48930
|
+
}).catch(function (e) {
|
|
48711
48931
|
return e;
|
|
48712
48932
|
});
|
|
48713
48933
|
};
|
|
@@ -48744,19 +48964,17 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
48744
48964
|
draft.push(val);
|
|
48745
48965
|
});
|
|
48746
48966
|
_onChange(newValue);
|
|
48747
|
-
context.ids.push(generateUUID());
|
|
48967
|
+
// context.ids.push(util.generateUUID());
|
|
48748
48968
|
formFunc === null || formFunc === void 0 || formFunc.insertError(name, 0);
|
|
48749
48969
|
})
|
|
48750
48970
|
}, 'empty');
|
|
48751
48971
|
}
|
|
48752
48972
|
var errorList = (Array.isArray(error) ? error : [error]).filter(Boolean);
|
|
48753
|
-
if (context.ids.length !== valueArr.length) {
|
|
48754
|
-
|
|
48755
|
-
|
|
48756
|
-
|
|
48757
|
-
}
|
|
48973
|
+
// if (context.ids.length !== valueArr.length) {
|
|
48974
|
+
// context.ids = valueArr.map(() => util.generateUUID());
|
|
48975
|
+
// }
|
|
48976
|
+
|
|
48758
48977
|
return valueArr.map(function (v, i) {
|
|
48759
|
-
var _context$ids$i;
|
|
48760
48978
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Provider, {
|
|
48761
48979
|
value: {
|
|
48762
48980
|
path: "".concat(ProviderValue.path, "[").concat(i, "]"),
|
|
@@ -48767,13 +48985,15 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
48767
48985
|
value: v,
|
|
48768
48986
|
index: i,
|
|
48769
48987
|
error: errorList,
|
|
48770
|
-
onChange: function onChange(val) {
|
|
48988
|
+
onChange: function onChange(val, options) {
|
|
48771
48989
|
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
48772
48990
|
var newValue = form_fieldset_produce(oldValue, function (draft) {
|
|
48773
48991
|
draft[i] = val;
|
|
48774
48992
|
});
|
|
48775
48993
|
_onChange(newValue);
|
|
48776
|
-
formFunc === null || formFunc === void 0 || formFunc.validateFieldset("".concat(name, "[").concat(i, "]")
|
|
48994
|
+
formFunc === null || formFunc === void 0 || formFunc.validateFieldset("".concat(name, "[").concat(i, "]"), {
|
|
48995
|
+
ignoreChildren: (options === null || options === void 0 ? void 0 : options.validate) === false
|
|
48996
|
+
});
|
|
48777
48997
|
},
|
|
48778
48998
|
onInsert: function onInsert(val) {
|
|
48779
48999
|
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
@@ -48781,7 +49001,7 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
48781
49001
|
draft.splice(i, 0, val);
|
|
48782
49002
|
});
|
|
48783
49003
|
_onChange(newValue);
|
|
48784
|
-
context.ids.splice(i, 0, generateUUID());
|
|
49004
|
+
// context.ids.splice(i, 0, util.generateUUID());
|
|
48785
49005
|
formFunc === null || formFunc === void 0 || formFunc.insertError(name, i);
|
|
48786
49006
|
},
|
|
48787
49007
|
onAppend: function onAppend(val) {
|
|
@@ -48790,7 +49010,7 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
48790
49010
|
draft.splice(i + 1, 0, val);
|
|
48791
49011
|
});
|
|
48792
49012
|
_onChange(newValue);
|
|
48793
|
-
context.ids.splice(i + 1, 0, generateUUID());
|
|
49013
|
+
// context.ids.splice(i + 1, 0, util.generateUUID());
|
|
48794
49014
|
formFunc === null || formFunc === void 0 || formFunc.insertError(name, i + 1);
|
|
48795
49015
|
},
|
|
48796
49016
|
onRemove: function onRemove() {
|
|
@@ -48799,11 +49019,11 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
48799
49019
|
draft.splice(i, 1);
|
|
48800
49020
|
});
|
|
48801
49021
|
_onChange(newValue);
|
|
48802
|
-
context.ids.splice(i, 1);
|
|
49022
|
+
// context.ids.splice(i, 1);
|
|
48803
49023
|
formFunc === null || formFunc === void 0 || formFunc.spliceError(name, i);
|
|
48804
49024
|
}
|
|
48805
49025
|
})
|
|
48806
|
-
},
|
|
49026
|
+
}, i);
|
|
48807
49027
|
});
|
|
48808
49028
|
};
|
|
48809
49029
|
/* harmony default export */ var form_fieldset = (FormFieldSet);
|
|
@@ -50951,7 +51171,7 @@ var usePaginationList = function usePaginationList(props) {
|
|
|
50951
51171
|
|
|
50952
51172
|
|
|
50953
51173
|
var useTiled = function useTiled(props) {
|
|
50954
|
-
var
|
|
51174
|
+
var filterData = props.data,
|
|
50955
51175
|
keygen = props.keygen,
|
|
50956
51176
|
_props$childrenKey = props.childrenKey,
|
|
50957
51177
|
childrenKey = _props$childrenKey === void 0 ? 'children' : _props$childrenKey,
|
|
@@ -50968,19 +51188,19 @@ var useTiled = function useTiled(props) {
|
|
|
50968
51188
|
tileds = _useState2[0],
|
|
50969
51189
|
setTileds = _useState2[1];
|
|
50970
51190
|
var _useTree = use_tree({
|
|
50971
|
-
data: data,
|
|
50972
|
-
childrenKey: childrenKey,
|
|
50973
|
-
keygen: keygen,
|
|
50974
|
-
isControlled: false
|
|
50975
|
-
}),
|
|
50976
|
-
datum = _useTree.datum;
|
|
50977
|
-
var _useTree2 = use_tree({
|
|
50978
51191
|
data: rawData,
|
|
51192
|
+
datum: props.rawDatum,
|
|
50979
51193
|
childrenKey: childrenKey,
|
|
50980
51194
|
keygen: keygen,
|
|
50981
51195
|
isControlled: false
|
|
50982
51196
|
}),
|
|
50983
|
-
rawDatum =
|
|
51197
|
+
rawDatum = _useTree.datum;
|
|
51198
|
+
if (!filterText || !onAdvancedFilter) {
|
|
51199
|
+
return {
|
|
51200
|
+
data: filterData,
|
|
51201
|
+
onFilter: onFilter
|
|
51202
|
+
};
|
|
51203
|
+
}
|
|
50984
51204
|
var handleToggle = function handleToggle(e, key) {
|
|
50985
51205
|
e.stopPropagation();
|
|
50986
51206
|
var nextTileds = toConsumableArray_default()(tileds);
|
|
@@ -51012,13 +51232,7 @@ var useTiled = function useTiled(props) {
|
|
|
51012
51232
|
children: moreIcon()
|
|
51013
51233
|
});
|
|
51014
51234
|
};
|
|
51015
|
-
|
|
51016
|
-
return {
|
|
51017
|
-
data: data,
|
|
51018
|
-
onFilter: onFilter
|
|
51019
|
-
};
|
|
51020
|
-
}
|
|
51021
|
-
var nextData = mergeFilteredTree(datum, rawDatum, tileds);
|
|
51235
|
+
var nextData = mergeFilteredTree(filterData, rawDatum, tileds);
|
|
51022
51236
|
return {
|
|
51023
51237
|
data: nextData,
|
|
51024
51238
|
onFilter: handleFilter,
|
|
@@ -53137,7 +53351,7 @@ function Select(props0) {
|
|
|
53137
53351
|
});
|
|
53138
53352
|
var rootClass = classnames_default()(className, styles === null || styles === void 0 ? void 0 : styles.rootClass, styles === null || styles === void 0 ? void 0 : styles.wrapper, isEmpty && styles.wrapperEmpty, open && (styles === null || styles === void 0 ? void 0 : styles.wrapperOpen), open && trigger === 'hover' && (styles === null || styles === void 0 ? void 0 : styles.triggerHover), disabled === true && (styles === null || styles === void 0 ? void 0 : styles.wrapperDisabled), disabled !== true && focused && (styles === null || styles === void 0 ? void 0 : styles.wrapperFocus), innerTitle && (styles === null || styles === void 0 ? void 0 : styles.wrapperInnerTitle), size === 'small' && (styles === null || styles === void 0 ? void 0 : styles.wrapperSmall), size === 'large' && (styles === null || styles === void 0 ? void 0 : styles.wrapperLarge), (!!props.error || props.status === 'error') && (styles === null || styles === void 0 ? void 0 : styles.wrapperError), clearable && (styles === null || styles === void 0 ? void 0 : styles.clearable), !border && (styles === null || styles === void 0 ? void 0 : styles.wrapperNoBorder), !!underline && (styles === null || styles === void 0 ? void 0 : styles.wrapperUnderline), defineProperty_default()({}, styles === null || styles === void 0 ? void 0 : styles.multiple, multiple));
|
|
53139
53353
|
var getRenderItem = function getRenderItem(data, index) {
|
|
53140
|
-
return typeof renderItemProp === 'function' ? renderItemProp(data, index) : data[renderItemProp];
|
|
53354
|
+
return typeof renderItemProp === 'function' ? renderItemProp(data, index) : (data === null || data === void 0 ? void 0 : data[renderItemProp]) || '';
|
|
53141
53355
|
};
|
|
53142
53356
|
var renderItem = getRenderItem;
|
|
53143
53357
|
var handleFocus = usePersistFn(function (e) {
|
|
@@ -53278,7 +53492,8 @@ function Select(props0) {
|
|
|
53278
53492
|
};
|
|
53279
53493
|
var getRenderResult = function getRenderResult(data, index) {
|
|
53280
53494
|
if (!renderResultProp) return renderItem(data, index);
|
|
53281
|
-
|
|
53495
|
+
var result = typeof renderResultProp === 'function' ? renderResultProp(data, index) : data[renderResultProp];
|
|
53496
|
+
return result !== null && result !== void 0 ? result : null;
|
|
53282
53497
|
};
|
|
53283
53498
|
var getDataByValues = function getDataByValues(values) {
|
|
53284
53499
|
return datum.getDataByValues(values, {
|
|
@@ -56333,6 +56548,7 @@ var radio_group_Group = function Group(props0) {
|
|
|
56333
56548
|
checked: datum.check(d),
|
|
56334
56549
|
disabled: datum.disabledCheck(d),
|
|
56335
56550
|
htmlValue: i,
|
|
56551
|
+
size: size,
|
|
56336
56552
|
onChange: handleIndexChange,
|
|
56337
56553
|
renderRadio: renderRadio,
|
|
56338
56554
|
children: getContent(d, i)
|
|
@@ -58624,6 +58840,9 @@ var useTableSort = function useTableSort(props) {
|
|
|
58624
58840
|
}
|
|
58625
58841
|
}
|
|
58626
58842
|
});
|
|
58843
|
+
var sortByColumn = use_persist_fn(function (params) {
|
|
58844
|
+
onSorterChange(params.columnKey, params.direction, true, params.columnSorter);
|
|
58845
|
+
});
|
|
58627
58846
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
58628
58847
|
if (context.mounted) return;
|
|
58629
58848
|
var hasSingleDefaultOrder = false;
|
|
@@ -58645,7 +58864,8 @@ var useTableSort = function useTableSort(props) {
|
|
|
58645
58864
|
return {
|
|
58646
58865
|
sortInfo: sortInfo,
|
|
58647
58866
|
onSorterChange: onSorterChange,
|
|
58648
|
-
sortedData: sortedData
|
|
58867
|
+
sortedData: sortedData,
|
|
58868
|
+
sortByColumn: sortByColumn
|
|
58649
58869
|
};
|
|
58650
58870
|
};
|
|
58651
58871
|
/* harmony default export */ var use_table_sort = (useTableSort);
|
|
@@ -60617,7 +60837,8 @@ var emptyRef = {
|
|
|
60617
60837
|
}),
|
|
60618
60838
|
sortedData = _useTableSort.sortedData,
|
|
60619
60839
|
sortInfo = _useTableSort.sortInfo,
|
|
60620
|
-
onSorterChange = _useTableSort.onSorterChange
|
|
60840
|
+
onSorterChange = _useTableSort.onSorterChange,
|
|
60841
|
+
sortByColumn = _useTableSort.sortByColumn;
|
|
60621
60842
|
var _usePaginationList = usePaginationList({
|
|
60622
60843
|
data: sortedData,
|
|
60623
60844
|
shouldPage: !!props.pagination,
|
|
@@ -60978,6 +61199,7 @@ var emptyRef = {
|
|
|
60978
61199
|
return index;
|
|
60979
61200
|
};
|
|
60980
61201
|
var tableFunc = useLatestObj({
|
|
61202
|
+
sortByColumn: sortByColumn,
|
|
60981
61203
|
scrollToIndex: virtualInfo.scrollToIndex,
|
|
60982
61204
|
getRenderIndexByData: getRenderIndexByData,
|
|
60983
61205
|
scrollColumnIntoView: virtualInfo.scrollColumnIntoView,
|
|
@@ -61120,6 +61342,7 @@ var TabsPanel = function TabsPanel(props) {
|
|
|
61120
61342
|
var _jssStyle$tabs;
|
|
61121
61343
|
var children = props.children,
|
|
61122
61344
|
id = props.id,
|
|
61345
|
+
indexInTabs = props.index,
|
|
61123
61346
|
tab = props.tab,
|
|
61124
61347
|
className = props.className,
|
|
61125
61348
|
style = props.style,
|
|
@@ -61141,16 +61364,22 @@ var TabsPanel = function TabsPanel(props) {
|
|
|
61141
61364
|
color: props.color || (active === id ? color : undefined)
|
|
61142
61365
|
};
|
|
61143
61366
|
setTabs(function (prev) {
|
|
61144
|
-
var
|
|
61367
|
+
var oldTab = prev.find(function (item) {
|
|
61145
61368
|
return item.id === id;
|
|
61146
61369
|
});
|
|
61147
|
-
if (
|
|
61370
|
+
if (oldTab) {
|
|
61148
61371
|
return prev.map(function (item) {
|
|
61149
61372
|
if (item.id !== id) return item;
|
|
61150
61373
|
return objectSpread2_default()(objectSpread2_default()({}, item), tabData);
|
|
61151
61374
|
});
|
|
61152
61375
|
}
|
|
61153
|
-
|
|
61376
|
+
if (indexInTabs === undefined) {
|
|
61377
|
+
return [].concat(toConsumableArray_default()(prev), [tabData]);
|
|
61378
|
+
}
|
|
61379
|
+
|
|
61380
|
+
// 向indexInTabs位置插入tabData
|
|
61381
|
+
var newTabs = [].concat(toConsumableArray_default()(prev.slice(0, indexInTabs)), [tabData], toConsumableArray_default()(prev.slice(indexInTabs)));
|
|
61382
|
+
return newTabs;
|
|
61154
61383
|
});
|
|
61155
61384
|
return function () {
|
|
61156
61385
|
// Panel卸载了通知父组件,去销毁相应的TabsHeader
|
|
@@ -61160,7 +61389,7 @@ var TabsPanel = function TabsPanel(props) {
|
|
|
61160
61389
|
});
|
|
61161
61390
|
});
|
|
61162
61391
|
};
|
|
61163
|
-
}, [id, tab, color
|
|
61392
|
+
}, [id, tab, color, active, props.disabled, props.jssStyle]);
|
|
61164
61393
|
if (!isActive && lazy && !keekAlive.current) {
|
|
61165
61394
|
return null;
|
|
61166
61395
|
}
|
|
@@ -61496,14 +61725,9 @@ var TabsHeader = function TabsHeader(props) {
|
|
|
61496
61725
|
extra = props.extra,
|
|
61497
61726
|
splitColor = props.splitColor,
|
|
61498
61727
|
tabBarStyle = props.tabBarStyle,
|
|
61499
|
-
getPosition = props.getPosition
|
|
61500
|
-
sticky = props.sticky;
|
|
61728
|
+
getPosition = props.getPosition;
|
|
61501
61729
|
var headerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
61502
61730
|
var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
61503
|
-
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
61504
|
-
_useState2 = slicedToArray_default()(_useState, 2),
|
|
61505
|
-
loaded = _useState2[0],
|
|
61506
|
-
setLoaded = _useState2[1];
|
|
61507
61731
|
var tabRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({});
|
|
61508
61732
|
var _useTabsContext = useTabsContext(),
|
|
61509
61733
|
shape = _useTabsContext.shape,
|
|
@@ -61512,11 +61736,6 @@ var TabsHeader = function TabsHeader(props) {
|
|
|
61512
61736
|
active = _useTabsContext.active;
|
|
61513
61737
|
var config = useConfig();
|
|
61514
61738
|
var isRtl = config.direction === 'rtl';
|
|
61515
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
61516
|
-
if (sticky && headerRef.current && scrollRef.current && !loaded) {
|
|
61517
|
-
setLoaded(true);
|
|
61518
|
-
}
|
|
61519
|
-
}, [loaded, sticky]);
|
|
61520
61739
|
var _useTransform = use_transform({
|
|
61521
61740
|
autoScroll: true,
|
|
61522
61741
|
direction: isVertical ? 'Y' : 'X',
|
|
@@ -61578,17 +61797,17 @@ var TabsHeader = function TabsHeader(props) {
|
|
|
61578
61797
|
var single = isRtl && !isVertical ? -1 : 1;
|
|
61579
61798
|
setTransform(delta + headerRef.current.clientWidth * single);
|
|
61580
61799
|
};
|
|
61581
|
-
var
|
|
61800
|
+
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
|
|
61582
61801
|
offsetTop: 0,
|
|
61583
61802
|
offsetLeft: 0
|
|
61584
61803
|
}),
|
|
61804
|
+
_useState2 = slicedToArray_default()(_useState, 2),
|
|
61805
|
+
currentTabOffset = _useState2[0],
|
|
61806
|
+
setCurrentTabOffset = _useState2[1];
|
|
61807
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
|
|
61585
61808
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
61586
|
-
|
|
61587
|
-
|
|
61588
|
-
var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
|
|
61589
|
-
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
61590
|
-
currentTabRect = _useState6[0],
|
|
61591
|
-
setCurrentTabRect = _useState6[1];
|
|
61809
|
+
currentTabRect = _useState4[0],
|
|
61810
|
+
setCurrentTabRect = _useState4[1];
|
|
61592
61811
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
61593
61812
|
var _currentTab$getBoundi;
|
|
61594
61813
|
if (shape !== 'line' && shape !== 'dash') return;
|
|
@@ -61884,7 +62103,8 @@ var Tabs = function Tabs(props) {
|
|
|
61884
62103
|
var Child = child;
|
|
61885
62104
|
if (tabs_isNamedComponent(Child.type) && Child.type.displayName === 'ShineoutTabsPanel') {
|
|
61886
62105
|
return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(Child, {
|
|
61887
|
-
id: Child.props.id !== undefined ? Child.props.id : index
|
|
62106
|
+
id: Child.props.id !== undefined ? Child.props.id : index,
|
|
62107
|
+
index: index
|
|
61888
62108
|
});
|
|
61889
62109
|
}
|
|
61890
62110
|
if (allowNonPanel) {
|
|
@@ -63160,7 +63380,8 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
63160
63380
|
childrenKey: childrenKey,
|
|
63161
63381
|
expanded: expanded,
|
|
63162
63382
|
rawData: rawData,
|
|
63163
|
-
onFilter: onFilter
|
|
63383
|
+
onFilter: onFilter,
|
|
63384
|
+
rawDatum: datum
|
|
63164
63385
|
}),
|
|
63165
63386
|
tiledData = _useTiled.data,
|
|
63166
63387
|
onTiledFilter = _useTiled.onFilter,
|
|
@@ -63187,6 +63408,15 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
63187
63408
|
closePop = _usePopup.closePop,
|
|
63188
63409
|
PopupProvider = _usePopup.Provider,
|
|
63189
63410
|
popupProviderValue = _usePopup.providerValue;
|
|
63411
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
63412
|
+
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
63413
|
+
hadOpened = _useState4[0],
|
|
63414
|
+
setHadOpened = _useState4[1];
|
|
63415
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
63416
|
+
if (open) {
|
|
63417
|
+
setHadOpened(true);
|
|
63418
|
+
}
|
|
63419
|
+
}, [open]);
|
|
63190
63420
|
var tipNode = use_tip({
|
|
63191
63421
|
popover: props.popover,
|
|
63192
63422
|
popoverProps: props.popoverProps,
|
|
@@ -63442,6 +63672,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
63442
63672
|
filterText: filterText,
|
|
63443
63673
|
onFilter: handleFilter,
|
|
63444
63674
|
onRef: inputRef,
|
|
63675
|
+
inputRef: inputRef,
|
|
63445
63676
|
checkUnMatched: checkUnMatched,
|
|
63446
63677
|
onClearCreatedData: onClearCreatedData,
|
|
63447
63678
|
getDataByValues: getResultByValue,
|
|
@@ -63561,7 +63792,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
63561
63792
|
onBlur: handleBlur,
|
|
63562
63793
|
onFocus: handleFocus,
|
|
63563
63794
|
onKeyDown: handleKeyDown,
|
|
63564
|
-
children: [tipNode, renderResult(), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
|
|
63795
|
+
children: [tipNode, renderResult(), hadOpened && /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
|
|
63565
63796
|
adjust: adjust,
|
|
63566
63797
|
focus: open,
|
|
63567
63798
|
fixedWidth: "min",
|
|
@@ -67191,7 +67422,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
67191
67422
|
|
|
67192
67423
|
|
|
67193
67424
|
/* harmony default export */ var src_0 = ({
|
|
67194
|
-
version: '3.6.0-beta.
|
|
67425
|
+
version: '3.6.0-beta.3'
|
|
67195
67426
|
});
|
|
67196
67427
|
}();
|
|
67197
67428
|
/******/ return __webpack_exports__;
|