shineout 3.6.0-beta.2 → 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 +293 -63
- 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
|
|
|
@@ -21777,7 +21777,7 @@ var popoverStyle = {
|
|
|
21777
21777
|
},
|
|
21778
21778
|
'&::after': {
|
|
21779
21779
|
// left: arrowGap * -1,
|
|
21780
|
-
|
|
21780
|
+
right: "calc(".concat(hideArrowGap, " * -1)"),
|
|
21781
21781
|
top: '0',
|
|
21782
21782
|
bottom: '0',
|
|
21783
21783
|
content: '" "',
|
|
@@ -23529,10 +23529,9 @@ var scale_circle_loop = function loop() {
|
|
|
23529
23529
|
boxSizing: 'border-box',
|
|
23530
23530
|
position: 'relative',
|
|
23531
23531
|
borderStyle: 'solid',
|
|
23532
|
-
borderColor: src.spinColor,
|
|
23532
|
+
borderColor: "transparent ".concat(src.spinColor, " ").concat(src.spinColor, " ").concat(src.spinColor),
|
|
23533
23533
|
borderRadius: '50%',
|
|
23534
|
-
animation: '$ring 1s linear infinite'
|
|
23535
|
-
borderTopColor: 'transparent'
|
|
23534
|
+
animation: '$ring 1s linear infinite'
|
|
23536
23535
|
});
|
|
23537
23536
|
;// CONCATENATED MODULE: ../shineout-style/src/spin/tree-bounce.ts
|
|
23538
23537
|
|
|
@@ -23959,16 +23958,66 @@ var stepsStyle = {
|
|
|
23959
23958
|
small: {
|
|
23960
23959
|
fontSize: src.stepsIconFontSize,
|
|
23961
23960
|
'&$arrow': {
|
|
23961
|
+
'& $step[dir=rtl]:after': {
|
|
23962
|
+
left: -12
|
|
23963
|
+
},
|
|
23962
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
|
+
},
|
|
23963
23987
|
'&:after': {
|
|
23964
|
-
top:
|
|
23965
|
-
|
|
23966
|
-
|
|
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
|
+
}
|
|
23967
24016
|
},
|
|
23968
24017
|
'&:before': {
|
|
23969
|
-
|
|
23970
|
-
|
|
23971
|
-
|
|
24018
|
+
borderLeftWidth: 12,
|
|
24019
|
+
borderTopWidth: 16,
|
|
24020
|
+
borderBottomWidth: 16
|
|
23972
24021
|
}
|
|
23973
24022
|
},
|
|
23974
24023
|
'& $content': {
|
|
@@ -24057,9 +24106,67 @@ var stepsStyle = {
|
|
|
24057
24106
|
},
|
|
24058
24107
|
large: {
|
|
24059
24108
|
'&$arrow': {
|
|
24060
|
-
'& $step': {
|
|
24061
|
-
'
|
|
24062
|
-
|
|
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
|
+
}
|
|
24063
24170
|
},
|
|
24064
24171
|
'& $content': {
|
|
24065
24172
|
padding: "".concat(src.stepsLargeArrowPaddingY, " ").concat(src.stepsLargeArrowPaddingX),
|
|
@@ -32476,7 +32583,13 @@ var FormFooterProvider = function FormFooterProvider(props) {
|
|
|
32476
32583
|
if (!context.hasSubmit) {
|
|
32477
32584
|
context.submit = info.submit;
|
|
32478
32585
|
context.hasSubmit = true;
|
|
32586
|
+
return true;
|
|
32479
32587
|
}
|
|
32588
|
+
return false;
|
|
32589
|
+
});
|
|
32590
|
+
var deleteFormInfo = usePersistFn(function () {
|
|
32591
|
+
context.hasSubmit = false;
|
|
32592
|
+
context.submit = function () {};
|
|
32480
32593
|
});
|
|
32481
32594
|
var setFormStats = usePersistFn(function (disabled) {
|
|
32482
32595
|
if (disabled !== formStats) {
|
|
@@ -32487,6 +32600,7 @@ var FormFooterProvider = function FormFooterProvider(props) {
|
|
|
32487
32600
|
return {
|
|
32488
32601
|
setFormStats: setFormStats,
|
|
32489
32602
|
setFormInfo: setFormInfo,
|
|
32603
|
+
deleteFormInfo: deleteFormInfo,
|
|
32490
32604
|
formStats: formStats,
|
|
32491
32605
|
func: context
|
|
32492
32606
|
};
|
|
@@ -34201,6 +34315,34 @@ var getAllKeyPaths = function getAllKeyPaths(obj) {
|
|
|
34201
34315
|
return keys.concat(obj[key] !== null && typeof_default()(obj[key]) === 'object' ? getAllKeyPaths(obj[key], newKey) : newKey);
|
|
34202
34316
|
}, []);
|
|
34203
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
|
+
};
|
|
34204
34346
|
;// CONCATENATED MODULE: ../base/src/common/use-clear.ts
|
|
34205
34347
|
|
|
34206
34348
|
var useClear = function useClear(props) {
|
|
@@ -34860,6 +35002,9 @@ var checkbox_Checkbox = function Checkbox(props) {
|
|
|
34860
35002
|
if ('value' in props && props.checked === undefined) {
|
|
34861
35003
|
onInputableCheckboxChange(checked);
|
|
34862
35004
|
}
|
|
35005
|
+
if (props.onRawChange) {
|
|
35006
|
+
props.onRawChange(checked ? htmlValue : undefined, checked, htmlValue);
|
|
35007
|
+
}
|
|
34863
35008
|
onChange === null || onChange === void 0 || onChange(checked ? htmlValue : undefined, checked, htmlValue);
|
|
34864
35009
|
});
|
|
34865
35010
|
var getChecked = function getChecked() {
|
|
@@ -34900,7 +35045,10 @@ var checkbox_Checkbox = function Checkbox(props) {
|
|
|
34900
35045
|
var CheckboxWithContext = function CheckboxWithContext(props) {
|
|
34901
35046
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(group_context.Consumer, {
|
|
34902
35047
|
children: function children(value) {
|
|
34903
|
-
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
|
+
}));
|
|
34904
35052
|
}
|
|
34905
35053
|
});
|
|
34906
35054
|
};
|
|
@@ -37910,7 +38058,7 @@ var FilterNode = function FilterNode(props) {
|
|
|
37910
38058
|
onChange = props.onChange,
|
|
37911
38059
|
onPathChange = props.onPathChange;
|
|
37912
38060
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$cascader = jssStyle.cascader) === null || _jssStyle$cascader === void 0 ? void 0 : _jssStyle$cascader.call(jssStyle);
|
|
37913
|
-
var handleSelectItem = function handleSelectItem(index, e) {
|
|
38061
|
+
var handleSelectItem = function handleSelectItem(index, d, e) {
|
|
37914
38062
|
var isFinal = data && index === data.length - 1;
|
|
37915
38063
|
if (shouldFinal && !isFinal) return;
|
|
37916
38064
|
if (e) e.stopPropagation();
|
|
@@ -37920,13 +38068,13 @@ var FilterNode = function FilterNode(props) {
|
|
|
37920
38068
|
var keys = data.slice(0, index + 1).map(function (i) {
|
|
37921
38069
|
return datum.getKey(i);
|
|
37922
38070
|
});
|
|
37923
|
-
if (onChange) onChange(keys);
|
|
38071
|
+
if (onChange) onChange(keys, d);
|
|
37924
38072
|
onPathChange(datum.getKey(item), item, keys.slice(0, keys.length - 1), true);
|
|
37925
38073
|
setInputText('');
|
|
37926
38074
|
setFilterText('');
|
|
37927
38075
|
};
|
|
37928
38076
|
var handleSelect = function handleSelect() {
|
|
37929
|
-
handleSelectItem(data.length - 1);
|
|
38077
|
+
handleSelectItem(data.length - 1, data === null || data === void 0 ? void 0 : data[data.length - 1]);
|
|
37930
38078
|
};
|
|
37931
38079
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
37932
38080
|
className: classnames_default()(styles.option, styles.filterOption),
|
|
@@ -37935,7 +38083,7 @@ var FilterNode = function FilterNode(props) {
|
|
|
37935
38083
|
className: classnames_default()(styles.optionInner),
|
|
37936
38084
|
children: data.map(function (item, index) {
|
|
37937
38085
|
var handleClick = function handleClick(e) {
|
|
37938
|
-
handleSelectItem(index, e);
|
|
38086
|
+
handleSelectItem(index, item, e);
|
|
37939
38087
|
};
|
|
37940
38088
|
var isDisabled = datum.isDisabled(datum.getKey(item));
|
|
37941
38089
|
var content = /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
@@ -39154,6 +39302,13 @@ var result_Result = function Result(props) {
|
|
|
39154
39302
|
}
|
|
39155
39303
|
mounted.current = true;
|
|
39156
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]);
|
|
39157
39312
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
39158
39313
|
handleResetMore();
|
|
39159
39314
|
}, [valueProp, data]);
|
|
@@ -39557,12 +39712,13 @@ var Cascader = function Cascader(props0) {
|
|
|
39557
39712
|
onClick: handleResultClick,
|
|
39558
39713
|
children: defaultIcon
|
|
39559
39714
|
});
|
|
39715
|
+
var close = /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
39716
|
+
className: styles.clearIcon,
|
|
39717
|
+
onClick: handleClear,
|
|
39718
|
+
children: icons_config.cascader.Close
|
|
39719
|
+
});
|
|
39560
39720
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
39561
|
-
children: [
|
|
39562
|
-
className: styles.clearIcon,
|
|
39563
|
-
onClick: handleClear,
|
|
39564
|
-
children: icons_config.cascader.Close
|
|
39565
|
-
}), !open && !isEmpty && arrow]
|
|
39721
|
+
children: [close, !open && !isEmpty && !focused && arrow]
|
|
39566
39722
|
});
|
|
39567
39723
|
};
|
|
39568
39724
|
var renderIcon = function renderIcon() {
|
|
@@ -45076,11 +45232,23 @@ var DatePicker = function DatePicker(props0) {
|
|
|
45076
45232
|
}
|
|
45077
45233
|
} else {
|
|
45078
45234
|
func.finishEdit();
|
|
45235
|
+
|
|
45236
|
+
// 如果是通过 props.open 控制的,那么需要在关闭时,将组件再次进入编辑状态
|
|
45237
|
+
if (props.open === true) {
|
|
45238
|
+
func.startEdit();
|
|
45239
|
+
}
|
|
45079
45240
|
}
|
|
45080
45241
|
setIsCloseFromConfirm(false);
|
|
45081
45242
|
}
|
|
45082
45243
|
(_props$onCollapse = props.onCollapse) === null || _props$onCollapse === void 0 || _props$onCollapse.call(props, isOpen);
|
|
45083
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
|
+
}, []);
|
|
45084
45252
|
var _usePopup = use_popup({
|
|
45085
45253
|
open: props.open,
|
|
45086
45254
|
onCollapse: onCollapse,
|
|
@@ -47658,6 +47826,7 @@ var useForm = function useForm(props) {
|
|
|
47658
47826
|
var _React$useRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
|
|
47659
47827
|
defaultValues: {},
|
|
47660
47828
|
validateMap: {},
|
|
47829
|
+
ignoreValidateFields: [],
|
|
47661
47830
|
updateMap: {},
|
|
47662
47831
|
flowMap: {},
|
|
47663
47832
|
removeArr: new Set(),
|
|
@@ -47690,10 +47859,21 @@ var useForm = function useForm(props) {
|
|
|
47690
47859
|
} else {
|
|
47691
47860
|
var names = isArray(name) ? name : [name];
|
|
47692
47861
|
names.forEach(function (key) {
|
|
47693
|
-
var _context$
|
|
47694
|
-
|
|
47695
|
-
|
|
47696
|
-
|
|
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
|
+
}
|
|
47697
47877
|
(_context$flowMap$key = context.flowMap[key]) === null || _context$flowMap$key === void 0 || _context$flowMap$key.forEach(function (update) {
|
|
47698
47878
|
update();
|
|
47699
47879
|
});
|
|
@@ -47750,9 +47930,25 @@ var useForm = function useForm(props) {
|
|
|
47750
47930
|
var validateFields = use_persist_fn(function (fields) {
|
|
47751
47931
|
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
47752
47932
|
return new Promise(function (resolve, reject) {
|
|
47753
|
-
var finalFields =
|
|
47754
|
-
|
|
47755
|
-
|
|
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
|
+
}
|
|
47756
47952
|
var validates = finalFields.map(function (key) {
|
|
47757
47953
|
var validateField = context.validateMap[key];
|
|
47758
47954
|
return Array.from(validateField).map(function (validate) {
|
|
@@ -47987,7 +48183,7 @@ var useForm = function useForm(props) {
|
|
|
47987
48183
|
}, 10);
|
|
47988
48184
|
};
|
|
47989
48185
|
};
|
|
47990
|
-
var validateFieldset = function validateFieldset(name) {
|
|
48186
|
+
var validateFieldset = function validateFieldset(name, config) {
|
|
47991
48187
|
var na = "".concat(name, "[");
|
|
47992
48188
|
var no = "".concat(name, ".");
|
|
47993
48189
|
var fields = [];
|
|
@@ -47996,6 +48192,15 @@ var useForm = function useForm(props) {
|
|
|
47996
48192
|
fields.push(key);
|
|
47997
48193
|
}
|
|
47998
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
|
+
}
|
|
47999
48204
|
validateFields(fields).catch(function () {});
|
|
48000
48205
|
};
|
|
48001
48206
|
var getDefaultValue = function getDefaultValue() {
|
|
@@ -48284,6 +48489,10 @@ var Form = function Form(props) {
|
|
|
48284
48489
|
props.setForm(formRefObj);
|
|
48285
48490
|
}
|
|
48286
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;
|
|
48287
48496
|
var handleFormModalInfo = function handleFormModalInfo() {
|
|
48288
48497
|
var status = undefined;
|
|
48289
48498
|
if (props.disabled) {
|
|
@@ -48296,11 +48505,17 @@ var Form = function Form(props) {
|
|
|
48296
48505
|
modalFormContext === null || modalFormContext === void 0 || modalFormContext.setFormStats(status);
|
|
48297
48506
|
}
|
|
48298
48507
|
if (props.onSubmit) {
|
|
48299
|
-
modalFormContext === null || modalFormContext === void 0
|
|
48508
|
+
var ok = modalFormContext === null || modalFormContext === void 0 ? void 0 : modalFormContext.setFormInfo(formRefObj);
|
|
48509
|
+
context.bindindModalFormContextSuccess = !!ok;
|
|
48300
48510
|
}
|
|
48301
48511
|
};
|
|
48302
48512
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
48303
48513
|
handleFormModalInfo();
|
|
48514
|
+
return function () {
|
|
48515
|
+
if (context.bindindModalFormContextSuccess) {
|
|
48516
|
+
modalFormContext === null || modalFormContext === void 0 || modalFormContext.deleteFormInfo();
|
|
48517
|
+
}
|
|
48518
|
+
};
|
|
48304
48519
|
}, [props.disabled, props.pending]);
|
|
48305
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)]);
|
|
48306
48521
|
var formProps = getFormProps({
|
|
@@ -48706,13 +48921,13 @@ var form_fieldset_produce = utils_immer_produce;
|
|
|
48706
48921
|
var FormFieldSet = function FormFieldSet(props) {
|
|
48707
48922
|
var children = props.children,
|
|
48708
48923
|
empty = props.empty;
|
|
48709
|
-
|
|
48710
|
-
|
|
48711
|
-
}),
|
|
48712
|
-
context = _React$useRef.current;
|
|
48924
|
+
// const { current: context } = React.useRef<{ ids: string[] }>({ ids: [] });
|
|
48925
|
+
|
|
48713
48926
|
var formFunc = useFormFunc();
|
|
48714
48927
|
var validateFieldSet = function validateFieldSet() {
|
|
48715
|
-
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) {
|
|
48716
48931
|
return e;
|
|
48717
48932
|
});
|
|
48718
48933
|
};
|
|
@@ -48749,19 +48964,17 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
48749
48964
|
draft.push(val);
|
|
48750
48965
|
});
|
|
48751
48966
|
_onChange(newValue);
|
|
48752
|
-
context.ids.push(generateUUID());
|
|
48967
|
+
// context.ids.push(util.generateUUID());
|
|
48753
48968
|
formFunc === null || formFunc === void 0 || formFunc.insertError(name, 0);
|
|
48754
48969
|
})
|
|
48755
48970
|
}, 'empty');
|
|
48756
48971
|
}
|
|
48757
48972
|
var errorList = (Array.isArray(error) ? error : [error]).filter(Boolean);
|
|
48758
|
-
if (context.ids.length !== valueArr.length) {
|
|
48759
|
-
|
|
48760
|
-
|
|
48761
|
-
|
|
48762
|
-
}
|
|
48973
|
+
// if (context.ids.length !== valueArr.length) {
|
|
48974
|
+
// context.ids = valueArr.map(() => util.generateUUID());
|
|
48975
|
+
// }
|
|
48976
|
+
|
|
48763
48977
|
return valueArr.map(function (v, i) {
|
|
48764
|
-
var _context$ids$i;
|
|
48765
48978
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Provider, {
|
|
48766
48979
|
value: {
|
|
48767
48980
|
path: "".concat(ProviderValue.path, "[").concat(i, "]"),
|
|
@@ -48772,13 +48985,15 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
48772
48985
|
value: v,
|
|
48773
48986
|
index: i,
|
|
48774
48987
|
error: errorList,
|
|
48775
|
-
onChange: function onChange(val) {
|
|
48988
|
+
onChange: function onChange(val, options) {
|
|
48776
48989
|
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
48777
48990
|
var newValue = form_fieldset_produce(oldValue, function (draft) {
|
|
48778
48991
|
draft[i] = val;
|
|
48779
48992
|
});
|
|
48780
48993
|
_onChange(newValue);
|
|
48781
|
-
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
|
+
});
|
|
48782
48997
|
},
|
|
48783
48998
|
onInsert: function onInsert(val) {
|
|
48784
48999
|
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
@@ -48786,7 +49001,7 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
48786
49001
|
draft.splice(i, 0, val);
|
|
48787
49002
|
});
|
|
48788
49003
|
_onChange(newValue);
|
|
48789
|
-
context.ids.splice(i, 0, generateUUID());
|
|
49004
|
+
// context.ids.splice(i, 0, util.generateUUID());
|
|
48790
49005
|
formFunc === null || formFunc === void 0 || formFunc.insertError(name, i);
|
|
48791
49006
|
},
|
|
48792
49007
|
onAppend: function onAppend(val) {
|
|
@@ -48795,7 +49010,7 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
48795
49010
|
draft.splice(i + 1, 0, val);
|
|
48796
49011
|
});
|
|
48797
49012
|
_onChange(newValue);
|
|
48798
|
-
context.ids.splice(i + 1, 0, generateUUID());
|
|
49013
|
+
// context.ids.splice(i + 1, 0, util.generateUUID());
|
|
48799
49014
|
formFunc === null || formFunc === void 0 || formFunc.insertError(name, i + 1);
|
|
48800
49015
|
},
|
|
48801
49016
|
onRemove: function onRemove() {
|
|
@@ -48804,11 +49019,11 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
48804
49019
|
draft.splice(i, 1);
|
|
48805
49020
|
});
|
|
48806
49021
|
_onChange(newValue);
|
|
48807
|
-
context.ids.splice(i, 1);
|
|
49022
|
+
// context.ids.splice(i, 1);
|
|
48808
49023
|
formFunc === null || formFunc === void 0 || formFunc.spliceError(name, i);
|
|
48809
49024
|
}
|
|
48810
49025
|
})
|
|
48811
|
-
},
|
|
49026
|
+
}, i);
|
|
48812
49027
|
});
|
|
48813
49028
|
};
|
|
48814
49029
|
/* harmony default export */ var form_fieldset = (FormFieldSet);
|
|
@@ -53136,7 +53351,7 @@ function Select(props0) {
|
|
|
53136
53351
|
});
|
|
53137
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));
|
|
53138
53353
|
var getRenderItem = function getRenderItem(data, index) {
|
|
53139
|
-
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]) || '';
|
|
53140
53355
|
};
|
|
53141
53356
|
var renderItem = getRenderItem;
|
|
53142
53357
|
var handleFocus = usePersistFn(function (e) {
|
|
@@ -53277,7 +53492,8 @@ function Select(props0) {
|
|
|
53277
53492
|
};
|
|
53278
53493
|
var getRenderResult = function getRenderResult(data, index) {
|
|
53279
53494
|
if (!renderResultProp) return renderItem(data, index);
|
|
53280
|
-
|
|
53495
|
+
var result = typeof renderResultProp === 'function' ? renderResultProp(data, index) : data[renderResultProp];
|
|
53496
|
+
return result !== null && result !== void 0 ? result : null;
|
|
53281
53497
|
};
|
|
53282
53498
|
var getDataByValues = function getDataByValues(values) {
|
|
53283
53499
|
return datum.getDataByValues(values, {
|
|
@@ -56332,6 +56548,7 @@ var radio_group_Group = function Group(props0) {
|
|
|
56332
56548
|
checked: datum.check(d),
|
|
56333
56549
|
disabled: datum.disabledCheck(d),
|
|
56334
56550
|
htmlValue: i,
|
|
56551
|
+
size: size,
|
|
56335
56552
|
onChange: handleIndexChange,
|
|
56336
56553
|
renderRadio: renderRadio,
|
|
56337
56554
|
children: getContent(d, i)
|
|
@@ -58623,6 +58840,9 @@ var useTableSort = function useTableSort(props) {
|
|
|
58623
58840
|
}
|
|
58624
58841
|
}
|
|
58625
58842
|
});
|
|
58843
|
+
var sortByColumn = use_persist_fn(function (params) {
|
|
58844
|
+
onSorterChange(params.columnKey, params.direction, true, params.columnSorter);
|
|
58845
|
+
});
|
|
58626
58846
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
58627
58847
|
if (context.mounted) return;
|
|
58628
58848
|
var hasSingleDefaultOrder = false;
|
|
@@ -58644,7 +58864,8 @@ var useTableSort = function useTableSort(props) {
|
|
|
58644
58864
|
return {
|
|
58645
58865
|
sortInfo: sortInfo,
|
|
58646
58866
|
onSorterChange: onSorterChange,
|
|
58647
|
-
sortedData: sortedData
|
|
58867
|
+
sortedData: sortedData,
|
|
58868
|
+
sortByColumn: sortByColumn
|
|
58648
58869
|
};
|
|
58649
58870
|
};
|
|
58650
58871
|
/* harmony default export */ var use_table_sort = (useTableSort);
|
|
@@ -60616,7 +60837,8 @@ var emptyRef = {
|
|
|
60616
60837
|
}),
|
|
60617
60838
|
sortedData = _useTableSort.sortedData,
|
|
60618
60839
|
sortInfo = _useTableSort.sortInfo,
|
|
60619
|
-
onSorterChange = _useTableSort.onSorterChange
|
|
60840
|
+
onSorterChange = _useTableSort.onSorterChange,
|
|
60841
|
+
sortByColumn = _useTableSort.sortByColumn;
|
|
60620
60842
|
var _usePaginationList = usePaginationList({
|
|
60621
60843
|
data: sortedData,
|
|
60622
60844
|
shouldPage: !!props.pagination,
|
|
@@ -60977,6 +61199,7 @@ var emptyRef = {
|
|
|
60977
61199
|
return index;
|
|
60978
61200
|
};
|
|
60979
61201
|
var tableFunc = useLatestObj({
|
|
61202
|
+
sortByColumn: sortByColumn,
|
|
60980
61203
|
scrollToIndex: virtualInfo.scrollToIndex,
|
|
60981
61204
|
getRenderIndexByData: getRenderIndexByData,
|
|
60982
61205
|
scrollColumnIntoView: virtualInfo.scrollColumnIntoView,
|
|
@@ -61119,6 +61342,7 @@ var TabsPanel = function TabsPanel(props) {
|
|
|
61119
61342
|
var _jssStyle$tabs;
|
|
61120
61343
|
var children = props.children,
|
|
61121
61344
|
id = props.id,
|
|
61345
|
+
indexInTabs = props.index,
|
|
61122
61346
|
tab = props.tab,
|
|
61123
61347
|
className = props.className,
|
|
61124
61348
|
style = props.style,
|
|
@@ -61140,16 +61364,22 @@ var TabsPanel = function TabsPanel(props) {
|
|
|
61140
61364
|
color: props.color || (active === id ? color : undefined)
|
|
61141
61365
|
};
|
|
61142
61366
|
setTabs(function (prev) {
|
|
61143
|
-
var
|
|
61367
|
+
var oldTab = prev.find(function (item) {
|
|
61144
61368
|
return item.id === id;
|
|
61145
61369
|
});
|
|
61146
|
-
if (
|
|
61370
|
+
if (oldTab) {
|
|
61147
61371
|
return prev.map(function (item) {
|
|
61148
61372
|
if (item.id !== id) return item;
|
|
61149
61373
|
return objectSpread2_default()(objectSpread2_default()({}, item), tabData);
|
|
61150
61374
|
});
|
|
61151
61375
|
}
|
|
61152
|
-
|
|
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;
|
|
61153
61383
|
});
|
|
61154
61384
|
return function () {
|
|
61155
61385
|
// Panel卸载了通知父组件,去销毁相应的TabsHeader
|
|
@@ -61159,7 +61389,7 @@ var TabsPanel = function TabsPanel(props) {
|
|
|
61159
61389
|
});
|
|
61160
61390
|
});
|
|
61161
61391
|
};
|
|
61162
|
-
}, [id, tab, color
|
|
61392
|
+
}, [id, tab, color, active, props.disabled, props.jssStyle]);
|
|
61163
61393
|
if (!isActive && lazy && !keekAlive.current) {
|
|
61164
61394
|
return null;
|
|
61165
61395
|
}
|
|
@@ -61495,8 +61725,7 @@ var TabsHeader = function TabsHeader(props) {
|
|
|
61495
61725
|
extra = props.extra,
|
|
61496
61726
|
splitColor = props.splitColor,
|
|
61497
61727
|
tabBarStyle = props.tabBarStyle,
|
|
61498
|
-
getPosition = props.getPosition
|
|
61499
|
-
sticky = props.sticky;
|
|
61728
|
+
getPosition = props.getPosition;
|
|
61500
61729
|
var headerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
61501
61730
|
var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
61502
61731
|
var tabRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({});
|
|
@@ -61874,7 +62103,8 @@ var Tabs = function Tabs(props) {
|
|
|
61874
62103
|
var Child = child;
|
|
61875
62104
|
if (tabs_isNamedComponent(Child.type) && Child.type.displayName === 'ShineoutTabsPanel') {
|
|
61876
62105
|
return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(Child, {
|
|
61877
|
-
id: Child.props.id !== undefined ? Child.props.id : index
|
|
62106
|
+
id: Child.props.id !== undefined ? Child.props.id : index,
|
|
62107
|
+
index: index
|
|
61878
62108
|
});
|
|
61879
62109
|
}
|
|
61880
62110
|
if (allowNonPanel) {
|
|
@@ -67192,7 +67422,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
67192
67422
|
|
|
67193
67423
|
|
|
67194
67424
|
/* harmony default export */ var src_0 = ({
|
|
67195
|
-
version: '3.6.0-beta.
|
|
67425
|
+
version: '3.6.0-beta.3'
|
|
67196
67426
|
});
|
|
67197
67427
|
}();
|
|
67198
67428
|
/******/ return __webpack_exports__;
|