@titaui/pc 1.11.4-0 → 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/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/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 +23 -17
- package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +5 -5
- package/lib/components/menus/export-modules/interview-menus/index.js +1 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
- 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/picker-trigger/index.css +16 -0
- package/lib/components/picker/components/picker-trigger/index.js +18 -9
- package/lib/components/picker/picker-panels.js +1 -1
- package/lib/components/picker/picker.js +12 -13
- 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 +18 -0
- package/lib/components/time-picker/time-picker-selector.js +8 -12
- package/lib/components/time-picker/time-picker.js +117 -100
- package/lib/components/time-picker/utils.js +13 -2
- 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/package.json +1 -1
- package/yarn-error.log +5424 -6356
|
@@ -0,0 +1,273 @@
|
|
|
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 _reactDom = require("react-dom");
|
|
13
|
+
|
|
14
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
15
|
+
|
|
16
|
+
var _dateRangePicker = _interopRequireDefault(require("../date-range-picker"));
|
|
17
|
+
|
|
18
|
+
var _popup = _interopRequireDefault(require("../popup"));
|
|
19
|
+
|
|
20
|
+
require("./index.scss");
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
+
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
28
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
33
|
+
|
|
34
|
+
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); } }
|
|
35
|
+
|
|
36
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
37
|
+
|
|
38
|
+
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); }
|
|
39
|
+
|
|
40
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
41
|
+
|
|
42
|
+
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); }; }
|
|
43
|
+
|
|
44
|
+
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); }
|
|
45
|
+
|
|
46
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
47
|
+
|
|
48
|
+
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; } }
|
|
49
|
+
|
|
50
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
51
|
+
|
|
52
|
+
var trigger = {
|
|
53
|
+
onClick: "click",
|
|
54
|
+
onMouseDown: "mousedonwn",
|
|
55
|
+
onMouseUp: "mouseup"
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
var RangePickerPop = /*#__PURE__*/function (_Component) {
|
|
59
|
+
_inherits(RangePickerPop, _Component);
|
|
60
|
+
|
|
61
|
+
var _super = _createSuper(RangePickerPop);
|
|
62
|
+
|
|
63
|
+
function RangePickerPop(p) {
|
|
64
|
+
var _this;
|
|
65
|
+
|
|
66
|
+
_classCallCheck(this, RangePickerPop);
|
|
67
|
+
|
|
68
|
+
_this = _super.call(this, p);
|
|
69
|
+
|
|
70
|
+
_this.handleSelect = function (range) {
|
|
71
|
+
_this.setState(range);
|
|
72
|
+
|
|
73
|
+
_this.props.onSelect && _this.props.onSelect();
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
_this.getDate = function (format) {
|
|
77
|
+
var _this$state = _this.state,
|
|
78
|
+
startDate = _this$state.startDate,
|
|
79
|
+
endDate = _this$state.endDate;
|
|
80
|
+
|
|
81
|
+
if (format) {
|
|
82
|
+
return {
|
|
83
|
+
startDate: startDate.format(_this.props.format),
|
|
84
|
+
endDate: endDate.format(_this.props.format)
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
startDate: (0, _moment["default"])(startDate).toDate(),
|
|
90
|
+
endDate: (0, _moment["default"])(endDate).toDate()
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
_this.handleClick = function (e) {
|
|
95
|
+
if (_this.props.triggerStop) e.stopPropagation();
|
|
96
|
+
|
|
97
|
+
if (_this.props.controlled) {
|
|
98
|
+
var _this$props$defaultRa, _this$props$defaultRa2;
|
|
99
|
+
|
|
100
|
+
_this.setState({
|
|
101
|
+
startDate: (0, _moment["default"])((_this$props$defaultRa = _this.props.defaultRange) === null || _this$props$defaultRa === void 0 ? void 0 : _this$props$defaultRa.startDate),
|
|
102
|
+
endDate: (0, _moment["default"])((_this$props$defaultRa2 = _this.props.defaultRange) === null || _this$props$defaultRa2 === void 0 ? void 0 : _this$props$defaultRa2.endDate)
|
|
103
|
+
});
|
|
104
|
+
} // this.refs.pop.open();
|
|
105
|
+
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
_this.setRange = function (range) {
|
|
109
|
+
_this.setState({
|
|
110
|
+
startDate: range ? (0, _moment["default"])(range.startDate) : (0, _moment["default"])(),
|
|
111
|
+
endDate: range ? (0, _moment["default"])(range.endDate) : (0, _moment["default"])()
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
_this.handleConfirm = function () {
|
|
116
|
+
var onConfirm = _this.props.onConfirm;
|
|
117
|
+
var isValid = true;
|
|
118
|
+
isValid = onConfirm && onConfirm({
|
|
119
|
+
startDate: _this.state.startDate ? _this.state.startDate.format(_this.props.format) : "",
|
|
120
|
+
endDate: _this.state.endDate ? _this.state.endDate.format(_this.props.format) : ""
|
|
121
|
+
});
|
|
122
|
+
if (isValid === false) return;
|
|
123
|
+
|
|
124
|
+
_this.refs.pop.close();
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
_this.handleCancel = function () {
|
|
128
|
+
_this.refs.pop.close();
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
_this.handleExtraClick = function () {
|
|
132
|
+
var res = _this.props.onExtraBtnClick({
|
|
133
|
+
startDate: _this.state.startDate.format(_this.props.format),
|
|
134
|
+
endDate: _this.state.endDate.format(_this.props.format)
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
if (res !== false) {
|
|
138
|
+
_this.refs.pop.close();
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
_this.show = function (el) {
|
|
143
|
+
// @ts-ignore
|
|
144
|
+
_this.refs.pop.open();
|
|
145
|
+
|
|
146
|
+
document.addEventListener(trigger[_this.props.triggerMethod], _this.hide);
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
_this.hide = function (e) {
|
|
150
|
+
if (e && e.srcElement) {
|
|
151
|
+
var pageContainer = document.getElementById("bs_layout_container");
|
|
152
|
+
if (pageContainer && !pageContainer.contains(e.srcElement)) return;
|
|
153
|
+
var container = (0, _reactDom.findDOMNode)(_this.container);
|
|
154
|
+
if (container && container.contains(e.srcElement)) return;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
_this.refs.pop.close();
|
|
158
|
+
|
|
159
|
+
document.removeEventListener(trigger[_this.props.triggerMethod], _this.hide);
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
if (p.defaultRange) {
|
|
163
|
+
_this.state = {
|
|
164
|
+
startDate: p.defaultRange.startDate != null ? (0, _moment["default"])(p.defaultRange.startDate) : null,
|
|
165
|
+
endDate: p.defaultRange.endDate != null ? (0, _moment["default"])(p.defaultRange.endDate) : null
|
|
166
|
+
};
|
|
167
|
+
} else {
|
|
168
|
+
_this.state = {
|
|
169
|
+
startDate: (0, _moment["default"])(),
|
|
170
|
+
endDate: (0, _moment["default"])()
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return _this;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
_createClass(RangePickerPop, [{
|
|
178
|
+
key: "componentWillReceiveProps",
|
|
179
|
+
value: function componentWillReceiveProps(nextProps) {
|
|
180
|
+
if (nextProps.defaultRange) {
|
|
181
|
+
this.setState({
|
|
182
|
+
startDate: nextProps.defaultRange.startDate != null ? (0, _moment["default"])(nextProps.defaultRange.startDate) : null,
|
|
183
|
+
endDate: nextProps.defaultRange.endDate != null ? (0, _moment["default"])(nextProps.defaultRange.endDate) : null
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}, {
|
|
188
|
+
key: "render",
|
|
189
|
+
value: function render() {
|
|
190
|
+
var _this2 = this;
|
|
191
|
+
|
|
192
|
+
var _this$props = this.props,
|
|
193
|
+
triggerMethod = _this$props.triggerMethod,
|
|
194
|
+
extraBtnText = _this$props.extraBtnText,
|
|
195
|
+
onExtraBtnClick = _this$props.onExtraBtnClick,
|
|
196
|
+
container = _this$props.container,
|
|
197
|
+
style = _this$props.style,
|
|
198
|
+
requireRangeCorrect = _this$props.requireRangeCorrect,
|
|
199
|
+
_this$props$popupPlac = _this$props.popupPlacement,
|
|
200
|
+
popupPlacement = _this$props$popupPlac === void 0 ? "bottom" : _this$props$popupPlac;
|
|
201
|
+
|
|
202
|
+
var obj = _defineProperty({}, triggerMethod, this.handleClick);
|
|
203
|
+
|
|
204
|
+
var sure = _defineProperty({}, triggerMethod, this.handleConfirm);
|
|
205
|
+
|
|
206
|
+
var cancle = _defineProperty({}, triggerMethod, this.handleCancel);
|
|
207
|
+
|
|
208
|
+
var extra = _defineProperty({}, triggerMethod, this.handleExtraClick);
|
|
209
|
+
|
|
210
|
+
var popup = /*#__PURE__*/_react["default"].createElement("div", {
|
|
211
|
+
className: "tita-ranger-pop-inner",
|
|
212
|
+
onMouseDown: function onMouseDown(e) {
|
|
213
|
+
_this2.props.stopPropagation && _this2.props.stopPropagation(e);
|
|
214
|
+
},
|
|
215
|
+
ref: function ref(r) {
|
|
216
|
+
return _this2.container = r;
|
|
217
|
+
}
|
|
218
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_dateRangePicker["default"], {
|
|
219
|
+
defaultRange: [this.state.startDate, this.state.endDate],
|
|
220
|
+
onSelect: this.handleSelect,
|
|
221
|
+
triggerMethod: triggerMethod,
|
|
222
|
+
container: container,
|
|
223
|
+
requireRangeCorrect: requireRangeCorrect
|
|
224
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
225
|
+
className: "tita-range-pop-action"
|
|
226
|
+
}, onExtraBtnClick && /*#__PURE__*/_react["default"].createElement("a", _extends({
|
|
227
|
+
className: "range-primry-btn"
|
|
228
|
+
}, extra, {
|
|
229
|
+
style: {
|
|
230
|
+
"float": "left",
|
|
231
|
+
marginLeft: "10px"
|
|
232
|
+
}
|
|
233
|
+
}), extraBtnText), /*#__PURE__*/_react["default"].createElement("a", _extends({
|
|
234
|
+
className: "range-default-btn"
|
|
235
|
+
}, cancle, {
|
|
236
|
+
style: {
|
|
237
|
+
marginRight: "10px"
|
|
238
|
+
}
|
|
239
|
+
}), getLocale("Mod_Cancel")), /*#__PURE__*/_react["default"].createElement("a", _extends({
|
|
240
|
+
className: "range-primry-btn"
|
|
241
|
+
}, sure), getLocale("OKR_MyO_Butt_Determine"))));
|
|
242
|
+
|
|
243
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
244
|
+
style: style || {
|
|
245
|
+
display: "inline-block"
|
|
246
|
+
},
|
|
247
|
+
className: this.props.className,
|
|
248
|
+
onMouseDown: function onMouseDown(e) {
|
|
249
|
+
return _this2.props.stopPropagation && _this2.props.stopPropagation(e);
|
|
250
|
+
}
|
|
251
|
+
}, /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
252
|
+
ref: "pop",
|
|
253
|
+
popup: popup,
|
|
254
|
+
popupPlacement: popupPlacement
|
|
255
|
+
}, /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
256
|
+
ref: "trigger"
|
|
257
|
+
}, obj), this.props.children)));
|
|
258
|
+
}
|
|
259
|
+
}]);
|
|
260
|
+
|
|
261
|
+
return RangePickerPop;
|
|
262
|
+
}(_react.Component);
|
|
263
|
+
|
|
264
|
+
exports["default"] = RangePickerPop;
|
|
265
|
+
RangePickerPop.defaultProps = {
|
|
266
|
+
format: "YYYY-MM-DD",
|
|
267
|
+
triggerMethod: "onClick",
|
|
268
|
+
extraBtnText: "左侧按钮",
|
|
269
|
+
triggerStop: false,
|
|
270
|
+
cover: false,
|
|
271
|
+
requireRangeCorrect: true // 是否校验选择的范围
|
|
272
|
+
|
|
273
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getElementDocument = getElementDocument;
|
|
7
|
+
exports.getElementWindow = getElementWindow;
|
|
8
|
+
exports.getOptions = void 0;
|
|
9
|
+
|
|
10
|
+
// Helper function to retrieve options from element attributes
|
|
11
|
+
var getOptions = function getOptions(obj) {
|
|
12
|
+
var options = Array.prototype.reduce.call(obj, function (acc, attribute) {
|
|
13
|
+
var option = attribute.name.match(/data-simplebar-(.+)/);
|
|
14
|
+
|
|
15
|
+
if (option) {
|
|
16
|
+
var key = option[1].replace(/\W+(.)/g, function (x, chr) {
|
|
17
|
+
return chr.toUpperCase();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
switch (attribute.value) {
|
|
21
|
+
case "true":
|
|
22
|
+
acc[key] = true;
|
|
23
|
+
break;
|
|
24
|
+
|
|
25
|
+
case "false":
|
|
26
|
+
acc[key] = false;
|
|
27
|
+
break;
|
|
28
|
+
|
|
29
|
+
case undefined:
|
|
30
|
+
acc[key] = true;
|
|
31
|
+
break;
|
|
32
|
+
|
|
33
|
+
default:
|
|
34
|
+
acc[key] = attribute.value;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return acc;
|
|
39
|
+
}, {});
|
|
40
|
+
return options;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
exports.getOptions = getOptions;
|
|
44
|
+
|
|
45
|
+
function getElementWindow(element) {
|
|
46
|
+
if (!element || !element.ownerDocument || !element.ownerDocument.defaultView) {
|
|
47
|
+
return window;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return element.ownerDocument.defaultView;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function getElementDocument(element) {
|
|
54
|
+
if (!element || !element.ownerDocument) {
|
|
55
|
+
return document;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return element.ownerDocument;
|
|
59
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _canUseDom = _interopRequireDefault(require("can-use-dom"));
|
|
9
|
+
|
|
10
|
+
var _simplebar = _interopRequireDefault(require("./simplebar"));
|
|
11
|
+
|
|
12
|
+
var _helpers = require("./helpers");
|
|
13
|
+
|
|
14
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
_simplebar["default"].initDOMLoadedElements = function () {
|
|
19
|
+
document.removeEventListener("DOMContentLoaded", this.initDOMLoadedElements);
|
|
20
|
+
window.removeEventListener("load", this.initDOMLoadedElements);
|
|
21
|
+
Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"), function (el) {
|
|
22
|
+
if (el.getAttribute("data-simplebar") !== "init" && !_simplebar["default"].instances.has(el)) new _simplebar["default"](el, (0, _helpers.getOptions)(el.attributes));
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
_simplebar["default"].removeObserver = function () {
|
|
27
|
+
this.globalObserver.disconnect();
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
_simplebar["default"].initHtmlApi = function () {
|
|
31
|
+
this.initDOMLoadedElements = this.initDOMLoadedElements.bind(this); // MutationObserver is IE11+
|
|
32
|
+
|
|
33
|
+
if (typeof MutationObserver !== "undefined") {
|
|
34
|
+
// Mutation observer to observe dynamically added elements
|
|
35
|
+
this.globalObserver = new MutationObserver(_simplebar["default"].handleMutations);
|
|
36
|
+
this.globalObserver.observe(document, {
|
|
37
|
+
childList: true,
|
|
38
|
+
subtree: true
|
|
39
|
+
});
|
|
40
|
+
} // Taken from jQuery `ready` function
|
|
41
|
+
// Instantiate elements already present on the page
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
if (document.readyState === "complete" || document.readyState !== "loading" && !document.documentElement.doScroll) {
|
|
45
|
+
// Handle it asynchronously to allow scripts the opportunity to delay init
|
|
46
|
+
window.setTimeout(this.initDOMLoadedElements);
|
|
47
|
+
} else {
|
|
48
|
+
document.addEventListener("DOMContentLoaded", this.initDOMLoadedElements);
|
|
49
|
+
window.addEventListener("load", this.initDOMLoadedElements);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
_simplebar["default"].handleMutations = function (mutations) {
|
|
54
|
+
mutations.forEach(function (mutation) {
|
|
55
|
+
Array.prototype.forEach.call(mutation.addedNodes, function (addedNode) {
|
|
56
|
+
if (addedNode.nodeType === 1) {
|
|
57
|
+
if (addedNode.hasAttribute("data-simplebar")) {
|
|
58
|
+
!_simplebar["default"].instances.has(addedNode) && document.documentElement.contains(addedNode) && new _simplebar["default"](addedNode, (0, _helpers.getOptions)(addedNode.attributes));
|
|
59
|
+
} else {
|
|
60
|
+
Array.prototype.forEach.call(addedNode.querySelectorAll("[data-simplebar]"), function (el) {
|
|
61
|
+
if (el.getAttribute("data-simplebar") !== "init" && !_simplebar["default"].instances.has(el) && document.documentElement.contains(el)) new _simplebar["default"](el, (0, _helpers.getOptions)(el.attributes));
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Array.prototype.forEach.call(mutation.removedNodes, function (removedNode) {
|
|
67
|
+
if (removedNode.nodeType === 1) {
|
|
68
|
+
if (removedNode.getAttribute("data-simplebar") === "init") {
|
|
69
|
+
_simplebar["default"].instances.has(removedNode) && !document.documentElement.contains(removedNode) && _simplebar["default"].instances.get(removedNode).unMount();
|
|
70
|
+
} else {
|
|
71
|
+
Array.prototype.forEach.call(removedNode.querySelectorAll("[data-simplebar=\"init\"]"), function (el) {
|
|
72
|
+
_simplebar["default"].instances.has(el) && !document.documentElement.contains(el) && _simplebar["default"].instances.get(el).unMount();
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
_simplebar["default"].getOptions = _helpers.getOptions;
|
|
81
|
+
/**
|
|
82
|
+
* HTML API
|
|
83
|
+
* Called only in a browser env.
|
|
84
|
+
*/
|
|
85
|
+
|
|
86
|
+
if (_canUseDom["default"]) {
|
|
87
|
+
_simplebar["default"].initHtmlApi();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
var _default = _simplebar["default"];
|
|
91
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = scrollbarWidth;
|
|
7
|
+
|
|
8
|
+
var _canUseDom = _interopRequireDefault(require("can-use-dom"));
|
|
9
|
+
|
|
10
|
+
var _helpers = require("./helpers");
|
|
11
|
+
|
|
12
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
var cachedScrollbarWidth = null;
|
|
17
|
+
var cachedDevicePixelRatio = null;
|
|
18
|
+
|
|
19
|
+
if (_canUseDom["default"]) {
|
|
20
|
+
window.addEventListener("resize", function () {
|
|
21
|
+
if (cachedDevicePixelRatio !== window.devicePixelRatio) {
|
|
22
|
+
cachedDevicePixelRatio = window.devicePixelRatio;
|
|
23
|
+
cachedScrollbarWidth = null;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function scrollbarWidth(el) {
|
|
29
|
+
if (cachedScrollbarWidth === null) {
|
|
30
|
+
var document = (0, _helpers.getElementDocument)(el);
|
|
31
|
+
|
|
32
|
+
if (typeof document === "undefined") {
|
|
33
|
+
cachedScrollbarWidth = 0;
|
|
34
|
+
return cachedScrollbarWidth;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
var body = document.body;
|
|
38
|
+
var box = document.createElement("div");
|
|
39
|
+
box.classList.add("simplebar-hide-scrollbar");
|
|
40
|
+
body.appendChild(box);
|
|
41
|
+
var width = box.getBoundingClientRect().right;
|
|
42
|
+
body.removeChild(box);
|
|
43
|
+
cachedScrollbarWidth = width;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return cachedScrollbarWidth;
|
|
47
|
+
}
|