dtable-ui-component 5.0.9-beta.1 → 5.0.9-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 (107) hide show
  1. package/lib/AutoNumberFormatter/index.js +5 -3
  2. package/lib/ButtonFormatter/index.js +9 -5
  3. package/lib/CTimeFormatter/index.js +5 -3
  4. package/lib/CheckboxEditor/index.js +15 -12
  5. package/lib/CheckboxFormatter/index.js +7 -5
  6. package/lib/CollaboratorEditor/index.js +46 -37
  7. package/lib/CollaboratorEditor/mb-collaborator-editor-popover/index.js +60 -47
  8. package/lib/CollaboratorEditor/pc-collaborator-editor-popover/index.js +37 -31
  9. package/lib/CollaboratorFormatter/index.js +8 -7
  10. package/lib/CollaboratorItem/index.js +21 -16
  11. package/lib/CollapsibleSettingLayout/index.js +17 -12
  12. package/lib/CreatorFormatter/index.js +8 -7
  13. package/lib/DTableCommonAddTool/index.js +10 -7
  14. package/lib/DTableCustomizeCollaboratorSelect/index.js +38 -32
  15. package/lib/DTableCustomizeSelect/index.js +51 -44
  16. package/lib/DTableFiltersPopover/index.js +46 -41
  17. package/lib/DTableFiltersPopover/utils/filter-item-utils.js +67 -51
  18. package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +64 -49
  19. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +38 -32
  20. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +42 -34
  21. package/lib/DTableFiltersPopover/widgets/filter-calendar.js +35 -31
  22. package/lib/DTableFiltersPopover/widgets/filter-item.js +92 -76
  23. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +19 -17
  24. package/lib/DTableFiltersPopover/widgets/rate-item.js +12 -9
  25. package/lib/DTablePopover/index.js +9 -6
  26. package/lib/DTableRadio/index.js +20 -17
  27. package/lib/DTableSearchInput/index.js +22 -18
  28. package/lib/DTableSelect/dtable-select-label.js +12 -7
  29. package/lib/DTableSelect/index.js +2 -1
  30. package/lib/DTableSelect/utils.js +26 -13
  31. package/lib/DTableSwitch/index.js +20 -16
  32. package/lib/DateEditor/index.js +46 -36
  33. package/lib/DateEditor/mb-date-editor-popover/index.js +80 -63
  34. package/lib/DateEditor/pc-date-editor-popover.js +25 -22
  35. package/lib/DateFormatter/index.js +5 -3
  36. package/lib/Department-editor/department-multiple-select/index.js +49 -42
  37. package/lib/Department-editor/department-single-select.js +70 -54
  38. package/lib/Department-editor/index.js +18 -14
  39. package/lib/Department-editor/selected-departments/index.js +54 -44
  40. package/lib/DepartmentSelectFilter/index.js +8 -1
  41. package/lib/DepartmentSingleSelectFormatter/index.js +13 -9
  42. package/lib/DigitalSignFormatter/index.js +21 -17
  43. package/lib/DurationFormatter/index.js +7 -5
  44. package/lib/EditEditorButton/index.js +5 -3
  45. package/lib/EmailFormatter/index.js +5 -3
  46. package/lib/FieldDisplaySetting/field-item.js +25 -19
  47. package/lib/FieldDisplaySetting/index.js +47 -38
  48. package/lib/FileEditor/index.js +10 -7
  49. package/lib/FileFormatter/index.js +18 -15
  50. package/lib/FileItemFormatter/index.js +2 -1
  51. package/lib/FileUploader/index.js +2 -1
  52. package/lib/FormulaFormatter/index.js +21 -14
  53. package/lib/GeolocationFormatter/index.js +8 -6
  54. package/lib/HtmlLongTextFormatter/index.js +2 -1
  55. package/lib/ImageFormatter/images-lazy-load.js +7 -6
  56. package/lib/ImageFormatter/index.js +35 -29
  57. package/lib/ImagePreviewerLightbox/index.js +12 -8
  58. package/lib/LastModifierFormatter/index.js +8 -7
  59. package/lib/LinkEditor/index.js +38 -32
  60. package/lib/LinkEditor/link-editor-option.js +25 -20
  61. package/lib/LinkEditor/mb-link-editor-popover/index.js +53 -41
  62. package/lib/LinkEditor/pc-link-editor-popover/index.js +41 -33
  63. package/lib/LinkFormatter/index.js +13 -10
  64. package/lib/Loading/index.js +2 -1
  65. package/lib/LongTextFormatter/index.js +3 -2
  66. package/lib/MBEditorHeader/index.js +19 -14
  67. package/lib/MTimeFormatter/index.js +5 -3
  68. package/lib/MultipleSelectEditor/index.js +43 -37
  69. package/lib/MultipleSelectFormatter/index.js +8 -7
  70. package/lib/NotificationPopover/index.js +43 -32
  71. package/lib/NumberEditor/index.js +24 -20
  72. package/lib/NumberFormatter/index.js +5 -3
  73. package/lib/RateFormatter/index.js +7 -6
  74. package/lib/RoleStatusEditor/index.js +35 -30
  75. package/lib/RowExpandEmailFormatter/index.js +11 -8
  76. package/lib/RowExpandFileFormatter/index.js +14 -13
  77. package/lib/RowExpandFileFormatter/row-expand-file-item-formatter.js +43 -36
  78. package/lib/RowExpandFormatter/index.js +129 -112
  79. package/lib/RowExpandFormulaFormatter/index.js +37 -29
  80. package/lib/RowExpandImageFormatter/index.js +29 -26
  81. package/lib/RowExpandImageFormatter/row-expand-image-item-formatter.js +47 -39
  82. package/lib/RowExpandLinkFormatter/collaborator-item-formatter.js +2 -1
  83. package/lib/RowExpandLinkFormatter/index.js +70 -67
  84. package/lib/RowExpandRateFormatter/index.js +7 -6
  85. package/lib/RowExpandUrlFormatter/index.js +11 -8
  86. package/lib/SelectItem/index.js +5 -3
  87. package/lib/SelectOptionGroup/index.js +38 -31
  88. package/lib/SelectOptionGroup/option.js +5 -3
  89. package/lib/SimpleLongTextFormatter/index.js +39 -30
  90. package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +11 -8
  91. package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -2
  92. package/lib/SingleSelectEditor/index.js +42 -34
  93. package/lib/SingleSelectFormatter/index.js +6 -4
  94. package/lib/TextEditor/index.js +2 -1
  95. package/lib/TextFormatter/index.js +5 -3
  96. package/lib/UrlFormatter/index.js +5 -3
  97. package/lib/common/delete-tip.js +27 -19
  98. package/lib/formatterConfig/base-formatter-config.js +23 -22
  99. package/lib/formatterConfig/index.js +3 -2
  100. package/lib/select-editor/mb-select-editor-popover/index.js +84 -64
  101. package/lib/select-editor/pc-select-editor-popover/index.js +50 -39
  102. package/lib/select-editor/select-editor-option.js +24 -19
  103. package/lib/toaster/alert.js +25 -16
  104. package/lib/toaster/toast.js +28 -24
  105. package/lib/toaster/toastManager.js +16 -13
  106. package/lib/toaster/toaster.js +2 -1
  107. package/package.json +1 -1
@@ -11,6 +11,7 @@ var _reactstrap = require("reactstrap");
11
11
  var _reactResponsive = _interopRequireDefault(require("react-responsive"));
12
12
  var _lang = require("../lang");
13
13
  var _deleteTip = _interopRequireDefault(require("../common/delete-tip"));
14
+ var _jsxRuntime = require("react/jsx-runtime");
14
15
  class RowExpandImageItemFormatter extends _react.Component {
15
16
  constructor(props) {
16
17
  super(props);
@@ -64,45 +65,52 @@ class RowExpandImageItemFormatter extends _react.Component {
64
65
  } = this.props;
65
66
  const id = 'image-list-preview-item' + column.key + index;
66
67
  const name = decodeURI(url.slice(url.lastIndexOf('/') + 1));
67
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
68
- key: "image-".concat(index),
69
- className: "row-expand-item-image",
70
- id: id,
71
- onClick: this.onClickImage
72
- }, /*#__PURE__*/_react.default.createElement("img", {
73
- src: url,
74
- id: "item-image-".concat(index),
75
- alt: name
76
- }), /*#__PURE__*/_react.default.createElement("div", {
77
- className: "dtable-image-icons-choice"
78
- }, downloadFile && /*#__PURE__*/_react.default.createElement("span", {
79
- className: "image-icon",
80
- onClick: this.onClickDownload
81
- }, /*#__PURE__*/_react.default.createElement("i", {
82
- className: "dtable-font dtable-icon-download"
83
- })), !readOnly && deleteFile && /*#__PURE__*/_react.default.createElement("span", {
84
- className: "image-icon",
85
- onClick: this.onClickDelete
86
- }, /*#__PURE__*/_react.default.createElement("i", {
87
- className: "dtable-font dtable-icon-fork-number"
88
- })))), this.state.isDeleteTipOpen && /*#__PURE__*/_react.default.createElement(_deleteTip.default, {
89
- position: this.position,
90
- toggle: this.closeDeleteTip,
91
- onDelete: this.onDelete,
92
- deleteTip: (0, _lang.getLocale)('Are_you_sure_you_want_to_delete_this_image')
93
- }), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
94
- query: '(min-width: 768px)'
95
- }, /*#__PURE__*/_react.default.createElement(_reactstrap.Tooltip, {
96
- placement: "bottom",
97
- isOpen: this.state.isTooltipOpen,
98
- toggle: this.toggleTooltip,
99
- target: id,
100
- delay: {
101
- show: 0,
102
- hide: 0
103
- },
104
- fade: false
105
- }, name)));
68
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
69
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
70
+ className: "row-expand-item-image",
71
+ id: id,
72
+ onClick: this.onClickImage,
73
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
74
+ src: url,
75
+ id: "item-image-".concat(index),
76
+ alt: name
77
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
78
+ className: "dtable-image-icons-choice",
79
+ children: [downloadFile && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
80
+ className: "image-icon",
81
+ onClick: this.onClickDownload,
82
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
83
+ className: "dtable-font dtable-icon-download"
84
+ })
85
+ }), !readOnly && deleteFile && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
86
+ className: "image-icon",
87
+ onClick: this.onClickDelete,
88
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
89
+ className: "dtable-font dtable-icon-fork-number"
90
+ })
91
+ })]
92
+ })]
93
+ }, "image-".concat(index)), this.state.isDeleteTipOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_deleteTip.default, {
94
+ position: this.position,
95
+ toggle: this.closeDeleteTip,
96
+ onDelete: this.onDelete,
97
+ deleteTip: (0, _lang.getLocale)('Are_you_sure_you_want_to_delete_this_image')
98
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
99
+ query: '(min-width: 768px)',
100
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Tooltip, {
101
+ placement: "bottom",
102
+ isOpen: this.state.isTooltipOpen,
103
+ toggle: this.toggleTooltip,
104
+ target: id,
105
+ delay: {
106
+ show: 0,
107
+ hide: 0
108
+ },
109
+ fade: false,
110
+ children: name
111
+ })
112
+ })]
113
+ });
106
114
  }
107
115
  }
108
116
  exports.default = RowExpandImageItemFormatter;
@@ -9,6 +9,7 @@ exports.default = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _dtableUtils = require("dtable-utils");
11
11
  var _CollaboratorItem = _interopRequireDefault(require("../CollaboratorItem"));
12
+ var _jsxRuntime = require("react/jsx-runtime");
12
13
  class CollaboratorItemFormatter extends _react.Component {
13
14
  constructor(_props) {
14
15
  super(_props);
@@ -115,7 +116,7 @@ class CollaboratorItemFormatter extends _react.Component {
115
116
  if (!isDataLoaded || !cellValue || !collaborator) {
116
117
  return this.props.renderEmpty();
117
118
  }
118
- return /*#__PURE__*/_react.default.createElement(_CollaboratorItem.default, {
119
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollaboratorItem.default, {
119
120
  collaborator: collaborator,
120
121
  enableDeleteCollaborator: false
121
122
  });
@@ -16,6 +16,7 @@ var _collaboratorItemFormatter = _interopRequireDefault(require("./collaborator-
16
16
  var _utils = require("./utils");
17
17
  var _valueDisplayUtils = require("./value-display-utils");
18
18
  require("./index.css");
19
+ var _jsxRuntime = require("react/jsx-runtime");
19
20
  class RowExpandLinkFormatter extends _react.Component {
20
21
  render() {
21
22
  const props = this.props;
@@ -53,96 +54,98 @@ class RowExpandLinkFormatter extends _react.Component {
53
54
  case _constants.CellType.DURATION:
54
55
  case _constants.CellType.NUMBER:
55
56
  {
56
- return /*#__PURE__*/_react.default.createElement("div", {
57
- className: containerClassName
58
- }, cellValue.map((value, index) => {
59
- if (!value) return null;
60
- return /*#__PURE__*/_react.default.createElement("div", {
61
- key: "link-".concat(displayColumnType, "-").concat(index),
62
- className: "row-expand-link-item"
63
- }, value);
64
- }));
57
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
58
+ className: containerClassName,
59
+ children: cellValue.map((value, index) => {
60
+ if (!value) return null;
61
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
62
+ className: "row-expand-link-item",
63
+ children: value
64
+ }, "link-".concat(displayColumnType, "-").concat(index));
65
+ })
66
+ });
65
67
  }
66
68
  case _constants.CellType.DATE:
67
69
  {
68
- return /*#__PURE__*/_react.default.createElement("div", {
69
- className: containerClassName
70
- }, cellValue.map((value, index) => {
71
- if (!value || typeof value !== 'string') return null;
72
- const {
73
- format
74
- } = displayColumnData || {};
75
- return /*#__PURE__*/_react.default.createElement(_DateFormatter.default, {
76
- key: "link-".concat(displayColumnType, "-").concat(index),
77
- value: value,
78
- format: format,
79
- containerClassName: "row-expand-link-item"
80
- });
81
- }));
70
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
71
+ className: containerClassName,
72
+ children: cellValue.map((value, index) => {
73
+ if (!value || typeof value !== 'string') return null;
74
+ const {
75
+ format
76
+ } = displayColumnData || {};
77
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DateFormatter.default, {
78
+ value: value,
79
+ format: format,
80
+ containerClassName: "row-expand-link-item"
81
+ }, "link-".concat(displayColumnType, "-").concat(index));
82
+ })
83
+ });
82
84
  }
83
85
  case _constants.CellType.CTIME:
84
86
  {
85
- return /*#__PURE__*/_react.default.createElement("div", {
86
- className: containerClassName
87
- }, cellValue.map((value, index) => {
88
- if (!value) return null;
89
- return /*#__PURE__*/_react.default.createElement(_CTimeFormatter.default, {
90
- key: "link-".concat(displayColumnType, "-").concat(index),
91
- value: value,
92
- containerClassName: "row-expand-link-item"
93
- });
94
- }));
87
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
88
+ className: containerClassName,
89
+ children: cellValue.map((value, index) => {
90
+ if (!value) return null;
91
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CTimeFormatter.default, {
92
+ value: value,
93
+ containerClassName: "row-expand-link-item"
94
+ }, "link-".concat(displayColumnType, "-").concat(index));
95
+ })
96
+ });
95
97
  }
96
98
  case _constants.CellType.MTIME:
97
99
  {
98
- return /*#__PURE__*/_react.default.createElement("div", {
99
- className: containerClassName
100
- }, cellValue.map((value, index) => {
101
- if (!value) return null;
102
- return /*#__PURE__*/_react.default.createElement(_MTimeFormatter.default, {
103
- key: "link-".concat(displayColumnType, "-").concat(index),
104
- value: value,
105
- containerClassName: "row-expand-link-item"
106
- });
107
- }));
100
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
101
+ className: containerClassName,
102
+ children: cellValue.map((value, index) => {
103
+ if (!value) return null;
104
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_MTimeFormatter.default, {
105
+ value: value,
106
+ containerClassName: "row-expand-link-item"
107
+ }, "link-".concat(displayColumnType, "-").concat(index));
108
+ })
109
+ });
108
110
  }
109
111
  case _constants.CellType.CREATOR:
110
112
  case _constants.CellType.LAST_MODIFIER:
111
113
  {
112
- return /*#__PURE__*/_react.default.createElement("div", {
113
- className: "dtable-ui cell-formatter-container collaborator-formatter sql-query-collaborator-formatter"
114
- }, cellValue.map((value, index) => {
115
- if (!value) return null;
116
- return /*#__PURE__*/_react.default.createElement(_collaboratorItemFormatter.default, {
117
- key: "link-".concat(displayColumnType, "-").concat(index),
118
- cellValue: value,
119
- collaborators: collaborators,
120
- context: props.context,
121
- renderEmpty: props.renderEmpty
122
- });
123
- }));
114
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
115
+ className: "dtable-ui cell-formatter-container collaborator-formatter sql-query-collaborator-formatter",
116
+ children: cellValue.map((value, index) => {
117
+ if (!value) return null;
118
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_collaboratorItemFormatter.default, {
119
+ cellValue: value,
120
+ collaborators: collaborators,
121
+ context: props.context,
122
+ renderEmpty: props.renderEmpty
123
+ }, "link-".concat(displayColumnType, "-").concat(index));
124
+ })
125
+ });
124
126
  }
125
127
  case _constants.CellType.SINGLE_SELECT:
126
128
  {
127
129
  const options = displayColumnData && Array.isArray(displayColumnData.options) ? displayColumnData.options : [];
128
- return /*#__PURE__*/_react.default.createElement(_MultipleSelectFormatter.default, {
130
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_MultipleSelectFormatter.default, {
129
131
  value: cellValue,
130
132
  options: options || []
131
133
  });
132
134
  }
133
135
  case _constants.CellType.FORMULA:
134
136
  {
135
- return /*#__PURE__*/_react.default.createElement("div", {
136
- className: containerClassName
137
- }, cellValue.map((value, index) => {
138
- if (!value) return null;
139
- return /*#__PURE__*/_react.default.createElement("div", {
140
- key: "link-".concat(displayColumnType, "-").concat(index),
141
- className: "row-expand-link-item"
142
- }, (0, _valueDisplayUtils.getCellDisplayValue)({
143
- [displayColumn.key]: value
144
- }, displayColumn, collaborators));
145
- }));
137
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
138
+ className: containerClassName,
139
+ children: cellValue.map((value, index) => {
140
+ if (!value) return null;
141
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
142
+ className: "row-expand-link-item",
143
+ children: (0, _valueDisplayUtils.getCellDisplayValue)({
144
+ [displayColumn.key]: value
145
+ }, displayColumn, collaborators)
146
+ }, "link-".concat(displayColumnType, "-").concat(index));
147
+ })
148
+ });
146
149
  }
147
150
  default:
148
151
  {
@@ -8,6 +8,7 @@ exports.default = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
10
  require("./index.css");
11
+ var _jsxRuntime = require("react/jsx-runtime");
11
12
  class RateExpendRateFormatter extends _react.default.Component {
12
13
  constructor() {
13
14
  super(...arguments);
@@ -26,11 +27,10 @@ class RateExpendRateFormatter extends _react.default.Component {
26
27
  let style = {
27
28
  color: value >= i + 1 ? rate_style_color : '#e5e5e5'
28
29
  };
29
- rateList.push( /*#__PURE__*/_react.default.createElement("i", {
30
- key: "dtable-ui-component-rate-".concat(i),
30
+ rateList.push( /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
31
31
  className: "dtable-font ".concat(rate_style_type),
32
32
  style: style
33
- }));
33
+ }, "dtable-ui-component-rate-".concat(i)));
34
34
  }
35
35
  return rateList;
36
36
  };
@@ -41,9 +41,10 @@ class RateExpendRateFormatter extends _react.default.Component {
41
41
  } = this.props;
42
42
  const className = (0, _classnames.default)('dtable-ui cell-formatter-container rate-formatter', containerClassName);
43
43
  const rateList = this.getRateList();
44
- return /*#__PURE__*/_react.default.createElement("div", {
45
- className: className
46
- }, rateList);
44
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
45
+ className: className,
46
+ children: rateList
47
+ });
47
48
  }
48
49
  }
49
50
  RateExpendRateFormatter.defaultProps = {
@@ -10,6 +10,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
10
10
  var _toaster = _interopRequireDefault(require("../toaster"));
11
11
  var _editorUtils = require("../utils/editor-utils");
12
12
  require("./index.css");
13
+ var _jsxRuntime = require("react/jsx-runtime");
13
14
  class UrlFormatter extends _react.default.Component {
14
15
  constructor() {
15
16
  super(...arguments);
@@ -38,14 +39,16 @@ class UrlFormatter extends _react.default.Component {
38
39
  value
39
40
  } = this.props;
40
41
  let classname = (0, _classnames.default)('dtable-ui cell-formatter-container url-formatter', containerClassName);
41
- return /*#__PURE__*/_react.default.createElement("div", {
42
- className: classname
43
- }, /*#__PURE__*/_react.default.createElement("span", {
44
- className: "url-formatter-value text-truncate"
45
- }, value), (0, _editorUtils.getTrimmedString)(value) && /*#__PURE__*/_react.default.createElement("span", {
46
- className: "dtable-font dtable-icon-url row-expand-jump-link",
47
- onClick: this.onOpenUrlLink
48
- }));
42
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
43
+ className: classname,
44
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
45
+ className: "url-formatter-value text-truncate",
46
+ children: value
47
+ }), (0, _editorUtils.getTrimmedString)(value) && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
48
+ className: "dtable-font dtable-icon-url row-expand-jump-link",
49
+ onClick: this.onOpenUrlLink
50
+ })]
51
+ });
49
52
  }
50
53
  }
51
54
  var _default = exports.default = UrlFormatter;
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
+ var _jsxRuntime = require("react/jsx-runtime");
9
10
  class SelectItem extends _react.default.PureComponent {
10
11
  constructor() {
11
12
  super(...arguments);
@@ -31,11 +32,12 @@ class SelectItem extends _react.default.PureComponent {
31
32
  fontSize
32
33
  } = this.props;
33
34
  const style = this.getStyle(option, fontSize);
34
- return /*#__PURE__*/_react.default.createElement("div", {
35
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
35
36
  className: "dtable-ui select-item text-truncate",
36
37
  style: style,
37
- title: option.name
38
- }, option.name);
38
+ title: option.name,
39
+ children: option.name
40
+ });
39
41
  }
40
42
  }
41
43
  exports.default = SelectItem;
@@ -13,6 +13,7 @@ var _DTableSearchInput = _interopRequireDefault(require("../DTableSearchInput"))
13
13
  var _KeyCodes = _interopRequireDefault(require("./KeyCodes"));
14
14
  var _ClickOutside = _interopRequireDefault(require("../ClickOutside"));
15
15
  require("./index.css");
16
+ var _jsxRuntime = require("react/jsx-runtime");
16
17
  const OPTION_HEIGHT = 32;
17
18
  class SelectOptionGroup extends _react.Component {
18
19
  constructor(props) {
@@ -128,23 +129,24 @@ class SelectOptionGroup extends _react.Component {
128
129
  } = this.props;
129
130
  this.filterOptions = this.props.getFilterOptions(searchVal);
130
131
  if (this.filterOptions.length === 0) {
131
- return /*#__PURE__*/_react.default.createElement("div", {
132
- className: "none-search-result"
133
- }, noOptionsPlaceholder);
132
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
133
+ className: "none-search-result",
134
+ children: noOptionsPlaceholder
135
+ });
134
136
  }
135
137
  return this.filterOptions.map((opt, i) => {
136
138
  let key = opt.value.column ? opt.value.column.key : i;
137
139
  let isActive = this.state.activeIndex === i;
138
- return /*#__PURE__*/_react.default.createElement(_option.default, {
139
- key: key,
140
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_option.default, {
140
141
  index: i,
141
142
  isActive: isActive,
142
143
  value: opt.value,
143
144
  onSelectOption: onSelectOption,
144
145
  changeIndex: this.changeIndex,
145
146
  supportMultipleSelect: this.props.supportMultipleSelect,
146
- disableHover: this.state.disableHover
147
- }, opt.label);
147
+ disableHover: this.state.disableHover,
148
+ children: opt.label
149
+ }, key);
148
150
  });
149
151
  };
150
152
  this.state = {
@@ -207,30 +209,35 @@ class SelectOptionGroup extends _react.Component {
207
209
  opacity: 0
208
210
  };
209
211
  }
210
- return /*#__PURE__*/_react.default.createElement(_ClickOutside.default, {
211
- onClickOutside: this.props.onClickOutside
212
- }, /*#__PURE__*/_react.default.createElement("div", {
213
- className: (0, _classnames.default)('option-group', className ? 'option-group-' + className : '', {
214
- 'pt-0': isShowSelected,
215
- 'create-new-option-group': addOptionAble
216
- }),
217
- ref: ref => this.optionGroupRef = ref,
218
- style: style,
219
- onMouseDown: this.onMouseDown
220
- }, isShowSelected && /*#__PURE__*/_react.default.createElement("div", {
221
- className: "editor-list-delete mb-2",
222
- onClick: e => e.stopPropagation()
223
- }, value.label || ''), searchable && /*#__PURE__*/_react.default.createElement("div", {
224
- className: "option-group-search"
225
- }, /*#__PURE__*/_react.default.createElement(_DTableSearchInput.default, {
226
- className: "option-search-control",
227
- placeholder: searchPlaceholder,
228
- onChange: this.onChangeSearch,
229
- autoFocus: true
230
- })), /*#__PURE__*/_react.default.createElement("div", {
231
- className: "option-group-content",
232
- ref: ref => this.optionGroupContentRef = ref
233
- }, this.renderOptGroup(searchVal)), addOptionAble && AddOption));
212
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ClickOutside.default, {
213
+ onClickOutside: this.props.onClickOutside,
214
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
215
+ className: (0, _classnames.default)('option-group', className ? 'option-group-' + className : '', {
216
+ 'pt-0': isShowSelected,
217
+ 'create-new-option-group': addOptionAble
218
+ }),
219
+ ref: ref => this.optionGroupRef = ref,
220
+ style: style,
221
+ onMouseDown: this.onMouseDown,
222
+ children: [isShowSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
223
+ className: "editor-list-delete mb-2",
224
+ onClick: e => e.stopPropagation(),
225
+ children: value.label || ''
226
+ }), searchable && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
227
+ className: "option-group-search",
228
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableSearchInput.default, {
229
+ className: "option-search-control",
230
+ placeholder: searchPlaceholder,
231
+ onChange: this.onChangeSearch,
232
+ autoFocus: true
233
+ })
234
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
235
+ className: "option-group-content",
236
+ ref: ref => this.optionGroupContentRef = ref,
237
+ children: this.renderOptGroup(searchVal)
238
+ }), addOptionAble && AddOption]
239
+ })
240
+ });
234
241
  }
235
242
  }
236
243
  var _default = exports.default = SelectOptionGroup;
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
+ var _jsxRuntime = require("react/jsx-runtime");
9
10
  class Option extends _react.Component {
10
11
  constructor() {
11
12
  super(...arguments);
@@ -27,12 +28,13 @@ class Option extends _react.Component {
27
28
  };
28
29
  }
29
30
  render() {
30
- return /*#__PURE__*/_react.default.createElement("div", {
31
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
31
32
  className: this.props.isActive ? 'option option-active' : 'option',
32
33
  onClick: this.onSelectOption.bind(this, this.props.value),
33
34
  onMouseEnter: this.onMouseEnter,
34
- onMouseLeave: this.onMouseLeave
35
- }, this.props.children);
35
+ onMouseLeave: this.onMouseLeave,
36
+ children: this.props.children
37
+ });
36
38
  }
37
39
  }
38
40
  var _default = exports.default = Option;
@@ -11,43 +11,49 @@ var _normalizeLongTextValue = _interopRequireDefault(require("./normalize-long-t
11
11
  var _LongTextPreview = _interopRequireDefault(require("./widgets/LongTextPreview"));
12
12
  var _ModalPortal = _interopRequireDefault(require("../ModalPortal"));
13
13
  require("./index.css");
14
+ var _jsxRuntime = require("react/jsx-runtime");
14
15
  class SimpleLongTextFormatter extends _react.default.Component {
15
16
  constructor(props) {
16
17
  super(props);
17
18
  this.renderLinks = value => {
18
19
  const links = value.links;
19
20
  if (!Array.isArray(links) || links.length === 0) return null;
20
- return /*#__PURE__*/_react.default.createElement("span", {
21
- className: "long-text-links"
22
- }, /*#__PURE__*/_react.default.createElement("i", {
23
- className: "dtable-font dtable-icon-url"
24
- }), links.length);
21
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
22
+ className: "long-text-links",
23
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
24
+ className: "dtable-font dtable-icon-url"
25
+ }), links.length]
26
+ });
25
27
  };
26
28
  this.renderCheckList = value => {
27
29
  const checkList = value.checklist;
28
30
  if (!checkList || checkList.total === 0) return null;
29
- return /*#__PURE__*/_react.default.createElement("span", {
30
- className: "long-text-check-list"
31
- }, /*#__PURE__*/_react.default.createElement("i", {
32
- className: "dtable-font dtable-icon-check-square-solid ".concat(checkList.completed === checkList.total ? 'long-text-check-list-completed' : '')
33
- }), "".concat(checkList.completed, "/").concat(checkList.total));
31
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
32
+ className: "long-text-check-list",
33
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
34
+ className: "dtable-font dtable-icon-check-square-solid ".concat(checkList.completed === checkList.total ? 'long-text-check-list-completed' : '')
35
+ }), "".concat(checkList.completed, "/").concat(checkList.total)]
36
+ });
34
37
  };
35
38
  this.renderImages = value => {
36
39
  const images = value.images;
37
40
  if (!Array.isArray(images) || images.length === 0) return null;
38
- return /*#__PURE__*/_react.default.createElement("span", {
39
- className: "long-text-images"
40
- }, /*#__PURE__*/_react.default.createElement("img", {
41
- src: images[0],
42
- alt: ""
43
- }), /*#__PURE__*/_react.default.createElement("i", {
44
- className: "image-number"
45
- }, images.length > 1 ? '+' + images.length : null));
41
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
42
+ className: "long-text-images",
43
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
44
+ src: images[0],
45
+ alt: ""
46
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
47
+ className: "image-number",
48
+ children: images.length > 1 ? '+' + images.length : null
49
+ })]
50
+ });
46
51
  };
47
52
  this.renderContent = value => {
48
- return /*#__PURE__*/_react.default.createElement("span", {
49
- className: "long-text-content"
50
- }, value.preview);
53
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
54
+ className: "long-text-content",
55
+ children: value.preview
56
+ });
51
57
  };
52
58
  this.translateValue = () => {
53
59
  const {
@@ -130,18 +136,21 @@ class SimpleLongTextFormatter extends _react.default.Component {
130
136
  } = this.props;
131
137
  const className = (0, _classnames.default)('dtable-ui cell-formatter-container long-text-formatter', containerClassName);
132
138
  const value = this.translateValue();
133
- return /*#__PURE__*/_react.default.createElement("div", {
139
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
134
140
  className: className,
135
141
  onMouseEnter: this.onMouseEnter,
136
142
  onMouseLeave: this.onMouseLeave,
137
- ref: ref => this.ref = ref
138
- }, this.renderLinks(value), this.renderCheckList(value), this.renderImages(value), this.renderContent(value), isPreview && /*#__PURE__*/_react.default.createElement(_ModalPortal.default, null, /*#__PURE__*/_react.default.createElement(_LongTextPreview.default, {
139
- className: previewClassName,
140
- value: value,
141
- formatterStyle: this.formatterStyle,
142
- onMouseEnter: this.onPreviewMouseEnter,
143
- onMouseLeave: this.onPreviewMouseLeave
144
- })));
143
+ ref: ref => this.ref = ref,
144
+ children: [this.renderLinks(value), this.renderCheckList(value), this.renderImages(value), this.renderContent(value), isPreview && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ModalPortal.default, {
145
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_LongTextPreview.default, {
146
+ className: previewClassName,
147
+ value: value,
148
+ formatterStyle: this.formatterStyle,
149
+ onMouseEnter: this.onPreviewMouseEnter,
150
+ onMouseLeave: this.onPreviewMouseLeave
151
+ })
152
+ })]
153
+ });
145
154
  }
146
155
  }
147
156
  SimpleLongTextFormatter.defaultProps = {