@hi-ui/hiui 3.9.0-rc.8 → 4.0.0-beta.1
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/README.md +5 -79
- package/lib/cjs/index.js +576 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/esm/index.js +66 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/types/index.d.ts +56 -0
- package/package.json +101 -184
- package/CHANGELOG.md +0 -330
- package/es/_util/EventEmitter.js +0 -56
- package/es/_util/SwitchVersion.js +0 -40
- package/es/_util/depreactedPropsCompat.js +0 -58
- package/es/_util/deprecatedPropsCheck.js +0 -21
- package/es/_util/index.js +0 -31
- package/es/_util/warning.js +0 -19
- package/es/alert/Alert.js +0 -129
- package/es/alert/__tests__/index.test.js +0 -84
- package/es/alert/index.d.ts +0 -18
- package/es/alert/index.js +0 -20
- package/es/alert/style/index.css +0 -1
- package/es/alert/style/index.js +0 -3
- package/es/badge/Badge.js +0 -94
- package/es/badge/__tests__/index.test.js +0 -82
- package/es/badge/index.d.ts +0 -15
- package/es/badge/index.js +0 -22
- package/es/badge/style/index.css +0 -1
- package/es/badge/style/index.js +0 -3
- package/es/base-css/index.js +0 -3
- package/es/base-css/style/index.css +0 -1
- package/es/base-css/style/index.js +0 -3
- package/es/breadcrumb/__tests__/index.test.js +0 -61
- package/es/breadcrumb/index.d.ts +0 -19
- package/es/breadcrumb/index.js +0 -72
- package/es/breadcrumb/style/index.css +0 -1
- package/es/breadcrumb/style/index.js +0 -3
- package/es/button/Button.js +0 -158
- package/es/button/ButtonGroup.js +0 -63
- package/es/button/IconLoading.js +0 -27
- package/es/button/__tests__/index.test.js +0 -221
- package/es/button/index.d.ts +0 -26
- package/es/button/index.js +0 -19
- package/es/button/style/index.css +0 -1
- package/es/button/style/index.js +0 -3
- package/es/card/CoverCard.js +0 -41
- package/es/card/NormalCard.js +0 -46
- package/es/card/SimpleCard.js +0 -32
- package/es/card/__tests__/index.test.js +0 -180
- package/es/card/index.d.ts +0 -18
- package/es/card/index.js +0 -75
- package/es/card/style/index.css +0 -1
- package/es/card/style/index.js +0 -3
- package/es/carousel/__tests__/index.test.js +0 -104
- package/es/carousel/index.d.ts +0 -13
- package/es/carousel/index.js +0 -242
- package/es/carousel/style/index.css +0 -1
- package/es/carousel/style/index.js +0 -3
- package/es/cascader/Cascader.js +0 -530
- package/es/cascader/Menu.js +0 -147
- package/es/cascader/__tests__/index.test.js +0 -393
- package/es/cascader/img/empty.png +0 -0
- package/es/cascader/index.d.ts +0 -36
- package/es/cascader/index.js +0 -15
- package/es/cascader/style/cascader.css +0 -1
- package/es/cascader/style/index.js +0 -5
- package/es/cascader/style/menu.css +0 -1
- package/es/cascader/utils.js +0 -216
- package/es/charts/hi-echarts-theme-default.json +0 -502
- package/es/charts/index.d.ts +0 -12
- package/es/charts/index.js +0 -32
- package/es/checkbox/Checkbox.js +0 -145
- package/es/checkbox/Group.js +0 -198
- package/es/checkbox/__tests__/index.test.js +0 -226
- package/es/checkbox/checkbox-legacy/Base.js +0 -216
- package/es/checkbox/checkbox-legacy/CheckBox.js +0 -161
- package/es/checkbox/checkbox-legacy/common.js +0 -47
- package/es/checkbox/checkbox-legacy/index.js +0 -15
- package/es/checkbox/checkbox-legacy/style/index.css +0 -1
- package/es/checkbox/checkbox-legacy/style/index.js +0 -3
- package/es/checkbox/index.d.ts +0 -35
- package/es/checkbox/index.js +0 -38
- package/es/checkbox/style/index.css +0 -1
- package/es/checkbox/style/index.js +0 -3
- package/es/collapse/Panel.js +0 -135
- package/es/collapse/__tests__/index.test.js +0 -111
- package/es/collapse/index.d.ts +0 -24
- package/es/collapse/index.js +0 -197
- package/es/collapse/style/index.css +0 -1
- package/es/collapse/style/index.js +0 -3
- package/es/context/index.d.ts +0 -3
- package/es/context/index.js +0 -120
- package/es/counter/Counter.js +0 -369
- package/es/counter/__tests__/index.test.js +0 -134
- package/es/counter/counter-legacy/index.js +0 -271
- package/es/counter/index.d.ts +0 -13
- package/es/counter/index.js +0 -29
- package/es/counter/style/index.css +0 -1
- package/es/counter/style/index.js +0 -3
- package/es/date-picker/BasePicker.js +0 -325
- package/es/date-picker/TimePicker.d.ts +0 -23
- package/es/date-picker/TimePicker.js +0 -211
- package/es/date-picker/__tests__/index.test.js +0 -957
- package/es/date-picker/components/Calender.js +0 -274
- package/es/date-picker/components/Header.js +0 -98
- package/es/date-picker/components/Input.js +0 -103
- package/es/date-picker/components/Panel.js +0 -145
- package/es/date-picker/components/PickerIcon.js +0 -33
- package/es/date-picker/components/RangePanel.js +0 -353
- package/es/date-picker/components/Root.js +0 -128
- package/es/date-picker/components/Time.js +0 -258
- package/es/date-picker/components/TimeList.js +0 -193
- package/es/date-picker/components/TimePanel.js +0 -67
- package/es/date-picker/components/TimePeriodPanel.js +0 -78
- package/es/date-picker/constants.js +0 -54
- package/es/date-picker/context.js +0 -15
- package/es/date-picker/hooks/index.js +0 -47
- package/es/date-picker/hooks/useAltData.js +0 -112
- package/es/date-picker/hooks/useCalenderData.js +0 -371
- package/es/date-picker/hooks/useDate.js +0 -46
- package/es/date-picker/hooks/useFormat.js +0 -27
- package/es/date-picker/hooks/usePlaceholder.js +0 -43
- package/es/date-picker/hooks/useTimePeriodData.js +0 -29
- package/es/date-picker/index.d.ts +0 -61
- package/es/date-picker/index.js +0 -31
- package/es/date-picker/style/index.css +0 -1
- package/es/date-picker/style/index.js +0 -3
- package/es/date-picker/style/timepicker.css +0 -1
- package/es/date-picker/style/timepicker.js +0 -3
- package/es/date-picker/toLunar.js +0 -172
- package/es/date-picker/utils.js +0 -347
- package/es/drawer/index.d.ts +0 -18
- package/es/drawer/index.js +0 -133
- package/es/drawer/style/index.css +0 -1
- package/es/drawer/style/index.js +0 -3
- package/es/dropdown/Dropdown.js +0 -239
- package/es/dropdown/DropdownButton.js +0 -105
- package/es/dropdown/DropdownMenu.js +0 -119
- package/es/dropdown/DropdownMenuItem.js +0 -176
- package/es/dropdown/__tests__/index.test.js +0 -313
- package/es/dropdown/index.d.ts +0 -29
- package/es/dropdown/index.js +0 -88
- package/es/dropdown/style/index.css +0 -1
- package/es/dropdown/style/index.js +0 -3
- package/es/dropdown/tests/index.test.js +0 -76
- package/es/dropdown/utils.js +0 -35
- package/es/ficon/index.js +0 -56
- package/es/ficon/style/_fa/font-awesome.css +0 -1
- package/es/ficon/style/fonts/FontAwesome.otf +0 -0
- package/es/ficon/style/fonts/fontawesome-webfont.eot +0 -0
- package/es/ficon/style/fonts/fontawesome-webfont.svg +0 -2671
- package/es/ficon/style/fonts/fontawesome-webfont.ttf +0 -0
- package/es/ficon/style/fonts/fontawesome-webfont.woff +0 -0
- package/es/ficon/style/fonts/fontawesome-webfont.woff2 +0 -0
- package/es/ficon/style/index.css +0 -1
- package/es/ficon/style/index.js +0 -3
- package/es/filter/index.d.ts +0 -18
- package/es/filter/index.js +0 -146
- package/es/filter/style/index.css +0 -1
- package/es/filter/style/index.js +0 -3
- package/es/form/Form.js +0 -425
- package/es/form/FormContext.js +0 -15
- package/es/form/FormReducer.js +0 -144
- package/es/form/Item.js +0 -557
- package/es/form/List.js +0 -127
- package/es/form/Reset.js +0 -41
- package/es/form/SchemaForm.js +0 -129
- package/es/form/Submit.js +0 -39
- package/es/form/__tests__/index.test.js +0 -575
- package/es/form/form-legacy/form-v2/Form.js +0 -175
- package/es/form/form-legacy/form-v2/Item.js +0 -283
- package/es/form/form-legacy/form-v2/__tests__/index.test.js +0 -575
- package/es/form/form-legacy/form-v2/index.js +0 -27
- package/es/form/form-legacy/form-v2/style/index.css +0 -1
- package/es/form/form-legacy/form-v2/style/index.js +0 -3
- package/es/form/hooks/useForm.js +0 -48
- package/es/form/hooks/useFormInstance.js +0 -46
- package/es/form/index.d.ts +0 -80
- package/es/form/index.js +0 -47
- package/es/form/style/index.css +0 -1
- package/es/form/style/index.js +0 -3
- package/es/form/test.js +0 -52
- package/es/form/utils.js +0 -77
- package/es/grid/__tests__/index.test.js +0 -100
- package/es/grid/index.d.ts +0 -38
- package/es/grid/index.js +0 -178
- package/es/grid/style/index.css +0 -1
- package/es/grid/style/index.js +0 -3
- package/es/hi-base-table/index.d.ts +0 -675
- package/es/hi-base-table/index.js +0 -226
- package/es/hi-base-table/style/hiui-basetable-theme.css +0 -1
- package/es/hi-base-table/style/index.js +0 -3
- package/es/hi-request/axios.d.ts +0 -5
- package/es/hi-request/axios.js +0 -40
- package/es/hi-request/download.d.ts +0 -5
- package/es/hi-request/download.js +0 -30
- package/es/hi-request/index.d.ts +0 -4
- package/es/hi-request/index.js +0 -4
- package/es/hi-request/jsonp.d.ts +0 -5
- package/es/hi-request/jsonp.js +0 -66
- package/es/hi-request/mixin.d.ts +0 -3
- package/es/hi-request/mixin.js +0 -42
- package/es/hi-request/type.d.ts +0 -69
- package/es/hi-request/type.js +0 -0
- package/es/hi-request/upload.d.ts +0 -5
- package/es/hi-request/upload.js +0 -23
- package/es/hi-request/utils.d.ts +0 -1
- package/es/hi-request/utils.js +0 -3
- package/es/icon/iconfont.js +0 -48
- package/es/icon/index.d.ts +0 -13
- package/es/icon/index.js +0 -101
- package/es/icon/style/index.css +0 -1
- package/es/icon/style/index.js +0 -3
- package/es/index.d.ts +0 -95
- package/es/index.js +0 -58
- package/es/input/Input.js +0 -420
- package/es/input/__tests__/index.test.js +0 -377
- package/es/input/index.d.ts +0 -27
- package/es/input/index.js +0 -44
- package/es/input/input-legacy/index.js +0 -349
- package/es/input/input-legacy/util.js +0 -176
- package/es/input/style/index.css +0 -1
- package/es/input/style/index.js +0 -5
- package/es/input/util.js +0 -191
- package/es/lib/withDragDropContext.js +0 -16
- package/es/list/IconText.js +0 -40
- package/es/list/Item.js +0 -63
- package/es/list/index.d.ts +0 -30
- package/es/list/index.js +0 -159
- package/es/list/style/index.css +0 -1
- package/es/list/style/index.js +0 -3
- package/es/loading/Loading.js +0 -185
- package/es/loading/__tests__/index.test.js +0 -110
- package/es/loading/index.d.ts +0 -24
- package/es/loading/index.js +0 -18
- package/es/loading/style/index.css +0 -1
- package/es/loading/style/index.js +0 -3
- package/es/locales/en-US.js +0 -138
- package/es/locales/index.js +0 -25
- package/es/locales/zh-CN.js +0 -141
- package/es/locales/zh-Hant-HK.js +0 -141
- package/es/locales/zh-Hant-TW.js +0 -141
- package/es/menu/Item.js +0 -100
- package/es/menu/Menu.js +0 -420
- package/es/menu/SubMenu.js +0 -218
- package/es/menu/Title.js +0 -84
- package/es/menu/__tests__/index.test.js +0 -275
- package/es/menu/index.d.ts +0 -26
- package/es/menu/index.js +0 -24
- package/es/menu/style/index.css +0 -1
- package/es/menu/style/index.js +0 -3
- package/es/message/__tests__/index.test.js +0 -71
- package/es/message/index.d.ts +0 -18
- package/es/message/index.js +0 -70
- package/es/message/style/index.css +0 -1
- package/es/message/style/index.js +0 -5
- package/es/modal/__tests__/index.test.js +0 -178
- package/es/modal/index.d.ts +0 -33
- package/es/modal/index.js +0 -312
- package/es/modal/style/index.css +0 -1
- package/es/modal/style/index.js +0 -3
- package/es/notice/Notice.js +0 -138
- package/es/notice/NoticeContainer.js +0 -109
- package/es/notice/__tests__/index.test.js +0 -174
- package/es/notice/index.js +0 -66
- package/es/notice/style/index.css +0 -1
- package/es/notice/style/index.js +0 -5
- package/es/notification/HandleNotification/index.js +0 -220
- package/es/notification/HandleNotification/style/index.css +0 -1
- package/es/notification/HandleNotification/style/index.js +0 -5
- package/es/notification/__tests__/index.test.js +0 -114
- package/es/notification/index.d.ts +0 -25
- package/es/notification/index.js +0 -87
- package/es/notification/style/index.css +0 -1
- package/es/notification/style/index.js +0 -5
- package/es/pagination/Pager.js +0 -57
- package/es/pagination/Pagination.js +0 -538
- package/es/pagination/__tests__/index.test.js +0 -244
- package/es/pagination/index.d.ts +0 -20
- package/es/pagination/index.js +0 -18
- package/es/pagination/style/index.css +0 -1
- package/es/pagination/style/index.js +0 -5
- package/es/popover/__tests__/index.test.js +0 -152
- package/es/popover/index.d.ts +0 -14
- package/es/popover/index.js +0 -220
- package/es/popover/style/index.css +0 -1
- package/es/popover/style/index.js +0 -3
- package/es/popper/Overlay.js +0 -246
- package/es/popper/Portal.js +0 -42
- package/es/popper/index.js +0 -90
- package/es/popper/style/index.css +0 -1
- package/es/popper/style/index.js +0 -3
- package/es/popper/utils/popper.js +0 -311
- package/es/popper/utils/positionUtils.js +0 -314
- package/es/popper/utils/useClickOutside.js +0 -37
- package/es/popper/utils/useWaitForDOMRef.js +0 -56
- package/es/preview/index.d.ts +0 -16
- package/es/preview/index.js +0 -442
- package/es/preview/style/index.css +0 -1
- package/es/preview/style/index.js +0 -3
- package/es/progress/BarProgress.js +0 -157
- package/es/progress/CircleProgress.js +0 -49
- package/es/progress/DashboardProgress.js +0 -60
- package/es/progress/Progress.js +0 -111
- package/es/progress/__tests__/index.test.js +0 -131
- package/es/progress/index.d.ts +0 -18
- package/es/progress/index.js +0 -15
- package/es/progress/style/index.css +0 -1
- package/es/progress/style/index.js +0 -3
- package/es/radio/Group.js +0 -280
- package/es/radio/Radio.js +0 -167
- package/es/radio/__tests__/index.test.js +0 -128
- package/es/radio/index.d.ts +0 -32
- package/es/radio/index.js +0 -31
- package/es/radio/radio-legacy/__test__/index.test.js +0 -79
- package/es/radio/radio-legacy/index.js +0 -218
- package/es/radio/radio-legacy/style/index.css +0 -1
- package/es/radio/radio-legacy/style/index.js +0 -3
- package/es/radio/style/index.css +0 -1
- package/es/radio/style/index.js +0 -3
- package/es/rate/Icons.js +0 -294
- package/es/rate/Rate.js +0 -316
- package/es/rate/__tests__/index.test.js +0 -124
- package/es/rate/index.d.ts +0 -22
- package/es/rate/index.js +0 -15
- package/es/rate/style/index.css +0 -1
- package/es/rate/style/index.js +0 -3
- package/es/rich-text-editor/index.d.ts +0 -8
- package/es/rich-text-editor/index.js +0 -67
- package/es/rich-text-editor/style/index.css +0 -1
- package/es/rich-text-editor/style/index.js +0 -9
- package/es/search/index.d.ts +0 -23
- package/es/search/index.js +0 -264
- package/es/search/searchDropdown.js +0 -111
- package/es/search/style/index.css +0 -1
- package/es/search/style/index.js +0 -3
- package/es/select/MultipleInput.js +0 -163
- package/es/select/Select.js +0 -775
- package/es/select/SelectDropdown.js +0 -341
- package/es/select/SelectInput.js +0 -31
- package/es/select/SingleInput.js +0 -94
- package/es/select/__tests__/index.test.js +0 -505
- package/es/select/common.js +0 -19
- package/es/select/index.d.ts +0 -65
- package/es/select/index.js +0 -32
- package/es/select/select-legacy/select-v1/Option.js +0 -81
- package/es/select/select-legacy/select-v1/Select.js +0 -706
- package/es/select/select-legacy/select-v1/SelectDropdown.js +0 -160
- package/es/select/select-legacy/select-v1/SelectInput.js +0 -308
- package/es/select/select-legacy/select-v1/common.js +0 -19
- package/es/select/select-legacy/select-v1/index.js +0 -16
- package/es/select/select-legacy/select-v2/Select.js +0 -756
- package/es/select/select-legacy/select-v2/SelectDropdown.js +0 -322
- package/es/select/select-legacy/select-v2/SelectInput.js +0 -331
- package/es/select/select-legacy/select-v2/__tests__/index.test.js +0 -505
- package/es/select/select-legacy/select-v2/common.js +0 -19
- package/es/select/select-legacy/select-v2/index.js +0 -15
- package/es/select/select-legacy/select-v2/style/index.css +0 -1
- package/es/select/select-legacy/select-v2/style/index.js +0 -9
- package/es/select/select-legacy/select-v2/style/select-dropdown.css +0 -1
- package/es/select/select-legacy/select-v2/style/select-input.css +0 -1
- package/es/select/style/index.css +0 -1
- package/es/select/style/index.js +0 -9
- package/es/select/style/select-dropdown.css +0 -1
- package/es/select/style/select-input.css +0 -1
- package/es/select/utils.js +0 -72
- package/es/select-tree/SelectTreeHook.js +0 -788
- package/es/select-tree/components/Trigger.js +0 -85
- package/es/select-tree/components/tree/LoadingIcon.js +0 -38
- package/es/select-tree/components/tree/NavTree.js +0 -229
- package/es/select-tree/components/tree/TreeNode.js +0 -167
- package/es/select-tree/components/tree/context.js +0 -15
- package/es/select-tree/components/tree/index.js +0 -80
- package/es/select-tree/components/tree/style/index.css +0 -1
- package/es/select-tree/components/tree/style/index.js +0 -3
- package/es/select-tree/components/tree/util.js +0 -621
- package/es/select-tree/index.d.ts +0 -47
- package/es/select-tree/index.js +0 -15
- package/es/select-tree/keyEvents.js +0 -121
- package/es/select-tree/style/index.css +0 -1
- package/es/select-tree/style/index.js +0 -3
- package/es/slider/index.d.ts +0 -22
- package/es/slider/index.js +0 -491
- package/es/slider/style/index.css +0 -1
- package/es/slider/style/index.js +0 -3
- package/es/stepper/Stepper.js +0 -158
- package/es/stepper/__tests__/index.test.js +0 -161
- package/es/stepper/index.d.ts +0 -16
- package/es/stepper/index.js +0 -33
- package/es/stepper/style/index.css +0 -1
- package/es/stepper/style/index.js +0 -3
- package/es/style/icon/diyIcon.css +0 -1
- package/es/style/icon/index.css +0 -1
- package/es/switch/__tests__/index.test.js +0 -68
- package/es/switch/index.d.ts +0 -13
- package/es/switch/index.js +0 -21
- package/es/switch/style/index.css +0 -1
- package/es/switch/style/index.js +0 -3
- package/es/switch/switch-legacy/__tests__/index.test.js +0 -68
- package/es/switch/switch-legacy/index.js +0 -128
- package/es/switch/switch-legacy/style/index.css +0 -1
- package/es/switch/switch-legacy/style/index.js +0 -3
- package/es/switch/switch.js +0 -76
- package/es/table/AdvanceHeader/CustomFilter.js +0 -73
- package/es/table/AdvanceHeader/Sorter.js +0 -72
- package/es/table/AdvanceHeader/index.js +0 -41
- package/es/table/AdvanceHeader/select/index.js +0 -720
- package/es/table/AdvanceHeader/select/style/index.css +0 -1
- package/es/table/AdvanceHeader/select/style/index.js +0 -5
- package/es/table/AdvanceHeader/style/index.css +0 -1
- package/es/table/AdvanceHeader/style/index.js +0 -3
- package/es/table/BodyTable.js +0 -261
- package/es/table/Cell.js +0 -193
- package/es/table/ColumnMenu.js +0 -148
- package/es/table/Expandcol.js +0 -48
- package/es/table/HeaderTable.js +0 -359
- package/es/table/Indent.js +0 -27
- package/es/table/LoadingIcon.js +0 -38
- package/es/table/Row.js +0 -261
- package/es/table/SettingMenu.js +0 -205
- package/es/table/Table.js +0 -697
- package/es/table/context.js +0 -15
- package/es/table/hooks/useClickOutside.js +0 -23
- package/es/table/index.d.ts +0 -108
- package/es/table/index.js +0 -21
- package/es/table/style/Table.css +0 -1
- package/es/table/style/index.css +0 -1
- package/es/table/style/index.js +0 -3
- package/es/table/style/reset.css +0 -1
- package/es/table/style/variable.css +0 -0
- package/es/table/table-legacy/table-v2/Body.js +0 -298
- package/es/table/table-legacy/table-v2/ClickOuterside.js +0 -99
- package/es/table/table-legacy/table-v2/Footer.js +0 -174
- package/es/table/table-legacy/table-v2/Header.js +0 -319
- package/es/table/table-legacy/table-v2/TableContent.js +0 -105
- package/es/table/table-legacy/table-v2/__tests__/index.test.js +0 -129
- package/es/table/table-legacy/table-v2/checkbox/index.js +0 -98
- package/es/table/table-legacy/table-v2/checkbox/style/index.css +0 -1
- package/es/table/table-legacy/table-v2/checkbox/style/index.js +0 -3
- package/es/table/table-legacy/table-v2/index.js +0 -1466
- package/es/table/table-legacy/table-v2/menu/index.js +0 -110
- package/es/table/table-legacy/table-v2/prefix.js +0 -20
- package/es/table/table-legacy/table-v2/style/Table.css +0 -1
- package/es/table/table-legacy/table-v2/style/index.css +0 -1
- package/es/table/table-legacy/table-v2/style/index.js +0 -3
- package/es/table/table-legacy/table-v2/tool.js +0 -129
- package/es/table/util.js +0 -320
- package/es/tabs/ItemDropdown.js +0 -158
- package/es/tabs/TabItem.js +0 -116
- package/es/tabs/TabPane.js +0 -64
- package/es/tabs/Tabs.js +0 -576
- package/es/tabs/__tests__/index.test.js +0 -333
- package/es/tabs/hooks/useTabItems.js +0 -77
- package/es/tabs/hooks/useTranslate.js +0 -71
- package/es/tabs/index.d.ts +0 -47
- package/es/tabs/index.js +0 -38
- package/es/tabs/style/animate.css +0 -1
- package/es/tabs/style/index.css +0 -1
- package/es/tabs/style/index.js +0 -3
- package/es/tabs/tabs-legacy/ItemDropdown.js +0 -166
- package/es/tabs/tabs-legacy/TabPane.js +0 -74
- package/es/tabs/tabs-legacy/Tabs.js +0 -295
- package/es/tabs/tabs-legacy/index.js +0 -18
- package/es/tabs/tabs-legacy/style/index.css +0 -1
- package/es/tabs/tabs-legacy/style/index.js +0 -3
- package/es/tag/TagGroup.js +0 -235
- package/es/tag/TagItem.js +0 -116
- package/es/tag/__tests__/index.test.js +0 -46
- package/es/tag/index.d.ts +0 -32
- package/es/tag/index.js +0 -18
- package/es/tag/style/index.css +0 -1
- package/es/tag/style/index.js +0 -3
- package/es/timeline/__tests__/index.test.js +0 -198
- package/es/timeline/index.d.ts +0 -18
- package/es/timeline/index.js +0 -264
- package/es/timeline/style/index.css +0 -1
- package/es/timeline/style/index.js +0 -3
- package/es/tooltip/__tests__/index.test.js +0 -170
- package/es/tooltip/index.d.ts +0 -19
- package/es/tooltip/index.js +0 -210
- package/es/tooltip/style/index.css +0 -1
- package/es/tooltip/style/index.js +0 -3
- package/es/transfer/Item.js +0 -192
- package/es/transfer/Transfer.js +0 -562
- package/es/transfer/__tests__/index.test.js +0 -210
- package/es/transfer/img/switch.png +0 -0
- package/es/transfer/img/warning.png +0 -0
- package/es/transfer/index.d.ts +0 -25
- package/es/transfer/index.js +0 -16
- package/es/transfer/style/index.css +0 -1
- package/es/transfer/style/index.js +0 -3
- package/es/tree/BaseTree.js +0 -209
- package/es/tree/IconLoading.js +0 -38
- package/es/tree/Switcher.js +0 -42
- package/es/tree/Tree.js +0 -610
- package/es/tree/TreeNode.js +0 -326
- package/es/tree/context.js +0 -15
- package/es/tree/customTreeNode.js +0 -140
- package/es/tree/hooks/useCheckable.js +0 -153
- package/es/tree/hooks/useClickOutside.js +0 -26
- package/es/tree/hooks/useExpand.js +0 -46
- package/es/tree/hooks/useFlatData.js +0 -61
- package/es/tree/hooks/useSelect.js +0 -47
- package/es/tree/index.d.ts +0 -67
- package/es/tree/index.js +0 -21
- package/es/tree/style/index.css +0 -1
- package/es/tree/style/index.js +0 -3
- package/es/tree/tree-legacy/tree-v1/Tree.js +0 -333
- package/es/tree/tree-legacy/tree-v1/TreeDivider.js +0 -25
- package/es/tree/tree-legacy/tree-v1/TreeItem.js +0 -329
- package/es/tree/tree-legacy/tree-v1/TreeNode.js +0 -715
- package/es/tree/tree-legacy/tree-v1/index.js +0 -13
- package/es/tree/tree-legacy/tree-v1/style/index.css +0 -1
- package/es/tree/tree-legacy/tree-v1/style/index.js +0 -3
- package/es/tree/tree-legacy/tree-v1/util.js +0 -434
- package/es/tree/tree-legacy/tree-v2/IconLoading.js +0 -38
- package/es/tree/tree-legacy/tree-v2/Modal.js +0 -71
- package/es/tree/tree-legacy/tree-v2/Tree.js +0 -347
- package/es/tree/tree-legacy/tree-v2/TreeDivider.js +0 -25
- package/es/tree/tree-legacy/tree-v2/TreeItem.js +0 -439
- package/es/tree/tree-legacy/tree-v2/TreeNode.js +0 -909
- package/es/tree/tree-legacy/tree-v2/__tests__/index.test.js +0 -603
- package/es/tree/tree-legacy/tree-v2/index.js +0 -20
- package/es/tree/tree-legacy/tree-v2/style/index.css +0 -1
- package/es/tree/tree-legacy/tree-v2/style/index.js +0 -3
- package/es/tree/tree-legacy/tree-v2/util.js +0 -195
- package/es/tree/util.js +0 -131
- package/es/upload/AvatarUpload.js +0 -293
- package/es/upload/DragUpload.js +0 -194
- package/es/upload/FileSelect.js +0 -47
- package/es/upload/NormalUpload.js +0 -146
- package/es/upload/PictureListUpload.js +0 -147
- package/es/upload/PictureUpload.js +0 -233
- package/es/upload/Preview.js +0 -441
- package/es/upload/__tests__/index.test.js +0 -760
- package/es/upload/hooks/useUpload.js +0 -274
- package/es/upload/index.d.ts +0 -42
- package/es/upload/index.js +0 -44
- package/es/upload/request.js +0 -118
- package/es/upload/style/index.css +0 -1
- package/es/upload/style/index.js +0 -5
- package/es/upload/style/preview.css +0 -1
- package/es/upload/style/preview.js +0 -3
- package/es/upload/util.js +0 -55
- package/es/watermark/index.d.ts +0 -12
- package/es/watermark/index.js +0 -110
- package/es/watermark/watermark.js +0 -252
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
export type DateRange = {
|
|
4
|
-
start: Date | string | number | undefined | null
|
|
5
|
-
end: Date | string | number | undefined | null
|
|
6
|
-
}
|
|
7
|
-
export type DateRangeString = {
|
|
8
|
-
start: string
|
|
9
|
-
end: string
|
|
10
|
-
}
|
|
11
|
-
export type CalendarItem = {
|
|
12
|
-
date?: Date | string
|
|
13
|
-
text?: string
|
|
14
|
-
highlight?: boolean
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
interface CommonProps {
|
|
18
|
-
value?: Date | string | number | DateRange | undefined | null
|
|
19
|
-
defaultValue?: Date | string | number | DateRange | undefined | null
|
|
20
|
-
disabled?: boolean
|
|
21
|
-
placement?: 'bottom-start' | 'top-start' | 'bottom' | 'top'
|
|
22
|
-
clearable?: boolean
|
|
23
|
-
placeholder?: string | string[]
|
|
24
|
-
format?: string
|
|
25
|
-
inputReadOnly?: boolean
|
|
26
|
-
timeInterval?: number
|
|
27
|
-
onChange?: (date: Date | DateRange, dateStr: string | DateRangeString) => void
|
|
28
|
-
onSelect?: (date: Date, isCompleted: boolean) => void
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export type DatePickerShortcuts = {
|
|
32
|
-
title: string
|
|
33
|
-
range: Date[] | number[]
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface DatePickerProps extends CommonProps {
|
|
37
|
-
type?: 'date' | 'daterange' | 'year' | 'month' | 'week' | 'weekrange' | 'timeperiod' | 'yearrange' | 'monthrange'
|
|
38
|
-
min?: Date
|
|
39
|
-
minDate?: Date
|
|
40
|
-
max?: Date
|
|
41
|
-
maxDate?: Date
|
|
42
|
-
bordered?: boolean
|
|
43
|
-
timeperiod?: number
|
|
44
|
-
disabledDate?: (currentDate: Date) => boolean
|
|
45
|
-
showTime?: boolean
|
|
46
|
-
shortcuts?: string[] | DatePickerShortcuts[]
|
|
47
|
-
disabledHours?: () => number[]
|
|
48
|
-
disabledMinutes?: (selectedHour: number) => number[]
|
|
49
|
-
disabledSeconds?: (selectedHour: number, selectedMinute: number) => number[]
|
|
50
|
-
weekOffset?: 0 | 1
|
|
51
|
-
altCalendar?: CalendarItem
|
|
52
|
-
altCalendarPreset?: 'zh-CN' | 'id-ID'
|
|
53
|
-
dateMarkRender?: (currentDate: Date, today: Date) => JSX.Element
|
|
54
|
-
dateMarkPreset?: 'zh-CN'
|
|
55
|
-
overlayClassName?: string
|
|
56
|
-
style?: React.CSSProperties
|
|
57
|
-
className?: string
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
declare const DatePicker: React.ComponentType<DatePickerProps>
|
|
61
|
-
export default DatePicker
|
package/es/date-picker/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "TimePicker", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function get() {
|
|
11
|
-
return _TimePicker["default"];
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
exports["default"] = void 0;
|
|
15
|
-
|
|
16
|
-
var _BasePicker = _interopRequireDefault(require("./BasePicker"));
|
|
17
|
-
|
|
18
|
-
var _TimePicker = _interopRequireDefault(require("./TimePicker"));
|
|
19
|
-
|
|
20
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
21
|
-
|
|
22
|
-
_BasePicker["default"].format = function (date, format) {
|
|
23
|
-
return (0, _moment["default"])(date).format(format);
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
_BasePicker["default"].localeData = function (String) {
|
|
27
|
-
return _moment["default"].localeData(String);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
var _default = _BasePicker["default"];
|
|
31
|
-
exports["default"] = _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.hi-datepicker{position:relative;background:var(--color-white);z-index:1060;-webkit-box-shadow:0 2px 8px 0 rgba(0,0,0,0.12);box-shadow:0 2px 8px 0 rgba(0,0,0,0.12)}.hi-datepicker__popper{width:288px;font-size:14px;background:var(--color-white);-webkit-box-shadow:0 2px 8px 0 rgba(0,0,0,0.15);box-shadow:0 2px 8px 0 rgba(0,0,0,0.15);border-radius:4px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.hi-datepicker__popper--range{width:576px}.hi-datepicker__popper--range.hi-datepicker__popper--large{width:866px}.hi-datepicker__popper--timeperiod,.hi-datepicker__popper--large{width:432px}.hi-datepicker__popper--time{width:468px}.hi-datepicker__popper--shortcuts{width:681px}.hi-datepicker__root{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.hi-datepicker__picker{background:var(--color-white);border-radius:2px;height:32px;width:180px;line-height:28px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-pack:distribute;justify-content:space-around;-webkit-box-sizing:border-box;box-sizing:border-box}.hi-datepicker__picker.bordered{border:1px solid var(--color-gray-30)}.hi-datepicker__picker:hover:not(.hi-datepicker__picker--disabled):not(.hi-datepicker__picker--error).bordered{border:1px solid var(--color-primary)}.hi-datepicker__picker--focus.bordered{border:1px solid var(--color-primary)}.hi-datepicker__picker--error.bordered{border:1px solid #f44343}.hi-datepicker__picker--disabled{background:#f2f2f2}.hi-datepicker__picker--daterange,.hi-datepicker__picker--weekrange,.hi-datepicker__picker--yearrange,.hi-datepicker__picker--timerange,.hi-datepicker__picker--monthrange{width:320px}.hi-datepicker__picker--daterange input,.hi-datepicker__picker--weekrange input,.hi-datepicker__picker--yearrange input,.hi-datepicker__picker--timerange input,.hi-datepicker__picker--monthrange input{text-align:center}.hi-datepicker__picker--daterange.hi-datepicker__picker--hastime,.hi-datepicker__picker--weekrange.hi-datepicker__picker--hastime,.hi-datepicker__picker--yearrange.hi-datepicker__picker--hastime,.hi-datepicker__picker--timerange.hi-datepicker__picker--hastime,.hi-datepicker__picker--monthrange.hi-datepicker__picker--hastime{width:400px}.hi-datepicker__picker--timeperiod{width:400px}.hi-datepicker__picker--timeperiod input{text-align:center}.hi-datepicker__picker--hastime{width:240px}.hi-datepicker__picker .hi-icon{margin-top:2px;margin-right:8px;font-size:14px;cursor:pointer}.hi-datepicker__picker .hi-icon--disabled{cursor:not-allowed;color:#ccc}.hi-datepicker__picker .icon-close-circle{color:var(--color-gray-50)}.hi-datepicker__picker .icon-close-circle:hover{color:var(--color-black)}.hi-datepicker__picker input{outline:none;border:0;height:28px;padding-left:10px;width:100%}.hi-datepicker__picker input::-webkit-input-placeholder{color:var(--color-gray-50)}.hi-datepicker__picker input.disabled{cursor:not-allowed;background:#f2f2f2}.hi-datepicker__input{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.hi-datepicker__panel{width:100%;background:var(--color-white);-webkit-box-shadow:0 2px 8px 0 rgba(0,0,0,0.15);box-shadow:0 2px 8px 0 rgba(0,0,0,0.15);display:-webkit-box;display:-ms-flexbox;display:flex}.hi-datepicker__panel .hi-datepicker__panel--left{min-width:288px;-webkit-box-flex:1;-ms-flex:1;flex:1}.hi-datepicker__panel .hi-datepicker__panel--right{-webkit-box-flex:1;-ms-flex:1;flex:1}.hi-datepicker__panel--noshadow{-webkit-box-shadow:none;box-shadow:none}.hi-datepicker__header{border-bottom:1px solid var(--color-gray-30);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;height:48px;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0 12px}.hi-datepicker__header-btns{width:50px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.hi-datepicker__header-btns .hi-icon{cursor:pointer;-webkit-box-flex:1;-ms-flex:1;flex:1}.hi-datepicker__header-btns .hi-icon:hover{color:var(--color-primary)}.hi-datepicker__header-text{font-weight:bold;cursor:pointer}.hi-datepicker__calender-wrap{padding:16px;height:248px}.hi-datepicker__calender-wrap--large{height:382px}.hi-datepicker__calender{width:100%;height:100%;font-size:14px;border-collapse:collapse;border-spacing:0}.hi-datepicker__calender thead th{padding:2px}.hi-datepicker__calender--year .hi-datepicker__row,.hi-datepicker__calender--month .hi-datepicker__row{height:52px}.hi-datepicker__calender--year .hi-datepicker__cell-text,.hi-datepicker__calender--month .hi-datepicker__cell-text{width:48px}.hi-datepicker__row--currentweek .hi-datepicker__cell::before{content:'';background:var(--color-primary-20);display:block;height:24px;position:absolute;left:0;right:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.hi-datepicker__cell{text-align:center;padding:4px 0;cursor:pointer;color:#333;position:relative}.hi-datepicker__cell-text{width:24px;display:inline-block;height:24px;line-height:24px;border-radius:2px;-webkit-box-sizing:border-box;box-sizing:border-box;margin-left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.hi-datepicker__cell__cell:not(.hi-datepicker__cell--range)-text:hover{background-color:var(--color-primary-20)}.hi-datepicker__cell--out{color:rgba(44,48,78,0.2)}.hi-datepicker__cell--today .hi-datepicker__cell-text{border:1px solid var(--color-primary)}.hi-datepicker__cell--range:not(.hi-datepicker__cell--out)::before{content:'';background:var(--color-primary-20);display:block;height:24px;position:absolute;left:0;right:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.hi-datepicker__cell--disabled{color:rgba(44,48,78,0.2);cursor:not-allowed}.hi-datepicker__cell--disabled::before{content:'';display:block;height:24px;position:absolute;left:0;right:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);background:rgba(140,140,140,0.1)}.hi-datepicker__cell--large .hi-datepicker__cell-text{width:48px;height:48px;line-height:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:16px}.hi-datepicker__cell--large.hi-datepicker__cell--range:not(.hi-datepicker__cell--out)::before{height:48px}.hi-datepicker__cell--selected .hi-datepicker__cell-text{background:var(--color-primary);color:var(--color-white)}.hi-datepicker__cell--selected .hi-datepicker__cell--lunar{color:var(--color-white)}.hi-datepicker__cell--selected .hi-datepicker__lunar{color:var(--color-white)}.hi-datepicker__cell--selected .hi-datepicker__mark--rest{color:var(--color-white)}.hi-datepicker__cellnum{display:inline-block;-webkit-transition:all 100ms;transition:all 100ms}.hi-datepicker__cellnum:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.hi-datepicker__lunar{font-size:12px;color:#ccc}.hi-datepicker__lunar--highlight{color:var(--color-primary)}.hi-datepicker__footer{height:48px;border-top:1px solid var(--color-gray-10);-webkit-box-sizing:border-box;box-sizing:border-box;line-height:48px;text-align:center;cursor:pointer;position:relative;font-size:14px;-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%}.hi-datepicker__footer:not(.hi-datepicker__footer--disable):hover{color:var(--color-primary)}.hi-datepicker__footer--disable{cursor:not-allowed;color:var(--color-gray-50)}.hi-datepicker__mask{width:100%;height:100%;background:rgba(0,0,0,0.4);position:absolute;top:0;left:0}.hi-datepicker__timetext{position:absolute;width:148px;height:32px;border-radius:2px;left:50%;top:8px;-webkit-transform:translateX(-50%);transform:translateX(-50%);background:var(--color-white);z-index:2;line-height:32px}.hi-datepicker__time-period{width:144px;border-left:1px solid var(--color-gray-10);text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:14px}.hi-datepicker__period-header{line-height:48px;height:48px;font-weight:600;border-bottom:1px solid var(--color-gray-10);-webkit-box-sizing:border-box;box-sizing:border-box}.hi-datepicker__period-list{list-style:none;margin:0;padding:0;margin-top:8px;overflow:auto;height:241px}.hi-datepicker__period-item{padding:8px;cursor:pointer}.hi-datepicker__period-item:hover{background:#f0f6ff}.hi-datepicker__period-item--active{color:var(--color-primary)}.hi-datepicker__shortcuts{background:var(--color-white);border-right:1px solid var(--color-gray-10);width:105px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.hi-datepicker__shortcuts-list{width:120px;padding:0;height:100%;margin:0;overflow:auto}.hi-datepicker__shortcuts-item{cursor:pointer;padding-left:30px;margin:21px 0;list-style:none}.hi-datepicker__shortcuts-item:hover{color:var(--color-primary)}.hi-datepicker__mark{position:absolute;font-size:12px;right:0;top:-2px}.hi-datepicker__mark--rest{color:#1da653}.hi-datepicker__mark--work{color:#f44141}.hi-datepicker__indiaHoli{display:none;position:absolute;top:36px;left:0;width:430px;text-align:center}.hi-datepicker__indiaHoli-text{display:inline-block;max-width:410px;word-break:break-all;background:var(--color-primary-10);border:1px solid #d8e5ff;padding:7px 12px;border-radius:2px}.hi-datepicker__indiaHoli-enter{display:none;opacity:0;-webkit-transition:all 0.3s ease-in;transition:all 0.3s ease-in}.hi-datepicker__indiaHoli-enter-done{display:block;opacity:1;-webkit-transition:all 0.3s ease-in;transition:all 0.3s ease-in}.hi-datepicker__indiaHoli-exit{display:block;opacity:1}.hi-datepicker__indiaHoli-exit-done{display:none;opacity:0;-webkit-transition:all 0.3s ease-in;transition:all 0.3s ease-in}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.hi-timepicker{width:180px;background:var(--color-white);-webkit-box-shadow:0 2px 8px 0 rgba(0,0,0,0.12);box-shadow:0 2px 8px 0 rgba(0,0,0,0.12);z-index:1060}.hi-timepicker__popper{width:180px;height:296px;background:var(--color-white);-webkit-box-shadow:0 2px 8px 0 rgba(0,0,0,0.15);box-shadow:0 2px 8px 0 rgba(0,0,0,0.15);border-radius:4px}.hi-timepicker__popper--range{width:400px}.hi-timepicker__panel{background:var(--color-white)}.hi-timepicker__panel--range{width:400px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.hi-timepicker__body{width:180px}.hi-timepicker__split{-webkit-box-flex:1;-ms-flex:1;flex:1;height:248px;margin-top:47px;-ms-flex-item-align:end;align-self:flex-end;border:1px solid var(--color-gray-10);border-bottom:none}.hi-timepicker__timeheader{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around;height:48px;text-align:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:14px;font-weight:600;color:var(--color-black);border-bottom:1px solid var(--color-gray-10);-webkit-box-sizing:border-box;box-sizing:border-box}.hi-timepicker__timebody{display:-webkit-box;display:-ms-flexbox;display:flex;height:248px;position:relative;-ms-flex-pack:distribute;justify-content:space-around;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;padding:0}.hi-timepicker__timebody::-webkit-scrollbar{display:none}.hi-timepicker__page-turn{position:absolute;z-index:2;width:16px;height:16px;line-height:16px;text-align:center;font-size:16px;left:22px;top:0;cursor:pointer}.hi-timepicker__page-turn:last-child{top:auto;bottom:0}.hi-timepicker__list-container{width:60px;overflow:hidden;position:relative;padding:12px 0}.hi-timepicker__list{width:80px;height:224px;margin:0;list-style-type:none;overflow-y:auto;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.hi-timepicker__list:nth-child(2){left:60px;z-index:3}.hi-timepicker__list:nth-child(3){left:120px;z-index:4}.hi-timepicker__item{text-align:center;font-size:14px;color:var(--color-gray-80);line-height:32px;height:32px;width:60px;cursor:pointer;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:var(--color-white)}.hi-timepicker__item--empty{cursor:default}.hi-timepicker__item--current{font-weight:bold}.hi-timepicker__item--disabled{color:rgba(44,48,78,0.2);cursor:not-allowed}.hi-timepicker__item:hover:not(.hi-timepicker__item--current):not(.hi-timepikcer__item--empty):not(.hi-timepicker__item--disabled){background-color:var(--color-primary-10)}.hi-timepicker__footer{padding:2px 0;text-align:right}.hi-timepicker__footer button{margin-right:4px}.hi-timepicker__current-line{height:32px;-webkit-box-sizing:border-box;box-sizing:border-box;border-top:1px solid var(--color-gray-10);border-bottom:1px solid var(--color-gray-10);position:absolute;top:108px;left:0;width:156px;z-index:4;pointer-events:none;display:-webkit-box;display:-ms-flexbox;display:flex;text-align:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:0 12px}.hi-timepicker__current-line span{-webkit-box-flex:1;-ms-flex:1;flex:1}
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
/* eslint-disable */
|
|
9
|
-
var Lunar = {
|
|
10
|
-
MIN_YEAR: 1891,
|
|
11
|
-
MAX_YEAR: 2100,
|
|
12
|
-
lunarInfo: [[0, 2, 9, 21936], [6, 1, 30, 9656], [0, 2, 17, 9584], [0, 2, 6, 21168], [5, 1, 26, 43344], [0, 2, 13, 59728], [0, 2, 2, 27296], [3, 1, 22, 44368], [0, 2, 10, 43856], [8, 1, 30, 19304], [0, 2, 19, 19168], [0, 2, 8, 42352], [5, 1, 29, 21096], [0, 2, 16, 53856], [0, 2, 4, 55632], [4, 1, 25, 27304], [0, 2, 13, 22176], [0, 2, 2, 39632], [2, 1, 22, 19176], [0, 2, 10, 19168], [6, 1, 30, 42200], [0, 2, 18, 42192], [0, 2, 6, 53840], [5, 1, 26, 54568], [0, 2, 14, 46400], [0, 2, 3, 54944], [2, 1, 23, 38608], [0, 2, 11, 38320], [7, 2, 1, 18872], [0, 2, 20, 18800], [0, 2, 8, 42160], [5, 1, 28, 45656], [0, 2, 16, 27216], [0, 2, 5, 27968], [4, 1, 24, 44456], [0, 2, 13, 11104], [0, 2, 2, 38256], [2, 1, 23, 18808], [0, 2, 10, 18800], [6, 1, 30, 25776], [0, 2, 17, 54432], [0, 2, 6, 59984], [5, 1, 26, 27976], [0, 2, 14, 23248], [0, 2, 4, 11104], [3, 1, 24, 37744], [0, 2, 11, 37600], [7, 1, 31, 51560], [0, 2, 19, 51536], [0, 2, 8, 54432], [6, 1, 27, 55888], [0, 2, 15, 46416], [0, 2, 5, 22176], [4, 1, 25, 43736], [0, 2, 13, 9680], [0, 2, 2, 37584], [2, 1, 22, 51544], [0, 2, 10, 43344], [7, 1, 29, 46248], [0, 2, 17, 27808], [0, 2, 6, 46416], [5, 1, 27, 21928], [0, 2, 14, 19872], [0, 2, 3, 42416], [3, 1, 24, 21176], [0, 2, 12, 21168], [8, 1, 31, 43344], [0, 2, 18, 59728], [0, 2, 8, 27296], [6, 1, 28, 44368], [0, 2, 15, 43856], [0, 2, 5, 19296], [4, 1, 25, 42352], [0, 2, 13, 42352], [0, 2, 2, 21088], [3, 1, 21, 59696], [0, 2, 9, 55632], [7, 1, 30, 23208], [0, 2, 17, 22176], [0, 2, 6, 38608], [5, 1, 27, 19176], [0, 2, 15, 19152], [0, 2, 3, 42192], [4, 1, 23, 53864], [0, 2, 11, 53840], [8, 1, 31, 54568], [0, 2, 18, 46400], [0, 2, 7, 46752], [6, 1, 28, 38608], [0, 2, 16, 38320], [0, 2, 5, 18864], [4, 1, 25, 42168], [0, 2, 13, 42160], [10, 2, 2, 45656], [0, 2, 20, 27216], [0, 2, 9, 27968], [6, 1, 29, 44448], [0, 2, 17, 43872], [0, 2, 6, 38256], [5, 1, 27, 18808], [0, 2, 15, 18800], [0, 2, 4, 25776], [3, 1, 23, 27216], [0, 2, 10, 59984], [8, 1, 31, 27432], [0, 2, 19, 23232], [0, 2, 7, 43872], [5, 1, 28, 37736], [0, 2, 16, 37600], [0, 2, 5, 51552], [4, 1, 24, 54440], [0, 2, 12, 54432], [0, 2, 1, 55888], [2, 1, 22, 23208], [0, 2, 9, 22176], [7, 1, 29, 43736], [0, 2, 18, 9680], [0, 2, 7, 37584], [5, 1, 26, 51544], [0, 2, 14, 43344], [0, 2, 3, 46240], [4, 1, 23, 46416], [0, 2, 10, 44368], [9, 1, 31, 21928], [0, 2, 19, 19360], [0, 2, 8, 42416], [6, 1, 28, 21176], [0, 2, 16, 21168], [0, 2, 5, 43312], [4, 1, 25, 29864], [0, 2, 12, 27296], [0, 2, 1, 44368], [2, 1, 22, 19880], [0, 2, 10, 19296], [6, 1, 29, 42352], [0, 2, 17, 42208], [0, 2, 6, 53856], [5, 1, 26, 59696], [0, 2, 13, 54576], [0, 2, 3, 23200], [3, 1, 23, 27472], [0, 2, 11, 38608], [11, 1, 31, 19176], [0, 2, 19, 19152], [0, 2, 8, 42192], [6, 1, 28, 53848], [0, 2, 15, 53840], [0, 2, 4, 54560], [5, 1, 24, 55968], [0, 2, 12, 46496], [0, 2, 1, 22224], [2, 1, 22, 19160], [0, 2, 10, 18864], [7, 1, 30, 42168], [0, 2, 17, 42160], [0, 2, 6, 43600], [5, 1, 26, 46376], [0, 2, 14, 27936], [0, 2, 2, 44448], [3, 1, 23, 21936], [0, 2, 11, 37744], [8, 2, 1, 18808], [0, 2, 19, 18800], [0, 2, 8, 25776], [6, 1, 28, 27216], [0, 2, 15, 59984], [0, 2, 4, 27424], [4, 1, 24, 43872], [0, 2, 12, 43744], [0, 2, 2, 37600], [3, 1, 21, 51568], [0, 2, 9, 51552], [7, 1, 29, 54440], [0, 2, 17, 54432], [0, 2, 5, 55888], [5, 1, 26, 23208], [0, 2, 14, 22176], [0, 2, 3, 42704], [4, 1, 23, 21224], [0, 2, 11, 21200], [8, 1, 31, 43352], [0, 2, 19, 43344], [0, 2, 7, 46240], [6, 1, 27, 46416], [0, 2, 15, 44368], [0, 2, 5, 21920], [4, 1, 24, 42448], [0, 2, 12, 42416], [0, 2, 2, 21168], [3, 1, 22, 43320], [0, 2, 9, 26928], [7, 1, 29, 29336], [0, 2, 17, 27296], [0, 2, 6, 44368], [5, 1, 26, 19880], [0, 2, 14, 19296], [0, 2, 3, 42352], [4, 1, 24, 21104], [0, 2, 10, 53856], [8, 1, 30, 59696], [0, 2, 18, 54560], [0, 2, 7, 55968], [6, 1, 27, 27472], [0, 2, 15, 22224], [0, 2, 5, 19168], [4, 1, 25, 42216], [0, 2, 12, 42192], [0, 2, 1, 53584], [2, 1, 21, 55592], [0, 2, 9, 54560]],
|
|
13
|
-
// 天干地支年
|
|
14
|
-
lunarYear: function lunarYear(year) {
|
|
15
|
-
var gan = ['庚', '辛', '壬', '癸', '甲', '乙', '丙', '丁', '戊', '己'],
|
|
16
|
-
zhi = ['申', '酉', '戌', '亥', '子', '丑', '寅', '卯', '辰', '巳', '午', '未'],
|
|
17
|
-
str = year.toString().split('');
|
|
18
|
-
return gan[str[3]] + zhi[year % 12];
|
|
19
|
-
},
|
|
20
|
-
// 生肖年
|
|
21
|
-
zodiacYear: function zodiacYear(year) {
|
|
22
|
-
var zodiac = ['猴', '鸡', '狗', '猪', '鼠', '牛', '虎', '兔', '龙', '蛇', '马', '羊'];
|
|
23
|
-
return zodiac[year % 12];
|
|
24
|
-
},
|
|
25
|
-
// 农历月份天数数组
|
|
26
|
-
lunarMonths: function lunarMonths(year) {
|
|
27
|
-
var yearData = this.lunarInfo[year - this.MIN_YEAR];
|
|
28
|
-
var leapMonth = yearData[0];
|
|
29
|
-
var bit = (+yearData[3]).toString(2);
|
|
30
|
-
var months = [];
|
|
31
|
-
|
|
32
|
-
for (var i = 0; i < bit.length; i++) {
|
|
33
|
-
months[i] = bit.substr(i, 1);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
for (var k = 0, len = 16 - months.length; k < len; k++) {
|
|
37
|
-
months.unshift('0');
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
months = months.slice(0, leapMonth === 0 ? 12 : 13);
|
|
41
|
-
|
|
42
|
-
for (var _i = 0; _i < months.length; _i++) {
|
|
43
|
-
months[_i] = +months[_i] + 29;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return months;
|
|
47
|
-
},
|
|
48
|
-
// 农历每年的天数
|
|
49
|
-
// @param year 农历年份
|
|
50
|
-
lunarYearDays: function lunarYearDays(year) {
|
|
51
|
-
var monthArray = this.lunarYearMonths(year);
|
|
52
|
-
var len = monthArray.length;
|
|
53
|
-
return monthArray[len - 1] === 0 ? monthArray[len - 2] : monthArray[len - 1];
|
|
54
|
-
},
|
|
55
|
-
//
|
|
56
|
-
lunarYearMonths: function lunarYearMonths(year) {
|
|
57
|
-
var monthData = this.lunarMonths(year);
|
|
58
|
-
var res = [];
|
|
59
|
-
var temp = 0;
|
|
60
|
-
var yearData = this.lunarInfo[year - this.MIN_YEAR];
|
|
61
|
-
var len = yearData[0] === 0 ? 12 : 13;
|
|
62
|
-
|
|
63
|
-
for (var i = 0; i < len; i++) {
|
|
64
|
-
temp = 0;
|
|
65
|
-
|
|
66
|
-
for (var j = 0; j <= i; j++) {
|
|
67
|
-
temp += monthData[j];
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
res.push(temp);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return res;
|
|
74
|
-
},
|
|
75
|
-
// 获取闰月
|
|
76
|
-
// @param year 农历年份
|
|
77
|
-
leapMonth: function leapMonth(year) {
|
|
78
|
-
var yearData = this.lunarInfo[year - this.MIN_YEAR];
|
|
79
|
-
return yearData[0];
|
|
80
|
-
},
|
|
81
|
-
// 计算2个阳历日期之间的天数
|
|
82
|
-
// @param year 阳历年
|
|
83
|
-
// @param month
|
|
84
|
-
// @param day
|
|
85
|
-
// @param l_month 阴历正月对应的阳历月份
|
|
86
|
-
// @param l_day 阴历初一对应的阳历天
|
|
87
|
-
betweenSolarDays: function betweenSolarDays(year, month, day, l_month, l_day) {
|
|
88
|
-
var time1 = new Date(year + '/' + month + '/' + day).getTime(),
|
|
89
|
-
time2 = new Date(year + '/' + l_month + '/' + l_day).getTime();
|
|
90
|
-
return Math.ceil((time1 - time2) / 24 / 3600 / 1000);
|
|
91
|
-
},
|
|
92
|
-
// 根据距离正月初一的天数计算阴历日期
|
|
93
|
-
// @param year 阳历年
|
|
94
|
-
// @param between 天数
|
|
95
|
-
lunarByBetween: function lunarByBetween(year, between) {
|
|
96
|
-
var lunarArray = [],
|
|
97
|
-
yearMonth = [],
|
|
98
|
-
t = 0,
|
|
99
|
-
e = 0,
|
|
100
|
-
leapMonth = 0,
|
|
101
|
-
m = '';
|
|
102
|
-
|
|
103
|
-
if (between === 0) {
|
|
104
|
-
t = 1;
|
|
105
|
-
e = 1;
|
|
106
|
-
m = '正月';
|
|
107
|
-
} else {
|
|
108
|
-
year = between > 0 ? year : year - 1;
|
|
109
|
-
yearMonth = this.lunarYearMonths(year);
|
|
110
|
-
leapMonth = this.leapMonth(year);
|
|
111
|
-
between = between > 0 ? between : this.lunarYearDays(year) + between;
|
|
112
|
-
|
|
113
|
-
for (var i = 0; i < 13; i++) {
|
|
114
|
-
if (between === yearMonth[i]) {
|
|
115
|
-
t = i + 2;
|
|
116
|
-
e = 1;
|
|
117
|
-
break;
|
|
118
|
-
} else if (between < yearMonth[i]) {
|
|
119
|
-
t = i + 1;
|
|
120
|
-
e = between - (yearMonth[i - 1] ? yearMonth[i - 1] : 0) + 1;
|
|
121
|
-
break;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
m = leapMonth !== 0 && t === leapMonth + 1 ? this.chineseMonth(t - 1) : this.chineseMonth(leapMonth !== 0 && leapMonth + 1 < t ? t - 1 : t);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
lunarArray.push(year, t, e); // 年 月 日
|
|
129
|
-
|
|
130
|
-
lunarArray.push(this.lunarYear(year), this.zodiacYear(year), m, this.chineseNumber(e)); // 天干地支年 生肖年 月份 日
|
|
131
|
-
|
|
132
|
-
lunarArray.push(leapMonth); // 闰几月
|
|
133
|
-
|
|
134
|
-
return lunarArray;
|
|
135
|
-
},
|
|
136
|
-
// 中文月份
|
|
137
|
-
chineseMonth: function chineseMonth(month) {
|
|
138
|
-
var monthHash = ['', '正月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '冬月', '腊月'];
|
|
139
|
-
return monthHash[month];
|
|
140
|
-
},
|
|
141
|
-
// 中文日期
|
|
142
|
-
chineseNumber: function chineseNumber(num) {
|
|
143
|
-
var dateHash = ['', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十'];
|
|
144
|
-
var res;
|
|
145
|
-
|
|
146
|
-
if (num <= 10) {
|
|
147
|
-
res = '初' + dateHash[num];
|
|
148
|
-
} else if (num > 10 && num < 20) {
|
|
149
|
-
res = '十' + dateHash[num - 10];
|
|
150
|
-
} else if (num === 20) {
|
|
151
|
-
res = '二十';
|
|
152
|
-
} else if (num > 20 && num < 30) {
|
|
153
|
-
res = '廿' + dateHash[num - 20];
|
|
154
|
-
} else if (num === 30) {
|
|
155
|
-
res = '三十';
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
return res;
|
|
159
|
-
},
|
|
160
|
-
// 转换农历
|
|
161
|
-
toLunar: function toLunar(year, month, day) {
|
|
162
|
-
var yearData = this.lunarInfo[year - this.MIN_YEAR];
|
|
163
|
-
|
|
164
|
-
if (year === this.MIN_YEAR && month <= 2 && day <= 9) {
|
|
165
|
-
return [1891, 1, 1, '辛卯', '兔', '正月', '初一'];
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
return this.lunarByBetween(year, this.betweenSolarDays(year, month, day, yearData[1], yearData[2]));
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
var _default = Lunar;
|
|
172
|
-
exports["default"] = _default;
|
package/es/date-picker/utils.js
DELETED
|
@@ -1,347 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.parseValue = exports.getInRangeDate = exports.getFullTime = exports.getPRCDate = exports.showLargeCalendar = exports.getTimePeriodData = exports.parseRenderDates = exports.genNewDates = exports.getView = exports.deconstructDate = void 0;
|
|
9
|
-
|
|
10
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
11
|
-
|
|
12
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
-
|
|
14
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
-
|
|
16
|
-
var _react = _interopRequireDefault(require("react"));
|
|
17
|
-
|
|
18
|
-
var _lodash = _interopRequireDefault(require("lodash"));
|
|
19
|
-
|
|
20
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
21
|
-
|
|
22
|
-
var _axios = _interopRequireDefault(require("axios"));
|
|
23
|
-
|
|
24
|
-
var _toLunar = _interopRequireDefault(require("./toLunar"));
|
|
25
|
-
|
|
26
|
-
var _constants = require("./constants");
|
|
27
|
-
|
|
28
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
-
|
|
30
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
31
|
-
|
|
32
|
-
var holiday = {
|
|
33
|
-
PRCHoliday: 'https://cdn.cnbj1.fds.api.mi-img.com/hiui/PRCHoliday.json?',
|
|
34
|
-
PRCLunar: 'https://cdn.cnbj1.fds.api.mi-img.com/hiui/PRCLunar.json?',
|
|
35
|
-
IndiaHoliday: 'https://cdn.cnbj1.fds.api.mi-img.com/hiui/IndiaHoliday.json?'
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
var deconstructDate = function deconstructDate(date) {
|
|
39
|
-
return {
|
|
40
|
-
year: date.year(),
|
|
41
|
-
month: date.month(),
|
|
42
|
-
date: date.date(),
|
|
43
|
-
hour: date.hour(),
|
|
44
|
-
minute: date.minute(),
|
|
45
|
-
second: date.second()
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* 获取 yearrange monthrange 类型
|
|
50
|
-
* @param {String} type
|
|
51
|
-
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
exports.deconstructDate = deconstructDate;
|
|
55
|
-
|
|
56
|
-
var getView = function getView(type) {
|
|
57
|
-
return type.includes('year') || type.includes('month') ? type.split('range')[0] : 'date';
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
*
|
|
61
|
-
* @param {Array} currentDates 原始数组
|
|
62
|
-
* @param {Moment} newDate 新时间
|
|
63
|
-
* @param {Number} index 更新数组位置
|
|
64
|
-
*/
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
exports.getView = getView;
|
|
68
|
-
|
|
69
|
-
var genNewDates = function genNewDates(currentDates, newDate) {
|
|
70
|
-
var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
71
|
-
|
|
72
|
-
var newDates = _lodash["default"].cloneDeep(currentDates);
|
|
73
|
-
|
|
74
|
-
newDates[index] = newDate;
|
|
75
|
-
return newDates;
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* 生成 renderDates 用于 Calender(Range) 渲染时的基础时间
|
|
79
|
-
* @param {Array} dates 原始数据
|
|
80
|
-
* @param {String} type 选择器类型
|
|
81
|
-
*/
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
exports.genNewDates = genNewDates;
|
|
85
|
-
|
|
86
|
-
var parseRenderDates = function parseRenderDates(dates, type) {
|
|
87
|
-
var _$cloneDeep = _lodash["default"].cloneDeep(dates),
|
|
88
|
-
_$cloneDeep2 = (0, _slicedToArray2["default"])(_$cloneDeep, 2),
|
|
89
|
-
leftDate = _$cloneDeep2[0],
|
|
90
|
-
rightDate = _$cloneDeep2[1];
|
|
91
|
-
|
|
92
|
-
var getRightDate = function getRightDate() {
|
|
93
|
-
if (type === 'yearrange') {
|
|
94
|
-
if (!rightDate) {
|
|
95
|
-
return (0, _moment["default"])(leftDate).add(12, 'year');
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
var diff = rightDate.year() - leftDate.year();
|
|
99
|
-
|
|
100
|
-
if (diff <= 12) {
|
|
101
|
-
return (0, _moment["default"])(leftDate).add(12, 'year');
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
var rYear = rightDate.year();
|
|
105
|
-
var nRightDate = (0, _moment["default"])(rightDate).year(rYear + (12 - diff % 12), 'year');
|
|
106
|
-
return nRightDate;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
if (type === 'monthrange') {
|
|
110
|
-
return (0, _moment["default"])(leftDate).add(1, 'year');
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
if (!rightDate || leftDate.isSame(rightDate, 'month')) {
|
|
114
|
-
return (0, _moment["default"])(leftDate).add(1, 'months');
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
return rightDate;
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
leftDate = leftDate || (0, _moment["default"])();
|
|
121
|
-
rightDate = getRightDate();
|
|
122
|
-
return [leftDate, rightDate];
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
exports.parseRenderDates = parseRenderDates;
|
|
126
|
-
|
|
127
|
-
var getTimePeriodData = function getTimePeriodData(timeInterval) {
|
|
128
|
-
var segment = 24 * 60 / timeInterval;
|
|
129
|
-
var pre = 0;
|
|
130
|
-
var next = 0;
|
|
131
|
-
var periodData = [];
|
|
132
|
-
|
|
133
|
-
var func = function func(val) {
|
|
134
|
-
return val < 10 ? '0' + val : val;
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
for (var i = 0; i < segment; i++) {
|
|
138
|
-
next += timeInterval;
|
|
139
|
-
var timeStart = func(parseInt(pre / 60));
|
|
140
|
-
var timeEnd = func(parseInt(next / 60));
|
|
141
|
-
var timeStr = timeStart + ':' + func(pre % 60) + ' ~ ' + timeEnd + ':' + func(next % 60);
|
|
142
|
-
periodData.push({
|
|
143
|
-
timeStr: timeStr,
|
|
144
|
-
timeStart: timeStart,
|
|
145
|
-
timeEnd: timeEnd
|
|
146
|
-
});
|
|
147
|
-
pre = next;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
return periodData;
|
|
151
|
-
};
|
|
152
|
-
/**
|
|
153
|
-
* 是否展示历法次要信息
|
|
154
|
-
* @param {Object} props
|
|
155
|
-
*/
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
exports.getTimePeriodData = getTimePeriodData;
|
|
159
|
-
|
|
160
|
-
var showLargeCalendar = function showLargeCalendar(props) {
|
|
161
|
-
return props.altCalendar || props.altCalendarPreset || props.dateMarkRender || props.dateMarkPreset;
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
exports.showLargeCalendar = showLargeCalendar;
|
|
165
|
-
|
|
166
|
-
var getPRCDate = function getPRCDate(api) {
|
|
167
|
-
var url = holiday[api];
|
|
168
|
-
var options = {
|
|
169
|
-
url: url,
|
|
170
|
-
method: 'GET'
|
|
171
|
-
};
|
|
172
|
-
return url ? _axios["default"].create().request(options) : null;
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
exports.getPRCDate = getPRCDate;
|
|
176
|
-
|
|
177
|
-
var altCalendarText = function altCalendarText(datainfo, lunarcellinfo, altCalendarPresetData) {
|
|
178
|
-
if (altCalendarPresetData && altCalendarPresetData[datainfo]) {
|
|
179
|
-
return altCalendarPresetData[datainfo].text || altCalendarPresetData[datainfo];
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
return lunarcellinfo.text;
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
var getMarkNode = function getMarkNode(node) {
|
|
186
|
-
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
187
|
-
className: "hi-datepicker__lunar hi-datepicker__holiday"
|
|
188
|
-
}, node);
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
var markRender = function markRender(datainfo, dateMarkRender, dateMarkPresetData) {
|
|
192
|
-
// 存在传入自定就优先使用自定义
|
|
193
|
-
var markRenderNode = dateMarkRender ? dateMarkRender(new Date(datainfo).getTime(), new Date().getTime()) : false;
|
|
194
|
-
|
|
195
|
-
if (markRenderNode) {
|
|
196
|
-
return getMarkNode(markRenderNode);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
if (dateMarkPresetData) {
|
|
200
|
-
return dateMarkPresetData[datainfo];
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
return null;
|
|
204
|
-
};
|
|
205
|
-
/**
|
|
206
|
-
* 获取完整时间
|
|
207
|
-
* @param {*} value 日
|
|
208
|
-
* @param {*} cls className
|
|
209
|
-
*/
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
var getFullTime = function getFullTime(_ref) {
|
|
213
|
-
var cell = _ref.cell,
|
|
214
|
-
renderDate = _ref.renderDate,
|
|
215
|
-
altCalendarPreset = _ref.altCalendarPreset,
|
|
216
|
-
altCalendar = _ref.altCalendar,
|
|
217
|
-
dateMarkRender = _ref.dateMarkRender,
|
|
218
|
-
altCalendarPresetData = _ref.altCalendarPresetData,
|
|
219
|
-
dateMarkPresetData = _ref.dateMarkPresetData;
|
|
220
|
-
if (cell.type === 'disabled') return false;
|
|
221
|
-
var newDate = (0, _moment["default"])(renderDate);
|
|
222
|
-
newDate.date(cell.value);
|
|
223
|
-
|
|
224
|
-
if (cell.type === 'prev') {
|
|
225
|
-
newDate.subtract(1, 'months');
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
if (cell.type === 'next') {
|
|
229
|
-
newDate.add(1, 'months');
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
var _year = newDate.year();
|
|
233
|
-
|
|
234
|
-
var _month = newDate.month() + 1;
|
|
235
|
-
|
|
236
|
-
var _value = cell.value;
|
|
237
|
-
var datainfo = _year + '/' + _month + '/' + _value;
|
|
238
|
-
|
|
239
|
-
var LunarInfo = _toLunar["default"].toLunar(_year, _month, _value);
|
|
240
|
-
|
|
241
|
-
var lunarcellinfo = {
|
|
242
|
-
text: altCalendarPreset === 'zh-CN' ? LunarInfo[6] : null,
|
|
243
|
-
// 默认预置信息
|
|
244
|
-
highlight: false
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
if (altCalendar || dateMarkRender) {
|
|
248
|
-
lunarcellinfo = {
|
|
249
|
-
text: altCalendarText(datainfo, lunarcellinfo, altCalendarPresetData),
|
|
250
|
-
highlight: altCalendarPresetData && altCalendarPresetData[datainfo] && altCalendarPresetData[datainfo].highlight,
|
|
251
|
-
nodeMark: markRender(datainfo, dateMarkRender, dateMarkPresetData)
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
if (dateMarkPresetData && dateMarkPresetData[datainfo] || altCalendarPresetData && altCalendarPresetData[datainfo]) {
|
|
256
|
-
lunarcellinfo = {
|
|
257
|
-
text: altCalendarText(datainfo, lunarcellinfo, altCalendarPresetData),
|
|
258
|
-
highlight: altCalendarPresetData && altCalendarPresetData[datainfo] && altCalendarPresetData[datainfo].highlight,
|
|
259
|
-
nodeMark: markRender(datainfo, dateMarkRender, dateMarkPresetData)
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
return _objectSpread(_objectSpread({}, altCalendarPresetData[datainfo]), lunarcellinfo);
|
|
264
|
-
};
|
|
265
|
-
/**
|
|
266
|
-
* 处理输入不在该范围内的处理
|
|
267
|
-
* @param {String} startDate 开始日期
|
|
268
|
-
* @param {String} endDate 结束日期
|
|
269
|
-
* @param {String} max 最大日期
|
|
270
|
-
* @param {String} min 最小日期
|
|
271
|
-
*/
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
exports.getFullTime = getFullTime;
|
|
275
|
-
|
|
276
|
-
var getInRangeDate = function getInRangeDate(momentstartDate, momentendDate, max, min) {
|
|
277
|
-
var startDate = momentstartDate && momentstartDate.format();
|
|
278
|
-
var endDate = momentendDate && momentendDate.format();
|
|
279
|
-
|
|
280
|
-
var isValid = function isValid(value) {
|
|
281
|
-
return (0, _moment["default"])(value).isValid();
|
|
282
|
-
};
|
|
283
|
-
|
|
284
|
-
var toDate = function toDate(value) {
|
|
285
|
-
return (0, _moment["default"])(value).format();
|
|
286
|
-
};
|
|
287
|
-
|
|
288
|
-
var _startDate = isValid(startDate) ? startDate : '';
|
|
289
|
-
|
|
290
|
-
var _endDate = isValid(endDate) ? endDate : '';
|
|
291
|
-
|
|
292
|
-
if (min && isValid(startDate)) {
|
|
293
|
-
var minTimestamp = Date.parse(toDate(min));
|
|
294
|
-
var startDateTimestamp = Date.parse(startDate);
|
|
295
|
-
var endDateTimestamp = Date.parse(endDate);
|
|
296
|
-
_startDate = startDateTimestamp < minTimestamp ? new Date(minTimestamp) : new Date(startDate);
|
|
297
|
-
_endDate = endDateTimestamp < minTimestamp ? new Date(minTimestamp) : new Date(endDate);
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
if (max && isValid(startDate)) {
|
|
301
|
-
var maxTimestamp = Date.parse(toDate(max));
|
|
302
|
-
|
|
303
|
-
var _startDateTimestamp = Date.parse(_startDate);
|
|
304
|
-
|
|
305
|
-
var _endDateTimestamp = Date.parse(_endDate);
|
|
306
|
-
|
|
307
|
-
_startDate = _startDateTimestamp > maxTimestamp ? new Date(maxTimestamp) : new Date(_startDate);
|
|
308
|
-
_endDate = _endDateTimestamp > maxTimestamp ? new Date(maxTimestamp) : new Date(_endDate);
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
return {
|
|
312
|
-
startDate: _startDate,
|
|
313
|
-
endDate: _endDate
|
|
314
|
-
};
|
|
315
|
-
};
|
|
316
|
-
/**
|
|
317
|
-
* 格式化value
|
|
318
|
-
* @param {Any} value 格式化的值
|
|
319
|
-
* @param {String} type 类型
|
|
320
|
-
* @param {String} format 日期格式
|
|
321
|
-
*/
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
exports.getInRangeDate = getInRangeDate;
|
|
325
|
-
|
|
326
|
-
var parseValue = function parseValue(value, type, format, weekOffset) {
|
|
327
|
-
var locale = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'zh-CN';
|
|
328
|
-
if (!value) return [null];
|
|
329
|
-
var _format = (0, _constants.FORMATS)(locale)[type];
|
|
330
|
-
|
|
331
|
-
var _value = (0, _moment["default"])(value, _format);
|
|
332
|
-
|
|
333
|
-
var isValid = (0, _moment["default"])(_value).isValid();
|
|
334
|
-
|
|
335
|
-
if (value && (0, _typeof2["default"])(value) === 'object' && (type.includes('range') || type === 'timeperiod')) {
|
|
336
|
-
if (type === 'weekrange') {
|
|
337
|
-
var weekMethod = weekOffset ? 'isoWeek' : 'week';
|
|
338
|
-
return [value.start ? (0, _moment["default"])(value.start, _format).startOf(weekMethod) : null, value.end ? (0, _moment["default"])(value.end, _format).endOf(weekMethod) : null];
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
return [value.start && (0, _moment["default"])(value.start).isValid() ? (0, _moment["default"])(value.start, format) : null, value.end && (0, _moment["default"])(value.end).isValid() ? (0, _moment["default"])(value.end, format) : null];
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
return [isValid ? _value : null];
|
|
345
|
-
};
|
|
346
|
-
|
|
347
|
-
exports.parseValue = parseValue;
|
package/es/drawer/index.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
|
|
3
|
-
export interface DrawerProps {
|
|
4
|
-
title?: string | JSX.Element
|
|
5
|
-
visible?: boolean
|
|
6
|
-
closable?: boolean
|
|
7
|
-
maskClosable?: boolean
|
|
8
|
-
showMask?: boolean
|
|
9
|
-
width?: number
|
|
10
|
-
footer?: JSX.Element
|
|
11
|
-
placement?: 'left' | 'right'
|
|
12
|
-
onClose?: (e: React.MouseEvent) => void
|
|
13
|
-
style?: React.CSSProperties
|
|
14
|
-
className?: string
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare const Drawer: React.ComponentType<DrawerProps>
|
|
18
|
-
export default Drawer
|