@titaui/pc 1.12.7-beta.1 → 1.12.7-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/color-date-picker/index.css +65 -0
- package/lib/components/color-date-picker/index.js +123 -0
- package/lib/components/color-date-picker/interface.js +14 -0
- package/lib/components/dialog-upload/uploaded-preview.js +1 -1
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/encourage.js +7 -7
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/index.js +23 -17
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +2 -1
- package/lib/components/dynamic/dynamic-item/components/summary-header/constant.js +45 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +47 -14
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +2 -1
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +2 -1
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/constant.js +45 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +40 -16
- package/lib/components/dynamic/dynamic-item/index.js +15 -5
- package/lib/components/import-modal/import-okr-modal/index.js +4 -1
- package/lib/components/menus/components/menu-tree/tree-node/subordinates.js +7 -3
- package/lib/components/menus/components/menu-tree/tree-node/summary-share.js +7 -3
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +59 -29
- package/lib/components/menus/export-modules/summary-menus/menus.js +56 -50
- package/lib/components/menus/request-apis.js +8 -2
- package/lib/components/new-confidence/index.js +5 -5
- package/lib/components/picker/components/panels/week-panel/utils.js +45 -0
- package/lib/components/picker/components/panels/week-panel/week-body.js +9 -56
- package/lib/components/picker/components/picker-trigger/index.js +2 -3
- package/lib/components/rate/index.js +0 -2
- package/lib/components/regulation-setting-item/index.css +33 -0
- package/lib/components/regulation-setting-item/index.js +37 -0
- package/lib/components/rich-editor-upload/index.js +3 -0
- package/lib/components/write-summary-modal/index.css +79 -0
- package/lib/components/write-summary-modal/index.js +151 -0
- package/lib/components/write-summary-modal/interface.js +19 -0
- package/lib/components/write-summary-modal/request-api.js +18 -0
- package/lib/components/write-summary-modal/utils.js +31 -0
- package/lib/index.js +16 -0
- package/lib/utils/constant.js +8 -2
- package/lib/utils/helpers.js +48 -11
- package/package.json +1 -1
package/lib/utils/helpers.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.cssSupport = cssSupport;
|
|
7
7
|
exports.escapeHtml = escapeHtml;
|
|
8
8
|
exports.getApiUrl = getApiUrl;
|
|
9
|
-
exports.getLoginUserInfo = void 0;
|
|
9
|
+
exports.getPreAndNextMonthDate = exports.getLoginUserInfo = void 0;
|
|
10
10
|
exports.getTenantInfo = getTenantInfo;
|
|
11
11
|
exports.getUploadMaxSize = getUploadMaxSize;
|
|
12
12
|
exports.isTencentHr = exports.isLocal = exports.isFeishu = exports.isDingDing = void 0;
|
|
@@ -14,7 +14,7 @@ exports.isTencentHr = exports.isLocal = exports.isFeishu = exports.isDingDing =
|
|
|
14
14
|
var _bsGlobal = require("./bs-global");
|
|
15
15
|
|
|
16
16
|
function cssSupport(attr, value) {
|
|
17
|
-
var element = document.createElement(
|
|
17
|
+
var element = document.createElement('div');
|
|
18
18
|
|
|
19
19
|
if (attr in element.style) {
|
|
20
20
|
element.style[attr] = value;
|
|
@@ -25,7 +25,7 @@ function cssSupport(attr, value) {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
function getUploadMaxSize() {
|
|
28
|
-
var info = (0, _bsGlobal.getBSGlobal)(
|
|
28
|
+
var info = (0, _bsGlobal.getBSGlobal)('tenantInfo');
|
|
29
29
|
if (info.Id === 352728) return 150;
|
|
30
30
|
var isDingDing = info.Source === 861;
|
|
31
31
|
var isDingZhi = window.dingZhiSize && window.dingZhiSize.indexOf(info.Id) !== -1;
|
|
@@ -42,7 +42,7 @@ function getApiUrl(url) {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
function getTenantInfo() {
|
|
45
|
-
return (0, _bsGlobal.getBSGlobal)(
|
|
45
|
+
return (0, _bsGlobal.getBSGlobal)('tenantInfo');
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
var isDingDing = function isDingDing() {
|
|
@@ -71,11 +71,11 @@ exports.isTencentHr = isTencentHr;
|
|
|
71
71
|
|
|
72
72
|
function escapeHtml(str) {
|
|
73
73
|
var htmlEscapes = {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
'&': '&',
|
|
75
|
+
'<': '<',
|
|
76
|
+
'>': '>',
|
|
77
|
+
'"': '"',
|
|
78
|
+
''': "'"
|
|
79
79
|
};
|
|
80
80
|
return str.replace(/(&|<|>|"|')/g, function (s) {
|
|
81
81
|
return htmlEscapes[s];
|
|
@@ -83,7 +83,44 @@ function escapeHtml(str) {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
var getLoginUserInfo = function getLoginUserInfo() {
|
|
86
|
-
return (0, _bsGlobal.getBSGlobal)(
|
|
86
|
+
return (0, _bsGlobal.getBSGlobal)('loginUserInfo');
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
-
exports.getLoginUserInfo = getLoginUserInfo;
|
|
89
|
+
exports.getLoginUserInfo = getLoginUserInfo;
|
|
90
|
+
|
|
91
|
+
var getPreAndNextMonthDate = function getPreAndNextMonthDate() {
|
|
92
|
+
var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date();
|
|
93
|
+
var culPreDate = new Date(date);
|
|
94
|
+
var culNextDate = new Date(date);
|
|
95
|
+
var preDate = [];
|
|
96
|
+
var nextDate = []; // 获取前置天数
|
|
97
|
+
|
|
98
|
+
culPreDate.setDate(1);
|
|
99
|
+
var preRemainDays = culPreDate.getDay() === 0 ? 6 : culPreDate.getDay() - 1;
|
|
100
|
+
culPreDate.setDate(0);
|
|
101
|
+
|
|
102
|
+
while (preRemainDays > 0) {
|
|
103
|
+
// +1是因为上个月有5天到这个月,月末30号 则为 30-4, 30-3, 30-2, 30-1, 30-0五天
|
|
104
|
+
preDate.push(culPreDate.getDate() - preRemainDays + 1);
|
|
105
|
+
preRemainDays--;
|
|
106
|
+
} // 获取后置天数
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
culNextDate.setMonth(culNextDate.getMonth() + 1);
|
|
110
|
+
culNextDate.setDate(0);
|
|
111
|
+
var lastDateDay = Math.abs(culNextDate.getDay() - 7);
|
|
112
|
+
|
|
113
|
+
if (lastDateDay !== 7) {
|
|
114
|
+
while (lastDateDay >= 1) {
|
|
115
|
+
nextDate.unshift(lastDateDay);
|
|
116
|
+
lastDateDay--;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return {
|
|
121
|
+
preDate: preDate,
|
|
122
|
+
nextDate: nextDate
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
exports.getPreAndNextMonthDate = getPreAndNextMonthDate;
|