@titaui/pc 1.10.89 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/cascader/time.js +31 -0
- package/es/components/common-share/request-apis.js +56 -0
- package/es/components/confidence/heart.js +66 -0
- package/es/components/create-okr-modal/fields/index.js +17 -0
- package/es/components/create-okr-modal/utils/getCreateOkrSurpassPercent.js +154 -0
- package/es/components/date-picker/BodyItem.js +121 -0
- package/es/components/date-picker/CalendarBody.js +157 -0
- package/es/components/date-picker/CalendarHeader.js +187 -0
- package/es/components/date-picker/index.js +157 -0
- package/es/components/date-range-picker/index.js +210 -0
- package/es/components/dialog/index.js +119 -0
- package/es/components/dialog-confirm/index.js +154 -0
- package/es/components/drop-selector/icon-item.js +40 -0
- package/es/components/drop-selector/index.js +179 -0
- package/es/components/dynamic/dynamic-like-ranking/mock.js +84 -0
- package/es/components/dynamic/dynamic-liking/mock.js +83 -0
- package/es/components/dynamic/dynamic-topping/request-api.js +36 -0
- package/es/components/e-priority/index.js +88 -0
- package/es/components/e-status-dropdown/index.js +94 -0
- package/es/components/grid-layout/commen-components/index.js +73 -0
- package/es/components/grid-layout/image/could.js +8 -0
- package/es/components/grid-layout/image/lv.js +8 -0
- package/es/components/grid-layout/image/tita-mask.js +8 -0
- package/es/components/help-card/request-api.js +35 -0
- package/es/components/icon-button-list/index.js +65 -0
- package/es/components/menus/context.js +18 -0
- package/es/components/menus/precls.js +8 -0
- package/es/components/okr-detail/auth.js +197 -0
- package/es/components/okr-detail/components/ao-nice/index.js +245 -0
- package/es/components/okr-detail/components/block-line/index.js +20 -0
- package/es/components/okr-detail/components/header/index.js +211 -0
- package/es/components/okr-detail/components/icon-text/index.js +116 -0
- package/es/components/okr-detail/components/okr-tree/index.js +48 -0
- package/es/components/okr-detail/components/okr-tree/precls.js +8 -0
- package/es/components/okr-detail/components/okr-tree/tree-node/default-node.js +22 -0
- package/es/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +88 -0
- package/es/components/okr-detail/components/okr-tree/tree-node/e-node/e-project.js +200 -0
- package/es/components/okr-detail/components/okr-tree/tree-node/e-node/e-status-dropdown.js +98 -0
- package/es/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +412 -0
- package/es/components/okr-detail/components/okr-tree/tree-node/get-process-color.js +62 -0
- package/es/components/okr-detail/components/okr-tree/tree-node/index.js +90 -0
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/get-process-color.js +46 -0
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +421 -0
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/index.js +54 -0
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/style.js +62 -0
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +94 -0
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +273 -0
- package/es/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +207 -0
- package/es/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +236 -0
- package/es/components/okr-detail/components/padding-layout.js +22 -0
- package/es/components/okr-detail/components/tab-panel-content/index.js +27 -0
- package/es/components/okr-detail/context.js +30 -0
- package/es/components/okr-detail/e-list/index.js +243 -0
- package/es/components/okr-detail/e-list/precls.js +8 -0
- package/es/components/okr-detail/e-list/search-form/fields/e-order.js +172 -0
- package/es/components/okr-detail/e-list/search-form/fields/e-status.js +99 -0
- package/es/components/okr-detail/e-list/search-form/fields/e-user.js +49 -0
- package/es/components/okr-detail/e-list/search-form/index.js +143 -0
- package/es/components/okr-detail/error-page/index.js +33 -0
- package/es/components/okr-detail/index.js +428 -0
- package/es/components/okr-detail/loading/index.js +28 -0
- package/es/components/okr-detail/okr-list/add-parent-okr.js +37 -0
- package/es/components/okr-detail/okr-list/create-kr-item/heart.js +38 -0
- package/es/components/okr-detail/okr-list/drag-order-kr.js +62 -0
- package/es/components/okr-detail/okr-list/empty/index.js +48 -0
- package/es/components/okr-detail/okr-list/index.js +524 -0
- package/es/components/okr-detail/okr-list/warp-parent-okr.js +21 -0
- package/es/components/okr-detail/store.js +1 -0
- package/es/components/okr-flow/child-node/fields/creator.js +175 -0
- package/es/components/okr-flow/child-node/fields/okrClassify.js +31 -0
- package/es/components/okr-flow/child-node/fields/okrType.js +21 -0
- package/es/components/okr-flow/child-node/helper.js +35 -0
- package/es/components/okr-flow/child-node/index.js +110 -0
- package/es/components/okr-flow/child-node/kr-node.js +75 -0
- package/es/components/okr-flow/child-node/work-node.js +242 -0
- package/es/components/okr-flow/context.js +14 -0
- package/es/components/okr-flow/empty/index.js +29 -0
- package/es/components/okr-flow/export-modules/okr-search-panel/index.js +394 -0
- package/es/components/okr-flow/index.js +24 -0
- package/es/components/okr-flow/mini-map/index.js +112 -0
- package/es/components/okr-flow/mini-map/map.js +145 -0
- package/es/components/okr-flow/mini-map/mini-node.js +57 -0
- package/es/components/okr-flow/mini-map/utils.js +79 -0
- package/es/components/okr-flow/okr-map/index.js +192 -0
- package/es/components/okr-flow/open-data/index.js +115 -0
- package/es/components/okr-flow/precls.js +8 -0
- package/es/components/okr-flow/request-apis.js +118 -0
- package/es/components/okr-flow/root-node/index.js +229 -0
- package/es/components/okr-flow/utils/config.js +18 -0
- package/es/components/okr-flow/utils/helper.js +36 -0
- package/es/components/okr-flow/utils/index.js +66 -0
- package/es/components/okr-flow/utils/tree-handler.js +323 -0
- package/es/components/okr-progress-modal/helper.js +156 -0
- package/es/components/okr-progress-modal/request-apis.js +34 -0
- package/es/components/okr-share/request-apis.js +56 -0
- package/es/components/okrcase-library/server/network.js +407 -0
- package/es/components/pagination/locale/en_US.js +22 -0
- package/es/components/pagination/locale/zh_CN.js +22 -0
- package/es/components/point-demo/drop-down-box/index.js +159 -0
- package/es/components/point-demo/index.js +533 -0
- package/es/components/point-demo/input/index.js +176 -0
- package/es/components/point-demo/point-demo.js +75 -0
- package/es/components/point-demo/popup/index.js +113 -0
- package/es/components/point-demo/popup/placement.js +44 -0
- package/es/components/range-picker-pop/index.js +273 -0
- package/es/components/scrollbar/simplebar/helpers.js +59 -0
- package/es/components/scrollbar/simplebar/index.js +91 -0
- package/es/components/scrollbar/simplebar/scrollbar-width.js +47 -0
- package/es/components/scrollbar/simplebar/simplebar.js +852 -0
- package/es/components/scrollbar/simplebar-react.js +163 -0
- package/es/components/search-dropdown/index.js +40 -0
- package/es/components/search-input/index.js +126 -0
- package/es/components/select/Option.js +94 -0
- package/es/components/select/index.js +330 -0
- package/es/components/selector-input/debounce.js +36 -0
- package/es/components/selector-input/index.js +109 -0
- package/es/components/slider-input/index.js +119 -0
- package/es/components/switch/index.js +39 -0
- package/es/components/table/index.js +275 -0
- package/es/components/tabs/index.js +63 -0
- package/es/components/task-relation-modal/tree-node/index.js +58 -0
- package/es/components/tita-chart/charts/img/could.js +8 -0
- package/es/components/tooltip/error-tip.js +24 -0
- package/es/components/tooltip/index.js +21 -0
- package/es/components/tree/index.js +79 -0
- package/es/components/tree/precls.js +8 -0
- package/es/components/upvote/request-apis.js +45 -0
- package/es/components/user-selector/action-btns/btn-cancel.js +21 -0
- package/es/components/user-selector/action-btns/btn-ok.js +21 -0
- package/es/components/user-selector/action-btns/index.js +27 -0
- package/es/components/user-selector/context.js +18 -0
- package/es/components/user-selector/empty/group.js +55 -0
- package/es/components/user-selector/empty/index.js +28 -0
- package/es/components/user-selector/export-modules/depart-search-selector/result-part.js +41 -0
- package/es/components/user-selector/export-modules/group-selector/index.js +170 -0
- package/es/components/user-selector/export-modules/group-selector/searched-panel.js +68 -0
- package/es/components/user-selector/export-modules/multiple-user-selector--bak/index.js +246 -0
- package/es/components/user-selector/index.js +25 -0
- package/es/components/user-selector/layout/index.js +25 -0
- package/es/components/user-selector/loading/index.js +18 -0
- package/es/components/user-selector/request-apis.js +180 -0
- package/es/components/user-selector/searched-panel/index.js +139 -0
- package/es/components/user-selector/searched-panel/result-part.js +43 -0
- package/es/components/user-selector/select-tree/selected-tree/index.js +91 -0
- package/es/components/user-selector/select-tree/tree-nodes/tree-depart-node/index.js +48 -0
- package/es/components/user-selector/select-tree/tree-nodes/tree-duties-node/index.js +27 -0
- package/es/components/user-selector/select-tree/tree-nodes/tree-group-node/index.js +57 -0
- package/es/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +93 -0
- package/es/components/user-selector/utils.js +139 -0
- package/es/components/viewer/ImageListRender.js +143 -0
- package/es/components/viewer/index.js +168 -0
- package/es/components/word-cloud/index.js +109 -0
- package/es/components/word-cloud/request-apis.js +26 -0
- package/es/components-v1/animate/AnimateChild.js +76 -0
- package/es/components-v1/animate/animate.js +148 -0
- package/es/components-v1/animate/index.js +13 -0
- package/es/components-v1/dom/index.js +30 -0
- package/es/components-v1/placement/index.js +13 -0
- package/es/components-v1/placement/placement.js +111 -0
- package/es/components-v1/placement/placementInner.js +139 -0
- package/es/components-v1/pop/Pop.js +246 -0
- package/es/components-v1/pop/PopInner.js +163 -0
- package/es/components-v1/pop/index.js +13 -0
- package/es/components-v1/progress/CircleProgress.js +152 -0
- package/es/components-v1/progress/LineProgress.js +83 -0
- package/es/components-v1/progress/index.js +80 -0
- package/es/components-v1/select/Option.js +94 -0
- package/es/components-v1/select/index.js +330 -0
- package/es/components-v1/utils/animate/animate.js +103 -0
- package/es/components-v1/utils/animate/event.js +79 -0
- package/es/components-v1/utils/dom/index.js +30 -0
- package/es/components-v1/utils/placement/autoAdjustPlacement.js +93 -0
- package/es/components-v1/utils/placement/getContainerVisibleArea.js +22 -0
- package/es/components-v1/utils/placement/getExpectPlacement.js +49 -0
- package/es/components-v1/utils/placement/getPlacementInContainer.js +26 -0
- package/es/components-v1/utils/placement/placement.js +76 -0
- package/es/index.js +777 -0
- package/es/pages/appointment-demo/drop-down-box/index.js +159 -0
- package/es/pages/appointment-demo/index.js +649 -0
- package/es/pages/appointment-demo/input/index.js +176 -0
- package/es/pages/appointment-demo/popup/index.js +113 -0
- package/es/pages/appointment-demo/popup/placement.js +44 -0
- package/es/pages/group-management/components/checkbox/index.js +28 -0
- package/es/pages/group-management/components/input-form/index.js +174 -0
- package/es/pages/group-management/components/radio/index.js +21 -0
- package/es/pages/group-management/components/table/index.js +174 -0
- package/es/pages/group-management/groupInterface.js +293 -0
- package/es/pages/group-management/index.js +13 -0
- package/es/pages/group-management/page-view/empty.js +111 -0
- package/es/pages/group-management/page-view/group-empty.js +66 -0
- package/es/pages/group-management/page-view/importGroupStaff/index.js +208 -0
- package/es/pages/group-management/page-view/index.js +412 -0
- package/es/pages/group-management/page-view/loading/index.js +32 -0
- package/es/pages/group-management/table/index.js +104 -0
- package/es/pages/group-management/tree/add-group-dialog/index.js +153 -0
- package/es/pages/group-management/tree/delete-group-dialog/index.js +82 -0
- package/es/pages/group-management/tree/edit-group-dialog/index.js +155 -0
- package/es/pages/group-management/tree/group-form/index.js +207 -0
- package/es/pages/group-management/tree/index.js +168 -0
- package/es/pages/group-management/tree/operation-panel.js +41 -0
- package/es/pages/group-management/tree/trigger-render.js +99 -0
- package/es/pages/like-ranking/mock.js +366 -0
- package/es/pages/okr-map/export-modules/index.js +1 -0
- package/es/pages/okr-map/export-modules/okr-map/header/index.js +182 -0
- package/es/pages/okr-map/export-modules/okr-map/header/show-kr-confirm.js +47 -0
- package/es/pages/okr-map/export-modules/okr-map/okr-map.js +497 -0
- package/es/pages/okr-map/export-modules/share-okr-page/header/index.js +69 -0
- package/es/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +168 -0
- package/es/pages/okr-map/hooks/useStorage.js +96 -0
- package/es/pages/okr-map/index.js +18 -0
- package/es/pages/okr-map/level2-search/depart.js +53 -0
- package/es/pages/okr-map/level2-search/group.js +69 -0
- package/es/pages/okr-map/level2-search/index.js +51 -0
- package/es/pages/okr-map/level2-search/level2-input.js +46 -0
- package/es/pages/okr-map/level2-search/user.js +54 -0
- package/es/pages/okr-map/no-okr/index.js +24 -0
- package/es/pages/okr-map/number-select/index.js +81 -0
- package/es/pages/okr-map/open-data/index.js +115 -0
- package/es/pages/okr-map/precls.js +8 -0
- package/es/pages/okr-map/request-apis.js +76 -0
- package/es/pages/okr-map/share-dialog/index.js +122 -0
- package/es/pages/okr-map/unsupport-ie/index.js +83 -0
- package/es/pages/okr-map/utils.js +51 -0
- package/es/utils/auth.js +294 -0
- package/es/utils/bs-global.js +114 -0
- package/es/utils/local-storage.js +42 -0
- package/es/utils/mblog.js +33 -0
- package/es/utils/mock-bsglobal.js +1837 -0
- package/es/utils/open-data.js +341 -0
- package/es/utils/request-v1.js +115 -0
- package/es/utils/request.js +183 -0
- package/es/utils/tools.js +286 -0
- package/lib/components/date-picker/BodyItem.js +3 -3
- package/lib/components/date-picker/CalendarHeader.js +3 -3
- package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/eReport/eReportLists/reportList.js +3 -3
- package/lib/components/emotions-selector/selector-pop.js +3 -3
- package/lib/components/ereport-list/index.js +3 -3
- package/lib/components/mblog/components/MblogAction.js +3 -3
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
- package/lib/components/okr-progress-modal/index.css +16 -15
- package/lib/components/okr-review/components/ReviewItem/index.js +3 -3
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/picker/components/panels/date-panel/date-body.js +116 -0
- package/lib/components/picker/components/panels/date-panel/date-head.js +66 -0
- package/lib/components/picker/components/panels/date-panel/index.css +14 -0
- package/lib/components/picker/components/panels/date-panel/index.js +49 -0
- package/lib/components/picker/components/panels/month-panel/index.css +27 -0
- package/lib/components/picker/components/panels/month-panel/index.js +63 -0
- package/lib/components/picker/components/panels/month-panel/month-body.js +87 -0
- package/lib/components/picker/components/panels/month-panel/month-head.js +47 -0
- package/lib/components/picker/components/panels/panel-body/index.js +53 -0
- package/lib/components/picker/components/panels/panel-head/index.js +48 -0
- package/lib/components/picker/components/panels/year-panel/index.css +23 -0
- package/lib/components/picker/components/panels/year-panel/index.js +65 -0
- package/lib/components/picker/components/panels/year-panel/year-body.js +92 -0
- package/lib/components/picker/components/panels/year-panel/year-head.js +35 -0
- package/lib/components/picker/components/picker-trigger/index.css +26 -0
- package/lib/components/picker/components/picker-trigger/index.js +85 -0
- package/lib/components/picker/context.js +15 -0
- package/lib/components/picker/index.css +121 -0
- package/lib/components/picker/index.js +13 -0
- package/lib/components/picker/picker-panels.js +182 -0
- package/lib/components/picker/picker.js +133 -0
- package/lib/components/picker/type.js +5 -0
- package/lib/components/picker/utils.js +28 -0
- package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
- package/lib/components/rich-editor/models/schema.js +6 -6
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
- package/lib/components/rich-editor/plugins/core/index.js +4 -4
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
- package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
- package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
- package/lib/components/rich-editor/react/uiProvider.js +3 -3
- package/lib/components/rich-editor/ui/Popup/index.js +3 -3
- package/lib/components/select/Option.js +3 -3
- package/lib/components/superset-charts/components/chart/index.js +8 -36
- package/lib/components/tita-chart/errorBoundary/index.js +3 -3
- package/lib/components-v1/animate/AnimateChild.js +3 -3
- package/lib/components-v1/avatar/index.js +3 -3
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
- package/lib/components-v1/progress/CircleProgress.js +3 -3
- package/lib/components-v1/select/Option.js +3 -3
- package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
- package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
- package/lib/components-v1/userSelector/components/UserItem.js +3 -3
- package/lib/index.js +8 -0
- package/package.json +1 -1
- package/yarn-error.log +21252 -0
|
@@ -0,0 +1,497 @@
|
|
|
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"] = _default;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
15
|
+
|
|
16
|
+
var _quarterOfYear = _interopRequireDefault(require("dayjs/plugin/quarterOfYear"));
|
|
17
|
+
|
|
18
|
+
var _header = _interopRequireDefault(require("./header"));
|
|
19
|
+
|
|
20
|
+
var _noOkr = _interopRequireDefault(require("../../no-okr"));
|
|
21
|
+
|
|
22
|
+
var _precls = _interopRequireDefault(require("../../precls"));
|
|
23
|
+
|
|
24
|
+
var _shareDialog = _interopRequireDefault(require("../../share-dialog"));
|
|
25
|
+
|
|
26
|
+
var _level2Search = _interopRequireDefault(require("../../level2-search"));
|
|
27
|
+
|
|
28
|
+
var _requestApis = require("../../request-apis");
|
|
29
|
+
|
|
30
|
+
var _useStorage13 = _interopRequireDefault(require("../../hooks/useStorage"));
|
|
31
|
+
|
|
32
|
+
var _drawerManager = _interopRequireDefault(require("../../../../components/drawer-manager"));
|
|
33
|
+
|
|
34
|
+
var _utils = require("../../utils");
|
|
35
|
+
|
|
36
|
+
var _unsupportIe = _interopRequireDefault(require("../../unsupport-ie"));
|
|
37
|
+
|
|
38
|
+
require("./index.scss");
|
|
39
|
+
|
|
40
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
41
|
+
|
|
42
|
+
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); }
|
|
43
|
+
|
|
44
|
+
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; }
|
|
45
|
+
|
|
46
|
+
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); }
|
|
47
|
+
|
|
48
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
49
|
+
|
|
50
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
51
|
+
|
|
52
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
53
|
+
|
|
54
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
55
|
+
|
|
56
|
+
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; }
|
|
57
|
+
|
|
58
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
59
|
+
|
|
60
|
+
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."); }
|
|
61
|
+
|
|
62
|
+
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); }
|
|
63
|
+
|
|
64
|
+
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; }
|
|
65
|
+
|
|
66
|
+
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; }
|
|
67
|
+
|
|
68
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
69
|
+
|
|
70
|
+
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }
|
|
71
|
+
|
|
72
|
+
_dayjs["default"].extend(_quarterOfYear["default"]);
|
|
73
|
+
|
|
74
|
+
function _default(props) {
|
|
75
|
+
_objectDestructuringEmpty(props); // 使用存储的State
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
var _useStorage = (0, _useStorage13["default"])("period", {
|
|
79
|
+
annualNum: "".concat(new Date().getFullYear()),
|
|
80
|
+
cycleType: "2",
|
|
81
|
+
yqmNum: "".concat((0, _dayjs["default"])().quarter())
|
|
82
|
+
}),
|
|
83
|
+
_useStorage2 = _slicedToArray(_useStorage, 2),
|
|
84
|
+
period = _useStorage2[0],
|
|
85
|
+
setPeriod = _useStorage2[1];
|
|
86
|
+
|
|
87
|
+
var _useStorage3 = (0, _useStorage13["default"])("showkr", false),
|
|
88
|
+
_useStorage4 = _slicedToArray(_useStorage3, 2),
|
|
89
|
+
showkr = _useStorage4[0],
|
|
90
|
+
setShowKr = _useStorage4[1];
|
|
91
|
+
|
|
92
|
+
var _useStorage5 = (0, _useStorage13["default"])("searchType", "company"),
|
|
93
|
+
_useStorage6 = _slicedToArray(_useStorage5, 2),
|
|
94
|
+
searchType = _useStorage6[0],
|
|
95
|
+
setSearchType = _useStorage6[1];
|
|
96
|
+
|
|
97
|
+
var _useStorage7 = (0, _useStorage13["default"])("level2Selected", {}),
|
|
98
|
+
_useStorage8 = _slicedToArray(_useStorage7, 2),
|
|
99
|
+
level2Selected = _useStorage8[0],
|
|
100
|
+
setLevel2Selected = _useStorage8[1];
|
|
101
|
+
|
|
102
|
+
var _useStorage9 = (0, _useStorage13["default"])("rootNode", {
|
|
103
|
+
rootId: 0,
|
|
104
|
+
rootName: ""
|
|
105
|
+
}, {
|
|
106
|
+
noLocal: true
|
|
107
|
+
}),
|
|
108
|
+
_useStorage10 = _slicedToArray(_useStorage9, 2),
|
|
109
|
+
rootNode = _useStorage10[0],
|
|
110
|
+
setRootNode = _useStorage10[1];
|
|
111
|
+
|
|
112
|
+
var _useState = (0, _react.useState)(true),
|
|
113
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
114
|
+
exist = _useState2[0],
|
|
115
|
+
setExist = _useState2[1]; // 租户是否有okr
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
var _useState3 = (0, _react.useState)(!!level2Selected.name),
|
|
119
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
120
|
+
hasSubSearch = _useState4[0],
|
|
121
|
+
setHasSubSearch = _useState4[1];
|
|
122
|
+
|
|
123
|
+
var _useState5 = (0, _react.useState)(false),
|
|
124
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
125
|
+
darkTheme = _useState6[0],
|
|
126
|
+
setDarkTheme = _useState6[1];
|
|
127
|
+
|
|
128
|
+
var _useState7 = (0, _react.useState)("horizontal"),
|
|
129
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
130
|
+
direction = _useState8[0],
|
|
131
|
+
setDirection = _useState8[1]; // 默认水平
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
var _useState9 = (0, _react.useState)(false),
|
|
135
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
136
|
+
fullScreen = _useState10[0],
|
|
137
|
+
setFullScreen = _useState10[1]; // 全屏模式状态
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
var _useState11 = (0, _react.useState)({}),
|
|
141
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
142
|
+
selectOkr = _useState12[0],
|
|
143
|
+
setSelectOkr = _useState12[1];
|
|
144
|
+
|
|
145
|
+
var _useState13 = (0, _react.useState)(false),
|
|
146
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
147
|
+
shareDialogVisible = _useState14[0],
|
|
148
|
+
setShareDialogVisible = _useState14[1];
|
|
149
|
+
|
|
150
|
+
var _useState15 = (0, _react.useState)(false),
|
|
151
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
152
|
+
showMask = _useState16[0],
|
|
153
|
+
setShowMask = _useState16[1];
|
|
154
|
+
|
|
155
|
+
var _useStorage11 = (0, _useStorage13["default"])("openLevel", 2),
|
|
156
|
+
_useStorage12 = _slicedToArray(_useStorage11, 2),
|
|
157
|
+
openLevel = _useStorage12[0],
|
|
158
|
+
setOpenLevel = _useStorage12[1];
|
|
159
|
+
|
|
160
|
+
var _useState17 = (0, _react.useState)(false),
|
|
161
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
162
|
+
forceRender = _useState18[0],
|
|
163
|
+
setForceRender = _useState18[1];
|
|
164
|
+
|
|
165
|
+
var okrMapRef = (0, _react.useRef)();
|
|
166
|
+
var okrPage = (0, _react.useRef)();
|
|
167
|
+
(0, _react.useEffect)(function () {
|
|
168
|
+
(0, _requestApis.checkTenantOkrExist)().then(function (res) {
|
|
169
|
+
return setExist(res && res.obj || false);
|
|
170
|
+
});
|
|
171
|
+
}, []);
|
|
172
|
+
(0, _react.useEffect)(function () {
|
|
173
|
+
if (fullScreen) {
|
|
174
|
+
(0, _utils.openFullscreen)();
|
|
175
|
+
} else {
|
|
176
|
+
(0, _utils.closeFullscreen)();
|
|
177
|
+
}
|
|
178
|
+
}, [fullScreen]);
|
|
179
|
+
(0, _react.useEffect)(function () {
|
|
180
|
+
if (searchType == "company") {
|
|
181
|
+
setRootNode({
|
|
182
|
+
rootId: 0,
|
|
183
|
+
rootName: _utils.tenantName
|
|
184
|
+
});
|
|
185
|
+
} else {
|
|
186
|
+
setRootNode(_objectSpread(_objectSpread({}, level2Selected), {}, {
|
|
187
|
+
rootId: level2Selected.id,
|
|
188
|
+
rootName: level2Selected.name
|
|
189
|
+
}));
|
|
190
|
+
}
|
|
191
|
+
}, [searchType, level2Selected]);
|
|
192
|
+
|
|
193
|
+
var onMapActionsHandler = function onMapActionsHandler(iconType) {
|
|
194
|
+
switch (iconType) {
|
|
195
|
+
case "export":
|
|
196
|
+
exportCurrentFlow();
|
|
197
|
+
break;
|
|
198
|
+
|
|
199
|
+
case "share":
|
|
200
|
+
setShareDialogVisible(true);
|
|
201
|
+
break;
|
|
202
|
+
|
|
203
|
+
case "fullscreen":
|
|
204
|
+
// 全屏
|
|
205
|
+
setFullScreen(true);
|
|
206
|
+
break;
|
|
207
|
+
|
|
208
|
+
case "quit-fullscreen":
|
|
209
|
+
// 退出全屏
|
|
210
|
+
setFullScreen(false);
|
|
211
|
+
break;
|
|
212
|
+
|
|
213
|
+
case "horizontal":
|
|
214
|
+
setDirection(iconType);
|
|
215
|
+
setForceRender(true);
|
|
216
|
+
setTimeout(function () {
|
|
217
|
+
return setForceRender(false);
|
|
218
|
+
}, 100);
|
|
219
|
+
break;
|
|
220
|
+
|
|
221
|
+
case "vertical":
|
|
222
|
+
setDirection(iconType);
|
|
223
|
+
setForceRender(true);
|
|
224
|
+
setTimeout(function () {
|
|
225
|
+
return setForceRender(false);
|
|
226
|
+
}, 100);
|
|
227
|
+
break;
|
|
228
|
+
|
|
229
|
+
default:
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
}; // 二级搜索,触发搜索更新值
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
var setLevel2SelectedHandler = function setLevel2SelectedHandler(node) {
|
|
236
|
+
var restAttrs = {}; // 把用户头像带过去
|
|
237
|
+
|
|
238
|
+
if (node.nodeType == "person") {
|
|
239
|
+
restAttrs.avatar = node.data.avatar;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
setLevel2Selected(_objectSpread({
|
|
243
|
+
name: node.title,
|
|
244
|
+
id: node.id
|
|
245
|
+
}, restAttrs));
|
|
246
|
+
}; // 部门、群组、成员,选项切换后执行
|
|
247
|
+
// 初始化二级搜索值
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
var onSearchChangeHandler = function onSearchChangeHandler(iconType) {
|
|
251
|
+
var _window$BSGlobal$logi = window.BSGlobal.loginUserInfo,
|
|
252
|
+
Id = _window$BSGlobal$logi.Id,
|
|
253
|
+
Name = _window$BSGlobal$logi.Name,
|
|
254
|
+
Department = _window$BSGlobal$logi.Department,
|
|
255
|
+
DepartmentId = _window$BSGlobal$logi.DepartmentId,
|
|
256
|
+
UserAvatar = _window$BSGlobal$logi.UserAvatar;
|
|
257
|
+
setSearchType(iconType);
|
|
258
|
+
|
|
259
|
+
switch (iconType) {
|
|
260
|
+
case "company":
|
|
261
|
+
return setHasSubSearch(false);
|
|
262
|
+
|
|
263
|
+
case "depart":
|
|
264
|
+
setLevel2Selected({
|
|
265
|
+
id: DepartmentId,
|
|
266
|
+
name: Department
|
|
267
|
+
});
|
|
268
|
+
break;
|
|
269
|
+
|
|
270
|
+
case "group":
|
|
271
|
+
// 群组的默认显示项为数据列表的第一个节点
|
|
272
|
+
// 清空其他选项值,等待异步回调选中第一个数据
|
|
273
|
+
setLevel2Selected({});
|
|
274
|
+
break;
|
|
275
|
+
|
|
276
|
+
case "user":
|
|
277
|
+
var userAvatar = {
|
|
278
|
+
color: UserAvatar.Color,
|
|
279
|
+
small: UserAvatar.Small,
|
|
280
|
+
hasAvatar: UserAvatar.HasAvatar
|
|
281
|
+
};
|
|
282
|
+
setLevel2Selected({
|
|
283
|
+
id: Id,
|
|
284
|
+
name: Name,
|
|
285
|
+
avatar: userAvatar // 把用户头像带过去
|
|
286
|
+
|
|
287
|
+
});
|
|
288
|
+
break;
|
|
289
|
+
|
|
290
|
+
default:
|
|
291
|
+
break;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
setHasSubSearch(true);
|
|
295
|
+
}; // 导出图片
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
var exportCurrentFlow = function exportCurrentFlow() {
|
|
299
|
+
okrMapRef.current.exportCurrentFlow();
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
var onKrPushUpdateKr = /*#__PURE__*/function () {
|
|
303
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(data) {
|
|
304
|
+
var workMileStoneId, workId;
|
|
305
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
306
|
+
while (1) {
|
|
307
|
+
switch (_context.prev = _context.next) {
|
|
308
|
+
case 0:
|
|
309
|
+
workMileStoneId = selectOkr && selectOkr.workId;
|
|
310
|
+
workId = selectOkr && selectOkr.parentId;
|
|
311
|
+
(0, _requestApis.onUpdateKr)({
|
|
312
|
+
workId: workId,
|
|
313
|
+
workMileStoneId: workMileStoneId,
|
|
314
|
+
mileStoneName: data
|
|
315
|
+
}).then(function (res) {});
|
|
316
|
+
|
|
317
|
+
case 3:
|
|
318
|
+
case "end":
|
|
319
|
+
return _context.stop();
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}, _callee);
|
|
323
|
+
}));
|
|
324
|
+
|
|
325
|
+
return function onKrPushUpdateKr(_x) {
|
|
326
|
+
return _ref.apply(this, arguments);
|
|
327
|
+
};
|
|
328
|
+
}();
|
|
329
|
+
|
|
330
|
+
var onKrPushChange = function onKrPushChange(name, value, id) {
|
|
331
|
+
var data = {};
|
|
332
|
+
|
|
333
|
+
if (name == "user") {
|
|
334
|
+
var avatar = {};
|
|
335
|
+
|
|
336
|
+
for (var key in value.UserAvatar) {
|
|
337
|
+
avatar[key[0].toLocaleLowerCase() + key.substring(1)] = value.UserAvatar[key];
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
data = {
|
|
341
|
+
user: {
|
|
342
|
+
avatar: avatar,
|
|
343
|
+
name: value.Name,
|
|
344
|
+
userId: value.Id
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
} else if (name == "date") {
|
|
348
|
+
data = {
|
|
349
|
+
startDate: value.startDate,
|
|
350
|
+
endDate: value.endDate
|
|
351
|
+
};
|
|
352
|
+
} else if (name == "progress") {
|
|
353
|
+
data = {
|
|
354
|
+
progress: value
|
|
355
|
+
};
|
|
356
|
+
} else if (name == "mileStoneName") {
|
|
357
|
+
data = {
|
|
358
|
+
mileStoneName: value
|
|
359
|
+
};
|
|
360
|
+
} else {
|
|
361
|
+
return;
|
|
362
|
+
} // 回写修改后的数据 进 OKR 地图组件
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
okrMapRef.current.updateNodeData({
|
|
366
|
+
data: data,
|
|
367
|
+
id: id
|
|
368
|
+
});
|
|
369
|
+
}; // 点击OKR地图节点后,打开推屏
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
var onNodeClickHandler = function onNodeClickHandler(node) {
|
|
373
|
+
var modelType = node.modelType,
|
|
374
|
+
data = node.data;
|
|
375
|
+
|
|
376
|
+
if (modelType == "work") {
|
|
377
|
+
_drawerManager["default"].open("okrDetail", {
|
|
378
|
+
okrId: data.workId
|
|
379
|
+
});
|
|
380
|
+
} else if (modelType == "kr") {
|
|
381
|
+
if (!data.mapkrVisible) return;
|
|
382
|
+
setSelectOkr(_objectSpread(_objectSpread({}, data), {}, {
|
|
383
|
+
workId: data.mileStoneId,
|
|
384
|
+
workName: data.mileStoneName,
|
|
385
|
+
progress: data.progress,
|
|
386
|
+
modelType: 2,
|
|
387
|
+
parentId: data.workId,
|
|
388
|
+
startData: data.startDate,
|
|
389
|
+
endData: data.endDate,
|
|
390
|
+
parentKrId: 0,
|
|
391
|
+
workCounter: {
|
|
392
|
+
subTotal: data.counter.workTotal
|
|
393
|
+
},
|
|
394
|
+
krTotal: 0,
|
|
395
|
+
principalUser: data.user
|
|
396
|
+
}));
|
|
397
|
+
|
|
398
|
+
_drawerManager["default"].open("krDetail", {
|
|
399
|
+
krId: data.mileStoneId
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
}; // 删除节点,回写给OKR地图组件
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
var onKrDelete = function onKrDelete(_ref2) {
|
|
406
|
+
var id = _ref2.id;
|
|
407
|
+
okrMapRef.current.deleteNode({
|
|
408
|
+
id: id
|
|
409
|
+
});
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
var onHideHandler = function onHideHandler() {
|
|
413
|
+
setShowMask(false);
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
var onShowHandler = function onShowHandler() {
|
|
417
|
+
setShowMask(true);
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
return /*#__PURE__*/_react["default"].createElement(_unsupportIe["default"], null, function (OkrSearchPanel) {
|
|
421
|
+
var _classNames;
|
|
422
|
+
|
|
423
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
424
|
+
className: (0, _classnames["default"])((_classNames = {}, _defineProperty(_classNames, "".concat(_precls["default"], "__dark"), darkTheme), _defineProperty(_classNames, "".concat(_precls["default"], "__fullscreen"), fullScreen), _classNames))
|
|
425
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
426
|
+
className: (0, _classnames["default"])(_precls["default"]),
|
|
427
|
+
ref: okrPage
|
|
428
|
+
}, /*#__PURE__*/_react["default"].createElement(_header["default"], {
|
|
429
|
+
onBtnClick: onMapActionsHandler,
|
|
430
|
+
onShowKrClick: function onShowKrClick(val) {
|
|
431
|
+
return setShowKr(val);
|
|
432
|
+
},
|
|
433
|
+
onSearchChange: onSearchChangeHandler,
|
|
434
|
+
onPeriodChange: function onPeriodChange(period) {
|
|
435
|
+
return setPeriod(period);
|
|
436
|
+
},
|
|
437
|
+
onThemeChange: function onThemeChange() {
|
|
438
|
+
return setDarkTheme(!darkTheme);
|
|
439
|
+
},
|
|
440
|
+
onLevelChange: function onLevelChange(level) {
|
|
441
|
+
return setOpenLevel(level);
|
|
442
|
+
},
|
|
443
|
+
openLevel: openLevel,
|
|
444
|
+
searchType: searchType,
|
|
445
|
+
fullScreen: fullScreen,
|
|
446
|
+
darkTheme: darkTheme,
|
|
447
|
+
direction: direction,
|
|
448
|
+
showkr: showkr,
|
|
449
|
+
period: period
|
|
450
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
451
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__content"))
|
|
452
|
+
}, function () {
|
|
453
|
+
// 根据选择的搜索类型不同,show出不同的组件
|
|
454
|
+
if (!hasSubSearch) return undefined;
|
|
455
|
+
if (searchType == "company") return undefined;
|
|
456
|
+
return /*#__PURE__*/_react["default"].createElement(_level2Search["default"], {
|
|
457
|
+
key: searchType,
|
|
458
|
+
type: searchType,
|
|
459
|
+
searchType: searchType,
|
|
460
|
+
selected: level2Selected,
|
|
461
|
+
setSelected: setLevel2SelectedHandler
|
|
462
|
+
});
|
|
463
|
+
}(), function () {
|
|
464
|
+
if (forceRender) {
|
|
465
|
+
return /*#__PURE__*/_react["default"].createElement("span", null);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
if (exist) {
|
|
469
|
+
return /*#__PURE__*/_react["default"].createElement(OkrSearchPanel, _extends({
|
|
470
|
+
ref: okrMapRef,
|
|
471
|
+
showkr: showkr,
|
|
472
|
+
direction: direction,
|
|
473
|
+
darkTheme: darkTheme,
|
|
474
|
+
openLevel: openLevel,
|
|
475
|
+
searchType: searchType,
|
|
476
|
+
onNodeClick: onNodeClickHandler
|
|
477
|
+
}, period, rootNode, {
|
|
478
|
+
okrType: _utils.okrTypeMap[searchType]
|
|
479
|
+
}));
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
return /*#__PURE__*/_react["default"].createElement(_noOkr["default"], null);
|
|
483
|
+
}(), showMask && /*#__PURE__*/_react["default"].createElement("div", {
|
|
484
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__content-mask"))
|
|
485
|
+
})), /*#__PURE__*/_react["default"].createElement(_shareDialog["default"], {
|
|
486
|
+
visible: shareDialogVisible,
|
|
487
|
+
setVisible: setShareDialogVisible,
|
|
488
|
+
period: period,
|
|
489
|
+
showkr: showkr,
|
|
490
|
+
rootNode: rootNode,
|
|
491
|
+
darkTheme: darkTheme,
|
|
492
|
+
direction: direction,
|
|
493
|
+
searchType: searchType,
|
|
494
|
+
level2Selected: level2Selected
|
|
495
|
+
})));
|
|
496
|
+
});
|
|
497
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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"] = _default;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _iconButtonList = _interopRequireDefault(require("../../../../../components/icon-button-list"));
|
|
15
|
+
|
|
16
|
+
var _switch = _interopRequireDefault(require("../../../../../components/switch"));
|
|
17
|
+
|
|
18
|
+
var _getLocale = require("../../../../../utils/getLocale");
|
|
19
|
+
|
|
20
|
+
var _precls = _interopRequireDefault(require("../../../precls"));
|
|
21
|
+
|
|
22
|
+
require("./index.scss");
|
|
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 _default(props) {
|
|
31
|
+
var setDarkTheme = props.setDarkTheme,
|
|
32
|
+
darkTheme = props.darkTheme,
|
|
33
|
+
showkr = props.showkr,
|
|
34
|
+
setShowKr = props.setShowKr,
|
|
35
|
+
setDirection = props.setDirection,
|
|
36
|
+
onBtnClick = props.onBtnClick,
|
|
37
|
+
direction = props.direction;
|
|
38
|
+
var period = {};
|
|
39
|
+
var iconButtons = [{
|
|
40
|
+
icon: "export",
|
|
41
|
+
overlay: (0, _getLocale.getLocale)("Mod_Export")
|
|
42
|
+
}, {
|
|
43
|
+
icon: direction == "horizontal" ? "vertical" : "horizontal",
|
|
44
|
+
overlay: direction == "horizontal" ? "".concat((0, _getLocale.getLocale)("OKR_Ali_Butt_Toggleportrait")) : "".concat((0, _getLocale.getLocale)("OKR_Ali_Butt_Togglelandscape"))
|
|
45
|
+
}]; // 获取地图数据
|
|
46
|
+
|
|
47
|
+
(0, _react.useEffect)(function () {// ...
|
|
48
|
+
}, []);
|
|
49
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
50
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "-share-okr__header"))
|
|
51
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
52
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "-share-okr__header-title"))
|
|
53
|
+
}, (0, _getLocale.getLocale)("OKR_Menu_Title_Alignment")), /*#__PURE__*/_react["default"].createElement("span", {
|
|
54
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "-share-okr__header-showkr"))
|
|
55
|
+
}, /*#__PURE__*/_react["default"].createElement(_switch["default"], {
|
|
56
|
+
label: (0, _getLocale.getLocale)("OKR_Ali_Butt_ExhibitionKRs"),
|
|
57
|
+
checked: showkr,
|
|
58
|
+
onChange: function onChange(checked) {
|
|
59
|
+
return setShowKr(checked);
|
|
60
|
+
}
|
|
61
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
62
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "-share-okr__header-direction"))
|
|
63
|
+
}, /*#__PURE__*/_react["default"].createElement(_iconButtonList["default"], {
|
|
64
|
+
items: iconButtons,
|
|
65
|
+
onClick: function onClick(e, iconType) {
|
|
66
|
+
return onBtnClick(iconType);
|
|
67
|
+
}
|
|
68
|
+
})));
|
|
69
|
+
}
|