@titaui/pc 1.16.17 → 1.16.20-beta.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.
@@ -52,9 +52,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
52
52
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
53
53
 
54
54
  var visibilityList = [{
55
- value: 1,
56
- lable: (0, _getLocale.getLocale)("OKR_MyO_Pop_Public")
57
- }, {
58
55
  value: 2,
59
56
  lable: (0, _getLocale.getLocale)("OKR_MyO_From_Associatedmem")
60
57
  }, {
@@ -65,12 +62,19 @@ var visibilityList = [{
65
62
  lable: (0, _getLocale.getLocale)("OKR_MyO_Pop_Specified")
66
63
  }];
67
64
 
65
+ if (window.BSGlobal.tenantInfo.isOpenInfo) {
66
+ visibilityList.unshift({
67
+ value: 1,
68
+ lable: (0, _getLocale.getLocale)("OKR_MyO_Pop_Public")
69
+ });
70
+ }
71
+
68
72
  function _default(_ref) {
69
73
  var _ref$canEdit = _ref.canEdit,
70
74
  canEdit = _ref$canEdit === void 0 ? false : _ref$canEdit,
71
75
  workId = _ref.workId,
72
76
  _ref$visibilityProp = _ref.visibilityProp,
73
- visibilityProp = _ref$visibilityProp === void 0 ? 1 : _ref$visibilityProp,
77
+ visibilityProp = _ref$visibilityProp === void 0 ? 2 : _ref$visibilityProp,
74
78
  _ref$visiableScopePro = _ref.visiableScopeProp,
75
79
  visiableScopeProp = _ref$visiableScopePro === void 0 ? {} : _ref$visiableScopePro,
76
80
  onSave = _ref.onSave;
@@ -29,10 +29,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
29
29
  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; }
30
30
 
31
31
  var visibilityList = function visibilityList() {
32
- return [{
33
- value: 1,
34
- lable: (0, _getLocale.getLocale)("OKR_MyO_Pop_Public")
35
- }, {
32
+ var visibility = [{
36
33
  value: 2,
37
34
  lable: (0, _getLocale.getLocale)("OKR_MyO_From_Associatedmem")
38
35
  }, {
@@ -42,6 +39,15 @@ var visibilityList = function visibilityList() {
42
39
  value: 4,
43
40
  lable: (0, _getLocale.getLocale)("OKR_MyO_Pop_Specified")
44
41
  }];
42
+
43
+ if (window.BSGlobal.tenantInfo.isOpenInfo) {
44
+ visibility.unshift({
45
+ value: 1,
46
+ lable: (0, _getLocale.getLocale)("OKR_MyO_Pop_Public")
47
+ });
48
+ }
49
+
50
+ return visibility;
45
51
  };
46
52
 
47
53
  var visibilityMapText = function visibilityMapText() {
@@ -219,7 +219,7 @@ function CreateOkrModal(_ref, ref) {
219
219
  setOkrClassify = _useState20[1]; // 目标类别
220
220
 
221
221
 
222
- var _useState21 = (0, _react.useState)(1),
222
+ var _useState21 = (0, _react.useState)(2),
223
223
  _useState22 = _slicedToArray(_useState21, 2),
224
224
  visibility = _useState22[0],
225
225
  setVisibility = _useState22[1]; // 可见性
@@ -678,7 +678,7 @@ function CreateOkrModal(_ref, ref) {
678
678
  });
679
679
  setCycle(cycle);
680
680
  setOkrClassify(undefined);
681
- setVisibility(1);
681
+ setVisibility(2);
682
682
  setParent({
683
683
  parentWorkId: 0,
684
684
  parentWorkName: '',
@@ -1,13 +1,15 @@
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
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
8
  exports["default"] = void 0;
7
9
 
8
- var _react = _interopRequireDefault(require("react"));
10
+ var _react = _interopRequireWildcard(require("react"));
9
11
 
10
- var _supersetCharts = _interopRequireDefault(require("../../../superset-charts"));
12
+ var _skynetDynamicComponent = _interopRequireDefault(require("skynet-dynamic-component"));
11
13
 
12
14
  var _utils = require("../dynamic-chart/utils");
13
15
 
@@ -15,11 +17,27 @@ var _dynamicFooter = _interopRequireDefault(require("./dynamic-footer"));
15
17
 
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
19
 
20
+ 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); }
21
+
22
+ 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; }
23
+
18
24
  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); }
19
25
 
26
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
+
28
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
29
+
30
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
31
+
32
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
33
+
34
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
35
+
36
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
+
20
38
  var prefixCls = "titaui-dynamic-item";
21
39
 
22
- var DynamicAIDialy = function DynamicAIDialy(_ref) {
40
+ var DynamicDiscovery = function DynamicDiscovery(_ref) {
23
41
  var data = _ref.data;
24
42
 
25
43
  var chartQuery = _react["default"].useMemo(function () {
@@ -27,9 +45,24 @@ var DynamicAIDialy = function DynamicAIDialy(_ref) {
27
45
  }, [data.biId]);
28
46
 
29
47
  var feedComponent = chartQuery.feedComponent;
48
+
49
+ var _useState = (0, _react.useState)(false),
50
+ _useState2 = _slicedToArray(_useState, 2),
51
+ loading = _useState2[0],
52
+ setLoading = _useState2[1];
53
+
54
+ var ref = (0, _react.useRef)(null);
55
+ (0, _react.useEffect)(function () {
56
+ // @ts-ignore
57
+ (0, _skynetDynamicComponent["default"])('tita-system-feeds').then(function (res) {
58
+ ref.current = res;
59
+ setLoading(true);
60
+ });
61
+ }, []);
62
+ var FeedDiscovery = ref.current;
30
63
  return /*#__PURE__*/_react["default"].createElement("div", {
31
64
  className: prefixCls
32
- }, /*#__PURE__*/_react["default"].createElement(_supersetCharts["default"], _extends({
65
+ }, loading && /*#__PURE__*/_react["default"].createElement(FeedDiscovery, _extends({
33
66
  feedData: data
34
67
  }, chartQuery, {
35
68
  type: feedComponent
@@ -39,6 +72,6 @@ var DynamicAIDialy = function DynamicAIDialy(_ref) {
39
72
  }));
40
73
  };
41
74
 
42
- var _default = /*#__PURE__*/_react["default"].memo(DynamicAIDialy);
75
+ var _default = /*#__PURE__*/_react["default"].memo(DynamicDiscovery);
43
76
 
44
77
  exports["default"] = _default;
@@ -40,10 +40,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
40
40
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
41
41
 
42
42
  var getVisibilityList = function getVisibilityList() {
43
- return [{
44
- value: 1,
45
- label: (0, _getLocale.getLocale)("OKR_MyO_Pop_Public")
46
- }, {
43
+ var visibility = [{
47
44
  value: 2,
48
45
  label: (0, _getLocale.getLocale)("OKR_MyO_From_Associatedmem")
49
46
  }, {
@@ -53,6 +50,15 @@ var getVisibilityList = function getVisibilityList() {
53
50
  value: 4,
54
51
  label: (0, _getLocale.getLocale)("OKR_MyO_Pop_Specified")
55
52
  }];
53
+
54
+ if (window.BSGlobal.tenantInfo.isOpenInfo) {
55
+ visibility.unshift({
56
+ value: 1,
57
+ label: (0, _getLocale.getLocale)("OKR_MyO_Pop_Public")
58
+ });
59
+ }
60
+
61
+ return visibility;
56
62
  };
57
63
 
58
64
  var getVisibilityMapText = function getVisibilityMapText() {
@@ -95,7 +95,7 @@ function _default(props) {
95
95
  _useState2 = _slicedToArray(_useState, 1),
96
96
  user = _useState2[0];
97
97
 
98
- var _useState3 = (0, _react.useState)(title),
98
+ var _useState3 = (0, _react.useState)(title || data.mileStoneName),
99
99
  _useState4 = _slicedToArray(_useState3, 2),
100
100
  krName = _useState4[0],
101
101
  setKrName = _useState4[1];
@@ -98,10 +98,7 @@ var OkrNameRenderer = function OkrNameRenderer(showCycle, onRefresh) {
98
98
  onClick: onOpendrawer
99
99
  }, /*#__PURE__*/_react["default"].createElement("span", {
100
100
  className: "".concat(preCls, "__okr-icon tu-icon-H5-O-s")
101
- }), /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
102
- overlay: (0, _openData.parseString)(params.value),
103
- placement: "top"
104
- }, /*#__PURE__*/_react["default"].createElement("span", null, (0, _openData.parseString)(params.value))), showCycle && /*#__PURE__*/_react["default"].createElement(_tag["default"], {
101
+ }), (0, _openData.parseString)(params.value), showCycle && /*#__PURE__*/_react["default"].createElement(_tag["default"], {
105
102
  backgroundColor: "rgba(40,121,255,.16)",
106
103
  color: "#3f4755"
107
104
  }, formatCycleData(period, false)), /*#__PURE__*/_react["default"].createElement(_okrTypeIcon["default"], {
@@ -40,19 +40,25 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
40
40
  var prefix = 'tita-okr-excel-create-visibility';
41
41
 
42
42
  var getVisibilityList = function getVisibilityList() {
43
- return [{
44
- value: 1,
45
- label: (0, _getLocale.getLocale)('OKR_MyO_Pop_Public')
46
- }, {
43
+ var visibility = [{
47
44
  value: 2,
48
- label: (0, _getLocale.getLocale)('OKR_MyO_From_Associatedmem')
45
+ label: (0, _getLocale.getLocale)("OKR_MyO_From_Associatedmem")
49
46
  }, {
50
47
  value: 3,
51
- label: (0, _getLocale.getLocale)('OKR_MyO_Pop_Directrep')
48
+ label: (0, _getLocale.getLocale)("OKR_MyO_Pop_Directrep")
52
49
  }, {
53
50
  value: 4,
54
- label: (0, _getLocale.getLocale)('OKR_MyO_Pop_Specified')
51
+ label: (0, _getLocale.getLocale)("OKR_MyO_Pop_Specified")
55
52
  }];
53
+
54
+ if (window.BSGlobal.tenantInfo.isOpenInfo) {
55
+ visibility.unshift({
56
+ value: 1,
57
+ label: (0, _getLocale.getLocale)("OKR_MyO_Pop_Public")
58
+ });
59
+ }
60
+
61
+ return visibility;
56
62
  };
57
63
 
58
64
  var getVisibilityMapText = function getVisibilityMapText() {
@@ -40,19 +40,25 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
40
40
  var prefix = 'tita-okr-excel-create-visibility';
41
41
 
42
42
  var getVisibilityList = function getVisibilityList() {
43
- return [{
44
- value: 1,
45
- label: (0, _getLocale.getLocale)('OKR_MyO_Pop_Public')
46
- }, {
43
+ var visibility = [{
47
44
  value: 2,
48
- label: (0, _getLocale.getLocale)('OKR_MyO_From_Associatedmem')
45
+ label: (0, _getLocale.getLocale)("OKR_MyO_From_Associatedmem")
49
46
  }, {
50
47
  value: 3,
51
- label: (0, _getLocale.getLocale)('OKR_MyO_Pop_Directrep')
48
+ label: (0, _getLocale.getLocale)("OKR_MyO_Pop_Directrep")
52
49
  }, {
53
50
  value: 4,
54
- label: (0, _getLocale.getLocale)('OKR_MyO_Pop_Specified')
51
+ label: (0, _getLocale.getLocale)("OKR_MyO_Pop_Specified")
55
52
  }];
53
+
54
+ if (window.BSGlobal.tenantInfo.isOpenInfo) {
55
+ visibility.unshift({
56
+ value: 1,
57
+ label: (0, _getLocale.getLocale)("OKR_MyO_Pop_Public")
58
+ });
59
+ }
60
+
61
+ return visibility;
56
62
  };
57
63
 
58
64
  var getVisibilityMapText = function getVisibilityMapText() {
@@ -114,7 +114,7 @@ var getIitData = function getIitData(_ref) {
114
114
  workName: '',
115
115
  isSaved: false,
116
116
  workNameRichText: '',
117
- visibility: 1,
117
+ visibility: 2,
118
118
  visibilityScope: undefined,
119
119
  departmentId: loginUser.DepartmentId,
120
120
  departmentName: loginUser.Department,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.16.17",
3
+ "version": "1.16.20-beta.1",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
@@ -157,6 +157,7 @@
157
157
  "react-spring": "9.2.4",
158
158
  "react-transition-group": "4.4.2",
159
159
  "resize-observer-polyfill": "1.5.1",
160
+ "skynet-dynamic-component": "^1.0.2",
160
161
  "slick-carousel": "1.8.1",
161
162
  "sortablejs": "^1.12.0",
162
163
  "tita-ui": "1.2.56",