shineout 3.3.6-beta.7 → 3.3.7-beta.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.js +1 -1
- package/dist/shineout.js +55 -33
- 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/package.json +5 -5
package/cjs/index.js
CHANGED
|
@@ -476,5 +476,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
476
476
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
477
477
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
478
478
|
var _default = exports.default = {
|
|
479
|
-
version: '3.3.
|
|
479
|
+
version: '3.3.7-beta.1'
|
|
480
480
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -11968,7 +11968,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
11968
11968
|
};
|
|
11969
11969
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
11970
11970
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
11971
|
-
/* harmony default export */ var version = ('3.3.
|
|
11971
|
+
/* harmony default export */ var version = ('3.3.7-beta.1');
|
|
11972
11972
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
11973
11973
|
|
|
11974
11974
|
|
|
@@ -20973,7 +20973,7 @@ var normalize_token = {
|
|
|
20973
20973
|
};
|
|
20974
20974
|
var lineHeightComputed = '20px';
|
|
20975
20975
|
var lineHeightComputed2 = '10px';
|
|
20976
|
-
var normalize_css = "*,\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(
|
|
20976
|
+
var normalize_css = "*,\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}");
|
|
20977
20977
|
if (typeof window !== 'undefined') {
|
|
20978
20978
|
var normalize_link = document.createElement('style');
|
|
20979
20979
|
normalize_link.innerHTML = normalize_css;
|
|
@@ -25752,9 +25752,6 @@ var TagStyle = {
|
|
|
25752
25752
|
padding: "0 ".concat(src.tagSmallPaddingX),
|
|
25753
25753
|
fontWeight: src.tagSmallFontWeight,
|
|
25754
25754
|
borderRadius: src.tagSmallBorderRadius,
|
|
25755
|
-
'& $container': {
|
|
25756
|
-
lineHeight: "calc(".concat(src.tagSmallFontSize, " + 6px)")
|
|
25757
|
-
},
|
|
25758
25755
|
'& $wrapper': {
|
|
25759
25756
|
lineHeight: "calc(".concat(src.tagSmallFontSize, " + 6px)")
|
|
25760
25757
|
},
|
|
@@ -36422,7 +36419,7 @@ var ResultInput = function ResultInput(props) {
|
|
|
36422
36419
|
|
|
36423
36420
|
var Done = 2;
|
|
36424
36421
|
var Finish = 0;
|
|
36425
|
-
var
|
|
36422
|
+
var Pending = 1;
|
|
36426
36423
|
var isEmpty = is_isEmpty,
|
|
36427
36424
|
use_tag_isPromise = isPromise,
|
|
36428
36425
|
use_tag_isString = isString,
|
|
@@ -36473,7 +36470,7 @@ var useTag = function useTag(props) {
|
|
|
36473
36470
|
if (typeof onClose === 'function') {
|
|
36474
36471
|
callback = onClose(e);
|
|
36475
36472
|
if (use_tag_isPromise(callback)) {
|
|
36476
|
-
setDismiss(
|
|
36473
|
+
setDismiss(Pending);
|
|
36477
36474
|
callback.then(function () {
|
|
36478
36475
|
setDismiss(Done);
|
|
36479
36476
|
}).catch(function () {
|
|
@@ -36579,7 +36576,7 @@ var tag_excluded = ["jssStyle", "className", "type", "color", "size", "disabled"
|
|
|
36579
36576
|
|
|
36580
36577
|
|
|
36581
36578
|
var tag_Done = 2;
|
|
36582
|
-
var
|
|
36579
|
+
var tag_Pending = 1;
|
|
36583
36580
|
var Tag = function Tag(props) {
|
|
36584
36581
|
var _jssStyle$tag;
|
|
36585
36582
|
var jssStyle = props.jssStyle,
|
|
@@ -36662,7 +36659,7 @@ var Tag = function Tag(props) {
|
|
|
36662
36659
|
if (!showClose) {
|
|
36663
36660
|
return null;
|
|
36664
36661
|
}
|
|
36665
|
-
if (dismiss ===
|
|
36662
|
+
if (dismiss === tag_Pending) {
|
|
36666
36663
|
// 后面用 Spin 替换
|
|
36667
36664
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {});
|
|
36668
36665
|
}
|
|
@@ -36774,7 +36771,7 @@ var More = function More(props) {
|
|
|
36774
36771
|
var before = [];
|
|
36775
36772
|
var after = [];
|
|
36776
36773
|
var itemsLength = 0;
|
|
36777
|
-
var
|
|
36774
|
+
var tagStyle = shouldShowMore ? {
|
|
36778
36775
|
position: 'absolute',
|
|
36779
36776
|
zIndex: -100,
|
|
36780
36777
|
userSelect: 'none',
|
|
@@ -36822,7 +36819,7 @@ var More = function More(props) {
|
|
|
36822
36819
|
className: styles.tag,
|
|
36823
36820
|
jssStyle: jssStyle,
|
|
36824
36821
|
size: size,
|
|
36825
|
-
style:
|
|
36822
|
+
style: tagStyle,
|
|
36826
36823
|
mode: visible ? 'fill' : 'bright',
|
|
36827
36824
|
color: visible ? 'info' : 'default',
|
|
36828
36825
|
children: shouldShowMore ? '+' : "+".concat(itemsLength)
|
|
@@ -38416,11 +38413,11 @@ function useFormControl(props) {
|
|
|
38416
38413
|
if (inForm && controlFunc) {
|
|
38417
38414
|
if (isArray(name)) {
|
|
38418
38415
|
name.forEach(function (n) {
|
|
38419
|
-
controlFunc.unbind(n, reserveAble);
|
|
38416
|
+
controlFunc.unbind(n, reserveAble, validateFiled, update);
|
|
38420
38417
|
updateError(n, undefined);
|
|
38421
38418
|
});
|
|
38422
38419
|
} else {
|
|
38423
|
-
controlFunc.unbind(name, reserveAble);
|
|
38420
|
+
controlFunc.unbind(name, reserveAble, validateFiled, update);
|
|
38424
38421
|
updateError(name, undefined);
|
|
38425
38422
|
}
|
|
38426
38423
|
}
|
|
@@ -38887,6 +38884,10 @@ var checkbox_group_Group = function Group(props0) {
|
|
|
38887
38884
|
} else {
|
|
38888
38885
|
datum.remove(raw);
|
|
38889
38886
|
}
|
|
38887
|
+
if (children && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(children)) {
|
|
38888
|
+
var _children$props$onCha, _children$props;
|
|
38889
|
+
(_children$props$onCha = (_children$props = children.props).onChange) === null || _children$props$onCha === void 0 || _children$props$onCha.call(_children$props, checked ? children.props.htmlValue : undefined, checked, children.props.htmlValue);
|
|
38890
|
+
}
|
|
38890
38891
|
});
|
|
38891
38892
|
var isChecked = usePersistFn(function (d) {
|
|
38892
38893
|
return datum.check(d);
|
|
@@ -45213,8 +45214,10 @@ var useForm = function useForm(props) {
|
|
|
45213
45214
|
var _context$flowMap$glob;
|
|
45214
45215
|
if (!name) {
|
|
45215
45216
|
Object.keys(context.updateMap).forEach(function (key) {
|
|
45216
|
-
var _context$updateMap$ke
|
|
45217
|
-
(_context$updateMap$ke =
|
|
45217
|
+
var _context$updateMap$ke;
|
|
45218
|
+
(_context$updateMap$ke = context.updateMap[key]) === null || _context$updateMap$ke === void 0 || _context$updateMap$ke.forEach(function (update) {
|
|
45219
|
+
update(context.value, context.errors, context.serverErrors);
|
|
45220
|
+
});
|
|
45218
45221
|
});
|
|
45219
45222
|
Object.keys(context.flowMap).forEach(function (key) {
|
|
45220
45223
|
context.flowMap[key].forEach(function (update) {
|
|
@@ -45224,8 +45227,10 @@ var useForm = function useForm(props) {
|
|
|
45224
45227
|
} else {
|
|
45225
45228
|
var names = isArray(name) ? name : [name];
|
|
45226
45229
|
names.forEach(function (key) {
|
|
45227
|
-
var _context$updateMap$ke2, _context$
|
|
45228
|
-
(_context$updateMap$ke2 =
|
|
45230
|
+
var _context$updateMap$ke2, _context$flowMap$key;
|
|
45231
|
+
(_context$updateMap$ke2 = context.updateMap[key]) === null || _context$updateMap$ke2 === void 0 || _context$updateMap$ke2.forEach(function (update) {
|
|
45232
|
+
update(context.value, context.errors, context.serverErrors);
|
|
45233
|
+
});
|
|
45229
45234
|
(_context$flowMap$key = context.flowMap[key]) === null || _context$flowMap$key === void 0 || _context$flowMap$key.forEach(function (update) {
|
|
45230
45235
|
update();
|
|
45231
45236
|
});
|
|
@@ -45281,9 +45286,11 @@ var useForm = function useForm(props) {
|
|
|
45281
45286
|
}) : Object.keys(context.validateMap);
|
|
45282
45287
|
var validates = files2.map(function (key) {
|
|
45283
45288
|
var validateField = context.validateMap[key];
|
|
45284
|
-
return validateField(
|
|
45289
|
+
return Array.from(validateField).map(function (validate) {
|
|
45290
|
+
return validate(key, deepGet(context.value, key), context.value, config);
|
|
45291
|
+
});
|
|
45285
45292
|
});
|
|
45286
|
-
Promise.all(validates).then(function (results) {
|
|
45293
|
+
Promise.all(validates.flat()).then(function (results) {
|
|
45287
45294
|
var error = results.find(function (n) {
|
|
45288
45295
|
return n !== true;
|
|
45289
45296
|
});
|
|
@@ -45328,8 +45335,10 @@ var useForm = function useForm(props) {
|
|
|
45328
45335
|
Object.keys(vals).forEach(function (key) {
|
|
45329
45336
|
deepSet(draft, key, vals[key], deepSetOptions);
|
|
45330
45337
|
if (option.validate) {
|
|
45331
|
-
var _context$validateMap
|
|
45332
|
-
(_context$validateMap$ =
|
|
45338
|
+
var _context$validateMap$;
|
|
45339
|
+
(_context$validateMap$ = context.validateMap[key]) === null || _context$validateMap$ === void 0 || _context$validateMap$.forEach(function (validate) {
|
|
45340
|
+
validate(key, vals[key], current(draft));
|
|
45341
|
+
});
|
|
45333
45342
|
}
|
|
45334
45343
|
});
|
|
45335
45344
|
});
|
|
@@ -45473,12 +45482,17 @@ var useForm = function useForm(props) {
|
|
|
45473
45482
|
var controlFunc = use_latest_obj({
|
|
45474
45483
|
bind: function bind(n, df, validate, updateFn) {
|
|
45475
45484
|
if (context.names.has(n)) {
|
|
45476
|
-
console.
|
|
45477
|
-
return;
|
|
45485
|
+
console.warn("name \"".concat(n, "\" already exist"));
|
|
45478
45486
|
}
|
|
45479
45487
|
context.names.add(n);
|
|
45480
|
-
context.validateMap[n]
|
|
45481
|
-
|
|
45488
|
+
if (!context.validateMap[n]) {
|
|
45489
|
+
context.validateMap[n] = new Set();
|
|
45490
|
+
}
|
|
45491
|
+
context.validateMap[n].add(validate);
|
|
45492
|
+
if (!context.updateMap[n]) {
|
|
45493
|
+
context.updateMap[n] = new Set();
|
|
45494
|
+
}
|
|
45495
|
+
context.updateMap[n].add(updateFn);
|
|
45482
45496
|
context.removeArr.delete(n);
|
|
45483
45497
|
if (df !== undefined && deepGet(context.value, n) === undefined) {
|
|
45484
45498
|
if (!context.mounted) context.defaultValues[n] = df;
|
|
@@ -45488,11 +45502,19 @@ var useForm = function useForm(props) {
|
|
|
45488
45502
|
}
|
|
45489
45503
|
update(n);
|
|
45490
45504
|
},
|
|
45491
|
-
unbind: function unbind(n, reserveAble) {
|
|
45492
|
-
|
|
45493
|
-
|
|
45494
|
-
|
|
45495
|
-
|
|
45505
|
+
unbind: function unbind(n, reserveAble, validateFiled, update) {
|
|
45506
|
+
var validateFieldSet = context.validateMap[n];
|
|
45507
|
+
if (validateFiled && validateFieldSet.has(validateFiled)) {
|
|
45508
|
+
validateFieldSet.delete(validateFiled);
|
|
45509
|
+
}
|
|
45510
|
+
var updateFieldSet = context.updateMap[n];
|
|
45511
|
+
if (update && updateFieldSet.has(update)) {
|
|
45512
|
+
updateFieldSet.delete(update);
|
|
45513
|
+
}
|
|
45514
|
+
if (validateFieldSet.size === 0 && updateFieldSet.size === 0) {
|
|
45515
|
+
context.names.delete(n);
|
|
45516
|
+
delete context.defaultValues[n];
|
|
45517
|
+
}
|
|
45496
45518
|
if (!reserveAble && !context.removeLock) {
|
|
45497
45519
|
addRemove(n);
|
|
45498
45520
|
}
|
|
@@ -45567,12 +45589,12 @@ var useForm = function useForm(props) {
|
|
|
45567
45589
|
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
|
|
45568
45590
|
// 服务端错误更新
|
|
45569
45591
|
if (!props.error) context.serverErrors = {};else {
|
|
45570
|
-
var
|
|
45592
|
+
var errors = Object.keys(props.error).reduce(function (prev, cur) {
|
|
45571
45593
|
var item = props.error[cur];
|
|
45572
45594
|
var error = item instanceof Error ? item : new Error(item);
|
|
45573
45595
|
return objectSpread2_default()(objectSpread2_default()({}, prev), {}, defineProperty_default()({}, cur, error));
|
|
45574
45596
|
}, {});
|
|
45575
|
-
context.serverErrors =
|
|
45597
|
+
context.serverErrors = errors;
|
|
45576
45598
|
}
|
|
45577
45599
|
update();
|
|
45578
45600
|
}, [props.error]);
|
|
@@ -63932,7 +63954,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
63932
63954
|
|
|
63933
63955
|
|
|
63934
63956
|
/* harmony default export */ var src_0 = ({
|
|
63935
|
-
version: '3.3.
|
|
63957
|
+
version: '3.3.7-beta.1'
|
|
63936
63958
|
});
|
|
63937
63959
|
}();
|
|
63938
63960
|
/******/ return __webpack_exports__;
|