sea-chart 2.0.38 → 2.0.39
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 +15 -8
- package/dist/components/cell-factory/FormatterConfig.js +62 -55
- package/dist/components/cell-factory/SimpleCellFormatter.js +12 -5
- package/dist/components/cell-factory/SingleSelectOption.js +18 -11
- package/dist/components/cell-factory/cell-editor-factory.js +12 -5
- package/dist/components/cell-factory/cell-formatter-factory.js +11 -4
- package/dist/components/cell-factory/link-content.js +38 -30
- package/dist/components/chart-color-selector/color-selector.js +18 -11
- package/dist/components/collaborator/index.js +14 -7
- package/dist/components/color-picker/index.js +19 -12
- package/dist/components/color-popover/color-rules/color-rule.js +34 -26
- package/dist/components/color-popover/color-rules/index.js +15 -7
- package/dist/components/color-popover/color-rules/rule-filters/filter.js +34 -27
- package/dist/components/color-popover/color-rules/rule-filters/index.js +25 -17
- package/dist/components/color-popover/color-rules/rule-filters/number-input.js +17 -9
- package/dist/components/color-popover/color-rules-popover.js +38 -30
- package/dist/components/color-popover/color-selector-popover.js +20 -12
- package/dist/components/color-setting/color-group-selector.js +21 -13
- package/dist/components/common-add-tool/index.js +15 -8
- package/dist/components/data-process-setter/data-setting-header.js +14 -7
- package/dist/components/data-process-setter/hide-column-setter.js +20 -13
- package/dist/components/data-process-setter/index.js +27 -4
- package/dist/components/data-process-setter/sort-setter.js +26 -18
- package/dist/components/draggable/Draggable.js +13 -7
- package/dist/components/drill-down-settings/drill-down-fields-popover/index.js +48 -40
- package/dist/components/drill-down-settings/drill-down-fields-settings/index.js +18 -10
- package/dist/components/drill-down-settings/index.js +18 -11
- package/dist/components/dtable-popover/index.js +20 -13
- package/dist/components/dtable-search-input/index.js +21 -13
- package/dist/components/font-settings/index.js +22 -14
- package/dist/components/goal-line-setting/goal-setting-item.js +14 -6
- package/dist/components/goal-line-setting/index.js +19 -12
- package/dist/components/highlighter/highlighter.js +14 -7
- package/dist/components/icon/index.js +12 -5
- package/dist/components/index.js +48 -7
- package/dist/components/loading/index.js +13 -6
- package/dist/components/number-input/index.js +11 -4
- package/dist/components/pixel-editor/index.js +23 -15
- package/dist/components/popover/hide-column-popover/hide-column-popover-widgets/hide-column-item.js +15 -8
- package/dist/components/popover/hide-column-popover/hide-column-popover.js +34 -26
- package/dist/components/popover/sort-popover/sort-popover-widgets/sort-utils.js +18 -9
- package/dist/components/popover/sort-popover/sort-popover.js +65 -55
- package/dist/components/resize-handle/ResizeHandle.js +13 -6
- package/dist/components/row-card/row-card-header-cell.js +24 -17
- package/dist/components/row-card/row-card-header.js +22 -15
- package/dist/components/row-card/row-card-item.js +43 -35
- package/dist/components/row-card/row-card.js +25 -17
- package/dist/components/statistic-record-dialog/index.js +64 -56
- package/dist/components/tooltip/index.js +21 -14
- package/dist/components/types-dialog/index.js +70 -62
- package/dist/components/types-dialog/use-force-update.js +10 -4
- package/dist/constants/color-rules.js +14 -8
- package/dist/constants/common-constants.js +14 -8
- package/dist/constants/error.js +8 -2
- package/dist/constants/geolocation.js +15 -9
- package/dist/constants/index.js +271 -142
- package/dist/constants/key-codes.js +2 -0
- package/dist/constants/model.js +9 -3
- package/dist/constants/regions.js +8 -3
- package/dist/constants/style.js +12 -6
- package/dist/constants/table.js +7 -1
- package/dist/constants/type-image.js +39 -33
- package/dist/constants/type.js +9 -3
- package/dist/context.js +20 -13
- package/dist/editor/index.js +15 -8
- package/dist/index.js +104 -13
- package/dist/intl.js +17 -10
- package/dist/locale/index.js +23 -16
- package/dist/locale/lang/de.js +7 -1
- package/dist/locale/lang/en.js +7 -1
- package/dist/locale/lang/es.js +7 -1
- package/dist/locale/lang/fr.js +7 -1
- package/dist/locale/lang/pt.js +7 -1
- package/dist/locale/lang/ru.js +7 -1
- package/dist/locale/lang/zh_CN.js +7 -1
- package/dist/model/area-group.js +19 -12
- package/dist/model/area.js +19 -12
- package/dist/model/bar-custom.js +18 -11
- package/dist/model/bar-group.js +19 -12
- package/dist/model/bar-stack.js +17 -10
- package/dist/model/bar.js +18 -11
- package/dist/model/base-model.js +11 -4
- package/dist/model/basic-number-card.js +20 -13
- package/dist/model/chart.js +13 -7
- package/dist/model/combination.js +22 -15
- package/dist/model/compare-bar.js +21 -14
- package/dist/model/completeness-group.js +18 -11
- package/dist/model/completeness.js +17 -10
- package/dist/model/dashboard.js +14 -7
- package/dist/model/funnel.js +21 -14
- package/dist/model/generic-model.js +143 -135
- package/dist/model/heat-map.js +16 -9
- package/dist/model/horizontal-bar.js +18 -11
- package/dist/model/horizontal-group-bar.js +17 -10
- package/dist/model/index.js +93 -69
- package/dist/model/line-group.js +20 -13
- package/dist/model/line.js +19 -12
- package/dist/model/map-bubble.js +19 -12
- package/dist/model/map.js +19 -12
- package/dist/model/mirror.js +20 -13
- package/dist/model/pie.js +19 -12
- package/dist/model/ring.js +19 -12
- package/dist/model/scatter.js +17 -10
- package/dist/model/stacked-horizontal-bar.js +18 -11
- package/dist/model/table-element.js +12 -5
- package/dist/model/table.js +14 -7
- package/dist/model/tree-map.js +14 -7
- package/dist/model/trend.js +18 -11
- package/dist/model/user.js +7 -1
- package/dist/model/world-map-bubble.js +19 -12
- package/dist/model/world-map.js +19 -12
- package/dist/services/map-json.js +17 -11
- package/dist/settings/advance-bar-settings/data-settings.js +44 -36
- package/dist/settings/advance-bar-settings/index.js +20 -3
- package/dist/settings/advance-bar-settings/style-settings.js +71 -63
- package/dist/settings/bar-settings/data-settings.js +47 -39
- package/dist/settings/bar-settings/index.js +20 -3
- package/dist/settings/bar-settings/style-settings.js +57 -49
- package/dist/settings/basic-number-card/data-settings.js +57 -49
- package/dist/settings/basic-number-card/index.js +20 -3
- package/dist/settings/basic-number-card/style-settings.js +27 -19
- package/dist/settings/combination-settings/data-settings.js +63 -55
- package/dist/settings/combination-settings/index.js +20 -3
- package/dist/settings/combination-settings/style-settings.js +73 -65
- package/dist/settings/completeness-settings/callbacks/callbacks.js +27 -16
- package/dist/settings/completeness-settings/data-settings/completion-settings.js +28 -21
- package/dist/settings/completeness-settings/data-settings/data-settings.js +32 -25
- package/dist/settings/completeness-settings/index.js +20 -3
- package/dist/settings/completeness-settings/style-settings.js +26 -19
- package/dist/settings/dashboard-settings/data-settings.js +51 -43
- package/dist/settings/dashboard-settings/index.js +13 -2
- package/dist/settings/data-settings.js +79 -72
- package/dist/settings/funnel-settings/components/dnd-item/dnd-item.js +19 -12
- package/dist/settings/funnel-settings/components/dnd-list.js +23 -15
- package/dist/settings/funnel-settings/components/funnel-label-setting.js +40 -32
- package/dist/settings/funnel-settings/components/funnel-layer-setting.js +28 -20
- package/dist/settings/funnel-settings/data-settings.js +31 -23
- package/dist/settings/funnel-settings/index.js +20 -3
- package/dist/settings/funnel-settings/style-settings.js +19 -11
- package/dist/settings/heat-map-settings/data-settings.js +26 -18
- package/dist/settings/heat-map-settings/index.js +20 -3
- package/dist/settings/heat-map-settings/style-settings.js +26 -18
- package/dist/settings/horizontal-bar-settings/data-settings.js +19 -12
- package/dist/settings/horizontal-bar-settings/index.js +20 -3
- package/dist/settings/horizontal-bar-settings/style-settings.js +19 -12
- package/dist/settings/index.js +70 -52
- package/dist/settings/map-settings/components/location-field-selector.js +17 -10
- package/dist/settings/map-settings/components/map-level-selector.js +18 -11
- package/dist/settings/map-settings/components/map-province-city-selector.js +26 -19
- package/dist/settings/map-settings/index.js +20 -3
- package/dist/settings/map-settings/map-data-settings.js +30 -23
- package/dist/settings/map-settings/map-style-settings.js +35 -27
- package/dist/settings/mirror-settings/data-settings.js +34 -26
- package/dist/settings/mirror-settings/index.js +13 -2
- package/dist/settings/pie-settings/data-settings.js +41 -33
- package/dist/settings/pie-settings/index.js +20 -3
- package/dist/settings/pie-settings/style-settings.js +55 -47
- package/dist/settings/scatter/data-settings.js +34 -27
- package/dist/settings/scatter/index.js +12 -3
- package/dist/settings/stacks-settings/index.js +27 -19
- package/dist/settings/stacks-settings/stack-item-settings.js +27 -19
- package/dist/settings/style-settings.js +73 -65
- package/dist/settings/table-element-settings/components/data-filter.js +38 -30
- package/dist/settings/table-element-settings/data-settings.js +29 -21
- package/dist/settings/table-element-settings/index.js +13 -2
- package/dist/settings/table-settings/data-settings.js +120 -112
- package/dist/settings/table-settings/index.js +13 -2
- package/dist/settings/time-comparison-settings/data-settings.js +51 -43
- package/dist/settings/time-comparison-settings/index.js +20 -3
- package/dist/settings/time-comparison-settings/style-settings.js +50 -42
- package/dist/settings/trend-settings/data-settings.js +32 -24
- package/dist/settings/trend-settings/index.js +20 -3
- package/dist/settings/trend-settings/style-setting.js +27 -19
- package/dist/settings/widgets/basic-summary/index.js +63 -55
- package/dist/settings/widgets/chart-type/index.js +26 -18
- package/dist/settings/widgets/color-settings/index.js +80 -72
- package/dist/settings/widgets/common-data-settings.js +29 -21
- package/dist/settings/widgets/data-filter/index.js +43 -35
- package/dist/settings/widgets/data-sort.js +24 -16
- package/dist/settings/widgets/date-summary-item.js +34 -26
- package/dist/settings/widgets/display-values-settings/index.js +22 -14
- package/dist/settings/widgets/divider/index.js +16 -8
- package/dist/settings/widgets/font-settings/font-color-settings.js +19 -11
- package/dist/settings/widgets/font-settings/font-size-settings.js +22 -14
- package/dist/settings/widgets/font-settings/font-weight-settings.js +25 -17
- package/dist/settings/widgets/font-settings/index.js +27 -4
- package/dist/settings/widgets/group-by.js +59 -51
- package/dist/settings/widgets/min-max-setting.js +18 -10
- package/dist/settings/widgets/mininum-slice-percent.js +18 -10
- package/dist/settings/widgets/numeric-summary-item.js +33 -25
- package/dist/settings/widgets/select-line-type/index.js +17 -10
- package/dist/settings/widgets/select-table/index.js +16 -9
- package/dist/settings/widgets/select-view/index.js +28 -20
- package/dist/settings/widgets/stack.js +22 -14
- package/dist/settings/widgets/summary-method-setting.js +25 -17
- package/dist/settings/widgets/summary-settings.js +82 -74
- package/dist/settings/widgets/switch/index.js +16 -9
- package/dist/settings/widgets/text-horizontal-settings.js +23 -15
- package/dist/settings/widgets/time-picker.js +37 -29
- package/dist/settings/widgets/title-settings/index.js +37 -29
- package/dist/settings/widgets/title-settings/title-text.js +12 -5
- package/dist/settings/widgets/x-axios.js +1 -0
- package/dist/settings/widgets/y-axis-group-settings.js +72 -64
- package/dist/utils/cell-format-utils.js +27 -17
- package/dist/utils/cell-value-utils.js +11 -4
- package/dist/utils/chart-utils/base-utils.js +332 -324
- package/dist/utils/chart-utils/index.js +41 -28
- package/dist/utils/chart-utils/original-data-utils/basic-chart-calculator.js +84 -77
- package/dist/utils/chart-utils/original-data-utils/card-calculator.js +20 -13
- package/dist/utils/chart-utils/original-data-utils/combination-calculator.js +52 -45
- package/dist/utils/chart-utils/original-data-utils/compare-bar-chart-calculator.js +28 -21
- package/dist/utils/chart-utils/original-data-utils/completeness-calculator.js +40 -33
- package/dist/utils/chart-utils/original-data-utils/dashboard-calculator.js +23 -16
- package/dist/utils/chart-utils/original-data-utils/index.js +57 -50
- package/dist/utils/chart-utils/original-data-utils/mirror-calculator.js +26 -19
- package/dist/utils/chart-utils/original-data-utils/pivot-table-calculator.js +96 -90
- package/dist/utils/chart-utils/original-data-utils/scatter-calculator.js +26 -19
- package/dist/utils/chart-utils/original-data-utils/trend-calculator.js +38 -31
- package/dist/utils/chart-utils/sql-statistics-utils.js +237 -229
- package/dist/utils/chart.js +17 -9
- package/dist/utils/collaborator-manager.js +9 -3
- package/dist/utils/collaborator-utils.js +31 -19
- package/dist/utils/collaborator.js +15 -6
- package/dist/utils/color-utils.js +29 -18
- package/dist/utils/column-utils.js +104 -77
- package/dist/utils/common-utils.js +53 -28
- package/dist/utils/concurrency-manager.js +7 -1
- package/dist/utils/contexts.js +12 -5
- package/dist/utils/date-translate.js +20 -12
- package/dist/utils/digital-sign-utils.js +14 -7
- package/dist/utils/event-bus.js +7 -1
- package/dist/utils/hotkey.js +11 -5
- package/dist/utils/index.js +221 -54
- package/dist/utils/key-generator.js +9 -2
- package/dist/utils/map.js +31 -22
- package/dist/utils/object-utils.js +8 -2
- package/dist/utils/options-utils.js +18 -10
- package/dist/utils/row-record-utils.js +178 -166
- package/dist/utils/row-utils.js +38 -27
- package/dist/utils/search.js +32 -24
- package/dist/utils/sql/chart-data-sql.js +112 -106
- package/dist/utils/sql/column-2-sql-column.js +168 -158
- package/dist/utils/sql/index.js +27 -3
- package/dist/utils/trend-utils.js +47 -39
- package/dist/view/index.js +96 -90
- package/dist/view/title/index.js +24 -16
- package/dist/view/wrapper/area-group.js +53 -45
- package/dist/view/wrapper/area.js +51 -43
- package/dist/view/wrapper/bar-compare.js +46 -38
- package/dist/view/wrapper/bar-custom-stack.js +47 -39
- package/dist/view/wrapper/bar-group.js +53 -45
- package/dist/view/wrapper/bar-stack.js +56 -48
- package/dist/view/wrapper/bar.js +48 -40
- package/dist/view/wrapper/basic-number-card.js +34 -26
- package/dist/view/wrapper/chart-component.js +131 -123
- package/dist/view/wrapper/combination.js +63 -55
- package/dist/view/wrapper/completeness-group.js +48 -40
- package/dist/view/wrapper/completeness.js +44 -36
- package/dist/view/wrapper/dashboard.js +44 -39
- package/dist/view/wrapper/funnel.js +43 -40
- package/dist/view/wrapper/heat-map.js +70 -62
- package/dist/view/wrapper/horizontal-bar-group.js +60 -52
- package/dist/view/wrapper/horizontal-bar-stack.js +55 -47
- package/dist/view/wrapper/horizontal-bar.js +49 -41
- package/dist/view/wrapper/index.js +115 -107
- package/dist/view/wrapper/line-group.js +51 -43
- package/dist/view/wrapper/line.js +50 -42
- package/dist/view/wrapper/map-bubble.js +48 -40
- package/dist/view/wrapper/map-world-bubble.js +47 -39
- package/dist/view/wrapper/map-world.js +49 -41
- package/dist/view/wrapper/map.js +50 -42
- package/dist/view/wrapper/mirror.js +49 -41
- package/dist/view/wrapper/pie.js +52 -44
- package/dist/view/wrapper/ring.js +57 -49
- package/dist/view/wrapper/scatter.js +50 -42
- package/dist/view/wrapper/table/index.js +22 -14
- package/dist/view/wrapper/table/one-dimension-table-no-numeric-columns.js +57 -49
- package/dist/view/wrapper/table/one-dimension-table-with-numeric-columns.js +61 -53
- package/dist/view/wrapper/table/pivot-table-display-name.js +90 -82
- package/dist/view/wrapper/table/two-dimension-table.js +93 -85
- package/dist/view/wrapper/table-element/components/dataset-utils.js +36 -23
- package/dist/view/wrapper/table-element/components/formatter.js +99 -90
- package/dist/view/wrapper/table-element/components/formatters/FileFormatter/index.js +32 -23
- package/dist/view/wrapper/table-element/components/formatters/formula-formatter.js +16 -9
- package/dist/view/wrapper/table-element/components/formatters/link-formatter.js +97 -90
- package/dist/view/wrapper/table-element/components/formula-formatter.js +16 -9
- package/dist/view/wrapper/table-element/components/link-formatter.js +97 -90
- package/dist/view/wrapper/table-element/components/record.js +20 -13
- package/dist/view/wrapper/table-element/components/records-body.js +17 -9
- package/dist/view/wrapper/table-element/components/records-header/index.js +15 -7
- package/dist/view/wrapper/table-element/components/records-header/records-header-cell.js +16 -8
- package/dist/view/wrapper/table-element/components/records.js +33 -25
- package/dist/view/wrapper/table-element/components/resize-column-handle/resize-column-handle.js +12 -5
- package/dist/view/wrapper/table-element/components/utils.js +16 -6
- package/dist/view/wrapper/table-element/components/value-display-utils.js +11 -4
- package/dist/view/wrapper/table-element/components/vertical-scrollbar/index.js +13 -6
- package/dist/view/wrapper/table-element/index.js +26 -18
- package/dist/view/wrapper/treemap.js +46 -38
- package/dist/view/wrapper/trend.js +66 -58
- package/package.json +1 -1
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
var _dtableUtils = require("dtable-utils");
|
|
12
|
+
var _utils = require("../../../utils");
|
|
13
|
+
var _intl = _interopRequireDefault(require("../../../intl"));
|
|
14
|
+
var _constants = require("../../../constants");
|
|
15
|
+
var _pivotTableDisplayName = _interopRequireDefault(require("./pivot-table-display-name"));
|
|
16
|
+
class TwoDimensionTable extends _react.PureComponent {
|
|
9
17
|
constructor() {
|
|
10
18
|
super(...arguments);
|
|
11
19
|
this.getCells = row => {
|
|
@@ -58,10 +66,10 @@ class TwoDimensionTable extends PureComponent {
|
|
|
58
66
|
cellIdx: selectedCellIdx
|
|
59
67
|
} = selectedCell || {};
|
|
60
68
|
const isSelectedTotalCellBottom = selectRowIdx === 0 && selectedCellIdx === (Array.isArray(pivot_columns) ? pivot_columns.length : 0);
|
|
61
|
-
const isCollaborator = columnGroupbyColumn.type === CellType.COLLABORATOR;
|
|
62
|
-
return /*#__PURE__*/
|
|
69
|
+
const isCollaborator = columnGroupbyColumn.type === _dtableUtils.CellType.COLLABORATOR;
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement("thead", {
|
|
63
71
|
className: "seatable-table-header-sm"
|
|
64
|
-
}, /*#__PURE__*/
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", {
|
|
65
73
|
className: "pivot-table-header"
|
|
66
74
|
}, !rowGroupName && groupName), Array.isArray(pivot_columns) && pivot_columns.map((item, index) => {
|
|
67
75
|
let {
|
|
@@ -71,40 +79,40 @@ class TwoDimensionTable extends PureComponent {
|
|
|
71
79
|
original_key = [original_key];
|
|
72
80
|
}
|
|
73
81
|
let isSelectedHeaderBottom = selectRowIdx === 0 && selectedCellIdx === index;
|
|
74
|
-
return /*#__PURE__*/
|
|
75
|
-
className:
|
|
82
|
+
return /*#__PURE__*/_react.default.createElement("th", {
|
|
83
|
+
className: (0, _classnames.default)('pivot-table-header', {
|
|
76
84
|
'selected-pivot-cell-top': isSelectedHeaderBottom
|
|
77
85
|
}),
|
|
78
|
-
key:
|
|
79
|
-
}, /*#__PURE__*/
|
|
86
|
+
key: "pivot-column-".concat(index)
|
|
87
|
+
}, /*#__PURE__*/_react.default.createElement(_pivotTableDisplayName.default, {
|
|
80
88
|
value: original_key,
|
|
81
89
|
column: columnGroupbyColumn || {},
|
|
82
90
|
rowData: item,
|
|
83
91
|
globalTheme: globalTheme
|
|
84
92
|
}));
|
|
85
|
-
}), display_total && /*#__PURE__*/
|
|
86
|
-
className:
|
|
93
|
+
}), display_total && /*#__PURE__*/_react.default.createElement("th", {
|
|
94
|
+
className: (0, _classnames.default)('pivot-table-header', {
|
|
87
95
|
'selected-pivot-cell-top': isSelectedTotalCellBottom
|
|
88
96
|
})
|
|
89
|
-
}, /*#__PURE__*/
|
|
97
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, _intl.default.get('Total')))), isSingleNumericColumn === 'false' && summary_columns && summary_columns.length && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", {
|
|
90
98
|
className: "pivot-table-header"
|
|
91
99
|
}), Array.isArray(pivot_columns) && pivot_columns.map((item, index) => {
|
|
92
|
-
return /*#__PURE__*/
|
|
93
|
-
key:
|
|
100
|
+
return /*#__PURE__*/_react.default.createElement("th", {
|
|
101
|
+
key: "pivot-column-".concat(index),
|
|
94
102
|
className: "pivot-table-header summary-columns-header"
|
|
95
|
-
}, /*#__PURE__*/
|
|
103
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
96
104
|
className: "pivot-table-header-summary-columns-container"
|
|
97
105
|
}, summary_columns.map((column, idx) => {
|
|
98
|
-
return /*#__PURE__*/
|
|
99
|
-
className:
|
|
100
|
-
key:
|
|
101
|
-
}, /*#__PURE__*/
|
|
106
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
107
|
+
className: (0, _classnames.default)('pivot-table-header'),
|
|
108
|
+
key: "pivot-summary-column-".concat(idx)
|
|
109
|
+
}, /*#__PURE__*/_react.default.createElement(_pivotTableDisplayName.default, {
|
|
102
110
|
value: column.name,
|
|
103
111
|
column: column || {},
|
|
104
112
|
globalTheme: globalTheme
|
|
105
113
|
}));
|
|
106
114
|
})));
|
|
107
|
-
}), display_total && /*#__PURE__*/
|
|
115
|
+
}), display_total && /*#__PURE__*/_react.default.createElement("th", {
|
|
108
116
|
className: "pivot-table-header"
|
|
109
117
|
})));
|
|
110
118
|
};
|
|
@@ -133,23 +141,23 @@ class TwoDimensionTable extends PureComponent {
|
|
|
133
141
|
this.renderEmpty = (summaryColumns, cellIdx) => {
|
|
134
142
|
if (summaryColumns && (summaryColumns === null || summaryColumns === void 0 ? void 0 : summaryColumns.length) !== 0) {
|
|
135
143
|
return summaryColumns.map(item => {
|
|
136
|
-
return /*#__PURE__*/
|
|
137
|
-
key:
|
|
138
|
-
className:
|
|
144
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
145
|
+
key: "table-cell-".concat(item === null || item === void 0 ? void 0 : item.key),
|
|
146
|
+
className: (0, _classnames.default)('pivot-cell', {
|
|
139
147
|
'pivot-empty-cell': true
|
|
140
148
|
})
|
|
141
|
-
}, /*#__PURE__*/
|
|
149
|
+
}, /*#__PURE__*/_react.default.createElement("i", null));
|
|
142
150
|
});
|
|
143
151
|
}
|
|
144
|
-
return /*#__PURE__*/
|
|
145
|
-
key:
|
|
146
|
-
className:
|
|
152
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
153
|
+
key: "table-cell-".concat(cellIdx),
|
|
154
|
+
className: (0, _classnames.default)('pivot-cell', {
|
|
147
155
|
'pivot-empty-cell': true
|
|
148
156
|
})
|
|
149
|
-
}, /*#__PURE__*/
|
|
157
|
+
}, /*#__PURE__*/_react.default.createElement("i", null));
|
|
150
158
|
};
|
|
151
159
|
this.getRowTotal = (rowTotal, value) => {
|
|
152
|
-
if (value && isNumber(value)) {
|
|
160
|
+
if (value && (0, _dtableUtils.isNumber)(value)) {
|
|
153
161
|
return rowTotal + value;
|
|
154
162
|
}
|
|
155
163
|
return rowTotal;
|
|
@@ -184,12 +192,12 @@ class TwoDimensionTable extends PureComponent {
|
|
|
184
192
|
let pivotColumnCells = [];
|
|
185
193
|
const isSelectRowTotalCellRight = selectRowIdx === pivotRowsLen && selectedCellIdx === 0;
|
|
186
194
|
const isSelectTotal = selectRowIdx === pivotRowsLen && selectedCellIdx === (Array.isArray(pivot_columns) ? pivot_columns.length : 0);
|
|
187
|
-
const tableTotalDisplayValue = BaseUtils.getSummaryValueDisplayString(summaryColumn, pivot_table_total, summaryMethod);
|
|
188
|
-
const isValidTableTotalDisplayValue = BaseUtils.isValidValue(tableTotalDisplayValue, display_empty);
|
|
189
|
-
const isCount = summary_type === CHART_SUMMARY_TYPE.COUNT;
|
|
195
|
+
const tableTotalDisplayValue = _utils.BaseUtils.getSummaryValueDisplayString(summaryColumn, pivot_table_total, summaryMethod);
|
|
196
|
+
const isValidTableTotalDisplayValue = _utils.BaseUtils.isValidValue(tableTotalDisplayValue, display_empty);
|
|
197
|
+
const isCount = summary_type === _constants.CHART_SUMMARY_TYPE.COUNT;
|
|
190
198
|
this.isCount = isCount;
|
|
191
|
-
const isCollaborator = groupbyColumn.type === CellType.COLLABORATOR;
|
|
192
|
-
return /*#__PURE__*/
|
|
199
|
+
const isCollaborator = groupbyColumn.type === _dtableUtils.CellType.COLLABORATOR;
|
|
200
|
+
return /*#__PURE__*/_react.default.createElement("tbody", null, pivotRowsLen > 0 && pivot_rows.map((rowItem, rowIdx) => {
|
|
193
201
|
let {
|
|
194
202
|
name,
|
|
195
203
|
total
|
|
@@ -207,13 +215,13 @@ class TwoDimensionTable extends PureComponent {
|
|
|
207
215
|
pivotColumnCells[rowIdx] = rowItem.rows || [];
|
|
208
216
|
}
|
|
209
217
|
let rowTotal = 0;
|
|
210
|
-
return /*#__PURE__*/
|
|
218
|
+
return /*#__PURE__*/_react.default.createElement("tr", {
|
|
211
219
|
key: 'table-row' + rowIdx
|
|
212
|
-
}, /*#__PURE__*/
|
|
213
|
-
className:
|
|
220
|
+
}, /*#__PURE__*/_react.default.createElement("td", {
|
|
221
|
+
className: (0, _classnames.default)('pivot-row-name', {
|
|
214
222
|
'selected-pivot-cell-left': isSelectedRowNameRight
|
|
215
223
|
})
|
|
216
|
-
}, /*#__PURE__*/
|
|
224
|
+
}, /*#__PURE__*/_react.default.createElement(_pivotTableDisplayName.default, {
|
|
217
225
|
value: name,
|
|
218
226
|
column: groupbyColumn,
|
|
219
227
|
rowData: rowItem,
|
|
@@ -227,7 +235,7 @@ class TwoDimensionTable extends PureComponent {
|
|
|
227
235
|
} = c;
|
|
228
236
|
if (isCount) {
|
|
229
237
|
const displayValue = total;
|
|
230
|
-
const isValidDisplayValue = BaseUtils.isValidValue(displayValue, display_empty);
|
|
238
|
+
const isValidDisplayValue = _utils.BaseUtils.isValidValue(displayValue, display_empty);
|
|
231
239
|
rowTotal = this.getRowTotal(rowTotal, displayValue);
|
|
232
240
|
if (c && Array.isArray(c.rows) && c.rows.length > 0) {
|
|
233
241
|
pivotRowCells.push(...c.rows);
|
|
@@ -237,14 +245,14 @@ class TwoDimensionTable extends PureComponent {
|
|
|
237
245
|
pivotColumnCells[cellIdx] = [...c.rows];
|
|
238
246
|
}
|
|
239
247
|
}
|
|
240
|
-
return /*#__PURE__*/
|
|
241
|
-
className:
|
|
248
|
+
return /*#__PURE__*/_react.default.createElement("td", {
|
|
249
|
+
className: (0, _classnames.default)('pivot-cell', {
|
|
242
250
|
'pivot-empty-cell': !isValidDisplayValue,
|
|
243
251
|
'selected-pivot-cell': isSelectedCell,
|
|
244
252
|
'selected-pivot-cell-top': isSelectedCellTop,
|
|
245
253
|
'selected-pivot-cell-left': isSelectedCellLeft
|
|
246
254
|
}),
|
|
247
|
-
key:
|
|
255
|
+
key: "table-cell-".concat(cellIdx),
|
|
248
256
|
onClick: () => this.toggleRecords({
|
|
249
257
|
...c,
|
|
250
258
|
name: rowItem === null || rowItem === void 0 ? void 0 : rowItem.name
|
|
@@ -253,39 +261,39 @@ class TwoDimensionTable extends PureComponent {
|
|
|
253
261
|
cellIdx
|
|
254
262
|
}),
|
|
255
263
|
title: displayValue
|
|
256
|
-
}, isValidDisplayValue ? displayValue : /*#__PURE__*/
|
|
257
|
-
className:
|
|
264
|
+
}, isValidDisplayValue ? displayValue : /*#__PURE__*/_react.default.createElement("i", null), /*#__PURE__*/_react.default.createElement("span", {
|
|
265
|
+
className: (0, _classnames.default)({
|
|
258
266
|
'selected-pivot-cell-border': isSelectedCell
|
|
259
267
|
})
|
|
260
268
|
}));
|
|
261
269
|
}
|
|
262
|
-
return /*#__PURE__*/
|
|
263
|
-
className:
|
|
264
|
-
key:
|
|
265
|
-
}, /*#__PURE__*/
|
|
266
|
-
className:
|
|
270
|
+
return /*#__PURE__*/_react.default.createElement("td", {
|
|
271
|
+
className: (0, _classnames.default)('pivot-cell'),
|
|
272
|
+
key: "table-cell-".concat(cellIdx)
|
|
273
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
274
|
+
className: (0, _classnames.default)('pivot-cells-container')
|
|
267
275
|
}, total && total.map && total.map((summaryCell, idx) => {
|
|
268
276
|
const summaryCellColumnKey = summaryCell[2];
|
|
269
277
|
const summaryCellColumn = summaryColumns === null || summaryColumns === void 0 ? void 0 : summaryColumns.find(item => item.key === summaryCellColumnKey);
|
|
270
|
-
const displayValue = BaseUtils.getSummaryValueDisplayString(summaryCellColumn, summaryCell[1], summaryMethod);
|
|
271
|
-
const isValidDisplayValue = BaseUtils.isValidValue(displayValue, display_empty);
|
|
278
|
+
const displayValue = _utils.BaseUtils.getSummaryValueDisplayString(summaryCellColumn, summaryCell[1], summaryMethod);
|
|
279
|
+
const isValidDisplayValue = _utils.BaseUtils.isValidValue(displayValue, display_empty);
|
|
272
280
|
rowTotal = this.getRowTotal(rowTotal, summaryCell[1]);
|
|
273
|
-
return /*#__PURE__*/
|
|
274
|
-
key:
|
|
275
|
-
className:
|
|
281
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
282
|
+
key: "table-cell-".concat(cellIdx, "-").concat(idx),
|
|
283
|
+
className: (0, _classnames.default)('pivot-cell', {
|
|
276
284
|
'pivot-empty-cell': !isValidDisplayValue,
|
|
277
285
|
'selected-pivot-cell': isSelectedCell,
|
|
278
286
|
'selected-pivot-cell-top': isSelectedCellTop,
|
|
279
287
|
'selected-pivot-cell-left': isSelectedCellLeft
|
|
280
288
|
})
|
|
281
|
-
}, isValidDisplayValue ? displayValue : /*#__PURE__*/
|
|
282
|
-
className:
|
|
289
|
+
}, isValidDisplayValue ? displayValue : /*#__PURE__*/_react.default.createElement("i", null), /*#__PURE__*/_react.default.createElement("span", {
|
|
290
|
+
className: (0, _classnames.default)({
|
|
283
291
|
'selected-pivot-cell-border': isSelectedCell
|
|
284
292
|
})
|
|
285
293
|
}));
|
|
286
294
|
}), !total && !(typeof total === 'number') && this.renderEmpty(summaryColumns, cellIdx)));
|
|
287
|
-
}), display_total && /*#__PURE__*/
|
|
288
|
-
className:
|
|
295
|
+
}), display_total && /*#__PURE__*/_react.default.createElement("td", {
|
|
296
|
+
className: (0, _classnames.default)('pivot-cell', {
|
|
289
297
|
'selected-pivot-cell': isSelectedTotalCell,
|
|
290
298
|
'selected-pivot-cell-top': isSelectedTotalCellTop,
|
|
291
299
|
'selected-pivot-cell-left': isSelectedTotalCellLeft
|
|
@@ -299,29 +307,29 @@ class TwoDimensionTable extends PureComponent {
|
|
|
299
307
|
cellIdx: cells.length
|
|
300
308
|
}),
|
|
301
309
|
title: rowTotal
|
|
302
|
-
}, BaseUtils.isValidValue(rowTotal, display_empty) ? BaseUtils.getSummaryValueDisplayString(summaryColumn, rowTotal, summaryMethod) : /*#__PURE__*/
|
|
303
|
-
className:
|
|
310
|
+
}, _utils.BaseUtils.isValidValue(rowTotal, display_empty) ? _utils.BaseUtils.getSummaryValueDisplayString(summaryColumn, rowTotal, summaryMethod) : /*#__PURE__*/_react.default.createElement("i", null), /*#__PURE__*/_react.default.createElement("span", {
|
|
311
|
+
className: (0, _classnames.default)({
|
|
304
312
|
'selected-pivot-cell-border': isSelectedTotalCell
|
|
305
313
|
})
|
|
306
314
|
})));
|
|
307
|
-
}), display_total && /*#__PURE__*/
|
|
308
|
-
className:
|
|
315
|
+
}), display_total && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", {
|
|
316
|
+
className: (0, _classnames.default)('pivot-column-total', {
|
|
309
317
|
'selected-pivot-cell-left': isSelectRowTotalCellRight
|
|
310
318
|
})
|
|
311
|
-
}, /*#__PURE__*/
|
|
319
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, _intl.default.get('Total'))), Array.isArray(pivot_columns) && pivot_columns.map((c, index) => {
|
|
312
320
|
const pivotColumnCell = pivotColumnCells[index];
|
|
313
321
|
const isSelectRowTotalCell = selectRowIdx === pivot_rows.length && selectedCellIdx === index;
|
|
314
322
|
const isSelectRowTotalCellLeft = selectRowIdx === pivot_rows.length && selectedCellIdx - 1 === index;
|
|
315
323
|
const pivotColumnTotal = pivot_columns_total[c.key];
|
|
316
|
-
const totalDisplayValue = BaseUtils.getSummaryValueDisplayString(summaryColumn, pivotColumnTotal, summaryMethod);
|
|
317
|
-
const isValidTotalDisplayValue = BaseUtils.isValidValue(totalDisplayValue, display_empty);
|
|
318
|
-
return /*#__PURE__*/
|
|
319
|
-
className:
|
|
324
|
+
const totalDisplayValue = _utils.BaseUtils.getSummaryValueDisplayString(summaryColumn, pivotColumnTotal, summaryMethod);
|
|
325
|
+
const isValidTotalDisplayValue = _utils.BaseUtils.isValidValue(totalDisplayValue, display_empty);
|
|
326
|
+
return /*#__PURE__*/_react.default.createElement("td", {
|
|
327
|
+
className: (0, _classnames.default)('pivot-cell', {
|
|
320
328
|
'pivot-empty-cell': !isValidTotalDisplayValue,
|
|
321
329
|
'selected-pivot-cell': isSelectRowTotalCell,
|
|
322
330
|
'selected-pivot-cell-left': isSelectRowTotalCellLeft
|
|
323
331
|
}),
|
|
324
|
-
key:
|
|
332
|
+
key: "total-cell-".concat(index),
|
|
325
333
|
onClick: () => this.toggleRecords({
|
|
326
334
|
rows: pivotColumnCell,
|
|
327
335
|
total: pivot_columns_total[c.key]
|
|
@@ -330,13 +338,13 @@ class TwoDimensionTable extends PureComponent {
|
|
|
330
338
|
cellIdx: index
|
|
331
339
|
}),
|
|
332
340
|
title: totalDisplayValue
|
|
333
|
-
}, isValidTotalDisplayValue ? totalDisplayValue : /*#__PURE__*/
|
|
334
|
-
className:
|
|
341
|
+
}, isValidTotalDisplayValue ? totalDisplayValue : /*#__PURE__*/_react.default.createElement("i", null), /*#__PURE__*/_react.default.createElement("span", {
|
|
342
|
+
className: (0, _classnames.default)({
|
|
335
343
|
'selected-pivot-cell-border': isSelectRowTotalCell
|
|
336
344
|
})
|
|
337
345
|
}));
|
|
338
|
-
}), /*#__PURE__*/
|
|
339
|
-
className:
|
|
346
|
+
}), /*#__PURE__*/_react.default.createElement("td", {
|
|
347
|
+
className: (0, _classnames.default)('pivot-cell pivot-table-total', {
|
|
340
348
|
'pivot-empty-cell': !isValidTableTotalDisplayValue,
|
|
341
349
|
'selected-pivot-cell': isSelectTotal
|
|
342
350
|
}),
|
|
@@ -344,8 +352,8 @@ class TwoDimensionTable extends PureComponent {
|
|
|
344
352
|
rowIdx: pivot_rows.length,
|
|
345
353
|
cellIdx: Array.isArray(pivot_columns) ? pivot_columns.length : 0
|
|
346
354
|
})
|
|
347
|
-
}, isValidTableTotalDisplayValue ? tableTotalDisplayValue : /*#__PURE__*/
|
|
348
|
-
className:
|
|
355
|
+
}, isValidTableTotalDisplayValue ? tableTotalDisplayValue : /*#__PURE__*/_react.default.createElement("i", null), /*#__PURE__*/_react.default.createElement("span", {
|
|
356
|
+
className: (0, _classnames.default)({
|
|
349
357
|
'selected-pivot-cell-border': isSelectTotal
|
|
350
358
|
})
|
|
351
359
|
}))));
|
|
@@ -358,16 +366,16 @@ class TwoDimensionTable extends PureComponent {
|
|
|
358
366
|
globalTheme
|
|
359
367
|
} = this.props;
|
|
360
368
|
if (!groupbyColumn) return '';
|
|
361
|
-
return /*#__PURE__*/
|
|
369
|
+
return /*#__PURE__*/_react.default.createElement("table", {
|
|
362
370
|
className: "sea-chart-pivot-table",
|
|
363
371
|
style: {
|
|
364
|
-
color: CHART_THEME_COLOR[globalTheme].pivotTextColor
|
|
372
|
+
color: _constants.CHART_THEME_COLOR[globalTheme].pivotTextColor
|
|
365
373
|
}
|
|
366
|
-
}, /*#__PURE__*/
|
|
374
|
+
}, /*#__PURE__*/_react.default.createElement("caption", {
|
|
367
375
|
className: "column-title"
|
|
368
|
-
}, columnGroupbyColumn.name), /*#__PURE__*/
|
|
376
|
+
}, columnGroupbyColumn.name), /*#__PURE__*/_react.default.createElement("caption", {
|
|
369
377
|
className: "row-title"
|
|
370
378
|
}, groupbyColumn.name), this.renderHeader(), this.renderRows());
|
|
371
379
|
}
|
|
372
380
|
}
|
|
373
|
-
|
|
381
|
+
var _default = exports.default = TwoDimensionTable;
|
|
@@ -1,39 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getTwoDimensionArrayValue = exports.getFormulaArrayValue = exports.getCellRecordWidth = exports.convertValueToDtableLongTextValue = exports.DATASET_NOT_SUPPORT_COLUMN_TYPES = void 0;
|
|
7
|
+
exports.isArrayFormalColumn = isArrayFormalColumn;
|
|
8
|
+
exports.isValidCellValue = void 0;
|
|
9
|
+
var _dtableUtils = require("dtable-utils");
|
|
10
|
+
var _seafileEditor = require("@seafile/seafile-editor");
|
|
11
|
+
const DATASET_NOT_SUPPORT_COLUMN_TYPES = exports.DATASET_NOT_SUPPORT_COLUMN_TYPES = [_dtableUtils.CellType.BUTTON];
|
|
12
|
+
const getCellRecordWidth = function (column) {
|
|
5
13
|
let isSample = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
6
14
|
let {
|
|
7
15
|
type,
|
|
8
16
|
data
|
|
9
17
|
} = column;
|
|
10
18
|
switch (type) {
|
|
11
|
-
case CellType.DATE:
|
|
19
|
+
case _dtableUtils.CellType.DATE:
|
|
12
20
|
{
|
|
13
21
|
let isShowHourAndMinute = data && data.format && data.format.indexOf('HH:mm') > -1;
|
|
14
22
|
return isShowHourAndMinute ? 160 : 110;
|
|
15
23
|
}
|
|
16
|
-
case CellType.LONG_TEXT:
|
|
17
|
-
case CellType.AUTO_NUMBER:
|
|
18
|
-
case CellType.URL:
|
|
19
|
-
case CellType.EMAIL:
|
|
24
|
+
case _dtableUtils.CellType.LONG_TEXT:
|
|
25
|
+
case _dtableUtils.CellType.AUTO_NUMBER:
|
|
26
|
+
case _dtableUtils.CellType.URL:
|
|
27
|
+
case _dtableUtils.CellType.EMAIL:
|
|
20
28
|
{
|
|
21
29
|
return 200;
|
|
22
30
|
}
|
|
23
|
-
case CellType.CHECKBOX:
|
|
31
|
+
case _dtableUtils.CellType.CHECKBOX:
|
|
24
32
|
{
|
|
25
33
|
return 80;
|
|
26
34
|
}
|
|
27
|
-
case CellType.NUMBER:
|
|
35
|
+
case _dtableUtils.CellType.NUMBER:
|
|
28
36
|
{
|
|
29
37
|
return 120;
|
|
30
38
|
}
|
|
31
|
-
case CellType.CTIME:
|
|
32
|
-
case CellType.MTIME:
|
|
39
|
+
case _dtableUtils.CellType.CTIME:
|
|
40
|
+
case _dtableUtils.CellType.MTIME:
|
|
33
41
|
{
|
|
34
42
|
return 170;
|
|
35
43
|
}
|
|
36
|
-
case CellType.RATE:
|
|
44
|
+
case _dtableUtils.CellType.RATE:
|
|
37
45
|
{
|
|
38
46
|
const {
|
|
39
47
|
rate_max_number
|
|
@@ -41,8 +49,8 @@ export const getCellRecordWidth = function (column) {
|
|
|
41
49
|
const rateMaxNumber = rate_max_number || 5;
|
|
42
50
|
return 16 * rateMaxNumber + 20;
|
|
43
51
|
}
|
|
44
|
-
case CellType.IMAGE:
|
|
45
|
-
case CellType.FILE:
|
|
52
|
+
case _dtableUtils.CellType.IMAGE:
|
|
53
|
+
case _dtableUtils.CellType.FILE:
|
|
46
54
|
{
|
|
47
55
|
return isSample ? 60 : 160;
|
|
48
56
|
}
|
|
@@ -52,7 +60,8 @@ export const getCellRecordWidth = function (column) {
|
|
|
52
60
|
}
|
|
53
61
|
}
|
|
54
62
|
};
|
|
55
|
-
|
|
63
|
+
exports.getCellRecordWidth = getCellRecordWidth;
|
|
64
|
+
const getFormulaArrayValue = function (value) {
|
|
56
65
|
let isFlat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
57
66
|
if (!Array.isArray(value)) return [];
|
|
58
67
|
if (!isFlat) return getTwoDimensionArrayValue(value);
|
|
@@ -77,17 +86,19 @@ export const getFormulaArrayValue = function (value) {
|
|
|
77
86
|
});
|
|
78
87
|
}).flat().filter(item => isValidCellValue(item));
|
|
79
88
|
};
|
|
80
|
-
|
|
89
|
+
exports.getFormulaArrayValue = getFormulaArrayValue;
|
|
90
|
+
const convertValueToDtableLongTextValue = value => {
|
|
81
91
|
const valueType = Object.prototype.toString.call(value);
|
|
82
92
|
if (value && valueType === '[object String]') {
|
|
83
|
-
return getPreviewContent(value);
|
|
93
|
+
return (0, _seafileEditor.getPreviewContent)(value);
|
|
84
94
|
}
|
|
85
95
|
if (valueType === '[object Object]') {
|
|
86
96
|
return value;
|
|
87
97
|
}
|
|
88
98
|
return '';
|
|
89
99
|
};
|
|
90
|
-
|
|
100
|
+
exports.convertValueToDtableLongTextValue = convertValueToDtableLongTextValue;
|
|
101
|
+
const isValidCellValue = value => {
|
|
91
102
|
if (value === undefined) return false;
|
|
92
103
|
if (value === null) return false;
|
|
93
104
|
if (value === '') return false;
|
|
@@ -95,7 +106,8 @@ export const isValidCellValue = value => {
|
|
|
95
106
|
if (JSON.stringify(value) === '[]') return false;
|
|
96
107
|
return true;
|
|
97
108
|
};
|
|
98
|
-
|
|
109
|
+
exports.isValidCellValue = isValidCellValue;
|
|
110
|
+
const getTwoDimensionArrayValue = value => {
|
|
99
111
|
if (!Array.isArray(value)) return [];
|
|
100
112
|
return value.map(item => {
|
|
101
113
|
if (Object.prototype.toString.call(item) !== '[object Object]') {
|
|
@@ -118,6 +130,7 @@ export const getTwoDimensionArrayValue = value => {
|
|
|
118
130
|
});
|
|
119
131
|
});
|
|
120
132
|
};
|
|
121
|
-
|
|
122
|
-
|
|
133
|
+
exports.getTwoDimensionArrayValue = getTwoDimensionArrayValue;
|
|
134
|
+
function isArrayFormalColumn(columnType) {
|
|
135
|
+
return [_dtableUtils.CellType.IMAGE, _dtableUtils.CellType.FILE, _dtableUtils.CellType.MULTIPLE_SELECT, _dtableUtils.CellType.COLLABORATOR].includes(columnType);
|
|
123
136
|
}
|