amis-ui 6.13.0-beta.7 → 6.13.0-beta.8
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/package.json +3 -3
- package/scss/components/form/_excel.scss +110 -4
- package/esm/components/404.d.ts +0 -53
- package/esm/components/404.js +0 -35
- package/esm/components/Alert.d.ts +0 -615
- package/esm/components/Alert.js +0 -266
- package/esm/components/Alert2.d.ts +0 -117
- package/esm/components/Alert2.js +0 -58
- package/esm/components/AlphabetIndexer.d.ts +0 -11
- package/esm/components/AlphabetIndexer.js +0 -48
- package/esm/components/AnchorNav.d.ts +0 -162
- package/esm/components/AnchorNav.js +0 -153
- package/esm/components/AnchorNavSection.d.ts +0 -2
- package/esm/components/AnchorNavSection.js +0 -7
- package/esm/components/ArrayInput.d.ts +0 -617
- package/esm/components/ArrayInput.js +0 -147
- package/esm/components/AsideNav.d.ts +0 -142
- package/esm/components/AsideNav.js +0 -133
- package/esm/components/AssociatedSelection.d.ts +0 -564
- package/esm/components/AssociatedSelection.js +0 -103
- package/esm/components/AutoSizer.d.ts +0 -2
- package/esm/components/AutoSizer.js +0 -8
- package/esm/components/Avatar.d.ts +0 -374
- package/esm/components/Avatar.js +0 -126
- package/esm/components/Badge.d.ts +0 -118
- package/esm/components/Badge.js +0 -154
- package/esm/components/BaiduMapPicker.d.ts +0 -100
- package/esm/components/BaiduMapPicker.js +0 -366
- package/esm/components/BarCode.d.ts +0 -56
- package/esm/components/BarCode.js +0 -42
- package/esm/components/Breadcrumb.d.ts +0 -115
- package/esm/components/Breadcrumb.js +0 -160
- package/esm/components/Button.d.ts +0 -147
- package/esm/components/Button.js +0 -63
- package/esm/components/CalendarMobile.d.ts +0 -431
- package/esm/components/CalendarMobile.js +0 -538
- package/esm/components/Card.d.ts +0 -444
- package/esm/components/Card.js +0 -88
- package/esm/components/Cascader.d.ts +0 -108
- package/esm/components/Cascader.js +0 -515
- package/esm/components/ChainedDropdownSelection.d.ts +0 -561
- package/esm/components/ChainedDropdownSelection.js +0 -104
- package/esm/components/ChainedSelection.d.ts +0 -554
- package/esm/components/ChainedSelection.js +0 -184
- package/esm/components/Checkbox.d.ts +0 -110
- package/esm/components/Checkbox.js +0 -87
- package/esm/components/CityArea.d.ts +0 -299
- package/esm/components/CityArea.js +0 -190
- package/esm/components/CityDB.d.ts +0 -13
- package/esm/components/CityDB.js +0 -3942
- package/esm/components/CodeMirror.d.ts +0 -29
- package/esm/components/CodeMirror.js +0 -140
- package/esm/components/Collapse.d.ts +0 -447
- package/esm/components/Collapse.js +0 -184
- package/esm/components/CollapseGroup.d.ts +0 -219
- package/esm/components/CollapseGroup.js +0 -117
- package/esm/components/ColorPicker.d.ts +0 -530
- package/esm/components/ColorPicker.js +0 -260
- package/esm/components/Combo.d.ts +0 -354
- package/esm/components/Combo.js +0 -212
- package/esm/components/ConditionBuilder.d.ts +0 -2
- package/esm/components/ConditionBuilder.js +0 -7
- package/esm/components/ConfirmBox.d.ts +0 -322
- package/esm/components/ConfirmBox.js +0 -129
- package/esm/components/ContextMenu.d.ts +0 -115
- package/esm/components/ContextMenu.js +0 -305
- package/esm/components/DatePicker.d.ts +0 -638
- package/esm/components/DatePicker.js +0 -717
- package/esm/components/DateRangePicker.d.ts +0 -1046
- package/esm/components/DateRangePicker.js +0 -1389
- package/esm/components/DiffEditor.d.ts +0 -21
- package/esm/components/DiffEditor.js +0 -119
- package/esm/components/DndContainer.d.ts +0 -205
- package/esm/components/DndContainer.js +0 -25
- package/esm/components/Drawer.d.ts +0 -158
- package/esm/components/Drawer.js +0 -269
- package/esm/components/DropDownSelection.d.ts +0 -557
- package/esm/components/DropDownSelection.js +0 -78
- package/esm/components/DropdownContextMenus.d.ts +0 -84
- package/esm/components/DropdownContextMenus.js +0 -93
- package/esm/components/Editor.d.ts +0 -681
- package/esm/components/Editor.js +0 -238
- package/esm/components/Form.d.ts +0 -31
- package/esm/components/Form.js +0 -84
- package/esm/components/FormField.d.ts +0 -287
- package/esm/components/FormField.js +0 -78
- package/esm/components/FormulaPicker.d.ts +0 -2
- package/esm/components/FormulaPicker.js +0 -7
- package/esm/components/GaodeMapPicker.d.ts +0 -89
- package/esm/components/GaodeMapPicker.js +0 -204
- package/esm/components/GridNav.d.ts +0 -53
- package/esm/components/GridNav.js +0 -125
- package/esm/components/GridNavItem.d.ts +0 -2
- package/esm/components/GridNavItem.js +0 -7
- package/esm/components/GroupedSelection.d.ts +0 -543
- package/esm/components/GroupedSelection.js +0 -138
- package/esm/components/HeadCellDropDown.d.ts +0 -2
- package/esm/components/HeadCellDropDown.js +0 -7
- package/esm/components/HorizontalScroll.d.ts +0 -75
- package/esm/components/HorizontalScroll.js +0 -271
- package/esm/components/Html.d.ts +0 -82
- package/esm/components/Html.js +0 -52
- package/esm/components/Icon.d.ts +0 -2
- package/esm/components/Icon.js +0 -7
- package/esm/components/ImageGallery.d.ts +0 -465
- package/esm/components/ImageGallery.js +0 -396
- package/esm/components/Input.d.ts +0 -18
- package/esm/components/Input.js +0 -75
- package/esm/components/InputBox.d.ts +0 -100
- package/esm/components/InputBox.js +0 -98
- package/esm/components/InputBoxWithSuggestion.d.ts +0 -272
- package/esm/components/InputBoxWithSuggestion.js +0 -69
- package/esm/components/InputJSONSchema.d.ts +0 -2
- package/esm/components/InputJSONSchema.js +0 -7
- package/esm/components/InputTable.d.ts +0 -317
- package/esm/components/InputTable.js +0 -176
- package/esm/components/JSONSchemaEditor.d.ts +0 -2
- package/esm/components/JSONSchemaEditor.js +0 -7
- package/esm/components/Layout.d.ts +0 -74
- package/esm/components/Layout.js +0 -60
- package/esm/components/Link.d.ts +0 -60
- package/esm/components/Link.js +0 -44
- package/esm/components/ListGroup.d.ts +0 -77
- package/esm/components/ListGroup.js +0 -31
- package/esm/components/ListMenu.d.ts +0 -568
- package/esm/components/ListMenu.js +0 -62
- package/esm/components/LocationPicker.d.ts +0 -467
- package/esm/components/LocationPicker.js +0 -208
- package/esm/components/Markdown.d.ts +0 -25
- package/esm/components/Markdown.js +0 -70
- package/esm/components/Menu.d.ts +0 -2
- package/esm/components/Menu.js +0 -7
- package/esm/components/MobileDevTool.d.ts +0 -12
- package/esm/components/MobileDevTool.js +0 -312
- package/esm/components/Modal.d.ts +0 -1316
- package/esm/components/Modal.js +0 -261
- package/esm/components/ModalManager.d.ts +0 -17
- package/esm/components/ModalManager.js +0 -42
- package/esm/components/MonthRangePicker.d.ts +0 -744
- package/esm/components/MultilineText.d.ts +0 -454
- package/esm/components/MultilineText.js +0 -90
- package/esm/components/NumberInput.d.ts +0 -201
- package/esm/components/NumberInput.js +0 -274
- package/esm/components/OverflowTpl.d.ts +0 -61
- package/esm/components/OverflowTpl.js +0 -101
- package/esm/components/Pagination.d.ts +0 -812
- package/esm/components/Pagination.js +0 -375
- package/esm/components/PdfViewer.d.ts +0 -49
- package/esm/components/PdfViewer.js +0 -83
- package/esm/components/Picker.d.ts +0 -277
- package/esm/components/Picker.js +0 -73
- package/esm/components/PickerColumn.d.ts +0 -62
- package/esm/components/PickerColumn.js +0 -276
- package/esm/components/PickerContainer.d.ts +0 -291
- package/esm/components/PickerContainer.js +0 -157
- package/esm/components/PopOverContainer.d.ts +0 -59
- package/esm/components/PopOverContainer.js +0 -149
- package/esm/components/PopUp.d.ts +0 -573
- package/esm/components/PopUp.js +0 -85
- package/esm/components/Progress.d.ts +0 -311
- package/esm/components/Progress.js +0 -136
- package/esm/components/PullRefresh.d.ts +0 -79
- package/esm/components/PullRefresh.js +0 -172
- package/esm/components/Radios.d.ts +0 -170
- package/esm/components/Radios.js +0 -122
- package/esm/components/Range.d.ts +0 -131
- package/esm/components/Range.js +0 -517
- package/esm/components/Rating.d.ts +0 -227
- package/esm/components/Rating.js +0 -341
- package/esm/components/ResultBox.d.ts +0 -532
- package/esm/components/ResultBox.js +0 -215
- package/esm/components/ResultList.d.ts +0 -554
- package/esm/components/ResultList.js +0 -254
- package/esm/components/ResultTableList.d.ts +0 -786
- package/esm/components/ResultTableList.js +0 -152
- package/esm/components/ResultTreeList.d.ts +0 -425
- package/esm/components/ResultTreeList.js +0 -239
- package/esm/components/RichText.d.ts +0 -48
- package/esm/components/RichText.js +0 -271
- package/esm/components/SearchBox.d.ts +0 -625
- package/esm/components/SearchBox.js +0 -299
- package/esm/components/Select.d.ts +0 -6498
- package/esm/components/Select.js +0 -843
- package/esm/components/SelectMobile.d.ts +0 -38
- package/esm/components/SelectMobile.js +0 -370
- package/esm/components/Selection.d.ts +0 -598
- package/esm/components/Selection.js +0 -166
- package/esm/components/Shape.d.ts +0 -58
- package/esm/components/Shape.js +0 -429
- package/esm/components/Signature.d.ts +0 -279
- package/esm/components/Signature.js +0 -291
- package/esm/components/Slider.d.ts +0 -56
- package/esm/components/Slider.js +0 -140
- package/esm/components/SparkLine.d.ts +0 -397
- package/esm/components/SparkLine.js +0 -62
- package/esm/components/Spinner.d.ts +0 -266
- package/esm/components/Spinner.js +0 -202
- package/esm/components/Steps.d.ts +0 -117
- package/esm/components/Steps.js +0 -76
- package/esm/components/Switch.d.ts +0 -105
- package/esm/components/Switch.js +0 -73
- package/esm/components/Tab.d.ts +0 -2
- package/esm/components/Tab.js +0 -7
- package/esm/components/Table.d.ts +0 -2
- package/esm/components/Table.js +0 -7
- package/esm/components/TableSelection.d.ts +0 -791
- package/esm/components/TableSelection.js +0 -169
- package/esm/components/Tabs.d.ts +0 -670
- package/esm/components/Tabs.js +0 -607
- package/esm/components/TabsTransfer.d.ts +0 -423
- package/esm/components/TabsTransfer.js +0 -219
- package/esm/components/TabsTransferPicker.d.ts +0 -267
- package/esm/components/TabsTransferPicker.js +0 -81
- package/esm/components/Tag.d.ts +0 -307
- package/esm/components/Tag.js +0 -137
- package/esm/components/Textarea.d.ts +0 -564
- package/esm/components/Textarea.js +0 -147
- package/esm/components/Timeline.d.ts +0 -56
- package/esm/components/Timeline.js +0 -60
- package/esm/components/TimelineItem.d.ts +0 -1292
- package/esm/components/TimelineItem.js +0 -101
- package/esm/components/Tinymce.d.ts +0 -66
- package/esm/components/Tinymce.js +0 -632
- package/esm/components/TitleBar.d.ts +0 -123
- package/esm/components/TitleBar.js +0 -48
- package/esm/components/Toast.d.ts +0 -591
- package/esm/components/Toast.js +0 -247
- package/esm/components/Tooltip.d.ts +0 -65
- package/esm/components/Tooltip.js +0 -36
- package/esm/components/TooltipWrapper.d.ts +0 -217
- package/esm/components/TooltipWrapper.js +0 -181
- package/esm/components/Transfer.d.ts +0 -1844
- package/esm/components/Transfer.js +0 -481
- package/esm/components/TransferDropDown.d.ts +0 -634
- package/esm/components/TransferDropDown.js +0 -98
- package/esm/components/TransferPicker.d.ts +0 -275
- package/esm/components/TransferPicker.js +0 -98
- package/esm/components/TransferSearch.d.ts +0 -283
- package/esm/components/TransferSearch.js +0 -100
- package/esm/components/Tree.d.ts +0 -1991
- package/esm/components/Tree.js +0 -1179
- package/esm/components/TreeSelection.d.ts +0 -601
- package/esm/components/TreeSelection.js +0 -201
- package/esm/components/UserSelect.d.ts +0 -541
- package/esm/components/UserSelect.js +0 -674
- package/esm/components/UserTabSelect.d.ts +0 -315
- package/esm/components/UserTabSelect.js +0 -227
- package/esm/components/VerificationCode.d.ts +0 -116
- package/esm/components/VerificationCode.js +0 -172
- package/esm/components/VirtualList.d.ts +0 -2
- package/esm/components/VirtualList.js +0 -7
- package/esm/components/WithRemoteConfig.d.ts +0 -383
- package/esm/components/WithRemoteConfig.js +0 -302
- package/esm/components/WithStore.d.ts +0 -72
- package/esm/components/WithStore.js +0 -48
- package/esm/components/calendar/Calendar.d.ts +0 -83
- package/esm/components/calendar/Calendar.js +0 -529
- package/esm/components/calendar/CalendarContainer.d.ts +0 -10
- package/esm/components/calendar/CalendarContainer.js +0 -27
- package/esm/components/calendar/DaysView.d.ts +0 -184
- package/esm/components/calendar/DaysView.js +0 -527
- package/esm/components/calendar/MonthsView.d.ts +0 -133
- package/esm/components/calendar/MonthsView.js +0 -175
- package/esm/components/calendar/QuartersView.d.ts +0 -102
- package/esm/components/calendar/QuartersView.js +0 -125
- package/esm/components/calendar/TimeView.d.ts +0 -183
- package/esm/components/calendar/TimeView.js +0 -559
- package/esm/components/calendar/YearsView.d.ts +0 -102
- package/esm/components/calendar/YearsView.js +0 -122
- package/esm/components/condition-builder/Expression.d.ts +0 -292
- package/esm/components/condition-builder/Expression.js +0 -121
- package/esm/components/condition-builder/Field.d.ts +0 -272
- package/esm/components/condition-builder/Field.js +0 -32
- package/esm/components/condition-builder/Formula.d.ts +0 -261
- package/esm/components/condition-builder/Func.d.ts +0 -273
- package/esm/components/condition-builder/Func.js +0 -75
- package/esm/components/condition-builder/Group.d.ts +0 -310
- package/esm/components/condition-builder/Group.js +0 -191
- package/esm/components/condition-builder/GroupOrItem.d.ts +0 -87
- package/esm/components/condition-builder/GroupOrItem.js +0 -105
- package/esm/components/condition-builder/InputSwitch.d.ts +0 -47
- package/esm/components/condition-builder/InputSwitch.js +0 -28
- package/esm/components/condition-builder/Item.d.ts +0 -287
- package/esm/components/condition-builder/Item.js +0 -232
- package/esm/components/condition-builder/Value.d.ts +0 -272
- package/esm/components/condition-builder/Value.js +0 -108
- package/esm/components/condition-builder/config.d.ts +0 -36
- package/esm/components/condition-builder/config.js +0 -120
- package/esm/components/condition-builder/index.d.ts +0 -319
- package/esm/components/condition-builder/index.js +0 -228
- package/esm/components/condition-builder/types.d.ts +0 -115
- package/esm/components/formula/CodeEditor.d.ts +0 -92
- package/esm/components/formula/CodeEditor.js +0 -99
- package/esm/components/formula/Editor.d.ts +0 -516
- package/esm/components/formula/Editor.js +0 -430
- package/esm/components/formula/FuncList.d.ts +0 -46
- package/esm/components/formula/FuncList.js +0 -63
- package/esm/components/formula/Input.d.ts +0 -292
- package/esm/components/formula/Input.js +0 -122
- package/esm/components/formula/Picker.d.ts +0 -492
- package/esm/components/formula/Picker.js +0 -454
- package/esm/components/formula/VariableList.d.ts +0 -58
- package/esm/components/formula/VariableList.js +0 -182
- package/esm/components/formula/plugin.d.ts +0 -51
- package/esm/components/formula/plugin.js +0 -372
- package/esm/components/icons.d.ts +0 -61
- package/esm/components/icons.js +0 -456
- package/esm/components/index.d.ts +0 -136
- package/esm/components/json-schema/Array.d.ts +0 -3
- package/esm/components/json-schema/Array.js +0 -129
- package/esm/components/json-schema/Item.d.ts +0 -5
- package/esm/components/json-schema/Item.js +0 -63
- package/esm/components/json-schema/Object.d.ts +0 -5
- package/esm/components/json-schema/Object.js +0 -265
- package/esm/components/json-schema/index.d.ts +0 -272
- package/esm/components/json-schema/index.js +0 -29
- package/esm/components/menu/MenuContext.d.ts +0 -83
- package/esm/components/menu/MenuContext.js +0 -25
- package/esm/components/menu/MenuItem.d.ts +0 -81
- package/esm/components/menu/MenuItem.js +0 -112
- package/esm/components/menu/PanelMenu.d.ts +0 -46
- package/esm/components/menu/PanelMenu.js +0 -68
- package/esm/components/menu/SubMenu.d.ts +0 -84
- package/esm/components/menu/SubMenu.js +0 -137
- package/esm/components/menu/index.d.ts +0 -381
- package/esm/components/menu/index.js +0 -369
- package/esm/components/schema-editor/Array.d.ts +0 -11
- package/esm/components/schema-editor/Array.js +0 -84
- package/esm/components/schema-editor/Common.d.ts +0 -61
- package/esm/components/schema-editor/Common.js +0 -161
- package/esm/components/schema-editor/Item.d.ts +0 -8
- package/esm/components/schema-editor/Item.js +0 -24
- package/esm/components/schema-editor/Object.d.ts +0 -51
- package/esm/components/schema-editor/Object.js +0 -294
- package/esm/components/schema-editor/SchemaVariableList.d.ts +0 -186
- package/esm/components/schema-editor/SchemaVariableList.js +0 -74
- package/esm/components/schema-editor/SchemaVariableListPicker.d.ts +0 -179
- package/esm/components/schema-editor/SchemaVariableListPicker.js +0 -34
- package/esm/components/schema-editor/index.d.ts +0 -797
- package/esm/components/schema-editor/index.js +0 -122
- package/esm/components/table/Cell.d.ts +0 -36
- package/esm/components/table/Cell.js +0 -43
- package/esm/components/table/ColGroup.d.ts +0 -24
- package/esm/components/table/ColGroup.js +0 -58
- package/esm/components/table/Head.d.ts +0 -45
- package/esm/components/table/Head.js +0 -150
- package/esm/components/table/HeadCellDropDown.d.ts +0 -289
- package/esm/components/table/HeadCellDropDown.js +0 -55
- package/esm/components/table/HeadCellFilter.d.ts +0 -414
- package/esm/components/table/HeadCellFilter.js +0 -131
- package/esm/components/table/HeadCellSelect.d.ts +0 -357
- package/esm/components/table/HeadCellSelect.js +0 -52
- package/esm/components/table/HeadCellSort.d.ts +0 -278
- package/esm/components/table/HeadCellSort.js +0 -88
- package/esm/components/table/ItemActionsWrapper.d.ts +0 -10
- package/esm/components/table/ItemActionsWrapper.js +0 -29
- package/esm/components/table/Row.d.ts +0 -56
- package/esm/components/table/Row.js +0 -224
- package/esm/components/table/SummaryRow.d.ts +0 -28
- package/esm/components/table/SummaryRow.js +0 -73
- package/esm/components/table/index.d.ts +0 -852
- package/esm/components/table/index.js +0 -1067
- package/esm/components/table/util.d.ts +0 -56
- package/esm/components/table/util.js +0 -263
- package/esm/components/virtual-list/AutoSizer.d.ts +0 -19
- package/esm/components/virtual-list/AutoSizer.js +0 -49
- package/esm/components/virtual-list/SizeAndPositionManager.d.ts +0 -70
- package/esm/components/virtual-list/SizeAndPositionManager.js +0 -216
- package/esm/components/virtual-list/constants.d.ts +0 -34
- package/esm/components/virtual-list/constants.js +0 -45
- package/esm/components/virtual-list/index.d.ts +0 -99
- package/esm/components/virtual-list/index.js +0 -288
- package/esm/components/withBadge.d.ts +0 -2
- package/esm/components/withBadge.js +0 -7
- package/esm/hooks/index.d.ts +0 -8
- package/esm/hooks/use-click-away.d.ts +0 -12
- package/esm/hooks/use-click-away.js +0 -55
- package/esm/hooks/use-on-screen.d.ts +0 -2
- package/esm/hooks/use-on-screen.js +0 -28
- package/esm/hooks/use-set-state.d.ts +0 -2
- package/esm/hooks/use-set-state.js +0 -19
- package/esm/hooks/use-sub-form.d.ts +0 -4
- package/esm/hooks/use-sub-form.js +0 -39
- package/esm/hooks/use-touch.d.ts +0 -16
- package/esm/hooks/use-touch.js +0 -77
- package/esm/hooks/use-update-effect.d.ts +0 -3
- package/esm/hooks/use-update-effect.js +0 -21
- package/esm/hooks/use-validation-resolver.d.ts +0 -7
- package/esm/hooks/use-validation-resolver.js +0 -115
- package/esm/icons/alert-danger.svg.js +0 -22
- package/esm/icons/alert-info.svg.js +0 -22
- package/esm/icons/alert-success.svg.js +0 -22
- package/esm/icons/alert-warning.svg.js +0 -22
- package/esm/icons/arrow-double-left.svg.js +0 -24
- package/esm/icons/arrow-double-right.svg.js +0 -24
- package/esm/icons/back.svg.js +0 -21
- package/esm/icons/calendar.svg.js +0 -31
- package/esm/icons/caret.svg.js +0 -21
- package/esm/icons/check.svg.js +0 -21
- package/esm/icons/clock.svg.js +0 -29
- package/esm/icons/close-small.svg.js +0 -24
- package/esm/icons/close.svg.js +0 -21
- package/esm/icons/cloud-upload.svg.js +0 -22
- package/esm/icons/column-filter.svg.js +0 -22
- package/esm/icons/columns.svg.js +0 -21
- package/esm/icons/compress-alt.svg.js +0 -21
- package/esm/icons/copy.svg.js +0 -26
- package/esm/icons/date.svg.js +0 -26
- package/esm/icons/department.svg.js +0 -52
- package/esm/icons/desk-empty.svg.js +0 -73
- package/esm/icons/dot.svg.js +0 -36
- package/esm/icons/down-arrow-bold.svg.js +0 -22
- package/esm/icons/down.svg.js +0 -23
- package/esm/icons/download.svg.js +0 -24
- package/esm/icons/drag-bar.svg.js +0 -53
- package/esm/icons/drag.svg.js +0 -22
- package/esm/icons/edit.svg.js +0 -21
- package/esm/icons/ellipsis-v.svg.js +0 -21
- package/esm/icons/enter.svg.js +0 -20
- package/esm/icons/exchange.svg.js +0 -21
- package/esm/icons/expand-alt.svg.js +0 -21
- package/esm/icons/fail.svg.js +0 -31
- package/esm/icons/file.svg.js +0 -22
- package/esm/icons/filter.svg.js +0 -21
- package/esm/icons/folder.svg.js +0 -24
- package/esm/icons/fullscreen.svg.js +0 -21
- package/esm/icons/function.svg.js +0 -21
- package/esm/icons/home.svg.js +0 -21
- package/esm/icons/if.svg.js +0 -21
- package/esm/icons/image.svg.js +0 -20
- package/esm/icons/info-circle.svg.js +0 -21
- package/esm/icons/info.svg.js +0 -27
- package/esm/icons/input-clear.svg.js +0 -20
- package/esm/icons/invisible.svg.js +0 -22
- package/esm/icons/left-arrow.svg.js +0 -23
- package/esm/icons/loading-outline.svg.js +0 -21
- package/esm/icons/location.svg.js +0 -20
- package/esm/icons/menu.svg.js +0 -20
- package/esm/icons/minus.svg.js +0 -21
- package/esm/icons/move.svg.js +0 -22
- package/esm/icons/mute.svg.js +0 -21
- package/esm/icons/new-edit.svg.js +0 -22
- package/esm/icons/pause.svg.js +0 -21
- package/esm/icons/pencil.svg.js +0 -21
- package/esm/icons/play.svg.js +0 -20
- package/esm/icons/plus-cicle.svg.js +0 -20
- package/esm/icons/plus-fine.svg.js +0 -21
- package/esm/icons/plus.svg.js +0 -21
- package/esm/icons/post.svg.js +0 -48
- package/esm/icons/question-mark.svg.js +0 -26
- package/esm/icons/question.svg.js +0 -21
- package/esm/icons/redo.svg.js +0 -21
- package/esm/icons/refresh.svg.js +0 -21
- package/esm/icons/reload.svg.js +0 -21
- package/esm/icons/remove.svg.js +0 -21
- package/esm/icons/retry.svg.js +0 -24
- package/esm/icons/right-arrow-bold.svg.js +0 -21
- package/esm/icons/right-arrow.svg.js +0 -23
- package/esm/icons/right-double-arrow.svg.js +0 -22
- package/esm/icons/role.svg.js +0 -43
- package/esm/icons/rotate-left.svg.js +0 -22
- package/esm/icons/rotate-right.svg.js +0 -22
- package/esm/icons/rotate-screen.svg.js +0 -21
- package/esm/icons/scale-origin.svg.js +0 -24
- package/esm/icons/schedule.svg.js +0 -24
- package/esm/icons/search.svg.js +0 -21
- package/esm/icons/setting.svg.js +0 -21
- package/esm/icons/slider-handle-icon.svg.js +0 -22
- package/esm/icons/sort-asc.svg.js +0 -21
- package/esm/icons/sort-default.svg.js +0 -21
- package/esm/icons/sort-desc.svg.js +0 -21
- package/esm/icons/star.svg.js +0 -21
- package/esm/icons/status-close.svg.js +0 -23
- package/esm/icons/steps-finsh.svg.js +0 -22
- package/esm/icons/sub-plus.svg.js +0 -20
- package/esm/icons/success.svg.js +0 -29
- package/esm/icons/transparent.svg.js +0 -38
- package/esm/icons/trash.svg.js +0 -22
- package/esm/icons/tree-down.svg.js +0 -21
- package/esm/icons/undo-normal.svg.js +0 -25
- package/esm/icons/undo.svg.js +0 -21
- package/esm/icons/unfullscreen.svg.js +0 -21
- package/esm/icons/upload.svg.js +0 -21
- package/esm/icons/user-remove.svg.js +0 -33
- package/esm/icons/view.svg.js +0 -22
- package/esm/icons/volume.svg.js +0 -24
- package/esm/icons/warning-mark.svg.js +0 -22
- package/esm/icons/warning.svg.js +0 -21
- package/esm/icons/window-restore.svg.js +0 -21
- package/esm/icons/zoom-in.svg.js +0 -21
- package/esm/icons/zoom-out.svg.js +0 -21
- package/esm/index.d.ts +0 -15
- package/esm/index.js +0 -154
- package/esm/locale/de-DE.d.ts +0 -1
- package/esm/locale/de-DE.js +0 -419
- package/esm/locale/en-US.d.ts +0 -1
- package/esm/locale/en-US.js +0 -425
- package/esm/locale/zh-CN.d.ts +0 -1
- package/esm/locale/zh-CN.js +0 -434
- package/esm/themes/ang.d.ts +0 -3
- package/esm/themes/ang.js +0 -15
- package/esm/themes/antd.d.ts +0 -1
- package/esm/themes/antd.js +0 -42
- package/esm/themes/cxd.d.ts +0 -3
- package/esm/themes/cxd.js +0 -455
- package/esm/themes/dark.d.ts +0 -3
- package/esm/themes/dark.js +0 -23
- package/esm/themes/default.d.ts +0 -4
- package/esm/utils/index.d.ts +0 -2
- package/esm/utils/smoothSignature.d.ts +0 -86
- package/esm/utils/vectorComputed.d.ts +0 -20
- package/esm/utils/vectorComputed.js +0 -75
- package/esm/withRemoteConfig.d.ts +0 -2
- package/esm/withRemoteConfig.js +0 -7
- package/esm/withStore.d.ts +0 -2
- package/esm/withStore.js +0 -7
- package/lib/components/404.d.ts +0 -53
- package/lib/components/404.js +0 -43
- package/lib/components/Alert.d.ts +0 -615
- package/lib/components/Alert.js +0 -279
- package/lib/components/Alert2.d.ts +0 -117
- package/lib/components/Alert2.js +0 -66
- package/lib/components/AlphabetIndexer.d.ts +0 -11
- package/lib/components/AlphabetIndexer.js +0 -59
- package/lib/components/AnchorNav.d.ts +0 -162
- package/lib/components/AnchorNav.js +0 -162
- package/lib/components/AnchorNavSection.d.ts +0 -2
- package/lib/components/AnchorNavSection.js +0 -14
- package/lib/components/ArrayInput.d.ts +0 -617
- package/lib/components/ArrayInput.js +0 -160
- package/lib/components/AsideNav.d.ts +0 -142
- package/lib/components/AsideNav.js +0 -140
- package/lib/components/AssociatedSelection.d.ts +0 -564
- package/lib/components/AssociatedSelection.js +0 -106
- package/lib/components/AutoSizer.d.ts +0 -2
- package/lib/components/AutoSizer.js +0 -15
- package/lib/components/Avatar.d.ts +0 -374
- package/lib/components/Avatar.js +0 -154
- package/lib/components/Badge.d.ts +0 -118
- package/lib/components/Badge.js +0 -165
- package/lib/components/BaiduMapPicker.d.ts +0 -100
- package/lib/components/BaiduMapPicker.js +0 -379
- package/lib/components/BarCode.d.ts +0 -56
- package/lib/components/BarCode.js +0 -52
- package/lib/components/Breadcrumb.d.ts +0 -115
- package/lib/components/Breadcrumb.js +0 -170
- package/lib/components/Button.d.ts +0 -147
- package/lib/components/Button.js +0 -71
- package/lib/components/CalendarMobile.d.ts +0 -431
- package/lib/components/CalendarMobile.js +0 -546
- package/lib/components/Card.d.ts +0 -444
- package/lib/components/Card.js +0 -100
- package/lib/components/Cascader.d.ts +0 -108
- package/lib/components/Cascader.js +0 -527
- package/lib/components/ChainedDropdownSelection.d.ts +0 -561
- package/lib/components/ChainedDropdownSelection.js +0 -116
- package/lib/components/ChainedSelection.d.ts +0 -554
- package/lib/components/ChainedSelection.js +0 -197
- package/lib/components/Checkbox.d.ts +0 -110
- package/lib/components/Checkbox.js +0 -95
- package/lib/components/CityArea.d.ts +0 -299
- package/lib/components/CityArea.js +0 -197
- package/lib/components/CityDB.d.ts +0 -13
- package/lib/components/CityDB.js +0 -3949
- package/lib/components/CodeMirror.d.ts +0 -29
- package/lib/components/CodeMirror.js +0 -152
- package/lib/components/Collapse.d.ts +0 -447
- package/lib/components/Collapse.js +0 -192
- package/lib/components/CollapseGroup.d.ts +0 -219
- package/lib/components/CollapseGroup.js +0 -124
- package/lib/components/ColorPicker.d.ts +0 -530
- package/lib/components/ColorPicker.js +0 -267
- package/lib/components/Combo.d.ts +0 -354
- package/lib/components/Combo.js +0 -165
- package/lib/components/ConditionBuilder.d.ts +0 -2
- package/lib/components/ConditionBuilder.js +0 -14
- package/lib/components/ConfirmBox.d.ts +0 -322
- package/lib/components/ConfirmBox.js +0 -141
- package/lib/components/ContextMenu.d.ts +0 -115
- package/lib/components/ContextMenu.js +0 -322
- package/lib/components/DatePicker.d.ts +0 -638
- package/lib/components/DatePicker.js +0 -725
- package/lib/components/DateRangePicker.d.ts +0 -1046
- package/lib/components/DateRangePicker.js +0 -1401
- package/lib/components/DiffEditor.d.ts +0 -21
- package/lib/components/DiffEditor.js +0 -130
- package/lib/components/DndContainer.d.ts +0 -205
- package/lib/components/DndContainer.js +0 -32
- package/lib/components/Drawer.d.ts +0 -158
- package/lib/components/Drawer.js +0 -279
- package/lib/components/DropDownSelection.d.ts +0 -557
- package/lib/components/DropDownSelection.js +0 -85
- package/lib/components/DropdownContextMenus.d.ts +0 -84
- package/lib/components/DropdownContextMenus.js +0 -101
- package/lib/components/Editor.d.ts +0 -681
- package/lib/components/Editor.js +0 -246
- package/lib/components/Form.d.ts +0 -31
- package/lib/components/Form.js +0 -97
- package/lib/components/FormField.d.ts +0 -287
- package/lib/components/FormField.js +0 -90
- package/lib/components/FormulaPicker.d.ts +0 -2
- package/lib/components/FormulaPicker.js +0 -14
- package/lib/components/GaodeMapPicker.d.ts +0 -89
- package/lib/components/GaodeMapPicker.js +0 -217
- package/lib/components/GridNav.d.ts +0 -53
- package/lib/components/GridNav.js +0 -133
- package/lib/components/GridNavItem.d.ts +0 -2
- package/lib/components/GridNavItem.js +0 -14
- package/lib/components/GroupedSelection.d.ts +0 -543
- package/lib/components/GroupedSelection.js +0 -150
- package/lib/components/HeadCellDropDown.d.ts +0 -2
- package/lib/components/HeadCellDropDown.js +0 -14
- package/lib/components/HorizontalScroll.d.ts +0 -75
- package/lib/components/HorizontalScroll.js +0 -283
- package/lib/components/Html.d.ts +0 -82
- package/lib/components/Html.js +0 -59
- package/lib/components/Icon.d.ts +0 -2
- package/lib/components/Icon.js +0 -14
- package/lib/components/ImageGallery.d.ts +0 -465
- package/lib/components/ImageGallery.js +0 -409
- package/lib/components/Input.d.ts +0 -18
- package/lib/components/Input.js +0 -86
- package/lib/components/InputBox.d.ts +0 -100
- package/lib/components/InputBox.js +0 -110
- package/lib/components/InputBoxWithSuggestion.d.ts +0 -272
- package/lib/components/InputBoxWithSuggestion.js +0 -81
- package/lib/components/InputJSONSchema.d.ts +0 -2
- package/lib/components/InputJSONSchema.js +0 -14
- package/lib/components/InputTable.d.ts +0 -317
- package/lib/components/InputTable.js +0 -189
- package/lib/components/JSONSchemaEditor.d.ts +0 -2
- package/lib/components/JSONSchemaEditor.js +0 -14
- package/lib/components/Layout.d.ts +0 -74
- package/lib/components/Layout.js +0 -56
- package/lib/components/Link.d.ts +0 -60
- package/lib/components/Link.js +0 -56
- package/lib/components/ListGroup.d.ts +0 -77
- package/lib/components/ListGroup.js +0 -43
- package/lib/components/ListMenu.d.ts +0 -568
- package/lib/components/ListMenu.js +0 -74
- package/lib/components/LocationPicker.d.ts +0 -467
- package/lib/components/LocationPicker.js +0 -220
- package/lib/components/Markdown.d.ts +0 -25
- package/lib/components/Markdown.js +0 -83
- package/lib/components/Menu.d.ts +0 -2
- package/lib/components/Menu.js +0 -14
- package/lib/components/MobileDevTool.d.ts +0 -12
- package/lib/components/MobileDevTool.js +0 -325
- package/lib/components/Modal.d.ts +0 -1316
- package/lib/components/Modal.js +0 -272
- package/lib/components/ModalManager.d.ts +0 -17
- package/lib/components/ModalManager.js +0 -53
- package/lib/components/MonthRangePicker.d.ts +0 -744
- package/lib/components/MultilineText.d.ts +0 -454
- package/lib/components/MultilineText.js +0 -102
- package/lib/components/NumberInput.d.ts +0 -201
- package/lib/components/NumberInput.js +0 -289
- package/lib/components/OverflowTpl.d.ts +0 -61
- package/lib/components/OverflowTpl.js +0 -109
- package/lib/components/Pagination.d.ts +0 -812
- package/lib/components/Pagination.js +0 -388
- package/lib/components/PdfViewer.d.ts +0 -49
- package/lib/components/PdfViewer.js +0 -89
- package/lib/components/Picker.d.ts +0 -277
- package/lib/components/Picker.js +0 -80
- package/lib/components/PickerColumn.d.ts +0 -62
- package/lib/components/PickerColumn.js +0 -288
- package/lib/components/PickerContainer.d.ts +0 -291
- package/lib/components/PickerContainer.js +0 -169
- package/lib/components/PopOverContainer.d.ts +0 -59
- package/lib/components/PopOverContainer.js +0 -162
- package/lib/components/PopUp.d.ts +0 -573
- package/lib/components/PopUp.js +0 -94
- package/lib/components/Progress.d.ts +0 -311
- package/lib/components/Progress.js +0 -148
- package/lib/components/PullRefresh.d.ts +0 -79
- package/lib/components/PullRefresh.js +0 -178
- package/lib/components/Radios.d.ts +0 -170
- package/lib/components/Radios.js +0 -119
- package/lib/components/Range.d.ts +0 -131
- package/lib/components/Range.js +0 -528
- package/lib/components/Rating.d.ts +0 -227
- package/lib/components/Rating.js +0 -349
- package/lib/components/ResultBox.d.ts +0 -532
- package/lib/components/ResultBox.js +0 -230
- package/lib/components/ResultList.d.ts +0 -554
- package/lib/components/ResultList.js +0 -268
- package/lib/components/ResultTableList.d.ts +0 -786
- package/lib/components/ResultTableList.js +0 -161
- package/lib/components/ResultTreeList.d.ts +0 -425
- package/lib/components/ResultTreeList.js +0 -254
- package/lib/components/RichText.d.ts +0 -48
- package/lib/components/RichText.js +0 -283
- package/lib/components/SearchBox.d.ts +0 -625
- package/lib/components/SearchBox.js +0 -315
- package/lib/components/Select.d.ts +0 -6498
- package/lib/components/Select.js +0 -861
- package/lib/components/SelectMobile.d.ts +0 -38
- package/lib/components/SelectMobile.js +0 -382
- package/lib/components/Selection.d.ts +0 -598
- package/lib/components/Selection.js +0 -176
- package/lib/components/Shape.d.ts +0 -58
- package/lib/components/Shape.js +0 -434
- package/lib/components/Signature.d.ts +0 -279
- package/lib/components/Signature.js +0 -295
- package/lib/components/Slider.d.ts +0 -56
- package/lib/components/Slider.js +0 -146
- package/lib/components/SparkLine.d.ts +0 -397
- package/lib/components/SparkLine.js +0 -74
- package/lib/components/Spinner.d.ts +0 -266
- package/lib/components/Spinner.js +0 -210
- package/lib/components/Steps.d.ts +0 -117
- package/lib/components/Steps.js +0 -84
- package/lib/components/Switch.d.ts +0 -105
- package/lib/components/Switch.js +0 -80
- package/lib/components/Tab.d.ts +0 -2
- package/lib/components/Tab.js +0 -14
- package/lib/components/Table.d.ts +0 -2
- package/lib/components/Table.js +0 -14
- package/lib/components/TableSelection.d.ts +0 -791
- package/lib/components/TableSelection.js +0 -183
- package/lib/components/Tabs.d.ts +0 -670
- package/lib/components/Tabs.js +0 -618
- package/lib/components/TabsTransfer.d.ts +0 -423
- package/lib/components/TabsTransfer.js +0 -232
- package/lib/components/TabsTransferPicker.d.ts +0 -267
- package/lib/components/TabsTransferPicker.js +0 -93
- package/lib/components/Tag.d.ts +0 -307
- package/lib/components/Tag.js +0 -146
- package/lib/components/Textarea.d.ts +0 -564
- package/lib/components/Textarea.js +0 -160
- package/lib/components/Timeline.d.ts +0 -56
- package/lib/components/Timeline.js +0 -68
- package/lib/components/TimelineItem.d.ts +0 -1292
- package/lib/components/TimelineItem.js +0 -118
- package/lib/components/Tinymce.d.ts +0 -66
- package/lib/components/Tinymce.js +0 -648
- package/lib/components/TitleBar.d.ts +0 -123
- package/lib/components/TitleBar.js +0 -51
- package/lib/components/Toast.d.ts +0 -591
- package/lib/components/Toast.js +0 -258
- package/lib/components/Tooltip.d.ts +0 -65
- package/lib/components/Tooltip.js +0 -43
- package/lib/components/TooltipWrapper.d.ts +0 -217
- package/lib/components/TooltipWrapper.js +0 -188
- package/lib/components/Transfer.d.ts +0 -1844
- package/lib/components/Transfer.js +0 -498
- package/lib/components/TransferDropDown.d.ts +0 -634
- package/lib/components/TransferDropDown.js +0 -106
- package/lib/components/TransferPicker.d.ts +0 -275
- package/lib/components/TransferPicker.js +0 -110
- package/lib/components/TransferSearch.d.ts +0 -283
- package/lib/components/TransferSearch.js +0 -113
- package/lib/components/Tree.d.ts +0 -1991
- package/lib/components/Tree.js +0 -1173
- package/lib/components/TreeSelection.d.ts +0 -601
- package/lib/components/TreeSelection.js +0 -209
- package/lib/components/UserSelect.d.ts +0 -541
- package/lib/components/UserSelect.js +0 -685
- package/lib/components/UserTabSelect.d.ts +0 -315
- package/lib/components/UserTabSelect.js +0 -235
- package/lib/components/VerificationCode.d.ts +0 -116
- package/lib/components/VerificationCode.js +0 -191
- package/lib/components/VirtualList.d.ts +0 -2
- package/lib/components/VirtualList.js +0 -14
- package/lib/components/WithRemoteConfig.d.ts +0 -383
- package/lib/components/WithRemoteConfig.js +0 -316
- package/lib/components/WithStore.d.ts +0 -72
- package/lib/components/WithStore.js +0 -61
- package/lib/components/calendar/Calendar.d.ts +0 -83
- package/lib/components/calendar/Calendar.js +0 -542
- package/lib/components/calendar/CalendarContainer.d.ts +0 -10
- package/lib/components/calendar/CalendarContainer.js +0 -38
- package/lib/components/calendar/DaysView.d.ts +0 -184
- package/lib/components/calendar/DaysView.js +0 -546
- package/lib/components/calendar/MonthsView.d.ts +0 -133
- package/lib/components/calendar/MonthsView.js +0 -188
- package/lib/components/calendar/QuartersView.d.ts +0 -102
- package/lib/components/calendar/QuartersView.js +0 -138
- package/lib/components/calendar/TimeView.d.ts +0 -183
- package/lib/components/calendar/TimeView.js +0 -574
- package/lib/components/calendar/YearsView.d.ts +0 -102
- package/lib/components/calendar/YearsView.js +0 -135
- package/lib/components/condition-builder/Expression.d.ts +0 -292
- package/lib/components/condition-builder/Expression.js +0 -133
- package/lib/components/condition-builder/Field.d.ts +0 -272
- package/lib/components/condition-builder/Field.js +0 -44
- package/lib/components/condition-builder/Formula.d.ts +0 -261
- package/lib/components/condition-builder/Func.d.ts +0 -273
- package/lib/components/condition-builder/Func.js +0 -87
- package/lib/components/condition-builder/Group.d.ts +0 -310
- package/lib/components/condition-builder/Group.js +0 -203
- package/lib/components/condition-builder/GroupOrItem.d.ts +0 -87
- package/lib/components/condition-builder/GroupOrItem.js +0 -117
- package/lib/components/condition-builder/InputSwitch.d.ts +0 -47
- package/lib/components/condition-builder/InputSwitch.js +0 -36
- package/lib/components/condition-builder/Item.d.ts +0 -287
- package/lib/components/condition-builder/Item.js +0 -244
- package/lib/components/condition-builder/Value.d.ts +0 -272
- package/lib/components/condition-builder/Value.js +0 -121
- package/lib/components/condition-builder/config.d.ts +0 -36
- package/lib/components/condition-builder/config.js +0 -125
- package/lib/components/condition-builder/index.d.ts +0 -319
- package/lib/components/condition-builder/index.js +0 -240
- package/lib/components/condition-builder/types.d.ts +0 -115
- package/lib/components/formula/CodeEditor.d.ts +0 -92
- package/lib/components/formula/CodeEditor.js +0 -110
- package/lib/components/formula/Editor.d.ts +0 -516
- package/lib/components/formula/Editor.js +0 -444
- package/lib/components/formula/FuncList.d.ts +0 -46
- package/lib/components/formula/FuncList.js +0 -75
- package/lib/components/formula/Input.d.ts +0 -292
- package/lib/components/formula/Input.js +0 -134
- package/lib/components/formula/Picker.d.ts +0 -492
- package/lib/components/formula/Picker.js +0 -467
- package/lib/components/formula/VariableList.d.ts +0 -58
- package/lib/components/formula/VariableList.js +0 -193
- package/lib/components/formula/plugin.d.ts +0 -51
- package/lib/components/formula/plugin.js +0 -381
- package/lib/components/icons.d.ts +0 -61
- package/lib/components/icons.js +0 -484
- package/lib/components/index.d.ts +0 -136
- package/lib/components/json-schema/Array.d.ts +0 -3
- package/lib/components/json-schema/Array.js +0 -140
- package/lib/components/json-schema/Item.d.ts +0 -5
- package/lib/components/json-schema/Item.js +0 -75
- package/lib/components/json-schema/Object.d.ts +0 -5
- package/lib/components/json-schema/Object.js +0 -278
- package/lib/components/json-schema/index.d.ts +0 -272
- package/lib/components/json-schema/index.js +0 -40
- package/lib/components/menu/MenuContext.d.ts +0 -83
- package/lib/components/menu/MenuContext.js +0 -29
- package/lib/components/menu/MenuItem.d.ts +0 -81
- package/lib/components/menu/MenuItem.js +0 -120
- package/lib/components/menu/PanelMenu.d.ts +0 -46
- package/lib/components/menu/PanelMenu.js +0 -74
- package/lib/components/menu/SubMenu.d.ts +0 -84
- package/lib/components/menu/SubMenu.js +0 -145
- package/lib/components/menu/index.d.ts +0 -381
- package/lib/components/menu/index.js +0 -379
- package/lib/components/schema-editor/Array.d.ts +0 -11
- package/lib/components/schema-editor/Array.js +0 -95
- package/lib/components/schema-editor/Common.d.ts +0 -61
- package/lib/components/schema-editor/Common.js +0 -174
- package/lib/components/schema-editor/Item.d.ts +0 -8
- package/lib/components/schema-editor/Item.js +0 -35
- package/lib/components/schema-editor/Object.d.ts +0 -51
- package/lib/components/schema-editor/Object.js +0 -305
- package/lib/components/schema-editor/SchemaVariableList.d.ts +0 -186
- package/lib/components/schema-editor/SchemaVariableList.js +0 -86
- package/lib/components/schema-editor/SchemaVariableListPicker.d.ts +0 -179
- package/lib/components/schema-editor/SchemaVariableListPicker.js +0 -46
- package/lib/components/schema-editor/index.d.ts +0 -797
- package/lib/components/schema-editor/index.js +0 -131
- package/lib/components/table/Cell.d.ts +0 -36
- package/lib/components/table/Cell.js +0 -50
- package/lib/components/table/ColGroup.d.ts +0 -24
- package/lib/components/table/ColGroup.js +0 -69
- package/lib/components/table/Head.d.ts +0 -45
- package/lib/components/table/Head.js +0 -157
- package/lib/components/table/HeadCellDropDown.d.ts +0 -289
- package/lib/components/table/HeadCellDropDown.js +0 -63
- package/lib/components/table/HeadCellFilter.d.ts +0 -414
- package/lib/components/table/HeadCellFilter.js +0 -140
- package/lib/components/table/HeadCellSelect.d.ts +0 -357
- package/lib/components/table/HeadCellSelect.js +0 -60
- package/lib/components/table/HeadCellSort.d.ts +0 -278
- package/lib/components/table/HeadCellSort.js +0 -96
- package/lib/components/table/ItemActionsWrapper.d.ts +0 -10
- package/lib/components/table/ItemActionsWrapper.js +0 -40
- package/lib/components/table/Row.d.ts +0 -56
- package/lib/components/table/Row.js +0 -231
- package/lib/components/table/SummaryRow.d.ts +0 -28
- package/lib/components/table/SummaryRow.js +0 -81
- package/lib/components/table/index.d.ts +0 -852
- package/lib/components/table/index.js +0 -1081
- package/lib/components/table/util.d.ts +0 -56
- package/lib/components/table/util.js +0 -285
- package/lib/components/virtual-list/AutoSizer.d.ts +0 -19
- package/lib/components/virtual-list/AutoSizer.js +0 -76
- package/lib/components/virtual-list/SizeAndPositionManager.d.ts +0 -70
- package/lib/components/virtual-list/SizeAndPositionManager.js +0 -220
- package/lib/components/virtual-list/constants.d.ts +0 -34
- package/lib/components/virtual-list/constants.js +0 -53
- package/lib/components/virtual-list/index.d.ts +0 -99
- package/lib/components/virtual-list/index.js +0 -317
- package/lib/components/withBadge.d.ts +0 -2
- package/lib/components/withBadge.js +0 -14
- package/lib/helper.css +0 -47744
- package/lib/hooks/index.d.ts +0 -8
- package/lib/hooks/use-click-away.d.ts +0 -12
- package/lib/hooks/use-click-away.js +0 -59
- package/lib/hooks/use-on-screen.d.ts +0 -2
- package/lib/hooks/use-on-screen.js +0 -32
- package/lib/hooks/use-set-state.d.ts +0 -2
- package/lib/hooks/use-set-state.js +0 -27
- package/lib/hooks/use-sub-form.d.ts +0 -4
- package/lib/hooks/use-sub-form.js +0 -48
- package/lib/hooks/use-touch.d.ts +0 -16
- package/lib/hooks/use-touch.js +0 -81
- package/lib/hooks/use-update-effect.d.ts +0 -3
- package/lib/hooks/use-update-effect.js +0 -25
- package/lib/hooks/use-validation-resolver.d.ts +0 -7
- package/lib/hooks/use-validation-resolver.js +0 -125
- package/lib/icons/alert-danger.svg.js +0 -29
- package/lib/icons/alert-info.svg.js +0 -29
- package/lib/icons/alert-success.svg.js +0 -29
- package/lib/icons/alert-warning.svg.js +0 -29
- package/lib/icons/arrow-double-left.svg.js +0 -31
- package/lib/icons/arrow-double-right.svg.js +0 -31
- package/lib/icons/back.svg.js +0 -28
- package/lib/icons/calendar.svg.js +0 -38
- package/lib/icons/caret.svg.js +0 -28
- package/lib/icons/check.svg.js +0 -28
- package/lib/icons/clock.svg.js +0 -36
- package/lib/icons/close-small.svg.js +0 -31
- package/lib/icons/close.svg.js +0 -28
- package/lib/icons/cloud-upload.svg.js +0 -29
- package/lib/icons/column-filter.svg.js +0 -29
- package/lib/icons/columns.svg.js +0 -28
- package/lib/icons/compress-alt.svg.js +0 -28
- package/lib/icons/copy.svg.js +0 -33
- package/lib/icons/date.svg.js +0 -33
- package/lib/icons/department.svg.js +0 -59
- package/lib/icons/desk-empty.svg.js +0 -80
- package/lib/icons/dot.svg.js +0 -43
- package/lib/icons/down-arrow-bold.svg.js +0 -29
- package/lib/icons/down.svg.js +0 -30
- package/lib/icons/download.svg.js +0 -31
- package/lib/icons/drag-bar.svg.js +0 -60
- package/lib/icons/drag.svg.js +0 -29
- package/lib/icons/edit.svg.js +0 -28
- package/lib/icons/ellipsis-v.svg.js +0 -28
- package/lib/icons/enter.svg.js +0 -27
- package/lib/icons/exchange.svg.js +0 -28
- package/lib/icons/expand-alt.svg.js +0 -28
- package/lib/icons/fail.svg.js +0 -38
- package/lib/icons/file.svg.js +0 -29
- package/lib/icons/filter.svg.js +0 -28
- package/lib/icons/folder.svg.js +0 -31
- package/lib/icons/fullscreen.svg.js +0 -28
- package/lib/icons/function.svg.js +0 -28
- package/lib/icons/home.svg.js +0 -28
- package/lib/icons/if.svg.js +0 -28
- package/lib/icons/image.svg.js +0 -27
- package/lib/icons/info-circle.svg.js +0 -28
- package/lib/icons/info.svg.js +0 -34
- package/lib/icons/input-clear.svg.js +0 -27
- package/lib/icons/invisible.svg.js +0 -29
- package/lib/icons/left-arrow.svg.js +0 -30
- package/lib/icons/loading-outline.svg.js +0 -28
- package/lib/icons/location.svg.js +0 -27
- package/lib/icons/menu.svg.js +0 -27
- package/lib/icons/minus.svg.js +0 -28
- package/lib/icons/move.svg.js +0 -29
- package/lib/icons/mute.svg.js +0 -28
- package/lib/icons/new-edit.svg.js +0 -29
- package/lib/icons/pause.svg.js +0 -28
- package/lib/icons/pencil.svg.js +0 -28
- package/lib/icons/play.svg.js +0 -27
- package/lib/icons/plus-cicle.svg.js +0 -27
- package/lib/icons/plus-fine.svg.js +0 -28
- package/lib/icons/plus.svg.js +0 -28
- package/lib/icons/post.svg.js +0 -55
- package/lib/icons/question-mark.svg.js +0 -33
- package/lib/icons/question.svg.js +0 -28
- package/lib/icons/redo.svg.js +0 -28
- package/lib/icons/refresh.svg.js +0 -28
- package/lib/icons/reload.svg.js +0 -28
- package/lib/icons/remove.svg.js +0 -28
- package/lib/icons/retry.svg.js +0 -31
- package/lib/icons/right-arrow-bold.svg.js +0 -28
- package/lib/icons/right-arrow.svg.js +0 -30
- package/lib/icons/right-double-arrow.svg.js +0 -29
- package/lib/icons/role.svg.js +0 -50
- package/lib/icons/rotate-left.svg.js +0 -29
- package/lib/icons/rotate-right.svg.js +0 -29
- package/lib/icons/rotate-screen.svg.js +0 -28
- package/lib/icons/scale-origin.svg.js +0 -31
- package/lib/icons/schedule.svg.js +0 -31
- package/lib/icons/search.svg.js +0 -28
- package/lib/icons/setting.svg.js +0 -28
- package/lib/icons/slider-handle-icon.svg.js +0 -29
- package/lib/icons/sort-asc.svg.js +0 -28
- package/lib/icons/sort-default.svg.js +0 -28
- package/lib/icons/sort-desc.svg.js +0 -28
- package/lib/icons/star.svg.js +0 -28
- package/lib/icons/status-close.svg.js +0 -30
- package/lib/icons/steps-finsh.svg.js +0 -29
- package/lib/icons/sub-plus.svg.js +0 -27
- package/lib/icons/success.svg.js +0 -36
- package/lib/icons/transparent.svg.js +0 -45
- package/lib/icons/trash.svg.js +0 -29
- package/lib/icons/tree-down.svg.js +0 -28
- package/lib/icons/undo-normal.svg.js +0 -32
- package/lib/icons/undo.svg.js +0 -28
- package/lib/icons/unfullscreen.svg.js +0 -28
- package/lib/icons/upload.svg.js +0 -28
- package/lib/icons/user-remove.svg.js +0 -40
- package/lib/icons/view.svg.js +0 -29
- package/lib/icons/volume.svg.js +0 -31
- package/lib/icons/warning-mark.svg.js +0 -29
- package/lib/icons/warning.svg.js +0 -28
- package/lib/icons/window-restore.svg.js +0 -28
- package/lib/icons/zoom-in.svg.js +0 -28
- package/lib/icons/zoom-out.svg.js +0 -28
- package/lib/index.d.ts +0 -15
- package/lib/index.js +0 -344
- package/lib/locale/de-DE.d.ts +0 -1
- package/lib/locale/de-DE.js +0 -421
- package/lib/locale/en-US.d.ts +0 -1
- package/lib/locale/en-US.js +0 -427
- package/lib/locale/zh-CN.d.ts +0 -1
- package/lib/locale/zh-CN.js +0 -436
- package/lib/scss/helper.scss.js +0 -12
- package/lib/scss/themes/ang.scss.js +0 -12
- package/lib/scss/themes/antd.scss.js +0 -12
- package/lib/scss/themes/cxd.scss.js +0 -12
- package/lib/scss/themes/dark.scss.js +0 -12
- package/lib/scss/themes/default.scss.js +0 -12
- package/lib/themes/ang.css +0 -46140
- package/lib/themes/ang.d.ts +0 -3
- package/lib/themes/ang.js +0 -20
- package/lib/themes/antd.css +0 -46127
- package/lib/themes/antd.d.ts +0 -1
- package/lib/themes/antd.js +0 -44
- package/lib/themes/cxd.css +0 -46116
- package/lib/themes/cxd.d.ts +0 -3
- package/lib/themes/cxd.js +0 -459
- package/lib/themes/dark.css +0 -46147
- package/lib/themes/dark.d.ts +0 -3
- package/lib/themes/dark.js +0 -28
- package/lib/themes/default.css +0 -46116
- package/lib/themes/default.d.ts +0 -4
- package/lib/utils/index.d.ts +0 -2
- package/lib/utils/smoothSignature.d.ts +0 -86
- package/lib/utils/vectorComputed.d.ts +0 -20
- package/lib/utils/vectorComputed.js +0 -84
- package/lib/withRemoteConfig.d.ts +0 -2
- package/lib/withRemoteConfig.js +0 -14
- package/lib/withStore.d.ts +0 -2
- package/lib/withStore.js +0 -14
|
@@ -1,1081 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* amis-ui v6.13.0-beta.7
|
|
3
|
-
* Copyright 2018-2025 fex
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
|
-
|
|
10
|
-
var tslib = require('tslib');
|
|
11
|
-
var React = require('react');
|
|
12
|
-
var ReactDOM = require('react-dom');
|
|
13
|
-
var find = require('lodash/find');
|
|
14
|
-
var isEqual = require('lodash/isEqual');
|
|
15
|
-
var debounce = require('lodash/debounce');
|
|
16
|
-
var intersection = require('lodash/intersection');
|
|
17
|
-
var Sortable = require('sortablejs');
|
|
18
|
-
var amisCore = require('amis-core');
|
|
19
|
-
var Spinner = require('../Spinner.js');
|
|
20
|
-
var ItemActionsWrapper = require('./ItemActionsWrapper.js');
|
|
21
|
-
var Cell = require('./Cell.js');
|
|
22
|
-
var ColGroup = require('./ColGroup.js');
|
|
23
|
-
var Row = require('./Row.js');
|
|
24
|
-
var Head = require('./Head.js');
|
|
25
|
-
var SummaryRow = require('./SummaryRow.js');
|
|
26
|
-
var util = require('./util.js');
|
|
27
|
-
|
|
28
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
29
|
-
|
|
30
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
31
|
-
var find__default = /*#__PURE__*/_interopDefaultLegacy(find);
|
|
32
|
-
var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual);
|
|
33
|
-
var debounce__default = /*#__PURE__*/_interopDefaultLegacy(debounce);
|
|
34
|
-
var intersection__default = /*#__PURE__*/_interopDefaultLegacy(intersection);
|
|
35
|
-
var Sortable__default = /*#__PURE__*/_interopDefaultLegacy(Sortable);
|
|
36
|
-
|
|
37
|
-
var __react_jsx__ = require('react');
|
|
38
|
-
var _J$X_ = (__react_jsx__["default"] || __react_jsx__).createElement;
|
|
39
|
-
(__react_jsx__["default"] || __react_jsx__).Fragment;
|
|
40
|
-
var DefaultCellWidth = 40;
|
|
41
|
-
var Table = /** @class */ (function (_super) {
|
|
42
|
-
tslib.__extends(Table, _super);
|
|
43
|
-
function Table(props) {
|
|
44
|
-
var _this = _super.call(this, props) || this;
|
|
45
|
-
_this.tableDom = React__default["default"].createRef();
|
|
46
|
-
_this.tbodyDom = React__default["default"].createRef();
|
|
47
|
-
_this.contentDom = React__default["default"].createRef();
|
|
48
|
-
_this.headerDom = React__default["default"].createRef();
|
|
49
|
-
_this.footDom = React__default["default"].createRef();
|
|
50
|
-
_this.containerDom = React__default["default"].createRef();
|
|
51
|
-
_this.toDispose = [];
|
|
52
|
-
_this.updateTableInfoLazy = debounce__default["default"](_this.updateTableInfo.bind(_this), 250, {
|
|
53
|
-
trailing: true,
|
|
54
|
-
leading: false
|
|
55
|
-
});
|
|
56
|
-
_this.updateAutoFillHeightLazy = debounce__default["default"](_this.updateAutoFillHeight.bind(_this), 250, {
|
|
57
|
-
trailing: true,
|
|
58
|
-
leading: false
|
|
59
|
-
});
|
|
60
|
-
_this.state = {
|
|
61
|
-
selectedRowKeys: props.rowSelection
|
|
62
|
-
? props.rowSelection.selectedRowKeys.map(function (key) { return key; }) || []
|
|
63
|
-
: [],
|
|
64
|
-
expandedRowKeys: tslib.__spreadArray(tslib.__spreadArray([], tslib.__read((props.expandable ? props.expandable.expandedRowKeys || [] : [])), false), tslib.__read((props.expandable
|
|
65
|
-
? props.expandable.defaultExpandedRowKeys || []
|
|
66
|
-
: [])), false),
|
|
67
|
-
colWidths: {},
|
|
68
|
-
hoverRow: null
|
|
69
|
-
};
|
|
70
|
-
return _this;
|
|
71
|
-
}
|
|
72
|
-
Table.prototype.getPopOverContainer = function () {
|
|
73
|
-
return ReactDOM.findDOMNode(this);
|
|
74
|
-
};
|
|
75
|
-
Table.prototype.componentDidMount = function () {
|
|
76
|
-
var _this = this;
|
|
77
|
-
var _a, _b, _c, _d, _e;
|
|
78
|
-
(_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.onRef) === null || _b === void 0 ? void 0 : _b.call(_a, this);
|
|
79
|
-
if (this.props.loading) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
if ((_c = this.headerDom) === null || _c === void 0 ? void 0 : _c.current) {
|
|
83
|
-
// overflow设置为hidden的情况
|
|
84
|
-
var hiddenDomRefs = [this.headerDom, this.footDom];
|
|
85
|
-
hiddenDomRefs.forEach(function (ref) {
|
|
86
|
-
return ref &&
|
|
87
|
-
ref.current &&
|
|
88
|
-
ref.current.addEventListener('wheel', _this.onWheel.bind(_this));
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
var current = (_d = this.contentDom) === null || _d === void 0 ? void 0 : _d.current;
|
|
92
|
-
current && this.updateTableDom(current);
|
|
93
|
-
if (this.props.draggable && ((_e = this.tbodyDom) === null || _e === void 0 ? void 0 : _e.current)) {
|
|
94
|
-
this.initDragging();
|
|
95
|
-
}
|
|
96
|
-
this.updateStickyHeader();
|
|
97
|
-
var currentNode = ReactDOM.findDOMNode(this);
|
|
98
|
-
if (this.props.autoFillHeight) {
|
|
99
|
-
this.toDispose.push(amisCore.resizeSensor(currentNode.parentElement, this.updateAutoFillHeightLazy, false, 'height'));
|
|
100
|
-
this.updateAutoFillHeight();
|
|
101
|
-
}
|
|
102
|
-
this.toDispose.push(amisCore.resizeSensor(currentNode, this.updateTableInfoLazy, false, 'width'));
|
|
103
|
-
};
|
|
104
|
-
Table.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
105
|
-
var _a, _b, _c, _d;
|
|
106
|
-
if (prevProps.autoFillHeight !== this.props.autoFillHeight ||
|
|
107
|
-
(prevProps.loading !== this.props.loading && this.props.autoFillHeight)) {
|
|
108
|
-
this.updateAutoFillHeight();
|
|
109
|
-
}
|
|
110
|
-
// 选择项发生了变化触发
|
|
111
|
-
if (!isEqual__default["default"](prevState.selectedRowKeys, this.state.selectedRowKeys)) {
|
|
112
|
-
var rowSelectionKeyField = this.getRowSelectionKeyField();
|
|
113
|
-
var childrenColumnName = this.getChildrenColumnName();
|
|
114
|
-
// 更新保存的已选择行数据
|
|
115
|
-
var selectedResult = util.getRowsByKeys(this.props.dataSource, this.state.selectedRowKeys, rowSelectionKeyField, childrenColumnName);
|
|
116
|
-
var rowSelection = this.props.rowSelection;
|
|
117
|
-
rowSelection &&
|
|
118
|
-
rowSelection.onChange &&
|
|
119
|
-
rowSelection.onChange(this.state.selectedRowKeys, selectedResult.selectedRows);
|
|
120
|
-
}
|
|
121
|
-
// 外部传入的选择项发生了变化
|
|
122
|
-
if (!isEqual__default["default"]((_a = prevProps.rowSelection) === null || _a === void 0 ? void 0 : _a.selectedRowKeys, (_b = this.props.rowSelection) === null || _b === void 0 ? void 0 : _b.selectedRowKeys)) {
|
|
123
|
-
if (this.props.rowSelection) {
|
|
124
|
-
this.setState({
|
|
125
|
-
selectedRowKeys: this.props.rowSelection.selectedRowKeys
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
// 外部传入的展开项发生了变化
|
|
130
|
-
if (!isEqual__default["default"]((_c = prevProps === null || prevProps === void 0 ? void 0 : prevProps.expandable) === null || _c === void 0 ? void 0 : _c.expandedRowKeys, (_d = this.props.expandable) === null || _d === void 0 ? void 0 : _d.expandedRowKeys)) {
|
|
131
|
-
if (this.props.expandable) {
|
|
132
|
-
this.setState({
|
|
133
|
-
expandedRowKeys: this.props.expandable.expandedRowKeys || []
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
// 展开行变化时触发
|
|
138
|
-
if (!isEqual__default["default"](prevState.expandedRowKeys, this.state.expandedRowKeys)) {
|
|
139
|
-
if (this.props.expandable) {
|
|
140
|
-
var childrenColumnName = this.getChildrenColumnName();
|
|
141
|
-
var expandableKeyField = this.getExpandableKeyField();
|
|
142
|
-
var onExpandedRowsChange = this.props.expandable.onExpandedRowsChange;
|
|
143
|
-
var expandedResult = util.getRowsByKeys(this.props.dataSource, this.state.selectedRowKeys, expandableKeyField, childrenColumnName);
|
|
144
|
-
onExpandedRowsChange &&
|
|
145
|
-
onExpandedRowsChange(expandedResult.selectedRows);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
// sticky属性发生了变化
|
|
149
|
-
if (prevProps.sticky !== this.props.sticky) {
|
|
150
|
-
this.updateStickyHeader();
|
|
151
|
-
}
|
|
152
|
-
if (prevProps.columns !== this.props.columns) {
|
|
153
|
-
this.syncTableWidth();
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
Table.prototype.componentWillUnmount = function () {
|
|
157
|
-
var _this = this;
|
|
158
|
-
var hiddenDomRefs = [this.headerDom, this.footDom];
|
|
159
|
-
hiddenDomRefs.forEach(function (ref) {
|
|
160
|
-
return ref &&
|
|
161
|
-
ref.current &&
|
|
162
|
-
ref.current.removeEventListener('wheel', _this.onWheel.bind(_this));
|
|
163
|
-
});
|
|
164
|
-
this.destroyDragging();
|
|
165
|
-
this.toDispose.forEach(function (fn) { return fn(); });
|
|
166
|
-
this.toDispose = [];
|
|
167
|
-
this.updateTableInfoLazy.cancel();
|
|
168
|
-
this.updateAutoFillHeightLazy.cancel();
|
|
169
|
-
};
|
|
170
|
-
/**
|
|
171
|
-
* 自动设置表格高度占满界面剩余区域
|
|
172
|
-
* 用 css 实现有点麻烦,要改很多结构,所以先用 dom hack 了,避免对之前的功能有影响
|
|
173
|
-
*/
|
|
174
|
-
Table.prototype.updateAutoFillHeight = function () {
|
|
175
|
-
var tableContent = this.containerDom.current;
|
|
176
|
-
if (!tableContent) {
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
tableContent.removeAttribute('style');
|
|
180
|
-
var autoFillHeight = this.props.autoFillHeight;
|
|
181
|
-
if (!autoFillHeight) {
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
// 计算 table-content 在 dom 中的位置
|
|
185
|
-
var viewportHeight = window.innerHeight;
|
|
186
|
-
var tableContentTop = amisCore.offset(tableContent).top;
|
|
187
|
-
var parent = amisCore.getScrollParent(tableContent.parentElement);
|
|
188
|
-
if (parent && parent !== document.body) {
|
|
189
|
-
viewportHeight = parent.clientHeight - 1;
|
|
190
|
-
tableContentTop = amisCore.position(tableContent, parent).top;
|
|
191
|
-
}
|
|
192
|
-
var tableContentBottom = 0;
|
|
193
|
-
var selfNode = tableContent;
|
|
194
|
-
var parentNode = selfNode.parentElement;
|
|
195
|
-
while (parentNode) {
|
|
196
|
-
var paddingBottom = amisCore.getStyleNumber(parentNode, 'padding-bottom');
|
|
197
|
-
var borderBottom = amisCore.getStyleNumber(parentNode, 'border-bottom-width');
|
|
198
|
-
var nextSiblingHeight = 0;
|
|
199
|
-
var nextSibling = selfNode.nextElementSibling;
|
|
200
|
-
while (nextSibling) {
|
|
201
|
-
var positon = getComputedStyle(nextSibling).position;
|
|
202
|
-
if (positon !== 'absolute' && positon !== 'fixed') {
|
|
203
|
-
nextSiblingHeight +=
|
|
204
|
-
nextSibling.offsetHeight +
|
|
205
|
-
amisCore.getStyleNumber(nextSibling, 'margin-bottom');
|
|
206
|
-
}
|
|
207
|
-
nextSibling = nextSibling.nextElementSibling;
|
|
208
|
-
}
|
|
209
|
-
var marginBottom = amisCore.getStyleNumber(selfNode, 'margin-bottom');
|
|
210
|
-
tableContentBottom +=
|
|
211
|
-
paddingBottom + borderBottom + marginBottom + nextSiblingHeight;
|
|
212
|
-
selfNode = parentNode;
|
|
213
|
-
parentNode = selfNode.parentElement;
|
|
214
|
-
if (parent && parent !== document.body && parent === selfNode) {
|
|
215
|
-
break;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
var heightField = autoFillHeight && autoFillHeight.maxHeight
|
|
219
|
-
? 'maxHeight'
|
|
220
|
-
: 'height';
|
|
221
|
-
var heightValue = amisCore.isObject(autoFillHeight)
|
|
222
|
-
? autoFillHeight[heightField]
|
|
223
|
-
: 0;
|
|
224
|
-
var tableContentHeight = heightValue
|
|
225
|
-
? heightValue
|
|
226
|
-
: Math.round(viewportHeight - tableContentTop - tableContentBottom);
|
|
227
|
-
if (tableContentHeight > 0) {
|
|
228
|
-
tableContent.style[heightField] = "".concat(tableContentHeight, "px");
|
|
229
|
-
tableContent.style['overflow'] = 'auto';
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
|
-
Table.prototype.initDragging = function () {
|
|
233
|
-
var _this = this;
|
|
234
|
-
var _a;
|
|
235
|
-
var _b = this.props, cx = _b.classnames, onDrag = _b.onDrag;
|
|
236
|
-
this.sortable = new Sortable__default["default"]((_a = this.tbodyDom) === null || _a === void 0 ? void 0 : _a.current, {
|
|
237
|
-
group: 'table',
|
|
238
|
-
animation: 150,
|
|
239
|
-
handle: ".".concat(cx('Table-dragCell')),
|
|
240
|
-
ghostClass: 'is-dragging',
|
|
241
|
-
onMove: function (e) {
|
|
242
|
-
var dragged = e.dragged;
|
|
243
|
-
var related = e.related;
|
|
244
|
-
if (related &&
|
|
245
|
-
related.classList.contains("".concat(cx('Table-summary-row')))) {
|
|
246
|
-
return false;
|
|
247
|
-
}
|
|
248
|
-
var draggedLevels = dragged.getAttribute('row-levels');
|
|
249
|
-
var relatedLevels = related.getAttribute('row-levels');
|
|
250
|
-
// 嵌套展示 不属于同一层的 不允许拖动
|
|
251
|
-
// 否则涉及到试图的更新,比如子元素都被拖完了
|
|
252
|
-
if (draggedLevels !== relatedLevels) {
|
|
253
|
-
return false;
|
|
254
|
-
}
|
|
255
|
-
return true;
|
|
256
|
-
},
|
|
257
|
-
onEnd: function (e) { return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
258
|
-
var oldIndex, newIndex, rowLevels, i;
|
|
259
|
-
return tslib.__generator(this, function (_a) {
|
|
260
|
-
// 没有移动
|
|
261
|
-
if (e.newIndex === e.oldIndex) {
|
|
262
|
-
return [2 /*return*/];
|
|
263
|
-
}
|
|
264
|
-
oldIndex = e.oldIndex;
|
|
265
|
-
newIndex = e.newIndex;
|
|
266
|
-
rowLevels = util.levelsSplit(e.item.getAttribute('row-levels'));
|
|
267
|
-
if (rowLevels.length) {
|
|
268
|
-
i = 0;
|
|
269
|
-
while (i < rowLevels.length) {
|
|
270
|
-
oldIndex = oldIndex - rowLevels[i] - 1;
|
|
271
|
-
newIndex = newIndex - rowLevels[i] - 1;
|
|
272
|
-
i++;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
onDrag && onDrag(oldIndex, newIndex, rowLevels);
|
|
276
|
-
return [2 /*return*/];
|
|
277
|
-
});
|
|
278
|
-
}); }
|
|
279
|
-
});
|
|
280
|
-
};
|
|
281
|
-
Table.prototype.destroyDragging = function () {
|
|
282
|
-
this.sortable && this.sortable.destroy();
|
|
283
|
-
this.sortable = null;
|
|
284
|
-
};
|
|
285
|
-
Table.prototype.updateStickyHeader = function () {
|
|
286
|
-
var _this = this;
|
|
287
|
-
var _a, _b;
|
|
288
|
-
if (this.props.sticky) {
|
|
289
|
-
// 如果设置了sticky 如果父元素设置了overflow: auto top值还需要考虑padding值
|
|
290
|
-
var parent_1 = (_b = (_a = this.headerDom) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.parentElement;
|
|
291
|
-
setTimeout(function () {
|
|
292
|
-
while (parent_1 &&
|
|
293
|
-
window.getComputedStyle(parent_1, null).getPropertyValue('overflow') !==
|
|
294
|
-
'auto') {
|
|
295
|
-
parent_1 = parent_1.parentElement;
|
|
296
|
-
}
|
|
297
|
-
if (parent_1 &&
|
|
298
|
-
window.getComputedStyle(parent_1, null).getPropertyValue('overflow') ===
|
|
299
|
-
'auto') {
|
|
300
|
-
var paddingTop = window
|
|
301
|
-
.getComputedStyle(parent_1, null)
|
|
302
|
-
.getPropertyValue('padding-top');
|
|
303
|
-
if (paddingTop && _this.headerDom && _this.headerDom.current) {
|
|
304
|
-
_this.headerDom.current.style.top = '-' + paddingTop;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
};
|
|
310
|
-
Table.prototype.renderColGroup = function (showReal) {
|
|
311
|
-
var _a = this.props, scroll = _a.scroll, tableLayout = _a.tableLayout, columns = _a.columns, rowSelection = _a.rowSelection, expandable = _a.expandable, draggable = _a.draggable;
|
|
312
|
-
var isFixed = !!((scroll && scroll.x) || tableLayout === 'fixed');
|
|
313
|
-
return (_J$X_(ColGroup["default"], { columns: columns, colWidths: this.state.colWidths, isFixed: isFixed, syncTableWidth: this.syncTableWidth, initTableWidth: this.initTableWidth, selectable: !!rowSelection, expandable: !!expandable, draggable: !!draggable, rowSelectionColumnWidth: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.columnWidth) || DefaultCellWidth, expandableColumnWidth: (expandable === null || expandable === void 0 ? void 0 : expandable.columnWidth) || DefaultCellWidth, isRightExpandable: this.isRightExpandable(), isLeftExpandable: this.isLeftExpandable(), showReal: showReal }));
|
|
314
|
-
};
|
|
315
|
-
Table.prototype.onResizeMouseDown = function (event, index) {
|
|
316
|
-
// 点击记录起始坐标
|
|
317
|
-
this.resizeStart = event.clientX;
|
|
318
|
-
this.resizeTarget = event.currentTarget;
|
|
319
|
-
var column = this.tdColumns[index];
|
|
320
|
-
this.resizeIndex = index;
|
|
321
|
-
var colWidth = this.state.colWidths[column.name];
|
|
322
|
-
this.resizeWidth = colWidth.width || colWidth.realWidth;
|
|
323
|
-
this.resizeTarget.classList.add('is-resizing');
|
|
324
|
-
document.addEventListener('mousemove', this.onResizeMouseMove);
|
|
325
|
-
document.addEventListener('mouseup', this.onResizeMouseUp);
|
|
326
|
-
event && event.stopPropagation();
|
|
327
|
-
};
|
|
328
|
-
Table.prototype.onResizeMouseMove = function (event) {
|
|
329
|
-
// 点击了调整列宽
|
|
330
|
-
if (this.resizeTarget) {
|
|
331
|
-
// 计算横向移动距离
|
|
332
|
-
var distance = event.clientX - this.resizeStart;
|
|
333
|
-
var column = this.tdColumns[this.resizeIndex];
|
|
334
|
-
var newWidth = 0;
|
|
335
|
-
if (distance > 0) {
|
|
336
|
-
newWidth = this.resizeWidth + distance;
|
|
337
|
-
}
|
|
338
|
-
else {
|
|
339
|
-
// 缩短列
|
|
340
|
-
newWidth = Math.max(this.resizeWidth + distance, DefaultCellWidth, column.minWidth || 0);
|
|
341
|
-
}
|
|
342
|
-
var colWidths = this.state.colWidths;
|
|
343
|
-
colWidths[column.name].width = newWidth;
|
|
344
|
-
this.setState({ colWidths: tslib.__assign({}, colWidths) });
|
|
345
|
-
}
|
|
346
|
-
event && event.stopPropagation();
|
|
347
|
-
};
|
|
348
|
-
Table.prototype.onResizeMouseUp = function (event) {
|
|
349
|
-
this.resizeTarget.classList.remove('is-resizing');
|
|
350
|
-
document.removeEventListener('mousemove', this.onResizeMouseMove);
|
|
351
|
-
document.removeEventListener('mouseup', this.onResizeMouseUp);
|
|
352
|
-
this.resizeStart = -1;
|
|
353
|
-
this.resizeWidth = 0;
|
|
354
|
-
delete this.resizeTarget;
|
|
355
|
-
};
|
|
356
|
-
Table.prototype.renderHead = function () {
|
|
357
|
-
var _this = this;
|
|
358
|
-
var _a;
|
|
359
|
-
var _b = this.props, columns = _b.columns, cx = _b.classnames, classPrefix = _b.classPrefix, expandable = _b.expandable, rowSelection = _b.rowSelection, draggable = _b.draggable, resizable = _b.resizable, dataSource = _b.dataSource, onSort = _b.onSort, onSelectAll = _b.onSelectAll, onFilter = _b.onFilter, testIdBuilder = _b.testIdBuilder, headerClassName = _b.headerClassName, sticky = _b.sticky, autoFillHeight = _b.autoFillHeight, scroll = _b.scroll;
|
|
360
|
-
var rowSelectionKeyField = this.getRowSelectionKeyField();
|
|
361
|
-
var dataList = rowSelection && rowSelection.getCheckboxProps
|
|
362
|
-
? amisCore.filterTree(dataSource, function (data, index, level) {
|
|
363
|
-
var props = rowSelection.getCheckboxProps(data, index);
|
|
364
|
-
return !props.disabled;
|
|
365
|
-
})
|
|
366
|
-
: dataSource;
|
|
367
|
-
var hasScrollY = scroll && scroll.y;
|
|
368
|
-
var selfSticky = !!(hasScrollY || (sticky && autoFillHeight));
|
|
369
|
-
return (_J$X_(Head["default"], { key: "thead", selfSticky: selfSticky, columns: columns, draggable: !!draggable, selectable: !!rowSelection, rowSelectionFixed: !!(rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.fixed), rowSelectionType: rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.type, selections: rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selections, rowSelectionKeyField: rowSelectionKeyField, maxSelectedLength: rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.maxSelectedLength, isExpandable: this.isExpandableTable(), isRightExpandable: this.isRightExpandable(), isLeftExpandable: this.isLeftExpandable(), selectedRowKeys: this.state.selectedRowKeys, dataSource: dataList, resizable: resizable, expandable: !!expandable, expandableFixed: expandable === null || expandable === void 0 ? void 0 : expandable.fixed, childrenColumnName: this.getChildrenColumnName(), orderBy: (_a = this.state.sort) === null || _a === void 0 ? void 0 : _a.orderBy, popOverContainer: this.getPopOverContainer, classnames: cx, className: headerClassName, classPrefix: classPrefix, onSort: function (payload, column) {
|
|
370
|
-
_this.setState({
|
|
371
|
-
sort: payload
|
|
372
|
-
});
|
|
373
|
-
onSort && onSort(payload);
|
|
374
|
-
}, onSelectAll: function (value, selectedRowKeys, selectedRows, restSelectedKeys) { return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
375
|
-
var prevented, keys;
|
|
376
|
-
return tslib.__generator(this, function (_a) {
|
|
377
|
-
switch (_a.label) {
|
|
378
|
-
case 0:
|
|
379
|
-
if (!onSelectAll) return [3 /*break*/, 2];
|
|
380
|
-
return [4 /*yield*/, onSelectAll(selectedRows, value ? selectedRowKeys : [], value ? [] : selectedRows)];
|
|
381
|
-
case 1:
|
|
382
|
-
prevented = _a.sent();
|
|
383
|
-
if (prevented) {
|
|
384
|
-
return [2 /*return*/];
|
|
385
|
-
}
|
|
386
|
-
_a.label = 2;
|
|
387
|
-
case 2:
|
|
388
|
-
keys = tslib.__spreadArray(tslib.__spreadArray([], tslib.__read(selectedRowKeys), false), tslib.__read(restSelectedKeys // 更新数据要把非当前页的数据也加上
|
|
389
|
-
), false);
|
|
390
|
-
if (!isEqual__default["default"](keys, this.state.selectedRowKeys)) {
|
|
391
|
-
this.setState({ selectedRowKeys: keys });
|
|
392
|
-
}
|
|
393
|
-
return [2 /*return*/];
|
|
394
|
-
}
|
|
395
|
-
});
|
|
396
|
-
}); }, onFilter: onFilter, onResizeMouseDown: this.onResizeMouseDown.bind(this), testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('head') }));
|
|
397
|
-
};
|
|
398
|
-
Table.prototype.onRowClick = function (event, record, rowIndex) {
|
|
399
|
-
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
400
|
-
var _a, rowSelection, onRow, prevented, defaultKey_1, isSelected;
|
|
401
|
-
return tslib.__generator(this, function (_b) {
|
|
402
|
-
switch (_b.label) {
|
|
403
|
-
case 0:
|
|
404
|
-
_a = this.props, rowSelection = _a.rowSelection, onRow = _a.onRow;
|
|
405
|
-
if (!(onRow && onRow.onRowClick)) return [3 /*break*/, 2];
|
|
406
|
-
return [4 /*yield*/, onRow.onRowClick(event, record, rowIndex)];
|
|
407
|
-
case 1:
|
|
408
|
-
prevented = _b.sent();
|
|
409
|
-
if (prevented) {
|
|
410
|
-
return [2 /*return*/];
|
|
411
|
-
}
|
|
412
|
-
_b.label = 2;
|
|
413
|
-
case 2:
|
|
414
|
-
if (rowSelection && rowSelection.type && rowSelection.rowClick) {
|
|
415
|
-
defaultKey_1 = this.getRowSelectionKeyField();
|
|
416
|
-
isSelected = !!find__default["default"](this.state.selectedRowKeys, function (key) { return key === record[defaultKey_1]; });
|
|
417
|
-
this.selectedSingleRow(!isSelected, record);
|
|
418
|
-
}
|
|
419
|
-
return [2 /*return*/];
|
|
420
|
-
}
|
|
421
|
-
});
|
|
422
|
-
});
|
|
423
|
-
};
|
|
424
|
-
Table.prototype.onRowDbClick = function (event, record, rowIndex) {
|
|
425
|
-
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
426
|
-
var onRow, prevented;
|
|
427
|
-
return tslib.__generator(this, function (_a) {
|
|
428
|
-
switch (_a.label) {
|
|
429
|
-
case 0:
|
|
430
|
-
onRow = this.props.onRow;
|
|
431
|
-
if (!(onRow && onRow.onRowDbClick)) return [3 /*break*/, 2];
|
|
432
|
-
return [4 /*yield*/, onRow.onRowDbClick(event, record, rowIndex)];
|
|
433
|
-
case 1:
|
|
434
|
-
prevented = _a.sent();
|
|
435
|
-
if (prevented === false) {
|
|
436
|
-
return [2 /*return*/];
|
|
437
|
-
}
|
|
438
|
-
_a.label = 2;
|
|
439
|
-
case 2: return [2 /*return*/];
|
|
440
|
-
}
|
|
441
|
-
});
|
|
442
|
-
});
|
|
443
|
-
};
|
|
444
|
-
Table.prototype.onRowMouseEnter = function (event, record, rowIndex) {
|
|
445
|
-
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
446
|
-
var _a, onRow, itemActions, prevented, target;
|
|
447
|
-
return tslib.__generator(this, function (_b) {
|
|
448
|
-
switch (_b.label) {
|
|
449
|
-
case 0:
|
|
450
|
-
_a = this.props, onRow = _a.onRow, itemActions = _a.itemActions;
|
|
451
|
-
if (!(onRow && onRow.onRowMouseEnter)) return [3 /*break*/, 2];
|
|
452
|
-
return [4 /*yield*/, onRow.onRowMouseEnter(event, record, rowIndex)];
|
|
453
|
-
case 1:
|
|
454
|
-
prevented = _b.sent();
|
|
455
|
-
if (prevented) {
|
|
456
|
-
return [2 /*return*/];
|
|
457
|
-
}
|
|
458
|
-
_b.label = 2;
|
|
459
|
-
case 2:
|
|
460
|
-
if (record && itemActions) {
|
|
461
|
-
target = event.target;
|
|
462
|
-
if ((target === null || target === void 0 ? void 0 : target.tagName) !== 'TR') {
|
|
463
|
-
target = target === null || target === void 0 ? void 0 : target.closest('tr');
|
|
464
|
-
}
|
|
465
|
-
this.setState({ hoverRow: { target: target, rowIndex: rowIndex, record: record } });
|
|
466
|
-
}
|
|
467
|
-
return [2 /*return*/];
|
|
468
|
-
}
|
|
469
|
-
});
|
|
470
|
-
});
|
|
471
|
-
};
|
|
472
|
-
Table.prototype.onRowMouseLeave = function (event, record, rowIndex) {
|
|
473
|
-
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
474
|
-
var onRow;
|
|
475
|
-
return tslib.__generator(this, function (_a) {
|
|
476
|
-
onRow = this.props.onRow;
|
|
477
|
-
onRow &&
|
|
478
|
-
onRow.onRowMouseLeave &&
|
|
479
|
-
onRow.onRowMouseLeave(event, record, rowIndex);
|
|
480
|
-
return [2 /*return*/];
|
|
481
|
-
});
|
|
482
|
-
});
|
|
483
|
-
};
|
|
484
|
-
Table.prototype.onMouseLeave = function () {
|
|
485
|
-
var itemActions = this.props.itemActions;
|
|
486
|
-
itemActions && this.setState({ hoverRow: null });
|
|
487
|
-
};
|
|
488
|
-
Table.prototype.onExpandRows = function (data) {
|
|
489
|
-
var _this = this;
|
|
490
|
-
var expandedRowKeys = this.state.expandedRowKeys;
|
|
491
|
-
var expandable = this.props.expandable;
|
|
492
|
-
var keys = data.map(function (d) { return d[_this.getExpandableKeyField()]; });
|
|
493
|
-
this.setState({ expandedRowKeys: tslib.__spreadArray(tslib.__spreadArray([], tslib.__read(expandedRowKeys), false), tslib.__read(keys), false) });
|
|
494
|
-
(expandable === null || expandable === void 0 ? void 0 : expandable.onExpand) && (expandable === null || expandable === void 0 ? void 0 : expandable.onExpand(true, data));
|
|
495
|
-
};
|
|
496
|
-
Table.prototype.onCollapseRows = function (data) {
|
|
497
|
-
var _this = this;
|
|
498
|
-
var expandedRowKeys = this.state.expandedRowKeys;
|
|
499
|
-
var expandable = this.props.expandable;
|
|
500
|
-
var keys = data.map(function (d) { return d[_this.getExpandableKeyField()]; });
|
|
501
|
-
this.setState({
|
|
502
|
-
expandedRowKeys: expandedRowKeys.filter(function (k) { return !keys.find(function (v) { return v == k; }); } // 模糊匹配 否则'3'、3匹配不上
|
|
503
|
-
)
|
|
504
|
-
});
|
|
505
|
-
(expandable === null || expandable === void 0 ? void 0 : expandable.onExpand) && (expandable === null || expandable === void 0 ? void 0 : expandable.onExpand(true, data));
|
|
506
|
-
};
|
|
507
|
-
Table.prototype.getChildrenColumnName = function () {
|
|
508
|
-
var childrenColumnName = this.props.childrenColumnName;
|
|
509
|
-
return childrenColumnName || 'children';
|
|
510
|
-
};
|
|
511
|
-
Table.prototype.getRowSelectionKeyField = function () {
|
|
512
|
-
var _a = this.props, rowSelection = _a.rowSelection, keyField = _a.keyField;
|
|
513
|
-
return (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.keyField) || keyField || 'key';
|
|
514
|
-
};
|
|
515
|
-
Table.prototype.getExpandableKeyField = function () {
|
|
516
|
-
var _a = this.props, expandable = _a.expandable, keyField = _a.keyField;
|
|
517
|
-
return (expandable === null || expandable === void 0 ? void 0 : expandable.keyField) || keyField || 'key';
|
|
518
|
-
};
|
|
519
|
-
Table.prototype.hasCheckedChildrenRows = function (data) {
|
|
520
|
-
var selectedRowKeys = this.state.selectedRowKeys;
|
|
521
|
-
var childrenColumnName = this.getChildrenColumnName();
|
|
522
|
-
var rowSelectionKeyField = this.getRowSelectionKeyField();
|
|
523
|
-
var childrenKeys = util.getDataChildrenKeys(data, childrenColumnName, rowSelectionKeyField);
|
|
524
|
-
var length = intersection__default["default"](selectedRowKeys, childrenKeys).length;
|
|
525
|
-
return length > 0;
|
|
526
|
-
};
|
|
527
|
-
Table.prototype.getSelectedRowKeys = function (isSelected, data) {
|
|
528
|
-
var rowSelection = this.props.rowSelection;
|
|
529
|
-
var rowSelectionKeyField = this.getRowSelectionKeyField();
|
|
530
|
-
var childrenColumnName = this.getChildrenColumnName();
|
|
531
|
-
var isRadio = rowSelection && rowSelection.type === 'radio';
|
|
532
|
-
var selected = [];
|
|
533
|
-
if (isSelected) {
|
|
534
|
-
if (isRadio) {
|
|
535
|
-
selected = [data[rowSelectionKeyField]];
|
|
536
|
-
}
|
|
537
|
-
else {
|
|
538
|
-
selected = tslib.__spreadArray(tslib.__spreadArray(tslib.__spreadArray([], tslib.__read(this.state.selectedRowKeys), false), [
|
|
539
|
-
data[rowSelectionKeyField]
|
|
540
|
-
], false), tslib.__read(util.getDataChildrenKeys(data, childrenColumnName, rowSelectionKeyField)), false).filter(function (key, i, a) { return a.indexOf(key) === i; });
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
else {
|
|
544
|
-
if (!isRadio) {
|
|
545
|
-
selected = this.state.selectedRowKeys.filter(function (key) {
|
|
546
|
-
return !tslib.__spreadArray([
|
|
547
|
-
data[rowSelectionKeyField]
|
|
548
|
-
], tslib.__read(util.getDataChildrenKeys(data, childrenColumnName, rowSelectionKeyField)), false).includes(key);
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
return selected;
|
|
553
|
-
};
|
|
554
|
-
Table.prototype.selectedSingleRow = function (value, data) {
|
|
555
|
-
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
556
|
-
var _a, onSelect, dataSource, selectedRowKeys, rowSelectionKeyField, childrenColumnName, selectedResult, prevented;
|
|
557
|
-
return tslib.__generator(this, function (_b) {
|
|
558
|
-
switch (_b.label) {
|
|
559
|
-
case 0:
|
|
560
|
-
_a = this.props, onSelect = _a.onSelect, dataSource = _a.dataSource;
|
|
561
|
-
selectedRowKeys = this.getSelectedRowKeys(value, data);
|
|
562
|
-
if (!onSelect) return [3 /*break*/, 2];
|
|
563
|
-
rowSelectionKeyField = this.getRowSelectionKeyField();
|
|
564
|
-
childrenColumnName = this.getChildrenColumnName();
|
|
565
|
-
selectedResult = util.getRowsByKeys(dataSource, selectedRowKeys, rowSelectionKeyField, childrenColumnName);
|
|
566
|
-
return [4 /*yield*/, onSelect(selectedResult.selectedRows, selectedRowKeys, selectedResult.unSelectedRows)];
|
|
567
|
-
case 1:
|
|
568
|
-
prevented = _b.sent();
|
|
569
|
-
if (prevented) {
|
|
570
|
-
return [2 /*return*/];
|
|
571
|
-
}
|
|
572
|
-
_b.label = 2;
|
|
573
|
-
case 2:
|
|
574
|
-
if (!isEqual__default["default"](this.state.selectedRowKeys, selectedRowKeys)) {
|
|
575
|
-
this.setState({ selectedRowKeys: selectedRowKeys });
|
|
576
|
-
}
|
|
577
|
-
return [2 /*return*/];
|
|
578
|
-
}
|
|
579
|
-
});
|
|
580
|
-
});
|
|
581
|
-
};
|
|
582
|
-
// 展开和嵌套不能共存
|
|
583
|
-
Table.prototype.isExpandableRow = function (data, rowIndex) {
|
|
584
|
-
var expandable = this.props.expandable;
|
|
585
|
-
return (expandable &&
|
|
586
|
-
(!expandable.rowExpandable ||
|
|
587
|
-
(expandable.rowExpandable && expandable.rowExpandable(data, rowIndex))));
|
|
588
|
-
};
|
|
589
|
-
Table.prototype.isExpanded = function (record) {
|
|
590
|
-
var expandableKeyField = this.getExpandableKeyField();
|
|
591
|
-
return !!find__default["default"](this.state.expandedRowKeys, function (key) { return key == record[expandableKeyField]; }); // == 匹配 否则'3'、3匹配不上
|
|
592
|
-
};
|
|
593
|
-
Table.prototype.renderRow = function (data, rowIndex, levels) {
|
|
594
|
-
var _this = this;
|
|
595
|
-
var _a = this.props, rowSelection = _a.rowSelection, expandable = _a.expandable, indentSize = _a.indentSize, lineHeight = _a.lineHeight, draggable = _a.draggable, rowClassName = _a.rowClassName, keyField = _a.keyField, columns = _a.columns, lazyRenderAfter = _a.lazyRenderAfter, classPrefix = _a.classPrefix, cx = _a.classnames, testIdBuilder = _a.testIdBuilder;
|
|
596
|
-
var rowSelectionKeyField = this.getRowSelectionKeyField();
|
|
597
|
-
var isChecked = !!find__default["default"](this.state.selectedRowKeys, function (key) { return key === data[rowSelectionKeyField]; });
|
|
598
|
-
var rowTIDBuilder = testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild("row-".concat(rowIndex));
|
|
599
|
-
var childrenColumnName = this.getChildrenColumnName();
|
|
600
|
-
// 当前行是否可展开
|
|
601
|
-
var isExpandableRow = this.isExpandableRow(data, rowIndex);
|
|
602
|
-
var hasChildrenRow = util.checkChildrenRow(data, childrenColumnName);
|
|
603
|
-
var hasChildrenChecked = !!rowSelection && hasChildrenRow && this.hasCheckedChildrenRows(data);
|
|
604
|
-
var expandedRowClassName = expandable &&
|
|
605
|
-
expandable.expandedRowClassName &&
|
|
606
|
-
typeof expandable.expandedRowClassName === 'function'
|
|
607
|
-
? expandable.expandedRowClassName(data, rowIndex)
|
|
608
|
-
: '';
|
|
609
|
-
var isExpanded = this.isExpanded(data);
|
|
610
|
-
var checkboxProps = rowSelection && rowSelection.getCheckboxProps
|
|
611
|
-
? rowSelection.getCheckboxProps(data, rowIndex)
|
|
612
|
-
: {};
|
|
613
|
-
var children = !expandable && childrenColumnName && hasChildrenRow && isExpanded
|
|
614
|
-
? data[childrenColumnName].map(function (item, index) {
|
|
615
|
-
return _this.renderRow(item, index, tslib.__spreadArray(tslib.__spreadArray([], tslib.__read(levels), false), [rowIndex], false));
|
|
616
|
-
})
|
|
617
|
-
: null;
|
|
618
|
-
return [
|
|
619
|
-
_J$X_(Row["default"], tslib.__assign({ key: "row-".concat(rowIndex), data: data, rowIndex: rowIndex, levels: levels.join(','), columns: columns, selectable: !!rowSelection, rowSelectionFixed: !!(rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.fixed), rowSelectionType: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.type) || 'checkbox', rowClickIgControl: !!(rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.rowClickIgControl), expandable: !!expandable, expandableFixed: expandable === null || expandable === void 0 ? void 0 : expandable.fixed, expandedRowClassName: expandedRowClassName, expandedRowRender: expandable === null || expandable === void 0 ? void 0 : expandable.expandedRowRender, isExpanded: isExpanded, hasChildrenRow: hasChildrenRow, hasChildrenChecked: hasChildrenChecked, indentSize: indentSize, lineHeight: lineHeight, draggable: !!draggable, isExpandable: this.isExpandableTable(), isExpandableRow: isExpandableRow, colCount: this.getExtraColumnCount(), isRightExpandable: this.isRightExpandable(), isLeftExpandable: this.isLeftExpandable(), isChecked: isChecked, rowClassName: rowClassName, onExpand: this.onExpandRows, onCollapse: this.onCollapseRows, onMouseEnter: this.onRowMouseEnter, onMouseLeave: this.onRowMouseLeave, onClick: this.onRowClick, onDoubleClick: this.onRowDbClick, onChange: this.onRowChange, childrenColumnName: this.getChildrenColumnName(), keyField: keyField, lazyRenderAfter: lazyRenderAfter, classnames: cx, classPrefix: classPrefix, testIdBuilder: rowTIDBuilder }, checkboxProps)),
|
|
620
|
-
children
|
|
621
|
-
];
|
|
622
|
-
};
|
|
623
|
-
Table.prototype.onRowChange = function (value, record) {
|
|
624
|
-
var rowSelection = this.props.rowSelection;
|
|
625
|
-
if (!(rowSelection && rowSelection.rowClick)) {
|
|
626
|
-
this.selectedSingleRow(value, record);
|
|
627
|
-
}
|
|
628
|
-
};
|
|
629
|
-
Table.prototype.renderBody = function () {
|
|
630
|
-
var _this = this;
|
|
631
|
-
var _a = this.props, cx = _a.classnames, headSummary = _a.headSummary, scroll = _a.scroll, placeholder = _a.placeholder, sticky = _a.sticky, loading = _a.loading, loadingConfig = _a.loadingConfig, classPrefix = _a.classPrefix;
|
|
632
|
-
var tdColumns = this.tdColumns;
|
|
633
|
-
var hasScrollY = scroll && scroll.y;
|
|
634
|
-
var colCount = this.getExtraColumnCount();
|
|
635
|
-
var childrenColumnName = this.getChildrenColumnName();
|
|
636
|
-
var dataSource = util.getSortData(this.props.dataSource, tdColumns, childrenColumnName, this.state.sort);
|
|
637
|
-
return (_J$X_("tbody", { ref: this.tbodyDom, className: cx('Table-tbody') },
|
|
638
|
-
!hasScrollY && !sticky && headSummary
|
|
639
|
-
? this.renderSummaryRow(headSummary)
|
|
640
|
-
: null,
|
|
641
|
-
!!loading ? (_J$X_("tr", { className: cx('Table-row', 'Table-loading-row') },
|
|
642
|
-
_J$X_(Cell["default"], { classnames: cx, classPrefix: classPrefix, colSpan: tdColumns.length + colCount },
|
|
643
|
-
_J$X_("div", { className: cx('Table-loading') }, typeof loading === 'boolean' ? (_J$X_(Spinner["default"], { overlay: true, show: loading, loadingConfig: loadingConfig })) : React__default["default"].isValidElement(loading) ? (loading) : null)))) : !dataSource.length ? (_J$X_("tr", { className: cx('Table-row', 'Table-empty-row') },
|
|
644
|
-
_J$X_(Cell["default"], { classnames: cx, classPrefix: classPrefix, colSpan: tdColumns.length + colCount },
|
|
645
|
-
_J$X_("div", { className: cx('Table-empty') }, typeof placeholder === 'function'
|
|
646
|
-
? placeholder()
|
|
647
|
-
: placeholder)))) : (dataSource.map(function (data, index) { return _this.renderRow(data, index, []); }))));
|
|
648
|
-
};
|
|
649
|
-
Table.prototype.isExpandableTable = function () {
|
|
650
|
-
var expandable = this.props.expandable;
|
|
651
|
-
// 设置了expandable 优先级更高
|
|
652
|
-
// 就不支持默认嵌套了
|
|
653
|
-
return !!expandable;
|
|
654
|
-
};
|
|
655
|
-
// 展开列放到右侧 会影响之前的一些合并的规则
|
|
656
|
-
Table.prototype.isRightExpandable = function () {
|
|
657
|
-
var expandable = this.props.expandable;
|
|
658
|
-
return expandable && expandable.position === 'right';
|
|
659
|
-
};
|
|
660
|
-
// 展开列放到左侧 还有一种情况是position为none 无展开按钮
|
|
661
|
-
Table.prototype.isLeftExpandable = function () {
|
|
662
|
-
var expandable = this.props.expandable;
|
|
663
|
-
return (expandable && (!expandable.position || expandable.position === 'left'));
|
|
664
|
-
};
|
|
665
|
-
// 计算自动增加的列数
|
|
666
|
-
// 选择、拖拽、展开
|
|
667
|
-
Table.prototype.getExtraColumnCount = function () {
|
|
668
|
-
var _a = this.props, draggable = _a.draggable, rowSelection = _a.rowSelection, expandable = _a.expandable;
|
|
669
|
-
var count = 0;
|
|
670
|
-
if (draggable) {
|
|
671
|
-
count++;
|
|
672
|
-
}
|
|
673
|
-
else {
|
|
674
|
-
if (this.isExpandableTable() && (expandable === null || expandable === void 0 ? void 0 : expandable.position) !== 'none') {
|
|
675
|
-
count++;
|
|
676
|
-
}
|
|
677
|
-
if (rowSelection) {
|
|
678
|
-
count++;
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
return count;
|
|
682
|
-
};
|
|
683
|
-
Table.prototype.renderSummaryRow = function (summary) {
|
|
684
|
-
var _a = this.props, cx = _a.classnames, classPrefix = _a.classPrefix, dataSource = _a.dataSource;
|
|
685
|
-
if (typeof summary === 'function') {
|
|
686
|
-
return summary(dataSource);
|
|
687
|
-
}
|
|
688
|
-
if (React__default["default"].isValidElement(summary)) {
|
|
689
|
-
return summary;
|
|
690
|
-
}
|
|
691
|
-
return (_J$X_(SummaryRow["default"], { summary: summary, colCount: this.getExtraColumnCount(), isRightExpandable: this.isRightExpandable(), classnames: cx, classPrefix: classPrefix, dataSource: dataSource, onMouseEnter: this.onRowMouseEnter, onMouseLeave: this.onRowMouseLeave }));
|
|
692
|
-
};
|
|
693
|
-
Table.prototype.renderFoot = function () {
|
|
694
|
-
var _a = this.props, cx = _a.classnames, footSummary = _a.footSummary;
|
|
695
|
-
return (_J$X_("tfoot", { className: cx('Table-summary') }, this.renderSummaryRow(footSummary)));
|
|
696
|
-
};
|
|
697
|
-
Table.prototype.updateTableDom = function (dom) {
|
|
698
|
-
var cx = this.props.classnames;
|
|
699
|
-
var scrollLeft = dom.scrollLeft, scrollWidth = dom.scrollWidth, offsetWidth = dom.offsetWidth;
|
|
700
|
-
var table = this.tableDom.current;
|
|
701
|
-
var leftCalss = cx('Table-ping-left');
|
|
702
|
-
if (scrollLeft > 0) {
|
|
703
|
-
table === null || table === void 0 ? void 0 : table.classList.add(leftCalss);
|
|
704
|
-
}
|
|
705
|
-
else {
|
|
706
|
-
table === null || table === void 0 ? void 0 : table.classList.remove(leftCalss);
|
|
707
|
-
}
|
|
708
|
-
var rightClass = cx('Table-ping-right');
|
|
709
|
-
if (scrollLeft + offsetWidth < scrollWidth) {
|
|
710
|
-
table === null || table === void 0 ? void 0 : table.classList.add(rightClass);
|
|
711
|
-
}
|
|
712
|
-
else {
|
|
713
|
-
table === null || table === void 0 ? void 0 : table.classList.remove(rightClass);
|
|
714
|
-
}
|
|
715
|
-
};
|
|
716
|
-
Table.prototype.onTableContentScroll = function (event) {
|
|
717
|
-
this.updateTableDom(event.target);
|
|
718
|
-
};
|
|
719
|
-
Table.prototype.onWheel = function (event) {
|
|
720
|
-
var _a = event, currentTarget = _a.currentTarget, deltaX = _a.deltaX;
|
|
721
|
-
if (deltaX) {
|
|
722
|
-
this.onTableScroll({
|
|
723
|
-
target: currentTarget,
|
|
724
|
-
scrollLeft: currentTarget.scrollLeft + deltaX
|
|
725
|
-
});
|
|
726
|
-
event.preventDefault();
|
|
727
|
-
}
|
|
728
|
-
};
|
|
729
|
-
Table.prototype.onTableScroll = function (event) {
|
|
730
|
-
var scrollDomRefs = [this.headerDom, this.contentDom, this.footDom];
|
|
731
|
-
var target = event.target, scrollLeft = event.scrollLeft;
|
|
732
|
-
scrollDomRefs.forEach(function (ref) {
|
|
733
|
-
var current = ref && ref.current;
|
|
734
|
-
if (current && current !== target) {
|
|
735
|
-
current.scrollLeft = scrollLeft || target.scrollLeft;
|
|
736
|
-
}
|
|
737
|
-
});
|
|
738
|
-
this.updateTableDom(target);
|
|
739
|
-
};
|
|
740
|
-
Table.prototype.renderTable = function () {
|
|
741
|
-
var _a = this.props, scroll = _a.scroll, footSummary = _a.footSummary, showHeader = _a.showHeader, itemActions = _a.itemActions, tableLayout = _a.tableLayout, cx = _a.classnames, bodyClassname = _a.bodyClassname;
|
|
742
|
-
var hasScrollX = scroll && scroll.x;
|
|
743
|
-
var hoverRow = this.state.hoverRow;
|
|
744
|
-
var tableStyle = hasScrollX
|
|
745
|
-
? { width: scroll.x + 'px', tableLayout: 'fixed' }
|
|
746
|
-
: {};
|
|
747
|
-
return (_J$X_("div", { ref: this.contentDom, className: cx('Table-content'), style: hasScrollX ? { overflow: 'auto hidden' } : {}, onMouseLeave: this.onMouseLeave, onScroll: this.onTableContentScroll.bind(this) },
|
|
748
|
-
itemActions && hoverRow ? (_J$X_(ItemActionsWrapper["default"], { dom: hoverRow.target, classnames: cx }, typeof itemActions === 'function'
|
|
749
|
-
? itemActions(hoverRow.record, hoverRow.rowIndex)
|
|
750
|
-
: null)) : null,
|
|
751
|
-
_J$X_("table", { style: tslib.__assign(tslib.__assign({}, tableStyle), { tableLayout: tableLayout === 'fixed' ? 'fixed' : 'auto' }), className: cx('Table-table', bodyClassname) },
|
|
752
|
-
this.renderColGroup(),
|
|
753
|
-
showHeader ? this.renderHead() : null,
|
|
754
|
-
this.renderBody(),
|
|
755
|
-
footSummary ? this.renderFoot() : null)));
|
|
756
|
-
};
|
|
757
|
-
Table.prototype.renderScrollTableHeader = function () {
|
|
758
|
-
var _a;
|
|
759
|
-
var _b = this.props, scroll = _b.scroll, headSummary = _b.headSummary, sticky = _b.sticky, showHeader = _b.showHeader, cx = _b.classnames, headerClassName = _b.headerClassName;
|
|
760
|
-
var style = { overflow: 'hidden' };
|
|
761
|
-
if (!!sticky) {
|
|
762
|
-
Object.assign(style, { top: 0 });
|
|
763
|
-
}
|
|
764
|
-
var tableStyle = {};
|
|
765
|
-
if (scroll && (scroll.y || scroll.x)) {
|
|
766
|
-
Object.assign(tableStyle, {
|
|
767
|
-
width: scroll && scroll.x
|
|
768
|
-
? typeof scroll.x === 'number'
|
|
769
|
-
? scroll.x + 'px'
|
|
770
|
-
: scroll.x
|
|
771
|
-
: '100%'
|
|
772
|
-
});
|
|
773
|
-
}
|
|
774
|
-
return (_J$X_("div", { ref: this.headerDom, className: cx('Table-header', (_a = {},
|
|
775
|
-
_a[cx('Table-sticky-holder')] = !!sticky,
|
|
776
|
-
_a), headerClassName), style: style },
|
|
777
|
-
_J$X_("table", { className: cx('Table-table'), style: tslib.__assign(tslib.__assign({}, tableStyle), { tableLayout: 'fixed' }) },
|
|
778
|
-
this.renderColGroup(true),
|
|
779
|
-
showHeader ? this.renderHead() : null,
|
|
780
|
-
headSummary ? (_J$X_("tbody", null, this.renderSummaryRow(headSummary))) : null)));
|
|
781
|
-
};
|
|
782
|
-
Table.prototype.renderScrollTableBody = function () {
|
|
783
|
-
var _a = this.props, scroll = _a.scroll, itemActions = _a.itemActions, cx = _a.classnames, bodyClassname = _a.bodyClassname;
|
|
784
|
-
var style = {};
|
|
785
|
-
var tableStyle = {};
|
|
786
|
-
if (scroll && (scroll.y || scroll.x)) {
|
|
787
|
-
Object.assign(style, {
|
|
788
|
-
overflow: 'auto scroll',
|
|
789
|
-
maxHeight: scroll.y
|
|
790
|
-
});
|
|
791
|
-
Object.assign(tableStyle, {
|
|
792
|
-
width: scroll && scroll.x
|
|
793
|
-
? typeof scroll.x === 'number'
|
|
794
|
-
? scroll.x + 'px'
|
|
795
|
-
: scroll.x
|
|
796
|
-
: '100%'
|
|
797
|
-
});
|
|
798
|
-
}
|
|
799
|
-
var hoverRow = this.state.hoverRow;
|
|
800
|
-
return (_J$X_("div", { ref: this.contentDom, className: cx('Table-body'), style: style, onMouseLeave: this.onMouseLeave, onScroll: this.onTableScroll },
|
|
801
|
-
itemActions && hoverRow ? (_J$X_(ItemActionsWrapper["default"], { dom: hoverRow.target, classnames: cx }, typeof itemActions === 'function'
|
|
802
|
-
? itemActions(hoverRow.record, hoverRow.rowIndex)
|
|
803
|
-
: null)) : null,
|
|
804
|
-
_J$X_("table", { className: cx('Table-table', bodyClassname), style: tslib.__assign(tslib.__assign({}, tableStyle), { tableLayout: 'fixed' }) },
|
|
805
|
-
this.renderColGroup(),
|
|
806
|
-
this.renderBody())));
|
|
807
|
-
};
|
|
808
|
-
Table.prototype.renderScrollTableFoot = function () {
|
|
809
|
-
var _a = this.props, scroll = _a.scroll, cx = _a.classnames;
|
|
810
|
-
return (_J$X_("div", { ref: this.footDom, className: cx('Table-summary'), style: { overflow: 'hidden' } },
|
|
811
|
-
_J$X_("table", { className: cx('Table-table'), style: { width: (scroll === null || scroll === void 0 ? void 0 : scroll.x) + 'px' || '100%', tableLayout: 'fixed' } }, this.renderFoot())));
|
|
812
|
-
};
|
|
813
|
-
Table.prototype.renderScrollTable = function () {
|
|
814
|
-
var _a = this.props, footSummary = _a.footSummary, cx = _a.classnames;
|
|
815
|
-
return (_J$X_("div", { className: cx('Table-container'), ref: this.containerDom },
|
|
816
|
-
this.renderScrollTableHeader(),
|
|
817
|
-
this.renderScrollTableBody(),
|
|
818
|
-
footSummary ? this.renderScrollTableFoot() : null));
|
|
819
|
-
};
|
|
820
|
-
Table.prototype.syncTableWidth = function () {
|
|
821
|
-
var _this = this;
|
|
822
|
-
var tbodyDom = this.tbodyDom.current;
|
|
823
|
-
if (!tbodyDom) {
|
|
824
|
-
return;
|
|
825
|
-
}
|
|
826
|
-
var cols = [].slice.call(tbodyDom === null || tbodyDom === void 0 ? void 0 : tbodyDom.querySelectorAll(':scope>tr>td[data-col]'));
|
|
827
|
-
var colWidths = {};
|
|
828
|
-
cols.forEach(function (col) {
|
|
829
|
-
var index = parseInt(col.getAttribute('data-col'), 10);
|
|
830
|
-
var column = _this.tdColumns[index];
|
|
831
|
-
var item = _this.state.colWidths[column.name];
|
|
832
|
-
if (column) {
|
|
833
|
-
colWidths[column.name] = {
|
|
834
|
-
width: (item === null || item === void 0 ? void 0 : item.originWidth) !== (column === null || column === void 0 ? void 0 : column.width) ? column === null || column === void 0 ? void 0 : column.width : item === null || item === void 0 ? void 0 : item.width,
|
|
835
|
-
minWidth: column === null || column === void 0 ? void 0 : column.minWidth,
|
|
836
|
-
realWidth: col.offsetWidth,
|
|
837
|
-
originWidth: column === null || column === void 0 ? void 0 : column.width
|
|
838
|
-
};
|
|
839
|
-
}
|
|
840
|
-
});
|
|
841
|
-
if (!isEqual__default["default"](colWidths, this.state.colWidths)) {
|
|
842
|
-
this.setState({ colWidths: colWidths });
|
|
843
|
-
}
|
|
844
|
-
};
|
|
845
|
-
Table.prototype.initTableWidth = function () {
|
|
846
|
-
var _this = this;
|
|
847
|
-
var tableWrapperDom = this.contentDom.current;
|
|
848
|
-
if (!tableWrapperDom) {
|
|
849
|
-
return;
|
|
850
|
-
}
|
|
851
|
-
var _a = this.props, scroll = _a.scroll, tableLayout = _a.tableLayout;
|
|
852
|
-
var table = tableWrapperDom.querySelector('table');
|
|
853
|
-
var thead = tableWrapperDom.querySelector('thead');
|
|
854
|
-
if (!thead) {
|
|
855
|
-
if (this.headerDom.current) {
|
|
856
|
-
thead = this.headerDom.current.querySelector('thead');
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
var tableWidth = scroll && scroll.x ? scroll.x : tableWrapperDom.offsetWidth;
|
|
860
|
-
var tbody = null;
|
|
861
|
-
var htmls = [];
|
|
862
|
-
var isFixed = tableLayout === 'fixed' || (scroll && scroll.x);
|
|
863
|
-
var someSettedWidth = this.tdColumns.some(function (column) { return column.width; });
|
|
864
|
-
var minWidths = {};
|
|
865
|
-
// fixed 模式需要参考 auto 获得列最小宽度
|
|
866
|
-
if (isFixed) {
|
|
867
|
-
tbody = (table === null || table === void 0 ? void 0 : table.querySelector(':scope>tbody')) || null;
|
|
868
|
-
htmls.push("<table style=\"table-layout:auto!important;width:0!important;min-width:0!important;\" class=\"".concat(table === null || table === void 0 ? void 0 : table.className, "\">").concat(thead === null || thead === void 0 ? void 0 : thead.outerHTML, "</table>"));
|
|
869
|
-
}
|
|
870
|
-
if (someSettedWidth || isFixed) {
|
|
871
|
-
htmls.push("<table style=\"table-layout:auto!important;min-width:".concat(tableWidth, "px!important;width:").concat(tableWidth, "px!important;\" class=\"").concat(table === null || table === void 0 ? void 0 : table.className, "\">").concat(thead ? thead.outerHTML : '').concat(tbody ? "<tbody>".concat(tbody.innerHTML, "</tbody>") : '', "</table>"));
|
|
872
|
-
}
|
|
873
|
-
if (!htmls.length) {
|
|
874
|
-
return;
|
|
875
|
-
}
|
|
876
|
-
var div = document.createElement('div');
|
|
877
|
-
div.className = 'amis-scope'; // jssdk 里面 css 会在这一层
|
|
878
|
-
div.style.cssText += "visibility: hidden!important;";
|
|
879
|
-
div.innerHTML = htmls.join('');
|
|
880
|
-
var ths1 = [];
|
|
881
|
-
var ths2 = [];
|
|
882
|
-
if (isFixed) {
|
|
883
|
-
ths1 = [].slice.call(div.querySelectorAll(':scope>table:first-child>thead>tr>th[data-col]'));
|
|
884
|
-
}
|
|
885
|
-
if (someSettedWidth || isFixed) {
|
|
886
|
-
ths2 = [].slice.call(div.querySelectorAll(':scope>table:last-child>thead>tr>th[data-col]'));
|
|
887
|
-
}
|
|
888
|
-
ths1.forEach(function (th) {
|
|
889
|
-
th.style.cssText += 'width: 0';
|
|
890
|
-
});
|
|
891
|
-
ths2.forEach(function (th, index) {
|
|
892
|
-
var column = _this.tdColumns[index];
|
|
893
|
-
th.style.cssText += "".concat(typeof (column === null || column === void 0 ? void 0 : column.width) === 'number'
|
|
894
|
-
? "width: ".concat(column === null || column === void 0 ? void 0 : column.width, "px;")
|
|
895
|
-
: (column === null || column === void 0 ? void 0 : column.width)
|
|
896
|
-
? "width: ".concat(column === null || column === void 0 ? void 0 : column.width, ";")
|
|
897
|
-
: '');
|
|
898
|
-
});
|
|
899
|
-
document.body.appendChild(div);
|
|
900
|
-
var colWidths = {};
|
|
901
|
-
ths1.forEach(function (th) {
|
|
902
|
-
var index = parseInt(th.getAttribute('data-col'), 10);
|
|
903
|
-
var column = _this.tdColumns[index];
|
|
904
|
-
minWidths[index] = th.clientWidth;
|
|
905
|
-
if (colWidths[index]) {
|
|
906
|
-
colWidths[column === null || column === void 0 ? void 0 : column.name].minWidth = th.clientWidth;
|
|
907
|
-
}
|
|
908
|
-
else {
|
|
909
|
-
colWidths[column === null || column === void 0 ? void 0 : column.name] = { minWidth: th.clientWidth };
|
|
910
|
-
}
|
|
911
|
-
});
|
|
912
|
-
ths2.forEach(function (col) {
|
|
913
|
-
var index = parseInt(col.getAttribute('data-col'), 10);
|
|
914
|
-
var column = _this.tdColumns[index];
|
|
915
|
-
if (column && (column.width || isFixed)) {
|
|
916
|
-
var width = Math.max(typeof column.width === 'number' ? column.width : col.clientWidth, minWidths[index] || 0);
|
|
917
|
-
if (colWidths[column === null || column === void 0 ? void 0 : column.name]) {
|
|
918
|
-
colWidths[column === null || column === void 0 ? void 0 : column.name].width = width;
|
|
919
|
-
}
|
|
920
|
-
else {
|
|
921
|
-
colWidths[column === null || column === void 0 ? void 0 : column.name] = { width: width };
|
|
922
|
-
}
|
|
923
|
-
if (column.width) {
|
|
924
|
-
colWidths[column === null || column === void 0 ? void 0 : column.name].originWidth = column.width;
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
});
|
|
928
|
-
if (!isEqual__default["default"](colWidths, this.state.colWidths)) {
|
|
929
|
-
this.setState({ colWidths: colWidths });
|
|
930
|
-
}
|
|
931
|
-
document.body.removeChild(div);
|
|
932
|
-
};
|
|
933
|
-
Table.prototype.updateTableInfo = function () {
|
|
934
|
-
if (this.resizeTarget) {
|
|
935
|
-
return;
|
|
936
|
-
}
|
|
937
|
-
this.syncTableWidth();
|
|
938
|
-
this.initTableWidth();
|
|
939
|
-
};
|
|
940
|
-
Table.prototype.render = function () {
|
|
941
|
-
var _a, _b;
|
|
942
|
-
var _c = this.props, title = _c.title, footer = _c.footer, className = _c.className, scroll = _c.scroll, size = _c.size, bordered = _c.bordered, resizable = _c.resizable, columns = _c.columns, sticky = _c.sticky, autoFillHeight = _c.autoFillHeight, cx = _c.classnames;
|
|
943
|
-
var _d = util.getBuildColumns(columns), thColumns = _d.thColumns, tdColumns = _d.tdColumns;
|
|
944
|
-
this.thColumns = thColumns;
|
|
945
|
-
this.tdColumns = tdColumns;
|
|
946
|
-
// 是否设置了纵向滚动
|
|
947
|
-
var hasScrollY = scroll && scroll.y;
|
|
948
|
-
// 是否设置了横向滚动
|
|
949
|
-
var hasScrollX = scroll && scroll.x;
|
|
950
|
-
var style = {};
|
|
951
|
-
if (hasScrollY) {
|
|
952
|
-
Object.assign(style, {
|
|
953
|
-
overflow: 'auto scroll',
|
|
954
|
-
maxHeight: scroll.y
|
|
955
|
-
});
|
|
956
|
-
}
|
|
957
|
-
return (_J$X_("div", { ref: this.tableDom, className: cx('Table2', className, (_a = {},
|
|
958
|
-
_a[cx('Table-scroll-horizontal')] = hasScrollX,
|
|
959
|
-
_a[cx("Table-".concat(size))] = size,
|
|
960
|
-
_a[cx('Table-bordered')] = bordered,
|
|
961
|
-
_a[cx('Table-resizable')] = resizable,
|
|
962
|
-
_a)) },
|
|
963
|
-
title ? (_J$X_("div", { className: cx('Table-title') }, typeof title === 'function' ? title() : title)) : null,
|
|
964
|
-
!hasScrollY && !(sticky && autoFillHeight) ? (this.renderScrollTable()) : (_J$X_("div", { className: cx('Table-container', (_b = {},
|
|
965
|
-
_b[cx('Table-container-self-sticky')] = hasScrollY || (sticky && autoFillHeight),
|
|
966
|
-
_b)), style: style, ref: this.containerDom }, this.renderTable())),
|
|
967
|
-
footer ? (_J$X_("div", { className: cx('Table-footer') }, typeof footer === 'function' ? footer() : footer)) : null));
|
|
968
|
-
};
|
|
969
|
-
Table.defaultProps = {
|
|
970
|
-
title: '',
|
|
971
|
-
className: '',
|
|
972
|
-
dataSource: [],
|
|
973
|
-
columns: [],
|
|
974
|
-
indentSize: 15,
|
|
975
|
-
placeholder: '暂无数据',
|
|
976
|
-
showHeader: true,
|
|
977
|
-
tableLayout: 'auto'
|
|
978
|
-
};
|
|
979
|
-
tslib.__decorate([
|
|
980
|
-
amisCore.autobind,
|
|
981
|
-
tslib.__metadata("design:type", Function),
|
|
982
|
-
tslib.__metadata("design:paramtypes", []),
|
|
983
|
-
tslib.__metadata("design:returntype", void 0)
|
|
984
|
-
], Table.prototype, "getPopOverContainer", null);
|
|
985
|
-
tslib.__decorate([
|
|
986
|
-
amisCore.autobind,
|
|
987
|
-
tslib.__metadata("design:type", Function),
|
|
988
|
-
tslib.__metadata("design:paramtypes", []),
|
|
989
|
-
tslib.__metadata("design:returntype", void 0)
|
|
990
|
-
], Table.prototype, "updateAutoFillHeight", null);
|
|
991
|
-
tslib.__decorate([
|
|
992
|
-
amisCore.autobind,
|
|
993
|
-
tslib.__metadata("design:type", Function),
|
|
994
|
-
tslib.__metadata("design:paramtypes", [Object]),
|
|
995
|
-
tslib.__metadata("design:returntype", void 0)
|
|
996
|
-
], Table.prototype, "onResizeMouseMove", null);
|
|
997
|
-
tslib.__decorate([
|
|
998
|
-
amisCore.autobind,
|
|
999
|
-
tslib.__metadata("design:type", Function),
|
|
1000
|
-
tslib.__metadata("design:paramtypes", [MouseEvent]),
|
|
1001
|
-
tslib.__metadata("design:returntype", void 0)
|
|
1002
|
-
], Table.prototype, "onResizeMouseUp", null);
|
|
1003
|
-
tslib.__decorate([
|
|
1004
|
-
amisCore.autobind,
|
|
1005
|
-
tslib.__metadata("design:type", Function),
|
|
1006
|
-
tslib.__metadata("design:paramtypes", [Object, Object, Number]),
|
|
1007
|
-
tslib.__metadata("design:returntype", Promise)
|
|
1008
|
-
], Table.prototype, "onRowClick", null);
|
|
1009
|
-
tslib.__decorate([
|
|
1010
|
-
amisCore.autobind,
|
|
1011
|
-
tslib.__metadata("design:type", Function),
|
|
1012
|
-
tslib.__metadata("design:paramtypes", [Object, Object, Number]),
|
|
1013
|
-
tslib.__metadata("design:returntype", Promise)
|
|
1014
|
-
], Table.prototype, "onRowDbClick", null);
|
|
1015
|
-
tslib.__decorate([
|
|
1016
|
-
amisCore.autobind,
|
|
1017
|
-
tslib.__metadata("design:type", Function),
|
|
1018
|
-
tslib.__metadata("design:paramtypes", [Object, Object, Number]),
|
|
1019
|
-
tslib.__metadata("design:returntype", Promise)
|
|
1020
|
-
], Table.prototype, "onRowMouseEnter", null);
|
|
1021
|
-
tslib.__decorate([
|
|
1022
|
-
amisCore.autobind,
|
|
1023
|
-
tslib.__metadata("design:type", Function),
|
|
1024
|
-
tslib.__metadata("design:paramtypes", [Object, Object, Number]),
|
|
1025
|
-
tslib.__metadata("design:returntype", Promise)
|
|
1026
|
-
], Table.prototype, "onRowMouseLeave", null);
|
|
1027
|
-
tslib.__decorate([
|
|
1028
|
-
amisCore.autobind,
|
|
1029
|
-
tslib.__metadata("design:type", Function),
|
|
1030
|
-
tslib.__metadata("design:paramtypes", []),
|
|
1031
|
-
tslib.__metadata("design:returntype", void 0)
|
|
1032
|
-
], Table.prototype, "onMouseLeave", null);
|
|
1033
|
-
tslib.__decorate([
|
|
1034
|
-
amisCore.autobind,
|
|
1035
|
-
tslib.__metadata("design:type", Function),
|
|
1036
|
-
tslib.__metadata("design:paramtypes", [Array]),
|
|
1037
|
-
tslib.__metadata("design:returntype", void 0)
|
|
1038
|
-
], Table.prototype, "onExpandRows", null);
|
|
1039
|
-
tslib.__decorate([
|
|
1040
|
-
amisCore.autobind,
|
|
1041
|
-
tslib.__metadata("design:type", Function),
|
|
1042
|
-
tslib.__metadata("design:paramtypes", [Array]),
|
|
1043
|
-
tslib.__metadata("design:returntype", void 0)
|
|
1044
|
-
], Table.prototype, "onCollapseRows", null);
|
|
1045
|
-
tslib.__decorate([
|
|
1046
|
-
amisCore.autobind,
|
|
1047
|
-
tslib.__metadata("design:type", Function),
|
|
1048
|
-
tslib.__metadata("design:paramtypes", [Boolean, Object]),
|
|
1049
|
-
tslib.__metadata("design:returntype", void 0)
|
|
1050
|
-
], Table.prototype, "onRowChange", null);
|
|
1051
|
-
tslib.__decorate([
|
|
1052
|
-
amisCore.autobind,
|
|
1053
|
-
tslib.__metadata("design:type", Function),
|
|
1054
|
-
tslib.__metadata("design:paramtypes", [Object]),
|
|
1055
|
-
tslib.__metadata("design:returntype", void 0)
|
|
1056
|
-
], Table.prototype, "onTableScroll", null);
|
|
1057
|
-
tslib.__decorate([
|
|
1058
|
-
amisCore.autobind,
|
|
1059
|
-
tslib.__metadata("design:type", Function),
|
|
1060
|
-
tslib.__metadata("design:paramtypes", []),
|
|
1061
|
-
tslib.__metadata("design:returntype", void 0)
|
|
1062
|
-
], Table.prototype, "syncTableWidth", null);
|
|
1063
|
-
tslib.__decorate([
|
|
1064
|
-
amisCore.autobind,
|
|
1065
|
-
tslib.__metadata("design:type", Function),
|
|
1066
|
-
tslib.__metadata("design:paramtypes", []),
|
|
1067
|
-
tslib.__metadata("design:returntype", void 0)
|
|
1068
|
-
], Table.prototype, "initTableWidth", null);
|
|
1069
|
-
tslib.__decorate([
|
|
1070
|
-
amisCore.autobind,
|
|
1071
|
-
tslib.__metadata("design:type", Function),
|
|
1072
|
-
tslib.__metadata("design:paramtypes", []),
|
|
1073
|
-
tslib.__metadata("design:returntype", void 0)
|
|
1074
|
-
], Table.prototype, "updateTableInfo", null);
|
|
1075
|
-
return Table;
|
|
1076
|
-
}(React__default["default"].PureComponent));
|
|
1077
|
-
var Table$1 = amisCore.themeable(amisCore.localeable(Table));
|
|
1078
|
-
|
|
1079
|
-
exports.DefaultCellWidth = DefaultCellWidth;
|
|
1080
|
-
exports.Table = Table;
|
|
1081
|
-
exports["default"] = Table$1;
|