@titaui/pc 1.12.15 → 1.12.17-beta.2
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/book-demo-award/components/pc/components/checkbox/index.css +54 -0
- package/lib/components/book-demo-award/components/pc/components/checkbox/index.js +126 -0
- package/lib/components/book-demo-award/components/pc/components/content/index.css +124 -0
- package/lib/components/book-demo-award/components/pc/components/content/index.js +372 -0
- package/lib/components/book-demo-award/components/pc/components/drop-select/index.css +41 -0
- package/lib/components/book-demo-award/components/pc/components/drop-select/index.js +86 -0
- package/lib/components/book-demo-award/components/pc/components/error-info/index.css +6 -0
- package/lib/components/book-demo-award/components/pc/components/error-info/index.js +24 -0
- package/lib/components/book-demo-award/components/pc/components/input/index.css +56 -0
- package/lib/components/book-demo-award/components/pc/components/input/index.js +94 -0
- package/lib/components/book-demo-award/components/pc/components/phone/index.css +68 -0
- package/lib/components/book-demo-award/components/pc/components/phone/index.js +95 -0
- package/lib/components/book-demo-award/components/pc/components/verify-code/index.css +45 -0
- package/lib/components/book-demo-award/components/pc/components/verify-code/index.js +139 -0
- package/lib/components/book-demo-award/components/pc/index.css +22 -0
- package/lib/components/book-demo-award/components/pc/index.js +174 -0
- package/lib/components/book-demo-award/constant.js +812 -0
- package/lib/components/book-demo-award/img/demo-close.svg +16 -0
- package/lib/components/book-demo-award/img/demo-down.svg +7 -0
- package/lib/components/book-demo-award/img/demo-learning.jpg +0 -0
- package/lib/components/book-demo-award/img/demo-okr.jpg +0 -0
- package/lib/components/book-demo-award/img/demo-performance.jpg +0 -0
- package/lib/components/book-demo-award/img/demo-universal.jpg +0 -0
- package/lib/components/book-demo-award/img/order-award.png +0 -0
- package/lib/components/book-demo-award/index.js +22 -0
- package/lib/components/book-demo-award/interface.js +17 -0
- package/lib/components/book-demo-award/request.js +50 -0
- package/lib/components/book-demo-award/utils.js +82 -0
- 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 +6 -4
- package/lib/components/common-share/publishMblog.js +4 -2
- 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 +4 -2
- package/lib/components/create-okr-modal/fields/okr-visibility-detail.js +4 -2
- package/lib/components/create-okr-modal/index.js +4 -2
- package/lib/components/create-okr-modal/objectType.js +2 -2
- package/lib/components/create-okr-modal/request-api.js +16 -12
- package/lib/components/create-okr-modal/utils/helper.js +6 -2
- package/lib/components/date-picker/BodyItem.js +3 -3
- package/lib/components/date-picker/CalendarBody.js +3 -3
- package/lib/components/date-picker/CalendarHeader.js +3 -3
- package/lib/components/date-picker/index.js +2 -2
- package/lib/components/date-range-picker/index.js +2 -2
- package/lib/components/delete-confirm-pop/ConfirmPop.js +2 -2
- package/lib/components/dialog/index.js +1 -1
- package/lib/components/dialog-confirm/index.js +1 -1
- package/lib/components/drawer/headerDrop.js +1 -1
- package/lib/components/drawer/index.js +1 -1
- package/lib/components/drawer-manager/drawerWrapper.js +5 -3
- package/lib/components/drawer-manager/index.js +1 -1
- package/lib/components/drop-selector/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-chart/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-learning/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +1 -1
- package/lib/components/eReport/eReportListEmpty.js +2 -2
- package/lib/components/eReport/eReportLists/reportList.js +2 -2
- package/lib/components/eReport/eReportShare/index.js +2 -2
- package/lib/components/eReport/eReportShare/toast/index.js +2 -2
- package/lib/components/edit-kr-wight/EditKrWightModal.js +2 -2
- package/lib/components/edit-kr-wight/FormItemV2.js +2 -2
- package/lib/components/emotions-selector/selector-content.js +2 -2
- package/lib/components/emotions-selector/selector-pop.js +2 -2
- package/lib/components/ereport-list/index.js +2 -2
- package/lib/components/error-boundary/index.js +2 -2
- package/lib/components/firework/index.js +6 -2
- 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 +4 -2
- package/lib/components/form/form-fields/user/index.js +1 -1
- package/lib/components/grid-layout/util/network.js +10 -6
- package/lib/components/help-card/image/liaojie1.svg +50 -0
- package/lib/components/help-card/index.css +4 -4
- package/lib/components/help-card/index.js +1 -1
- package/lib/components/mblog/components/ConfirmPop.js +2 -2
- package/lib/components/mblog/components/MblogAction.js +2 -2
- package/lib/components/mblog/components/MblogContent.js +2 -2
- package/lib/components/mblog/index.js +2 -2
- package/lib/components/menus/components/menu-tree/index.js +1 -1
- package/lib/components/menus/components/menu-tree/tree-node/index.js +1 -1
- package/lib/components/menus/export-modules/appraisal-menus/menus.js +6 -0
- package/lib/components/nav-top/components/app-center/images/yuyue-award.png +0 -0
- package/lib/components/nav-top/components/app-center/images/yuyue.png +0 -0
- package/lib/components/nav-top/components/app-center/index.css +28 -6
- package/lib/components/nav-top/components/app-center/index.js +59 -5
- package/lib/components/nav-top/components/app-center/interface.js +19 -0
- package/lib/components/nav-top/components/menu/index.js +6 -2
- package/lib/components/nav-top/components/user-message/images/bell-1.svg +13 -0
- package/lib/components/nav-top/components/user-message/index.css +4 -4
- package/lib/components/nav-top/components/user-message/index.js +21 -21
- package/lib/components/nav-top/images/app-center.png +0 -0
- package/lib/components/nav-top/images/app-center.svg +21 -0
- package/lib/components/nav-top/images/home.svg +16 -0
- package/lib/components/nav-top/index.css +22 -6
- package/lib/components/nav-top/index.js +5 -5
- package/lib/components/okr-detail/auth.js +2 -2
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +4 -2
- package/lib/components/okr-detail/components/ao-nice/index.js +6 -4
- 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 +4 -2
- package/lib/components/okr-detail/components/header/o-avatar.js +4 -2
- package/lib/components/okr-detail/components/header/o-classify.js +4 -2
- 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 +4 -2
- package/lib/components/okr-detail/components/o-progress-update/index.js +4 -2
- 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 +4 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +4 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +4 -2
- 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 +4 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +2 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/kr-push-score.js +3 -3
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +4 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/edit-child-okr-weight.js +8 -6
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +4 -2
- package/lib/components/okr-detail/detail-footer/index.js +4 -2
- package/lib/components/okr-detail/detail-header/index.js +12 -10
- package/lib/components/okr-detail/okr-list/index.js +4 -2
- package/lib/components/okr-detail/request-apis.js +6 -2
- package/lib/components/okr-flow/child-node/fields/creator.js +4 -2
- package/lib/components/okr-flow/child-node/work-node.js +4 -2
- package/lib/components/okr-flow/export-modal/index.js +4 -12
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +10 -8
- package/lib/components/okr-flow/request-apis.js +6 -2
- package/lib/components/okr-flow/root-node/index.js +4 -2
- package/lib/components/okr-progress/components/o-progress-update/index.js +4 -2
- package/lib/components/okr-progress-modal/index.js +4 -2
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +6 -4
- package/lib/components/okr-review/ReviewPop/components/Toast/index.js +2 -2
- package/lib/components/okr-review/ReviewPop/index.js +2 -2
- package/lib/components/okr-review/components/ReviewItem/index.js +2 -2
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +2 -2
- package/lib/components/okr-review/index.js +2 -2
- package/lib/components/okr-share/common-painter/darwAvatar.js +8 -4
- package/lib/components/okr-share/common-painter/openDataPainter.js +6 -2
- package/lib/components/okr-share/common-painter/utils.js +8 -4
- package/lib/components/okr-share/pink-card/drawDepartmentName.js +6 -2
- package/lib/components/okr-share/pink-card/drawKrs.js +6 -2
- package/lib/components/okr-share/pink-card/drawQuote.js +6 -2
- package/lib/components/okr-share/pink-card/drawUserName.js +6 -2
- package/lib/components/okr-share/pink-card/index.js +6 -2
- package/lib/components/okr-share/publishMblog.js +4 -2
- package/lib/components/okr-share/shareCardSelector.js +6 -4
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +4 -4
- package/lib/components/okrcase-library/server/network.js +24 -20
- package/lib/components/open-data-painter/index.js +6 -2
- package/lib/components/operation-records/OperationRecordItem.js +2 -2
- package/lib/components/operation-records/index.js +2 -2
- package/lib/components/order-have-award/img/award.png +0 -0
- package/lib/components/order-have-award/index.css +5 -0
- package/lib/components/order-have-award/index.js +83 -0
- package/lib/components/order-have-award/interface.js +19 -0
- 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 +6 -2
- package/lib/components/picker/components/panels/date-panel/index.js +1 -1
- package/lib/components/picker/components/panels/month-panel/index.js +1 -1
- package/lib/components/picker/components/panels/month-panel/month-head.js +1 -1
- package/lib/components/picker/components/panels/year-panel/index.js +1 -1
- package/lib/components/picker/components/panels/year-panel/year-head.js +1 -1
- package/lib/components/picker/picker.js +1 -1
- package/lib/components/point-demo/drop-down-box/index.js +1 -1
- package/lib/components/point-demo/input/index.js +3 -3
- package/lib/components/point-demo/popup/index.js +1 -1
- package/lib/components/popup/index.js +1 -1
- package/lib/components/praise-record/PraiseRecordItem.js +2 -2
- package/lib/components/praise-record/index.js +2 -2
- package/lib/components/range-picker-pop/index.js +3 -3
- package/lib/components/range-selector-pop/RangeList.js +2 -2
- package/lib/components/range-selector-pop/RangeSelectorPop.js +2 -2
- package/lib/components/rich-editor/models/schema.js +2 -2
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +2 -2
- package/lib/components/rich-editor/plugins/block/heading/index.js +2 -2
- package/lib/components/rich-editor/plugins/block/lists/index.js +2 -2
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +2 -2
- package/lib/components/rich-editor/plugins/core/index.js +2 -2
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +2 -2
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/color/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/em/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/link/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/strong/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +2 -2
- package/lib/components/rich-editor/react/reactNodeView.js +4 -4
- package/lib/components/rich-editor/react/uiProvider.js +2 -2
- package/lib/components/rich-editor/ui/Popup/index.js +2 -2
- package/lib/components/scroll-container/index.js +2 -2
- package/lib/components/scrollbar/index.js +1 -1
- package/lib/components/scrollbar/scroll-mask/index.js +1 -1
- package/lib/components/scrollbar/simplebar-react.js +1 -1
- package/lib/components/search-dropdown/index.js +1 -1
- package/lib/components/select/Option.js +3 -3
- package/lib/components/select/index.js +3 -3
- package/lib/components/select-layer/index.js +1 -1
- package/lib/components/select-tags/index.js +1 -1
- package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +6 -2
- package/lib/components/superset-charts/fetch-assets-and-append/index.js +8 -4
- package/lib/components/survey-model/request-api.js +6 -2
- package/lib/components/switch/index.js +1 -1
- package/lib/components/table/index.js +1 -1
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/task-relation-modal/index.js +7 -5
- 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 +4 -2
- package/lib/components/task-relation-modal/tree/okr-tree/index.js +4 -2
- package/lib/components/task-relation-modal/tree/work-tree/index.js +4 -2
- package/lib/components/task-relation-modal/tree-node/index.js +1 -1
- package/lib/components/task-relation-modal/work-relation/index.js +7 -5
- package/lib/components/task-tree/task-item-node/e-project.js +4 -2
- package/lib/components/task-tree/task-item-node/e-task.js +4 -2
- package/lib/components/task-tree/task-item-node/task-node-render.js +1 -1
- package/lib/components/task-tree/task-tree.js +1 -1
- package/lib/components/textarea/index.js +1 -1
- package/lib/components/time-picker/time-picker-selector.js +1 -1
- package/lib/components/time-picker/time-picker.js +1 -1
- package/lib/components/time-picker/timer-picker-input.js +1 -1
- package/lib/components/tita-chart/charts/liquid-ball.js +1 -1
- package/lib/components/tita-chart/charts/pie.js +1 -1
- package/lib/components/tita-chart/errorBoundary/index.js +2 -2
- package/lib/components/toast/index.js +12 -8
- package/lib/components/tooltip/error-tip.js +1 -1
- package/lib/components/tooltip/tooltip.js +1 -1
- package/lib/components/tree/index.js +1 -1
- package/lib/components/upload/components/uploadedPreview.js +2 -2
- package/lib/components/upload/index.js +2 -2
- package/lib/components/upvote/index.js +7 -5
- 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 +6 -4
- package/lib/components/version-change-modal/request-api.js +6 -2
- package/lib/components/viewer/ImageListRender.js +2 -2
- package/lib/components/viewer/index.js +2 -2
- package/lib/components/weekly-report/card.js +4 -12
- package/lib/components/weekly-report/common-painter/darwAvatar.js +10 -6
- package/lib/components/weekly-report/common-painter/drawName.js +6 -2
- package/lib/components/weekly-report/common-painter/openDataPainter.js +6 -2
- package/lib/components/weekly-report/index.js +6 -4
- package/lib/components-v1/animate/AnimateChild.js +2 -2
- package/lib/components-v1/animate/animate.js +2 -2
- package/lib/components-v1/avatar/index.js +2 -2
- package/lib/components-v1/buttonv2/ButtonOutlined.js +2 -2
- package/lib/components-v1/buttonv2/ButtonRounded.js +2 -2
- package/lib/components-v1/buttonv2/DefaultButton.js +2 -2
- package/lib/components-v1/confirm/index.js +2 -2
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +2 -2
- package/lib/components-v1/dropDownSelector/dropDownSelector.js +2 -2
- package/lib/components-v1/input/Input.js +3 -3
- package/lib/components-v1/input/InputNumber.js +2 -2
- package/lib/components-v1/placement/placement.js +2 -2
- package/lib/components-v1/placement/placementInner.js +2 -2
- package/lib/components-v1/pop/Pop.js +2 -2
- package/lib/components-v1/pop/PopInner.js +2 -2
- package/lib/components-v1/portals/Portals.js +2 -2
- package/lib/components-v1/progress/CircleProgress.js +2 -2
- package/lib/components-v1/progress/LineProgress.js +2 -2
- package/lib/components-v1/progress/index.js +2 -2
- package/lib/components-v1/radio/radio.js +2 -2
- package/lib/components-v1/radio/radioGroup.js +2 -2
- package/lib/components-v1/search/index.js +2 -2
- package/lib/components-v1/select/Option.js +3 -3
- package/lib/components-v1/select/index.js +3 -3
- package/lib/components-v1/tabs/index.js +2 -2
- package/lib/components-v1/textarea/index.js +2 -2
- package/lib/components-v1/transition/index.js +2 -2
- package/lib/components-v1/userSelector/UserSelectorPop.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/CommonList.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentList.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentTree.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/SubsList.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/index.js +2 -2
- package/lib/components-v1/userSelector/components/SearchBar.js +2 -2
- package/lib/components-v1/userSelector/components/SingleMode.js +2 -2
- package/lib/components-v1/userSelector/components/UserItem.js +2 -2
- package/lib/components-v1/userSelector/index.js +2 -2
- package/lib/pages/aha2021/index.css +7 -0
- package/lib/pages/aha2021/index.js +10 -4
- package/lib/pages/aha2021/new-menu-switcher/index.css +5 -1
- package/lib/pages/aha2021/new-menu-switcher/index.js +9 -5
- 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 +6 -2
- 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 +18 -14
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +5 -3
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +1 -1
- package/lib/pages/okr-map/request-apis.js +6 -2
- package/lib/pages/okr-map/share-dialog/index.js +1 -1
- package/lib/utils/auth.js +2 -2
- package/lib/utils/open-data.js +6 -4
- package/lib/utils/request-v1.js +6 -2
- package/lib/utils/request.js +6 -2
- package/package.json +1 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _errorInfo = _interopRequireDefault(require("../error-info"));
|
|
15
|
+
|
|
16
|
+
require("./index.css");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
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
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
|
+
|
|
28
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
29
|
+
|
|
30
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
31
|
+
|
|
32
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
33
|
+
|
|
34
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
35
|
+
|
|
36
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
|
+
|
|
38
|
+
var preCls = "titaui-book-demo-input";
|
|
39
|
+
|
|
40
|
+
var BookDemoInput = function BookDemoInput(_ref) {
|
|
41
|
+
var _classNames;
|
|
42
|
+
|
|
43
|
+
var name = _ref.name,
|
|
44
|
+
type = _ref.type,
|
|
45
|
+
value = _ref.value,
|
|
46
|
+
id = _ref.id,
|
|
47
|
+
required = _ref.required,
|
|
48
|
+
halfWidth = _ref.halfWidth,
|
|
49
|
+
onChange = _ref.onChange;
|
|
50
|
+
|
|
51
|
+
var _useState = (0, _react.useState)(value),
|
|
52
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
53
|
+
inputValue = _useState2[0],
|
|
54
|
+
setInputValue = _useState2[1];
|
|
55
|
+
|
|
56
|
+
var _useState3 = (0, _react.useState)(false),
|
|
57
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
58
|
+
hasErr = _useState4[0],
|
|
59
|
+
setHasErr = _useState4[1];
|
|
60
|
+
|
|
61
|
+
var handleChangeInputValue = function handleChangeInputValue(e) {
|
|
62
|
+
setInputValue(e.target.value);
|
|
63
|
+
setHasErr(required && !e.target.value);
|
|
64
|
+
|
|
65
|
+
if (onChange) {
|
|
66
|
+
onChange(name, id, e.target.value, required && !e.target.value);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
var handleBlur = function handleBlur() {
|
|
71
|
+
setHasErr(required && !inputValue);
|
|
72
|
+
|
|
73
|
+
if (onChange) {
|
|
74
|
+
onChange(name, id, inputValue, required && !inputValue);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
79
|
+
className: (0, _classnames["default"])(preCls, (_classNames = {}, _defineProperty(_classNames, "".concat(preCls, "--full-row"), !halfWidth), _defineProperty(_classNames, "".concat(preCls, "--error"), hasErr), _classNames))
|
|
80
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
81
|
+
className: (0, _classnames["default"])("".concat(preCls, "__name"), _defineProperty({}, "".concat(preCls, "__name--required"), required))
|
|
82
|
+
}, name), /*#__PURE__*/_react["default"].createElement("input", {
|
|
83
|
+
className: (0, _classnames["default"])("".concat(preCls, "__input"), _defineProperty({}, "".concat(preCls, "__input--half"), halfWidth)),
|
|
84
|
+
type: type,
|
|
85
|
+
value: inputValue,
|
|
86
|
+
onChange: handleChangeInputValue,
|
|
87
|
+
onBlur: handleBlur
|
|
88
|
+
}), /*#__PURE__*/_react["default"].createElement(_errorInfo["default"], {
|
|
89
|
+
errMsg: hasErr ? "".concat(name, "\u4E0D\u80FD\u4E3A\u7A7A") : ""
|
|
90
|
+
}));
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
var _default = BookDemoInput;
|
|
94
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
|
|
3
|
+
.titaui-book-demo-phone {
|
|
4
|
+
display: flex;
|
|
5
|
+
word-break: keep-all;
|
|
6
|
+
border-bottom: 1px solid #e9ecf0;
|
|
7
|
+
position: relative;
|
|
8
|
+
padding-bottom: 5px;
|
|
9
|
+
/* 火狐浏览器 */
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.titaui-book-demo-phone--error {
|
|
13
|
+
border-bottom: 1px solid #f05e5e;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.titaui-book-demo-phone--full-row {
|
|
17
|
+
grid-column-start: 1;
|
|
18
|
+
grid-column-end: 3;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.titaui-book-demo-phone__name {
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
color: #89919f;
|
|
24
|
+
line-height: 22px;
|
|
25
|
+
white-space: nowrap;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.titaui-book-demo-phone__name--required::after {
|
|
29
|
+
content: '*';
|
|
30
|
+
display: inline-block;
|
|
31
|
+
color: #f05e5e;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.titaui-book-demo-phone input[type='number'] {
|
|
35
|
+
-moz-appearance: textfield;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.titaui-book-demo-phone__input {
|
|
39
|
+
border: none;
|
|
40
|
+
outline: none;
|
|
41
|
+
padding-left: 8px;
|
|
42
|
+
font-size: 14px;
|
|
43
|
+
color: #3f4755;
|
|
44
|
+
line-height: 22px;
|
|
45
|
+
box-sizing: border-box;
|
|
46
|
+
flex: 1;
|
|
47
|
+
/* chrome */
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.titaui-book-demo-phone__input--half {
|
|
51
|
+
width: 110px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.titaui-book-demo-phone__input::-webkit-outer-spin-button, .titaui-book-demo-phone__input::-webkit-inner-spin-button {
|
|
55
|
+
-webkit-appearance: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.titaui-book-demo-phone__input ::-webkit-input-placeholder {
|
|
59
|
+
color: #bfc7d5;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.titaui-book-demo-phone__input :-ms-input-placeholder {
|
|
63
|
+
color: #bfc7d5;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.titaui-book-demo-phone__input :-moz-input-placeholder {
|
|
67
|
+
color: #bfc7d5;
|
|
68
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _errorInfo = _interopRequireDefault(require("../error-info"));
|
|
15
|
+
|
|
16
|
+
require("./index.css");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
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
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
|
+
|
|
28
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
29
|
+
|
|
30
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
31
|
+
|
|
32
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
33
|
+
|
|
34
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
35
|
+
|
|
36
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
|
+
|
|
38
|
+
var preCls = "titaui-book-demo-phone";
|
|
39
|
+
var phoneReg = /^1[3456789]\d{9}$/;
|
|
40
|
+
|
|
41
|
+
var BookDemoPhone = function BookDemoPhone(_ref) {
|
|
42
|
+
var _classNames;
|
|
43
|
+
|
|
44
|
+
var name = _ref.name,
|
|
45
|
+
required = _ref.required,
|
|
46
|
+
id = _ref.id,
|
|
47
|
+
value = _ref.value,
|
|
48
|
+
halfWidth = _ref.halfWidth,
|
|
49
|
+
onChange = _ref.onChange;
|
|
50
|
+
|
|
51
|
+
var _useState = (0, _react.useState)(value),
|
|
52
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
53
|
+
inputValue = _useState2[0],
|
|
54
|
+
setInputValue = _useState2[1];
|
|
55
|
+
|
|
56
|
+
var _useState3 = (0, _react.useState)(false),
|
|
57
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
58
|
+
hasErr = _useState4[0],
|
|
59
|
+
setHasErr = _useState4[1];
|
|
60
|
+
|
|
61
|
+
var handleChangeInputValue = function handleChangeInputValue(e) {
|
|
62
|
+
setInputValue(e.target.value);
|
|
63
|
+
setHasErr(e.target.value.length !== 11);
|
|
64
|
+
|
|
65
|
+
if (onChange) {
|
|
66
|
+
onChange(name, id, e.target.value, false);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
var handleBlur = function handleBlur() {
|
|
71
|
+
var nowHasErr = required && !inputValue || !!inputValue && inputValue.length !== 11 || !phoneReg.test(inputValue);
|
|
72
|
+
setHasErr(nowHasErr);
|
|
73
|
+
|
|
74
|
+
if (onChange) {
|
|
75
|
+
onChange(name, id, inputValue, nowHasErr);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
|
+
className: (0, _classnames["default"])(preCls, (_classNames = {}, _defineProperty(_classNames, "".concat(preCls, "--full-row"), !halfWidth), _defineProperty(_classNames, "".concat(preCls, "--error"), hasErr), _classNames))
|
|
81
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
82
|
+
className: (0, _classnames["default"])("".concat(preCls, "__name"), _defineProperty({}, "".concat(preCls, "__name--required"), required))
|
|
83
|
+
}, name), /*#__PURE__*/_react["default"].createElement("input", {
|
|
84
|
+
className: (0, _classnames["default"])("".concat(preCls, "__input"), _defineProperty({}, "".concat(preCls, "__input--half"), halfWidth)),
|
|
85
|
+
type: "number",
|
|
86
|
+
value: inputValue,
|
|
87
|
+
onChange: handleChangeInputValue,
|
|
88
|
+
onBlur: handleBlur
|
|
89
|
+
}), /*#__PURE__*/_react["default"].createElement(_errorInfo["default"], {
|
|
90
|
+
errMsg: hasErr ? "".concat(name, "\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u9700\u8981\u5408\u6CD5\u4E14\u957F\u5EA6\u5FC5\u987B\u4E3A11\u4F4D") : ""
|
|
91
|
+
}));
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
var _default = BookDemoPhone;
|
|
95
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
.titaui-book-demo-verify-code {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
word-break: keep-all;
|
|
5
|
+
border-bottom: 1px solid #e9ecf0;
|
|
6
|
+
position: relative;
|
|
7
|
+
padding-bottom: 3px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.titaui-book-demo-verify-code--error {
|
|
11
|
+
border-bottom: 1px solid #f05e5e;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.titaui-book-demo-verify-code--full-row {
|
|
15
|
+
grid-column-start: 1;
|
|
16
|
+
grid-column-end: 3;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.titaui-book-demo-verify-code__name {
|
|
20
|
+
font-size: 14px;
|
|
21
|
+
color: #89919f;
|
|
22
|
+
line-height: 22px;
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.titaui-book-demo-verify-code__name--required::after {
|
|
27
|
+
content: '*';
|
|
28
|
+
display: inline-block;
|
|
29
|
+
color: #f05e5e;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.titaui-book-demo-verify-code__input {
|
|
33
|
+
flex: 1;
|
|
34
|
+
border: none;
|
|
35
|
+
padding-left: 4px;
|
|
36
|
+
font-size: 14px;
|
|
37
|
+
color: #3f4755;
|
|
38
|
+
line-height: 22px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.titaui-book-demo-verify-code__code-img {
|
|
42
|
+
width: 77px;
|
|
43
|
+
height: 30px;
|
|
44
|
+
margin-top: -4px;
|
|
45
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _errorInfo = _interopRequireDefault(require("../error-info"));
|
|
15
|
+
|
|
16
|
+
require("./index.css");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
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
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
|
+
|
|
28
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
29
|
+
|
|
30
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
31
|
+
|
|
32
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
33
|
+
|
|
34
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
35
|
+
|
|
36
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
|
+
|
|
38
|
+
var preCls = "titaui-book-demo-verify-code"; // 验证码系列产品
|
|
39
|
+
|
|
40
|
+
var renderCode = function renderCode() {
|
|
41
|
+
var newYzmGuid = "".concat(new Date().getTime());
|
|
42
|
+
|
|
43
|
+
for (var i = 0; i < 10; i += 1) {
|
|
44
|
+
newYzmGuid += Math.floor(Math.random() * 10);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return "".concat(newYzmGuid, "?v=").concat(new Date().getTime());
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var BookDemoVerifyCode = function BookDemoVerifyCode(_ref) {
|
|
51
|
+
var _classNames;
|
|
52
|
+
|
|
53
|
+
var name = _ref.name,
|
|
54
|
+
required = _ref.required,
|
|
55
|
+
halfWidth = _ref.halfWidth,
|
|
56
|
+
id = _ref.id,
|
|
57
|
+
value = _ref.value,
|
|
58
|
+
onChange = _ref.onChange;
|
|
59
|
+
|
|
60
|
+
var _useState = (0, _react.useState)(value),
|
|
61
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
62
|
+
inputValue = _useState2[0],
|
|
63
|
+
setInputValue = _useState2[1];
|
|
64
|
+
|
|
65
|
+
var _useState3 = (0, _react.useState)(renderCode()),
|
|
66
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
67
|
+
yzmGuid = _useState4[0],
|
|
68
|
+
setYzmGuid = _useState4[1];
|
|
69
|
+
|
|
70
|
+
var _useState5 = (0, _react.useState)(false),
|
|
71
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
72
|
+
hasErr = _useState6[0],
|
|
73
|
+
setHasErr = _useState6[1];
|
|
74
|
+
|
|
75
|
+
var _useState7 = (0, _react.useState)(""),
|
|
76
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
77
|
+
errMsg = _useState8[0],
|
|
78
|
+
setErrMsg = _useState8[1];
|
|
79
|
+
|
|
80
|
+
var handelChangeImage = function handelChangeImage() {
|
|
81
|
+
var yzm = renderCode();
|
|
82
|
+
setYzmGuid(yzm);
|
|
83
|
+
setInputValue("");
|
|
84
|
+
onChange(name, id, "", true, {
|
|
85
|
+
yzm: yzm,
|
|
86
|
+
handelChangeImage: handelChangeImage,
|
|
87
|
+
setErrMsg: setErrMsg
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
var handleChangeInputValue = function handleChangeInputValue(e) {
|
|
92
|
+
setInputValue(e.target.value);
|
|
93
|
+
setHasErr(!e.target.value);
|
|
94
|
+
setErrMsg("");
|
|
95
|
+
|
|
96
|
+
if (onChange) {
|
|
97
|
+
onChange(name, id, e.target.value, !e.target.value, {
|
|
98
|
+
yzmGuid: yzmGuid,
|
|
99
|
+
handelChangeImage: handelChangeImage,
|
|
100
|
+
setErrMsg: setErrMsg
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
var handleBlur = function handleBlur() {
|
|
106
|
+
setHasErr(required && !inputValue);
|
|
107
|
+
|
|
108
|
+
if (onChange) {
|
|
109
|
+
onChange(name, id, inputValue, required && !inputValue, {
|
|
110
|
+
yzmGuid: yzmGuid,
|
|
111
|
+
handelChangeImage: handelChangeImage,
|
|
112
|
+
setErrMsg: setErrMsg
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
118
|
+
className: (0, _classnames["default"])(preCls, (_classNames = {}, _defineProperty(_classNames, "".concat(preCls, "--full-row"), !halfWidth), _defineProperty(_classNames, "".concat(preCls, "--error"), hasErr), _classNames))
|
|
119
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
120
|
+
className: (0, _classnames["default"])("".concat(preCls, "__name"), _defineProperty({}, "".concat(preCls, "__name--required"), required))
|
|
121
|
+
}, name), /*#__PURE__*/_react["default"].createElement("input", {
|
|
122
|
+
className: (0, _classnames["default"])("".concat(preCls, "__input")),
|
|
123
|
+
type: "text",
|
|
124
|
+
value: inputValue,
|
|
125
|
+
onBlur: handleBlur,
|
|
126
|
+
onChange: handleChangeInputValue
|
|
127
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
128
|
+
onClick: handelChangeImage
|
|
129
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
130
|
+
className: "".concat(preCls, "__code-img"),
|
|
131
|
+
src: "/Account/Account/GetCaptchaImgV2/".concat(yzmGuid),
|
|
132
|
+
alt: ""
|
|
133
|
+
})), /*#__PURE__*/_react["default"].createElement(_errorInfo["default"], {
|
|
134
|
+
errMsg: hasErr || errMsg ? errMsg || "验证码不能为空" : ""
|
|
135
|
+
}));
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
var _default = BookDemoVerifyCode;
|
|
139
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.titaui-book-demo-pc {
|
|
2
|
+
display: flex;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.titaui-book-demo-pc__close {
|
|
6
|
+
position: absolute;
|
|
7
|
+
width: 40px;
|
|
8
|
+
height: 40px;
|
|
9
|
+
background: rgba(20, 28, 40, 0.5);
|
|
10
|
+
right: -44px;
|
|
11
|
+
top: -22px;
|
|
12
|
+
border-radius: 50%;
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
color: #ffffff;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.titaui-book-demo-pc__close-icon {
|
|
21
|
+
width: 14px;
|
|
22
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _dialog = _interopRequireDefault(require("../../../dialog"));
|
|
15
|
+
|
|
16
|
+
var _content = _interopRequireDefault(require("./components/content"));
|
|
17
|
+
|
|
18
|
+
var _demoClose = _interopRequireDefault(require("../../img/demo-close.svg"));
|
|
19
|
+
|
|
20
|
+
var _utils = require("../../utils");
|
|
21
|
+
|
|
22
|
+
require("./index.css");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
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); }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
|
+
|
|
32
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
33
|
+
|
|
34
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
35
|
+
|
|
36
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
37
|
+
|
|
38
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
39
|
+
|
|
40
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
|
+
|
|
42
|
+
var preCls = "titaui-book-demo-pc";
|
|
43
|
+
var version = window.BSGlobal && window.BSGlobal.tenantAuthentication.Version;
|
|
44
|
+
var role = window.BSGlobal && window.BSGlobal.loginUserInfo.Role;
|
|
45
|
+
var isSubmitted = localStorage.getItem("isSubmitted");
|
|
46
|
+
var time = Number(localStorage.getItem("pointDemoTime"));
|
|
47
|
+
var newDate = new Date().getTime();
|
|
48
|
+
var uname = window.BSGlobal && window.BSGlobal.loginUserInfo.Name || "";
|
|
49
|
+
var uid = window.BSGlobal && window.BSGlobal.tenantInfo.Id || "";
|
|
50
|
+
var Source = window.BSGlobal && window.BSGlobal.tenantInfo.Source || (0, _utils.getSource)();
|
|
51
|
+
var BookDemoPC = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
52
|
+
var type = _ref.type,
|
|
53
|
+
visible = _ref.visible,
|
|
54
|
+
visibleChange = _ref.visibleChange,
|
|
55
|
+
_ref$autoShow = _ref.autoShow,
|
|
56
|
+
autoShow = _ref$autoShow === void 0 ? false : _ref$autoShow,
|
|
57
|
+
source = _ref.source;
|
|
58
|
+
|
|
59
|
+
var _useState = (0, _react.useState)(false),
|
|
60
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
61
|
+
dialogVisible = _useState2[0],
|
|
62
|
+
setDialogVisible = _useState2[1];
|
|
63
|
+
|
|
64
|
+
var _useState3 = (0, _react.useState)([]),
|
|
65
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
66
|
+
data = _useState4[0],
|
|
67
|
+
setData = _useState4[1];
|
|
68
|
+
|
|
69
|
+
var handleCloseBookDemo = function handleCloseBookDemo() {
|
|
70
|
+
var content = uid ? "\u79DF\u6237ID\uFF1A".concat(uid, "\uFF0C\u79DF\u6237\u8D26\u53F7\u540D\u79F0\uFF1A").concat(uname, ",") : "";
|
|
71
|
+
data.forEach(function (item) {
|
|
72
|
+
content += "".concat(item.name, ": ").concat(Array.isArray(item.value) ? item.value.join(",") : item.value, ",");
|
|
73
|
+
});
|
|
74
|
+
content += "source: ".concat(source || Source);
|
|
75
|
+
|
|
76
|
+
if (window.titaTracker && !localStorage.getItem("titaccc")) {
|
|
77
|
+
window.titaTracker("action").record({
|
|
78
|
+
productName: "预约演示",
|
|
79
|
+
actionGroup: "取消预约演示",
|
|
80
|
+
actionName: "\u53D6\u6D88\u9884\u7EA6\u6F14\u793A:\u586B\u5199\u60C5\u51B5\uFF1A".concat(content)
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
setDialogVisible(false);
|
|
85
|
+
|
|
86
|
+
if (visibleChange) {
|
|
87
|
+
visibleChange(false);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
var handleSuccessCloseBookDemo = function handleSuccessCloseBookDemo() {
|
|
92
|
+
setDialogVisible(false);
|
|
93
|
+
|
|
94
|
+
if (visibleChange) {
|
|
95
|
+
visibleChange(false);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
var handleChangeData = function handleChangeData(result) {
|
|
100
|
+
setData(result);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
var handleShowBookDemo = function handleShowBookDemo() {
|
|
104
|
+
setDialogVisible(true);
|
|
105
|
+
|
|
106
|
+
if (visibleChange) {
|
|
107
|
+
visibleChange(true);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
112
|
+
return {
|
|
113
|
+
show: handleShowBookDemo,
|
|
114
|
+
hide: handleCloseBookDemo
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
(0, _react.useEffect)(function () {
|
|
118
|
+
setDialogVisible(visible);
|
|
119
|
+
}, [visible]);
|
|
120
|
+
(0, _react.useEffect)(function () {
|
|
121
|
+
if (!isSubmitted && autoShow) {
|
|
122
|
+
if (time && newDate > time) {
|
|
123
|
+
if (version === 1 && role === 2) {
|
|
124
|
+
setTimeout(function () {
|
|
125
|
+
var date = new Date().getTime() + 86400000;
|
|
126
|
+
localStorage.setItem("pointDemoTime", date.toString());
|
|
127
|
+
setDialogVisible(true);
|
|
128
|
+
}, 30000);
|
|
129
|
+
}
|
|
130
|
+
} else if (!time) {
|
|
131
|
+
if (version === 1 && role === 2) {
|
|
132
|
+
setTimeout(function () {
|
|
133
|
+
var date = new Date().getTime() + 86400000;
|
|
134
|
+
localStorage.setItem("pointDemoTime", date.toString());
|
|
135
|
+
setDialogVisible(true);
|
|
136
|
+
}, 30000);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}, []);
|
|
141
|
+
return /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
|
|
142
|
+
zIndex: 1200,
|
|
143
|
+
noHeadLine: true,
|
|
144
|
+
visible: dialogVisible,
|
|
145
|
+
onClose: handleCloseBookDemo,
|
|
146
|
+
noFooter: true,
|
|
147
|
+
noCloseIcon: true,
|
|
148
|
+
destroyOnClose: true,
|
|
149
|
+
style: {
|
|
150
|
+
width: "742px",
|
|
151
|
+
borderRadius: "24px"
|
|
152
|
+
},
|
|
153
|
+
maskClosable: false
|
|
154
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
155
|
+
className: "".concat(preCls, "__close"),
|
|
156
|
+
onClick: handleCloseBookDemo
|
|
157
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
158
|
+
alt: "close",
|
|
159
|
+
src: _demoClose["default"],
|
|
160
|
+
className: (0, _classnames["default"])("".concat(preCls, "__close-icon"))
|
|
161
|
+
})), /*#__PURE__*/_react["default"].createElement(_content["default"], {
|
|
162
|
+
onChange: handleChangeData,
|
|
163
|
+
source: source,
|
|
164
|
+
type: type,
|
|
165
|
+
onSubmitSuccess: handleSuccessCloseBookDemo
|
|
166
|
+
}));
|
|
167
|
+
});
|
|
168
|
+
BookDemoPC.defaultProps = {
|
|
169
|
+
autoShow: false,
|
|
170
|
+
visibleChange: function visibleChange() {},
|
|
171
|
+
source: 0
|
|
172
|
+
};
|
|
173
|
+
var _default = BookDemoPC;
|
|
174
|
+
exports["default"] = _default;
|