@titaui/pc 1.11.3 → 1.11.4-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.
Files changed (176) hide show
  1. package/lib/components/avatar/text-avatar/index.css +7 -0
  2. package/lib/components/avatar/text-avatar/index.js +32 -7
  3. package/lib/components/button/icon-btn/index.js +17 -8
  4. package/lib/components/button/rect-btn/index.js +7 -7
  5. package/lib/components/change-okr-modal/Item.js +15 -15
  6. package/lib/components/communication/index.js +30 -29
  7. package/lib/components/drawer/index.js +7 -6
  8. package/lib/components/drop-selector/index.js +25 -10
  9. package/lib/components/dynamic/constant.js +43 -36
  10. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +243 -0
  11. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +6 -2
  12. package/lib/components/dynamic/dynamic-item/dynamic-interview/img/wifi.svg +24 -0
  13. package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +51 -0
  14. package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +50 -0
  15. package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +65 -0
  16. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
  17. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
  18. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +61 -0
  19. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
  20. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +6 -6
  21. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +7 -7
  22. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +11 -11
  23. package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +14 -14
  24. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +10 -10
  25. package/lib/components/dynamic/dynamic-item/index.js +70 -41
  26. package/lib/components/dynamic/dynamic-list/index.js +5 -13
  27. package/lib/components/e-priority/index.js +18 -12
  28. package/lib/components/eReport/eReportShare/index.js +11 -11
  29. package/lib/components/file-list/components/single-file/index.js +11 -11
  30. package/lib/components/form/form-fields/date/index.css +24 -0
  31. package/lib/components/form/form-fields/date/index.js +102 -0
  32. package/lib/components/form/form-fields/input/index.js +10 -10
  33. package/lib/components/form/form-fields/user/index.css +23 -3
  34. package/lib/components/form/form-fields/user/index.js +18 -8
  35. package/lib/components/form/form-fields/user/user-input.js +15 -6
  36. package/lib/components/form/index.js +10 -3
  37. package/lib/components/icon-button-list/index.css +2 -57
  38. package/lib/components/icon-button-list/index.js +10 -7
  39. package/lib/components/img-viewer/index.css +10 -3
  40. package/lib/components/img-viewer/index.js +57 -18
  41. package/lib/components/mblog/index.js +31 -30
  42. package/lib/components/menus/components/menu-tree/images/interview-menu/my-interview.svg +16 -0
  43. package/lib/components/menus/components/menu-tree/images/interview-menu/template.svg +16 -0
  44. package/lib/components/menus/components/menu-tree/images/interview-menu/todo.svg +16 -0
  45. package/lib/components/menus/components/menu-tree/index.css +4 -2
  46. package/lib/components/menus/components/menu-tree/tree-node/index.css +85 -1
  47. package/lib/components/menus/export-modules/interview-menus/constant.js +30 -0
  48. package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +63 -0
  49. package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
  50. package/lib/components/menus/export-modules/interview-menus/index.js +128 -0
  51. package/lib/components/menus/index.js +11 -5
  52. package/lib/components/nav-top/components/menu/index.js +14 -14
  53. package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +25 -19
  54. package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +48 -10
  55. package/lib/components/nav-top/components/user-message/constant.js +1 -0
  56. package/lib/components/nav-top/components/user-message/hrMessage.js +22 -19
  57. package/lib/components/nav-top/components/user-message/index.js +23 -20
  58. package/lib/components/nav-top/request.apis.js +3 -1
  59. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +7 -7
  60. package/lib/components/okr-detail/detail-header/actions.js +62 -66
  61. package/lib/components/okr-detail/detail-header/index.css +2 -2
  62. package/lib/components/okr-detail/detail-header/index.js +205 -194
  63. package/lib/components/okr-detail/index.js +21 -19
  64. package/lib/components/okr-flow/child-node/index.css +67 -21
  65. package/lib/components/okr-flow/child-node/work-node.js +61 -24
  66. package/lib/components/okr-flow/empty/index.css +8 -1
  67. package/lib/components/okr-flow/export-modal/index.js +42 -18
  68. package/lib/components/okr-flow/export-modules/okr-search-panel/index.css +3 -1
  69. package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +30 -24
  70. package/lib/components/okr-flow/images/loading-light.gif +0 -0
  71. package/lib/components/okr-flow/okr-map/index.js +43 -22
  72. package/lib/components/okr-flow/request-apis.js +15 -8
  73. package/lib/components/okr-flow/root-node/index.css +2 -2
  74. package/lib/components/okr-flow/root-node/index.js +26 -25
  75. package/lib/components/okr-flow/utils/index.js +45 -29
  76. package/lib/components/okr-flow/utils/tree-handler.js +29 -18
  77. package/lib/components/okrcase-library/index.css +6 -4
  78. package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +36 -30
  79. package/lib/components/pagination/index.css +3 -3
  80. package/lib/components/pagination/select.css +58 -23
  81. package/lib/components/period-selector/index.css +9 -3
  82. package/lib/components/period-selector/index.js +14 -11
  83. package/lib/components/picker/components/panels/date-panel/date-body.js +118 -0
  84. package/lib/components/picker/components/panels/date-panel/date-head.js +87 -0
  85. package/lib/components/picker/components/panels/date-panel/index.css +14 -0
  86. package/lib/components/picker/components/panels/date-panel/index.js +49 -0
  87. package/lib/components/picker/components/panels/month-panel/index.css +27 -0
  88. package/lib/components/picker/components/panels/month-panel/index.js +63 -0
  89. package/lib/components/picker/components/panels/month-panel/month-body.js +89 -0
  90. package/lib/components/picker/components/panels/month-panel/month-head.js +47 -0
  91. package/lib/components/picker/components/panels/panel-body/index.js +53 -0
  92. package/lib/components/picker/components/panels/panel-head/index.js +48 -0
  93. package/lib/components/picker/components/panels/year-panel/index.css +23 -0
  94. package/lib/components/picker/components/panels/year-panel/index.js +65 -0
  95. package/lib/components/picker/components/panels/year-panel/year-body.js +92 -0
  96. package/lib/components/picker/components/panels/year-panel/year-head.js +35 -0
  97. package/lib/components/picker/components/picker-trigger/index.css +57 -0
  98. package/lib/components/picker/components/picker-trigger/index.js +94 -0
  99. package/lib/components/picker/context.js +15 -0
  100. package/lib/components/picker/index.css +121 -0
  101. package/lib/components/picker/index.js +13 -0
  102. package/lib/components/picker/picker-panels.js +182 -0
  103. package/lib/components/picker/picker.js +132 -0
  104. package/lib/components/picker/type.js +5 -0
  105. package/lib/components/picker/utils.js +28 -0
  106. package/lib/components/popup/index.js +4 -4
  107. package/lib/components/radio/index.css +9 -9
  108. package/lib/components/scroll-container/index.js +423 -0
  109. package/lib/components/scroll-container/style.css +35 -0
  110. package/lib/components/scrollbar/scroll-mask/index.js +1 -1
  111. package/lib/components/superset-charts/components/chart/index.js +1 -1
  112. package/lib/components/superset-charts/utils/axios.js +5 -13
  113. package/lib/components/survey-model/contact.js +93 -0
  114. package/lib/components/survey-model/index.css +141 -0
  115. package/lib/components/survey-model/index.js +265 -0
  116. package/lib/components/survey-model/instance.js +86 -0
  117. package/lib/components/survey-model/request-api.js +80 -0
  118. package/lib/components/task-tree/helper.js +61 -0
  119. package/lib/components/task-tree/images/P1.svg +15 -0
  120. package/lib/components/task-tree/images/P2.svg +15 -0
  121. package/lib/components/task-tree/images/P3.svg +15 -0
  122. package/lib/components/task-tree/images/P4.svg +15 -0
  123. package/lib/components/task-tree/images/P5.svg +15 -0
  124. package/lib/components/task-tree/images/arrow.svg +9 -0
  125. package/lib/components/task-tree/images/empty-131.png +0 -0
  126. package/lib/components/task-tree/images/followed.svg +33 -0
  127. package/lib/components/task-tree/images/nice.svg +108 -0
  128. package/lib/components/task-tree/images/struc12.png +0 -0
  129. package/lib/components/task-tree/images/struc2.png +0 -0
  130. package/lib/components/task-tree/images/xialat-s.svg +13 -0
  131. package/lib/components/task-tree/index.js +22 -0
  132. package/lib/components/task-tree/mock.js +944 -0
  133. package/lib/components/task-tree/precls.js +8 -0
  134. package/lib/components/task-tree/request-apis.js +88 -0
  135. package/lib/components/task-tree/task-item-node/constant.js +45 -0
  136. package/lib/components/task-tree/task-item-node/e-empty.js +29 -0
  137. package/lib/components/task-tree/task-item-node/e-project.js +212 -0
  138. package/lib/components/task-tree/task-item-node/e-status-dropdown.js +94 -0
  139. package/lib/components/task-tree/task-item-node/e-task.js +426 -0
  140. package/lib/components/task-tree/task-item-node/get-process-color.js +62 -0
  141. package/lib/components/task-tree/task-item-node/index.css +289 -0
  142. package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
  143. package/lib/components/task-tree/task-tree.css +16 -0
  144. package/lib/components/task-tree/task-tree.js +49 -0
  145. package/lib/components/time-picker/index.css +123 -0
  146. package/lib/components/time-picker/index.js +13 -0
  147. package/lib/components/time-picker/time-picker-selector.js +138 -0
  148. package/lib/components/time-picker/time-picker.js +324 -0
  149. package/lib/components/time-picker/timer-picker-input.js +94 -0
  150. package/lib/components/time-picker/utils.js +52 -0
  151. package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
  152. package/lib/components/wechat-btn/index.css +14 -0
  153. package/lib/components/wechat-btn/index.js +338 -0
  154. package/lib/components-v1/radio/radio.js +3 -3
  155. package/lib/components-v1/radio/style/index.css +8 -8
  156. package/lib/index.js +101 -77
  157. package/lib/pages/aha2021/index.js +5 -1
  158. package/lib/pages/okr-map/export-modules/okr-map/header/index.css +7 -2
  159. package/lib/pages/okr-map/export-modules/okr-map/header/index.js +73 -34
  160. package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +65 -42
  161. package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +26 -14
  162. package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +58 -13
  163. package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +28 -20
  164. package/lib/pages/okr-map/number-select/index.css +12 -9
  165. package/lib/pages/okr-map/number-select/index.js +3 -3
  166. package/lib/utils/auth.js +65 -8
  167. package/lib/utils/bs-global.js +18 -6
  168. package/lib/utils/hooks.js +72 -0
  169. package/lib/utils/open-data.js +63 -43
  170. package/package.json +6 -2
  171. package/.eslintignore +0 -3
  172. package/.eslintrc.js +0 -223
  173. package/.husky/pre-commit +0 -4
  174. package/.prettierignore +0 -31
  175. package/.prettierrc.js +0 -90
  176. package/.vscode/settings.json +0 -5
@@ -43,7 +43,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
43
43
 
44
44
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
45
45
 
46
- var preCls = "form-field-input";
46
+ var preCls = 'form-field-input';
47
47
 
48
48
  function OverlayInner(_ref) {
49
49
  var hasError = _ref.hasError,
@@ -52,12 +52,12 @@ function OverlayInner(_ref) {
52
52
  activeTips = _ref.activeTips;
53
53
  if (hasActive) return /*#__PURE__*/_react["default"].createElement("span", {
54
54
  style: {
55
- color: "#3F4755"
55
+ color: '#3F4755'
56
56
  }
57
57
  }, activeTips);
58
58
  if (hasError) return /*#__PURE__*/_react["default"].createElement("span", {
59
59
  style: {
60
- color: "#F05E5E"
60
+ color: '#F05E5E'
61
61
  }
62
62
  }, tip);
63
63
  return /*#__PURE__*/_react["default"].createElement("span", null);
@@ -79,7 +79,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
79
79
  layout = props.layout,
80
80
  onCheckSuccess = props.onCheckSuccess,
81
81
  _props$className = props.className,
82
- className = _props$className === void 0 ? "" : _props$className,
82
+ className = _props$className === void 0 ? '' : _props$className,
83
83
  tail = props.tail,
84
84
  restProps = _objectWithoutProperties(props, _excluded);
85
85
 
@@ -95,12 +95,12 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
95
95
  hasActive = _useState4[0],
96
96
  setHasActive = _useState4[1];
97
97
 
98
- var _useState5 = (0, _react.useState)(""),
98
+ var _useState5 = (0, _react.useState)(''),
99
99
  _useState6 = _slicedToArray(_useState5, 2),
100
100
  tip = _useState6[0],
101
101
  setTip = _useState6[1];
102
102
 
103
- var _useState7 = (0, _react.useState)(props.value || ""),
103
+ var _useState7 = (0, _react.useState)(props.value || ''),
104
104
  _useState8 = _slicedToArray(_useState7, 2),
105
105
  value = _useState8[0],
106
106
  setValue = _useState8[1];
@@ -133,7 +133,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
133
133
 
134
134
  var onInputFocusHandler = function onInputFocusHandler() {
135
135
  setHasActive(true);
136
- if (type && type == "number") return;
136
+ if (type && type == 'number') return;
137
137
  inputRef.current.setSelectionRange(9999999, 9999999);
138
138
  };
139
139
 
@@ -147,7 +147,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
147
147
  setTip(errors[0].tip);
148
148
  } else {
149
149
  setHasError(false);
150
- setTip("");
150
+ setTip('');
151
151
  }
152
152
  };
153
153
 
@@ -196,7 +196,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
196
196
  };
197
197
  });
198
198
  return /*#__PURE__*/_react["default"].createElement("div", {
199
- className: (0, _classnames["default"])(preCls, _defineProperty({}, "".concat(preCls, "-row"), layout === "row"), className)
199
+ className: (0, _classnames["default"])(preCls, _defineProperty({}, "".concat(preCls, "-row"), layout === 'row'), className)
200
200
  }, !!label && /*#__PURE__*/_react["default"].createElement("div", {
201
201
  className: (0, _classnames["default"])("".concat(preCls, "__label"))
202
202
  }, /*#__PURE__*/_react["default"].createElement("span", {
@@ -227,7 +227,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
227
227
  onBlur: onBlurHandler,
228
228
  onChange: onChangeHandler,
229
229
  autoComplete: "off"
230
- }, restProps))), typeof tail === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
230
+ }, restProps))), typeof tail === 'string' ? /*#__PURE__*/_react["default"].createElement("span", {
231
231
  className: (0, _classnames["default"])("".concat(preCls, "__tail"))
232
232
  }, tail) : tail));
233
233
  });
@@ -17,7 +17,7 @@
17
17
 
18
18
  .form-field-user__border {
19
19
  padding: 6px 12px;
20
- border-radius: 3px;
20
+ border-radius: 8px;
21
21
  transition: all 0.2s;
22
22
  border: 1px solid #e9ecf0;
23
23
  box-sizing: border-box;
@@ -42,6 +42,7 @@
42
42
  font-weight: 400;
43
43
  color: #3f4755;
44
44
  cursor: pointer;
45
+ display: flex;
45
46
  position: relative;
46
47
  }
47
48
 
@@ -49,8 +50,21 @@
49
50
  display: block;
50
51
  }
51
52
 
52
- .form-field-user__input-avatar {
53
+ .form-field-user__input-user-info {
53
54
  margin-right: 5px;
55
+ display: flex;
56
+ align-items: center;
57
+ }
58
+
59
+ .form-field-user__input-user-info .titaui-pc-avator-container {
60
+ display: flex;
61
+ }
62
+
63
+ .form-field-user__input-user-info__name {
64
+ margin-left: 4px;
65
+ overflow: hidden;
66
+ text-overflow: ellipsis;
67
+ white-space: nowrap;
54
68
  }
55
69
 
56
70
  .form-field-user__input--placeholder {
@@ -72,10 +86,16 @@
72
86
  }
73
87
 
74
88
  .form-field-user__input--down {
75
- color: #c2cbd1;
89
+ font-size: 16px;
90
+ color: #3f4755;
76
91
  position: absolute;
77
92
  right: -32px;
78
93
  top: 50%;
79
94
  transform: translate(0, -50%);
80
95
  cursor: pointer;
81
96
  }
97
+
98
+ .form-field-user__input--down::before {
99
+ transform: scale(0.5);
100
+ display: inline-block;
101
+ }
@@ -19,12 +19,16 @@ var _userInput = _interopRequireDefault(require("./user-input"));
19
19
 
20
20
  require("./index.css");
21
21
 
22
+ var _excluded = ["name", "label", "placeholder", "value", "onChange", "require", "maxSize", "multiple", "getContainer"];
23
+
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
25
 
24
26
  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
27
 
26
28
  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
29
 
30
+ 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); }
31
+
28
32
  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; }
29
33
 
30
34
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
@@ -39,7 +43,11 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
39
43
 
40
44
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
41
45
 
42
- var preCls = "form-field-user";
46
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
47
+
48
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
49
+
50
+ var preCls = 'form-field-user';
43
51
 
44
52
  function OverlayInner(_ref) {
45
53
  var hasError = _ref.hasError,
@@ -47,12 +55,12 @@ function OverlayInner(_ref) {
47
55
  tip = _ref.tip;
48
56
  if (hasError) return /*#__PURE__*/_react["default"].createElement("span", {
49
57
  style: {
50
- color: "#F05E5E"
58
+ color: '#F05E5E'
51
59
  }
52
60
  }, tip);
53
61
  if (hasActive) return /*#__PURE__*/_react["default"].createElement("span", {
54
62
  style: {
55
- color: "#3F4755"
63
+ color: '#3F4755'
56
64
  }
57
65
  }, tip);
58
66
  return /*#__PURE__*/_react["default"].createElement("span", null);
@@ -69,9 +77,10 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
69
77
  require = props.require,
70
78
  maxSize = props.maxSize,
71
79
  multiple = props.multiple,
72
- getContainer = props.getContainer;
80
+ getContainer = props.getContainer,
81
+ restProps = _objectWithoutProperties(props, _excluded);
73
82
 
74
- var _useState = (0, _react.useState)(""),
83
+ var _useState = (0, _react.useState)(''),
75
84
  _useState2 = _slicedToArray(_useState, 2),
76
85
  tip = _useState2[0],
77
86
  setTip = _useState2[1];
@@ -119,7 +128,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
119
128
  var onUserSelectHandler = function onUserSelectHandler(data) {
120
129
  setHasActive(false);
121
130
  setHasError(false);
122
- setTip("");
131
+ setTip('');
123
132
  var users = [];
124
133
 
125
134
  if (multiple) {
@@ -211,7 +220,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
211
220
  tip: tip
212
221
  }),
213
222
  getTooltipContainer: getContainer
214
- }, /*#__PURE__*/_react["default"].createElement(_userSelector["default"], {
223
+ }, /*#__PURE__*/_react["default"].createElement(_userSelector["default"], _extends({
215
224
  multiple: multiple,
216
225
  selectNodes: selectNodes,
217
226
  position: "centerRight",
@@ -229,7 +238,8 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
229
238
  group: false
230
239
  },
231
240
  onPopupVisibleChange: onPopupVisibleChangeHandler
232
- }, /*#__PURE__*/_react["default"].createElement(_userInput["default"], {
241
+ }, restProps), /*#__PURE__*/_react["default"].createElement(_userInput["default"], {
242
+ multiple: multiple,
233
243
  users: selectNodes.users,
234
244
  onClear: onClearHandler,
235
245
  placeholder: placeholder
@@ -15,21 +15,25 @@ var _tooltip = _interopRequireDefault(require("../../../tooltip"));
15
15
 
16
16
  var _getLocale = require("../../../../utils/getLocale");
17
17
 
18
+ var _openData = require("../../../../utils/open-data");
19
+
18
20
  require("./index.css");
19
21
 
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
23
 
22
- var preCls = "form-field-user";
24
+ var preCls = 'form-field-user';
23
25
 
24
26
  function _default(props) {
25
- var users = props.users,
27
+ var _props$multiple = props.multiple,
28
+ multiple = _props$multiple === void 0 ? false : _props$multiple,
29
+ users = props.users,
26
30
  _props$placeholder = props.placeholder,
27
- placeholder = _props$placeholder === void 0 ? (0, _getLocale.getLocale)("Mod_Pleaseselect") : _props$placeholder,
31
+ placeholder = _props$placeholder === void 0 ? (0, _getLocale.getLocale)('Mod_Pleaseselect') : _props$placeholder,
28
32
  onClear = props.onClear;
29
33
  var userNames = [];
30
34
  (users || []).forEach(function (user) {
31
- userNames.push( /*#__PURE__*/_react["default"].createElement("span", {
32
- className: (0, _classnames["default"])("".concat(preCls, "__input-avatar"))
35
+ userNames.push( /*#__PURE__*/_react["default"].createElement("div", {
36
+ className: (0, _classnames["default"])("".concat(preCls, "__input-user-info"))
33
37
  }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
34
38
  overlay: user.name,
35
39
  placement: "top"
@@ -38,6 +42,11 @@ function _default(props) {
38
42
  src: user.avatar.small,
39
43
  color: user.avatar.color,
40
44
  userId: user.userId
45
+ })), !multiple && /*#__PURE__*/_react["default"].createElement("p", {
46
+ className: (0, _classnames["default"])("".concat(preCls, "__input-user-info__name"))
47
+ }, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
48
+ id: user.userId,
49
+ name: user.name
41
50
  }))));
42
51
  });
43
52
 
@@ -55,6 +64,6 @@ function _default(props) {
55
64
  className: (0, _classnames["default"])("tu-icon-cross ".concat(preCls, "__input--clear")),
56
65
  onClick: onHandleClear
57
66
  }), /*#__PURE__*/_react["default"].createElement("span", {
58
- className: (0, _classnames["default"])("".concat(preCls, "__input--down tu-icon-sort-down"))
67
+ className: (0, _classnames["default"])("".concat(preCls, "__input--down tu-icon-caret-down"))
59
68
  }));
60
69
  }
@@ -31,6 +31,8 @@ var _inputVerificationCode = _interopRequireDefault(require("./form-fields/input
31
31
 
32
32
  var _password = _interopRequireDefault(require("./form-fields/password"));
33
33
 
34
+ var _date = _interopRequireDefault(require("./form-fields/date"));
35
+
34
36
  var _layout = require("./layout");
35
37
 
36
38
  require("./index.css");
@@ -61,7 +63,7 @@ var Form = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
61
63
 
62
64
  var onFieldChangeHandler = function onFieldChangeHandler(name, value) {
63
65
  fieldsValue.current[name] = value;
64
- onFieldsChange && onFieldsChange(fieldsValue.current);
66
+ onFieldsChange === null || onFieldsChange === void 0 ? void 0 : onFieldsChange(fieldsValue.current);
65
67
  };
66
68
 
67
69
  var initFieldsValue = function initFieldsValue(name, value) {
@@ -86,7 +88,7 @@ var Form = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
86
88
  var errors = [];
87
89
  var fieldsKeys = Object.keys(fieldRefs.current);
88
90
 
89
- for (var i = 0; i < fieldsKeys.length; i++) {
91
+ for (var i = 0; i < fieldsKeys.length; i += 1) {
90
92
  var fieldRef = fieldRefs.current[fieldsKeys[i]];
91
93
  var fieldErrors = fieldRef.verifing();
92
94
 
@@ -133,9 +135,14 @@ var FormFields = {
133
135
  DropDown: _dropdown["default"],
134
136
  GroupFields: _group["default"],
135
137
  VerificationInput: _inputVerificationCode["default"],
136
- Password: _password["default"]
138
+ Password: _password["default"],
139
+ Date: _date["default"]
137
140
  }; // @ts-ignore
138
141
 
139
142
  Form.Fields = FormFields;
143
+ Form.defaultProps = {
144
+ className: "",
145
+ direction: "vertical"
146
+ };
140
147
  var _default = Form;
141
148
  exports["default"] = _default;
@@ -16,7 +16,7 @@
16
16
  height: 30px;
17
17
  margin-left: 10px;
18
18
  border: 1px solid #e6eaef;
19
- border-radius: 4px;
19
+ border-radius: 50%;
20
20
  box-sizing: border-box;
21
21
  cursor: pointer;
22
22
  }
@@ -33,63 +33,8 @@
33
33
  border-color: #2879ff;
34
34
  }
35
35
 
36
- .titaui-icon-button-list__btn:hover .titaui-icon-button-list__btn-icon--export {
37
- background-position: 0 -287px;
38
- }
39
-
40
- .titaui-icon-button-list__btn:hover .titaui-icon-button-list__btn-icon--share {
41
- background-position: 0 -26px;
42
- }
43
-
44
- .titaui-icon-button-list__btn:hover .titaui-icon-button-list__btn-icon--fullscreen {
45
- background-position: 0 -78px;
46
- }
47
-
48
- .titaui-icon-button-list__btn:hover .titaui-icon-button-list__btn-icon--quit-fullscreen {
49
- background-position: 0 -130px;
50
- }
51
-
52
- .titaui-icon-button-list__btn:hover .titaui-icon-button-list__btn-icon--horizontal {
53
- background-position: 0 -182px;
54
- }
55
-
56
- .titaui-icon-button-list__btn:hover .titaui-icon-button-list__btn-icon--vertical {
57
- background-position: 0 -234px;
58
- }
59
-
60
36
  .titaui-icon-button-list__btn-icon {
61
37
  display: inline-block;
62
38
  box-sizing: border-box;
63
- }
64
-
65
- .titaui-icon-button-list__btn-icon--base {
66
- width: 16px;
67
- height: 16px;
68
- background: url("./images/icons-2.png") no-repeat;
69
- background-size: cover;
70
- }
71
-
72
- .titaui-icon-button-list__btn-icon--export {
73
- background-position: 0 -261px;
74
- }
75
-
76
- .titaui-icon-button-list__btn-icon--share {
77
- background-position: 0 0;
78
- }
79
-
80
- .titaui-icon-button-list__btn-icon--fullscreen {
81
- background-position: 0 -52px;
82
- }
83
-
84
- .titaui-icon-button-list__btn-icon--quit-fullscreen {
85
- background-position: 0 -104px;
86
- }
87
-
88
- .titaui-icon-button-list__btn-icon--horizontal {
89
- background-position: 0 -156px;
90
- }
91
-
92
- .titaui-icon-button-list__btn-icon--vertical {
93
- height: 17px;
94
- background-position: 0 -208px;
39
+ font-size: 16px;
95
40
  }
@@ -19,7 +19,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
19
19
 
20
20
  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; }
21
21
 
22
- var preCls = "titaui-icon-button-list";
22
+ var preCls = 'titaui-icon-button-list';
23
23
 
24
24
  function _default(props) {
25
25
  var items = props.items,
@@ -32,22 +32,25 @@ function _default(props) {
32
32
  }, /*#__PURE__*/_react["default"].createElement("div", {
33
33
  className: (0, _classnames["default"])("".concat(preCls, "__inner"))
34
34
  }, items.map(function (it) {
35
- var _classNames;
36
-
37
35
  var icon = it.icon,
36
+ type = it.type,
38
37
  overlay = it.overlay,
39
38
  _it$placement = it.placement,
40
- placement = _it$placement === void 0 ? "top" : _it$placement,
39
+ placement = _it$placement === void 0 ? 'top' : _it$placement,
41
40
  _it$trigger = it.trigger,
42
- trigger = _it$trigger === void 0 ? ["hover"] : _it$trigger;
41
+ trigger = _it$trigger === void 0 ? ['hover'] : _it$trigger,
42
+ rotate = it.rotate;
43
43
 
44
44
  var content = /*#__PURE__*/_react["default"].createElement("span", {
45
45
  className: (0, _classnames["default"])("".concat(preCls, "__btn")),
46
46
  onClick: function onClick(e) {
47
- return _onClick(e, icon);
47
+ return _onClick(e, type);
48
48
  }
49
49
  }, /*#__PURE__*/_react["default"].createElement("span", {
50
- className: (0, _classnames["default"])("".concat(preCls, "__btn-icon"), (_classNames = {}, _defineProperty(_classNames, "".concat(preCls, "__btn-icon--base"), true), _defineProperty(_classNames, "".concat(preCls, "__btn-icon--").concat(icon), true), _classNames))
50
+ className: (0, _classnames["default"])("".concat(preCls, "__btn-icon"), _defineProperty({}, "tu-icon-".concat(icon), true)),
51
+ style: rotate ? {
52
+ transform: "rotate(".concat(rotate, "deg)")
53
+ } : {}
51
54
  }));
52
55
 
53
56
  if (overlay) {
@@ -46,7 +46,7 @@
46
46
  }
47
47
 
48
48
  .titaui-img-viewer__header-download::after {
49
- content: "";
49
+ content: '';
50
50
  display: inline-block;
51
51
  width: 1px;
52
52
  height: 22px;
@@ -80,6 +80,13 @@
80
80
 
81
81
  .titaui-img-viewer__body-img {
82
82
  max-width: 800px;
83
+ position: absolute;
84
+ top: 0;
85
+ left: 0;
86
+ right: 0;
87
+ bottom: 0;
88
+ margin: auto;
89
+ cursor: move;
83
90
  }
84
91
 
85
92
  .titaui-img-viewer__body-operate-btn {
@@ -110,12 +117,12 @@
110
117
  }
111
118
 
112
119
  .titaui-img-viewer__body-operate-btn--disable {
113
- color: #BFC7D5;
120
+ color: #bfc7d5;
114
121
  }
115
122
 
116
123
  .titaui-img-viewer__body-operate-btn--disable:hover {
117
124
  cursor: not-allowed;
118
- color: #BFC7D5;
125
+ color: #bfc7d5;
119
126
  }
120
127
 
121
128
  .titaui-img-viewer__body--loading {
@@ -49,7 +49,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
49
49
 
50
50
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
51
51
 
52
- var prefix = "titaui-img-viewer";
52
+ var prefix = 'titaui-img-viewer';
53
53
  var ImgViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
54
54
  var data = _ref.data,
55
55
  _ref$showDownload = _ref.showDownload,
@@ -85,7 +85,18 @@ var ImgViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
85
85
  isLoading = _useState12[0],
86
86
  setIsLoading = _useState12[1];
87
87
 
88
- var imgRef = (0, _react.useRef)(document.createElement("img"));
88
+ var _useState13 = (0, _react.useState)(0),
89
+ _useState14 = _slicedToArray(_useState13, 2),
90
+ moveX = _useState14[0],
91
+ setMoveX = _useState14[1];
92
+
93
+ var _useState15 = (0, _react.useState)(0),
94
+ _useState16 = _slicedToArray(_useState15, 2),
95
+ moveY = _useState16[0],
96
+ setMoveY = _useState16[1];
97
+
98
+ var imgRef = (0, _react.useRef)(document.createElement('img'));
99
+ var DragRef = (0, _react.useRef)(document.createElement('div'));
89
100
 
90
101
  var showPreview = function showPreview() {
91
102
  var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
@@ -120,6 +131,31 @@ var ImgViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
120
131
  setCurrentRotateDeg(currentRotateDeg - 90);
121
132
  };
122
133
 
134
+ var handleMouseDownImg = function handleMouseDownImg(e) {
135
+ e.preventDefault();
136
+ var downX = e.clientX;
137
+ var downY = e.clientY; // 因为这个moveX不闭包的话在拖动的时候他就 一直累加
138
+
139
+ var beforeX = moveX;
140
+ var beforeY = moveY;
141
+
142
+ DragRef.current.onmousemove = function (e1) {
143
+ //获取x和y
144
+ var nx = e1.clientX;
145
+ var ny = e1.clientY; // //计算移动后的左偏移量和顶部的偏移量
146
+
147
+ var nl = nx - downX + beforeX;
148
+ var nt = ny - downY + beforeY;
149
+ setMoveX(nl);
150
+ setMoveY(nt);
151
+ };
152
+ };
153
+
154
+ var handleMouseUpImg = function handleMouseUpImg(e) {
155
+ e.preventDefault();
156
+ DragRef.current.onmousemove = null;
157
+ };
158
+
123
159
  var handleRightRotate = function handleRightRotate() {
124
160
  setCurrentRotateDeg(currentRotateDeg + 90);
125
161
  };
@@ -152,25 +188,28 @@ var ImgViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
152
188
  var renderPreviewer = function renderPreviewer() {
153
189
  if (!visible) return null;
154
190
  return /*#__PURE__*/_react["default"].createElement("div", {
155
- className: (0, _classnames["default"])(prefix, "document-mouse-event-ignore")
191
+ className: (0, _classnames["default"])(prefix, 'document-mouse-event-ignore')
156
192
  }, /*#__PURE__*/_react["default"].createElement("div", {
157
193
  className: "".concat(prefix, "__header")
158
194
  }, /*#__PURE__*/_react["default"].createElement("span", {
159
195
  className: "".concat(prefix, "__header-file-name")
160
196
  }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
161
- text: currentImgData && currentImgData.fileName || "",
197
+ text: currentImgData && currentImgData.fileName || '',
162
198
  isPercent: true,
163
199
  minusWidth: 60
164
200
  })), /*#__PURE__*/_react["default"].createElement("span", null, showDownload && currentImgData && currentImgData.downloadUrl && /*#__PURE__*/_react["default"].createElement("a", {
165
201
  className: "".concat(prefix, "__header-download"),
166
- href: (currentImgData === null || currentImgData === void 0 ? void 0 : currentImgData.downloadUrl) || "javascript:;"
202
+ href: (currentImgData === null || currentImgData === void 0 ? void 0 : currentImgData.downloadUrl) || 'javascript:;'
167
203
  }, /*#__PURE__*/_react["default"].createElement("i", {
168
- className: (0, _classnames["default"])("tu-icon-APP-xiazai", "".concat(prefix, "__header-download-icon"))
169
- }), (0, _getLocale.getLocale)("Mod_Download")), /*#__PURE__*/_react["default"].createElement("span", {
170
- className: (0, _classnames["default"])("tu-icon-close", "".concat(prefix, "__header-close")),
204
+ className: (0, _classnames["default"])('tu-icon-APP-xiazai', "".concat(prefix, "__header-download-icon"))
205
+ }), (0, _getLocale.getLocale)('Mod_Download')), /*#__PURE__*/_react["default"].createElement("span", {
206
+ className: (0, _classnames["default"])('tu-icon-close', "".concat(prefix, "__header-close")),
171
207
  onClick: hidePreview
172
208
  }))), /*#__PURE__*/_react["default"].createElement("div", {
173
- className: "".concat(prefix, "__body")
209
+ className: "".concat(prefix, "__body"),
210
+ ref: DragRef,
211
+ onMouseDown: handleMouseDownImg,
212
+ onMouseUp: handleMouseUpImg
174
213
  }, /*#__PURE__*/_react["default"].createElement("span", {
175
214
  className: (0, _classnames["default"])("".concat(prefix, "__body-operate-btn"), "".concat(prefix, "__body-operate-btn--left"), _defineProperty({}, "".concat(prefix, "__body-operate-btn--disable"), currentIndex === 0)),
176
215
  onClick: handlePreImgClick
@@ -184,28 +223,28 @@ var ImgViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
184
223
  })), isLoading && /*#__PURE__*/_react["default"].createElement("div", {
185
224
  className: "".concat(prefix, "__body--loading")
186
225
  }, /*#__PURE__*/_react["default"].createElement("img", {
187
- src: _loading["default"]
188
- })), /*#__PURE__*/_react["default"].createElement("div", {
189
- style: {
190
- transform: "rotate(".concat(currentRotateDeg, "deg)")
191
- }
192
- }, /*#__PURE__*/_react["default"].createElement("img", {
226
+ src: _loading["default"],
227
+ alt: ""
228
+ })), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("img", {
193
229
  className: "".concat(prefix, "__body-img"),
194
230
  ref: imgRef,
231
+ alt: "",
195
232
  src: (currentImgData === null || currentImgData === void 0 ? void 0 : currentImgData.previewUrl) || (currentImgData === null || currentImgData === void 0 ? void 0 : currentImgData.bigImageUrl),
196
233
  style: {
197
- transform: "scale(".concat(currentScale, ")")
234
+ transform: "scale(".concat(currentScale, ") rotate(").concat(currentRotateDeg, "deg) "),
235
+ left: "".concat(moveX, "px"),
236
+ top: "".concat(moveY, "px")
198
237
  }
199
238
  }))), /*#__PURE__*/_react["default"].createElement("div", {
200
239
  className: "".concat(prefix, "__footer")
201
240
  }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
202
- overlay: (0, _getLocale.getLocale)("OKR_Ali_Butt_Narrow"),
241
+ overlay: (0, _getLocale.getLocale)('OKR_Ali_Butt_Narrow'),
203
242
  placement: "top"
204
243
  }, /*#__PURE__*/_react["default"].createElement("span", {
205
244
  className: "".concat(prefix, "__footer-btn"),
206
245
  onClick: handleShrink
207
246
  }, /*#__PURE__*/_react["default"].createElement(_shrink["default"], null))), /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
208
- overlay: (0, _getLocale.getLocale)("OKR_Ali_Butt_Enlarge"),
247
+ overlay: (0, _getLocale.getLocale)('OKR_Ali_Butt_Enlarge'),
209
248
  placement: "top"
210
249
  }, /*#__PURE__*/_react["default"].createElement("span", {
211
250
  className: "".concat(prefix, "__footer-btn"),