dtable-ui-component 6.0.54 → 6.0.55-beta.2

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 (153) hide show
  1. package/lib/ActionSheet/index.js +21 -21
  2. package/lib/ActivityIndicator/index.js +9 -9
  3. package/lib/AsyncUserSelect/index.js +3 -3
  4. package/lib/Badge/index.js +10 -10
  5. package/lib/CheckboxEditor/mb-editor.js +2 -10
  6. package/lib/CheckboxEditor/pc-editor.js +2 -10
  7. package/lib/CheckboxFormatter/index.js +4 -13
  8. package/lib/CollaboratorEditor/pc-editor/index.js +1 -1
  9. package/lib/CollapsibleSettingLayout/index.js +1 -1
  10. package/lib/Comment/body/comment.js +1 -1
  11. package/lib/Comment/footer/index.js +1 -1
  12. package/lib/Comment/footer/input/index.js +5 -5
  13. package/lib/Comment/footer/input/participant/index.js +1 -1
  14. package/lib/Comment/footer/participants/participant-select/index.js +2 -2
  15. package/lib/Comment/utils/utilities.js +1 -1
  16. package/lib/DTableColorPicker/ColorPickerPortal/index.js +4 -4
  17. package/lib/DTableColorPicker/index.js +6 -6
  18. package/lib/DTableColorPicker/utils.js +1 -1
  19. package/lib/DTableColumnIcon/index.js +71 -0
  20. package/lib/DTableCommonAddTool/index.js +2 -2
  21. package/lib/DTableFiltersPopover/index.js +1 -1
  22. package/lib/DTableFiltersPopover/utils/filter-item-utils.js +7 -4
  23. package/lib/DTableFiltersPopover/utils/index.js +92 -27
  24. package/lib/DTableFiltersPopover/widgets/filter-group.js +2 -2
  25. package/lib/DTableFiltersPopover/widgets/filter-item.js +2 -2
  26. package/lib/DTableFiltersPopover/widgets/filter-list/index.css +4 -2
  27. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +1 -1
  28. package/lib/DTableFiltersPopover/widgets/rate-item.js +2 -2
  29. package/lib/DTableGroupSelect/select-option-group.js +1 -1
  30. package/lib/{SvgIcon → DTableIcon}/index.css +2 -2
  31. package/lib/DTableIcon/index.js +44 -0
  32. package/lib/DTableIcon/svg-icon.js +56 -0
  33. package/lib/DTableRadioGroup/index.js +3 -3
  34. package/lib/DTableSearchInput/index.js +1 -1
  35. package/lib/DTableSelect/dtable-select-label.js +1 -1
  36. package/lib/DTableSelect/utils.js +3 -0
  37. package/lib/DTableSwitch/index.css +2 -1
  38. package/lib/DateEditor/pc-editor.js +1 -1
  39. package/lib/DatePicker/utils.js +4 -4
  40. package/lib/DepartmentMultipleSelectEditor/index.js +3 -3
  41. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +2 -2
  42. package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +2 -2
  43. package/lib/DigitalSignEditor/service.js +1 -1
  44. package/lib/DigitalSignEditor/signature-board/index.js +2 -2
  45. package/lib/DigitalSignFormatter/utils.js +1 -1
  46. package/lib/FieldDisplaySetting/field-item.js +9 -4
  47. package/lib/FieldDisplaySetting/index.js +6 -6
  48. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +2 -2
  49. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +3 -3
  50. package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -1
  51. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +6 -6
  52. package/lib/FileFormatter/index.js +1 -1
  53. package/lib/FileItemFormatter/index.js +1 -1
  54. package/lib/FileUploader/index.js +1 -1
  55. package/lib/FormulaFormatter/index.js +4 -4
  56. package/lib/GeolocationEditor/index.js +3 -3
  57. package/lib/GeolocationEditor/map-editor-utils.js +2 -2
  58. package/lib/GeolocationEditor/pc-editor/country-editor.js +2 -2
  59. package/lib/GeolocationEditor/pc-editor/location-editor.js +2 -2
  60. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +20 -3
  61. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +20 -3
  62. package/lib/GeolocationEditor/pc-editor/province-city-editor.js +1 -1
  63. package/lib/GeolocationEditor/pc-editor/province-editor.js +3 -3
  64. package/lib/GeolocationEditor/pc-editor/selector-list.js +1 -1
  65. package/lib/HtmlLongTextFormatter/index.js +1 -1
  66. package/lib/Icon/index.js +2 -2
  67. package/lib/Icon/load-sprite.js +13 -2
  68. package/lib/IconButton/index.js +1 -1
  69. package/lib/ImageEditor/images-previewer/image-preview/index.js +1 -1
  70. package/lib/ImageEditor/pc-editor/addition-previewer/index.js +2 -2
  71. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +5 -5
  72. package/lib/ImageEditor/pc-editor/images-previewer/index.js +1 -1
  73. package/lib/ImageFormatter/index.js +1 -1
  74. package/lib/ImageThumbnail/index.js +2 -2
  75. package/lib/InputItem/custom-input.js +9 -9
  76. package/lib/InputItem/custom-keyboard.js +5 -5
  77. package/lib/InputItem/index.js +21 -21
  78. package/lib/List/index.js +3 -3
  79. package/lib/List/list-item.js +23 -23
  80. package/lib/MBEditorHeader/index.js +1 -1
  81. package/lib/MobileFullScreenPage/body/index.js +1 -1
  82. package/lib/MobileFullScreenPage/header/index.js +4 -4
  83. package/lib/MobileFullScreenPage/index.js +1 -1
  84. package/lib/Modal/alert.js +3 -3
  85. package/lib/Modal/modal.js +8 -8
  86. package/lib/Modal/operation.js +1 -1
  87. package/lib/Modal/prompt.js +11 -11
  88. package/lib/MultipleSelectFormatter/index.js +1 -1
  89. package/lib/PhoneNumberLink/index.js +29 -0
  90. package/lib/Popover/index.js +1 -1
  91. package/lib/Popover/item.js +7 -7
  92. package/lib/Progress/index.js +6 -6
  93. package/lib/Radio/Radio.js +1 -1
  94. package/lib/Radio/RadioItem.js +2 -2
  95. package/lib/RateFormatter/index.js +3 -3
  96. package/lib/RoleStatusEditor/index.js +1 -1
  97. package/lib/RowExpandDialog/body/index.js +1 -1
  98. package/lib/RowExpandDialog/column-content/index.css +4 -2
  99. package/lib/RowExpandDialog/column-content/index.js +7 -4
  100. package/lib/RowExpandDialog/header/index.js +1 -1
  101. package/lib/RowExpandDialog/index.js +3 -3
  102. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +1 -1
  103. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +1 -1
  104. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +1 -1
  105. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +1 -1
  106. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +1 -1
  107. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +1 -1
  108. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +1 -1
  109. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +5 -5
  110. package/lib/RowExpandEditor/rate-editor/mb-editor.js +1 -1
  111. package/lib/RowExpandEditor/rate-editor/pc-editor.js +2 -2
  112. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +3 -3
  113. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +1 -1
  114. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +1 -1
  115. package/lib/RowExpandFormatter/constants.js +2 -2
  116. package/lib/RowExpandFormatter/email-formatter/index.css +1 -29
  117. package/lib/RowExpandFormatter/email-formatter/index.js +4 -4
  118. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +2 -2
  119. package/lib/RowExpandFormatter/formula-formatter/index.css +2 -0
  120. package/lib/RowExpandFormatter/formula-formatter/index.js +22 -19
  121. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +2 -2
  122. package/lib/RowExpandFormatter/index.css +2 -0
  123. package/lib/RowExpandFormatter/index.js +2 -1
  124. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +1 -1
  125. package/lib/RowExpandFormatter/link-formatter/index.js +6 -6
  126. package/lib/RowExpandFormatter/rate-formatter/index.js +3 -3
  127. package/lib/RowExpandFormatter/text/index.css +2 -0
  128. package/lib/RowExpandFormatter/text/index.js +49 -0
  129. package/lib/RowExpandFormatter/url-formatter/index.css +1 -0
  130. package/lib/RowExpandFormatter/url-formatter/index.js +4 -4
  131. package/lib/RowExpandView/body/index.css +4 -0
  132. package/lib/RowExpandView/body/index.js +1 -1
  133. package/lib/SelectOptionGroup/index.css +5 -2
  134. package/lib/SelectOptionGroup/index.js +1 -1
  135. package/lib/SelectedDepartments/index.js +3 -3
  136. package/lib/SimpleLongTextFormatter/index.js +2 -2
  137. package/lib/TabBar/Tab.js +6 -6
  138. package/lib/TabBar/index.js +3 -3
  139. package/lib/TextareaItem/index.js +19 -19
  140. package/lib/Toast/index.js +5 -5
  141. package/lib/assets/icons/telephone.svg +14 -0
  142. package/lib/css/row-expand.css +27 -0
  143. package/lib/index.js +21 -7
  144. package/lib/select-editor/pc-editor/index.js +2 -2
  145. package/lib/toaster/alert.js +1 -1
  146. package/lib/toaster/toast.js +1 -1
  147. package/lib/toaster/toastManager.js +1 -1
  148. package/lib/toaster/toaster.js +1 -1
  149. package/lib/utils/class.js +3 -3
  150. package/lib/utils/object-utils.js +1 -1
  151. package/lib/utils/url.js +4 -4
  152. package/package.json +14 -30
  153. package/lib/SvgIcon/index.js +0 -38
@@ -18,7 +18,7 @@ class Progress extends React.Component {
18
18
  if (this.props.appearTransition) {
19
19
  setTimeout(() => {
20
20
  if (this.barRef) {
21
- this.barRef.style.width = "".concat(this.props.percent, "%");
21
+ this.barRef.style.width = `${this.props.percent}%`;
22
22
  }
23
23
  }, 10);
24
24
  }
@@ -33,12 +33,12 @@ class Progress extends React.Component {
33
33
  barStyle = {}
34
34
  } = this.props;
35
35
  const percentStyle = {
36
- width: this.noAppearTransition || !this.props.appearTransition ? "".concat(this.props.percent, "%") : 0,
36
+ width: this.noAppearTransition || !this.props.appearTransition ? `${this.props.percent}%` : 0,
37
37
  height: 0
38
38
  };
39
- const wrapCls = (0, _classnames.default)("".concat(prefixCls, "-outer"), className, {
40
- ["".concat(prefixCls, "-fixed-outer")]: position === 'fixed',
41
- ["".concat(prefixCls, "-hide-outer")]: !unfilled
39
+ const wrapCls = (0, _classnames.default)(`${prefixCls}-outer`, className, {
40
+ [`${prefixCls}-fixed-outer`]: position === 'fixed',
41
+ [`${prefixCls}-hide-outer`]: !unfilled
42
42
  });
43
43
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
44
44
  style: style,
@@ -49,7 +49,7 @@ class Progress extends React.Component {
49
49
  "aria-valuemax": 100,
50
50
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
51
51
  ref: el => this.barRef = el,
52
- className: "".concat(prefixCls, "-bar"),
52
+ className: `${prefixCls}-bar`,
53
53
  style: {
54
54
  ...barStyle,
55
55
  ...percentStyle
@@ -21,7 +21,7 @@ class Radio extends React.Component {
21
21
  prefixCls,
22
22
  children
23
23
  } = restProps;
24
- const wrapCls = (0, _classnames.default)("".concat(prefixCls, "-wrapper"), className);
24
+ const wrapCls = (0, _classnames.default)(`${prefixCls}-wrapper`, className);
25
25
  if ('class' in restProps) {
26
26
  // Todo https://github.com/developit/preact-compat/issues/422
27
27
  /* tslint:disable:no-string-literal */
@@ -28,8 +28,8 @@ class RadioItem extends React.Component {
28
28
  className,
29
29
  children
30
30
  } = otherProps;
31
- const wrapCls = (0, _classnames.default)("".concat(prefixCls, "-item"), className, {
32
- ["".concat(prefixCls, "-item-disabled")]: disabled === true
31
+ const wrapCls = (0, _classnames.default)(`${prefixCls}-item`, className, {
32
+ [`${prefixCls}-item-disabled`]: disabled === true
33
33
  });
34
34
 
35
35
  // Note: if not omit `onChange`, it will trigger twice on check listitem
@@ -25,12 +25,12 @@ class RateFormatter extends _react.default.Component {
25
25
  const validValue = Math.min(rate_max_number, value);
26
26
  let rateList = [];
27
27
  for (let i = 0; i < validValue; i++) {
28
- rateList.push( /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
29
- className: "dtable-font ".concat(rate_style_type),
28
+ rateList.push(/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
29
+ className: `dtable-font ${rate_style_type}`,
30
30
  style: {
31
31
  color: rate_style_color || '#e5e5e5'
32
32
  }
33
- }, "dtable-ui-component-rate-".concat(i)));
33
+ }, `dtable-ui-component-rate-${i}`));
34
34
  }
35
35
  return rateList;
36
36
  };
@@ -61,7 +61,7 @@ const RoleStatusEditor = _ref => {
61
61
  children: [label, value === currentOption.value && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
62
62
  className: "dtable-font dtable-icon-check-mark ml-2"
63
63
  })]
64
- }, "item-".concat(value));
64
+ }, `item-${value}`);
65
65
  })
66
66
  })]
67
67
  });
@@ -203,7 +203,7 @@ class Body extends _react.default.Component {
203
203
  row
204
204
  };
205
205
  const CustomChildren = children;
206
- if ( /*#__PURE__*/_react.default.isValidElement(CustomChildren)) return /*#__PURE__*/_react.default.cloneElement(CustomChildren, props);
206
+ if (/*#__PURE__*/_react.default.isValidElement(CustomChildren)) return /*#__PURE__*/_react.default.cloneElement(CustomChildren, props);
207
207
  if ((0, _utils.isFunction)(CustomChildren)) return /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomChildren, {
208
208
  ...props
209
209
  });
@@ -10,13 +10,15 @@
10
10
  width: 24px;
11
11
  }
12
12
 
13
- .dtable-ui-header-icon .dtable-font {
13
+ .dtable-ui-header-icon .dtable-font,
14
+ .dtable-ui-header-icon .multicolor-icon {
14
15
  font-size: 14px;
15
16
  color: #aaa;
16
17
  cursor: default;
17
18
  }
18
19
 
19
- .dtable-ui-row-expand-column-content .dtable-ui-row-expand-column-content-info .dtable-ui-header-icon .dtable-font {
20
+ .dtable-ui-row-expand-column-content .dtable-ui-row-expand-column-content-info .dtable-ui-header-icon .dtable-font,
21
+ .dtable-ui-row-expand-column-content .dtable-ui-row-expand-column-content-info .dtable-ui-header-icon .multicolor-icon {
20
22
  color: #212529a6;
21
23
  }
22
24
 
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
4
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
@@ -7,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
7
8
  exports.default = void 0;
8
9
  var _react = _interopRequireWildcard(require("react"));
9
10
  var _reactstrap = require("reactstrap");
10
- var _dtableUtils = require("dtable-utils");
11
+ var _DTableColumnIcon = _interopRequireDefault(require("../../DTableColumnIcon"));
11
12
  require("./index.css");
12
13
  var _jsxRuntime = require("react/jsx-runtime");
13
14
  const ColumnContent = _ref => {
@@ -20,6 +21,7 @@ const ColumnContent = _ref => {
20
21
  name,
21
22
  type,
22
23
  key,
24
+ data,
23
25
  description
24
26
  } = column;
25
27
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.Row, {
@@ -29,9 +31,10 @@ const ColumnContent = _ref => {
29
31
  className: "dtable-ui-row-expand-column-content-info d-flex",
30
32
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
31
33
  className: "dtable-ui-header-icon",
32
- id: "header-icon-".concat(key),
33
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
34
- className: _dtableUtils.COLUMNS_ICON_CONFIG[type]
34
+ id: `header-icon-${key}`,
35
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableColumnIcon.default, {
36
+ columnType: type,
37
+ columnDisplayType: data === null || data === void 0 ? void 0 : data.display_type
35
38
  })
36
39
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
37
40
  className: "dtable-ui-row-expand-column-name",
@@ -28,7 +28,7 @@ const Header = _ref => {
28
28
  row
29
29
  };
30
30
  const CustomTitle = title;
31
- if ( /*#__PURE__*/_react.default.isValidElement(CustomTitle)) return /*#__PURE__*/_react.default.cloneElement(CustomTitle, props);
31
+ if (/*#__PURE__*/_react.default.isValidElement(CustomTitle)) return /*#__PURE__*/_react.default.cloneElement(CustomTitle, props);
32
32
  if ((0, _utils.isFunction)(CustomTitle)) return /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomTitle, {
33
33
  ...props
34
34
  });
@@ -167,9 +167,9 @@ const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
167
167
  marginLeft,
168
168
  height
169
169
  } = style;
170
- dom.style.width = "".concat(width, "px");
171
- dom.style.maxWidth = "".concat(maxWidth, "px");
172
- dom.style.marginLeft = "".concat(marginLeft, "px");
170
+ dom.style.width = `${width}px`;
171
+ dom.style.maxWidth = `${maxWidth}px`;
172
+ dom.style.marginLeft = `${marginLeft}px`;
173
173
  dom.style.height = height;
174
174
  dom.style.marginRight = 'unset';
175
175
  dom.style.marginTop = '28px';
@@ -81,7 +81,7 @@ class RowExpandMBDigitalSignEditor extends _react.default.Component {
81
81
  onClick: this.toggleEditor,
82
82
  deleteImage: this.deleteImage,
83
83
  disableImageTooltip: true
84
- }, "sing-image-".concat(key, "-").concat(index));
84
+ }, `sing-image-${key}-${index}`);
85
85
  });
86
86
  };
87
87
  this.state = {
@@ -120,7 +120,7 @@ class RowExpandPCDigitalSignEditor extends _react.default.Component {
120
120
  onClick: this.setLargeImageIndex,
121
121
  deleteImage: this.deleteImage,
122
122
  disableImageTooltip: true
123
- }, "sing-image-".concat(key, "-").concat(index));
123
+ }, `sing-image-${key}-${index}`);
124
124
  });
125
125
  };
126
126
  this.state = {
@@ -36,7 +36,7 @@ class RowExpandMBEmailEditor extends _react.default.Component {
36
36
  value
37
37
  } = this.state;
38
38
  let newValue = value.trim();
39
- window.location.href = "mailto:".concat(newValue);
39
+ window.location.href = `mailto:${newValue}`;
40
40
  };
41
41
  const {
42
42
  row,
@@ -66,7 +66,7 @@ class RowExpandPCEmailEditor extends _react.default.Component {
66
66
  value
67
67
  } = this.state;
68
68
  let newValue = value.trim();
69
- window.location.href = "mailto:".concat(newValue);
69
+ window.location.href = `mailto:${newValue}`;
70
70
  };
71
71
  const {
72
72
  row,
@@ -55,7 +55,7 @@ class RowExpandMBImageEditor extends _react.default.Component {
55
55
  config: config,
56
56
  onClick: this.toggleEditor,
57
57
  deleteImage: this.deleteImage
58
- }, "image-".concat(index));
58
+ }, `image-${index}`);
59
59
  });
60
60
  };
61
61
  const {
@@ -95,7 +95,7 @@ class RowExpandPCImageEditor extends _react.default.Component {
95
95
  onClick: this.setLargeImageIndex,
96
96
  deleteImage: this.deleteImage,
97
97
  config: config
98
- }, "image-".concat(index));
98
+ }, `image-${index}`);
99
99
  });
100
100
  };
101
101
  this.state = {
@@ -90,7 +90,7 @@ class RowExpandMBMultipleSelectEditor extends _react.default.Component {
90
90
  onRemove: this.removeOption.bind(this, {
91
91
  [this.key]: optionId
92
92
  })
93
- }, "deleted-".concat(index));
93
+ }, `deleted-${index}`);
94
94
  }));
95
95
  }
96
96
  if (displayOptions.length === 0) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_addBtn.default, {
@@ -146,7 +146,7 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
146
146
  })
147
147
  })
148
148
  })]
149
- }, "deleted-multiple-select-".concat(index));
149
+ }, `deleted-multiple-select-${index}`);
150
150
  }));
151
151
  };
152
152
  this.renderOptions = () => {
@@ -163,19 +163,19 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
163
163
  ref: ref => this.multipleSelectOptionsRef = ref,
164
164
  className: (0, _classnames.default)('dtable-ui dtable-ui-row-expand-select-editor custom-select', {
165
165
  'focus': isEditorFocus,
166
- ["".concat(classNamePrefix, "-select-editor")]: classNamePrefix
166
+ [`${classNamePrefix}-select-editor`]: classNamePrefix
167
167
  }),
168
168
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
169
169
  className: (0, _classnames.default)('dtable-ui-row-expand-select-editor-inner', {
170
- ["".concat(classNamePrefix, "-select-editor-inner")]: classNamePrefix
170
+ [`${classNamePrefix}-select-editor-inner`]: classNamePrefix
171
171
  }),
172
172
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
173
173
  className: (0, _classnames.default)('', {
174
- ["".concat(classNamePrefix, "-select-editor-inner-container")]: classNamePrefix
174
+ [`${classNamePrefix}-select-editor-inner-container`]: classNamePrefix
175
175
  }),
176
176
  children: [options.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
177
177
  className: (0, _classnames.default)('dtable-ui-row-expand-select-options', {
178
- ["".concat(classNamePrefix, "-select-editor-options")]: classNamePrefix
178
+ [`${classNamePrefix}-select-editor-options`]: classNamePrefix
179
179
  }),
180
180
  children: options
181
181
  }), options.length === 0 && placeholder && /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
@@ -49,7 +49,7 @@ class RowExpandMBRateEditor extends _react.default.Component {
49
49
  'rate-item-active': value >= rateItemIndex
50
50
  }),
51
51
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
52
- className: "dtable-font ".concat(rateShowType)
52
+ className: `dtable-font ${rateShowType}`
53
53
  })
54
54
  }, i);
55
55
  rateList.push(rateItem);
@@ -93,7 +93,7 @@ class RowExpandPCRateEditor extends _react.default.Component {
93
93
  style: style,
94
94
  className: value >= rateItemIndex ? 'rate-item-active' : '',
95
95
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
96
- className: "dtable-font ".concat(rateShowType)
96
+ className: `dtable-font ${rateShowType}`
97
97
  })
98
98
  }, i);
99
99
  rateList.push(rateItem);
@@ -142,7 +142,7 @@ class RowExpandPCRateEditor extends _react.default.Component {
142
142
  style: style,
143
143
  onKeyDown: this.onKeyDown,
144
144
  onFocus: this.props.updateTabIndex.bind(this, this.props.columnIndex),
145
- "aria-label": "".concat(this.state.value, ", ").concat((0, _lang.getLocale)('Press_the_number_keys_to_enter_the_corresponding_value')),
145
+ "aria-label": `${this.state.value}, ${(0, _lang.getLocale)('Press_the_number_keys_to_enter_the_corresponding_value')}`,
146
146
  className: (0, _classnames.default)('form-control dtable-ui dtable-ui-row-expand-rate-editor', {
147
147
  'disabled': !this.canEdit
148
148
  }),
@@ -114,15 +114,15 @@ class RowExpandPCSingleSelectEditor extends _react.default.Component {
114
114
  ref: ref => this.selectRef = ref,
115
115
  className: (0, _classnames.default)('dtable-ui dtable-ui-row-expand-select-editor custom-select', {
116
116
  'focus': isEditorFocus,
117
- ["".concat(classNamePrefix, "-select-editor")]: classNamePrefix
117
+ [`${classNamePrefix}-select-editor`]: classNamePrefix
118
118
  }),
119
119
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
120
120
  className: (0, _classnames.default)('dtable-ui-row-expand-select-editor-inner', {
121
- ["".concat(classNamePrefix, "-select-editor-inner")]: classNamePrefix
121
+ [`${classNamePrefix}-select-editor-inner`]: classNamePrefix
122
122
  }),
123
123
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
124
124
  className: (0, _classnames.default)('', {
125
- ["".concat(classNamePrefix, "-select-editor-inner-container")]: classNamePrefix
125
+ [`${classNamePrefix}-select-editor-inner-container`]: classNamePrefix
126
126
  }),
127
127
  children: [value && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
128
128
  className: "dtable-ui-select-option",
@@ -39,7 +39,7 @@ class RowExpandMBUrlEditor extends _react.default.Component {
39
39
  } = this.state;
40
40
  let newValue = value.trim();
41
41
  if (!(0, _utils.isValidUrl)(newValue)) {
42
- newValue = "http://".concat(newValue);
42
+ newValue = `http://${newValue}`;
43
43
  }
44
44
  try {
45
45
  (0, _utils.openUrlLink)(newValue);
@@ -69,7 +69,7 @@ class RowExpandPCUrlEditor extends _react.default.Component {
69
69
  } = this.state;
70
70
  let newValue = value.trim();
71
71
  if (!(0, _utils.isValidUrl)(newValue)) {
72
- newValue = "http://".concat(newValue);
72
+ newValue = `http://${newValue}`;
73
73
  }
74
74
  try {
75
75
  (0, _utils.openUrlLink)(newValue);
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.DEFAULT_FORMATTER = void 0;
8
8
  var _dtableUtils = require("dtable-utils");
9
- var _TextFormatter = _interopRequireDefault(require("../TextFormatter"));
9
+ var _text = _interopRequireDefault(require("./text"));
10
10
  var _NumberFormatter = _interopRequireDefault(require("../NumberFormatter"));
11
11
  var _CheckboxFormatter = _interopRequireDefault(require("../CheckboxFormatter"));
12
12
  var _DateFormatter = _interopRequireDefault(require("../DateFormatter"));
@@ -32,7 +32,7 @@ var _linkFormatter = _interopRequireDefault(require("./link-formatter"));
32
32
  var _formulaFormatter = _interopRequireDefault(require("./formula-formatter"));
33
33
  var _departmentFormatter = _interopRequireDefault(require("./department-formatter"));
34
34
  const DEFAULT_FORMATTER = exports.DEFAULT_FORMATTER = {
35
- [_dtableUtils.CellType.TEXT]: _TextFormatter.default,
35
+ [_dtableUtils.CellType.TEXT]: _text.default,
36
36
  [_dtableUtils.CellType.NUMBER]: _NumberFormatter.default,
37
37
  [_dtableUtils.CellType.CHECKBOX]: _CheckboxFormatter.default,
38
38
  [_dtableUtils.CellType.DATE]: _DateFormatter.default,
@@ -1,30 +1,2 @@
1
1
  @import url('../../css/cell-formatter.css');
2
-
3
- .dtable-ui-row-expand-formatter .dtable-ui.email-formatter .email-formatter-value,
4
- .dtable-ui-row-expand-formatter .dtable-ui.url-formatter .url-formatter-value {
5
- text-decoration: underline;
6
- width: 95%;
7
- display: inline-flex;
8
- }
9
-
10
- .dtable-ui-row-expand-formatter .dtable-ui .row-expand-jump-link {
11
- display: inline-flex;
12
- align-items: center;
13
- font-size: 14px;
14
- height: 22px;
15
- position: absolute;
16
- top: 8px;
17
- right: 22px;
18
- border: 1px solid #eee;
19
- padding: 0 4px;
20
- color: #999;
21
- border-radius: 2px;
22
- background: #fff;
23
- cursor: pointer;
24
- box-shadow: 0 0 1px;
25
- }
26
-
27
- .dtable-ui-row-expand-formatter .dtable-ui .row-expand-jump-link:hover {
28
- background: #eee;
29
- border: 1px solid #c9c9c9;
30
- }
2
+ @import url('../../css/row-expand.css');
@@ -18,7 +18,7 @@ class RowExpandEmailFormatter extends _react.default.Component {
18
18
  value
19
19
  } = this.props;
20
20
  let newValue = value.trim();
21
- window.location.href = "mailto:".concat(newValue);
21
+ window.location.href = `mailto:${newValue}`;
22
22
  };
23
23
  }
24
24
  render() {
@@ -26,14 +26,14 @@ class RowExpandEmailFormatter extends _react.default.Component {
26
26
  containerClassName,
27
27
  value
28
28
  } = this.props;
29
- let classname = (0, _classnames.default)('dtable-ui cell-formatter-container email-formatter', containerClassName);
29
+ let classname = (0, _classnames.default)('dtable-ui cell-formatter-container email-formatter row-expand-jump-link-container', containerClassName);
30
30
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
31
31
  className: classname,
32
32
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
33
- className: "email-formatter-value text-truncate",
33
+ className: "email-formatter-value row-expand-jump-link-value text-truncate",
34
34
  children: value
35
35
  }), (0, _editorUtils.getTrimmedString)(value) && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
36
- className: "dtable-font dtable-icon-email row-expand-jump-link",
36
+ className: "dtable-font dtable-icon-email row-expand-jump-link-btn",
37
37
  onClick: this.onOpenEmailLink
38
38
  })]
39
39
  });
@@ -65,7 +65,7 @@ class RowExpandFileItemFormatter extends _react.Component {
65
65
  id: id,
66
66
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
67
67
  src: fileIconUrl,
68
- id: "item-file-".concat(index),
68
+ id: `item-file-${index}`,
69
69
  alt: file.name
70
70
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
71
71
  className: "dtable-ui-file-icons-choice",
@@ -83,7 +83,7 @@ class RowExpandFileItemFormatter extends _react.Component {
83
83
  })
84
84
  })]
85
85
  })]
86
- }, "file-".concat(index)), this.state.isDeleteTipOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DeleteTip.default, {
86
+ }, `file-${index}`), this.state.isDeleteTipOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DeleteTip.default, {
87
87
  position: this.position,
88
88
  toggle: this.closeDeleteTip,
89
89
  handleDelete: this.onDelete,
@@ -0,0 +1,2 @@
1
+ @import url('../../css/cell-formatter.css');
2
+ @import url('../../css/row-expand.css');
@@ -10,12 +10,14 @@ var _classnames = _interopRequireDefault(require("classnames"));
10
10
  var _dtableUtils = require("dtable-utils");
11
11
  var _baseFormatterConfig = _interopRequireDefault(require("../../formatterConfig/base-formatter-config"));
12
12
  var _TextFormatter = _interopRequireDefault(require("../../TextFormatter"));
13
+ var _PhoneNumberLink = _interopRequireDefault(require("../../PhoneNumberLink"));
13
14
  var _utils = require("../../FormulaFormatter/utils");
14
15
  var _utils2 = require("../../utils/utils");
15
16
  var _cellValueValidator = _interopRequireDefault(require("../../FormulaFormatter/cell-value-validator"));
16
17
  var _toaster = _interopRequireDefault(require("../../toaster"));
17
18
  var _lang = require("../../lang");
18
19
  require("../../FormulaFormatter/index.css");
20
+ require("./index.css");
19
21
  var _jsxRuntime = require("react/jsx-runtime");
20
22
  class RowExpandFormulaFormatter extends _react.default.Component {
21
23
  constructor() {
@@ -35,7 +37,7 @@ class RowExpandFormulaFormatter extends _react.default.Component {
35
37
  };
36
38
  this.onOpenUrlLink = url => {
37
39
  if (!(0, _utils2.isValidUrl)(url)) {
38
- url = "http://".concat(url);
40
+ url = `http://${url}`;
39
41
  }
40
42
  try {
41
43
  (0, _utils2.openUrlLink)(url);
@@ -44,7 +46,7 @@ class RowExpandFormulaFormatter extends _react.default.Component {
44
46
  }
45
47
  };
46
48
  this.onOpenEmailLink = email => {
47
- window.location.href = "mailto:".concat(email.trim());
49
+ window.location.href = `mailto:${email.trim()}`;
48
50
  };
49
51
  this.renderBorder = dom => {
50
52
  const {
@@ -61,13 +63,6 @@ class RowExpandFormulaFormatter extends _react.default.Component {
61
63
  width: '320px'
62
64
  };
63
65
  }
64
- const columnType = (0, _dtableUtils.getColumnType)(column);
65
- if ([_dtableUtils.CellType.URL, _dtableUtils.CellType.EMAIL].includes(columnType)) {
66
- style = {
67
- ...style,
68
- position: 'relative'
69
- };
70
- }
71
66
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
72
67
  className: "d-flex align-items-center form-control disabled h-auto",
73
68
  style: style,
@@ -79,8 +74,8 @@ class RowExpandFormulaFormatter extends _react.default.Component {
79
74
  containerClassName
80
75
  } = this.props;
81
76
  const customClassName = this.getGridCellClassName(resultType);
82
- const className = "dtable-ui cell-formatter-container formula-formatter ".concat(containerClassName, " ").concat(customClassName);
83
- return this.renderBorder( /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
77
+ const className = `dtable-ui cell-formatter-container formula-formatter ${containerClassName} ${customClassName}`;
78
+ return this.renderBorder(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
84
79
  className: className,
85
80
  title: cellValue,
86
81
  "aria-label": cellValue,
@@ -125,7 +120,12 @@ class RowExpandFormulaFormatter extends _react.default.Component {
125
120
  formulaEmail = cellValue[0];
126
121
  formulaEmail = formulaEmail ? formulaEmail.trim() : '';
127
122
  }
128
- return this.renderBorder( /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
123
+ let formulaPhoneNumber = '';
124
+ if ((0, _dtableUtils.checkIsDisplayAsPhoneNumberColumn)(column)) {
125
+ formulaPhoneNumber = cellValue[0];
126
+ formulaPhoneNumber = formulaPhoneNumber ? formulaPhoneNumber.trim() : '';
127
+ }
128
+ return this.renderBorder(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
129
129
  className: "dtable-ui formula-formatter multiple",
130
130
  children: cellValue.map((v, index) => {
131
131
  formatterProps.value = v;
@@ -133,18 +133,21 @@ class RowExpandFormulaFormatter extends _react.default.Component {
133
133
  className: (0, _classnames.default)('formula-formatter-content-item', {
134
134
  'simple-cell-formatter': (0, _utils.isSimpleCellFormatter)(array_type)
135
135
  }, {
136
- 'formula-url-formatter-column': formulaUrl || formulaEmail
136
+ 'row-expand-jump-link-container': !!(formulaUrl || formulaEmail || formulaPhoneNumber)
137
137
  }),
138
- children: [formulaUrl && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
138
+ children: [!!formulaUrl && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
139
139
  "aria-hidden": "true",
140
- className: "dtable-font dtable-icon-url formula-url-link",
140
+ className: "dtable-font dtable-icon-url formula-url-link row-expand-jump-link-btn",
141
141
  onClick: this.onOpenUrlLink.bind(this, formulaUrl)
142
- }), formulaEmail && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
142
+ }), !!formulaEmail && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
143
143
  "aria-hidden": "true",
144
- className: "dtable-font dtable-icon-email formula-email-link",
144
+ className: "dtable-font dtable-icon-email formula-email-link row-expand-jump-link-btn",
145
145
  onClick: this.onOpenEmailLink.bind(this, formulaEmail)
146
+ }), !!formulaPhoneNumber && /*#__PURE__*/(0, _jsxRuntime.jsx)(_PhoneNumberLink.default, {
147
+ phoneNumber: formulaPhoneNumber,
148
+ className: "row-expand-jump-link-btn"
146
149
  }), this.createColumnFormatter(Formatter, formatterProps)]
147
- }, "formula-formatter-content-item-".concat(index));
150
+ }, `formula-formatter-content-item-${index}`);
148
151
  })
149
152
  }));
150
153
  };
@@ -191,7 +194,7 @@ class RowExpandFormulaFormatter extends _react.default.Component {
191
194
  };
192
195
  }
193
196
  createColumnFormatter(Formatter, formatterProps) {
194
- if ( /*#__PURE__*/_react.default.isValidElement(Formatter)) {
197
+ if (/*#__PURE__*/_react.default.isValidElement(Formatter)) {
195
198
  return /*#__PURE__*/_react.default.cloneElement(Formatter, {
196
199
  ...formatterProps
197
200
  });
@@ -72,7 +72,7 @@ class RowExpandImageItemFormatter extends _react.Component {
72
72
  onClick: this.onClickImage,
73
73
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
74
74
  src: url,
75
- id: "item-image-".concat(index),
75
+ id: `item-image-${index}`,
76
76
  alt: name
77
77
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
78
78
  className: "dtable-ui-image-icons-choice",
@@ -90,7 +90,7 @@ class RowExpandImageItemFormatter extends _react.Component {
90
90
  })
91
91
  })]
92
92
  })]
93
- }, "image-".concat(index)), this.state.isDeleteTipOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DeleteTip.default, {
93
+ }, `image-${index}`), this.state.isDeleteTipOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DeleteTip.default, {
94
94
  position: this.position,
95
95
  toggle: this.closeDeleteTip,
96
96
  handleDelete: this.onDelete,
@@ -25,6 +25,7 @@
25
25
  height: 2.375rem;
26
26
  line-height: 2.375rem;
27
27
  width: 100%;
28
+ text-decoration: none;
28
29
  }
29
30
 
30
31
  .dtable-ui.dtable-ui-row-expand-formatter .dtable-ui.multiple-select-formatter .dtable-ui.select-item {
@@ -46,6 +47,7 @@
46
47
  }
47
48
 
48
49
  .dtable-ui.dtable-ui-row-expand-formatter .form-control {
50
+ position: relative;
49
51
  background-color: #f8f9fa;
50
52
  padding: 0 10px;
51
53
  height: fit-content;
@@ -66,7 +66,7 @@ class RowExpandFormatter extends _react.default.Component {
66
66
  const {
67
67
  collaborators
68
68
  } = this.state;
69
- const containerClassName = "dtable-ui-row-expand-".concat(columnType, "-formatter");
69
+ const containerClassName = `dtable-ui-row-expand-${columnType}-formatter`;
70
70
  let cellValue = row[column[valueKey]];
71
71
  const Formatter = this.component[columnType];
72
72
  if (!Formatter) return null;
@@ -77,6 +77,7 @@ class RowExpandFormatter extends _react.default.Component {
77
77
  className: "form-control d-flex align-items-center w-100",
78
78
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Formatter, {
79
79
  value: cellValue,
80
+ column: column,
80
81
  containerClassName: containerClassName
81
82
  })
82
83
  });
@@ -42,7 +42,7 @@ class CollaboratorItemFormatter extends _react.Component {
42
42
  }
43
43
  if (!context) return;
44
44
  const mediaUrl = context.getSetting('mediaUrl');
45
- const defaultAvatarUrl = "".concat(mediaUrl, "/avatars/default.png");
45
+ const defaultAvatarUrl = `${mediaUrl}/avatars/default.png`;
46
46
  if (cellValue === 'anonymous') {
47
47
  collaborator = {
48
48
  name: 'anonymous',