@titaui/pc 1.12.0-beta.3 → 1.12.3
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/button/images/blue.svg +21 -0
- package/lib/components/button/images/red.svg +21 -0
- package/lib/components/button/images/white.svg +19 -0
- package/lib/components/button/rect-btn/index.js +3 -3
- package/lib/components/checkbox/index.css +4 -0
- package/lib/components/contact-kefu/index.css +10 -0
- package/lib/components/contact-kefu/index.js +8 -2
- package/lib/components/create-okr-modal/index.js +3 -1
- package/lib/components/dynamic/constant.js +1 -1
- package/lib/components/dynamic/dynamic-list/index.js +14 -7
- package/lib/components/dynamic/index.js +9 -12
- package/lib/components/dynamic/request-api.js +7 -68
- package/lib/components/nav-top/components/menu/index.js +16 -14
- package/lib/components/nav-top/index.js +2 -2
- package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
- package/lib/components/okr-detail/e-list/index.js +2 -2
- package/lib/components/period-selector/interface.js +7 -0
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +16 -10
- package/lib/components/search-input/index.css +1 -1
- package/lib/components/select-layer/index.css +1 -1
- package/lib/components/task-relation-modal/helper.js +139 -2
- package/lib/components/task-relation-modal/image/loading.gif +0 -0
- package/lib/components/task-relation-modal/index.js +9 -0
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.css +18 -0
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +262 -0
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +135 -0
- package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.css +0 -0
- package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +129 -0
- package/lib/components/task-relation-modal/okr-relation/request-api.js +106 -0
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +120 -0
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +185 -0
- package/lib/components/task-relation-modal/request-api.js +28 -2
- package/lib/components/task-relation-modal/search/okr-status-select.js +3 -3
- package/lib/components/task-relation-modal/search/principal.js +36 -19
- package/lib/components/task-relation-modal/search/search-dropdown/index.css +2 -1
- package/lib/components/task-relation-modal/search/search-dropdown/index.js +1 -1
- package/lib/components/{dynamic/dynamic-topping/index.js → task-relation-modal/search/task-relation.js} +45 -44
- package/lib/components/task-relation-modal/search/task-status-select.js +87 -0
- package/lib/components/{dynamic/dynamic-liking/index.js → task-relation-modal/search/work-relation.js} +43 -39
- package/lib/components/task-relation-modal/search/work-status-select.js +74 -0
- package/lib/components/task-relation-modal/tree/category-tree/index.css +3 -3
- package/lib/components/task-relation-modal/tree/okr-tree/index.css +1 -1
- package/lib/components/task-relation-modal/tree/okr-tree/search-form.js +16 -2
- package/lib/components/task-relation-modal/tree/task-list/index.css +0 -0
- package/lib/components/task-relation-modal/tree/task-list/index.js +1 -0
- package/lib/components/task-relation-modal/tree/work-list/index.css +14 -0
- package/lib/components/task-relation-modal/tree/work-list/index.js +176 -0
- package/lib/components/task-relation-modal/tree/work-list/search-form.js +123 -0
- package/lib/components/task-relation-modal/tree/work-tree/index.css +1 -1
- package/lib/components/task-relation-modal/tree-node/category-node/index.css +1 -1
- package/lib/components/task-relation-modal/tree-node/work-node/index.js +3 -1
- package/lib/components/task-relation-modal/work-relation/index.css +0 -0
- package/lib/components/task-relation-modal/work-relation/index.js +256 -0
- package/lib/components/tooltip/index.js +3 -0
- package/lib/components/tooltip/tooltip-rows/index.css +26 -0
- package/lib/components/{dynamic/advertise → tooltip/tooltip-rows}/index.js +65 -85
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +46 -18
- package/lib/utils/planDataJson.js +11115 -0
- package/package.json +1 -1
- package/lib/components/dynamic/advertise/components/next-btn/index.css +0 -27
- package/lib/components/dynamic/advertise/components/next-btn/index.js +0 -32
- package/lib/components/dynamic/advertise/components/pre-btn/index.css +0 -26
- package/lib/components/dynamic/advertise/components/pre-btn/index.js +0 -32
- package/lib/components/dynamic/advertise/index.css +0 -21
- package/lib/components/dynamic/advertise/interface.js +0 -5
- package/lib/components/dynamic/advertise/util.js +0 -28
- package/lib/components/dynamic/components/dynamic-search-input/index.css +0 -81
- package/lib/components/dynamic/components/dynamic-search-input/index.js +0 -203
- package/lib/components/dynamic/components/first-level-tabs/index.css +0 -101
- package/lib/components/dynamic/components/first-level-tabs/index.js +0 -131
- package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +0 -23
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.css +0 -146
- package/lib/components/dynamic/dynamic-like-ranking/index.js +0 -180
- package/lib/components/dynamic/dynamic-like-ranking/item.js +0 -105
- package/lib/components/dynamic/dynamic-like-ranking/mock.js +0 -84
- package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +0 -30
- package/lib/components/dynamic/dynamic-liking/index.css +0 -81
- package/lib/components/dynamic/dynamic-liking/item.js +0 -75
- package/lib/components/dynamic/dynamic-liking/mock.js +0 -83
- package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +0 -16
- package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +0 -30
- package/lib/components/dynamic/dynamic-topping/index.css +0 -141
- package/lib/components/dynamic/dynamic-topping/interface.js +0 -5
- package/lib/components/dynamic/dynamic-topping/item.js +0 -153
- package/lib/components/dynamic/dynamic-topping/request-api.js +0 -36
- package/lib/components/dynamic/dynamic.css +0 -173
- package/lib/components/dynamic/dynamic.js +0 -428
- package/lib/components/dynamic/export-module/index.js +0 -37
- package/lib/components/dynamic/img/dynamic-top.svg +0 -14
- package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
- package/lib/components/dynamic/my-team/img/line.png +0 -0
- package/lib/components/dynamic/my-team/img/team.png +0 -0
- package/lib/components/dynamic/my-team/index.css +0 -184
- package/lib/components/dynamic/my-team/index.js +0 -263
- package/lib/components/dynamic/my-team/request-api.js +0 -52
- package/lib/components/dynamic/my-team/util.js +0 -20
- package/lib/components/dynamic/new-ui.css +0 -192
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +0 -58
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +0 -68
- package/lib/components/dynamic/online-broadcast/data.js +0 -95
- package/lib/components/dynamic/online-broadcast/img/broadcast.svg +0 -14
- package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
- package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
- package/lib/components/dynamic/online-broadcast/index.css +0 -46
- package/lib/components/dynamic/online-broadcast/index.js +0 -61
- package/lib/components/dynamic/online-broadcast/interfact.js +0 -5
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +0 -39
- package/lib/components/dynamic/quick-operation/components/create-okr/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +0 -39
- package/lib/components/dynamic/quick-operation/components/create-share/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +0 -39
- package/lib/components/dynamic/quick-operation/components/create-task/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-task/index.js +0 -44
- package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
- package/lib/components/dynamic/quick-operation/index.css +0 -51
- package/lib/components/dynamic/quick-operation/index.js +0 -120
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>椭圆形</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<pattern id="pattern-1" width="100%" height="100%" patternUnits="objectBoundingBox">
|
|
6
|
+
<use xlink:href="#image-2"></use>
|
|
7
|
+
</pattern>
|
|
8
|
+
<image id="image-2" width="14" height="14" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAADqADAAQAAAABAAAADgAAAAC98Dn6AAABo0lEQVQoFTWSwU7kMBBEq912WAYhJEba6+6BAwjxhfwcH8MVBJdhiGOb145IlHTHruqqbscense/WtW2oW3p2vq11vOn6uur1vs7nSWtY6jKtJoETJsNtVRX5VLkyyJvprSe5f0G2O81NMzUAkyBGdnaspsyZJVFsqThVd26XI+QzxoDkiAApq42YkW1Zb5yctnaZEuRTisKDcAHxCM5oADPB7tTNYhULwDdXD660uEKFL3+/+B7V8EPBOmbIlEAiSCaFpIed5fyoAg9y//OwVRsfgE+EaPAJJGPDGlR9IZ7euz4+kPPl9EzRd4BvwGMqTZUodA3i1MRgDEOg2UMKymrYPuJ/RdAt+wWbDokm3cQeTgIpSSlaXUHHfB9TKY3CCFxCDKTco7FibZbhYRq5OHgArUDsaBQAZ3I6QOBwdqu7JkKAXA2Mz1GfoHZwno46MSYKB3MK841XLbcIUKiQ82cxcyEM0CLYUHcz5FCoYzt+JNQ3AfkYRXgTmJA0QcF4g/gPcnx19gksxxgp4pHRD0sJaxxQBCNd9jlIY/jwEC0K/0AOvvST1WxS68AAAAASUVORK5CYII="></image>
|
|
9
|
+
</defs>
|
|
10
|
+
<g id="2、按钮" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
11
|
+
<g id="线性按钮Bottun" transform="translate(-881.000000, -339.000000)" fill="url(#pattern-1)" fill-rule="nonzero">
|
|
12
|
+
<g id="6" transform="translate(30.000000, 248.000000)">
|
|
13
|
+
<g id="编组-7" transform="translate(287.000000, 40.000000)">
|
|
14
|
+
<g id="编组-8" transform="translate(548.000000, 40.000000)">
|
|
15
|
+
<path d="M23,11 C26.8659932,11 30,14.1340068 30,18 C30,21.8659932 26.8659932,25 23,25 C19.1340068,25 16,21.8659932 16,18 C16,14.1340068 19.1340068,11 23,11 Z M23,12.2 C19.7967485,12.2 17.2,14.7967485 17.2,18 C17.2,21.2032515 19.7967485,23.8 23,23.8 C26.2032515,23.8 28.8,21.2032515 28.8,18 C28.8,14.7967485 26.2032515,12.2 23,12.2 Z" id="椭圆形"></path>
|
|
16
|
+
</g>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
</g>
|
|
20
|
+
</g>
|
|
21
|
+
</svg>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>椭圆形</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<pattern id="pattern-1" width="100%" height="100%" patternUnits="objectBoundingBox">
|
|
6
|
+
<use xlink:href="#image-2"></use>
|
|
7
|
+
</pattern>
|
|
8
|
+
<image id="image-2" width="14" height="14" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAADqADAAQAAAABAAAADgAAAAC98Dn6AAABx0lEQVQoFT2SQW7bQAxFSQ4l2YabhbtJgQA5Qc/RE3ST03bXO2TVRXdpArSL2JrRDPsoFDUwHor8n5/8kl6fnh7fVftS6/bHfftkVn/W2r6L1C+Hwy1Ua4g043lEbKq6iUi3tXc/RRQ7HssHd/tN/HC76VeqECT4KcAE/z80sDZNvnJ029xac4P4S7XIy4uKKoK6E1DrqUaTlrcfUIzetZaiMy3fzcIvl03u71Wu1xRNQqNJg1QZoJPsxtATQ89b70tzX85jzE7ux/Nz2UkJ5jDzCqmSq7mv8zeH+6Aw+hiupRRfVznf3d1SBdIVAv5pklO98xyu7rP2HmmVlzLY5bCaHc/ns6wib4Bfc9R/BgXPkfM7wFxNMUXHGGDU+E3N7LNGfEP1Qn2KMQoxfLBJpDgLyCTkqAmieiL+SO6Veoqc9jxuD5FCTh3QTMVQc/j4ogvxifwEuEHK/QjxIiKb7mRc2QEFU7LJxOgLwIk9jIY5e76CkmRy+TE4dvdUmACUTKA0sWHezp06A3AnTmXL3Wgcw6x47oWbhYSzfJqVyqmmTCPsM8h3zoZBureDvJOo58tO1bKPiFHEcHDGbH/HfHs9HeTOgvwFtVIeevLXjdUAAAAASUVORK5CYII="></image>
|
|
9
|
+
</defs>
|
|
10
|
+
<g id="2、按钮" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
11
|
+
<g id="线性按钮Bottun" transform="translate(-881.000000, -547.000000)" fill="url(#pattern-1)" fill-rule="nonzero">
|
|
12
|
+
<g id="6" transform="translate(30.000000, 248.000000)">
|
|
13
|
+
<g id="编组-7" transform="translate(287.000000, 40.000000)">
|
|
14
|
+
<g id="编组-8" transform="translate(548.000000, 248.000000)">
|
|
15
|
+
<path d="M23,11 C26.8659932,11 30,14.1340068 30,18 C30,21.8659932 26.8659932,25 23,25 C19.1340068,25 16,21.8659932 16,18 C16,14.1340068 19.1340068,11 23,11 Z M23,12.2 C19.7967485,12.2 17.2,14.7967485 17.2,18 C17.2,21.2032515 19.7967485,23.8 23,23.8 C26.2032515,23.8 28.8,21.2032515 28.8,18 C28.8,14.7967485 26.2032515,12.2 23,12.2 Z" id="椭圆形"></path>
|
|
16
|
+
</g>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
</g>
|
|
20
|
+
</g>
|
|
21
|
+
</svg>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>椭圆形</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<pattern id="pattern-1" width="100%" height="100%" patternUnits="objectBoundingBox">
|
|
6
|
+
<use xlink:href="#image-2"></use>
|
|
7
|
+
</pattern>
|
|
8
|
+
<image id="image-2" width="14" height="14" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAADqADAAQAAAABAAAADgAAAAC98Dn6AAAA+UlEQVQoFVXSSVLDQBBEUQkzL+EAnID7b7kQLBltRL4OpaOpiB+tkjNraGvdtu1pWZZTOO585/wJzs/9bF7N6TI/QGzhNxwCQcN7hWeOs5FwNq97/s+Qd7qfOxJBMOs4G4k77iik41UwHi6CYJQT2RVfYXTLOTpe58FuUIhBuBjCj/AemDv2RshoPMF8G+4kibfwGtqJbmhr7I5O4xr/ObyEh9B1qhuj6UiM7nyf58egm5DXbJW1HWuS30xCI9pPaHA2t4MqfWYkUMzOLqUXZj+6cautUqMT9mF0kzorJJgPFbVjcyJGUXM/Cu/G38E0w1Sj6ow1t9jyBy9lWT02rrfMAAAAAElFTkSuQmCC"></image>
|
|
9
|
+
</defs>
|
|
10
|
+
<g id="2、按钮" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
11
|
+
<g id="面性按钮Bottun" transform="translate(-909.000000, -339.000000)" fill="url(#pattern-1)" fill-rule="nonzero">
|
|
12
|
+
<g id="6" transform="translate(30.000000, 248.000000)">
|
|
13
|
+
<g id="编组-7" transform="translate(209.000000, 40.000000)">
|
|
14
|
+
<path d="M677,51 C680.865993,51 684,54.1340068 684,58 C684,61.8659932 680.865993,65 677,65 C673.134007,65 670,61.8659932 670,58 C670,54.1340068 673.134007,51 677,51 Z M677,52.2 C673.796748,52.2 671.2,54.7967485 671.2,58 C671.2,61.2032515 673.796748,63.8 677,63.8 C680.203252,63.8 682.8,61.2032515 682.8,58 C682.8,54.7967485 680.203252,52.2 677,52.2 Z" id="椭圆形"></path>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
</svg>
|
|
@@ -34,10 +34,10 @@ function RectBtn(props) {
|
|
|
34
34
|
className = _props$className === void 0 ? '' : _props$className,
|
|
35
35
|
_props$disabled = props.disabled,
|
|
36
36
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
37
|
-
style = props.style,
|
|
38
|
-
children = props.children,
|
|
39
37
|
_props$loading = props.loading,
|
|
40
|
-
loading = _props$loading === void 0 ? false : _props$loading
|
|
38
|
+
loading = _props$loading === void 0 ? false : _props$loading,
|
|
39
|
+
style = props.style,
|
|
40
|
+
children = props.children;
|
|
41
41
|
|
|
42
42
|
var renderIcon = function renderIcon() {
|
|
43
43
|
if (typeof icon === 'string') {
|
|
@@ -46,6 +46,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
46
46
|
var preCls = "contact-kefu";
|
|
47
47
|
|
|
48
48
|
var ContactKefu = function ContactKefu() {
|
|
49
|
+
var _window$BSGlobal, _window$BSGlobal$tena, _window$BSGlobal2, _window$BSGlobal2$ten, _classNames;
|
|
50
|
+
|
|
49
51
|
var _useState = (0, _react.useState)(false),
|
|
50
52
|
_useState2 = _slicedToArray(_useState, 2),
|
|
51
53
|
visible = _useState2[0],
|
|
@@ -55,7 +57,11 @@ var ContactKefu = function ContactKefu() {
|
|
|
55
57
|
setVisible(true);
|
|
56
58
|
};
|
|
57
59
|
|
|
58
|
-
var isTrial = window.BSGlobal.tenantAuthentication.Version === 1 && (0, _platform.isOfficialSite)();
|
|
60
|
+
var isTrial = ((_window$BSGlobal = window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$tena = _window$BSGlobal.tenantAuthentication) === null || _window$BSGlobal$tena === void 0 ? void 0 : _window$BSGlobal$tena.Version) === 1 && (0, _platform.isOfficialSite)();
|
|
61
|
+
|
|
62
|
+
if (!((_window$BSGlobal2 = window.BSGlobal) !== null && _window$BSGlobal2 !== void 0 && (_window$BSGlobal2$ten = _window$BSGlobal2.tenantAuthentication) !== null && _window$BSGlobal2$ten !== void 0 && _window$BSGlobal2$ten.Version)) {
|
|
63
|
+
isTrial = true;
|
|
64
|
+
}
|
|
59
65
|
|
|
60
66
|
var popup = /*#__PURE__*/_react["default"].createElement("div", {
|
|
61
67
|
className: "".concat(preCls, "__popup")
|
|
@@ -91,7 +97,7 @@ var ContactKefu = function ContactKefu() {
|
|
|
91
97
|
offset: [0, 0]
|
|
92
98
|
}
|
|
93
99
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
94
|
-
className: (0, _classnames["default"])("".concat(preCls, "__kefu"),
|
|
100
|
+
className: (0, _classnames["default"])("".concat(preCls, "__kefu"), (_classNames = {}, _defineProperty(_classNames, "".concat(preCls, "__try-kefu"), isTrial), _defineProperty(_classNames, "".concat(preCls, "__hidden"), visible), _classNames)),
|
|
95
101
|
onClick: handleShowCode
|
|
96
102
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
97
103
|
className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__cancel"), visible))
|
|
@@ -353,7 +353,9 @@ function CreateOkrModal(_ref, ref) {
|
|
|
353
353
|
setData: function setData(data) {
|
|
354
354
|
setOkrName(data.okrName);
|
|
355
355
|
setUser(data.user);
|
|
356
|
-
}
|
|
356
|
+
},
|
|
357
|
+
show: showCreateOkrModal,
|
|
358
|
+
hide: hideCreateOkrModal
|
|
357
359
|
};
|
|
358
360
|
});
|
|
359
361
|
var handleOnSuccess = (0, _react.useCallback)(function () {
|
|
@@ -116,7 +116,7 @@ var EStatusStatus2ClassType = {
|
|
|
116
116
|
3: "tu-icon-deferred",
|
|
117
117
|
6: "tu-icon-paused",
|
|
118
118
|
0: "tu-icon-notstart",
|
|
119
|
-
5: "tu-icon-
|
|
119
|
+
5: "tu-icon-weijieshou-right"
|
|
120
120
|
};
|
|
121
121
|
exports.EStatusStatus2ClassType = EStatusStatus2ClassType;
|
|
122
122
|
var PlanReportType = ["titaPlanReport", "titaPlanManagerReport"];
|
|
@@ -17,11 +17,12 @@ var _conditionRender = _interopRequireDefault(require("../../condition-render"))
|
|
|
17
17
|
|
|
18
18
|
var _getLocale = require("../../../utils/getLocale");
|
|
19
19
|
|
|
20
|
+
var _context = require("../context");
|
|
21
|
+
|
|
20
22
|
require("./index.css");
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
25
|
|
|
24
|
-
// @ts-ignore
|
|
25
26
|
var prefix = 'titaui-dynamic-list';
|
|
26
27
|
|
|
27
28
|
var DynamicList = function DynamicList(_ref) {
|
|
@@ -29,7 +30,9 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
29
30
|
dynamicShareIsShowToping = _ref.dynamicShareIsShowToping,
|
|
30
31
|
onDeleteFeed = _ref.onDeleteFeed,
|
|
31
32
|
_ref$height = _ref.height,
|
|
32
|
-
height = _ref$height === void 0 ? -1 : _ref$height
|
|
33
|
+
height = _ref$height === void 0 ? -1 : _ref$height,
|
|
34
|
+
_ref$searchKeyWord = _ref.searchKeyWord,
|
|
35
|
+
searchKeyWord = _ref$searchKeyWord === void 0 ? "" : _ref$searchKeyWord;
|
|
33
36
|
|
|
34
37
|
var handleDeleteFeed = function handleDeleteFeed(feedId) {
|
|
35
38
|
if (onDeleteFeed) {
|
|
@@ -37,10 +40,14 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
37
40
|
}
|
|
38
41
|
};
|
|
39
42
|
|
|
40
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
43
|
+
return /*#__PURE__*/_react["default"].createElement(_context.SearchKeyContext.Provider, {
|
|
44
|
+
value: {
|
|
45
|
+
searchKeyWord: searchKeyWord
|
|
46
|
+
}
|
|
47
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
41
48
|
className: prefix,
|
|
42
49
|
style: {
|
|
43
|
-
minHeight: height === -1 ?
|
|
50
|
+
minHeight: height === -1 ? "auto" : height
|
|
44
51
|
}
|
|
45
52
|
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
46
53
|
condition: data.length === 0
|
|
@@ -52,7 +59,7 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
52
59
|
alt: ""
|
|
53
60
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
54
61
|
className: "".concat(prefix, "__empty-text")
|
|
55
|
-
}, (0, _getLocale.getLocale)(
|
|
62
|
+
}, (0, _getLocale.getLocale)("OKR_Noinformation")))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
56
63
|
condition: data.length !== 0
|
|
57
64
|
}, /*#__PURE__*/_react["default"].createElement(_rcQueueAnim["default"], {
|
|
58
65
|
type: "bottom",
|
|
@@ -61,7 +68,7 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
61
68
|
animConfig: [{
|
|
62
69
|
opacity: [1, 0]
|
|
63
70
|
}, {
|
|
64
|
-
display:
|
|
71
|
+
display: "none"
|
|
65
72
|
}]
|
|
66
73
|
}, data.map(function (item) {
|
|
67
74
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -72,7 +79,7 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
72
79
|
onDeleteFeed: handleDeleteFeed,
|
|
73
80
|
dynamicShareIsShowToping: dynamicShareIsShowToping
|
|
74
81
|
}));
|
|
75
|
-
}))));
|
|
82
|
+
})))));
|
|
76
83
|
};
|
|
77
84
|
|
|
78
85
|
var _default = DynamicList;
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports["default"] = void 0;
|
|
9
7
|
|
|
10
|
-
var
|
|
8
|
+
var _dynamicList = _interopRequireDefault(require("./dynamic-list"));
|
|
9
|
+
|
|
10
|
+
var _dynamicItem = _interopRequireDefault(require("./dynamic-item"));
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
var _context = require("./context");
|
|
13
13
|
|
|
14
|
-
function
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
_exportModule["default"].QuickOperation = _exportModule.DynamicQuickOperation;
|
|
21
|
-
_exportModule["default"].Topping = _exportModule.DynamicTopping;
|
|
22
|
-
var _default = _exportModule["default"];
|
|
16
|
+
var Dynamic = _dynamicList["default"];
|
|
17
|
+
Dynamic.Item = _dynamicItem["default"];
|
|
18
|
+
Dynamic.SearchKeyContext = _context.SearchKeyContext;
|
|
19
|
+
var _default = Dynamic;
|
|
23
20
|
exports["default"] = _default;
|
|
@@ -3,105 +3,44 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.topDynamic = exports.
|
|
6
|
+
exports.topDynamic = exports.deleteDynamic = exports.collectDynamic = exports.cancelTopDynamic = exports.cancelCollectDynamic = void 0;
|
|
7
7
|
|
|
8
8
|
var _request = require("../../utils/request");
|
|
9
9
|
|
|
10
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
-
|
|
12
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
-
|
|
14
|
-
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; }
|
|
15
|
-
|
|
16
10
|
// @ts-ignore
|
|
17
11
|
var userId = BSGlobal && BSGlobal.loginUserInfo.Id || 0;
|
|
18
12
|
|
|
19
13
|
var topDynamic = function topDynamic(_ref) {
|
|
20
14
|
var feedId = _ref.feedId;
|
|
21
|
-
return (0, _request.rget)(
|
|
15
|
+
return (0, _request.rget)('v2')("user/feednew/setTop?feedId=".concat(feedId));
|
|
22
16
|
};
|
|
23
17
|
|
|
24
18
|
exports.topDynamic = topDynamic;
|
|
25
19
|
|
|
26
20
|
var cancelTopDynamic = function cancelTopDynamic(_ref2) {
|
|
27
21
|
var feedId = _ref2.feedId;
|
|
28
|
-
return (0, _request.rget)(
|
|
22
|
+
return (0, _request.rget)('v2')("user/feednew/cancelTop?feedId=".concat(feedId));
|
|
29
23
|
};
|
|
30
24
|
|
|
31
25
|
exports.cancelTopDynamic = cancelTopDynamic;
|
|
32
26
|
|
|
33
27
|
var collectDynamic = function collectDynamic(_ref3) {
|
|
34
28
|
var feedId = _ref3.feedId;
|
|
35
|
-
return (0, _request.rput)(
|
|
29
|
+
return (0, _request.rput)('v2')("user/feed/Collect?feed_id=".concat(feedId));
|
|
36
30
|
};
|
|
37
31
|
|
|
38
32
|
exports.collectDynamic = collectDynamic;
|
|
39
33
|
|
|
40
34
|
var cancelCollectDynamic = function cancelCollectDynamic(_ref4) {
|
|
41
35
|
var feedId = _ref4.feedId;
|
|
42
|
-
return (0, _request.rdelete)(
|
|
36
|
+
return (0, _request.rdelete)('v2')("user/feed/CancelCollect?feed_id=".concat(feedId));
|
|
43
37
|
};
|
|
44
38
|
|
|
45
39
|
exports.cancelCollectDynamic = cancelCollectDynamic;
|
|
46
40
|
|
|
47
41
|
var deleteDynamic = function deleteDynamic(_ref5) {
|
|
48
42
|
var feedId = _ref5.feedId;
|
|
49
|
-
return (0, _request.rdelete)(
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
exports.deleteDynamic = deleteDynamic;
|
|
53
|
-
|
|
54
|
-
var getPraise = function getPraise(_ref6) {
|
|
55
|
-
var objId = _ref6.objId,
|
|
56
|
-
_ref6$start = _ref6.start,
|
|
57
|
-
start = _ref6$start === void 0 ? "" : _ref6$start,
|
|
58
|
-
_ref6$count = _ref6.count,
|
|
59
|
-
count = _ref6$count === void 0 ? 5 : _ref6$count,
|
|
60
|
-
_ref6$objType = _ref6.objType,
|
|
61
|
-
objType = _ref6$objType === void 0 ? 10 : _ref6$objType;
|
|
62
|
-
return (0, _request.rget)("v1")("praise/get?objId=".concat(objId, "&start=&count=").concat(count, "&objType=").concat(objType));
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
exports.getPraise = getPraise;
|
|
66
|
-
|
|
67
|
-
var getRanking = function getRanking(data) {
|
|
68
|
-
return (0, _request.rpost)("v1")("praise/getRanking", data);
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
exports.getRanking = getRanking;
|
|
72
|
-
|
|
73
|
-
var getLeastPariseInfo = function getLeastPariseInfo() {
|
|
74
|
-
return (0, _request.rget)("v1")("praise/getLeastPariseInfo?count=10");
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
exports.getLeastPariseInfo = getLeastPariseInfo;
|
|
78
|
-
|
|
79
|
-
var getMenu = function getMenu() {
|
|
80
|
-
return (0, _request.rget)("v2")("feed/FeedTabMenus");
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
exports.getMenu = getMenu;
|
|
84
|
-
|
|
85
|
-
var getDynamicFeedList = function getDynamicFeedList() {
|
|
86
|
-
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
87
|
-
PageSize: 20,
|
|
88
|
-
PageNum: 1,
|
|
89
|
-
KeyWord: "",
|
|
90
|
-
ChannelIds: "",
|
|
91
|
-
Domain: "",
|
|
92
|
-
TitaHost: "",
|
|
93
|
-
RequestSource: 0,
|
|
94
|
-
CommentCount: 3
|
|
95
|
-
};
|
|
96
|
-
return (0, _request.rpost)("v2")("feed/feeds", _objectSpread(_objectSpread({}, data), {}, {
|
|
97
|
-
CommentCount: 3
|
|
98
|
-
}));
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
exports.getDynamicFeedList = getDynamicFeedList;
|
|
102
|
-
|
|
103
|
-
var getAdvertise = function getAdvertise() {
|
|
104
|
-
return (0, _request.rget)("v1")("operationAd/getByTerminalType?terminalType=1");
|
|
43
|
+
return (0, _request.rdelete)('v2')("user/feed/Delete?feed_id=".concat(feedId));
|
|
105
44
|
};
|
|
106
45
|
|
|
107
|
-
exports.
|
|
46
|
+
exports.deleteDynamic = deleteDynamic;
|
|
@@ -45,7 +45,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
45
45
|
|
|
46
46
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
47
|
|
|
48
|
-
var prefix =
|
|
48
|
+
var prefix = "titaui-nav-top-menu";
|
|
49
49
|
var popupAlign = {
|
|
50
50
|
offset: [0, 5],
|
|
51
51
|
overflow: {
|
|
@@ -62,7 +62,7 @@ var NewFeatureGuidePopupAlign = {
|
|
|
62
62
|
},
|
|
63
63
|
targetOffset: [0, 0]
|
|
64
64
|
};
|
|
65
|
-
var NEWMENUS =
|
|
65
|
+
var NEWMENUS = "#/interview";
|
|
66
66
|
|
|
67
67
|
var Menu = function Menu(_ref) {
|
|
68
68
|
var menus = _ref.menus,
|
|
@@ -83,7 +83,7 @@ var Menu = function Menu(_ref) {
|
|
|
83
83
|
feedNum = _useGlobalValue2[0];
|
|
84
84
|
|
|
85
85
|
var containerRef = (0, _react.useRef)();
|
|
86
|
-
var apiPath = (0, _bsGlobal.getBSGlobal)(
|
|
86
|
+
var apiPath = (0, _bsGlobal.getBSGlobal)("apiPath");
|
|
87
87
|
var userId = (0, _bsGlobal.getUserInfo)().Id;
|
|
88
88
|
|
|
89
89
|
var handlePopupVisibleChange = function handlePopupVisibleChange(visible) {
|
|
@@ -92,10 +92,10 @@ var Menu = function Menu(_ref) {
|
|
|
92
92
|
|
|
93
93
|
var handleTracker = function handleTracker(menu) {
|
|
94
94
|
if (window.titaTracker) {
|
|
95
|
-
window.titaTracker(
|
|
95
|
+
window.titaTracker("action").record({
|
|
96
96
|
actionName: "\u5BFC\u822A\u83DC\u5355__".concat(menu.title),
|
|
97
|
-
actionGroup:
|
|
98
|
-
productName:
|
|
97
|
+
actionGroup: "导航菜单",
|
|
98
|
+
productName: "导航菜单"
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
};
|
|
@@ -133,7 +133,7 @@ var Menu = function Menu(_ref) {
|
|
|
133
133
|
var renderRawItem = function renderRawItem(menu) {
|
|
134
134
|
var href = menu.href;
|
|
135
135
|
|
|
136
|
-
if (menu.title ===
|
|
136
|
+
if (menu.title === "Learning") {
|
|
137
137
|
href = "".concat(apiPath, "/").concat(userId, "/eLearningHome#/");
|
|
138
138
|
}
|
|
139
139
|
|
|
@@ -145,8 +145,9 @@ var Menu = function Menu(_ref) {
|
|
|
145
145
|
popupVisible: !isKnow,
|
|
146
146
|
popup: menu.href === NEWMENUS ? popup : null,
|
|
147
147
|
mask: false,
|
|
148
|
-
action: [
|
|
149
|
-
popupAlign: NewFeatureGuidePopupAlign
|
|
148
|
+
action: ["focus"],
|
|
149
|
+
popupAlign: NewFeatureGuidePopupAlign,
|
|
150
|
+
zIndex: 1201
|
|
150
151
|
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
151
152
|
className: (0, _classnames["default"])("".concat(prefix, "__menu-show"), _defineProperty({}, "".concat(prefix, "__menu-show--active"), activeMenuId === menu.id)),
|
|
152
153
|
href: href,
|
|
@@ -154,10 +155,11 @@ var Menu = function Menu(_ref) {
|
|
|
154
155
|
onClick: function onClick() {
|
|
155
156
|
return handleTracker(menu);
|
|
156
157
|
}
|
|
157
|
-
}, menu.title, menu.href ===
|
|
158
|
-
className: (0, _classnames["default"])("".concat(prefix, "__menu--hasNum"), _defineProperty({}, "".concat(prefix, "__menu--hasNum-active"), activeMenuId === menu.id && menu.href ===
|
|
159
|
-
}, feedNum > 100 ?
|
|
158
|
+
}, menu.title, menu.href === "#dynamic" && feedNum > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
159
|
+
className: (0, _classnames["default"])("".concat(prefix, "__menu--hasNum"), _defineProperty({}, "".concat(prefix, "__menu--hasNum-active"), activeMenuId === menu.id && menu.href === "#dynamic"))
|
|
160
|
+
}, feedNum > 100 ? "99+" : feedNum), menu.href === NEWMENUS && /*#__PURE__*/_react["default"].createElement("img", {
|
|
160
161
|
src: _new["default"],
|
|
162
|
+
alt: "",
|
|
161
163
|
className: "".concat(prefix, "__tips-new")
|
|
162
164
|
})))));
|
|
163
165
|
};
|
|
@@ -173,7 +175,7 @@ var Menu = function Menu(_ref) {
|
|
|
173
175
|
}, items.map(function (menu) {
|
|
174
176
|
var href = menu.href;
|
|
175
177
|
|
|
176
|
-
if (menu.title ===
|
|
178
|
+
if (menu.title === "Learning") {
|
|
177
179
|
href = "".concat(apiPath, "/").concat(userId, "/eLearningHome#/");
|
|
178
180
|
}
|
|
179
181
|
|
|
@@ -194,7 +196,7 @@ var Menu = function Menu(_ref) {
|
|
|
194
196
|
popupPlacement: "bottomLeft",
|
|
195
197
|
popupAlign: popupAlign
|
|
196
198
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
197
|
-
className: (0, _classnames["default"])(
|
|
199
|
+
className: (0, _classnames["default"])("tu-icon-diot", "".concat(prefix, "__more-icon"), _defineProperty({}, "".concat(prefix, "__more-icon--active"), isActiveHideMeun))
|
|
198
200
|
}));
|
|
199
201
|
};
|
|
200
202
|
|
|
@@ -27,12 +27,12 @@ var _version = _interopRequireDefault(require("./components/version"));
|
|
|
27
27
|
|
|
28
28
|
var _utils = require("./utils");
|
|
29
29
|
|
|
30
|
-
require("./index.css");
|
|
31
|
-
|
|
32
30
|
var _request = require("../../utils/request");
|
|
33
31
|
|
|
34
32
|
var _toast = _interopRequireDefault(require("../toast"));
|
|
35
33
|
|
|
34
|
+
require("./index.css");
|
|
35
|
+
|
|
36
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
37
37
|
|
|
38
38
|
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); }
|
|
@@ -47,7 +47,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
47
47
|
|
|
48
48
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
49
49
|
|
|
50
|
-
var ConfirmWrapper = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* TODO padding \u53EF\u52A8\u6001\u8C03\u6574 */\n width: 300px;\n max-height: 100px;\n border-radius: 5px;\n box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.15);\n padding: 15px 12px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n background-color: #fff;\n"])));
|
|
50
|
+
var ConfirmWrapper = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* TODO padding \u53EF\u52A8\u6001\u8C03\u6574 */\n width: 300px;\n // max-height: 100px;\n border-radius: 5px;\n box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.15);\n padding: 15px 12px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n background-color: #fff;\n"])));
|
|
51
51
|
|
|
52
52
|
var FooterWrapper = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-top: 5px;\n button {\n padding: 2px 12px;\n font-size: 12px;\n }\n"])));
|
|
53
53
|
|
|
@@ -84,12 +84,12 @@ function Elist(props, ref) {
|
|
|
84
84
|
krList = _useState2[0],
|
|
85
85
|
setKrList = _useState2[1];
|
|
86
86
|
|
|
87
|
-
var _useState3 = (0, _react.useState)(hasCondition ? JSON.parse(localStorage.getItem("okrDrawerECheckedStatus".concat(loginUser))) : []),
|
|
87
|
+
var _useState3 = (0, _react.useState)(hasCondition ? JSON.parse(localStorage.getItem("okrDrawerECheckedStatus".concat(loginUser)) || '[]') : []),
|
|
88
88
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
89
89
|
checkedStatus = _useState4[0],
|
|
90
90
|
setCheckedStatus = _useState4[1];
|
|
91
91
|
|
|
92
|
-
var _useState5 = (0, _react.useState)(hasCondition ? JSON.parse(localStorage.getItem("okrDrawerESelectUsers".concat(loginUser))) : []),
|
|
92
|
+
var _useState5 = (0, _react.useState)(hasCondition ? JSON.parse(localStorage.getItem("okrDrawerESelectUsers".concat(loginUser)) || '[]') : []),
|
|
93
93
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
94
94
|
selectUsers = _useState6[0],
|
|
95
95
|
setSelectUsers = _useState6[1];
|
|
@@ -41,12 +41,9 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
41
41
|
|
|
42
42
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
43
43
|
|
|
44
|
-
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }
|
|
45
|
-
|
|
46
44
|
var prefix = "publish-dynamic-modal";
|
|
47
|
-
|
|
48
|
-
var
|
|
49
|
-
_objectDestructuringEmpty(_ref);
|
|
45
|
+
var PublishDynamicModal = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
46
|
+
var onSubmitSuccess = _ref.onSubmitSuccess;
|
|
50
47
|
|
|
51
48
|
var _useState = (0, _react.useState)(false),
|
|
52
49
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -82,10 +79,10 @@ var PublishDynamicModal = function PublishDynamicModal(_ref) {
|
|
|
82
79
|
localStorage.removeItem("mblogLocalStroage_".concat((0, _bsGlobal.getUserInfo)().Id, "_commentsTypeKey_").concat(isShare ? "share" : "announcement"));
|
|
83
80
|
setVisible(false);
|
|
84
81
|
setSubmitStatus(1);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
82
|
+
|
|
83
|
+
if (onSubmitSuccess) {
|
|
84
|
+
onSubmitSuccess();
|
|
85
|
+
}
|
|
89
86
|
} else {
|
|
90
87
|
_toast["default"].Error(resp.Message, {
|
|
91
88
|
canClose: false
|
|
@@ -146,6 +143,13 @@ var PublishDynamicModal = function PublishDynamicModal(_ref) {
|
|
|
146
143
|
setVisible(true);
|
|
147
144
|
};
|
|
148
145
|
|
|
146
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
147
|
+
return {
|
|
148
|
+
hide: hidePublishDynamicModal,
|
|
149
|
+
showShareModal: showPublishShareDynamicModal,
|
|
150
|
+
showAnnouncementModal: showPublishAnnouncementDynamicModal
|
|
151
|
+
};
|
|
152
|
+
});
|
|
149
153
|
(0, _react.useEffect)(function () {
|
|
150
154
|
// @ts-ignore
|
|
151
155
|
window.hidePublishDynamicModal = hidePublishDynamicModal; // @ts-ignore
|
|
@@ -188,7 +192,9 @@ var PublishDynamicModal = function PublishDynamicModal(_ref) {
|
|
|
188
192
|
,
|
|
189
193
|
onMblogSubmit: onMblogSubmit
|
|
190
194
|
})));
|
|
195
|
+
});
|
|
196
|
+
PublishDynamicModal.defaultProps = {
|
|
197
|
+
onSubmitSuccess: function onSubmitSuccess() {}
|
|
191
198
|
};
|
|
192
|
-
|
|
193
199
|
var _default = PublishDynamicModal;
|
|
194
200
|
exports["default"] = _default;
|