@titaui/pc 1.16.56 → 1.16.57
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 +6 -6
- package/lib/components/date-picker/CalendarBody.js +3 -3
- package/lib/components/date-picker/CalendarHeader.js +6 -6
- 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 +5 -5
- package/lib/components/dialog/index.js +1 -1
- package/lib/components/dialog-confirm/index.js +1 -1
- package/lib/components/dialog-qq-docs/index.js +9 -11
- package/lib/components/dialog-qq-docs/utils.js +2 -6
- package/lib/components/dialog-select/index.js +1 -1
- package/lib/components/dialog-upload/index.js +2 -4
- package/lib/components/dialog-upload-type/components/upload-type-item/index.js +1 -1
- package/lib/components/dialog-upload-type/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/components/progress/components/okr-progress/index.js +2 -4
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +4 -6
- 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-discovery/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-new-report/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/dynamic/dynamic-item/index.js +1 -1
- package/lib/components/dynamic/dynamic-list/index.js +1 -1
- package/lib/components/eReport/eReportListEmpty.js +2 -2
- package/lib/components/eReport/eReportLists/reportList.js +5 -5
- 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 +5 -5
- package/lib/components/ereport-list/index.js +5 -5
- package/lib/components/error-boundary/index.js +2 -2
- package/lib/components/filter-buttons/department.js +1 -1
- package/lib/components/filter-buttons/index.js +1 -1
- package/lib/components/filter-buttons/name.js +1 -1
- package/lib/components/firework/index.js +2 -6
- package/lib/components/form/form-fields/date/index.js +1 -1
- 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/guide-order/index.js +1 -1
- package/lib/components/guide-tip/index.js +1 -1
- package/lib/components/help-card/index.js +1 -1
- package/lib/components/import-modal/import-task-modal/index.js +1 -1
- package/lib/components/import-modal/tree/okr-tree/index.js +2 -4
- package/lib/components/import-modal/tree-node/index.js +1 -1
- package/lib/components/magnet/index.js +1 -1
- package/lib/components/mblog/components/ConfirmPop.js +2 -2
- package/lib/components/mblog/components/MblogAction.js +5 -5
- package/lib/components/mblog/components/MblogContent.js +2 -2
- package/lib/components/mblog/index.js +2 -2
- package/lib/components/menus/components/menu-tree/index.js +1 -1
- package/lib/components/menus/components/menu-tree/tree-node/index.js +1 -1
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +1 -1
- 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 +5 -5
- 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-excel/renders.js +4 -8
- package/lib/components/okr-excel-create/components/okr-progress/components/okr-progress/index.js +2 -4
- package/lib/components/okr-excel-create/components/okr-type/base-okr-type/confirm/buttonv2.js +2 -2
- package/lib/components/okr-excel-create/components/okr-type/base-okr-type/confirm/confirm.js +2 -2
- package/lib/components/okr-excel-create/components/okr-type/base-okr-type/object-type.js +2 -2
- package/lib/components/okr-excel-create/components-new/okr-progress/components/okr-progress/index.js +2 -4
- package/lib/components/okr-excel-create/components-new/okr-type/base-okr-type/confirm/buttonv2.js +2 -2
- package/lib/components/okr-excel-create/components-new/okr-type/base-okr-type/confirm/confirm.js +2 -2
- package/lib/components/okr-excel-create/components-new/okr-type/base-okr-type/object-type.js +2 -2
- 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 +43 -6
- 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 +5 -5
- 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/panels/date-panel/date-body.js +31 -101
- package/lib/components/picker/components/panels/date-panel/date-head.js +34 -21
- package/lib/components/picker/components/panels/date-panel/date-rows.js +140 -0
- package/lib/components/picker/components/panels/date-panel/index.css +55 -5
- package/lib/components/picker/components/panels/date-panel/index.js +66 -12
- package/lib/components/picker/components/panels/date-panel/useRowsData.js +77 -0
- package/lib/components/picker/components/panels/month-panel/index.css +19 -9
- package/lib/components/picker/components/panels/month-panel/index.js +1 -1
- package/lib/components/picker/components/panels/month-panel/month-body.js +14 -56
- package/lib/components/picker/components/panels/month-panel/month-head.js +20 -3
- package/lib/components/picker/components/panels/month-panel/useRowsData.js +61 -0
- package/lib/components/picker/components/panels/panel-head/index.js +4 -0
- package/lib/components/picker/components/panels/week-panel/index.css +1 -1
- package/lib/components/picker/components/panels/week-panel/index.js +1 -1
- package/lib/components/picker/components/panels/year-panel/index.css +28 -6
- package/lib/components/picker/components/panels/year-panel/index.js +1 -1
- package/lib/components/picker/components/panels/year-panel/useRowsData.js +63 -0
- package/lib/components/picker/components/panels/year-panel/year-body.js +19 -48
- package/lib/components/picker/components/panels/year-panel/year-head.js +21 -2
- package/lib/components/picker/components/picker-trigger/index.js +1 -1
- package/lib/components/picker/context.js +20 -9
- package/lib/components/picker/index.css +30 -4
- package/lib/components/picker/picker-panels.js +14 -26
- package/lib/components/picker/picker.js +32 -29
- package/lib/components/picker/range-picker/components/operations/index.js +46 -0
- package/lib/components/picker/range-picker/components/picker-trigger/index.css +1 -5
- package/lib/components/picker/range-picker/components/picker-trigger/index.js +10 -11
- package/lib/components/picker/range-picker/components/select-input/index.js +3 -9
- package/lib/components/picker/range-picker/components/shortcuts/index.js +49 -6
- package/lib/components/picker/range-picker/index.css +13 -10
- package/lib/components/picker/range-picker/index.js +66 -94
- package/lib/components/picker/utils.js +63 -14
- 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/popup-select/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 +5 -5
- package/lib/components/rate/index.js +1 -1
- package/lib/components/rich-editor/models/schema.js +8 -8
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +10 -10
- package/lib/components/rich-editor/plugins/block/heading/index.js +10 -10
- package/lib/components/rich-editor/plugins/block/lists/index.js +16 -16
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +7 -7
- package/lib/components/rich-editor/plugins/core/index.js +6 -6
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +7 -7
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +6 -6
- package/lib/components/rich-editor/plugins/inline/color/commond.js +3 -3
- package/lib/components/rich-editor/plugins/inline/color/index.js +13 -13
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +10 -10
- package/lib/components/rich-editor/plugins/inline/em/index.js +7 -7
- package/lib/components/rich-editor/plugins/inline/link/index.js +10 -10
- package/lib/components/rich-editor/plugins/inline/strong/index.js +10 -10
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +10 -10
- package/lib/components/rich-editor/react/reactNodeView.js +4 -4
- package/lib/components/rich-editor/react/uiProvider.js +5 -5
- package/lib/components/rich-editor/ui/Popup/index.js +5 -5
- 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 +6 -6
- 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/table-excel-v2/index.js +1 -1
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/tag/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 +5 -5
- 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 +4 -6
- package/lib/components/upload/index2.js +2 -4
- 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 +5 -5
- package/lib/components-v1/animate/animate.js +2 -2
- package/lib/components-v1/avatar/index.js +5 -5
- 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 +5 -5
- 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 +5 -5
- 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 +6 -6
- 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 +5 -5
- 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 +5 -5
- 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 +5 -5
- 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/helpers.js +2 -6
- 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 +2 -1
- package/lib/components/picker/components/cross.svg +0 -17
|
@@ -17,6 +17,8 @@ var _utils = require("../../../utils");
|
|
|
17
17
|
|
|
18
18
|
var _context = _interopRequireDefault(require("../../../context"));
|
|
19
19
|
|
|
20
|
+
var _useRowsData = _interopRequireDefault(require("./useRowsData"));
|
|
21
|
+
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
23
|
|
|
22
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -25,9 +27,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
25
27
|
|
|
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
|
-
var YEAR_ROW_NUM = 4;
|
|
29
|
-
var YEAR_COL_NUM = 3;
|
|
30
|
-
|
|
31
30
|
var YearPanelBody = function YearPanelBody(props) {
|
|
32
31
|
var _props$viewDate = props.viewDate,
|
|
33
32
|
viewDate = _props$viewDate === void 0 ? (0, _moment["default"])() : _props$viewDate,
|
|
@@ -37,62 +36,34 @@ var YearPanelBody = function YearPanelBody(props) {
|
|
|
37
36
|
|
|
38
37
|
var _useContext = (0, _react.useContext)(_context["default"]),
|
|
39
38
|
format = _useContext.format,
|
|
40
|
-
|
|
39
|
+
max = _useContext.max,
|
|
40
|
+
min = _useContext.min,
|
|
41
41
|
settingType = _useContext.settingType;
|
|
42
42
|
|
|
43
|
+
var maxYear = (0, _moment["default"])(max).year();
|
|
44
|
+
var minYear = (0, _moment["default"])(min).year();
|
|
45
|
+
var rowsData = (0, _useRowsData["default"])(startYear);
|
|
43
46
|
var date = (0, _utils.getPickerDateBySettingType)({
|
|
44
47
|
format: format,
|
|
45
48
|
settingType: settingType,
|
|
46
|
-
values:
|
|
49
|
+
values: [viewDate]
|
|
47
50
|
});
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
var _loop = function _loop(col) {
|
|
51
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
52
|
+
className: (0, _classnames["default"])(_utils.PickerBodyClass)
|
|
53
|
+
}, rowsData.map(function (row) {
|
|
54
|
+
return row.map(function (year) {
|
|
53
55
|
var _classNames;
|
|
54
56
|
|
|
55
|
-
|
|
56
|
-
cols.push( /*#__PURE__*/_react["default"].createElement("td", {
|
|
57
|
+
return /*#__PURE__*/_react["default"].createElement("button", {
|
|
57
58
|
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)),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerCellClass, "__inner")),
|
|
61
|
-
title: year,
|
|
59
|
+
disabled: year < minYear || year > maxYear,
|
|
60
|
+
key: year,
|
|
62
61
|
onClick: function onClick() {
|
|
63
|
-
|
|
64
|
-
onSelect((0, _moment["default"])(viewDate).year(year), 'year');
|
|
65
|
-
}
|
|
62
|
+
return onSelect === null || onSelect === void 0 ? void 0 : onSelect((0, _moment["default"])(viewDate).year(year), 'year');
|
|
66
63
|
}
|
|
67
|
-
}, year)
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
for (var col = 0; col < YEAR_COL_NUM; col += 1) {
|
|
71
|
-
_loop(col);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return cols;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
var getRows = function getRows() {
|
|
78
|
-
var baseYear = startYear - (YEAR_COL_NUM * YEAR_ROW_NUM - _utils.YEAR_DECADE_COUNT) / 2;
|
|
79
|
-
var rows = [];
|
|
80
|
-
|
|
81
|
-
for (var row = 0; row < YEAR_ROW_NUM; row += 1) {
|
|
82
|
-
rows.push( /*#__PURE__*/_react["default"].createElement("tr", {
|
|
83
|
-
key: row
|
|
84
|
-
}, getCells(baseYear)));
|
|
85
|
-
baseYear += YEAR_COL_NUM;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return rows;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
92
|
-
className: (0, _classnames["default"])(_utils.PickerBodyClass)
|
|
93
|
-
}, /*#__PURE__*/_react["default"].createElement("table", {
|
|
94
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerClass, "-content"))
|
|
95
|
-
}, /*#__PURE__*/_react["default"].createElement("tbody", null, getRows())));
|
|
64
|
+
}, year);
|
|
65
|
+
});
|
|
66
|
+
}));
|
|
96
67
|
};
|
|
97
68
|
|
|
98
69
|
var _default = YearPanelBody;
|
|
@@ -1,28 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports["default"] = void 0;
|
|
7
9
|
|
|
8
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
11
|
|
|
10
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
13
|
|
|
14
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
15
|
+
|
|
16
|
+
var _context = _interopRequireDefault(require("../../../context"));
|
|
17
|
+
|
|
12
18
|
var _utils = require("../../../utils");
|
|
13
19
|
|
|
14
20
|
var _panelHead = _interopRequireDefault(require("../panel-head"));
|
|
15
21
|
|
|
16
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
23
|
|
|
18
|
-
function
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
28
|
+
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
29
|
|
|
20
30
|
var YearPanelHead = function YearPanelHead(props) {
|
|
21
31
|
var onPrevDecadeYear = props.onPrevDecadeYear,
|
|
22
32
|
onNextDecadeYear = props.onNextDecadeYear,
|
|
23
33
|
startYear = props.startYear,
|
|
24
34
|
endYear = props.endYear;
|
|
35
|
+
|
|
36
|
+
var _useContext = (0, _react.useContext)(_context["default"]),
|
|
37
|
+
max = _useContext.max,
|
|
38
|
+
min = _useContext.min;
|
|
39
|
+
|
|
40
|
+
var maxYear = (0, _moment["default"])(max).year();
|
|
41
|
+
var minYear = (0, _moment["default"])(min).year();
|
|
25
42
|
return /*#__PURE__*/_react["default"].createElement(_panelHead["default"], _extends({}, props, {
|
|
43
|
+
prevBtnDisabled: startYear <= minYear,
|
|
44
|
+
nextBtnDisabled: endYear >= maxYear,
|
|
26
45
|
onPrev: onPrevDecadeYear,
|
|
27
46
|
onNext: onNextDecadeYear
|
|
28
47
|
}), /*#__PURE__*/_react["default"].createElement("button", {
|
|
@@ -9,21 +9,32 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _moment = _interopRequireDefault(require("moment"));
|
|
11
11
|
|
|
12
|
+
var _utils = require("./utils");
|
|
13
|
+
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
15
|
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19
|
+
|
|
20
|
+
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; }
|
|
21
|
+
|
|
22
|
+
var DefaultContextData = {
|
|
23
|
+
format: _utils.PickerFormat,
|
|
24
|
+
max: _utils.PickerMaxDate,
|
|
25
|
+
min: _utils.PickerMinDate,
|
|
26
|
+
multiple: false,
|
|
16
27
|
picker: 'date',
|
|
17
|
-
settingType: 'startDate'
|
|
28
|
+
settingType: 'startDate'
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var PickerContext = /*#__PURE__*/_react["default"].createContext(_objectSpread(_objectSpread({}, DefaultContextData), {}, {
|
|
18
32
|
value: [(0, _moment["default"])()]
|
|
19
|
-
});
|
|
33
|
+
}));
|
|
20
34
|
|
|
21
|
-
var RangePickerContext = /*#__PURE__*/_react["default"].createContext({
|
|
22
|
-
format: 'YYYY/MM/DD',
|
|
23
|
-
picker: 'date',
|
|
24
|
-
settingType: 'startDate',
|
|
35
|
+
var RangePickerContext = /*#__PURE__*/_react["default"].createContext(_objectSpread(_objectSpread({}, DefaultContextData), {}, {
|
|
25
36
|
values: [(0, _moment["default"])(), (0, _moment["default"])()]
|
|
26
|
-
});
|
|
37
|
+
}));
|
|
27
38
|
|
|
28
39
|
exports.RangePickerContext = RangePickerContext;
|
|
29
40
|
var _default = PickerContext;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.tita-ui__picker {
|
|
2
2
|
width: 276px;
|
|
3
|
-
max-height:
|
|
3
|
+
max-height: 292px;
|
|
4
4
|
padding: 15px 18px 16px;
|
|
5
5
|
border-radius: 16px;
|
|
6
6
|
box-shadow: 0px 8px 24px 0px rgba(127, 145, 180, 0.16);
|
|
@@ -33,10 +33,14 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.tita-ui__picker-cell--selected .tita-ui__picker-cell__inner {
|
|
36
|
-
background-color: #
|
|
36
|
+
background-color: #5c8eff;
|
|
37
37
|
color: #ffffff;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
.tita-ui__picker-cell--selected.tita-ui__picker-cell--in-view .tita-ui__picker-cell__inner {
|
|
41
|
+
background-color: #2879ff;
|
|
42
|
+
}
|
|
43
|
+
|
|
40
44
|
.tita-ui__picker-cell--selected:hover .tita-ui__picker-cell__inner {
|
|
41
45
|
background-color: #5c8eff;
|
|
42
46
|
color: #ffffff;
|
|
@@ -106,11 +110,17 @@
|
|
|
106
110
|
z-index: 1;
|
|
107
111
|
}
|
|
108
112
|
|
|
113
|
+
.tita-ui__picker-head__operation {
|
|
114
|
+
display: grid;
|
|
115
|
+
grid-template: auto/repeat(3, auto);
|
|
116
|
+
gap: 8px;
|
|
117
|
+
}
|
|
118
|
+
|
|
109
119
|
.tita-ui__picker-head__view {
|
|
110
120
|
flex: 1;
|
|
111
121
|
}
|
|
112
122
|
|
|
113
|
-
.tita-ui__picker-head-btn__prev, .tita-ui__picker-head-btn__next, .tita-ui__picker-head-btn__year, .tita-ui__picker-head-btn__month {
|
|
123
|
+
.tita-ui__picker-head-btn__prev, .tita-ui__picker-head-btn__next, .tita-ui__picker-head-btn__year, .tita-ui__picker-head-btn__month, .tita-ui__picker-head-btn__today {
|
|
114
124
|
min-width: 24px;
|
|
115
125
|
height: 24px;
|
|
116
126
|
border-radius: 8px;
|
|
@@ -121,7 +131,7 @@
|
|
|
121
131
|
display: inline-block;
|
|
122
132
|
}
|
|
123
133
|
|
|
124
|
-
.tita-ui__picker-head-btn__prev:hover, .tita-ui__picker-head-btn__next:hover, .tita-ui__picker-head-btn__year:hover, .tita-ui__picker-head-btn__month:hover {
|
|
134
|
+
.tita-ui__picker-head-btn__prev:hover, .tita-ui__picker-head-btn__next:hover, .tita-ui__picker-head-btn__year:hover, .tita-ui__picker-head-btn__month:hover, .tita-ui__picker-head-btn__today:hover {
|
|
125
135
|
background-color: #f0f4fa;
|
|
126
136
|
color: #2879ff;
|
|
127
137
|
}
|
|
@@ -130,6 +140,17 @@
|
|
|
130
140
|
padding: 0;
|
|
131
141
|
font-size: 12px;
|
|
132
142
|
line-height: 18px;
|
|
143
|
+
color: #3f4755;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.tita-ui__picker-head-btn__prev:disabled, .tita-ui__picker-head-btn__next:disabled {
|
|
147
|
+
color: #6f7886;
|
|
148
|
+
cursor: not-allowed;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.tita-ui__picker-head-btn__prev:disabled:hover, .tita-ui__picker-head-btn__next:disabled:hover {
|
|
152
|
+
background-color: transparent;
|
|
153
|
+
color: #6f7886;
|
|
133
154
|
}
|
|
134
155
|
|
|
135
156
|
.tita-ui__picker-head-btn__year, .tita-ui__picker-head-btn__month {
|
|
@@ -139,6 +160,11 @@
|
|
|
139
160
|
line-height: 22px;
|
|
140
161
|
}
|
|
141
162
|
|
|
163
|
+
.tita-ui__picker-head-btn__today {
|
|
164
|
+
font-size: 12px;
|
|
165
|
+
color: #3f4755;
|
|
166
|
+
}
|
|
167
|
+
|
|
142
168
|
.tita-ui__picker-head-btn--readonly {
|
|
143
169
|
cursor: text;
|
|
144
170
|
}
|
|
@@ -9,8 +9,6 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
13
|
-
|
|
14
12
|
var _datePanel = _interopRequireDefault(require("./components/panels/date-panel"));
|
|
15
13
|
|
|
16
14
|
var _monthPanel = _interopRequireDefault(require("./components/panels/month-panel"));
|
|
@@ -44,16 +42,15 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
44
42
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
43
|
|
|
46
44
|
var PickerPanels = function PickerPanels(props) {
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
onChange = props.onChange,
|
|
50
|
-
onClose = props.onClose,
|
|
51
|
-
settingType = props.settingType,
|
|
52
|
-
_props$value = props.value,
|
|
53
|
-
value = _props$value === void 0 ? [(0, _moment["default"])()] : _props$value;
|
|
45
|
+
var onChange = props.onChange,
|
|
46
|
+
onClose = props.onClose;
|
|
54
47
|
|
|
55
48
|
var _useContext = (0, _react.useContext)(_context["default"]),
|
|
56
|
-
format = _useContext.format
|
|
49
|
+
format = _useContext.format,
|
|
50
|
+
_useContext$picker = _useContext.picker,
|
|
51
|
+
picker = _useContext$picker === void 0 ? 'date' : _useContext$picker,
|
|
52
|
+
settingType = _useContext.settingType,
|
|
53
|
+
value = _useContext.value;
|
|
57
54
|
|
|
58
55
|
var _useState = (0, _react.useState)(picker),
|
|
59
56
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -77,6 +74,7 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
77
74
|
};
|
|
78
75
|
|
|
79
76
|
var onPanelChange = function onPanelChange(viewDate, type) {
|
|
77
|
+
onViewDateChange(viewDate);
|
|
80
78
|
setPickerMode(function () {
|
|
81
79
|
return type;
|
|
82
80
|
});
|
|
@@ -89,17 +87,12 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
89
87
|
};
|
|
90
88
|
|
|
91
89
|
var onDateSelect = function onDateSelect(date) {
|
|
92
|
-
|
|
93
|
-
onChange([date]);
|
|
94
|
-
}
|
|
95
|
-
|
|
90
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([date]);
|
|
96
91
|
onCloseHandler();
|
|
97
92
|
};
|
|
98
93
|
|
|
99
94
|
var onMonthSelect = function onMonthSelect(date) {
|
|
100
|
-
|
|
101
|
-
return [date];
|
|
102
|
-
});
|
|
95
|
+
onViewDateChange(date);
|
|
103
96
|
|
|
104
97
|
if (picker !== 'month' && picker !== 'week') {
|
|
105
98
|
onPanelChange(date, 'date');
|
|
@@ -113,9 +106,7 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
113
106
|
};
|
|
114
107
|
|
|
115
108
|
var onYearSelect = function onYearSelect(date) {
|
|
116
|
-
|
|
117
|
-
return [date];
|
|
118
|
-
});
|
|
109
|
+
onViewDateChange(date);
|
|
119
110
|
|
|
120
111
|
if (picker !== 'year') {
|
|
121
112
|
onPanelChange(date, 'month');
|
|
@@ -172,7 +163,6 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
172
163
|
panel = /*#__PURE__*/_react["default"].createElement(_datePanel["default"], {
|
|
173
164
|
viewDate: date,
|
|
174
165
|
onSelect: onSelectChange,
|
|
175
|
-
onViewDateChange: onViewDateChange,
|
|
176
166
|
onPanelChange: onPanelChange
|
|
177
167
|
});
|
|
178
168
|
break;
|
|
@@ -209,8 +199,10 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
209
199
|
}
|
|
210
200
|
|
|
211
201
|
return panel;
|
|
212
|
-
}, [pickerMode,
|
|
202
|
+
}, [pickerMode, selectWeekDate, viewDate]);
|
|
213
203
|
(0, _react.useEffect)(function () {
|
|
204
|
+
setViewDate(value);
|
|
205
|
+
|
|
214
206
|
if (typeof value[0] === 'string') {
|
|
215
207
|
setSelectWeekDate(value);
|
|
216
208
|
}
|
|
@@ -220,9 +212,5 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
220
212
|
}, renderPanels());
|
|
221
213
|
};
|
|
222
214
|
|
|
223
|
-
PickerPanels.defaultProps = {
|
|
224
|
-
picker: 'date',
|
|
225
|
-
value: [(0, _moment["default"])()]
|
|
226
|
-
};
|
|
227
215
|
var _default = PickerPanels;
|
|
228
216
|
exports["default"] = _default;
|
|
@@ -25,7 +25,7 @@ var _utils = require("./utils");
|
|
|
25
25
|
|
|
26
26
|
require("./index.css");
|
|
27
27
|
|
|
28
|
-
var _excluded = ["children", "direction", "displayMode", "format", "picker", "popupPlacement", "settingType", "value", "visible", "onChange", "onPopupVisibleChange"];
|
|
28
|
+
var _excluded = ["children", "direction", "displayMode", "format", "max", "min", "multiple", "picker", "popupPlacement", "settingType", "value", "visible", "onChange", "onPopupVisibleChange"];
|
|
29
29
|
|
|
30
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
31
|
|
|
@@ -33,7 +33,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
33
33
|
|
|
34
34
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
35
|
|
|
36
|
-
function _extends() { _extends = Object.assign
|
|
36
|
+
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); }
|
|
37
37
|
|
|
38
38
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
39
39
|
|
|
@@ -53,14 +53,28 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
53
53
|
|
|
54
54
|
var Picker = function Picker(props) {
|
|
55
55
|
var children = props.children,
|
|
56
|
-
direction = props.direction,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
_props$direction = props.direction,
|
|
57
|
+
direction = _props$direction === void 0 ? 'ltr' : _props$direction,
|
|
58
|
+
_props$displayMode = props.displayMode,
|
|
59
|
+
displayMode = _props$displayMode === void 0 ? 'layer' : _props$displayMode,
|
|
60
|
+
_props$format = props.format,
|
|
61
|
+
format = _props$format === void 0 ? _utils.PickerFormat : _props$format,
|
|
62
|
+
_props$max = props.max,
|
|
63
|
+
max = _props$max === void 0 ? _utils.PickerMaxDate : _props$max,
|
|
64
|
+
_props$min = props.min,
|
|
65
|
+
min = _props$min === void 0 ? _utils.PickerMinDate : _props$min,
|
|
66
|
+
_props$multiple = props.multiple,
|
|
67
|
+
multiple = _props$multiple === void 0 ? false : _props$multiple,
|
|
68
|
+
_props$picker = props.picker,
|
|
69
|
+
picker = _props$picker === void 0 ? 'date' : _props$picker,
|
|
70
|
+
_props$popupPlacement = props.popupPlacement,
|
|
71
|
+
popupPlacement = _props$popupPlacement === void 0 ? 'bottomLeft' : _props$popupPlacement,
|
|
72
|
+
_props$settingType = props.settingType,
|
|
73
|
+
settingType = _props$settingType === void 0 ? 'startDate' : _props$settingType,
|
|
74
|
+
_props$value = props.value,
|
|
75
|
+
value = _props$value === void 0 ? [(0, _moment["default"])()] : _props$value,
|
|
76
|
+
_props$visible = props.visible,
|
|
77
|
+
visible = _props$visible === void 0 ? false : _props$visible,
|
|
64
78
|
onChange = props.onChange,
|
|
65
79
|
onPopupVisibleChange = props.onPopupVisibleChange,
|
|
66
80
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
@@ -98,33 +112,34 @@ var Picker = function Picker(props) {
|
|
|
98
112
|
}
|
|
99
113
|
};
|
|
100
114
|
|
|
101
|
-
var
|
|
115
|
+
var onPopupVisibleChangeHandler = function onPopupVisibleChangeHandler(visible) {
|
|
102
116
|
setPopupVisible(visible);
|
|
103
117
|
onPopupVisibleChange === null || onPopupVisibleChange === void 0 ? void 0 : onPopupVisibleChange(visible);
|
|
104
118
|
};
|
|
105
119
|
|
|
106
120
|
var popContent = (0, _react.useMemo)(function () {
|
|
107
121
|
return /*#__PURE__*/_react["default"].createElement(_pickerPanels["default"], _extends({
|
|
108
|
-
value: value,
|
|
109
|
-
picker: picker,
|
|
110
122
|
onChange: onChangeHandler,
|
|
111
|
-
onClose: onCloseHandler
|
|
112
|
-
settingType: settingType
|
|
123
|
+
onClose: onCloseHandler
|
|
113
124
|
}, restProps));
|
|
114
|
-
}, [
|
|
125
|
+
}, [value]);
|
|
115
126
|
return /*#__PURE__*/_react["default"].createElement(_context["default"].Provider, {
|
|
116
127
|
value: {
|
|
117
128
|
picker: picker,
|
|
118
129
|
format: format,
|
|
130
|
+
max: max,
|
|
131
|
+
min: min,
|
|
132
|
+
multiple: multiple,
|
|
119
133
|
settingType: settingType,
|
|
120
134
|
value: value
|
|
121
135
|
}
|
|
122
136
|
}, displayMode === 'layer' && /*#__PURE__*/_react["default"].createElement(_popup["default"], _extends({
|
|
137
|
+
destroyPopupOnHide: true,
|
|
123
138
|
extraClass: (0, _classnames["default"])(_utils.PickerDropdownClass),
|
|
124
139
|
popup: popContent,
|
|
125
140
|
popupVisible: popupVisible,
|
|
126
141
|
popupPlacement: getPopupPlacement(),
|
|
127
|
-
onPopupVisibleChange:
|
|
142
|
+
onPopupVisibleChange: onPopupVisibleChangeHandler
|
|
128
143
|
}, restProps), /*#__PURE__*/_react["default"].createElement(_pickerTrigger["default"], _extends({
|
|
129
144
|
focused: popupVisible,
|
|
130
145
|
viewDate: (0, _moment["default"])(value[0]),
|
|
@@ -134,17 +149,5 @@ var Picker = function Picker(props) {
|
|
|
134
149
|
}, restProps), children)), displayMode === 'tiled' && popContent);
|
|
135
150
|
};
|
|
136
151
|
|
|
137
|
-
Picker.defaultProps = {
|
|
138
|
-
children: null,
|
|
139
|
-
value: [(0, _moment["default"])()],
|
|
140
|
-
picker: 'date',
|
|
141
|
-
format: 'YYYY/MM/DD',
|
|
142
|
-
popupStyle: {},
|
|
143
|
-
popupPlacement: 'bottomLeft',
|
|
144
|
-
direction: 'ltr',
|
|
145
|
-
displayMode: 'layer',
|
|
146
|
-
settingType: 'startDate',
|
|
147
|
-
visible: false
|
|
148
|
-
};
|
|
149
152
|
var _default = Picker;
|
|
150
153
|
exports["default"] = _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
var _button = _interopRequireDefault(require("../../../../button"));
|
|
13
|
+
|
|
14
|
+
var _getLocale = require("../../../../../utils/getLocale");
|
|
15
|
+
|
|
16
|
+
var _utils = require("../../../utils");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
var Operations = function Operations(props) {
|
|
21
|
+
var disabled = props.disabled,
|
|
22
|
+
onCancel = props.onCancel,
|
|
23
|
+
onClear = props.onClear,
|
|
24
|
+
onOk = props.onOk;
|
|
25
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
26
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerRangesClass, "__operations"))
|
|
27
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
28
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerRangesClass, "__operations-left"))
|
|
29
|
+
}, /*#__PURE__*/_react["default"].createElement(_button["default"].Text, {
|
|
30
|
+
onClick: onClear,
|
|
31
|
+
text: (0, _getLocale.getLocale)('Mod_Empty')
|
|
32
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
33
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerRangesClass, "__operations-right"))
|
|
34
|
+
}, /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
35
|
+
onClick: onCancel,
|
|
36
|
+
size: "small"
|
|
37
|
+
}, (0, _getLocale.getLocale)('Mod_Cancel')), /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
38
|
+
disable: disabled,
|
|
39
|
+
onClick: onOk,
|
|
40
|
+
size: "small",
|
|
41
|
+
type: "primary"
|
|
42
|
+
}, (0, _getLocale.getLocale)('Mod_Determiness'))));
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
var _default = Operations;
|
|
46
|
+
exports["default"] = _default;
|
|
@@ -15,10 +15,6 @@
|
|
|
15
15
|
border-color: #2879ff;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.tita-ui__picker-ranges-trigger--focused .tita-ui__picker-ranges-trigger__operation .tu-icon-caret-down::before {
|
|
19
|
-
transform: scale(0.5) rotate(-180deg);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
18
|
.tita-ui__picker-ranges-trigger__input {
|
|
23
19
|
font-size: 14px;
|
|
24
20
|
line-height: 22px;
|
|
@@ -79,7 +75,7 @@
|
|
|
79
75
|
|
|
80
76
|
.tita-ui__picker-ranges-trigger__operation .tu-icon-caret-down::before {
|
|
81
77
|
transform: scale(0.5);
|
|
82
|
-
transition: all 0.
|
|
78
|
+
transition: all 0.5s cubic-bezier(0.32, 0.28, 0.58, 1.12);
|
|
83
79
|
display: inline-block;
|
|
84
80
|
}
|
|
85
81
|
|
|
@@ -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 _getLocale = require("../../../../../utils/getLocale");
|
|
15
17
|
|
|
16
18
|
var _context = require("../../../context");
|
|
@@ -19,8 +21,6 @@ var _utils = require("../../../utils");
|
|
|
19
21
|
|
|
20
22
|
require("./index.css");
|
|
21
23
|
|
|
22
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
23
|
-
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
25
|
|
|
26
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -34,24 +34,27 @@ var RangePickerTrigger = function RangePickerTrigger(props) {
|
|
|
34
34
|
|
|
35
35
|
var children = props.children,
|
|
36
36
|
focused = props.focused,
|
|
37
|
-
viewDate = props.viewDate,
|
|
38
37
|
_props$triggerClassNa = props.triggerClassName,
|
|
39
38
|
triggerClassName = _props$triggerClassNa === void 0 ? '' : _props$triggerClassNa,
|
|
40
39
|
disabled = props.disabled,
|
|
41
40
|
allowClear = props.allowClear,
|
|
42
41
|
placeholder = props.placeholder,
|
|
43
|
-
|
|
42
|
+
onClick = props.onClick;
|
|
44
43
|
|
|
45
44
|
var _useContext = (0, _react.useContext)(_context.RangePickerContext),
|
|
46
45
|
picker = _useContext.picker,
|
|
47
46
|
format = _useContext.format,
|
|
48
47
|
values = _useContext.values;
|
|
49
48
|
|
|
49
|
+
var onChildrenClick = function onChildrenClick() {
|
|
50
|
+
return !disabled && (onClick === null || onClick === void 0 ? void 0 : onClick());
|
|
51
|
+
};
|
|
52
|
+
|
|
50
53
|
var currFormat = format;
|
|
51
54
|
|
|
52
55
|
switch (picker) {
|
|
53
56
|
case 'date':
|
|
54
|
-
currFormat =
|
|
57
|
+
currFormat = _utils.PickerFormat;
|
|
55
58
|
break;
|
|
56
59
|
|
|
57
60
|
case 'month':
|
|
@@ -75,14 +78,10 @@ var RangePickerTrigger = function RangePickerTrigger(props) {
|
|
|
75
78
|
/*#__PURE__*/
|
|
76
79
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
77
80
|
_react["default"].createElement(_react["default"].Fragment, null, children ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
78
|
-
onClick:
|
|
79
|
-
return !disabled && _onClick();
|
|
80
|
-
}
|
|
81
|
+
onClick: onChildrenClick
|
|
81
82
|
}, children) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
82
83
|
className: (0, _classnames["default"])(_utils.PickerRangeTriggerClass, (_classNames = {}, _defineProperty(_classNames, "".concat(_utils.PickerRangeTriggerClass, "--disabled"), disabled), _defineProperty(_classNames, "".concat(_utils.PickerRangeTriggerClass, "--focused"), focused), _classNames), triggerClassName),
|
|
83
|
-
onClick:
|
|
84
|
-
return !disabled && _onClick();
|
|
85
|
-
}
|
|
84
|
+
onClick: onChildrenClick
|
|
86
85
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
87
86
|
className: (0, _classnames["default"])("".concat(_utils.PickerRangeTriggerClass, "__input"), _defineProperty({}, "".concat(_utils.PickerRangeTriggerClass, "__input--placeholder"), !viewDateEnable && placeholder))
|
|
88
87
|
}, startDate && /*#__PURE__*/_react["default"].createElement("p", {
|
|
@@ -34,20 +34,14 @@ var RangeSelectInput = function RangeSelectInput(props, ref) {
|
|
|
34
34
|
var onClearHandler = function onClearHandler(e) {
|
|
35
35
|
e.stopPropagation();
|
|
36
36
|
e.nativeEvent.stopImmediatePropagation();
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
onFocus();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (onClear) {
|
|
43
|
-
onClear();
|
|
44
|
-
}
|
|
37
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus();
|
|
38
|
+
onClear === null || onClear === void 0 ? void 0 : onClear();
|
|
45
39
|
};
|
|
46
40
|
|
|
47
41
|
var focus = function focus() {
|
|
48
42
|
timerRef.current = setTimeout(function () {
|
|
49
|
-
clearTimeout(timerRef.current);
|
|
50
43
|
inputRef.current.focus();
|
|
44
|
+
clearTimeout(timerRef.current);
|
|
51
45
|
}, 0);
|
|
52
46
|
};
|
|
53
47
|
|