shineout 3.3.6 → 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 +48 -23
- 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
|
|
|
@@ -38413,11 +38413,11 @@ function useFormControl(props) {
|
|
|
38413
38413
|
if (inForm && controlFunc) {
|
|
38414
38414
|
if (isArray(name)) {
|
|
38415
38415
|
name.forEach(function (n) {
|
|
38416
|
-
controlFunc.unbind(n, reserveAble);
|
|
38416
|
+
controlFunc.unbind(n, reserveAble, validateFiled, update);
|
|
38417
38417
|
updateError(n, undefined);
|
|
38418
38418
|
});
|
|
38419
38419
|
} else {
|
|
38420
|
-
controlFunc.unbind(name, reserveAble);
|
|
38420
|
+
controlFunc.unbind(name, reserveAble, validateFiled, update);
|
|
38421
38421
|
updateError(name, undefined);
|
|
38422
38422
|
}
|
|
38423
38423
|
}
|
|
@@ -38884,6 +38884,10 @@ var checkbox_group_Group = function Group(props0) {
|
|
|
38884
38884
|
} else {
|
|
38885
38885
|
datum.remove(raw);
|
|
38886
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
|
+
}
|
|
38887
38891
|
});
|
|
38888
38892
|
var isChecked = usePersistFn(function (d) {
|
|
38889
38893
|
return datum.check(d);
|
|
@@ -45210,8 +45214,10 @@ var useForm = function useForm(props) {
|
|
|
45210
45214
|
var _context$flowMap$glob;
|
|
45211
45215
|
if (!name) {
|
|
45212
45216
|
Object.keys(context.updateMap).forEach(function (key) {
|
|
45213
|
-
var _context$updateMap$ke
|
|
45214
|
-
(_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
|
+
});
|
|
45215
45221
|
});
|
|
45216
45222
|
Object.keys(context.flowMap).forEach(function (key) {
|
|
45217
45223
|
context.flowMap[key].forEach(function (update) {
|
|
@@ -45221,8 +45227,10 @@ var useForm = function useForm(props) {
|
|
|
45221
45227
|
} else {
|
|
45222
45228
|
var names = isArray(name) ? name : [name];
|
|
45223
45229
|
names.forEach(function (key) {
|
|
45224
|
-
var _context$updateMap$ke2, _context$
|
|
45225
|
-
(_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
|
+
});
|
|
45226
45234
|
(_context$flowMap$key = context.flowMap[key]) === null || _context$flowMap$key === void 0 || _context$flowMap$key.forEach(function (update) {
|
|
45227
45235
|
update();
|
|
45228
45236
|
});
|
|
@@ -45278,9 +45286,11 @@ var useForm = function useForm(props) {
|
|
|
45278
45286
|
}) : Object.keys(context.validateMap);
|
|
45279
45287
|
var validates = files2.map(function (key) {
|
|
45280
45288
|
var validateField = context.validateMap[key];
|
|
45281
|
-
return validateField(
|
|
45289
|
+
return Array.from(validateField).map(function (validate) {
|
|
45290
|
+
return validate(key, deepGet(context.value, key), context.value, config);
|
|
45291
|
+
});
|
|
45282
45292
|
});
|
|
45283
|
-
Promise.all(validates).then(function (results) {
|
|
45293
|
+
Promise.all(validates.flat()).then(function (results) {
|
|
45284
45294
|
var error = results.find(function (n) {
|
|
45285
45295
|
return n !== true;
|
|
45286
45296
|
});
|
|
@@ -45325,8 +45335,10 @@ var useForm = function useForm(props) {
|
|
|
45325
45335
|
Object.keys(vals).forEach(function (key) {
|
|
45326
45336
|
deepSet(draft, key, vals[key], deepSetOptions);
|
|
45327
45337
|
if (option.validate) {
|
|
45328
|
-
var _context$validateMap
|
|
45329
|
-
(_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
|
+
});
|
|
45330
45342
|
}
|
|
45331
45343
|
});
|
|
45332
45344
|
});
|
|
@@ -45470,12 +45482,17 @@ var useForm = function useForm(props) {
|
|
|
45470
45482
|
var controlFunc = use_latest_obj({
|
|
45471
45483
|
bind: function bind(n, df, validate, updateFn) {
|
|
45472
45484
|
if (context.names.has(n)) {
|
|
45473
|
-
console.
|
|
45474
|
-
return;
|
|
45485
|
+
console.warn("name \"".concat(n, "\" already exist"));
|
|
45475
45486
|
}
|
|
45476
45487
|
context.names.add(n);
|
|
45477
|
-
context.validateMap[n]
|
|
45478
|
-
|
|
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);
|
|
45479
45496
|
context.removeArr.delete(n);
|
|
45480
45497
|
if (df !== undefined && deepGet(context.value, n) === undefined) {
|
|
45481
45498
|
if (!context.mounted) context.defaultValues[n] = df;
|
|
@@ -45485,11 +45502,19 @@ var useForm = function useForm(props) {
|
|
|
45485
45502
|
}
|
|
45486
45503
|
update(n);
|
|
45487
45504
|
},
|
|
45488
|
-
unbind: function unbind(n, reserveAble) {
|
|
45489
|
-
|
|
45490
|
-
|
|
45491
|
-
|
|
45492
|
-
|
|
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
|
+
}
|
|
45493
45518
|
if (!reserveAble && !context.removeLock) {
|
|
45494
45519
|
addRemove(n);
|
|
45495
45520
|
}
|
|
@@ -45564,12 +45589,12 @@ var useForm = function useForm(props) {
|
|
|
45564
45589
|
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
|
|
45565
45590
|
// 服务端错误更新
|
|
45566
45591
|
if (!props.error) context.serverErrors = {};else {
|
|
45567
|
-
var
|
|
45592
|
+
var errors = Object.keys(props.error).reduce(function (prev, cur) {
|
|
45568
45593
|
var item = props.error[cur];
|
|
45569
45594
|
var error = item instanceof Error ? item : new Error(item);
|
|
45570
45595
|
return objectSpread2_default()(objectSpread2_default()({}, prev), {}, defineProperty_default()({}, cur, error));
|
|
45571
45596
|
}, {});
|
|
45572
|
-
context.serverErrors =
|
|
45597
|
+
context.serverErrors = errors;
|
|
45573
45598
|
}
|
|
45574
45599
|
update();
|
|
45575
45600
|
}, [props.error]);
|
|
@@ -63929,7 +63954,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
63929
63954
|
|
|
63930
63955
|
|
|
63931
63956
|
/* harmony default export */ var src_0 = ({
|
|
63932
|
-
version: '3.3.
|
|
63957
|
+
version: '3.3.7-beta.1'
|
|
63933
63958
|
});
|
|
63934
63959
|
}();
|
|
63935
63960
|
/******/ return __webpack_exports__;
|