@titaui/pc 1.12.17-beta.2 → 1.12.17-beta.3
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/lib/components/avatar/icon-avatar/index.js +1 -1
- package/lib/components/avatar/num-avatar/index.js +1 -1
- package/lib/components/book-demo/components/pc/components/content/index.js +1 -1
- package/lib/components/button/default-button/index.js +1 -1
- package/lib/components/button/icon-btn/index.js +1 -1
- package/lib/components/cascader/index.js +1 -1
- package/lib/components/cascader/time.js +1 -1
- package/lib/components/change-okr-modal/Filter.js +2 -2
- package/lib/components/change-okr-modal/Item.js +2 -2
- package/lib/components/change-okr-modal/filterTab.js +2 -2
- package/lib/components/change-okr-modal/index.js +4 -6
- package/lib/components/common-share/publishMblog.js +2 -4
- package/lib/components/communication/CommunicationAttachments.js +2 -2
- package/lib/components/communication/ConvertUserName.js +2 -2
- package/lib/components/communication/index.js +2 -2
- package/lib/components/create-okr-modal/fields/okr-type-detail.js +2 -4
- package/lib/components/create-okr-modal/fields/okr-visibility-detail.js +2 -4
- package/lib/components/create-okr-modal/index.js +2 -4
- package/lib/components/create-okr-modal/objectType.js +2 -2
- package/lib/components/create-okr-modal/request-api.js +12 -16
- package/lib/components/create-okr-modal/utils/helper.js +2 -6
- package/lib/components/date-picker/BodyItem.js +3 -3
- package/lib/components/date-picker/CalendarBody.js +3 -3
- package/lib/components/date-picker/CalendarHeader.js +3 -3
- package/lib/components/date-picker/index.js +2 -2
- package/lib/components/date-range-picker/index.js +2 -2
- package/lib/components/delete-confirm-pop/ConfirmPop.js +2 -2
- package/lib/components/dialog/index.js +1 -1
- package/lib/components/dialog-confirm/index.js +1 -1
- package/lib/components/drawer/headerDrop.js +1 -1
- package/lib/components/drawer/index.js +1 -1
- package/lib/components/drawer-manager/drawerWrapper.js +3 -5
- package/lib/components/drawer-manager/index.js +1 -1
- package/lib/components/drop-selector/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-chart/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-learning/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +1 -1
- package/lib/components/eReport/eReportListEmpty.js +2 -2
- package/lib/components/eReport/eReportLists/reportList.js +2 -2
- package/lib/components/eReport/eReportShare/index.js +2 -2
- package/lib/components/eReport/eReportShare/toast/index.js +2 -2
- package/lib/components/edit-kr-wight/EditKrWightModal.js +2 -2
- package/lib/components/edit-kr-wight/FormItemV2.js +2 -2
- package/lib/components/emotions-selector/selector-content.js +2 -2
- package/lib/components/emotions-selector/selector-pop.js +2 -2
- package/lib/components/ereport-list/index.js +2 -2
- package/lib/components/error-boundary/index.js +2 -2
- package/lib/components/firework/index.js +2 -6
- package/lib/components/form/form-fields/date/index.js +15 -14
- package/lib/components/form/form-fields/dropdown/index.js +1 -1
- package/lib/components/form/form-fields/input/index.js +1 -1
- package/lib/components/form/form-fields/input-verification-code/index.js +2 -4
- package/lib/components/form/form-fields/user/index.js +1 -1
- package/lib/components/grid-layout/util/network.js +6 -10
- package/lib/components/help-card/index.js +1 -1
- package/lib/components/mblog/components/ConfirmPop.js +2 -2
- package/lib/components/mblog/components/MblogAction.js +2 -2
- package/lib/components/mblog/components/MblogContent.js +2 -2
- package/lib/components/mblog/index.js +2 -2
- package/lib/components/menus/components/menu-tree/images/interview-menu/setting.svg +16 -0
- package/lib/components/menus/components/menu-tree/index.js +1 -1
- package/lib/components/menus/components/menu-tree/tree-node/index.css +28 -0
- package/lib/components/menus/components/menu-tree/tree-node/index.js +1 -1
- package/lib/components/menus/export-modules/interview-menus/constant.js +45 -34
- package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +20 -0
- package/lib/components/menus/export-modules/interview-menus/index.js +11 -8
- package/lib/components/nav-top/components/app-center/index.css +3 -9
- package/lib/components/nav-top/components/app-center/index.js +7 -7
- package/lib/components/nav-top/components/user-message/index.css +4 -4
- package/lib/components/nav-top/index.css +4 -8
- package/lib/components/nav-top/index.js +3 -3
- package/lib/components/okr-detail/auth.js +2 -2
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +2 -4
- package/lib/components/okr-detail/components/ao-nice/index.js +4 -6
- package/lib/components/okr-detail/components/base-okr-type/confirm/buttonv2.js +2 -2
- package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +2 -2
- package/lib/components/okr-detail/components/base-okr-type/object-type.js +2 -2
- package/lib/components/okr-detail/components/header/edit-name.js +2 -4
- package/lib/components/okr-detail/components/header/o-avatar.js +2 -4
- package/lib/components/okr-detail/components/header/o-classify.js +2 -4
- package/lib/components/okr-detail/components/header/o-score.js +1 -1
- package/lib/components/okr-detail/components/icon-text/index.js +1 -1
- package/lib/components/okr-detail/components/o-classify.js +2 -4
- package/lib/components/okr-detail/components/o-progress-update/index.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/index.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/index.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +2 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/kr-push-score.js +3 -3
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/edit-child-okr-weight.js +6 -8
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +2 -4
- package/lib/components/okr-detail/detail-footer/index.js +2 -4
- package/lib/components/okr-detail/detail-header/index.js +10 -12
- package/lib/components/okr-detail/okr-list/index.js +2 -4
- package/lib/components/okr-detail/request-apis.js +2 -6
- package/lib/components/okr-flow/child-node/fields/creator.js +2 -4
- package/lib/components/okr-flow/child-node/work-node.js +2 -4
- package/lib/components/okr-flow/export-modal/index.js +12 -4
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +8 -10
- package/lib/components/okr-flow/request-apis.js +2 -6
- package/lib/components/okr-flow/root-node/index.js +2 -4
- package/lib/components/okr-progress/components/o-progress-update/index.js +2 -4
- package/lib/components/okr-progress-modal/index.js +2 -4
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +4 -6
- package/lib/components/okr-review/ReviewPop/components/Toast/index.js +2 -2
- package/lib/components/okr-review/ReviewPop/index.js +2 -2
- package/lib/components/okr-review/components/ReviewItem/index.js +2 -2
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +2 -2
- package/lib/components/okr-review/index.js +2 -2
- package/lib/components/okr-share/common-painter/darwAvatar.js +4 -8
- package/lib/components/okr-share/common-painter/openDataPainter.js +2 -6
- package/lib/components/okr-share/common-painter/utils.js +4 -8
- package/lib/components/okr-share/pink-card/drawDepartmentName.js +2 -6
- package/lib/components/okr-share/pink-card/drawKrs.js +2 -6
- package/lib/components/okr-share/pink-card/drawQuote.js +2 -6
- package/lib/components/okr-share/pink-card/drawUserName.js +2 -6
- package/lib/components/okr-share/pink-card/index.js +2 -6
- package/lib/components/okr-share/publishMblog.js +2 -4
- package/lib/components/okr-share/shareCardSelector.js +4 -6
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +4 -4
- package/lib/components/okrcase-library/server/network.js +20 -24
- package/lib/components/open-data-painter/index.js +2 -6
- package/lib/components/operation-records/OperationRecordItem.js +2 -2
- package/lib/components/operation-records/index.js +2 -2
- package/lib/components/pagination/pagination.js +1 -1
- package/lib/components/period-selector/components/button/index.js +1 -1
- package/lib/components/period-selector/helper/index.js +2 -6
- package/lib/components/picker/components/cross.svg +17 -0
- package/lib/components/picker/components/panels/date-panel/date-body.js +31 -19
- package/lib/components/picker/components/panels/date-panel/date-head.js +8 -8
- package/lib/components/picker/components/panels/date-panel/index.js +2 -2
- package/lib/components/picker/components/panels/month-panel/index.css +5 -0
- package/lib/components/picker/components/panels/month-panel/index.js +3 -3
- package/lib/components/picker/components/panels/month-panel/month-body.js +4 -5
- package/lib/components/picker/components/panels/month-panel/month-head.js +2 -2
- package/lib/components/picker/components/panels/year-panel/index.css +5 -0
- package/lib/components/picker/components/panels/year-panel/index.js +2 -2
- package/lib/components/picker/components/panels/year-panel/year-body.js +10 -3
- package/lib/components/picker/components/panels/year-panel/year-head.js +1 -1
- package/lib/components/picker/components/picker-trigger/index.css +6 -1
- package/lib/components/picker/components/picker-trigger/index.js +16 -11
- package/lib/components/picker/context.js +17 -2
- package/lib/components/picker/index.css +29 -1
- package/lib/components/picker/index.js +3 -0
- package/lib/components/picker/picker-panels.js +79 -64
- package/lib/components/picker/picker.js +45 -31
- package/lib/components/picker/range-picker/components/picker-trigger/index.css +97 -0
- package/lib/components/picker/range-picker/components/picker-trigger/index.js +109 -0
- package/lib/components/picker/range-picker/components/placeholder/index.js +91 -0
- package/lib/components/picker/range-picker/components/select-input/index.js +72 -0
- package/lib/components/picker/range-picker/components/shortcuts/index.js +45 -0
- package/lib/components/picker/range-picker/index.css +158 -0
- package/lib/components/picker/range-picker/index.js +263 -0
- package/lib/components/picker/utils.js +168 -11
- package/lib/components/point-demo/drop-down-box/index.js +1 -1
- package/lib/components/point-demo/input/index.js +3 -3
- package/lib/components/point-demo/popup/index.js +1 -1
- package/lib/components/popup/index.js +1 -1
- package/lib/components/praise-record/PraiseRecordItem.js +2 -2
- package/lib/components/praise-record/index.js +2 -2
- package/lib/components/range-picker-pop/index.js +3 -3
- package/lib/components/range-selector-pop/RangeList.js +2 -2
- package/lib/components/range-selector-pop/RangeSelectorPop.js +2 -2
- package/lib/components/rich-editor/models/schema.js +2 -2
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +2 -2
- package/lib/components/rich-editor/plugins/block/heading/index.js +2 -2
- package/lib/components/rich-editor/plugins/block/lists/index.js +2 -2
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +2 -2
- package/lib/components/rich-editor/plugins/core/index.js +2 -2
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +2 -2
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/color/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/em/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/link/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/strong/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +2 -2
- package/lib/components/rich-editor/react/reactNodeView.js +4 -4
- package/lib/components/rich-editor/react/uiProvider.js +2 -2
- package/lib/components/rich-editor/ui/Popup/index.js +2 -2
- package/lib/components/scroll-container/index.js +2 -2
- package/lib/components/scrollbar/index.js +1 -1
- package/lib/components/scrollbar/scroll-mask/index.js +1 -1
- package/lib/components/scrollbar/simplebar-react.js +1 -1
- package/lib/components/search-dropdown/index.js +1 -1
- package/lib/components/select/Option.js +3 -3
- package/lib/components/select/index.js +3 -3
- package/lib/components/select-layer/index.js +1 -1
- package/lib/components/select-tags/index.js +1 -1
- package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +2 -6
- package/lib/components/superset-charts/fetch-assets-and-append/index.js +4 -8
- package/lib/components/survey-model/request-api.js +2 -6
- package/lib/components/switch/index.js +1 -1
- package/lib/components/table/index.js +1 -1
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/task-relation-modal/index.js +5 -7
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +1 -1
- package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +1 -1
- package/lib/components/task-relation-modal/tree/category-tree/index.js +2 -4
- package/lib/components/task-relation-modal/tree/okr-tree/index.js +2 -4
- package/lib/components/task-relation-modal/tree/work-tree/index.js +2 -4
- package/lib/components/task-relation-modal/tree-node/index.js +1 -1
- package/lib/components/task-relation-modal/work-relation/index.js +5 -7
- package/lib/components/task-tree/task-item-node/e-project.js +2 -4
- package/lib/components/task-tree/task-item-node/e-task.js +2 -4
- package/lib/components/task-tree/task-item-node/task-node-render.js +1 -1
- package/lib/components/task-tree/task-tree.js +1 -1
- package/lib/components/textarea/index.js +1 -1
- package/lib/components/time-picker/time-picker-selector.js +1 -1
- package/lib/components/time-picker/time-picker.js +1 -1
- package/lib/components/time-picker/timer-picker-input.js +1 -1
- package/lib/components/tita-chart/charts/liquid-ball.js +1 -1
- package/lib/components/tita-chart/charts/pie.js +1 -1
- package/lib/components/tita-chart/errorBoundary/index.js +2 -2
- package/lib/components/toast/index.js +8 -12
- package/lib/components/tooltip/error-tip.js +1 -1
- package/lib/components/tooltip/tooltip.js +1 -1
- package/lib/components/tree/index.js +1 -1
- package/lib/components/upload/components/uploadedPreview.js +2 -2
- package/lib/components/upload/index.js +2 -2
- package/lib/components/upvote/index.js +5 -7
- package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.js +1 -1
- package/lib/components/user-selector/select-tree/choose-tree/index.js +1 -1
- package/lib/components/user-selector/select-tree/selected-tree/index.js +1 -1
- package/lib/components/version-change-modal/index.js +4 -6
- package/lib/components/version-change-modal/request-api.js +2 -6
- package/lib/components/viewer/ImageListRender.js +2 -2
- package/lib/components/viewer/index.js +2 -2
- package/lib/components/weekly-report/card.js +12 -4
- package/lib/components/weekly-report/common-painter/darwAvatar.js +6 -10
- package/lib/components/weekly-report/common-painter/drawName.js +2 -6
- package/lib/components/weekly-report/common-painter/openDataPainter.js +2 -6
- package/lib/components/weekly-report/index.js +4 -6
- package/lib/components-v1/animate/AnimateChild.js +2 -2
- package/lib/components-v1/animate/animate.js +2 -2
- package/lib/components-v1/avatar/index.js +2 -2
- package/lib/components-v1/buttonv2/ButtonOutlined.js +2 -2
- package/lib/components-v1/buttonv2/ButtonRounded.js +2 -2
- package/lib/components-v1/buttonv2/DefaultButton.js +2 -2
- package/lib/components-v1/confirm/index.js +2 -2
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +2 -2
- package/lib/components-v1/dropDownSelector/dropDownSelector.js +2 -2
- package/lib/components-v1/input/Input.js +3 -3
- package/lib/components-v1/input/InputNumber.js +2 -2
- package/lib/components-v1/placement/placement.js +2 -2
- package/lib/components-v1/placement/placementInner.js +2 -2
- package/lib/components-v1/pop/Pop.js +2 -2
- package/lib/components-v1/pop/PopInner.js +2 -2
- package/lib/components-v1/portals/Portals.js +2 -2
- package/lib/components-v1/progress/CircleProgress.js +2 -2
- package/lib/components-v1/progress/LineProgress.js +2 -2
- package/lib/components-v1/progress/index.js +2 -2
- package/lib/components-v1/radio/radio.js +2 -2
- package/lib/components-v1/radio/radioGroup.js +2 -2
- package/lib/components-v1/search/index.js +2 -2
- package/lib/components-v1/select/Option.js +3 -3
- package/lib/components-v1/select/index.js +3 -3
- package/lib/components-v1/tabs/index.js +2 -2
- package/lib/components-v1/textarea/index.js +2 -2
- package/lib/components-v1/transition/index.js +2 -2
- package/lib/components-v1/userSelector/UserSelectorPop.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/CommonList.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentList.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentTree.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/SubsList.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/index.js +2 -2
- package/lib/components-v1/userSelector/components/SearchBar.js +2 -2
- package/lib/components-v1/userSelector/components/SingleMode.js +2 -2
- package/lib/components-v1/userSelector/components/UserItem.js +2 -2
- package/lib/components-v1/userSelector/index.js +2 -2
- package/lib/pages/appointment-demo/drop-down-box/index.js +1 -1
- package/lib/pages/appointment-demo/input/index.js +3 -3
- package/lib/pages/appointment-demo/popup/index.js +1 -1
- package/lib/pages/group-management/components/input-form/index.js +3 -3
- package/lib/pages/group-management/components/radio/index.js +1 -1
- package/lib/pages/group-management/groupInterface.js +2 -6
- package/lib/pages/group-management/page-view/importGroupStaff/index.js +1 -1
- package/lib/pages/group-management/tree/index.js +1 -1
- package/lib/pages/new-okr-list/request-api.js +14 -18
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +3 -5
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +1 -1
- package/lib/pages/okr-map/request-apis.js +2 -6
- package/lib/pages/okr-map/share-dialog/index.js +1 -1
- package/lib/utils/auth.js +2 -2
- package/lib/utils/open-data.js +4 -6
- package/lib/utils/request-v1.js +2 -6
- package/lib/utils/request.js +2 -6
- package/package.json +1 -1
- package/lib/components/book-demo-award/components/pc/components/checkbox/index.css +0 -54
- package/lib/components/book-demo-award/components/pc/components/checkbox/index.js +0 -126
- package/lib/components/book-demo-award/components/pc/components/content/index.css +0 -124
- package/lib/components/book-demo-award/components/pc/components/content/index.js +0 -372
- package/lib/components/book-demo-award/components/pc/components/drop-select/index.css +0 -41
- package/lib/components/book-demo-award/components/pc/components/drop-select/index.js +0 -86
- package/lib/components/book-demo-award/components/pc/components/error-info/index.css +0 -6
- package/lib/components/book-demo-award/components/pc/components/error-info/index.js +0 -24
- package/lib/components/book-demo-award/components/pc/components/input/index.css +0 -56
- package/lib/components/book-demo-award/components/pc/components/input/index.js +0 -94
- package/lib/components/book-demo-award/components/pc/components/phone/index.css +0 -68
- package/lib/components/book-demo-award/components/pc/components/phone/index.js +0 -95
- package/lib/components/book-demo-award/components/pc/components/verify-code/index.css +0 -45
- package/lib/components/book-demo-award/components/pc/components/verify-code/index.js +0 -139
- package/lib/components/book-demo-award/components/pc/index.css +0 -22
- package/lib/components/book-demo-award/components/pc/index.js +0 -174
- package/lib/components/book-demo-award/constant.js +0 -812
- package/lib/components/book-demo-award/img/demo-close.svg +0 -16
- package/lib/components/book-demo-award/img/demo-down.svg +0 -7
- package/lib/components/book-demo-award/img/demo-learning.jpg +0 -0
- package/lib/components/book-demo-award/img/demo-okr.jpg +0 -0
- package/lib/components/book-demo-award/img/demo-performance.jpg +0 -0
- package/lib/components/book-demo-award/img/demo-universal.jpg +0 -0
- package/lib/components/book-demo-award/img/order-award.png +0 -0
- package/lib/components/book-demo-award/index.js +0 -22
- package/lib/components/book-demo-award/interface.js +0 -17
- package/lib/components/book-demo-award/request.js +0 -50
- package/lib/components/book-demo-award/utils.js +0 -82
- package/lib/components/nav-top/components/app-center/images/yuyue-award.png +0 -0
- package/lib/components/nav-top/images/app-center.svg +0 -21
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>切片</title>
|
|
4
|
+
<g id="10、日期时间组件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="日期范围选择器-Date" transform="translate(-411.000000, -3250.000000)" fill="#BFC7D5">
|
|
6
|
+
<g id="编组-4" transform="translate(254.000000, 3190.000000)">
|
|
7
|
+
<g id="日期基础组件" transform="translate(0.000000, 36.000000)">
|
|
8
|
+
<g id="编组-6" transform="translate(20.000000, 16.000000)">
|
|
9
|
+
<g id="cross" transform="translate(137.000000, 8.000000)">
|
|
10
|
+
<path d="M8,1.33333333 C9.84066667,1.33333333 11.5073333,2.07966667 12.7143333,3.286 C13.9206667,4.49233333 14.6666667,6.159 14.6666667,8 C14.6666667,9.84066667 13.9206667,11.5073333 12.7143333,12.7143333 C11.5073333,13.9206667 9.84066667,14.6666667 8,14.6666667 C6.159,14.6666667 4.49233333,13.9206667 3.286,12.7143333 C2.07966667,11.5073333 1.33333333,9.84066667 1.33333333,8 C1.33333333,6.159 2.07966667,4.49233333 3.286,3.286 C4.49233333,2.07966667 6.159,1.33333333 8,1.33333333 Z M6.00687497,5.25130819 C5.79859535,5.04302857 5.46090736,5.04302857 5.25262774,5.25130819 C5.04434812,5.45958782 5.04434812,5.7972758 5.25262774,6.00555543 L5.25262774,6.00555543 L7.23241802,7.98509848 L5.25262774,9.9653534 L5.19091526,10.0392178 C5.04691947,10.2470772 5.0674903,10.5344632 5.25262774,10.7196006 L5.25262774,10.7196006 L5.32649215,10.7813131 C5.5343515,10.9253089 5.82173753,10.9047381 6.00687497,10.7196006 L6.00687497,10.7196006 L7.98641802,8.73909848 L9.96667295,10.7196006 C10.1749526,10.9278803 10.5126406,10.9278803 10.7209202,10.7196006 C10.9291998,10.511321 10.9291998,10.173633 10.7209202,9.9653534 L10.7209202,9.9653534 L8.74041802,7.98509848 L10.7209202,6.00555543 L10.7826327,5.93169101 C10.9266284,5.72383166 10.9060576,5.43644564 10.7209202,5.25130819 L10.7209202,5.25130819 L10.6470558,5.18959571 C10.4391964,5.04559992 10.1518104,5.06617075 9.96667295,5.25130819 L9.96667295,5.25130819 L7.98641802,7.23109848 Z" id="形状结合"></path>
|
|
11
|
+
</g>
|
|
12
|
+
</g>
|
|
13
|
+
</g>
|
|
14
|
+
</g>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|
|
@@ -35,13 +35,14 @@ var DATE_ROW_NUM = 6;
|
|
|
35
35
|
var DatePanelBody = function DatePanelBody(props) {
|
|
36
36
|
var viewDate = props.viewDate,
|
|
37
37
|
_props$weekStartDay = props.weekStartDay,
|
|
38
|
-
weekStartDay = _props$weekStartDay === void 0 ?
|
|
38
|
+
weekStartDay = _props$weekStartDay === void 0 ? 'SUNDAY' : _props$weekStartDay,
|
|
39
39
|
onSelect = props.onSelect;
|
|
40
40
|
|
|
41
41
|
var _useContext = (0, _react.useContext)(_context["default"]),
|
|
42
|
+
format = _useContext.format,
|
|
42
43
|
value = _useContext.value;
|
|
43
44
|
|
|
44
|
-
var weekStartDaySun = weekStartDay ===
|
|
45
|
+
var weekStartDaySun = weekStartDay === 'SUNDAY';
|
|
45
46
|
|
|
46
47
|
var getCells = function getCells(sunday, currentMonth) {
|
|
47
48
|
var dates = [];
|
|
@@ -49,16 +50,27 @@ var DatePanelBody = function DatePanelBody(props) {
|
|
|
49
50
|
var _loop = function _loop(day) {
|
|
50
51
|
var _classNames;
|
|
51
52
|
|
|
52
|
-
var date = (0, _moment["default"])(sunday).add(day,
|
|
53
|
-
|
|
53
|
+
var date = (0, _moment["default"])(sunday).add(day, 'd');
|
|
54
|
+
|
|
55
|
+
var _isCurrentDateInRange = (0, _utils.isCurrentDateInRanges)({
|
|
56
|
+
nowDate: date,
|
|
57
|
+
values: value
|
|
58
|
+
}),
|
|
59
|
+
inRanges = _isCurrentDateInRange.inRanges,
|
|
60
|
+
rangeStart = _isCurrentDateInRange.rangeStart,
|
|
61
|
+
rangeEnd = _isCurrentDateInRange.rangeEnd;
|
|
62
|
+
|
|
63
|
+
var classes = (0, _classnames["default"])(_utils.PickerCellClass, (_classNames = {}, _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--today"), date.isSame((0, _moment["default"])(), 'date')), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--in-view"), date.format('YYYY/MM') === currentMonth), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--in-ranges"), inRanges), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--in-ranges--start"), rangeStart), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--in-ranges--end"), rangeEnd), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--selected"), value === null || value === void 0 ? void 0 : value.some(function (v) {
|
|
64
|
+
return date.isSame((0, _moment["default"])(v).format('YYYY/MM/DD'), 'date');
|
|
65
|
+
})), _classNames));
|
|
54
66
|
dates.push( /*#__PURE__*/_react["default"].createElement("td", {
|
|
55
67
|
className: classes,
|
|
56
|
-
key: date.format(
|
|
68
|
+
key: date.format('YYYY/MM/DD')
|
|
57
69
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
58
70
|
className: (0, _classnames["default"])("".concat(_utils.PickerCellClass, "__inner")),
|
|
59
|
-
title: date.format(
|
|
71
|
+
title: date.format('YYYY-MM-DD'),
|
|
60
72
|
onClick: function onClick() {
|
|
61
|
-
return onSelect && onSelect(date,
|
|
73
|
+
return onSelect && onSelect(date, 'date');
|
|
62
74
|
}
|
|
63
75
|
}, date.date())));
|
|
64
76
|
};
|
|
@@ -73,16 +85,16 @@ var DatePanelBody = function DatePanelBody(props) {
|
|
|
73
85
|
var getRows = function getRows(date) {
|
|
74
86
|
var currentDate = (0, _moment["default"])(date);
|
|
75
87
|
var monthFirstDay = currentDate.date(1);
|
|
76
|
-
var currentMonth = monthFirstDay.format(
|
|
88
|
+
var currentMonth = monthFirstDay.format('YYYY/MM');
|
|
77
89
|
var daysDiff = weekStartDaySun ? 0 : 1;
|
|
78
|
-
var weekStartDay = monthFirstDay.subtract(monthFirstDay.day() - daysDiff,
|
|
90
|
+
var weekStartDay = monthFirstDay.subtract(monthFirstDay.day() - daysDiff, 'days');
|
|
79
91
|
var rows = [];
|
|
80
92
|
|
|
81
93
|
for (var row = 0; row < DATE_ROW_NUM; row += 1) {
|
|
82
94
|
rows.push( /*#__PURE__*/_react["default"].createElement("tr", {
|
|
83
95
|
key: row
|
|
84
96
|
}, getCells(weekStartDay, currentMonth)));
|
|
85
|
-
weekStartDay = weekStartDay.add(1,
|
|
97
|
+
weekStartDay = weekStartDay.add(1, 'w');
|
|
86
98
|
}
|
|
87
99
|
|
|
88
100
|
return rows;
|
|
@@ -94,25 +106,25 @@ var DatePanelBody = function DatePanelBody(props) {
|
|
|
94
106
|
className: (0, _classnames["default"])("".concat(_utils.PickerClass, "-content"))
|
|
95
107
|
}, /*#__PURE__*/_react["default"].createElement("thead", null, /*#__PURE__*/_react["default"].createElement("tr", null, weekStartDaySun && /*#__PURE__*/_react["default"].createElement("th", {
|
|
96
108
|
className: _utils.PickerCellClass
|
|
97
|
-
}, (0, _getLocale.getLocale)(
|
|
109
|
+
}, (0, _getLocale.getLocale)('Mod_Sun')), /*#__PURE__*/_react["default"].createElement("th", {
|
|
98
110
|
className: _utils.PickerCellClass
|
|
99
|
-
}, (0, _getLocale.getLocale)(
|
|
111
|
+
}, (0, _getLocale.getLocale)('Mod_Mon')), /*#__PURE__*/_react["default"].createElement("th", {
|
|
100
112
|
className: _utils.PickerCellClass
|
|
101
|
-
}, (0, _getLocale.getLocale)(
|
|
113
|
+
}, (0, _getLocale.getLocale)('Mod_Tues')), /*#__PURE__*/_react["default"].createElement("th", {
|
|
102
114
|
className: _utils.PickerCellClass
|
|
103
|
-
}, (0, _getLocale.getLocale)(
|
|
115
|
+
}, (0, _getLocale.getLocale)('Mod_Wed')), /*#__PURE__*/_react["default"].createElement("th", {
|
|
104
116
|
className: _utils.PickerCellClass
|
|
105
|
-
}, (0, _getLocale.getLocale)(
|
|
117
|
+
}, (0, _getLocale.getLocale)('Mod_Thur')), /*#__PURE__*/_react["default"].createElement("th", {
|
|
106
118
|
className: _utils.PickerCellClass
|
|
107
|
-
}, (0, _getLocale.getLocale)(
|
|
119
|
+
}, (0, _getLocale.getLocale)('Mod_Fri')), /*#__PURE__*/_react["default"].createElement("th", {
|
|
108
120
|
className: _utils.PickerCellClass
|
|
109
|
-
}, (0, _getLocale.getLocale)(
|
|
121
|
+
}, (0, _getLocale.getLocale)('Mod_Sat')), weekStartDay !== 'SUNDAY' && /*#__PURE__*/_react["default"].createElement("th", {
|
|
110
122
|
className: _utils.PickerCellClass
|
|
111
|
-
}, (0, _getLocale.getLocale)(
|
|
123
|
+
}, (0, _getLocale.getLocale)('Mod_Sun')))), /*#__PURE__*/_react["default"].createElement("tbody", null, getRows((0, _moment["default"])(viewDate)))));
|
|
112
124
|
};
|
|
113
125
|
|
|
114
126
|
DatePanelBody.defaultProps = {
|
|
115
|
-
weekStartDay:
|
|
127
|
+
weekStartDay: 'SUNDAY'
|
|
116
128
|
};
|
|
117
129
|
var _default = DatePanelBody;
|
|
118
130
|
exports["default"] = _default;
|
|
@@ -25,8 +25,8 @@ function DatePanelHead(props) {
|
|
|
25
25
|
onPrev = props.onPrev,
|
|
26
26
|
onNext = props.onNext,
|
|
27
27
|
onPanelChange = props.onPanelChange;
|
|
28
|
-
var yearText = (0, _moment["default"])(viewDate).format(
|
|
29
|
-
var monthText = (0, _moment["default"])(viewDate).format(
|
|
28
|
+
var yearText = (0, _moment["default"])(viewDate).format('YYYY');
|
|
29
|
+
var monthText = (0, _moment["default"])(viewDate).format('MM');
|
|
30
30
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
31
31
|
className: (0, _classnames["default"])(_utils.PickerHeadClass)
|
|
32
32
|
}, !_getLocale.isEn && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -34,7 +34,7 @@ function DatePanelHead(props) {
|
|
|
34
34
|
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
35
35
|
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__year")),
|
|
36
36
|
onClick: function onClick() {
|
|
37
|
-
return onPanelChange && onPanelChange(viewDate,
|
|
37
|
+
return onPanelChange && onPanelChange(viewDate, 'year');
|
|
38
38
|
},
|
|
39
39
|
type: "button"
|
|
40
40
|
}, yearText), /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -42,7 +42,7 @@ function DatePanelHead(props) {
|
|
|
42
42
|
}, "\xA0\u5E74"), /*#__PURE__*/_react["default"].createElement("button", {
|
|
43
43
|
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__month")),
|
|
44
44
|
onClick: function onClick() {
|
|
45
|
-
return onPanelChange && onPanelChange(viewDate,
|
|
45
|
+
return onPanelChange && onPanelChange(viewDate, 'month');
|
|
46
46
|
},
|
|
47
47
|
type: "button"
|
|
48
48
|
}, monthText), /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -52,7 +52,7 @@ function DatePanelHead(props) {
|
|
|
52
52
|
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
53
53
|
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__month")),
|
|
54
54
|
onClick: function onClick() {
|
|
55
|
-
return onPanelChange && onPanelChange(viewDate,
|
|
55
|
+
return onPanelChange && onPanelChange(viewDate, 'month');
|
|
56
56
|
},
|
|
57
57
|
style: {
|
|
58
58
|
marginRight: 4
|
|
@@ -61,7 +61,7 @@ function DatePanelHead(props) {
|
|
|
61
61
|
}, _utils.MONTHDATAMAPEN[Number(monthText) - 1]), /*#__PURE__*/_react["default"].createElement("button", {
|
|
62
62
|
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__year")),
|
|
63
63
|
onClick: function onClick() {
|
|
64
|
-
return onPanelChange && onPanelChange(viewDate,
|
|
64
|
+
return onPanelChange && onPanelChange(viewDate, 'year');
|
|
65
65
|
},
|
|
66
66
|
type: "button"
|
|
67
67
|
}, yearText)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -70,14 +70,14 @@ function DatePanelHead(props) {
|
|
|
70
70
|
/*#__PURE__*/
|
|
71
71
|
// eslint-disable-next-line jsx-a11y/control-has-associated-label
|
|
72
72
|
_react["default"].createElement("button", {
|
|
73
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__prev"),
|
|
73
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__prev"), 'tu-icon-arrow-up1'),
|
|
74
74
|
onClick: onPrev,
|
|
75
75
|
type: "button"
|
|
76
76
|
}),
|
|
77
77
|
/*#__PURE__*/
|
|
78
78
|
// eslint-disable-next-line jsx-a11y/control-has-associated-label
|
|
79
79
|
_react["default"].createElement("button", {
|
|
80
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__next"),
|
|
80
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__next"), 'tu-icon-arrow-down1'),
|
|
81
81
|
onClick: onNext,
|
|
82
82
|
type: "button"
|
|
83
83
|
})));
|
|
@@ -21,7 +21,7 @@ require("./index.css");
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
23
|
|
|
24
|
-
function _extends() { _extends = Object.assign
|
|
24
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
25
|
|
|
26
26
|
var DatePanel = function DatePanel(props) {
|
|
27
27
|
var viewDate = props.viewDate,
|
|
@@ -29,7 +29,7 @@ var DatePanel = function DatePanel(props) {
|
|
|
29
29
|
|
|
30
30
|
var onMonthChange = function onMonthChange(diff) {
|
|
31
31
|
if (onViewDateChange) {
|
|
32
|
-
onViewDateChange((0, _moment["default"])(viewDate).add(diff,
|
|
32
|
+
onViewDateChange((0, _moment["default"])(viewDate).add(diff, 'M'));
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -23,7 +23,7 @@ var _excluded = ["viewDate", "onPanelChange", "onViewDateChange"];
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
25
|
|
|
26
|
-
function _extends() { _extends = Object.assign
|
|
26
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
27
27
|
|
|
28
28
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
29
29
|
|
|
@@ -37,7 +37,7 @@ var MonthPanel = function MonthPanel(props) {
|
|
|
37
37
|
|
|
38
38
|
var onYearChange = function onYearChange(diff) {
|
|
39
39
|
if (onViewDateChange) {
|
|
40
|
-
onViewDateChange((0, _moment["default"])(viewDate).add(diff,
|
|
40
|
+
onViewDateChange((0, _moment["default"])(viewDate).add(diff, 'y'));
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
|
|
@@ -52,7 +52,7 @@ var MonthPanel = function MonthPanel(props) {
|
|
|
52
52
|
onYearChange(1);
|
|
53
53
|
},
|
|
54
54
|
onYearClick: function onYearClick() {
|
|
55
|
-
onPanelChange === null || onPanelChange === void 0 ? void 0 : onPanelChange(viewDate,
|
|
55
|
+
onPanelChange === null || onPanelChange === void 0 ? void 0 : onPanelChange(viewDate, 'year');
|
|
56
56
|
}
|
|
57
57
|
})), /*#__PURE__*/_react["default"].createElement(_monthBody["default"], _extends({
|
|
58
58
|
viewDate: viewDate
|
|
@@ -35,8 +35,7 @@ var MonthPanelBody = function MonthPanelBody(props) {
|
|
|
35
35
|
onSelect = props.onSelect;
|
|
36
36
|
|
|
37
37
|
var _useContext = (0, _react.useContext)(_context["default"]),
|
|
38
|
-
value = _useContext.value
|
|
39
|
-
mode = _useContext.mode;
|
|
38
|
+
value = _useContext.value;
|
|
40
39
|
|
|
41
40
|
var getCells = function getCells(baseMonth) {
|
|
42
41
|
var cols = [];
|
|
@@ -46,14 +45,14 @@ var MonthPanelBody = function MonthPanelBody(props) {
|
|
|
46
45
|
|
|
47
46
|
var month = col + baseMonth;
|
|
48
47
|
cols.push( /*#__PURE__*/_react["default"].createElement("td", {
|
|
49
|
-
className: (0, _classnames["default"])(_utils.PickerCellClass, "".concat(_utils.PickerCellClass, "--in-view"), (_classNames = {}, _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--this-month"), month === (0, _moment["default"])().month()), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--selected"), month === (0, _moment["default"])(
|
|
48
|
+
className: (0, _classnames["default"])(_utils.PickerCellClass, "".concat(_utils.PickerCellClass, "--in-view"), (_classNames = {}, _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--this-month"), month === (0, _moment["default"])().month()), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--selected"), month === (0, _moment["default"])(viewDate).month()), _classNames)),
|
|
50
49
|
key: month
|
|
51
50
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
52
51
|
onClick: function onClick() {
|
|
53
|
-
return onSelect && onSelect((0, _moment["default"])(viewDate).month(month),
|
|
52
|
+
return onSelect && onSelect((0, _moment["default"])(viewDate).month(month), 'month');
|
|
54
53
|
},
|
|
55
54
|
className: (0, _classnames["default"])("".concat(_utils.PickerCellClass, "__inner")),
|
|
56
|
-
title: (0, _moment["default"])(viewDate).month(month).format(
|
|
55
|
+
title: (0, _moment["default"])(viewDate).month(month).format('YYYY-MM')
|
|
57
56
|
}, _getLocale.isEn ? _utils.MONTHDATAMAPEN[month] : _utils.MONTHDATAMAP[month])));
|
|
58
57
|
};
|
|
59
58
|
|
|
@@ -19,7 +19,7 @@ var _excluded = ["viewDate", "onPrevYear", "onNextYear", "onYearClick"];
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
21
|
|
|
22
|
-
function _extends() { _extends = Object.assign
|
|
22
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
23
|
|
|
24
24
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
25
25
|
|
|
@@ -40,7 +40,7 @@ var MonthPanelHead = function MonthPanelHead(props) {
|
|
|
40
40
|
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__year")),
|
|
41
41
|
onClick: onYearClick,
|
|
42
42
|
type: "button"
|
|
43
|
-
}, viewDate.year()));
|
|
43
|
+
}, (0, _moment["default"])(viewDate).year()));
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
var _default = MonthPanelHead;
|
|
@@ -21,7 +21,7 @@ require("./index.css");
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
23
|
|
|
24
|
-
function _extends() { _extends = Object.assign
|
|
24
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
25
|
|
|
26
26
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
27
27
|
|
|
@@ -40,7 +40,7 @@ var YearPanel = function YearPanel(props) {
|
|
|
40
40
|
|
|
41
41
|
var onDecadeYearChange = function onDecadeYearChange(diff) {
|
|
42
42
|
if (onViewDateChange) {
|
|
43
|
-
onViewDateChange((0, _moment["default"])(viewDate).add(diff,
|
|
43
|
+
onViewDateChange((0, _moment["default"])(viewDate).add(diff, 'y'));
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
|
|
@@ -36,8 +36,15 @@ var YearPanelBody = function YearPanelBody(props) {
|
|
|
36
36
|
endYear = props.endYear;
|
|
37
37
|
|
|
38
38
|
var _useContext = (0, _react.useContext)(_context["default"]),
|
|
39
|
+
format = _useContext.format,
|
|
39
40
|
value = _useContext.value,
|
|
40
|
-
|
|
41
|
+
settingType = _useContext.settingType;
|
|
42
|
+
|
|
43
|
+
var date = (0, _utils.getPickerDateBySettingType)({
|
|
44
|
+
format: format,
|
|
45
|
+
settingType: settingType,
|
|
46
|
+
values: value
|
|
47
|
+
});
|
|
41
48
|
|
|
42
49
|
var getCells = function getCells(baseYear) {
|
|
43
50
|
var cols = [];
|
|
@@ -47,14 +54,14 @@ var YearPanelBody = function YearPanelBody(props) {
|
|
|
47
54
|
|
|
48
55
|
var year = baseYear + col;
|
|
49
56
|
cols.push( /*#__PURE__*/_react["default"].createElement("td", {
|
|
50
|
-
className: (0, _classnames["default"])(_utils.PickerCellClass, (_classNames = {}, _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--this-year"), year === (0, _moment["default"])().year()), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--in-view"), year >= startYear && year <= endYear), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--selected"), year === (0, _moment["default"])(
|
|
57
|
+
className: (0, _classnames["default"])(_utils.PickerCellClass, (_classNames = {}, _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--this-year"), year === (0, _moment["default"])().year()), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--in-view"), year >= startYear && year <= endYear), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--selected"), year === (0, _moment["default"])(date).year()), _classNames)),
|
|
51
58
|
key: year
|
|
52
59
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
53
60
|
className: (0, _classnames["default"])("".concat(_utils.PickerCellClass, "__inner")),
|
|
54
61
|
title: year,
|
|
55
62
|
onClick: function onClick() {
|
|
56
63
|
if (onSelect) {
|
|
57
|
-
onSelect((0, _moment["default"])(viewDate).year(year),
|
|
64
|
+
onSelect((0, _moment["default"])(viewDate).year(year), 'year');
|
|
58
65
|
}
|
|
59
66
|
}
|
|
60
67
|
}, year)));
|
|
@@ -15,7 +15,7 @@ var _panelHead = _interopRequireDefault(require("../panel-head"));
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
17
|
|
|
18
|
-
function _extends() { _extends = Object.assign
|
|
18
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
|
|
20
20
|
var YearPanelHead = function YearPanelHead(props) {
|
|
21
21
|
var onPrevDecadeYear = props.onPrevDecadeYear,
|
|
@@ -12,10 +12,14 @@
|
|
|
12
12
|
align-items: center;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.tita-ui__picker-trigger:hover {
|
|
15
|
+
.tita-ui__picker-trigger:hover, .tita-ui__picker-trigger--focused {
|
|
16
16
|
border-color: #2879ff;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
.tita-ui__picker-trigger--focused .tita-ui__picker-trigger__operation .tu-icon-caret-down::before {
|
|
20
|
+
transform: scale(0.5) rotate(-180deg);
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
.tita-ui__picker-trigger__input {
|
|
20
24
|
flex: 1;
|
|
21
25
|
margin-right: 12px;
|
|
@@ -41,6 +45,7 @@
|
|
|
41
45
|
|
|
42
46
|
.tita-ui__picker-trigger__operation .tu-icon-caret-down::before {
|
|
43
47
|
transform: scale(0.5);
|
|
48
|
+
transition: all 0.3s ease;
|
|
44
49
|
display: inline-block;
|
|
45
50
|
}
|
|
46
51
|
|
|
@@ -11,6 +11,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
15
|
+
|
|
14
16
|
var _utils = require("../../utils");
|
|
15
17
|
|
|
16
18
|
var _context = _interopRequireDefault(require("../../context"));
|
|
@@ -26,7 +28,10 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
26
28
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
29
|
|
|
28
30
|
var PickerTrigger = function PickerTrigger(props) {
|
|
31
|
+
var _classNames;
|
|
32
|
+
|
|
29
33
|
var children = props.children,
|
|
34
|
+
focused = props.focused,
|
|
30
35
|
viewDate = props.viewDate,
|
|
31
36
|
_props$disabled = props.disabled,
|
|
32
37
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
@@ -36,23 +41,23 @@ var PickerTrigger = function PickerTrigger(props) {
|
|
|
36
41
|
_onClick = props.onClick;
|
|
37
42
|
|
|
38
43
|
var _useContext = (0, _react.useContext)(_context["default"]),
|
|
39
|
-
|
|
44
|
+
picker = _useContext.picker,
|
|
40
45
|
format = _useContext.format,
|
|
41
46
|
value = _useContext.value;
|
|
42
47
|
|
|
43
48
|
var currFormat = format;
|
|
44
49
|
|
|
45
|
-
switch (
|
|
46
|
-
case
|
|
47
|
-
currFormat =
|
|
50
|
+
switch (picker) {
|
|
51
|
+
case 'date':
|
|
52
|
+
currFormat = 'YYYY/MM/DD';
|
|
48
53
|
break;
|
|
49
54
|
|
|
50
|
-
case
|
|
51
|
-
currFormat =
|
|
55
|
+
case 'month':
|
|
56
|
+
currFormat = 'YYYY/MM';
|
|
52
57
|
break;
|
|
53
58
|
|
|
54
|
-
case
|
|
55
|
-
currFormat =
|
|
59
|
+
case 'year':
|
|
60
|
+
currFormat = 'YYYY';
|
|
56
61
|
break;
|
|
57
62
|
|
|
58
63
|
default:
|
|
@@ -68,13 +73,13 @@ var PickerTrigger = function PickerTrigger(props) {
|
|
|
68
73
|
return !disabled && _onClick();
|
|
69
74
|
}
|
|
70
75
|
}, children) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
71
|
-
className: (0, _classnames["default"])(_utils.PickerTriggerClass,
|
|
76
|
+
className: (0, _classnames["default"])(_utils.PickerTriggerClass, (_classNames = {}, _defineProperty(_classNames, "".concat(_utils.PickerTriggerClass, "--disabled"), disabled), _defineProperty(_classNames, "".concat(_utils.PickerTriggerClass, "--focused"), focused), _classNames)),
|
|
72
77
|
onClick: function onClick() {
|
|
73
78
|
return !disabled && _onClick();
|
|
74
79
|
}
|
|
75
80
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
76
81
|
className: (0, _classnames["default"])("".concat(_utils.PickerTriggerClass, "__input"), _defineProperty({}, "".concat(_utils.PickerTriggerClass, "__input--placeholder"), !value && placeholder))
|
|
77
|
-
}, value ? viewDate.format(currFormat) : placeholder), /*#__PURE__*/_react["default"].createElement("div", {
|
|
82
|
+
}, value ? (0, _moment["default"])(viewDate).format(currFormat) : placeholder), /*#__PURE__*/_react["default"].createElement("div", {
|
|
78
83
|
className: (0, _classnames["default"])("".concat(_utils.PickerTriggerClass, "__operation"))
|
|
79
84
|
}, !disabled && /*#__PURE__*/_react["default"].createElement("span", {
|
|
80
85
|
className: "tu-icon-caret-down"
|
|
@@ -88,7 +93,7 @@ PickerTrigger.defaultProps = {
|
|
|
88
93
|
children: null,
|
|
89
94
|
disabled: false,
|
|
90
95
|
allowClear: false,
|
|
91
|
-
placeholder:
|
|
96
|
+
placeholder: '请选择'
|
|
92
97
|
};
|
|
93
98
|
var _default = PickerTrigger;
|
|
94
99
|
exports["default"] = _default;
|
|
@@ -3,13 +3,28 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports["default"] = void 0;
|
|
6
|
+
exports["default"] = exports.RangePickerContext = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
11
|
+
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
13
|
|
|
12
|
-
var PickerContext = /*#__PURE__*/_react["default"].createContext({
|
|
14
|
+
var PickerContext = /*#__PURE__*/_react["default"].createContext({
|
|
15
|
+
format: 'YYYY/MM/DD',
|
|
16
|
+
picker: 'date',
|
|
17
|
+
settingType: 'startDate',
|
|
18
|
+
value: [(0, _moment["default"])()]
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
var RangePickerContext = /*#__PURE__*/_react["default"].createContext({
|
|
22
|
+
format: 'YYYY/MM/DD',
|
|
23
|
+
picker: 'date',
|
|
24
|
+
settingType: 'startDate',
|
|
25
|
+
values: [(0, _moment["default"])(), (0, _moment["default"])()]
|
|
26
|
+
});
|
|
13
27
|
|
|
28
|
+
exports.RangePickerContext = RangePickerContext;
|
|
14
29
|
var _default = PickerContext;
|
|
15
30
|
exports["default"] = _default;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
color: #141c28;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.tita-ui__picker-cell--
|
|
30
|
+
.tita-ui__picker-cell--today .tita-ui__picker-cell__inner, .tita-ui__picker-cell:hover .tita-ui__picker-cell__inner {
|
|
31
31
|
background-color: #f0f4fa;
|
|
32
32
|
color: #2879ff;
|
|
33
33
|
}
|
|
@@ -37,6 +37,34 @@
|
|
|
37
37
|
color: #ffffff;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
.tita-ui__picker-cell--selected:hover .tita-ui__picker-cell__inner {
|
|
41
|
+
background-color: #5c8eff;
|
|
42
|
+
color: #ffffff;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.tita-ui__picker-cell--in-ranges {
|
|
46
|
+
position: relative;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.tita-ui__picker-cell--in-ranges::after {
|
|
50
|
+
content: '';
|
|
51
|
+
background-color: rgba(40, 121, 255, 0.1);
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 4px;
|
|
55
|
+
right: 0;
|
|
56
|
+
bottom: 4px;
|
|
57
|
+
left: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.tita-ui__picker-cell--in-ranges--start.tita-ui__picker-cell--selected::after {
|
|
61
|
+
left: 10px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.tita-ui__picker-cell--in-ranges--end.tita-ui__picker-cell--selected::after {
|
|
65
|
+
right: 10px;
|
|
66
|
+
}
|
|
67
|
+
|
|
40
68
|
.tita-ui__picker-cell__inner {
|
|
41
69
|
width: 100%;
|
|
42
70
|
height: 100%;
|
|
@@ -7,7 +7,10 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _picker = _interopRequireDefault(require("./picker"));
|
|
9
9
|
|
|
10
|
+
var _rangePicker = _interopRequireDefault(require("./range-picker"));
|
|
11
|
+
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
13
|
|
|
14
|
+
_picker["default"]['Range'] = _rangePicker["default"];
|
|
12
15
|
var _default = _picker["default"];
|
|
13
16
|
exports["default"] = _default;
|