shineout 3.6.0-beta.8 → 3.6.0
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/alert/alert.d.ts +1 -2
- package/cjs/avatar/avatar.d.ts +1 -2
- package/cjs/avatar/group.d.ts +1 -2
- package/cjs/badge/badge.d.ts +1 -2
- package/cjs/breadcrumb/breadcrumb.d.ts +1 -2
- package/cjs/button/button.d.ts +1 -2
- package/cjs/button/group.d.ts +1 -2
- package/cjs/card/accordion.d.ts +1 -2
- package/cjs/card/body.d.ts +1 -2
- package/cjs/card/card.d.ts +1 -2
- package/cjs/card/footer.d.ts +1 -2
- package/cjs/card/header.d.ts +1 -2
- package/cjs/card/index.d.ts +5 -6
- package/cjs/card-group/card-group.d.ts +1 -2
- package/cjs/card-group/index.d.ts +1 -2
- package/cjs/card-group/item.d.ts +1 -2
- package/cjs/carousel/carousel.d.ts +1 -2
- package/cjs/cascader/cascader.d.ts +1 -2
- package/cjs/checkbox/checkbox.d.ts +1 -2
- package/cjs/checkbox/group.d.ts +1 -2
- package/cjs/collapse/collapse-item.d.ts +1 -2
- package/cjs/collapse/collapse.d.ts +1 -2
- package/cjs/date-picker/date-picker.d.ts +1 -2
- package/cjs/descriptions/descriptions.d.ts +1 -2
- package/cjs/divider/divider.d.ts +1 -2
- package/cjs/drawer/drawer.d.ts +1 -2
- package/cjs/dropdown/dropdown.d.ts +1 -2
- package/cjs/editable-area/editable-area.d.ts +1 -2
- package/cjs/empty/empty.d.ts +1 -2
- package/cjs/form/form-button.d.ts +3 -4
- package/cjs/form/form-field.d.ts +1 -2
- package/cjs/form/form-fieldset.d.ts +1 -2
- package/cjs/form/form-item.d.ts +1 -2
- package/cjs/form/form.d.ts +1 -2
- package/cjs/form/index.d.ts +6 -6
- package/cjs/gap/gap.d.ts +1 -2
- package/cjs/hooks/use-field-common.d.ts +1 -1
- package/cjs/icon/icon.d.ts +1 -2
- package/cjs/image/group.d.ts +1 -2
- package/cjs/image/image.d.ts +1 -2
- package/cjs/image/image.type.d.ts +2 -1
- package/cjs/index.js +1 -1
- package/cjs/input/group.d.ts +1 -2
- package/cjs/input/input.d.ts +1 -1
- package/cjs/input/number.d.ts +1 -2
- package/cjs/input/password.d.ts +1 -2
- package/cjs/link/link.d.ts +1 -2
- package/cjs/list/base-item.d.ts +1 -2
- package/cjs/list/list.d.ts +1 -2
- package/cjs/menu/menu.d.ts +1 -2
- package/cjs/menu/search.d.ts +1 -2
- package/cjs/modal/modal.d.ts +1 -2
- package/cjs/modal/submit.d.ts +1 -2
- package/cjs/pagination/pagination.d.ts +1 -2
- package/cjs/popover/confirm.d.ts +1 -2
- package/cjs/popover/popover.d.ts +2 -3
- package/cjs/progress/progress.d.ts +1 -2
- package/cjs/radio/group.d.ts +1 -2
- package/cjs/radio/radio.d.ts +1 -2
- package/cjs/rate/rate.d.ts +1 -2
- package/cjs/slider/slider.d.ts +1 -2
- package/cjs/spin/spin.d.ts +1 -2
- package/cjs/steps/interface.d.ts +1 -0
- package/cjs/steps/step.d.ts +1 -2
- package/cjs/steps/steps.d.ts +1 -2
- package/cjs/sticky/sticky.d.ts +1 -2
- package/cjs/switch/switch.d.ts +1 -2
- package/cjs/table/table.d.ts +1 -2
- package/cjs/table/table.js +3 -1
- package/cjs/tabs/tabs-panel.d.ts +1 -2
- package/cjs/tabs/tabs.d.ts +1 -2
- package/cjs/tag/tag-input.d.ts +1 -2
- package/cjs/tag/tag.d.ts +1 -2
- package/cjs/tests/t-01-tabs-link.d.ts +1 -2
- package/cjs/textarea/textarea.d.ts +1 -2
- package/cjs/tooltip/tooltip.d.ts +1 -2
- package/cjs/transfer/transfer.d.ts +1 -2
- package/cjs/tree/tree.d.ts +1 -2
- package/cjs/tree-select/tree-select.d.ts +1 -2
- package/cjs/upload/button.d.ts +1 -2
- package/cjs/upload/dragger.d.ts +3 -0
- package/cjs/upload/dragger.js +24 -0
- package/cjs/upload/dragger.type.d.ts +2 -0
- package/cjs/upload/dragger.type.js +5 -0
- package/cjs/upload/image.d.ts +1 -2
- package/cjs/upload/index.d.ts +6 -0
- package/cjs/upload/index.js +4 -0
- package/cjs/upload/interface.d.ts +1 -0
- package/cjs/upload/upload.d.ts +1 -2
- package/cjs/utils/dom/detect.d.ts +1 -1
- package/dist/shineout.js +1635 -807
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/alert/alert.d.ts +1 -2
- package/esm/avatar/avatar.d.ts +1 -2
- package/esm/avatar/group.d.ts +1 -2
- package/esm/badge/badge.d.ts +1 -2
- package/esm/breadcrumb/breadcrumb.d.ts +1 -2
- package/esm/button/button.d.ts +1 -2
- package/esm/button/group.d.ts +1 -2
- package/esm/card/accordion.d.ts +1 -2
- package/esm/card/body.d.ts +1 -2
- package/esm/card/card.d.ts +1 -2
- package/esm/card/footer.d.ts +1 -2
- package/esm/card/header.d.ts +1 -2
- package/esm/card/index.d.ts +5 -6
- package/esm/card-group/card-group.d.ts +1 -2
- package/esm/card-group/index.d.ts +1 -2
- package/esm/card-group/item.d.ts +1 -2
- package/esm/carousel/carousel.d.ts +1 -2
- package/esm/cascader/cascader.d.ts +1 -2
- package/esm/checkbox/checkbox.d.ts +1 -2
- package/esm/checkbox/group.d.ts +1 -2
- package/esm/collapse/collapse-item.d.ts +1 -2
- package/esm/collapse/collapse.d.ts +1 -2
- package/esm/date-picker/date-picker.d.ts +1 -2
- package/esm/descriptions/descriptions.d.ts +1 -2
- package/esm/divider/divider.d.ts +1 -2
- package/esm/drawer/drawer.d.ts +1 -2
- package/esm/dropdown/dropdown.d.ts +1 -2
- package/esm/editable-area/editable-area.d.ts +1 -2
- package/esm/empty/empty.d.ts +1 -2
- package/esm/form/form-button.d.ts +3 -4
- package/esm/form/form-field.d.ts +1 -2
- package/esm/form/form-fieldset.d.ts +1 -2
- package/esm/form/form-item.d.ts +1 -2
- package/esm/form/form.d.ts +1 -2
- package/esm/form/index.d.ts +6 -6
- package/esm/gap/gap.d.ts +1 -2
- package/esm/hooks/use-field-common.d.ts +1 -1
- package/esm/icon/icon.d.ts +1 -2
- package/esm/image/group.d.ts +1 -2
- package/esm/image/image.d.ts +1 -2
- package/esm/image/image.type.d.ts +2 -1
- package/esm/index.js +1 -1
- package/esm/input/group.d.ts +1 -2
- package/esm/input/input.d.ts +1 -1
- package/esm/input/number.d.ts +1 -2
- package/esm/input/password.d.ts +1 -2
- package/esm/link/link.d.ts +1 -2
- package/esm/list/base-item.d.ts +1 -2
- package/esm/list/list.d.ts +1 -2
- package/esm/menu/menu.d.ts +1 -2
- package/esm/menu/search.d.ts +1 -2
- package/esm/modal/modal.d.ts +1 -2
- package/esm/modal/submit.d.ts +1 -2
- package/esm/pagination/pagination.d.ts +1 -2
- package/esm/popover/confirm.d.ts +1 -2
- package/esm/popover/popover.d.ts +2 -3
- package/esm/progress/progress.d.ts +1 -2
- package/esm/radio/group.d.ts +1 -2
- package/esm/radio/radio.d.ts +1 -2
- package/esm/rate/rate.d.ts +1 -2
- package/esm/slider/slider.d.ts +1 -2
- package/esm/spin/spin.d.ts +1 -2
- package/esm/steps/interface.d.ts +1 -0
- package/esm/steps/step.d.ts +1 -2
- package/esm/steps/steps.d.ts +1 -2
- package/esm/sticky/sticky.d.ts +1 -2
- package/esm/switch/switch.d.ts +1 -2
- package/esm/table/table.d.ts +1 -2
- package/esm/table/table.js +4 -2
- package/esm/tabs/tabs-panel.d.ts +1 -2
- package/esm/tabs/tabs.d.ts +1 -2
- package/esm/tag/tag-input.d.ts +1 -2
- package/esm/tag/tag.d.ts +1 -2
- package/esm/tests/t-01-tabs-link.d.ts +1 -2
- package/esm/textarea/textarea.d.ts +1 -2
- package/esm/tooltip/tooltip.d.ts +1 -2
- package/esm/transfer/transfer.d.ts +1 -2
- package/esm/tree/tree.d.ts +1 -2
- package/esm/tree-select/tree-select.d.ts +1 -2
- package/esm/upload/button.d.ts +1 -2
- package/esm/upload/dragger.d.ts +3 -0
- package/esm/upload/dragger.js +18 -0
- package/esm/upload/dragger.type.d.ts +2 -0
- package/esm/upload/dragger.type.js +1 -0
- package/esm/upload/image.d.ts +1 -2
- package/esm/upload/index.d.ts +6 -0
- package/esm/upload/index.js +4 -0
- package/esm/upload/interface.d.ts +1 -0
- package/esm/upload/upload.d.ts +1 -2
- package/esm/utils/dom/detect.d.ts +1 -1
- package/package.json +5 -5
package/dist/shineout.js
CHANGED
|
@@ -6905,12 +6905,16 @@ var pcInfoCircleFill = /*#__PURE__*/(0,jsx_runtime.jsx)("path", {
|
|
|
6905
6905
|
});
|
|
6906
6906
|
var search = ['M11 2C15.9706 2 20 6.02944 20 11C20 13.1248 19.2637 15.0776 18.0323 16.6172L21.1213 19.7071C21.5118 20.0976 21.5118 20.7308 21.1213 21.1213C20.7308 21.5118 20.0976 21.5118 19.7071 21.1213L16.6172 18.0323C15.0776 19.2637 13.1248 20 11 20C6.02944 20 2 15.9706 2 11C2 6.02944 6.02944 2 11 2ZM11 4C7.13401 4 4 7.13401 4 11C4 14.866 7.13401 18 11 18C14.866 18 18 14.866 18 11C18 7.13401 14.866 4 11 4Z'];
|
|
6907
6907
|
var icons_link = ['M8.83231 20.7322C7.27024 22.2943 4.73759 22.2943 3.17546 20.7322C1.66545 19.2222 1.61512 16.8053 3.02446 15.2347L3.17546 15.0754L12.6109 3.70711C14.7588 1.55923 18.2412 1.55923 20.3891 3.70711C22.4773 5.79532 22.5353 9.14496 20.5631 11.3032L20.3891 11.4853L12.3679 21.4393C11.9773 21.8299 11.3442 21.8299 10.9536 21.4394C10.5932 21.0789 10.5654 20.5116 10.8705 20.1193L10.9536 20.0251L18.9749 10.0711C20.3417 8.70423 20.3417 6.48814 18.9749 5.12132C17.6569 3.8033 15.5492 3.75623 14.1747 4.9801L14.0251 5.12132L4.58968 16.4896C3.80864 17.2706 3.80864 18.537 4.58966 19.318C5.32963 20.058 6.5051 20.0969 7.29088 19.4348L7.41809 19.318L16.8535 7.94978C17.0488 7.7545 17.0488 7.43787 16.8536 7.24262C16.68 7.06904 16.4106 7.04975 16.2157 7.18476L16.1464 7.24261L8.12521 17.1967C7.73468 17.5873 7.10152 17.5873 6.71099 17.1967C6.35051 16.8362 6.32277 16.269 6.6278 15.8767L6.71099 15.7825L14.7322 5.8284C15.7085 4.85208 17.2915 4.85208 18.2678 5.82843C19.2016 6.7623 19.2422 8.25112 18.3896 9.23328L18.2678 9.36397L8.83231 20.7322Z'];
|
|
6908
|
+
var filter = /*#__PURE__*/(0,jsx_runtime.jsx)("path", {
|
|
6909
|
+
d: "M19.9653 2.10633C20.5175 2.10633 20.9652 2.55404 20.9652 3.10633C20.9652 3.65861 20.5175 4.10633 19.9653 4.10633H19.6834L14.9666 11.3709V19.8936C14.9666 20.9981 14.0712 21.8936 12.9666 21.8936H10.9666C9.86204 21.8936 8.96662 20.9981 8.96662 19.8936V11.3709L4.35408 4.10632L4.03906 4.10632C3.48677 4.10632 3.03906 3.65861 3.03906 3.10632C3.03906 2.55404 3.48677 2.10632 4.03906 2.10632L19.9653 2.10633ZM6.75776 4.10632L10.8119 10.5206C10.913 10.6804 10.9666 10.8657 10.9666 11.0548V18.8312C10.9666 19.3835 11.4143 19.8312 11.9666 19.8312C12.5189 19.8312 12.9666 19.3835 12.9666 18.8312V11.0609C12.9666 10.868 13.0224 10.6792 13.1273 10.5172L17.2797 4.10633L6.75776 4.10632Z"
|
|
6910
|
+
});
|
|
6908
6911
|
var Icons = {
|
|
6909
6912
|
SortAsc: SortAsc,
|
|
6910
6913
|
SortDesc: SortDesc,
|
|
6911
6914
|
Shrink: icon(ShineoutShrink),
|
|
6912
6915
|
Expand: icon(expand),
|
|
6913
6916
|
Search: icon(search),
|
|
6917
|
+
Filter: icon(filter),
|
|
6914
6918
|
ArrowLeft: icon(arrowLeft),
|
|
6915
6919
|
ArrowLeftDouble: icon(arrowLeftDouble),
|
|
6916
6920
|
ArrowRight: icon(arrowRight),
|
|
@@ -7061,13 +7065,18 @@ var config = {
|
|
|
7061
7065
|
SortUp: icons.SortAsc,
|
|
7062
7066
|
SortDown: icons.SortDesc,
|
|
7063
7067
|
Expand: icons.Expand,
|
|
7064
|
-
Collapse: icons.Shrink
|
|
7068
|
+
Collapse: icons.Shrink,
|
|
7069
|
+
Filter: icons.Filter,
|
|
7070
|
+
Search: icons.Search
|
|
7065
7071
|
},
|
|
7066
7072
|
tabs: {
|
|
7067
7073
|
Pre: icons.ArrowLeft,
|
|
7068
7074
|
Next: icons.ArrowRight,
|
|
7069
7075
|
CollapseArrow: icons.ArrowLeft
|
|
7070
7076
|
},
|
|
7077
|
+
textarea: {
|
|
7078
|
+
Close: icons.CloseFill
|
|
7079
|
+
},
|
|
7071
7080
|
transfer: {
|
|
7072
7081
|
DeleteAll: icons.Delete,
|
|
7073
7082
|
DeleteItem: icons.Close,
|
|
@@ -12130,7 +12139,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12130
12139
|
};
|
|
12131
12140
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12132
12141
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12133
|
-
/* harmony default export */ var version = ('3.6.0
|
|
12142
|
+
/* harmony default export */ var version = ('3.6.0');
|
|
12134
12143
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12135
12144
|
|
|
12136
12145
|
|
|
@@ -13160,24 +13169,24 @@ var cardTokens = {
|
|
|
13160
13169
|
cardBorderRadius: 'Radius-default',
|
|
13161
13170
|
cardFontColor: 'Neutral-text-5',
|
|
13162
13171
|
cardFontSize: 'Font-14',
|
|
13163
|
-
cardPaddingX: 'Spacing-
|
|
13172
|
+
cardPaddingX: 'Spacing-12',
|
|
13164
13173
|
cardPaddingY: 'Spacing-12',
|
|
13165
13174
|
cardTitleFontColor: 'Neutral-text-5',
|
|
13166
13175
|
cardTitleFontSize: 'Font-16',
|
|
13167
13176
|
cardTitleFontWeight: 'Weight-medium',
|
|
13168
13177
|
cardHeaderGap: '8px',
|
|
13169
|
-
cardHeaderExtraMarginX: 'Spacing-
|
|
13170
|
-
cardHeaderPaddingX: 'Spacing-
|
|
13178
|
+
cardHeaderExtraMarginX: 'Spacing-12',
|
|
13179
|
+
cardHeaderPaddingX: 'Spacing-12',
|
|
13171
13180
|
cardHeaderPaddingY: 'Spacing-12',
|
|
13172
13181
|
cardIndicatorSize: 'Size-7',
|
|
13173
13182
|
cardIndicatorColor: 'Neutral-text-4',
|
|
13174
|
-
cardBodyPaddingX: 'Spacing-
|
|
13183
|
+
cardBodyPaddingX: 'Spacing-12',
|
|
13175
13184
|
cardBodyPaddingY: 'Spacing-12',
|
|
13176
13185
|
cardBodyFontSize: 'Font-14',
|
|
13177
13186
|
cardBodyFontColor: 'Neutral-text-5',
|
|
13178
13187
|
cardBodyFontWeight: 'Weight-regular',
|
|
13179
13188
|
cardBodyBorderColor: 'Neutral-border-1',
|
|
13180
|
-
cardFooterPaddingX: 'Spacing-
|
|
13189
|
+
cardFooterPaddingX: 'Spacing-12',
|
|
13181
13190
|
cardFooterPaddingY: 'Spacing-12',
|
|
13182
13191
|
cardFooterBorderColor: 'Neutral-border-1'
|
|
13183
13192
|
};
|
|
@@ -13220,6 +13229,8 @@ var carouselTokens = {
|
|
|
13220
13229
|
carouselIndicatorLineWidth: 'Size-6',
|
|
13221
13230
|
carouselIndicatorLineHeight: 'Size-2',
|
|
13222
13231
|
carouselIndicatorLineGap: 'Spacing-4',
|
|
13232
|
+
carouselIndicatorBarWidth: 'Size-12',
|
|
13233
|
+
carouselIndicatorBarHeight: 'Size-2',
|
|
13223
13234
|
carouselIndicatorArrowSize: 'Size-8',
|
|
13224
13235
|
carouselIndicatorArrowColor: 'Neutral-fill-4',
|
|
13225
13236
|
carouselIndicatorArrowHoverColor: 'Neutral-fill-1',
|
|
@@ -13440,6 +13451,8 @@ var datePickerTokens = {
|
|
|
13440
13451
|
datePickerPaddingY: 'Spacing-4',
|
|
13441
13452
|
datePickerIconSize: 'Size-7',
|
|
13442
13453
|
datePickerIconColor: 'Neutral-text-4',
|
|
13454
|
+
datePickerSmallPanelFooterNowPaddingX: 'Spacing-16',
|
|
13455
|
+
datePickerSmallPanelFooterNowPaddingY: 'Spacing-11',
|
|
13443
13456
|
datePickerSmallFontSize: 'Font-12',
|
|
13444
13457
|
datePickerSmallPaddingX: 'Spacing-8',
|
|
13445
13458
|
datePickerSmallPaddingY: 'Spacing-1',
|
|
@@ -13827,6 +13840,7 @@ var inputTokens = {
|
|
|
13827
13840
|
inputInnerPaddingY: 'Spacing-1',
|
|
13828
13841
|
inputInnerFontSize: 'Font-14',
|
|
13829
13842
|
inputInnerFontColor: 'Neutral-text-4',
|
|
13843
|
+
inputInnerPlaceFontColor: 'Neutral-text-4',
|
|
13830
13844
|
inputInnerSmallPaddingX: 'Spacing-8',
|
|
13831
13845
|
inputInnerSmallPaddingY: 'Spacing-1',
|
|
13832
13846
|
inputInnerSmallFontSize: 'Font-12',
|
|
@@ -14521,12 +14535,29 @@ var tableTokens = {
|
|
|
14521
14535
|
tableTfootFontColor: 'Neutral-text-5',
|
|
14522
14536
|
tableTfootFontWeight: 'Weight-regular',
|
|
14523
14537
|
tableExpandIconSize: 'Size-7',
|
|
14524
|
-
tableExpandIconColor: 'Neutral-text-
|
|
14538
|
+
tableExpandIconColor: 'Neutral-text-2',
|
|
14525
14539
|
tableExpandIconHoverBackgroundColor: 'Neutral-fill-3',
|
|
14526
14540
|
tableExpandBackgroundColor: 'Neutral-fill-2',
|
|
14527
14541
|
tableSorterColor: 'Neutral-text-3',
|
|
14528
14542
|
tableSorterHoverColor: 'Neutral-text-4',
|
|
14529
14543
|
tableSorterActiveColor: 'Brand-6',
|
|
14544
|
+
tableFilterHeaderPaddingX: 'Spacing-12',
|
|
14545
|
+
tableFilterHeaderPaddingY: 'Spacing-12',
|
|
14546
|
+
tableFilterBodyPaddingX: 'Spacing-12',
|
|
14547
|
+
tableFilterBodyPaddingY: 'Spacing-8',
|
|
14548
|
+
tableFilterFooterPaddingX: 'Spacing-12',
|
|
14549
|
+
tableFilterFooterPaddingY: 'Spacing-8',
|
|
14550
|
+
tableFilterFooterBorderColor: 'Neutral-border-1',
|
|
14551
|
+
tableFilterInputMarginBottom: 'Spacing-8',
|
|
14552
|
+
tableFilterInputIconSize: 'Size-7',
|
|
14553
|
+
tableFilterInputIconColor: 'Neutral-text-4',
|
|
14554
|
+
tableFilterInputIconMarginRight: 'Spacing-8',
|
|
14555
|
+
tableFilterIconColor: 'Neutral-text-3',
|
|
14556
|
+
tableFilterIconHoverColor: 'Neutral-text-4',
|
|
14557
|
+
tableFilterIconHoverBackgroundColor: 'Neutral-fill-3',
|
|
14558
|
+
tableFilterIconActiveColor: 'Brand-6',
|
|
14559
|
+
tableFilterIconPadding: 'Spacing-4',
|
|
14560
|
+
tableFilterIconSize: 'Size-7',
|
|
14530
14561
|
tableResizeColor: 'Brand-7',
|
|
14531
14562
|
tableSelectionBorderColor: 'Brand-6',
|
|
14532
14563
|
tablePaginationMarginY: 'Spacing-12'
|
|
@@ -14565,12 +14596,12 @@ var tabsTokens = {
|
|
|
14565
14596
|
tabsLineFontColor: 'Neutral-text-5',
|
|
14566
14597
|
tabsLineFontWeight: 'Weight-regular',
|
|
14567
14598
|
tabsLineFontSize: 'Font-14',
|
|
14568
|
-
tabsLineBackgroundColor: '
|
|
14599
|
+
tabsLineBackgroundColor: 'transparent',
|
|
14569
14600
|
tabsLineActiveBackgroundColor: 'Neutral-fill-3',
|
|
14570
14601
|
tabsLineCheckedFontColor: 'Brand-6',
|
|
14571
14602
|
tabsLineCheckedFontSize: 'Font-14',
|
|
14572
14603
|
tabsLineCheckedFontWeight: 'Weight-medium',
|
|
14573
|
-
tabsLineCheckedBackgroundColor: '
|
|
14604
|
+
tabsLineCheckedBackgroundColor: 'transparent',
|
|
14574
14605
|
tabsLineHoverFontSize: 'Font-14',
|
|
14575
14606
|
tabsLineHoverBackgroundColor: 'Neutral-fill-2',
|
|
14576
14607
|
tabsLineDisabledFontColor: 'Neutral-text-2',
|
|
@@ -14973,7 +15004,12 @@ var textareaTokens = {
|
|
|
14973
15004
|
textareaInfoBorderColor: 'Neutral-border-2',
|
|
14974
15005
|
textareaInfoErrorFontColor: 'Danger-6',
|
|
14975
15006
|
textareaInfoErrorBackgroundColor: 'Danger-1',
|
|
14976
|
-
textareaInfoErrorBorderColor: 'Danger-6'
|
|
15007
|
+
textareaInfoErrorBorderColor: 'Danger-6',
|
|
15008
|
+
textareaLimitFontColor: 'Neutral-text-3',
|
|
15009
|
+
textareaLimitFontSize: 'Font-12',
|
|
15010
|
+
textareaClearColor: 'Neutral-text-3',
|
|
15011
|
+
textareaClearSize: 'Size-7',
|
|
15012
|
+
textareaClearHoverColor: 'Neutral-text-4'
|
|
14977
15013
|
};
|
|
14978
15014
|
/* harmony default export */ var textarea_textarea = (textareaTokens);
|
|
14979
15015
|
;// CONCATENATED MODULE: ../theme/src/textarea/index.ts
|
|
@@ -15052,6 +15088,7 @@ var transferTokens = {
|
|
|
15052
15088
|
|
|
15053
15089
|
var treeTokens = {
|
|
15054
15090
|
treeTextPaddingY: 'Spacing-2',
|
|
15091
|
+
treeTextPaddingX: 'Spacing-4',
|
|
15055
15092
|
treeCheckboxMarginX: 'Spacing-8',
|
|
15056
15093
|
treeFontSize: 'Font-14',
|
|
15057
15094
|
treeLineHeight: 'Size-18',
|
|
@@ -15070,15 +15107,16 @@ var treeTokens = {
|
|
|
15070
15107
|
treeItemActiveBackgroundColor: 'Neutral-fill-4',
|
|
15071
15108
|
treeItemActiveFontColor: 'Neutral-text-4',
|
|
15072
15109
|
treeItemDisabledFontColor: 'Neutral-text-2',
|
|
15110
|
+
treeContentBorderRadius: 'Radius-lesser',
|
|
15073
15111
|
treeContentHoverBackgroundColor: 'Neutral-fill-2',
|
|
15074
15112
|
treeContentHoverFontColor: 'Neutral-text-5',
|
|
15075
15113
|
treeContentActiveBackgroundColor: 'Brand-1',
|
|
15076
|
-
treeContentActiveFontColor: 'Brand-
|
|
15114
|
+
treeContentActiveFontColor: 'Brand-4',
|
|
15115
|
+
treeContentActiveBorderRadius: 'Radius-2',
|
|
15077
15116
|
treeContentDisabledBackgroundColor: 'Transprent',
|
|
15078
15117
|
treeContentDisabledFontColor: 'Neutral-text-5',
|
|
15079
15118
|
treeDragBorderColor: 'Brand-6',
|
|
15080
|
-
treeDragBackgroundColor: 'Brand-1'
|
|
15081
|
-
treeContentBorderRadius: 'Radius-lesser'
|
|
15119
|
+
treeDragBackgroundColor: 'Brand-1'
|
|
15082
15120
|
};
|
|
15083
15121
|
/* harmony default export */ var tree = (treeTokens);
|
|
15084
15122
|
;// CONCATENATED MODULE: ../theme/src/tree/index.ts
|
|
@@ -16020,6 +16058,22 @@ var ButtonStyle = {
|
|
|
16020
16058
|
},
|
|
16021
16059
|
'&:active': {
|
|
16022
16060
|
transition: 'none'
|
|
16061
|
+
},
|
|
16062
|
+
'[data-soui-role="input-group-seperate"] > &': {
|
|
16063
|
+
borderRadius: 0,
|
|
16064
|
+
marginLeft: -1,
|
|
16065
|
+
'&:first-child': {
|
|
16066
|
+
marginLeft: 0,
|
|
16067
|
+
borderTopLeftRadius: src.buttonBorderRadius,
|
|
16068
|
+
borderBottomLeftRadius: src.buttonBorderRadius
|
|
16069
|
+
},
|
|
16070
|
+
'&:last-child': {
|
|
16071
|
+
borderTopRightRadius: src.buttonBorderRadius,
|
|
16072
|
+
borderBottomRightRadius: src.buttonBorderRadius
|
|
16073
|
+
},
|
|
16074
|
+
'&:hover': {
|
|
16075
|
+
zIndex: 1
|
|
16076
|
+
}
|
|
16023
16077
|
}
|
|
16024
16078
|
},
|
|
16025
16079
|
small: {
|
|
@@ -16772,7 +16826,48 @@ var carouselStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
16772
16826
|
}
|
|
16773
16827
|
}
|
|
16774
16828
|
},
|
|
16775
|
-
|
|
16829
|
+
indicatorTypeBar: {
|
|
16830
|
+
'& $indicator': {
|
|
16831
|
+
position: 'relative',
|
|
16832
|
+
borderRadius: '100px',
|
|
16833
|
+
'&:first-child': {
|
|
16834
|
+
'&:before': {
|
|
16835
|
+
borderRadius: '100px 0 0 100px'
|
|
16836
|
+
}
|
|
16837
|
+
},
|
|
16838
|
+
'&:last-child': {
|
|
16839
|
+
'&:before': {
|
|
16840
|
+
borderRadius: '0 100px 100px 0'
|
|
16841
|
+
}
|
|
16842
|
+
},
|
|
16843
|
+
width: src.carouselIndicatorBarWidth,
|
|
16844
|
+
height: src.carouselIndicatorBarHeight
|
|
16845
|
+
},
|
|
16846
|
+
'& $indicator:before': {
|
|
16847
|
+
content: '""',
|
|
16848
|
+
position: 'absolute',
|
|
16849
|
+
zIndex: -1,
|
|
16850
|
+
top: 0,
|
|
16851
|
+
left: 0,
|
|
16852
|
+
width: '100%',
|
|
16853
|
+
height: '100%',
|
|
16854
|
+
background: src.carouselIndicatorBackgroundColor
|
|
16855
|
+
},
|
|
16856
|
+
'$indicatorLeft& $indicator, $indicatorRight& $indicator': {
|
|
16857
|
+
width: src.carouselIndicatorBarHeight,
|
|
16858
|
+
height: src.carouselIndicatorBarWidth,
|
|
16859
|
+
'&:first-child': {
|
|
16860
|
+
'&:before': {
|
|
16861
|
+
borderRadius: '100px 100px 0 0'
|
|
16862
|
+
}
|
|
16863
|
+
},
|
|
16864
|
+
'&:last-child': {
|
|
16865
|
+
'&:before': {
|
|
16866
|
+
borderRadius: '0 0 100px 100px'
|
|
16867
|
+
}
|
|
16868
|
+
}
|
|
16869
|
+
}
|
|
16870
|
+
},
|
|
16776
16871
|
indicatorArrow: {
|
|
16777
16872
|
width: src.carouselIndicatorArrowSize,
|
|
16778
16873
|
height: src.carouselIndicatorArrowSize,
|
|
@@ -16839,6 +16934,7 @@ var useCarouselStyle = styled(carousel_carousel, 'carousel');
|
|
|
16839
16934
|
verticalAlign: 'top',
|
|
16840
16935
|
transition: "border-color .15s ease-in-out,box-shadow .15s ease-in-out;",
|
|
16841
16936
|
'&:hover': defineProperty_default()({
|
|
16937
|
+
zIndex: 1,
|
|
16842
16938
|
borderColor: token.hoverBorderColor
|
|
16843
16939
|
}, "&:not($".concat(name, "Disabled):not($").concat(name, "Error)"), {
|
|
16844
16940
|
backgroundColor: token.hoverBackgroundColor
|
|
@@ -16848,11 +16944,34 @@ var useCarouselStyle = styled(carousel_carousel, 'carousel');
|
|
|
16848
16944
|
borderRadius: 0,
|
|
16849
16945
|
boxShadow: 'none',
|
|
16850
16946
|
backgroundColor: 'transparent',
|
|
16851
|
-
flex: 1,
|
|
16947
|
+
// flex: 1,
|
|
16852
16948
|
minWidth: 0
|
|
16853
16949
|
},
|
|
16854
16950
|
'[data-soui-role="input-group"] [data-soui-input-border] + &': {
|
|
16855
16951
|
borderLeftWidth: '1px'
|
|
16952
|
+
},
|
|
16953
|
+
'[data-soui-role="input-group-seperate"] &&&, [data-soui-role="input-group-seperate"] &&&:hover': {
|
|
16954
|
+
borderRadius: 0,
|
|
16955
|
+
flexShrink: 0,
|
|
16956
|
+
width: 'auto',
|
|
16957
|
+
'margin-left': "-1px",
|
|
16958
|
+
'&:first-child': {
|
|
16959
|
+
marginLeft: 0,
|
|
16960
|
+
borderTopLeftRadius: token.borderRadius,
|
|
16961
|
+
borderBottomLeftRadius: token.borderRadius
|
|
16962
|
+
},
|
|
16963
|
+
'&:last-child': {
|
|
16964
|
+
borderTopRightRadius: token.borderRadius,
|
|
16965
|
+
borderBottomRightRadius: token.borderRadius
|
|
16966
|
+
}
|
|
16967
|
+
},
|
|
16968
|
+
'[dir=rtl][data-soui-role="input-group-seperate"] &&&, [dir=rtl][data-soui-role="input-group-seperate"] &&&:hover': {
|
|
16969
|
+
'&:first-child': {
|
|
16970
|
+
borderRadius: "0 ".concat(token.borderRadius, " ").concat(token.borderRadius, " 0")
|
|
16971
|
+
},
|
|
16972
|
+
'&:last-child': {
|
|
16973
|
+
borderRadius: "".concat(token.borderRadius, " 0 0 ").concat(token.borderRadius)
|
|
16974
|
+
}
|
|
16856
16975
|
}
|
|
16857
16976
|
}), "".concat(name, "PaddingBox"), defineProperty_default()(defineProperty_default()(defineProperty_default()({
|
|
16858
16977
|
borderRadius: token.borderRadius
|
|
@@ -16894,6 +17013,12 @@ var useCarouselStyle = styled(carousel_carousel, 'carousel');
|
|
|
16894
17013
|
borderColor: token.focusBorderColor,
|
|
16895
17014
|
boxShadow: "0 0 0 2px ".concat(token.focusShadow),
|
|
16896
17015
|
background: token.focusBackgroundColor,
|
|
17016
|
+
'&[data-soui-role="input-group-seperate"]': {
|
|
17017
|
+
boxShadow: 'none'
|
|
17018
|
+
},
|
|
17019
|
+
'[data-soui-role="input-group-seperate"] &': {
|
|
17020
|
+
zIndex: 1
|
|
17021
|
+
},
|
|
16897
17022
|
'&:hover': {
|
|
16898
17023
|
borderColor: token.focusBorderColor
|
|
16899
17024
|
}
|
|
@@ -18155,11 +18280,22 @@ var datePickerStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
18155
18280
|
pickerFooter: {
|
|
18156
18281
|
borderTop: "1px solid ".concat(src.datePickerPanelHeaderBorderColor),
|
|
18157
18282
|
display: 'flex',
|
|
18158
|
-
justifyContent: 'space-between'
|
|
18283
|
+
justifyContent: 'space-between',
|
|
18284
|
+
'&[dir=rtl] $pickerFooterConfirm': {
|
|
18285
|
+
'margin-right': 'auto'
|
|
18286
|
+
},
|
|
18287
|
+
'&[dir=ltr] $pickerFooterConfirm': {
|
|
18288
|
+
'margin-left': 'auto'
|
|
18289
|
+
}
|
|
18159
18290
|
},
|
|
18160
18291
|
pickerFooterTime: {
|
|
18161
18292
|
padding: "".concat(src.datePickerPanelFooterPaddingY, " ").concat(src.datePickerPanelFooterPaddingX)
|
|
18162
18293
|
},
|
|
18294
|
+
wrapperSmall: {
|
|
18295
|
+
'& $pickerFooterNow': {
|
|
18296
|
+
padding: "".concat(src.datePickerSmallPanelFooterNowPaddingY, " ").concat(src.datePickerSmallPanelFooterNowPaddingX)
|
|
18297
|
+
}
|
|
18298
|
+
},
|
|
18163
18299
|
pickerFooterNow: {
|
|
18164
18300
|
padding: "".concat(src.datePickerPanelFooterPaddingY, " ").concat(src.datePickerPanelFooterPaddingX),
|
|
18165
18301
|
'&:only-child': {
|
|
@@ -18617,6 +18753,7 @@ var descriptionsStyle = {
|
|
|
18617
18753
|
valueInline: {
|
|
18618
18754
|
paddingRight: src.descriptionsLabelPaddingRight,
|
|
18619
18755
|
textAlign: 'left',
|
|
18756
|
+
wordBreak: 'break-all',
|
|
18620
18757
|
boxSizing: 'border-box',
|
|
18621
18758
|
color: src.descriptionsValueColor
|
|
18622
18759
|
},
|
|
@@ -18632,11 +18769,10 @@ var descriptionsStyle = {
|
|
|
18632
18769
|
},
|
|
18633
18770
|
inlineHorizontal: {
|
|
18634
18771
|
'& $item': {
|
|
18635
|
-
display: 'flex'
|
|
18636
|
-
alignItems: 'center'
|
|
18772
|
+
display: 'flex'
|
|
18637
18773
|
},
|
|
18638
18774
|
'& $cell': {
|
|
18639
|
-
verticalAlign: '
|
|
18775
|
+
verticalAlign: 'top'
|
|
18640
18776
|
},
|
|
18641
18777
|
'& $row': {
|
|
18642
18778
|
'&>td': {
|
|
@@ -19152,8 +19288,29 @@ var useEmptyStyle = styled(empty_empty, 'empty');
|
|
|
19152
19288
|
/* harmony default export */ var shineout_style_src_empty = ((/* unused pure expression or super */ null && (useEmptyStyle)));
|
|
19153
19289
|
;// CONCATENATED MODULE: ../shineout-style/src/form/form-item.ts
|
|
19154
19290
|
|
|
19155
|
-
|
|
19156
|
-
|
|
19291
|
+
|
|
19292
|
+
var form_item_animations = {
|
|
19293
|
+
'@keyframes appear': {
|
|
19294
|
+
'0%': {
|
|
19295
|
+
transform: 1
|
|
19296
|
+
},
|
|
19297
|
+
'25%': {
|
|
19298
|
+
opacity: 0.5
|
|
19299
|
+
},
|
|
19300
|
+
'50%': {
|
|
19301
|
+
opacity: 1
|
|
19302
|
+
},
|
|
19303
|
+
'75%': {
|
|
19304
|
+
opacity: 0.5
|
|
19305
|
+
},
|
|
19306
|
+
'100%': {
|
|
19307
|
+
transform: 1
|
|
19308
|
+
}
|
|
19309
|
+
}
|
|
19310
|
+
};
|
|
19311
|
+
var formItemStyle = objectSpread2_default()(objectSpread2_default()({
|
|
19312
|
+
rootClass: {}
|
|
19313
|
+
}, form_item_animations), {}, {
|
|
19157
19314
|
wrapper: {
|
|
19158
19315
|
display: 'flex',
|
|
19159
19316
|
alignItems: 'flex-start',
|
|
@@ -19284,7 +19441,8 @@ var formItemStyle = {
|
|
|
19284
19441
|
lineHeight: src.lineHeightDynamic,
|
|
19285
19442
|
minHeight: src.formItemTipMinHeight,
|
|
19286
19443
|
fontSize: src.formItemDangerFontSize,
|
|
19287
|
-
fontWeight: src.formItemDangerFontWeight
|
|
19444
|
+
fontWeight: src.formItemDangerFontWeight,
|
|
19445
|
+
animation: '$appear 1s ease-in-out forwards'
|
|
19288
19446
|
// flexBasis: '100%',
|
|
19289
19447
|
// width: 0,
|
|
19290
19448
|
},
|
|
@@ -19297,7 +19455,7 @@ var formItemStyle = {
|
|
|
19297
19455
|
marginTop: src.formItemTipMarginTop,
|
|
19298
19456
|
width: '100%'
|
|
19299
19457
|
}
|
|
19300
|
-
};
|
|
19458
|
+
});
|
|
19301
19459
|
/* harmony default export */ var form_item = (formItemStyle);
|
|
19302
19460
|
;// CONCATENATED MODULE: ../shineout-style/src/form/form.ts
|
|
19303
19461
|
|
|
@@ -19948,7 +20106,8 @@ var innerTitle = objectSpread2_default()(objectSpread2_default()({
|
|
|
19948
20106
|
pointerEvents: 'none',
|
|
19949
20107
|
'& $title': {
|
|
19950
20108
|
position: 'relative',
|
|
19951
|
-
top: 0
|
|
20109
|
+
top: 0,
|
|
20110
|
+
color: src.inputInnerPlaceFontColor
|
|
19952
20111
|
},
|
|
19953
20112
|
'$animation$wrapperOpen & $title': {
|
|
19954
20113
|
animation: "$movein ".concat(moveTime, " ease-in")
|
|
@@ -20191,6 +20350,13 @@ var input_input = objectSpread2_default()(objectSpread2_default()(objectSpread2_
|
|
|
20191
20350
|
background: 'transparent'
|
|
20192
20351
|
}
|
|
20193
20352
|
}, groupSpace(src.inputPaddingX)),
|
|
20353
|
+
groupSeperate: {
|
|
20354
|
+
border: 'none',
|
|
20355
|
+
'& > b': {
|
|
20356
|
+
border: "1px solid ".concat(src.inputBorderColor),
|
|
20357
|
+
'margin-left': '-1px'
|
|
20358
|
+
}
|
|
20359
|
+
},
|
|
20194
20360
|
groupSmall: objectSpread2_default()(objectSpread2_default()({}, groupSmall), groupSpace(src.inputSmallPaddingX)),
|
|
20195
20361
|
groupLarge: objectSpread2_default()(objectSpread2_default()({}, groupLarge), groupSpace(src.inputLargePaddingX))
|
|
20196
20362
|
}, resetGroup), {}, {
|
|
@@ -22000,7 +22166,10 @@ var usePaginationStyle = styled(pagination_pagination, 'pagination');
|
|
|
22000
22166
|
|
|
22001
22167
|
var popover_cssvar = '--popover-arrow-gap';
|
|
22002
22168
|
var hideArrowGap = "var(".concat(popover_cssvar, ", 10px)");
|
|
22169
|
+
var extraArrowGap = 'var(--popover-arrow-gap-extra, 0px)';
|
|
22003
22170
|
var arrowMargin = '8px';
|
|
22171
|
+
var poyfillPos = "calc((".concat(hideArrowGap, " + ").concat(extraArrowGap, ") * -1)");
|
|
22172
|
+
var poyfillHeight = "calc((".concat(hideArrowGap, " + ").concat(extraArrowGap, "))");
|
|
22004
22173
|
var popoverStyle = {
|
|
22005
22174
|
rootClass: {},
|
|
22006
22175
|
wrapper: {
|
|
@@ -22040,12 +22209,12 @@ var popoverStyle = {
|
|
|
22040
22209
|
margin: 'auto'
|
|
22041
22210
|
},
|
|
22042
22211
|
'&::after': {
|
|
22043
|
-
top:
|
|
22212
|
+
top: poyfillPos,
|
|
22044
22213
|
left: '0',
|
|
22045
22214
|
right: '0',
|
|
22046
22215
|
content: '" "',
|
|
22047
22216
|
display: 'block',
|
|
22048
|
-
height:
|
|
22217
|
+
height: poyfillHeight,
|
|
22049
22218
|
position: 'absolute'
|
|
22050
22219
|
}
|
|
22051
22220
|
},
|
|
@@ -22061,24 +22230,22 @@ var popoverStyle = {
|
|
|
22061
22230
|
},
|
|
22062
22231
|
'&::after': {
|
|
22063
22232
|
// bottom: arrowGap * -1,
|
|
22064
|
-
bottom:
|
|
22233
|
+
bottom: poyfillPos,
|
|
22065
22234
|
left: '0',
|
|
22066
22235
|
right: '0',
|
|
22067
22236
|
content: '" "',
|
|
22068
22237
|
display: 'block',
|
|
22069
22238
|
// height: arrowGap,
|
|
22070
|
-
height:
|
|
22239
|
+
height: poyfillHeight,
|
|
22071
22240
|
position: 'absolute'
|
|
22072
22241
|
}
|
|
22073
22242
|
},
|
|
22074
22243
|
'&[data-soui-position^="left"]': {
|
|
22075
|
-
// '&[dir=ltr]': { marginLeft: (arrowGap - 2) * -1 },
|
|
22076
22244
|
'&[dir=ltr]': {
|
|
22077
|
-
|
|
22245
|
+
marginRight: "calc((".concat(hideArrowGap, " - 2px))")
|
|
22078
22246
|
},
|
|
22079
|
-
// '&[dir=rtl]': { marginRight: (arrowGap - 2) * -1 },
|
|
22080
22247
|
'&[dir=rtl]': {
|
|
22081
|
-
|
|
22248
|
+
marginLeft: "calc((".concat(hideArrowGap, " - 2px))")
|
|
22082
22249
|
},
|
|
22083
22250
|
'& $arrow': {
|
|
22084
22251
|
right: src.popoverBorderWidth,
|
|
@@ -22088,22 +22255,19 @@ var popoverStyle = {
|
|
|
22088
22255
|
margin: 'auto'
|
|
22089
22256
|
},
|
|
22090
22257
|
'&::after': {
|
|
22091
|
-
|
|
22092
|
-
right: "calc(".concat(hideArrowGap, " * -1)"),
|
|
22258
|
+
right: poyfillPos,
|
|
22093
22259
|
top: '0',
|
|
22094
22260
|
bottom: '0',
|
|
22095
22261
|
content: '" "',
|
|
22096
22262
|
display: 'block',
|
|
22097
|
-
width:
|
|
22263
|
+
width: poyfillHeight,
|
|
22098
22264
|
position: 'absolute'
|
|
22099
22265
|
}
|
|
22100
22266
|
},
|
|
22101
22267
|
'&[data-soui-position^="right"]': {
|
|
22102
|
-
// '&[dir=ltr]': { marginLeft: arrowGap - 2 },
|
|
22103
22268
|
'&[dir=ltr]': {
|
|
22104
22269
|
marginLeft: "calc(".concat(hideArrowGap, " - 2px)")
|
|
22105
22270
|
},
|
|
22106
|
-
// '&[dir=rtl]': { marginRight: arrowGap - 2 },
|
|
22107
22271
|
'&[dir=rtl]': {
|
|
22108
22272
|
marginRight: "calc(".concat(hideArrowGap, " - 2px)")
|
|
22109
22273
|
},
|
|
@@ -22116,13 +22280,13 @@ var popoverStyle = {
|
|
|
22116
22280
|
},
|
|
22117
22281
|
'&::after': {
|
|
22118
22282
|
// left: arrowGap * -1,
|
|
22119
|
-
left:
|
|
22283
|
+
left: poyfillPos,
|
|
22120
22284
|
top: '0',
|
|
22121
22285
|
bottom: '0',
|
|
22122
22286
|
content: '" "',
|
|
22123
22287
|
display: 'block',
|
|
22124
22288
|
// width: arrowGap,
|
|
22125
|
-
width:
|
|
22289
|
+
width: poyfillHeight,
|
|
22126
22290
|
position: 'absolute'
|
|
22127
22291
|
}
|
|
22128
22292
|
},
|
|
@@ -22971,7 +23135,10 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
22971
23135
|
borderRadius: src.selectPanelRadius,
|
|
22972
23136
|
transformOrigin: '0 0',
|
|
22973
23137
|
border: "1px solid ".concat(src.selectPanelBorder),
|
|
22974
|
-
cursor: 'initial'
|
|
23138
|
+
cursor: 'initial',
|
|
23139
|
+
'& [data-soui-role="scroll"]': {
|
|
23140
|
+
overscrollBehavior: 'none'
|
|
23141
|
+
}
|
|
22975
23142
|
},
|
|
22976
23143
|
pickerSmall: {
|
|
22977
23144
|
'& $optionInner': {
|
|
@@ -23311,12 +23478,17 @@ var sliderStyle = {
|
|
|
23311
23478
|
cursor: 'pointer',
|
|
23312
23479
|
borderRadius: '100px',
|
|
23313
23480
|
height: src.sliderTrackSize,
|
|
23314
|
-
|
|
23481
|
+
borderTop: "".concat(src.sliderScaleMarginY, " solid transparent"),
|
|
23482
|
+
borderBottom: "".concat(src.sliderScaleMarginY, " solid transparent"),
|
|
23483
|
+
boxSizing: 'content-box',
|
|
23315
23484
|
backgroundColor: src.sliderTrackBackgroundColor,
|
|
23316
23485
|
position: 'relative',
|
|
23486
|
+
backgroundClip: 'content-box',
|
|
23317
23487
|
'$vertical &': {
|
|
23318
23488
|
width: src.sliderTrackSize,
|
|
23319
|
-
height: '100%'
|
|
23489
|
+
height: '100%',
|
|
23490
|
+
borderLeft: "".concat(src.sliderScaleMarginY, " solid transparent"),
|
|
23491
|
+
borderRight: "".concat(src.sliderScaleMarginY, " solid transparent")
|
|
23320
23492
|
},
|
|
23321
23493
|
'$disabled &': {
|
|
23322
23494
|
cursor: 'not-allowed'
|
|
@@ -23536,7 +23708,7 @@ var sliderStyle = {
|
|
|
23536
23708
|
backgroundColor: src.sliderScaleLineBackgroundColor
|
|
23537
23709
|
},
|
|
23538
23710
|
'$wrapper:not($vertical) &': {
|
|
23539
|
-
marginTop:
|
|
23711
|
+
// marginTop: token.sliderScaleMarginY,
|
|
23540
23712
|
width: 0,
|
|
23541
23713
|
'&::before': {
|
|
23542
23714
|
width: '1px',
|
|
@@ -23550,7 +23722,7 @@ var sliderStyle = {
|
|
|
23550
23722
|
// '&:last-child $label[dir=rtl]': { transform: 'translate(100%)' },
|
|
23551
23723
|
},
|
|
23552
23724
|
'$vertical &': {
|
|
23553
|
-
marginLeft:
|
|
23725
|
+
// marginLeft: token.sliderScaleMarginY,
|
|
23554
23726
|
height: 0,
|
|
23555
23727
|
'&::before': {
|
|
23556
23728
|
height: '1px',
|
|
@@ -25341,6 +25513,7 @@ var resizeIndex = 8;
|
|
|
25341
25513
|
var fixedFixedIndex = 10;
|
|
25342
25514
|
var headerIndex = 12;
|
|
25343
25515
|
var loadingIndex = 16;
|
|
25516
|
+
var shadowWidth = 12;
|
|
25344
25517
|
var globalStyle = {
|
|
25345
25518
|
'@global': {
|
|
25346
25519
|
'body[data-soui-table-selection] *::selection': {
|
|
@@ -25382,7 +25555,6 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
25382
25555
|
zIndex: cellBaseIndex,
|
|
25383
25556
|
top: 0,
|
|
25384
25557
|
bottom: 0,
|
|
25385
|
-
background: src.tableCellBorderColor,
|
|
25386
25558
|
borderLeft: "1px solid ".concat(src.tableCellBorderColor)
|
|
25387
25559
|
},
|
|
25388
25560
|
'[dir=ltr]&::after': {
|
|
@@ -25485,6 +25657,7 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
25485
25657
|
},
|
|
25486
25658
|
'&::after': {
|
|
25487
25659
|
position: 'absolute',
|
|
25660
|
+
zIndex: fixedFixedIndex + 3,
|
|
25488
25661
|
content: '""',
|
|
25489
25662
|
display: 'block',
|
|
25490
25663
|
bottom: 0,
|
|
@@ -25604,16 +25777,16 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
25604
25777
|
position: 'absolute',
|
|
25605
25778
|
top: 0,
|
|
25606
25779
|
bottom: -1,
|
|
25607
|
-
width:
|
|
25608
|
-
pointerEvents: 'none'
|
|
25780
|
+
width: "".concat(shadowWidth, "px"),
|
|
25781
|
+
pointerEvents: 'none',
|
|
25782
|
+
boxShadow: 'inset 8px 0 10px -6px rgba(2,11,24,.1)'
|
|
25783
|
+
// border: 'none',
|
|
25609
25784
|
},
|
|
25610
25785
|
'&[dir=ltr]::after': {
|
|
25611
|
-
right:
|
|
25612
|
-
background: "linear-gradient(90deg, ".concat(src.tableFixedShadow, ", transparent)")
|
|
25786
|
+
right: "-".concat(shadowWidth, "px")
|
|
25613
25787
|
},
|
|
25614
25788
|
'&[dir=rtl]::after': {
|
|
25615
|
-
left:
|
|
25616
|
-
background: "linear-gradient(270deg, ".concat(src.tableFixedShadow, ",transparent)")
|
|
25789
|
+
left: "-".concat(shadowWidth, "px")
|
|
25617
25790
|
}
|
|
25618
25791
|
},
|
|
25619
25792
|
'& table': {
|
|
@@ -25637,16 +25810,15 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
25637
25810
|
position: 'absolute',
|
|
25638
25811
|
top: 0,
|
|
25639
25812
|
bottom: 0,
|
|
25640
|
-
width:
|
|
25641
|
-
pointerEvents: 'none'
|
|
25813
|
+
width: "".concat(shadowWidth, "px"),
|
|
25814
|
+
pointerEvents: 'none',
|
|
25815
|
+
boxShadow: 'inset -8px 0 10px -6px rgba(2,11,24,.1)'
|
|
25642
25816
|
},
|
|
25643
25817
|
'&[dir=rtl]::before': {
|
|
25644
|
-
right:
|
|
25645
|
-
background: "linear-gradient(90deg, ".concat(src.tableFixedShadow, ", transparent)")
|
|
25818
|
+
right: "-".concat(shadowWidth, "px")
|
|
25646
25819
|
},
|
|
25647
25820
|
'&[dir=ltr]::before': {
|
|
25648
|
-
left:
|
|
25649
|
-
background: "linear-gradient(270deg, ".concat(src.tableFixedShadow, ",transparent)")
|
|
25821
|
+
left: "-".concat(shadowWidth, "px")
|
|
25650
25822
|
}
|
|
25651
25823
|
},
|
|
25652
25824
|
'& table': {
|
|
@@ -25667,6 +25839,69 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
25667
25839
|
display: 'inline-flex',
|
|
25668
25840
|
alignItems: 'center'
|
|
25669
25841
|
},
|
|
25842
|
+
hasFilter: {
|
|
25843
|
+
display: 'inline-flex',
|
|
25844
|
+
alignItems: 'center'
|
|
25845
|
+
},
|
|
25846
|
+
filterIconContainer: {
|
|
25847
|
+
'&:hover $filterIcon': {
|
|
25848
|
+
color: src.tableFilterIconHoverColor
|
|
25849
|
+
}
|
|
25850
|
+
},
|
|
25851
|
+
filterIcon: {
|
|
25852
|
+
width: src.tableFilterIconSize,
|
|
25853
|
+
height: src.tableFilterIconSize,
|
|
25854
|
+
color: src.tableFilterIconColor,
|
|
25855
|
+
'& > svg': {
|
|
25856
|
+
display: 'block'
|
|
25857
|
+
}
|
|
25858
|
+
},
|
|
25859
|
+
filterActive: {
|
|
25860
|
+
'& $filterIcon, &:hover $filterIcon': {
|
|
25861
|
+
color: src.tableFilterIconActiveColor
|
|
25862
|
+
}
|
|
25863
|
+
},
|
|
25864
|
+
filterContainer: {
|
|
25865
|
+
minWidth: '120px'
|
|
25866
|
+
},
|
|
25867
|
+
filterHeader: {
|
|
25868
|
+
padding: "".concat(src.tableFilterHeaderPaddingY, " ").concat(src.tableFilterHeaderPaddingX),
|
|
25869
|
+
'& + $filterBody': {
|
|
25870
|
+
paddingTop: 0
|
|
25871
|
+
}
|
|
25872
|
+
},
|
|
25873
|
+
filterBody: {
|
|
25874
|
+
padding: "".concat(src.tableFilterBodyPaddingY, " ").concat(src.tableFilterBodyPaddingX),
|
|
25875
|
+
maxHeight: '300px',
|
|
25876
|
+
overflow: 'auto'
|
|
25877
|
+
},
|
|
25878
|
+
filterFooter: {
|
|
25879
|
+
display: 'flex',
|
|
25880
|
+
justifyContent: 'flex-end',
|
|
25881
|
+
padding: "".concat(src.tableFilterFooterPaddingY, " ").concat(src.tableFilterFooterPaddingX),
|
|
25882
|
+
borderTop: "1px solid ".concat(src.tableFilterFooterBorderColor)
|
|
25883
|
+
},
|
|
25884
|
+
filterInput: {
|
|
25885
|
+
cursor: 'pointer'
|
|
25886
|
+
},
|
|
25887
|
+
filterInputIcon: {
|
|
25888
|
+
color: src.tableFilterInputIconColor,
|
|
25889
|
+
flexShrink: 0,
|
|
25890
|
+
width: src.tableFilterInputIconSize,
|
|
25891
|
+
height: src.tableFilterInputIconSize,
|
|
25892
|
+
marginRight: src.tableFilterInputIconMarginRight,
|
|
25893
|
+
'& > svg': {
|
|
25894
|
+
display: 'block'
|
|
25895
|
+
}
|
|
25896
|
+
},
|
|
25897
|
+
filterRadio: {
|
|
25898
|
+
display: 'flex',
|
|
25899
|
+
alignItems: 'center',
|
|
25900
|
+
cursor: 'pointer',
|
|
25901
|
+
'& > div': {
|
|
25902
|
+
marginRight: 0
|
|
25903
|
+
}
|
|
25904
|
+
},
|
|
25670
25905
|
sorterContainer: {
|
|
25671
25906
|
minWidth: '14px',
|
|
25672
25907
|
width: '14px',
|
|
@@ -27035,6 +27270,37 @@ var textarea_input = objectSpread2_default()(objectSpread2_default()(objectSprea
|
|
|
27035
27270
|
borderRadius: 0,
|
|
27036
27271
|
width: '100%',
|
|
27037
27272
|
boxSizing: 'border-box'
|
|
27273
|
+
},
|
|
27274
|
+
limit: {
|
|
27275
|
+
position: 'absolute',
|
|
27276
|
+
right: 12,
|
|
27277
|
+
bottom: 6,
|
|
27278
|
+
color: src.textareaLimitFontColor,
|
|
27279
|
+
fontSize: src.textareaLimitFontSize,
|
|
27280
|
+
'$resize + &': {
|
|
27281
|
+
right: 16
|
|
27282
|
+
}
|
|
27283
|
+
},
|
|
27284
|
+
clear: {
|
|
27285
|
+
position: 'absolute',
|
|
27286
|
+
right: src.textareaPaddingX,
|
|
27287
|
+
top: src.textareaPaddingY,
|
|
27288
|
+
cursor: 'pointer',
|
|
27289
|
+
padding: 4,
|
|
27290
|
+
color: src.textareaClearColor,
|
|
27291
|
+
'&:hover': {
|
|
27292
|
+
color: src.textareaClearHoverColor
|
|
27293
|
+
},
|
|
27294
|
+
'& > svg': {
|
|
27295
|
+
display: 'block',
|
|
27296
|
+
width: src.textareaClearSize,
|
|
27297
|
+
height: src.textareaClearSize
|
|
27298
|
+
}
|
|
27299
|
+
},
|
|
27300
|
+
wrapperWithClear: {
|
|
27301
|
+
'&& $textarea': {
|
|
27302
|
+
paddingRight: "calc(".concat(src.textareaPaddingX, " * 4)")
|
|
27303
|
+
}
|
|
27038
27304
|
}
|
|
27039
27305
|
});
|
|
27040
27306
|
/* harmony default export */ var src_textarea_textarea = (textarea_input);
|
|
@@ -27152,13 +27418,13 @@ var tooltipStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
27152
27418
|
},
|
|
27153
27419
|
'&[data-soui-position^="left"]': {
|
|
27154
27420
|
'&[dir=ltr]': {
|
|
27155
|
-
|
|
27421
|
+
marginRight: arrowGap - 2,
|
|
27156
27422
|
'& $arrow': {
|
|
27157
27423
|
transform: 'translateX(11px) rotate(90deg)'
|
|
27158
27424
|
}
|
|
27159
27425
|
},
|
|
27160
27426
|
'&[dir=rtl]': {
|
|
27161
|
-
|
|
27427
|
+
'margin-right': arrowGap - 2,
|
|
27162
27428
|
'& $arrow': {
|
|
27163
27429
|
left: 0,
|
|
27164
27430
|
transform: 'translateX(11px) rotate(90deg)'
|
|
@@ -27222,7 +27488,7 @@ var tooltipStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
27222
27488
|
width: arrowGap,
|
|
27223
27489
|
height: '100%',
|
|
27224
27490
|
top: 0,
|
|
27225
|
-
|
|
27491
|
+
left: 0,
|
|
27226
27492
|
transform: 'translateX(-100%)'
|
|
27227
27493
|
}
|
|
27228
27494
|
}
|
|
@@ -27497,6 +27763,14 @@ var treeStyle = {
|
|
|
27497
27763
|
rootClass: {},
|
|
27498
27764
|
tree: {},
|
|
27499
27765
|
virtual: {},
|
|
27766
|
+
notTree: {
|
|
27767
|
+
'&$root > $node$leaf': {
|
|
27768
|
+
paddingLeft: 0
|
|
27769
|
+
},
|
|
27770
|
+
'& $content': {
|
|
27771
|
+
marginLeft: 0
|
|
27772
|
+
}
|
|
27773
|
+
},
|
|
27500
27774
|
line: {
|
|
27501
27775
|
'& $node': {
|
|
27502
27776
|
'&[dir=ltr]::before': {
|
|
@@ -27645,25 +27919,27 @@ var treeStyle = {
|
|
|
27645
27919
|
flex: 1,
|
|
27646
27920
|
display: 'flex',
|
|
27647
27921
|
alignItems: 'center',
|
|
27648
|
-
|
|
27649
|
-
|
|
27650
|
-
|
|
27922
|
+
marginLeft: 4,
|
|
27923
|
+
// 'label&': {
|
|
27924
|
+
// cursor: 'pointer',
|
|
27925
|
+
// userSelect: 'none',
|
|
27926
|
+
// },
|
|
27927
|
+
|
|
27928
|
+
// '$iconWrapper + &': {
|
|
27929
|
+
// marginLeft: 4,
|
|
27930
|
+
// },
|
|
27931
|
+
|
|
27651
27932
|
'$contentDisabled &': {
|
|
27652
27933
|
'& $text': {
|
|
27653
27934
|
color: src.treeContentDisabledFontColor
|
|
27654
27935
|
}
|
|
27655
27936
|
},
|
|
27656
27937
|
'&[data-active="true"]': {
|
|
27657
|
-
background: src.treeContentActiveBackgroundColor,
|
|
27658
27938
|
'& $text': {
|
|
27939
|
+
background: src.treeContentActiveBackgroundColor,
|
|
27940
|
+
borderRadius: src.treeContentActiveBorderRadius,
|
|
27659
27941
|
color: src.treeContentActiveFontColor
|
|
27660
27942
|
}
|
|
27661
|
-
},
|
|
27662
|
-
'&:hover:not([data-active="true"])': {
|
|
27663
|
-
background: src.treeContentHoverBackgroundColor,
|
|
27664
|
-
'& $text': {
|
|
27665
|
-
color: src.treeContentHoverFontColor
|
|
27666
|
-
}
|
|
27667
27943
|
}
|
|
27668
27944
|
},
|
|
27669
27945
|
checkbox: {
|
|
@@ -27673,13 +27949,22 @@ var treeStyle = {
|
|
|
27673
27949
|
}
|
|
27674
27950
|
},
|
|
27675
27951
|
text: {
|
|
27952
|
+
flex: 1,
|
|
27953
|
+
minWidth: 0,
|
|
27676
27954
|
fontSize: src.treeFontSize,
|
|
27677
27955
|
lineHeight: src.lineHeightDynamic,
|
|
27678
27956
|
color: src.treeFontColor,
|
|
27679
27957
|
fontWeight: src.treeFontWeight,
|
|
27680
|
-
|
|
27681
|
-
|
|
27682
|
-
|
|
27958
|
+
padding: "".concat(src.treeTextPaddingY, " ").concat(src.treeTextPaddingX),
|
|
27959
|
+
whiteSpace: 'nowrap',
|
|
27960
|
+
borderRadius: src.treeContentBorderRadius,
|
|
27961
|
+
'$content:not([data-active="true"]) &:hover': {
|
|
27962
|
+
color: src.treeContentHoverFontColor,
|
|
27963
|
+
background: src.treeContentHoverBackgroundColor
|
|
27964
|
+
}
|
|
27965
|
+
},
|
|
27966
|
+
textClickable: {
|
|
27967
|
+
cursor: 'pointer'
|
|
27683
27968
|
},
|
|
27684
27969
|
// textDisabled: {
|
|
27685
27970
|
// color: Token.treeItemDisabledFontColor,
|
|
@@ -28031,7 +28316,10 @@ var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
28031
28316
|
transformOrigin: '0 0',
|
|
28032
28317
|
width: 'max-content',
|
|
28033
28318
|
maxWidth: '640px',
|
|
28034
|
-
cursor: 'initial'
|
|
28319
|
+
cursor: 'initial',
|
|
28320
|
+
'& $tree': {
|
|
28321
|
+
overscrollBehavior: 'none'
|
|
28322
|
+
}
|
|
28035
28323
|
},
|
|
28036
28324
|
iconWrapper: {
|
|
28037
28325
|
display: 'flex',
|
|
@@ -28311,6 +28599,39 @@ var uploadStyle = {
|
|
|
28311
28599
|
}
|
|
28312
28600
|
},
|
|
28313
28601
|
wrapperDrop: {},
|
|
28602
|
+
draggerWrapper: {
|
|
28603
|
+
display: 'block',
|
|
28604
|
+
width: '100%'
|
|
28605
|
+
},
|
|
28606
|
+
draggerArea: {
|
|
28607
|
+
position: 'relative',
|
|
28608
|
+
padding: 16,
|
|
28609
|
+
width: '100%',
|
|
28610
|
+
height: '100%',
|
|
28611
|
+
textAlign: 'center',
|
|
28612
|
+
backgroundColor: src.uploadImageHandlerBackgroundColor,
|
|
28613
|
+
borderRadius: src.uploadImageBorderRadius,
|
|
28614
|
+
cursor: 'pointer',
|
|
28615
|
+
color: src.uploadImageHandlerFontColor,
|
|
28616
|
+
// after
|
|
28617
|
+
'&:after': {
|
|
28618
|
+
content: '""',
|
|
28619
|
+
position: 'absolute',
|
|
28620
|
+
top: -1,
|
|
28621
|
+
right: -1,
|
|
28622
|
+
bottom: -1,
|
|
28623
|
+
left: -1,
|
|
28624
|
+
borderRadius: src.uploadImageBorderRadius,
|
|
28625
|
+
border: "1px dashed ".concat(src.uploadImageHandlerBorderColor),
|
|
28626
|
+
transition: 'border-color 0.3s'
|
|
28627
|
+
},
|
|
28628
|
+
// hover
|
|
28629
|
+
'&:hover': {
|
|
28630
|
+
'&:after': {
|
|
28631
|
+
borderColor: src.uploadImageHandlerHoverBorderColor
|
|
28632
|
+
}
|
|
28633
|
+
}
|
|
28634
|
+
},
|
|
28314
28635
|
handler: {
|
|
28315
28636
|
display: 'inline-block',
|
|
28316
28637
|
cursor: 'pointer',
|
|
@@ -28345,7 +28666,6 @@ var uploadStyle = {
|
|
|
28345
28666
|
},
|
|
28346
28667
|
result: {
|
|
28347
28668
|
display: 'flex',
|
|
28348
|
-
alignItems: 'center',
|
|
28349
28669
|
gap: '8px',
|
|
28350
28670
|
borderRadius: src.uploadResultBorderRadius,
|
|
28351
28671
|
padding: "".concat(src.uploadResultPaddingY, " ").concat(src.uploadResultPaddingX),
|
|
@@ -28358,7 +28678,7 @@ var uploadStyle = {
|
|
|
28358
28678
|
},
|
|
28359
28679
|
icon: {
|
|
28360
28680
|
width: src.uploadResultIconSize,
|
|
28361
|
-
height: src.
|
|
28681
|
+
height: src.lineHeightDynamic,
|
|
28362
28682
|
color: src.uploadResultIconColor,
|
|
28363
28683
|
display: 'flex',
|
|
28364
28684
|
alignItems: 'center',
|
|
@@ -28387,16 +28707,14 @@ var uploadStyle = {
|
|
|
28387
28707
|
},
|
|
28388
28708
|
resultTextFooter: {
|
|
28389
28709
|
display: 'flex',
|
|
28390
|
-
alignItems: 'center',
|
|
28391
28710
|
gap: src.uploadResultGap,
|
|
28392
28711
|
color: src.uploadResultUploadingIconColor
|
|
28393
28712
|
},
|
|
28394
28713
|
resultText: {
|
|
28395
28714
|
display: 'flex',
|
|
28396
|
-
alignItems: 'center',
|
|
28397
|
-
minWidth: '0',
|
|
28398
|
-
wordBreak: 'break-all',
|
|
28399
28715
|
flex: 1,
|
|
28716
|
+
minWidth: 0,
|
|
28717
|
+
wordBreak: 'break-all',
|
|
28400
28718
|
gap: src.uploadResultGap,
|
|
28401
28719
|
fontSize: src.uploadResultFontSize,
|
|
28402
28720
|
color: src.uploadResultFontColor,
|
|
@@ -29327,6 +29645,11 @@ var usePopup = function usePopup(props) {
|
|
|
29327
29645
|
updatePosition();
|
|
29328
29646
|
}
|
|
29329
29647
|
setOpenState(!!props.open);
|
|
29648
|
+
|
|
29649
|
+
// 外部传了open时,需要正常的触发onCollapse;触发了onCollapse才能让组件内部的edit状态正确,否则可能会出现弹出层打开了但是用户却无法选择的情况
|
|
29650
|
+
if (props.open !== undefined) {
|
|
29651
|
+
changeOpen(!!props.open);
|
|
29652
|
+
}
|
|
29330
29653
|
}, [props.open]);
|
|
29331
29654
|
|
|
29332
29655
|
// const getPopUpHeight = () => {
|
|
@@ -29650,13 +29973,15 @@ function getClosestScrollContainer(element) {
|
|
|
29650
29973
|
// 如果没有找到可滚动的祖先,返回 body 或 documentElement
|
|
29651
29974
|
return document.scrollingElement || document.documentElement;
|
|
29652
29975
|
}
|
|
29653
|
-
function
|
|
29976
|
+
function getClosestPositionedContainer(element) {
|
|
29977
|
+
var positions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ['fixed', 'absolute'];
|
|
29654
29978
|
if (!element) {
|
|
29655
29979
|
return null;
|
|
29656
29980
|
}
|
|
29657
29981
|
var isFixable = function isFixable(el) {
|
|
29658
29982
|
var style = window.getComputedStyle(el);
|
|
29659
|
-
|
|
29983
|
+
var position = style.position;
|
|
29984
|
+
return positions.includes(position);
|
|
29660
29985
|
};
|
|
29661
29986
|
|
|
29662
29987
|
// 遍历父元素
|
|
@@ -30202,10 +30527,12 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
30202
30527
|
}
|
|
30203
30528
|
if (_h === 'right') {
|
|
30204
30529
|
style.left = rect.right - containerRect.left + containerScroll.left + popupGap;
|
|
30530
|
+
arrayStyle.left = '0px';
|
|
30531
|
+
arrayStyle.right = 'auto';
|
|
30205
30532
|
} else {
|
|
30206
|
-
style.
|
|
30207
|
-
arrayStyle.right =
|
|
30208
|
-
|
|
30533
|
+
style.right = containerRect.right - rect.left;
|
|
30534
|
+
arrayStyle.right = '0px';
|
|
30535
|
+
arrayStyle.left = 'auto';
|
|
30209
30536
|
}
|
|
30210
30537
|
} else if (position === 'cover') {
|
|
30211
30538
|
style.top = rect.top - containerRect.top + containerScroll.top;
|
|
@@ -30288,6 +30615,8 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
30288
30615
|
// for animation
|
|
30289
30616
|
if (realPosition.indexOf('top') === 0) {
|
|
30290
30617
|
newStyle.transformOrigin = 'center bottom';
|
|
30618
|
+
} else if (realPosition.indexOf('bottom') === 0) {
|
|
30619
|
+
newStyle.transformOrigin = 'center top';
|
|
30291
30620
|
}
|
|
30292
30621
|
return {
|
|
30293
30622
|
newStyle: newStyle,
|
|
@@ -30908,7 +31237,7 @@ var useContainer = function useContainer() {
|
|
|
30908
31237
|
if (!is_isBrowser()) return null;
|
|
30909
31238
|
if (!context.element) {
|
|
30910
31239
|
context.element = document.createElement('div');
|
|
30911
|
-
context.element.setAttribute('style', '
|
|
31240
|
+
context.element.setAttribute('style', 'position: absolute; top: 0px; left: 0px; width: 100%;');
|
|
30912
31241
|
}
|
|
30913
31242
|
var rootContainer = getRootContainer(props);
|
|
30914
31243
|
if (rootContainer && context.element.parentElement !== rootContainer) {
|
|
@@ -31158,10 +31487,16 @@ var Popover = function Popover(props) {
|
|
|
31158
31487
|
}
|
|
31159
31488
|
context.rendered = true;
|
|
31160
31489
|
var childrened = isFunc(children) ? children(closePop) : children;
|
|
31161
|
-
var
|
|
31490
|
+
var containerStyle = {
|
|
31162
31491
|
borderColor: props.border,
|
|
31163
31492
|
backgroundColor: props.background
|
|
31164
31493
|
};
|
|
31494
|
+
if (popupGap) {
|
|
31495
|
+
Object.assign(containerStyle, {
|
|
31496
|
+
'--popover-arrow-gap-extra': "".concat(popupGap, "px")
|
|
31497
|
+
});
|
|
31498
|
+
}
|
|
31499
|
+
;
|
|
31165
31500
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
|
|
31166
31501
|
focus: open,
|
|
31167
31502
|
parentElRef: targetRef,
|
|
@@ -31177,7 +31512,7 @@ var Popover = function Popover(props) {
|
|
|
31177
31512
|
offset: props.offset,
|
|
31178
31513
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({
|
|
31179
31514
|
className: classnames_default()(className, popoverStyle === null || popoverStyle === void 0 ? void 0 : popoverStyle.rootClass, popoverStyle === null || popoverStyle === void 0 ? void 0 : popoverStyle.wrapper, open && (popoverStyle === null || popoverStyle === void 0 ? void 0 : popoverStyle.wrapperOpen), !showArrow && (popoverStyle === null || popoverStyle === void 0 ? void 0 : popoverStyle.hideArrow)),
|
|
31180
|
-
style:
|
|
31515
|
+
style: containerStyle
|
|
31181
31516
|
}, getDataAttribute({
|
|
31182
31517
|
position: position,
|
|
31183
31518
|
type: type
|
|
@@ -31553,6 +31888,7 @@ var AnimationList = function AnimationList(props) {
|
|
|
31553
31888
|
}
|
|
31554
31889
|
if (type.indexOf('scale-y') >= 0) {
|
|
31555
31890
|
transition.push("transform ".concat(durationNum, "ms ease-in-out"));
|
|
31891
|
+
transition.push("opacity ".concat(durationNum, "ms ease-in-out"));
|
|
31556
31892
|
}
|
|
31557
31893
|
if (type.indexOf('collapse') >= 0) {
|
|
31558
31894
|
transition.push("height ".concat(durationNum, "ms ease-in-out"));
|
|
@@ -31601,6 +31937,7 @@ var AnimationList = function AnimationList(props) {
|
|
|
31601
31937
|
}
|
|
31602
31938
|
if (type.includes('scale-y')) {
|
|
31603
31939
|
newStyle.transform = 'scaleY(0)';
|
|
31940
|
+
newStyle.opacity = 0;
|
|
31604
31941
|
}
|
|
31605
31942
|
setStyle(function (s) {
|
|
31606
31943
|
return objectSpread2_default()(objectSpread2_default()({}, s), newStyle);
|
|
@@ -31618,6 +31955,7 @@ var AnimationList = function AnimationList(props) {
|
|
|
31618
31955
|
}
|
|
31619
31956
|
if (type.includes('scale-y')) {
|
|
31620
31957
|
newStyle.transform = 'scaleY(1)';
|
|
31958
|
+
newStyle.opacity = 1;
|
|
31621
31959
|
}
|
|
31622
31960
|
setStyle(function (s) {
|
|
31623
31961
|
return objectSpread2_default()(objectSpread2_default()({}, s), newStyle);
|
|
@@ -31649,6 +31987,7 @@ var AnimationList = function AnimationList(props) {
|
|
|
31649
31987
|
}
|
|
31650
31988
|
if (type.includes('scale-y')) {
|
|
31651
31989
|
newStyle.transform = 'scaleY(1)';
|
|
31990
|
+
newStyle.opacity = 1;
|
|
31652
31991
|
}
|
|
31653
31992
|
setStyle(function (s) {
|
|
31654
31993
|
return objectSpread2_default()(objectSpread2_default()({}, s), newStyle);
|
|
@@ -31667,6 +32006,7 @@ var AnimationList = function AnimationList(props) {
|
|
|
31667
32006
|
}
|
|
31668
32007
|
if (type.includes('scale-y')) {
|
|
31669
32008
|
newStyle.transform = 'scaleY(0)';
|
|
32009
|
+
newStyle.opacity = 0;
|
|
31670
32010
|
}
|
|
31671
32011
|
setStyle(function (s) {
|
|
31672
32012
|
return objectSpread2_default()(objectSpread2_default()({}, s), newStyle);
|
|
@@ -32573,15 +32913,14 @@ var spin_Spin = function Spin() {
|
|
|
32573
32913
|
var color = colorProps !== null && colorProps !== void 0 ? colorProps : getSpinColor();
|
|
32574
32914
|
var mode = (_ref2 = modeProps !== null && modeProps !== void 0 ? modeProps : getSpinMode()) !== null && _ref2 !== void 0 ? _ref2 : 'vertical';
|
|
32575
32915
|
var spinStyle = (jssStyle === null || jssStyle === void 0 || (_jssStyle$spin = jssStyle.spin) === null || _jssStyle$spin === void 0 ? void 0 : _jssStyle$spin.call(jssStyle)) || {};
|
|
32576
|
-
var
|
|
32577
|
-
var renderSpin = function renderSpin() {
|
|
32916
|
+
var renderSpin = function renderSpin(isRoot) {
|
|
32578
32917
|
var n = name;
|
|
32579
32918
|
if (spins[n]) {
|
|
32580
32919
|
var Comp = spins[n];
|
|
32581
32920
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Comp, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
|
|
32582
32921
|
color: color,
|
|
32583
32922
|
style: style,
|
|
32584
|
-
className:
|
|
32923
|
+
className: isRoot ? className : undefined
|
|
32585
32924
|
}));
|
|
32586
32925
|
}
|
|
32587
32926
|
return null;
|
|
@@ -32597,28 +32936,29 @@ var spin_Spin = function Spin() {
|
|
|
32597
32936
|
}) : tip
|
|
32598
32937
|
});
|
|
32599
32938
|
};
|
|
32600
|
-
var renderContent = function renderContent() {
|
|
32939
|
+
var renderContent = function renderContent(isRoot) {
|
|
32940
|
+
var contentClass = classnames_default()(isRoot && className, defineProperty_default()(defineProperty_default()(defineProperty_default()({}, spinStyle.rootClass, isRoot), spinStyle.vertical, mode === 'vertical'), spinStyle.horizontal, mode === 'horizontal'), spinStyle.content);
|
|
32601
32941
|
if (tip) {
|
|
32602
32942
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
32603
32943
|
className: contentClass,
|
|
32604
|
-
children: [renderSpin(), tip && renderTip()]
|
|
32944
|
+
children: [renderSpin(false), tip && renderTip()]
|
|
32605
32945
|
});
|
|
32606
32946
|
}
|
|
32607
|
-
return renderSpin();
|
|
32947
|
+
return renderSpin(isRoot);
|
|
32608
32948
|
};
|
|
32609
32949
|
var renderContainer = function renderContainer() {
|
|
32610
32950
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
32611
|
-
className: classnames_default()(className, spinStyle.container),
|
|
32951
|
+
className: classnames_default()(className, spinStyle.rootClass, spinStyle.container),
|
|
32612
32952
|
children: [children, loading && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
32613
32953
|
className: spinStyle.loading,
|
|
32614
|
-
children: renderContent()
|
|
32954
|
+
children: renderContent(false)
|
|
32615
32955
|
})]
|
|
32616
32956
|
});
|
|
32617
32957
|
};
|
|
32618
32958
|
if (children) {
|
|
32619
32959
|
return renderContainer();
|
|
32620
32960
|
}
|
|
32621
|
-
return renderContent();
|
|
32961
|
+
return renderContent(true);
|
|
32622
32962
|
};
|
|
32623
32963
|
/* harmony default export */ var src_spin_spin = (spin_Spin);
|
|
32624
32964
|
;// CONCATENATED MODULE: ../base/src/button/button.tsx
|
|
@@ -33656,7 +33996,6 @@ var getRect = function getRect(el) {
|
|
|
33656
33996
|
if (el) {
|
|
33657
33997
|
devUseWarning.error("the ".concat(el, " is not a element"));
|
|
33658
33998
|
}
|
|
33659
|
-
;
|
|
33660
33999
|
return {
|
|
33661
34000
|
top: 0,
|
|
33662
34001
|
bottom: winHeight
|
|
@@ -33712,13 +34051,14 @@ function getObserver(obj, id) {
|
|
|
33712
34051
|
render = obj.render,
|
|
33713
34052
|
offscreen = obj.offscreen,
|
|
33714
34053
|
noRemove = obj.noRemove;
|
|
33715
|
-
var fixedContainer =
|
|
34054
|
+
var fixedContainer = getClosestPositionedContainer(element, ['fixed', 'absolute']);
|
|
33716
34055
|
var observer = new IntersectionObserver(function (entries) {
|
|
33717
34056
|
entries.forEach(function (en) {
|
|
33718
34057
|
if (en.isIntersecting || en.intersectionRatio > 0) {
|
|
33719
34058
|
render();
|
|
33720
34059
|
if (!noRemove) removeStack(id);
|
|
33721
34060
|
} else {
|
|
34061
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
33722
34062
|
offscreen && offscreen();
|
|
33723
34063
|
}
|
|
33724
34064
|
});
|
|
@@ -33795,6 +34135,327 @@ var Lazyload = function Lazyload(props) {
|
|
|
33795
34135
|
});
|
|
33796
34136
|
};
|
|
33797
34137
|
/* harmony default export */ var lazyload = (Lazyload);
|
|
34138
|
+
;// CONCATENATED MODULE: ../hooks/src/utils/object.ts
|
|
34139
|
+
|
|
34140
|
+
|
|
34141
|
+
|
|
34142
|
+
|
|
34143
|
+
|
|
34144
|
+
function insertPoint(name) {
|
|
34145
|
+
var reg = /(\[\d+\])/gi;
|
|
34146
|
+
return name.replace(reg, function (s, m, i) {
|
|
34147
|
+
return s.replace(m, i === 0 ? m : ".".concat(m));
|
|
34148
|
+
});
|
|
34149
|
+
}
|
|
34150
|
+
var object_hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
34151
|
+
var PATH_MODE = {
|
|
34152
|
+
loose: '?',
|
|
34153
|
+
strict: '!',
|
|
34154
|
+
insert: '^',
|
|
34155
|
+
append: '$'
|
|
34156
|
+
};
|
|
34157
|
+
// Object.values()
|
|
34158
|
+
var objectValues = function objectValues(obj) {
|
|
34159
|
+
if (!obj) return [];
|
|
34160
|
+
return Object.keys(obj).map(function (k) {
|
|
34161
|
+
return obj[k];
|
|
34162
|
+
});
|
|
34163
|
+
};
|
|
34164
|
+
|
|
34165
|
+
// object only, not handle array.
|
|
34166
|
+
var deepMerge = function deepMerge() {
|
|
34167
|
+
var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
34168
|
+
var source = arguments.length > 1 ? arguments[1] : undefined;
|
|
34169
|
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
34170
|
+
var clone = options.clone,
|
|
34171
|
+
removeUndefined = options.removeUndefined,
|
|
34172
|
+
skipUndefined = options.skipUndefined;
|
|
34173
|
+
if (!isMergeable(source)) return source;
|
|
34174
|
+
var dest = {};
|
|
34175
|
+
if (isMergeable(target)) {
|
|
34176
|
+
Object.keys(target).forEach(function (k) {
|
|
34177
|
+
dest[k] = clone ? deepMerge({}, target[k], options) : target[k];
|
|
34178
|
+
if (removeUndefined && dest[k] === undefined) delete dest[k];
|
|
34179
|
+
});
|
|
34180
|
+
}
|
|
34181
|
+
Object.keys(source).forEach(function (k) {
|
|
34182
|
+
if (isMergeable(source[k]) && isMergeable(target[k])) {
|
|
34183
|
+
dest[k] = deepMerge(target[k], source[k], options);
|
|
34184
|
+
} else {
|
|
34185
|
+
if (skipUndefined && source[k] === undefined) return;
|
|
34186
|
+
dest[k] = deepMerge({}, source[k], options);
|
|
34187
|
+
if (removeUndefined && dest[k] === undefined) delete dest[k];
|
|
34188
|
+
}
|
|
34189
|
+
});
|
|
34190
|
+
return dest;
|
|
34191
|
+
};
|
|
34192
|
+
function pathGenerator(raw) {
|
|
34193
|
+
var path = insertPoint(raw);
|
|
34194
|
+
var reg = /^\[(\d+)\]$/;
|
|
34195
|
+
var pathModeValues = objectValues(PATH_MODE);
|
|
34196
|
+
var index = 0;
|
|
34197
|
+
var last = 0;
|
|
34198
|
+
var prop = '';
|
|
34199
|
+
var results = [];
|
|
34200
|
+
while (index >= 0) {
|
|
34201
|
+
index = path.indexOf('.', last);
|
|
34202
|
+
prop = path.substring(last, index === -1 ? undefined : index);
|
|
34203
|
+
var mode = void 0;
|
|
34204
|
+
var lastChar = prop.charAt(prop.length - 1);
|
|
34205
|
+
if (pathModeValues.includes(lastChar)) {
|
|
34206
|
+
mode = lastChar;
|
|
34207
|
+
prop = prop.substring(0, prop.length - 1);
|
|
34208
|
+
}
|
|
34209
|
+
|
|
34210
|
+
// array index
|
|
34211
|
+
var match = reg.exec(prop);
|
|
34212
|
+
// eslint-disable-next-line
|
|
34213
|
+
if (match) prop = parseInt(match[1], 10);
|
|
34214
|
+
last = index + 1;
|
|
34215
|
+
results.push([prop, index === -1 ? undefined : path.substring(last), mode]);
|
|
34216
|
+
}
|
|
34217
|
+
return results;
|
|
34218
|
+
}
|
|
34219
|
+
var deepSet = function deepSet(target, path, value) {
|
|
34220
|
+
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
34221
|
+
if (!is_isObject(target)) throw new Error('Target must be an object.');
|
|
34222
|
+
if (typeof path !== 'string') throw new Error('Path must be a string.');
|
|
34223
|
+
var removeUndefined = options.removeUndefined,
|
|
34224
|
+
skipUndefined = options.skipUndefined;
|
|
34225
|
+
var mergeOptions = {
|
|
34226
|
+
clone: true,
|
|
34227
|
+
removeUndefined: removeUndefined,
|
|
34228
|
+
skipUndefined: skipUndefined
|
|
34229
|
+
};
|
|
34230
|
+
|
|
34231
|
+
// empty root
|
|
34232
|
+
if (path === '') {
|
|
34233
|
+
var dest = deepMerge(target, value, mergeOptions);
|
|
34234
|
+
Object.keys(dest).forEach(function (k) {
|
|
34235
|
+
target[k] = dest[k];
|
|
34236
|
+
});
|
|
34237
|
+
return target;
|
|
34238
|
+
}
|
|
34239
|
+
var current = target;
|
|
34240
|
+
var _iterator = createForOfIteratorHelper_default()(pathGenerator(path)),
|
|
34241
|
+
_step;
|
|
34242
|
+
try {
|
|
34243
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
34244
|
+
var _step$value = slicedToArray_default()(_step.value, 3),
|
|
34245
|
+
prop = _step$value[0],
|
|
34246
|
+
next = _step$value[1],
|
|
34247
|
+
mode = _step$value[2];
|
|
34248
|
+
if (next) {
|
|
34249
|
+
var nextIsArray = /^\[\d+\]/.test(next);
|
|
34250
|
+
if (!current[prop]) current[prop] = nextIsArray ? [] : {};
|
|
34251
|
+
if (nextIsArray && !Array.isArray(current[prop])) {
|
|
34252
|
+
throw new Error("Path ".concat(path, " expect an array."));
|
|
34253
|
+
} else if (Array.isArray(current[prop]) && !nextIsArray) {
|
|
34254
|
+
throw new Error("Path ".concat(path, " is an array, expect an object."));
|
|
34255
|
+
}
|
|
34256
|
+
current = current[prop];
|
|
34257
|
+
continue;
|
|
34258
|
+
}
|
|
34259
|
+
if (options.forceSet) {
|
|
34260
|
+
current[prop] = value;
|
|
34261
|
+
} else if (mode === PATH_MODE.insert) {
|
|
34262
|
+
current.splice(prop, 0, value);
|
|
34263
|
+
} else if (mode === PATH_MODE.append) {
|
|
34264
|
+
current.splice(prop + 1, 0, value);
|
|
34265
|
+
} else {
|
|
34266
|
+
if (skipUndefined && value === undefined) break;
|
|
34267
|
+
current[prop] = isMergeable(current[prop]) && isMergeable(value) ? deepMerge(current[prop], value, mergeOptions) : value;
|
|
34268
|
+
}
|
|
34269
|
+
if (removeUndefined && value === undefined) delete current[prop];
|
|
34270
|
+
}
|
|
34271
|
+
} catch (err) {
|
|
34272
|
+
_iterator.e(err);
|
|
34273
|
+
} finally {
|
|
34274
|
+
_iterator.f();
|
|
34275
|
+
}
|
|
34276
|
+
return target;
|
|
34277
|
+
};
|
|
34278
|
+
var deepGet = function deepGet(target, path) {
|
|
34279
|
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
34280
|
+
if (!is_isObject(target)) throw new Error('Target must be an object.');
|
|
34281
|
+
if (typeof path !== 'string') throw new Error('Path must be a string.');
|
|
34282
|
+
|
|
34283
|
+
// empty root
|
|
34284
|
+
if (path === '') return target;
|
|
34285
|
+
var defaultValue = options.defaultValue,
|
|
34286
|
+
strictMode = options.strictMode;
|
|
34287
|
+
var current = target;
|
|
34288
|
+
var _iterator2 = createForOfIteratorHelper_default()(pathGenerator(path)),
|
|
34289
|
+
_step2;
|
|
34290
|
+
try {
|
|
34291
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
34292
|
+
var _step2$value = slicedToArray_default()(_step2.value, 3),
|
|
34293
|
+
prop = _step2$value[0],
|
|
34294
|
+
mode = _step2$value[2];
|
|
34295
|
+
var isStrict = mode === PATH_MODE.strict || strictMode && defaultValue === undefined && mode !== PATH_MODE.loose;
|
|
34296
|
+
// eslint-disable-next-line eqeqeq
|
|
34297
|
+
if (current != null && object_hasOwnProperty.call(current, prop)) {
|
|
34298
|
+
current = current[prop];
|
|
34299
|
+
} else if (isStrict) {
|
|
34300
|
+
throw new Error("Path ".concat(path, " is not exist."));
|
|
34301
|
+
} else {
|
|
34302
|
+
current = defaultValue;
|
|
34303
|
+
break;
|
|
34304
|
+
}
|
|
34305
|
+
}
|
|
34306
|
+
} catch (err) {
|
|
34307
|
+
_iterator2.e(err);
|
|
34308
|
+
} finally {
|
|
34309
|
+
_iterator2.f();
|
|
34310
|
+
}
|
|
34311
|
+
return current;
|
|
34312
|
+
};
|
|
34313
|
+
var deepRemove = function deepRemove(target, path) {
|
|
34314
|
+
if (!is_isObject(target)) throw new Error('Target must be an object.');
|
|
34315
|
+
if (typeof path !== 'string' || !path) throw new Error('Path must be a string.');
|
|
34316
|
+
var current = target;
|
|
34317
|
+
var nextIsArray = false;
|
|
34318
|
+
var _iterator3 = createForOfIteratorHelper_default()(pathGenerator(path)),
|
|
34319
|
+
_step3;
|
|
34320
|
+
try {
|
|
34321
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
34322
|
+
var _step3$value = slicedToArray_default()(_step3.value, 2),
|
|
34323
|
+
prop = _step3$value[0],
|
|
34324
|
+
next = _step3$value[1];
|
|
34325
|
+
// eslint-disable-next-line eqeqeq
|
|
34326
|
+
if (current == null || !object_hasOwnProperty.call(current, prop)) {
|
|
34327
|
+
break;
|
|
34328
|
+
}
|
|
34329
|
+
if (next) {
|
|
34330
|
+
current = current[prop];
|
|
34331
|
+
nextIsArray = /^\[\d+\]/.test(next);
|
|
34332
|
+
} else if (is_isObject(current)) {
|
|
34333
|
+
if (nextIsArray) throw new Error('Target is an object, expect array');
|
|
34334
|
+
delete current[prop];
|
|
34335
|
+
} else {
|
|
34336
|
+
if (!nextIsArray) {
|
|
34337
|
+
throw new Error('Target is an array, expect object');
|
|
34338
|
+
}
|
|
34339
|
+
current.splice(prop, 1);
|
|
34340
|
+
}
|
|
34341
|
+
}
|
|
34342
|
+
} catch (err) {
|
|
34343
|
+
_iterator3.e(err);
|
|
34344
|
+
} finally {
|
|
34345
|
+
_iterator3.f();
|
|
34346
|
+
}
|
|
34347
|
+
return target;
|
|
34348
|
+
};
|
|
34349
|
+
var deepHas = function deepHas(target, path) {
|
|
34350
|
+
if (!isObject(target)) throw new Error('Target must be an object.');
|
|
34351
|
+
if (typeof path !== 'string') throw new Error('Path must be a string.');
|
|
34352
|
+
if (path === '') return true;
|
|
34353
|
+
var current = target;
|
|
34354
|
+
var _iterator4 = _createForOfIteratorHelper(pathGenerator(path)),
|
|
34355
|
+
_step4;
|
|
34356
|
+
try {
|
|
34357
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
34358
|
+
var _step4$value = _slicedToArray(_step4.value, 2),
|
|
34359
|
+
prop = _step4$value[0];
|
|
34360
|
+
if (!current || !object_hasOwnProperty.call(current, prop)) return false;
|
|
34361
|
+
current = current[prop];
|
|
34362
|
+
}
|
|
34363
|
+
} catch (err) {
|
|
34364
|
+
_iterator4.e(err);
|
|
34365
|
+
} finally {
|
|
34366
|
+
_iterator4.f();
|
|
34367
|
+
}
|
|
34368
|
+
return true;
|
|
34369
|
+
};
|
|
34370
|
+
var object_entries = function entries(obj) {
|
|
34371
|
+
if (!obj) return [];
|
|
34372
|
+
var keys = Object.keys(obj);
|
|
34373
|
+
return keys.map(function (key) {
|
|
34374
|
+
return [key, obj[key]];
|
|
34375
|
+
});
|
|
34376
|
+
};
|
|
34377
|
+
var removeProps = function removeProps(target, remove) {
|
|
34378
|
+
var a = {};
|
|
34379
|
+
var _iterator5 = createForOfIteratorHelper_default()(object_entries(target)),
|
|
34380
|
+
_step5;
|
|
34381
|
+
try {
|
|
34382
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
34383
|
+
var _step5$value = slicedToArray_default()(_step5.value, 2),
|
|
34384
|
+
key = _step5$value[0],
|
|
34385
|
+
value = _step5$value[1];
|
|
34386
|
+
if (!(key in remove)) {
|
|
34387
|
+
a[key] = value;
|
|
34388
|
+
}
|
|
34389
|
+
}
|
|
34390
|
+
} catch (err) {
|
|
34391
|
+
_iterator5.e(err);
|
|
34392
|
+
} finally {
|
|
34393
|
+
_iterator5.f();
|
|
34394
|
+
}
|
|
34395
|
+
return a;
|
|
34396
|
+
};
|
|
34397
|
+
|
|
34398
|
+
/**
|
|
34399
|
+
* 获取数据对象的全量key路径
|
|
34400
|
+
* @param obj 数据对象
|
|
34401
|
+
* @param parentKey 父级key
|
|
34402
|
+
* @returns 全量key路径
|
|
34403
|
+
* @example
|
|
34404
|
+
* const obj = { a: { b: { c: 1 } } };
|
|
34405
|
+
* const keys = getAllKeyPaths(obj);
|
|
34406
|
+
* console.log(keys); // ['a.b.c', 'a.b', 'a']
|
|
34407
|
+
*/
|
|
34408
|
+
var getAllKeyPaths = function getAllKeyPaths(obj) {
|
|
34409
|
+
var parentKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
34410
|
+
return Object.keys(obj).reduce(function (keys, key) {
|
|
34411
|
+
var newKey = parentKey ? "".concat(parentKey, ".").concat(key) : key;
|
|
34412
|
+
if (Array.isArray(obj[key])) {
|
|
34413
|
+
var childrenKeys = obj[key].map(function (item, index) {
|
|
34414
|
+
if (item !== null && typeof_default()(item) === 'object') {
|
|
34415
|
+
return getAllKeyPaths(item, "".concat(newKey, "[").concat(index, "]"));
|
|
34416
|
+
}
|
|
34417
|
+
return null;
|
|
34418
|
+
}).filter(function (item) {
|
|
34419
|
+
return item !== null;
|
|
34420
|
+
});
|
|
34421
|
+
return keys.concat.apply(keys, toConsumableArray_default()(childrenKeys)).concat(newKey);
|
|
34422
|
+
}
|
|
34423
|
+
return keys.concat(obj[key] !== null && typeof_default()(obj[key]) === 'object' ? getAllKeyPaths(obj[key], newKey) : newKey);
|
|
34424
|
+
}, []);
|
|
34425
|
+
};
|
|
34426
|
+
|
|
34427
|
+
/**
|
|
34428
|
+
* 获取完整的字段key
|
|
34429
|
+
* @param fields 字段key
|
|
34430
|
+
* @param allFields 所有字段key
|
|
34431
|
+
* @returns 完整的字段key
|
|
34432
|
+
* @example
|
|
34433
|
+
* const fields = ['user']
|
|
34434
|
+
* const allFields = ['user', 'user.name', 'user.age', 'user[0].name', 'user[0].age', 'user[1].name', 'user[1].age']
|
|
34435
|
+
* const completeFields = getCompleteFieldKeys(fields, allFields)
|
|
34436
|
+
* console.log(completeFields) // ['user', 'user.name', 'user.age', 'user[0].name', 'user[0].age', 'user[1].name', 'user[1].age']
|
|
34437
|
+
*/
|
|
34438
|
+
var getCompleteFieldKeys = function getCompleteFieldKeys(fields, allFields) {
|
|
34439
|
+
var fieldsArray = isArray(fields) ? fields : [fields];
|
|
34440
|
+
var completeFields = [];
|
|
34441
|
+
fieldsArray.forEach(function (field) {
|
|
34442
|
+
var na = "".concat(field, "[");
|
|
34443
|
+
if (field.endsWith(']')) {
|
|
34444
|
+
na = field;
|
|
34445
|
+
}
|
|
34446
|
+
var no = "".concat(field, ".");
|
|
34447
|
+
completeFields.push(field);
|
|
34448
|
+
var childFields = allFields.filter(function (f) {
|
|
34449
|
+
return f.startsWith(na) || f.startsWith(no);
|
|
34450
|
+
});
|
|
34451
|
+
if (childFields.length) {
|
|
34452
|
+
completeFields.push.apply(completeFields, toConsumableArray_default()(childFields));
|
|
34453
|
+
}
|
|
34454
|
+
});
|
|
34455
|
+
|
|
34456
|
+
// 返回之前去重
|
|
34457
|
+
return Array.from(new Set(completeFields));
|
|
34458
|
+
};
|
|
33798
34459
|
;// CONCATENATED MODULE: ../hooks/src/components/use-check/use-check.ts
|
|
33799
34460
|
|
|
33800
34461
|
|
|
@@ -33806,6 +34467,7 @@ var Lazyload = function Lazyload(props) {
|
|
|
33806
34467
|
|
|
33807
34468
|
|
|
33808
34469
|
|
|
34470
|
+
|
|
33809
34471
|
var useCheck = function useCheck(props) {
|
|
33810
34472
|
var checked = props.checked,
|
|
33811
34473
|
defaultChecked = props.defaultChecked,
|
|
@@ -33825,9 +34487,12 @@ var useCheck = function useCheck(props) {
|
|
|
33825
34487
|
};
|
|
33826
34488
|
var inputRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
|
|
33827
34489
|
var handleInputRef = use_fork_ref(inputRef, inputRefPo);
|
|
33828
|
-
var handleClick = function handleClick(otherHandlers) {
|
|
34490
|
+
var handleClick = function handleClick(otherHandlers, needStopPropagation) {
|
|
33829
34491
|
return function (event) {
|
|
33830
34492
|
var _inputRef$current, _otherHandlers$onClic;
|
|
34493
|
+
if (needStopPropagation) {
|
|
34494
|
+
event.stopPropagation();
|
|
34495
|
+
}
|
|
33831
34496
|
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.click();
|
|
33832
34497
|
otherHandlers === null || otherHandlers === void 0 || (_otherHandlers$onClic = otherHandlers.onClick) === null || _otherHandlers$onClic === void 0 || _otherHandlers$onClic.call(otherHandlers, event);
|
|
33833
34498
|
};
|
|
@@ -33835,8 +34500,10 @@ var useCheck = function useCheck(props) {
|
|
|
33835
34500
|
var getRootProps = function getRootProps() {
|
|
33836
34501
|
var externalProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
33837
34502
|
var externalEventHandlers = extractEventHandlers(externalProps);
|
|
33838
|
-
return objectSpread2_default()(objectSpread2_default()({}, externalProps
|
|
33839
|
-
|
|
34503
|
+
return objectSpread2_default()(objectSpread2_default()({}, removeProps(externalProps, {
|
|
34504
|
+
needStopPropagation: true
|
|
34505
|
+
})), {}, {
|
|
34506
|
+
onClick: handleClick(externalEventHandlers, externalProps.needStopPropagation)
|
|
33840
34507
|
});
|
|
33841
34508
|
//封装点击事件 点击触发input 的点击
|
|
33842
34509
|
// disabled 禁用后不可点击
|
|
@@ -33865,6 +34532,7 @@ var useCheck = function useCheck(props) {
|
|
|
33865
34532
|
disabled: disabled
|
|
33866
34533
|
}, checkProps), {}, {
|
|
33867
34534
|
onClick: function onClick(e) {
|
|
34535
|
+
// TODO: 这个e.stopPropagation生效不了,外部的触发是通过inputRef.current?.click()方式的;没啥用的代码
|
|
33868
34536
|
e.stopPropagation();
|
|
33869
34537
|
_onClick === null || _onClick === void 0 || _onClick(e);
|
|
33870
34538
|
},
|
|
@@ -33896,6 +34564,7 @@ var FormFieldContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs
|
|
|
33896
34564
|
fieldId: undefined,
|
|
33897
34565
|
separator: '__separator__'
|
|
33898
34566
|
});
|
|
34567
|
+
FormFieldContext.displayName = 'FormFieldContext';
|
|
33899
34568
|
;// CONCATENATED MODULE: ../base/src/checkbox/simple-checkbox.tsx
|
|
33900
34569
|
|
|
33901
34570
|
|
|
@@ -33936,7 +34605,8 @@ var Checkbox = function Checkbox(props) {
|
|
|
33936
34605
|
id: fieldId
|
|
33937
34606
|
}, getRootProps({
|
|
33938
34607
|
className: rootClass,
|
|
33939
|
-
style: style
|
|
34608
|
+
style: style,
|
|
34609
|
+
needStopPropagation: props.needStopPropagation
|
|
33940
34610
|
})), {}, {
|
|
33941
34611
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("input", objectSpread2_default()(objectSpread2_default()({}, inputProps), {}, {
|
|
33942
34612
|
type: "checkbox"
|
|
@@ -34326,9 +34996,12 @@ var Input = function Input(props) {
|
|
|
34326
34996
|
className: classnames_default()(inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.input),
|
|
34327
34997
|
onKeyUp: onKeyUp
|
|
34328
34998
|
});
|
|
34999
|
+
var inputElProps = removeProps(inputProps, {
|
|
35000
|
+
formName: undefined
|
|
35001
|
+
});
|
|
34329
35002
|
var inputEl = /*#__PURE__*/(0,jsx_runtime.jsx)("input", objectSpread2_default()({
|
|
34330
35003
|
type: "text"
|
|
34331
|
-
},
|
|
35004
|
+
}, inputElProps));
|
|
34332
35005
|
if (typeof renderInput === 'function') {
|
|
34333
35006
|
inputEl = renderInput(inputEl);
|
|
34334
35007
|
}
|
|
@@ -34352,6 +35025,7 @@ var Input = function Input(props) {
|
|
|
34352
35025
|
}), addEnd]
|
|
34353
35026
|
}));
|
|
34354
35027
|
};
|
|
35028
|
+
Input.displayName = 'SimpleInput';
|
|
34355
35029
|
/* harmony default export */ var simple_input = (Input);
|
|
34356
35030
|
;// CONCATENATED MODULE: ../hooks/src/components/use-input/use-input-format.ts
|
|
34357
35031
|
|
|
@@ -34484,327 +35158,6 @@ var useInputFormat = function useInputFormat(props) {
|
|
|
34484
35158
|
};
|
|
34485
35159
|
};
|
|
34486
35160
|
/* harmony default export */ var use_input_format = (useInputFormat);
|
|
34487
|
-
;// CONCATENATED MODULE: ../hooks/src/utils/object.ts
|
|
34488
|
-
|
|
34489
|
-
|
|
34490
|
-
|
|
34491
|
-
|
|
34492
|
-
|
|
34493
|
-
function insertPoint(name) {
|
|
34494
|
-
var reg = /(\[\d+\])/gi;
|
|
34495
|
-
return name.replace(reg, function (s, m, i) {
|
|
34496
|
-
return s.replace(m, i === 0 ? m : ".".concat(m));
|
|
34497
|
-
});
|
|
34498
|
-
}
|
|
34499
|
-
var object_hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
34500
|
-
var PATH_MODE = {
|
|
34501
|
-
loose: '?',
|
|
34502
|
-
strict: '!',
|
|
34503
|
-
insert: '^',
|
|
34504
|
-
append: '$'
|
|
34505
|
-
};
|
|
34506
|
-
// Object.values()
|
|
34507
|
-
var objectValues = function objectValues(obj) {
|
|
34508
|
-
if (!obj) return [];
|
|
34509
|
-
return Object.keys(obj).map(function (k) {
|
|
34510
|
-
return obj[k];
|
|
34511
|
-
});
|
|
34512
|
-
};
|
|
34513
|
-
|
|
34514
|
-
// object only, not handle array.
|
|
34515
|
-
var deepMerge = function deepMerge() {
|
|
34516
|
-
var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
34517
|
-
var source = arguments.length > 1 ? arguments[1] : undefined;
|
|
34518
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
34519
|
-
var clone = options.clone,
|
|
34520
|
-
removeUndefined = options.removeUndefined,
|
|
34521
|
-
skipUndefined = options.skipUndefined;
|
|
34522
|
-
if (!isMergeable(source)) return source;
|
|
34523
|
-
var dest = {};
|
|
34524
|
-
if (isMergeable(target)) {
|
|
34525
|
-
Object.keys(target).forEach(function (k) {
|
|
34526
|
-
dest[k] = clone ? deepMerge({}, target[k], options) : target[k];
|
|
34527
|
-
if (removeUndefined && dest[k] === undefined) delete dest[k];
|
|
34528
|
-
});
|
|
34529
|
-
}
|
|
34530
|
-
Object.keys(source).forEach(function (k) {
|
|
34531
|
-
if (isMergeable(source[k]) && isMergeable(target[k])) {
|
|
34532
|
-
dest[k] = deepMerge(target[k], source[k], options);
|
|
34533
|
-
} else {
|
|
34534
|
-
if (skipUndefined && source[k] === undefined) return;
|
|
34535
|
-
dest[k] = deepMerge({}, source[k], options);
|
|
34536
|
-
if (removeUndefined && dest[k] === undefined) delete dest[k];
|
|
34537
|
-
}
|
|
34538
|
-
});
|
|
34539
|
-
return dest;
|
|
34540
|
-
};
|
|
34541
|
-
function pathGenerator(raw) {
|
|
34542
|
-
var path = insertPoint(raw);
|
|
34543
|
-
var reg = /^\[(\d+)\]$/;
|
|
34544
|
-
var pathModeValues = objectValues(PATH_MODE);
|
|
34545
|
-
var index = 0;
|
|
34546
|
-
var last = 0;
|
|
34547
|
-
var prop = '';
|
|
34548
|
-
var results = [];
|
|
34549
|
-
while (index >= 0) {
|
|
34550
|
-
index = path.indexOf('.', last);
|
|
34551
|
-
prop = path.substring(last, index === -1 ? undefined : index);
|
|
34552
|
-
var mode = void 0;
|
|
34553
|
-
var lastChar = prop.charAt(prop.length - 1);
|
|
34554
|
-
if (pathModeValues.includes(lastChar)) {
|
|
34555
|
-
mode = lastChar;
|
|
34556
|
-
prop = prop.substring(0, prop.length - 1);
|
|
34557
|
-
}
|
|
34558
|
-
|
|
34559
|
-
// array index
|
|
34560
|
-
var match = reg.exec(prop);
|
|
34561
|
-
// eslint-disable-next-line
|
|
34562
|
-
if (match) prop = parseInt(match[1], 10);
|
|
34563
|
-
last = index + 1;
|
|
34564
|
-
results.push([prop, index === -1 ? undefined : path.substring(last), mode]);
|
|
34565
|
-
}
|
|
34566
|
-
return results;
|
|
34567
|
-
}
|
|
34568
|
-
var deepSet = function deepSet(target, path, value) {
|
|
34569
|
-
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
34570
|
-
if (!is_isObject(target)) throw new Error('Target must be an object.');
|
|
34571
|
-
if (typeof path !== 'string') throw new Error('Path must be a string.');
|
|
34572
|
-
var removeUndefined = options.removeUndefined,
|
|
34573
|
-
skipUndefined = options.skipUndefined;
|
|
34574
|
-
var mergeOptions = {
|
|
34575
|
-
clone: true,
|
|
34576
|
-
removeUndefined: removeUndefined,
|
|
34577
|
-
skipUndefined: skipUndefined
|
|
34578
|
-
};
|
|
34579
|
-
|
|
34580
|
-
// empty root
|
|
34581
|
-
if (path === '') {
|
|
34582
|
-
var dest = deepMerge(target, value, mergeOptions);
|
|
34583
|
-
Object.keys(dest).forEach(function (k) {
|
|
34584
|
-
target[k] = dest[k];
|
|
34585
|
-
});
|
|
34586
|
-
return target;
|
|
34587
|
-
}
|
|
34588
|
-
var current = target;
|
|
34589
|
-
var _iterator = createForOfIteratorHelper_default()(pathGenerator(path)),
|
|
34590
|
-
_step;
|
|
34591
|
-
try {
|
|
34592
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
34593
|
-
var _step$value = slicedToArray_default()(_step.value, 3),
|
|
34594
|
-
prop = _step$value[0],
|
|
34595
|
-
next = _step$value[1],
|
|
34596
|
-
mode = _step$value[2];
|
|
34597
|
-
if (next) {
|
|
34598
|
-
var nextIsArray = /^\[\d+\]/.test(next);
|
|
34599
|
-
if (!current[prop]) current[prop] = nextIsArray ? [] : {};
|
|
34600
|
-
if (nextIsArray && !Array.isArray(current[prop])) {
|
|
34601
|
-
throw new Error("Path ".concat(path, " expect an array."));
|
|
34602
|
-
} else if (Array.isArray(current[prop]) && !nextIsArray) {
|
|
34603
|
-
throw new Error("Path ".concat(path, " is an array, expect an object."));
|
|
34604
|
-
}
|
|
34605
|
-
current = current[prop];
|
|
34606
|
-
continue;
|
|
34607
|
-
}
|
|
34608
|
-
if (options.forceSet) {
|
|
34609
|
-
current[prop] = value;
|
|
34610
|
-
} else if (mode === PATH_MODE.insert) {
|
|
34611
|
-
current.splice(prop, 0, value);
|
|
34612
|
-
} else if (mode === PATH_MODE.append) {
|
|
34613
|
-
current.splice(prop + 1, 0, value);
|
|
34614
|
-
} else {
|
|
34615
|
-
if (skipUndefined && value === undefined) break;
|
|
34616
|
-
current[prop] = isMergeable(current[prop]) && isMergeable(value) ? deepMerge(current[prop], value, mergeOptions) : value;
|
|
34617
|
-
}
|
|
34618
|
-
if (removeUndefined && value === undefined) delete current[prop];
|
|
34619
|
-
}
|
|
34620
|
-
} catch (err) {
|
|
34621
|
-
_iterator.e(err);
|
|
34622
|
-
} finally {
|
|
34623
|
-
_iterator.f();
|
|
34624
|
-
}
|
|
34625
|
-
return target;
|
|
34626
|
-
};
|
|
34627
|
-
var deepGet = function deepGet(target, path) {
|
|
34628
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
34629
|
-
if (!is_isObject(target)) throw new Error('Target must be an object.');
|
|
34630
|
-
if (typeof path !== 'string') throw new Error('Path must be a string.');
|
|
34631
|
-
|
|
34632
|
-
// empty root
|
|
34633
|
-
if (path === '') return target;
|
|
34634
|
-
var defaultValue = options.defaultValue,
|
|
34635
|
-
strictMode = options.strictMode;
|
|
34636
|
-
var current = target;
|
|
34637
|
-
var _iterator2 = createForOfIteratorHelper_default()(pathGenerator(path)),
|
|
34638
|
-
_step2;
|
|
34639
|
-
try {
|
|
34640
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
34641
|
-
var _step2$value = slicedToArray_default()(_step2.value, 3),
|
|
34642
|
-
prop = _step2$value[0],
|
|
34643
|
-
mode = _step2$value[2];
|
|
34644
|
-
var isStrict = mode === PATH_MODE.strict || strictMode && defaultValue === undefined && mode !== PATH_MODE.loose;
|
|
34645
|
-
// eslint-disable-next-line eqeqeq
|
|
34646
|
-
if (current != null && object_hasOwnProperty.call(current, prop)) {
|
|
34647
|
-
current = current[prop];
|
|
34648
|
-
} else if (isStrict) {
|
|
34649
|
-
throw new Error("Path ".concat(path, " is not exist."));
|
|
34650
|
-
} else {
|
|
34651
|
-
current = defaultValue;
|
|
34652
|
-
break;
|
|
34653
|
-
}
|
|
34654
|
-
}
|
|
34655
|
-
} catch (err) {
|
|
34656
|
-
_iterator2.e(err);
|
|
34657
|
-
} finally {
|
|
34658
|
-
_iterator2.f();
|
|
34659
|
-
}
|
|
34660
|
-
return current;
|
|
34661
|
-
};
|
|
34662
|
-
var deepRemove = function deepRemove(target, path) {
|
|
34663
|
-
if (!is_isObject(target)) throw new Error('Target must be an object.');
|
|
34664
|
-
if (typeof path !== 'string' || !path) throw new Error('Path must be a string.');
|
|
34665
|
-
var current = target;
|
|
34666
|
-
var nextIsArray = false;
|
|
34667
|
-
var _iterator3 = createForOfIteratorHelper_default()(pathGenerator(path)),
|
|
34668
|
-
_step3;
|
|
34669
|
-
try {
|
|
34670
|
-
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
34671
|
-
var _step3$value = slicedToArray_default()(_step3.value, 2),
|
|
34672
|
-
prop = _step3$value[0],
|
|
34673
|
-
next = _step3$value[1];
|
|
34674
|
-
// eslint-disable-next-line eqeqeq
|
|
34675
|
-
if (current == null || !object_hasOwnProperty.call(current, prop)) {
|
|
34676
|
-
break;
|
|
34677
|
-
}
|
|
34678
|
-
if (next) {
|
|
34679
|
-
current = current[prop];
|
|
34680
|
-
nextIsArray = /^\[\d+\]/.test(next);
|
|
34681
|
-
} else if (is_isObject(current)) {
|
|
34682
|
-
if (nextIsArray) throw new Error('Target is an object, expect array');
|
|
34683
|
-
delete current[prop];
|
|
34684
|
-
} else {
|
|
34685
|
-
if (!nextIsArray) {
|
|
34686
|
-
throw new Error('Target is an array, expect object');
|
|
34687
|
-
}
|
|
34688
|
-
current.splice(prop, 1);
|
|
34689
|
-
}
|
|
34690
|
-
}
|
|
34691
|
-
} catch (err) {
|
|
34692
|
-
_iterator3.e(err);
|
|
34693
|
-
} finally {
|
|
34694
|
-
_iterator3.f();
|
|
34695
|
-
}
|
|
34696
|
-
return target;
|
|
34697
|
-
};
|
|
34698
|
-
var deepHas = function deepHas(target, path) {
|
|
34699
|
-
if (!isObject(target)) throw new Error('Target must be an object.');
|
|
34700
|
-
if (typeof path !== 'string') throw new Error('Path must be a string.');
|
|
34701
|
-
if (path === '') return true;
|
|
34702
|
-
var current = target;
|
|
34703
|
-
var _iterator4 = _createForOfIteratorHelper(pathGenerator(path)),
|
|
34704
|
-
_step4;
|
|
34705
|
-
try {
|
|
34706
|
-
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
34707
|
-
var _step4$value = _slicedToArray(_step4.value, 2),
|
|
34708
|
-
prop = _step4$value[0];
|
|
34709
|
-
if (!current || !object_hasOwnProperty.call(current, prop)) return false;
|
|
34710
|
-
current = current[prop];
|
|
34711
|
-
}
|
|
34712
|
-
} catch (err) {
|
|
34713
|
-
_iterator4.e(err);
|
|
34714
|
-
} finally {
|
|
34715
|
-
_iterator4.f();
|
|
34716
|
-
}
|
|
34717
|
-
return true;
|
|
34718
|
-
};
|
|
34719
|
-
var object_entries = function entries(obj) {
|
|
34720
|
-
if (!obj) return [];
|
|
34721
|
-
var keys = Object.keys(obj);
|
|
34722
|
-
return keys.map(function (key) {
|
|
34723
|
-
return [key, obj[key]];
|
|
34724
|
-
});
|
|
34725
|
-
};
|
|
34726
|
-
var removeProps = function removeProps(target, remove) {
|
|
34727
|
-
var a = {};
|
|
34728
|
-
var _iterator5 = createForOfIteratorHelper_default()(object_entries(target)),
|
|
34729
|
-
_step5;
|
|
34730
|
-
try {
|
|
34731
|
-
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
34732
|
-
var _step5$value = slicedToArray_default()(_step5.value, 2),
|
|
34733
|
-
key = _step5$value[0],
|
|
34734
|
-
value = _step5$value[1];
|
|
34735
|
-
if (!(key in remove)) {
|
|
34736
|
-
a[key] = value;
|
|
34737
|
-
}
|
|
34738
|
-
}
|
|
34739
|
-
} catch (err) {
|
|
34740
|
-
_iterator5.e(err);
|
|
34741
|
-
} finally {
|
|
34742
|
-
_iterator5.f();
|
|
34743
|
-
}
|
|
34744
|
-
return a;
|
|
34745
|
-
};
|
|
34746
|
-
|
|
34747
|
-
/**
|
|
34748
|
-
* 获取数据对象的全量key路径
|
|
34749
|
-
* @param obj 数据对象
|
|
34750
|
-
* @param parentKey 父级key
|
|
34751
|
-
* @returns 全量key路径
|
|
34752
|
-
* @example
|
|
34753
|
-
* const obj = { a: { b: { c: 1 } } };
|
|
34754
|
-
* const keys = getAllKeyPaths(obj);
|
|
34755
|
-
* console.log(keys); // ['a.b.c', 'a.b', 'a']
|
|
34756
|
-
*/
|
|
34757
|
-
var getAllKeyPaths = function getAllKeyPaths(obj) {
|
|
34758
|
-
var parentKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
34759
|
-
return Object.keys(obj).reduce(function (keys, key) {
|
|
34760
|
-
var newKey = parentKey ? "".concat(parentKey, ".").concat(key) : key;
|
|
34761
|
-
if (Array.isArray(obj[key])) {
|
|
34762
|
-
var childrenKeys = obj[key].map(function (item, index) {
|
|
34763
|
-
if (item !== null && typeof_default()(item) === 'object') {
|
|
34764
|
-
return getAllKeyPaths(item, "".concat(newKey, "[").concat(index, "]"));
|
|
34765
|
-
}
|
|
34766
|
-
return null;
|
|
34767
|
-
}).filter(function (item) {
|
|
34768
|
-
return item !== null;
|
|
34769
|
-
});
|
|
34770
|
-
return keys.concat.apply(keys, toConsumableArray_default()(childrenKeys)).concat(newKey);
|
|
34771
|
-
}
|
|
34772
|
-
return keys.concat(obj[key] !== null && typeof_default()(obj[key]) === 'object' ? getAllKeyPaths(obj[key], newKey) : newKey);
|
|
34773
|
-
}, []);
|
|
34774
|
-
};
|
|
34775
|
-
|
|
34776
|
-
/**
|
|
34777
|
-
* 获取完整的字段key
|
|
34778
|
-
* @param fields 字段key
|
|
34779
|
-
* @param allFields 所有字段key
|
|
34780
|
-
* @returns 完整的字段key
|
|
34781
|
-
* @example
|
|
34782
|
-
* const fields = ['user']
|
|
34783
|
-
* const allFields = ['user', 'user.name', 'user.age', 'user[0].name', 'user[0].age', 'user[1].name', 'user[1].age']
|
|
34784
|
-
* const completeFields = getCompleteFieldKeys(fields, allFields)
|
|
34785
|
-
* console.log(completeFields) // ['user', 'user.name', 'user.age', 'user[0].name', 'user[0].age', 'user[1].name', 'user[1].age']
|
|
34786
|
-
*/
|
|
34787
|
-
var getCompleteFieldKeys = function getCompleteFieldKeys(fields, allFields) {
|
|
34788
|
-
var fieldsArray = isArray(fields) ? fields : [fields];
|
|
34789
|
-
var completeFields = [];
|
|
34790
|
-
fieldsArray.forEach(function (field) {
|
|
34791
|
-
var na = "".concat(field, "[");
|
|
34792
|
-
if (field.endsWith(']')) {
|
|
34793
|
-
na = field;
|
|
34794
|
-
}
|
|
34795
|
-
var no = "".concat(field, ".");
|
|
34796
|
-
completeFields.push(field);
|
|
34797
|
-
var childFields = allFields.filter(function (f) {
|
|
34798
|
-
return f.startsWith(na) || f.startsWith(no);
|
|
34799
|
-
});
|
|
34800
|
-
if (childFields.length) {
|
|
34801
|
-
completeFields.push.apply(completeFields, toConsumableArray_default()(childFields));
|
|
34802
|
-
}
|
|
34803
|
-
});
|
|
34804
|
-
|
|
34805
|
-
// 返回之前去重
|
|
34806
|
-
return Array.from(new Set(completeFields));
|
|
34807
|
-
};
|
|
34808
35161
|
;// CONCATENATED MODULE: ../base/src/common/use-clear.ts
|
|
34809
35162
|
|
|
34810
35163
|
var useClear = function useClear(props) {
|
|
@@ -35380,9 +35733,7 @@ var input_Input = function Input(props) {
|
|
|
35380
35733
|
digits: commonProps.digits,
|
|
35381
35734
|
integerLimit: commonProps.integerLimit,
|
|
35382
35735
|
numType: commonProps.numType,
|
|
35383
|
-
trim: (_ref = (_commonProps$trim = commonProps.trim) !== null && _commonProps$trim !== void 0 ? _commonProps$trim : config.trim) !== null && _ref !== void 0 ? _ref : false
|
|
35384
|
-
// 移除 formName,避免渲染到原生 input 上
|
|
35385
|
-
formName: undefined
|
|
35736
|
+
trim: (_ref = (_commonProps$trim = commonProps.trim) !== null && _commonProps$trim !== void 0 ? _commonProps$trim : config.trim) !== null && _ref !== void 0 ? _ref : false
|
|
35386
35737
|
};
|
|
35387
35738
|
var inputFormatProps = use_input_format(objectSpread2_default()({
|
|
35388
35739
|
value: commonProps.value,
|
|
@@ -35817,7 +36168,7 @@ var Carousel = function Carousel(props) {
|
|
|
35817
36168
|
});
|
|
35818
36169
|
}
|
|
35819
36170
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
35820
|
-
className: classnames_default()(carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.indicatorWrapper, indicatorPosition === 'center' && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.indicatorCenter), indicatorPosition === 'left' && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.indicatorLeft), indicatorPosition === 'right' && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.indicatorRight), indicatorPosition === 'outer' && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.indicatorOuter), indicatorType === 'circle' && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.indicatorTypeCircle), indicatorType === 'number' && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.indicatorTypeNumber), indicatorType === 'line' && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.indicatorTypeLine), indicatorType === '
|
|
36171
|
+
className: classnames_default()(carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.indicatorWrapper, indicatorPosition === 'center' && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.indicatorCenter), indicatorPosition === 'left' && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.indicatorLeft), indicatorPosition === 'right' && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.indicatorRight), indicatorPosition === 'outer' && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.indicatorOuter), indicatorType === 'circle' && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.indicatorTypeCircle), indicatorType === 'number' && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.indicatorTypeNumber), indicatorType === 'line' && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.indicatorTypeLine), indicatorType === 'bar' && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.indicatorTypeBar)),
|
|
35821
36172
|
children: content
|
|
35822
36173
|
});
|
|
35823
36174
|
};
|
|
@@ -37565,7 +37916,6 @@ function use_tree_toArray(value) {
|
|
|
37565
37916
|
if (!Array.isArray(value)) return [value];
|
|
37566
37917
|
return value;
|
|
37567
37918
|
}
|
|
37568
|
-
var global_tree_map = new Map();
|
|
37569
37919
|
var MODE = {
|
|
37570
37920
|
/**
|
|
37571
37921
|
* 返回全选数据,包含父节点和子节点
|
|
@@ -37850,6 +38200,34 @@ var useTree = function useTree(props) {
|
|
|
37850
38200
|
}
|
|
37851
38201
|
return ids;
|
|
37852
38202
|
};
|
|
38203
|
+
var initFlatData = function initFlatData(data, path) {
|
|
38204
|
+
var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
38205
|
+
var pid = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
38206
|
+
var result = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
|
|
38207
|
+
for (var i = 0; i < data.length; i++) {
|
|
38208
|
+
var item = data[i];
|
|
38209
|
+
var id = getKey(item, path[path.length - 1], i);
|
|
38210
|
+
var node = {
|
|
38211
|
+
id: id,
|
|
38212
|
+
level: level,
|
|
38213
|
+
data: item,
|
|
38214
|
+
pid: pid
|
|
38215
|
+
};
|
|
38216
|
+
if (defaultExpandAll) {
|
|
38217
|
+
result.push(node);
|
|
38218
|
+
} else {
|
|
38219
|
+
if (level === 1) {
|
|
38220
|
+
result.push(node);
|
|
38221
|
+
} else if (expanded && pid !== null && expanded.indexOf(pid) >= 0) {
|
|
38222
|
+
result.push(node);
|
|
38223
|
+
}
|
|
38224
|
+
}
|
|
38225
|
+
if (Array.isArray(item[childrenKey])) {
|
|
38226
|
+
initFlatData(item[childrenKey], [].concat(toConsumableArray_default()(path), [id]), level + 1, id, result);
|
|
38227
|
+
}
|
|
38228
|
+
}
|
|
38229
|
+
return result;
|
|
38230
|
+
};
|
|
37853
38231
|
var initValue = function initValue(ids_outer, forceCheck) {
|
|
37854
38232
|
var ids = ids_outer;
|
|
37855
38233
|
if (!context.data || !context.value) {
|
|
@@ -37940,15 +38318,6 @@ var useTree = function useTree(props) {
|
|
|
37940
38318
|
return 2;
|
|
37941
38319
|
};
|
|
37942
38320
|
var setData = function setData(data) {
|
|
37943
|
-
// if(data && global_tree_map.get(data)){
|
|
37944
|
-
// context.cachedValue = global_tree_map.get(data)?.cachedValue || []
|
|
37945
|
-
// context.pathMap = global_tree_map.get(data)?.pathMap || new Map()
|
|
37946
|
-
// context.dataMap = global_tree_map.get(data)?.dataMap || new Map()
|
|
37947
|
-
// context.valueMap = global_tree_map.get(data)?.valueMap || new Map()
|
|
37948
|
-
// context.unmatchedValueMap = global_tree_map.get(data)?.unmatchedValueMap || new Map()
|
|
37949
|
-
// return
|
|
37950
|
-
// }
|
|
37951
|
-
|
|
37952
38321
|
var prevValue = context.value || [];
|
|
37953
38322
|
context.cachedValue = [];
|
|
37954
38323
|
context.pathMap = new Map();
|
|
@@ -37969,8 +38338,6 @@ var useTree = function useTree(props) {
|
|
|
37969
38338
|
}
|
|
37970
38339
|
initValue();
|
|
37971
38340
|
setValue(prevValue);
|
|
37972
|
-
|
|
37973
|
-
// global_tree_map.set(data, context)
|
|
37974
38341
|
};
|
|
37975
38342
|
var set = function set(id, checked, direction) {
|
|
37976
38343
|
if (!isDisabled(id)) {
|
|
@@ -38012,6 +38379,28 @@ var useTree = function useTree(props) {
|
|
|
38012
38379
|
}
|
|
38013
38380
|
return current;
|
|
38014
38381
|
};
|
|
38382
|
+
var updateInnerCheckStatus = function updateInnerCheckStatus() {
|
|
38383
|
+
var _context$value;
|
|
38384
|
+
if (mode !== MODE.MODE_0) return;
|
|
38385
|
+
(_context$value = context.value) === null || _context$value === void 0 || _context$value.forEach(function (id) {
|
|
38386
|
+
var _ref3 = context.pathMap.get(id),
|
|
38387
|
+
children = _ref3.children;
|
|
38388
|
+
if (children.length) {
|
|
38389
|
+
var noCheckedChildren = children.filter(function (cid) {
|
|
38390
|
+
var _context$value2;
|
|
38391
|
+
return !((_context$value2 = context.value) !== null && _context$value2 !== void 0 && _context$value2.includes(cid));
|
|
38392
|
+
});
|
|
38393
|
+
if (noCheckedChildren.length > 0) {
|
|
38394
|
+
setTimeout(function () {
|
|
38395
|
+
setValueMap(id, 2);
|
|
38396
|
+
noCheckedChildren.forEach(function (cid) {
|
|
38397
|
+
setValueMap(cid, 0);
|
|
38398
|
+
});
|
|
38399
|
+
}, 0);
|
|
38400
|
+
}
|
|
38401
|
+
}
|
|
38402
|
+
});
|
|
38403
|
+
};
|
|
38015
38404
|
var appendChildrenExpanded = function appendChildrenExpanded(child, level, pid, insertData) {
|
|
38016
38405
|
if (!child) return;
|
|
38017
38406
|
child.forEach(function (item, i) {
|
|
@@ -38097,7 +38486,7 @@ var useTree = function useTree(props) {
|
|
|
38097
38486
|
expanded: true
|
|
38098
38487
|
}));
|
|
38099
38488
|
});
|
|
38100
|
-
var _getExpandVirtualData = getExpandVirtualData(context.data, expanded, getKey, childrenKey),
|
|
38489
|
+
var _getExpandVirtualData = getExpandVirtualData(props.tiledData || context.data, expanded, getKey, childrenKey),
|
|
38101
38490
|
treeDataInfo = _getExpandVirtualData.treeDataInfo;
|
|
38102
38491
|
if (!treeDataInfo) {
|
|
38103
38492
|
return;
|
|
@@ -38122,11 +38511,18 @@ var useTree = function useTree(props) {
|
|
|
38122
38511
|
if (props.datum) return;
|
|
38123
38512
|
if (!dataUpdate) return;
|
|
38124
38513
|
setData(data);
|
|
38514
|
+
updateInnerCheckStatus();
|
|
38125
38515
|
}, [data]);
|
|
38126
38516
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
38127
38517
|
if (props.datum) return;
|
|
38128
38518
|
setValue(value);
|
|
38129
38519
|
}, [value]);
|
|
38520
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
38521
|
+
if (!virtual) return;
|
|
38522
|
+
if (!props.tiledData) return;
|
|
38523
|
+
var tiledFlatData = initFlatData(props.tiledData, [], 1);
|
|
38524
|
+
setDataFlat(tiledFlatData);
|
|
38525
|
+
}, [props.tiledData]);
|
|
38130
38526
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
38131
38527
|
setInited(true);
|
|
38132
38528
|
}, []);
|
|
@@ -38279,7 +38675,9 @@ var Scroll = function Scroll(props) {
|
|
|
38279
38675
|
_props$scrollWidth = props.scrollWidth,
|
|
38280
38676
|
scrollWidth = _props$scrollWidth === void 0 ? 0 : _props$scrollWidth,
|
|
38281
38677
|
_props$defaultHeight = props.defaultHeight,
|
|
38282
|
-
defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight
|
|
38678
|
+
defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight,
|
|
38679
|
+
_props$keepScrollTop = props.keepScrollTop,
|
|
38680
|
+
keepScrollTop = _props$keepScrollTop === void 0 ? false : _props$keepScrollTop;
|
|
38283
38681
|
var _useResize = useResize({
|
|
38284
38682
|
targetRef: containerRef,
|
|
38285
38683
|
timer: 100
|
|
@@ -38303,7 +38701,10 @@ var Scroll = function Scroll(props) {
|
|
|
38303
38701
|
}, isRtl ? 'right' : 'left', 0), "top", 0);
|
|
38304
38702
|
|
|
38305
38703
|
// 当滚动容器的高度为 0 时,paddingTop 为 0,避免滚动条抖动现象
|
|
38306
|
-
var paddingTop =
|
|
38704
|
+
var paddingTop = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
38705
|
+
if (keepScrollTop) return Math.max(0, Math.floor(scrollHeight - height));
|
|
38706
|
+
return height === 0 ? 0 : Math.max(0, Math.floor(scrollHeight - height));
|
|
38707
|
+
}, [scrollHeight, height]);
|
|
38307
38708
|
var placeStyle = {
|
|
38308
38709
|
paddingTop: paddingTop,
|
|
38309
38710
|
width: scrollWidth,
|
|
@@ -38415,6 +38816,7 @@ var VirtualList = function VirtualList(props) {
|
|
|
38415
38816
|
className = props.className,
|
|
38416
38817
|
lineHeight = props.lineHeight,
|
|
38417
38818
|
height = props.height,
|
|
38819
|
+
keepScrollTop = props.keepScrollTop,
|
|
38418
38820
|
keepScrollHeight = props.keepScrollHeight,
|
|
38419
38821
|
renderItem = props.renderItem,
|
|
38420
38822
|
customRenderItem = props.customRenderItem,
|
|
@@ -38581,6 +38983,7 @@ var VirtualList = function VirtualList(props) {
|
|
|
38581
38983
|
style: nextStyle,
|
|
38582
38984
|
height: height,
|
|
38583
38985
|
scrollWidth: 0,
|
|
38986
|
+
keepScrollTop: keepScrollTop,
|
|
38584
38987
|
scrollerStyle: scrollerStyle,
|
|
38585
38988
|
scrollHeight: scrollHeight,
|
|
38586
38989
|
childrenStyle: {
|
|
@@ -38611,6 +39014,7 @@ var VirtualList = function VirtualList(props) {
|
|
|
38611
39014
|
}, [startIndex]);
|
|
38612
39015
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
38613
39016
|
// 数据变化的时候清空掉 preIndex, 如果之前有缓存的index, setRowHeight 会有问题
|
|
39017
|
+
if (keepScrollTop) return;
|
|
38614
39018
|
if (keepScrollHeight) return;
|
|
38615
39019
|
setTop(0);
|
|
38616
39020
|
setStartIndex(0);
|
|
@@ -39219,6 +39623,8 @@ var Result = function Result(props) {
|
|
|
39219
39623
|
var dis = info.index === 1 ? disabledRight : disabledLeft;
|
|
39220
39624
|
var className = classnames_default()(styles === null || styles === void 0 ? void 0 : styles.resultText, info.target && (styles === null || styles === void 0 ? void 0 : styles.placeholder), dis && (styles === null || styles === void 0 ? void 0 : styles.resultTextDisabled), info.index === activeIndex && (styles === null || styles === void 0 ? void 0 : styles.resultTextActive));
|
|
39221
39625
|
var formFieldId = (fieldId === null || fieldId === void 0 ? void 0 : fieldId.split(separator)) || [];
|
|
39626
|
+
var inputValue = info.target || info.value || '';
|
|
39627
|
+
var displayValue = props.type === 'week' && inputValue ? "".concat(inputValue).concat(getLocale(locale, 'weekShort')) : inputValue;
|
|
39222
39628
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
39223
39629
|
className: className,
|
|
39224
39630
|
id: formFieldId[info.index],
|
|
@@ -39234,7 +39640,7 @@ var Result = function Result(props) {
|
|
|
39234
39640
|
readOnly: !info.inputable,
|
|
39235
39641
|
open: !!open,
|
|
39236
39642
|
inputRef: inputRef,
|
|
39237
|
-
value:
|
|
39643
|
+
value: displayValue,
|
|
39238
39644
|
placeholder: info.place,
|
|
39239
39645
|
onChange: function onChange(s) {
|
|
39240
39646
|
_onChange(s, info.index);
|
|
@@ -39853,6 +40259,7 @@ var result_Result = function Result(props) {
|
|
|
39853
40259
|
var jssStyle = props.jssStyle,
|
|
39854
40260
|
multiple = props.multiple,
|
|
39855
40261
|
size = props.size,
|
|
40262
|
+
reFocus = props.reFocus,
|
|
39856
40263
|
valueProp = props.value,
|
|
39857
40264
|
focus = props.focus,
|
|
39858
40265
|
keygen = props.keygen,
|
|
@@ -40165,10 +40572,12 @@ var result_Result = function Result(props) {
|
|
|
40165
40572
|
props.setInputText(textContent);
|
|
40166
40573
|
}
|
|
40167
40574
|
}
|
|
40168
|
-
|
|
40169
|
-
|
|
40170
|
-
|
|
40171
|
-
|
|
40575
|
+
if (!reFocus) {
|
|
40576
|
+
setTimeout(function () {
|
|
40577
|
+
var _inputRef$current;
|
|
40578
|
+
inputRef === null || inputRef === void 0 || (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.select();
|
|
40579
|
+
}, 10);
|
|
40580
|
+
}
|
|
40172
40581
|
}
|
|
40173
40582
|
mounted.current = true;
|
|
40174
40583
|
}, [focus, placeholder, multiple]);
|
|
@@ -40307,6 +40716,7 @@ var Cascader = function Cascader(props0) {
|
|
|
40307
40716
|
positionProp = _props$position === void 0 ? 'bottom-left' : _props$position,
|
|
40308
40717
|
absolute = props.absolute,
|
|
40309
40718
|
zIndex = props.zIndex,
|
|
40719
|
+
emptyText = props.emptyText,
|
|
40310
40720
|
getComponentRef = props.getComponentRef,
|
|
40311
40721
|
onFocus = props.onFocus,
|
|
40312
40722
|
onBlur = props.onBlur,
|
|
@@ -40731,11 +41141,25 @@ var Cascader = function Cascader(props0) {
|
|
|
40731
41141
|
children: cascaderList
|
|
40732
41142
|
});
|
|
40733
41143
|
};
|
|
41144
|
+
var renderEmpty = function renderEmpty() {
|
|
41145
|
+
if (emptyText) {
|
|
41146
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
41147
|
+
className: styles === null || styles === void 0 ? void 0 : styles.empty,
|
|
41148
|
+
children: emptyText
|
|
41149
|
+
});
|
|
41150
|
+
}
|
|
41151
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
41152
|
+
className: styles === null || styles === void 0 ? void 0 : styles.empty,
|
|
41153
|
+
children: getLocale(locale, 'noData')
|
|
41154
|
+
});
|
|
41155
|
+
};
|
|
40734
41156
|
var renderNormalList = function renderNormalList() {
|
|
40735
41157
|
if (!open && isFirstRender.current) {
|
|
40736
41158
|
return null;
|
|
40737
41159
|
}
|
|
40738
41160
|
isFirstRender.current = false;
|
|
41161
|
+
var isEmpty = !(filterData !== null && filterData !== void 0 && filterData.length);
|
|
41162
|
+
if (isEmpty && props.emptyText !== false) return renderEmpty();
|
|
40739
41163
|
var list = renderList();
|
|
40740
41164
|
return renderOptionList ? renderOptionList(list, {
|
|
40741
41165
|
loading: !!loading
|
|
@@ -40784,12 +41208,6 @@ var Cascader = function Cascader(props0) {
|
|
|
40784
41208
|
})
|
|
40785
41209
|
});
|
|
40786
41210
|
};
|
|
40787
|
-
var renderEmpty = function renderEmpty() {
|
|
40788
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
40789
|
-
className: styles === null || styles === void 0 ? void 0 : styles.empty,
|
|
40790
|
-
children: getLocale(locale, 'noData')
|
|
40791
|
-
});
|
|
40792
|
-
};
|
|
40793
41211
|
var renderPanel = function renderPanel() {
|
|
40794
41212
|
if (props.loading) {
|
|
40795
41213
|
return renderLoading();
|
|
@@ -40939,6 +41357,7 @@ var FieldsetContext = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
40939
41357
|
path: '',
|
|
40940
41358
|
validateFieldSet: function validateFieldSet() {}
|
|
40941
41359
|
});
|
|
41360
|
+
FieldsetContext.displayName = 'FieldsetContext';
|
|
40942
41361
|
function extendName() {
|
|
40943
41362
|
var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
40944
41363
|
var name = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -41391,7 +41810,6 @@ function useFormControl(props) {
|
|
|
41391
41810
|
var formValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
41392
41811
|
var errors = arguments.length > 1 ? arguments[1] : undefined;
|
|
41393
41812
|
var severErrors = arguments.length > 2 ? arguments[2] : undefined;
|
|
41394
|
-
var names = arguments.length > 3 ? arguments[3] : undefined;
|
|
41395
41813
|
if (!name) return;
|
|
41396
41814
|
if (isArray(name)) {
|
|
41397
41815
|
var _value = getValue(name, formValue);
|
|
@@ -41403,7 +41821,7 @@ function useFormControl(props) {
|
|
|
41403
41821
|
var dv = isArray(defaultValue) ? defaultValue : [];
|
|
41404
41822
|
var nextValue = [];
|
|
41405
41823
|
name.forEach(function (n, index) {
|
|
41406
|
-
if (
|
|
41824
|
+
if (_value[index] === undefined && dv[index] !== undefined) {
|
|
41407
41825
|
nextValue[index] = dv[index];
|
|
41408
41826
|
} else {
|
|
41409
41827
|
nextValue[index] = _value[index];
|
|
@@ -41417,7 +41835,7 @@ function useFormControl(props) {
|
|
|
41417
41835
|
setErrorState(_error2);
|
|
41418
41836
|
}
|
|
41419
41837
|
if (!shallowEqual(_value2, latestInfo.valueState)) {
|
|
41420
|
-
if (
|
|
41838
|
+
if (_value2 === undefined && defaultValue !== undefined) {
|
|
41421
41839
|
setValueState(defaultValue);
|
|
41422
41840
|
} else {
|
|
41423
41841
|
setValueState(_value2);
|
|
@@ -41587,6 +42005,7 @@ var FormField = function FormField(props) {
|
|
|
41587
42005
|
var error = (_childrenProps$error = childrenProps.error) !== null && _childrenProps$error !== void 0 ? _childrenProps$error : formControl.error;
|
|
41588
42006
|
var status = (_childrenProps$status = childrenProps.status) !== null && _childrenProps$status !== void 0 ? _childrenProps$status : formControl.error ? 'error' : undefined;
|
|
41589
42007
|
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormFieldContext),
|
|
42008
|
+
fieldId = _useContext.fieldId,
|
|
41590
42009
|
separator = _useContext.separator;
|
|
41591
42010
|
var formFieldId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
41592
42011
|
if (!formConfig.formName) return;
|
|
@@ -41598,6 +42017,12 @@ var FormField = function FormField(props) {
|
|
|
41598
42017
|
}
|
|
41599
42018
|
return getFieldId(formControl.name, formConfig.formName);
|
|
41600
42019
|
}, [formControl.name, formConfig.formName, childrenProps.id]);
|
|
42020
|
+
var _useContext2 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FieldsetContext),
|
|
42021
|
+
fieldsetPath = _useContext2.path;
|
|
42022
|
+
var fieldsetPathId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
42023
|
+
if (!formConfig.formName) return;
|
|
42024
|
+
return getFieldId(fieldsetPath, formConfig.formName);
|
|
42025
|
+
}, [fieldsetPath, formConfig.formName]);
|
|
41601
42026
|
var cloneProps = {
|
|
41602
42027
|
onChange: handleChange,
|
|
41603
42028
|
status: status,
|
|
@@ -41619,7 +42044,7 @@ var FormField = function FormField(props) {
|
|
|
41619
42044
|
}
|
|
41620
42045
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(FormFieldContext.Provider, {
|
|
41621
42046
|
value: {
|
|
41622
|
-
fieldId: formFieldId,
|
|
42047
|
+
fieldId: formFieldId || fieldId || fieldsetPathId,
|
|
41623
42048
|
separator: separator
|
|
41624
42049
|
},
|
|
41625
42050
|
children: finalChildren
|
|
@@ -43757,6 +44182,10 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
|
43757
44182
|
if (props.formatResult) {
|
|
43758
44183
|
if (typeof props.formatResult === 'string') {
|
|
43759
44184
|
return getFormatValueArr(dateArr, props.formatResult);
|
|
44185
|
+
} else if (typeof props.formatResult === 'function') {
|
|
44186
|
+
return dateArr.map(function (item) {
|
|
44187
|
+
return props.formatResult(item);
|
|
44188
|
+
});
|
|
43760
44189
|
} else {
|
|
43761
44190
|
return dateArr.map(function (item) {
|
|
43762
44191
|
if (!item) return '';
|
|
@@ -44679,7 +45108,7 @@ var Day = function Day(props) {
|
|
|
44679
45108
|
};
|
|
44680
45109
|
var renderFooter = function renderFooter() {
|
|
44681
45110
|
var _props$rangeDate, _props$rangeDate2;
|
|
44682
|
-
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]));
|
|
45111
|
+
var showLeft = (props.type === 'datetime' || props.type === 'date') && (((_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]));
|
|
44683
45112
|
var timeStr = func.getTimeStr();
|
|
44684
45113
|
if (!showLeft && !props.showSelNow) return null;
|
|
44685
45114
|
var format = props.format;
|
|
@@ -44691,6 +45120,7 @@ var Day = function Day(props) {
|
|
|
44691
45120
|
if (match) format = match[0];
|
|
44692
45121
|
}
|
|
44693
45122
|
var showNeedConfirm = props.needConfirm && !props.range;
|
|
45123
|
+
if (props.type !== 'datetime' && props.type !== 'date' && !showNeedConfirm) return null;
|
|
44694
45124
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
44695
45125
|
className: styles === null || styles === void 0 ? void 0 : styles.pickerFooter,
|
|
44696
45126
|
dir: direction,
|
|
@@ -44715,18 +45145,18 @@ var Day = function Day(props) {
|
|
|
44715
45145
|
})]
|
|
44716
45146
|
})
|
|
44717
45147
|
}), props.showSelNow && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
44718
|
-
className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterNow,
|
|
45148
|
+
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerFooterNow),
|
|
44719
45149
|
style: {
|
|
44720
45150
|
marginRight: showNeedConfirm ? 'auto' : undefined,
|
|
44721
|
-
paddingLeft: showNeedConfirm ? 6 : undefined
|
|
45151
|
+
paddingLeft: showNeedConfirm ? props.type === 'date' ? 22 : 6 : undefined
|
|
44722
45152
|
},
|
|
44723
|
-
children: [props.
|
|
45153
|
+
children: [props.type === 'date' && /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_link_link, {
|
|
44724
45154
|
type: "primary",
|
|
44725
45155
|
jssStyle: jssStyle,
|
|
44726
45156
|
className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterBtn,
|
|
44727
45157
|
onClick: selNow,
|
|
44728
45158
|
children: getLocale(locale, 'now')
|
|
44729
|
-
}), props.
|
|
45159
|
+
}), props.type === 'datetime' && /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_link_link, {
|
|
44730
45160
|
type: "primary",
|
|
44731
45161
|
jssStyle: jssStyle,
|
|
44732
45162
|
className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterBtn,
|
|
@@ -46270,7 +46700,7 @@ var DatePicker = function DatePicker(props0) {
|
|
|
46270
46700
|
onRef: popupRef,
|
|
46271
46701
|
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerWrapper),
|
|
46272
46702
|
display: 'block',
|
|
46273
|
-
type: '
|
|
46703
|
+
type: 'scale-y',
|
|
46274
46704
|
duration: 'fast',
|
|
46275
46705
|
show: open,
|
|
46276
46706
|
onMouseDown: preventDefault,
|
|
@@ -46487,7 +46917,7 @@ var useDescriptions = function useDescriptions(props) {
|
|
|
46487
46917
|
|
|
46488
46918
|
|
|
46489
46919
|
var Descriptions = function Descriptions(props) {
|
|
46490
|
-
var _jssStyleProps$descri
|
|
46920
|
+
var _jssStyleProps$descri, _renderItem$;
|
|
46491
46921
|
var className = props.className,
|
|
46492
46922
|
jssStyleProps = props.jssStyle,
|
|
46493
46923
|
style = props.style,
|
|
@@ -46606,15 +47036,23 @@ var Descriptions = function Descriptions(props) {
|
|
|
46606
47036
|
style: style,
|
|
46607
47037
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Header, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
46608
47038
|
className: bodyClassName,
|
|
46609
|
-
children: /*#__PURE__*/(0,jsx_runtime.
|
|
47039
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
46610
47040
|
className: jssStyle === null || jssStyle === void 0 ? void 0 : jssStyle.table,
|
|
46611
47041
|
cellPadding: 0,
|
|
46612
47042
|
cellSpacing: 0,
|
|
46613
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)("
|
|
47043
|
+
children: [layout === 'inlineHorizontal' && typeof column === 'number' && column > 1 && /*#__PURE__*/(0,jsx_runtime.jsx)("colgroup", {
|
|
47044
|
+
children: (_renderItem$ = renderItem[0]) === null || _renderItem$ === void 0 ? void 0 : _renderItem$.map(function (_, index, arr) {
|
|
47045
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("col", {
|
|
47046
|
+
style: {
|
|
47047
|
+
width: "".concat(1 / arr.length * 100, "%")
|
|
47048
|
+
}
|
|
47049
|
+
}, index);
|
|
47050
|
+
})
|
|
47051
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
|
|
46614
47052
|
children: renderItem.map(function (d, i) {
|
|
46615
47053
|
return renderHandle(d, i);
|
|
46616
47054
|
})
|
|
46617
|
-
})
|
|
47055
|
+
})]
|
|
46618
47056
|
})
|
|
46619
47057
|
})]
|
|
46620
47058
|
});
|
|
@@ -47791,7 +48229,8 @@ var useTextarea = function useTextarea(props) {
|
|
|
47791
48229
|
|
|
47792
48230
|
|
|
47793
48231
|
|
|
47794
|
-
var simple_textarea_excluded = ["jssStyle", "className", "style", "status", "size", "prefix", "suffix", "underline", "autosize", "border", "resize", "onEnterPress", "
|
|
48232
|
+
var simple_textarea_excluded = ["jssStyle", "className", "style", "status", "size", "prefix", "suffix", "underline", "autosize", "border", "resize", "onEnterPress", "onStatusChange", "renderTextarea", "limit", "clearable"];
|
|
48233
|
+
|
|
47795
48234
|
|
|
47796
48235
|
|
|
47797
48236
|
|
|
@@ -47814,8 +48253,10 @@ var Textarea = function Textarea(props) {
|
|
|
47814
48253
|
_props$resize = props.resize,
|
|
47815
48254
|
resize = _props$resize === void 0 ? false : _props$resize,
|
|
47816
48255
|
_onEnterPress = props.onEnterPress,
|
|
47817
|
-
|
|
48256
|
+
onStatusChange = props.onStatusChange,
|
|
47818
48257
|
renderTextarea = props.renderTextarea,
|
|
48258
|
+
limit = props.limit,
|
|
48259
|
+
clearable = props.clearable,
|
|
47819
48260
|
rest = objectWithoutProperties_default()(props, simple_textarea_excluded);
|
|
47820
48261
|
var textareaClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$textarea = jssStyle.textarea) === null || _jssStyle$textarea === void 0 ? void 0 : _jssStyle$textarea.call(jssStyle);
|
|
47821
48262
|
var _useTextarea = use_textarea(objectSpread2_default()({}, rest)),
|
|
@@ -47841,8 +48282,8 @@ var Textarea = function Textarea(props) {
|
|
|
47841
48282
|
onKeyUp: onKeyUp
|
|
47842
48283
|
});
|
|
47843
48284
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
47844
|
-
if (
|
|
47845
|
-
|
|
48285
|
+
if (onStatusChange) {
|
|
48286
|
+
onStatusChange({
|
|
47846
48287
|
focused: focused
|
|
47847
48288
|
});
|
|
47848
48289
|
}
|
|
@@ -47851,13 +48292,32 @@ var Textarea = function Textarea(props) {
|
|
|
47851
48292
|
if (typeof renderTextarea === 'function') {
|
|
47852
48293
|
textareaEl = renderTextarea(textareaEl);
|
|
47853
48294
|
}
|
|
48295
|
+
var limitEl = null;
|
|
48296
|
+
if (limit) {
|
|
48297
|
+
var _props$value;
|
|
48298
|
+
limitEl = /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
48299
|
+
className: textareaClasses === null || textareaClasses === void 0 ? void 0 : textareaClasses.limit,
|
|
48300
|
+
children: typeof limit === 'number' ? "".concat(((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.length) || 0, "/").concat(limit) : limit(props.value)
|
|
48301
|
+
});
|
|
48302
|
+
}
|
|
48303
|
+
var clearEl = null;
|
|
48304
|
+
if (clearable && props.value) {
|
|
48305
|
+
clearEl = /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
48306
|
+
className: textareaClasses === null || textareaClasses === void 0 ? void 0 : textareaClasses.clear,
|
|
48307
|
+
onClick: function onClick() {
|
|
48308
|
+
var _props$onChange;
|
|
48309
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, '');
|
|
48310
|
+
},
|
|
48311
|
+
children: icons_config.textarea.Close
|
|
48312
|
+
});
|
|
48313
|
+
}
|
|
47854
48314
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({
|
|
47855
48315
|
id: fieldId
|
|
47856
48316
|
}, getDataAttribute(defineProperty_default()({}, 'input-border', 'true'))), getRootProps({
|
|
47857
48317
|
className: rootClass,
|
|
47858
48318
|
style: style
|
|
47859
48319
|
})), {}, {
|
|
47860
|
-
children: [prefix, textareaEl, suffix]
|
|
48320
|
+
children: [prefix, textareaEl, suffix, limitEl, clearEl]
|
|
47861
48321
|
}));
|
|
47862
48322
|
};
|
|
47863
48323
|
/* harmony default export */ var simple_textarea = (Textarea);
|
|
@@ -47956,7 +48416,7 @@ var useAutoSize = function useAutoSize(props) {
|
|
|
47956
48416
|
|
|
47957
48417
|
|
|
47958
48418
|
|
|
47959
|
-
var textarea_excluded = ["info", "suffix", "renderFooter", "width", "style", "jssStyle", "onBlur", "status", "trim", "delay"];
|
|
48419
|
+
var textarea_excluded = ["info", "suffix", "renderFooter", "width", "style", "jssStyle", "onBlur", "status", "limit", "trim", "delay"];
|
|
47960
48420
|
|
|
47961
48421
|
|
|
47962
48422
|
|
|
@@ -47985,6 +48445,7 @@ var textarea_Textarea = function Textarea(props0) {
|
|
|
47985
48445
|
jssStyle = props.jssStyle,
|
|
47986
48446
|
onBlur = props.onBlur,
|
|
47987
48447
|
status = props.status,
|
|
48448
|
+
limit = props.limit,
|
|
47988
48449
|
trimProps = props.trim,
|
|
47989
48450
|
delayProps = props.delay,
|
|
47990
48451
|
resetProps = objectWithoutProperties_default()(props, textarea_excluded);
|
|
@@ -48016,7 +48477,12 @@ var textarea_Textarea = function Textarea(props0) {
|
|
|
48016
48477
|
var inputAbleParams = {
|
|
48017
48478
|
value: resetProps.value,
|
|
48018
48479
|
onChange: resetProps.onChange,
|
|
48019
|
-
beforeChange:
|
|
48480
|
+
beforeChange: typeof limit === 'number' ? function (v) {
|
|
48481
|
+
var _resetProps$beforeCha;
|
|
48482
|
+
if (v.length > limit) return v.slice(0, limit);
|
|
48483
|
+
if (resetProps.beforeChange) (_resetProps$beforeCha = resetProps.beforeChange) === null || _resetProps$beforeCha === void 0 || _resetProps$beforeCha.call(resetProps, v);
|
|
48484
|
+
return v;
|
|
48485
|
+
} : resetProps.beforeChange,
|
|
48020
48486
|
defaultValue: resetProps.defaultValue,
|
|
48021
48487
|
delay: delay
|
|
48022
48488
|
};
|
|
@@ -48125,13 +48591,14 @@ var textarea_Textarea = function Textarea(props0) {
|
|
|
48125
48591
|
rows: 4,
|
|
48126
48592
|
jssStyle: jssStyle
|
|
48127
48593
|
}, forwardProps), formatProps), {}, {
|
|
48128
|
-
className: classnames_default()(innerTitleProps.innerTitle && (textareaClasses === null || textareaClasses === void 0 ? void 0 : textareaClasses.wrapperInnerTitle), resetProps.className),
|
|
48594
|
+
className: classnames_default()(innerTitleProps.innerTitle && (textareaClasses === null || textareaClasses === void 0 ? void 0 : textareaClasses.wrapperInnerTitle), props.clearable && (textareaClasses === null || textareaClasses === void 0 ? void 0 : textareaClasses.wrapperWithClear), resetProps.className),
|
|
48129
48595
|
renderTextarea: renderTextarea,
|
|
48596
|
+
limit: limit,
|
|
48130
48597
|
status: tipProps.error ? 'error' : status,
|
|
48598
|
+
onStatusChange: onStatusChange,
|
|
48131
48599
|
value: inputAbleProps.value || '',
|
|
48132
48600
|
suffix: mergeSuffix,
|
|
48133
48601
|
style: mergeStyle,
|
|
48134
|
-
getStatus: onStatusChange,
|
|
48135
48602
|
rootRef: rootRef,
|
|
48136
48603
|
autosize: props.autosize
|
|
48137
48604
|
}));
|
|
@@ -48503,6 +48970,7 @@ var Empty = function Empty(props) {
|
|
|
48503
48970
|
}, rest);
|
|
48504
48971
|
};
|
|
48505
48972
|
var renderImage = function renderImage() {
|
|
48973
|
+
if (icon === null) return null;
|
|
48506
48974
|
if (imgSrc) {
|
|
48507
48975
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
48508
48976
|
className: styles === null || styles === void 0 ? void 0 : styles.image,
|
|
@@ -48719,7 +49187,6 @@ var useForm = function useForm(props) {
|
|
|
48719
49187
|
forceSet: true
|
|
48720
49188
|
};
|
|
48721
49189
|
var preValue = use_previous_usePrevious(props.value);
|
|
48722
|
-
var formDomRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
|
|
48723
49190
|
var _React$useRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
|
|
48724
49191
|
defaultValues: {},
|
|
48725
49192
|
validateMap: {},
|
|
@@ -48745,7 +49212,7 @@ var useForm = function useForm(props) {
|
|
|
48745
49212
|
Object.keys(context.updateMap).forEach(function (key) {
|
|
48746
49213
|
var _context$updateMap$ke;
|
|
48747
49214
|
(_context$updateMap$ke = context.updateMap[key]) === null || _context$updateMap$ke === void 0 || _context$updateMap$ke.forEach(function (update) {
|
|
48748
|
-
update(context.value, context.errors, context.serverErrors
|
|
49215
|
+
update(context.value, context.errors, context.serverErrors);
|
|
48749
49216
|
});
|
|
48750
49217
|
});
|
|
48751
49218
|
Object.keys(context.flowMap).forEach(function (key) {
|
|
@@ -48763,12 +49230,12 @@ var useForm = function useForm(props) {
|
|
|
48763
49230
|
var _context$updateMap$pa;
|
|
48764
49231
|
var parentKey = key.split('.')[0];
|
|
48765
49232
|
(_context$updateMap$pa = context.updateMap[parentKey]) === null || _context$updateMap$pa === void 0 || _context$updateMap$pa.forEach(function (update) {
|
|
48766
|
-
update(context.value, context.errors, context.serverErrors
|
|
49233
|
+
update(context.value, context.errors, context.serverErrors);
|
|
48767
49234
|
});
|
|
48768
49235
|
} else {
|
|
48769
49236
|
var _context$updateMap$ke2;
|
|
48770
49237
|
(_context$updateMap$ke2 = context.updateMap[key]) === null || _context$updateMap$ke2 === void 0 || _context$updateMap$ke2.forEach(function (update) {
|
|
48771
|
-
update(context.value, context.errors, context.serverErrors
|
|
49238
|
+
update(context.value, context.errors, context.serverErrors);
|
|
48772
49239
|
});
|
|
48773
49240
|
}
|
|
48774
49241
|
(_context$flowMap$key = context.flowMap[key]) === null || _context$flowMap$key === void 0 || _context$flowMap$key.forEach(function (update) {
|
|
@@ -48793,9 +49260,9 @@ var useForm = function useForm(props) {
|
|
|
48793
49260
|
onError === null || onError === void 0 || onError(err);
|
|
48794
49261
|
if (!props.scrollToError) return;
|
|
48795
49262
|
setTimeout(function () {
|
|
48796
|
-
var
|
|
49263
|
+
var _props$formElRef$curr;
|
|
48797
49264
|
var selector = "[".concat(getDataAttributeName('status'), "=\"error\"]");
|
|
48798
|
-
var el = (
|
|
49265
|
+
var el = (_props$formElRef$curr = props.formElRef.current) === null || _props$formElRef$curr === void 0 ? void 0 : _props$formElRef$curr.querySelector(selector);
|
|
48799
49266
|
if (el) {
|
|
48800
49267
|
el.scrollIntoView();
|
|
48801
49268
|
var focusableSelectors = 'textarea, input,[tabindex]:not([tabindex="-1"])';
|
|
@@ -48919,10 +49386,20 @@ var useForm = function useForm(props) {
|
|
|
48919
49386
|
var isVisibleX = elementRect.left >= parentRect.left && elementRect.right <= parentRect.right;
|
|
48920
49387
|
if (!isVisibleY || !isVisibleX) {
|
|
48921
49388
|
// 计算元素相对于父元素的偏移量
|
|
48922
|
-
var offsetTop =
|
|
48923
|
-
var offsetLeft =
|
|
48924
|
-
|
|
48925
|
-
|
|
49389
|
+
var offsetTop = elementRect.top - parentRect.top;
|
|
49390
|
+
var offsetLeft = elementRect.left - parentRect.left;
|
|
49391
|
+
// 如果是往上滚动,那么只有当元素的偏移量小于0时才需要滚动
|
|
49392
|
+
if (offsetTop < 0) {
|
|
49393
|
+
parentEl.scrollTop = Math.max(parentEl.scrollTop + offsetTop, 0);
|
|
49394
|
+
} else {
|
|
49395
|
+
parentEl.scrollTop = Math.min(parentEl.scrollTop + offsetTop, parentEl.scrollHeight - parentEl.clientHeight);
|
|
49396
|
+
}
|
|
49397
|
+
// 如果是往左滚动,那么只有当元素的偏移量小于0时才需要滚动
|
|
49398
|
+
if (offsetLeft < 0) {
|
|
49399
|
+
parentEl.scrollLeft = Math.max(parentEl.scrollLeft + offsetLeft, 0);
|
|
49400
|
+
} else {
|
|
49401
|
+
parentEl.scrollLeft = Math.min(parentEl.scrollLeft + offsetLeft, parentEl.scrollWidth - parentEl.clientWidth);
|
|
49402
|
+
}
|
|
48926
49403
|
}
|
|
48927
49404
|
} else {
|
|
48928
49405
|
// 如果没有找到可滚动的父元素,使用默认行为
|
|
@@ -49126,7 +49603,6 @@ var useForm = function useForm(props) {
|
|
|
49126
49603
|
var externalProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
49127
49604
|
var externalEventHandlers = extractEventHandlers(externalProps);
|
|
49128
49605
|
return objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, externalProps), externalEventHandlers), {}, {
|
|
49129
|
-
ref: formDomRef,
|
|
49130
49606
|
disabled: !!disabled,
|
|
49131
49607
|
onSubmit: handleSubmit(externalEventHandlers),
|
|
49132
49608
|
onReset: handleReset(externalEventHandlers)
|
|
@@ -49170,6 +49646,7 @@ var useForm = function useForm(props) {
|
|
|
49170
49646
|
}
|
|
49171
49647
|
if (validateFieldSet.size === 0 && updateFieldSet.size === 0) {
|
|
49172
49648
|
context.names.delete(n);
|
|
49649
|
+
delete context.errors[n];
|
|
49173
49650
|
delete context.defaultValues[n];
|
|
49174
49651
|
}
|
|
49175
49652
|
var finalReserveAble = (_props$reserveAble = props.reserveAble) !== null && _props$reserveAble !== void 0 ? _props$reserveAble : reserveAble;
|
|
@@ -49341,12 +49818,14 @@ var Form = function Form(props) {
|
|
|
49341
49818
|
beforeChange: undefined,
|
|
49342
49819
|
reserveAble: false
|
|
49343
49820
|
};
|
|
49821
|
+
var formElRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
49344
49822
|
var _useInputAble = useInputAble(inputAbleParams),
|
|
49345
49823
|
value = _useInputAble.value,
|
|
49346
49824
|
onChange = _useInputAble.onChange;
|
|
49347
49825
|
var _useForm = use_form(objectSpread2_default()(objectSpread2_default()({}, rest), {}, {
|
|
49348
49826
|
value: value,
|
|
49349
|
-
onChange: onChange
|
|
49827
|
+
onChange: onChange,
|
|
49828
|
+
formElRef: formElRef
|
|
49350
49829
|
})),
|
|
49351
49830
|
Provider = _useForm.Provider,
|
|
49352
49831
|
ProviderProps = _useForm.ProviderProps,
|
|
@@ -49420,7 +49899,6 @@ var Form = function Form(props) {
|
|
|
49420
49899
|
className: rootClass,
|
|
49421
49900
|
style: style
|
|
49422
49901
|
});
|
|
49423
|
-
var formElRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
49424
49902
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
49425
49903
|
if (formElRef.current instanceof HTMLFormElement) {
|
|
49426
49904
|
formElRef.current.addEventListener('submit', formProps.onSubmit);
|
|
@@ -49529,6 +50007,8 @@ var Tooltip = function Tooltip(props) {
|
|
|
49529
50007
|
className = props.className,
|
|
49530
50008
|
style = props.style,
|
|
49531
50009
|
zIndex = props.zIndex,
|
|
50010
|
+
_props$showArrow = props.showArrow,
|
|
50011
|
+
showArrow = _props$showArrow === void 0 ? true : _props$showArrow,
|
|
49532
50012
|
persistentProp = props.persistent,
|
|
49533
50013
|
_props$type = props.type,
|
|
49534
50014
|
type = _props$type === void 0 ? 'default' : _props$type,
|
|
@@ -49626,7 +50106,7 @@ var Tooltip = function Tooltip(props) {
|
|
|
49626
50106
|
ref: popupRef,
|
|
49627
50107
|
onMouseLeave: events.onMouseLeave,
|
|
49628
50108
|
dir: config.direction,
|
|
49629
|
-
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", objectSpread2_default()({
|
|
50109
|
+
children: [showArrow && /*#__PURE__*/(0,jsx_runtime.jsx)("span", objectSpread2_default()({
|
|
49630
50110
|
ref: arrowRef,
|
|
49631
50111
|
className: tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.arrow
|
|
49632
50112
|
}, getDataAttribute({
|
|
@@ -49972,11 +50452,28 @@ var use_form_flow_UseFormItem = function UseFormItem(props) {
|
|
|
49972
50452
|
/* harmony default export */ var use_form_flow = (use_form_flow_UseFormItem);
|
|
49973
50453
|
;// CONCATENATED MODULE: ../base/src/form/form-flow.tsx
|
|
49974
50454
|
|
|
50455
|
+
|
|
49975
50456
|
var FormFlow = function FormFlow(props) {
|
|
50457
|
+
var _props$names;
|
|
49976
50458
|
var datum = use_form_flow({
|
|
49977
50459
|
names: props.names
|
|
49978
50460
|
});
|
|
49979
|
-
|
|
50461
|
+
var valueOfNames = (_props$names = props.names) === null || _props$names === void 0 ? void 0 : _props$names.map(function (name) {
|
|
50462
|
+
return datum === null || datum === void 0 ? void 0 : datum.get(name);
|
|
50463
|
+
});
|
|
50464
|
+
var memoizedResult = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
50465
|
+
if (!props.strict) return;
|
|
50466
|
+
if (isFunc(props.children)) {
|
|
50467
|
+
return props.children(datum);
|
|
50468
|
+
}
|
|
50469
|
+
return props.children;
|
|
50470
|
+
}, [valueOfNames === null || valueOfNames === void 0 ? void 0 : valueOfNames.toString()]);
|
|
50471
|
+
if (props.strict) {
|
|
50472
|
+
return memoizedResult;
|
|
50473
|
+
}
|
|
50474
|
+
if (isFunc(props.children)) {
|
|
50475
|
+
return props.children(datum);
|
|
50476
|
+
}
|
|
49980
50477
|
return props.children;
|
|
49981
50478
|
};
|
|
49982
50479
|
/* harmony default export */ var form_flow = (FormFlow);
|
|
@@ -51238,7 +51735,7 @@ var ImageGroup = function ImageGroup(props) {
|
|
|
51238
51735
|
|
|
51239
51736
|
|
|
51240
51737
|
|
|
51241
|
-
var image_excluded = ["fit", "alt", "src", "href", "lazy", "title", "style", "error", "target", "jssStyle", "className", "placeholder", "width", "height", "shape", "autoSSL", "noImgDrag", "onClick", "componentRef"];
|
|
51738
|
+
var image_excluded = ["fit", "alt", "src", "href", "lazy", "title", "style", "error", "target", "jssStyle", "className", "placeholder", "width", "height", "shape", "autoSSL", "noImgDrag", "onClick", "componentRef", "renderHoverMask"];
|
|
51242
51739
|
|
|
51243
51740
|
|
|
51244
51741
|
|
|
@@ -51278,6 +51775,7 @@ var Image = function Image(props) {
|
|
|
51278
51775
|
noImgDrag = props.noImgDrag,
|
|
51279
51776
|
onClick = props.onClick,
|
|
51280
51777
|
componentRef = props.componentRef,
|
|
51778
|
+
renderHoverMask = props.renderHoverMask,
|
|
51281
51779
|
rest = objectWithoutProperties_default()(props, image_excluded);
|
|
51282
51780
|
var _useImage = use_image(objectSpread2_default()({
|
|
51283
51781
|
container: getDefaultContainer(),
|
|
@@ -51430,6 +51928,14 @@ var Image = function Image(props) {
|
|
|
51430
51928
|
|
|
51431
51929
|
// 遮罩层
|
|
51432
51930
|
var renderMask = function renderMask() {
|
|
51931
|
+
if (renderHoverMask) {
|
|
51932
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
51933
|
+
className: maskClass,
|
|
51934
|
+
children: renderHoverMask({
|
|
51935
|
+
preview: preview
|
|
51936
|
+
})
|
|
51937
|
+
});
|
|
51938
|
+
}
|
|
51433
51939
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
51434
51940
|
className: maskClass,
|
|
51435
51941
|
onClick: handleOpenGallery,
|
|
@@ -51574,9 +52080,9 @@ var input_input_Input = function Input(props) {
|
|
|
51574
52080
|
className = props.className,
|
|
51575
52081
|
width = props.width,
|
|
51576
52082
|
style = props.style;
|
|
51577
|
-
var rootClass = classnames_default()(className, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.group, size === 'small' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupSmall), size === 'large' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupLarge), !!disabled && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupDisabled), !!focus && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupFocus), (status === 'error' || error) && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupError));
|
|
52083
|
+
var rootClass = classnames_default()(className, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.group, props.seperate && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupSeperate), size === 'small' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupSmall), size === 'large' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupLarge), !!disabled && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupDisabled), !!focus && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupFocus), (status === 'error' || error) && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupError));
|
|
51578
52084
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({}, getDataAttribute({
|
|
51579
|
-
role: 'input-group'
|
|
52085
|
+
role: props.seperate ? 'input-group-seperate' : 'input-group'
|
|
51580
52086
|
})), {}, {
|
|
51581
52087
|
className: rootClass,
|
|
51582
52088
|
style: objectSpread2_default()({
|
|
@@ -51796,6 +52302,7 @@ var useNumberFormat = function useNumberFormat(props) {
|
|
|
51796
52302
|
var onInnerChange = use_persist_fn(function (val) {
|
|
51797
52303
|
setInternalInputValue(getStringValue(val));
|
|
51798
52304
|
if (typeof val === 'string') {
|
|
52305
|
+
if (val.endsWith('.')) return;
|
|
51799
52306
|
var num = parseFloat(val);
|
|
51800
52307
|
if (val === '') {
|
|
51801
52308
|
// 如果允许空值,则返回 null,否则返回 undefined
|
|
@@ -52054,8 +52561,13 @@ var usePaginationList = function usePaginationList(props) {
|
|
|
52054
52561
|
var _props$total;
|
|
52055
52562
|
if (!shouldPage) return {};
|
|
52056
52563
|
var total = (_props$total = props.total) !== null && _props$total !== void 0 ? _props$total : Array.isArray(data) ? data.length : 0;
|
|
52564
|
+
var finalCurrent = props.current || current;
|
|
52565
|
+
var maxCurrent = Math.ceil(total / (props.pageSize || pageSize));
|
|
52566
|
+
if (current > maxCurrent) {
|
|
52567
|
+
finalCurrent = 1;
|
|
52568
|
+
}
|
|
52057
52569
|
return {
|
|
52058
|
-
current:
|
|
52570
|
+
current: finalCurrent,
|
|
52059
52571
|
pageSize: props.pageSize || pageSize,
|
|
52060
52572
|
total: total,
|
|
52061
52573
|
disabled: !!props.loading,
|
|
@@ -52571,6 +53083,7 @@ var list_List = function List(props) {
|
|
|
52571
53083
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(virtual_scroll_list, {
|
|
52572
53084
|
virtualRef: virtualRef,
|
|
52573
53085
|
data: data,
|
|
53086
|
+
keepScrollTop: true,
|
|
52574
53087
|
keygen: keygen,
|
|
52575
53088
|
tag: 'ul',
|
|
52576
53089
|
groupKey: groupKey,
|
|
@@ -52629,22 +53142,9 @@ var TreeCheckbox = function TreeCheckbox(props) {
|
|
|
52629
53142
|
id = props.id,
|
|
52630
53143
|
onChange = props.onChange,
|
|
52631
53144
|
disabled = props.disabled,
|
|
52632
|
-
|
|
53145
|
+
checked = props.checked;
|
|
52633
53146
|
var _useTreeContext = useTreeContext(),
|
|
52634
|
-
getValue = _useTreeContext.getValue,
|
|
52635
|
-
set = _useTreeContext.set,
|
|
52636
|
-
getChecked = _useTreeContext.getChecked,
|
|
52637
53147
|
unBindUpdate = _useTreeContext.unBindUpdate;
|
|
52638
|
-
var handleChange = function handleChange(_, checked) {
|
|
52639
|
-
set(id, checked ? 1 : 0);
|
|
52640
|
-
if (onChange) {
|
|
52641
|
-
onChange(getValue(), id);
|
|
52642
|
-
}
|
|
52643
|
-
};
|
|
52644
|
-
var handleClick = function handleClick(e) {
|
|
52645
|
-
onClick === null || onClick === void 0 || onClick(e);
|
|
52646
|
-
};
|
|
52647
|
-
var checked = getChecked(id);
|
|
52648
53148
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
52649
53149
|
return function () {
|
|
52650
53150
|
unBindUpdate(id);
|
|
@@ -52658,8 +53158,8 @@ var TreeCheckbox = function TreeCheckbox(props) {
|
|
|
52658
53158
|
jssStyle: jssStyle,
|
|
52659
53159
|
checked: checked,
|
|
52660
53160
|
disabled: disabled,
|
|
52661
|
-
onChange:
|
|
52662
|
-
|
|
53161
|
+
onChange: onChange,
|
|
53162
|
+
needStopPropagation: true
|
|
52663
53163
|
});
|
|
52664
53164
|
};
|
|
52665
53165
|
/* harmony default export */ var tree_checkbox = (TreeCheckbox);
|
|
@@ -52678,6 +53178,9 @@ var TreeCheckbox = function TreeCheckbox(props) {
|
|
|
52678
53178
|
var NodeContent = function NodeContent(props) {
|
|
52679
53179
|
var jssStyle = props.jssStyle,
|
|
52680
53180
|
id = props.id,
|
|
53181
|
+
virtual = props.virtual,
|
|
53182
|
+
_props$level = props.level,
|
|
53183
|
+
level = _props$level === void 0 ? 0 : _props$level,
|
|
52681
53184
|
active = props.active,
|
|
52682
53185
|
data = props.data,
|
|
52683
53186
|
line = props.line,
|
|
@@ -52698,7 +53201,8 @@ var NodeContent = function NodeContent(props) {
|
|
|
52698
53201
|
onChange = props.onChange,
|
|
52699
53202
|
onToggle = props.onToggle,
|
|
52700
53203
|
onDragOver = props.onDragOver,
|
|
52701
|
-
onNodeClick = props.onNodeClick
|
|
53204
|
+
onNodeClick = props.onNodeClick,
|
|
53205
|
+
actionOnClick = props.actionOnClick;
|
|
52702
53206
|
var forceUpdate = useRender();
|
|
52703
53207
|
var _useTreeContext = useTreeContext(),
|
|
52704
53208
|
isDisabled = _useTreeContext.isDisabled,
|
|
@@ -52709,8 +53213,7 @@ var NodeContent = function NodeContent(props) {
|
|
|
52709
53213
|
var contentStyle = (jssStyle === null || jssStyle === void 0 ? void 0 : jssStyle.tree()) || {};
|
|
52710
53214
|
var rootClass = classnames_default()(contentStyle.contentWrapper, defineProperty_default()(defineProperty_default()(defineProperty_default()({}, contentStyle.childnode, data[childrenKey] && data[childrenKey].length > 0), contentStyle.inlineContent, inlineNode), contentStyle.contentDisabled, disabled));
|
|
52711
53215
|
var contentClass = classnames_default()(contentStyle.content, isString(contentClassProp) && contentClassProp, isFunc(contentClassProp) && contentClassProp(data));
|
|
52712
|
-
|
|
52713
|
-
var textClass = classnames_default()(contentStyle.text);
|
|
53216
|
+
var textClass = classnames_default()(contentStyle.text, defineProperty_default()({}, contentStyle.textClickable, actionOnClick && !is_isEmpty(actionOnClick) || parentClickExpand || doubleClickExpand));
|
|
52714
53217
|
var hasExpandIcons = expandIcons !== undefined;
|
|
52715
53218
|
var children = data[childrenKey];
|
|
52716
53219
|
var hasChildren = children && children.length > 0;
|
|
@@ -52724,7 +53227,7 @@ var NodeContent = function NodeContent(props) {
|
|
|
52724
53227
|
// }
|
|
52725
53228
|
return dataProps;
|
|
52726
53229
|
};
|
|
52727
|
-
var
|
|
53230
|
+
var handleNodeExpand = function handleNodeExpand() {
|
|
52728
53231
|
onToggle === null || onToggle === void 0 || onToggle(id);
|
|
52729
53232
|
if (data[childrenKey] !== undefined) return;
|
|
52730
53233
|
if (loader) {
|
|
@@ -52737,20 +53240,43 @@ var NodeContent = function NodeContent(props) {
|
|
|
52737
53240
|
}
|
|
52738
53241
|
}
|
|
52739
53242
|
};
|
|
53243
|
+
var _useTreeContext2 = useTreeContext(),
|
|
53244
|
+
getValue = _useTreeContext2.getValue,
|
|
53245
|
+
set = _useTreeContext2.set,
|
|
53246
|
+
getChecked = _useTreeContext2.getChecked;
|
|
53247
|
+
// 选中节点前的复选框
|
|
53248
|
+
var handleNodeCheck = function handleNodeCheck(_, checked) {
|
|
53249
|
+
set(id, checked ? 1 : 0);
|
|
53250
|
+
if (onChange) {
|
|
53251
|
+
onChange(getValue());
|
|
53252
|
+
}
|
|
53253
|
+
};
|
|
53254
|
+
var checked = getChecked(id);
|
|
52740
53255
|
var handleNodeClick = function handleNodeClick() {
|
|
52741
|
-
// if (disabled) return;
|
|
52742
53256
|
if (parentClickExpand && hasChildren) {
|
|
52743
|
-
|
|
53257
|
+
handleNodeExpand();
|
|
52744
53258
|
} else {
|
|
52745
53259
|
onNodeClick(data, id);
|
|
52746
53260
|
}
|
|
53261
|
+
if (!actionOnClick) return;
|
|
53262
|
+
if (actionOnClick.indexOf('expand') > -1) {
|
|
53263
|
+
handleNodeExpand();
|
|
53264
|
+
}
|
|
53265
|
+
if (actionOnClick.indexOf('check') > -1) {
|
|
53266
|
+
handleNodeCheck(null, !checked);
|
|
53267
|
+
}
|
|
52747
53268
|
};
|
|
52748
|
-
|
|
53269
|
+
|
|
53270
|
+
// 双击节点展开子节点
|
|
53271
|
+
var onNodeDoubleClick = function onNodeDoubleClick() {
|
|
52749
53272
|
if (!doubleClickExpand) return;
|
|
52750
|
-
if (hasChildren)
|
|
53273
|
+
if (hasChildren) handleNodeExpand();
|
|
52751
53274
|
};
|
|
52752
53275
|
var renderLoading = function renderLoading() {
|
|
52753
53276
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
53277
|
+
style: virtual ? {
|
|
53278
|
+
left: (level - 1) * 24
|
|
53279
|
+
} : undefined,
|
|
52754
53280
|
className: contentStyle.iconWrapper,
|
|
52755
53281
|
"data-expanded": expanded,
|
|
52756
53282
|
"data-icon": hasExpandIcons,
|
|
@@ -52775,20 +53301,23 @@ var NodeContent = function NodeContent(props) {
|
|
|
52775
53301
|
dir: config.direction,
|
|
52776
53302
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
52777
53303
|
className: classnames_default()(contentStyle.icon, iconClass),
|
|
52778
|
-
onClick:
|
|
53304
|
+
onClick: handleNodeExpand,
|
|
52779
53305
|
dir: config.direction,
|
|
52780
53306
|
children: isFunc(icon) ? icon(data) : icon
|
|
52781
53307
|
})
|
|
52782
53308
|
});
|
|
52783
53309
|
} else {
|
|
52784
53310
|
indicator = /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
53311
|
+
style: virtual ? {
|
|
53312
|
+
left: (level - 1) * 24
|
|
53313
|
+
} : undefined,
|
|
52785
53314
|
className: contentStyle.iconWrapper,
|
|
52786
53315
|
"data-expanded": expanded,
|
|
52787
53316
|
"data-icon": hasExpandIcons,
|
|
52788
53317
|
dir: config.direction,
|
|
52789
53318
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
52790
53319
|
className: classnames_default()(contentStyle.icon, iconClass),
|
|
52791
|
-
onClick:
|
|
53320
|
+
onClick: handleNodeExpand,
|
|
52792
53321
|
dir: config.direction,
|
|
52793
53322
|
children: isFunc(icon) ? icon(data) : hasExpandIcons ? icon : icons_config.tree.Expand
|
|
52794
53323
|
})
|
|
@@ -52806,7 +53335,8 @@ var NodeContent = function NodeContent(props) {
|
|
|
52806
53335
|
id: id,
|
|
52807
53336
|
disabled: disabled,
|
|
52808
53337
|
className: contentStyle.checkbox,
|
|
52809
|
-
|
|
53338
|
+
checked: checked,
|
|
53339
|
+
onChange: handleNodeCheck
|
|
52810
53340
|
});
|
|
52811
53341
|
};
|
|
52812
53342
|
var renderNode = function renderNode() {
|
|
@@ -52815,29 +53345,23 @@ var NodeContent = function NodeContent(props) {
|
|
|
52815
53345
|
};
|
|
52816
53346
|
return render(data, expanded, active, id);
|
|
52817
53347
|
};
|
|
52818
|
-
var contentEvent = {
|
|
52819
|
-
onClick: inlineNode ? undefined : handleNodeClick
|
|
52820
|
-
};
|
|
52821
|
-
var textEvent = {
|
|
52822
|
-
onClick: inlineNode ? handleNodeClick : undefined
|
|
52823
|
-
};
|
|
52824
53348
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
52825
53349
|
className: rootClass,
|
|
52826
53350
|
onDragOver: onDragOver,
|
|
52827
53351
|
dir: config.direction,
|
|
52828
|
-
children: [renderIndicator(), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()(
|
|
53352
|
+
children: [renderIndicator(), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
52829
53353
|
dir: config.direction,
|
|
52830
53354
|
"data-expanded": expanded,
|
|
52831
53355
|
ref: bindContent,
|
|
52832
53356
|
className: contentClass
|
|
52833
|
-
}, contentDataProps()),
|
|
52834
|
-
children: [onChange && renderCheckbox(), /*#__PURE__*/(0,jsx_runtime.jsx)("div",
|
|
53357
|
+
}, contentDataProps()), {}, {
|
|
53358
|
+
children: [onChange && renderCheckbox(), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
52835
53359
|
dir: config.direction,
|
|
52836
53360
|
className: textClass,
|
|
52837
|
-
onDoubleClick:
|
|
52838
|
-
|
|
53361
|
+
onDoubleClick: onNodeDoubleClick,
|
|
53362
|
+
onClick: handleNodeClick,
|
|
52839
53363
|
children: renderNode()
|
|
52840
|
-
})
|
|
53364
|
+
})]
|
|
52841
53365
|
}))]
|
|
52842
53366
|
});
|
|
52843
53367
|
};
|
|
@@ -52970,7 +53494,8 @@ var Node = function Node(props) {
|
|
|
52970
53494
|
onDragLeave = props.onDragLeave,
|
|
52971
53495
|
onDragStart = props.onDragStart,
|
|
52972
53496
|
onDragEnd = props.onDragEnd,
|
|
52973
|
-
List = props.listComponent
|
|
53497
|
+
List = props.listComponent,
|
|
53498
|
+
actionOnClick = props.actionOnClick;
|
|
52974
53499
|
initPlaceElement();
|
|
52975
53500
|
var config = useConfig();
|
|
52976
53501
|
var element = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
@@ -53135,7 +53660,8 @@ var Node = function Node(props) {
|
|
|
53135
53660
|
dragSibling: dragSibling,
|
|
53136
53661
|
dragHoverExpand: dragHoverExpand,
|
|
53137
53662
|
dragImageStyle: dragImageStyle,
|
|
53138
|
-
dragImageSelector: dragImageSelector
|
|
53663
|
+
dragImageSelector: dragImageSelector,
|
|
53664
|
+
actionOnClick: actionOnClick
|
|
53139
53665
|
};
|
|
53140
53666
|
};
|
|
53141
53667
|
var getDropProps = function getDropProps() {
|
|
@@ -53155,6 +53681,7 @@ var Node = function Node(props) {
|
|
|
53155
53681
|
className: rootClass,
|
|
53156
53682
|
dir: config.direction,
|
|
53157
53683
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tree_content, {
|
|
53684
|
+
virtual: false,
|
|
53158
53685
|
jssStyle: jssStyle,
|
|
53159
53686
|
isControlled: isControlled,
|
|
53160
53687
|
id: id,
|
|
@@ -53183,204 +53710,12 @@ var Node = function Node(props) {
|
|
|
53183
53710
|
onFetch: handleFetch,
|
|
53184
53711
|
onNodeClick: onNodeClick,
|
|
53185
53712
|
onDragOver: handleDragOver,
|
|
53186
|
-
onToggle: handleToggle
|
|
53713
|
+
onToggle: handleToggle,
|
|
53714
|
+
actionOnClick: actionOnClick
|
|
53187
53715
|
}), hasChildren && /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement)(List, getChildrenListProps())]
|
|
53188
53716
|
}));
|
|
53189
53717
|
};
|
|
53190
53718
|
/* harmony default export */ var tree_simple_node = (Node);
|
|
53191
|
-
;// CONCATENATED MODULE: ../base/src/tree/tree-virtual-content.tsx
|
|
53192
|
-
|
|
53193
|
-
|
|
53194
|
-
|
|
53195
|
-
|
|
53196
|
-
|
|
53197
|
-
|
|
53198
|
-
|
|
53199
|
-
|
|
53200
|
-
|
|
53201
|
-
|
|
53202
|
-
|
|
53203
|
-
|
|
53204
|
-
var NodeVirtualContent = function NodeVirtualContent(props) {
|
|
53205
|
-
var jssStyle = props.jssStyle,
|
|
53206
|
-
id = props.id,
|
|
53207
|
-
level = props.level,
|
|
53208
|
-
active = props.active,
|
|
53209
|
-
data = props.data,
|
|
53210
|
-
line = props.line,
|
|
53211
|
-
iconClass = props.iconClass,
|
|
53212
|
-
contentClassProp = props.contentClass,
|
|
53213
|
-
expandIcons = props.expandIcons,
|
|
53214
|
-
renderItem = props.renderItem,
|
|
53215
|
-
expanded = props.expanded,
|
|
53216
|
-
fetching = props.fetching,
|
|
53217
|
-
inlineNode = props.inlineNode,
|
|
53218
|
-
childrenKey = props.childrenKey,
|
|
53219
|
-
parentClickExpand = props.parentClickExpand,
|
|
53220
|
-
doubleClickExpand = props.doubleClickExpand,
|
|
53221
|
-
bindContent = props.bindContent,
|
|
53222
|
-
highlight = props.highlight,
|
|
53223
|
-
setFetching = props.setFetching,
|
|
53224
|
-
loader = props.loader,
|
|
53225
|
-
onChange = props.onChange,
|
|
53226
|
-
onToggle = props.onToggle,
|
|
53227
|
-
onNodeClick = props.onNodeClick;
|
|
53228
|
-
var forceUpdate = useRender();
|
|
53229
|
-
var _useTreeContext = useTreeContext(),
|
|
53230
|
-
isDisabled = _useTreeContext.isDisabled,
|
|
53231
|
-
bindUpdate = _useTreeContext.bindUpdate;
|
|
53232
|
-
var clickLock = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
|
53233
|
-
var config = useConfig();
|
|
53234
|
-
var disabled = isDisabled(id);
|
|
53235
|
-
bindUpdate(id, forceUpdate);
|
|
53236
|
-
var contentStyle = (jssStyle === null || jssStyle === void 0 ? void 0 : jssStyle.tree()) || {};
|
|
53237
|
-
var rootClass = classnames_default()(contentStyle.contentWrapper, defineProperty_default()(defineProperty_default()(defineProperty_default()({}, contentStyle.childnode, data[childrenKey] && data[childrenKey].length > 0), contentStyle.inlineContent, inlineNode), contentStyle.contentDisabled, disabled));
|
|
53238
|
-
var contentClass = classnames_default()(contentStyle.content, isString(contentClassProp) && contentClassProp, isFunc(contentClassProp) && contentClassProp(data));
|
|
53239
|
-
// const textClass = classNames(contentStyle.text, disabled ? contentStyle.textDisabled : '');
|
|
53240
|
-
var textClass = classnames_default()(contentStyle.text);
|
|
53241
|
-
var hasExpandIcons = expandIcons !== undefined;
|
|
53242
|
-
var children = data[childrenKey];
|
|
53243
|
-
var hasChildren = children && children.length > 0;
|
|
53244
|
-
var contentDataProps = function contentDataProps() {
|
|
53245
|
-
var dataProps = {};
|
|
53246
|
-
if (highlight) {
|
|
53247
|
-
dataProps['data-active'] = active;
|
|
53248
|
-
}
|
|
53249
|
-
// if (disabled) {
|
|
53250
|
-
// dataProps['data-disabled'] = disabled;
|
|
53251
|
-
// }
|
|
53252
|
-
return dataProps;
|
|
53253
|
-
};
|
|
53254
|
-
var handleIndicatorClick = function handleIndicatorClick() {
|
|
53255
|
-
onToggle === null || onToggle === void 0 || onToggle(id);
|
|
53256
|
-
if (data[childrenKey] !== undefined) return;
|
|
53257
|
-
if (loader) {
|
|
53258
|
-
setFetching(true);
|
|
53259
|
-
var result = loader(id, data);
|
|
53260
|
-
if (isPromise(result)) {
|
|
53261
|
-
result.then(function () {
|
|
53262
|
-
setFetching(false);
|
|
53263
|
-
});
|
|
53264
|
-
}
|
|
53265
|
-
}
|
|
53266
|
-
};
|
|
53267
|
-
var handleNodeClick = function handleNodeClick() {
|
|
53268
|
-
if (parentClickExpand && hasChildren) {
|
|
53269
|
-
if (clickLock.current) {
|
|
53270
|
-
clickLock.current = false;
|
|
53271
|
-
return;
|
|
53272
|
-
}
|
|
53273
|
-
handleIndicatorClick();
|
|
53274
|
-
} else {
|
|
53275
|
-
onNodeClick(data, id);
|
|
53276
|
-
}
|
|
53277
|
-
};
|
|
53278
|
-
var handleClick = function handleClick() {
|
|
53279
|
-
clickLock.current = true;
|
|
53280
|
-
};
|
|
53281
|
-
var handleNodeExpand = function handleNodeExpand() {
|
|
53282
|
-
if (!doubleClickExpand) return;
|
|
53283
|
-
if (hasChildren) handleIndicatorClick();
|
|
53284
|
-
};
|
|
53285
|
-
var renderLoading = function renderLoading() {
|
|
53286
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
53287
|
-
style: {
|
|
53288
|
-
left: (level - 1) * 24
|
|
53289
|
-
},
|
|
53290
|
-
className: contentStyle.iconWrapper,
|
|
53291
|
-
"data-expanded": expanded,
|
|
53292
|
-
"data-icon": hasExpandIcons,
|
|
53293
|
-
dir: config.direction,
|
|
53294
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(src_spin_spin, {
|
|
53295
|
-
size: 12,
|
|
53296
|
-
jssStyle: jssStyle,
|
|
53297
|
-
ignoreConfig: true,
|
|
53298
|
-
name: "ring"
|
|
53299
|
-
})
|
|
53300
|
-
});
|
|
53301
|
-
};
|
|
53302
|
-
var renderIndicator = function renderIndicator() {
|
|
53303
|
-
var children = data[childrenKey];
|
|
53304
|
-
var icon = expandIcons ? expandIcons[expanded ? 1 : 0] : expanded ? icons_config.tree.LineExpand : icons_config.tree.LineCollapse;
|
|
53305
|
-
var indicator;
|
|
53306
|
-
if (line) {
|
|
53307
|
-
indicator = /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
53308
|
-
className: contentStyle.iconWrapper,
|
|
53309
|
-
"data-expanded": expanded,
|
|
53310
|
-
"data-icon": hasExpandIcons,
|
|
53311
|
-
dir: config.direction,
|
|
53312
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
53313
|
-
className: classnames_default()(contentStyle.icon, iconClass),
|
|
53314
|
-
onClick: handleIndicatorClick,
|
|
53315
|
-
dir: config.direction,
|
|
53316
|
-
children: isFunc(icon) ? icon(data) : icon
|
|
53317
|
-
})
|
|
53318
|
-
});
|
|
53319
|
-
} else {
|
|
53320
|
-
indicator = /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
53321
|
-
style: {
|
|
53322
|
-
left: (level - 1) * 24
|
|
53323
|
-
},
|
|
53324
|
-
className: contentStyle.iconWrapper,
|
|
53325
|
-
"data-expanded": expanded,
|
|
53326
|
-
"data-icon": hasExpandIcons,
|
|
53327
|
-
dir: config.direction,
|
|
53328
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
53329
|
-
className: classnames_default()(contentStyle.icon, iconClass),
|
|
53330
|
-
onClick: handleIndicatorClick,
|
|
53331
|
-
dir: config.direction,
|
|
53332
|
-
children: isFunc(icon) ? icon(data) : hasExpandIcons ? icon : icons_config.tree.Expand
|
|
53333
|
-
})
|
|
53334
|
-
});
|
|
53335
|
-
}
|
|
53336
|
-
if (children && children.length > 0) return indicator;
|
|
53337
|
-
if (Array.isArray(children) || children === null) return null;
|
|
53338
|
-
if (fetching && !children) return renderLoading();
|
|
53339
|
-
if (loader && children === undefined) return indicator;
|
|
53340
|
-
return null;
|
|
53341
|
-
};
|
|
53342
|
-
var renderCheckbox = function renderCheckbox() {
|
|
53343
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(tree_checkbox, {
|
|
53344
|
-
jssStyle: jssStyle,
|
|
53345
|
-
id: id,
|
|
53346
|
-
disabled: disabled,
|
|
53347
|
-
className: contentStyle.checkbox,
|
|
53348
|
-
onChange: onChange,
|
|
53349
|
-
onClick: handleClick
|
|
53350
|
-
});
|
|
53351
|
-
};
|
|
53352
|
-
var renderNode = function renderNode() {
|
|
53353
|
-
var render = isFunc(renderItem) ? renderItem : function (item) {
|
|
53354
|
-
return item[renderItem];
|
|
53355
|
-
};
|
|
53356
|
-
return render(data, expanded, active, id);
|
|
53357
|
-
};
|
|
53358
|
-
var contentEvent = {
|
|
53359
|
-
onClick: inlineNode ? undefined : handleNodeClick
|
|
53360
|
-
};
|
|
53361
|
-
var textEvent = {
|
|
53362
|
-
onClick: inlineNode ? handleNodeClick : undefined
|
|
53363
|
-
};
|
|
53364
|
-
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
53365
|
-
className: rootClass,
|
|
53366
|
-
dir: config.direction,
|
|
53367
|
-
children: [renderIndicator(), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({
|
|
53368
|
-
dir: config.direction,
|
|
53369
|
-
"data-expanded": expanded,
|
|
53370
|
-
ref: bindContent,
|
|
53371
|
-
className: contentClass
|
|
53372
|
-
}, contentDataProps()), contentEvent), {}, {
|
|
53373
|
-
children: [onChange && renderCheckbox(), /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({
|
|
53374
|
-
dir: config.direction,
|
|
53375
|
-
className: textClass,
|
|
53376
|
-
onDoubleClick: handleNodeExpand
|
|
53377
|
-
}, textEvent), {}, {
|
|
53378
|
-
children: renderNode()
|
|
53379
|
-
}))]
|
|
53380
|
-
}))]
|
|
53381
|
-
});
|
|
53382
|
-
};
|
|
53383
|
-
/* harmony default export */ var tree_virtual_content = (NodeVirtualContent);
|
|
53384
53719
|
;// CONCATENATED MODULE: ../hooks/src/components/use-tree/use-tree-virtual-node.ts
|
|
53385
53720
|
|
|
53386
53721
|
|
|
@@ -53495,7 +53830,8 @@ var VirtualNode = function VirtualNode(props) {
|
|
|
53495
53830
|
loader = props.loader,
|
|
53496
53831
|
onChange = props.onChange,
|
|
53497
53832
|
onNodeClick = props.onNodeClick,
|
|
53498
|
-
onToggle = props.onToggle
|
|
53833
|
+
onToggle = props.onToggle,
|
|
53834
|
+
actionOnClick = props.actionOnClick;
|
|
53499
53835
|
var config = useConfig();
|
|
53500
53836
|
var datum = useTreeContext();
|
|
53501
53837
|
var element = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
@@ -53543,7 +53879,8 @@ var VirtualNode = function VirtualNode(props) {
|
|
|
53543
53879
|
style: {
|
|
53544
53880
|
paddingLeft: level * 24
|
|
53545
53881
|
},
|
|
53546
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(
|
|
53882
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tree_content, {
|
|
53883
|
+
virtual: true,
|
|
53547
53884
|
jssStyle: jssStyle,
|
|
53548
53885
|
isControlled: isControlled,
|
|
53549
53886
|
id: id,
|
|
@@ -53571,7 +53908,8 @@ var VirtualNode = function VirtualNode(props) {
|
|
|
53571
53908
|
onChange: onChange,
|
|
53572
53909
|
onFetch: handleFetch,
|
|
53573
53910
|
onNodeClick: onNodeClick,
|
|
53574
|
-
onToggle: handleToggle
|
|
53911
|
+
onToggle: handleToggle,
|
|
53912
|
+
actionOnClick: actionOnClick
|
|
53575
53913
|
})
|
|
53576
53914
|
});
|
|
53577
53915
|
};
|
|
@@ -53583,6 +53921,7 @@ var VirtualNode = function VirtualNode(props) {
|
|
|
53583
53921
|
|
|
53584
53922
|
|
|
53585
53923
|
var TreeNode = function TreeNode(props) {
|
|
53924
|
+
// TODO: 外部没有传递 virtual 属性的用法,考虑删除
|
|
53586
53925
|
var virtual = props.virtual;
|
|
53587
53926
|
if (virtual) {
|
|
53588
53927
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tree_virtual_node, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
|
|
@@ -53642,7 +53981,8 @@ var tree_list_List = function List(props) {
|
|
|
53642
53981
|
childrenClass = props.childrenClass,
|
|
53643
53982
|
childrenClassName = props.childrenClassName,
|
|
53644
53983
|
parentClickExpand = props.parentClickExpand,
|
|
53645
|
-
doubleClickExpand = props.doubleClickExpand
|
|
53984
|
+
doubleClickExpand = props.doubleClickExpand,
|
|
53985
|
+
actionOnClick = props.actionOnClick;
|
|
53646
53986
|
var listClass = (jssStyle === null || jssStyle === void 0 ? void 0 : jssStyle.tree()) || {};
|
|
53647
53987
|
var rootClass = classnames_default()(className || listClass.children, childrenClassName);
|
|
53648
53988
|
var getKey = function getKey(data, index) {
|
|
@@ -53693,7 +54033,8 @@ var tree_list_List = function List(props) {
|
|
|
53693
54033
|
onDragOver: onDragOver,
|
|
53694
54034
|
onDragStart: onDragStart,
|
|
53695
54035
|
onDragEnd: onDragEnd,
|
|
53696
|
-
onDragLeave: onDragLeave
|
|
54036
|
+
onDragLeave: onDragLeave,
|
|
54037
|
+
actionOnClick: actionOnClick
|
|
53697
54038
|
}, id);
|
|
53698
54039
|
};
|
|
53699
54040
|
if (!expanded && !hasExpanded.current) return null;
|
|
@@ -53717,13 +54058,24 @@ var tree_root_excluded = ["jssStyle", "rootStyle"];
|
|
|
53717
54058
|
|
|
53718
54059
|
|
|
53719
54060
|
|
|
54061
|
+
|
|
53720
54062
|
var Root = function Root(props) {
|
|
53721
54063
|
var jssStyle = props.jssStyle,
|
|
53722
54064
|
_props$rootStyle = props.rootStyle,
|
|
53723
54065
|
rootStyle = _props$rootStyle === void 0 ? {} : _props$rootStyle,
|
|
53724
54066
|
rest = objectWithoutProperties_default()(props, tree_root_excluded);
|
|
53725
54067
|
var treeStyle = (jssStyle === null || jssStyle === void 0 ? void 0 : jssStyle.tree()) || {};
|
|
53726
|
-
var
|
|
54068
|
+
var notTree = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
54069
|
+
if (!props.data) return true;
|
|
54070
|
+
return props.data.every(function (item) {
|
|
54071
|
+
if (!item) return true;
|
|
54072
|
+
if (!item[props.childrenKey]) return !props.loader;
|
|
54073
|
+
if (item[props.childrenKey] === null) return true;
|
|
54074
|
+
if (Array.isArray(item[props.childrenKey]) && item[props.childrenKey].length === 0) return true;
|
|
54075
|
+
return false;
|
|
54076
|
+
});
|
|
54077
|
+
}, [props.data]);
|
|
54078
|
+
var rootClass = classnames_default()(treeStyle.root, notTree && treeStyle.notTree);
|
|
53727
54079
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tree_list, objectSpread2_default()(objectSpread2_default()({}, rest), {}, {
|
|
53728
54080
|
expanded: true,
|
|
53729
54081
|
className: rootClass,
|
|
@@ -53823,7 +54175,7 @@ var TreeVirtual = function TreeVirtual(props) {
|
|
|
53823
54175
|
|
|
53824
54176
|
|
|
53825
54177
|
|
|
53826
|
-
var tree_excluded = ["jssStyle", "line", "childrenKey", "data", "value", "mode", "keygen", "virtual", "expanded", "expandIcons", "iconClass", "leafClass", "nodeClass", "contentClass", "rootStyle", "renderItem", "defaultValue", "dataUpdate", "childrenClass", "defaultExpandAll", "defaultExpanded", "parentClickExpand", "doubleClickExpand", "dragImageSelector", "dragImageStyle", "dragSibling", "unmatch", "dragHoverExpand", "active", "setActive", "disabled", "inlineNode", "highlight", "className", "onClick", "loader", "getDatum", "onDrop", "onExpand", "onChange", "onDragEnd", "onDragLeave", "onDragOver", "onDragStart", "datum"];
|
|
54178
|
+
var tree_excluded = ["jssStyle", "line", "childrenKey", "data", "value", "mode", "keygen", "virtual", "expanded", "expandIcons", "iconClass", "leafClass", "nodeClass", "contentClass", "rootStyle", "renderItem", "defaultValue", "dataUpdate", "childrenClass", "defaultExpandAll", "defaultExpanded", "parentClickExpand", "doubleClickExpand", "dragImageSelector", "dragImageStyle", "dragSibling", "unmatch", "ignoreSetFlat", "dragHoverExpand", "active", "setActive", "disabled", "inlineNode", "highlight", "className", "onClick", "loader", "getDatum", "onDrop", "onExpand", "onChange", "onDragEnd", "onDragLeave", "onDragOver", "onDragStart", "datum", "actionOnClick", "tiledData"];
|
|
53827
54179
|
|
|
53828
54180
|
|
|
53829
54181
|
|
|
@@ -53865,6 +54217,8 @@ var Tree = function Tree(props) {
|
|
|
53865
54217
|
dragImageStyle = props.dragImageStyle,
|
|
53866
54218
|
dragSibling = props.dragSibling,
|
|
53867
54219
|
unmatch = props.unmatch,
|
|
54220
|
+
_props$ignoreSetFlat = props.ignoreSetFlat,
|
|
54221
|
+
ignoreSetFlat = _props$ignoreSetFlat === void 0 ? false : _props$ignoreSetFlat,
|
|
53868
54222
|
dragHoverExpand = props.dragHoverExpand,
|
|
53869
54223
|
propActive = props.active,
|
|
53870
54224
|
propSetActive = props.setActive,
|
|
@@ -53883,6 +54237,8 @@ var Tree = function Tree(props) {
|
|
|
53883
54237
|
onDragOver = props.onDragOver,
|
|
53884
54238
|
onDragStart = props.onDragStart,
|
|
53885
54239
|
propsDatum = props.datum,
|
|
54240
|
+
actionOnClick = props.actionOnClick,
|
|
54241
|
+
tiledData = props.tiledData,
|
|
53886
54242
|
rest = objectWithoutProperties_default()(props, tree_excluded);
|
|
53887
54243
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(propActive),
|
|
53888
54244
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
@@ -53974,10 +54330,10 @@ var Tree = function Tree(props) {
|
|
|
53974
54330
|
newExpanded = expandedArr.filter(function (e) {
|
|
53975
54331
|
return e !== id;
|
|
53976
54332
|
});
|
|
53977
|
-
if (virtual) datum.removeFlat(id);
|
|
54333
|
+
if (virtual && !ignoreSetFlat) datum.removeFlat(id);
|
|
53978
54334
|
} else {
|
|
53979
54335
|
newExpanded = [].concat(toConsumableArray_default()(expandedArr), [id]);
|
|
53980
|
-
if (virtual) datum.insertFlat(id);
|
|
54336
|
+
if (virtual && !ignoreSetFlat) datum.insertFlat(id);
|
|
53981
54337
|
}
|
|
53982
54338
|
if (onExpand) onExpand(newExpanded);
|
|
53983
54339
|
};
|
|
@@ -54046,7 +54402,8 @@ var Tree = function Tree(props) {
|
|
|
54046
54402
|
isControlled: 'expanded' in props,
|
|
54047
54403
|
bindNode: datum.bindNode,
|
|
54048
54404
|
onNodeClick: handleNodeClick,
|
|
54049
|
-
onToggle: handleToggle
|
|
54405
|
+
onToggle: handleToggle,
|
|
54406
|
+
actionOnClick: actionOnClick
|
|
54050
54407
|
}));
|
|
54051
54408
|
}
|
|
54052
54409
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tree_root, {
|
|
@@ -54084,7 +54441,8 @@ var Tree = function Tree(props) {
|
|
|
54084
54441
|
parentClickExpand: parentClickExpand,
|
|
54085
54442
|
doubleClickExpand: doubleClickExpand,
|
|
54086
54443
|
dragImageSelector: getDragImageSelector,
|
|
54087
|
-
dragImageStyle: dragImageStyle
|
|
54444
|
+
dragImageStyle: dragImageStyle,
|
|
54445
|
+
actionOnClick: actionOnClick
|
|
54088
54446
|
});
|
|
54089
54447
|
};
|
|
54090
54448
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
@@ -54558,6 +54916,7 @@ function Select(props0) {
|
|
|
54558
54916
|
trim = props.trim,
|
|
54559
54917
|
maxLength = props.maxLength,
|
|
54560
54918
|
style = props.style,
|
|
54919
|
+
reFocus = props.reFocus,
|
|
54561
54920
|
multiple = props.multiple,
|
|
54562
54921
|
loading = props.loading,
|
|
54563
54922
|
convertBr = props.convertBr,
|
|
@@ -55013,6 +55372,7 @@ function Select(props0) {
|
|
|
55013
55372
|
keygen: keygen,
|
|
55014
55373
|
disabled: disabled,
|
|
55015
55374
|
maxLength: maxLength,
|
|
55375
|
+
reFocus: reFocus,
|
|
55016
55376
|
convertBr: convertBr,
|
|
55017
55377
|
compressed: compressed,
|
|
55018
55378
|
compressedBound: compressedBound,
|
|
@@ -55206,9 +55566,7 @@ function Select(props0) {
|
|
|
55206
55566
|
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerWrapper, size === 'small' && (styles === null || styles === void 0 ? void 0 : styles.pickerSmall), size === 'large' && (styles === null || styles === void 0 ? void 0 : styles.pickerLarge)),
|
|
55207
55567
|
onAnimationAfterEnter: onAnimationAfterEnter,
|
|
55208
55568
|
display: 'block',
|
|
55209
|
-
type: "scale-y"
|
|
55210
|
-
// type='fade'
|
|
55211
|
-
,
|
|
55569
|
+
type: "scale-y",
|
|
55212
55570
|
duration: 'fast',
|
|
55213
55571
|
style: getListStyle(),
|
|
55214
55572
|
children: [renderHeader(), renderOptions(), renderFooter()]
|
|
@@ -55280,36 +55638,36 @@ var PaginationJumper = function PaginationJumper(props) {
|
|
|
55280
55638
|
total = props.total,
|
|
55281
55639
|
pageSize = props.pageSize,
|
|
55282
55640
|
disabled = props.disabled,
|
|
55283
|
-
current = props.current,
|
|
55284
55641
|
text = props.text,
|
|
55285
55642
|
onChange = props.onChange;
|
|
55286
55643
|
var paginationStyle = jssStyle === null || jssStyle === void 0 || (_jssStyle$pagination = jssStyle.pagination) === null || _jssStyle$pagination === void 0 ? void 0 : _jssStyle$pagination.call(jssStyle);
|
|
55287
55644
|
var rootClasses = classnames_default()(paginationStyle === null || paginationStyle === void 0 ? void 0 : paginationStyle.section, paginationStyle === null || paginationStyle === void 0 ? void 0 : paginationStyle.jumper);
|
|
55288
55645
|
var txt = text.jumper ? text.jumper.split('{input}') : [];
|
|
55289
|
-
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(
|
|
55646
|
+
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(''),
|
|
55290
55647
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
55291
55648
|
value = _useState2[0],
|
|
55292
55649
|
setValue = _useState2[1];
|
|
55293
55650
|
var getMax = function getMax() {
|
|
55294
55651
|
return Math.ceil(total / pageSize) || 1;
|
|
55295
55652
|
};
|
|
55653
|
+
var cleatInternalState = function cleatInternalState() {
|
|
55654
|
+
setValue('');
|
|
55655
|
+
};
|
|
55296
55656
|
var handleKeyDown = function handleKeyDown(e) {
|
|
55297
55657
|
if (e.key === 'Enter' || e.keyCode === 13) {
|
|
55298
|
-
var
|
|
55299
|
-
if (!Number.isFinite(
|
|
55300
|
-
if (
|
|
55658
|
+
var current = parseInt(e.target.value, 10);
|
|
55659
|
+
if (!Number.isFinite(current)) return;
|
|
55660
|
+
if (current < 1) current = 1;
|
|
55301
55661
|
var max = getMax();
|
|
55302
|
-
if (
|
|
55303
|
-
onChange(
|
|
55304
|
-
setValue(String(
|
|
55662
|
+
if (current > max) current = max;
|
|
55663
|
+
onChange(current);
|
|
55664
|
+
setValue(String(current));
|
|
55665
|
+
setTimeout(cleatInternalState, 20);
|
|
55305
55666
|
}
|
|
55306
55667
|
};
|
|
55307
55668
|
var handleChange = function handleChange(v) {
|
|
55308
55669
|
setValue(v || '');
|
|
55309
55670
|
};
|
|
55310
|
-
var handleBlur = function handleBlur() {
|
|
55311
|
-
setValue(String(current));
|
|
55312
|
-
};
|
|
55313
55671
|
var renderInput = function renderInput() {
|
|
55314
55672
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_input_input, {
|
|
55315
55673
|
jssStyle: jssStyle,
|
|
@@ -55322,7 +55680,7 @@ var PaginationJumper = function PaginationJumper(props) {
|
|
|
55322
55680
|
disabled: disabled,
|
|
55323
55681
|
onChange: handleChange,
|
|
55324
55682
|
onKeyDown: handleKeyDown,
|
|
55325
|
-
onBlur:
|
|
55683
|
+
onBlur: cleatInternalState
|
|
55326
55684
|
});
|
|
55327
55685
|
};
|
|
55328
55686
|
var renderPrefixText = function renderPrefixText() {
|
|
@@ -55337,9 +55695,6 @@ var PaginationJumper = function PaginationJumper(props) {
|
|
|
55337
55695
|
children: txt[1]
|
|
55338
55696
|
}) : undefined;
|
|
55339
55697
|
};
|
|
55340
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
55341
|
-
setValue(String(current));
|
|
55342
|
-
}, [current]);
|
|
55343
55698
|
if (simple) {
|
|
55344
55699
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
55345
55700
|
className: rootClasses,
|
|
@@ -55720,7 +56075,6 @@ var PaginationSimple = function PaginationSimple(props) {
|
|
|
55720
56075
|
total: total,
|
|
55721
56076
|
text: text,
|
|
55722
56077
|
size: size,
|
|
55723
|
-
current: current,
|
|
55724
56078
|
pageSize: pageSize,
|
|
55725
56079
|
onChange: onChange
|
|
55726
56080
|
});
|
|
@@ -55878,7 +56232,6 @@ var Pagination = function Pagination(props) {
|
|
|
55878
56232
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(pagination_jumper, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
|
|
55879
56233
|
text: text,
|
|
55880
56234
|
total: total,
|
|
55881
|
-
current: current,
|
|
55882
56235
|
pageSize: pageSize,
|
|
55883
56236
|
onChange: onChange
|
|
55884
56237
|
}), i);
|
|
@@ -60183,6 +60536,86 @@ var useTableLayout = function useTableLayout(props) {
|
|
|
60183
60536
|
};
|
|
60184
60537
|
};
|
|
60185
60538
|
/* harmony default export */ var use_table_layout = (useTableLayout);
|
|
60539
|
+
;// CONCATENATED MODULE: ../hooks/src/components/use-table/use-table-filter.ts
|
|
60540
|
+
|
|
60541
|
+
|
|
60542
|
+
|
|
60543
|
+
|
|
60544
|
+
|
|
60545
|
+
var useTableFilter = function useTableFilter(props) {
|
|
60546
|
+
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(new Map()),
|
|
60547
|
+
_useState2 = slicedToArray_default()(_useState, 2),
|
|
60548
|
+
filterInfo = _useState2[0],
|
|
60549
|
+
setFilterInfo = _useState2[1];
|
|
60550
|
+
var activeFilters = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
60551
|
+
return Array.from(filterInfo.keys()).filter(function (key) {
|
|
60552
|
+
var _filterInfo$get;
|
|
60553
|
+
return ((_filterInfo$get = filterInfo.get(key)) === null || _filterInfo$get === void 0 ? void 0 : _filterInfo$get.value) !== undefined;
|
|
60554
|
+
});
|
|
60555
|
+
}, [filterInfo]);
|
|
60556
|
+
var filteredData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
60557
|
+
var _props$data;
|
|
60558
|
+
if (activeFilters.length === 0) return props.data;
|
|
60559
|
+
return (_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.filter(function (item) {
|
|
60560
|
+
return activeFilters.every(function (key) {
|
|
60561
|
+
var filter = filterInfo.get(key);
|
|
60562
|
+
if ((filter === null || filter === void 0 ? void 0 : filter.value) === undefined) return true;
|
|
60563
|
+
if (Array.isArray(filter.value) && filter.value.length === 0) return true;
|
|
60564
|
+
if (filter !== null && filter !== void 0 && filter.onFilter && isFunc(filter.onFilter)) {
|
|
60565
|
+
return filter.onFilter(filter.value, item);
|
|
60566
|
+
}
|
|
60567
|
+
return true;
|
|
60568
|
+
});
|
|
60569
|
+
});
|
|
60570
|
+
}, [activeFilters, props.data]);
|
|
60571
|
+
var onFilterChange = use_persist_fn(function (columnKey, value) {
|
|
60572
|
+
// TODO: 暂未开放reset全部筛选条件
|
|
60573
|
+
if (columnKey === '__reset__') {
|
|
60574
|
+
setFilterInfo(function (prev) {
|
|
60575
|
+
var next = new Map(prev);
|
|
60576
|
+
next.forEach(function (v, k) {
|
|
60577
|
+
next.set(k, objectSpread2_default()(objectSpread2_default()({}, v), {}, {
|
|
60578
|
+
value: undefined
|
|
60579
|
+
}));
|
|
60580
|
+
});
|
|
60581
|
+
return next;
|
|
60582
|
+
});
|
|
60583
|
+
} else {
|
|
60584
|
+
setFilterInfo(function (prev) {
|
|
60585
|
+
var _prev$get;
|
|
60586
|
+
var next = new Map(prev);
|
|
60587
|
+
next.set(columnKey, {
|
|
60588
|
+
value: value,
|
|
60589
|
+
onFilter: (_prev$get = prev.get(columnKey)) === null || _prev$get === void 0 ? void 0 : _prev$get.onFilter
|
|
60590
|
+
});
|
|
60591
|
+
return next;
|
|
60592
|
+
});
|
|
60593
|
+
}
|
|
60594
|
+
});
|
|
60595
|
+
|
|
60596
|
+
// 根据columns生成filterInfo
|
|
60597
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
60598
|
+
var _props$columns;
|
|
60599
|
+
var _filterInfo = props === null || props === void 0 || (_props$columns = props.columns) === null || _props$columns === void 0 ? void 0 : _props$columns.reduce(function (acc, column, index) {
|
|
60600
|
+
var _column$filter;
|
|
60601
|
+
if (!column.filter) return acc;
|
|
60602
|
+
var columnKey = typeof column.render === 'string' ? column.render : String(index);
|
|
60603
|
+
acc.set(columnKey, {
|
|
60604
|
+
value: undefined,
|
|
60605
|
+
onFilter: (_column$filter = column.filter) === null || _column$filter === void 0 ? void 0 : _column$filter.onFilter
|
|
60606
|
+
});
|
|
60607
|
+
return acc;
|
|
60608
|
+
}, new Map());
|
|
60609
|
+
if (_filterInfo) setFilterInfo(_filterInfo);
|
|
60610
|
+
}, [props.columns]);
|
|
60611
|
+
return {
|
|
60612
|
+
filterInfo: filterInfo,
|
|
60613
|
+
setFilterInfo: setFilterInfo,
|
|
60614
|
+
filteredData: filteredData,
|
|
60615
|
+
onFilterChange: onFilterChange
|
|
60616
|
+
};
|
|
60617
|
+
};
|
|
60618
|
+
/* harmony default export */ var use_table_filter = (useTableFilter);
|
|
60186
60619
|
;// CONCATENATED MODULE: ../hooks/src/components/use-table/use-table-sort.ts
|
|
60187
60620
|
|
|
60188
60621
|
|
|
@@ -60976,9 +61409,7 @@ var Colgroup = function Colgroup(props) {
|
|
|
60976
61409
|
if (minWidth) {
|
|
60977
61410
|
style.minWidth = minWidth;
|
|
60978
61411
|
}
|
|
60979
|
-
|
|
60980
|
-
style.width = width;
|
|
60981
|
-
}
|
|
61412
|
+
style.width = width;
|
|
60982
61413
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("col", {
|
|
60983
61414
|
style: style
|
|
60984
61415
|
}, columns[index].key);
|
|
@@ -61059,6 +61490,267 @@ var useTableGroup = function useTableGroup(props) {
|
|
|
61059
61490
|
};
|
|
61060
61491
|
};
|
|
61061
61492
|
/* harmony default export */ var use_table_group = (useTableGroup);
|
|
61493
|
+
;// CONCATENATED MODULE: ../base/src/table/thead-filter.tsx
|
|
61494
|
+
|
|
61495
|
+
|
|
61496
|
+
|
|
61497
|
+
|
|
61498
|
+
|
|
61499
|
+
|
|
61500
|
+
|
|
61501
|
+
|
|
61502
|
+
|
|
61503
|
+
|
|
61504
|
+
|
|
61505
|
+
|
|
61506
|
+
|
|
61507
|
+
|
|
61508
|
+
var FilterFooter = function FilterFooter(props) {
|
|
61509
|
+
var tableClasses = props.tableClasses;
|
|
61510
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("footer", {
|
|
61511
|
+
className: tableClasses.filterFooter,
|
|
61512
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button, {
|
|
61513
|
+
htmlType: "reset",
|
|
61514
|
+
jssStyle: props.jssStyle,
|
|
61515
|
+
size: "small",
|
|
61516
|
+
onClick: props.onReset,
|
|
61517
|
+
disabled: !props.resetable,
|
|
61518
|
+
children: "\u91CD\u7F6E"
|
|
61519
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button, {
|
|
61520
|
+
jssStyle: props.jssStyle,
|
|
61521
|
+
size: "small",
|
|
61522
|
+
type: "primary",
|
|
61523
|
+
onClick: props.onConfirm,
|
|
61524
|
+
children: "\u786E\u5B9A"
|
|
61525
|
+
})]
|
|
61526
|
+
});
|
|
61527
|
+
};
|
|
61528
|
+
var FilterSelect = function FilterSelect(props) {
|
|
61529
|
+
var _props$filterInfo;
|
|
61530
|
+
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
61531
|
+
_useState2 = slicedToArray_default()(_useState, 2),
|
|
61532
|
+
popoverVisible = _useState2[0],
|
|
61533
|
+
setPopoverVisible = _useState2[1];
|
|
61534
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(),
|
|
61535
|
+
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
61536
|
+
tempValue = _useState4[0],
|
|
61537
|
+
setTempValue = _useState4[1];
|
|
61538
|
+
var tableClasses = props.tableClasses,
|
|
61539
|
+
filter = props.filter;
|
|
61540
|
+
var config = filter.config;
|
|
61541
|
+
var currentFilter = (_props$filterInfo = props.filterInfo) === null || _props$filterInfo === void 0 ? void 0 : _props$filterInfo.get(props.columnKey);
|
|
61542
|
+
var treeOptions = (config === null || config === void 0 ? void 0 : config.data) || [];
|
|
61543
|
+
var onReset = function onReset() {
|
|
61544
|
+
setTempValue(undefined);
|
|
61545
|
+
props.onFilterChange(props.columnKey, undefined);
|
|
61546
|
+
setPopoverVisible(false);
|
|
61547
|
+
};
|
|
61548
|
+
var onConfirm = function onConfirm() {
|
|
61549
|
+
props.onFilterChange(props.columnKey, tempValue);
|
|
61550
|
+
setPopoverVisible(false);
|
|
61551
|
+
};
|
|
61552
|
+
var onVisibleChange = function onVisibleChange(visible) {
|
|
61553
|
+
// 关闭popover时就提交筛选条件,包括click away触发的
|
|
61554
|
+
if (!visible) {
|
|
61555
|
+
props.onFilterChange(props.columnKey, tempValue);
|
|
61556
|
+
}
|
|
61557
|
+
setPopoverVisible(visible);
|
|
61558
|
+
};
|
|
61559
|
+
var treeKeygen = function treeKeygen(d) {
|
|
61560
|
+
return d.value;
|
|
61561
|
+
};
|
|
61562
|
+
var treeProps = config !== null && config !== void 0 && config.multiple ? {
|
|
61563
|
+
value: currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value,
|
|
61564
|
+
onChange: function onChange(v) {
|
|
61565
|
+
setTempValue(v);
|
|
61566
|
+
},
|
|
61567
|
+
renderItem: (config === null || config === void 0 ? void 0 : config.renderItem) || 'label'
|
|
61568
|
+
} : {
|
|
61569
|
+
active: currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value,
|
|
61570
|
+
setActive: function setActive(v) {
|
|
61571
|
+
setTempValue(v);
|
|
61572
|
+
},
|
|
61573
|
+
renderItem: function renderItem(d, _, active) {
|
|
61574
|
+
var renderProp = isFunc(config === null || config === void 0 ? void 0 : config.renderItem) ? config === null || config === void 0 ? void 0 : config.renderItem : function (d) {
|
|
61575
|
+
return d.label;
|
|
61576
|
+
};
|
|
61577
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
61578
|
+
className: tableClasses.filterRadio,
|
|
61579
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(base_src_radio_radio, {
|
|
61580
|
+
checked: active,
|
|
61581
|
+
jssStyle: props.jssStyle
|
|
61582
|
+
}), renderProp(d)]
|
|
61583
|
+
});
|
|
61584
|
+
}
|
|
61585
|
+
};
|
|
61586
|
+
var _useFilter = use_filter({
|
|
61587
|
+
treeData: treeOptions,
|
|
61588
|
+
keygen: treeKeygen,
|
|
61589
|
+
childrenKey: 'children',
|
|
61590
|
+
onAdvancedFilter: false,
|
|
61591
|
+
onFilter: function onFilter(text) {
|
|
61592
|
+
return function (item) {
|
|
61593
|
+
return item.label.includes(text);
|
|
61594
|
+
};
|
|
61595
|
+
}
|
|
61596
|
+
}),
|
|
61597
|
+
filterData = _useFilter.filterData,
|
|
61598
|
+
rawData = _useFilter.rawData,
|
|
61599
|
+
onFilter = _useFilter.onFilter,
|
|
61600
|
+
inputText = _useFilter.inputText,
|
|
61601
|
+
setInputText = _useFilter.setInputText;
|
|
61602
|
+
var displayData = filterData || rawData;
|
|
61603
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)(base_src_button_button, {
|
|
61604
|
+
jssStyle: props.jssStyle,
|
|
61605
|
+
shape: "circle",
|
|
61606
|
+
size: "small",
|
|
61607
|
+
className: classnames_default()(tableClasses.filterIconContainer, (currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value) && tableClasses.filterActive),
|
|
61608
|
+
style: {
|
|
61609
|
+
border: 'none'
|
|
61610
|
+
},
|
|
61611
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
61612
|
+
className: tableClasses.filterIcon,
|
|
61613
|
+
children: filter.icon || icons_config.table.Filter
|
|
61614
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)(src_popover_popover, {
|
|
61615
|
+
jssStyle: props.jssStyle,
|
|
61616
|
+
trigger: "click",
|
|
61617
|
+
showArrow: false,
|
|
61618
|
+
visible: popoverVisible,
|
|
61619
|
+
onVisibleChange: onVisibleChange,
|
|
61620
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
61621
|
+
className: classnames_default()(tableClasses.filterContainer),
|
|
61622
|
+
children: [(config === null || config === void 0 ? void 0 : config.search) && /*#__PURE__*/(0,jsx_runtime.jsx)("header", {
|
|
61623
|
+
className: tableClasses.filterHeader,
|
|
61624
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_input_input, {
|
|
61625
|
+
value: inputText,
|
|
61626
|
+
onChange: function onChange(v) {
|
|
61627
|
+
if (onFilter) onFilter(v || '');
|
|
61628
|
+
setInputText(v);
|
|
61629
|
+
},
|
|
61630
|
+
jssStyle: props.jssStyle,
|
|
61631
|
+
placeholder: "\u5728\u7B5B\u9009\u9879\u4E2D\u641C\u7D22",
|
|
61632
|
+
className: tableClasses.filterInput,
|
|
61633
|
+
prefix: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
61634
|
+
className: tableClasses.filterInputIcon,
|
|
61635
|
+
children: icons_config.table.Search
|
|
61636
|
+
})
|
|
61637
|
+
})
|
|
61638
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
|
|
61639
|
+
className: tableClasses.filterBody,
|
|
61640
|
+
children: displayData && displayData.length > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(src_tree_tree, objectSpread2_default()({
|
|
61641
|
+
keygen: function keygen(d) {
|
|
61642
|
+
return d.value;
|
|
61643
|
+
},
|
|
61644
|
+
jssStyle: props.jssStyle,
|
|
61645
|
+
data: displayData,
|
|
61646
|
+
actionOnClick: ['check']
|
|
61647
|
+
}, treeProps)) : /*#__PURE__*/(0,jsx_runtime.jsx)(src_empty_empty, {
|
|
61648
|
+
jssStyle: props.jssStyle,
|
|
61649
|
+
icon: null,
|
|
61650
|
+
style: {
|
|
61651
|
+
padding: '24px 0'
|
|
61652
|
+
}
|
|
61653
|
+
})
|
|
61654
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)(FilterFooter, {
|
|
61655
|
+
jssStyle: props.jssStyle,
|
|
61656
|
+
tableClasses: tableClasses,
|
|
61657
|
+
onReset: onReset,
|
|
61658
|
+
onConfirm: onConfirm,
|
|
61659
|
+
resetable: !!tempValue
|
|
61660
|
+
})]
|
|
61661
|
+
})
|
|
61662
|
+
})]
|
|
61663
|
+
});
|
|
61664
|
+
};
|
|
61665
|
+
var FilterSearch = function FilterSearch(props) {
|
|
61666
|
+
var _props$filterInfo2;
|
|
61667
|
+
var tableClasses = props.tableClasses,
|
|
61668
|
+
filter = props.filter;
|
|
61669
|
+
var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
61670
|
+
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
61671
|
+
popoverVisible = _useState6[0],
|
|
61672
|
+
setPopoverVisible = _useState6[1];
|
|
61673
|
+
var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(),
|
|
61674
|
+
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
61675
|
+
tempValue = _useState8[0],
|
|
61676
|
+
setTempValue = _useState8[1];
|
|
61677
|
+
var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
61678
|
+
var onReset = function onReset() {
|
|
61679
|
+
setTempValue(undefined);
|
|
61680
|
+
props.onFilterChange(props.columnKey, undefined);
|
|
61681
|
+
setPopoverVisible(false);
|
|
61682
|
+
};
|
|
61683
|
+
var onConfirm = function onConfirm() {
|
|
61684
|
+
props.onFilterChange(props.columnKey, tempValue);
|
|
61685
|
+
setPopoverVisible(false);
|
|
61686
|
+
};
|
|
61687
|
+
var onVisibleChange = function onVisibleChange(visible) {
|
|
61688
|
+
// 关闭popover时就提交筛选条件,包括click away触发的
|
|
61689
|
+
if (!visible) {
|
|
61690
|
+
props.onFilterChange(props.columnKey, tempValue);
|
|
61691
|
+
}
|
|
61692
|
+
|
|
61693
|
+
// 打开时自动focus input
|
|
61694
|
+
if (visible) {
|
|
61695
|
+
setTimeout(function () {
|
|
61696
|
+
if (inputRef.current) {
|
|
61697
|
+
inputRef.current.focus();
|
|
61698
|
+
}
|
|
61699
|
+
}, 100);
|
|
61700
|
+
}
|
|
61701
|
+
setPopoverVisible(visible);
|
|
61702
|
+
};
|
|
61703
|
+
var currentFilter = (_props$filterInfo2 = props.filterInfo) === null || _props$filterInfo2 === void 0 ? void 0 : _props$filterInfo2.get(props.columnKey);
|
|
61704
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
61705
|
+
if ((currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value) !== undefined) {
|
|
61706
|
+
setTempValue(currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value);
|
|
61707
|
+
}
|
|
61708
|
+
}, [currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value]);
|
|
61709
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)(base_src_button_button, {
|
|
61710
|
+
jssStyle: props.jssStyle,
|
|
61711
|
+
shape: "circle",
|
|
61712
|
+
size: "small",
|
|
61713
|
+
className: classnames_default()(tableClasses.filterIconContainer, (currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value) && tableClasses.filterActive),
|
|
61714
|
+
style: {
|
|
61715
|
+
border: 'none'
|
|
61716
|
+
},
|
|
61717
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
61718
|
+
className: tableClasses.filterIcon,
|
|
61719
|
+
children: filter.icon || icons_config.table.Search
|
|
61720
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)(src_popover_popover, {
|
|
61721
|
+
jssStyle: props.jssStyle,
|
|
61722
|
+
trigger: "click",
|
|
61723
|
+
showArrow: false,
|
|
61724
|
+
visible: popoverVisible,
|
|
61725
|
+
onVisibleChange: onVisibleChange,
|
|
61726
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
61727
|
+
className: classnames_default()(tableClasses.filterContainer),
|
|
61728
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("header", {
|
|
61729
|
+
className: tableClasses.filterHeader,
|
|
61730
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_input_input, {
|
|
61731
|
+
jssStyle: props.jssStyle,
|
|
61732
|
+
placeholder: "\u5728\u7B5B\u9009\u9879\u4E2D\u641C\u7D22",
|
|
61733
|
+
className: tableClasses.filterInput,
|
|
61734
|
+
prefix: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
61735
|
+
className: tableClasses.filterInputIcon,
|
|
61736
|
+
children: icons_config.table.Search
|
|
61737
|
+
}),
|
|
61738
|
+
value: tempValue,
|
|
61739
|
+
onChange: setTempValue,
|
|
61740
|
+
onEnterPress: onConfirm,
|
|
61741
|
+
forwardRef: inputRef
|
|
61742
|
+
})
|
|
61743
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)(FilterFooter, {
|
|
61744
|
+
jssStyle: props.jssStyle,
|
|
61745
|
+
tableClasses: tableClasses,
|
|
61746
|
+
onReset: onReset,
|
|
61747
|
+
onConfirm: onConfirm,
|
|
61748
|
+
resetable: !!tempValue
|
|
61749
|
+
})]
|
|
61750
|
+
})
|
|
61751
|
+
})]
|
|
61752
|
+
});
|
|
61753
|
+
};
|
|
61062
61754
|
;// CONCATENATED MODULE: ../base/src/table/thead.tsx
|
|
61063
61755
|
|
|
61064
61756
|
|
|
@@ -61070,6 +61762,7 @@ var useTableGroup = function useTableGroup(props) {
|
|
|
61070
61762
|
|
|
61071
61763
|
|
|
61072
61764
|
|
|
61765
|
+
|
|
61073
61766
|
var thead_toNum = toNum;
|
|
61074
61767
|
/* harmony default export */ var thead = (function (props) {
|
|
61075
61768
|
var _props$jssStyle, _props$jssStyle$table;
|
|
@@ -61168,6 +61861,34 @@ var thead_toNum = toNum;
|
|
|
61168
61861
|
})
|
|
61169
61862
|
});
|
|
61170
61863
|
};
|
|
61864
|
+
var renderFilter = function renderFilter(column, columnIndex) {
|
|
61865
|
+
if (!column.filter) {
|
|
61866
|
+
return null;
|
|
61867
|
+
}
|
|
61868
|
+
var mode = column.filter.mode;
|
|
61869
|
+
var columnKey = typeof column.render === 'string' ? column.render : String(columnIndex);
|
|
61870
|
+
if (mode === 'search') {
|
|
61871
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(FilterSearch, {
|
|
61872
|
+
tableClasses: tableClasses,
|
|
61873
|
+
jssStyle: props.jssStyle,
|
|
61874
|
+
filter: column.filter,
|
|
61875
|
+
filterInfo: props.filterInfo,
|
|
61876
|
+
onFilterChange: props.onFilterChange,
|
|
61877
|
+
columnKey: columnKey
|
|
61878
|
+
});
|
|
61879
|
+
}
|
|
61880
|
+
if (mode === 'select') {
|
|
61881
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(FilterSelect, {
|
|
61882
|
+
tableClasses: tableClasses,
|
|
61883
|
+
jssStyle: props.jssStyle,
|
|
61884
|
+
filter: column.filter,
|
|
61885
|
+
filterInfo: props.filterInfo,
|
|
61886
|
+
onFilterChange: props.onFilterChange,
|
|
61887
|
+
columnKey: columnKey
|
|
61888
|
+
});
|
|
61889
|
+
}
|
|
61890
|
+
return null;
|
|
61891
|
+
};
|
|
61171
61892
|
var renderDrag = function renderDrag(index) {
|
|
61172
61893
|
if (!props.columnResizable) return null;
|
|
61173
61894
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
@@ -61221,7 +61942,7 @@ var thead_toNum = toNum;
|
|
|
61221
61942
|
position: 'sticky'
|
|
61222
61943
|
};
|
|
61223
61944
|
};
|
|
61224
|
-
var createTh = function createTh(trs, col, level, isLast) {
|
|
61945
|
+
var createTh = function createTh(trs, col, level, isLast, columnIndex) {
|
|
61225
61946
|
var colTemp = col;
|
|
61226
61947
|
var colTemp2 = col;
|
|
61227
61948
|
var fixedStyle = getFixedStyle(col.fixed, col.index, colTemp2.colSpan || 1, level);
|
|
@@ -61229,14 +61950,15 @@ var thead_toNum = toNum;
|
|
|
61229
61950
|
var isExpand = colTemp.type === 'expand' || colTemp.type === 'row-expand';
|
|
61230
61951
|
if (colTemp.title || isExpand) {
|
|
61231
61952
|
var sorter = renderSort(colTemp);
|
|
61953
|
+
var filter = renderFilter(colTemp, columnIndex);
|
|
61232
61954
|
trs[level].push( /*#__PURE__*/(0,jsx_runtime.jsx)("th", {
|
|
61233
61955
|
className: cellClassName,
|
|
61234
61956
|
rowSpan: columnLevel - level + 1,
|
|
61235
61957
|
style: fixedStyle,
|
|
61236
61958
|
dir: config.direction,
|
|
61237
61959
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
61238
|
-
className: classnames_default()(sorter && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.hasSorter)),
|
|
61239
|
-
children: [renderTitle(colTemp.title),
|
|
61960
|
+
className: classnames_default()(sorter && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.hasSorter), filter && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.hasFilter)),
|
|
61961
|
+
children: [renderTitle(colTemp.title), sorter, filter, colTemp.columnResizable !== false && renderDrag(colTemp.index)]
|
|
61240
61962
|
})
|
|
61241
61963
|
}, col.key));
|
|
61242
61964
|
return;
|
|
@@ -61286,7 +62008,7 @@ var thead_toNum = toNum;
|
|
|
61286
62008
|
}, colTemp2.key));
|
|
61287
62009
|
if (colTemp2.columns) {
|
|
61288
62010
|
colTemp2.columns.forEach(function (c, index) {
|
|
61289
|
-
return createTh(trs, c, level + 1, isLast && colTemp2.columns.length - 1 === index);
|
|
62011
|
+
return createTh(trs, c, level + 1, isLast && colTemp2.columns.length - 1 === index, index);
|
|
61290
62012
|
});
|
|
61291
62013
|
}
|
|
61292
62014
|
};
|
|
@@ -61298,7 +62020,7 @@ var thead_toNum = toNum;
|
|
|
61298
62020
|
});
|
|
61299
62021
|
groupColumns.forEach(function (col, index) {
|
|
61300
62022
|
var isLast = index === groupColumns.length - 1;
|
|
61301
|
-
createTh(trs, col, 0, isLast);
|
|
62023
|
+
createTh(trs, col, 0, isLast, index);
|
|
61302
62024
|
});
|
|
61303
62025
|
return trs.map(function (tr, i) {
|
|
61304
62026
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("tr", {
|
|
@@ -62036,6 +62758,23 @@ var tfoot_isArray = isArray,
|
|
|
62036
62758
|
})
|
|
62037
62759
|
});
|
|
62038
62760
|
});
|
|
62761
|
+
;// CONCATENATED MODULE: ../base/src/table/tbody-empty.tsx
|
|
62762
|
+
|
|
62763
|
+
|
|
62764
|
+
function TbodyEmpty(_ref) {
|
|
62765
|
+
var children = _ref.children;
|
|
62766
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
|
|
62767
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("tr", {
|
|
62768
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("td", {
|
|
62769
|
+
style: {
|
|
62770
|
+
border: 'none'
|
|
62771
|
+
},
|
|
62772
|
+
colSpan: Number.MAX_SAFE_INTEGER,
|
|
62773
|
+
children: children
|
|
62774
|
+
})
|
|
62775
|
+
})
|
|
62776
|
+
});
|
|
62777
|
+
}
|
|
62039
62778
|
;// CONCATENATED MODULE: ../base/src/table/table.tsx
|
|
62040
62779
|
|
|
62041
62780
|
|
|
@@ -62059,6 +62798,7 @@ var table_excluded = ["data"];
|
|
|
62059
62798
|
|
|
62060
62799
|
|
|
62061
62800
|
|
|
62801
|
+
|
|
62062
62802
|
var table_devUseWarning = devUseWarning;
|
|
62063
62803
|
var table_emptyArr = [];
|
|
62064
62804
|
var virtualScrollerStyle = {
|
|
@@ -62177,8 +62917,15 @@ var emptyRef = {
|
|
|
62177
62917
|
scrollBarWidth = _useTableLayout.scrollBarWidth,
|
|
62178
62918
|
scrollWidth = _useTableLayout.scrollWidth,
|
|
62179
62919
|
resizeFlag = _useTableLayout.resizeFlag;
|
|
62180
|
-
var
|
|
62920
|
+
var _useTableFilter = use_table_filter({
|
|
62181
62921
|
data: props.data,
|
|
62922
|
+
columns: props.columns
|
|
62923
|
+
}),
|
|
62924
|
+
filteredData = _useTableFilter.filteredData,
|
|
62925
|
+
filterInfo = _useTableFilter.filterInfo,
|
|
62926
|
+
onFilterChange = _useTableFilter.onFilterChange;
|
|
62927
|
+
var _useTableSort = use_table_sort({
|
|
62928
|
+
data: filteredData,
|
|
62182
62929
|
sorter: props.sorter,
|
|
62183
62930
|
onSortCancel: props.onSortCancel,
|
|
62184
62931
|
columns: columns
|
|
@@ -62302,16 +63049,18 @@ var emptyRef = {
|
|
|
62302
63049
|
});
|
|
62303
63050
|
var renderEmpty = function renderEmpty() {
|
|
62304
63051
|
var _props$data2;
|
|
62305
|
-
if ((_props$data2 = props.data) !== null && _props$data2 !== void 0 && _props$data2.length)
|
|
62306
|
-
|
|
62307
|
-
|
|
62308
|
-
|
|
62309
|
-
|
|
62310
|
-
|
|
62311
|
-
|
|
62312
|
-
|
|
62313
|
-
|
|
62314
|
-
|
|
63052
|
+
if (!((_props$data2 = props.data) !== null && _props$data2 !== void 0 && _props$data2.length) || filteredData !== undefined && filteredData.length === 0) {
|
|
63053
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63054
|
+
className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.emptyWrapper,
|
|
63055
|
+
ref: function ref(el) {
|
|
63056
|
+
context.emptyHeight = (el === null || el === void 0 ? void 0 : el.clientHeight) || 0;
|
|
63057
|
+
},
|
|
63058
|
+
children: props.empty || /*#__PURE__*/(0,jsx_runtime.jsx)(src_empty_empty, {
|
|
63059
|
+
jssStyle: props.jssStyle
|
|
63060
|
+
})
|
|
63061
|
+
});
|
|
63062
|
+
}
|
|
63063
|
+
return null;
|
|
62315
63064
|
};
|
|
62316
63065
|
var renderTable = function renderTable() {
|
|
62317
63066
|
var _props$summary, _sticky$top, _props$data3;
|
|
@@ -62357,6 +63106,8 @@ var emptyRef = {
|
|
|
62357
63106
|
columns: columns,
|
|
62358
63107
|
data: treeData,
|
|
62359
63108
|
colgroup: colgroup,
|
|
63109
|
+
filterInfo: filterInfo,
|
|
63110
|
+
onFilterChange: onFilterChange,
|
|
62360
63111
|
sortInfo: sortInfo,
|
|
62361
63112
|
sortDirections: props.sortDirections,
|
|
62362
63113
|
onSorterChange: onSorterChange,
|
|
@@ -62496,7 +63247,9 @@ var emptyRef = {
|
|
|
62496
63247
|
width: width
|
|
62497
63248
|
},
|
|
62498
63249
|
ref: tbodyRef,
|
|
62499
|
-
children: [Group, !props.hideHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()({}, headCommonProps)),
|
|
63250
|
+
children: [Group, !props.hideHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()({}, headCommonProps)), bodyCommonProps.data.length === 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(TbodyEmpty, {
|
|
63251
|
+
children: renderEmpty()
|
|
63252
|
+
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()({}, bodyCommonProps)), /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
62500
63253
|
})
|
|
62501
63254
|
})]
|
|
62502
63255
|
});
|
|
@@ -62610,7 +63363,9 @@ var table_jssStyle = {
|
|
|
62610
63363
|
cascader: useCascaderStyle,
|
|
62611
63364
|
treeSelect: useTreeSelectStyle,
|
|
62612
63365
|
datePicker: useDatePickerStyle,
|
|
62613
|
-
switch: useSwitchStyle
|
|
63366
|
+
switch: useSwitchStyle,
|
|
63367
|
+
popover: usePopoverStyle,
|
|
63368
|
+
tree: useTreeStyle
|
|
62614
63369
|
};
|
|
62615
63370
|
/* harmony default export */ var src_table_table_0 = (function (props) {
|
|
62616
63371
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_table_table, objectSpread2_default()({
|
|
@@ -63156,7 +63911,7 @@ var TabsHeader = function TabsHeader(props) {
|
|
|
63156
63911
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
63157
63912
|
currentTabRect = _useState4[0],
|
|
63158
63913
|
setCurrentTabRect = _useState4[1];
|
|
63159
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.
|
|
63914
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
63160
63915
|
var _currentTab$getBoundi;
|
|
63161
63916
|
if (shape !== 'line' && shape !== 'dash') return;
|
|
63162
63917
|
var currentTab = tabRef.current[active];
|
|
@@ -64084,7 +64839,7 @@ var TransferList = function TransferList(props) {
|
|
|
64084
64839
|
var containerBottom = listContainerRef.current.getBoundingClientRect().bottom;
|
|
64085
64840
|
var listBottom = ($list === null || $list === void 0 ? void 0 : $list.getBoundingClientRect().bottom) || containerBottom;
|
|
64086
64841
|
if (containerBottom - listBottom > 1) {
|
|
64087
|
-
setAddonHeight(containerBottom - listBottom);
|
|
64842
|
+
setAddonHeight(containerBottom - listBottom - 1);
|
|
64088
64843
|
}
|
|
64089
64844
|
}, []);
|
|
64090
64845
|
var listHeight = listHeightProp + addonHeight;
|
|
@@ -64610,6 +65365,8 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
64610
65365
|
mode = _props$mode === void 0 ? 1 : _props$mode,
|
|
64611
65366
|
_props$line = props.line,
|
|
64612
65367
|
line = _props$line === void 0 ? false : _props$line,
|
|
65368
|
+
_props$reFocus = props.reFocus,
|
|
65369
|
+
reFocus = _props$reFocus === void 0 ? false : _props$reFocus,
|
|
64613
65370
|
innerTitle = props.innerTitle,
|
|
64614
65371
|
_props$clearable = props.clearable,
|
|
64615
65372
|
clearable = _props$clearable === void 0 ? true : _props$clearable,
|
|
@@ -64740,24 +65497,28 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
64740
65497
|
tiledData = _useTiled.data,
|
|
64741
65498
|
onTiledFilter = _useTiled.onFilter,
|
|
64742
65499
|
tiledExpandIcons = _useTiled.expandIcons;
|
|
65500
|
+
var handleExpanded = function handleExpanded(id) {
|
|
65501
|
+
setVirtualExpanded(id);
|
|
65502
|
+
onExpand === null || onExpand === void 0 || onExpand(id);
|
|
65503
|
+
};
|
|
64743
65504
|
var _useTree = use_tree({
|
|
64744
65505
|
mode: mode,
|
|
64745
65506
|
value: value,
|
|
64746
|
-
data:
|
|
65507
|
+
data: data,
|
|
64747
65508
|
unmatch: unmatch,
|
|
65509
|
+
tiledData: tiledData,
|
|
64748
65510
|
virtual: virtual,
|
|
64749
65511
|
disabled: disabled,
|
|
64750
65512
|
active: multiple ? undefined : value[0],
|
|
64751
65513
|
childrenKey: childrenKey,
|
|
64752
65514
|
keygen: keygen,
|
|
64753
|
-
onExpand:
|
|
65515
|
+
onExpand: handleExpanded,
|
|
64754
65516
|
expanded: controlExpanded,
|
|
64755
65517
|
defaultExpanded: defaultExpanded,
|
|
64756
65518
|
defaultExpandAll: defaultExpandAll,
|
|
64757
65519
|
isControlled: controlExpanded !== undefined
|
|
64758
65520
|
}),
|
|
64759
65521
|
datum = _useTree.datum,
|
|
64760
|
-
onExpandTree = _useTree.onExpand,
|
|
64761
65522
|
unControlExpanded = _useTree.expanded;
|
|
64762
65523
|
var onCollapse = usePersistFn(function (collapse) {
|
|
64763
65524
|
onCollapseProp === null || onCollapseProp === void 0 || onCollapseProp(collapse);
|
|
@@ -64825,10 +65586,6 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
64825
65586
|
openPop();
|
|
64826
65587
|
}
|
|
64827
65588
|
});
|
|
64828
|
-
var handleExpanded = function handleExpanded(id) {
|
|
64829
|
-
setVirtualExpanded(id);
|
|
64830
|
-
onExpandTree(id);
|
|
64831
|
-
};
|
|
64832
65589
|
var focusAndOpen = function focusAndOpen() {
|
|
64833
65590
|
if (!focused) {
|
|
64834
65591
|
var _inputRef$current2;
|
|
@@ -64962,9 +65719,13 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
64962
65719
|
if (from !== 'blur') {
|
|
64963
65720
|
focusAndOpen();
|
|
64964
65721
|
}
|
|
64965
|
-
setVirtualExpanded([]);
|
|
64966
65722
|
onTiledFilter === null || onTiledFilter === void 0 || onTiledFilter(trim ? text.trim() : text);
|
|
64967
65723
|
};
|
|
65724
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
65725
|
+
if (virtual && expanded) {
|
|
65726
|
+
setVirtualExpanded(expanded);
|
|
65727
|
+
}
|
|
65728
|
+
}, [expanded]);
|
|
64968
65729
|
var handleChange = function handleChange(item, id) {
|
|
64969
65730
|
if (disabled === true || datum !== null && datum !== void 0 && datum.isDisabled(id)) return;
|
|
64970
65731
|
var currentData = datum.getDataById(id);
|
|
@@ -64991,6 +65752,11 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
64991
65752
|
var handleTreeChange = function handleTreeChange(_value, id) {
|
|
64992
65753
|
var item = datum.getDataById(id);
|
|
64993
65754
|
handleChange(item, id);
|
|
65755
|
+
var shouldFocus = showInput && reFocus;
|
|
65756
|
+
if (multiple && !shouldFocus) {
|
|
65757
|
+
var _inputRef$current3;
|
|
65758
|
+
inputRef === null || inputRef === void 0 || (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 || _inputRef$current3.select();
|
|
65759
|
+
}
|
|
64994
65760
|
};
|
|
64995
65761
|
var handleRemove = function handleRemove(item, key) {
|
|
64996
65762
|
if (!datum) return;
|
|
@@ -65032,6 +65798,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
65032
65798
|
value: getResultValue(),
|
|
65033
65799
|
data: data,
|
|
65034
65800
|
focus: open,
|
|
65801
|
+
reFocus: reFocus,
|
|
65035
65802
|
keygen: keygen,
|
|
65036
65803
|
disabled: disabled,
|
|
65037
65804
|
compressed: compressed,
|
|
@@ -65132,22 +65899,25 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
65132
65899
|
virtual: virtual,
|
|
65133
65900
|
childrenKey: props.childrenKey,
|
|
65134
65901
|
line: line,
|
|
65902
|
+
ignoreSetFlat: true,
|
|
65135
65903
|
mode: mode,
|
|
65136
65904
|
height: height,
|
|
65137
65905
|
data: tiledData,
|
|
65906
|
+
tiledData: tiledData,
|
|
65138
65907
|
keygen: keygen,
|
|
65139
65908
|
unmatch: unmatch,
|
|
65140
65909
|
value: value,
|
|
65141
65910
|
highlight: !multiple,
|
|
65142
65911
|
loader: loader,
|
|
65143
65912
|
onExpand: handleExpanded,
|
|
65144
|
-
expanded:
|
|
65913
|
+
expanded: virtual ? virtualExpanded : controlExpanded || unControlExpanded,
|
|
65145
65914
|
defaultExpandAll: defaultExpandAll,
|
|
65146
65915
|
expandIcons: tiledExpandIcons,
|
|
65147
65916
|
disabled: disabled,
|
|
65148
65917
|
parentClickExpand: parentClickExpand,
|
|
65149
65918
|
contentClass: getContentClass,
|
|
65150
|
-
datum: datum
|
|
65919
|
+
datum: datum,
|
|
65920
|
+
actionOnClick: props.actionOnClick
|
|
65151
65921
|
}))
|
|
65152
65922
|
});
|
|
65153
65923
|
};
|
|
@@ -66055,7 +66825,9 @@ var Upload = function Upload(props0) {
|
|
|
66055
66825
|
} : _props$renderResult,
|
|
66056
66826
|
_props$listType = props.listType,
|
|
66057
66827
|
listType = _props$listType === void 0 ? 'text' : _props$listType,
|
|
66058
|
-
leftHandler = props.leftHandler
|
|
66828
|
+
leftHandler = props.leftHandler,
|
|
66829
|
+
_props$hideHandler = props.hideHandler,
|
|
66830
|
+
hideHandler = _props$hideHandler === void 0 ? false : _props$hideHandler;
|
|
66059
66831
|
var _useConfig = useConfig(),
|
|
66060
66832
|
locale = _useConfig.locale;
|
|
66061
66833
|
var uploadClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$uploa = _props$jssStyle.upload) === null || _props$jssStyle$uploa === void 0 ? void 0 : _props$jssStyle$uploa.call(_props$jssStyle);
|
|
@@ -66119,9 +66891,10 @@ var Upload = function Upload(props0) {
|
|
|
66119
66891
|
wrapperProps = _useInputClick.wrapperProps;
|
|
66120
66892
|
var renderHandler = function renderHandler() {
|
|
66121
66893
|
if (restLength <= 0) return null;
|
|
66122
|
-
var inputOriginProps = {
|
|
66123
|
-
|
|
66124
|
-
|
|
66894
|
+
var inputOriginProps = {};
|
|
66895
|
+
if (props.webkitdirectory) {
|
|
66896
|
+
inputOriginProps.webkitdirectory = 'true';
|
|
66897
|
+
}
|
|
66125
66898
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(upload_drop, {
|
|
66126
66899
|
drop: drop,
|
|
66127
66900
|
accept: accept,
|
|
@@ -66220,7 +66993,7 @@ var Upload = function Upload(props0) {
|
|
|
66220
66993
|
}));
|
|
66221
66994
|
});
|
|
66222
66995
|
};
|
|
66223
|
-
var
|
|
66996
|
+
var renderCustomResult = props.customResult;
|
|
66224
66997
|
var shouldRenderLeft = listType !== 'image' || leftHandler;
|
|
66225
66998
|
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormFieldContext),
|
|
66226
66999
|
fieldId = _useContext.fieldId;
|
|
@@ -66228,17 +67001,20 @@ var Upload = function Upload(props0) {
|
|
|
66228
67001
|
id: fieldId,
|
|
66229
67002
|
style: props.style,
|
|
66230
67003
|
className: classnames_default()(uploadClasses === null || uploadClasses === void 0 ? void 0 : uploadClasses.rootClass, uploadClasses === null || uploadClasses === void 0 ? void 0 : uploadClasses.wrapper, isImage && (uploadClasses === null || uploadClasses === void 0 ? void 0 : uploadClasses.wrapperImage), drop && (uploadClasses === null || uploadClasses === void 0 ? void 0 : uploadClasses.wrapperDrop), props.disabled && (uploadClasses === null || uploadClasses === void 0 ? void 0 : uploadClasses.wrapperDisabled), props.className),
|
|
66231
|
-
children:
|
|
66232
|
-
children: [shouldRenderLeft && renderHandler(),
|
|
67004
|
+
children: renderCustomResult ? /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
67005
|
+
children: [shouldRenderLeft && renderHandler(), renderCustomResult({
|
|
66233
67006
|
value: value,
|
|
66234
67007
|
files: files,
|
|
67008
|
+
filesInstances: renderFile(),
|
|
67009
|
+
valueInstances: renderValue(),
|
|
66235
67010
|
onFileRemove: func.removeFile,
|
|
66236
67011
|
onValueRemove: func.removeValue,
|
|
66237
67012
|
recoverValue: recycleValues,
|
|
67013
|
+
handler: renderHandler(),
|
|
66238
67014
|
onValueRecover: func.recoverValue
|
|
66239
|
-
}), !shouldRenderLeft && renderHandler()]
|
|
67015
|
+
}), !shouldRenderLeft && !hideHandler && renderHandler()]
|
|
66240
67016
|
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
66241
|
-
children: [shouldRenderLeft && renderHandler(), renderValue(), renderFile(), !shouldRenderLeft && renderHandler(), renderRecover()]
|
|
67017
|
+
children: [shouldRenderLeft && !hideHandler && renderHandler(), renderValue(), renderFile(), !shouldRenderLeft && !hideHandler && renderHandler(), renderRecover()]
|
|
66242
67018
|
})
|
|
66243
67019
|
});
|
|
66244
67020
|
};
|
|
@@ -66468,18 +67244,70 @@ var BaseUploadButton = function BaseUploadButton(props) {
|
|
|
66468
67244
|
});
|
|
66469
67245
|
return use_field_common(objectSpread2_default()(objectSpread2_default()({}, props), customProps), BaseUploadButton);
|
|
66470
67246
|
});
|
|
67247
|
+
;// CONCATENATED MODULE: ../base/src/upload/dragger.tsx
|
|
67248
|
+
|
|
67249
|
+
|
|
67250
|
+
var Dragger = function Dragger(props) {
|
|
67251
|
+
var _jssStyle$upload;
|
|
67252
|
+
var children = props.children,
|
|
67253
|
+
multiple = props.multiple,
|
|
67254
|
+
addFile = props.addFile,
|
|
67255
|
+
accept = props.accept,
|
|
67256
|
+
disabled = props.disabled,
|
|
67257
|
+
jssStyle = props.jssStyle,
|
|
67258
|
+
_props$limit = props.limit,
|
|
67259
|
+
limit = _props$limit === void 0 ? 100 : _props$limit;
|
|
67260
|
+
var uploadClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$upload = jssStyle.upload) === null || _jssStyle$upload === void 0 ? void 0 : _jssStyle$upload.call(jssStyle);
|
|
67261
|
+
var handleDrop = function handleDrop(files) {
|
|
67262
|
+
addFile === null || addFile === void 0 || addFile({
|
|
67263
|
+
files: files,
|
|
67264
|
+
fromDragger: true
|
|
67265
|
+
});
|
|
67266
|
+
};
|
|
67267
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(upload_drop, {
|
|
67268
|
+
drop: true,
|
|
67269
|
+
className: uploadClasses === null || uploadClasses === void 0 ? void 0 : uploadClasses.draggerWrapper,
|
|
67270
|
+
accept: accept,
|
|
67271
|
+
disabled: disabled,
|
|
67272
|
+
multiple: multiple || limit > 1,
|
|
67273
|
+
onDrop: handleDrop,
|
|
67274
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
67275
|
+
className: uploadClasses === null || uploadClasses === void 0 ? void 0 : uploadClasses.draggerArea,
|
|
67276
|
+
children: children
|
|
67277
|
+
})
|
|
67278
|
+
});
|
|
67279
|
+
};
|
|
67280
|
+
/* harmony default export */ var dragger = (Dragger);
|
|
67281
|
+
;// CONCATENATED MODULE: ./src/upload/dragger.tsx
|
|
67282
|
+
|
|
67283
|
+
|
|
67284
|
+
|
|
67285
|
+
|
|
67286
|
+
var dragger_jssStyle = {
|
|
67287
|
+
upload: useUploadStyle
|
|
67288
|
+
};
|
|
67289
|
+
var BaseUploadDragger = function BaseUploadDragger(props) {
|
|
67290
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(dragger, objectSpread2_default()({
|
|
67291
|
+
jssStyle: dragger_jssStyle
|
|
67292
|
+
}, props));
|
|
67293
|
+
};
|
|
67294
|
+
/* harmony default export */ var upload_dragger = (BaseUploadDragger);
|
|
66471
67295
|
;// CONCATENATED MODULE: ./src/upload/index.ts
|
|
66472
67296
|
|
|
66473
67297
|
|
|
66474
67298
|
|
|
67299
|
+
|
|
66475
67300
|
var UploadImageComp = src_upload_image;
|
|
66476
67301
|
UploadImageComp.displayName = 'ShineoutUploadImage';
|
|
66477
67302
|
var UploadButtonComp = src_upload_button;
|
|
66478
67303
|
UploadButtonComp.displayName = 'ShineoutUploadButton';
|
|
66479
67304
|
var UploadComp = src_upload_upload_0;
|
|
66480
67305
|
UploadComp.displayName = 'ShineoutUpload';
|
|
67306
|
+
var UploadDraggerComp = upload_dragger;
|
|
67307
|
+
UploadDraggerComp.displayName = 'ShineoutUploadDragger';
|
|
66481
67308
|
UploadComp.Image = UploadImageComp;
|
|
66482
67309
|
UploadComp.Button = UploadButtonComp;
|
|
67310
|
+
UploadComp.Dragger = UploadDraggerComp;
|
|
66483
67311
|
/* harmony default export */ var src_upload_0 = (UploadComp);
|
|
66484
67312
|
;// CONCATENATED MODULE: ../theme/src/hooks/useToken/use-token.ts
|
|
66485
67313
|
|
|
@@ -68810,7 +69638,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
68810
69638
|
|
|
68811
69639
|
|
|
68812
69640
|
/* harmony default export */ var src_0 = ({
|
|
68813
|
-
version: '3.6.0
|
|
69641
|
+
version: '3.6.0'
|
|
68814
69642
|
});
|
|
68815
69643
|
}();
|
|
68816
69644
|
/******/ return __webpack_exports__;
|