@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
|
@@ -22,22 +22,65 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
22
22
|
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; }
|
|
23
23
|
|
|
24
24
|
var Shortcuts = function Shortcuts(props) {
|
|
25
|
-
var
|
|
25
|
+
var onChange = props.onChange;
|
|
26
26
|
|
|
27
27
|
var _useContext = (0, _react.useContext)(_context.RangePickerContext),
|
|
28
28
|
picker = _useContext.picker;
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var shortcutsData = (0, _react.useMemo)(function () {
|
|
31
|
+
return picker === 'week' ? (0, _utils.RangeWeekPickerShortcutsKeysMapping)() : (0, _utils.RangePickerShortcutsKeysMapping)();
|
|
32
|
+
}, []);
|
|
33
|
+
|
|
34
|
+
var onItemClick = function onItemClick(shortCuts) {
|
|
35
|
+
var date;
|
|
36
|
+
|
|
37
|
+
switch (shortCuts.key) {
|
|
38
|
+
case _utils.SHORTCUTS.CURRENT_YEAR:
|
|
39
|
+
date = (0, _utils.getCurrentValues)('year');
|
|
40
|
+
break;
|
|
41
|
+
|
|
42
|
+
case _utils.SHORTCUTS.CURRENT_MONTH:
|
|
43
|
+
date = (0, _utils.getCurrentValues)('month');
|
|
44
|
+
break;
|
|
45
|
+
|
|
46
|
+
case _utils.SHORTCUTS.CURRENT_WEEKDAY:
|
|
47
|
+
date = (0, _utils.getCurrentWeekDay)();
|
|
48
|
+
break;
|
|
49
|
+
|
|
50
|
+
case _utils.SHORTCUTS.CURRENT_WEEK:
|
|
51
|
+
date = (0, _utils.getCurrentValues)('week');
|
|
52
|
+
break;
|
|
53
|
+
|
|
54
|
+
case _utils.SHORTCUTS.PREVIOUS_WEEK:
|
|
55
|
+
date = (0, _utils.getPreviousValues)('week');
|
|
56
|
+
break;
|
|
57
|
+
|
|
58
|
+
case _utils.SHORTCUTS.NEXT_WEEK:
|
|
59
|
+
date = (0, _utils.getNextValues)('week');
|
|
60
|
+
break;
|
|
61
|
+
|
|
62
|
+
case _utils.SHORTCUTS.TODAY:
|
|
63
|
+
date = (0, _utils.getCurrentValues)('date');
|
|
64
|
+
break;
|
|
65
|
+
|
|
66
|
+
default:
|
|
67
|
+
date = ['', ''];
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
onChange(date);
|
|
72
|
+
};
|
|
73
|
+
|
|
31
74
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
32
75
|
className: (0, _classnames["default"])("".concat(_utils.PickerRangesClass, "__shortcuts"))
|
|
33
|
-
},
|
|
76
|
+
}, shortcutsData.map(function (item) {
|
|
34
77
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
35
78
|
className: (0, _classnames["default"])("".concat(_utils.PickerRangesClass, "__shortcuts-item")),
|
|
36
|
-
key:
|
|
79
|
+
key: item.key,
|
|
37
80
|
onClick: function onClick() {
|
|
38
|
-
return
|
|
81
|
+
return onItemClick(item);
|
|
39
82
|
}
|
|
40
|
-
},
|
|
83
|
+
}, item.title);
|
|
41
84
|
}));
|
|
42
85
|
};
|
|
43
86
|
|
|
@@ -71,6 +71,9 @@
|
|
|
71
71
|
.tita-ui__picker-ranges__shortcuts {
|
|
72
72
|
flex: 1;
|
|
73
73
|
padding: 15px 9px 15px 12px;
|
|
74
|
+
display: grid;
|
|
75
|
+
grid-template: repeat(8, 28px)/100%;
|
|
76
|
+
gap: 4px;
|
|
74
77
|
position: relative;
|
|
75
78
|
}
|
|
76
79
|
|
|
@@ -102,7 +105,7 @@
|
|
|
102
105
|
color: #2879ff;
|
|
103
106
|
}
|
|
104
107
|
|
|
105
|
-
.tita-ui__picker-
|
|
108
|
+
.tita-ui__picker-ranges__operations {
|
|
106
109
|
height: 27px;
|
|
107
110
|
padding: 12px 16px;
|
|
108
111
|
border-top: 1px solid #e9ecf0;
|
|
@@ -111,44 +114,44 @@
|
|
|
111
114
|
justify-content: space-between;
|
|
112
115
|
}
|
|
113
116
|
|
|
114
|
-
.tita-ui__picker-
|
|
117
|
+
.tita-ui__picker-ranges__operations-left, .tita-ui__picker-ranges__operations-right {
|
|
115
118
|
flex: 1;
|
|
116
119
|
display: flex;
|
|
117
120
|
align-items: center;
|
|
118
121
|
}
|
|
119
122
|
|
|
120
|
-
.tita-ui__picker-
|
|
123
|
+
.tita-ui__picker-ranges__operations-right {
|
|
121
124
|
justify-content: flex-end;
|
|
122
125
|
}
|
|
123
126
|
|
|
124
|
-
.tita-ui__picker-
|
|
127
|
+
.tita-ui__picker-ranges__operations-right .tita-button-small {
|
|
125
128
|
margin-left: 10px;
|
|
126
129
|
}
|
|
127
130
|
|
|
128
|
-
.tita-ui__picker-
|
|
129
|
-
.tita-ui__picker-
|
|
131
|
+
.tita-ui__picker-ranges__operations .tita-button-default,
|
|
132
|
+
.tita-ui__picker-ranges__operations .tita-button-primary {
|
|
130
133
|
font-size: 13px;
|
|
131
134
|
border-radius: 14px;
|
|
132
135
|
transition: all 0.3s ease;
|
|
133
136
|
}
|
|
134
137
|
|
|
135
|
-
.tita-ui__picker-
|
|
138
|
+
.tita-ui__picker-ranges__operations .tita-button-default {
|
|
136
139
|
border-color: #dfe3ea;
|
|
137
140
|
color: #6f7886;
|
|
138
141
|
}
|
|
139
142
|
|
|
140
|
-
.tita-ui__picker-
|
|
143
|
+
.tita-ui__picker-ranges__operations .tita-button-default:hover {
|
|
141
144
|
background-color: #ffffff;
|
|
142
145
|
border-color: #2879ff;
|
|
143
146
|
color: #2879ff;
|
|
144
147
|
}
|
|
145
148
|
|
|
146
|
-
.tita-ui__picker-
|
|
149
|
+
.tita-ui__picker-ranges__operations .titaui-text-btn {
|
|
147
150
|
transition: color 0.3s ease;
|
|
148
151
|
color: #2879ff;
|
|
149
152
|
}
|
|
150
153
|
|
|
151
|
-
.tita-ui__picker-
|
|
154
|
+
.tita-ui__picker-ranges__operations .titaui-text-btn:hover {
|
|
152
155
|
color: #5c8eff;
|
|
153
156
|
}
|
|
154
157
|
|
|
@@ -15,17 +15,13 @@ var _moment = _interopRequireDefault(require("moment"));
|
|
|
15
15
|
|
|
16
16
|
var _getLocale = require("../../../utils/getLocale");
|
|
17
17
|
|
|
18
|
-
var _button = _interopRequireDefault(require("../../button"));
|
|
19
|
-
|
|
20
18
|
var _popup = _interopRequireDefault(require("../../popup"));
|
|
21
19
|
|
|
22
20
|
var _context = require("../context");
|
|
23
21
|
|
|
24
22
|
var _utils = require("../utils");
|
|
25
23
|
|
|
26
|
-
require("./
|
|
27
|
-
|
|
28
|
-
var _shortcuts = _interopRequireDefault(require("./components/shortcuts"));
|
|
24
|
+
var _operations = _interopRequireDefault(require("./components/operations"));
|
|
29
25
|
|
|
30
26
|
var _placeholder = _interopRequireDefault(require("./components/placeholder"));
|
|
31
27
|
|
|
@@ -33,6 +29,10 @@ var _picker = _interopRequireDefault(require("../picker"));
|
|
|
33
29
|
|
|
34
30
|
var _pickerTrigger = _interopRequireDefault(require("./components/picker-trigger"));
|
|
35
31
|
|
|
32
|
+
var _shortcuts = _interopRequireDefault(require("./components/shortcuts"));
|
|
33
|
+
|
|
34
|
+
require("./index.css");
|
|
35
|
+
|
|
36
36
|
var _excluded = ["onChange", "format", "values", "picker", "children", "popupPlacement", "direction", "onPopupVisibleChange", "visible", "canEmpty", "className"];
|
|
37
37
|
|
|
38
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -41,7 +41,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
41
41
|
|
|
42
42
|
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; }
|
|
43
43
|
|
|
44
|
-
function _extends() { _extends = Object.assign
|
|
44
|
+
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); }
|
|
45
45
|
|
|
46
46
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
47
47
|
|
|
@@ -61,12 +61,17 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
61
61
|
|
|
62
62
|
var RangePicker = function RangePicker(props) {
|
|
63
63
|
var onChange = props.onChange,
|
|
64
|
-
format = props.format,
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
_props$format = props.format,
|
|
65
|
+
format = _props$format === void 0 ? _utils.PickerFormat : _props$format,
|
|
66
|
+
_props$values = props.values,
|
|
67
|
+
values = _props$values === void 0 ? [] : _props$values,
|
|
68
|
+
_props$picker = props.picker,
|
|
69
|
+
picker = _props$picker === void 0 ? 'date' : _props$picker,
|
|
67
70
|
children = props.children,
|
|
68
|
-
popupPlacement = props.popupPlacement,
|
|
69
|
-
|
|
71
|
+
_props$popupPlacement = props.popupPlacement,
|
|
72
|
+
popupPlacement = _props$popupPlacement === void 0 ? 'bottomLeft' : _props$popupPlacement,
|
|
73
|
+
_props$direction = props.direction,
|
|
74
|
+
direction = _props$direction === void 0 ? 'ltr' : _props$direction,
|
|
70
75
|
onPopupVisibleChange = props.onPopupVisibleChange,
|
|
71
76
|
_props$visible = props.visible,
|
|
72
77
|
visible = _props$visible === void 0 ? false : _props$visible,
|
|
@@ -113,52 +118,28 @@ var RangePicker = function RangePicker(props) {
|
|
|
113
118
|
|
|
114
119
|
var onChangeHandler = function onChangeHandler(date) {
|
|
115
120
|
setViewDate(function (prevDate) {
|
|
116
|
-
|
|
121
|
+
var nextDate = (0, _utils.setPickerDateBySettingType)({
|
|
117
122
|
newDate: date[0],
|
|
118
123
|
settingType: settingTypeRef.current,
|
|
119
124
|
values: prevDate
|
|
120
125
|
});
|
|
121
|
-
|
|
126
|
+
var endDate = nextDate === null || nextDate === void 0 ? void 0 : nextDate[1];
|
|
122
127
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
128
|
+
if ([_utils.RangeSettingTypes.START, _utils.RangeSettingTypes.RESET].includes( // @ts-ignore
|
|
129
|
+
settingTypeRef.current) && !endDate) {
|
|
130
|
+
setSettingType(_utils.RangeSettingTypes.END);
|
|
131
|
+
} else if (settingTypeRef.current === _utils.RangeSettingTypes.END || !!endDate) {
|
|
132
|
+
setSettingType(_utils.RangeSettingTypes.RESET);
|
|
133
|
+
}
|
|
126
134
|
|
|
135
|
+
return nextDate;
|
|
136
|
+
});
|
|
127
137
|
return true;
|
|
128
138
|
};
|
|
129
139
|
|
|
130
|
-
var
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
switch (shortCuts.key) {
|
|
134
|
-
case _utils.SHORTCUTS.CURRENT_YEAR:
|
|
135
|
-
newDate = (0, _utils.getCurrentValues)('year');
|
|
136
|
-
break;
|
|
137
|
-
|
|
138
|
-
case _utils.SHORTCUTS.CURRENT_MONTH:
|
|
139
|
-
newDate = (0, _utils.getCurrentValues)('month');
|
|
140
|
-
break;
|
|
141
|
-
|
|
142
|
-
case _utils.SHORTCUTS.CURRENT_WEEKDAY:
|
|
143
|
-
newDate = (0, _utils.getCurrentWeekDay)();
|
|
144
|
-
break;
|
|
145
|
-
|
|
146
|
-
case _utils.SHORTCUTS.CURRENT_WEEK:
|
|
147
|
-
newDate = (0, _utils.getCurrentValues)('week');
|
|
148
|
-
break;
|
|
149
|
-
|
|
150
|
-
case _utils.SHORTCUTS.PREVIOUS_WEEK:
|
|
151
|
-
newDate = (0, _utils.getPreviousValues)('week');
|
|
152
|
-
break;
|
|
153
|
-
|
|
154
|
-
case _utils.SHORTCUTS.NEXT_WEEK:
|
|
155
|
-
newDate = (0, _utils.getNextValues)('week');
|
|
156
|
-
|
|
157
|
-
default:
|
|
158
|
-
break;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
setViewDate(newDate);
|
|
140
|
+
var onShortcutsDateChange = function onShortcutsDateChange(date) {
|
|
141
|
+
setViewDate(date);
|
|
142
|
+
setSettingType(_utils.RangeSettingTypes.RESET);
|
|
162
143
|
};
|
|
163
144
|
|
|
164
145
|
var onClearHandler = function onClearHandler() {
|
|
@@ -185,24 +166,39 @@ var RangePicker = function RangePicker(props) {
|
|
|
185
166
|
return setPopupVisible(false);
|
|
186
167
|
};
|
|
187
168
|
|
|
188
|
-
var
|
|
169
|
+
var onPopupVisibleChangeHandler = function onPopupVisibleChangeHandler(visible) {
|
|
189
170
|
setPopupVisible(visible);
|
|
190
171
|
onPopupVisibleChange === null || onPopupVisibleChange === void 0 ? void 0 : onPopupVisibleChange(visible);
|
|
191
172
|
};
|
|
192
173
|
|
|
193
|
-
|
|
174
|
+
var getPickerSettingType = function getPickerSettingType() {
|
|
175
|
+
var _settingType = _utils.RangeSettingTypes.START;
|
|
176
|
+
|
|
194
177
|
if (values instanceof Array) {
|
|
195
178
|
var startDate = values[0] || '';
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
179
|
+
var endDate = values[1] || '';
|
|
180
|
+
|
|
181
|
+
if (!startDate) {
|
|
182
|
+
_settingType = _utils.RangeSettingTypes.START;
|
|
183
|
+
} else if (!endDate) {
|
|
184
|
+
_settingType = _utils.RangeSettingTypes.END;
|
|
185
|
+
} else {
|
|
186
|
+
_settingType = _utils.RangeSettingTypes.RESET;
|
|
187
|
+
}
|
|
199
188
|
}
|
|
189
|
+
|
|
190
|
+
setSettingType(_settingType);
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
(0, _react.useEffect)(function () {
|
|
194
|
+
getPickerSettingType();
|
|
195
|
+
setPopupVisible(visible);
|
|
200
196
|
}, [visible]);
|
|
201
197
|
(0, _react.useEffect)(function () {
|
|
202
198
|
settingTypeRef.current = settingType;
|
|
203
199
|
}, [settingType]);
|
|
204
200
|
var popContent = (0, _react.useMemo)(function () {
|
|
205
|
-
var okBtnDisabled = canEmpty ? viewDate.filter(function (v) {
|
|
201
|
+
var okBtnDisabled = canEmpty ? viewDate.length === 1 || viewDate.filter(function (v) {
|
|
206
202
|
return !v;
|
|
207
203
|
}).length === 1 : viewDate.filter(function (v) {
|
|
208
204
|
return !!v;
|
|
@@ -216,34 +212,22 @@ var RangePicker = function RangePicker(props) {
|
|
|
216
212
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
217
213
|
className: (0, _classnames["default"])("".concat(_utils.PickerRangesClass, "__main"))
|
|
218
214
|
}, /*#__PURE__*/_react["default"].createElement(_shortcuts["default"], {
|
|
219
|
-
|
|
215
|
+
onChange: onShortcutsDateChange
|
|
220
216
|
}), /*#__PURE__*/_react["default"].createElement(_picker["default"], _extends({
|
|
221
|
-
|
|
222
|
-
value: viewDate,
|
|
217
|
+
onChange: onChangeHandler,
|
|
223
218
|
picker: picker,
|
|
224
219
|
settingType: settingType,
|
|
225
|
-
|
|
226
|
-
}, restProps
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
onClick: onClose,
|
|
237
|
-
size: "small"
|
|
238
|
-
}, (0, _getLocale.getLocale)('Mod_Cancel')), /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
239
|
-
disable: okBtnDisabled,
|
|
240
|
-
onClick: function onClick() {
|
|
241
|
-
return !okBtnDisabled && onConfirmHandler();
|
|
242
|
-
},
|
|
243
|
-
size: "small",
|
|
244
|
-
type: "primary"
|
|
245
|
-
}, (0, _getLocale.getLocale)('Mod_Determiness')))));
|
|
246
|
-
}, [viewDate, canEmpty]);
|
|
220
|
+
value: viewDate
|
|
221
|
+
}, restProps, {
|
|
222
|
+
displayMode: "tiled",
|
|
223
|
+
multiple: true
|
|
224
|
+
}))), /*#__PURE__*/_react["default"].createElement(_operations["default"], {
|
|
225
|
+
disabled: okBtnDisabled,
|
|
226
|
+
onCancel: onClose,
|
|
227
|
+
onClear: onClearHandler,
|
|
228
|
+
onOk: onConfirmHandler
|
|
229
|
+
}));
|
|
230
|
+
}, [canEmpty, settingType, viewDate]);
|
|
247
231
|
return /*#__PURE__*/_react["default"].createElement(_context.RangePickerContext.Provider, {
|
|
248
232
|
value: {
|
|
249
233
|
values: values,
|
|
@@ -252,30 +236,18 @@ var RangePicker = function RangePicker(props) {
|
|
|
252
236
|
settingType: settingType
|
|
253
237
|
}
|
|
254
238
|
}, /*#__PURE__*/_react["default"].createElement(_popup["default"], _extends({
|
|
239
|
+
destroyPopupOnHide: true,
|
|
255
240
|
extraClass: (0, _classnames["default"])(_utils.PickerDropdownClass),
|
|
256
241
|
popup: popContent,
|
|
257
242
|
popupVisible: popupVisible,
|
|
258
243
|
popupPlacement: getPopupPlacement(),
|
|
259
|
-
onPopupVisibleChange:
|
|
244
|
+
onPopupVisibleChange: onPopupVisibleChangeHandler
|
|
260
245
|
}, restProps), /*#__PURE__*/_react["default"].createElement(_pickerTrigger["default"], _extends({
|
|
261
246
|
focused: popupVisible,
|
|
262
247
|
placeholder: (0, _getLocale.getLocale)('Rep_NewS_All'),
|
|
263
|
-
viewDate: values
|
|
264
|
-
onClick: function onClick() {
|
|
265
|
-
return setPopupVisible(true);
|
|
266
|
-
}
|
|
248
|
+
viewDate: values
|
|
267
249
|
}, restProps), children)));
|
|
268
250
|
};
|
|
269
251
|
|
|
270
|
-
RangePicker.defaultProps = {
|
|
271
|
-
children: null,
|
|
272
|
-
values: [],
|
|
273
|
-
picker: 'date',
|
|
274
|
-
format: 'YYYY/MM/DD',
|
|
275
|
-
popupStyle: {},
|
|
276
|
-
popupPlacement: 'bottomLeft',
|
|
277
|
-
direction: 'ltr',
|
|
278
|
-
visible: false
|
|
279
|
-
};
|
|
280
252
|
var _default = RangePicker;
|
|
281
253
|
exports["default"] = _default;
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.setPickerDateBySettingType = exports.isCurrentDateInRanges = exports.getPreviousValues = exports.getPickerDateBySettingType = exports.getNextValues = exports.getCurrentWeekDay = exports.getCurrentValues = exports.YEAR_DECADE_COUNT = exports.WEEK_DAYS_COUNT = exports.SHORTCUTS = exports.RangeWeekPickerShortcutsKeysMapping = exports.RangeSettingTypes = exports.RangePickerShortcutsKeysMapping = exports.PickerTriggerClass = exports.PickerRangesClass = exports.PickerRangeTriggerClass = exports.PickerPanelClass = exports.PickerHeadClass = exports.PickerDropdownClass = exports.PickerClass = exports.PickerCellClass = exports.PickerBodyClass = exports.MONTHDATAMAPEN = exports.MONTHDATAMAP = void 0;
|
|
6
|
+
exports.setPickerDateBySettingType = exports.isCurrentDateInRanges = exports.getPreviousValues = exports.getPickerDateBySettingType = exports.getNextValues = exports.getDaysOfMonth = exports.getCurrentWeekDay = exports.getCurrentValues = exports.YEAR_DECADE_COUNT = exports.WEEK_DAYS_COUNT = exports.SHORTCUTS = exports.RangeWeekPickerShortcutsKeysMapping = exports.RangeSettingTypes = exports.RangePickerShortcutsKeysMapping = exports.PickerTriggerClass = exports.PickerRangesClass = exports.PickerRangeTriggerClass = exports.PickerPanelClass = exports.PickerMinDate = exports.PickerMaxDate = exports.PickerHeadClass = exports.PickerFormat = exports.PickerDropdownClass = exports.PickerClass = exports.PickerCellClass = exports.PickerBodyClass = exports.MONTHDATAMAPEN = exports.MONTHDATAMAP = void 0;
|
|
7
|
+
|
|
8
|
+
var _cloneDeep = _interopRequireDefault(require("clone-deep"));
|
|
7
9
|
|
|
8
10
|
var _moment = _interopRequireDefault(require("moment"));
|
|
9
11
|
|
|
@@ -37,6 +39,16 @@ var WEEK_DAYS_COUNT = 7;
|
|
|
37
39
|
exports.WEEK_DAYS_COUNT = WEEK_DAYS_COUNT;
|
|
38
40
|
var YEAR_DECADE_COUNT = 10;
|
|
39
41
|
exports.YEAR_DECADE_COUNT = YEAR_DECADE_COUNT;
|
|
42
|
+
var PickerFormat = 'YYYY/MM/DD';
|
|
43
|
+
exports.PickerFormat = PickerFormat;
|
|
44
|
+
var PickerMaxDate = (0, _moment["default"])().set({
|
|
45
|
+
year: (0, _moment["default"])().year() + YEAR_DECADE_COUNT,
|
|
46
|
+
month: 11,
|
|
47
|
+
date: 31
|
|
48
|
+
}).format(PickerFormat);
|
|
49
|
+
exports.PickerMaxDate = PickerMaxDate;
|
|
50
|
+
var PickerMinDate = '2018/01/01';
|
|
51
|
+
exports.PickerMinDate = PickerMinDate;
|
|
40
52
|
var SHORTCUTS;
|
|
41
53
|
exports.SHORTCUTS = SHORTCUTS;
|
|
42
54
|
|
|
@@ -47,6 +59,7 @@ exports.SHORTCUTS = SHORTCUTS;
|
|
|
47
59
|
SHORTCUTS["CURRENT_WEEK"] = "currentWeek";
|
|
48
60
|
SHORTCUTS["PREVIOUS_WEEK"] = "prevWeek";
|
|
49
61
|
SHORTCUTS["NEXT_WEEK"] = "nextWeek";
|
|
62
|
+
SHORTCUTS["TODAY"] = "today";
|
|
50
63
|
})(SHORTCUTS || (exports.SHORTCUTS = SHORTCUTS = {}));
|
|
51
64
|
|
|
52
65
|
var getCurrentValues = function getCurrentValues(symbol) {
|
|
@@ -76,20 +89,24 @@ var RangeSettingTypes;
|
|
|
76
89
|
exports.RangeSettingTypes = RangeSettingTypes;
|
|
77
90
|
|
|
78
91
|
(function (RangeSettingTypes) {
|
|
79
|
-
RangeSettingTypes["START"] = "startDate";
|
|
80
92
|
RangeSettingTypes["END"] = "endDate";
|
|
93
|
+
RangeSettingTypes["RESET"] = "reset";
|
|
94
|
+
RangeSettingTypes["START"] = "startDate";
|
|
81
95
|
})(RangeSettingTypes || (exports.RangeSettingTypes = RangeSettingTypes = {}));
|
|
82
96
|
|
|
83
97
|
var RangePickerShortcutsKeysMapping = function RangePickerShortcutsKeysMapping() {
|
|
84
98
|
return [{
|
|
85
|
-
key: SHORTCUTS.
|
|
86
|
-
title: (0, _getLocale.getLocale)('
|
|
99
|
+
key: SHORTCUTS.TODAY,
|
|
100
|
+
title: (0, _getLocale.getLocale)('Mod_Today')
|
|
101
|
+
}, {
|
|
102
|
+
key: SHORTCUTS.CURRENT_WEEKDAY,
|
|
103
|
+
title: (0, _getLocale.getLocale)('Feed_Tab_Title_Thisweek')
|
|
87
104
|
}, {
|
|
88
105
|
key: SHORTCUTS.CURRENT_MONTH,
|
|
89
106
|
title: (0, _getLocale.getLocale)('Feed_Tab_Title_Thismonth')
|
|
90
107
|
}, {
|
|
91
|
-
key: SHORTCUTS.
|
|
92
|
-
title: (0, _getLocale.getLocale)('
|
|
108
|
+
key: SHORTCUTS.CURRENT_YEAR,
|
|
109
|
+
title: (0, _getLocale.getLocale)('Feed_Tab_Title_Thisyear')
|
|
93
110
|
}];
|
|
94
111
|
};
|
|
95
112
|
|
|
@@ -114,7 +131,7 @@ var getPickerDateBySettingType = function getPickerDateBySettingType(params) {
|
|
|
114
131
|
var _params$defaultValue = params.defaultValue,
|
|
115
132
|
defaultValue = _params$defaultValue === void 0 ? (0, _moment["default"])() : _params$defaultValue,
|
|
116
133
|
_params$format = params.format,
|
|
117
|
-
format = _params$format === void 0 ?
|
|
134
|
+
format = _params$format === void 0 ? PickerFormat : _params$format,
|
|
118
135
|
settingType = params.settingType,
|
|
119
136
|
values = params.values;
|
|
120
137
|
|
|
@@ -136,16 +153,20 @@ var setPickerDateBySettingType = function setPickerDateBySettingType(params) {
|
|
|
136
153
|
values = params.values;
|
|
137
154
|
|
|
138
155
|
if (values instanceof Array && settingType) {
|
|
139
|
-
var valuesClone =
|
|
140
|
-
var
|
|
141
|
-
var
|
|
156
|
+
var valuesClone = (0, _cloneDeep["default"])(values);
|
|
157
|
+
var isSettingStartDate = settingType === RangeSettingTypes.START;
|
|
158
|
+
var isResetRangeDate = settingType === RangeSettingTypes.RESET;
|
|
159
|
+
if (isResetRangeDate) return [(0, _moment["default"])(newDate)];
|
|
160
|
+
var updateIndex = isSettingStartDate ? 0 : 1;
|
|
142
161
|
valuesClone.splice(updateIndex, 1, (0, _moment["default"])(newDate));
|
|
143
162
|
|
|
144
|
-
if (
|
|
163
|
+
if (isSettingStartDate && (0, _moment["default"])(newDate, PickerFormat).isAfter((0, _moment["default"])(valuesClone[1]).format(PickerFormat), 'date')) {
|
|
164
|
+
valuesClone[0] = valuesClone[1];
|
|
145
165
|
valuesClone[1] = (0, _moment["default"])(newDate);
|
|
146
166
|
}
|
|
147
167
|
|
|
148
|
-
if (!
|
|
168
|
+
if (!isSettingStartDate && (0, _moment["default"])(newDate, PickerFormat).isBefore((0, _moment["default"])(valuesClone[0]).format(PickerFormat), 'date')) {
|
|
169
|
+
valuesClone[1] = valuesClone[0];
|
|
149
170
|
valuesClone[0] = (0, _moment["default"])(newDate);
|
|
150
171
|
}
|
|
151
172
|
|
|
@@ -159,7 +180,7 @@ exports.setPickerDateBySettingType = setPickerDateBySettingType;
|
|
|
159
180
|
|
|
160
181
|
var isCurrentDateInRanges = function isCurrentDateInRanges(params) {
|
|
161
182
|
var _params$format2 = params.format,
|
|
162
|
-
format = _params$format2 === void 0 ?
|
|
183
|
+
format = _params$format2 === void 0 ? PickerFormat : _params$format2,
|
|
163
184
|
nowDate = params.nowDate,
|
|
164
185
|
values = params.values;
|
|
165
186
|
var date = typeof nowDate === 'string' ? nowDate : nowDate.format(format);
|
|
@@ -187,6 +208,34 @@ var isCurrentDateInRanges = function isCurrentDateInRanges(params) {
|
|
|
187
208
|
}
|
|
188
209
|
|
|
189
210
|
return data;
|
|
211
|
+
}; //获取某年某月有多少天
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
exports.isCurrentDateInRanges = isCurrentDateInRanges;
|
|
215
|
+
|
|
216
|
+
var getDaysOfMonth = function getDaysOfMonth(year, month) {
|
|
217
|
+
switch (month) {
|
|
218
|
+
case 1:
|
|
219
|
+
case 3:
|
|
220
|
+
case 5:
|
|
221
|
+
case 7:
|
|
222
|
+
case 8:
|
|
223
|
+
case 10:
|
|
224
|
+
case 12:
|
|
225
|
+
return 31;
|
|
226
|
+
|
|
227
|
+
case 4:
|
|
228
|
+
case 6:
|
|
229
|
+
case 9:
|
|
230
|
+
case 11:
|
|
231
|
+
return 30;
|
|
232
|
+
|
|
233
|
+
case 2:
|
|
234
|
+
return year % 4 == 0 && year % 100 != 0 || year % 400 == 0 ? 29 : 28;
|
|
235
|
+
|
|
236
|
+
default:
|
|
237
|
+
return 0;
|
|
238
|
+
}
|
|
190
239
|
};
|
|
191
240
|
|
|
192
|
-
exports.
|
|
241
|
+
exports.getDaysOfMonth = getDaysOfMonth;
|
|
@@ -21,7 +21,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
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; }
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
27
|
|
|
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
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; }
|
|
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
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
21
|
|
|
@@ -25,7 +25,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
25
25
|
|
|
26
26
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
27
27
|
|
|
28
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
28
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
29
|
|
|
30
30
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
31
31
|
|
|
@@ -35,7 +35,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
35
35
|
|
|
36
36
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
37
37
|
|
|
38
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf
|
|
38
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
39
39
|
|
|
40
40
|
var InputForm = /*#__PURE__*/function (_Component) {
|
|
41
41
|
_inherits(InputForm, _Component);
|
|
@@ -25,7 +25,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
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
27
|
|
|
28
|
-
function _extends() { _extends = Object.assign
|
|
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); }
|
|
29
29
|
|
|
30
30
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
31
|
|
|
@@ -25,7 +25,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
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
27
|
|
|
28
|
-
function _extends() { _extends = Object.assign
|
|
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); }
|
|
29
29
|
|
|
30
30
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
31
|
|
|
@@ -23,7 +23,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
29
29
|
|
|
@@ -29,7 +29,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
29
29
|
|
|
30
30
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
31
31
|
|
|
32
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
32
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
33
|
|
|
34
34
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
35
35
|
|
|
@@ -39,7 +39,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
39
39
|
|
|
40
40
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
41
41
|
|
|
42
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf
|
|
42
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
43
43
|
|
|
44
44
|
var PraiseRecordItem = /*#__PURE__*/function (_PureComponent) {
|
|
45
45
|
_inherits(PraiseRecordItem, _PureComponent);
|