shineout 3.3.0-beta.1 → 3.3.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/dist/shineout.js +196 -45
- 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.0-beta.
|
|
479
|
+
version: '3.3.0-beta.3'
|
|
480
480
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -6439,16 +6439,16 @@ __webpack_require__.d(color_namespaceObject, {
|
|
|
6439
6439
|
});
|
|
6440
6440
|
|
|
6441
6441
|
// NAMESPACE OBJECT: ./src/utils/flat.ts
|
|
6442
|
-
var
|
|
6443
|
-
__webpack_require__.r(
|
|
6444
|
-
__webpack_require__.d(
|
|
6445
|
-
flatten: function() { return
|
|
6442
|
+
var utils_flat_namespaceObject = {};
|
|
6443
|
+
__webpack_require__.r(utils_flat_namespaceObject);
|
|
6444
|
+
__webpack_require__.d(utils_flat_namespaceObject, {
|
|
6445
|
+
flatten: function() { return flat_flatten; },
|
|
6446
6446
|
flattenArray: function() { return flat_flattenArray; },
|
|
6447
6447
|
getSthByName: function() { return getSthByName; },
|
|
6448
|
-
insertPoint: function() { return
|
|
6449
|
-
insertValue: function() { return
|
|
6448
|
+
insertPoint: function() { return utils_flat_insertPoint; },
|
|
6449
|
+
insertValue: function() { return flat_insertValue; },
|
|
6450
6450
|
removeSthByName: function() { return removeSthByName; },
|
|
6451
|
-
spliceValue: function() { return
|
|
6451
|
+
spliceValue: function() { return flat_spliceValue; },
|
|
6452
6452
|
unflatten: function() { return unflatten; }
|
|
6453
6453
|
});
|
|
6454
6454
|
|
|
@@ -6555,7 +6555,7 @@ __webpack_require__.d(src_utils_namespaceObject, {
|
|
|
6555
6555
|
detect: function() { return detect_namespaceObject; },
|
|
6556
6556
|
doc: function() { return dom_document_namespaceObject; },
|
|
6557
6557
|
element: function() { return dom_element_namespaceObject; },
|
|
6558
|
-
flat: function() { return
|
|
6558
|
+
flat: function() { return utils_flat_namespaceObject; },
|
|
6559
6559
|
func: function() { return utils_func_namespaceObject; },
|
|
6560
6560
|
hash: function() { return hash_createHash; },
|
|
6561
6561
|
is: function() { return utils_is_namespaceObject; },
|
|
@@ -11960,7 +11960,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
11960
11960
|
};
|
|
11961
11961
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
11962
11962
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
11963
|
-
/* harmony default export */ var version = ('3.3.0-beta.
|
|
11963
|
+
/* harmony default export */ var version = ('3.3.0-beta.3');
|
|
11964
11964
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
11965
11965
|
|
|
11966
11966
|
|
|
@@ -14755,9 +14755,11 @@ var treeTokens = {
|
|
|
14755
14755
|
treeItemActiveFontColor: 'Neutral-text-4',
|
|
14756
14756
|
treeItemDisabledFontColor: 'Neutral-text-2',
|
|
14757
14757
|
treeContentHoverBackgroundColor: 'Neutral-fill-2',
|
|
14758
|
+
treeContentHoverFontColor: 'Neutral-text-5',
|
|
14758
14759
|
treeContentActiveBackgroundColor: 'Brand-1',
|
|
14759
14760
|
treeContentActiveFontColor: 'Brand-6',
|
|
14760
|
-
|
|
14761
|
+
treeContentDisabledBackgroundColor: 'Transprent',
|
|
14762
|
+
treeContentDisabledFontColor: 'Neutral-text-5',
|
|
14761
14763
|
treeDragBorderColor: 'Brand-6',
|
|
14762
14764
|
treeDragBackgroundColor: 'Brand-1',
|
|
14763
14765
|
treeContentBorderRadius: 'Radius-lesser'
|
|
@@ -14819,11 +14821,18 @@ var treeSelectTokens = {
|
|
|
14819
14821
|
treeSelectPanelShadow: 'Shadow-2',
|
|
14820
14822
|
treeSelectPanelRadius: 'Radius-default',
|
|
14821
14823
|
treeSelectPanelBorder: 'Neutral-border-1',
|
|
14824
|
+
treeSelectContentHoverFontColor: 'Neutral-text-5',
|
|
14825
|
+
treeSelectContentHoverBackgroundColor: 'Neutral-fill-2',
|
|
14826
|
+
treeSelectContentActiveFontColor: 'Brand-6',
|
|
14827
|
+
treeSelectContentActiveBackgroundColor: 'Brand-1',
|
|
14828
|
+
treeSelectContentDisabledFontColor: 'Neutral-text-2',
|
|
14829
|
+
treeSelectContentDisabledBackgroundColor: 'Transprent',
|
|
14822
14830
|
treeSelectOptionHeight: 'Size-16',
|
|
14823
14831
|
treeSelectOptionPaddingX: 'Spacing-4',
|
|
14824
14832
|
treeSelectOptionPaddingY: 'Spacing-1',
|
|
14825
14833
|
treeSelectOptionActiveColor: 'Brand-6',
|
|
14826
14834
|
treeSelectOptionActiveBackgroundColor: 'Brand-1',
|
|
14835
|
+
treeSelectOptionFontColor: 'Neutral-text-5',
|
|
14827
14836
|
treeSelectOptionInnerPaddingX: 'Spacing-8',
|
|
14828
14837
|
treeSelectOptionInnerPaddingY: 'Spacing-5',
|
|
14829
14838
|
treeSelectOptionInnerPaddingRight: 'Size-15',
|
|
@@ -20598,7 +20607,7 @@ var modalStyle = objectSpread2_default()(objectSpread2_default()({}, animationSt
|
|
|
20598
20607
|
flexDirection: 'column',
|
|
20599
20608
|
textAlign: 'left',
|
|
20600
20609
|
minWidth: 0,
|
|
20601
|
-
background:
|
|
20610
|
+
background: src.modalPanelBackground,
|
|
20602
20611
|
borderRadius: src.modalPanelRadius,
|
|
20603
20612
|
padding: "".concat(src.modalPanelPaddingY, " ").concat(src.modalPanelPaddingX),
|
|
20604
20613
|
fontSize: src.modalPanelFontSize,
|
|
@@ -22433,7 +22442,7 @@ var sliderStyle = {
|
|
|
22433
22442
|
'&::before': {
|
|
22434
22443
|
content: '""',
|
|
22435
22444
|
display: 'block',
|
|
22436
|
-
backgroundColor:
|
|
22445
|
+
backgroundColor: src.sliderScaleLineBackgroundColor
|
|
22437
22446
|
},
|
|
22438
22447
|
'$wrapper:not($vertical) &': {
|
|
22439
22448
|
marginTop: src.sliderScaleMarginY,
|
|
@@ -25466,7 +25475,7 @@ var tag_tag = function tag(type) {
|
|
|
25466
25475
|
},
|
|
25467
25476
|
// outline 边框风格
|
|
25468
25477
|
'&$outline': {
|
|
25469
|
-
background:
|
|
25478
|
+
background: src["tag".concat(type, "OutlineBackgroundColor")],
|
|
25470
25479
|
color: src["tag".concat(type, "OutlineFontColor")],
|
|
25471
25480
|
border: "1px solid ".concat(src["tag".concat(type, "OutlineBorderColor")]),
|
|
25472
25481
|
'& $closeIconWrapper': {
|
|
@@ -26356,6 +26365,17 @@ var treeStyle = {
|
|
|
26356
26365
|
inlineContent: {
|
|
26357
26366
|
display: 'inline-flex'
|
|
26358
26367
|
},
|
|
26368
|
+
contentDisabled: {
|
|
26369
|
+
'& $content[data-active="true"]': {
|
|
26370
|
+
background: src.treeContentDisabledBackgroundColor
|
|
26371
|
+
},
|
|
26372
|
+
'& $content:hover:not([data-active="true"])': {
|
|
26373
|
+
background: 'none',
|
|
26374
|
+
'& $text': {
|
|
26375
|
+
color: src.treeContentDisabledFontColor
|
|
26376
|
+
}
|
|
26377
|
+
}
|
|
26378
|
+
},
|
|
26359
26379
|
content: {
|
|
26360
26380
|
flex: 1,
|
|
26361
26381
|
display: 'flex',
|
|
@@ -26379,20 +26399,22 @@ var treeStyle = {
|
|
|
26379
26399
|
'&[dir=rtl][data-expanded="true"]::before': {
|
|
26380
26400
|
right: -12
|
|
26381
26401
|
},
|
|
26402
|
+
'$contentDisabled &': {
|
|
26403
|
+
'& $text': {
|
|
26404
|
+
color: src.treeContentDisabledFontColor
|
|
26405
|
+
}
|
|
26406
|
+
},
|
|
26382
26407
|
'&[data-active="true"]': {
|
|
26383
26408
|
background: src.treeContentActiveBackgroundColor,
|
|
26384
26409
|
'& $text': {
|
|
26385
26410
|
color: src.treeContentActiveFontColor
|
|
26386
26411
|
}
|
|
26387
26412
|
},
|
|
26388
|
-
// '&[data-disabled="true"]': {
|
|
26389
|
-
// cursor: 'not-allowed',
|
|
26390
|
-
// },
|
|
26391
|
-
// '&:hover:not([data-active="true"]):not([data-disabled="true"])': {
|
|
26392
|
-
// background: Token.treeContentHoverBackgroundColor,
|
|
26393
|
-
// },
|
|
26394
26413
|
'&:hover:not([data-active="true"])': {
|
|
26395
|
-
background: src.treeContentHoverBackgroundColor
|
|
26414
|
+
background: src.treeContentHoverBackgroundColor,
|
|
26415
|
+
'& $text': {
|
|
26416
|
+
color: src.treeContentHoverFontColor
|
|
26417
|
+
}
|
|
26396
26418
|
}
|
|
26397
26419
|
},
|
|
26398
26420
|
checkbox: {
|
|
@@ -26488,6 +26510,7 @@ var useTreeStyle = styled(tree_tree, 'tree');
|
|
|
26488
26510
|
|
|
26489
26511
|
|
|
26490
26512
|
|
|
26513
|
+
|
|
26491
26514
|
var tree_select_inputBorderToken = {
|
|
26492
26515
|
lineHeight: src.lineHeightDynamic,
|
|
26493
26516
|
borderRadius: src.inputBorderRadius,
|
|
@@ -26617,6 +26640,7 @@ var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
26617
26640
|
}
|
|
26618
26641
|
}
|
|
26619
26642
|
}),
|
|
26643
|
+
treeWrapper: defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, getTokenName('treeFontColor'), src.treeSelectOptionFontColor), getTokenName('treeContentHoverFontColor'), src.treeSelectContentHoverFontColor), getTokenName('treeContentHoverBackgroundColor'), src.treeSelectContentHoverBackgroundColor), getTokenName('treeContentActiveBackgroundColor'), src.treeSelectContentActiveBackgroundColor), getTokenName('treeContentActiveFontColor'), src.treeSelectContentActiveFontColor), getTokenName('treeContentDisabledFontColor'), src.treeSelectContentDisabledFontColor), getTokenName('treeContentDisabledBackgroundColor'), src.treeSelectContentDisabledBackgroundColor),
|
|
26620
26644
|
wrapperEmpty: {},
|
|
26621
26645
|
wrapperOpen: {},
|
|
26622
26646
|
wrapperDisabled: objectSpread2_default()({}, tree_select_wrapperDisabled)
|
|
@@ -27443,9 +27467,9 @@ function $getKey(gen, d, index) {
|
|
|
27443
27467
|
if (typeof gen === 'function') return gen(d, index);
|
|
27444
27468
|
return index;
|
|
27445
27469
|
}
|
|
27446
|
-
function getKey(gen, d, index) {
|
|
27470
|
+
function getKey(gen, d, index, ignoreError) {
|
|
27447
27471
|
var key = $getKey(gen, d, index);
|
|
27448
|
-
if (typeof key !== 'string' && typeof key !== 'number') {
|
|
27472
|
+
if (typeof key !== 'string' && typeof key !== 'number' && !ignoreError) {
|
|
27449
27473
|
console.error(new Error("keygen result expect a string or a number, get '".concat(typeof_default()(key), "'")));
|
|
27450
27474
|
}
|
|
27451
27475
|
return key;
|
|
@@ -44625,6 +44649,90 @@ var Provider = function Provider(props) {
|
|
|
44625
44649
|
})
|
|
44626
44650
|
});
|
|
44627
44651
|
};
|
|
44652
|
+
;// CONCATENATED MODULE: ../hooks/src/utils/flat.ts
|
|
44653
|
+
|
|
44654
|
+
|
|
44655
|
+
|
|
44656
|
+
function flat_insertPoint(name) {
|
|
44657
|
+
var reg = /(\[\d+\])/gi;
|
|
44658
|
+
return name.replace(reg, function (s, m, i) {
|
|
44659
|
+
return s.replace(m, i === 0 ? m : ".".concat(m));
|
|
44660
|
+
});
|
|
44661
|
+
}
|
|
44662
|
+
function flatten(data, skipArray) {
|
|
44663
|
+
if (is_isEmpty(data)) return data;
|
|
44664
|
+
var result = {};
|
|
44665
|
+
function recurse(cur, prop) {
|
|
44666
|
+
if (Object(cur) !== cur || typeof cur === 'function' || cur instanceof Date || cur instanceof Error || skipArray && Array.isArray(cur)) {
|
|
44667
|
+
if (!(cur === undefined && /\[\d+\]$/.test(prop))) {
|
|
44668
|
+
result[prop] = cur;
|
|
44669
|
+
}
|
|
44670
|
+
} else if (Array.isArray(cur)) {
|
|
44671
|
+
if (cur.length === 0) {
|
|
44672
|
+
result[prop] = [];
|
|
44673
|
+
} else {
|
|
44674
|
+
for (var i = 0, l = cur.length; i < l; i++) {
|
|
44675
|
+
recurse(cur[i], prop ? "".concat(prop, "[").concat(i, "]") : "[".concat(i, "]"));
|
|
44676
|
+
}
|
|
44677
|
+
}
|
|
44678
|
+
} else {
|
|
44679
|
+
var empty = true;
|
|
44680
|
+
if (typeof_default()(cur) === 'object') {
|
|
44681
|
+
// eslint-disable-next-line
|
|
44682
|
+
for (var p in cur) {
|
|
44683
|
+
empty = false;
|
|
44684
|
+
recurse(cur[p], prop ? "".concat(prop, ".").concat(p) : p);
|
|
44685
|
+
}
|
|
44686
|
+
if (empty) {
|
|
44687
|
+
result[prop] = {};
|
|
44688
|
+
}
|
|
44689
|
+
}
|
|
44690
|
+
}
|
|
44691
|
+
}
|
|
44692
|
+
recurse(data, '');
|
|
44693
|
+
return result;
|
|
44694
|
+
}
|
|
44695
|
+
function insertValue(obj, name, index, value) {
|
|
44696
|
+
Object.keys(obj).filter(function (n) {
|
|
44697
|
+
return n.indexOf("".concat(name, "[")) === 0;
|
|
44698
|
+
}).sort().reverse().forEach(function (n) {
|
|
44699
|
+
// const reg = new RegExp(`${name}\\[(\\d+)\\]`)
|
|
44700
|
+
var reg = new RegExp("".concat(name.replace(/\[/g, '\\[').replace(/\]/g, '\\]'), "\\[(\\d+)\\]"));
|
|
44701
|
+
var match = reg.exec(n);
|
|
44702
|
+
var i = parseInt(match[1], 10);
|
|
44703
|
+
if (i < index) return;
|
|
44704
|
+
var newName = n.replace(reg, "".concat(name, "[").concat(i + 1, "]"));
|
|
44705
|
+
if (obj[n]) obj[newName] = obj[n];
|
|
44706
|
+
delete obj[n];
|
|
44707
|
+
});
|
|
44708
|
+
var newValue = flatten(defineProperty_default()({}, "".concat(name, "[").concat(index, "]"), value));
|
|
44709
|
+
Object.keys(newValue).forEach(function (k) {
|
|
44710
|
+
if (newValue[k] !== undefined) obj[k] = newValue[k];
|
|
44711
|
+
});
|
|
44712
|
+
}
|
|
44713
|
+
function spliceValue(obj, name, index) {
|
|
44714
|
+
var names = Object.keys(obj).filter(function (n) {
|
|
44715
|
+
return n === name || n.indexOf("".concat(name, "[")) === 0;
|
|
44716
|
+
}).sort();
|
|
44717
|
+
names.forEach(function (n) {
|
|
44718
|
+
if (n === name && !Array.isArray(obj[name])) return;
|
|
44719
|
+
if (n === name && Array.isArray(obj[name])) {
|
|
44720
|
+
obj[name].splice(index, 1);
|
|
44721
|
+
return;
|
|
44722
|
+
}
|
|
44723
|
+
var reg = new RegExp("".concat(name.replace(/\[/g, '\\[').replace(/\]/g, '\\]'), "\\[(\\d+)\\]"));
|
|
44724
|
+
var match = reg.exec(n);
|
|
44725
|
+
var i = parseInt(match[1], 10);
|
|
44726
|
+
if (i < index) return;
|
|
44727
|
+
if (i === index) {
|
|
44728
|
+
delete obj[n];
|
|
44729
|
+
return;
|
|
44730
|
+
}
|
|
44731
|
+
var newName = n.replace(reg, "".concat(name, "[").concat(i - 1, "]"));
|
|
44732
|
+
obj[newName] = obj[n];
|
|
44733
|
+
delete obj[n];
|
|
44734
|
+
});
|
|
44735
|
+
}
|
|
44628
44736
|
;// CONCATENATED MODULE: ../hooks/src/components/use-form/use-form.ts
|
|
44629
44737
|
|
|
44630
44738
|
|
|
@@ -44635,6 +44743,7 @@ var Provider = function Provider(props) {
|
|
|
44635
44743
|
|
|
44636
44744
|
|
|
44637
44745
|
|
|
44746
|
+
|
|
44638
44747
|
var globalKey = '__global__&&@@';
|
|
44639
44748
|
|
|
44640
44749
|
|
|
@@ -44707,6 +44816,15 @@ var useForm = function useForm(props) {
|
|
|
44707
44816
|
update();
|
|
44708
44817
|
});
|
|
44709
44818
|
};
|
|
44819
|
+
var updateFieldsets = use_persist_fn(function (name) {
|
|
44820
|
+
var na = "".concat(name, "[");
|
|
44821
|
+
var no = "".concat(name, ".");
|
|
44822
|
+
context.names.forEach(function (key) {
|
|
44823
|
+
if (key.startsWith(na) || key.startsWith(no)) {
|
|
44824
|
+
update(key);
|
|
44825
|
+
}
|
|
44826
|
+
});
|
|
44827
|
+
});
|
|
44710
44828
|
var handleSubmitError = function handleSubmitError(err) {
|
|
44711
44829
|
onError === null || onError === void 0 || onError(err);
|
|
44712
44830
|
if (!props.scrollToError) return;
|
|
@@ -44824,6 +44942,14 @@ var useForm = function useForm(props) {
|
|
|
44824
44942
|
context.errors[name] = e;
|
|
44825
44943
|
update(name);
|
|
44826
44944
|
});
|
|
44945
|
+
var insertError = use_persist_fn(function (name, index, error) {
|
|
44946
|
+
insertValue(context.errors, name, index, error);
|
|
44947
|
+
updateFieldsets(name);
|
|
44948
|
+
});
|
|
44949
|
+
var spliceError = use_persist_fn(function (name, index) {
|
|
44950
|
+
spliceValue(context.errors, name, index);
|
|
44951
|
+
updateFieldsets(name);
|
|
44952
|
+
});
|
|
44827
44953
|
var submit = use_persist_fn(function () {
|
|
44828
44954
|
var withValidate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
44829
44955
|
if (disabled) return;
|
|
@@ -44880,6 +45006,17 @@ var useForm = function useForm(props) {
|
|
|
44880
45006
|
other === null || other === void 0 || (_other$onSubmit = other.onSubmit) === null || _other$onSubmit === void 0 || _other$onSubmit.call(other, e);
|
|
44881
45007
|
};
|
|
44882
45008
|
};
|
|
45009
|
+
var validateFieldset = function validateFieldset(name) {
|
|
45010
|
+
var na = "".concat(name, "[");
|
|
45011
|
+
var no = "".concat(name, ".");
|
|
45012
|
+
var fields = [];
|
|
45013
|
+
context.names.forEach(function (key) {
|
|
45014
|
+
if (key.startsWith(na) || key.startsWith(no)) {
|
|
45015
|
+
fields.push(key);
|
|
45016
|
+
}
|
|
45017
|
+
});
|
|
45018
|
+
validateFields(fields).catch(function () {});
|
|
45019
|
+
};
|
|
44883
45020
|
var getDefaultValue = function getDefaultValue() {
|
|
44884
45021
|
var v = utils_immer_produce(defaultValue, function (draft) {
|
|
44885
45022
|
Object.keys(context.defaultValues).forEach(function (key) {
|
|
@@ -44985,7 +45122,10 @@ var useForm = function useForm(props) {
|
|
|
44985
45122
|
setError: setError,
|
|
44986
45123
|
getErrors: getErrors,
|
|
44987
45124
|
clearValidate: clearValidate,
|
|
44988
|
-
validateFields: validateFields
|
|
45125
|
+
validateFields: validateFields,
|
|
45126
|
+
validateFieldset: validateFieldset,
|
|
45127
|
+
insertError: insertError,
|
|
45128
|
+
spliceError: spliceError
|
|
44989
45129
|
});
|
|
44990
45130
|
var formConfig = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
|
|
44991
45131
|
return {
|
|
@@ -45331,7 +45471,8 @@ var useFormFieldSet = function useFormFieldSet(props) {
|
|
|
45331
45471
|
ProviderValue: ProviderValue,
|
|
45332
45472
|
error: error,
|
|
45333
45473
|
value: value,
|
|
45334
|
-
onChange: onChange
|
|
45474
|
+
onChange: onChange,
|
|
45475
|
+
name: name
|
|
45335
45476
|
};
|
|
45336
45477
|
};
|
|
45337
45478
|
/* harmony default export */ var use_form_fieldset = (useFormFieldSet);
|
|
@@ -45348,6 +45489,7 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
45348
45489
|
ids: []
|
|
45349
45490
|
}),
|
|
45350
45491
|
context = _React$useRef.current;
|
|
45492
|
+
var formFunc = useFormFunc();
|
|
45351
45493
|
var getValidateProps = usePersistFn(function () {
|
|
45352
45494
|
return props;
|
|
45353
45495
|
});
|
|
@@ -45361,16 +45503,16 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
45361
45503
|
}),
|
|
45362
45504
|
Provider = _useFormFieldSet.Provider,
|
|
45363
45505
|
ProviderValue = _useFormFieldSet.ProviderValue,
|
|
45364
|
-
value = _useFormFieldSet.value,
|
|
45365
45506
|
error = _useFormFieldSet.error,
|
|
45366
|
-
_onChange = _useFormFieldSet.onChange
|
|
45507
|
+
_onChange = _useFormFieldSet.onChange,
|
|
45508
|
+
name = _useFormFieldSet.name;
|
|
45367
45509
|
if (typeof children !== 'function') {
|
|
45368
45510
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Provider, {
|
|
45369
45511
|
value: ProviderValue,
|
|
45370
45512
|
children: children
|
|
45371
45513
|
});
|
|
45372
45514
|
}
|
|
45373
|
-
var valueArr =
|
|
45515
|
+
var valueArr = (formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name)) || [];
|
|
45374
45516
|
valueArr = Array.isArray(valueArr) ? valueArr : [valueArr];
|
|
45375
45517
|
var result = [];
|
|
45376
45518
|
if (valueArr.length === 0 && valueArr && empty) {
|
|
@@ -45381,6 +45523,7 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
45381
45523
|
});
|
|
45382
45524
|
_onChange(newValue);
|
|
45383
45525
|
context.ids.push(generateUUID());
|
|
45526
|
+
formFunc === null || formFunc === void 0 || formFunc.insertError(name, 0);
|
|
45384
45527
|
})
|
|
45385
45528
|
}, 'empty'));
|
|
45386
45529
|
}
|
|
@@ -45402,31 +45545,39 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
45402
45545
|
index: i,
|
|
45403
45546
|
error: errorList,
|
|
45404
45547
|
onChange: function onChange(val) {
|
|
45405
|
-
var
|
|
45548
|
+
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
45549
|
+
var newValue = form_fieldset_produce(oldValue, function (draft) {
|
|
45406
45550
|
draft[i] = val;
|
|
45407
45551
|
});
|
|
45408
45552
|
_onChange(newValue);
|
|
45553
|
+
formFunc === null || formFunc === void 0 || formFunc.validateFieldset("".concat(name, "[").concat(i, "]"));
|
|
45409
45554
|
},
|
|
45410
45555
|
onInsert: function onInsert(val) {
|
|
45411
|
-
var
|
|
45556
|
+
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
45557
|
+
var newValue = form_fieldset_produce(oldValue, function (draft) {
|
|
45412
45558
|
draft.splice(i, 0, val);
|
|
45413
45559
|
});
|
|
45414
45560
|
_onChange(newValue);
|
|
45415
45561
|
context.ids.splice(i, 0, generateUUID());
|
|
45562
|
+
formFunc === null || formFunc === void 0 || formFunc.insertError(name, i);
|
|
45416
45563
|
},
|
|
45417
45564
|
onAppend: function onAppend(val) {
|
|
45418
|
-
var
|
|
45565
|
+
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
45566
|
+
var newValue = form_fieldset_produce(oldValue, function (draft) {
|
|
45419
45567
|
draft.splice(i + 1, 0, val);
|
|
45420
45568
|
});
|
|
45421
45569
|
_onChange(newValue);
|
|
45422
45570
|
context.ids.splice(i + 1, 0, generateUUID());
|
|
45571
|
+
formFunc === null || formFunc === void 0 || formFunc.insertError(name, i + 1);
|
|
45423
45572
|
},
|
|
45424
45573
|
onRemove: function onRemove() {
|
|
45425
|
-
var
|
|
45574
|
+
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
45575
|
+
var newValue = form_fieldset_produce(oldValue, function (draft) {
|
|
45426
45576
|
draft.splice(i, 1);
|
|
45427
45577
|
});
|
|
45428
45578
|
_onChange(newValue);
|
|
45429
45579
|
context.ids.splice(i, 1);
|
|
45580
|
+
formFunc === null || formFunc === void 0 || formFunc.spliceError(name, i);
|
|
45430
45581
|
}
|
|
45431
45582
|
})
|
|
45432
45583
|
}, ids[i]));
|
|
@@ -48271,7 +48422,7 @@ var NodeContent = function NodeContent(props) {
|
|
|
48271
48422
|
var disabled = isDisabled(id);
|
|
48272
48423
|
bindUpdate(id, forceUpdate);
|
|
48273
48424
|
var contentStyle = (jssStyle === null || jssStyle === void 0 ? void 0 : jssStyle.tree()) || {};
|
|
48274
|
-
var rootClass = classnames_default()(contentStyle.contentWrapper, defineProperty_default()(defineProperty_default()({}, contentStyle.childnode, data[childrenKey] && data[childrenKey].length > 0), contentStyle.inlineContent, inlineNode));
|
|
48425
|
+
var rootClass = classnames_default()(contentStyle.contentWrapper, defineProperty_default()(defineProperty_default()(defineProperty_default()({}, contentStyle.childnode, data[childrenKey] && data[childrenKey].length > 0), contentStyle.inlineContent, inlineNode), contentStyle.contentDisabled, disabled));
|
|
48275
48426
|
var contentClass = classnames_default()(contentStyle.content, isString(contentClassProp) && contentClassProp, isFunc(contentClassProp) && contentClassProp(data));
|
|
48276
48427
|
// const textClass = classNames(contentStyle.text, disabled ? contentStyle.textDisabled : '');
|
|
48277
48428
|
var textClass = classnames_default()(contentStyle.text);
|
|
@@ -50051,7 +50202,7 @@ function Select(props0) {
|
|
|
50051
50202
|
optionListRef: optionListRef,
|
|
50052
50203
|
onOptionClick: handleOptionClick
|
|
50053
50204
|
};
|
|
50054
|
-
|
|
50205
|
+
|
|
50055
50206
|
// 自定义列
|
|
50056
50207
|
if ('columns' in props && typeof columns === 'number' && columns >= 1 || columns === -1) {
|
|
50057
50208
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(list_columns, objectSpread2_default()({
|
|
@@ -51615,7 +51766,7 @@ var MenuItem = function MenuItem(props) {
|
|
|
51615
51766
|
}
|
|
51616
51767
|
}) : null;
|
|
51617
51768
|
var item = render_render(props.renderItem, props.dataItem, props.index);
|
|
51618
|
-
var link = props.linkKey ? getKey(props.linkKey, props.dataItem, props.index) : undefined;
|
|
51769
|
+
var link = props.linkKey ? getKey(props.linkKey, props.dataItem, props.index, true) : undefined;
|
|
51619
51770
|
var title = null;
|
|
51620
51771
|
if (isLink(item)) {
|
|
51621
51772
|
var mergeClass = classnames_default()(classes === null || classes === void 0 ? void 0 : classes.title, item.props && item.props.className);
|
|
@@ -59498,7 +59649,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
59498
59649
|
treeProps.expanded = expanded;
|
|
59499
59650
|
}
|
|
59500
59651
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
59501
|
-
className: classnames_default()(styles.tree),
|
|
59652
|
+
className: classnames_default()(styles.tree, styles.treeWrapper),
|
|
59502
59653
|
style: {
|
|
59503
59654
|
maxHeight: height
|
|
59504
59655
|
},
|
|
@@ -61596,13 +61747,13 @@ function fade(color) {
|
|
|
61596
61747
|
|
|
61597
61748
|
|
|
61598
61749
|
|
|
61599
|
-
function
|
|
61750
|
+
function utils_flat_insertPoint(name) {
|
|
61600
61751
|
var reg = /(\[\d+\])/gi;
|
|
61601
61752
|
return name.replace(reg, function (s, m, i) {
|
|
61602
61753
|
return s.replace(m, i === 0 ? m : ".".concat(m));
|
|
61603
61754
|
});
|
|
61604
61755
|
}
|
|
61605
|
-
function
|
|
61756
|
+
function flat_flatten(data, skipArray) {
|
|
61606
61757
|
if (utils_is_isEmpty(data)) return data;
|
|
61607
61758
|
var result = {};
|
|
61608
61759
|
function recurse(cur, prop) {
|
|
@@ -61651,7 +61802,7 @@ function unflatten(rawdata) {
|
|
|
61651
61802
|
|
|
61652
61803
|
// eslint-disable-next-line
|
|
61653
61804
|
Object.keys(data).sort().forEach(function (p) {
|
|
61654
|
-
var pathWithPoint =
|
|
61805
|
+
var pathWithPoint = utils_flat_insertPoint(p);
|
|
61655
61806
|
cur = result;
|
|
61656
61807
|
prop = '';
|
|
61657
61808
|
last = 0;
|
|
@@ -61667,7 +61818,7 @@ function unflatten(rawdata) {
|
|
|
61667
61818
|
});
|
|
61668
61819
|
return result[''];
|
|
61669
61820
|
}
|
|
61670
|
-
function
|
|
61821
|
+
function flat_insertValue(obj, name, index, value) {
|
|
61671
61822
|
Object.keys(obj).filter(function (n) {
|
|
61672
61823
|
return n.indexOf("".concat(name, "[")) === 0;
|
|
61673
61824
|
}).sort().reverse().forEach(function (n) {
|
|
@@ -61680,12 +61831,12 @@ function insertValue(obj, name, index, value) {
|
|
|
61680
61831
|
if (obj[n]) obj[newName] = obj[n];
|
|
61681
61832
|
delete obj[n];
|
|
61682
61833
|
});
|
|
61683
|
-
var newValue =
|
|
61834
|
+
var newValue = flat_flatten(defineProperty_default()({}, "".concat(name, "[").concat(index, "]"), value));
|
|
61684
61835
|
Object.keys(newValue).forEach(function (k) {
|
|
61685
61836
|
if (newValue[k] !== undefined) obj[k] = newValue[k];
|
|
61686
61837
|
});
|
|
61687
61838
|
}
|
|
61688
|
-
function
|
|
61839
|
+
function flat_spliceValue(obj, name, index) {
|
|
61689
61840
|
var names = Object.keys(obj).filter(function (n) {
|
|
61690
61841
|
return n === name || n.indexOf("".concat(name, "[")) === 0;
|
|
61691
61842
|
}).sort();
|
|
@@ -61716,7 +61867,7 @@ var isNameWithPath = function isNameWithPath(name, path) {
|
|
|
61716
61867
|
var getSthByName = function getSthByName(name, source) {
|
|
61717
61868
|
if (source[name]) return source[name];
|
|
61718
61869
|
var result = unflatten(source);
|
|
61719
|
-
name =
|
|
61870
|
+
name = utils_flat_insertPoint(name);
|
|
61720
61871
|
name.split('.').forEach(function (n) {
|
|
61721
61872
|
var match = /^\[(\d+)\]$/.exec(n);
|
|
61722
61873
|
// eslint-disable-next-line
|
|
@@ -61731,7 +61882,7 @@ var getSthByName = function getSthByName(name, source) {
|
|
|
61731
61882
|
var removeSthByName = function removeSthByName(name, source) {
|
|
61732
61883
|
var match = /(.*)\[(\d+)\]$/.exec(name);
|
|
61733
61884
|
if (match) {
|
|
61734
|
-
|
|
61885
|
+
flat_spliceValue(source, match[1], parseInt(match[2], 10));
|
|
61735
61886
|
} else {
|
|
61736
61887
|
Object.keys(source).forEach(function (n) {
|
|
61737
61888
|
if (isNameWithPath(n, name)) delete source[n];
|
|
@@ -61923,7 +62074,7 @@ var objects_deepMerge = function deepMerge() {
|
|
|
61923
62074
|
return dest;
|
|
61924
62075
|
};
|
|
61925
62076
|
function objects_pathGenerator(raw) {
|
|
61926
|
-
var path =
|
|
62077
|
+
var path = utils_flat_insertPoint(raw);
|
|
61927
62078
|
var reg = /^\[(\d+)\]$/;
|
|
61928
62079
|
var pathModeValues = objects_objectValues(objects_PATH_MODE);
|
|
61929
62080
|
var index = 0;
|
|
@@ -63149,7 +63300,7 @@ var upload_interface = __webpack_require__(4412);
|
|
|
63149
63300
|
|
|
63150
63301
|
|
|
63151
63302
|
/* harmony default export */ var src_0 = ({
|
|
63152
|
-
version: '3.3.0-beta.
|
|
63303
|
+
version: '3.3.0-beta.3'
|
|
63153
63304
|
});
|
|
63154
63305
|
}();
|
|
63155
63306
|
/******/ return __webpack_exports__;
|