@douyinfe/semi-ui 2.1.0-next.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/semi.css +52 -43
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +787 -657
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/es/autoComplete/index.d.ts +36 -11
- package/lib/es/button/index.d.ts +0 -1
- package/lib/es/button/index.js +1 -2
- package/lib/es/calendar/dayCalendar.js +1 -1
- package/lib/es/calendar/monthCalendar.js +1 -1
- package/lib/es/calendar/rangeCalendar.js +1 -1
- package/lib/es/calendar/weekCalendar.js +1 -1
- package/lib/es/cascader/index.d.ts +1 -0
- package/lib/es/cascader/index.js +15 -3
- package/lib/es/collapse/index.js +1 -5
- package/lib/es/collapsible/index.js +4 -1
- package/lib/es/datePicker/yearAndMonth.d.ts +2 -2
- package/lib/es/datePicker/yearAndMonth.js +1 -1
- package/lib/es/form/baseForm.d.ts +5 -11
- package/lib/es/form/baseForm.js +1 -2
- package/lib/es/form/field.d.ts +5 -23
- package/lib/es/form/field.js +2 -18
- package/lib/es/form/hoc/withField.d.ts +1 -1
- package/lib/es/form/hoc/withField.js +0 -3
- package/lib/es/iconButton/index.d.ts +0 -1
- package/lib/es/iconButton/index.js +0 -1
- package/lib/es/locale/localeConsumer.d.ts +5 -5
- package/lib/es/modal/useModal/HookModal.d.ts +3 -2
- package/lib/es/modal/useModal/index.js +1 -1
- package/lib/es/navigation/index.d.ts +1 -1
- package/lib/es/notification/index.d.ts +1 -1
- package/lib/es/notification/index.js +1 -1
- package/lib/es/popconfirm/index.d.ts +5 -1
- package/lib/es/popconfirm/index.js +10 -4
- package/lib/es/popover/index.d.ts +3 -1
- package/lib/es/popover/index.js +4 -8
- package/lib/es/radio/context.d.ts +1 -1
- package/lib/es/radio/radio.d.ts +2 -2
- package/lib/es/radio/radioGroup.d.ts +4 -4
- package/lib/es/rating/index.d.ts +1 -1
- package/lib/es/resizeObserver/index.js +1 -0
- package/lib/es/scrollList/scrollItem.d.ts +12 -11
- package/lib/es/scrollList/scrollItem.js +8 -8
- package/lib/es/select/index.js +18 -11
- package/lib/es/select/option.js +4 -4
- package/lib/es/select/utils.d.ts +1 -1
- package/lib/es/select/utils.js +12 -8
- package/lib/es/sideSheet/SideSheetContent.d.ts +1 -1
- package/lib/es/sideSheet/index.d.ts +3 -3
- package/lib/es/steps/basicSteps.js +2 -2
- package/lib/es/steps/fillSteps.js +3 -3
- package/lib/es/steps/navSteps.js +2 -2
- package/lib/es/table/Table.d.ts +1 -1
- package/lib/es/table/index.d.ts +1 -1
- package/lib/es/tabs/TabBar.d.ts +5 -3
- package/lib/es/tabs/TabBar.js +12 -4
- package/lib/es/tabs/TabPane.d.ts +2 -1
- package/lib/es/tabs/TabPane.js +3 -2
- package/lib/es/tabs/index.d.ts +3 -1
- package/lib/es/tabs/index.js +85 -16
- package/lib/es/tabs/interface.d.ts +6 -1
- package/lib/es/tagInput/index.d.ts +3 -0
- package/lib/es/tagInput/index.js +6 -1
- package/lib/es/timePicker/Combobox.d.ts +10 -4
- package/lib/es/timePicker/Combobox.js +2 -1
- package/lib/es/timePicker/TimePicker.d.ts +1 -1
- package/lib/es/toast/index.d.ts +1 -1
- package/lib/es/tooltip/index.d.ts +3 -0
- package/lib/es/tooltip/index.js +3 -0
- package/lib/es/tree/interface.d.ts +2 -2
- package/lib/es/treeSelect/index.d.ts +2 -11
- package/lib/es/treeSelect/index.js +2 -1
- package/lib/es/typography/base.d.ts +1 -1
- package/lib/es/typography/paragraph.d.ts +1 -1
- package/lib/es/typography/text.d.ts +1 -1
- package/lib/es/typography/title.d.ts +1 -1
- package/lib/es/upload/fileCard.d.ts +3 -18
- package/lib/es/upload/index.d.ts +4 -57
- package/lib/es/upload/interface.d.ts +56 -0
- package/lib/es/upload/interface.js +1 -0
- package/package.json +11 -10
- package/lib/cjs/_base/base.css +0 -510
- package/lib/cjs/_base/base.d.ts +0 -32
- package/lib/cjs/_base/base.js +0 -7
- package/lib/cjs/_base/base.scss +0 -3
- package/lib/cjs/_base/baseComponent.d.ts +0 -25
- package/lib/cjs/_base/baseComponent.js +0 -84
- package/lib/cjs/_base/reactUtils.d.ts +0 -8
- package/lib/cjs/_base/reactUtils.js +0 -55
- package/lib/cjs/_portal/index.d.ts +0 -36
- package/lib/cjs/_portal/index.js +0 -151
- package/lib/cjs/_utils/index.d.ts +0 -68
- package/lib/cjs/_utils/index.js +0 -189
- package/lib/cjs/anchor/anchor-context.d.ts +0 -7
- package/lib/cjs/anchor/anchor-context.js +0 -18
- package/lib/cjs/anchor/index.d.ts +0 -93
- package/lib/cjs/anchor/index.js +0 -334
- package/lib/cjs/anchor/link.d.ts +0 -37
- package/lib/cjs/anchor/link.js +0 -174
- package/lib/cjs/autoComplete/index.d.ts +0 -142
- package/lib/cjs/autoComplete/index.js +0 -427
- package/lib/cjs/avatar/avatarGroup.d.ts +0 -22
- package/lib/cjs/avatar/avatarGroup.js +0 -167
- package/lib/cjs/avatar/index.d.ts +0 -48
- package/lib/cjs/avatar/index.js +0 -259
- package/lib/cjs/avatar/interface.d.ts +0 -31
- package/lib/cjs/avatar/interface.js +0 -7
- package/lib/cjs/backtop/index.d.ts +0 -38
- package/lib/cjs/backtop/index.js +0 -144
- package/lib/cjs/badge/index.d.ts +0 -38
- package/lib/cjs/badge/index.js +0 -107
- package/lib/cjs/banner/index.d.ts +0 -50
- package/lib/cjs/banner/index.js +0 -209
- package/lib/cjs/breadcrumb/bread-context.d.ts +0 -11
- package/lib/cjs/breadcrumb/bread-context.js +0 -18
- package/lib/cjs/breadcrumb/index.d.ts +0 -81
- package/lib/cjs/breadcrumb/index.js +0 -286
- package/lib/cjs/breadcrumb/item.d.ts +0 -53
- package/lib/cjs/breadcrumb/item.js +0 -246
- package/lib/cjs/button/Button.d.ts +0 -61
- package/lib/cjs/button/Button.js +0 -145
- package/lib/cjs/button/buttonGroup.d.ts +0 -26
- package/lib/cjs/button/buttonGroup.js +0 -91
- package/lib/cjs/button/index.d.ts +0 -38
- package/lib/cjs/button/index.js +0 -45
- package/lib/cjs/button/splitButtonGroup.d.ts +0 -12
- package/lib/cjs/button/splitButtonGroup.js +0 -47
- package/lib/cjs/calendar/dayCalendar.d.ts +0 -50
- package/lib/cjs/calendar/dayCalendar.js +0 -234
- package/lib/cjs/calendar/dayCol.d.ts +0 -41
- package/lib/cjs/calendar/dayCol.js +0 -211
- package/lib/cjs/calendar/index.d.ts +0 -42
- package/lib/cjs/calendar/index.js +0 -119
- package/lib/cjs/calendar/interface.d.ts +0 -37
- package/lib/cjs/calendar/interface.js +0 -7
- package/lib/cjs/calendar/monthCalendar.d.ts +0 -59
- package/lib/cjs/calendar/monthCalendar.js +0 -474
- package/lib/cjs/calendar/rangeCalendar.d.ts +0 -51
- package/lib/cjs/calendar/rangeCalendar.js +0 -329
- package/lib/cjs/calendar/timeCol.d.ts +0 -15
- package/lib/cjs/calendar/timeCol.js +0 -101
- package/lib/cjs/calendar/weekCalendar.d.ts +0 -52
- package/lib/cjs/calendar/weekCalendar.js +0 -331
- package/lib/cjs/card/cardGroup.d.ts +0 -27
- package/lib/cjs/card/cardGroup.js +0 -87
- package/lib/cjs/card/index.d.ts +0 -75
- package/lib/cjs/card/index.js +0 -222
- package/lib/cjs/card/meta.d.ts +0 -26
- package/lib/cjs/card/meta.js +0 -93
- package/lib/cjs/cascader/index.d.ts +0 -178
- package/lib/cjs/cascader/index.js +0 -972
- package/lib/cjs/cascader/item.d.ts +0 -72
- package/lib/cjs/cascader/item.js +0 -353
- package/lib/cjs/checkbox/checkbox.d.ts +0 -61
- package/lib/cjs/checkbox/checkbox.js +0 -205
- package/lib/cjs/checkbox/checkboxGroup.d.ts +0 -49
- package/lib/cjs/checkbox/checkboxGroup.js +0 -183
- package/lib/cjs/checkbox/checkboxInner.d.ts +0 -40
- package/lib/cjs/checkbox/checkboxInner.js +0 -97
- package/lib/cjs/checkbox/context.d.ts +0 -14
- package/lib/cjs/checkbox/context.js +0 -17
- package/lib/cjs/checkbox/index.d.ts +0 -8
- package/lib/cjs/checkbox/index.js +0 -29
- package/lib/cjs/collapse/collapse-context.d.ts +0 -13
- package/lib/cjs/collapse/collapse-context.js +0 -18
- package/lib/cjs/collapse/index.d.ts +0 -43
- package/lib/cjs/collapse/index.js +0 -169
- package/lib/cjs/collapse/item.d.ts +0 -23
- package/lib/cjs/collapse/item.js +0 -151
- package/lib/cjs/collapsible/index.d.ts +0 -36
- package/lib/cjs/collapsible/index.js +0 -177
- package/lib/cjs/configProvider/context.d.ts +0 -11
- package/lib/cjs/configProvider/context.js +0 -18
- package/lib/cjs/configProvider/index.d.ts +0 -19
- package/lib/cjs/configProvider/index.js +0 -83
- package/lib/cjs/datePicker/dateInput.d.ts +0 -81
- package/lib/cjs/datePicker/dateInput.js +0 -408
- package/lib/cjs/datePicker/datePicker.d.ts +0 -180
- package/lib/cjs/datePicker/datePicker.js +0 -723
- package/lib/cjs/datePicker/footer.d.ts +0 -11
- package/lib/cjs/datePicker/footer.js +0 -39
- package/lib/cjs/datePicker/index.d.ts +0 -11
- package/lib/cjs/datePicker/index.js +0 -67
- package/lib/cjs/datePicker/month.d.ts +0 -203
- package/lib/cjs/datePicker/month.js +0 -503
- package/lib/cjs/datePicker/monthsGrid.d.ts +0 -88
- package/lib/cjs/datePicker/monthsGrid.js +0 -700
- package/lib/cjs/datePicker/navigation.d.ts +0 -44
- package/lib/cjs/datePicker/navigation.js +0 -117
- package/lib/cjs/datePicker/quickControl.d.ts +0 -22
- package/lib/cjs/datePicker/quickControl.js +0 -86
- package/lib/cjs/datePicker/yearAndMonth.d.ts +0 -48
- package/lib/cjs/datePicker/yearAndMonth.js +0 -279
- package/lib/cjs/descriptions/descriptions-context.d.ts +0 -7
- package/lib/cjs/descriptions/descriptions-context.js +0 -18
- package/lib/cjs/descriptions/index.d.ts +0 -47
- package/lib/cjs/descriptions/index.js +0 -102
- package/lib/cjs/descriptions/item.d.ts +0 -19
- package/lib/cjs/descriptions/item.js +0 -89
- package/lib/cjs/dropdown/context.d.ts +0 -5
- package/lib/cjs/dropdown/context.js +0 -20
- package/lib/cjs/dropdown/dropdownDivider.d.ts +0 -5
- package/lib/cjs/dropdown/dropdownDivider.js +0 -40
- package/lib/cjs/dropdown/dropdownItem.d.ts +0 -47
- package/lib/cjs/dropdown/dropdownItem.js +0 -134
- package/lib/cjs/dropdown/dropdownMenu.d.ts +0 -12
- package/lib/cjs/dropdown/dropdownMenu.js +0 -66
- package/lib/cjs/dropdown/dropdownTitle.d.ts +0 -16
- package/lib/cjs/dropdown/dropdownTitle.js +0 -62
- package/lib/cjs/dropdown/index.d.ts +0 -103
- package/lib/cjs/dropdown/index.js +0 -284
- package/lib/cjs/empty/index.d.ts +0 -38
- package/lib/cjs/empty/index.js +0 -141
- package/lib/cjs/form/arrayField.d.ts +0 -33
- package/lib/cjs/form/arrayField.js +0 -265
- package/lib/cjs/form/baseForm.d.ts +0 -148
- package/lib/cjs/form/baseForm.js +0 -326
- package/lib/cjs/form/context.d.ts +0 -9
- package/lib/cjs/form/context.js +0 -35
- package/lib/cjs/form/errorMessage.d.ts +0 -25
- package/lib/cjs/form/errorMessage.js +0 -108
- package/lib/cjs/form/field.d.ts +0 -96
- package/lib/cjs/form/field.js +0 -132
- package/lib/cjs/form/group.d.ts +0 -14
- package/lib/cjs/form/group.js +0 -147
- package/lib/cjs/form/hoc/withField.d.ts +0 -12
- package/lib/cjs/form/hoc/withField.js +0 -557
- package/lib/cjs/form/hoc/withFormApi.d.ts +0 -3
- package/lib/cjs/form/hoc/withFormApi.js +0 -25
- package/lib/cjs/form/hoc/withFormState.d.ts +0 -3
- package/lib/cjs/form/hoc/withFormState.js +0 -25
- package/lib/cjs/form/hooks/index.d.ts +0 -8
- package/lib/cjs/form/hooks/index.js +0 -72
- package/lib/cjs/form/hooks/useArrayFieldState.d.ts +0 -4
- package/lib/cjs/form/hooks/useArrayFieldState.js +0 -21
- package/lib/cjs/form/hooks/useFieldApi.d.ts +0 -10
- package/lib/cjs/form/hooks/useFieldApi.js +0 -31
- package/lib/cjs/form/hooks/useFieldState.d.ts +0 -6
- package/lib/cjs/form/hooks/useFieldState.js +0 -40
- package/lib/cjs/form/hooks/useFormApi.d.ts +0 -1
- package/lib/cjs/form/hooks/useFormApi.js +0 -17
- package/lib/cjs/form/hooks/useFormState.d.ts +0 -2
- package/lib/cjs/form/hooks/useFormState.js +0 -21
- package/lib/cjs/form/hooks/useFormUpdater.d.ts +0 -1
- package/lib/cjs/form/hooks/useFormUpdater.js +0 -17
- package/lib/cjs/form/hooks/useStateWithGetter.d.ts +0 -1
- package/lib/cjs/form/hooks/useStateWithGetter.js +0 -27
- package/lib/cjs/form/index.d.ts +0 -22
- package/lib/cjs/form/index.js +0 -117
- package/lib/cjs/form/interface.d.ts +0 -111
- package/lib/cjs/form/interface.js +0 -36
- package/lib/cjs/form/label.d.ts +0 -39
- package/lib/cjs/form/label.js +0 -91
- package/lib/cjs/form/section.d.ts +0 -17
- package/lib/cjs/form/section.js +0 -60
- package/lib/cjs/form/slot.d.ts +0 -14
- package/lib/cjs/form/slot.js +0 -200
- package/lib/cjs/grid/col.d.ts +0 -55
- package/lib/cjs/grid/col.js +0 -146
- package/lib/cjs/grid/index.d.ts +0 -5
- package/lib/cjs/grid/index.js +0 -27
- package/lib/cjs/grid/row.d.ts +0 -58
- package/lib/cjs/grid/row.js +0 -207
- package/lib/cjs/iconButton/index.d.ts +0 -47
- package/lib/cjs/iconButton/index.js +0 -154
- package/lib/cjs/icons/index.d.ts +0 -3
- package/lib/cjs/icons/index.js +0 -16
- package/lib/cjs/index.d.ts +0 -79
- package/lib/cjs/index.js +0 -782
- package/lib/cjs/input/index.d.ts +0 -170
- package/lib/cjs/input/index.js +0 -499
- package/lib/cjs/input/inputGroup.d.ts +0 -38
- package/lib/cjs/input/inputGroup.js +0 -163
- package/lib/cjs/input/textarea.d.ts +0 -44
- package/lib/cjs/input/textarea.js +0 -337
- package/lib/cjs/inputNumber/index.d.ts +0 -109
- package/lib/cjs/inputNumber/index.js +0 -528
- package/lib/cjs/layout/Sider.d.ts +0 -38
- package/lib/cjs/layout/Sider.js +0 -160
- package/lib/cjs/layout/index.d.ts +0 -43
- package/lib/cjs/layout/index.js +0 -174
- package/lib/cjs/layout/layout-context.d.ts +0 -9
- package/lib/cjs/layout/layout-context.js +0 -25
- package/lib/cjs/list/index.d.ts +0 -59
- package/lib/cjs/list/index.js +0 -189
- package/lib/cjs/list/item.d.ts +0 -36
- package/lib/cjs/list/item.js +0 -151
- package/lib/cjs/list/list-context.d.ts +0 -12
- package/lib/cjs/list/list-context.js +0 -18
- package/lib/cjs/locale/context.d.ts +0 -4
- package/lib/cjs/locale/context.js +0 -18
- package/lib/cjs/locale/interface.d.ts +0 -151
- package/lib/cjs/locale/interface.js +0 -7
- package/lib/cjs/locale/localeConsumer.d.ts +0 -21
- package/lib/cjs/locale/localeConsumer.js +0 -80
- package/lib/cjs/locale/localeProvider.d.ts +0 -18
- package/lib/cjs/locale/localeProvider.js +0 -54
- package/lib/cjs/locale/source/ar.d.ts +0 -3
- package/lib/cjs/locale/source/ar.js +0 -165
- package/lib/cjs/locale/source/en_GB.d.ts +0 -3
- package/lib/cjs/locale/source/en_GB.js +0 -165
- package/lib/cjs/locale/source/en_US.d.ts +0 -3
- package/lib/cjs/locale/source/en_US.js +0 -165
- package/lib/cjs/locale/source/id_ID.d.ts +0 -3
- package/lib/cjs/locale/source/id_ID.js +0 -165
- package/lib/cjs/locale/source/ja_JP.d.ts +0 -3
- package/lib/cjs/locale/source/ja_JP.js +0 -166
- package/lib/cjs/locale/source/ko_KR.d.ts +0 -3
- package/lib/cjs/locale/source/ko_KR.js +0 -166
- package/lib/cjs/locale/source/ms_MY.d.ts +0 -3
- package/lib/cjs/locale/source/ms_MY.js +0 -165
- package/lib/cjs/locale/source/pt_BR.d.ts +0 -3
- package/lib/cjs/locale/source/pt_BR.js +0 -173
- package/lib/cjs/locale/source/ru_RU.d.ts +0 -3
- package/lib/cjs/locale/source/ru_RU.js +0 -168
- package/lib/cjs/locale/source/th_TH.d.ts +0 -3
- package/lib/cjs/locale/source/th_TH.js +0 -169
- package/lib/cjs/locale/source/tr_TR.d.ts +0 -3
- package/lib/cjs/locale/source/tr_TR.js +0 -168
- package/lib/cjs/locale/source/vi_VN.d.ts +0 -3
- package/lib/cjs/locale/source/vi_VN.js +0 -168
- package/lib/cjs/locale/source/zh_CN.d.ts +0 -3
- package/lib/cjs/locale/source/zh_CN.js +0 -166
- package/lib/cjs/locale/source/zh_TW.d.ts +0 -3
- package/lib/cjs/locale/source/zh_TW.js +0 -166
- package/lib/cjs/modal/ConfirmModal.d.ts +0 -4
- package/lib/cjs/modal/ConfirmModal.js +0 -137
- package/lib/cjs/modal/Modal.d.ts +0 -133
- package/lib/cjs/modal/Modal.js +0 -437
- package/lib/cjs/modal/ModalContent.d.ts +0 -38
- package/lib/cjs/modal/ModalContent.js +0 -337
- package/lib/cjs/modal/confirm.d.ts +0 -215
- package/lib/cjs/modal/confirm.js +0 -132
- package/lib/cjs/modal/index.d.ts +0 -8
- package/lib/cjs/modal/index.js +0 -18
- package/lib/cjs/modal/useModal/HookModal.d.ts +0 -13
- package/lib/cjs/modal/useModal/HookModal.js +0 -79
- package/lib/cjs/modal/useModal/index.d.ts +0 -24
- package/lib/cjs/modal/useModal/index.js +0 -80
- package/lib/cjs/motions/Rotate.d.ts +0 -23
- package/lib/cjs/motions/Rotate.js +0 -87
- package/lib/cjs/navigation/CollapseButton.d.ts +0 -10
- package/lib/cjs/navigation/CollapseButton.js +0 -58
- package/lib/cjs/navigation/Footer.d.ts +0 -27
- package/lib/cjs/navigation/Footer.js +0 -107
- package/lib/cjs/navigation/Header.d.ts +0 -34
- package/lib/cjs/navigation/Header.js +0 -99
- package/lib/cjs/navigation/Item.d.ts +0 -70
- package/lib/cjs/navigation/Item.js +0 -294
- package/lib/cjs/navigation/OpenIconTransition.d.ts +0 -14
- package/lib/cjs/navigation/OpenIconTransition.js +0 -90
- package/lib/cjs/navigation/SubNav.d.ts +0 -103
- package/lib/cjs/navigation/SubNav.js +0 -438
- package/lib/cjs/navigation/SubNavTransition.d.ts +0 -17
- package/lib/cjs/navigation/SubNavTransition.js +0 -90
- package/lib/cjs/navigation/index.d.ts +0 -145
- package/lib/cjs/navigation/index.js +0 -442
- package/lib/cjs/navigation/nav-context.d.ts +0 -7
- package/lib/cjs/navigation/nav-context.js +0 -22
- package/lib/cjs/notification/NoticeTransition.d.ts +0 -10
- package/lib/cjs/notification/NoticeTransition.js +0 -90
- package/lib/cjs/notification/index.d.ts +0 -52
- package/lib/cjs/notification/index.js +0 -316
- package/lib/cjs/notification/notice.d.ts +0 -51
- package/lib/cjs/notification/notice.js +0 -240
- package/lib/cjs/notification/useNotification/HookNotice.d.ts +0 -7
- package/lib/cjs/notification/useNotification/HookNotice.js +0 -72
- package/lib/cjs/notification/useNotification/index.d.ts +0 -10
- package/lib/cjs/notification/useNotification/index.js +0 -161
- package/lib/cjs/overflowList/index.d.ts +0 -87
- package/lib/cjs/overflowList/index.js +0 -290
- package/lib/cjs/overflowList/intersectionObserver.d.ts +0 -34
- package/lib/cjs/overflowList/intersectionObserver.js +0 -119
- package/lib/cjs/pagination/index.d.ts +0 -99
- package/lib/cjs/pagination/index.js +0 -481
- package/lib/cjs/popconfirm/index.d.ts +0 -86
- package/lib/cjs/popconfirm/index.js +0 -254
- package/lib/cjs/popover/Arrow.d.ts +0 -9
- package/lib/cjs/popover/Arrow.js +0 -86
- package/lib/cjs/popover/index.d.ts +0 -87
- package/lib/cjs/popover/index.js +0 -158
- package/lib/cjs/progress/index.d.ts +0 -68
- package/lib/cjs/progress/index.js +0 -303
- package/lib/cjs/radio/context.d.ts +0 -22
- package/lib/cjs/radio/context.js +0 -18
- package/lib/cjs/radio/index.d.ts +0 -10
- package/lib/cjs/radio/index.js +0 -29
- package/lib/cjs/radio/radio.d.ts +0 -79
- package/lib/cjs/radio/radio.js +0 -225
- package/lib/cjs/radio/radioGroup.d.ts +0 -64
- package/lib/cjs/radio/radioGroup.js +0 -189
- package/lib/cjs/radio/radioInner.d.ts +0 -45
- package/lib/cjs/radio/radioInner.js +0 -140
- package/lib/cjs/rating/index.d.ts +0 -91
- package/lib/cjs/rating/index.js +0 -312
- package/lib/cjs/rating/item.d.ts +0 -38
- package/lib/cjs/rating/item.js +0 -143
- package/lib/cjs/resizeObserver/index.d.ts +0 -35
- package/lib/cjs/resizeObserver/index.js +0 -117
- package/lib/cjs/scrollList/index.d.ts +0 -26
- package/lib/cjs/scrollList/index.js +0 -82
- package/lib/cjs/scrollList/scrollItem.d.ts +0 -104
- package/lib/cjs/scrollList/scrollItem.js +0 -551
- package/lib/cjs/select/index.d.ts +0 -234
- package/lib/cjs/select/index.js +0 -1102
- package/lib/cjs/select/option.d.ts +0 -50
- package/lib/cjs/select/option.js +0 -211
- package/lib/cjs/select/optionGroup.d.ts +0 -20
- package/lib/cjs/select/optionGroup.js +0 -56
- package/lib/cjs/select/utils.d.ts +0 -9
- package/lib/cjs/select/utils.js +0 -116
- package/lib/cjs/select/virtualRow.d.ts +0 -8
- package/lib/cjs/select/virtualRow.js +0 -25
- package/lib/cjs/sideSheet/SideSheetContent.d.ts +0 -35
- package/lib/cjs/sideSheet/SideSheetContent.js +0 -195
- package/lib/cjs/sideSheet/SideSheetTransition.d.ts +0 -12
- package/lib/cjs/sideSheet/SideSheetTransition.js +0 -120
- package/lib/cjs/sideSheet/index.d.ts +0 -59
- package/lib/cjs/sideSheet/index.js +0 -303
- package/lib/cjs/skeleton/index.d.ts +0 -33
- package/lib/cjs/skeleton/index.js +0 -101
- package/lib/cjs/skeleton/item.d.ts +0 -34
- package/lib/cjs/skeleton/item.js +0 -134
- package/lib/cjs/slider/index.d.ts +0 -30
- package/lib/cjs/slider/index.js +0 -647
- package/lib/cjs/space/index.d.ts +0 -33
- package/lib/cjs/space/index.js +0 -116
- package/lib/cjs/space/utils.d.ts +0 -5
- package/lib/cjs/space/utils.js +0 -54
- package/lib/cjs/spin/icon.d.ts +0 -10
- package/lib/cjs/spin/icon.js +0 -103
- package/lib/cjs/spin/index.d.ts +0 -63
- package/lib/cjs/spin/index.js +0 -145
- package/lib/cjs/steps/basicStep.d.ts +0 -46
- package/lib/cjs/steps/basicStep.js +0 -180
- package/lib/cjs/steps/basicSteps.d.ts +0 -41
- package/lib/cjs/steps/basicSteps.js +0 -127
- package/lib/cjs/steps/context.d.ts +0 -6
- package/lib/cjs/steps/context.js +0 -17
- package/lib/cjs/steps/fillStep.d.ts +0 -34
- package/lib/cjs/steps/fillStep.js +0 -142
- package/lib/cjs/steps/fillSteps.d.ts +0 -35
- package/lib/cjs/steps/fillSteps.js +0 -127
- package/lib/cjs/steps/index.d.ts +0 -39
- package/lib/cjs/steps/index.js +0 -104
- package/lib/cjs/steps/navStep.d.ts +0 -30
- package/lib/cjs/steps/navStep.js +0 -99
- package/lib/cjs/steps/navSteps.d.ts +0 -33
- package/lib/cjs/steps/navSteps.js +0 -103
- package/lib/cjs/steps/step.d.ts +0 -13
- package/lib/cjs/steps/step.js +0 -58
- package/lib/cjs/switch/index.d.ts +0 -48
- package/lib/cjs/switch/index.js +0 -159
- package/lib/cjs/table/Body/BaseRow.d.ts +0 -125
- package/lib/cjs/table/Body/BaseRow.js +0 -347
- package/lib/cjs/table/Body/ExpandedRow.d.ts +0 -63
- package/lib/cjs/table/Body/ExpandedRow.js +0 -176
- package/lib/cjs/table/Body/SectionRow.d.ts +0 -67
- package/lib/cjs/table/Body/SectionRow.js +0 -248
- package/lib/cjs/table/Body/index.d.ts +0 -70
- package/lib/cjs/table/Body/index.js +0 -861
- package/lib/cjs/table/ColGroup.d.ts +0 -24
- package/lib/cjs/table/ColGroup.js +0 -78
- package/lib/cjs/table/Column.d.ts +0 -36
- package/lib/cjs/table/Column.js +0 -32
- package/lib/cjs/table/ColumnFilter.d.ts +0 -34
- package/lib/cjs/table/ColumnFilter.js +0 -192
- package/lib/cjs/table/ColumnSelection.d.ts +0 -40
- package/lib/cjs/table/ColumnSelection.js +0 -101
- package/lib/cjs/table/ColumnShape.d.ts +0 -32
- package/lib/cjs/table/ColumnShape.js +0 -47
- package/lib/cjs/table/ColumnSorter.d.ts +0 -25
- package/lib/cjs/table/ColumnSorter.js +0 -77
- package/lib/cjs/table/CustomExpandIcon.d.ts +0 -36
- package/lib/cjs/table/CustomExpandIcon.js +0 -102
- package/lib/cjs/table/HeadTable.d.ts +0 -20
- package/lib/cjs/table/HeadTable.js +0 -127
- package/lib/cjs/table/ResizableHeaderCell.d.ts +0 -13
- package/lib/cjs/table/ResizableHeaderCell.js +0 -75
- package/lib/cjs/table/ResizableTable.d.ts +0 -5
- package/lib/cjs/table/ResizableTable.js +0 -213
- package/lib/cjs/table/Table.d.ts +0 -305
- package/lib/cjs/table/Table.js +0 -1558
- package/lib/cjs/table/TableCell.d.ts +0 -124
- package/lib/cjs/table/TableCell.js +0 -394
- package/lib/cjs/table/TableContextProvider.d.ts +0 -3
- package/lib/cjs/table/TableContextProvider.js +0 -61
- package/lib/cjs/table/TableHeader.d.ts +0 -28
- package/lib/cjs/table/TableHeader.js +0 -190
- package/lib/cjs/table/TableHeaderRow.d.ts +0 -59
- package/lib/cjs/table/TableHeaderRow.js +0 -212
- package/lib/cjs/table/TablePagination.d.ts +0 -23
- package/lib/cjs/table/TablePagination.js +0 -67
- package/lib/cjs/table/getColumns.d.ts +0 -8
- package/lib/cjs/table/getColumns.js +0 -52
- package/lib/cjs/table/index.d.ts +0 -100
- package/lib/cjs/table/index.js +0 -85
- package/lib/cjs/table/interface.d.ts +0 -290
- package/lib/cjs/table/interface.js +0 -7
- package/lib/cjs/table/table-context.d.ts +0 -19
- package/lib/cjs/table/table-context.js +0 -25
- package/lib/cjs/table/utils.d.ts +0 -42
- package/lib/cjs/table/utils.js +0 -144
- package/lib/cjs/tabs/TabBar.d.ts +0 -41
- package/lib/cjs/tabs/TabBar.js +0 -309
- package/lib/cjs/tabs/TabPane.d.ts +0 -27
- package/lib/cjs/tabs/TabPane.js +0 -164
- package/lib/cjs/tabs/TabPaneTransition.d.ts +0 -4
- package/lib/cjs/tabs/TabPaneTransition.js +0 -119
- package/lib/cjs/tabs/index.d.ts +0 -50
- package/lib/cjs/tabs/index.js +0 -365
- package/lib/cjs/tabs/interface.d.ts +0 -72
- package/lib/cjs/tabs/interface.js +0 -7
- package/lib/cjs/tabs/tabs-context.d.ts +0 -4
- package/lib/cjs/tabs/tabs-context.js +0 -18
- package/lib/cjs/tag/group.d.ts +0 -40
- package/lib/cjs/tag/group.js +0 -165
- package/lib/cjs/tag/index.d.ts +0 -33
- package/lib/cjs/tag/index.js +0 -219
- package/lib/cjs/tag/interface.d.ts +0 -30
- package/lib/cjs/tag/interface.js +0 -7
- package/lib/cjs/tagInput/index.d.ts +0 -130
- package/lib/cjs/tagInput/index.js +0 -414
- package/lib/cjs/timePicker/Combobox.d.ts +0 -73
- package/lib/cjs/timePicker/Combobox.js +0 -344
- package/lib/cjs/timePicker/PanelShape.d.ts +0 -6
- package/lib/cjs/timePicker/PanelShape.js +0 -21
- package/lib/cjs/timePicker/TimeInput.d.ts +0 -66
- package/lib/cjs/timePicker/TimeInput.js +0 -226
- package/lib/cjs/timePicker/TimePicker.d.ts +0 -197
- package/lib/cjs/timePicker/TimePicker.js +0 -501
- package/lib/cjs/timePicker/TimeShape.d.ts +0 -10
- package/lib/cjs/timePicker/TimeShape.js +0 -26
- package/lib/cjs/timePicker/index.d.ts +0 -95
- package/lib/cjs/timePicker/index.js +0 -51
- package/lib/cjs/timeline/index.d.ts +0 -31
- package/lib/cjs/timeline/index.js +0 -145
- package/lib/cjs/timeline/item.d.ts +0 -30
- package/lib/cjs/timeline/item.js +0 -94
- package/lib/cjs/toast/ToastTransition.d.ts +0 -7
- package/lib/cjs/toast/ToastTransition.js +0 -71
- package/lib/cjs/toast/index.d.ts +0 -200
- package/lib/cjs/toast/index.js +0 -281
- package/lib/cjs/toast/toast.d.ts +0 -45
- package/lib/cjs/toast/toast.js +0 -185
- package/lib/cjs/toast/useToast/HookToast.d.ts +0 -7
- package/lib/cjs/toast/useToast/HookToast.js +0 -72
- package/lib/cjs/toast/useToast/index.d.ts +0 -9
- package/lib/cjs/toast/useToast/index.js +0 -107
- package/lib/cjs/tooltip/ArrowBoundingShape.d.ts +0 -8
- package/lib/cjs/tooltip/ArrowBoundingShape.js +0 -22
- package/lib/cjs/tooltip/TooltipStyledTransition.d.ts +0 -9
- package/lib/cjs/tooltip/TooltipStyledTransition.js +0 -54
- package/lib/cjs/tooltip/TriangleArrow.d.ts +0 -5
- package/lib/cjs/tooltip/TriangleArrow.js +0 -54
- package/lib/cjs/tooltip/TriangleArrowVertical.d.ts +0 -5
- package/lib/cjs/tooltip/TriangleArrowVertical.js +0 -53
- package/lib/cjs/tooltip/index.d.ts +0 -147
- package/lib/cjs/tooltip/index.js +0 -698
- package/lib/cjs/transfer/index.d.ts +0 -164
- package/lib/cjs/transfer/index.js +0 -660
- package/lib/cjs/tree/autoSizer.d.ts +0 -28
- package/lib/cjs/tree/autoSizer.js +0 -115
- package/lib/cjs/tree/collapse.d.ts +0 -29
- package/lib/cjs/tree/collapse.js +0 -164
- package/lib/cjs/tree/index.d.ts +0 -135
- package/lib/cjs/tree/index.js +0 -793
- package/lib/cjs/tree/interface.d.ts +0 -119
- package/lib/cjs/tree/interface.js +0 -7
- package/lib/cjs/tree/nodeList.d.ts +0 -9
- package/lib/cjs/tree/nodeList.js +0 -141
- package/lib/cjs/tree/treeContext.d.ts +0 -40
- package/lib/cjs/tree/treeContext.js +0 -18
- package/lib/cjs/tree/treeNode.d.ts +0 -54
- package/lib/cjs/tree/treeNode.js +0 -527
- package/lib/cjs/tree/treeUtil.d.ts +0 -1
- package/lib/cjs/tree/treeUtil.js +0 -28
- package/lib/cjs/treeSelect/index.d.ts +0 -232
- package/lib/cjs/treeSelect/index.js +0 -1274
- package/lib/cjs/trigger/index.d.ts +0 -36
- package/lib/cjs/trigger/index.js +0 -71
- package/lib/cjs/typography/base.d.ts +0 -176
- package/lib/cjs/typography/base.js +0 -714
- package/lib/cjs/typography/copyable.d.ts +0 -43
- package/lib/cjs/typography/copyable.js +0 -151
- package/lib/cjs/typography/index.d.ts +0 -17
- package/lib/cjs/typography/index.js +0 -48
- package/lib/cjs/typography/interface.d.ts +0 -25
- package/lib/cjs/typography/interface.js +0 -7
- package/lib/cjs/typography/paragraph.d.ts +0 -56
- package/lib/cjs/typography/paragraph.js +0 -83
- package/lib/cjs/typography/text.d.ts +0 -59
- package/lib/cjs/typography/text.js +0 -73
- package/lib/cjs/typography/title.d.ts +0 -61
- package/lib/cjs/typography/title.js +0 -97
- package/lib/cjs/typography/typography.d.ts +0 -22
- package/lib/cjs/typography/typography.js +0 -82
- package/lib/cjs/typography/util.d.ts +0 -2
- package/lib/cjs/typography/util.js +0 -155
- package/lib/cjs/upload/fileCard.d.ts +0 -62
- package/lib/cjs/upload/fileCard.js +0 -388
- package/lib/cjs/upload/index.d.ts +0 -214
- package/lib/cjs/upload/index.js +0 -552
|
@@ -1,660 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
exports.default = void 0;
|
|
12
|
-
|
|
13
|
-
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/map"));
|
|
14
|
-
|
|
15
|
-
var _set = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/set"));
|
|
16
|
-
|
|
17
|
-
var _bind = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/bind"));
|
|
18
|
-
|
|
19
|
-
var _isArray = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/is-array"));
|
|
20
|
-
|
|
21
|
-
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
22
|
-
|
|
23
|
-
var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
|
|
24
|
-
|
|
25
|
-
var _map2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
26
|
-
|
|
27
|
-
var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/assign"));
|
|
28
|
-
|
|
29
|
-
var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find"));
|
|
30
|
-
|
|
31
|
-
var _forEach = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
|
|
32
|
-
|
|
33
|
-
var _values = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/values"));
|
|
34
|
-
|
|
35
|
-
var _react = _interopRequireDefault(require("react"));
|
|
36
|
-
|
|
37
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
38
|
-
|
|
39
|
-
var _reactSortableHoc = require("react-sortable-hoc");
|
|
40
|
-
|
|
41
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
42
|
-
|
|
43
|
-
var _lodashEs = require("lodash-es");
|
|
44
|
-
|
|
45
|
-
var _foundation = _interopRequireDefault(require("@douyinfe/semi-foundation/lib/cjs/transfer/foundation"));
|
|
46
|
-
|
|
47
|
-
var _transferUtlls = require("@douyinfe/semi-foundation/lib/cjs/transfer/transferUtlls");
|
|
48
|
-
|
|
49
|
-
var _constants = require("@douyinfe/semi-foundation/lib/cjs/transfer/constants");
|
|
50
|
-
|
|
51
|
-
require("@douyinfe/semi-foundation/lib/cjs/transfer/transfer.css");
|
|
52
|
-
|
|
53
|
-
var _baseComponent = _interopRequireDefault(require("../_base/baseComponent"));
|
|
54
|
-
|
|
55
|
-
var _localeConsumer = _interopRequireDefault(require("../locale/localeConsumer"));
|
|
56
|
-
|
|
57
|
-
var _index = require("../checkbox/index");
|
|
58
|
-
|
|
59
|
-
var _index2 = _interopRequireDefault(require("../input/index"));
|
|
60
|
-
|
|
61
|
-
var _spin = _interopRequireDefault(require("../spin"));
|
|
62
|
-
|
|
63
|
-
var _button = _interopRequireDefault(require("../button"));
|
|
64
|
-
|
|
65
|
-
var _tree = _interopRequireDefault(require("../tree"));
|
|
66
|
-
|
|
67
|
-
var _semiIcons = require("@douyinfe/semi-icons");
|
|
68
|
-
|
|
69
|
-
const prefixcls = _constants.cssClasses.PREFIX;
|
|
70
|
-
|
|
71
|
-
class Transfer extends _baseComponent.default {
|
|
72
|
-
constructor(props) {
|
|
73
|
-
var _context, _context2, _context3;
|
|
74
|
-
|
|
75
|
-
super(props);
|
|
76
|
-
this._treeRef = null;
|
|
77
|
-
const {
|
|
78
|
-
defaultValue = [],
|
|
79
|
-
dataSource,
|
|
80
|
-
type
|
|
81
|
-
} = props;
|
|
82
|
-
this.foundation = new _foundation.default(this.adapter);
|
|
83
|
-
this.state = {
|
|
84
|
-
data: [],
|
|
85
|
-
selectedItems: new _map.default(),
|
|
86
|
-
searchResult: new _set.default(),
|
|
87
|
-
inputValue: ''
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
if (Boolean(dataSource) && (0, _lodashEs.isArray)(dataSource)) {
|
|
91
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
92
|
-
// @ts-ignore Avoid reporting errors this.state.xxx is read-only
|
|
93
|
-
this.state.data = (0, _transferUtlls._generateDataByType)(dataSource, type);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
if (Boolean(defaultValue) && (0, _lodashEs.isArray)(defaultValue)) {
|
|
97
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
98
|
-
// @ts-ignore Avoid reporting errors this.state.xxx is read-only
|
|
99
|
-
this.state.selectedItems = (0, _transferUtlls._generateSelectedItems)(defaultValue, this.state.data);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
this.onSelectOrRemove = (0, _bind.default)(_context = this.onSelectOrRemove).call(_context, this);
|
|
103
|
-
this.onInputChange = (0, _bind.default)(_context2 = this.onInputChange).call(_context2, this);
|
|
104
|
-
this.onSortEnd = (0, _bind.default)(_context3 = this.onSortEnd).call(_context3, this);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
static getDerivedStateFromProps(props, state) {
|
|
108
|
-
const {
|
|
109
|
-
value,
|
|
110
|
-
dataSource,
|
|
111
|
-
type,
|
|
112
|
-
filter
|
|
113
|
-
} = props;
|
|
114
|
-
const mergedState = {};
|
|
115
|
-
let newData = state.data;
|
|
116
|
-
let newSelectedItems = state.selectedItems;
|
|
117
|
-
|
|
118
|
-
if (Boolean(dataSource) && (0, _isArray.default)(dataSource)) {
|
|
119
|
-
newData = (0, _transferUtlls._generateDataByType)(dataSource, type);
|
|
120
|
-
mergedState.data = newData;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
if (Boolean(value) && (0, _isArray.default)(value)) {
|
|
124
|
-
newSelectedItems = (0, _transferUtlls._generateSelectedItems)(value, newData);
|
|
125
|
-
mergedState.selectedItems = newSelectedItems;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
if (!(0, _lodashEs.isEqual)(state.data, newData)) {
|
|
129
|
-
if (typeof state.inputValue === 'string' && state.inputValue !== '') {
|
|
130
|
-
const filterFunc = typeof filter === 'function' ? item => filter(state.inputValue, item) : item => {
|
|
131
|
-
var _context4;
|
|
132
|
-
|
|
133
|
-
return typeof item.label === 'string' && (0, _includes.default)(_context4 = item.label).call(_context4, state.inputValue);
|
|
134
|
-
};
|
|
135
|
-
const searchData = (0, _filter.default)(newData).call(newData, filterFunc);
|
|
136
|
-
const searchResult = new _set.default((0, _map2.default)(searchData).call(searchData, item => item.key));
|
|
137
|
-
mergedState.searchResult = searchResult;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
return (0, _lodashEs.isEmpty)(mergedState) ? null : mergedState;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
get adapter() {
|
|
145
|
-
return (0, _assign.default)((0, _assign.default)({}, super.adapter), {
|
|
146
|
-
getSelected: () => new _map.default(this.state.selectedItems),
|
|
147
|
-
updateSelected: selectedItems => {
|
|
148
|
-
this.setState({
|
|
149
|
-
selectedItems
|
|
150
|
-
});
|
|
151
|
-
},
|
|
152
|
-
notifyChange: (values, items) => {
|
|
153
|
-
this.props.onChange(values, items);
|
|
154
|
-
},
|
|
155
|
-
notifySearch: input => {
|
|
156
|
-
this.props.onSearch(input);
|
|
157
|
-
},
|
|
158
|
-
notifySelect: item => {
|
|
159
|
-
this.props.onSelect(item);
|
|
160
|
-
},
|
|
161
|
-
notifyDeselect: item => {
|
|
162
|
-
this.props.onDeselect(item);
|
|
163
|
-
},
|
|
164
|
-
updateInput: input => {
|
|
165
|
-
this.setState({
|
|
166
|
-
inputValue: input
|
|
167
|
-
});
|
|
168
|
-
},
|
|
169
|
-
updateSearchResult: searchResult => {
|
|
170
|
-
this.setState({
|
|
171
|
-
searchResult
|
|
172
|
-
});
|
|
173
|
-
},
|
|
174
|
-
searchTree: keyword => {
|
|
175
|
-
this._treeRef && this._treeRef.search(keyword); // TODO check this._treeRef.current?
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
onInputChange(value) {
|
|
181
|
-
this.foundation.handleInputChange(value);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
onSelectOrRemove(item) {
|
|
185
|
-
this.foundation.handleSelectOrRemove(item);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
onSortEnd(callbackProps) {
|
|
189
|
-
this.foundation.handleSortEnd(callbackProps);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
renderFilter(locale) {
|
|
193
|
-
const {
|
|
194
|
-
inputProps,
|
|
195
|
-
filter,
|
|
196
|
-
disabled
|
|
197
|
-
} = this.props;
|
|
198
|
-
|
|
199
|
-
if (typeof filter === 'boolean' && !filter) {
|
|
200
|
-
return null;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
204
|
-
className: "".concat(prefixcls, "-filter")
|
|
205
|
-
}, /*#__PURE__*/_react.default.createElement(_index2.default, (0, _assign.default)({
|
|
206
|
-
prefix: /*#__PURE__*/_react.default.createElement(_semiIcons.IconSearch, null),
|
|
207
|
-
placeholder: locale.placeholder,
|
|
208
|
-
showClear: true,
|
|
209
|
-
value: this.state.inputValue,
|
|
210
|
-
disabled: disabled,
|
|
211
|
-
onChange: this.onInputChange
|
|
212
|
-
}, inputProps)));
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
renderHeader(headerConfig) {
|
|
216
|
-
const {
|
|
217
|
-
disabled
|
|
218
|
-
} = this.props;
|
|
219
|
-
const {
|
|
220
|
-
totalContent,
|
|
221
|
-
allContent,
|
|
222
|
-
onAllClick,
|
|
223
|
-
type,
|
|
224
|
-
showButton
|
|
225
|
-
} = headerConfig;
|
|
226
|
-
const headerCls = (0, _classnames.default)({
|
|
227
|
-
["".concat(prefixcls, "-header")]: true,
|
|
228
|
-
["".concat(prefixcls, "-right-header")]: type === 'right',
|
|
229
|
-
["".concat(prefixcls, "-left-header")]: type === 'left'
|
|
230
|
-
});
|
|
231
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
232
|
-
className: headerCls
|
|
233
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
234
|
-
className: "".concat(prefixcls, "-header-total")
|
|
235
|
-
}, totalContent), showButton ? /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
236
|
-
theme: "borderless",
|
|
237
|
-
disabled: disabled,
|
|
238
|
-
type: "tertiary",
|
|
239
|
-
size: "small",
|
|
240
|
-
className: "".concat(prefixcls, "-header-all"),
|
|
241
|
-
onClick: onAllClick
|
|
242
|
-
}, allContent) : null);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
renderLeftItem(item, index) {
|
|
246
|
-
const {
|
|
247
|
-
renderSourceItem,
|
|
248
|
-
disabled
|
|
249
|
-
} = this.props;
|
|
250
|
-
const {
|
|
251
|
-
selectedItems
|
|
252
|
-
} = this.state;
|
|
253
|
-
const checked = selectedItems.has(item.key);
|
|
254
|
-
|
|
255
|
-
if (renderSourceItem) {
|
|
256
|
-
return renderSourceItem((0, _assign.default)((0, _assign.default)({}, item), {
|
|
257
|
-
checked,
|
|
258
|
-
onChange: () => this.onSelectOrRemove(item)
|
|
259
|
-
}));
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
const leftItemCls = (0, _classnames.default)({
|
|
263
|
-
["".concat(prefixcls, "-item")]: true,
|
|
264
|
-
["".concat(prefixcls, "-item-disabled")]: item.disabled
|
|
265
|
-
});
|
|
266
|
-
return /*#__PURE__*/_react.default.createElement(_index.Checkbox, {
|
|
267
|
-
key: index,
|
|
268
|
-
disabled: item.disabled || disabled,
|
|
269
|
-
className: leftItemCls,
|
|
270
|
-
checked: checked,
|
|
271
|
-
onChange: () => this.onSelectOrRemove(item)
|
|
272
|
-
}, item.label);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
renderLeft(locale) {
|
|
276
|
-
var _context5;
|
|
277
|
-
|
|
278
|
-
const {
|
|
279
|
-
data,
|
|
280
|
-
selectedItems,
|
|
281
|
-
inputValue,
|
|
282
|
-
searchResult
|
|
283
|
-
} = this.state;
|
|
284
|
-
const {
|
|
285
|
-
loading,
|
|
286
|
-
type,
|
|
287
|
-
emptyContent,
|
|
288
|
-
renderSourcePanel
|
|
289
|
-
} = this.props;
|
|
290
|
-
const totalToken = locale.total;
|
|
291
|
-
const inSearchMode = inputValue !== '';
|
|
292
|
-
const showNumber = inSearchMode ? searchResult.size : data.length;
|
|
293
|
-
const filterData = inSearchMode ? (0, _filter.default)(data).call(data, item => searchResult.has(item.key)) : data; // Whether to select all should be a judgment, whether the filtered data on the left is a subset of the selected items
|
|
294
|
-
// For example, the filtered data on the left is 1, 3, 4;
|
|
295
|
-
// The selected option is 1,2,3,4, it is true
|
|
296
|
-
// The selected option is 2,3,4, then it is false
|
|
297
|
-
|
|
298
|
-
const leftContainesNotInSelected = Boolean((0, _find.default)(filterData).call(filterData, f => !selectedItems.has(f.key)));
|
|
299
|
-
const totalText = totalToken.replace('${total}', "".concat(showNumber));
|
|
300
|
-
const headerConfig = {
|
|
301
|
-
totalContent: totalText,
|
|
302
|
-
allContent: leftContainesNotInSelected ? locale.selectAll : locale.clearSelectAll,
|
|
303
|
-
onAllClick: () => this.foundation.handleAll(leftContainesNotInSelected),
|
|
304
|
-
type: 'left',
|
|
305
|
-
showButton: type !== _constants.strings.TYPE_TREE_TO_LIST
|
|
306
|
-
};
|
|
307
|
-
const inputCom = this.renderFilter(locale);
|
|
308
|
-
const headerCom = this.renderHeader(headerConfig);
|
|
309
|
-
const noMatch = inSearchMode && searchResult.size === 0;
|
|
310
|
-
const emptySearch = emptyContent.search ? emptyContent.search : locale.emptySearch;
|
|
311
|
-
const emptyLeft = emptyContent.left ? emptyContent.left : locale.emptyLeft;
|
|
312
|
-
const emptyCom = this.renderEmpty('left', inputValue ? emptySearch : emptyLeft);
|
|
313
|
-
|
|
314
|
-
const loadingCom = /*#__PURE__*/_react.default.createElement(_spin.default, null);
|
|
315
|
-
|
|
316
|
-
let content = null;
|
|
317
|
-
|
|
318
|
-
switch (true) {
|
|
319
|
-
case loading:
|
|
320
|
-
content = loadingCom;
|
|
321
|
-
break;
|
|
322
|
-
|
|
323
|
-
case noMatch:
|
|
324
|
-
content = emptyCom;
|
|
325
|
-
break;
|
|
326
|
-
|
|
327
|
-
case type === _constants.strings.TYPE_TREE_TO_LIST:
|
|
328
|
-
content = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, headerCom, this.renderLeftTree());
|
|
329
|
-
break;
|
|
330
|
-
|
|
331
|
-
case !noMatch && (type === _constants.strings.TYPE_LIST || type === _constants.strings.TYPE_GROUP_LIST):
|
|
332
|
-
content = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, headerCom, this.renderLeftList(filterData));
|
|
333
|
-
break;
|
|
334
|
-
|
|
335
|
-
default:
|
|
336
|
-
content = null;
|
|
337
|
-
break;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
const {
|
|
341
|
-
values
|
|
342
|
-
} = this.foundation.getValuesAndItemsFromMap(selectedItems);
|
|
343
|
-
const renderProps = {
|
|
344
|
-
loading,
|
|
345
|
-
noMatch,
|
|
346
|
-
filterData,
|
|
347
|
-
sourceData: data,
|
|
348
|
-
allChecked: !leftContainesNotInSelected,
|
|
349
|
-
showNumber,
|
|
350
|
-
inputValue,
|
|
351
|
-
selectedItems,
|
|
352
|
-
value: values,
|
|
353
|
-
onSelect: (0, _bind.default)(_context5 = this.foundation.handleSelect).call(_context5, this.foundation),
|
|
354
|
-
onAllClick: () => this.foundation.handleAll(leftContainesNotInSelected),
|
|
355
|
-
onSearch: this.onInputChange,
|
|
356
|
-
onSelectOrRemove: item => this.onSelectOrRemove(item)
|
|
357
|
-
};
|
|
358
|
-
|
|
359
|
-
if (renderSourcePanel) {
|
|
360
|
-
return renderSourcePanel(renderProps);
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
return /*#__PURE__*/_react.default.createElement("section", {
|
|
364
|
-
className: "".concat(prefixcls, "-left")
|
|
365
|
-
}, inputCom, content);
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
renderGroupTitle(group) {
|
|
369
|
-
const groupCls = (0, _classnames.default)("".concat(prefixcls, "-group-title"));
|
|
370
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
371
|
-
className: groupCls,
|
|
372
|
-
key: group.title
|
|
373
|
-
}, group.title);
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
renderLeftTree() {
|
|
377
|
-
const {
|
|
378
|
-
selectedItems
|
|
379
|
-
} = this.state;
|
|
380
|
-
const {
|
|
381
|
-
disabled,
|
|
382
|
-
dataSource,
|
|
383
|
-
treeProps
|
|
384
|
-
} = this.props;
|
|
385
|
-
const {
|
|
386
|
-
values
|
|
387
|
-
} = this.foundation.getValuesAndItemsFromMap(selectedItems);
|
|
388
|
-
|
|
389
|
-
const onChange = value => {
|
|
390
|
-
this.foundation.handleSelect(value);
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
const restTreeProps = (0, _lodashEs.omit)(treeProps, ['value', 'ref', 'onChange']);
|
|
394
|
-
return /*#__PURE__*/_react.default.createElement(_tree.default, (0, _assign.default)({
|
|
395
|
-
disabled: disabled,
|
|
396
|
-
treeData: dataSource,
|
|
397
|
-
multiple: true,
|
|
398
|
-
disableStrictly: true,
|
|
399
|
-
value: values,
|
|
400
|
-
defaultExpandAll: true,
|
|
401
|
-
leafOnly: true,
|
|
402
|
-
ref: tree => this._treeRef = tree,
|
|
403
|
-
filterTreeNode: true,
|
|
404
|
-
searchRender: false,
|
|
405
|
-
searchStyle: {
|
|
406
|
-
padding: 0
|
|
407
|
-
},
|
|
408
|
-
style: {
|
|
409
|
-
flex: 1,
|
|
410
|
-
overflow: 'overlay'
|
|
411
|
-
},
|
|
412
|
-
onChange: onChange
|
|
413
|
-
}, restTreeProps));
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
renderLeftList(visibileItems) {
|
|
417
|
-
const content = [];
|
|
418
|
-
const groupStatus = new _map.default();
|
|
419
|
-
(0, _forEach.default)(visibileItems).call(visibileItems, (item, index) => {
|
|
420
|
-
const parentGroup = item._parent;
|
|
421
|
-
const optionContent = this.renderLeftItem(item, index);
|
|
422
|
-
|
|
423
|
-
if (parentGroup && groupStatus.has(parentGroup.title)) {
|
|
424
|
-
// group content already insert
|
|
425
|
-
content.push(optionContent);
|
|
426
|
-
} else if (parentGroup) {
|
|
427
|
-
const groupContent = this.renderGroupTitle(parentGroup);
|
|
428
|
-
groupStatus.set(parentGroup.title, true);
|
|
429
|
-
content.push(groupContent);
|
|
430
|
-
content.push(optionContent);
|
|
431
|
-
} else {
|
|
432
|
-
content.push(optionContent);
|
|
433
|
-
}
|
|
434
|
-
});
|
|
435
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
436
|
-
className: "".concat(prefixcls, "-left-list")
|
|
437
|
-
}, content);
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
renderRightItem(item) {
|
|
441
|
-
const {
|
|
442
|
-
renderSelectedItem,
|
|
443
|
-
draggable,
|
|
444
|
-
type,
|
|
445
|
-
showPath
|
|
446
|
-
} = this.props;
|
|
447
|
-
let newItem = item;
|
|
448
|
-
|
|
449
|
-
if (draggable) {
|
|
450
|
-
newItem = (0, _assign.default)((0, _assign.default)({}, item), {
|
|
451
|
-
key: item._optionKey
|
|
452
|
-
});
|
|
453
|
-
delete newItem._optionKey;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
const onRemove = () => this.foundation.handleSelectOrRemove(newItem);
|
|
457
|
-
|
|
458
|
-
const rightItemCls = (0, _classnames.default)({
|
|
459
|
-
["".concat(prefixcls, "-item")]: true,
|
|
460
|
-
["".concat(prefixcls, "-right-item")]: true,
|
|
461
|
-
["".concat(prefixcls, "-right-item-draggable")]: draggable
|
|
462
|
-
});
|
|
463
|
-
const shouldShowPath = type === _constants.strings.TYPE_TREE_TO_LIST && showPath === true;
|
|
464
|
-
const label = shouldShowPath ? this.foundation._generatePath(item) : item.label;
|
|
465
|
-
|
|
466
|
-
if (renderSelectedItem) {
|
|
467
|
-
return renderSelectedItem((0, _assign.default)((0, _assign.default)({}, item), {
|
|
468
|
-
onRemove,
|
|
469
|
-
sortableHandle: _reactSortableHoc.SortableHandle
|
|
470
|
-
}));
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
const DragHandle = (0, _reactSortableHoc.SortableHandle)(() => /*#__PURE__*/_react.default.createElement(_semiIcons.IconHandle, {
|
|
474
|
-
className: "".concat(prefixcls, "-right-item-drag-handler")
|
|
475
|
-
}));
|
|
476
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
477
|
-
className: rightItemCls,
|
|
478
|
-
key: newItem.key
|
|
479
|
-
}, draggable ? /*#__PURE__*/_react.default.createElement(DragHandle, null) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
480
|
-
className: "".concat(prefixcls, "-right-item-text")
|
|
481
|
-
}, label), /*#__PURE__*/_react.default.createElement(_semiIcons.IconClose, {
|
|
482
|
-
onClick: onRemove,
|
|
483
|
-
className: (0, _classnames.default)("".concat(prefixcls, "-item-close-icon"), {
|
|
484
|
-
["".concat(prefixcls, "-item-close-icon-disabled")]: item.disabled
|
|
485
|
-
})
|
|
486
|
-
}));
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
renderEmpty(type, emptyText) {
|
|
490
|
-
const emptyCls = (0, _classnames.default)({
|
|
491
|
-
["".concat(prefixcls, "-empty")]: true,
|
|
492
|
-
["".concat(prefixcls, "-right-empty")]: type === 'right',
|
|
493
|
-
["".concat(prefixcls, "-left-empty")]: type === 'left'
|
|
494
|
-
});
|
|
495
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
496
|
-
className: emptyCls
|
|
497
|
-
}, emptyText);
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
renderRightSortableList(selectedData) {
|
|
501
|
-
// when choose some items && draggable is true
|
|
502
|
-
const SortableItem = (0, _reactSortableHoc.SortableElement)(item => this.renderRightItem(item));
|
|
503
|
-
const SortableList = (0, _reactSortableHoc.SortableContainer)(_ref => {
|
|
504
|
-
let {
|
|
505
|
-
items
|
|
506
|
-
} = _ref;
|
|
507
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
508
|
-
className: "".concat(prefixcls, "-right-list")
|
|
509
|
-
}, (0, _map2.default)(items).call(items, (item, index) =>
|
|
510
|
-
/*#__PURE__*/
|
|
511
|
-
// sortableElement will take over the property 'key', so use another '_optionKey' to pass
|
|
512
|
-
_react.default.createElement(SortableItem, (0, _assign.default)({
|
|
513
|
-
key: item.label,
|
|
514
|
-
index: index
|
|
515
|
-
}, item, {
|
|
516
|
-
_optionKey: item.key
|
|
517
|
-
})))) // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
518
|
-
// @ts-ignore see reasons: https://github.com/clauderic/react-sortable-hoc/issues/206
|
|
519
|
-
;
|
|
520
|
-
}, {
|
|
521
|
-
distance: 10
|
|
522
|
-
});
|
|
523
|
-
|
|
524
|
-
const sortList = /*#__PURE__*/_react.default.createElement(SortableList, {
|
|
525
|
-
useDragHandle: true,
|
|
526
|
-
onSortEnd: this.onSortEnd,
|
|
527
|
-
items: selectedData
|
|
528
|
-
});
|
|
529
|
-
|
|
530
|
-
return sortList;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
renderRight(locale) {
|
|
534
|
-
const {
|
|
535
|
-
selectedItems
|
|
536
|
-
} = this.state;
|
|
537
|
-
const {
|
|
538
|
-
emptyContent,
|
|
539
|
-
renderSelectedPanel,
|
|
540
|
-
draggable
|
|
541
|
-
} = this.props;
|
|
542
|
-
const selectedData = [...(0, _values.default)(selectedItems).call(selectedItems)]; // when custom render panel
|
|
543
|
-
|
|
544
|
-
const renderProps = {
|
|
545
|
-
length: selectedData.length,
|
|
546
|
-
selectedData,
|
|
547
|
-
onClear: () => this.foundation.handleClear(),
|
|
548
|
-
onRemove: item => this.foundation.handleSelectOrRemove(item),
|
|
549
|
-
onSortEnd: props => this.onSortEnd(props)
|
|
550
|
-
};
|
|
551
|
-
|
|
552
|
-
if (renderSelectedPanel) {
|
|
553
|
-
return renderSelectedPanel(renderProps);
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
const selectedToken = locale.selected;
|
|
557
|
-
const selectedText = selectedToken.replace('${total}', "".concat(selectedData.length));
|
|
558
|
-
const headerConfig = {
|
|
559
|
-
totalContent: selectedText,
|
|
560
|
-
allContent: locale.clear,
|
|
561
|
-
onAllClick: () => this.foundation.handleClear(),
|
|
562
|
-
type: 'right',
|
|
563
|
-
showButton: Boolean(selectedData.length)
|
|
564
|
-
};
|
|
565
|
-
const headerCom = this.renderHeader(headerConfig);
|
|
566
|
-
const emptyCom = this.renderEmpty('right', emptyContent.right ? emptyContent.right : locale.emptyRight);
|
|
567
|
-
const panelCls = "".concat(prefixcls, "-right");
|
|
568
|
-
let content = null;
|
|
569
|
-
|
|
570
|
-
switch (true) {
|
|
571
|
-
// when empty
|
|
572
|
-
case !selectedData.length:
|
|
573
|
-
content = emptyCom;
|
|
574
|
-
break;
|
|
575
|
-
|
|
576
|
-
case selectedData.length && !draggable:
|
|
577
|
-
const list = /*#__PURE__*/_react.default.createElement("div", {
|
|
578
|
-
className: "".concat(prefixcls, "-right-list")
|
|
579
|
-
}, (0, _map2.default)(selectedData).call(selectedData, item => this.renderRightItem((0, _assign.default)({}, item))));
|
|
580
|
-
|
|
581
|
-
content = list;
|
|
582
|
-
break;
|
|
583
|
-
|
|
584
|
-
case selectedData.length && draggable:
|
|
585
|
-
content = this.renderRightSortableList(selectedData);
|
|
586
|
-
break;
|
|
587
|
-
|
|
588
|
-
default:
|
|
589
|
-
break;
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
return /*#__PURE__*/_react.default.createElement("section", {
|
|
593
|
-
className: panelCls
|
|
594
|
-
}, headerCom, content);
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
render() {
|
|
598
|
-
const {
|
|
599
|
-
className,
|
|
600
|
-
style,
|
|
601
|
-
disabled,
|
|
602
|
-
renderSelectedPanel,
|
|
603
|
-
renderSourcePanel
|
|
604
|
-
} = this.props;
|
|
605
|
-
const transferCls = (0, _classnames.default)(prefixcls, className, {
|
|
606
|
-
["".concat(prefixcls, "-disabled")]: disabled,
|
|
607
|
-
["".concat(prefixcls, "-custom-panel")]: renderSelectedPanel && renderSourcePanel
|
|
608
|
-
});
|
|
609
|
-
return /*#__PURE__*/_react.default.createElement(_localeConsumer.default, {
|
|
610
|
-
componentName: "Transfer"
|
|
611
|
-
}, locale => /*#__PURE__*/_react.default.createElement("div", {
|
|
612
|
-
className: transferCls,
|
|
613
|
-
style: style
|
|
614
|
-
}, this.renderLeft(locale), this.renderRight(locale)));
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
Transfer.propTypes = {
|
|
620
|
-
style: _propTypes.default.object,
|
|
621
|
-
className: _propTypes.default.string,
|
|
622
|
-
disabled: _propTypes.default.bool,
|
|
623
|
-
dataSource: _propTypes.default.array,
|
|
624
|
-
filter: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.bool]),
|
|
625
|
-
onSearch: _propTypes.default.func,
|
|
626
|
-
inputProps: _propTypes.default.object,
|
|
627
|
-
value: _propTypes.default.array,
|
|
628
|
-
defaultValue: _propTypes.default.array,
|
|
629
|
-
onChange: _propTypes.default.func,
|
|
630
|
-
onSelect: _propTypes.default.func,
|
|
631
|
-
onDeselect: _propTypes.default.func,
|
|
632
|
-
renderSourceItem: _propTypes.default.func,
|
|
633
|
-
renderSelectedItem: _propTypes.default.func,
|
|
634
|
-
loading: _propTypes.default.bool,
|
|
635
|
-
type: _propTypes.default.oneOf(['list', 'groupList', 'treeList']),
|
|
636
|
-
treeProps: _propTypes.default.object,
|
|
637
|
-
showPath: _propTypes.default.bool,
|
|
638
|
-
emptyContent: _propTypes.default.shape({
|
|
639
|
-
search: _propTypes.default.node,
|
|
640
|
-
left: _propTypes.default.node,
|
|
641
|
-
right: _propTypes.default.node
|
|
642
|
-
}),
|
|
643
|
-
renderSourcePanel: _propTypes.default.func,
|
|
644
|
-
renderSelectedPanel: _propTypes.default.func,
|
|
645
|
-
draggable: _propTypes.default.bool
|
|
646
|
-
};
|
|
647
|
-
Transfer.defaultProps = {
|
|
648
|
-
type: _constants.strings.TYPE_LIST,
|
|
649
|
-
dataSource: [],
|
|
650
|
-
onSearch: _lodashEs.noop,
|
|
651
|
-
onChange: _lodashEs.noop,
|
|
652
|
-
onSelect: _lodashEs.noop,
|
|
653
|
-
onDeselect: _lodashEs.noop,
|
|
654
|
-
onClear: _lodashEs.noop,
|
|
655
|
-
defaultValue: [],
|
|
656
|
-
emptyContent: {},
|
|
657
|
-
showPath: false
|
|
658
|
-
};
|
|
659
|
-
var _default = Transfer;
|
|
660
|
-
exports.default = _default;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React, { PureComponent } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { ResizeEntry } from '../resizeObserver';
|
|
4
|
-
export interface AutoSizerProps {
|
|
5
|
-
defaultHeight?: number | string;
|
|
6
|
-
defaultWidth?: number | string;
|
|
7
|
-
children?: (info: {
|
|
8
|
-
width: string | number;
|
|
9
|
-
height: string | number;
|
|
10
|
-
}) => React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
export interface AutoSizerState {
|
|
13
|
-
height: number | string;
|
|
14
|
-
}
|
|
15
|
-
export default class AutoSizer extends PureComponent<AutoSizerProps, AutoSizerState> {
|
|
16
|
-
static propTypes: {
|
|
17
|
-
defaultHeight: PropTypes.Requireable<string | number>;
|
|
18
|
-
defaultWidth: PropTypes.Requireable<string | number>;
|
|
19
|
-
};
|
|
20
|
-
static defaultProps: {
|
|
21
|
-
defaultHeight: string;
|
|
22
|
-
defaultWidth: string;
|
|
23
|
-
};
|
|
24
|
-
constructor(props: AutoSizerProps);
|
|
25
|
-
componentDidMount(): void;
|
|
26
|
-
_onResize: (entries: ResizeEntry[]) => void;
|
|
27
|
-
render(): JSX.Element;
|
|
28
|
-
}
|