sea-chart 2.0.43 → 2.0.44
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.
- package/dist/api/index.js +4 -11
- package/dist/components/cell-factory/FormatterConfig.js +55 -62
- package/dist/components/cell-factory/SimpleCellFormatter.js +4 -11
- package/dist/components/cell-factory/SingleSelectOption.js +11 -18
- package/dist/components/cell-factory/cell-editor-factory.js +5 -12
- package/dist/components/cell-factory/cell-formatter-factory.js +4 -11
- package/dist/components/cell-factory/link-content.js +27 -35
- package/dist/components/chart-color-selector/color-selector.js +11 -18
- package/dist/components/collaborator/index.js +7 -14
- package/dist/components/color-picker/index.js +11 -18
- package/dist/components/color-popover/color-rules/color-rule.js +25 -33
- package/dist/components/color-popover/color-rules/index.js +6 -14
- package/dist/components/color-popover/color-rules/rule-filters/filter.js +27 -34
- package/dist/components/color-popover/color-rules/rule-filters/index.js +17 -25
- package/dist/components/color-popover/color-rules/rule-filters/number-input.js +10 -18
- package/dist/components/color-popover/color-rules-popover.js +26 -34
- package/dist/components/color-popover/color-selector-popover.js +10 -18
- package/dist/components/color-setting/color-group-selector.js +12 -20
- package/dist/components/common-add-tool/index.js +6 -13
- package/dist/components/data-process-setter/data-setting-header.js +7 -14
- package/dist/components/data-process-setter/hide-column-setter.js +12 -19
- package/dist/components/data-process-setter/index.js +4 -27
- package/dist/components/data-process-setter/sort-setter.js +16 -24
- package/dist/components/draggable/Draggable.js +7 -13
- package/dist/components/drill-down-settings/drill-down-fields-popover/index.js +42 -50
- package/dist/components/drill-down-settings/drill-down-fields-settings/index.js +10 -18
- package/dist/components/drill-down-settings/index.js +11 -18
- package/dist/components/dtable-popover/index.js +13 -20
- package/dist/components/dtable-search-input/index.js +13 -21
- package/dist/components/font-settings/index.js +14 -22
- package/dist/components/goal-line-setting/goal-setting-item.js +6 -14
- package/dist/components/goal-line-setting/index.js +12 -19
- package/dist/components/highlighter/highlighter.js +7 -14
- package/dist/components/icon/index.js +4 -11
- package/dist/components/index.js +7 -48
- package/dist/components/loading/index.js +6 -13
- package/dist/components/number-input/index.js +4 -11
- package/dist/components/pixel-editor/index.js +15 -23
- package/dist/components/popover/hide-column-popover/hide-column-popover-widgets/hide-column-item.js +8 -15
- package/dist/components/popover/hide-column-popover/hide-column-popover.js +25 -33
- package/dist/components/popover/sort-popover/sort-popover-widgets/sort-utils.js +9 -18
- package/dist/components/popover/sort-popover/sort-popover.js +54 -64
- package/dist/components/resize-handle/ResizeHandle.js +6 -13
- package/dist/components/row-card/row-card-header-cell.js +15 -22
- package/dist/components/row-card/row-card-header.js +14 -21
- package/dist/components/row-card/row-card-item.js +33 -41
- package/dist/components/row-card/row-card.js +15 -23
- package/dist/components/statistic-record-dialog/index.js +56 -64
- package/dist/components/tooltip/index.js +21 -21
- package/dist/components/types-dialog/index.js +56 -64
- package/dist/components/types-dialog/use-force-update.js +4 -10
- package/dist/constants/color-rules.js +8 -14
- package/dist/constants/common-constants.js +8 -14
- package/dist/constants/error.js +2 -8
- package/dist/constants/geolocation.js +9 -15
- package/dist/constants/index.js +149 -273
- package/dist/constants/key-codes.js +0 -2
- package/dist/constants/model.js +3 -9
- package/dist/constants/regions.js +3 -8
- package/dist/constants/style.js +6 -12
- package/dist/constants/table.js +1 -7
- package/dist/constants/type-image.js +33 -39
- package/dist/constants/type.js +3 -9
- package/dist/context.js +20 -24
- package/dist/editor/index.js +8 -15
- package/dist/index.js +13 -104
- package/dist/intl.js +10 -17
- package/dist/locale/index.js +16 -23
- package/dist/locale/lang/de.js +1 -7
- package/dist/locale/lang/en.js +1 -7
- package/dist/locale/lang/es.js +1 -7
- package/dist/locale/lang/fr.js +1 -7
- package/dist/locale/lang/pt.js +1 -7
- package/dist/locale/lang/ru.js +1 -7
- package/dist/locale/lang/zh_CN.js +1 -7
- package/dist/model/area-group.js +12 -19
- package/dist/model/area.js +12 -19
- package/dist/model/bar-custom.js +11 -18
- package/dist/model/bar-group.js +12 -19
- package/dist/model/bar-stack.js +10 -17
- package/dist/model/bar.js +11 -18
- package/dist/model/base-model.js +8 -11
- package/dist/model/basic-number-card.js +13 -20
- package/dist/model/chart.js +7 -13
- package/dist/model/combination.js +19 -22
- package/dist/model/compare-bar.js +14 -21
- package/dist/model/completeness-group.js +11 -18
- package/dist/model/completeness.js +10 -17
- package/dist/model/dashboard.js +7 -14
- package/dist/model/funnel.js +14 -21
- package/dist/model/generic-model.js +135 -143
- package/dist/model/heat-map.js +9 -16
- package/dist/model/horizontal-bar.js +15 -18
- package/dist/model/horizontal-group-bar.js +14 -17
- package/dist/model/index.js +69 -93
- package/dist/model/line-group.js +13 -20
- package/dist/model/line.js +12 -19
- package/dist/model/map-bubble.js +12 -19
- package/dist/model/map.js +12 -19
- package/dist/model/mirror.js +13 -20
- package/dist/model/pie.js +12 -19
- package/dist/model/ring.js +12 -19
- package/dist/model/scatter.js +10 -17
- package/dist/model/stacked-horizontal-bar.js +15 -18
- package/dist/model/table-element.js +5 -12
- package/dist/model/table.js +7 -14
- package/dist/model/tree-map.js +7 -14
- package/dist/model/trend.js +11 -18
- package/dist/model/user.js +1 -7
- package/dist/model/world-map-bubble.js +12 -19
- package/dist/model/world-map.js +12 -19
- package/dist/services/map-json.js +7 -13
- package/dist/settings/advance-bar-settings/data-settings.js +36 -44
- package/dist/settings/advance-bar-settings/index.js +3 -20
- package/dist/settings/advance-bar-settings/style-settings.js +83 -74
- package/dist/settings/bar-settings/data-settings.js +39 -47
- package/dist/settings/bar-settings/index.js +3 -20
- package/dist/settings/bar-settings/style-settings.js +69 -60
- package/dist/settings/basic-number-card/data-settings.js +49 -57
- package/dist/settings/basic-number-card/index.js +3 -20
- package/dist/settings/basic-number-card/style-settings.js +18 -26
- package/dist/settings/combination-settings/data-settings.js +55 -63
- package/dist/settings/combination-settings/index.js +3 -20
- package/dist/settings/combination-settings/style-settings.js +94 -77
- package/dist/settings/completeness-settings/callbacks/callbacks.js +16 -27
- package/dist/settings/completeness-settings/data-settings/completion-settings.js +21 -28
- package/dist/settings/completeness-settings/data-settings/data-settings.js +25 -32
- package/dist/settings/completeness-settings/index.js +3 -20
- package/dist/settings/completeness-settings/style-settings.js +19 -26
- package/dist/settings/dashboard-settings/data-settings.js +43 -51
- package/dist/settings/dashboard-settings/index.js +2 -13
- package/dist/settings/data-settings.js +72 -79
- package/dist/settings/funnel-settings/components/dnd-item/dnd-item.js +12 -19
- package/dist/settings/funnel-settings/components/dnd-list.js +15 -23
- package/dist/settings/funnel-settings/components/funnel-label-setting.js +32 -40
- package/dist/settings/funnel-settings/components/funnel-layer-setting.js +20 -28
- package/dist/settings/funnel-settings/data-settings.js +23 -31
- package/dist/settings/funnel-settings/index.js +3 -20
- package/dist/settings/funnel-settings/style-settings.js +11 -19
- package/dist/settings/heat-map-settings/data-settings.js +18 -26
- package/dist/settings/heat-map-settings/index.js +3 -20
- package/dist/settings/heat-map-settings/style-settings.js +18 -26
- package/dist/settings/horizontal-bar-settings/data-settings.js +12 -19
- package/dist/settings/horizontal-bar-settings/index.js +3 -20
- package/dist/settings/horizontal-bar-settings/style-settings.js +12 -19
- package/dist/settings/index.js +52 -70
- package/dist/settings/map-settings/components/location-field-selector.js +10 -17
- package/dist/settings/map-settings/components/map-level-selector.js +11 -18
- package/dist/settings/map-settings/components/map-province-city-selector.js +19 -26
- package/dist/settings/map-settings/index.js +3 -20
- package/dist/settings/map-settings/map-data-settings.js +23 -30
- package/dist/settings/map-settings/map-style-settings.js +26 -34
- package/dist/settings/mirror-settings/data-settings.js +26 -34
- package/dist/settings/mirror-settings/index.js +2 -13
- package/dist/settings/pie-settings/data-settings.js +33 -41
- package/dist/settings/pie-settings/index.js +3 -20
- package/dist/settings/pie-settings/style-settings.js +47 -55
- package/dist/settings/scatter/data-settings.js +27 -34
- package/dist/settings/scatter/index.js +3 -12
- package/dist/settings/stacks-settings/index.js +19 -27
- package/dist/settings/stacks-settings/stack-item-settings.js +19 -27
- package/dist/settings/style-settings.js +64 -72
- package/dist/settings/table-element-settings/components/data-filter.js +30 -38
- package/dist/settings/table-element-settings/data-settings.js +21 -29
- package/dist/settings/table-element-settings/index.js +2 -13
- package/dist/settings/table-settings/data-settings.js +111 -119
- package/dist/settings/table-settings/index.js +2 -13
- package/dist/settings/time-comparison-settings/data-settings.js +43 -51
- package/dist/settings/time-comparison-settings/index.js +3 -20
- package/dist/settings/time-comparison-settings/style-settings.js +62 -53
- package/dist/settings/trend-settings/data-settings.js +24 -32
- package/dist/settings/trend-settings/index.js +3 -20
- package/dist/settings/trend-settings/style-setting.js +17 -25
- package/dist/settings/widgets/axis-title-font-settings/index.js +39 -0
- package/dist/settings/widgets/basic-summary/index.js +55 -63
- package/dist/settings/widgets/chart-type/index.js +18 -26
- package/dist/settings/widgets/color-settings/index.js +72 -80
- package/dist/settings/widgets/common-data-settings.js +21 -29
- package/dist/settings/widgets/data-filter/index.js +35 -43
- package/dist/settings/widgets/data-sort.js +16 -24
- package/dist/settings/widgets/date-summary-item.js +24 -32
- package/dist/settings/widgets/display-values-settings/index.js +14 -22
- package/dist/settings/widgets/divider/index.js +8 -16
- package/dist/settings/widgets/font-settings/font-color-settings.js +11 -19
- package/dist/settings/widgets/font-settings/font-size-settings.js +14 -22
- package/dist/settings/widgets/font-settings/font-weight-settings.js +17 -25
- package/dist/settings/widgets/font-settings/index.js +4 -27
- package/dist/settings/widgets/group-by.js +51 -59
- package/dist/settings/widgets/min-max-setting.js +10 -18
- package/dist/settings/widgets/mininum-slice-percent.js +10 -18
- package/dist/settings/widgets/numeric-summary-item.js +23 -31
- package/dist/settings/widgets/select-line-type/index.js +10 -17
- package/dist/settings/widgets/select-table/index.js +9 -16
- package/dist/settings/widgets/select-view/index.js +20 -28
- package/dist/settings/widgets/stack.js +14 -22
- package/dist/settings/widgets/summary-method-setting.js +17 -25
- package/dist/settings/widgets/summary-settings.js +72 -80
- package/dist/settings/widgets/switch/index.js +8 -15
- package/dist/settings/widgets/text-horizontal-settings.js +15 -23
- package/dist/settings/widgets/time-picker.js +29 -37
- package/dist/settings/widgets/title-settings/index.js +29 -37
- package/dist/settings/widgets/title-settings/title-text.js +5 -12
- package/dist/settings/widgets/x-axios.js +0 -1
- package/dist/settings/widgets/y-axis-group-settings.js +63 -71
- package/dist/utils/cell-format-utils.js +18 -28
- package/dist/utils/cell-value-utils.js +5 -12
- package/dist/utils/chart-utils/base-utils.js +362 -334
- package/dist/utils/chart-utils/index.js +28 -41
- package/dist/utils/chart-utils/original-data-utils/basic-chart-calculator.js +80 -86
- package/dist/utils/chart-utils/original-data-utils/card-calculator.js +13 -20
- package/dist/utils/chart-utils/original-data-utils/combination-calculator.js +45 -52
- package/dist/utils/chart-utils/original-data-utils/compare-bar-chart-calculator.js +19 -26
- package/dist/utils/chart-utils/original-data-utils/completeness-calculator.js +32 -39
- package/dist/utils/chart-utils/original-data-utils/dashboard-calculator.js +16 -23
- package/dist/utils/chart-utils/original-data-utils/index.js +50 -57
- package/dist/utils/chart-utils/original-data-utils/mirror-calculator.js +21 -28
- package/dist/utils/chart-utils/original-data-utils/pivot-table-calculator.js +91 -97
- package/dist/utils/chart-utils/original-data-utils/scatter-calculator.js +19 -26
- package/dist/utils/chart-utils/original-data-utils/trend-calculator.js +31 -38
- package/dist/utils/chart-utils/sql-statistics-utils.js +284 -246
- package/dist/utils/chart.js +9 -17
- package/dist/utils/collaborator-manager.js +3 -9
- package/dist/utils/collaborator-utils.js +18 -30
- package/dist/utils/collaborator.js +4 -13
- package/dist/utils/color-utils.js +18 -29
- package/dist/utils/column-utils.js +65 -92
- package/dist/utils/common-utils.js +27 -52
- package/dist/utils/concurrency-manager.js +1 -7
- package/dist/utils/contexts.js +5 -12
- package/dist/utils/date-translate.js +11 -19
- package/dist/utils/digital-sign-utils.js +7 -14
- package/dist/utils/event-bus.js +1 -7
- package/dist/utils/hotkey.js +5 -11
- package/dist/utils/index.js +54 -221
- package/dist/utils/key-generator.js +2 -9
- package/dist/utils/map.js +22 -31
- package/dist/utils/object-utils.js +1 -7
- package/dist/utils/options-utils.js +8 -16
- package/dist/utils/row-record-utils.js +182 -178
- package/dist/utils/row-utils.js +27 -38
- package/dist/utils/search.js +24 -32
- package/dist/utils/sql/chart-data-sql.js +49 -55
- package/dist/utils/sql/column-2-sql-column.js +146 -154
- package/dist/utils/sql/index.js +3 -27
- package/dist/utils/trend-utils.js +39 -47
- package/dist/view/index.css +0 -17
- package/dist/view/index.js +89 -95
- package/dist/view/title/index.js +15 -23
- package/dist/view/wrapper/area-group.js +53 -72
- package/dist/view/wrapper/area.js +51 -72
- package/dist/view/wrapper/bar-compare.js +43 -56
- package/dist/view/wrapper/bar-custom-stack.js +50 -120
- package/dist/view/wrapper/bar-group.js +51 -94
- package/dist/view/wrapper/bar-stack.js +54 -90
- package/dist/view/wrapper/bar.js +45 -66
- package/dist/view/wrapper/basic-number-card.js +25 -26
- package/dist/view/wrapper/chart-component.js +539 -162
- package/dist/view/wrapper/combination.js +63 -83
- package/dist/view/wrapper/completeness-group.js +42 -96
- package/dist/view/wrapper/completeness.js +42 -96
- package/dist/view/wrapper/dashboard.js +33 -47
- package/dist/view/wrapper/funnel.js +36 -56
- package/dist/view/wrapper/heat-map.js +126 -104
- package/dist/view/wrapper/horizontal-bar-group.js +57 -76
- package/dist/view/wrapper/horizontal-bar-stack.js +56 -109
- package/dist/view/wrapper/horizontal-bar.js +45 -68
- package/dist/view/wrapper/index.js +110 -115
- package/dist/view/wrapper/line-group.js +48 -66
- package/dist/view/wrapper/line.js +47 -67
- package/dist/view/wrapper/map-bubble.js +46 -59
- package/dist/view/wrapper/map-world-bubble.js +45 -58
- package/dist/view/wrapper/map-world.js +47 -60
- package/dist/view/wrapper/map.js +48 -60
- package/dist/view/wrapper/mirror.js +40 -61
- package/dist/view/wrapper/pie.js +48 -59
- package/dist/view/wrapper/ring.js +52 -63
- package/dist/view/wrapper/scatter.js +49 -67
- package/dist/view/wrapper/table/index.js +13 -21
- package/dist/view/wrapper/table/one-dimension-table-no-numeric-columns.js +49 -57
- package/dist/view/wrapper/table/one-dimension-table-with-numeric-columns.js +50 -58
- package/dist/view/wrapper/table/pivot-table-display-name.js +83 -91
- package/dist/view/wrapper/table/two-dimension-table.js +76 -84
- package/dist/view/wrapper/table-element/components/dataset-utils.js +23 -36
- package/dist/view/wrapper/table-element/components/formatter.js +96 -105
- package/dist/view/wrapper/table-element/components/formatters/FileFormatter/index.js +22 -31
- package/dist/view/wrapper/table-element/components/formatters/formula-formatter.js +9 -16
- package/dist/view/wrapper/table-element/components/formatters/link-formatter.js +73 -80
- package/dist/view/wrapper/table-element/components/formula-formatter.js +9 -16
- package/dist/view/wrapper/table-element/components/link-formatter.js +73 -80
- package/dist/view/wrapper/table-element/components/record.js +10 -17
- package/dist/view/wrapper/table-element/components/records-body.js +17 -19
- package/dist/view/wrapper/table-element/components/records-header/index.js +7 -15
- package/dist/view/wrapper/table-element/components/records-header/records-header-cell.js +8 -16
- package/dist/view/wrapper/table-element/components/records.js +23 -33
- package/dist/view/wrapper/table-element/components/resize-column-handle/resize-column-handle.js +5 -12
- package/dist/view/wrapper/table-element/components/utils.js +5 -15
- package/dist/view/wrapper/table-element/components/value-display-utils.js +4 -11
- package/dist/view/wrapper/table-element/components/vertical-scrollbar/index.js +6 -13
- package/dist/view/wrapper/table-element/index.js +18 -26
- package/dist/view/wrapper/treemap.js +39 -57
- package/dist/view/wrapper/trend.js +41 -48
- package/package.json +1 -1
|
@@ -1,45 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var _TextFormatter2 = _interopRequireDefault(require("dtable-ui-component/lib/TextFormatter"));
|
|
31
|
-
var _toaster2 = _interopRequireDefault(require("dtable-ui-component/lib/toaster"));
|
|
32
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
33
|
-
var _dtableUtils = require("dtable-utils");
|
|
34
|
-
var _intl = _interopRequireDefault(require("../../../../intl"));
|
|
35
|
-
var _formulaFormatter = _interopRequireDefault(require("./formatters/formula-formatter"));
|
|
36
|
-
var _linkFormatter = _interopRequireDefault(require("./formatters/link-formatter"));
|
|
37
|
-
var _index = _interopRequireDefault(require("./formatters/FileFormatter/index"));
|
|
38
|
-
var _utils = require("./utils");
|
|
1
|
+
import _ButtonFormatter from "dtable-ui-component/lib/ButtonFormatter";
|
|
2
|
+
import _RateFormatter from "dtable-ui-component/lib/RateFormatter";
|
|
3
|
+
import _DurationFormatter from "dtable-ui-component/lib/DurationFormatter";
|
|
4
|
+
import _EmailFormatter from "dtable-ui-component/lib/EmailFormatter";
|
|
5
|
+
import _UrlFormatter from "dtable-ui-component/lib/UrlFormatter";
|
|
6
|
+
import _AutoNumberFormatter from "dtable-ui-component/lib/AutoNumberFormatter";
|
|
7
|
+
import _LastModifierFormatter from "dtable-ui-component/lib/LastModifierFormatter";
|
|
8
|
+
import _CreatorFormatter from "dtable-ui-component/lib/CreatorFormatter";
|
|
9
|
+
import _MTimeFormatter from "dtable-ui-component/lib/MTimeFormatter";
|
|
10
|
+
import _CTimeFormatter from "dtable-ui-component/lib/CTimeFormatter";
|
|
11
|
+
import _CheckboxFormatter from "dtable-ui-component/lib/CheckboxFormatter";
|
|
12
|
+
import _DepartmentSingleSelectFormatter from "dtable-ui-component/lib/DepartmentSingleSelectFormatter";
|
|
13
|
+
import _SingleSelectFormatter from "dtable-ui-component/lib/SingleSelectFormatter";
|
|
14
|
+
import _MultipleSelectFormatter from "dtable-ui-component/lib/MultipleSelectFormatter";
|
|
15
|
+
import _DateFormatter from "dtable-ui-component/lib/DateFormatter";
|
|
16
|
+
import _NumberFormatter from "dtable-ui-component/lib/NumberFormatter";
|
|
17
|
+
import _GeolocationFormatter from "dtable-ui-component/lib/GeolocationFormatter";
|
|
18
|
+
import _ImageFormatter from "dtable-ui-component/lib/ImageFormatter";
|
|
19
|
+
import _LongTextFormatter from "dtable-ui-component/lib/LongTextFormatter";
|
|
20
|
+
import _CollaboratorFormatter from "dtable-ui-component/lib/CollaboratorFormatter";
|
|
21
|
+
import _PhoneNumberLink from "dtable-ui-component/lib/PhoneNumberLink";
|
|
22
|
+
import _TextFormatter from "dtable-ui-component/lib/TextFormatter";
|
|
23
|
+
import _toaster from "dtable-ui-component/lib/toaster";
|
|
24
|
+
import React, { Fragment } from 'react';
|
|
25
|
+
import { CellType, checkIsDisplayAsPhoneNumberColumn, isEmpty } from 'dtable-utils';
|
|
26
|
+
import intl from '../../../../intl';
|
|
27
|
+
import DtableFormulaFormatter from './formatters/formula-formatter';
|
|
28
|
+
import LinkFormatter from './formatters/link-formatter';
|
|
29
|
+
import FileFormatter from './formatters/FileFormatter/index';
|
|
39
30
|
// import UrlFormatter from './formatters/UrlFormatter/index';
|
|
40
31
|
// import EmailFormatter from './formatters/EmailFormatter/index';
|
|
41
|
-
|
|
42
|
-
class Formatter extends
|
|
32
|
+
import { getTrimmedString, getValidUrl, openUrlLink } from './utils';
|
|
33
|
+
class Formatter extends React.Component {
|
|
43
34
|
constructor() {
|
|
44
35
|
super(...arguments);
|
|
45
36
|
this.renderEmptyFormatter = () => {
|
|
@@ -50,7 +41,7 @@ class Formatter extends _react.default.Component {
|
|
|
50
41
|
component
|
|
51
42
|
} = empty || {};
|
|
52
43
|
if (component) return component;
|
|
53
|
-
return /*#__PURE__*/
|
|
44
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
54
45
|
className: "row-cell-value-empty"
|
|
55
46
|
});
|
|
56
47
|
};
|
|
@@ -60,19 +51,19 @@ class Formatter extends _react.default.Component {
|
|
|
60
51
|
window.location.href = url + '?dl=1';
|
|
61
52
|
};
|
|
62
53
|
this.onUrlClick = url => {
|
|
63
|
-
const vaildUrl =
|
|
54
|
+
const vaildUrl = getValidUrl(url);
|
|
64
55
|
if (url.startsWith('file:///')) {
|
|
65
|
-
|
|
56
|
+
_toaster.danger(intl.get('Open_local_file_is_not_supported'));
|
|
66
57
|
return;
|
|
67
58
|
}
|
|
68
59
|
try {
|
|
69
|
-
|
|
60
|
+
openUrlLink(vaildUrl);
|
|
70
61
|
} catch {
|
|
71
|
-
|
|
62
|
+
_toaster.danger(intl.get('URL_is_invalid'));
|
|
72
63
|
}
|
|
73
64
|
};
|
|
74
65
|
this.onEmailClick = email => {
|
|
75
|
-
window.location.href = `mailto:${
|
|
66
|
+
window.location.href = `mailto:${getTrimmedString(email)}`;
|
|
76
67
|
};
|
|
77
68
|
this.renderFormatter = () => {
|
|
78
69
|
let {
|
|
@@ -88,50 +79,50 @@ class Formatter extends _react.default.Component {
|
|
|
88
79
|
} = column || {};
|
|
89
80
|
const containerClassName = `table-element-${columnType}-formatter`;
|
|
90
81
|
switch (columnType) {
|
|
91
|
-
case
|
|
82
|
+
case CellType.TEXT:
|
|
92
83
|
{
|
|
93
84
|
if (!cellValue) return this.renderEmptyFormatter();
|
|
94
|
-
if (
|
|
95
|
-
return /*#__PURE__*/
|
|
85
|
+
if (checkIsDisplayAsPhoneNumberColumn(column) && !!getTrimmedString(cellValue)) {
|
|
86
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
96
87
|
className: "table-element-link-value-wrapper"
|
|
97
|
-
}, /*#__PURE__*/
|
|
88
|
+
}, /*#__PURE__*/React.createElement(_TextFormatter, {
|
|
98
89
|
value: cellValue,
|
|
99
90
|
containerClassName: "table-element-phone-number-formatter"
|
|
100
|
-
}), /*#__PURE__*/
|
|
101
|
-
phoneNumber:
|
|
91
|
+
}), /*#__PURE__*/React.createElement(_PhoneNumberLink, {
|
|
92
|
+
phoneNumber: getTrimmedString(cellValue),
|
|
102
93
|
className: "table-element-cell-jump-link"
|
|
103
94
|
}));
|
|
104
95
|
}
|
|
105
|
-
return /*#__PURE__*/
|
|
96
|
+
return /*#__PURE__*/React.createElement(_TextFormatter, {
|
|
106
97
|
value: cellValue,
|
|
107
98
|
containerClassName: containerClassName
|
|
108
99
|
});
|
|
109
100
|
}
|
|
110
|
-
case
|
|
101
|
+
case CellType.COLLABORATOR:
|
|
111
102
|
{
|
|
112
103
|
if (!Array.isArray(cellValue) || cellValue.length === 0) return this.renderEmptyFormatter();
|
|
113
104
|
cellValue = cellValue.filter(item => item);
|
|
114
105
|
if (cellValue.length === 0) return this.renderEmptyFormatter();
|
|
115
106
|
this.props.queryUsers(cellValue);
|
|
116
|
-
return /*#__PURE__*/
|
|
107
|
+
return /*#__PURE__*/React.createElement(_CollaboratorFormatter, {
|
|
117
108
|
value: cellValue,
|
|
118
109
|
collaborators: collaborators,
|
|
119
110
|
containerClassName: containerClassName
|
|
120
111
|
});
|
|
121
112
|
}
|
|
122
|
-
case
|
|
113
|
+
case CellType.LONG_TEXT:
|
|
123
114
|
{
|
|
124
115
|
if (!cellValue) return this.renderEmptyFormatter();
|
|
125
|
-
return /*#__PURE__*/
|
|
116
|
+
return /*#__PURE__*/React.createElement(_LongTextFormatter, {
|
|
126
117
|
isSample: !isRowExpand,
|
|
127
118
|
value: cellValue,
|
|
128
119
|
containerClassName: containerClassName
|
|
129
120
|
});
|
|
130
121
|
}
|
|
131
|
-
case
|
|
122
|
+
case CellType.IMAGE:
|
|
132
123
|
{
|
|
133
124
|
if (!cellValue || Array.isArray(cellValue) && cellValue.length === 0) return this.renderEmptyFormatter();
|
|
134
|
-
return /*#__PURE__*/
|
|
125
|
+
return /*#__PURE__*/React.createElement(_ImageFormatter, {
|
|
135
126
|
value: cellValue,
|
|
136
127
|
containerClassName: containerClassName,
|
|
137
128
|
isSample: isSample,
|
|
@@ -140,34 +131,34 @@ class Formatter extends _react.default.Component {
|
|
|
140
131
|
downloadImage: this.downloadImage
|
|
141
132
|
});
|
|
142
133
|
}
|
|
143
|
-
case
|
|
134
|
+
case CellType.FILE:
|
|
144
135
|
{
|
|
145
136
|
if (!cellValue || Array.isArray(cellValue) && cellValue.length === 0) return this.renderEmptyFormatter();
|
|
146
|
-
return /*#__PURE__*/
|
|
137
|
+
return /*#__PURE__*/React.createElement(FileFormatter, {
|
|
147
138
|
value: cellValue,
|
|
148
139
|
containerClassName: containerClassName,
|
|
149
140
|
isSample: isSample
|
|
150
141
|
});
|
|
151
142
|
}
|
|
152
|
-
case
|
|
143
|
+
case CellType.GEOLOCATION:
|
|
153
144
|
{
|
|
154
145
|
if (!cellValue) return this.renderEmptyFormatter();
|
|
155
|
-
return /*#__PURE__*/
|
|
146
|
+
return /*#__PURE__*/React.createElement(_GeolocationFormatter, {
|
|
156
147
|
value: cellValue,
|
|
157
148
|
data: column.data || {},
|
|
158
149
|
containerClassName: containerClassName
|
|
159
150
|
});
|
|
160
151
|
}
|
|
161
|
-
case
|
|
152
|
+
case CellType.NUMBER:
|
|
162
153
|
{
|
|
163
|
-
if (
|
|
164
|
-
return /*#__PURE__*/
|
|
154
|
+
if (isEmpty(cellValue)) return this.renderEmptyFormatter();
|
|
155
|
+
return /*#__PURE__*/React.createElement(_NumberFormatter, {
|
|
165
156
|
value: cellValue,
|
|
166
157
|
data: column.data || {},
|
|
167
158
|
containerClassName: containerClassName
|
|
168
159
|
});
|
|
169
160
|
}
|
|
170
|
-
case
|
|
161
|
+
case CellType.DATE:
|
|
171
162
|
{
|
|
172
163
|
if (!cellValue || typeof cellValue !== 'string') return this.renderEmptyFormatter();
|
|
173
164
|
const {
|
|
@@ -176,13 +167,13 @@ class Formatter extends _react.default.Component {
|
|
|
176
167
|
const {
|
|
177
168
|
format
|
|
178
169
|
} = data || {};
|
|
179
|
-
return /*#__PURE__*/
|
|
170
|
+
return /*#__PURE__*/React.createElement(_DateFormatter, {
|
|
180
171
|
value: cellValue,
|
|
181
172
|
format: format,
|
|
182
173
|
containerClassName: containerClassName
|
|
183
174
|
});
|
|
184
175
|
}
|
|
185
|
-
case
|
|
176
|
+
case CellType.MULTIPLE_SELECT:
|
|
186
177
|
{
|
|
187
178
|
if (!cellValue || cellValue.length === 0) return this.renderEmptyFormatter();
|
|
188
179
|
const {
|
|
@@ -191,13 +182,13 @@ class Formatter extends _react.default.Component {
|
|
|
191
182
|
const {
|
|
192
183
|
options
|
|
193
184
|
} = data || {};
|
|
194
|
-
return /*#__PURE__*/
|
|
185
|
+
return /*#__PURE__*/React.createElement(_MultipleSelectFormatter, {
|
|
195
186
|
value: cellValue,
|
|
196
187
|
options: options || [],
|
|
197
188
|
containerClassName: containerClassName
|
|
198
189
|
});
|
|
199
190
|
}
|
|
200
|
-
case
|
|
191
|
+
case CellType.SINGLE_SELECT:
|
|
201
192
|
{
|
|
202
193
|
if (!cellValue) return this.renderEmptyFormatter();
|
|
203
194
|
const {
|
|
@@ -206,115 +197,115 @@ class Formatter extends _react.default.Component {
|
|
|
206
197
|
const {
|
|
207
198
|
options
|
|
208
199
|
} = data || {};
|
|
209
|
-
return /*#__PURE__*/
|
|
200
|
+
return /*#__PURE__*/React.createElement(_SingleSelectFormatter, {
|
|
210
201
|
value: cellValue,
|
|
211
202
|
options: options || [],
|
|
212
203
|
containerClassName: containerClassName
|
|
213
204
|
});
|
|
214
205
|
}
|
|
215
|
-
case
|
|
206
|
+
case CellType.DEPARTMENT_SINGLE_SELECT:
|
|
216
207
|
{
|
|
217
208
|
if (!cellValue) return this.renderEmptyFormatter();
|
|
218
|
-
return /*#__PURE__*/
|
|
209
|
+
return /*#__PURE__*/React.createElement(_DepartmentSingleSelectFormatter, {
|
|
219
210
|
value: cellValue,
|
|
220
211
|
departments: departments || []
|
|
221
212
|
});
|
|
222
213
|
}
|
|
223
|
-
case
|
|
214
|
+
case CellType.CHECKBOX:
|
|
224
215
|
{
|
|
225
|
-
return /*#__PURE__*/
|
|
216
|
+
return /*#__PURE__*/React.createElement(_CheckboxFormatter, {
|
|
226
217
|
value: cellValue,
|
|
227
218
|
containerClassName: containerClassName
|
|
228
219
|
});
|
|
229
220
|
}
|
|
230
|
-
case
|
|
221
|
+
case CellType.CTIME:
|
|
231
222
|
{
|
|
232
223
|
if (!cellValue) return this.renderEmptyFormatter();
|
|
233
|
-
return /*#__PURE__*/
|
|
224
|
+
return /*#__PURE__*/React.createElement(_CTimeFormatter, {
|
|
234
225
|
value: cellValue,
|
|
235
226
|
containerClassName: containerClassName
|
|
236
227
|
});
|
|
237
228
|
}
|
|
238
|
-
case
|
|
229
|
+
case CellType.MTIME:
|
|
239
230
|
{
|
|
240
231
|
if (!cellValue) return this.renderEmptyFormatter();
|
|
241
|
-
return /*#__PURE__*/
|
|
232
|
+
return /*#__PURE__*/React.createElement(_MTimeFormatter, {
|
|
242
233
|
value: cellValue,
|
|
243
234
|
containerClassName: containerClassName
|
|
244
235
|
});
|
|
245
236
|
}
|
|
246
|
-
case
|
|
237
|
+
case CellType.CREATOR:
|
|
247
238
|
{
|
|
248
239
|
this.props.queryUsers([cellValue]);
|
|
249
|
-
return /*#__PURE__*/
|
|
240
|
+
return /*#__PURE__*/React.createElement(_CreatorFormatter, {
|
|
250
241
|
collaborators: collaborators,
|
|
251
242
|
value: cellValue
|
|
252
243
|
});
|
|
253
244
|
}
|
|
254
|
-
case
|
|
245
|
+
case CellType.LAST_MODIFIER:
|
|
255
246
|
{
|
|
256
247
|
this.props.queryUsers([cellValue]);
|
|
257
|
-
return /*#__PURE__*/
|
|
248
|
+
return /*#__PURE__*/React.createElement(_LastModifierFormatter, {
|
|
258
249
|
collaborators: collaborators,
|
|
259
250
|
value: cellValue
|
|
260
251
|
});
|
|
261
252
|
}
|
|
262
|
-
case
|
|
253
|
+
case CellType.AUTO_NUMBER:
|
|
263
254
|
{
|
|
264
255
|
if (!cellValue) return this.renderEmptyFormatter();
|
|
265
|
-
return /*#__PURE__*/
|
|
256
|
+
return /*#__PURE__*/React.createElement(_AutoNumberFormatter, {
|
|
266
257
|
value: cellValue,
|
|
267
258
|
containerClassName: containerClassName
|
|
268
259
|
});
|
|
269
260
|
}
|
|
270
|
-
case
|
|
261
|
+
case CellType.URL:
|
|
271
262
|
{
|
|
272
263
|
if (!cellValue) return this.renderEmptyFormatter();
|
|
273
|
-
return /*#__PURE__*/
|
|
264
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
274
265
|
onClick: () => this.onUrlClick(cellValue)
|
|
275
|
-
}, /*#__PURE__*/
|
|
266
|
+
}, /*#__PURE__*/React.createElement(_UrlFormatter, {
|
|
276
267
|
value: cellValue,
|
|
277
268
|
containerClassName: containerClassName
|
|
278
269
|
}), ";");
|
|
279
270
|
}
|
|
280
|
-
case
|
|
271
|
+
case CellType.EMAIL:
|
|
281
272
|
{
|
|
282
273
|
if (!cellValue) return this.renderEmptyFormatter();
|
|
283
|
-
return /*#__PURE__*/
|
|
274
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
284
275
|
onClick: () => this.onEmailClick(cellValue)
|
|
285
|
-
}, /*#__PURE__*/
|
|
276
|
+
}, /*#__PURE__*/React.createElement(_EmailFormatter, {
|
|
286
277
|
value: cellValue,
|
|
287
278
|
containerClassName: containerClassName
|
|
288
279
|
}), ";");
|
|
289
280
|
}
|
|
290
|
-
case
|
|
281
|
+
case CellType.DURATION:
|
|
291
282
|
{
|
|
292
283
|
if (!cellValue) return this.renderEmptyFormatter();
|
|
293
|
-
return /*#__PURE__*/
|
|
284
|
+
return /*#__PURE__*/React.createElement(_DurationFormatter, {
|
|
294
285
|
value: cellValue,
|
|
295
286
|
format: column.data.duration_format,
|
|
296
287
|
containerClassName: containerClassName
|
|
297
288
|
});
|
|
298
289
|
}
|
|
299
|
-
case
|
|
290
|
+
case CellType.RATE:
|
|
300
291
|
{
|
|
301
|
-
return /*#__PURE__*/
|
|
292
|
+
return /*#__PURE__*/React.createElement(_RateFormatter, {
|
|
302
293
|
value: cellValue,
|
|
303
294
|
data: column.data || {},
|
|
304
295
|
containerClassName: containerClassName
|
|
305
296
|
});
|
|
306
297
|
}
|
|
307
|
-
case
|
|
298
|
+
case CellType.BUTTON:
|
|
308
299
|
{
|
|
309
|
-
return /*#__PURE__*/
|
|
300
|
+
return /*#__PURE__*/React.createElement(_ButtonFormatter, {
|
|
310
301
|
data: column.data || {},
|
|
311
302
|
containerClassName: containerClassName
|
|
312
303
|
});
|
|
313
304
|
}
|
|
314
|
-
case
|
|
315
|
-
case
|
|
305
|
+
case CellType.FORMULA:
|
|
306
|
+
case CellType.LINK_FORMULA:
|
|
316
307
|
{
|
|
317
|
-
return /*#__PURE__*/
|
|
308
|
+
return /*#__PURE__*/React.createElement(DtableFormulaFormatter, {
|
|
318
309
|
value: cellValue,
|
|
319
310
|
column: column,
|
|
320
311
|
collaborators: collaborators,
|
|
@@ -323,10 +314,10 @@ class Formatter extends _react.default.Component {
|
|
|
323
314
|
renderEmptyFormatter: this.renderEmptyFormatter
|
|
324
315
|
});
|
|
325
316
|
}
|
|
326
|
-
case
|
|
317
|
+
case CellType.LINK:
|
|
327
318
|
{
|
|
328
319
|
if (!Array.isArray(cellValue) || cellValue.length === 0) return this.renderEmptyFormatter();
|
|
329
|
-
return /*#__PURE__*/
|
|
320
|
+
return /*#__PURE__*/React.createElement(LinkFormatter, {
|
|
330
321
|
value: cellValue,
|
|
331
322
|
column: column,
|
|
332
323
|
collaborators: collaborators,
|
|
@@ -343,7 +334,7 @@ class Formatter extends _react.default.Component {
|
|
|
343
334
|
};
|
|
344
335
|
}
|
|
345
336
|
render() {
|
|
346
|
-
return /*#__PURE__*/
|
|
337
|
+
return /*#__PURE__*/React.createElement(Fragment, null, this.renderFormatter());
|
|
347
338
|
}
|
|
348
339
|
}
|
|
349
340
|
Formatter.defaultProps = {
|
|
@@ -351,4 +342,4 @@ Formatter.defaultProps = {
|
|
|
351
342
|
isRowExpand: false,
|
|
352
343
|
queryUsers: () => {}
|
|
353
344
|
};
|
|
354
|
-
|
|
345
|
+
export default Formatter;
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _ImagePreviewerLightbox2 = _interopRequireDefault(require("dtable-ui-component/lib/ImagePreviewerLightbox"));
|
|
10
|
-
var _FileItemFormatter2 = _interopRequireDefault(require("dtable-ui-component/lib/FileItemFormatter"));
|
|
11
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
var _commonUtils = require("../../../../../../utils/common-utils");
|
|
14
|
-
var _context = _interopRequireDefault(require("../../../../../../context"));
|
|
15
|
-
require("./index.css");
|
|
16
|
-
class FileFormatter extends _react.default.PureComponent {
|
|
1
|
+
import _ImagePreviewerLightbox from "dtable-ui-component/lib/ImagePreviewerLightbox";
|
|
2
|
+
import _FileItemFormatter from "dtable-ui-component/lib/FileItemFormatter";
|
|
3
|
+
import React, { Fragment } from 'react';
|
|
4
|
+
import classnames from 'classnames';
|
|
5
|
+
import { imageCheck } from '../../../../../../utils/common-utils';
|
|
6
|
+
import context from '../../../../../../context';
|
|
7
|
+
import './index.css';
|
|
8
|
+
export default class FileFormatter extends React.PureComponent {
|
|
17
9
|
constructor(props) {
|
|
18
10
|
super(props);
|
|
19
11
|
this.getFileItemImageUrlList = value => {
|
|
@@ -25,7 +17,7 @@ class FileFormatter extends _react.default.PureComponent {
|
|
|
25
17
|
} = fileItem;
|
|
26
18
|
let assetFileIndex = typeof url === 'string' ? url.indexOf('/asset') : -1;
|
|
27
19
|
if (assetFileIndex > -1) {
|
|
28
|
-
const isImage =
|
|
20
|
+
const isImage = imageCheck(name);
|
|
29
21
|
if (isImage) {
|
|
30
22
|
fileImageUrlList.push(url);
|
|
31
23
|
}
|
|
@@ -40,7 +32,7 @@ class FileFormatter extends _react.default.PureComponent {
|
|
|
40
32
|
let previewerUrl;
|
|
41
33
|
let assetFileIndex = openFileUrl.indexOf('/asset');
|
|
42
34
|
if (assetFileIndex > -1) {
|
|
43
|
-
if (
|
|
35
|
+
if (imageCheck(fileItem.name)) {
|
|
44
36
|
this.showLargeImage(fileItem.url);
|
|
45
37
|
return;
|
|
46
38
|
}
|
|
@@ -79,9 +71,9 @@ class FileFormatter extends _react.default.PureComponent {
|
|
|
79
71
|
largeImageIndex: -1
|
|
80
72
|
});
|
|
81
73
|
};
|
|
82
|
-
this.server =
|
|
83
|
-
this.workspaceID =
|
|
84
|
-
this.dtableUuid =
|
|
74
|
+
this.server = context.getSetting('server');
|
|
75
|
+
this.workspaceID = context.getSetting('workspaceID');
|
|
76
|
+
this.dtableUuid = context.getSetting('dtableUuid');
|
|
85
77
|
this.state = {
|
|
86
78
|
isShowLargeImage: false,
|
|
87
79
|
largeImageIndex: -1,
|
|
@@ -105,28 +97,28 @@ class FileFormatter extends _react.default.PureComponent {
|
|
|
105
97
|
if (!Array.isArray(value) || value.length === 0) {
|
|
106
98
|
return null;
|
|
107
99
|
}
|
|
108
|
-
let className = (
|
|
100
|
+
let className = classnames('dtable-ui cell-formatter-container file-formatter', containerClassName);
|
|
109
101
|
if (isSample) {
|
|
110
102
|
let item = value[0];
|
|
111
|
-
return /*#__PURE__*/
|
|
103
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
112
104
|
className: className
|
|
113
|
-
}, /*#__PURE__*/
|
|
105
|
+
}, /*#__PURE__*/React.createElement(_FileItemFormatter, {
|
|
114
106
|
file: item
|
|
115
|
-
}), value.length !== 1 && /*#__PURE__*/
|
|
107
|
+
}), value.length !== 1 && /*#__PURE__*/React.createElement("span", {
|
|
116
108
|
className: "file-item-count"
|
|
117
109
|
}, `+${value.length}`));
|
|
118
110
|
}
|
|
119
|
-
return /*#__PURE__*/
|
|
111
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
120
112
|
className: className
|
|
121
113
|
}, value.map((item, index) => {
|
|
122
|
-
return /*#__PURE__*/
|
|
114
|
+
return /*#__PURE__*/React.createElement(Fragment, {
|
|
123
115
|
key: index
|
|
124
|
-
}, /*#__PURE__*/
|
|
116
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
125
117
|
onClick: () => this.openFile(item)
|
|
126
|
-
}, /*#__PURE__*/
|
|
118
|
+
}, /*#__PURE__*/React.createElement(_FileItemFormatter, {
|
|
127
119
|
file: item
|
|
128
120
|
})));
|
|
129
|
-
}), this.state.isShowLargeImage && /*#__PURE__*/
|
|
121
|
+
}), this.state.isShowLargeImage && /*#__PURE__*/React.createElement(_ImagePreviewerLightbox, {
|
|
130
122
|
server: this.server,
|
|
131
123
|
workspaceID: this.workspaceID,
|
|
132
124
|
dtableUuid: this.dtableUuid,
|
|
@@ -139,7 +131,6 @@ class FileFormatter extends _react.default.PureComponent {
|
|
|
139
131
|
}));
|
|
140
132
|
}
|
|
141
133
|
}
|
|
142
|
-
exports.default = FileFormatter;
|
|
143
134
|
FileFormatter.defaultProps = {
|
|
144
135
|
isSample: false,
|
|
145
136
|
value: [],
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _FormulaFormatter2 = _interopRequireDefault(require("dtable-ui-component/lib/FormulaFormatter"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _dtableUtils = require("dtable-utils");
|
|
11
|
-
var _datasetUtils = require("../dataset-utils");
|
|
1
|
+
import _FormulaFormatter from "dtable-ui-component/lib/FormulaFormatter";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CellType, COLLABORATOR_COLUMN_TYPES, FORMULA_RESULT_TYPE } from 'dtable-utils';
|
|
4
|
+
import { convertValueToDtableLongTextValue } from '../dataset-utils';
|
|
12
5
|
function DtableFormulaFormatter(props) {
|
|
13
6
|
const {
|
|
14
7
|
value,
|
|
@@ -25,19 +18,19 @@ function DtableFormulaFormatter(props) {
|
|
|
25
18
|
} = column.data || {};
|
|
26
19
|
let cellValue = value;
|
|
27
20
|
if (Array.isArray(cellValue)) {
|
|
28
|
-
if (array_type ===
|
|
29
|
-
cellValue = cellValue.map(item =>
|
|
21
|
+
if (array_type === CellType.LONG_TEXT) {
|
|
22
|
+
cellValue = cellValue.map(item => convertValueToDtableLongTextValue(item));
|
|
30
23
|
}
|
|
31
24
|
}
|
|
32
|
-
if (result_type ===
|
|
25
|
+
if (result_type === FORMULA_RESULT_TYPE.ARRAY && COLLABORATOR_COLUMN_TYPES.includes(array_type)) {
|
|
33
26
|
// need query user if not loaded
|
|
34
27
|
props.queryUsers(Array.isArray(cellValue) ? cellValue : [cellValue]);
|
|
35
28
|
}
|
|
36
|
-
return /*#__PURE__*/
|
|
29
|
+
return /*#__PURE__*/React.createElement(_FormulaFormatter, {
|
|
37
30
|
value: cellValue,
|
|
38
31
|
column: column,
|
|
39
32
|
collaborators: collaborators,
|
|
40
33
|
containerClassName: containerClassName
|
|
41
34
|
});
|
|
42
35
|
}
|
|
43
|
-
|
|
36
|
+
export default DtableFormulaFormatter;
|