shineout 3.5.4-beta.8 → 3.5.4-fix.1
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.d.ts +1 -1
- package/cjs/index.js +8 -1
- package/dist/shineout.js +131 -70
- 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.d.ts +1 -1
- package/esm/index.js +2 -2
- package/package.json +5 -5
package/cjs/index.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export { default as Upload } from './upload';
|
|
|
51
51
|
export { setConfig, config, setLocale, setIcons } from '@sheinx/base';
|
|
52
52
|
export type { ConfigOption } from '@sheinx/base';
|
|
53
53
|
export { setToken, useToken } from '@sheinx/theme';
|
|
54
|
-
export { JssProvider, SheetsRegistry, setJssConfig } from '@sheinx/shineout-style';
|
|
54
|
+
export { JssProvider, SheetsRegistry, setJssConfig, scopeNormalizeStyle, } from '@sheinx/shineout-style';
|
|
55
55
|
export * as utls from './utils';
|
|
56
56
|
export * from './deprecated';
|
|
57
57
|
export * as TYPE from './type';
|
package/cjs/index.js
CHANGED
|
@@ -65,6 +65,7 @@ var _exportNames = {
|
|
|
65
65
|
JssProvider: true,
|
|
66
66
|
SheetsRegistry: true,
|
|
67
67
|
setJssConfig: true,
|
|
68
|
+
scopeNormalizeStyle: true,
|
|
68
69
|
utls: true,
|
|
69
70
|
TYPE: true
|
|
70
71
|
};
|
|
@@ -388,6 +389,12 @@ Object.defineProperty(exports, "config", {
|
|
|
388
389
|
}
|
|
389
390
|
});
|
|
390
391
|
exports.default = void 0;
|
|
392
|
+
Object.defineProperty(exports, "scopeNormalizeStyle", {
|
|
393
|
+
enumerable: true,
|
|
394
|
+
get: function get() {
|
|
395
|
+
return _shineoutStyle.scopeNormalizeStyle;
|
|
396
|
+
}
|
|
397
|
+
});
|
|
391
398
|
Object.defineProperty(exports, "setConfig", {
|
|
392
399
|
enumerable: true,
|
|
393
400
|
get: function get() {
|
|
@@ -500,5 +507,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
500
507
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
501
508
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
502
509
|
var _default = exports.default = {
|
|
503
|
-
version: '3.5.4-
|
|
510
|
+
version: '3.5.4-fix.1'
|
|
504
511
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -6378,6 +6378,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
6378
6378
|
color: function() { return /* reexport */ color; },
|
|
6379
6379
|
config: function() { return /* reexport */ src_config_config; },
|
|
6380
6380
|
"default": function() { return /* binding */ src_0; },
|
|
6381
|
+
scopeNormalizeStyle: function() { return /* reexport */ scopeNormalizeStyle; },
|
|
6381
6382
|
setConfig: function() { return /* reexport */ config_setConfig; },
|
|
6382
6383
|
setIcons: function() { return /* reexport */ setIcons; },
|
|
6383
6384
|
setJssConfig: function() { return /* reexport */ setJssConfig; },
|
|
@@ -7052,20 +7053,29 @@ var AlertIcon = function AlertIcon(props) {
|
|
|
7052
7053
|
var AlertIconMap = alert_icon_icons;
|
|
7053
7054
|
/* harmony default export */ var alert_icon = (AlertIcon);
|
|
7054
7055
|
;// CONCATENATED MODULE: ../hooks/src/utils/warning.ts
|
|
7056
|
+
var shownMessages = new Set();
|
|
7057
|
+
var shouldShowMessage = function shouldShowMessage(message) {
|
|
7058
|
+
if (shownMessages.has(message)) {
|
|
7059
|
+
return false;
|
|
7060
|
+
}
|
|
7061
|
+
shownMessages.add(message);
|
|
7062
|
+
return true;
|
|
7063
|
+
};
|
|
7055
7064
|
var deprecated = function deprecated(prop, newProp, component, extraMessage) {
|
|
7056
|
-
if (false) {}
|
|
7065
|
+
if (false) { var msg; }
|
|
7057
7066
|
};
|
|
7058
7067
|
var breakingChange = function breakingChange(message) {
|
|
7059
|
-
if (false) {}
|
|
7068
|
+
if (false) { var msg; }
|
|
7060
7069
|
};
|
|
7061
7070
|
var devWarn = function devWarn(message) {
|
|
7062
7071
|
if (false) {}
|
|
7063
7072
|
};
|
|
7064
7073
|
var conflictWarning = function conflictWarning(component, prop1, prop2) {
|
|
7065
|
-
if (false) {}
|
|
7074
|
+
if (false) { var msg; }
|
|
7066
7075
|
};
|
|
7067
7076
|
var error = function error(message) {
|
|
7068
|
-
|
|
7077
|
+
var msg = new Error("[shineout] ".concat(message));
|
|
7078
|
+
shouldShowMessage(msg.message) && console.error(msg);
|
|
7069
7079
|
};
|
|
7070
7080
|
var devUseWarning = {
|
|
7071
7081
|
error: error,
|
|
@@ -12030,7 +12040,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12030
12040
|
};
|
|
12031
12041
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12032
12042
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12033
|
-
/* harmony default export */ var version = ('3.5.4-
|
|
12043
|
+
/* harmony default export */ var version = ('3.5.4-fix.1');
|
|
12034
12044
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12035
12045
|
|
|
12036
12046
|
|
|
@@ -21544,12 +21554,50 @@ var normalize_token = {
|
|
|
21544
21554
|
};
|
|
21545
21555
|
var lineHeightComputed = '20px';
|
|
21546
21556
|
var lineHeightComputed2 = '10px';
|
|
21547
|
-
var
|
|
21557
|
+
var normalizeStyle = "*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\nhtml {\n font-family: sans-serif;\n line-height: 1.15;\n -ms-overflow-style: scrollbar;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -webkit-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n}\n\narticle,\naside,\ndialog,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nnav,\nsection {\n display: block;\n}\n\nbody {\n margin: 0;\n color: ".concat(normalize_token.color, ";\n font-family: ").concat(normalize_token.fontFamily, ";\n font-size: ").concat(normalize_token.fontSize, ";\n line-height: ").concat(normalize_token.lineHeight, ";\n}\n\n\narticle,\naside,\nfooter,\nheader,\nnav,\nsection {\n display: block;\n}\n\nh1 {\n margin: 0.67em 0;\n font-size: 2em;\n}\n\nfigcaption,\nfigure,\nmain {\n display: block;\n}\n\nfigure {\n margin: 1em 40px;\n}\n\nhr {\n overflow: visible;\n height: 0;\n box-sizing: content-box;\n}\n\npre {\n font-family: \"SFMono-Regular\", Menlo, Monaco, Consolas, \"Courier New\", monospace;\n font-size: 1em;\n}\n\na {\n background-color: transparent;\n color: ").concat(normalize_token.linkColor, ";\n cursor: pointer;\n outline: none;\n text-decoration: ").concat(normalize_token.linkHoverDecoration, ";\n -webkit-text-decoration-skip: objects;\n transition: color 0.3s;\n}\n\na:active,\na:hover {\n color: ").concat(normalize_token.linkColor, ";\n outline: 0;\n text-decoration: ").concat(normalize_token.linkHoverDecoration, ";\n}\na[disabled] {\n color: ").concat(normalize_token.linkDisabledColor, ";\n cursor: not-allowed;\n pointer-events: none;\n}\n\nabbr[title] {\n border-bottom: none;\n text-decoration: underline;\n text-decoration: underline dotted;\n}\n\nb,\nstrong {\n font-weight: inherit;\n}\n\nb,\nstrong {\n font-weight: bolder;\n}\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\ndfn {\n font-style: italic;\n}\n\nmark {\n background-color: #ff0;\n color: #000;\n}\n\nsmall {\n font-size: 80%;\n}\n\nsub,\nsup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\naudio,\nvideo {\n display: inline-block;\n}\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\nimg {\n border-style: none;\n}\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n margin: 0;\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n}\n\nbutton,\ninput {\n overflow: visible;\n}\n\nbutton,\nselect {\n text-transform: none;\n}\n\nbutton,\nhtml [type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\nbutton::-moz-focus-inner,\n[type='button']::-moz-focus-inner,\n[type='reset']::-moz-focus-inner,\n[type='submit']::-moz-focus-inner {\n padding: 0;\n border-style: none;\n}\n\nbutton:-moz-focusring,\n[type='button']:-moz-focusring,\n[type='reset']:-moz-focusring,\n[type='submit']:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\nlegend {\n display: table;\n max-width: 100%;\n box-sizing: border-box;\n padding: 0;\n color: inherit;\n white-space: normal;\n}\n\nprogress {\n display: inline-block;\n vertical-align: baseline;\n}\n\ntextarea {\n overflow: auto;\n}\n\n[type='checkbox'],\n[type='radio'] {\n box-sizing: border-box;\n padding: 0;\n}\n\n\n[type='number']::-webkit-inner-spin-button,\n[type='number']::-webkit-outer-spin-button {\n height: auto;\n}\n\n[type='search'] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n}\n\n[type='search']::-webkit-search-cancel-button,\n[type='search']::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n\n::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n}\n\n\ndetails,\nmenu {\n display: block;\n}\n\n\nsummary {\n display: list-item;\n}\n\n\ncanvas {\n display: inline-block;\n}\n\n\ntemplate {\n display: none;\n}\n\n\n[hidden] {\n display: none;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n color: ").concat(normalize_token.headingsColor, ";\n font-family: ").concat(normalize_token.headingsFontFamily, ";\n font-weight: ").concat(normalize_token.headingsFontWeight, ";\n line-height: ").concat(normalize_token.headingsLineHeight, ";\n}\nh1 small, h1 .small, .h1 small, .h1 .small,\nh2 small, h2 .small, .h2 small, .h2 .small,\nh3 small, h3 .small, .h3 small, .h3 .small,\nh4 small, h4 .small, .h4 small, .h4 .small,\nh5 small, h5 .small, .h5 small, .h5 .small,\nh6 small, h6 .small, .h6 small, .h6 .small {\n color: ").concat(normalize_token.headingsSmallColor, ";\n font-weight: normal;\n line-height: 1;\n}\n\n\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: ").concat(lineHeightComputed, ";\n margin-bottom: ").concat(lineHeightComputed2, ";\n}\n\nhi small, h1 .small, .h1 small, .h1 .small,\nh2 small, h2 .small, .h2 small, .h2 .small,\nh3 small, h3 .small, .h3 small, .h3 .small {\n font-size: 65%;\n}\n\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: ").concat(lineHeightComputed2, ";\n margin-bottom: ").concat(lineHeightComputed2, ";\n}\n\nh4 small, h4 .small, .h4 small, .h4 .small,\nh5 small, h5 .small, .h5 small, .h5 .small,\nh6 small, h6 .small, .h6 small, .h6 .small {\n font-size: 75%;\n}\n\np {\n margin: 0 0 ").concat(lineHeightComputed2, ";\n}");
|
|
21558
|
+
function appendNormalizeStyle(styleString, id) {
|
|
21559
|
+
var style = document.createElement('style');
|
|
21560
|
+
style.id = id;
|
|
21561
|
+
style.innerHTML = styleString;
|
|
21562
|
+
document.head.appendChild(style);
|
|
21563
|
+
}
|
|
21564
|
+
var uniqueStyleId = 'shineout-next-normalize__' + Math.random().toString(36).substring(2, 15);
|
|
21548
21565
|
if (typeof window !== 'undefined') {
|
|
21549
|
-
|
|
21550
|
-
normalize_link.innerHTML = normalize_css;
|
|
21551
|
-
document.head.appendChild(normalize_link);
|
|
21566
|
+
appendNormalizeStyle(normalizeStyle, uniqueStyleId);
|
|
21552
21567
|
}
|
|
21568
|
+
var scopeNormalizeStyle = function scopeNormalizeStyle() {
|
|
21569
|
+
var csScopePrefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '#app';
|
|
21570
|
+
var styleElement = document.getElementById(uniqueStyleId);
|
|
21571
|
+
// 移除styleElement
|
|
21572
|
+
|
|
21573
|
+
var styleSheet = styleElement === null || styleElement === void 0 ? void 0 : styleElement.sheet;
|
|
21574
|
+
var cssRules = styleSheet === null || styleSheet === void 0 ? void 0 : styleSheet.cssRules;
|
|
21575
|
+
// 遍历cssRules,给每一个selectorText添加前缀
|
|
21576
|
+
if (cssRules) {
|
|
21577
|
+
for (var i = 0; i < cssRules.length; i++) {
|
|
21578
|
+
var rule = cssRules[i];
|
|
21579
|
+
if (rule instanceof CSSStyleRule) {
|
|
21580
|
+
// 如果选择器包含了body或html,则替换,不是加前缀
|
|
21581
|
+
if (rule.selectorText.includes('body')) {
|
|
21582
|
+
rule.selectorText = rule.selectorText.replace('body', csScopePrefix);
|
|
21583
|
+
} else if (rule.selectorText.includes('html')) {
|
|
21584
|
+
rule.selectorText = rule.selectorText.replace('html', csScopePrefix);
|
|
21585
|
+
} else {
|
|
21586
|
+
var selectors = rule.selectorText.split(',');
|
|
21587
|
+
var newSelectors = selectors.map(function (selector) {
|
|
21588
|
+
return "".concat(csScopePrefix, " ").concat(selector);
|
|
21589
|
+
});
|
|
21590
|
+
rule.selectorText = newSelectors.join(',');
|
|
21591
|
+
}
|
|
21592
|
+
}
|
|
21593
|
+
}
|
|
21594
|
+
}
|
|
21595
|
+
var scopedStyleString = cssRules ? Array.from(cssRules).map(function (rule) {
|
|
21596
|
+
return rule.cssText;
|
|
21597
|
+
}).join('') : '';
|
|
21598
|
+
document.head.removeChild(styleElement);
|
|
21599
|
+
appendNormalizeStyle(scopedStyleString, uniqueStyleId);
|
|
21600
|
+
};
|
|
21553
21601
|
token_setter({
|
|
21554
21602
|
onlyExtra: true,
|
|
21555
21603
|
tokenName: 'shineout-extra',
|
|
@@ -33398,19 +33446,18 @@ function useInputAble(props) {
|
|
|
33398
33446
|
var render = useRender(syncValue);
|
|
33399
33447
|
var shouldUseState = delay || !control;
|
|
33400
33448
|
var value = shouldUseState ? stateValue : valuePo;
|
|
33401
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.
|
|
33402
|
-
if (context.timer) {
|
|
33403
|
-
clearTimeout(context.timer);
|
|
33404
|
-
context.timer = null;
|
|
33405
|
-
}
|
|
33449
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
33406
33450
|
if (delay && control && props.value !== stateValue) {
|
|
33407
33451
|
changeStateValue(props.value);
|
|
33452
|
+
} else if (context.timer) {
|
|
33453
|
+
clearTimeout(context.timer);
|
|
33454
|
+
context.timer = null;
|
|
33408
33455
|
}
|
|
33409
33456
|
}, [props.value, delay, control]);
|
|
33410
33457
|
var forceDelayChange = use_persist_fn(function () {
|
|
33411
|
-
if (context.
|
|
33458
|
+
if (context.delayChange) context.delayChange();
|
|
33459
|
+
if (context.timer) {
|
|
33412
33460
|
clearTimeout(context.timer);
|
|
33413
|
-
context.delayChange();
|
|
33414
33461
|
context.timer = null;
|
|
33415
33462
|
context.delayChange = null;
|
|
33416
33463
|
}
|
|
@@ -33871,6 +33918,7 @@ var useInputFormat = function useInputFormat(props) {
|
|
|
33871
33918
|
|
|
33872
33919
|
|
|
33873
33920
|
|
|
33921
|
+
|
|
33874
33922
|
function insertPoint(name) {
|
|
33875
33923
|
var reg = /(\[\d+\])/gi;
|
|
33876
33924
|
return name.replace(reg, function (s, m, i) {
|
|
@@ -34124,12 +34172,31 @@ var removeProps = function removeProps(target, remove) {
|
|
|
34124
34172
|
}
|
|
34125
34173
|
return a;
|
|
34126
34174
|
};
|
|
34175
|
+
|
|
34176
|
+
/**
|
|
34177
|
+
* 获取数据对象的全量key路径
|
|
34178
|
+
* @param obj 数据对象
|
|
34179
|
+
* @param parentKey 父级key
|
|
34180
|
+
* @returns 全量key路径
|
|
34181
|
+
* @example
|
|
34182
|
+
* const obj = { a: { b: { c: 1 } } };
|
|
34183
|
+
* const keys = getAllKeyPaths(obj);
|
|
34184
|
+
* console.log(keys); // ['a.b.c', 'a.b', 'a']
|
|
34185
|
+
*/
|
|
34127
34186
|
var getAllKeyPaths = function getAllKeyPaths(obj) {
|
|
34128
34187
|
var parentKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
34129
34188
|
return Object.keys(obj).reduce(function (keys, key) {
|
|
34130
34189
|
var newKey = parentKey ? "".concat(parentKey, ".").concat(key) : key;
|
|
34131
34190
|
if (Array.isArray(obj[key])) {
|
|
34132
|
-
|
|
34191
|
+
var childrenKeys = obj[key].map(function (item, index) {
|
|
34192
|
+
if (item !== null && typeof_default()(item) === 'object') {
|
|
34193
|
+
return getAllKeyPaths(item, "".concat(newKey, "[").concat(index, "]"));
|
|
34194
|
+
}
|
|
34195
|
+
return null;
|
|
34196
|
+
}).filter(function (item) {
|
|
34197
|
+
return item !== null;
|
|
34198
|
+
});
|
|
34199
|
+
return keys.concat.apply(keys, toConsumableArray_default()(childrenKeys)).concat(newKey);
|
|
34133
34200
|
}
|
|
34134
34201
|
return keys.concat(obj[key] !== null && typeof_default()(obj[key]) === 'object' ? getAllKeyPaths(obj[key], newKey) : newKey);
|
|
34135
34202
|
}, []);
|
|
@@ -37238,7 +37305,7 @@ var Scroll = function Scroll(props) {
|
|
|
37238
37305
|
defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight;
|
|
37239
37306
|
var _useResize = useResize({
|
|
37240
37307
|
targetRef: containerRef,
|
|
37241
|
-
timer:
|
|
37308
|
+
timer: 100
|
|
37242
37309
|
}),
|
|
37243
37310
|
width = _useResize.width,
|
|
37244
37311
|
h = _useResize.height;
|
|
@@ -37524,10 +37591,10 @@ var VirtualList = function VirtualList(props) {
|
|
|
37524
37591
|
height: height,
|
|
37525
37592
|
scrollWidth: 0,
|
|
37526
37593
|
scrollHeight: scrollHeight,
|
|
37527
|
-
wrapperRef: wrapperRef,
|
|
37528
37594
|
childrenStyle: {
|
|
37529
37595
|
width: '100%'
|
|
37530
37596
|
},
|
|
37597
|
+
wrapperRef: wrapperRef,
|
|
37531
37598
|
onScroll: handleScroll,
|
|
37532
37599
|
onMouseMove: handleMouseMove,
|
|
37533
37600
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Tag, {
|
|
@@ -48136,14 +48203,12 @@ function useFormInstance() {
|
|
|
48136
48203
|
;// CONCATENATED MODULE: ../base/src/form/form.tsx
|
|
48137
48204
|
|
|
48138
48205
|
|
|
48139
|
-
|
|
48140
48206
|
var form_excluded = ["jssStyle", "className", "style", "children", "formRef"];
|
|
48141
48207
|
|
|
48142
48208
|
|
|
48143
48209
|
|
|
48144
48210
|
|
|
48145
48211
|
|
|
48146
|
-
|
|
48147
48212
|
var Form = function Form(props) {
|
|
48148
48213
|
var _jssStyle$form;
|
|
48149
48214
|
var jssStyle = props.jssStyle,
|
|
@@ -48184,16 +48249,6 @@ var Form = function Form(props) {
|
|
|
48184
48249
|
type: 'withValue'
|
|
48185
48250
|
});
|
|
48186
48251
|
});
|
|
48187
|
-
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
|
|
48188
|
-
_useState2 = slicedToArray_default()(_useState, 2),
|
|
48189
|
-
renderKey = _useState2[0],
|
|
48190
|
-
setRenderKey = _useState2[1];
|
|
48191
|
-
var handleOuterSet = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (vals) {
|
|
48192
|
-
formFunc.setValue(vals);
|
|
48193
|
-
setRenderKey(function (prev) {
|
|
48194
|
-
return prev + 1;
|
|
48195
|
-
});
|
|
48196
|
-
}, [formFunc]);
|
|
48197
48252
|
var formRefObj = useLatestObj({
|
|
48198
48253
|
clearValidate: formFunc.clearValidate,
|
|
48199
48254
|
getValue: formFunc.getValue,
|
|
@@ -48203,7 +48258,7 @@ var Form = function Form(props) {
|
|
|
48203
48258
|
validateFields: validateFields,
|
|
48204
48259
|
validateFieldsWithValue: validateFieldsWithValue,
|
|
48205
48260
|
validateFieldsWithError: formFunc.validateFields,
|
|
48206
|
-
set:
|
|
48261
|
+
set: formFunc.setValue,
|
|
48207
48262
|
scrollToField: formFunc.scrollToField
|
|
48208
48263
|
});
|
|
48209
48264
|
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(function () {
|
|
@@ -48252,17 +48307,17 @@ var Form = function Form(props) {
|
|
|
48252
48307
|
}
|
|
48253
48308
|
};
|
|
48254
48309
|
}, [formProps.onSubmit]);
|
|
48255
|
-
return /*#__PURE__*/(0,
|
|
48310
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("form", objectSpread2_default()(objectSpread2_default()({}, removeProps(formProps, {
|
|
48256
48311
|
onSubmit: true
|
|
48257
48312
|
})), {}, {
|
|
48258
48313
|
ref: formElRef,
|
|
48259
|
-
|
|
48260
|
-
|
|
48261
|
-
|
|
48262
|
-
|
|
48263
|
-
|
|
48264
|
-
})
|
|
48265
|
-
}))
|
|
48314
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Provider, objectSpread2_default()(objectSpread2_default()({}, ProviderProps), {}, {
|
|
48315
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(FormContext.Provider, {
|
|
48316
|
+
value: formRefObj,
|
|
48317
|
+
children: children
|
|
48318
|
+
})
|
|
48319
|
+
}))
|
|
48320
|
+
}));
|
|
48266
48321
|
};
|
|
48267
48322
|
/* harmony default export */ var base_src_form_form = (Form);
|
|
48268
48323
|
;// CONCATENATED MODULE: ./src/form/form.tsx
|
|
@@ -48632,14 +48687,12 @@ var useFormFieldSet = function useFormFieldSet(props) {
|
|
|
48632
48687
|
|
|
48633
48688
|
|
|
48634
48689
|
|
|
48635
|
-
|
|
48636
48690
|
var form_fieldset_produce = utils_immer_produce;
|
|
48637
48691
|
var FormFieldSet = function FormFieldSet(props) {
|
|
48638
48692
|
var children = props.children,
|
|
48639
48693
|
empty = props.empty;
|
|
48640
48694
|
var _React$useRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef({
|
|
48641
|
-
ids: []
|
|
48642
|
-
lastValues: []
|
|
48695
|
+
ids: []
|
|
48643
48696
|
}),
|
|
48644
48697
|
context = _React$useRef.current;
|
|
48645
48698
|
var formFunc = useFormFunc();
|
|
@@ -48674,9 +48727,8 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
48674
48727
|
}
|
|
48675
48728
|
var valueArr = (formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name)) || [];
|
|
48676
48729
|
valueArr = Array.isArray(valueArr) ? valueArr : [valueArr];
|
|
48677
|
-
var result = [];
|
|
48678
48730
|
if (valueArr.length === 0 && valueArr && empty) {
|
|
48679
|
-
|
|
48731
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
48680
48732
|
children: empty(function (val) {
|
|
48681
48733
|
var newValue = form_fieldset_produce(valueArr, function (draft) {
|
|
48682
48734
|
draft.push(val);
|
|
@@ -48685,7 +48737,7 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
48685
48737
|
context.ids.push(generateUUID());
|
|
48686
48738
|
formFunc === null || formFunc === void 0 || formFunc.insertError(name, 0);
|
|
48687
48739
|
})
|
|
48688
|
-
}, 'empty')
|
|
48740
|
+
}, 'empty');
|
|
48689
48741
|
}
|
|
48690
48742
|
var errorList = (Array.isArray(error) ? error : [error]).filter(Boolean);
|
|
48691
48743
|
if (context.ids.length !== valueArr.length) {
|
|
@@ -48693,11 +48745,9 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
48693
48745
|
return generateUUID();
|
|
48694
48746
|
});
|
|
48695
48747
|
}
|
|
48696
|
-
valueArr.
|
|
48697
|
-
|
|
48698
|
-
|
|
48699
|
-
}
|
|
48700
|
-
result.push( /*#__PURE__*/(0,jsx_runtime.jsx)(Provider, {
|
|
48748
|
+
return valueArr.map(function (v, i) {
|
|
48749
|
+
var _context$ids$i;
|
|
48750
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(Provider, {
|
|
48701
48751
|
value: {
|
|
48702
48752
|
path: "".concat(ProviderValue.path, "[").concat(i, "]"),
|
|
48703
48753
|
validateFieldSet: validateFieldSet
|
|
@@ -48743,13 +48793,7 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
48743
48793
|
formFunc === null || formFunc === void 0 || formFunc.spliceError(name, i);
|
|
48744
48794
|
}
|
|
48745
48795
|
})
|
|
48746
|
-
}, context.ids[i]));
|
|
48747
|
-
});
|
|
48748
|
-
|
|
48749
|
-
// 更新 lastValues
|
|
48750
|
-
context.lastValues = valueArr;
|
|
48751
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
48752
|
-
children: result
|
|
48796
|
+
}, (_context$ids$i = context.ids[i]) !== null && _context$ids$i !== void 0 ? _context$ids$i : i);
|
|
48753
48797
|
});
|
|
48754
48798
|
};
|
|
48755
48799
|
/* harmony default export */ var form_fieldset = (FormFieldSet);
|
|
@@ -57265,6 +57309,7 @@ var Step = function Step(props) {
|
|
|
57265
57309
|
onChange = props.onChange;
|
|
57266
57310
|
var config = useConfig();
|
|
57267
57311
|
var styles = (jssStyle === null || jssStyle === void 0 || (_jssStyle$steps = jssStyle.steps) === null || _jssStyle$steps === void 0 ? void 0 : _jssStyle$steps.call(jssStyle)) || {};
|
|
57312
|
+
var isDisabled = typeof disabled === 'function' ? disabled(index, id) : disabled;
|
|
57268
57313
|
var getLabelPlacement = function getLabelPlacement() {
|
|
57269
57314
|
// dot 类型只支持 vertical labelPlacement
|
|
57270
57315
|
if (type === 'dot') {
|
|
@@ -57283,9 +57328,9 @@ var Step = function Step(props) {
|
|
|
57283
57328
|
};
|
|
57284
57329
|
var status = getStatus();
|
|
57285
57330
|
var labelPlacement = getLabelPlacement();
|
|
57286
|
-
var rootClass = classnames_default()(styles.step, className, styles[status], defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, styles.disabled,
|
|
57331
|
+
var rootClass = classnames_default()(styles.step, className, styles[status], defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, styles.disabled, isDisabled), styles.finish, current > index), styles.horizontalLabel, labelPlacement === 'horizontal'), styles.verticalLabel, labelPlacement === 'vertical'), styles.widthDescription, !!description));
|
|
57287
57332
|
var handleChange = function handleChange(e) {
|
|
57288
|
-
if (
|
|
57333
|
+
if (isDisabled) return;
|
|
57289
57334
|
onClick === null || onClick === void 0 || onClick(e, index, id);
|
|
57290
57335
|
onChange === null || onChange === void 0 || onChange(index);
|
|
57291
57336
|
};
|
|
@@ -57326,7 +57371,10 @@ var Step = function Step(props) {
|
|
|
57326
57371
|
var StepWidthContext = function StepWidthContext(props) {
|
|
57327
57372
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(steps_context.Consumer, {
|
|
57328
57373
|
children: function children(value) {
|
|
57329
|
-
|
|
57374
|
+
var disabled = 'disabled' in props ? props.disabled : value.disabled;
|
|
57375
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(Step, objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, props), value), {}, {
|
|
57376
|
+
disabled: disabled
|
|
57377
|
+
}));
|
|
57330
57378
|
}
|
|
57331
57379
|
});
|
|
57332
57380
|
};
|
|
@@ -57347,6 +57395,7 @@ var Steps = function Steps(props) {
|
|
|
57347
57395
|
_props$type = props.type,
|
|
57348
57396
|
type = _props$type === void 0 ? 'default' : _props$type,
|
|
57349
57397
|
size = props.size,
|
|
57398
|
+
disabled = props.disabled,
|
|
57350
57399
|
status = props.status,
|
|
57351
57400
|
_props$direction = props.direction,
|
|
57352
57401
|
directionProp = _props$direction === void 0 ? 'horizontal' : _props$direction,
|
|
@@ -57392,6 +57441,7 @@ var Steps = function Steps(props) {
|
|
|
57392
57441
|
labelPlacement: labelPlacement,
|
|
57393
57442
|
size: size,
|
|
57394
57443
|
type: type,
|
|
57444
|
+
disabled: disabled,
|
|
57395
57445
|
onChange: onChange
|
|
57396
57446
|
},
|
|
57397
57447
|
children: renderStep()
|
|
@@ -58880,7 +58930,8 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
58880
58930
|
var scrollContainerHeight = Math.max(((_props$scrollRef$curr = props.scrollRef.current) === null || _props$scrollRef$curr === void 0 ? void 0 : _props$scrollRef$curr.clientHeight) || 0, 200);
|
|
58881
58931
|
for (var i = 0; i <= maxIndex; i++) {
|
|
58882
58932
|
context.rowSpanRows = 0;
|
|
58883
|
-
|
|
58933
|
+
var currentRowHeight = context.cachedHeight[i] || props.rowHeight;
|
|
58934
|
+
sum += currentRowHeight;
|
|
58884
58935
|
var rowSpanHeight = 0;
|
|
58885
58936
|
if (rowSpanInfo) {
|
|
58886
58937
|
var siblingsIndexs = [];
|
|
@@ -58907,6 +58958,14 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
58907
58958
|
}
|
|
58908
58959
|
if (currentIndex !== startIndex) {
|
|
58909
58960
|
setStartIndex(currentIndex);
|
|
58961
|
+
|
|
58962
|
+
// startIndex处于上方某个合并行的中间一行时,可能引起translate闪烁
|
|
58963
|
+
if (startIndex < currentIndex) {
|
|
58964
|
+
context.autoAddRows = currentIndex - startIndex;
|
|
58965
|
+
setTimeout(function () {
|
|
58966
|
+
context.autoAddRows = 0;
|
|
58967
|
+
}, 300);
|
|
58968
|
+
}
|
|
58910
58969
|
}
|
|
58911
58970
|
setTop(top);
|
|
58912
58971
|
};
|
|
@@ -60033,7 +60092,7 @@ var Tr = function Tr(props) {
|
|
|
60033
60092
|
var clickEvent = col.type === 'expand' ? function () {
|
|
60034
60093
|
props.handleExpandClick(col, props.rawData, props.rowIndex);
|
|
60035
60094
|
} : undefined;
|
|
60036
|
-
|
|
60095
|
+
var expandInstance = /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
60037
60096
|
className: classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.iconWrapper, tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.expandIconWrapper),
|
|
60038
60097
|
onClick: clickEvent,
|
|
60039
60098
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
@@ -60042,6 +60101,11 @@ var Tr = function Tr(props) {
|
|
|
60042
60101
|
children: props.expanded ? icons_config.table.Expand : icons_config.table.Collapse
|
|
60043
60102
|
})
|
|
60044
60103
|
});
|
|
60104
|
+
if (props.expandIcon && typeof props.expandIcon === 'function') {
|
|
60105
|
+
var result = props.expandIcon(props.rawData, props.rowIndex, props.expanded, expandInstance, clickEvent);
|
|
60106
|
+
return result;
|
|
60107
|
+
}
|
|
60108
|
+
return expandInstance;
|
|
60045
60109
|
}
|
|
60046
60110
|
if (col.type === 'checkbox') {
|
|
60047
60111
|
var instance = /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
@@ -60121,12 +60185,7 @@ var Tr = function Tr(props) {
|
|
|
60121
60185
|
onClick: props.onCellClick ? function () {
|
|
60122
60186
|
return handleCellClick(data[i].data, i);
|
|
60123
60187
|
} : undefined,
|
|
60124
|
-
children:
|
|
60125
|
-
style: {
|
|
60126
|
-
height: 0
|
|
60127
|
-
},
|
|
60128
|
-
children: $tdContent
|
|
60129
|
-
}) : $tdContent
|
|
60188
|
+
children: $tdContent
|
|
60130
60189
|
}, col.key);
|
|
60131
60190
|
tds.push(td);
|
|
60132
60191
|
if (data[i].colSpan) skip = data[i].colSpan - 1;
|
|
@@ -60265,6 +60324,7 @@ var Tr = function Tr(props) {
|
|
|
60265
60324
|
treeFunc: props.treeFunc,
|
|
60266
60325
|
treeExpandLevel: props.treeExpandLevel,
|
|
60267
60326
|
treeEmptyExpand: props.treeEmptyExpand,
|
|
60327
|
+
expandIcon: props.expandIcon,
|
|
60268
60328
|
treeExpandIcon: props.treeExpandIcon,
|
|
60269
60329
|
loader: props.loader,
|
|
60270
60330
|
isEmptyTree: props.isEmptyTree,
|
|
@@ -60692,6 +60752,7 @@ var emptyRef = {
|
|
|
60692
60752
|
expandKeys: props.expandKeys,
|
|
60693
60753
|
datum: datum,
|
|
60694
60754
|
treeEmptyExpand: props.treeEmptyExpand,
|
|
60755
|
+
expandIcon: props.expandIcon,
|
|
60695
60756
|
treeExpandIcon: props.treeExpandIcon,
|
|
60696
60757
|
loader: props.loader,
|
|
60697
60758
|
isEmptyTree: isEmptyTree,
|
|
@@ -67106,7 +67167,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
67106
67167
|
|
|
67107
67168
|
|
|
67108
67169
|
/* harmony default export */ var src_0 = ({
|
|
67109
|
-
version: '3.5.4-
|
|
67170
|
+
version: '3.5.4-fix.1'
|
|
67110
67171
|
});
|
|
67111
67172
|
}();
|
|
67112
67173
|
/******/ return __webpack_exports__;
|