shineout 3.3.0-beta.2 → 3.3.0-beta.4
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 +206 -67
- 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/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.4');
|
|
11964
11964
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
11965
11965
|
|
|
11966
11966
|
|
|
@@ -12888,12 +12888,15 @@ var buttonTokens = {
|
|
|
12888
12888
|
buttonDangerTextSplitFocusBackgroundColor: 'Neutral-border-1',
|
|
12889
12889
|
buttonRoundBorderRadius: 'Radius-full',
|
|
12890
12890
|
buttonCircleBorderRadius: 'Radius-circle',
|
|
12891
|
+
buttonCircleSize: 'Size-16',
|
|
12891
12892
|
buttonSquareBorderRadius: 'Radius-default',
|
|
12892
12893
|
buttonSmallRoundBorderRadius: 'Radius-full',
|
|
12893
12894
|
buttonSmallCircleBorderRadius: 'Radius-circle',
|
|
12895
|
+
buttonSmallCircleSize: 'Size-12',
|
|
12894
12896
|
buttonSmallSquareBorderRadius: 'Radius-default',
|
|
12895
12897
|
buttonLargeRoundBorderRadius: 'Radius-full',
|
|
12896
12898
|
buttonLargeCircleBorderRadius: 'Radius-circle',
|
|
12899
|
+
buttonLargeCircleSize: 'Size-20',
|
|
12897
12900
|
buttonLargeSquareBorderRadius: 'Radius-default',
|
|
12898
12901
|
buttonNearlyMargin: 'Spacing-8',
|
|
12899
12902
|
buttonSpinMargin: 'Spacing-4'
|
|
@@ -12911,6 +12914,7 @@ var buttonTokens = {
|
|
|
12911
12914
|
var cardTokens = {
|
|
12912
12915
|
cardBackgroundColor: 'Neutral-fill-1',
|
|
12913
12916
|
cardShadow: 'Shadow-2',
|
|
12917
|
+
cardHoverShadow: 'Shadow-2',
|
|
12914
12918
|
cardBorderWidth: 'Border-1',
|
|
12915
12919
|
cardBorderColor: 'Neutral-border-1',
|
|
12916
12920
|
cardBorderRadius: 'Radius-default',
|
|
@@ -13135,26 +13139,27 @@ var collapseTokens = {
|
|
|
13135
13139
|
collapseExtraMargin: 'Spacing-24',
|
|
13136
13140
|
collapseWrapperBorderSize: 'Border-1',
|
|
13137
13141
|
collapseWrapperBorderRadius: 'Radius-default',
|
|
13142
|
+
collapseWrapperBorderColor: 'Neutral-border-1',
|
|
13138
13143
|
collapseWrapperGap: 'Size-12',
|
|
13139
13144
|
collapseWrapperPaddingX: 'Spacing-16',
|
|
13140
13145
|
collapseWrapperPaddingY: 'Spacing-12',
|
|
13146
|
+
collapseWrapperColor: 'Neutral-border-1',
|
|
13147
|
+
collapseWrapperBackgroundColor: 'Neutral-fill-1',
|
|
13148
|
+
collapseHeaderBorderColor: 'Neutral-border-1',
|
|
13141
13149
|
collapseHeaderLineHeight: 'Size-11',
|
|
13142
13150
|
collapseHeaderGap: 'Spacing-8',
|
|
13143
13151
|
collapseHeaderFontSize: 'Font-14',
|
|
13144
|
-
|
|
13152
|
+
collapseHeaderFontWeight: 'Weight-regular',
|
|
13145
13153
|
collapseHeaderIconWidth: 'Size-7',
|
|
13146
13154
|
collapseHeaderExtraGap: 'Size-5',
|
|
13155
|
+
collapseHeaderColor: 'Neutral-text-5',
|
|
13147
13156
|
collapseContentLineHeight: 'Size-11',
|
|
13148
13157
|
collapseContentGap: 'Spacing-24',
|
|
13149
13158
|
collapseContentPaddingY: 'Spacing-12',
|
|
13150
|
-
collapseContentFontSize: 'Font-14',
|
|
13151
|
-
collapseContentWeight: '400',
|
|
13152
13159
|
collapseContentPaddingLeft: 'Spacing-38',
|
|
13153
13160
|
collapseContentPaddingRight: 'Spacing-16',
|
|
13154
|
-
|
|
13155
|
-
|
|
13156
|
-
collapseWrapperBackgroundColor: 'Neutral-fill-1',
|
|
13157
|
-
collapseHeaderColor: 'Neutral-text-5',
|
|
13161
|
+
collapseContentFontSize: 'Font-14',
|
|
13162
|
+
collapseContentFontWeight: 'Weight-regular',
|
|
13158
13163
|
collapseContentColor: 'Neutral-text-4',
|
|
13159
13164
|
collapseContentBackgroundColor: 'Neutral-fill-2',
|
|
13160
13165
|
collapseDisabledColor: 'Neutral-text-2'
|
|
@@ -13755,8 +13760,11 @@ var modalTokens = {
|
|
|
13755
13760
|
|
|
13756
13761
|
var paginationTokens = {
|
|
13757
13762
|
paginationFontSize: 'Font-14',
|
|
13763
|
+
paginationFontWeight: 'Weight-regular',
|
|
13758
13764
|
paginationSmallFontSize: 'Font-12',
|
|
13765
|
+
paginationSmallFontWeight: 'Weight-regular',
|
|
13759
13766
|
paginationLargeFontSize: 'Font-16',
|
|
13767
|
+
paginationLargeFontWeight: 'Weight-regular',
|
|
13760
13768
|
paginationFontColor: 'Neutral-text-5',
|
|
13761
13769
|
paginationNearlyMargin: 'Spacing-8'
|
|
13762
13770
|
};
|
|
@@ -13781,8 +13789,8 @@ var popoverTokens = {
|
|
|
13781
13789
|
popoverBackgroundColor: 'Neutral-fill-1',
|
|
13782
13790
|
popoverShadow: 'Shadow-2',
|
|
13783
13791
|
popoverBorderColor: 'Neutral-border-1',
|
|
13784
|
-
popoverSuccessBackgroundColor: '
|
|
13785
|
-
popoverSuccessBorderColor: '
|
|
13792
|
+
popoverSuccessBackgroundColor: 'Success-1',
|
|
13793
|
+
popoverSuccessBorderColor: 'Success-2',
|
|
13786
13794
|
popoverWarningBackgroundColor: 'Warning-1',
|
|
13787
13795
|
popoverWarningBorderColor: 'Warning-2',
|
|
13788
13796
|
popoverInfoBackgroundColor: 'Brand-1',
|
|
@@ -15461,8 +15469,8 @@ var ButtonStyle = {
|
|
|
15461
15469
|
fontSize: src.buttonSmallFontSize,
|
|
15462
15470
|
padding: "".concat(src.buttonSmallPaddingY, " ").concat(src.buttonSmallPaddingX),
|
|
15463
15471
|
'&$circle,&$square': {
|
|
15464
|
-
width:
|
|
15465
|
-
height:
|
|
15472
|
+
width: src.buttonSmallCircleSize,
|
|
15473
|
+
height: src.buttonSmallCircleSize
|
|
15466
15474
|
}
|
|
15467
15475
|
},
|
|
15468
15476
|
large: {
|
|
@@ -15471,8 +15479,8 @@ var ButtonStyle = {
|
|
|
15471
15479
|
fontSize: src.buttonLargeFontSize,
|
|
15472
15480
|
padding: "".concat(src.buttonLargePaddingY, " ").concat(src.buttonLargePaddingX),
|
|
15473
15481
|
'&$circle,&$square': {
|
|
15474
|
-
width:
|
|
15475
|
-
height:
|
|
15482
|
+
width: src.buttonLargeCircleSize,
|
|
15483
|
+
height: src.buttonLargeCircleSize
|
|
15476
15484
|
}
|
|
15477
15485
|
},
|
|
15478
15486
|
default: objectSpread2_default()({}, button_button_button('Secondary', '')),
|
|
@@ -15527,14 +15535,14 @@ var ButtonStyle = {
|
|
|
15527
15535
|
borderRadius: src.buttonRoundBorderRadius
|
|
15528
15536
|
},
|
|
15529
15537
|
circle: {
|
|
15530
|
-
width:
|
|
15531
|
-
height:
|
|
15538
|
+
width: src.buttonCircleSize,
|
|
15539
|
+
height: src.buttonCircleSize,
|
|
15532
15540
|
padding: 0,
|
|
15533
15541
|
borderRadius: src.buttonCircleBorderRadius
|
|
15534
15542
|
},
|
|
15535
15543
|
square: {
|
|
15536
|
-
width:
|
|
15537
|
-
height:
|
|
15544
|
+
width: src.buttonCircleSize,
|
|
15545
|
+
height: src.buttonCircleSize,
|
|
15538
15546
|
padding: 0,
|
|
15539
15547
|
borderRadius: src.buttonSquareBorderRadius,
|
|
15540
15548
|
'& $spin': {
|
|
@@ -15732,7 +15740,7 @@ var cardStyle = {
|
|
|
15732
15740
|
wrapper: {
|
|
15733
15741
|
display: 'flex',
|
|
15734
15742
|
flexDirection: 'column',
|
|
15735
|
-
border: "
|
|
15743
|
+
border: "".concat(src.cardBorderWidth, " solid ").concat(src.cardBorderColor),
|
|
15736
15744
|
borderRadius: src.cardBorderRadius,
|
|
15737
15745
|
fontSize: src.cardFontSize,
|
|
15738
15746
|
lineHeight: src.lineHeightDynamic,
|
|
@@ -15746,7 +15754,7 @@ var cardStyle = {
|
|
|
15746
15754
|
wrapperInAccordion: {
|
|
15747
15755
|
border: 'none',
|
|
15748
15756
|
'& + &': {
|
|
15749
|
-
borderTop: "
|
|
15757
|
+
borderTop: "".concat(src.cardBorderWidth, " solid ").concat(src.cardBorderColor),
|
|
15750
15758
|
borderTopLeftRadius: 0,
|
|
15751
15759
|
borderTopRightRadius: 0
|
|
15752
15760
|
}
|
|
@@ -15757,7 +15765,7 @@ var cardStyle = {
|
|
|
15757
15765
|
wrapperHover: {
|
|
15758
15766
|
transition: 'box-shadow .2s linear',
|
|
15759
15767
|
'&:hover': {
|
|
15760
|
-
boxShadow: src.
|
|
15768
|
+
boxShadow: src.cardHoverShadow
|
|
15761
15769
|
}
|
|
15762
15770
|
},
|
|
15763
15771
|
wrapperResizable: {
|
|
@@ -15765,7 +15773,7 @@ var cardStyle = {
|
|
|
15765
15773
|
},
|
|
15766
15774
|
wrapperMoveable: {},
|
|
15767
15775
|
accordion: {
|
|
15768
|
-
border: "
|
|
15776
|
+
border: "".concat(src.cardBorderWidth, " solid ").concat(src.cardBorderColor),
|
|
15769
15777
|
borderRadius: src.cardBorderRadius
|
|
15770
15778
|
},
|
|
15771
15779
|
header: {
|
|
@@ -15818,7 +15826,7 @@ var cardStyle = {
|
|
|
15818
15826
|
},
|
|
15819
15827
|
body: {
|
|
15820
15828
|
'$wrapperSplit>$header+&, $wrapperSplit>$header+$bodyCollapse>&': {
|
|
15821
|
-
borderTop: "
|
|
15829
|
+
borderTop: "".concat(src.cardBorderWidth, " solid ").concat(src.cardBodyBorderColor)
|
|
15822
15830
|
},
|
|
15823
15831
|
padding: "".concat(src.cardBodyPaddingY, " ").concat(src.cardBodyPaddingX),
|
|
15824
15832
|
flex: 1,
|
|
@@ -15832,7 +15840,7 @@ var cardStyle = {
|
|
|
15832
15840
|
bodyCollapse: {},
|
|
15833
15841
|
footer: {
|
|
15834
15842
|
'$wrapperSplit>$body+&, $wrapperSplit>$bodyCollapse+&': {
|
|
15835
|
-
borderTop: "
|
|
15843
|
+
borderTop: "".concat(src.cardBorderWidth, " solid ").concat(src.cardFooterBorderColor)
|
|
15836
15844
|
},
|
|
15837
15845
|
padding: "".concat(src.cardFooterPaddingY, " ").concat(src.cardFooterPaddingX),
|
|
15838
15846
|
boxSizing: 'border-box'
|
|
@@ -17043,7 +17051,7 @@ var collapseStyle = {
|
|
|
17043
17051
|
var collapseItemStyle = {
|
|
17044
17052
|
wrapper: {
|
|
17045
17053
|
boxSizing: 'border-box',
|
|
17046
|
-
borderBottom: "".concat(src.collapseWrapperBorderSize, " solid ").concat(src.
|
|
17054
|
+
borderBottom: "".concat(src.collapseWrapperBorderSize, " solid ").concat(src.collapseHeaderBorderColor),
|
|
17047
17055
|
'&:last-child': {
|
|
17048
17056
|
borderBottom: 0
|
|
17049
17057
|
},
|
|
@@ -17064,7 +17072,7 @@ var collapseItemStyle = {
|
|
|
17064
17072
|
overflow: 'hidden',
|
|
17065
17073
|
gap: src.collapseHeaderGap,
|
|
17066
17074
|
fontSize: src.collapseHeaderFontSize,
|
|
17067
|
-
fontWeight: src.
|
|
17075
|
+
fontWeight: src.collapseHeaderFontWeight,
|
|
17068
17076
|
color: src.collapseHeaderColor,
|
|
17069
17077
|
padding: "".concat(src.collapseWrapperPaddingY, " ").concat(src.collapseWrapperPaddingX)
|
|
17070
17078
|
},
|
|
@@ -17139,7 +17147,7 @@ var collapseItemStyle = {
|
|
|
17139
17147
|
},
|
|
17140
17148
|
contentMain: {
|
|
17141
17149
|
color: src.collapseContentColor,
|
|
17142
|
-
fontWeight: src.
|
|
17150
|
+
fontWeight: src.collapseContentFontWeight,
|
|
17143
17151
|
lineHeight: src.lineHeightDynamic,
|
|
17144
17152
|
padding: "".concat(src.collapseContentPaddingY, " ").concat(src.collapseContentPaddingRight, " ").concat(src.collapseContentPaddingY, " ").concat(src.collapseContentPaddingLeft),
|
|
17145
17153
|
backgroundColor: src.collapseContentBackgroundColor,
|
|
@@ -19492,7 +19500,7 @@ var listStyle = {
|
|
|
19492
19500
|
flexDirection: 'column'
|
|
19493
19501
|
},
|
|
19494
19502
|
wrapperBordered: {
|
|
19495
|
-
border: "
|
|
19503
|
+
border: "".concat(src.listBorderWidth, " solid ").concat(src.listBorderColor),
|
|
19496
19504
|
borderRadius: src.listBorderRadius
|
|
19497
19505
|
},
|
|
19498
19506
|
wrapperSmall: {},
|
|
@@ -19550,7 +19558,7 @@ var listStyle = {
|
|
|
19550
19558
|
fontSize: src.listSmallFontSize
|
|
19551
19559
|
},
|
|
19552
19560
|
'$wrapperLarge &': {
|
|
19553
|
-
padding: "".concat(src.
|
|
19561
|
+
padding: "".concat(src.listLargeItemPaddingX, " ").concat(src.listLargeItemPaddingY),
|
|
19554
19562
|
fontSize: src.listLargeFontSize
|
|
19555
19563
|
}
|
|
19556
19564
|
},
|
|
@@ -20893,6 +20901,7 @@ var PaginationStyle = {
|
|
|
20893
20901
|
alignItems: 'center',
|
|
20894
20902
|
fontSize: src.paginationFontSize,
|
|
20895
20903
|
color: src.paginationFontColor,
|
|
20904
|
+
fontWeight: src.paginationFontWeight,
|
|
20896
20905
|
height: 'fit-content'
|
|
20897
20906
|
},
|
|
20898
20907
|
left: {
|
|
@@ -20932,11 +20941,15 @@ var PaginationStyle = {
|
|
|
20932
20941
|
sizeList: {},
|
|
20933
20942
|
simple: {},
|
|
20934
20943
|
small: {
|
|
20944
|
+
fontSize: src.paginationSmallFontSize,
|
|
20945
|
+
fontWeight: src.paginationSmallFontWeight,
|
|
20935
20946
|
'& $icon': {
|
|
20936
20947
|
width: src.paginationSmallFontSize
|
|
20937
20948
|
}
|
|
20938
20949
|
},
|
|
20939
20950
|
large: {
|
|
20951
|
+
fontSize: src.paginationLargeFontSize,
|
|
20952
|
+
fontWeight: src.paginationLargeFontWeight,
|
|
20940
20953
|
'& $icon': {
|
|
20941
20954
|
width: src.paginationLargeFontSize
|
|
20942
20955
|
}
|
|
@@ -22442,7 +22455,7 @@ var sliderStyle = {
|
|
|
22442
22455
|
'&::before': {
|
|
22443
22456
|
content: '""',
|
|
22444
22457
|
display: 'block',
|
|
22445
|
-
backgroundColor:
|
|
22458
|
+
backgroundColor: src.sliderScaleLineBackgroundColor
|
|
22446
22459
|
},
|
|
22447
22460
|
'$wrapper:not($vertical) &': {
|
|
22448
22461
|
marginTop: src.sliderScaleMarginY,
|
|
@@ -25224,14 +25237,14 @@ var tabsStyle = {
|
|
|
25224
25237
|
right: 0,
|
|
25225
25238
|
left: 'auto',
|
|
25226
25239
|
height: '100%',
|
|
25227
|
-
background: src.
|
|
25240
|
+
background: src.tabsLineHrBackgroundColor
|
|
25228
25241
|
}
|
|
25229
25242
|
},
|
|
25230
25243
|
'[data-soui-position^="right-"] &': {
|
|
25231
25244
|
'&:after': {
|
|
25232
25245
|
width: 1,
|
|
25233
25246
|
height: '100%',
|
|
25234
|
-
background: src.
|
|
25247
|
+
background: src.tabsLineHrBackgroundColor
|
|
25235
25248
|
}
|
|
25236
25249
|
},
|
|
25237
25250
|
'&:not([data-soui-state="active"])': {
|
|
@@ -25242,7 +25255,7 @@ var tabsStyle = {
|
|
|
25242
25255
|
left: 0,
|
|
25243
25256
|
width: '100%',
|
|
25244
25257
|
height: 1,
|
|
25245
|
-
background: src.
|
|
25258
|
+
background: src.tabsLineHrBackgroundColor
|
|
25246
25259
|
}
|
|
25247
25260
|
},
|
|
25248
25261
|
'&:not([data-soui-state="active"]):not([data-soui-state="disabled"]):hover $lineInner': {
|
|
@@ -25288,10 +25301,10 @@ var tabsStyle = {
|
|
|
25288
25301
|
fontWeight: src.tabsFillFontWeight,
|
|
25289
25302
|
background: src.tabsFillBackgroundColor,
|
|
25290
25303
|
'&[data-soui-state="active"]': {
|
|
25291
|
-
color: src.tabsFillCheckedFontColor,
|
|
25292
25304
|
// fontSize: Token.tabsFillCheckedFontSize,
|
|
25293
|
-
fontWeight: src.tabsFillCheckedFontWeight,
|
|
25294
25305
|
'& $fillInner': {
|
|
25306
|
+
color: src.tabsFillCheckedFontColor,
|
|
25307
|
+
fontWeight: src.tabsFillCheckedFontWeight,
|
|
25295
25308
|
background: src.tabsFillCheckedBackgroundColor
|
|
25296
25309
|
}
|
|
25297
25310
|
},
|
|
@@ -27467,9 +27480,9 @@ function $getKey(gen, d, index) {
|
|
|
27467
27480
|
if (typeof gen === 'function') return gen(d, index);
|
|
27468
27481
|
return index;
|
|
27469
27482
|
}
|
|
27470
|
-
function getKey(gen, d, index) {
|
|
27483
|
+
function getKey(gen, d, index, ignoreError) {
|
|
27471
27484
|
var key = $getKey(gen, d, index);
|
|
27472
|
-
if (typeof key !== 'string' && typeof key !== 'number') {
|
|
27485
|
+
if (typeof key !== 'string' && typeof key !== 'number' && !ignoreError) {
|
|
27473
27486
|
console.error(new Error("keygen result expect a string or a number, get '".concat(typeof_default()(key), "'")));
|
|
27474
27487
|
}
|
|
27475
27488
|
return key;
|
|
@@ -44649,6 +44662,90 @@ var Provider = function Provider(props) {
|
|
|
44649
44662
|
})
|
|
44650
44663
|
});
|
|
44651
44664
|
};
|
|
44665
|
+
;// CONCATENATED MODULE: ../hooks/src/utils/flat.ts
|
|
44666
|
+
|
|
44667
|
+
|
|
44668
|
+
|
|
44669
|
+
function flat_insertPoint(name) {
|
|
44670
|
+
var reg = /(\[\d+\])/gi;
|
|
44671
|
+
return name.replace(reg, function (s, m, i) {
|
|
44672
|
+
return s.replace(m, i === 0 ? m : ".".concat(m));
|
|
44673
|
+
});
|
|
44674
|
+
}
|
|
44675
|
+
function flatten(data, skipArray) {
|
|
44676
|
+
if (is_isEmpty(data)) return data;
|
|
44677
|
+
var result = {};
|
|
44678
|
+
function recurse(cur, prop) {
|
|
44679
|
+
if (Object(cur) !== cur || typeof cur === 'function' || cur instanceof Date || cur instanceof Error || skipArray && Array.isArray(cur)) {
|
|
44680
|
+
if (!(cur === undefined && /\[\d+\]$/.test(prop))) {
|
|
44681
|
+
result[prop] = cur;
|
|
44682
|
+
}
|
|
44683
|
+
} else if (Array.isArray(cur)) {
|
|
44684
|
+
if (cur.length === 0) {
|
|
44685
|
+
result[prop] = [];
|
|
44686
|
+
} else {
|
|
44687
|
+
for (var i = 0, l = cur.length; i < l; i++) {
|
|
44688
|
+
recurse(cur[i], prop ? "".concat(prop, "[").concat(i, "]") : "[".concat(i, "]"));
|
|
44689
|
+
}
|
|
44690
|
+
}
|
|
44691
|
+
} else {
|
|
44692
|
+
var empty = true;
|
|
44693
|
+
if (typeof_default()(cur) === 'object') {
|
|
44694
|
+
// eslint-disable-next-line
|
|
44695
|
+
for (var p in cur) {
|
|
44696
|
+
empty = false;
|
|
44697
|
+
recurse(cur[p], prop ? "".concat(prop, ".").concat(p) : p);
|
|
44698
|
+
}
|
|
44699
|
+
if (empty) {
|
|
44700
|
+
result[prop] = {};
|
|
44701
|
+
}
|
|
44702
|
+
}
|
|
44703
|
+
}
|
|
44704
|
+
}
|
|
44705
|
+
recurse(data, '');
|
|
44706
|
+
return result;
|
|
44707
|
+
}
|
|
44708
|
+
function insertValue(obj, name, index, value) {
|
|
44709
|
+
Object.keys(obj).filter(function (n) {
|
|
44710
|
+
return n.indexOf("".concat(name, "[")) === 0;
|
|
44711
|
+
}).sort().reverse().forEach(function (n) {
|
|
44712
|
+
// const reg = new RegExp(`${name}\\[(\\d+)\\]`)
|
|
44713
|
+
var reg = new RegExp("".concat(name.replace(/\[/g, '\\[').replace(/\]/g, '\\]'), "\\[(\\d+)\\]"));
|
|
44714
|
+
var match = reg.exec(n);
|
|
44715
|
+
var i = parseInt(match[1], 10);
|
|
44716
|
+
if (i < index) return;
|
|
44717
|
+
var newName = n.replace(reg, "".concat(name, "[").concat(i + 1, "]"));
|
|
44718
|
+
if (obj[n]) obj[newName] = obj[n];
|
|
44719
|
+
delete obj[n];
|
|
44720
|
+
});
|
|
44721
|
+
var newValue = flatten(defineProperty_default()({}, "".concat(name, "[").concat(index, "]"), value));
|
|
44722
|
+
Object.keys(newValue).forEach(function (k) {
|
|
44723
|
+
if (newValue[k] !== undefined) obj[k] = newValue[k];
|
|
44724
|
+
});
|
|
44725
|
+
}
|
|
44726
|
+
function spliceValue(obj, name, index) {
|
|
44727
|
+
var names = Object.keys(obj).filter(function (n) {
|
|
44728
|
+
return n === name || n.indexOf("".concat(name, "[")) === 0;
|
|
44729
|
+
}).sort();
|
|
44730
|
+
names.forEach(function (n) {
|
|
44731
|
+
if (n === name && !Array.isArray(obj[name])) return;
|
|
44732
|
+
if (n === name && Array.isArray(obj[name])) {
|
|
44733
|
+
obj[name].splice(index, 1);
|
|
44734
|
+
return;
|
|
44735
|
+
}
|
|
44736
|
+
var reg = new RegExp("".concat(name.replace(/\[/g, '\\[').replace(/\]/g, '\\]'), "\\[(\\d+)\\]"));
|
|
44737
|
+
var match = reg.exec(n);
|
|
44738
|
+
var i = parseInt(match[1], 10);
|
|
44739
|
+
if (i < index) return;
|
|
44740
|
+
if (i === index) {
|
|
44741
|
+
delete obj[n];
|
|
44742
|
+
return;
|
|
44743
|
+
}
|
|
44744
|
+
var newName = n.replace(reg, "".concat(name, "[").concat(i - 1, "]"));
|
|
44745
|
+
obj[newName] = obj[n];
|
|
44746
|
+
delete obj[n];
|
|
44747
|
+
});
|
|
44748
|
+
}
|
|
44652
44749
|
;// CONCATENATED MODULE: ../hooks/src/components/use-form/use-form.ts
|
|
44653
44750
|
|
|
44654
44751
|
|
|
@@ -44659,6 +44756,7 @@ var Provider = function Provider(props) {
|
|
|
44659
44756
|
|
|
44660
44757
|
|
|
44661
44758
|
|
|
44759
|
+
|
|
44662
44760
|
var globalKey = '__global__&&@@';
|
|
44663
44761
|
|
|
44664
44762
|
|
|
@@ -44731,6 +44829,15 @@ var useForm = function useForm(props) {
|
|
|
44731
44829
|
update();
|
|
44732
44830
|
});
|
|
44733
44831
|
};
|
|
44832
|
+
var updateFieldsets = use_persist_fn(function (name) {
|
|
44833
|
+
var na = "".concat(name, "[");
|
|
44834
|
+
var no = "".concat(name, ".");
|
|
44835
|
+
context.names.forEach(function (key) {
|
|
44836
|
+
if (key.startsWith(na) || key.startsWith(no)) {
|
|
44837
|
+
update(key);
|
|
44838
|
+
}
|
|
44839
|
+
});
|
|
44840
|
+
});
|
|
44734
44841
|
var handleSubmitError = function handleSubmitError(err) {
|
|
44735
44842
|
onError === null || onError === void 0 || onError(err);
|
|
44736
44843
|
if (!props.scrollToError) return;
|
|
@@ -44848,6 +44955,14 @@ var useForm = function useForm(props) {
|
|
|
44848
44955
|
context.errors[name] = e;
|
|
44849
44956
|
update(name);
|
|
44850
44957
|
});
|
|
44958
|
+
var insertError = use_persist_fn(function (name, index, error) {
|
|
44959
|
+
insertValue(context.errors, name, index, error);
|
|
44960
|
+
updateFieldsets(name);
|
|
44961
|
+
});
|
|
44962
|
+
var spliceError = use_persist_fn(function (name, index) {
|
|
44963
|
+
spliceValue(context.errors, name, index);
|
|
44964
|
+
updateFieldsets(name);
|
|
44965
|
+
});
|
|
44851
44966
|
var submit = use_persist_fn(function () {
|
|
44852
44967
|
var withValidate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
44853
44968
|
if (disabled) return;
|
|
@@ -44904,6 +45019,17 @@ var useForm = function useForm(props) {
|
|
|
44904
45019
|
other === null || other === void 0 || (_other$onSubmit = other.onSubmit) === null || _other$onSubmit === void 0 || _other$onSubmit.call(other, e);
|
|
44905
45020
|
};
|
|
44906
45021
|
};
|
|
45022
|
+
var validateFieldset = function validateFieldset(name) {
|
|
45023
|
+
var na = "".concat(name, "[");
|
|
45024
|
+
var no = "".concat(name, ".");
|
|
45025
|
+
var fields = [];
|
|
45026
|
+
context.names.forEach(function (key) {
|
|
45027
|
+
if (key.startsWith(na) || key.startsWith(no)) {
|
|
45028
|
+
fields.push(key);
|
|
45029
|
+
}
|
|
45030
|
+
});
|
|
45031
|
+
validateFields(fields).catch(function () {});
|
|
45032
|
+
};
|
|
44907
45033
|
var getDefaultValue = function getDefaultValue() {
|
|
44908
45034
|
var v = utils_immer_produce(defaultValue, function (draft) {
|
|
44909
45035
|
Object.keys(context.defaultValues).forEach(function (key) {
|
|
@@ -45009,7 +45135,10 @@ var useForm = function useForm(props) {
|
|
|
45009
45135
|
setError: setError,
|
|
45010
45136
|
getErrors: getErrors,
|
|
45011
45137
|
clearValidate: clearValidate,
|
|
45012
|
-
validateFields: validateFields
|
|
45138
|
+
validateFields: validateFields,
|
|
45139
|
+
validateFieldset: validateFieldset,
|
|
45140
|
+
insertError: insertError,
|
|
45141
|
+
spliceError: spliceError
|
|
45013
45142
|
});
|
|
45014
45143
|
var formConfig = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
|
|
45015
45144
|
return {
|
|
@@ -45355,7 +45484,8 @@ var useFormFieldSet = function useFormFieldSet(props) {
|
|
|
45355
45484
|
ProviderValue: ProviderValue,
|
|
45356
45485
|
error: error,
|
|
45357
45486
|
value: value,
|
|
45358
|
-
onChange: onChange
|
|
45487
|
+
onChange: onChange,
|
|
45488
|
+
name: name
|
|
45359
45489
|
};
|
|
45360
45490
|
};
|
|
45361
45491
|
/* harmony default export */ var use_form_fieldset = (useFormFieldSet);
|
|
@@ -45372,6 +45502,7 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
45372
45502
|
ids: []
|
|
45373
45503
|
}),
|
|
45374
45504
|
context = _React$useRef.current;
|
|
45505
|
+
var formFunc = useFormFunc();
|
|
45375
45506
|
var getValidateProps = usePersistFn(function () {
|
|
45376
45507
|
return props;
|
|
45377
45508
|
});
|
|
@@ -45385,16 +45516,16 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
45385
45516
|
}),
|
|
45386
45517
|
Provider = _useFormFieldSet.Provider,
|
|
45387
45518
|
ProviderValue = _useFormFieldSet.ProviderValue,
|
|
45388
|
-
value = _useFormFieldSet.value,
|
|
45389
45519
|
error = _useFormFieldSet.error,
|
|
45390
|
-
_onChange = _useFormFieldSet.onChange
|
|
45520
|
+
_onChange = _useFormFieldSet.onChange,
|
|
45521
|
+
name = _useFormFieldSet.name;
|
|
45391
45522
|
if (typeof children !== 'function') {
|
|
45392
45523
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Provider, {
|
|
45393
45524
|
value: ProviderValue,
|
|
45394
45525
|
children: children
|
|
45395
45526
|
});
|
|
45396
45527
|
}
|
|
45397
|
-
var valueArr =
|
|
45528
|
+
var valueArr = (formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name)) || [];
|
|
45398
45529
|
valueArr = Array.isArray(valueArr) ? valueArr : [valueArr];
|
|
45399
45530
|
var result = [];
|
|
45400
45531
|
if (valueArr.length === 0 && valueArr && empty) {
|
|
@@ -45405,6 +45536,7 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
45405
45536
|
});
|
|
45406
45537
|
_onChange(newValue);
|
|
45407
45538
|
context.ids.push(generateUUID());
|
|
45539
|
+
formFunc === null || formFunc === void 0 || formFunc.insertError(name, 0);
|
|
45408
45540
|
})
|
|
45409
45541
|
}, 'empty'));
|
|
45410
45542
|
}
|
|
@@ -45426,31 +45558,39 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
45426
45558
|
index: i,
|
|
45427
45559
|
error: errorList,
|
|
45428
45560
|
onChange: function onChange(val) {
|
|
45429
|
-
var
|
|
45561
|
+
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
45562
|
+
var newValue = form_fieldset_produce(oldValue, function (draft) {
|
|
45430
45563
|
draft[i] = val;
|
|
45431
45564
|
});
|
|
45432
45565
|
_onChange(newValue);
|
|
45566
|
+
formFunc === null || formFunc === void 0 || formFunc.validateFieldset("".concat(name, "[").concat(i, "]"));
|
|
45433
45567
|
},
|
|
45434
45568
|
onInsert: function onInsert(val) {
|
|
45435
|
-
var
|
|
45569
|
+
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
45570
|
+
var newValue = form_fieldset_produce(oldValue, function (draft) {
|
|
45436
45571
|
draft.splice(i, 0, val);
|
|
45437
45572
|
});
|
|
45438
45573
|
_onChange(newValue);
|
|
45439
45574
|
context.ids.splice(i, 0, generateUUID());
|
|
45575
|
+
formFunc === null || formFunc === void 0 || formFunc.insertError(name, i);
|
|
45440
45576
|
},
|
|
45441
45577
|
onAppend: function onAppend(val) {
|
|
45442
|
-
var
|
|
45578
|
+
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
45579
|
+
var newValue = form_fieldset_produce(oldValue, function (draft) {
|
|
45443
45580
|
draft.splice(i + 1, 0, val);
|
|
45444
45581
|
});
|
|
45445
45582
|
_onChange(newValue);
|
|
45446
45583
|
context.ids.splice(i + 1, 0, generateUUID());
|
|
45584
|
+
formFunc === null || formFunc === void 0 || formFunc.insertError(name, i + 1);
|
|
45447
45585
|
},
|
|
45448
45586
|
onRemove: function onRemove() {
|
|
45449
|
-
var
|
|
45587
|
+
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
45588
|
+
var newValue = form_fieldset_produce(oldValue, function (draft) {
|
|
45450
45589
|
draft.splice(i, 1);
|
|
45451
45590
|
});
|
|
45452
45591
|
_onChange(newValue);
|
|
45453
45592
|
context.ids.splice(i, 1);
|
|
45593
|
+
formFunc === null || formFunc === void 0 || formFunc.spliceError(name, i);
|
|
45454
45594
|
}
|
|
45455
45595
|
})
|
|
45456
45596
|
}, ids[i]));
|
|
@@ -48137,7 +48277,6 @@ var list_List = function List(props) {
|
|
|
48137
48277
|
});
|
|
48138
48278
|
};
|
|
48139
48279
|
var renderItem = function renderItem(item, index, key) {
|
|
48140
|
-
console.log('lineHeight', lineHeight);
|
|
48141
48280
|
return /*#__PURE__*/(0,jsx_runtime.jsx)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
48142
48281
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(list_option, {
|
|
48143
48282
|
datum: datum,
|
|
@@ -50075,7 +50214,7 @@ function Select(props0) {
|
|
|
50075
50214
|
optionListRef: optionListRef,
|
|
50076
50215
|
onOptionClick: handleOptionClick
|
|
50077
50216
|
};
|
|
50078
|
-
|
|
50217
|
+
|
|
50079
50218
|
// 自定义列
|
|
50080
50219
|
if ('columns' in props && typeof columns === 'number' && columns >= 1 || columns === -1) {
|
|
50081
50220
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(list_columns, objectSpread2_default()({
|
|
@@ -51639,7 +51778,7 @@ var MenuItem = function MenuItem(props) {
|
|
|
51639
51778
|
}
|
|
51640
51779
|
}) : null;
|
|
51641
51780
|
var item = render_render(props.renderItem, props.dataItem, props.index);
|
|
51642
|
-
var link = props.linkKey ? getKey(props.linkKey, props.dataItem, props.index) : undefined;
|
|
51781
|
+
var link = props.linkKey ? getKey(props.linkKey, props.dataItem, props.index, true) : undefined;
|
|
51643
51782
|
var title = null;
|
|
51644
51783
|
if (isLink(item)) {
|
|
51645
51784
|
var mergeClass = classnames_default()(classes === null || classes === void 0 ? void 0 : classes.title, item.props && item.props.className);
|
|
@@ -61620,13 +61759,13 @@ function fade(color) {
|
|
|
61620
61759
|
|
|
61621
61760
|
|
|
61622
61761
|
|
|
61623
|
-
function
|
|
61762
|
+
function utils_flat_insertPoint(name) {
|
|
61624
61763
|
var reg = /(\[\d+\])/gi;
|
|
61625
61764
|
return name.replace(reg, function (s, m, i) {
|
|
61626
61765
|
return s.replace(m, i === 0 ? m : ".".concat(m));
|
|
61627
61766
|
});
|
|
61628
61767
|
}
|
|
61629
|
-
function
|
|
61768
|
+
function flat_flatten(data, skipArray) {
|
|
61630
61769
|
if (utils_is_isEmpty(data)) return data;
|
|
61631
61770
|
var result = {};
|
|
61632
61771
|
function recurse(cur, prop) {
|
|
@@ -61675,7 +61814,7 @@ function unflatten(rawdata) {
|
|
|
61675
61814
|
|
|
61676
61815
|
// eslint-disable-next-line
|
|
61677
61816
|
Object.keys(data).sort().forEach(function (p) {
|
|
61678
|
-
var pathWithPoint =
|
|
61817
|
+
var pathWithPoint = utils_flat_insertPoint(p);
|
|
61679
61818
|
cur = result;
|
|
61680
61819
|
prop = '';
|
|
61681
61820
|
last = 0;
|
|
@@ -61691,7 +61830,7 @@ function unflatten(rawdata) {
|
|
|
61691
61830
|
});
|
|
61692
61831
|
return result[''];
|
|
61693
61832
|
}
|
|
61694
|
-
function
|
|
61833
|
+
function flat_insertValue(obj, name, index, value) {
|
|
61695
61834
|
Object.keys(obj).filter(function (n) {
|
|
61696
61835
|
return n.indexOf("".concat(name, "[")) === 0;
|
|
61697
61836
|
}).sort().reverse().forEach(function (n) {
|
|
@@ -61704,12 +61843,12 @@ function insertValue(obj, name, index, value) {
|
|
|
61704
61843
|
if (obj[n]) obj[newName] = obj[n];
|
|
61705
61844
|
delete obj[n];
|
|
61706
61845
|
});
|
|
61707
|
-
var newValue =
|
|
61846
|
+
var newValue = flat_flatten(defineProperty_default()({}, "".concat(name, "[").concat(index, "]"), value));
|
|
61708
61847
|
Object.keys(newValue).forEach(function (k) {
|
|
61709
61848
|
if (newValue[k] !== undefined) obj[k] = newValue[k];
|
|
61710
61849
|
});
|
|
61711
61850
|
}
|
|
61712
|
-
function
|
|
61851
|
+
function flat_spliceValue(obj, name, index) {
|
|
61713
61852
|
var names = Object.keys(obj).filter(function (n) {
|
|
61714
61853
|
return n === name || n.indexOf("".concat(name, "[")) === 0;
|
|
61715
61854
|
}).sort();
|
|
@@ -61740,7 +61879,7 @@ var isNameWithPath = function isNameWithPath(name, path) {
|
|
|
61740
61879
|
var getSthByName = function getSthByName(name, source) {
|
|
61741
61880
|
if (source[name]) return source[name];
|
|
61742
61881
|
var result = unflatten(source);
|
|
61743
|
-
name =
|
|
61882
|
+
name = utils_flat_insertPoint(name);
|
|
61744
61883
|
name.split('.').forEach(function (n) {
|
|
61745
61884
|
var match = /^\[(\d+)\]$/.exec(n);
|
|
61746
61885
|
// eslint-disable-next-line
|
|
@@ -61755,7 +61894,7 @@ var getSthByName = function getSthByName(name, source) {
|
|
|
61755
61894
|
var removeSthByName = function removeSthByName(name, source) {
|
|
61756
61895
|
var match = /(.*)\[(\d+)\]$/.exec(name);
|
|
61757
61896
|
if (match) {
|
|
61758
|
-
|
|
61897
|
+
flat_spliceValue(source, match[1], parseInt(match[2], 10));
|
|
61759
61898
|
} else {
|
|
61760
61899
|
Object.keys(source).forEach(function (n) {
|
|
61761
61900
|
if (isNameWithPath(n, name)) delete source[n];
|
|
@@ -61947,7 +62086,7 @@ var objects_deepMerge = function deepMerge() {
|
|
|
61947
62086
|
return dest;
|
|
61948
62087
|
};
|
|
61949
62088
|
function objects_pathGenerator(raw) {
|
|
61950
|
-
var path =
|
|
62089
|
+
var path = utils_flat_insertPoint(raw);
|
|
61951
62090
|
var reg = /^\[(\d+)\]$/;
|
|
61952
62091
|
var pathModeValues = objects_objectValues(objects_PATH_MODE);
|
|
61953
62092
|
var index = 0;
|
|
@@ -63173,7 +63312,7 @@ var upload_interface = __webpack_require__(4412);
|
|
|
63173
63312
|
|
|
63174
63313
|
|
|
63175
63314
|
/* harmony default export */ var src_0 = ({
|
|
63176
|
-
version: '3.3.0-beta.
|
|
63315
|
+
version: '3.3.0-beta.4'
|
|
63177
63316
|
});
|
|
63178
63317
|
}();
|
|
63179
63318
|
/******/ return __webpack_exports__;
|