@titaui/pc 1.11.2 → 1.11.4-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/button/icon-btn/index.js +17 -8
- 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/drop-selector/index.js +25 -10
- package/lib/components/dynamic/constant.js +31 -31
- package/lib/components/dynamic/dynamic-item/dynamic-interview/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +36 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +51 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +53 -0
- package/lib/components/dynamic/dynamic-item/index.js +40 -32
- 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/form/form-fields/date/index.css +24 -0
- package/lib/components/form/form-fields/date/index.js +98 -0
- package/lib/components/form/form-fields/user/index.css +1 -1
- package/lib/components/form/index.js +10 -3
- package/lib/components/mblog/components/MblogAction.js +3 -3
- package/lib/components/menus/export-modules/interview-menus/constant.js +30 -0
- package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +63 -0
- package/lib/components/menus/export-modules/interview-menus/index.js +126 -0
- package/lib/components/menus/index.js +11 -5
- 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 +1 -1
- 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 +42 -0
- package/lib/components/picker/components/picker-trigger/index.js +94 -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 +132 -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/time-picker/index.css +117 -0
- package/lib/components/time-picker/index.js +13 -0
- package/lib/components/time-picker/time-picker-selector.js +138 -0
- package/lib/components/time-picker/time-picker.js +324 -0
- package/lib/components/time-picker/timer-picker-input.js +94 -0
- package/lib/components/time-picker/utils.js +52 -0
- 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 +16 -0
- package/lib/pages/aha2021/index.js +5 -1
- package/lib/utils/hooks.js +72 -0
- package/package.json +1 -1
- package/yarn-error.log +21252 -0
package/es/utils/auth.js
ADDED
|
@@ -0,0 +1,294 @@
|
|
|
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.hasSuperior = exports.OAuth = exports.KRAuth = exports.EAuth = exports.DynamicManagerAuth = exports.ChildAuth = exports.BaseAuth = void 0;
|
|
9
|
+
|
|
10
|
+
var _bsGlobal = require("./bs-global");
|
|
11
|
+
|
|
12
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
13
|
+
|
|
14
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
15
|
+
|
|
16
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
17
|
+
|
|
18
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
19
|
+
|
|
20
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
21
|
+
|
|
22
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23
|
+
|
|
24
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
25
|
+
|
|
26
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27
|
+
|
|
28
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
29
|
+
|
|
30
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
31
|
+
|
|
32
|
+
var BaseAuth = /*#__PURE__*/function () {
|
|
33
|
+
function BaseAuth() {
|
|
34
|
+
_classCallCheck(this, BaseAuth);
|
|
35
|
+
|
|
36
|
+
this.loginUserInfor = (0, _bsGlobal.getBSGlobal)("loginUserInfo");
|
|
37
|
+
} // 老板
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
_createClass(BaseAuth, [{
|
|
41
|
+
key: "isBoss",
|
|
42
|
+
value: function isBoss() {
|
|
43
|
+
// console.log('isboss', this.loginUserInfor.IsBoss)
|
|
44
|
+
return this.loginUserInfor.IsBoss;
|
|
45
|
+
} // 超管、助理、目标管理员
|
|
46
|
+
|
|
47
|
+
}, {
|
|
48
|
+
key: "isManager",
|
|
49
|
+
value: function isManager() {
|
|
50
|
+
// console.log('ismanager', this.loginUserInfor.IsOkrManager)
|
|
51
|
+
return this.loginUserInfor.IsOkrManager;
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
key: "isDepartmentLeader",
|
|
55
|
+
value: function isDepartmentLeader() {
|
|
56
|
+
return !this.loginUserInfor.IsBoss && this.loginUserInfor.IsLeader;
|
|
57
|
+
}
|
|
58
|
+
}]);
|
|
59
|
+
|
|
60
|
+
return BaseAuth;
|
|
61
|
+
}();
|
|
62
|
+
|
|
63
|
+
exports.BaseAuth = BaseAuth;
|
|
64
|
+
|
|
65
|
+
var OAuth = /*#__PURE__*/function (_BaseAuth) {
|
|
66
|
+
_inherits(OAuth, _BaseAuth);
|
|
67
|
+
|
|
68
|
+
var _super = _createSuper(OAuth);
|
|
69
|
+
|
|
70
|
+
function OAuth(props) {
|
|
71
|
+
var _this;
|
|
72
|
+
|
|
73
|
+
_classCallCheck(this, OAuth);
|
|
74
|
+
|
|
75
|
+
_this = _super.call(this, props);
|
|
76
|
+
var principalUser = props.principalUser,
|
|
77
|
+
createUserId = props.createUserId;
|
|
78
|
+
_this.userId = _this.loginUserInfor.Id;
|
|
79
|
+
_this.principalUser = principalUser;
|
|
80
|
+
_this.createUserId = createUserId;
|
|
81
|
+
return _this;
|
|
82
|
+
} // 創建人、發起人
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
_createClass(OAuth, [{
|
|
86
|
+
key: "isCreater",
|
|
87
|
+
value: function isCreater() {
|
|
88
|
+
// console.log('o iscreater', this.userId, this.createUserId)
|
|
89
|
+
return this.userId == this.createUserId;
|
|
90
|
+
} // 負責人
|
|
91
|
+
|
|
92
|
+
}, {
|
|
93
|
+
key: "isPrincipalUser",
|
|
94
|
+
value: function isPrincipalUser() {
|
|
95
|
+
var _this$principalUser;
|
|
96
|
+
|
|
97
|
+
// console.log('o isp', this.userId, this.principalUser.userId)
|
|
98
|
+
return this.userId == ((_this$principalUser = this.principalUser) === null || _this$principalUser === void 0 ? void 0 : _this$principalUser.userId);
|
|
99
|
+
} // 有操作OKR的權限
|
|
100
|
+
|
|
101
|
+
}, {
|
|
102
|
+
key: "hasAuth",
|
|
103
|
+
value: function hasAuth() {
|
|
104
|
+
return this.isBoss() || this.isManager() || this.isCreater() || this.isPrincipalUser();
|
|
105
|
+
}
|
|
106
|
+
}]);
|
|
107
|
+
|
|
108
|
+
return OAuth;
|
|
109
|
+
}(BaseAuth);
|
|
110
|
+
|
|
111
|
+
exports.OAuth = OAuth;
|
|
112
|
+
|
|
113
|
+
var KRAuth = /*#__PURE__*/function (_BaseAuth2) {
|
|
114
|
+
_inherits(KRAuth, _BaseAuth2);
|
|
115
|
+
|
|
116
|
+
var _super2 = _createSuper(KRAuth);
|
|
117
|
+
|
|
118
|
+
function KRAuth(props) {
|
|
119
|
+
var _this2;
|
|
120
|
+
|
|
121
|
+
_classCallCheck(this, KRAuth);
|
|
122
|
+
|
|
123
|
+
_this2 = _super2.call(this, props);
|
|
124
|
+
var user = props.user,
|
|
125
|
+
createUserId = props.createUserId;
|
|
126
|
+
_this2.loginUserInfor = (0, _bsGlobal.getBSGlobal)("loginUserInfo");
|
|
127
|
+
_this2.userId = _this2.loginUserInfor.Id;
|
|
128
|
+
_this2.user = user;
|
|
129
|
+
_this2.createUserId = createUserId;
|
|
130
|
+
return _this2;
|
|
131
|
+
} // 創建人、發起人
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
_createClass(KRAuth, [{
|
|
135
|
+
key: "isCreater",
|
|
136
|
+
value: function isCreater() {
|
|
137
|
+
// console.log('kr iscreater', this.userId, this.createUserId)
|
|
138
|
+
return this.userId == this.createUserId;
|
|
139
|
+
} // 負責人
|
|
140
|
+
|
|
141
|
+
}, {
|
|
142
|
+
key: "isPrincipalUser",
|
|
143
|
+
value: function isPrincipalUser() {
|
|
144
|
+
var _this$user;
|
|
145
|
+
|
|
146
|
+
// console.log('kr isp', this.userId, this.user.userId)
|
|
147
|
+
return this.userId == ((_this$user = this.user) === null || _this$user === void 0 ? void 0 : _this$user.userId);
|
|
148
|
+
} // 有操作KR的權限
|
|
149
|
+
|
|
150
|
+
}, {
|
|
151
|
+
key: "hasAuth",
|
|
152
|
+
value: function hasAuth() {
|
|
153
|
+
return this.isBoss() || this.isManager() || this.isCreater() || this.isPrincipalUser();
|
|
154
|
+
}
|
|
155
|
+
}]);
|
|
156
|
+
|
|
157
|
+
return KRAuth;
|
|
158
|
+
}(BaseAuth);
|
|
159
|
+
|
|
160
|
+
exports.KRAuth = KRAuth;
|
|
161
|
+
|
|
162
|
+
var EAuth = /*#__PURE__*/function (_BaseAuth3) {
|
|
163
|
+
_inherits(EAuth, _BaseAuth3);
|
|
164
|
+
|
|
165
|
+
var _super3 = _createSuper(EAuth);
|
|
166
|
+
|
|
167
|
+
function EAuth(props) {
|
|
168
|
+
var _this3;
|
|
169
|
+
|
|
170
|
+
_classCallCheck(this, EAuth);
|
|
171
|
+
|
|
172
|
+
_this3 = _super3.call(this, props);
|
|
173
|
+
var principalUser = props.principalUser,
|
|
174
|
+
user = props.user;
|
|
175
|
+
_this3.userId = _this3.loginUserInfor.Id;
|
|
176
|
+
_this3.principalUser = principalUser;
|
|
177
|
+
_this3.user = user;
|
|
178
|
+
return _this3;
|
|
179
|
+
} // 創建人、發起人
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
_createClass(EAuth, [{
|
|
183
|
+
key: "isCreater",
|
|
184
|
+
value: function isCreater() {
|
|
185
|
+
var _this$user2;
|
|
186
|
+
|
|
187
|
+
// console.log('e iscreater', this.userId, this.user.userId)
|
|
188
|
+
return this.userId == ((_this$user2 = this.user) === null || _this$user2 === void 0 ? void 0 : _this$user2.userId);
|
|
189
|
+
} // 負責人
|
|
190
|
+
|
|
191
|
+
}, {
|
|
192
|
+
key: "isPrincipalUser",
|
|
193
|
+
value: function isPrincipalUser() {
|
|
194
|
+
var _this$principalUser2;
|
|
195
|
+
|
|
196
|
+
// console.log('e isp', this.userId, this.principalUser.userId)
|
|
197
|
+
return this.userId == ((_this$principalUser2 = this.principalUser) === null || _this$principalUser2 === void 0 ? void 0 : _this$principalUser2.userId);
|
|
198
|
+
} // 有操作KR的權限
|
|
199
|
+
|
|
200
|
+
}, {
|
|
201
|
+
key: "hasAuth",
|
|
202
|
+
value: function hasAuth() {
|
|
203
|
+
return this.isBoss() || this.isManager() || this.isCreater() || this.isPrincipalUser();
|
|
204
|
+
}
|
|
205
|
+
}]);
|
|
206
|
+
|
|
207
|
+
return EAuth;
|
|
208
|
+
}(BaseAuth); // 是否有上级
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
exports.EAuth = EAuth;
|
|
212
|
+
|
|
213
|
+
var hasSuperior = function hasSuperior() {
|
|
214
|
+
return !!(0, _bsGlobal.getBSGlobal)("loginUserInfo").ManagerId;
|
|
215
|
+
}; // 动态和项目文件管理权限
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
exports.hasSuperior = hasSuperior;
|
|
219
|
+
|
|
220
|
+
var DynamicManagerAuth = /*#__PURE__*/function (_BaseAuth4) {
|
|
221
|
+
_inherits(DynamicManagerAuth, _BaseAuth4);
|
|
222
|
+
|
|
223
|
+
var _super4 = _createSuper(DynamicManagerAuth);
|
|
224
|
+
|
|
225
|
+
function DynamicManagerAuth(props) {
|
|
226
|
+
var _this4;
|
|
227
|
+
|
|
228
|
+
_classCallCheck(this, DynamicManagerAuth);
|
|
229
|
+
|
|
230
|
+
_this4 = _super4.call(this, props);
|
|
231
|
+
_this4.isDynamicManager = (0, _bsGlobal.getBSGlobal)("loginUserInfo").IsFeedAndFileManager;
|
|
232
|
+
_this4.isLeader = (0, _bsGlobal.getBSGlobal)("loginUserInfo").IsLeader;
|
|
233
|
+
return _this4;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
_createClass(DynamicManagerAuth, [{
|
|
237
|
+
key: "hasAuth",
|
|
238
|
+
value: function hasAuth() {
|
|
239
|
+
return this.isBoss() || this.isManager() || this.isDynamicManager;
|
|
240
|
+
} // 部门负责人、超管、助理、老板及动态管理员:有进入详情页的入口
|
|
241
|
+
|
|
242
|
+
}, {
|
|
243
|
+
key: "hasPraiseAuth",
|
|
244
|
+
value: function hasPraiseAuth() {
|
|
245
|
+
return this.isBoss() || this.isManager() || this.isDynamicManager || this.isLeader;
|
|
246
|
+
}
|
|
247
|
+
}, {
|
|
248
|
+
key: "isOnlyLeader",
|
|
249
|
+
value: function isOnlyLeader() {
|
|
250
|
+
return !this.isBoss() && !this.isManager() && !this.isDynamicManager && this.isLeader;
|
|
251
|
+
}
|
|
252
|
+
}]);
|
|
253
|
+
|
|
254
|
+
return DynamicManagerAuth;
|
|
255
|
+
}(BaseAuth);
|
|
256
|
+
|
|
257
|
+
exports.DynamicManagerAuth = DynamicManagerAuth;
|
|
258
|
+
|
|
259
|
+
var ChildAuth = /*#__PURE__*/function (_BaseAuth5) {
|
|
260
|
+
_inherits(ChildAuth, _BaseAuth5);
|
|
261
|
+
|
|
262
|
+
var _super5 = _createSuper(ChildAuth);
|
|
263
|
+
|
|
264
|
+
function ChildAuth(props) {
|
|
265
|
+
var _this5;
|
|
266
|
+
|
|
267
|
+
_classCallCheck(this, ChildAuth);
|
|
268
|
+
|
|
269
|
+
_this5 = _super5.call(this, props);
|
|
270
|
+
var principalUser = props.principalUser;
|
|
271
|
+
_this5.userId = _this5.loginUserInfor.Id;
|
|
272
|
+
_this5.principalUser = principalUser;
|
|
273
|
+
return _this5;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
_createClass(ChildAuth, [{
|
|
277
|
+
key: "isPrincipalUser",
|
|
278
|
+
value: function isPrincipalUser() {
|
|
279
|
+
var _this$principalUser3;
|
|
280
|
+
|
|
281
|
+
return this.userId == ((_this$principalUser3 = this.principalUser) === null || _this$principalUser3 === void 0 ? void 0 : _this$principalUser3.userId);
|
|
282
|
+
} // 超管、助理、目标管理员以及目标负责人可以修改此目标下对齐子目标的权重;
|
|
283
|
+
|
|
284
|
+
}, {
|
|
285
|
+
key: "hasAuth",
|
|
286
|
+
value: function hasAuth() {
|
|
287
|
+
return this.isManager() || this.isPrincipalUser();
|
|
288
|
+
}
|
|
289
|
+
}]);
|
|
290
|
+
|
|
291
|
+
return ChildAuth;
|
|
292
|
+
}(BaseAuth);
|
|
293
|
+
|
|
294
|
+
exports.ChildAuth = ChildAuth;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.hasWebHead = exports.getVersion = exports.getUserInfo = exports.getUploadMaxSize = exports.getTenantInfo = exports.getSource = exports.getOkrAdvancedSetting = exports.getBSGlobal = exports.getAppHead = exports.formatNum = exports["default"] = void 0;
|
|
7
|
+
exports.isWx = isWx;
|
|
8
|
+
|
|
9
|
+
var getUserInfo = function getUserInfo() {
|
|
10
|
+
return window.BSGlobal && window.BSGlobal.loginUserInfo;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
exports.getUserInfo = getUserInfo;
|
|
14
|
+
|
|
15
|
+
var getTenantInfo = function getTenantInfo() {
|
|
16
|
+
return window.BSGlobal && window.BSGlobal.tenantInfo;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
exports.getTenantInfo = getTenantInfo;
|
|
20
|
+
|
|
21
|
+
var getBSGlobal = function getBSGlobal(key) {
|
|
22
|
+
return window.BSGlobal && window.BSGlobal[key];
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
exports.getBSGlobal = getBSGlobal;
|
|
26
|
+
|
|
27
|
+
var getOkrAdvancedSetting = function getOkrAdvancedSetting() {
|
|
28
|
+
return window.BSGlobal.OkrAdvancedSetting;
|
|
29
|
+
}; // version 1 试用版
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
exports.getOkrAdvancedSetting = getOkrAdvancedSetting;
|
|
33
|
+
|
|
34
|
+
var getVersion = function getVersion() {
|
|
35
|
+
return window.BSGlobal.tenantAuthentication.Version;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
exports.getVersion = getVersion;
|
|
39
|
+
|
|
40
|
+
var getSource = function getSource() {
|
|
41
|
+
var info = getBSGlobal("tenantInfo");
|
|
42
|
+
return info.Source;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
exports.getSource = getSource;
|
|
46
|
+
|
|
47
|
+
var getUploadMaxSize = function getUploadMaxSize() {
|
|
48
|
+
var info = getBSGlobal("tenantInfo");
|
|
49
|
+
if (info.Id === 352728) return 150;
|
|
50
|
+
var isDingDing = info.Source === 861;
|
|
51
|
+
var isDingZhi = window.dingZhiSize && window.dingZhiSize.indexOf(info.Id) !== -1;
|
|
52
|
+
if (isDingDing) return 20;
|
|
53
|
+
if (isDingZhi) return 100;
|
|
54
|
+
return 50;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
exports.getUploadMaxSize = getUploadMaxSize;
|
|
58
|
+
|
|
59
|
+
function isWx() {
|
|
60
|
+
return getTenantInfo().Source === 860 && getTenantInfo().corpCreateType !== 2;
|
|
61
|
+
}
|
|
62
|
+
/*
|
|
63
|
+
*通过AppId,来查询是否开通这个产品
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
var getAppHead = function getAppHead(appId) {
|
|
68
|
+
var appHead = getBSGlobal("WebHead");
|
|
69
|
+
var apps = getBSGlobal("apps");
|
|
70
|
+
if (!appHead && apps) return undefined;
|
|
71
|
+
var app = appHead && appHead.AppHead || apps && apps || [];
|
|
72
|
+
var appItem = app.find(function (item) {
|
|
73
|
+
return item.AppId === appId;
|
|
74
|
+
});
|
|
75
|
+
return appItem;
|
|
76
|
+
}; // number初始化成k、w
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
exports.getAppHead = getAppHead;
|
|
80
|
+
|
|
81
|
+
var formatNum = function formatNum(num) {
|
|
82
|
+
if (num < 1e3) {
|
|
83
|
+
return num;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (num >= 1e3 && num < 1e4) {
|
|
87
|
+
return "".concat((num / 1e3).toFixed(1), "k");
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return "".concat((num / 1e4).toFixed(1), "w");
|
|
91
|
+
}; // 看是否有okr 任务 项目等等等东西
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
exports.formatNum = formatNum;
|
|
95
|
+
|
|
96
|
+
var hasWebHead = function hasWebHead(webHeadName) {
|
|
97
|
+
var webHeadMap = {
|
|
98
|
+
task: '1',
|
|
99
|
+
okr: '113',
|
|
100
|
+
project: '112',
|
|
101
|
+
apply: '907',
|
|
102
|
+
kaohe: '403'
|
|
103
|
+
};
|
|
104
|
+
var webHead = window.BSGlobal.WebHead.AppHead;
|
|
105
|
+
return webHead.findIndex(function (a) {
|
|
106
|
+
return a.AppId === webHeadMap[webHeadName];
|
|
107
|
+
}) !== -1;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
exports.hasWebHead = hasWebHead;
|
|
111
|
+
var _default = {
|
|
112
|
+
hasWebHead: hasWebHead
|
|
113
|
+
};
|
|
114
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.LocalStorage = void 0;
|
|
7
|
+
|
|
8
|
+
var _bsGlobal = require("./bs-global");
|
|
9
|
+
|
|
10
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
|
+
|
|
12
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
13
|
+
|
|
14
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
15
|
+
|
|
16
|
+
var LocalStorage = /*#__PURE__*/function () {
|
|
17
|
+
function LocalStorage() {
|
|
18
|
+
_classCallCheck(this, LocalStorage);
|
|
19
|
+
|
|
20
|
+
this.userId = (0, _bsGlobal.getUserInfo)().Id;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
_createClass(LocalStorage, [{
|
|
24
|
+
key: "setItem",
|
|
25
|
+
value: function setItem(name, value) {
|
|
26
|
+
window.localStorage.setItem("".concat(name, "__").concat(this.userId), JSON.stringify(value));
|
|
27
|
+
}
|
|
28
|
+
}, {
|
|
29
|
+
key: "getItem",
|
|
30
|
+
value: function getItem(name) {
|
|
31
|
+
var data = window.localStorage.getItem("".concat(name, "__").concat(this.userId));
|
|
32
|
+
data = JSON.parse(data);
|
|
33
|
+
return data;
|
|
34
|
+
}
|
|
35
|
+
}]);
|
|
36
|
+
|
|
37
|
+
return LocalStorage;
|
|
38
|
+
}();
|
|
39
|
+
|
|
40
|
+
exports.LocalStorage = LocalStorage;
|
|
41
|
+
var _default = LocalStorage;
|
|
42
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.htmlDecodeByRegExp = htmlDecodeByRegExp;
|
|
7
|
+
exports.htmlEncodeByRegExp = htmlEncodeByRegExp;
|
|
8
|
+
|
|
9
|
+
// html标签转义
|
|
10
|
+
function htmlEncodeByRegExp(str) {
|
|
11
|
+
var temp = "";
|
|
12
|
+
if (str.length == 0) return "";
|
|
13
|
+
temp = str.replace(/</g, "<");
|
|
14
|
+
temp = temp.replace(/>/g, ">");
|
|
15
|
+
temp = temp.replace(/\'/g, "'");
|
|
16
|
+
temp = temp.replace(/\"/g, """);
|
|
17
|
+
temp = temp.replace(/\n/g, "<br/>");
|
|
18
|
+
temp = temp.replace(/\+/g, "+");
|
|
19
|
+
return temp;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function htmlDecodeByRegExp(str) {
|
|
23
|
+
var temp = "";
|
|
24
|
+
if (str.length == 0) return "";
|
|
25
|
+
temp = str.replace(/&/g, "&");
|
|
26
|
+
temp = temp.replace(/</g, "<");
|
|
27
|
+
temp = temp.replace(/>/g, ">");
|
|
28
|
+
temp = temp.replace(/ /g, " ");
|
|
29
|
+
temp = temp.replace(/'/g, "'");
|
|
30
|
+
temp = temp.replace(/"/g, "\"");
|
|
31
|
+
temp = temp.replace(/+/g, "+");
|
|
32
|
+
return temp;
|
|
33
|
+
}
|