dtable-ui-component 5.3.1-beta → 5.3.1-beta2

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 (48) hide show
  1. package/lib/Comment/body/comment.js +190 -0
  2. package/lib/Comment/body/index.css +95 -0
  3. package/lib/Comment/body/index.js +32 -0
  4. package/lib/Comment/footer/btns/index.css +40 -0
  5. package/lib/Comment/footer/btns/index.js +113 -0
  6. package/lib/Comment/footer/index.css +157 -0
  7. package/lib/Comment/footer/index.js +170 -0
  8. package/lib/Comment/footer/input/index.css +52 -0
  9. package/lib/Comment/footer/input/index.js +448 -0
  10. package/lib/Comment/footer/input/participant/index.css +0 -0
  11. package/lib/Comment/footer/input/participant/index.js +53 -0
  12. package/lib/Comment/footer/participants/index.css +22 -0
  13. package/lib/Comment/footer/participants/index.js +68 -0
  14. package/lib/Comment/footer/participants/participant/index.css +5 -0
  15. package/lib/Comment/footer/participants/participant/index.js +32 -0
  16. package/lib/Comment/footer/participants/participant-select/index.css +104 -0
  17. package/lib/Comment/footer/participants/participant-select/index.js +182 -0
  18. package/lib/Comment/index.css +19 -0
  19. package/lib/Comment/index.js +305 -0
  20. package/lib/Comment/model.js +25 -0
  21. package/lib/Comment/utils/common.js +62 -0
  22. package/lib/Comment/utils/index.js +27 -0
  23. package/lib/Comment/utils/utilities.js +176 -0
  24. package/lib/DigitalSignEditor/index.js +1 -1
  25. package/lib/FileEditor/index.js +16 -2
  26. package/lib/RowExpandDialog/body/index.js +43 -60
  27. package/lib/RowExpandDialog/column-content/index.css +1 -0
  28. package/lib/RowExpandDialog/header/index.css +3 -3
  29. package/lib/RowExpandDialog/header/index.js +33 -11
  30. package/lib/RowExpandDialog/index.js +35 -51
  31. package/lib/RowExpandEditor/RowExpandLongTextEditor/index.js +1 -2
  32. package/lib/RowExpandFormatter/RowExpandLinkFormatter/index.js +1 -1
  33. package/lib/RowExpandFormatter/index.css +1 -1
  34. package/lib/RowExpandFormatter/index.js +3 -4
  35. package/lib/lang/index.js +3 -2
  36. package/lib/locales/de.json +5 -1
  37. package/lib/locales/en.json +5 -1
  38. package/lib/locales/es.json +5 -1
  39. package/lib/locales/fr.json +5 -1
  40. package/lib/locales/pt.json +5 -1
  41. package/lib/locales/ru.json +5 -1
  42. package/lib/locales/zh-CN.json +5 -1
  43. package/lib/utils/hotkey.js +37 -0
  44. package/lib/utils/utils.js +58 -2
  45. package/package.json +1 -1
  46. package/lib/RowExpandDialog/constants.js +0 -114
  47. package/lib/RowExpandDialog/utils.js +0 -83
  48. package/lib/RowExpandFormatter/RowExpandLinkFormatter/utils.js +0 -71
@@ -9,15 +9,15 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _reactstrap = require("reactstrap");
10
10
  var _classnames = _interopRequireDefault(require("classnames"));
11
11
  var _dtableUtils = require("dtable-utils");
12
- var _constants = require("../constants");
13
- var _utils = require("../utils");
12
+ var _constants = require("../../constants");
13
+ var _utils = require("../../utils/utils");
14
14
  var _columnContent = _interopRequireDefault(require("../column-content"));
15
15
  var _RowExpandEditor = _interopRequireDefault(require("../../RowExpandEditor"));
16
16
  var _RowExpandFormatter = _interopRequireDefault(require("../../RowExpandFormatter"));
17
17
  require("./index.css");
18
18
  class Body extends _react.default.Component {
19
- constructor(props) {
20
- super(props);
19
+ constructor(_props) {
20
+ super(_props);
21
21
  this.setEditorRef = columnIndex => editor => {
22
22
  this.editors[columnIndex] = editor;
23
23
  };
@@ -61,7 +61,8 @@ class Body extends _react.default.Component {
61
61
  };
62
62
  this.onHotKey = event => {
63
63
  const {
64
- columns
64
+ columns,
65
+ onKeyDown
65
66
  } = this.props;
66
67
  const readonly = Array.isArray(columns) && columns.length > 0 ? !columns.some(c => c.editable) : true;
67
68
  const keyCode = event.keyCode;
@@ -73,6 +74,7 @@ class Body extends _react.default.Component {
73
74
  this.props.onRowExpandCancel();
74
75
  return;
75
76
  }
77
+ onKeyDown && onKeyDown(event);
76
78
  if (keyCode === _constants.keyCodes.UpArrow) {
77
79
  this.onPressUpKey();
78
80
  return;
@@ -83,6 +85,7 @@ class Body extends _react.default.Component {
83
85
  }
84
86
  if (keyCode === _constants.keyCodes.Tab && !readonly) {
85
87
  this.onPressTab(event);
88
+ return;
86
89
  }
87
90
  };
88
91
  this.onPressTab = event => {
@@ -118,13 +121,14 @@ class Body extends _react.default.Component {
118
121
  }
119
122
  };
120
123
  this.downloadImage = imageItemUrl => {
121
- let rotateIndex = imageItemUrl.indexOf('?a=');
122
- if (rotateIndex > -1) {
123
- imageItemUrl = imageItemUrl.slice(0, rotateIndex);
124
- }
125
- let imageUrlSuffix = imageItemUrl.indexOf('?dl=1');
126
- let downloadUrl = imageUrlSuffix !== -1 ? imageItemUrl : imageItemUrl + '?dl=1';
127
- (0, _utils.downloadFile)(downloadUrl);
124
+ this.props.getDownLoadFiles([{
125
+ url: imageItemUrl
126
+ }]).then(res => {
127
+ const [downloadUrl] = res.data.urls;
128
+ (0, _utils.downloadFile)(downloadUrl);
129
+ }).catch(error => {
130
+ // todo
131
+ });
128
132
  };
129
133
  this.getCellValue = _ref => {
130
134
  let {
@@ -139,22 +143,13 @@ class Body extends _react.default.Component {
139
143
  };
140
144
  this.renderColumnValue = (row, column, columnIndex, isEditorFocus) => {
141
145
  const {
142
- eventBus,
143
- departments,
144
- userDepartmentIdsMap,
145
- columns,
146
146
  component,
147
- valueKey,
148
- collaborators,
149
- getCollaborators,
150
- queryCollaborators,
151
147
  onChange,
152
- uploadFile,
153
- longTextEditorAPI,
154
- config,
155
- lang,
156
- seafileEditorI18n
148
+ ...props
157
149
  } = this.props;
150
+ const {
151
+ getDownLoadFiles
152
+ } = props;
158
153
  const {
159
154
  editable
160
155
  } = column;
@@ -163,45 +158,25 @@ class Body extends _react.default.Component {
163
158
  formatter
164
159
  } = component || {};
165
160
  if (editable) {
166
- return /*#__PURE__*/_react.default.createElement(_RowExpandEditor.default, {
161
+ return /*#__PURE__*/_react.default.createElement(_RowExpandEditor.default, Object.assign({}, props, {
167
162
  column: column,
168
163
  row: row,
169
- columns: columns,
170
- eventBus: eventBus,
171
- departments: departments,
172
- userDepartmentIdsMap: userDepartmentIdsMap,
173
164
  component: editor,
174
165
  isEditorFocus: isEditorFocus,
175
166
  columnIndex: columnIndex,
176
- valueKey: valueKey,
177
167
  isInModal: true,
178
- longTextEditorI18n: seafileEditorI18n,
179
- lang: lang,
180
- collaborators: collaborators,
181
- config: config,
182
- getCollaborators: getCollaborators,
183
- queryCollaborators: queryCollaborators,
184
168
  updateTabIndex: this.updateTabIndex,
185
169
  onCommit: value => onChange(column, value),
186
170
  onEditorOpen: this.onEditorOpen,
187
- onEditorClose: this.onEditorClose,
188
- uploadFile: uploadFile,
189
- longTextEditorAPI: longTextEditorAPI
190
- });
171
+ onEditorClose: this.onEditorClose
172
+ }));
191
173
  }
192
- return /*#__PURE__*/_react.default.createElement(_RowExpandFormatter.default, {
174
+ return /*#__PURE__*/_react.default.createElement(_RowExpandFormatter.default, Object.assign({}, props, {
193
175
  column: column,
194
176
  row: row,
195
- collaborators: collaborators,
196
- config: config,
197
- eventBus: eventBus,
198
- departments: departments,
199
177
  component: formatter,
200
- valueKey: valueKey,
201
- downloadImage: this.downloadImage,
202
- getCollaborators: getCollaborators,
203
- queryCollaborators: queryCollaborators
204
- });
178
+ downloadImage: getDownLoadFiles ? this.downloadImage : null
179
+ }));
205
180
  };
206
181
  this.renderColumnContent = (row, column, columnIndex) => {
207
182
  const isEditorFocus = columnIndex === this.state.tabIndex && column.editable;
@@ -211,13 +186,27 @@ class Body extends _react.default.Component {
211
186
  column: column
212
187
  }, this.renderColumnValue(row, column, columnIndex, isEditorFocus)));
213
188
  };
189
+ this.renderChildren = () => {
190
+ const {
191
+ columns,
192
+ row,
193
+ children
194
+ } = this.props;
195
+ const props = {
196
+ columns,
197
+ row
198
+ };
199
+ const CustomChildren = children;
200
+ if ( /*#__PURE__*/_react.default.isValidElement(CustomChildren)) return /*#__PURE__*/_react.default.cloneElement(CustomChildren, props);
201
+ if ((0, _utils.isFunction)(CustomChildren)) return /*#__PURE__*/_react.default.createElement(CustomChildren, props);
202
+ return children;
203
+ };
214
204
  this.state = {
215
205
  tabIndex: 0
216
206
  };
217
207
  this.fieldEditorOpen = false;
218
208
  this.focusDom = /*#__PURE__*/_react.default.createRef();
219
209
  this.editors = [];
220
- this.commentInputFocus = false;
221
210
  this.contentRef = null;
222
211
  }
223
212
  componentDidMount() {
@@ -227,16 +216,12 @@ class Body extends _react.default.Component {
227
216
  if (prevState.tabIndex !== this.state.tabIndex) {
228
217
  this.scrollToFocus();
229
218
  }
230
- if (prevState.isShowComment !== this.state.isShowComment) {
231
- this.commentInputFocus = false;
232
- }
233
219
  }
234
220
  componentWillUnmount() {
235
221
  window.removeEventListener('keydown', this.onHotKey);
236
222
  }
237
223
  render() {
238
224
  const {
239
- isInsertingRow,
240
225
  columns,
241
226
  row,
242
227
  placeholder
@@ -247,8 +232,6 @@ class Body extends _react.default.Component {
247
232
  className: "dtable-ui-row-expand-body-content",
248
233
  ref: ref => this.contentRef = ref
249
234
  }, columns.length === 0 && placeholder && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, placeholder), columns.map((column, index) => {
250
- // Do not display creator, last_modifier, ctime, mtime when inserting row
251
- if (isInsertingRow && !column.editable) return null;
252
235
  const {
253
236
  type,
254
237
  data
@@ -262,7 +245,7 @@ class Body extends _react.default.Component {
262
245
  row,
263
246
  column
264
247
  });
265
- const cellValue = (0, _utils.getFormulaArrayValue)(value, !(0, _utils.isArrayFormalColumn)(array_type));
248
+ const cellValue = (0, _utils.getFormulaArrayValue)(value, !(0, _utils.isArrayFormatColumn)(array_type));
266
249
  if (cellValue.length >= 10) {
267
250
  isHasMore = true;
268
251
  }
@@ -273,7 +256,7 @@ class Body extends _react.default.Component {
273
256
  }),
274
257
  key: column.key
275
258
  }, this.renderColumnContent(row, column, index));
276
- })));
259
+ })), this.renderChildren());
277
260
  }
278
261
  }
279
262
  var _default = exports.default = Body;
@@ -7,6 +7,7 @@
7
7
  display: inline-block;
8
8
  padding: 0 0.3125rem;
9
9
  margin-left: -0.3125rem;
10
+ width: 24px;
10
11
  }
11
12
 
12
13
  .dtable-ui-header-icon .dtable-font {
@@ -1,8 +1,8 @@
1
- .dtable-ui-row-expand-header .dtable-ui-row-expand-header-close-list {
1
+ .dtable-ui-row-expand-header .dtable-ui-row-expand-header-right-btns {
2
2
  display: flex;
3
3
  }
4
4
 
5
- .dtable-ui-row-expand-header .dtable-ui-row-expand-header-close-list .header-close-list-btn {
5
+ .dtable-ui-row-expand-header .dtable-ui-row-expand-header-right-btns .header-close-btn {
6
6
  height: 24px;
7
7
  width: 24px;
8
8
  padding: 0 5px;
@@ -12,7 +12,7 @@
12
12
  font-weight: 700;
13
13
  }
14
14
 
15
- .dtable-ui-row-expand-header .dtable-ui-row-expand-header-close-list .header-close-list-btn:hover {
15
+ .dtable-ui-row-expand-header .dtable-ui-row-expand-header-right-btns .header-close-btn:hover {
16
16
  opacity: 0.75;
17
17
  cursor: pointer;
18
18
  }
@@ -1,33 +1,55 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
+ var _react = _interopRequireWildcard(require("react"));
9
10
  var _reactstrap = require("reactstrap");
10
11
  var _lang = require("../../lang");
12
+ var _utils = require("../../utils/utils");
13
+ var _IconButton = _interopRequireDefault(require("../../IconButton"));
11
14
  require("./index.css");
12
15
  const Header = _ref => {
13
16
  let {
17
+ title,
18
+ columns,
19
+ row,
14
20
  onToggle,
15
- title
21
+ copyURL,
22
+ children
16
23
  } = _ref;
24
+ const renderTitle = (0, _react.useCallback)(() => {
25
+ const props = {
26
+ columns,
27
+ row
28
+ };
29
+ const CustomTitle = title;
30
+ if ( /*#__PURE__*/_react.default.isValidElement(CustomTitle)) return /*#__PURE__*/_react.default.cloneElement(CustomTitle, props);
31
+ if ((0, _utils.isFunction)(CustomTitle)) return /*#__PURE__*/_react.default.createElement(CustomTitle, props);
32
+ return /*#__PURE__*/_react.default.createElement("div", {
33
+ className: "dtable-ui-row-expand-header-title text-truncate"
34
+ }, title);
35
+ }, [columns, row, title]);
17
36
  return /*#__PURE__*/_react.default.createElement(_reactstrap.ModalHeader, {
18
37
  className: "d-print-none dtable-ui-row-expand-header",
19
38
  close: /*#__PURE__*/_react.default.createElement("div", {
20
- className: "dtable-ui-row-expand-header-close-list"
21
- }, /*#__PURE__*/_react.default.createElement("span", {
22
- role: "button",
23
- "aria-label": (0, _lang.getLocale)('Close_expanded_record'),
24
- className: "dtable-font dtable-icon-x header-close-list-btn",
25
- onClick: onToggle
39
+ className: "dtable-ui-row-expand-header-right-btns"
40
+ }, copyURL && /*#__PURE__*/_react.default.createElement(_IconButton.default, {
41
+ icon: "url",
42
+ onClick: () => copyURL(),
43
+ "aria-label": (0, _lang.getLocale)('Get_URL'),
44
+ title: (0, _lang.getLocale)('Get_URL')
45
+ }), children, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
46
+ icon: "x",
47
+ onClick: onToggle,
48
+ title: (0, _lang.getLocale)('Close_expanded_record'),
49
+ "aria-label": (0, _lang.getLocale)('Close_expanded_record')
26
50
  }))
27
51
  }, /*#__PURE__*/_react.default.createElement("div", {
28
52
  className: "dtable-ui-row-expand-header-left-btns"
29
- }, /*#__PURE__*/_react.default.createElement("div", {
30
- className: "dtable-ui-row-expand-header-title text-truncate"
31
- }, title)));
53
+ }, renderTitle()));
32
54
  };
33
55
  var _default = exports.default = Header;
@@ -16,8 +16,8 @@ var _body = _interopRequireDefault(require("./body"));
16
16
  var _Loading = _interopRequireDefault(require("../Loading"));
17
17
  var _utils = require("../utils/utils");
18
18
  var _cellComparer = require("../utils/cell-comparer");
19
- require("./index.css");
20
19
  var _toaster = _interopRequireDefault(require("../toaster"));
20
+ require("./index.css");
21
21
  const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
22
22
  let {
23
23
  saveImmediately = true,
@@ -25,25 +25,18 @@ const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
25
25
  zIndex,
26
26
  title,
27
27
  className,
28
- placeholder,
29
- collaborators,
30
- component,
31
- eventBus,
32
28
  valueKey = 'name',
33
29
  // name or key
34
- departments,
35
- userDepartmentIdsMap,
36
- config,
37
30
  layout = 'horizontal',
38
31
  // horizontal or vertical
39
- longTextEditorAPI,
40
32
  getRow,
41
33
  modifyRow,
42
- getCollaborators,
43
- queryCollaborators,
44
34
  checkEditable = c => c.editable && !_dtableUtils.NOT_SUPPORT_EDIT_COLUMN_TYPE_MAP[c.type],
45
35
  onToggle,
46
- uploadFile
36
+ uploadFile,
37
+ copyURL,
38
+ children,
39
+ ...otherProps
47
40
  } = _ref;
48
41
  const [isAnimationEnd, setAnimationEnd] = (0, _react.useState)(false);
49
42
  const [isLoading, setLoading] = (0, _react.useState)(true);
@@ -92,11 +85,14 @@ const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
92
85
  columns
93
86
  } = res.data;
94
87
  setRow(row);
95
- const validColumns = columns.map(c => ({
88
+ let validColumns = columns.map(c => ({
96
89
  ...c,
97
90
  editable: _checkEditable(c, row),
98
91
  width: 320
99
92
  }));
93
+ if (isInsertingRow) {
94
+ validColumns = validColumns.filter(c => c.editable);
95
+ }
100
96
  isChangedRef.current = isInsertingRow && Object.keys(row).length > 0;
101
97
  setColumns(validColumns);
102
98
  setLoading(false);
@@ -215,43 +211,6 @@ const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
215
211
  });
216
212
  }
217
213
  }), [row, columns]);
218
- const renderContent = (0, _react.useCallback)(() => {
219
- if (!isAnimationEnd) return null;
220
- if (isLoading) return /*#__PURE__*/_react.default.createElement("div", {
221
- className: "w-100 -h-100 d-flex align-items-center justify-content-center"
222
- }, /*#__PURE__*/_react.default.createElement(_Loading.default, null));
223
- if (errorMessage) return /*#__PURE__*/_react.default.createElement("div", null, errorMessage);
224
- return /*#__PURE__*/_react.default.createElement("div", {
225
- className: "dtable-ui-row-expand-details"
226
- }, /*#__PURE__*/_react.default.createElement(_header.default, {
227
- onToggle: toggle,
228
- title: title
229
- }), /*#__PURE__*/_react.default.createElement(_body.default, {
230
- isInsertingRow: isInsertingRow,
231
- row: row,
232
- columns: columns,
233
- placeholder: placeholder,
234
- collaborators: collaborators,
235
- eventBus: eventBus,
236
- component: component,
237
- valueKey: valueKey,
238
- departments: departments,
239
- userDepartmentIdsMap: userDepartmentIdsMap,
240
- config: config,
241
- onChange: onChange,
242
- getCollaborators: getCollaborators,
243
- queryCollaborators: queryCollaborators,
244
- uploadFile: uploadFile,
245
- longTextEditorAPI: longTextEditorAPI
246
- }), (!saveImmediately || isInsertingRow) && /*#__PURE__*/_react.default.createElement(_reactstrap.ModalFooter, null, /*#__PURE__*/_react.default.createElement(_reactstrap.Button, {
247
- onClick: toggle,
248
- color: "secondary"
249
- }, (0, _lang.getLocale)('Cancel')), /*#__PURE__*/_react.default.createElement(_reactstrap.Button, {
250
- onClick: onSubmit,
251
- disabled: isSaving || !isChangedRef.current,
252
- color: "primary"
253
- }, (0, _lang.getLocale)('Submit'))));
254
- }, [isSaving, saveImmediately, isAnimationEnd, isLoading, isInsertingRow, errorMessage, title, row, columns, placeholder, collaborators, component, valueKey, departments, userDepartmentIdsMap, eventBus, onChange, toggle, getCollaborators, queryCollaborators, uploadFile, longTextEditorAPI, config, onSubmit]);
255
214
  return /*#__PURE__*/_react.default.createElement(_reactstrap.Modal, {
256
215
  isOpen: true,
257
216
  toggle: onToggle,
@@ -263,6 +222,31 @@ const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
263
222
  fade: false,
264
223
  innerRef: modalRef,
265
224
  keyboard: false
266
- }, renderContent());
225
+ }, isAnimationEnd && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isLoading ? /*#__PURE__*/_react.default.createElement("div", {
226
+ className: "w-100 -h-100 d-flex align-items-center justify-content-center"
227
+ }, /*#__PURE__*/_react.default.createElement(_Loading.default, null)) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, errorMessage ? /*#__PURE__*/_react.default.createElement("div", {
228
+ className: "w-100 -h-100 d-flex align-items-center justify-content-center error"
229
+ }, errorMessage) : /*#__PURE__*/_react.default.createElement("div", {
230
+ className: "dtable-ui-row-expand-details"
231
+ }, /*#__PURE__*/_react.default.createElement(_header.default, {
232
+ title: title,
233
+ row: row,
234
+ columns: columns,
235
+ copyURL: copyURL,
236
+ onToggle: toggle
237
+ }, children[0]), /*#__PURE__*/_react.default.createElement(_body.default, Object.assign({}, otherProps, {
238
+ row: row,
239
+ columns: columns,
240
+ valueKey: valueKey,
241
+ onChange: onChange,
242
+ uploadFile: uploadFile
243
+ }), children[1]), (!saveImmediately || isInsertingRow) && /*#__PURE__*/_react.default.createElement(_reactstrap.ModalFooter, null, /*#__PURE__*/_react.default.createElement(_reactstrap.Button, {
244
+ onClick: toggle,
245
+ color: "secondary"
246
+ }, (0, _lang.getLocale)('Cancel')), /*#__PURE__*/_react.default.createElement(_reactstrap.Button, {
247
+ onClick: onSubmit,
248
+ disabled: isSaving || !isChangedRef.current,
249
+ color: "primary"
250
+ }, (0, _lang.getLocale)('Submit')))))));
267
251
  });
268
252
  var _default = exports.default = RowExpandDialog;
@@ -93,7 +93,6 @@ class RowExpandLongTextEditor extends _react.default.Component {
93
93
  const {
94
94
  column,
95
95
  longTextEditorAPI,
96
- lang,
97
96
  longTextEditorI18n
98
97
  } = this.props;
99
98
  const {
@@ -109,7 +108,7 @@ class RowExpandLongTextEditor extends _react.default.Component {
109
108
  i18n: longTextEditorI18n
110
109
  }, /*#__PURE__*/_react.default.createElement(_seafileEditor.LongTextInlineEditor, {
111
110
  ref: this.editorRef,
112
- lang: lang,
111
+ lang: _lang.LANGUAGE,
113
112
  headerName: column.name,
114
113
  value: value || '',
115
114
  autoSave: true,
@@ -13,7 +13,7 @@ var _CTimeFormatter = _interopRequireDefault(require("../../CTimeFormatter"));
13
13
  var _MTimeFormatter = _interopRequireDefault(require("../../MTimeFormatter"));
14
14
  var _DateFormatter = _interopRequireDefault(require("../../DateFormatter"));
15
15
  var _collaboratorItemFormatter = _interopRequireDefault(require("./collaborator-item-formatter"));
16
- var _utils = require("./utils");
16
+ var _utils = require("../../utils/utils");
17
17
  var _valueDisplayUtils = require("./value-display-utils");
18
18
  require("./index.css");
19
19
  class RowExpandLinkFormatter extends _react.Component {
@@ -100,7 +100,7 @@
100
100
  background-color: #fff;
101
101
  }
102
102
 
103
- .dtable-ui.dtable-row-expand-formatter .geolocation-formatter-container {
103
+ .dtable-ui.dtable-row-expand-formatter .dtable-ui-geolocation-formatter-container {
104
104
  margin-top: 0.5rem;
105
105
  display: flex;
106
106
  align-items: center;
@@ -102,11 +102,10 @@ class RowExpandFormatter extends _react.default.Component {
102
102
  }
103
103
  case _constants.CellType.GEOLOCATION:
104
104
  {
105
- if (typeof cellValue !== 'object') return /*#__PURE__*/_react.default.createElement("div", {
106
- className: "geolocation-formatter-container"
107
- });
105
+ if (!cellValue) return null;
106
+ if (typeof cellValue !== 'object') return null;
108
107
  return /*#__PURE__*/_react.default.createElement("div", {
109
- className: "geolocation-formatter-container"
108
+ className: "dtable-ui-geolocation-formatter-container"
110
109
  }, /*#__PURE__*/_react.default.createElement(Formatter, {
111
110
  value: cellValue,
112
111
  data: column.data,
package/lib/lang/index.js CHANGED
@@ -4,6 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
+ exports.LANGUAGE = void 0;
7
8
  exports.getLocale = getLocale;
8
9
  exports.getMobileDatePickerLocale = getMobileDatePickerLocale;
9
10
  exports.setLocale = setLocale;
@@ -34,10 +35,10 @@ let langData = {
34
35
  'es': _es.default,
35
36
  'zh-cn': _zhCN.default
36
37
  };
37
- let LANGUAGE = 'en';
38
+ let LANGUAGE = exports.LANGUAGE = 'en';
38
39
  let LANGUAGE_MAP = langData[LANGUAGE];
39
40
  function setLocale(args) {
40
- LANGUAGE = typeof args === 'string' ? args : LANGUAGE;
41
+ exports.LANGUAGE = LANGUAGE = typeof args === 'string' ? args : LANGUAGE;
41
42
  LANGUAGE_MAP = langData[LANGUAGE];
42
43
  }
43
44
  function substitute(str, obj) {
@@ -159,5 +159,9 @@
159
159
  "Long_text_exceed_limit_message": "Das Dokument hat eine Länge von mehr als 100.000 Zeichen und kann daher nicht gespeichert werden.",
160
160
  "Long_text_exceed_limit_suggest": "Die Länge dieses Dokuments überschreitet das Maximum von 100.000 Zeichen. Nur 100.000 Zeichen werden gespeichert.",
161
161
  "Deleted_option": "Die Option wurde gelöscht.",
162
- "Input_does_not_meet_specifications": "Die Eingabe entspricht nicht der Vorgabe."
162
+ "Input_does_not_meet_specifications": "Die Eingabe entspricht nicht der Vorgabe.",
163
+ "Mark_as_resolved": "Als erledigt markieren",
164
+ "No_comment_yet": "Es sind keine Kommentare vorhanden.",
165
+ "Add_comment": "Kommentar hinzufügen",
166
+ "Add_participants": "Teilnehmer hinzufügen"
163
167
  }
@@ -159,5 +159,9 @@
159
159
  "Long_text_exceed_limit_message": "The content of the document has exceeded the limit of 100000 characters, and the content cannot be saved",
160
160
  "Long_text_exceed_limit_suggest": "The content of the document has exceeded the limit of 100000 characters, and only the first 100000 characters are saved",
161
161
  "Deleted_option": "deleted option",
162
- "Input_does_not_meet_specifications": "Input does not meet specifications"
162
+ "Input_does_not_meet_specifications": "Input does not meet specifications",
163
+ "Mark_as_resolved": "Mark as resolved",
164
+ "No_comment_yet": "No comment yet",
165
+ "Add_comment": "Add comment",
166
+ "Add_participants": "Add participants"
163
167
  }
@@ -159,5 +159,9 @@
159
159
  "Long_text_exceed_limit_message": "El contenido del documento ha superado el límite de 100.000 caracteres y no puede ser guardado",
160
160
  "Long_text_exceed_limit_suggest": "El contenido del documento excede el límite de 100.000 caracteres y solo se guardarán los primeros 100.000 caracteres.",
161
161
  "Deleted_option": "Opciones borradas",
162
- "Input_does_not_meet_specifications": "Input does not meet specifications"
162
+ "Input_does_not_meet_specifications": "Input does not meet specifications",
163
+ "Mark_as_resolved": "Marcar como resuelto",
164
+ "No_comment_yet": "No comment yet",
165
+ "Add_comment": "Añadir comentario",
166
+ "Add_participants": "Añadir participantes"
163
167
  }
@@ -159,5 +159,9 @@
159
159
  "Long_text_exceed_limit_message": "Le document a une longueur de plus de 100.000 caractères et ne peut donc pas être enregistré.",
160
160
  "Long_text_exceed_limit_suggest": "La longueur de ce document dépasse le maximum de 100.000 caractères. Seuls 100.000 sont enregistrés.",
161
161
  "Deleted_option": "L'option a été supprimée.",
162
- "Input_does_not_meet_specifications": "L'entrée n'est pas conforme à la spécification."
162
+ "Input_does_not_meet_specifications": "L'entrée n'est pas conforme à la spécification.",
163
+ "Mark_as_resolved": "Marquer comme résolu",
164
+ "No_comment_yet": "Aucun commentaire n'est disponible.",
165
+ "Add_comment": "Ajouter un commentaire",
166
+ "Add_participants": "Ajouter des participants"
163
167
  }
@@ -159,5 +159,9 @@
159
159
  "Long_text_exceed_limit_message": "O conteúdo do documento excedeu o limite de 100000 caracteres e o conteúdo não pode ser salvo",
160
160
  "Long_text_exceed_limit_suggest": "O conteúdo do documento excedeu o limite de 100000 caracteres e apenas os primeiros 100000 caracteres são salvos",
161
161
  "Deleted_option": "opção excluída",
162
- "Input_does_not_meet_specifications": "Input does not meet specifications"
162
+ "Input_does_not_meet_specifications": "Input does not meet specifications",
163
+ "Mark_as_resolved": "Marca conforme resolvido",
164
+ "No_comment_yet": "No comment yet",
165
+ "Add_comment": "Adicionar comentário",
166
+ "Add_participants": "Adicione participantes"
163
167
  }
@@ -159,5 +159,9 @@
159
159
  "Long_text_exceed_limit_message": "Содержимое документа превысило лимит в 100000 символов, и сохранить его невозможно",
160
160
  "Long_text_exceed_limit_suggest": "Содержание документа превысило лимит в 100000 символов, поэтому сохранятся только первые 100000 символов",
161
161
  "Deleted_option": "удаленный параметр",
162
- "Input_does_not_meet_specifications": "Input does not meet specifications"
162
+ "Input_does_not_meet_specifications": "Input does not meet specifications",
163
+ "Mark_as_resolved": "Пометить как разрешенный",
164
+ "No_comment_yet": "Пока без комментариев",
165
+ "Add_comment": "Добавить комментарий",
166
+ "Add_participants": "Добавить участников"
163
167
  }
@@ -159,5 +159,9 @@
159
159
  "Long_text_exceed_limit_message": "文档内容已超过 100000 字符限制,内容无法保存",
160
160
  "Long_text_exceed_limit_suggest": "文档内容已超过 100000 个字符的限制,仅保存前 100000 个字符",
161
161
  "Deleted_option": "已删除的标签",
162
- "Input_does_not_meet_specifications": "输入不符合规范"
162
+ "Input_does_not_meet_specifications": "输入不符合规范",
163
+ "Mark_as_resolved": "标记为已解决",
164
+ "No_comment_yet": "暂无评论",
165
+ "Add_comment": "增加评论",
166
+ "Add_participants": "添加参与人"
163
167
  }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.isSpace = exports.isShiftModEnter = exports.isShiftEnter = exports.isOptPageup = exports.isOptPagedown = exports.isModZ = exports.isModUp = exports.isModSlash = exports.isModShiftZ = exports.isModShiftG = exports.isModShiftDot = exports.isModShiftComma = exports.isModSemicolon = exports.isModS = exports.isModRight = exports.isModP = exports.isModOptionR = exports.isModOptionE = exports.isModLeft = exports.isModL = exports.isModG = exports.isModF = exports.isModDown = exports.isModDot = exports.isModComma = exports.isModC = exports.isModBackslash = exports.isEsc = exports.isEnter = void 0;
8
+ var _isHotkey = _interopRequireDefault(require("is-hotkey"));
9
+ const isModC = exports.isModC = (0, _isHotkey.default)('mod+c');
10
+ const isModS = exports.isModS = (0, _isHotkey.default)('mod+s');
11
+ const isModZ = exports.isModZ = (0, _isHotkey.default)('mod+z');
12
+ const isModL = exports.isModL = (0, _isHotkey.default)('mod+l');
13
+ const isModF = exports.isModF = (0, _isHotkey.default)('mod+f');
14
+ const isModP = exports.isModP = (0, _isHotkey.default)('mod+p');
15
+ const isModG = exports.isModG = (0, _isHotkey.default)('mod+g');
16
+ const isModDot = exports.isModDot = (0, _isHotkey.default)('mod+.');
17
+ const isModComma = exports.isModComma = (0, _isHotkey.default)('mod+,');
18
+ const isModSlash = exports.isModSlash = (0, _isHotkey.default)('mod+/');
19
+ const isModBackslash = exports.isModBackslash = (0, _isHotkey.default)('mod+\'');
20
+ const isModSemicolon = exports.isModSemicolon = (0, _isHotkey.default)('mod+;');
21
+ const isModUp = exports.isModUp = (0, _isHotkey.default)('mod+up');
22
+ const isModDown = exports.isModDown = (0, _isHotkey.default)('mod+down');
23
+ const isModLeft = exports.isModLeft = (0, _isHotkey.default)('mod+left');
24
+ const isModRight = exports.isModRight = (0, _isHotkey.default)('mod+right');
25
+ const isModShiftZ = exports.isModShiftZ = (0, _isHotkey.default)('mod+shift+z');
26
+ const isModShiftG = exports.isModShiftG = (0, _isHotkey.default)('mod+shift+g');
27
+ const isModOptionR = exports.isModOptionR = (0, _isHotkey.default)('mod+option+r');
28
+ const isModOptionE = exports.isModOptionE = (0, _isHotkey.default)('mod+option+e');
29
+ const isModShiftDot = exports.isModShiftDot = (0, _isHotkey.default)('mod+shift+.');
30
+ const isModShiftComma = exports.isModShiftComma = (0, _isHotkey.default)('mod+shift+,');
31
+ const isShiftEnter = exports.isShiftEnter = (0, _isHotkey.default)('shift+enter');
32
+ const isShiftModEnter = exports.isShiftModEnter = (0, _isHotkey.default)('shift+mod+enter');
33
+ const isOptPageup = exports.isOptPageup = (0, _isHotkey.default)('opt+pageup');
34
+ const isOptPagedown = exports.isOptPagedown = (0, _isHotkey.default)('opt+pagedown');
35
+ const isSpace = exports.isSpace = (0, _isHotkey.default)('space');
36
+ const isEsc = exports.isEsc = (0, _isHotkey.default)('esc');
37
+ const isEnter = exports.isEnter = (0, _isHotkey.default)('enter');