shineout 3.4.0-beta.4 → 3.4.0-beta.6
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/date-picker/date-picker.js +2 -1
- package/cjs/index.js +1 -1
- package/dist/shineout.js +840 -327
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/date-picker/date-picker.js +3 -2
- package/esm/index.js +1 -1
- package/package.json +5 -5
package/dist/shineout.js
CHANGED
|
@@ -11991,7 +11991,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
11991
11991
|
};
|
|
11992
11992
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
11993
11993
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
11994
|
-
/* harmony default export */ var version = ('3.4.0-beta.
|
|
11994
|
+
/* harmony default export */ var version = ('3.4.0-beta.6');
|
|
11995
11995
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
11996
11996
|
|
|
11997
11997
|
|
|
@@ -13337,6 +13337,8 @@ var datePickerTokens = {
|
|
|
13337
13337
|
datePickerQuickPanelItemFontSize: 'Font-12',
|
|
13338
13338
|
datePickerQuickPanelItemPaddingX: 'Spacing-12',
|
|
13339
13339
|
datePickerQuickPanelItemPaddingY: 'Spacing-2',
|
|
13340
|
+
datePickerQuickPanelItemActiveBackgroundColor: 'Brand-1',
|
|
13341
|
+
datePickerQuickPanelItemActiveFontColor: 'Brand-6',
|
|
13340
13342
|
datePickerQuickPanelItemHoverBackgroundColor: 'Neutral-fill-2'
|
|
13341
13343
|
};
|
|
13342
13344
|
/* harmony default export */ var date_picker = (datePickerTokens);
|
|
@@ -17798,16 +17800,29 @@ var datePickerStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
17798
17800
|
display: 'flex',
|
|
17799
17801
|
justifyContent: 'space-between'
|
|
17800
17802
|
},
|
|
17801
|
-
|
|
17803
|
+
pickerFooterTime: {
|
|
17802
17804
|
padding: "".concat(src.datePickerPanelFooterPaddingY, " ").concat(src.datePickerPanelFooterPaddingX)
|
|
17803
17805
|
},
|
|
17804
|
-
|
|
17806
|
+
pickerFooterNow: {
|
|
17805
17807
|
padding: "".concat(src.datePickerPanelFooterPaddingY, " ").concat(src.datePickerPanelFooterPaddingX),
|
|
17806
17808
|
'&:only-child': {
|
|
17807
17809
|
width: '100%',
|
|
17808
17810
|
textAlign: 'center'
|
|
17809
17811
|
}
|
|
17810
17812
|
},
|
|
17813
|
+
pickerFooterConfirm: {
|
|
17814
|
+
textAlign: 'right',
|
|
17815
|
+
padding: "".concat(src.datePickerPanelFooterPaddingY, " ").concat(src.datePickerPanelFooterPaddingX)
|
|
17816
|
+
},
|
|
17817
|
+
pickerRange: {},
|
|
17818
|
+
pickerRangeBody: {
|
|
17819
|
+
display: 'flex'
|
|
17820
|
+
},
|
|
17821
|
+
pickerRangeFooter: {
|
|
17822
|
+
borderTop: "1px solid ".concat(src.datePickerPanelHeaderBorderColor),
|
|
17823
|
+
display: 'flex',
|
|
17824
|
+
justifyContent: 'flex-end'
|
|
17825
|
+
},
|
|
17811
17826
|
pickerRow: {},
|
|
17812
17827
|
pickerRowWeek: {
|
|
17813
17828
|
'& $pickerCell:nth-child(2)': {
|
|
@@ -18133,6 +18148,10 @@ var datePickerStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
18133
18148
|
cursor: 'pointer'
|
|
18134
18149
|
}
|
|
18135
18150
|
},
|
|
18151
|
+
quickPickerActiveItem: {
|
|
18152
|
+
color: src.datePickerQuickPanelItemActiveFontColor,
|
|
18153
|
+
background: src.datePickerQuickPanelItemActiveBackgroundColor
|
|
18154
|
+
},
|
|
18136
18155
|
pickerFooterBtn: {}
|
|
18137
18156
|
});
|
|
18138
18157
|
/* harmony default export */ var date_picker_date_picker = (datePickerStyle);
|
|
@@ -21302,7 +21321,7 @@ var normalize_token = {
|
|
|
21302
21321
|
};
|
|
21303
21322
|
var lineHeightComputed = '20px';
|
|
21304
21323
|
var lineHeightComputed2 = '10px';
|
|
21305
|
-
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(
|
|
21324
|
+
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}");
|
|
21306
21325
|
if (typeof window !== 'undefined') {
|
|
21307
21326
|
var normalize_link = document.createElement('style');
|
|
21308
21327
|
normalize_link.innerHTML = normalize_css;
|
|
@@ -22517,6 +22536,11 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
22517
22536
|
padding: 0,
|
|
22518
22537
|
width: '100%'
|
|
22519
22538
|
},
|
|
22539
|
+
dynamicList: {
|
|
22540
|
+
'& $optionInner': {
|
|
22541
|
+
textWrap: 'wrap'
|
|
22542
|
+
}
|
|
22543
|
+
},
|
|
22520
22544
|
option: {
|
|
22521
22545
|
listStyle: 'none',
|
|
22522
22546
|
lineHeight: src.lineHeightDynamic,
|
|
@@ -24783,6 +24807,14 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({}, globalStyle
|
|
|
24783
24807
|
background: "".concat(src.tableTbodyHoverBackgroundColor)
|
|
24784
24808
|
}
|
|
24785
24809
|
},
|
|
24810
|
+
rowHover: {
|
|
24811
|
+
'& td': {
|
|
24812
|
+
transition: 'background-color 0.2s'
|
|
24813
|
+
},
|
|
24814
|
+
'&&:hover td': {
|
|
24815
|
+
background: "".concat(src.tableTbodyHoverBackgroundColor)
|
|
24816
|
+
}
|
|
24817
|
+
},
|
|
24786
24818
|
floatLeft: {
|
|
24787
24819
|
'& $cellFixedLast$cellFixedLeft': {
|
|
24788
24820
|
'&::after': {
|
|
@@ -26083,9 +26115,6 @@ var TagStyle = {
|
|
|
26083
26115
|
padding: "0 ".concat(src.tagSmallPaddingX),
|
|
26084
26116
|
fontWeight: src.tagSmallFontWeight,
|
|
26085
26117
|
borderRadius: src.tagSmallBorderRadius,
|
|
26086
|
-
'& $container': {
|
|
26087
|
-
lineHeight: "calc(".concat(src.tagSmallFontSize, " + 6px)")
|
|
26088
|
-
},
|
|
26089
26118
|
'& $wrapper': {
|
|
26090
26119
|
lineHeight: "calc(".concat(src.tagSmallFontSize, " + 6px)")
|
|
26091
26120
|
},
|
|
@@ -26384,7 +26413,8 @@ var tooltipStyle = objectSpread2_default()(objectSpread2_default()({}, tooltip_a
|
|
|
26384
26413
|
backgroundColor: src.tooltipDangerBackgroundColor,
|
|
26385
26414
|
color: src.tooltipDangerColor
|
|
26386
26415
|
},
|
|
26387
|
-
'&::before': {
|
|
26416
|
+
// '&::before': {
|
|
26417
|
+
'& $arrow': {
|
|
26388
26418
|
'z-index': 1,
|
|
26389
26419
|
position: 'absolute',
|
|
26390
26420
|
content: '" "',
|
|
@@ -26399,19 +26429,13 @@ var tooltipStyle = objectSpread2_default()(objectSpread2_default()({}, tooltip_a
|
|
|
26399
26429
|
},
|
|
26400
26430
|
'&[data-soui-position^="bottom"]': {
|
|
26401
26431
|
marginTop: arrowGap - 2,
|
|
26402
|
-
'
|
|
26403
|
-
top: '0',
|
|
26404
|
-
left: '0',
|
|
26405
|
-
right: '0',
|
|
26406
|
-
margin: 'auto'
|
|
26407
|
-
},
|
|
26408
|
-
'&[dir=ltr]::before': {
|
|
26432
|
+
'&[dir=ltr] $arrow': {
|
|
26409
26433
|
transform: 'translate(0, -50%) rotate(-45deg)'
|
|
26410
26434
|
},
|
|
26411
|
-
'&[dir=rtl]
|
|
26435
|
+
'&[dir=rtl] $arrow': {
|
|
26412
26436
|
transform: 'translate(0, -50%) rotate(45deg)'
|
|
26413
26437
|
},
|
|
26414
|
-
'
|
|
26438
|
+
'& $arrow::after': {
|
|
26415
26439
|
top: arrowGap * -1,
|
|
26416
26440
|
left: '0',
|
|
26417
26441
|
right: '0',
|
|
@@ -26423,105 +26447,105 @@ var tooltipStyle = objectSpread2_default()(objectSpread2_default()({}, tooltip_a
|
|
|
26423
26447
|
},
|
|
26424
26448
|
'&[data-soui-position^="top"]': {
|
|
26425
26449
|
marginTop: (arrowGap - 2) * -1,
|
|
26426
|
-
'
|
|
26427
|
-
bottom: '0',
|
|
26428
|
-
transform: 'translate(0, 50%) rotate(135deg)',
|
|
26429
|
-
left: '0',
|
|
26430
|
-
right: '0',
|
|
26431
|
-
margin: 'auto'
|
|
26432
|
-
},
|
|
26433
|
-
'&[dir=ltr]::before': {
|
|
26450
|
+
'&[dir=ltr] $arrow': {
|
|
26434
26451
|
transform: 'translate(0, 50%) rotate(135deg)'
|
|
26435
26452
|
},
|
|
26436
|
-
'&[dir=rtl]
|
|
26453
|
+
'&[dir=rtl] $arrow': {
|
|
26437
26454
|
transform: 'translate(0, 50%) rotate(-135deg)'
|
|
26438
|
-
},
|
|
26439
|
-
'&::after': {
|
|
26440
|
-
bottom: arrowGap * -1,
|
|
26441
|
-
left: '0',
|
|
26442
|
-
right: '0',
|
|
26443
|
-
content: '" "',
|
|
26444
|
-
display: 'block',
|
|
26445
|
-
height: arrowGap,
|
|
26446
|
-
position: 'absolute'
|
|
26447
26455
|
}
|
|
26456
|
+
// '&::before': {
|
|
26457
|
+
// bottom: '0',
|
|
26458
|
+
// transform: 'translate(0, 50%) rotate(135deg)',
|
|
26459
|
+
// left: '0',
|
|
26460
|
+
// right: '0',
|
|
26461
|
+
// margin: 'auto',
|
|
26462
|
+
// },
|
|
26463
|
+
// '&[dir=ltr]::before': {
|
|
26464
|
+
// transform: 'translate(0, 50%) rotate(135deg)',
|
|
26465
|
+
// },
|
|
26466
|
+
// '&[dir=rtl]::before': {
|
|
26467
|
+
// transform: 'translate(0, 50%) rotate(-135deg)',
|
|
26468
|
+
// },
|
|
26469
|
+
// '&::after': {
|
|
26470
|
+
// bottom: arrowGap * -1,
|
|
26471
|
+
// left: '0',
|
|
26472
|
+
// right: '0',
|
|
26473
|
+
// content: '" "',
|
|
26474
|
+
// display: 'block',
|
|
26475
|
+
// height: arrowGap,
|
|
26476
|
+
// position: 'absolute',
|
|
26477
|
+
// },
|
|
26448
26478
|
},
|
|
26449
26479
|
'&[data-soui-position^="left"]': {
|
|
26450
26480
|
marginLeft: (arrowGap - 2) * -1,
|
|
26451
|
-
'&[dir=ltr]': {
|
|
26452
|
-
marginLeft: (arrowGap - 2) * -1
|
|
26453
|
-
},
|
|
26454
|
-
'&[dir=rtl]': {
|
|
26455
|
-
marginRight: (arrowGap - 2) * -1
|
|
26456
|
-
},
|
|
26457
|
-
'&::before': {
|
|
26458
|
-
right: 0,
|
|
26459
|
-
top: '0',
|
|
26460
|
-
bottom: '0',
|
|
26461
|
-
margin: 'auto'
|
|
26462
|
-
},
|
|
26463
|
-
'&[dir=ltr]::before': {
|
|
26481
|
+
'&[dir=ltr] $arrow': {
|
|
26464
26482
|
transform: 'translate(50%, 0) rotate(45deg)'
|
|
26465
26483
|
},
|
|
26466
|
-
'&[dir=rtl]
|
|
26484
|
+
'&[dir=rtl] $arrow': {
|
|
26467
26485
|
transform: 'translate(50%, 0) rotate(135deg)'
|
|
26468
|
-
},
|
|
26469
|
-
'&::after': {
|
|
26470
|
-
left: arrowGap * -1,
|
|
26471
|
-
top: '0',
|
|
26472
|
-
bottom: '0',
|
|
26473
|
-
content: '" "',
|
|
26474
|
-
display: 'block',
|
|
26475
|
-
width: arrowGap,
|
|
26476
|
-
position: 'absolute'
|
|
26477
26486
|
}
|
|
26487
|
+
|
|
26488
|
+
// '&[dir=ltr]': { marginLeft: (arrowGap - 2) * -1 },
|
|
26489
|
+
// '&[dir=rtl]': { marginRight: (arrowGap - 2) * -1 },
|
|
26490
|
+
// '&::before': {
|
|
26491
|
+
// right: 0,
|
|
26492
|
+
// top: '0',
|
|
26493
|
+
// bottom: '0',
|
|
26494
|
+
// margin: 'auto',
|
|
26495
|
+
// },
|
|
26496
|
+
// '&[dir=ltr]::before': {
|
|
26497
|
+
// transform: 'translate(50%, 0) rotate(45deg)',
|
|
26498
|
+
// },
|
|
26499
|
+
// '&[dir=rtl]::before': {
|
|
26500
|
+
// transform: 'translate(50%, 0) rotate(135deg)',
|
|
26501
|
+
// },
|
|
26502
|
+
// '&::after': {
|
|
26503
|
+
// left: arrowGap * -1,
|
|
26504
|
+
// top: '0',
|
|
26505
|
+
// bottom: '0',
|
|
26506
|
+
// content: '" "',
|
|
26507
|
+
// display: 'block',
|
|
26508
|
+
// width: arrowGap,
|
|
26509
|
+
// position: 'absolute',
|
|
26510
|
+
// },
|
|
26478
26511
|
},
|
|
26479
26512
|
'&[data-soui-position^="right"]': {
|
|
26480
26513
|
marginLeft: arrowGap - 2,
|
|
26481
|
-
'&[dir=ltr]': {
|
|
26482
|
-
marginLeft: arrowGap - 2
|
|
26483
|
-
},
|
|
26484
|
-
'&[dir=rtl]': {
|
|
26485
|
-
marginRight: arrowGap - 2
|
|
26486
|
-
},
|
|
26487
|
-
'&::before': {
|
|
26488
|
-
left: '0',
|
|
26489
|
-
top: '0',
|
|
26490
|
-
bottom: '0',
|
|
26491
|
-
margin: 'auto'
|
|
26492
|
-
},
|
|
26493
|
-
'&[dir=ltr]::before': {
|
|
26514
|
+
'&[dir=ltr] $arrow': {
|
|
26494
26515
|
transform: 'translate(-50%, 0) rotate(-135deg)'
|
|
26495
26516
|
},
|
|
26496
|
-
'&[dir=rtl]
|
|
26517
|
+
'&[dir=rtl] $arrow': {
|
|
26497
26518
|
transform: 'translate(-50%, 0) rotate(-45deg)'
|
|
26498
|
-
},
|
|
26499
|
-
'&::after': {
|
|
26500
|
-
left: arrowGap * -1,
|
|
26501
|
-
top: '0',
|
|
26502
|
-
bottom: '0',
|
|
26503
|
-
content: '" "',
|
|
26504
|
-
display: 'block',
|
|
26505
|
-
width: arrowGap,
|
|
26506
|
-
position: 'absolute'
|
|
26507
26519
|
}
|
|
26508
|
-
|
|
26509
|
-
|
|
26510
|
-
|
|
26511
|
-
|
|
26512
|
-
|
|
26513
|
-
|
|
26514
|
-
|
|
26515
|
-
|
|
26516
|
-
|
|
26517
|
-
|
|
26518
|
-
|
|
26519
|
-
|
|
26520
|
-
|
|
26521
|
-
|
|
26522
|
-
|
|
26523
|
-
|
|
26520
|
+
|
|
26521
|
+
// '&[dir=ltr]': { marginLeft: arrowGap - 2 },
|
|
26522
|
+
// '&[dir=rtl]': { marginRight: arrowGap - 2 },
|
|
26523
|
+
// '&::before': {
|
|
26524
|
+
// left: '0',
|
|
26525
|
+
// top: '0',
|
|
26526
|
+
// bottom: '0',
|
|
26527
|
+
// margin: 'auto',
|
|
26528
|
+
// },
|
|
26529
|
+
// '&[dir=ltr]::before': {
|
|
26530
|
+
// transform: 'translate(-50%, 0) rotate(-135deg)',
|
|
26531
|
+
// },
|
|
26532
|
+
// '&[dir=rtl]::before': {
|
|
26533
|
+
// transform: 'translate(-50%, 0) rotate(-45deg)',
|
|
26534
|
+
// },
|
|
26535
|
+
// '&::after': {
|
|
26536
|
+
// left: arrowGap * -1,
|
|
26537
|
+
// top: '0',
|
|
26538
|
+
// bottom: '0',
|
|
26539
|
+
// content: '" "',
|
|
26540
|
+
// display: 'block',
|
|
26541
|
+
// width: arrowGap,
|
|
26542
|
+
// position: 'absolute',
|
|
26543
|
+
// },
|
|
26524
26544
|
}
|
|
26545
|
+
// '&&[data-soui-position$="-left"]::before': { left: arrowMargin, right: 'auto' },
|
|
26546
|
+
// '&&[data-soui-position$="-right"]::before': { right: arrowMargin, left: 'auto' },
|
|
26547
|
+
// '&&[data-soui-position$="-top"]::before': { top: arrowMargin, bottom: 'auto' },
|
|
26548
|
+
// '&&[data-soui-position$="-bottom"]::before': { bottom: arrowMargin, top: 'auto' },
|
|
26525
26549
|
},
|
|
26526
26550
|
wrapperOpen: {
|
|
26527
26551
|
display: 'block',
|
|
@@ -26541,6 +26565,12 @@ var tooltipStyle = objectSpread2_default()(objectSpread2_default()({}, tooltip_a
|
|
|
26541
26565
|
target: {
|
|
26542
26566
|
display: 'inline-block'
|
|
26543
26567
|
},
|
|
26568
|
+
arrow: {
|
|
26569
|
+
// before
|
|
26570
|
+
'&::before': {
|
|
26571
|
+
content: "''"
|
|
26572
|
+
}
|
|
26573
|
+
},
|
|
26544
26574
|
content: {
|
|
26545
26575
|
padding: "".concat(src.tooltipPaddingY, " ").concat(src.tooltipPaddingX),
|
|
26546
26576
|
fontSize: src.tooltipFontSize
|
|
@@ -28772,6 +28802,10 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
28772
28802
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
28773
28803
|
style = _useState2[0],
|
|
28774
28804
|
setStyle = _useState2[1];
|
|
28805
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({}),
|
|
28806
|
+
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
28807
|
+
arrayStyle = _useState4[0],
|
|
28808
|
+
setArrayStyle = _useState4[1];
|
|
28775
28809
|
var _React$useRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef({
|
|
28776
28810
|
element: null,
|
|
28777
28811
|
containerRect: {
|
|
@@ -28845,10 +28879,12 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
28845
28879
|
};
|
|
28846
28880
|
};
|
|
28847
28881
|
var getAbsolutePositionStyle = function getAbsolutePositionStyle(rect, position) {
|
|
28882
|
+
var _popupElRef$current;
|
|
28848
28883
|
var style = {
|
|
28849
28884
|
position: 'absolute',
|
|
28850
28885
|
zIndex: zIndex
|
|
28851
28886
|
};
|
|
28887
|
+
var arrayStyle = {};
|
|
28852
28888
|
if (fixedWidth) {
|
|
28853
28889
|
var widthKey = fixedWidth === 'min' ? 'minWidth' : 'width';
|
|
28854
28890
|
style[widthKey] = rect.width;
|
|
@@ -28858,6 +28894,7 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
28858
28894
|
var containerRect = rootContainer.getBoundingClientRect();
|
|
28859
28895
|
var bodyRect = (document.documentElement || document.body).getBoundingClientRect();
|
|
28860
28896
|
var containerScrollBarWidth = rootContainer.offsetWidth - rootContainer.clientWidth;
|
|
28897
|
+
var targetRect = (_popupElRef$current = popupElRef.current) === null || _popupElRef$current === void 0 ? void 0 : _popupElRef$current.getBoundingClientRect();
|
|
28861
28898
|
var containerScroll = {
|
|
28862
28899
|
left: rootContainer.scrollLeft,
|
|
28863
28900
|
top: rootContainer.scrollTop
|
|
@@ -28874,14 +28911,25 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
28874
28911
|
if (h === 'left') {
|
|
28875
28912
|
style.left = rect.left - containerRect.left + containerScroll.left;
|
|
28876
28913
|
style.transform = '';
|
|
28914
|
+
arrayStyle.left = "8px";
|
|
28877
28915
|
if (adjust) {
|
|
28878
28916
|
overRight = rect.left + context.popUpWidth - bodyRect.right + containerScrollBarWidth;
|
|
28917
|
+
if (style.left < 0 && targetRect) {
|
|
28918
|
+
style.left = 'auto';
|
|
28919
|
+
}
|
|
28879
28920
|
}
|
|
28880
28921
|
} else if (h === 'right') {
|
|
28881
28922
|
style.right = containerRect.right - rect.right + containerScrollBarWidth - containerScroll.left;
|
|
28882
28923
|
style.left = 'auto';
|
|
28883
28924
|
style.transform = '';
|
|
28884
|
-
|
|
28925
|
+
arrayStyle.right = "8px";
|
|
28926
|
+
if (adjust) {
|
|
28927
|
+
overLeft = bodyRect.left - (rect.right - context.popUpWidth);
|
|
28928
|
+
if (style.right < 0 && targetRect) {
|
|
28929
|
+
style.left = bodyRect.width - targetRect.width;
|
|
28930
|
+
style.right = 'auto';
|
|
28931
|
+
}
|
|
28932
|
+
}
|
|
28885
28933
|
} else {
|
|
28886
28934
|
// 居中对齐
|
|
28887
28935
|
style.left = rect.left + rect.width / 2 - containerRect.left + containerScroll.left;
|
|
@@ -28890,6 +28938,9 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
28890
28938
|
overRight = rect.left + rect.width / 2 + context.popUpWidth / 2 - bodyRect.width + containerScrollBarWidth;
|
|
28891
28939
|
overLeft = bodyRect.left - (rect.left + rect.width / 2 - context.popUpWidth / 2);
|
|
28892
28940
|
}
|
|
28941
|
+
if (targetRect) {
|
|
28942
|
+
arrayStyle.left = "".concat(targetRect.width / 2 - 5.9, "px");
|
|
28943
|
+
}
|
|
28893
28944
|
}
|
|
28894
28945
|
if (adjust) {
|
|
28895
28946
|
// 调节左右溢出
|
|
@@ -28898,16 +28949,26 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
28898
28949
|
style.left -= overRight;
|
|
28899
28950
|
// 扣除触发器距离页面右侧的距离,以保证从右侧弹出的窗口最右边对齐触发器最右边
|
|
28900
28951
|
style.left -= toRightDistance;
|
|
28952
|
+
if (targetRect) {
|
|
28953
|
+
arrayStyle.left = "".concat((targetRect === null || targetRect === void 0 ? void 0 : targetRect.width) - context.parentRect.width / 2 - 5.9, "px");
|
|
28954
|
+
}
|
|
28901
28955
|
}
|
|
28902
28956
|
if (overLeft > 0) {
|
|
28903
28957
|
style.left += overLeft;
|
|
28958
|
+
arrayStyle.left = "".concat(rect.width / 2 - 5.9, "px");
|
|
28904
28959
|
}
|
|
28905
28960
|
}
|
|
28906
28961
|
if (v === 'bottom') {
|
|
28907
28962
|
style.top = rect.bottom - containerRect.top + containerScroll.top + popupGap;
|
|
28963
|
+
if (targetRect) {
|
|
28964
|
+
arrayStyle.top = "".concat(0, "px");
|
|
28965
|
+
}
|
|
28908
28966
|
} else {
|
|
28909
28967
|
style.top = rect.top - containerRect.top + containerScroll.top - popupGap;
|
|
28910
28968
|
style.transform += 'translateY(-100%)';
|
|
28969
|
+
if (targetRect) {
|
|
28970
|
+
arrayStyle.top = "".concat(targetRect.height - 5.9 - 4, "px");
|
|
28971
|
+
}
|
|
28911
28972
|
}
|
|
28912
28973
|
} else if (horizontalPosition.includes(targetPosition)) {
|
|
28913
28974
|
var _targetPosition$split3 = targetPosition.split('-'),
|
|
@@ -28917,45 +28978,88 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
28917
28978
|
if (_v === 'top') {
|
|
28918
28979
|
style.top = rect.top - containerRect.top + containerScroll.top;
|
|
28919
28980
|
style.transform = '';
|
|
28981
|
+
arrayStyle.top = "8px";
|
|
28920
28982
|
} else if (_v === 'bottom') {
|
|
28921
28983
|
style.top = rect.bottom - containerRect.top + containerScroll.top;
|
|
28984
|
+
arrayStyle.bottom = "8px";
|
|
28922
28985
|
style.transform = 'translateY(-100%)';
|
|
28923
28986
|
} else {
|
|
28924
28987
|
// 居中对齐
|
|
28925
28988
|
style.top = rect.top - containerRect.top + containerScroll.top + rect.height / 2;
|
|
28989
|
+
if (targetRect) {
|
|
28990
|
+
arrayStyle.top = "".concat(targetRect.height / 2 - 5.9 / 2, "px");
|
|
28991
|
+
}
|
|
28926
28992
|
style.transform = 'translateY(-50%)';
|
|
28927
28993
|
}
|
|
28928
28994
|
if (_h === 'right') {
|
|
28929
28995
|
style.left = rect.right - containerRect.left + containerScroll.left + popupGap;
|
|
28930
28996
|
} else {
|
|
28931
28997
|
style.left = rect.left - containerRect.left + containerScroll.left - popupGap;
|
|
28998
|
+
arrayStyle.right = "0px";
|
|
28932
28999
|
style.transform += ' translateX(-100%)';
|
|
28933
29000
|
}
|
|
28934
29001
|
} else if (position === 'cover') {
|
|
28935
29002
|
style.top = rect.top - containerRect.top + containerScroll.top;
|
|
28936
29003
|
style.left = rect.left - containerRect.left + containerScroll.left;
|
|
28937
29004
|
}
|
|
28938
|
-
return
|
|
29005
|
+
return {
|
|
29006
|
+
style: style,
|
|
29007
|
+
arrayStyle: arrayStyle
|
|
29008
|
+
};
|
|
28939
29009
|
};
|
|
28940
29010
|
var getAbsoluteStyle = function getAbsoluteStyle(position) {
|
|
28941
|
-
if (!parentElRef.current) return
|
|
29011
|
+
if (!parentElRef.current) return {
|
|
29012
|
+
style: hideStyle
|
|
29013
|
+
};
|
|
28942
29014
|
var rect = context.parentRect;
|
|
28943
29015
|
if (scrollElRef !== null && scrollElRef !== void 0 && scrollElRef.current) {
|
|
28944
29016
|
var _scrollElRef$current;
|
|
28945
29017
|
var visibleRect = ((_scrollElRef$current = scrollElRef.current) === null || _scrollElRef$current === void 0 ? void 0 : _scrollElRef$current.getBoundingClientRect()) || {};
|
|
28946
29018
|
if (rect.bottom < visibleRect.top || rect.top > visibleRect.bottom || rect.right < visibleRect.left || rect.left > visibleRect.right) {
|
|
28947
|
-
return
|
|
29019
|
+
return {
|
|
29020
|
+
style: hideStyle
|
|
29021
|
+
};
|
|
28948
29022
|
}
|
|
28949
29023
|
}
|
|
28950
|
-
var
|
|
28951
|
-
|
|
29024
|
+
var _getAbsolutePositionS = getAbsolutePositionStyle(rect, position),
|
|
29025
|
+
style = _getAbsolutePositionS.style,
|
|
29026
|
+
arrayStyle = _getAbsolutePositionS.arrayStyle;
|
|
29027
|
+
|
|
29028
|
+
// TODO: 如果是版本大于chrome128,需要根据currentCSSZoom处理chrome的bug
|
|
29029
|
+
if (!isChromeLowerThan(128)) {
|
|
29030
|
+
// @ts-ignore currentCSSZoom
|
|
29031
|
+
var currentCSSZoom = document.body.currentCSSZoom;
|
|
29032
|
+
if (currentCSSZoom === 1 || !currentCSSZoom) return {
|
|
29033
|
+
style: style,
|
|
29034
|
+
arrayStyle: arrayStyle
|
|
29035
|
+
};
|
|
29036
|
+
if (style.left && typeof style.left === 'number') {
|
|
29037
|
+
style.left = style.left * (1 / currentCSSZoom);
|
|
29038
|
+
}
|
|
29039
|
+
if (style.top && typeof style.top === 'number') {
|
|
29040
|
+
style.top = style.top * (1 / currentCSSZoom);
|
|
29041
|
+
}
|
|
29042
|
+
if (style.right && typeof style.right === 'number') {
|
|
29043
|
+
style.right = style.right * (1 / currentCSSZoom);
|
|
29044
|
+
}
|
|
29045
|
+
if (style.bottom && typeof style.bottom === 'number') {
|
|
29046
|
+
style.bottom = style.bottom * (1 / currentCSSZoom);
|
|
29047
|
+
}
|
|
29048
|
+
}
|
|
29049
|
+
return {
|
|
29050
|
+
style: style,
|
|
29051
|
+
arrayStyle: arrayStyle
|
|
29052
|
+
};
|
|
28952
29053
|
};
|
|
28953
29054
|
var getStyle = function getStyle() {
|
|
28954
29055
|
var newStyle = {};
|
|
29056
|
+
var newArrayStyle = {};
|
|
28955
29057
|
var _ref2 = config || {},
|
|
28956
29058
|
position = _ref2.position,
|
|
28957
29059
|
absolute = _ref2.absolute;
|
|
28958
|
-
if (!position || !show || !parentElRef.current) return
|
|
29060
|
+
if (!position || !show || !parentElRef.current) return {
|
|
29061
|
+
newStyle: style
|
|
29062
|
+
};
|
|
28959
29063
|
context.parentRect = parentElRef.current.getBoundingClientRect();
|
|
28960
29064
|
if (adjust) {
|
|
28961
29065
|
var popupInfo = getPopUpInfo(context.parentRect);
|
|
@@ -28970,22 +29074,35 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
28970
29074
|
fixedWidth: fixedWidth
|
|
28971
29075
|
});
|
|
28972
29076
|
} else {
|
|
28973
|
-
|
|
29077
|
+
var _ref3 = getAbsoluteStyle(realPosition),
|
|
29078
|
+
nextStyle = _ref3.style,
|
|
29079
|
+
nextArrayStyle = _ref3.arrayStyle;
|
|
29080
|
+
newStyle = nextStyle;
|
|
29081
|
+
newArrayStyle = nextArrayStyle;
|
|
28974
29082
|
}
|
|
28975
29083
|
// for animation
|
|
28976
29084
|
if (realPosition.indexOf('top') === 0) {
|
|
28977
29085
|
newStyle.transformOrigin = 'center bottom';
|
|
28978
29086
|
}
|
|
28979
|
-
return
|
|
29087
|
+
return {
|
|
29088
|
+
newStyle: newStyle,
|
|
29089
|
+
newArrayStyle: newArrayStyle
|
|
29090
|
+
};
|
|
28980
29091
|
};
|
|
28981
29092
|
var updateStyle = use_persist_fn(function () {
|
|
28982
|
-
var
|
|
29093
|
+
var _getStyle = getStyle(),
|
|
29094
|
+
newStyle = _getStyle.newStyle,
|
|
29095
|
+
newArrayStyle = _getStyle.newArrayStyle;
|
|
28983
29096
|
if (newStyle && !shallow_equal(style, newStyle)) {
|
|
28984
29097
|
setStyle(newStyle);
|
|
29098
|
+
setArrayStyle(newArrayStyle || {});
|
|
28985
29099
|
}
|
|
28986
29100
|
});
|
|
28987
29101
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(updateStyle, [show, position, absolute, updateKey, fixedWidth]);
|
|
28988
|
-
return
|
|
29102
|
+
return {
|
|
29103
|
+
style: style,
|
|
29104
|
+
arrayStyle: arrayStyle
|
|
29105
|
+
};
|
|
28989
29106
|
};
|
|
28990
29107
|
/* harmony default export */ var use_position_style = ((/* unused pure expression or super */ null && (usePositionStyle)));
|
|
28991
29108
|
// EXTERNAL MODULE: external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom"}
|
|
@@ -29630,6 +29747,7 @@ var AbsoluteList = function AbsoluteList(props) {
|
|
|
29630
29747
|
_props$zIndex = props.zIndex,
|
|
29631
29748
|
zIndex = _props$zIndex === void 0 ? 1051 : _props$zIndex,
|
|
29632
29749
|
focus = props.focus,
|
|
29750
|
+
arrowRef = props.arrowRef,
|
|
29633
29751
|
popupElRef = props.popupElRef,
|
|
29634
29752
|
updateKey = props.updateKey,
|
|
29635
29753
|
popupGap = props.popupGap,
|
|
@@ -29648,23 +29766,33 @@ var AbsoluteList = function AbsoluteList(props) {
|
|
|
29648
29766
|
rendered: false
|
|
29649
29767
|
}),
|
|
29650
29768
|
context = _useRef.current;
|
|
29651
|
-
var
|
|
29652
|
-
|
|
29653
|
-
|
|
29654
|
-
|
|
29655
|
-
|
|
29656
|
-
|
|
29657
|
-
|
|
29658
|
-
|
|
29659
|
-
|
|
29660
|
-
|
|
29661
|
-
|
|
29662
|
-
|
|
29663
|
-
|
|
29664
|
-
|
|
29769
|
+
var _usePositionStyle = usePositionStyle({
|
|
29770
|
+
getContainer: getRoot,
|
|
29771
|
+
position: position,
|
|
29772
|
+
absolute: !!absolute,
|
|
29773
|
+
parentElRef: parentElRef,
|
|
29774
|
+
show: focus,
|
|
29775
|
+
fixedWidth: fixedWidth,
|
|
29776
|
+
zIndex: zIndex,
|
|
29777
|
+
scrollElRef: scrollElRef,
|
|
29778
|
+
popupElRef: popupElRef,
|
|
29779
|
+
updateKey: updateKey,
|
|
29780
|
+
popupGap: popupGap,
|
|
29781
|
+
adjust: adjust
|
|
29782
|
+
}),
|
|
29783
|
+
style = _usePositionStyle.style,
|
|
29784
|
+
arrayStyle = _usePositionStyle.arrayStyle;
|
|
29665
29785
|
var childStyle = children.props.style;
|
|
29666
29786
|
var newStyle = objectSpread2_default()(objectSpread2_default()({}, style), childStyle);
|
|
29667
29787
|
if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(children) === false) return null;
|
|
29788
|
+
if (arrowRef && arrayStyle && Object.keys(arrayStyle).length > 0) {
|
|
29789
|
+
Object.keys(arrayStyle).forEach(function (key) {
|
|
29790
|
+
if (arrowRef.current) {
|
|
29791
|
+
// @ts-ignore
|
|
29792
|
+
arrowRef.current.style[key] = arrayStyle[key];
|
|
29793
|
+
}
|
|
29794
|
+
});
|
|
29795
|
+
}
|
|
29668
29796
|
var styledChild = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, {
|
|
29669
29797
|
style: newStyle
|
|
29670
29798
|
});
|
|
@@ -29778,6 +29906,7 @@ var getMenuPosition = function getMenuPosition(target) {
|
|
|
29778
29906
|
};
|
|
29779
29907
|
var getPopoverPosition = function getPopoverPosition(target) {
|
|
29780
29908
|
var priorityDirection = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'vertical';
|
|
29909
|
+
var popup = arguments.length > 2 ? arguments[2] : undefined;
|
|
29781
29910
|
var position = 'bottom-left';
|
|
29782
29911
|
if (!target) return position;
|
|
29783
29912
|
var rect = target.getBoundingClientRect();
|
|
@@ -29799,11 +29928,24 @@ var getPopoverPosition = function getPopoverPosition(target) {
|
|
|
29799
29928
|
position += '-top';
|
|
29800
29929
|
}
|
|
29801
29930
|
} else {
|
|
29931
|
+
var popupRect = popup === null || popup === void 0 ? void 0 : popup.getBoundingClientRect();
|
|
29802
29932
|
if (verticalPoint > windowHeight / 2) position = 'top';else position = 'bottom';
|
|
29803
|
-
|
|
29804
|
-
|
|
29805
|
-
|
|
29806
|
-
|
|
29933
|
+
|
|
29934
|
+
// 如果渲染了弹出内容,则根据弹出内容宽度计算是否自动调整位置
|
|
29935
|
+
if (popupRect) {
|
|
29936
|
+
if ((popupRect === null || popupRect === void 0 ? void 0 : popupRect.width) / 2 > rect.left) {
|
|
29937
|
+
position += '-left';
|
|
29938
|
+
}
|
|
29939
|
+
if ((popupRect === null || popupRect === void 0 ? void 0 : popupRect.width) / 2 > windowWidth - rect.right) {
|
|
29940
|
+
position += '-right';
|
|
29941
|
+
}
|
|
29942
|
+
} else {
|
|
29943
|
+
// 兜底计算
|
|
29944
|
+
if (horizontalPoint > windowWidth * 0.6) {
|
|
29945
|
+
position += '-right';
|
|
29946
|
+
} else if (horizontalPoint < windowWidth * 0.4) {
|
|
29947
|
+
position += '-left';
|
|
29948
|
+
}
|
|
29807
29949
|
}
|
|
29808
29950
|
}
|
|
29809
29951
|
return position;
|
|
@@ -29811,7 +29953,8 @@ var getPopoverPosition = function getPopoverPosition(target) {
|
|
|
29811
29953
|
var getPosition = function getPosition(target) {
|
|
29812
29954
|
var priorityDirection = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'vertical';
|
|
29813
29955
|
var mode = arguments.length > 2 ? arguments[2] : undefined;
|
|
29814
|
-
|
|
29956
|
+
var popup = arguments.length > 3 ? arguments[3] : undefined;
|
|
29957
|
+
if (mode === 'popover') return getPopoverPosition(target, priorityDirection, popup);
|
|
29815
29958
|
if (mode === 'menu') return getMenuPosition(target, priorityDirection);
|
|
29816
29959
|
return 'bottom-left';
|
|
29817
29960
|
};
|
|
@@ -29853,6 +29996,7 @@ var usePopup = function usePopup(props) {
|
|
|
29853
29996
|
removeChild = _useContext.removeChild;
|
|
29854
29997
|
var targetRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
29855
29998
|
var popupRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
29999
|
+
var arrowRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
29856
30000
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
29857
30001
|
bindChild(popupRef);
|
|
29858
30002
|
return function () {
|
|
@@ -29884,11 +30028,12 @@ var usePopup = function usePopup(props) {
|
|
|
29884
30028
|
setPositionState = _useState4[1];
|
|
29885
30029
|
var position = isPositionControl ? props.position : positionState;
|
|
29886
30030
|
var updatePosition = use_persist_fn(function () {
|
|
29887
|
-
if (isPositionControl) return;
|
|
29888
|
-
if (props.position === 'auto' || !props.position) {
|
|
29889
|
-
|
|
30031
|
+
// if (isPositionControl) return;
|
|
30032
|
+
// if (props.position === 'auto' || !props.position) {
|
|
30033
|
+
setTimeout(function () {
|
|
30034
|
+
var newPosition = getPosition(targetRef.current, props.priorityDirection, autoMode, popupRef.current || undefined);
|
|
29890
30035
|
if (newPosition !== position) setPositionState(newPosition);
|
|
29891
|
-
}
|
|
30036
|
+
}, 10);
|
|
29892
30037
|
});
|
|
29893
30038
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
29894
30039
|
if (props.open) {
|
|
@@ -30017,6 +30162,7 @@ var usePopup = function usePopup(props) {
|
|
|
30017
30162
|
position: position,
|
|
30018
30163
|
targetRef: targetRef,
|
|
30019
30164
|
popupRef: popupRef,
|
|
30165
|
+
arrowRef: arrowRef,
|
|
30020
30166
|
getTargetProps: getTargetProps,
|
|
30021
30167
|
openPop: openPop,
|
|
30022
30168
|
closePop: closePop,
|
|
@@ -31411,11 +31557,15 @@ var FormFooterProvider = function FormFooterProvider(props) {
|
|
|
31411
31557
|
formStats = _useState2[0],
|
|
31412
31558
|
setFormS = _useState2[1];
|
|
31413
31559
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
31414
|
-
submit: function submit() {}
|
|
31560
|
+
submit: function submit() {},
|
|
31561
|
+
hasSubmit: false
|
|
31415
31562
|
}),
|
|
31416
31563
|
context = _useRef.current;
|
|
31417
31564
|
var setFormInfo = usePersistFn(function (info) {
|
|
31418
|
-
context.
|
|
31565
|
+
if (!context.hasSubmit) {
|
|
31566
|
+
context.submit = info.submit;
|
|
31567
|
+
context.hasSubmit = true;
|
|
31568
|
+
}
|
|
31419
31569
|
});
|
|
31420
31570
|
var setFormStats = usePersistFn(function (disabled) {
|
|
31421
31571
|
if (disabled !== formStats) {
|
|
@@ -36758,7 +36908,7 @@ var ResultInput = function ResultInput(props) {
|
|
|
36758
36908
|
|
|
36759
36909
|
var Done = 2;
|
|
36760
36910
|
var Finish = 0;
|
|
36761
|
-
var
|
|
36911
|
+
var Pending = 1;
|
|
36762
36912
|
var isEmpty = is_isEmpty,
|
|
36763
36913
|
use_tag_isPromise = isPromise,
|
|
36764
36914
|
use_tag_isString = isString,
|
|
@@ -36809,7 +36959,7 @@ var useTag = function useTag(props) {
|
|
|
36809
36959
|
if (typeof onClose === 'function') {
|
|
36810
36960
|
callback = onClose(e);
|
|
36811
36961
|
if (use_tag_isPromise(callback)) {
|
|
36812
|
-
setDismiss(
|
|
36962
|
+
setDismiss(Pending);
|
|
36813
36963
|
callback.then(function () {
|
|
36814
36964
|
setDismiss(Done);
|
|
36815
36965
|
}).catch(function () {
|
|
@@ -36915,7 +37065,7 @@ var tag_excluded = ["jssStyle", "className", "type", "color", "size", "disabled"
|
|
|
36915
37065
|
|
|
36916
37066
|
|
|
36917
37067
|
var tag_Done = 2;
|
|
36918
|
-
var
|
|
37068
|
+
var tag_Pending = 1;
|
|
36919
37069
|
var Tag = function Tag(props) {
|
|
36920
37070
|
var _jssStyle$tag;
|
|
36921
37071
|
var jssStyle = props.jssStyle,
|
|
@@ -36998,7 +37148,7 @@ var Tag = function Tag(props) {
|
|
|
36998
37148
|
if (!showClose) {
|
|
36999
37149
|
return null;
|
|
37000
37150
|
}
|
|
37001
|
-
if (dismiss ===
|
|
37151
|
+
if (dismiss === tag_Pending) {
|
|
37002
37152
|
// 后面用 Spin 替换
|
|
37003
37153
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {});
|
|
37004
37154
|
}
|
|
@@ -37110,7 +37260,7 @@ var More = function More(props) {
|
|
|
37110
37260
|
var before = [];
|
|
37111
37261
|
var after = [];
|
|
37112
37262
|
var itemsLength = 0;
|
|
37113
|
-
var
|
|
37263
|
+
var tagStyle = shouldShowMore ? {
|
|
37114
37264
|
position: 'absolute',
|
|
37115
37265
|
zIndex: -100,
|
|
37116
37266
|
userSelect: 'none',
|
|
@@ -37158,7 +37308,7 @@ var More = function More(props) {
|
|
|
37158
37308
|
className: styles.tag,
|
|
37159
37309
|
jssStyle: jssStyle,
|
|
37160
37310
|
size: size,
|
|
37161
|
-
style:
|
|
37311
|
+
style: tagStyle,
|
|
37162
37312
|
mode: visible ? 'fill' : 'bright',
|
|
37163
37313
|
color: visible ? 'info' : 'default',
|
|
37164
37314
|
children: shouldShowMore ? '+' : "+".concat(itemsLength)
|
|
@@ -37797,8 +37947,8 @@ var Cascader = function Cascader(props0) {
|
|
|
37797
37947
|
return;
|
|
37798
37948
|
}
|
|
37799
37949
|
};
|
|
37800
|
-
var handleChange = function handleChange(item) {
|
|
37801
|
-
onChange === null || onChange === void 0 || onChange(item);
|
|
37950
|
+
var handleChange = function handleChange(item, selectId) {
|
|
37951
|
+
onChange === null || onChange === void 0 || onChange(item, selectId);
|
|
37802
37952
|
};
|
|
37803
37953
|
var handleClear = function handleClear(e) {
|
|
37804
37954
|
e.stopPropagation();
|
|
@@ -38752,11 +38902,11 @@ function useFormControl(props) {
|
|
|
38752
38902
|
if (inForm && controlFunc) {
|
|
38753
38903
|
if (isArray(name)) {
|
|
38754
38904
|
name.forEach(function (n) {
|
|
38755
|
-
controlFunc.unbind(n, reserveAble);
|
|
38905
|
+
controlFunc.unbind(n, reserveAble, validateFiled, update);
|
|
38756
38906
|
updateError(n, undefined);
|
|
38757
38907
|
});
|
|
38758
38908
|
} else {
|
|
38759
|
-
controlFunc.unbind(name, reserveAble);
|
|
38909
|
+
controlFunc.unbind(name, reserveAble, validateFiled, update);
|
|
38760
38910
|
updateError(name, undefined);
|
|
38761
38911
|
}
|
|
38762
38912
|
}
|
|
@@ -39223,6 +39373,10 @@ var checkbox_group_Group = function Group(props0) {
|
|
|
39223
39373
|
} else {
|
|
39224
39374
|
datum.remove(raw);
|
|
39225
39375
|
}
|
|
39376
|
+
if (children && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(children)) {
|
|
39377
|
+
var _children$props$onCha, _children$props;
|
|
39378
|
+
(_children$props$onCha = (_children$props = children.props).onChange) === null || _children$props$onCha === void 0 || _children$props$onCha.call(_children$props, _, checked, children.props.htmlValue);
|
|
39379
|
+
}
|
|
39226
39380
|
});
|
|
39227
39381
|
var isChecked = usePersistFn(function (d) {
|
|
39228
39382
|
return datum.check(d);
|
|
@@ -40642,11 +40796,12 @@ function clearHMS(date, options) {
|
|
|
40642
40796
|
function compareDateArray(arr1, arr2) {
|
|
40643
40797
|
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'date';
|
|
40644
40798
|
var options = arguments.length > 3 ? arguments[3] : undefined;
|
|
40799
|
+
var fmt = arguments.length > 4 ? arguments[4] : undefined;
|
|
40645
40800
|
if (!arr1 || !arr2 || arr1.length !== arr2.length) return false;
|
|
40646
40801
|
return arr1.every(function (v, i) {
|
|
40647
40802
|
if (!v || !arr2[i]) return false;
|
|
40648
40803
|
if (type === 'week') return format(v, 'gggg ww', options) === format(arr2[i], 'gggg ww', options);
|
|
40649
|
-
return v.getTime() === arr2[i].getTime();
|
|
40804
|
+
return toDateWithFormat(v, fmt).getTime() === toDateWithFormat(arr2[i], fmt).getTime();
|
|
40650
40805
|
});
|
|
40651
40806
|
}
|
|
40652
40807
|
function getFormat(fo) {
|
|
@@ -40928,7 +41083,7 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
|
40928
41083
|
var handleClear = usePersistFn(function (e) {
|
|
40929
41084
|
var _props$onClear;
|
|
40930
41085
|
if (!clearable) return;
|
|
40931
|
-
e.stopPropagation();
|
|
41086
|
+
e === null || e === void 0 || e.stopPropagation();
|
|
40932
41087
|
if (disabledStatus === 'all') return;
|
|
40933
41088
|
if (edit) {
|
|
40934
41089
|
if (range) {
|
|
@@ -40942,7 +41097,7 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
|
40942
41097
|
}
|
|
40943
41098
|
} else {
|
|
40944
41099
|
var _props$onChange;
|
|
40945
|
-
var emptyValue = props.clearWithUndefined ? undefined : '';
|
|
41100
|
+
var emptyValue = props.clearWithUndefined || props.clearToUndefined ? undefined : '';
|
|
40946
41101
|
var v = emptyValue;
|
|
40947
41102
|
if (range) {
|
|
40948
41103
|
v = [emptyValue, emptyValue];
|
|
@@ -40951,6 +41106,8 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
|
40951
41106
|
v = [props.value[0], emptyValue];
|
|
40952
41107
|
} else if (props.value[1] && disabledStatus === 'right') {
|
|
40953
41108
|
v = [emptyValue, props.value[1]];
|
|
41109
|
+
} else if (props.clearToUndefined) {
|
|
41110
|
+
v = undefined;
|
|
40954
41111
|
}
|
|
40955
41112
|
}
|
|
40956
41113
|
}
|
|
@@ -41116,11 +41273,11 @@ var useDate = function useDate(props) {
|
|
|
41116
41273
|
var getDateWithTime = function getDateWithTime(date) {
|
|
41117
41274
|
return util.getDateWithTime(date, props.value, props.defaultTime, props.min, props.max, options);
|
|
41118
41275
|
};
|
|
41119
|
-
var handleDayClick = function handleDayClick(date) {
|
|
41276
|
+
var handleDayClick = function handleDayClick(date, noClose) {
|
|
41120
41277
|
var _props$onChange;
|
|
41121
41278
|
if (isDisabled(date)) return;
|
|
41122
41279
|
var newDate = getDateWithTime(date);
|
|
41123
|
-
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, newDate);
|
|
41280
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, newDate, noClose);
|
|
41124
41281
|
setCurrent(newDate);
|
|
41125
41282
|
};
|
|
41126
41283
|
var getTimeStr = function getTimeStr() {
|
|
@@ -41389,6 +41546,49 @@ var useTime = function useTime(props) {
|
|
|
41389
41546
|
};
|
|
41390
41547
|
};
|
|
41391
41548
|
/* harmony default export */ var use_time = (useTime);
|
|
41549
|
+
;// CONCATENATED MODULE: ../base/src/link/link.tsx
|
|
41550
|
+
|
|
41551
|
+
|
|
41552
|
+
|
|
41553
|
+
var link_excluded = ["jssStyle", "className", "type", "underline", "disabled", "size", "icon", "href", "target", "children"];
|
|
41554
|
+
// import { } from '@sheinx/hooks';
|
|
41555
|
+
|
|
41556
|
+
|
|
41557
|
+
// import from icons
|
|
41558
|
+
|
|
41559
|
+
|
|
41560
|
+
|
|
41561
|
+
var Link = function Link(props) {
|
|
41562
|
+
var _jssStyle$link;
|
|
41563
|
+
var jssStyle = props.jssStyle,
|
|
41564
|
+
className = props.className,
|
|
41565
|
+
_props$type = props.type,
|
|
41566
|
+
type = _props$type === void 0 ? 'primary' : _props$type,
|
|
41567
|
+
underline = props.underline,
|
|
41568
|
+
disabled = props.disabled,
|
|
41569
|
+
size = props.size,
|
|
41570
|
+
icon = props.icon,
|
|
41571
|
+
href = props.href,
|
|
41572
|
+
target = props.target,
|
|
41573
|
+
children = props.children,
|
|
41574
|
+
restProps = objectWithoutProperties_default()(props, link_excluded);
|
|
41575
|
+
var linkClasses = (jssStyle === null || jssStyle === void 0 || (_jssStyle$link = jssStyle.link) === null || _jssStyle$link === void 0 ? void 0 : _jssStyle$link.call(jssStyle)) || {};
|
|
41576
|
+
var rootClass = classnames_default()(className, linkClasses.wrapper, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, linkClasses.underline, underline === true), linkClasses.underlineHover, underline === 'hover'), linkClasses.disabled, disabled), linkClasses.sizeSmall, size === 'small'), linkClasses.sizeLarge, size === 'large'), linkClasses.primary, type === 'primary'), linkClasses.secondary, type === 'secondary'), linkClasses.danger, type === 'danger'), linkClasses.warning, type === 'warning'), linkClasses.success, type === 'success'));
|
|
41577
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("a", objectSpread2_default()(objectSpread2_default()({
|
|
41578
|
+
href: disabled ? undefined : href,
|
|
41579
|
+
target: target,
|
|
41580
|
+
className: rootClass
|
|
41581
|
+
}, restProps), {}, {
|
|
41582
|
+
children: [typeof icon === 'boolean' && icon && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
41583
|
+
className: linkClasses.icon,
|
|
41584
|
+
children: icons_config.link.prefixIcon
|
|
41585
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(icon) && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
41586
|
+
className: linkClasses.icon,
|
|
41587
|
+
children: icon
|
|
41588
|
+
}), children]
|
|
41589
|
+
}));
|
|
41590
|
+
};
|
|
41591
|
+
/* harmony default export */ var base_src_link_link = (Link);
|
|
41392
41592
|
;// CONCATENATED MODULE: ../base/src/date-picker/pickerTitle.tsx
|
|
41393
41593
|
|
|
41394
41594
|
|
|
@@ -41408,6 +41608,31 @@ var PickerTitle = function PickerTitle(props) {
|
|
|
41408
41608
|
});
|
|
41409
41609
|
};
|
|
41410
41610
|
/* harmony default export */ var pickerTitle = (PickerTitle);
|
|
41611
|
+
;// CONCATENATED MODULE: ../base/src/date-picker/confirm.tsx
|
|
41612
|
+
|
|
41613
|
+
|
|
41614
|
+
|
|
41615
|
+
|
|
41616
|
+
var Confirm = function Confirm(props) {
|
|
41617
|
+
var _jssStyle$datePicker;
|
|
41618
|
+
var jssStyle = props.jssStyle,
|
|
41619
|
+
closeByConfirm = props.closeByConfirm;
|
|
41620
|
+
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$datePicker = jssStyle.datePicker) === null || _jssStyle$datePicker === void 0 ? void 0 : _jssStyle$datePicker.call(jssStyle);
|
|
41621
|
+
var _useConfig = useConfig(),
|
|
41622
|
+
locale = _useConfig.locale;
|
|
41623
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
41624
|
+
className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterConfirm,
|
|
41625
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button, {
|
|
41626
|
+
size: 'small',
|
|
41627
|
+
type: "primary",
|
|
41628
|
+
jssStyle: jssStyle,
|
|
41629
|
+
className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterBtn,
|
|
41630
|
+
onClick: closeByConfirm,
|
|
41631
|
+
children: getLocale(locale, 'ok')
|
|
41632
|
+
})
|
|
41633
|
+
});
|
|
41634
|
+
};
|
|
41635
|
+
/* harmony default export */ var date_picker_confirm = (Confirm);
|
|
41411
41636
|
;// CONCATENATED MODULE: ../base/src/date-picker/time.tsx
|
|
41412
41637
|
|
|
41413
41638
|
|
|
@@ -41417,6 +41642,7 @@ var PickerTitle = function PickerTitle(props) {
|
|
|
41417
41642
|
|
|
41418
41643
|
|
|
41419
41644
|
|
|
41645
|
+
|
|
41420
41646
|
var TimeScroll = function TimeScroll(props) {
|
|
41421
41647
|
var _jssStyle$datePicker;
|
|
41422
41648
|
var mode = props.mode,
|
|
@@ -41528,21 +41754,26 @@ var Time = function Time(props) {
|
|
|
41528
41754
|
var renderFooter = function renderFooter() {
|
|
41529
41755
|
var showRight = props.showSelNow;
|
|
41530
41756
|
if (!showRight) return null;
|
|
41531
|
-
return /*#__PURE__*/(0,jsx_runtime.
|
|
41757
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
41532
41758
|
className: styles === null || styles === void 0 ? void 0 : styles.pickerFooter,
|
|
41533
41759
|
dir: direction,
|
|
41534
|
-
|
|
41535
|
-
|
|
41536
|
-
|
|
41760
|
+
style: {
|
|
41761
|
+
borderTop: props.needConfirm && props.range ? 'none' : ''
|
|
41762
|
+
},
|
|
41763
|
+
children: [showRight && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
41764
|
+
className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterNow,
|
|
41765
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_link_link, {
|
|
41537
41766
|
size: 'small',
|
|
41538
|
-
mode: "text",
|
|
41539
41767
|
type: "primary",
|
|
41540
41768
|
jssStyle: props.jssStyle,
|
|
41541
41769
|
className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterBtn,
|
|
41542
41770
|
onClick: selNow,
|
|
41543
41771
|
children: getLocale(locale, 'current')
|
|
41544
41772
|
})
|
|
41545
|
-
})
|
|
41773
|
+
}), props.needConfirm && !props.range && /*#__PURE__*/(0,jsx_runtime.jsx)(date_picker_confirm, {
|
|
41774
|
+
closeByConfirm: props.closeByConfirm,
|
|
41775
|
+
jssStyle: props.jssStyle
|
|
41776
|
+
})]
|
|
41546
41777
|
});
|
|
41547
41778
|
};
|
|
41548
41779
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
@@ -41582,6 +41813,7 @@ var Time = function Time(props) {
|
|
|
41582
41813
|
|
|
41583
41814
|
|
|
41584
41815
|
|
|
41816
|
+
|
|
41585
41817
|
var Day = function Day(props) {
|
|
41586
41818
|
var _jssStyle$datePicker;
|
|
41587
41819
|
var jssStyle = props.jssStyle;
|
|
@@ -41590,8 +41822,8 @@ var Day = function Day(props) {
|
|
|
41590
41822
|
direction = _useConfig.direction;
|
|
41591
41823
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$datePicker = jssStyle.datePicker) === null || _jssStyle$datePicker === void 0 ? void 0 : _jssStyle$datePicker.call(jssStyle);
|
|
41592
41824
|
var areaType = props.type === 'week' ? 'week' : 'day';
|
|
41593
|
-
var onChange = usePersistFn(function (date) {
|
|
41594
|
-
props.onChange(date, props.type === 'datetime');
|
|
41825
|
+
var onChange = usePersistFn(function (date, noClose) {
|
|
41826
|
+
props.onChange(date, noClose || props.type === 'datetime');
|
|
41595
41827
|
props.setTarget(undefined);
|
|
41596
41828
|
});
|
|
41597
41829
|
var setCurrent = usePersistFn(function (date) {
|
|
@@ -41621,7 +41853,10 @@ var Day = function Day(props) {
|
|
|
41621
41853
|
var now = new Date();
|
|
41622
41854
|
if (func.isDisabled(now)) return;
|
|
41623
41855
|
props.setCurrent(new Date(), areaType);
|
|
41624
|
-
props.onChange(new Date(), props.type === 'datetime');
|
|
41856
|
+
props.onChange(new Date(), props.needConfirm || props.type === 'datetime');
|
|
41857
|
+
setTimeout(function () {
|
|
41858
|
+
if (props.closeByConfirm && !props.range) props.closeByConfirm();
|
|
41859
|
+
}, 0);
|
|
41625
41860
|
};
|
|
41626
41861
|
var renderDay = function renderDay(item, index) {
|
|
41627
41862
|
var isActive = func.isActive(item);
|
|
@@ -41633,7 +41868,12 @@ var Day = function Day(props) {
|
|
|
41633
41868
|
dir: direction,
|
|
41634
41869
|
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerCell, isActive && (styles === null || styles === void 0 ? void 0 : styles.pickerCellActive), !isCurrentMonth && (styles === null || styles === void 0 ? void 0 : styles.pickerCellBound), isDisabled && (styles === null || styles === void 0 ? void 0 : styles.pickerCellDisabled), isToday && (styles === null || styles === void 0 ? void 0 : styles.pickerCellToday), isInRange && (styles === null || styles === void 0 ? void 0 : styles.pickerCellInRange), (isInRange === 'start' || isInRange === 'start-end') && props.position === 'start' && (styles === null || styles === void 0 ? void 0 : styles.pickerCellInRangeStart), (isInRange === 'end' || isInRange === 'start-end') && props.position === 'end' && (styles === null || styles === void 0 ? void 0 : styles.pickerCellInRangeEnd)),
|
|
41635
41870
|
onClick: function onClick() {
|
|
41636
|
-
|
|
41871
|
+
if (props.range) {
|
|
41872
|
+
func.handleDayClick(item, props.needConfirm || props.clickTimes < 1);
|
|
41873
|
+
props.setClickTimes(props.clickTimes + 1);
|
|
41874
|
+
} else {
|
|
41875
|
+
func.handleDayClick(item, props.needConfirm);
|
|
41876
|
+
}
|
|
41637
41877
|
},
|
|
41638
41878
|
onDoubleClick: function onDoubleClick() {
|
|
41639
41879
|
var _props$onDoubleClick;
|
|
@@ -41679,7 +41919,6 @@ var Day = function Day(props) {
|
|
|
41679
41919
|
var renderFooter = function renderFooter() {
|
|
41680
41920
|
var _props$rangeDate, _props$rangeDate2;
|
|
41681
41921
|
var showLeft = props.type === 'datetime' && (((_props$rangeDate = props.rangeDate) === null || _props$rangeDate === void 0 ? void 0 : _props$rangeDate[0]) || ((_props$rangeDate2 = props.rangeDate) === null || _props$rangeDate2 === void 0 ? void 0 : _props$rangeDate2[1]));
|
|
41682
|
-
var showRight = props.showSelNow;
|
|
41683
41922
|
var timeStr = func.getTimeStr();
|
|
41684
41923
|
if (!showLeft && !props.showSelNow) return null;
|
|
41685
41924
|
var format = props.format;
|
|
@@ -41690,11 +41929,18 @@ var Day = function Day(props) {
|
|
|
41690
41929
|
// eslint-disable-next-line
|
|
41691
41930
|
if (match) format = match[0];
|
|
41692
41931
|
}
|
|
41932
|
+
var showNeedConfirm = props.needConfirm && !props.range;
|
|
41693
41933
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
41694
41934
|
className: styles === null || styles === void 0 ? void 0 : styles.pickerFooter,
|
|
41695
41935
|
dir: direction,
|
|
41936
|
+
style: {
|
|
41937
|
+
borderTop: props.needConfirm && props.range ? 'none' : ''
|
|
41938
|
+
},
|
|
41696
41939
|
children: [props.type === 'datetime' && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
41697
|
-
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.
|
|
41940
|
+
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerFooterTime, styles === null || styles === void 0 ? void 0 : styles.datetime, !timeStr && (styles === null || styles === void 0 ? void 0 : styles.datetimeHide)),
|
|
41941
|
+
style: {
|
|
41942
|
+
paddingRight: showNeedConfirm ? 0 : undefined
|
|
41943
|
+
},
|
|
41698
41944
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
41699
41945
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
41700
41946
|
children: icons_config.datepicker.Time
|
|
@@ -41706,25 +41952,30 @@ var Day = function Day(props) {
|
|
|
41706
41952
|
children: timeStr
|
|
41707
41953
|
})]
|
|
41708
41954
|
})
|
|
41709
|
-
}),
|
|
41710
|
-
className: styles === null || styles === void 0 ? void 0 : styles.
|
|
41711
|
-
|
|
41712
|
-
|
|
41713
|
-
|
|
41955
|
+
}), props.showSelNow && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
41956
|
+
className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterNow,
|
|
41957
|
+
style: {
|
|
41958
|
+
marginRight: showNeedConfirm ? 'auto' : undefined,
|
|
41959
|
+
paddingLeft: showNeedConfirm ? 6 : undefined
|
|
41960
|
+
},
|
|
41961
|
+
children: [props.showSelNow && props.type === 'date' && /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_link_link, {
|
|
41962
|
+
size: "small",
|
|
41714
41963
|
type: "primary",
|
|
41715
41964
|
jssStyle: jssStyle,
|
|
41716
41965
|
className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterBtn,
|
|
41717
41966
|
onClick: selNow,
|
|
41718
41967
|
children: getLocale(locale, 'now')
|
|
41719
|
-
}), props.showSelNow && props.type === 'datetime' && /*#__PURE__*/(0,jsx_runtime.jsx)(
|
|
41720
|
-
size:
|
|
41721
|
-
mode: "text",
|
|
41968
|
+
}), props.showSelNow && props.type === 'datetime' && /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_link_link, {
|
|
41969
|
+
size: "small",
|
|
41722
41970
|
type: "primary",
|
|
41723
41971
|
jssStyle: jssStyle,
|
|
41724
41972
|
className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterBtn,
|
|
41725
41973
|
onClick: selNow,
|
|
41726
41974
|
children: getLocale(locale, 'current')
|
|
41727
41975
|
})]
|
|
41976
|
+
}), showNeedConfirm && /*#__PURE__*/(0,jsx_runtime.jsx)(date_picker_confirm, {
|
|
41977
|
+
closeByConfirm: props.closeByConfirm,
|
|
41978
|
+
jssStyle: jssStyle
|
|
41728
41979
|
})]
|
|
41729
41980
|
});
|
|
41730
41981
|
};
|
|
@@ -41887,11 +42138,11 @@ var useMonth = function useMonth(props) {
|
|
|
41887
42138
|
var getMonthStr = function getMonthStr(date) {
|
|
41888
42139
|
return util.getDateInfo(date, 'month', options) + 1;
|
|
41889
42140
|
};
|
|
41890
|
-
var handleMonthClick = function handleMonthClick(date) {
|
|
42141
|
+
var handleMonthClick = function handleMonthClick(date, onClose) {
|
|
41891
42142
|
var _props$onChange;
|
|
41892
42143
|
if (isDisabled(date)) return;
|
|
41893
42144
|
var newDate = util.toDate(date);
|
|
41894
|
-
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, newDate);
|
|
42145
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, newDate, onClose);
|
|
41895
42146
|
setCurrent(newDate);
|
|
41896
42147
|
};
|
|
41897
42148
|
var isInRange = function isInRange(date) {
|
|
@@ -41935,6 +42186,7 @@ var useMonth = function useMonth(props) {
|
|
|
41935
42186
|
|
|
41936
42187
|
|
|
41937
42188
|
|
|
42189
|
+
|
|
41938
42190
|
var Month = function Month(props) {
|
|
41939
42191
|
var _jssStyle$datePicker;
|
|
41940
42192
|
var jssStyle = props.jssStyle;
|
|
@@ -41978,7 +42230,7 @@ var Month = function Month(props) {
|
|
|
41978
42230
|
props.setTarget(undefined);
|
|
41979
42231
|
},
|
|
41980
42232
|
onClick: function onClick() {
|
|
41981
|
-
func.handleMonthClick(item);
|
|
42233
|
+
func.handleMonthClick(item, props.needConfirm);
|
|
41982
42234
|
},
|
|
41983
42235
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
41984
42236
|
className: styles === null || styles === void 0 ? void 0 : styles.pickerCellContent,
|
|
@@ -42040,6 +42292,9 @@ var Month = function Month(props) {
|
|
|
42040
42292
|
})
|
|
42041
42293
|
})
|
|
42042
42294
|
})
|
|
42295
|
+
}), props.needConfirm && !props.range && /*#__PURE__*/(0,jsx_runtime.jsx)(date_picker_confirm, {
|
|
42296
|
+
closeByConfirm: props.closeByConfirm,
|
|
42297
|
+
jssStyle: props.jssStyle
|
|
42043
42298
|
})]
|
|
42044
42299
|
});
|
|
42045
42300
|
};
|
|
@@ -42116,11 +42371,11 @@ var useYear = function useYear(props) {
|
|
|
42116
42371
|
var getYearStr = function getYearStr(date) {
|
|
42117
42372
|
return util.getDateInfo(date, 'year', options);
|
|
42118
42373
|
};
|
|
42119
|
-
var handleYearClick = function handleYearClick(date) {
|
|
42374
|
+
var handleYearClick = function handleYearClick(date, noClose) {
|
|
42120
42375
|
var _props$onChange;
|
|
42121
42376
|
if (isDisabled(date)) return;
|
|
42122
42377
|
var newDate = util.toDate(date);
|
|
42123
|
-
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, newDate);
|
|
42378
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, newDate, noClose);
|
|
42124
42379
|
setCurrent(newDate);
|
|
42125
42380
|
};
|
|
42126
42381
|
var isInRange = function isInRange(date) {
|
|
@@ -42167,6 +42422,7 @@ var useYear = function useYear(props) {
|
|
|
42167
42422
|
|
|
42168
42423
|
|
|
42169
42424
|
|
|
42425
|
+
|
|
42170
42426
|
var Year = function Year(props) {
|
|
42171
42427
|
var _jssStyle$datePicker;
|
|
42172
42428
|
var jssStyle = props.jssStyle;
|
|
@@ -42204,7 +42460,7 @@ var Year = function Year(props) {
|
|
|
42204
42460
|
dir: config.direction,
|
|
42205
42461
|
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerCell, func.isActive(item) && (styles === null || styles === void 0 ? void 0 : styles.pickerCellActive), (index === 0 || index === 11) && (styles === null || styles === void 0 ? void 0 : styles.pickerCellBound), isDisabled && (styles === null || styles === void 0 ? void 0 : styles.pickerCellDisabled), func.isNow(item) && (styles === null || styles === void 0 ? void 0 : styles.pickerCellToday), isInRange && (styles === null || styles === void 0 ? void 0 : styles.pickerCellInRange), (isInRange === 'start' || isInRange === 'start-end') && props.position === 'start' && (styles === null || styles === void 0 ? void 0 : styles.pickerCellInRangeStart), (isInRange === 'end' || isInRange === 'start-end') && props.position === 'end' && (styles === null || styles === void 0 ? void 0 : styles.pickerCellInRangeEnd)),
|
|
42206
42462
|
onClick: function onClick() {
|
|
42207
|
-
func.handleYearClick(item);
|
|
42463
|
+
func.handleYearClick(item, props.needConfirm);
|
|
42208
42464
|
},
|
|
42209
42465
|
onMouseEnter: isDisabled ? undefined : function () {
|
|
42210
42466
|
props.setTarget(item);
|
|
@@ -42272,6 +42528,9 @@ var Year = function Year(props) {
|
|
|
42272
42528
|
})
|
|
42273
42529
|
})
|
|
42274
42530
|
})
|
|
42531
|
+
}), props.needConfirm && !props.range && /*#__PURE__*/(0,jsx_runtime.jsx)(date_picker_confirm, {
|
|
42532
|
+
closeByConfirm: props.closeByConfirm,
|
|
42533
|
+
jssStyle: props.jssStyle
|
|
42275
42534
|
})]
|
|
42276
42535
|
});
|
|
42277
42536
|
};
|
|
@@ -42349,11 +42608,11 @@ var useQuarter = function useQuarter(props) {
|
|
|
42349
42608
|
var getQuarterStr = function getQuarterStr(date) {
|
|
42350
42609
|
return util.getDateInfo(date, 'quarter', options);
|
|
42351
42610
|
};
|
|
42352
|
-
var handleQuarterClick = function handleQuarterClick(date) {
|
|
42611
|
+
var handleQuarterClick = function handleQuarterClick(date, noClose) {
|
|
42353
42612
|
var _props$onChange;
|
|
42354
42613
|
if (isDisabled(date)) return;
|
|
42355
42614
|
var newDate = util.toDate(date);
|
|
42356
|
-
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, newDate);
|
|
42615
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, newDate, noClose);
|
|
42357
42616
|
setCurrent(newDate);
|
|
42358
42617
|
};
|
|
42359
42618
|
var isInRange = function isInRange(date) {
|
|
@@ -42397,6 +42656,7 @@ var useQuarter = function useQuarter(props) {
|
|
|
42397
42656
|
|
|
42398
42657
|
|
|
42399
42658
|
|
|
42659
|
+
|
|
42400
42660
|
var Quarter = function Quarter(props) {
|
|
42401
42661
|
var _jssStyle$datePicker;
|
|
42402
42662
|
var jssStyle = props.jssStyle;
|
|
@@ -42429,7 +42689,7 @@ var Quarter = function Quarter(props) {
|
|
|
42429
42689
|
dir: config.direction,
|
|
42430
42690
|
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerCell, func.isActive(item) && (styles === null || styles === void 0 ? void 0 : styles.pickerCellActive), isDisabled && (styles === null || styles === void 0 ? void 0 : styles.pickerCellDisabled), func.isNow(item) && (styles === null || styles === void 0 ? void 0 : styles.pickerCellToday), isInRange && (styles === null || styles === void 0 ? void 0 : styles.pickerCellInRange), (isInRange === 'start' || isInRange === 'start-end') && props.position === 'start' && (styles === null || styles === void 0 ? void 0 : styles.pickerCellInRangeStart), (isInRange === 'end' || isInRange === 'start-end') && props.position === 'end' && (styles === null || styles === void 0 ? void 0 : styles.pickerCellInRangeEnd)),
|
|
42431
42691
|
onClick: function onClick() {
|
|
42432
|
-
func.handleQuarterClick(item);
|
|
42692
|
+
func.handleQuarterClick(item, props.needConfirm);
|
|
42433
42693
|
},
|
|
42434
42694
|
onMouseEnter: isDisabled ? undefined : function () {
|
|
42435
42695
|
props.setTarget(item);
|
|
@@ -42497,6 +42757,9 @@ var Quarter = function Quarter(props) {
|
|
|
42497
42757
|
})
|
|
42498
42758
|
})
|
|
42499
42759
|
})
|
|
42760
|
+
}), props.needConfirm && !props.range && /*#__PURE__*/(0,jsx_runtime.jsx)(date_picker_confirm, {
|
|
42761
|
+
closeByConfirm: props.closeByConfirm,
|
|
42762
|
+
jssStyle: props.jssStyle
|
|
42500
42763
|
})]
|
|
42501
42764
|
});
|
|
42502
42765
|
};
|
|
@@ -42512,10 +42775,15 @@ var Quick = function Quick(props) {
|
|
|
42512
42775
|
quickSelect = props.quickSelect,
|
|
42513
42776
|
format = props.format,
|
|
42514
42777
|
options = props.options,
|
|
42515
|
-
children = props.children
|
|
42778
|
+
children = props.children,
|
|
42779
|
+
type = props.type;
|
|
42516
42780
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$datePicker = jssStyle.datePicker) === null || _jssStyle$datePicker === void 0 ? void 0 : _jssStyle$datePicker.call(jssStyle);
|
|
42517
|
-
var
|
|
42781
|
+
var quickDateCache = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
|
|
42782
|
+
var quickActiveKey = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
|
|
42783
|
+
var handleClick = function handleClick(item, index) {
|
|
42518
42784
|
var itemV = isFunc(item.value) ? item.value() : item.value;
|
|
42785
|
+
quickDateCache.current = itemV;
|
|
42786
|
+
quickActiveKey.current = index;
|
|
42519
42787
|
if (!isArray(itemV)) {
|
|
42520
42788
|
itemV = [itemV];
|
|
42521
42789
|
}
|
|
@@ -42531,13 +42799,23 @@ var Quick = function Quick(props) {
|
|
|
42531
42799
|
if (!(quickSelect !== null && quickSelect !== void 0 && quickSelect.length)) {
|
|
42532
42800
|
return children || null;
|
|
42533
42801
|
}
|
|
42802
|
+
var compareDate = function compareDate(index) {
|
|
42803
|
+
if (!quickDateCache.current) return false;
|
|
42804
|
+
if (index !== quickActiveKey.current) return false;
|
|
42805
|
+
var currentArr = quickDateCache.current;
|
|
42806
|
+
if (!isArray(currentArr)) {
|
|
42807
|
+
currentArr = [currentArr];
|
|
42808
|
+
}
|
|
42809
|
+
return util.compareDateArray(currentArr, props.dateArr, type, options, format);
|
|
42810
|
+
};
|
|
42534
42811
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
42535
42812
|
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.quickPicker, styles === null || styles === void 0 ? void 0 : styles.picker),
|
|
42536
42813
|
children: quickSelect === null || quickSelect === void 0 ? void 0 : quickSelect.map(function (item, index) {
|
|
42814
|
+
var isActive = compareDate(index);
|
|
42537
42815
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
42538
|
-
className: styles === null || styles === void 0 ? void 0 : styles.quickPickerItem,
|
|
42816
|
+
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.quickPickerItem, isActive && (styles === null || styles === void 0 ? void 0 : styles.quickPickerActiveItem)),
|
|
42539
42817
|
onClick: function onClick() {
|
|
42540
|
-
handleClick(item);
|
|
42818
|
+
handleClick(item, index);
|
|
42541
42819
|
},
|
|
42542
42820
|
children: item.name
|
|
42543
42821
|
}, index);
|
|
@@ -42768,6 +43046,7 @@ var useRangePick = function useRangePick(props) {
|
|
|
42768
43046
|
|
|
42769
43047
|
|
|
42770
43048
|
|
|
43049
|
+
|
|
42771
43050
|
var Picker = function Picker(props) {
|
|
42772
43051
|
var _jssStyle$datePicker;
|
|
42773
43052
|
var range = props.range,
|
|
@@ -42775,7 +43054,8 @@ var Picker = function Picker(props) {
|
|
|
42775
43054
|
dateArr = props.dateArr,
|
|
42776
43055
|
options = props.options,
|
|
42777
43056
|
jssStyle = props.jssStyle,
|
|
42778
|
-
isDisabledDate = props.isDisabledDate
|
|
43057
|
+
isDisabledDate = props.isDisabledDate,
|
|
43058
|
+
type = props.type;
|
|
42779
43059
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$datePicker = jssStyle.datePicker) === null || _jssStyle$datePicker === void 0 ? void 0 : _jssStyle$datePicker.call(jssStyle);
|
|
42780
43060
|
var _useDatePickerRange = use_datepicker_range({
|
|
42781
43061
|
type: props.type,
|
|
@@ -42809,6 +43089,9 @@ var Picker = function Picker(props) {
|
|
|
42809
43089
|
var handleLeave = usePersistFn(function () {
|
|
42810
43090
|
props.setActiveIndex(-1);
|
|
42811
43091
|
});
|
|
43092
|
+
var closeByConfirm = function closeByConfirm() {
|
|
43093
|
+
return props.closePop(true);
|
|
43094
|
+
};
|
|
42812
43095
|
var renderPicker = function renderPicker(position) {
|
|
42813
43096
|
var index = position === 'end' ? 1 : 0;
|
|
42814
43097
|
var mode = props.mode[index];
|
|
@@ -42832,7 +43115,12 @@ var Picker = function Picker(props) {
|
|
|
42832
43115
|
setTarget: position === 'end' ? func.setTargetEnd : func.setTargetStart,
|
|
42833
43116
|
registerModeDisabled: props.registerModeDisabled,
|
|
42834
43117
|
onMouseEnter: function onMouseEnter() {},
|
|
42835
|
-
onMouseLeave: function onMouseLeave() {}
|
|
43118
|
+
onMouseLeave: function onMouseLeave() {},
|
|
43119
|
+
range: range,
|
|
43120
|
+
setClickTimes: props.setClickTimes,
|
|
43121
|
+
clickTimes: props.clickTimes,
|
|
43122
|
+
needConfirm: props.needConfirm,
|
|
43123
|
+
closeByConfirm: closeByConfirm
|
|
42836
43124
|
};
|
|
42837
43125
|
if (range) {
|
|
42838
43126
|
commonProps['onMouseEnter'] = position === 'end' ? handleEnterEnd : handleEnterStart;
|
|
@@ -42888,13 +43176,26 @@ var Picker = function Picker(props) {
|
|
|
42888
43176
|
range: props.range,
|
|
42889
43177
|
jssStyle: jssStyle,
|
|
42890
43178
|
dateArr: dateArr,
|
|
43179
|
+
type: type,
|
|
42891
43180
|
setDateArr: props.setDateArr,
|
|
42892
43181
|
setCurrentArr: props.setCurrentArr,
|
|
42893
43182
|
format: props.format,
|
|
42894
43183
|
options: props.options,
|
|
42895
43184
|
children: props.children
|
|
42896
|
-
}), range ?
|
|
42897
|
-
|
|
43185
|
+
}), range ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
43186
|
+
className: styles === null || styles === void 0 ? void 0 : styles.pickerRange,
|
|
43187
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
43188
|
+
className: styles === null || styles === void 0 ? void 0 : styles.pickerRangeBody,
|
|
43189
|
+
children: ['start', 'end'].map(function (item) {
|
|
43190
|
+
return renderPicker(item);
|
|
43191
|
+
})
|
|
43192
|
+
}), props.needConfirm && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
43193
|
+
className: styles === null || styles === void 0 ? void 0 : styles.pickerRangeFooter,
|
|
43194
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(date_picker_confirm, {
|
|
43195
|
+
closeByConfirm: closeByConfirm,
|
|
43196
|
+
jssStyle: jssStyle
|
|
43197
|
+
})
|
|
43198
|
+
})]
|
|
42898
43199
|
}) : renderPicker()]
|
|
42899
43200
|
});
|
|
42900
43201
|
};
|
|
@@ -42945,16 +43246,28 @@ var DatePicker = function DatePicker(props0) {
|
|
|
42945
43246
|
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
42946
43247
|
activeIndex = _React$useState2[0],
|
|
42947
43248
|
setActiveIndex = _React$useState2[1];
|
|
43249
|
+
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0),
|
|
43250
|
+
_React$useState4 = slicedToArray_default()(_React$useState3, 2),
|
|
43251
|
+
clickTimes = _React$useState4[0],
|
|
43252
|
+
setClickTimes = _React$useState4[1];
|
|
43253
|
+
var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(false),
|
|
43254
|
+
_React$useState6 = slicedToArray_default()(_React$useState5, 2),
|
|
43255
|
+
isCloseFromConfirm = _React$useState6[0],
|
|
43256
|
+
setIsCloseFromConfirm = _React$useState6[1];
|
|
43257
|
+
var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState([]),
|
|
43258
|
+
_React$useState8 = slicedToArray_default()(_React$useState7, 2),
|
|
43259
|
+
oldDateArr = _React$useState8[0],
|
|
43260
|
+
setOldDateArr = _React$useState8[1];
|
|
42948
43261
|
var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
42949
43262
|
inputRef: null
|
|
42950
43263
|
});
|
|
42951
43264
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$datePicker = jssStyle.datePicker) === null || _jssStyle$datePicker === void 0 ? void 0 : _jssStyle$datePicker.call(jssStyle);
|
|
42952
43265
|
var isRTL = direction === 'rtl';
|
|
42953
43266
|
var dfp = isRTL ? 'bottom-right' : 'bottom-left';
|
|
42954
|
-
var _React$
|
|
42955
|
-
_React$
|
|
42956
|
-
focused = _React$
|
|
42957
|
-
setFocused = _React$
|
|
43267
|
+
var _React$useState9 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(false),
|
|
43268
|
+
_React$useState10 = slicedToArray_default()(_React$useState9, 2),
|
|
43269
|
+
focused = _React$useState10[0],
|
|
43270
|
+
setFocused = _React$useState10[1];
|
|
42958
43271
|
var listPosition = props.position || dfp;
|
|
42959
43272
|
if (date_picker_horizontalPosition.includes(listPosition)) {
|
|
42960
43273
|
listPosition = listPosition.split('-').reverse().join('-');
|
|
@@ -42982,6 +43295,7 @@ var DatePicker = function DatePicker(props0) {
|
|
|
42982
43295
|
clearable: clearable,
|
|
42983
43296
|
disabled: disabled,
|
|
42984
43297
|
clearWithUndefined: props.clearWithUndefined,
|
|
43298
|
+
clearToUndefined: props.clearToUndefined,
|
|
42985
43299
|
onClear: undefined,
|
|
42986
43300
|
allowSingle: props.allowSingle,
|
|
42987
43301
|
defaultCurrent: props.defaultPickerValue || props.defaultRangeMonth,
|
|
@@ -43000,9 +43314,20 @@ var DatePicker = function DatePicker(props0) {
|
|
|
43000
43314
|
var onCollapse = usePersistFn(function (isOpen) {
|
|
43001
43315
|
var _props$onCollapse;
|
|
43002
43316
|
if (isOpen) {
|
|
43317
|
+
setOldDateArr(dateArr);
|
|
43003
43318
|
func.startEdit();
|
|
43004
43319
|
} else {
|
|
43005
|
-
|
|
43320
|
+
setClickTimes(0);
|
|
43321
|
+
if (props.needConfirm) {
|
|
43322
|
+
if (!isCloseFromConfirm) {
|
|
43323
|
+
func.handleClear();
|
|
43324
|
+
// 点击空白处关闭面板时,还原到上次的值
|
|
43325
|
+
func.setDateArr(oldDateArr);
|
|
43326
|
+
}
|
|
43327
|
+
} else {
|
|
43328
|
+
func.finishEdit();
|
|
43329
|
+
}
|
|
43330
|
+
setIsCloseFromConfirm(false);
|
|
43006
43331
|
}
|
|
43007
43332
|
(_props$onCollapse = props.onCollapse) === null || _props$onCollapse === void 0 || _props$onCollapse.call(props, isOpen);
|
|
43008
43333
|
});
|
|
@@ -43046,9 +43371,13 @@ var DatePicker = function DatePicker(props0) {
|
|
|
43046
43371
|
setFocused(false);
|
|
43047
43372
|
(_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, e);
|
|
43048
43373
|
});
|
|
43049
|
-
var handleClose = function handleClose() {
|
|
43374
|
+
var handleClose = function handleClose(isFromConfirm) {
|
|
43050
43375
|
var _inputRef$current$inp;
|
|
43376
|
+
setIsCloseFromConfirm(isFromConfirm || false);
|
|
43051
43377
|
closePop();
|
|
43378
|
+
if (isFromConfirm) {
|
|
43379
|
+
func.finishEdit();
|
|
43380
|
+
}
|
|
43052
43381
|
(_inputRef$current$inp = inputRef.current.inputRef) === null || _inputRef$current$inp === void 0 || _inputRef$current$inp.blur();
|
|
43053
43382
|
};
|
|
43054
43383
|
var handleResultClick = usePersistFn(function () {
|
|
@@ -43157,12 +43486,15 @@ var DatePicker = function DatePicker(props0) {
|
|
|
43157
43486
|
disabledTime: props.disabledTime,
|
|
43158
43487
|
quickSelect: props.quickSelect,
|
|
43159
43488
|
showSelNow: props.showSelNow,
|
|
43489
|
+
clickTimes: clickTimes,
|
|
43490
|
+
setClickTimes: setClickTimes,
|
|
43160
43491
|
setActiveIndex: setActiveIndex,
|
|
43161
43492
|
hourStep: props.hourStep,
|
|
43162
43493
|
minuteStep: props.minuteStep,
|
|
43163
43494
|
secondStep: props.secondStep,
|
|
43164
43495
|
registerModeDisabled: func.registerModeDisabled,
|
|
43165
43496
|
isDisabledDate: func.isDisabledDate,
|
|
43497
|
+
needConfirm: props.needConfirm,
|
|
43166
43498
|
children: props.children
|
|
43167
43499
|
})
|
|
43168
43500
|
})
|
|
@@ -43180,7 +43512,8 @@ var date_picker_jssStyle = {
|
|
|
43180
43512
|
datePicker: useDatePickerStyle,
|
|
43181
43513
|
button: useButtonStyle,
|
|
43182
43514
|
innerTitle: useInnerTitleStyle,
|
|
43183
|
-
popover: usePopoverStyle
|
|
43515
|
+
popover: usePopoverStyle,
|
|
43516
|
+
link: useLinkStyle
|
|
43184
43517
|
};
|
|
43185
43518
|
var BaseDatePicker = function BaseDatePicker(props) {
|
|
43186
43519
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_date_picker_date_picker, objectSpread2_default()({
|
|
@@ -45531,8 +45864,10 @@ var useForm = function useForm(props) {
|
|
|
45531
45864
|
var _context$flowMap$glob;
|
|
45532
45865
|
if (!name) {
|
|
45533
45866
|
Object.keys(context.updateMap).forEach(function (key) {
|
|
45534
|
-
var _context$updateMap$ke
|
|
45535
|
-
(_context$updateMap$ke =
|
|
45867
|
+
var _context$updateMap$ke;
|
|
45868
|
+
(_context$updateMap$ke = context.updateMap[key]) === null || _context$updateMap$ke === void 0 || _context$updateMap$ke.forEach(function (update) {
|
|
45869
|
+
update(context.value, context.errors, context.serverErrors);
|
|
45870
|
+
});
|
|
45536
45871
|
});
|
|
45537
45872
|
Object.keys(context.flowMap).forEach(function (key) {
|
|
45538
45873
|
context.flowMap[key].forEach(function (update) {
|
|
@@ -45542,8 +45877,10 @@ var useForm = function useForm(props) {
|
|
|
45542
45877
|
} else {
|
|
45543
45878
|
var names = isArray(name) ? name : [name];
|
|
45544
45879
|
names.forEach(function (key) {
|
|
45545
|
-
var _context$updateMap$ke2, _context$
|
|
45546
|
-
(_context$updateMap$ke2 =
|
|
45880
|
+
var _context$updateMap$ke2, _context$flowMap$key;
|
|
45881
|
+
(_context$updateMap$ke2 = context.updateMap[key]) === null || _context$updateMap$ke2 === void 0 || _context$updateMap$ke2.forEach(function (update) {
|
|
45882
|
+
update(context.value, context.errors, context.serverErrors);
|
|
45883
|
+
});
|
|
45547
45884
|
(_context$flowMap$key = context.flowMap[key]) === null || _context$flowMap$key === void 0 || _context$flowMap$key.forEach(function (update) {
|
|
45548
45885
|
update();
|
|
45549
45886
|
});
|
|
@@ -45599,9 +45936,11 @@ var useForm = function useForm(props) {
|
|
|
45599
45936
|
}) : Object.keys(context.validateMap);
|
|
45600
45937
|
var validates = files2.map(function (key) {
|
|
45601
45938
|
var validateField = context.validateMap[key];
|
|
45602
|
-
return validateField(
|
|
45939
|
+
return Array.from(validateField).map(function (validate) {
|
|
45940
|
+
return validate(key, deepGet(context.value, key), context.value, config);
|
|
45941
|
+
});
|
|
45603
45942
|
});
|
|
45604
|
-
Promise.all(validates).then(function (results) {
|
|
45943
|
+
Promise.all(validates.flat()).then(function (results) {
|
|
45605
45944
|
var error = results.find(function (n) {
|
|
45606
45945
|
return n !== true;
|
|
45607
45946
|
});
|
|
@@ -45646,8 +45985,10 @@ var useForm = function useForm(props) {
|
|
|
45646
45985
|
Object.keys(vals).forEach(function (key) {
|
|
45647
45986
|
deepSet(draft, key, vals[key], deepSetOptions);
|
|
45648
45987
|
if (option.validate) {
|
|
45649
|
-
var _context$validateMap
|
|
45650
|
-
(_context$validateMap$ =
|
|
45988
|
+
var _context$validateMap$;
|
|
45989
|
+
(_context$validateMap$ = context.validateMap[key]) === null || _context$validateMap$ === void 0 || _context$validateMap$.forEach(function (validate) {
|
|
45990
|
+
validate(key, vals[key], current(draft));
|
|
45991
|
+
});
|
|
45651
45992
|
}
|
|
45652
45993
|
});
|
|
45653
45994
|
});
|
|
@@ -45791,12 +46132,17 @@ var useForm = function useForm(props) {
|
|
|
45791
46132
|
var controlFunc = use_latest_obj({
|
|
45792
46133
|
bind: function bind(n, df, validate, updateFn) {
|
|
45793
46134
|
if (context.names.has(n)) {
|
|
45794
|
-
console.
|
|
45795
|
-
return;
|
|
46135
|
+
console.warn("name \"".concat(n, "\" already exist"));
|
|
45796
46136
|
}
|
|
45797
46137
|
context.names.add(n);
|
|
45798
|
-
context.validateMap[n]
|
|
45799
|
-
|
|
46138
|
+
if (!context.validateMap[n]) {
|
|
46139
|
+
context.validateMap[n] = new Set();
|
|
46140
|
+
}
|
|
46141
|
+
context.validateMap[n].add(validate);
|
|
46142
|
+
if (!context.updateMap[n]) {
|
|
46143
|
+
context.updateMap[n] = new Set();
|
|
46144
|
+
}
|
|
46145
|
+
context.updateMap[n].add(updateFn);
|
|
45800
46146
|
context.removeArr.delete(n);
|
|
45801
46147
|
if (df !== undefined && deepGet(context.value, n) === undefined) {
|
|
45802
46148
|
if (!context.mounted) context.defaultValues[n] = df;
|
|
@@ -45806,11 +46152,19 @@ var useForm = function useForm(props) {
|
|
|
45806
46152
|
}
|
|
45807
46153
|
update(n);
|
|
45808
46154
|
},
|
|
45809
|
-
unbind: function unbind(n, reserveAble) {
|
|
45810
|
-
|
|
45811
|
-
|
|
45812
|
-
|
|
45813
|
-
|
|
46155
|
+
unbind: function unbind(n, reserveAble, validateFiled, update) {
|
|
46156
|
+
var validateFieldSet = context.validateMap[n];
|
|
46157
|
+
if (validateFiled && validateFieldSet.has(validateFiled)) {
|
|
46158
|
+
validateFieldSet.delete(validateFiled);
|
|
46159
|
+
}
|
|
46160
|
+
var updateFieldSet = context.updateMap[n];
|
|
46161
|
+
if (update && updateFieldSet.has(update)) {
|
|
46162
|
+
updateFieldSet.delete(update);
|
|
46163
|
+
}
|
|
46164
|
+
if (validateFieldSet.size === 0 && updateFieldSet.size === 0) {
|
|
46165
|
+
context.names.delete(n);
|
|
46166
|
+
delete context.defaultValues[n];
|
|
46167
|
+
}
|
|
45814
46168
|
if (!reserveAble && !context.removeLock) {
|
|
45815
46169
|
addRemove(n);
|
|
45816
46170
|
}
|
|
@@ -45885,12 +46239,12 @@ var useForm = function useForm(props) {
|
|
|
45885
46239
|
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
|
|
45886
46240
|
// 服务端错误更新
|
|
45887
46241
|
if (!props.error) context.serverErrors = {};else {
|
|
45888
|
-
var
|
|
46242
|
+
var errors = Object.keys(props.error).reduce(function (prev, cur) {
|
|
45889
46243
|
var item = props.error[cur];
|
|
45890
46244
|
var error = item instanceof Error ? item : new Error(item);
|
|
45891
46245
|
return objectSpread2_default()(objectSpread2_default()({}, prev), {}, defineProperty_default()({}, cur, error));
|
|
45892
46246
|
}, {});
|
|
45893
|
-
context.serverErrors =
|
|
46247
|
+
context.serverErrors = errors;
|
|
45894
46248
|
}
|
|
45895
46249
|
update();
|
|
45896
46250
|
}, [props.error]);
|
|
@@ -46008,7 +46362,9 @@ var Form = function Form(props) {
|
|
|
46008
46362
|
if (status !== (modalFormContext === null || modalFormContext === void 0 ? void 0 : modalFormContext.formStats)) {
|
|
46009
46363
|
modalFormContext === null || modalFormContext === void 0 || modalFormContext.setFormStats(status);
|
|
46010
46364
|
}
|
|
46011
|
-
|
|
46365
|
+
if (props.onSubmit) {
|
|
46366
|
+
modalFormContext === null || modalFormContext === void 0 || modalFormContext.setFormInfo(formRefObj);
|
|
46367
|
+
}
|
|
46012
46368
|
};
|
|
46013
46369
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
46014
46370
|
handleFormModalInfo();
|
|
@@ -48332,48 +48688,6 @@ InputComp.Group.displayName = 'ShineoutInputGroup';
|
|
|
48332
48688
|
InputComp.Password.displayName = 'ShineoutInputPassword';
|
|
48333
48689
|
InputComp.Number.displayName = 'ShineoutInputNumber';
|
|
48334
48690
|
/* harmony default export */ var src_input_0 = (InputComp);
|
|
48335
|
-
;// CONCATENATED MODULE: ../base/src/link/link.tsx
|
|
48336
|
-
|
|
48337
|
-
|
|
48338
|
-
|
|
48339
|
-
var link_excluded = ["jssStyle", "className", "type", "underline", "disabled", "size", "icon", "href", "target", "children"];
|
|
48340
|
-
// import { } from '@sheinx/hooks';
|
|
48341
|
-
|
|
48342
|
-
|
|
48343
|
-
// import from icons
|
|
48344
|
-
|
|
48345
|
-
|
|
48346
|
-
|
|
48347
|
-
var Link = function Link(props) {
|
|
48348
|
-
var jssStyle = props.jssStyle,
|
|
48349
|
-
className = props.className,
|
|
48350
|
-
_props$type = props.type,
|
|
48351
|
-
type = _props$type === void 0 ? 'primary' : _props$type,
|
|
48352
|
-
underline = props.underline,
|
|
48353
|
-
disabled = props.disabled,
|
|
48354
|
-
size = props.size,
|
|
48355
|
-
icon = props.icon,
|
|
48356
|
-
href = props.href,
|
|
48357
|
-
target = props.target,
|
|
48358
|
-
children = props.children,
|
|
48359
|
-
restProps = objectWithoutProperties_default()(props, link_excluded);
|
|
48360
|
-
var linkClasses = (jssStyle === null || jssStyle === void 0 ? void 0 : jssStyle.link()) || {};
|
|
48361
|
-
var rootClass = classnames_default()(className, linkClasses.wrapper, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, linkClasses.underline, underline === true), linkClasses.underlineHover, underline === 'hover'), linkClasses.disabled, disabled), linkClasses.sizeSmall, size === 'small'), linkClasses.sizeLarge, size === 'large'), linkClasses.primary, type === 'primary'), linkClasses.secondary, type === 'secondary'), linkClasses.danger, type === 'danger'), linkClasses.warning, type === 'warning'), linkClasses.success, type === 'success'));
|
|
48362
|
-
return /*#__PURE__*/(0,jsx_runtime.jsxs)("a", objectSpread2_default()(objectSpread2_default()({
|
|
48363
|
-
href: disabled ? undefined : href,
|
|
48364
|
-
target: target,
|
|
48365
|
-
className: rootClass
|
|
48366
|
-
}, restProps), {}, {
|
|
48367
|
-
children: [typeof icon === 'boolean' && icon && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
48368
|
-
className: linkClasses.icon,
|
|
48369
|
-
children: icons_config.link.prefixIcon
|
|
48370
|
-
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(icon) && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
48371
|
-
className: linkClasses.icon,
|
|
48372
|
-
children: icon
|
|
48373
|
-
}), children]
|
|
48374
|
-
}));
|
|
48375
|
-
};
|
|
48376
|
-
/* harmony default export */ var base_src_link_link = (Link);
|
|
48377
48691
|
;// CONCATENATED MODULE: ./src/link/link.tsx
|
|
48378
48692
|
|
|
48379
48693
|
|
|
@@ -48453,6 +48767,8 @@ var usePaginationList = function usePaginationList(props) {
|
|
|
48453
48767
|
|
|
48454
48768
|
var Scroll = function Scroll(props) {
|
|
48455
48769
|
var containerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
48770
|
+
var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
48771
|
+
var wrapperRef = useForkRef(scrollRef, props.wrapperRef);
|
|
48456
48772
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
48457
48773
|
timer: null,
|
|
48458
48774
|
isMouseDown: false,
|
|
@@ -48542,6 +48858,13 @@ var Scroll = function Scroll(props) {
|
|
|
48542
48858
|
fromDrag: context.isMouseDown
|
|
48543
48859
|
});
|
|
48544
48860
|
});
|
|
48861
|
+
var handleInnerScroll = usePersistFn(function (e) {
|
|
48862
|
+
var scrollTop = e.currentTarget.scrollTop;
|
|
48863
|
+
if (scrollRef.current) {
|
|
48864
|
+
e.currentTarget.scrollTop = 0;
|
|
48865
|
+
scrollRef.current.scrollTop += scrollTop;
|
|
48866
|
+
}
|
|
48867
|
+
});
|
|
48545
48868
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
48546
48869
|
className: props.className,
|
|
48547
48870
|
style: props.style,
|
|
@@ -48551,7 +48874,7 @@ var Scroll = function Scroll(props) {
|
|
|
48551
48874
|
})), {}, {
|
|
48552
48875
|
style: scrollerStyle,
|
|
48553
48876
|
onScroll: handleScroll,
|
|
48554
|
-
ref:
|
|
48877
|
+
ref: wrapperRef,
|
|
48555
48878
|
onMouseDown: function onMouseDown() {
|
|
48556
48879
|
context.isMouseDown = true;
|
|
48557
48880
|
},
|
|
@@ -48563,6 +48886,7 @@ var Scroll = function Scroll(props) {
|
|
|
48563
48886
|
})), {}, {
|
|
48564
48887
|
style: containerStyle,
|
|
48565
48888
|
ref: containerRef,
|
|
48889
|
+
onScroll: handleInnerScroll,
|
|
48566
48890
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
48567
48891
|
style: objectSpread2_default()({
|
|
48568
48892
|
flexGrow: 1
|
|
@@ -48598,30 +48922,110 @@ var VirtualList = function VirtualList(props) {
|
|
|
48598
48922
|
_props$tag = props.tag,
|
|
48599
48923
|
tag = _props$tag === void 0 ? 'div' : _props$tag,
|
|
48600
48924
|
tagClassName = props.tagClassName,
|
|
48925
|
+
dynamicVirtual = props.dynamicVirtual,
|
|
48601
48926
|
virtualRef = props.virtualRef,
|
|
48602
48927
|
onControlTypeChange = props.onControlTypeChange;
|
|
48603
48928
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
|
|
48604
48929
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
48605
|
-
|
|
48606
|
-
|
|
48930
|
+
top = _useState2[0],
|
|
48931
|
+
setTop = _useState2[1];
|
|
48607
48932
|
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
|
|
48608
48933
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
48609
|
-
|
|
48610
|
-
|
|
48934
|
+
offsetY = _useState4[0],
|
|
48935
|
+
setOffsetY = _useState4[1];
|
|
48936
|
+
var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(props.data.length * lineHeight),
|
|
48937
|
+
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
48938
|
+
scrollHeight = _useState6[0],
|
|
48939
|
+
setHeight = _useState6[1];
|
|
48940
|
+
var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
|
|
48941
|
+
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
48942
|
+
startIndex = _useState8[0],
|
|
48943
|
+
setCurrentIndex = _useState8[1];
|
|
48611
48944
|
var wrapperRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
48612
|
-
var
|
|
48613
|
-
|
|
48614
|
-
|
|
48945
|
+
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
48946
|
+
cachedHeight: [],
|
|
48947
|
+
controlScrollRate: null,
|
|
48948
|
+
heightCallback: null,
|
|
48949
|
+
preIndex: null,
|
|
48950
|
+
topTimer: null,
|
|
48951
|
+
rateTimer: null,
|
|
48952
|
+
shouldUpdateHeight: true
|
|
48953
|
+
}),
|
|
48954
|
+
context = _useRef.current;
|
|
48955
|
+
var getContentHeight = function getContentHeight(index) {
|
|
48956
|
+
var sum = 0;
|
|
48957
|
+
for (var i = 0; i <= index; i++) {
|
|
48958
|
+
sum += context.cachedHeight[i] || lineHeight;
|
|
48959
|
+
}
|
|
48960
|
+
return sum;
|
|
48615
48961
|
};
|
|
48616
48962
|
var getCurrentIndex = usePersistFn(function () {
|
|
48617
|
-
return
|
|
48963
|
+
return startIndex;
|
|
48618
48964
|
});
|
|
48619
48965
|
var getTop = usePersistFn(function () {
|
|
48620
48966
|
return top;
|
|
48621
48967
|
});
|
|
48968
|
+
var setRowHeight = usePersistFn(function (index, height) {
|
|
48969
|
+
var beforeHeight = context.cachedHeight[index];
|
|
48970
|
+
if (beforeHeight && beforeHeight === height) return;
|
|
48971
|
+
context.cachedHeight[index] = height;
|
|
48972
|
+
if (context.shouldUpdateHeight) {
|
|
48973
|
+
setHeight(getContentHeight(props.data.length - 1));
|
|
48974
|
+
}
|
|
48975
|
+
var preIndex = context.preIndex;
|
|
48976
|
+
// 解决: 从下往上滚 由于高度变化会导致滚动条跳动
|
|
48977
|
+
if (preIndex && preIndex > startIndex && startIndex === index) {
|
|
48978
|
+
// 发生在顶部
|
|
48979
|
+
if (context.heightCallback) return;
|
|
48980
|
+
var offset = height - (beforeHeight || lineHeight);
|
|
48981
|
+
setOffsetY(function (s) {
|
|
48982
|
+
return s + offset;
|
|
48983
|
+
});
|
|
48984
|
+
}
|
|
48985
|
+
});
|
|
48986
|
+
var updateRateScroll = usePersistFn(function (rate) {
|
|
48987
|
+
var sumHeight = getContentHeight(props.data.length - 1);
|
|
48988
|
+
if (sumHeight === scrollHeight) return;
|
|
48989
|
+
context.shouldUpdateHeight = true;
|
|
48990
|
+
context.heightCallback = function () {
|
|
48991
|
+
if (wrapperRef && wrapperRef.current) {
|
|
48992
|
+
var _scrollHeight = wrapperRef.current.scrollHeight;
|
|
48993
|
+
var clientHeight = wrapperRef.current.clientHeight;
|
|
48994
|
+
var nowTop = wrapperRef.current.scrollTop;
|
|
48995
|
+
var max = _scrollHeight - clientHeight;
|
|
48996
|
+
var _top = rate * max;
|
|
48997
|
+
if (Math.abs(nowTop - _top) < 1) {
|
|
48998
|
+
context.controlScrollRate = null;
|
|
48999
|
+
} else {
|
|
49000
|
+
context.controlScrollRate = rate;
|
|
49001
|
+
wrapperRef.current.scrollTop = _top;
|
|
49002
|
+
}
|
|
49003
|
+
}
|
|
49004
|
+
};
|
|
49005
|
+
setHeight(sumHeight);
|
|
49006
|
+
});
|
|
49007
|
+
var updateIndexAndTopFromTop = function updateIndexAndTopFromTop(scrollTop) {
|
|
49008
|
+
var sum = 0;
|
|
49009
|
+
var nextCurrentIndex = 0;
|
|
49010
|
+
var top = 0;
|
|
49011
|
+
var maxIndex = Math.max(props.data.length - rowsInView, 0);
|
|
49012
|
+
for (var i = 0; i <= maxIndex; i++) {
|
|
49013
|
+
sum += context.cachedHeight[i] || lineHeight;
|
|
49014
|
+
if (scrollTop < sum || i === maxIndex) {
|
|
49015
|
+
nextCurrentIndex = i;
|
|
49016
|
+
var beforeHeight = i === 0 ? 0 : sum - (context.cachedHeight[i] || lineHeight);
|
|
49017
|
+
top = scrollTop - beforeHeight;
|
|
49018
|
+
break;
|
|
49019
|
+
}
|
|
49020
|
+
}
|
|
49021
|
+
if (nextCurrentIndex !== startIndex) {
|
|
49022
|
+
setCurrentIndex(nextCurrentIndex);
|
|
49023
|
+
}
|
|
49024
|
+
setTop(top);
|
|
49025
|
+
};
|
|
48622
49026
|
var handleScrollByStep = usePersistFn(function (step, top) {
|
|
48623
49027
|
var _wrapperRef$current;
|
|
48624
|
-
var next =
|
|
49028
|
+
var next = startIndex + step;
|
|
48625
49029
|
(_wrapperRef$current = wrapperRef.current) === null || _wrapperRef$current === void 0 || _wrapperRef$current.scrollTo({
|
|
48626
49030
|
top: next * lineHeight + (top || 0)
|
|
48627
49031
|
});
|
|
@@ -48631,21 +49035,36 @@ var VirtualList = function VirtualList(props) {
|
|
|
48631
49035
|
};
|
|
48632
49036
|
var handleScroll = function handleScroll(info) {
|
|
48633
49037
|
var _props$onScroll;
|
|
48634
|
-
var
|
|
48635
|
-
|
|
49038
|
+
var scrollLeft = info.scrollLeft,
|
|
49039
|
+
height = info.height,
|
|
49040
|
+
y = info.y,
|
|
49041
|
+
fromDrag = info.fromDrag;
|
|
49042
|
+
var scrollTop = info.scrollTop;
|
|
49043
|
+
context.shouldUpdateHeight = !fromDrag;
|
|
49044
|
+
var sumHeight = getContentHeight(props.data.length - 1);
|
|
49045
|
+
var max = sumHeight - height;
|
|
49046
|
+
if (scrollTop > max) {
|
|
49047
|
+
scrollTop = max;
|
|
49048
|
+
}
|
|
49049
|
+
if (fromDrag) {
|
|
49050
|
+
var _top2 = y * max;
|
|
49051
|
+
updateIndexAndTopFromTop(_top2);
|
|
49052
|
+
if (context.rateTimer) clearTimeout(context.rateTimer);
|
|
49053
|
+
context.rateTimer = setTimeout(function () {
|
|
49054
|
+
updateRateScroll(y);
|
|
49055
|
+
}, 120);
|
|
49056
|
+
} else {
|
|
49057
|
+
updateIndexAndTopFromTop(scrollTop);
|
|
49058
|
+
}
|
|
48636
49059
|
(_props$onScroll = props.onScroll) === null || _props$onScroll === void 0 || _props$onScroll.call(props, info);
|
|
48637
|
-
setTop(top);
|
|
48638
|
-
setCurrentIndex(current);
|
|
48639
49060
|
};
|
|
48640
|
-
var scrollHeight = getScrollHeight();
|
|
48641
49061
|
var renderList = function renderList() {
|
|
48642
|
-
var
|
|
48643
|
-
var end = currentIndex + rowsInView;
|
|
48644
|
-
var items = data.slice(start, end);
|
|
49062
|
+
var items = data.slice(startIndex, startIndex + rowsInView);
|
|
48645
49063
|
var Tag = tag;
|
|
48646
49064
|
var shouldScroll = data.length * lineHeight > height;
|
|
48647
49065
|
var nextStyle = objectSpread2_default()({}, style);
|
|
48648
49066
|
if (shouldScroll) nextStyle.height = height;
|
|
49067
|
+
var scrollHeight = getContentHeight(data.length - 1);
|
|
48649
49068
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(virtual_scroll_scroll, {
|
|
48650
49069
|
className: className,
|
|
48651
49070
|
style: nextStyle,
|
|
@@ -48666,16 +49085,48 @@ var VirtualList = function VirtualList(props) {
|
|
|
48666
49085
|
children: items.map(function (d, i) {
|
|
48667
49086
|
if (d[groupKey]) {
|
|
48668
49087
|
return /*#__PURE__*/(0,jsx_runtime.jsx)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
48669
|
-
children: customRenderItem(d,
|
|
49088
|
+
children: customRenderItem(d, startIndex + i, i)
|
|
48670
49089
|
}, i);
|
|
48671
49090
|
}
|
|
48672
49091
|
return /*#__PURE__*/(0,jsx_runtime.jsx)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
48673
|
-
children: renderItem(d,
|
|
48674
|
-
}, i);
|
|
49092
|
+
children: renderItem(d, startIndex + i, i, setRowHeight)
|
|
49093
|
+
}, dynamicVirtual ? startIndex + i : i);
|
|
48675
49094
|
})
|
|
48676
49095
|
})
|
|
48677
49096
|
});
|
|
48678
49097
|
};
|
|
49098
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
49099
|
+
setHeight(getContentHeight(props.data.length - 1));
|
|
49100
|
+
}, [data.length]);
|
|
49101
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
49102
|
+
if (offsetY) {
|
|
49103
|
+
// if (wrapperRef.current && props.innerRef.current) {
|
|
49104
|
+
if (wrapperRef.current) {
|
|
49105
|
+
setOffsetY(0);
|
|
49106
|
+
setTop(function (s) {
|
|
49107
|
+
return s + offsetY;
|
|
49108
|
+
});
|
|
49109
|
+
wrapperRef.current.scrollTop += offsetY;
|
|
49110
|
+
}
|
|
49111
|
+
}
|
|
49112
|
+
}, [offsetY, startIndex]);
|
|
49113
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
49114
|
+
// 数据变化的时候清空掉 preIndex, 如果之前有缓存的index, setRowHeight 会有问题
|
|
49115
|
+
return function () {
|
|
49116
|
+
context.preIndex = null;
|
|
49117
|
+
};
|
|
49118
|
+
}, [props.data]);
|
|
49119
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
49120
|
+
if (context.heightCallback) {
|
|
49121
|
+
var cb = context.heightCallback;
|
|
49122
|
+
context.heightCallback = null;
|
|
49123
|
+
cb();
|
|
49124
|
+
}
|
|
49125
|
+
}, [scrollHeight]);
|
|
49126
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
49127
|
+
// 记录preIndex
|
|
49128
|
+
context.preIndex = startIndex;
|
|
49129
|
+
}, [startIndex]);
|
|
48679
49130
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
48680
49131
|
if (virtualRef !== null && virtualRef !== void 0 && virtualRef.current) {
|
|
48681
49132
|
virtualRef.current.scrollByStep = handleScrollByStep;
|
|
@@ -48908,6 +49359,8 @@ var UseSelectGroup = function UseSelectGroup(props) {
|
|
|
48908
49359
|
|
|
48909
49360
|
|
|
48910
49361
|
|
|
49362
|
+
|
|
49363
|
+
|
|
48911
49364
|
var ListOption = function ListOption(props) {
|
|
48912
49365
|
var _jssStyle$select;
|
|
48913
49366
|
var jssStyle = props.jssStyle,
|
|
@@ -48918,8 +49371,10 @@ var ListOption = function ListOption(props) {
|
|
|
48918
49371
|
multiple = props.multiple,
|
|
48919
49372
|
isHover = props.isHover,
|
|
48920
49373
|
renderItem = props.renderItem,
|
|
49374
|
+
dynamicVirtual = props.dynamicVirtual,
|
|
48921
49375
|
onHover = props.onHover,
|
|
48922
49376
|
onOptionClick = props.onOptionClick;
|
|
49377
|
+
var optionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
48923
49378
|
var config = useConfig();
|
|
48924
49379
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$select = jssStyle.select) === null || _jssStyle$select === void 0 ? void 0 : _jssStyle$select.call(jssStyle);
|
|
48925
49380
|
var isChecked = datum.check(data);
|
|
@@ -48938,6 +49393,13 @@ var ListOption = function ListOption(props) {
|
|
|
48938
49393
|
}
|
|
48939
49394
|
onOptionClick(data, index);
|
|
48940
49395
|
};
|
|
49396
|
+
var setVirtualRowHeight = usePersistFn(function () {
|
|
49397
|
+
if (!props.setRowHeight || !optionRef.current) return;
|
|
49398
|
+
var optionHeight = optionRef.current.getBoundingClientRect().height;
|
|
49399
|
+
if (optionHeight !== 0) {
|
|
49400
|
+
props.setRowHeight(index, optionHeight);
|
|
49401
|
+
}
|
|
49402
|
+
});
|
|
48941
49403
|
var renderCheckedIcon = function renderCheckedIcon() {
|
|
48942
49404
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
48943
49405
|
className: styles.checkedIcon,
|
|
@@ -48947,13 +49409,22 @@ var ListOption = function ListOption(props) {
|
|
|
48947
49409
|
};
|
|
48948
49410
|
var result = renderItem(data);
|
|
48949
49411
|
var title = typeof result === 'string' ? result : '';
|
|
49412
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(setVirtualRowHeight, []);
|
|
49413
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
49414
|
+
if (!optionRef.current) return;
|
|
49415
|
+
var cancelObserver = addResizeObserver(optionRef.current, setVirtualRowHeight, {
|
|
49416
|
+
direction: 'y'
|
|
49417
|
+
});
|
|
49418
|
+
return function () {
|
|
49419
|
+
cancelObserver();
|
|
49420
|
+
};
|
|
49421
|
+
}, []);
|
|
48950
49422
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
49423
|
+
ref: optionRef,
|
|
48951
49424
|
tabIndex: -1,
|
|
48952
49425
|
className: rootClass,
|
|
48953
49426
|
title: title,
|
|
48954
|
-
style: {
|
|
48955
|
-
height: lineHeight
|
|
48956
|
-
},
|
|
49427
|
+
style: defineProperty_default()({}, dynamicVirtual ? 'minHeight' : 'height', lineHeight),
|
|
48957
49428
|
onClick: handleClick,
|
|
48958
49429
|
onMouseEnter: handleEnter,
|
|
48959
49430
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
@@ -48998,8 +49469,9 @@ var list_List = function List(props) {
|
|
|
48998
49469
|
closePop = props.closePop,
|
|
48999
49470
|
onControlTypeChange = props.onControlTypeChange,
|
|
49000
49471
|
onOptionClick = props.onOptionClick;
|
|
49472
|
+
var dynamicVirtual = lineHeightProp === 'auto';
|
|
49001
49473
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$select = jssStyle.select) === null || _jssStyle$select === void 0 ? void 0 : _jssStyle$select.call(jssStyle);
|
|
49002
|
-
var rootClass = classnames_default()(styles.list, defineProperty_default()(defineProperty_default()({}, styles.controlMouse, controlType === 'mouse'), styles.controlKeyboard, controlType === 'keyboard'));
|
|
49474
|
+
var rootClass = classnames_default()(styles.list, defineProperty_default()(defineProperty_default()(defineProperty_default()({}, styles.controlMouse, controlType === 'mouse'), styles.controlKeyboard, controlType === 'keyboard'), styles.dynamicList, dynamicVirtual));
|
|
49003
49475
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(hideCreateOption ? -1 : 0),
|
|
49004
49476
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
49005
49477
|
hoverIndex = _useState2[0],
|
|
@@ -49013,7 +49485,7 @@ var list_List = function List(props) {
|
|
|
49013
49485
|
return hoverIndex;
|
|
49014
49486
|
});
|
|
49015
49487
|
var getLineHeight = function getLineHeight() {
|
|
49016
|
-
if (lineHeightProp) return lineHeightProp;
|
|
49488
|
+
if (lineHeightProp && lineHeightProp !== 'auto') return lineHeightProp;
|
|
49017
49489
|
if (size === 'small') return 26;
|
|
49018
49490
|
if (size === 'default') return 34;
|
|
49019
49491
|
if (size === 'large') return 42;
|
|
@@ -49124,17 +49596,7 @@ var list_List = function List(props) {
|
|
|
49124
49596
|
return _ref.apply(this, arguments);
|
|
49125
49597
|
};
|
|
49126
49598
|
}());
|
|
49127
|
-
var
|
|
49128
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
49129
|
-
children: "loading"
|
|
49130
|
-
});
|
|
49131
|
-
};
|
|
49132
|
-
var renderHeader = function renderHeader() {
|
|
49133
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
49134
|
-
children: "header"
|
|
49135
|
-
});
|
|
49136
|
-
};
|
|
49137
|
-
var renderItem = function renderItem(item, index, key) {
|
|
49599
|
+
var renderItem = function renderItem(item, index, key, setRowHeight) {
|
|
49138
49600
|
return /*#__PURE__*/(0,jsx_runtime.jsx)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
49139
49601
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(list_option, {
|
|
49140
49602
|
datum: datum,
|
|
@@ -49142,9 +49604,11 @@ var list_List = function List(props) {
|
|
|
49142
49604
|
jssStyle: jssStyle,
|
|
49143
49605
|
index: index,
|
|
49144
49606
|
data: item,
|
|
49607
|
+
setRowHeight: setRowHeight,
|
|
49145
49608
|
lineHeight: lineHeight,
|
|
49146
49609
|
isHover: hoverIndex === index,
|
|
49147
49610
|
multiple: multiple,
|
|
49611
|
+
dynamicVirtual: dynamicVirtual,
|
|
49148
49612
|
renderItem: renderItemProp,
|
|
49149
49613
|
onHover: handleHover,
|
|
49150
49614
|
onOptionClick: onOptionClick
|
|
@@ -49166,6 +49630,7 @@ var list_List = function List(props) {
|
|
|
49166
49630
|
keygen: keygen,
|
|
49167
49631
|
tag: 'ul',
|
|
49168
49632
|
groupKey: groupKey,
|
|
49633
|
+
dynamicVirtual: dynamicVirtual,
|
|
49169
49634
|
tagClassName: styles.virtualList,
|
|
49170
49635
|
height: height,
|
|
49171
49636
|
onScroll: handleVirtualScroll,
|
|
@@ -50380,7 +50845,7 @@ var ColumnsList = function ColumnsList(props) {
|
|
|
50380
50845
|
|
|
50381
50846
|
// columns 模式无上下边距,故而 lineHeight 需要调整
|
|
50382
50847
|
var getLineHeight = function getLineHeight() {
|
|
50383
|
-
if (lineHeightProp) return lineHeightProp;
|
|
50848
|
+
if (lineHeightProp && lineHeightProp !== 'auto') return lineHeightProp;
|
|
50384
50849
|
if (size === 'small') return 24;
|
|
50385
50850
|
if (size === 'default') return 32;
|
|
50386
50851
|
if (size === 'large') return 40;
|
|
@@ -53374,7 +53839,7 @@ var confirm_excluded = ["children", "type", "text", "onOk", "okType", "onCancel"
|
|
|
53374
53839
|
|
|
53375
53840
|
|
|
53376
53841
|
|
|
53377
|
-
var
|
|
53842
|
+
var confirm_Confirm = function Confirm(props) {
|
|
53378
53843
|
var _jssStyle$popover;
|
|
53379
53844
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
53380
53845
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
@@ -53471,7 +53936,7 @@ var Confirm = function Confirm(props) {
|
|
|
53471
53936
|
}
|
|
53472
53937
|
}));
|
|
53473
53938
|
};
|
|
53474
|
-
/* harmony default export */ var popover_confirm = (
|
|
53939
|
+
/* harmony default export */ var popover_confirm = (confirm_Confirm);
|
|
53475
53940
|
;// CONCATENATED MODULE: ./src/popover/confirm.tsx
|
|
53476
53941
|
|
|
53477
53942
|
|
|
@@ -56296,6 +56761,7 @@ var useTableTree = function useTableTree(props) {
|
|
|
56296
56761
|
|
|
56297
56762
|
|
|
56298
56763
|
|
|
56764
|
+
var MAX_ROW_SPAN = 200;
|
|
56299
56765
|
var useTableVirtual = function useTableVirtual(props) {
|
|
56300
56766
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
|
|
56301
56767
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
@@ -56378,7 +56844,9 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
56378
56844
|
topTimer: null,
|
|
56379
56845
|
controlScrollRate: null,
|
|
56380
56846
|
heightCallback: null,
|
|
56381
|
-
preIndex: null
|
|
56847
|
+
preIndex: null,
|
|
56848
|
+
rowSpanRows: 0,
|
|
56849
|
+
autoAddRows: 0
|
|
56382
56850
|
}),
|
|
56383
56851
|
context = _useRef.current;
|
|
56384
56852
|
var getTranslate = usePersistFn(function (left, top) {
|
|
@@ -56429,17 +56897,20 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
56429
56897
|
var top = 0;
|
|
56430
56898
|
var maxIndex = Math.max(props.data.length - rowsInView, 0);
|
|
56431
56899
|
for (var i = 0; i <= maxIndex; i++) {
|
|
56900
|
+
context.rowSpanRows = 0;
|
|
56432
56901
|
sum += context.cachedHeight[i] || props.rowHeight;
|
|
56433
56902
|
var rowSpanHeight = 0;
|
|
56434
56903
|
if (rowSpanInfos) {
|
|
56904
|
+
var maxRowSpanLenth = Math.min(rowSpanInfos.length, props.rowsInView > MAX_ROW_SPAN ? props.rowsInView : props.rowsInView || MAX_ROW_SPAN);
|
|
56435
56905
|
var siblingsIndexs = [];
|
|
56436
|
-
for (var k = 0; k <
|
|
56906
|
+
for (var k = 0; k < maxRowSpanLenth; k++) {
|
|
56437
56907
|
if (rowSpanInfos[k] <= i && k > i) {
|
|
56438
56908
|
siblingsIndexs.push(k);
|
|
56439
56909
|
}
|
|
56440
56910
|
}
|
|
56441
56911
|
for (var j = 0; j < siblingsIndexs.length; j++) {
|
|
56442
56912
|
var index = siblingsIndexs[j];
|
|
56913
|
+
context.rowSpanRows += 1;
|
|
56443
56914
|
rowSpanHeight += context.cachedHeight[index] || props.rowHeight;
|
|
56444
56915
|
}
|
|
56445
56916
|
}
|
|
@@ -56530,6 +57001,24 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
56530
57001
|
props.scrollRef.current.scrollTop = beforeHeight;
|
|
56531
57002
|
}
|
|
56532
57003
|
});
|
|
57004
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
57005
|
+
var scrollRefHeight = props.scrollRef.current ? props.scrollRef.current.clientHeight : 0;
|
|
57006
|
+
var tableRefHeight = props.innerRef.current ? props.innerRef.current.clientHeight : 0;
|
|
57007
|
+
var remainHeight = scrollRefHeight - tableRefHeight;
|
|
57008
|
+
if (remainHeight > 0) {
|
|
57009
|
+
var addonHeight = 0;
|
|
57010
|
+
var addonCount = 0;
|
|
57011
|
+
for (var i = startIndex + rowsInView; i < props.data.length; i++) {
|
|
57012
|
+
var height = context.cachedHeight[i] || props.rowHeight;
|
|
57013
|
+
addonHeight += height;
|
|
57014
|
+
addonCount += 1;
|
|
57015
|
+
if (addonHeight >= remainHeight + context.cachedHeight[0]) break;
|
|
57016
|
+
}
|
|
57017
|
+
if (addonCount > 0) {
|
|
57018
|
+
context.autoAddRows = addonCount;
|
|
57019
|
+
}
|
|
57020
|
+
}
|
|
57021
|
+
}, []);
|
|
56533
57022
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
56534
57023
|
// 记录preIndex
|
|
56535
57024
|
context.preIndex = startIndex;
|
|
@@ -56564,7 +57053,8 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
56564
57053
|
cb();
|
|
56565
57054
|
}
|
|
56566
57055
|
}, [scrollHeight]);
|
|
56567
|
-
var
|
|
57056
|
+
var finalRowsInView = rowsInView + context.rowSpanRows + context.autoAddRows;
|
|
57057
|
+
var renderData = props.disabled ? props.data : toConsumableArray_default()(props.data).slice(startIndex, startIndex + finalRowsInView);
|
|
56568
57058
|
return {
|
|
56569
57059
|
scrollHeight: scrollHeight,
|
|
56570
57060
|
startIndex: startIndex,
|
|
@@ -57483,6 +57973,9 @@ var Tr = function Tr(props) {
|
|
|
57483
57973
|
var tds = [];
|
|
57484
57974
|
var skip = 0;
|
|
57485
57975
|
var lastRowIndex = data.length - 1;
|
|
57976
|
+
var hasSiblingRowSpan = data === null || data === void 0 ? void 0 : data.some(function (item) {
|
|
57977
|
+
return item === null;
|
|
57978
|
+
});
|
|
57486
57979
|
var _loop = function _loop(i) {
|
|
57487
57980
|
if (skip > 0) {
|
|
57488
57981
|
skip--;
|
|
@@ -57494,13 +57987,13 @@ var Tr = function Tr(props) {
|
|
|
57494
57987
|
var td = /*#__PURE__*/(0,jsx_runtime.jsx)("td", {
|
|
57495
57988
|
colSpan: data[i].colSpan,
|
|
57496
57989
|
rowSpan: data[i].rowSpan,
|
|
57497
|
-
onMouseEnter: function
|
|
57990
|
+
onMouseEnter: props.hover && hasSiblingRowSpan ? function () {
|
|
57498
57991
|
props.handleCellHover(props.rowIndex, data[i].rowSpan);
|
|
57499
|
-
},
|
|
57500
|
-
onMouseLeave: function
|
|
57992
|
+
} : undefined,
|
|
57993
|
+
onMouseLeave: props.hover && hasSiblingRowSpan ? function () {
|
|
57501
57994
|
props.handleCellHover(-1, 0);
|
|
57502
|
-
},
|
|
57503
|
-
className: classnames_default()(col.className, col.type === 'checkbox' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellCheckbox), col.fixed === 'left' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedLeft), col.fixed === 'right' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedRight), col.align === 'center' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignCenter), col.align === 'right' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignRight), (col.lastFixed || col.firstFixed || last.lastFixed) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedLast), lastRowIndex === i && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellIgnoreBorder), props.isCellHover(props.rowIndex, data[i].rowSpan) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellHover)),
|
|
57995
|
+
} : undefined,
|
|
57996
|
+
className: classnames_default()(col.className, col.type === 'checkbox' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellCheckbox), col.fixed === 'left' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedLeft), col.fixed === 'right' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedRight), col.align === 'center' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignCenter), col.align === 'right' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignRight), (col.lastFixed || col.firstFixed || last.lastFixed) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedLast), lastRowIndex === i && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellIgnoreBorder), data[i].rowSpan > 1 && props.isCellHover(props.rowIndex, data[i].rowSpan) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellHover)),
|
|
57504
57997
|
style: getTdStyle(col, data[i].colSpan),
|
|
57505
57998
|
dir: config.direction,
|
|
57506
57999
|
onClick: props.onCellClick ? function () {
|
|
@@ -57566,7 +58059,7 @@ var Tr = function Tr(props) {
|
|
|
57566
58059
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
57567
58060
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("tr", objectSpread2_default()(objectSpread2_default()({
|
|
57568
58061
|
ref: trRef,
|
|
57569
|
-
className: classnames_default()(props === null || props === void 0 || (_props$rowClassName = props.rowClassName) === null || _props$rowClassName === void 0 ? void 0 : _props$rowClassName.call(props, props.rawData, props.rowIndex), props.striped && props.rowIndex % 2 === 1 && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.rowStriped), props.isSelect && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.rowChecked))
|
|
58062
|
+
className: classnames_default()(props === null || props === void 0 || (_props$rowClassName = props.rowClassName) === null || _props$rowClassName === void 0 ? void 0 : _props$rowClassName.call(props, props.rawData, props.rowIndex), props.striped && props.rowIndex % 2 === 1 && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.rowStriped), props.isSelect && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.rowChecked), props.hover && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.rowHover))
|
|
57570
58063
|
}, props.rowEvents), {}, {
|
|
57571
58064
|
onClick: handleRowClick,
|
|
57572
58065
|
children: renderTds(props.columns, props.row)
|
|
@@ -57637,6 +58130,7 @@ var Tr = function Tr(props) {
|
|
|
57637
58130
|
striped: props.striped,
|
|
57638
58131
|
radio: props.radio,
|
|
57639
58132
|
isCellHover: isCellHover,
|
|
58133
|
+
hover: hover,
|
|
57640
58134
|
isSelect: props.datum.check(rowSelectMergeStartData[index]),
|
|
57641
58135
|
handleCellHover: handleCellHover
|
|
57642
58136
|
// to update
|
|
@@ -57976,14 +58470,14 @@ var emptyRef = {
|
|
|
57976
58470
|
var maxHeight = target.scrollHeight - target.clientHeight;
|
|
57977
58471
|
var x = Math.min(target.scrollLeft / maxWidth, 1);
|
|
57978
58472
|
var y = Math.min(target.scrollTop / maxHeight, 1);
|
|
57979
|
-
props.onScroll(x, y, target.scrollLeft);
|
|
58473
|
+
props.onScroll(x, y, target.scrollLeft, target.scrollTop);
|
|
57980
58474
|
}
|
|
57981
58475
|
});
|
|
57982
58476
|
var handleVirtualScroll = usePersistFn(function (info) {
|
|
57983
58477
|
virtualInfo.handleScroll(info);
|
|
57984
58478
|
layoutFunc.checkFloat();
|
|
57985
58479
|
if (props.onScroll && typeof props.onScroll === 'function') {
|
|
57986
|
-
props.onScroll(info.x, info.y, info.scrollLeft);
|
|
58480
|
+
props.onScroll(info.x, info.y, info.scrollLeft, info.scrollTop);
|
|
57987
58481
|
}
|
|
57988
58482
|
});
|
|
57989
58483
|
var renderEmpty = function renderEmpty() {
|
|
@@ -58183,8 +58677,16 @@ var emptyRef = {
|
|
|
58183
58677
|
}
|
|
58184
58678
|
};
|
|
58185
58679
|
}, [theadRef.current, isScrollY]);
|
|
58680
|
+
var getRenderIndexByData = function getRenderIndexByData(data) {
|
|
58681
|
+
var originKey = typeof data === 'string' ? data : getKey(props.keygen, data);
|
|
58682
|
+
var index = treeData.findIndex(function (item) {
|
|
58683
|
+
return getKey(props.keygen, item) === originKey;
|
|
58684
|
+
});
|
|
58685
|
+
return index;
|
|
58686
|
+
};
|
|
58186
58687
|
var tableFunc = useLatestObj({
|
|
58187
|
-
scrollToIndex: virtualInfo.scrollToIndex
|
|
58688
|
+
scrollToIndex: virtualInfo.scrollToIndex,
|
|
58689
|
+
getRenderIndexByData: getRenderIndexByData
|
|
58188
58690
|
});
|
|
58189
58691
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
58190
58692
|
if (props.tableRef) {
|
|
@@ -58954,11 +59456,10 @@ var Tabs = function Tabs(props) {
|
|
|
58954
59456
|
className: tabsStyle.panelWrapper,
|
|
58955
59457
|
style: panelStyle,
|
|
58956
59458
|
children: external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.toArray(children).map(function (child, index) {
|
|
58957
|
-
var
|
|
58958
|
-
if (tabs_isNamedComponent(
|
|
58959
|
-
return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(
|
|
58960
|
-
id:
|
|
58961
|
-
active: active
|
|
59459
|
+
var Child = child;
|
|
59460
|
+
if (tabs_isNamedComponent(Child.type) && Child.type.displayName === 'ShineoutTabsPanel') {
|
|
59461
|
+
return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(Child, {
|
|
59462
|
+
id: Child.props.id !== undefined ? Child.props.id : index
|
|
58962
59463
|
});
|
|
58963
59464
|
}
|
|
58964
59465
|
return null;
|
|
@@ -58969,20 +59470,20 @@ var Tabs = function Tabs(props) {
|
|
|
58969
59470
|
var tabs = [];
|
|
58970
59471
|
var border = getSplitColor();
|
|
58971
59472
|
external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.toArray(children).forEach(function (child, index) {
|
|
58972
|
-
var
|
|
58973
|
-
if (!
|
|
58974
|
-
var childBorder =
|
|
58975
|
-
var
|
|
58976
|
-
id =
|
|
59473
|
+
var Child = child;
|
|
59474
|
+
if (!Child || !Child.type) return;
|
|
59475
|
+
var childBorder = Child.props.splitColor || Child.props.border;
|
|
59476
|
+
var _Child$props$id = Child.props.id,
|
|
59477
|
+
id = _Child$props$id === void 0 ? index : _Child$props$id;
|
|
58977
59478
|
if (active === id && childBorder) {
|
|
58978
59479
|
border = childBorder;
|
|
58979
59480
|
}
|
|
58980
59481
|
tabs.push({
|
|
58981
|
-
id:
|
|
58982
|
-
tab:
|
|
58983
|
-
disabled:
|
|
59482
|
+
id: Child.props.id !== undefined ? Child.props.id : index,
|
|
59483
|
+
tab: Child.props.tab,
|
|
59484
|
+
disabled: Child.props.disabled,
|
|
58984
59485
|
jssStyle: jssStyle,
|
|
58985
|
-
color:
|
|
59486
|
+
color: Child.props.color || (active === id ? color : undefined)
|
|
58986
59487
|
});
|
|
58987
59488
|
});
|
|
58988
59489
|
var header = /*#__PURE__*/(0,jsx_runtime.jsx)(tabs_header, {
|
|
@@ -59181,7 +59682,8 @@ var Tooltip = function Tooltip(props) {
|
|
|
59181
59682
|
_props$type = props.type,
|
|
59182
59683
|
type = _props$type === void 0 ? 'default' : _props$type,
|
|
59183
59684
|
_props$position = props.position,
|
|
59184
|
-
popsitionProps = _props$position === void 0 ? '
|
|
59685
|
+
popsitionProps = _props$position === void 0 ? 'auto' : _props$position;
|
|
59686
|
+
var arrowStyleRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({});
|
|
59185
59687
|
var tooltipClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$tooltip = jssStyle.tooltip) === null || _jssStyle$tooltip === void 0 ? void 0 : _jssStyle$tooltip.call(jssStyle);
|
|
59186
59688
|
var config = useConfig();
|
|
59187
59689
|
var childrenProps = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(children) ? children === null || children === void 0 ? void 0 : children.props : {};
|
|
@@ -59198,7 +59700,8 @@ var Tooltip = function Tooltip(props) {
|
|
|
59198
59700
|
position = _usePopup.position,
|
|
59199
59701
|
getTargetProps = _usePopup.getTargetProps,
|
|
59200
59702
|
targetRef = _usePopup.targetRef,
|
|
59201
|
-
popupRef = _usePopup.popupRef
|
|
59703
|
+
popupRef = _usePopup.popupRef,
|
|
59704
|
+
arrowRef = _usePopup.arrowRef;
|
|
59202
59705
|
if (! /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(children)) {
|
|
59203
59706
|
console.error(new Error('Tooltip children expect a single ReactElement.'));
|
|
59204
59707
|
return null;
|
|
@@ -59229,12 +59732,16 @@ var Tooltip = function Tooltip(props) {
|
|
|
59229
59732
|
focus: open,
|
|
59230
59733
|
parentElRef: targetRef,
|
|
59231
59734
|
popupElRef: popupRef,
|
|
59735
|
+
arrowRef: arrowRef,
|
|
59232
59736
|
absolute: true,
|
|
59737
|
+
adjust: popsitionProps === 'auto',
|
|
59233
59738
|
position: position,
|
|
59234
59739
|
fixedWidth: false,
|
|
59235
|
-
popupGap: 0
|
|
59740
|
+
popupGap: 0
|
|
59741
|
+
// arrowStyleRef={arrowStyleRef}
|
|
59742
|
+
,
|
|
59236
59743
|
zIndex: zIndex,
|
|
59237
|
-
children: /*#__PURE__*/(0,jsx_runtime.
|
|
59744
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
59238
59745
|
className: classnames_default()(className, tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapper, open && (tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapperOpen))
|
|
59239
59746
|
}, getDataAttribute({
|
|
59240
59747
|
type: type,
|
|
@@ -59243,11 +59750,17 @@ var Tooltip = function Tooltip(props) {
|
|
|
59243
59750
|
ref: popupRef,
|
|
59244
59751
|
onMouseLeave: events.onMouseLeave,
|
|
59245
59752
|
dir: config.direction,
|
|
59246
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)("
|
|
59753
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", objectSpread2_default()({
|
|
59754
|
+
ref: arrowRef,
|
|
59755
|
+
style: arrowStyleRef.current,
|
|
59756
|
+
className: tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.arrow
|
|
59757
|
+
}, getDataAttribute({
|
|
59758
|
+
role: 'arrow'
|
|
59759
|
+
}))), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
59247
59760
|
style: style,
|
|
59248
59761
|
className: classnames_default()(tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.content),
|
|
59249
59762
|
children: tip
|
|
59250
|
-
})
|
|
59763
|
+
})]
|
|
59251
59764
|
}))
|
|
59252
59765
|
})]
|
|
59253
59766
|
});
|
|
@@ -64350,7 +64863,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
64350
64863
|
|
|
64351
64864
|
|
|
64352
64865
|
/* harmony default export */ var src_0 = ({
|
|
64353
|
-
version: '3.4.0-beta.
|
|
64866
|
+
version: '3.4.0-beta.6'
|
|
64354
64867
|
});
|
|
64355
64868
|
}();
|
|
64356
64869
|
/******/ return __webpack_exports__;
|