@titaui/pc 1.11.52-beta.13 → 1.11.52-beta.14

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.
Files changed (23) hide show
  1. package/lib/components/drop-selector/index.js +1 -2
  2. package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +2 -2
  3. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +2 -2
  4. package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +3 -1
  5. package/lib/components/okr-detail/components/header/edit-name.js +10 -18
  6. package/lib/components/okr-detail/components/header/index.js +14 -7
  7. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +78 -42
  8. package/lib/components/okr-flow/export-modal/index.js +26 -16
  9. package/lib/components/progress/circle-progress/index.css +2 -0
  10. package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +8 -3
  11. package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +4 -2
  12. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +3 -3
  13. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +8 -2
  14. package/lib/components/task-tree/task-item-node/index.css +2 -2
  15. package/lib/components/upload/components/uploadedPreview.js +18 -18
  16. package/lib/components/upload/index.js +57 -29
  17. package/lib/components/user-selector/export-modules/field-tree-selector/index.js +14 -15
  18. package/lib/components/user-selector/searched-panel/index.js +12 -6
  19. package/lib/pages/new-okr-list/header/index.js +16 -18
  20. package/lib/utils/auth.js +12 -0
  21. package/lib/utils/hooks.js +19 -5
  22. package/lib/utils/tita-okr-cycle.js +24 -0
  23. package/package.json +2 -2
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = useQuery;
7
7
  exports.parseUrl = parseUrl;
8
+ exports.useDebouncedEffect = useDebouncedEffect;
8
9
 
9
10
  var _react = require("react");
10
11
 
@@ -23,15 +24,15 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
23
24
  function parseUrl(fragmentStr) {
24
25
  var queryObject = {};
25
26
  if (!fragmentStr) return queryObject;
26
- var markIndex = fragmentStr.indexOf("?"); // contain query string in fragments
27
+ var markIndex = fragmentStr.indexOf('?'); // contain query string in fragments
27
28
 
28
29
  if (markIndex > -1) {
29
30
  // build query object
30
31
  var queryString = fragmentStr.slice(markIndex + 1);
31
- var queryArray = queryString.split("&");
32
+ var queryArray = queryString.split('&');
32
33
 
33
34
  for (var i = 0; i < queryArray.length; i += 1) {
34
- var queryPair = queryArray[i].split("=");
35
+ var queryPair = queryArray[i].split('=');
35
36
  queryObject[queryPair[0]] = decodeURIComponent(queryPair[1]);
36
37
  }
37
38
  }
@@ -63,10 +64,23 @@ function useQuery(name) {
63
64
  }
64
65
  }, []);
65
66
  (0, _react.useEffect)(function () {
66
- window.addEventListener("hashchange", hashChangeHandler);
67
+ window.addEventListener('hashchange', hashChangeHandler);
67
68
  return function () {
68
- window.removeEventListener("hashchange", hashChangeHandler);
69
+ window.removeEventListener('hashchange', hashChangeHandler);
69
70
  };
70
71
  }, []);
71
72
  return state;
73
+ }
74
+
75
+ function useDebouncedEffect(fn, ms, deps) {
76
+ (0, _react.useEffect)(function () {
77
+ var clean = null;
78
+ var timer = setTimeout(function () {
79
+ clean = fn();
80
+ }, ms);
81
+ return function () {
82
+ clearTimeout(timer);
83
+ if (clean) clean();
84
+ };
85
+ }, deps);
72
86
  }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.cycleType = void 0;
7
+ // annualNum: "2022" 年份
8
+ // cycleType: "-1" 全部周期
9
+ // endDate: ""
10
+ // startDate: ""
11
+ // yqmNum: "0"
12
+ // annualNum: "2022"
13
+ // cycleType: "5" 上半年
14
+ // endDate: "2022/09/30"
15
+ // startDate: "2022/04/01"
16
+ // yqmNum: "1"
17
+ var cycleType = {
18
+ '-1': '全部周期',
19
+ '1': '年度',
20
+ '2': '季度',
21
+ '4': '双月',
22
+ '5': '半年度'
23
+ };
24
+ exports.cycleType = cycleType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.11.52-beta.13",
3
+ "version": "1.11.52-beta.14",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
@@ -78,7 +78,7 @@
78
78
  "@titaui/rc-trigger": "5.2.5",
79
79
  "@titaui/react-flow-renderer": "9.5.4",
80
80
  "@titaui/request": "^1.0.1",
81
- "@titaui/rich-editor": "^0.1.34",
81
+ "@titaui/rich-editor": "^0.1.35",
82
82
  "@titaui/toast": "1.0.0",
83
83
  "@types/color": "3.0.3",
84
84
  "@types/prosemirror-commands": "1.0.4",