@titaui/pc 1.11.4-0 → 1.11.4-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.
Files changed (61) hide show
  1. package/lib/components/dynamic/constant.js +2 -1
  2. package/lib/components/dynamic/dynamic-item/dynamic-interview/img/wifi.svg +24 -0
  3. package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +51 -0
  4. package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +50 -0
  5. package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +65 -0
  6. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
  7. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
  8. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +54 -0
  9. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
  10. package/lib/components/dynamic/dynamic-item/index.js +17 -0
  11. package/lib/components/form/form-fields/date/index.css +24 -0
  12. package/lib/components/form/form-fields/date/index.js +98 -0
  13. package/lib/components/form/form-fields/user/index.css +1 -1
  14. package/lib/components/form/index.js +10 -3
  15. package/lib/components/menus/export-modules/interview-menus/constant.js +23 -17
  16. package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +5 -5
  17. package/lib/components/menus/export-modules/interview-menus/index.js +1 -2
  18. package/lib/components/picker/components/picker-trigger/index.css +16 -0
  19. package/lib/components/picker/components/picker-trigger/index.js +18 -9
  20. package/lib/components/picker/picker-panels.js +1 -1
  21. package/lib/components/picker/picker.js +12 -13
  22. package/lib/components/task-tree/helper.js +61 -0
  23. package/lib/components/task-tree/images/P1.svg +15 -0
  24. package/lib/components/task-tree/images/P2.svg +15 -0
  25. package/lib/components/task-tree/images/P3.svg +15 -0
  26. package/lib/components/task-tree/images/P4.svg +15 -0
  27. package/lib/components/task-tree/images/P5.svg +15 -0
  28. package/lib/components/task-tree/images/arrow.svg +9 -0
  29. package/lib/components/task-tree/images/empty-131.png +0 -0
  30. package/lib/components/task-tree/images/followed.svg +33 -0
  31. package/lib/components/task-tree/images/nice.svg +108 -0
  32. package/lib/components/task-tree/images/struc12.png +0 -0
  33. package/lib/components/task-tree/images/struc2.png +0 -0
  34. package/lib/components/task-tree/images/xialat-s.svg +13 -0
  35. package/lib/components/task-tree/index.js +27 -0
  36. package/lib/components/task-tree/mock.js +944 -0
  37. package/lib/components/task-tree/precls.js +8 -0
  38. package/lib/components/task-tree/request-apis.js +88 -0
  39. package/lib/components/task-tree/task-item-node/constant.js +45 -0
  40. package/lib/components/task-tree/task-item-node/e-empty.js +29 -0
  41. package/lib/components/task-tree/task-item-node/e-project.js +195 -0
  42. package/lib/components/task-tree/task-item-node/e-status-dropdown.js +94 -0
  43. package/lib/components/task-tree/task-item-node/e-task.js +431 -0
  44. package/lib/components/task-tree/task-item-node/get-process-color.js +62 -0
  45. package/lib/components/task-tree/task-item-node/index.css +290 -0
  46. package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
  47. package/lib/components/task-tree/task-tree.css +8 -0
  48. package/lib/components/task-tree/task-tree.js +49 -0
  49. package/lib/components/time-picker/index.css +18 -0
  50. package/lib/components/time-picker/time-picker-selector.js +8 -12
  51. package/lib/components/time-picker/time-picker.js +117 -100
  52. package/lib/components/time-picker/utils.js +13 -2
  53. package/lib/index.js +8 -0
  54. package/package.json +5 -2
  55. package/.eslintignore +0 -3
  56. package/.eslintrc.js +0 -223
  57. package/.husky/pre-commit +0 -4
  58. package/.prettierignore +0 -31
  59. package/.prettierrc.js +0 -90
  60. package/.vscode/settings.json +0 -5
  61. package/yarn-error.log +0 -22184
@@ -0,0 +1,290 @@
1
+ .titaui-task-tree__e-task-node {
2
+ display: flex;
3
+ align-items: center;
4
+ padding: 2px 0;
5
+ width: 100%;
6
+ }
7
+
8
+ .titaui-task-tree__e-task-node-prefix {
9
+ position: relative;
10
+ top: 2px;
11
+ display: inline-block;
12
+ width: 21px;
13
+ vertical-align: top;
14
+ }
15
+
16
+ .titaui-task-tree__e-task-node-prefix .tu-icon-jiantou-right:before {
17
+ color: #89919f;
18
+ }
19
+
20
+ .titaui-task-tree__e-task-node-title {
21
+ height: 22px;
22
+ font-size: 14px;
23
+ font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
24
+ color: #3f4755;
25
+ line-height: 22px;
26
+ overflow: hidden;
27
+ white-space: nowrap;
28
+ word-break: keep-all;
29
+ padding-top: 1px;
30
+ flex: 1;
31
+ }
32
+
33
+ .titaui-task-tree__e-task-node-priority {
34
+ display: inline-block;
35
+ margin-right: 4px;
36
+ vertical-align: top;
37
+ }
38
+
39
+ .titaui-task-tree__e-task-node-priority > span {
40
+ position: relative;
41
+ top: 1px;
42
+ display: inline-block;
43
+ vertical-align: text-bottom;
44
+ height: 16px;
45
+ width: 16px;
46
+ }
47
+
48
+ .titaui-task-tree__e-task-node-priority-p1 {
49
+ background: url(../images/P1.svg) transparent no-repeat 50% 50%;
50
+ }
51
+
52
+ .titaui-task-tree__e-task-node-priority-p2 {
53
+ background: url(../images/P2.svg) transparent no-repeat 50% 50%;
54
+ }
55
+
56
+ .titaui-task-tree__e-task-node-priority-p3 {
57
+ background: url(../images/P3.svg) transparent no-repeat 50% 50%;
58
+ }
59
+
60
+ .titaui-task-tree__e-task-node-priority-p4 {
61
+ background: url(../images/P4.svg) transparent no-repeat 50% 50%;
62
+ }
63
+
64
+ .titaui-task-tree__e-task-node-priority-p5 {
65
+ background: url(../images/P5.svg) transparent no-repeat 50% 50%;
66
+ }
67
+
68
+ .titaui-task-tree__e-task-node-actions {
69
+ display: flex;
70
+ align-items: center;
71
+ float: right;
72
+ }
73
+
74
+ .titaui-task-tree__e-task-node-actions-user {
75
+ display: inline-block;
76
+ width: 64px;
77
+ margin-left: 16px;
78
+ }
79
+
80
+ .titaui-task-tree__e-task-node-actions-date {
81
+ font-size: 12px;
82
+ font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
83
+ color: #89919f;
84
+ line-height: 18px;
85
+ display: inline-flex;
86
+ align-items: center;
87
+ justify-content: flex-end;
88
+ box-sizing: border-box;
89
+ width: 78px;
90
+ height: 26px;
91
+ padding: 4px;
92
+ text-align: left;
93
+ line-height: 26px;
94
+ }
95
+
96
+ .titaui-task-tree__e-task-node-actions-date > span {
97
+ vertical-align: text-bottom;
98
+ }
99
+
100
+ .titaui-task-tree__e-task-node-actions-progress {
101
+ position: relative;
102
+ top: 3px;
103
+ color: #89919f;
104
+ cursor: auto;
105
+ width: 64px;
106
+ margin-left: 16px;
107
+ margin-right: 4px;
108
+ }
109
+
110
+ .titaui-task-tree__e-task-node-actions-progress .tooltip-text-wrapper {
111
+ margin-left: 4px;
112
+ }
113
+
114
+ .titaui-task-tree__e-task-node-actions-connect {
115
+ display: inline-block;
116
+ color: #cccccc;
117
+ margin-left: 27px;
118
+ margin-right: 10px;
119
+ }
120
+
121
+ .titaui-task-tree__e-task-node-actions-connect:hover {
122
+ color: #2879ff;
123
+ }
124
+
125
+ .titaui-task-tree__e-task-node-select-priority {
126
+ display: inline-block;
127
+ width: 16px;
128
+ height: 16px;
129
+ margin-right: 10px;
130
+ vertical-align: text-bottom;
131
+ }
132
+
133
+ .titaui-task-tree__e-project-node {
134
+ position: relative;
135
+ display: flex;
136
+ align-items: center;
137
+ width: 100%;
138
+ padding: 2px 0;
139
+ }
140
+
141
+ .titaui-task-tree__e-project-node-prefix {
142
+ display: inline-block;
143
+ font-size: 14px;
144
+ width: 21px;
145
+ color: #89919f;
146
+ line-height: 1;
147
+ }
148
+
149
+ .titaui-task-tree__e-project-node-title {
150
+ display: inline-flex;
151
+ font-size: 14px;
152
+ font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
153
+ color: #3f4755;
154
+ line-height: 22px;
155
+ overflow: hidden;
156
+ white-space: nowrap;
157
+ word-break: keep-all;
158
+ flex: 1;
159
+ }
160
+
161
+ .titaui-task-tree__e-project-node-title-name {
162
+ overflow: hidden;
163
+ }
164
+
165
+ .titaui-task-tree__e-project-node-title-approvaling {
166
+ display: inline-flex;
167
+ align-items: center;
168
+ justify-content: center;
169
+ min-width: 36px;
170
+ padding: 0 6px;
171
+ height: 20px;
172
+ font-size: 12px;
173
+ font-weight: 400;
174
+ color: #f05e5e;
175
+ background: rgba(240, 94, 94, 0.1);
176
+ border-radius: 10px;
177
+ margin-left: 8px;
178
+ }
179
+
180
+ .titaui-task-tree__e-project-node-gray {
181
+ color: #bfc7d5 !important;
182
+ }
183
+
184
+ .titaui-task-tree__e-project-node-priority {
185
+ display: inline-block;
186
+ margin-right: 4px;
187
+ vertical-align: top;
188
+ }
189
+
190
+ .titaui-task-tree__e-project-node-priority > span {
191
+ position: relative;
192
+ top: 1px;
193
+ display: inline-block;
194
+ vertical-align: text-bottom;
195
+ height: 16px;
196
+ width: 16px;
197
+ }
198
+
199
+ .titaui-task-tree__e-project-node-priority-p1 {
200
+ background: url(../images/P1.svg) transparent no-repeat 50% 50%;
201
+ }
202
+
203
+ .titaui-task-tree__e-project-node-priority-p2 {
204
+ background: url(../images/P2.svg) transparent no-repeat 50% 50%;
205
+ }
206
+
207
+ .titaui-task-tree__e-project-node-priority-p3 {
208
+ background: url(../images/P3.svg) transparent no-repeat 50% 50%;
209
+ }
210
+
211
+ .titaui-task-tree__e-project-node-priority-p4 {
212
+ background: url(../images/P4.svg) transparent no-repeat 50% 50%;
213
+ }
214
+
215
+ .titaui-task-tree__e-project-node-priority-p5 {
216
+ background: url(../images/P5.svg) transparent no-repeat 50% 50%;
217
+ }
218
+
219
+ .titaui-task-tree__e-project-node-actions {
220
+ display: flex;
221
+ align-items: center;
222
+ float: right;
223
+ }
224
+
225
+ .titaui-task-tree__e-project-node-actions-user {
226
+ display: inline-block;
227
+ width: 64px;
228
+ margin-left: 16px;
229
+ }
230
+
231
+ .titaui-task-tree__e-project-node-actions-date {
232
+ font-size: 12px;
233
+ font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
234
+ color: #89919f;
235
+ line-height: 18px;
236
+ display: inline-flex;
237
+ align-items: center;
238
+ justify-content: flex-end;
239
+ box-sizing: border-box;
240
+ width: 78px;
241
+ height: 26px;
242
+ padding: 4px;
243
+ text-align: left;
244
+ line-height: 26px;
245
+ }
246
+
247
+ .titaui-task-tree__e-project-node-actions-date > span {
248
+ vertical-align: text-bottom;
249
+ }
250
+
251
+ .titaui-task-tree__e-project-node-actions-progress {
252
+ position: relative;
253
+ top: 3px;
254
+ color: #89919f;
255
+ cursor: auto;
256
+ width: 64px;
257
+ margin-left: 16px;
258
+ margin-right: 4px;
259
+ }
260
+
261
+ .titaui-task-tree__e-project-node-actions-progress .tooltip-text-wrapper {
262
+ margin-left: 4px;
263
+ }
264
+
265
+ .titaui-task-tree__e-project-node-actions-connect {
266
+ display: inline-block;
267
+ color: #cccccc;
268
+ margin-left: 27px;
269
+ margin-right: 10px;
270
+ }
271
+
272
+ .titaui-task-tree__e-project-node-actions-connect:hover {
273
+ color: #2879ff;
274
+ }
275
+
276
+ .titaui-task-tree__e-empty-node {
277
+ font-size: 12px;
278
+ font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
279
+ color: #a4acb9;
280
+ line-height: 18px;
281
+ padding-left: 12px;
282
+ }
283
+
284
+ .titaui-task-tree__e-empty-node:hover {
285
+ cursor: text;
286
+ }
287
+
288
+ .e-node-status-icon {
289
+ color: #89919f;
290
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _eTask = _interopRequireDefault(require("./e-task"));
11
+
12
+ var _eProject = _interopRequireDefault(require("./e-project"));
13
+
14
+ var _eEmpty = _interopRequireDefault(require("./e-empty"));
15
+
16
+ require("./index.css");
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
+
20
+ 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); }
21
+
22
+ var _default = function _default(node, level) {
23
+ switch (node.nodeType) {
24
+ case "e-task":
25
+ return /*#__PURE__*/_react["default"].createElement(_eTask["default"], _extends({}, node, {
26
+ level: level
27
+ }));
28
+
29
+ case "e-project":
30
+ return /*#__PURE__*/_react["default"].createElement(_eProject["default"], _extends({}, node, {
31
+ level: level
32
+ }));
33
+
34
+ case "e-empty":
35
+ return /*#__PURE__*/_react["default"].createElement(_eEmpty["default"], _extends({}, node, {
36
+ level: level
37
+ }));
38
+
39
+ default:
40
+ }
41
+ };
42
+
43
+ exports["default"] = _default;
@@ -0,0 +1,8 @@
1
+ .titaui-task-tree {
2
+ position: relative;
3
+ overflow: hidden;
4
+ }
5
+
6
+ .titaui-task-tree .rc-tree-treenode-switcher-close:hover {
7
+ background: #F7F8FA;
8
+ }
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _taskNodeRender = _interopRequireDefault(require("./task-item-node/task-node-render"));
11
+
12
+ var _tree = _interopRequireDefault(require("../tree"));
13
+
14
+ var _precls = _interopRequireDefault(require("./precls"));
15
+
16
+ require("./task-tree.css");
17
+
18
+ var _excluded = ["dataSource", "defaultExpandedKeys", "draggable"];
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
+
22
+ 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); }
23
+
24
+ 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; }
25
+
26
+ 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; }
27
+
28
+ var TaskTree = function TaskTree(props) {
29
+ var dataSource = props.dataSource,
30
+ defaultExpandedKeys = props.defaultExpandedKeys,
31
+ _props$draggable = props.draggable,
32
+ draggable = _props$draggable === void 0 ? false : _props$draggable,
33
+ restProps = _objectWithoutProperties(props, _excluded);
34
+
35
+ return /*#__PURE__*/_react["default"].createElement("div", {
36
+ className: _precls["default"]
37
+ }, /*#__PURE__*/_react["default"].createElement(_tree["default"], _extends({
38
+ draggable: draggable,
39
+ defaultExpandedKeys: defaultExpandedKeys,
40
+ treeData: dataSource,
41
+ titleRender: _taskNodeRender["default"],
42
+ allowDrop: function allowDrop() {
43
+ return true;
44
+ }
45
+ }, restProps)));
46
+ };
47
+
48
+ var _default = TaskTree;
49
+ exports["default"] = _default;
@@ -19,10 +19,28 @@
19
19
  border-color: #2879ff;
20
20
  }
21
21
 
22
+ .tita-ui__time-picker-trigger--disabled {
23
+ cursor: not-allowed;
24
+ }
25
+
26
+ .tita-ui__time-picker-trigger--disabled .tita-ui__time-picker-input {
27
+ cursor: not-allowed;
28
+ }
29
+
30
+ .tita-ui__time-picker-trigger--disabled:hover {
31
+ border-color: #e9ecf0;
32
+ }
33
+
22
34
  .tita-ui__time-picker-inputs {
23
35
  flex: 1;
24
36
  }
25
37
 
38
+ .tita-ui__time-picker-inputs--placeholder input,
39
+ .tita-ui__time-picker-inputs--placeholder span {
40
+ text-shadow: 0 0 0 #bfc7d5;
41
+ color: transparent;
42
+ }
43
+
26
44
  .tita-ui__time-picker-input {
27
45
  width: 16px;
28
46
  padding: 0;
@@ -47,9 +47,8 @@ var TimePickerSelector = function TimePickerSelector(props) {
47
47
  minutes = _props$timeData.minutes,
48
48
  _props$timeSetting = props.timeSetting,
49
49
  hour = _props$timeSetting.hour,
50
- setHour = _props$timeSetting.setHour,
51
50
  minute = _props$timeSetting.minute,
52
- setMinute = _props$timeSetting.setMinute,
51
+ setTime = _props$timeSetting.setTime,
53
52
  _props$visibleSetting = props.visibleSetting,
54
53
  visible = _props$visibleSetting.visible,
55
54
  setVisible = _props$visibleSetting.setVisible,
@@ -59,11 +58,10 @@ var TimePickerSelector = function TimePickerSelector(props) {
59
58
  var pickerMenuItemActiveIndexRef = (0, _react.useRef)(0);
60
59
  var timerRef = (0, _react.useRef)();
61
60
 
62
- var onItemClickHandler = function onItemClickHandler(_ref) {
63
- var hour = _ref.hour,
64
- minute = _ref.minute;
65
- setHour(hour);
66
- setMinute(minute);
61
+ var onItemClickHandler = function onItemClickHandler(time) {
62
+ // setHour(hour);
63
+ // setMinute(minute);
64
+ setTime(time);
67
65
  setVisible(false);
68
66
  };
69
67
 
@@ -84,6 +82,7 @@ var TimePickerSelector = function TimePickerSelector(props) {
84
82
  pickerMenuItemActiveIndexRef.current = hIndex + mIndex + 1 + hIndex * (minutes.length - 1);
85
83
  }
86
84
 
85
+ var time = "".concat(h, ":").concat(m);
87
86
  return (
88
87
  /*#__PURE__*/
89
88
  // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
@@ -93,12 +92,9 @@ var TimePickerSelector = function TimePickerSelector(props) {
93
92
  }),
94
93
  key: m,
95
94
  onClick: function onClick() {
96
- return onItemClickHandler({
97
- hour: h,
98
- minute: m
99
- });
95
+ return onItemClickHandler(time);
100
96
  }
101
- }, "".concat(h, ":").concat(m))
97
+ }, time)
102
98
  );
103
99
  });
104
100
  }), /*#__PURE__*/_react["default"].createElement("p", {