dtable-ui-component 0.1.75-beta8 → 0.1.77

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 (91) hide show
  1. package/README.md +20 -2
  2. package/lib/{components/cell-editor/checkbox-editor.js → CheckboxEditor/index.js} +0 -0
  3. package/lib/CollaboratorEditor/index.css +48 -0
  4. package/lib/{components/cell-editor/collaborator-editor.js → CollaboratorEditor/index.js} +6 -5
  5. package/lib/CollaboratorEditor/mb-collaborator-editor-popover/index.css +86 -0
  6. package/lib/{components/cell-editor-popover/mb-collaborator-editor-popover.js → CollaboratorEditor/mb-collaborator-editor-popover/index.js} +2 -1
  7. package/lib/CollaboratorEditor/pc-collaborator-editor-popover/index.css +1 -0
  8. package/lib/{components/cell-editor-popover/pc-collaborator-editor-popover.js → CollaboratorEditor/pc-collaborator-editor-popover/index.js} +2 -1
  9. package/lib/DateEditor/index.css +4 -0
  10. package/lib/{components/cell-editor/date-editor.js → DateEditor/index.js} +5 -4
  11. package/lib/{css → DateEditor/mb-date-editor-popover}/custom-rc-calendar.css +0 -0
  12. package/lib/DateEditor/mb-date-editor-popover/index.css +45 -0
  13. package/lib/{components/cell-editor-popover/mb-date-editor-popover.js → DateEditor/mb-date-editor-popover/index.js} +10 -10
  14. package/lib/{components/cell-editor-popover → DateEditor}/pc-date-editor-popover.js +2 -2
  15. package/lib/{components/common/edit-editor-button.js → EditEditorButton/index.js} +0 -0
  16. package/lib/{components/cell-editor-dialog/pc-file-editor-dialog.js → FileEditor/index.js} +10 -10
  17. package/lib/{components/cell-editor-dialog → FileEditor}/pc-files-addition/index.js +0 -0
  18. package/lib/{components/cell-editor-dialog → FileEditor}/pc-files-addition/pc-file-uploaded-item.js +0 -0
  19. package/lib/{components/cell-editor-dialog → FileEditor}/pc-files-preview/index.js +0 -0
  20. package/lib/{components/cell-editor-dialog → FileEditor}/pc-files-preview/pc-file-item-preview.js +0 -0
  21. package/lib/{assets/images → FileItemFormatter/assets}/file/192/excel.png +0 -0
  22. package/lib/{assets/images → FileItemFormatter/assets}/file/192/file.png +0 -0
  23. package/lib/{assets/images → FileItemFormatter/assets}/file/192/music.png +0 -0
  24. package/lib/{assets/images → FileItemFormatter/assets}/file/192/pdf.png +0 -0
  25. package/lib/{assets/images → FileItemFormatter/assets}/file/192/pic.png +0 -0
  26. package/lib/{assets/images → FileItemFormatter/assets}/file/192/ppt.png +0 -0
  27. package/lib/{assets/images → FileItemFormatter/assets}/file/192/txt.png +0 -0
  28. package/lib/{assets/images → FileItemFormatter/assets}/file/192/video.png +0 -0
  29. package/lib/{assets/images → FileItemFormatter/assets}/file/192/word.png +0 -0
  30. package/lib/{assets/images → FileItemFormatter/assets}/file/24/excel.png +0 -0
  31. package/lib/{assets/images → FileItemFormatter/assets}/file/24/file.png +0 -0
  32. package/lib/{assets/images → FileItemFormatter/assets}/file/24/music.png +0 -0
  33. package/lib/{assets/images → FileItemFormatter/assets}/file/24/pdf.png +0 -0
  34. package/lib/{assets/images → FileItemFormatter/assets}/file/24/pic.png +0 -0
  35. package/lib/{assets/images → FileItemFormatter/assets}/file/24/ppt.png +0 -0
  36. package/lib/{assets/images → FileItemFormatter/assets}/file/24/txt.png +0 -0
  37. package/lib/{assets/images → FileItemFormatter/assets}/file/24/video.png +0 -0
  38. package/lib/{assets/images → FileItemFormatter/assets}/file/24/word.png +0 -0
  39. package/lib/{assets/images → FileItemFormatter/assets}/folder/folder-192.png +0 -0
  40. package/lib/{assets/images → FileItemFormatter/assets}/folder/folder-24.png +0 -0
  41. package/lib/FileItemFormatter/index.js +2 -2
  42. package/lib/FileItemFormatter/utils.js +72 -0
  43. package/lib/{utils → FormulaFormatter}/cell-value-validator.js +0 -0
  44. package/lib/FormulaFormatter/index.js +2 -3
  45. package/lib/{utils/column-utils.js → FormulaFormatter/utils.js} +5 -1
  46. package/lib/{LongTextFormatter → HtmlLongTextFormatter}/index.css +0 -0
  47. package/lib/{LongTextFormatter/html-long-text-formatter.js → HtmlLongTextFormatter/index.js} +5 -2
  48. package/lib/{utils → HtmlLongTextFormatter}/markdown2html.js +2 -2
  49. package/lib/{utils → HtmlLongTextFormatter}/unified/index.js +8 -5
  50. package/lib/{utils → HtmlLongTextFormatter}/vfile/core.js +4 -2
  51. package/lib/{utils → HtmlLongTextFormatter}/vfile/index.js +4 -3
  52. package/lib/ImageFormatter/images-lazy-load.js +1 -1
  53. package/lib/ImageFormatter/index.js +1 -1
  54. package/lib/ImageFormatter/utils.js +7 -0
  55. package/lib/ImagePreviewerLightbox/index.js +1 -1
  56. package/lib/ImagePreviewerLightbox/utils.js +8 -0
  57. package/lib/LinkEditor/index.css +9 -0
  58. package/lib/{components/cell-editor/link-editor.js → LinkEditor/index.js} +10 -9
  59. package/lib/{components/common → LinkEditor}/link-editor-option.js +0 -0
  60. package/lib/LinkEditor/mb-link-editor-popover/index.css +85 -0
  61. package/lib/{components/cell-editor-popover/mb-link-editor-popover.js → LinkEditor/mb-link-editor-popover/index.js} +2 -1
  62. package/lib/LinkEditor/pc-link-editor-popover/index.css +63 -0
  63. package/lib/{components/cell-editor-popover/pc-link-editor-popover.js → LinkEditor/pc-link-editor-popover/index.js} +1 -0
  64. package/lib/LongTextFormatter/index.js +4 -7
  65. package/lib/{components/common/mobile/mb-editor-header.js → MBEditorHeader/index.js} +0 -0
  66. package/lib/MultipleSelectEditor/index.css +9 -0
  67. package/lib/{components/cell-editor/multiple-select-editor.js → MultipleSelectEditor/index.js} +5 -6
  68. package/lib/{components/cell-editor/number-editor.js → NumberEditor/index.js} +2 -2
  69. package/lib/SimpleLongTextFormatter/index.css +63 -0
  70. package/lib/{LongTextFormatter/simple-long-text-formatter.js → SimpleLongTextFormatter/index.js} +5 -2
  71. package/lib/{utils → SimpleLongTextFormatter}/normalize-long-text-value.js +0 -0
  72. package/lib/SingleSelectEditor/index.css +9 -0
  73. package/lib/{components/cell-editor/single-select-editor.js → SingleSelectEditor/index.js} +5 -6
  74. package/lib/{components/cell-editor/text-editor.js → TextEditor/index.js} +2 -2
  75. package/lib/css/cell-editor.css +0 -608
  76. package/lib/css/mb-cell-editor.css +55 -0
  77. package/lib/formatterConfig/index.js +2 -2
  78. package/lib/index.js +18 -6
  79. package/lib/select-editor/index.js +4 -0
  80. package/lib/select-editor/mb-select-editor-popover/index.css +127 -0
  81. package/lib/{components/cell-editor-popover/mb-select-editor-popover.js → select-editor/mb-select-editor-popover/index.js} +12 -11
  82. package/lib/select-editor/pc-select-editor-popover/index.css +72 -0
  83. package/lib/{components/cell-editor-popover/pc-select-editor-popover.js → select-editor/pc-select-editor-popover/index.js} +1 -0
  84. package/lib/{components/common → select-editor}/select-editor-option.js +0 -0
  85. package/lib/utils/utils.js +0 -91
  86. package/lib/utils/value-format-utils.js +4 -11
  87. package/package.json +5 -5
  88. package/lib/app.css +0 -20
  89. package/lib/app.js +0 -91
  90. package/lib/components/cell-editor/index.js +0 -9
  91. package/lib/components/common/collaborator-item.js +0 -63
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line
1
2
  'use strict';
2
3
 
3
4
  var path = require('path');
@@ -6,7 +7,6 @@ var replace = require('replace-ext');
6
7
 
7
8
  var buffer = require('is-buffer');
8
9
 
9
- module.exports = VFile;
10
10
  var own = {}.hasOwnProperty;
11
11
  var proto = VFile.prototype;
12
12
  proto.toString = toString;
@@ -169,4 +169,6 @@ function assertPath(path, name) {
169
169
  if (!path) {
170
170
  throw new Error('Setting `' + name + '` requires `path` to be set too');
171
171
  }
172
- }
172
+ }
173
+
174
+ export default VFile;
@@ -2,9 +2,8 @@
2
2
 
3
3
  var VMessage = require('vfile-message');
4
4
 
5
- var VFile = require('./core.js');
5
+ var VFile = require('./core.js').default;
6
6
 
7
- module.exports = VFile;
8
7
  var proto = VFile.prototype;
9
8
  proto.message = message;
10
9
  proto.info = info;
@@ -45,4 +44,6 @@ function info() {
45
44
  var message = this.message.apply(this, arguments);
46
45
  message.fatal = null;
47
46
  return message;
48
- }
47
+ }
48
+
49
+ export default VFile;
@@ -4,7 +4,7 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
4
4
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
5
  import React from 'react';
6
6
  import Loading from '../Loading';
7
- import { getImageThumbnailUrl } from '../utils/utils';
7
+ import { getImageThumbnailUrl } from './utils';
8
8
 
9
9
  var ImagesLazyLoad = /*#__PURE__*/function (_React$Component) {
10
10
  _inherits(ImagesLazyLoad, _React$Component);
@@ -5,7 +5,7 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
5
  import React, { Fragment } from 'react';
6
6
  import cn from 'astro-classname';
7
7
  import ImagesLazyLoad from './images-lazy-load';
8
- import { getImageThumbnailUrl } from '../utils/utils';
8
+ import { getImageThumbnailUrl } from './utils';
9
9
  import ImagePreviewerLightbox from '../ImagePreviewerLightbox';
10
10
  import './index.css';
11
11
 
@@ -0,0 +1,7 @@
1
+ export var getImageThumbnailUrl = function getImageThumbnailUrl(url, server) {
2
+ if (server && url.indexOf(server) > -1) {
3
+ return url.replace('/workspace', '/thumbnail/workspace') + '?size=256';
4
+ }
5
+
6
+ return url;
7
+ };
@@ -2,7 +2,7 @@ import React, { Fragment } from 'react';
2
2
  import MediaQuery from 'react-responsive';
3
3
  import ModalPortal from '../ModalPortal';
4
4
  import Lightbox from '@seafile/react-image-lightbox';
5
- import { checkSVGImage, isInternalImg } from '../utils/utils';
5
+ import { checkSVGImage, isInternalImg } from './utils';
6
6
  import '@seafile/react-image-lightbox/style.css';
7
7
  import './index.css';
8
8
 
@@ -0,0 +1,8 @@
1
+ export var isInternalImg = function isInternalImg(url) {
2
+ if (!url) return;
3
+ return url.indexOf(window.dtable.server) > -1;
4
+ };
5
+ export var checkSVGImage = function checkSVGImage(url) {
6
+ if (!url) return false;
7
+ return url.substr(-4).toLowerCase() === '.svg';
8
+ };
@@ -0,0 +1,9 @@
1
+ .dtable-ui-link-editor {
2
+ position: relative;
3
+ }
4
+
5
+ .dtable-ui-link-editor-container {
6
+ display: inline-block;
7
+ height: 30px;
8
+ padding: 0 10px;
9
+ }
@@ -4,13 +4,14 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
4
4
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
5
  import React, { Fragment } from 'react';
6
6
  import MediaQuery from 'react-responsive';
7
- import { getLocale } from '../../lang';
8
- import * as CellTypes from '../../constants/cell-types';
9
- import { getNumberDisplayString, getDateDisplayString } from '../../utils/value-format-utils';
10
- import EditEditorButton from '../common/edit-editor-button';
11
- import LinkEditorOption from '../common/link-editor-option';
12
- import PCLinkEditorPopover from '../cell-editor-popover/pc-link-editor-popover';
13
- import MBLinkEditorPopover from '../cell-editor-popover/mb-link-editor-popover';
7
+ import { getLocale } from '../lang';
8
+ import { CellType } from '../constants';
9
+ import { getNumberDisplayString, getDateDisplayString } from '../utils/value-format-utils';
10
+ import EditEditorButton from '../EditEditorButton';
11
+ import LinkEditorOption from './link-editor-option';
12
+ import PCLinkEditorPopover from './pc-link-editor-popover';
13
+ import MBLinkEditorPopover from './mb-link-editor-popover';
14
+ import './index.css';
14
15
 
15
16
  var LinkEditor = /*#__PURE__*/function (_React$Component) {
16
17
  _inherits(LinkEditor, _React$Component);
@@ -80,12 +81,12 @@ var LinkEditor = /*#__PURE__*/function (_React$Component) {
80
81
  data = linkedColumn.data;
81
82
 
82
83
  switch (type) {
83
- case CellTypes.NUMBER:
84
+ case CellType.NUMBER:
84
85
  {
85
86
  return getNumberDisplayString(value, data);
86
87
  }
87
88
 
88
- case CellTypes.DATE:
89
+ case CellType.DATE:
89
90
  {
90
91
  var format = data.format;
91
92
  return getDateDisplayString(value, format);
@@ -0,0 +1,85 @@
1
+ @import url('../../css/mb-cell-editor.css');
2
+
3
+ @media screen and (max-width: 767.8px) {
4
+ .dtable-ui-mb-link-editor-body .mb-search-link-items {
5
+ padding: 8px 16px;
6
+ margin-top: 20px;
7
+ border-top: 1px solid #e9e9e9;
8
+ border-bottom: 1px solid #e9e9e9;
9
+ background-color: #fff;
10
+ }
11
+
12
+ .dtable-ui-mb-link-editor-body .mb-search-link-items > input {
13
+ outline: none;
14
+ height: 30px;
15
+ padding: 0;
16
+ line-height: 30px;
17
+ border: none;
18
+ }
19
+
20
+ .dtable-ui-mb-link-editor-body .mb-search-link-items > input:focus,
21
+ .dtable-ui-mb-link-editor-body .mb-search-link-items > input:active {
22
+ outline: none;
23
+ box-shadow: none;
24
+ }
25
+
26
+ .dtable-ui-mb-link-editor-body .mb-link-container {
27
+ flex: 1;
28
+ display: flex;
29
+ flex-direction: column;
30
+ margin-top: 10px;
31
+ min-height: 0;
32
+ }
33
+
34
+ .dtable-ui-mb-link-editor-body .mb-link-container .title {
35
+ padding: 6px 16px;
36
+ border-bottom: 1px solid #e9e9e9;
37
+ }
38
+
39
+ .dtable-ui-mb-link-editor-body .mb-link-container .content {
40
+ flex: 1;
41
+ overflow: auto;
42
+ display: flex;
43
+ flex-direction: column;
44
+ border-bottom: 1px solid #e9e9e9;
45
+ }
46
+
47
+ .dtable-ui-mb-link-editor-body .search-result-none {
48
+ padding: 16px 0 16px 16px;
49
+ }
50
+
51
+ .dtable-ui-mb-link-editor-body .mb-link-option-item {
52
+ display: flex;
53
+ align-items: center;
54
+ justify-content: space-between;
55
+ height: 50px;
56
+ padding: 10px 10px 10px 16px;
57
+ font-size: 13px;
58
+ color: #202428;
59
+ background-color: #fff;
60
+ }
61
+
62
+ .dtable-ui-mb-link-editor-body .mb-link-option-item {
63
+ border-bottom: 1px solid #e9e9e9;
64
+ }
65
+
66
+ .dtable-ui-mb-link-editor-body .mb-link-option-item .mb-option-info {
67
+ display: flex;
68
+ align-items: center;
69
+ }
70
+
71
+ .dtable-ui-mb-link-editor-body .mb-link-option-item .option-name {
72
+ padding: 0 10px;
73
+ max-width: 250px;
74
+ white-space: nowrap;
75
+ overflow: hidden;
76
+ text-overflow: ellipsis;
77
+ background: #eceff4;
78
+ border-radius: 3px;
79
+ }
80
+
81
+ .dtable-ui-mb-link-editor-body .mb-link-option-item .dtable-font {
82
+ font-size: 12px;
83
+ color: #798d99;
84
+ }
85
+ }
@@ -5,7 +5,8 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
5
5
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
6
6
  import React from 'react';
7
7
  import { getLocale } from '../../lang';
8
- import MBEditorHeader from '../common/mobile/mb-editor-header';
8
+ import MBEditorHeader from '../../MBEditorHeader';
9
+ import './index.css';
9
10
 
10
11
  var MBLinkEditorPopover = /*#__PURE__*/function (_React$Component) {
11
12
  _inherits(MBLinkEditorPopover, _React$Component);
@@ -0,0 +1,63 @@
1
+ @import url('../../css/cell-editor.css');
2
+
3
+ .dtable-ui-link-editor-popover .link-options-search {
4
+ padding: 10px 10px 0 10px;
5
+ }
6
+
7
+ .dtable-ui-link-editor-popover .link-options-search input {
8
+ height: 28px;
9
+ }
10
+
11
+ .dtable-ui-link-editor-popover .link-options-container {
12
+ min-height: 160px;
13
+ max-height: 200px;
14
+ margin: 10px 0;
15
+ padding: 0 10px;
16
+ overflow: auto;
17
+ }
18
+
19
+ /* option item */
20
+ .dtable-ui-link-editor-popover .link-option-item {
21
+ display: flex;
22
+ height: 30px;
23
+ padding-left: 12px;
24
+ font-size: 14px;
25
+ line-height: 30px;
26
+ margin-left: 10px;
27
+ cursor: pointer;
28
+ }
29
+
30
+ .dtable-ui-link-editor-popover .link-option-item:hover {
31
+ background-color: #f5f5f5;
32
+ }
33
+
34
+ .dtable-ui-link-editor-popover .option-info {
35
+ flex: 1;
36
+ display: flex;
37
+ align-items: center;
38
+ }
39
+
40
+ .dtable-ui-link-editor-popover .option-info .option-name {
41
+ max-width: 250px;
42
+ white-space: nowrap;
43
+ overflow: hidden;
44
+ text-overflow: ellipsis;
45
+ }
46
+
47
+ .dtable-ui-link-editor-popover .option-checked {
48
+ width: 20px;
49
+ text-align: center;
50
+ }
51
+
52
+ .dtable-ui-link-editor-popover .option-checked .dtable-font {
53
+ font-size: 12px;
54
+ color: #798d99;
55
+ }
56
+
57
+ .dtable-ui-link-editor-popover .select-options-add {
58
+ display: flex;
59
+ align-items: center;
60
+ padding: 0 10px;
61
+ height: 30px;
62
+ border-top: 1px solid #ccc;
63
+ }
@@ -5,6 +5,7 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
5
5
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
6
6
  import React from 'react';
7
7
  import { getLocale } from '../../lang';
8
+ import './index.css';
8
9
 
9
10
  var PCLinkEditorPopover = /*#__PURE__*/function (_React$Component) {
10
11
  _inherits(PCLinkEditorPopover, _React$Component);
@@ -1,25 +1,22 @@
1
1
  import React from 'react';
2
- import cn from 'astro-classname';
3
- import HtmlLongTextFormatter from './html-long-text-formatter';
4
- import SimpleLongTextFormatter from './simple-long-text-formatter';
5
- import './index.css';
2
+ import HtmlLongTextFormatter from '../HtmlLongTextFormatter';
3
+ import SimpleLongTextFormatter from '../SimpleLongTextFormatter';
6
4
 
7
5
  function LongTextFormatter(props) {
8
6
  var isSample = props.isSample,
9
7
  value = props.value,
10
8
  containerClassName = props.containerClassName;
11
- var className = cn('dtable-ui cell-formatter-container long-text-formatter', containerClassName);
12
9
 
13
10
  if (isSample) {
14
11
  return /*#__PURE__*/React.createElement(SimpleLongTextFormatter, {
15
12
  value: value,
16
- className: className
13
+ containerClassName: containerClassName
17
14
  });
18
15
  }
19
16
 
20
17
  return /*#__PURE__*/React.createElement(HtmlLongTextFormatter, {
21
18
  value: value,
22
- className: className
19
+ containerClassName: containerClassName
23
20
  });
24
21
  }
25
22
 
@@ -0,0 +1,9 @@
1
+ .dtable-ui-multiple-select-editor {
2
+ position: relative;
3
+ }
4
+
5
+ .dtable-ui-select-editor-container {
6
+ display: inline-block;
7
+ height: 30px;
8
+ padding: 0 10px;
9
+ }
@@ -4,11 +4,10 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
4
4
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
5
  import React, { Fragment } from 'react';
6
6
  import MediaQuery from 'react-responsive';
7
- import { getLocale } from '../../lang';
8
- import EditEditorButton from '../common/edit-editor-button';
9
- import SelectEditorOption from '../common/select-editor-option';
10
- import PCSelectEditorPopover from '../cell-editor-popover/pc-select-editor-popover';
11
- import MBSingleSelectPopover from '../cell-editor-popover/mb-select-editor-popover';
7
+ import { getLocale } from '../lang';
8
+ import EditEditorButton from '../EditEditorButton';
9
+ import { SelectEditorOption, PCSelectEditorPopover, MBSelectEditorPopover } from '../select-editor';
10
+ import './index.css';
12
11
 
13
12
  var MultipleSelectEditor = /*#__PURE__*/function (_React$Component) {
14
13
  _inherits(MultipleSelectEditor, _React$Component);
@@ -213,7 +212,7 @@ var MultipleSelectEditor = /*#__PURE__*/function (_React$Component) {
213
212
  onAddNewOption: this.onAddNewOption
214
213
  })), /*#__PURE__*/React.createElement(MediaQuery, {
215
214
  query: "(max-width: 767.8px)"
216
- }, /*#__PURE__*/React.createElement(MBSingleSelectPopover, {
215
+ }, /*#__PURE__*/React.createElement(MBSelectEditorPopover, {
217
216
  isReadOnly: this.props.isReadOnly,
218
217
  value: this.state.newValue,
219
218
  column: this.props.column,
@@ -4,8 +4,8 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
4
4
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
5
  import React from 'react';
6
6
  import isHotkey from 'is-hotkey';
7
- import { NUMBER_TYPES } from '../../constants';
8
- import { getNumberDisplayString, formatStringToNumber, formatNumberString } from '../../utils/value-format-utils';
7
+ import { NUMBER_TYPES } from '../constants';
8
+ import { getNumberDisplayString, formatStringToNumber, formatNumberString } from '../utils/value-format-utils';
9
9
 
10
10
  var NumberEditor = /*#__PURE__*/function (_React$Component) {
11
11
  _inherits(NumberEditor, _React$Component);
@@ -0,0 +1,63 @@
1
+ @import url('../css/cell-formatter.css');
2
+
3
+ .dtable-ui.long-text-formatter {
4
+ display: flex;
5
+ align-items: center;
6
+ height: 28px;
7
+ overflow: hidden;
8
+ text-overflow: ellipsis;
9
+ white-space: nowrap;
10
+ }
11
+
12
+ .dtable-ui.long-text-formatter.article {
13
+ display: block;
14
+ height: auto;
15
+ overflow: auto;
16
+ }
17
+
18
+ .dtable-ui.long-text-formatter .long-text-links,
19
+ .dtable-ui.long-text-formatter .long-text-check-list {
20
+ display: inline-block;
21
+ height: 20px;
22
+ padding: 2px;
23
+ margin: 4px;
24
+ color: #9c9c9c;
25
+ background-color: #f0f0f0;
26
+ border-radius: 3px;
27
+ line-height: 16px;
28
+ }
29
+
30
+ .dtable-ui.long-text-formatter .long-text-check-list .dtable-font,
31
+ .dtable-ui.long-text-formatter .long-text-links .dtable-font {
32
+ margin-right: 4px;
33
+ font-size: 12px;
34
+ }
35
+
36
+ .dtable-ui.long-text-formatter .long-text-check-list .long-text-check-list-completed {
37
+ color: #61BD4F;
38
+ }
39
+
40
+ .dtable-ui.long-text-formatter .long-text-images {
41
+ margin-right: -10px;
42
+ }
43
+
44
+ .dtable-ui.long-text-formatter .long-text-images img {
45
+ max-width: 28px;
46
+ max-height: 28px;
47
+ border: 1px solid #f0f0f0;
48
+ box-sizing: border-box;
49
+ border-radius: 3px;
50
+ }
51
+
52
+ .dtable-ui.long-text-formatter .long-text-images .image-number {
53
+ display: inline-block;
54
+ min-width: 14px;
55
+ padding: 0 3px;
56
+ line-height: 14px;
57
+ font-style: normal;
58
+ font-size: 12px;
59
+ border-radius: 6px;
60
+ background-color: #999;
61
+ color: #fff;
62
+ transform: translate(-50%, 9px) scale(0.8);
63
+ }
@@ -3,7 +3,9 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
3
3
  import _inherits from "@babel/runtime/helpers/esm/inherits";
4
4
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
5
  import React from 'react';
6
- import getPreviewContent from '../utils/normalize-long-text-value';
6
+ import cn from 'astro-classname';
7
+ import getPreviewContent from './normalize-long-text-value';
8
+ import './index.css';
7
9
 
8
10
  var SimpleLongTextFormatter = /*#__PURE__*/function (_React$Component) {
9
11
  _inherits(SimpleLongTextFormatter, _React$Component);
@@ -82,7 +84,8 @@ var SimpleLongTextFormatter = /*#__PURE__*/function (_React$Component) {
82
84
  _createClass(SimpleLongTextFormatter, [{
83
85
  key: "render",
84
86
  value: function render() {
85
- var className = this.props.className;
87
+ var containerClassName = this.props.containerClassName;
88
+ var className = cn('dtable-ui cell-formatter-container long-text-formatter', containerClassName);
86
89
  var value = this.translateValue();
87
90
  return /*#__PURE__*/React.createElement("div", {
88
91
  className: className
@@ -0,0 +1,9 @@
1
+ .dtable-ui-single-select-editor {
2
+ position: relative;
3
+ }
4
+
5
+ .dtable-ui-select-editor-container {
6
+ display: inline-block;
7
+ height: 30px;
8
+ padding: 0 10px;
9
+ }
@@ -4,11 +4,10 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
4
4
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
5
  import React, { Fragment } from 'react';
6
6
  import MediaQuery from 'react-responsive';
7
- import { getLocale } from '../../lang';
8
- import EditEditorButton from '../common/edit-editor-button';
9
- import SelectEditorOption from '../common/select-editor-option';
10
- import PCSelectEditorPopover from '../cell-editor-popover/pc-select-editor-popover';
11
- import MBSingleSelectPopover from '../cell-editor-popover/mb-select-editor-popover';
7
+ import { getLocale } from '../lang';
8
+ import EditEditorButton from '../EditEditorButton';
9
+ import { SelectEditorOption, PCSelectEditorPopover, MBSelectEditorPopover } from '../select-editor';
10
+ import './index.css';
12
11
 
13
12
  var SingleSelectEditor = /*#__PURE__*/function (_React$Component) {
14
13
  _inherits(SingleSelectEditor, _React$Component);
@@ -178,7 +177,7 @@ var SingleSelectEditor = /*#__PURE__*/function (_React$Component) {
178
177
  onAddNewOption: this.onAddNewOption
179
178
  })), /*#__PURE__*/React.createElement(MediaQuery, {
180
179
  query: "(max-width: 767.8px)"
181
- }, /*#__PURE__*/React.createElement(MBSingleSelectPopover, {
180
+ }, /*#__PURE__*/React.createElement(MBSelectEditorPopover, {
182
181
  isReadOnly: this.props.isReadOnly,
183
182
  value: [this.state.newValue],
184
183
  column: this.props.column,
@@ -42,7 +42,7 @@ var TextEditor = /*#__PURE__*/function (_React$Component) {
42
42
  });
43
43
  };
44
44
 
45
- _this.onEditorhandle = function () {
45
+ _this.onEditorHandle = function () {
46
46
  if (_this.props.isReadOnly) {
47
47
  return;
48
48
  }
@@ -97,7 +97,7 @@ var TextEditor = /*#__PURE__*/function (_React$Component) {
97
97
  className: "text-editor-container"
98
98
  }, !this.state.isEditorShow && /*#__PURE__*/React.createElement("div", {
99
99
  className: "form-control",
100
- onClick: this.onEditorhandle
100
+ onClick: this.onEditorHandle
101
101
  }, this.state.newValue), this.state.isEditorShow && /*#__PURE__*/React.createElement("input", {
102
102
  ref: this.setInputRef,
103
103
  type: "text",