shineout 3.5.6-beta.9 → 3.5.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 -15
- 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
|
@@ -507,5 +507,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
507
507
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
508
508
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
509
509
|
var _default = exports.default = {
|
|
510
|
-
version: '3.5.
|
|
510
|
+
version: '3.5.7-beta.1'
|
|
511
511
|
};
|
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.5.
|
|
12043
|
+
/* harmony default export */ var version = ('3.5.7-beta.1');
|
|
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: '" "',
|
|
@@ -34313,6 +34313,34 @@ var getAllKeyPaths = function getAllKeyPaths(obj) {
|
|
|
34313
34313
|
return keys.concat(obj[key] !== null && typeof_default()(obj[key]) === 'object' ? getAllKeyPaths(obj[key], newKey) : newKey);
|
|
34314
34314
|
}, []);
|
|
34315
34315
|
};
|
|
34316
|
+
|
|
34317
|
+
/**
|
|
34318
|
+
* 获取完整的字段key
|
|
34319
|
+
* @param fields 字段key
|
|
34320
|
+
* @param allFields 所有字段key
|
|
34321
|
+
* @returns 完整的字段key
|
|
34322
|
+
* @example
|
|
34323
|
+
* const fields = ['user']
|
|
34324
|
+
* const allFields = ['user', 'user.name', 'user.age', 'user[0].name', 'user[0].age', 'user[1].name', 'user[1].age']
|
|
34325
|
+
* const completeFields = getCompleteFieldKeys(fields, allFields)
|
|
34326
|
+
* console.log(completeFields) // ['user', 'user.name', 'user.age', 'user[0].name', 'user[0].age', 'user[1].name', 'user[1].age']
|
|
34327
|
+
*/
|
|
34328
|
+
var getCompleteFieldKeys = function getCompleteFieldKeys(fields, allFields) {
|
|
34329
|
+
var fieldsArray = isArray(fields) ? fields : [fields];
|
|
34330
|
+
var completeFields = [];
|
|
34331
|
+
fieldsArray.forEach(function (field) {
|
|
34332
|
+
var na = "".concat(field, "[");
|
|
34333
|
+
var no = "".concat(field, ".");
|
|
34334
|
+
completeFields.push(field);
|
|
34335
|
+
var childFields = allFields.filter(function (f) {
|
|
34336
|
+
return f.startsWith(na) || f.startsWith(no);
|
|
34337
|
+
});
|
|
34338
|
+
if (childFields.length) {
|
|
34339
|
+
completeFields.push.apply(completeFields, toConsumableArray_default()(childFields));
|
|
34340
|
+
}
|
|
34341
|
+
});
|
|
34342
|
+
return completeFields;
|
|
34343
|
+
};
|
|
34316
34344
|
;// CONCATENATED MODULE: ../base/src/common/use-clear.ts
|
|
34317
34345
|
|
|
34318
34346
|
var useClear = function useClear(props) {
|
|
@@ -34972,6 +35000,9 @@ var checkbox_Checkbox = function Checkbox(props) {
|
|
|
34972
35000
|
if ('value' in props && props.checked === undefined) {
|
|
34973
35001
|
onInputableCheckboxChange(checked);
|
|
34974
35002
|
}
|
|
35003
|
+
if (props.onRawChange) {
|
|
35004
|
+
props.onRawChange(checked ? htmlValue : undefined, checked, htmlValue);
|
|
35005
|
+
}
|
|
34975
35006
|
onChange === null || onChange === void 0 || onChange(checked ? htmlValue : undefined, checked, htmlValue);
|
|
34976
35007
|
});
|
|
34977
35008
|
var getChecked = function getChecked() {
|
|
@@ -35012,7 +35043,10 @@ var checkbox_Checkbox = function Checkbox(props) {
|
|
|
35012
35043
|
var CheckboxWithContext = function CheckboxWithContext(props) {
|
|
35013
35044
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(group_context.Consumer, {
|
|
35014
35045
|
children: function children(value) {
|
|
35015
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(checkbox_Checkbox, objectSpread2_default()(objectSpread2_default()({}, props), value)
|
|
35046
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(checkbox_Checkbox, objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, props), value), {}, {
|
|
35047
|
+
onRawChange: props.onChange,
|
|
35048
|
+
checked: 'checked' in props ? props.checked : value.checked
|
|
35049
|
+
}));
|
|
35016
35050
|
}
|
|
35017
35051
|
});
|
|
35018
35052
|
};
|
|
@@ -38016,7 +38050,7 @@ var FilterNode = function FilterNode(props) {
|
|
|
38016
38050
|
onChange = props.onChange,
|
|
38017
38051
|
onPathChange = props.onPathChange;
|
|
38018
38052
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$cascader = jssStyle.cascader) === null || _jssStyle$cascader === void 0 ? void 0 : _jssStyle$cascader.call(jssStyle);
|
|
38019
|
-
var handleSelectItem = function handleSelectItem(index, e) {
|
|
38053
|
+
var handleSelectItem = function handleSelectItem(index, d, e) {
|
|
38020
38054
|
var isFinal = data && index === data.length - 1;
|
|
38021
38055
|
if (shouldFinal && !isFinal) return;
|
|
38022
38056
|
if (e) e.stopPropagation();
|
|
@@ -38026,13 +38060,13 @@ var FilterNode = function FilterNode(props) {
|
|
|
38026
38060
|
var keys = data.slice(0, index + 1).map(function (i) {
|
|
38027
38061
|
return datum.getKey(i);
|
|
38028
38062
|
});
|
|
38029
|
-
if (onChange) onChange(keys);
|
|
38063
|
+
if (onChange) onChange(keys, d);
|
|
38030
38064
|
onPathChange(datum.getKey(item), item, keys.slice(0, keys.length - 1), true);
|
|
38031
38065
|
setInputText('');
|
|
38032
38066
|
setFilterText('');
|
|
38033
38067
|
};
|
|
38034
38068
|
var handleSelect = function handleSelect() {
|
|
38035
|
-
handleSelectItem(data.length - 1);
|
|
38069
|
+
handleSelectItem(data.length - 1, data === null || data === void 0 ? void 0 : data[data.length - 1]);
|
|
38036
38070
|
};
|
|
38037
38071
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
38038
38072
|
className: classnames_default()(styles.option, styles.filterOption),
|
|
@@ -38041,7 +38075,7 @@ var FilterNode = function FilterNode(props) {
|
|
|
38041
38075
|
className: classnames_default()(styles.optionInner),
|
|
38042
38076
|
children: data.map(function (item, index) {
|
|
38043
38077
|
var handleClick = function handleClick(e) {
|
|
38044
|
-
handleSelectItem(index, e);
|
|
38078
|
+
handleSelectItem(index, item, e);
|
|
38045
38079
|
};
|
|
38046
38080
|
var isDisabled = datum.isDisabled(datum.getKey(item));
|
|
38047
38081
|
var content = /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
@@ -47886,9 +47920,12 @@ var useForm = function useForm(props) {
|
|
|
47886
47920
|
var validateFields = use_persist_fn(function (fields) {
|
|
47887
47921
|
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
47888
47922
|
return new Promise(function (resolve, reject) {
|
|
47889
|
-
var finalFields =
|
|
47890
|
-
|
|
47891
|
-
|
|
47923
|
+
var finalFields = Object.keys(context.validateMap);
|
|
47924
|
+
if (fields) {
|
|
47925
|
+
// 假设进去的是['user'],那么最终的finalFields是['user', 'user.name', 'user.age']
|
|
47926
|
+
// 假设进去的是['users'],那么最终的finalFields是['users', 'users[0].name', 'users[0].age', 'users[1].name', 'users[1].age']
|
|
47927
|
+
finalFields = getCompleteFieldKeys(fields, finalFields);
|
|
47928
|
+
}
|
|
47892
47929
|
var validates = finalFields.map(function (key) {
|
|
47893
47930
|
var validateField = context.validateMap[key];
|
|
47894
47931
|
return Array.from(validateField).map(function (validate) {
|
|
@@ -48902,13 +48939,15 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
48902
48939
|
value: v,
|
|
48903
48940
|
index: i,
|
|
48904
48941
|
error: errorList,
|
|
48905
|
-
onChange: function onChange(val) {
|
|
48942
|
+
onChange: function onChange(val, options) {
|
|
48906
48943
|
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
48907
48944
|
var newValue = form_fieldset_produce(oldValue, function (draft) {
|
|
48908
48945
|
draft[i] = val;
|
|
48909
48946
|
});
|
|
48910
48947
|
_onChange(newValue);
|
|
48911
|
-
|
|
48948
|
+
if (options === undefined || options !== null && options !== void 0 && options.validate) {
|
|
48949
|
+
formFunc === null || formFunc === void 0 || formFunc.validateFieldset("".concat(name, "[").concat(i, "]"));
|
|
48950
|
+
}
|
|
48912
48951
|
},
|
|
48913
48952
|
onInsert: function onInsert(val) {
|
|
48914
48953
|
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
@@ -53272,7 +53311,7 @@ function Select(props0) {
|
|
|
53272
53311
|
});
|
|
53273
53312
|
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));
|
|
53274
53313
|
var getRenderItem = function getRenderItem(data, index) {
|
|
53275
|
-
return typeof renderItemProp === 'function' ? renderItemProp(data, index) : data[renderItemProp];
|
|
53314
|
+
return typeof renderItemProp === 'function' ? renderItemProp(data, index) : (data === null || data === void 0 ? void 0 : data[renderItemProp]) || '';
|
|
53276
53315
|
};
|
|
53277
53316
|
var renderItem = getRenderItem;
|
|
53278
53317
|
var handleFocus = usePersistFn(function (e) {
|
|
@@ -53413,7 +53452,8 @@ function Select(props0) {
|
|
|
53413
53452
|
};
|
|
53414
53453
|
var getRenderResult = function getRenderResult(data, index) {
|
|
53415
53454
|
if (!renderResultProp) return renderItem(data, index);
|
|
53416
|
-
|
|
53455
|
+
var result = typeof renderResultProp === 'function' ? renderResultProp(data, index) : data[renderResultProp];
|
|
53456
|
+
return result !== null && result !== void 0 ? result : null;
|
|
53417
53457
|
};
|
|
53418
53458
|
var getDataByValues = function getDataByValues(values) {
|
|
53419
53459
|
return datum.getDataByValues(values, {
|
|
@@ -67325,7 +67365,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
67325
67365
|
|
|
67326
67366
|
|
|
67327
67367
|
/* harmony default export */ var src_0 = ({
|
|
67328
|
-
version: '3.5.
|
|
67368
|
+
version: '3.5.7-beta.1'
|
|
67329
67369
|
});
|
|
67330
67370
|
}();
|
|
67331
67371
|
/******/ return __webpack_exports__;
|