sea-chart 1.1.83 → 1.1.85-beta.1
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 +3 -4
- package/dist/components/cell-factory/SimpleCellFormatter.js +1 -1
- package/dist/components/cell-factory/link-content.js +4 -4
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/color-popover/color-rules/color-rule.js +1 -1
- package/dist/components/color-popover/color-rules/index.js +1 -1
- package/dist/components/color-popover/color-rules-popover.js +6 -6
- package/dist/components/color-popover/color-selector-popover.js +2 -2
- package/dist/components/color-setting/color-group-selector.js +1 -1
- package/dist/components/common-add-tool/index.js +2 -2
- package/dist/components/data-process-setter/hide-column-setter.js +1 -1
- package/dist/components/data-process-setter/sort-setter.js +2 -2
- package/dist/components/drill-down-settings/drill-down-fields-popover/index.js +4 -4
- package/dist/components/icon/index.js +2 -2
- package/dist/components/popover/hide-column-popover/hide-column-popover-widgets/hide-column-item.js +1 -1
- package/dist/components/popover/hide-column-popover/hide-column-popover.js +1 -1
- package/dist/components/popover/sort-popover/sort-popover.js +1 -1
- package/dist/components/row-card/row-card-header-cell.js +2 -2
- package/dist/components/row-card/row-card-header.js +2 -2
- package/dist/components/row-card/row-card-item.js +2 -2
- package/dist/components/row-card/row-card.js +2 -2
- package/dist/components/statistic-record-dialog/index.js +1 -1
- package/dist/components/types-dialog/index.js +7 -7
- package/dist/context.js +2 -2
- package/dist/services/map-json.js +4 -4
- package/dist/settings/basic-number-card/style-settings.js +1 -1
- package/dist/settings/map-settings/map-style-settings.js +1 -1
- package/dist/settings/stacks-settings/index.js +1 -1
- package/dist/settings/style-settings.js +1 -1
- package/dist/settings/table-settings/data-settings.js +1 -1
- package/dist/settings/trend-settings/style-setting.js +2 -2
- package/dist/settings/widgets/date-summary-item.js +2 -2
- package/dist/settings/widgets/numeric-summary-item.js +2 -2
- package/dist/settings/widgets/summary-settings.js +2 -2
- package/dist/settings/widgets/switch/index.js +1 -1
- package/dist/settings/widgets/y-axis-group-settings.js +1 -1
- package/dist/utils/chart-utils/base-utils.js +7 -7
- package/dist/utils/chart-utils/original-data-utils/basic-chart-calculator.js +1 -1
- package/dist/utils/chart-utils/original-data-utils/compare-bar-chart-calculator.js +2 -2
- package/dist/utils/chart-utils/original-data-utils/completeness-calculator.js +1 -1
- package/dist/utils/chart-utils/sql-statistics-utils.js +9 -9
- package/dist/utils/collaborator-utils.js +1 -1
- package/dist/utils/collaborator.js +2 -2
- package/dist/utils/column-utils.js +12 -12
- package/dist/utils/common-utils.js +1 -1
- package/dist/utils/date-translate.js +1 -1
- package/dist/utils/object-utils.js +1 -1
- package/dist/utils/options-utils.js +2 -2
- package/dist/utils/row-record-utils.js +2 -2
- package/dist/utils/sql/chart-data-sql.js +58 -58
- package/dist/utils/sql/column-2-sql-column.js +18 -18
- package/dist/view/index.js +2 -2
- package/dist/view/title/index.js +2 -2
- package/dist/view/wrapper/basic-number-card.js +8 -8
- package/dist/view/wrapper/chart-component.js +13 -22
- package/dist/view/wrapper/combination.js +16 -22
- package/dist/view/wrapper/dashboard.js +4 -4
- package/dist/view/wrapper/funnel.js +2 -2
- package/dist/view/wrapper/heat-map.js +1 -1
- package/dist/view/wrapper/horizontal-bar.js +2 -3
- package/dist/view/wrapper/horizontal-component.js +9 -9
- package/dist/view/wrapper/map.js +1 -1
- package/dist/view/wrapper/mirror.js +1 -1
- package/dist/view/wrapper/pie.js +1 -1
- package/dist/view/wrapper/ring.js +1 -1
- package/dist/view/wrapper/scatter.js +2 -2
- package/dist/view/wrapper/table/index.js +1 -1
- package/dist/view/wrapper/table/one-dimension-table-with-numeric-columns.js +3 -3
- package/dist/view/wrapper/table/pivot-table-display-name.js +1 -1
- package/dist/view/wrapper/table/two-dimension-table.js +9 -9
- package/dist/view/wrapper/table-element/components/formatter.js +2 -2
- package/dist/view/wrapper/table-element/components/formatters/FileFormatter/index.js +1 -1
- package/dist/view/wrapper/table-element/components/formatters/link-formatter.js +17 -17
- package/dist/view/wrapper/table-element/components/link-formatter.js +17 -17
- package/dist/view/wrapper/table-element/components/record.js +3 -3
- package/dist/view/wrapper/table-element/components/records.js +4 -4
- package/dist/view/wrapper/table-element/components/utils.js +1 -1
- package/dist/view/wrapper/treemap.js +1 -1
- package/dist/view/wrapper/trend.js +18 -18
- package/dist/view/wrapper/world-map.js +1 -1
- package/package.json +1 -1
package/dist/api/index.js
CHANGED
|
@@ -46,13 +46,13 @@ class SeaChartAPI {
|
|
|
46
46
|
};
|
|
47
47
|
this.sqlQuery = function (sql, parameters) {
|
|
48
48
|
let convert_keys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
49
|
-
// dtable-db
|
|
50
49
|
const {
|
|
51
|
-
|
|
50
|
+
dtableServer,
|
|
52
51
|
dtableUuid,
|
|
53
52
|
accessToken
|
|
54
53
|
} = _this;
|
|
55
|
-
const
|
|
54
|
+
const apiGatewayUrl = (dtableServer || '').replace(/\/*$/, '') + '/api-gateway/';
|
|
55
|
+
const url = "".concat(apiGatewayUrl, "api/v2/dtables/").concat(dtableUuid, "/sql/");
|
|
56
56
|
const data = {
|
|
57
57
|
sql,
|
|
58
58
|
convert_keys,
|
|
@@ -95,7 +95,6 @@ class SeaChartAPI {
|
|
|
95
95
|
this.dtableUuid = dtable_uuid;
|
|
96
96
|
this.dtableServer = dtable_server.replace(/\/+$/, '') + '/';
|
|
97
97
|
this.dtableSocket = dtable_socket.replace(/\/+$/, '') + '/';
|
|
98
|
-
this.dtableDB = dtable_db.replace(/\/+$/, '') + '/';
|
|
99
98
|
}
|
|
100
99
|
|
|
101
100
|
// queryUsers(userIdList) {
|
|
@@ -20,7 +20,7 @@ class SimpleCellFormatter extends React.Component {
|
|
|
20
20
|
if (typeof value === 'object') {
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
|
-
const gridCellClassName = this.props.type ?
|
|
23
|
+
const gridCellClassName = this.props.type ? "grid-cell-type-".concat(this.props.type) : 'grid-cell-type-default';
|
|
24
24
|
let formattedValue = this.getFormattedValue(value);
|
|
25
25
|
return /*#__PURE__*/React.createElement("div", {
|
|
26
26
|
className: gridCellClassName,
|
|
@@ -22,7 +22,7 @@ class LinkContent extends Component {
|
|
|
22
22
|
isCellSelected: false,
|
|
23
23
|
readOnly: true
|
|
24
24
|
};
|
|
25
|
-
const className =
|
|
25
|
+
const className = "link formatter-item ".concat(type === CellType.SINGLE_SELECT ? 'mr-1' : '');
|
|
26
26
|
return shownLinks.map(link => {
|
|
27
27
|
if (!link) return null;
|
|
28
28
|
const {
|
|
@@ -36,14 +36,14 @@ class LinkContent extends Component {
|
|
|
36
36
|
if (!Array.isArray(display_value)) {
|
|
37
37
|
formatterProps['value'] = display_value;
|
|
38
38
|
return /*#__PURE__*/React.createElement("div", {
|
|
39
|
-
key:
|
|
39
|
+
key: "link-record-item-".concat(row_id),
|
|
40
40
|
className: className
|
|
41
41
|
}, this.createColumnFormatter(Formatter, formatterProps));
|
|
42
42
|
}
|
|
43
43
|
return display_value.map((item, index) => {
|
|
44
44
|
formatterProps['value'] = item;
|
|
45
45
|
return /*#__PURE__*/React.createElement("div", {
|
|
46
|
-
key:
|
|
46
|
+
key: "link-record-item-".concat(row_id, "-").concat(index),
|
|
47
47
|
className: className
|
|
48
48
|
}, this.createColumnFormatter(Formatter, formatterProps));
|
|
49
49
|
});
|
|
@@ -87,7 +87,7 @@ class LinkContent extends Component {
|
|
|
87
87
|
departments
|
|
88
88
|
});
|
|
89
89
|
return /*#__PURE__*/React.createElement("div", {
|
|
90
|
-
key:
|
|
90
|
+
key: "link-item-".concat(index),
|
|
91
91
|
className: "link"
|
|
92
92
|
}, /*#__PURE__*/React.createElement("span", {
|
|
93
93
|
className: "link-name pr-1",
|
|
@@ -31,7 +31,7 @@ class ColorPicker extends React.PureComponent {
|
|
|
31
31
|
}, /*#__PURE__*/React.createElement("div", {
|
|
32
32
|
className: "picker-control"
|
|
33
33
|
}, /*#__PURE__*/React.createElement("div", {
|
|
34
|
-
className:
|
|
34
|
+
className: "color-control ".concat(isWhiteColor ? 'white-color' : ''),
|
|
35
35
|
onClick: this.onPickColorToggle,
|
|
36
36
|
style: {
|
|
37
37
|
background: activeColor
|
|
@@ -108,7 +108,7 @@ class ColorRule extends Component {
|
|
|
108
108
|
filter_conjunction,
|
|
109
109
|
filters
|
|
110
110
|
} = rule;
|
|
111
|
-
const target =
|
|
111
|
+
const target = "row-color-rule-".concat(ruleIndex);
|
|
112
112
|
const selectedColorConfig = this.props.getColorConfigByColor(color);
|
|
113
113
|
const ruleTitle = ruleName || intl.get('Define_rule');
|
|
114
114
|
const canAddFilter = filters.length < 8;
|
|
@@ -59,7 +59,7 @@ class ColorRules extends Component {
|
|
|
59
59
|
}, rules.map((rule, ruleIndex) => {
|
|
60
60
|
const isEditing = editingRuleIndex === ruleIndex;
|
|
61
61
|
return /*#__PURE__*/React.createElement(ColorRule, {
|
|
62
|
-
key:
|
|
62
|
+
key: "statistic-color-rule-".concat(ruleIndex),
|
|
63
63
|
ruleIndex: ruleIndex,
|
|
64
64
|
rule: rule,
|
|
65
65
|
labelColorConfigs: labelColorConfigs,
|
|
@@ -22,7 +22,7 @@ class ColorRulesPopover extends Component {
|
|
|
22
22
|
filter_term
|
|
23
23
|
} = filter;
|
|
24
24
|
const name = DISPLAY_COLOR_RULE_FILTER_TYPE[filter_type];
|
|
25
|
-
const template =
|
|
25
|
+
const template = "".concat(intl.get(name), " ").concat(intl.get(filter_predicate));
|
|
26
26
|
if (EMPTY_PREDICATE.includes(filter_predicate)) {
|
|
27
27
|
return template;
|
|
28
28
|
}
|
|
@@ -30,12 +30,12 @@ class ColorRulesPopover extends Component {
|
|
|
30
30
|
case COLOR_RULE_FILTER_TYPE_MAP.NUMERIC_VALUE:
|
|
31
31
|
{
|
|
32
32
|
if (filter_term === 0) {
|
|
33
|
-
return
|
|
33
|
+
return "".concat(template, " 0");
|
|
34
34
|
}
|
|
35
35
|
if (!filter_term) {
|
|
36
36
|
return null;
|
|
37
37
|
}
|
|
38
|
-
return
|
|
38
|
+
return "".concat(template, " ").concat(filter_term);
|
|
39
39
|
}
|
|
40
40
|
default:
|
|
41
41
|
{
|
|
@@ -48,10 +48,10 @@ class ColorRulesPopover extends Component {
|
|
|
48
48
|
let contentText = '';
|
|
49
49
|
filterConjunction = filterConjunction || 'And';
|
|
50
50
|
filters.forEach((filter, index) => {
|
|
51
|
-
let filterContentText = index === 0 ? '' :
|
|
51
|
+
let filterContentText = index === 0 ? '' : " ".concat(filterConjunction === 'And' ? intl.get('And') : intl.get('Or'));
|
|
52
52
|
let filterDisplay = this.getFilterDisplay(filter);
|
|
53
53
|
if (filterDisplay) {
|
|
54
|
-
contentText = contentText + filterContentText +
|
|
54
|
+
contentText = contentText + filterContentText + " ".concat(filterDisplay);
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
return contentText;
|
|
@@ -140,7 +140,7 @@ class ColorRulesPopover extends Component {
|
|
|
140
140
|
}
|
|
141
141
|
setTimeout(() => {
|
|
142
142
|
if (popoverWrapper) {
|
|
143
|
-
popoverWrapper.style.top =
|
|
143
|
+
popoverWrapper.style.top = "".concat(-offsetHeight + offsetTop, "px");
|
|
144
144
|
}
|
|
145
145
|
}, 300);
|
|
146
146
|
};
|
|
@@ -17,7 +17,7 @@ class ColorSelectorPopover extends Component {
|
|
|
17
17
|
} = hexToRgb(colorOption.color);
|
|
18
18
|
return {
|
|
19
19
|
...colorOption,
|
|
20
|
-
border_color:
|
|
20
|
+
border_color: "rgb(".concat(Math.max(r - 20, 0), ", ").concat(Math.max(g - 20, 0), ", ").concat(Math.max(b - 20, 0), ")")
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
return colorOption;
|
|
@@ -47,7 +47,7 @@ class ColorSelectorPopover extends Component {
|
|
|
47
47
|
}, /*#__PURE__*/React.createElement("div", {
|
|
48
48
|
className: "sea-chart-color-selector-wrapper"
|
|
49
49
|
}, this.colorOptions.map(colorOption => /*#__PURE__*/React.createElement("div", {
|
|
50
|
-
key:
|
|
50
|
+
key: "sea-chart-color-option-".concat(colorOption.color),
|
|
51
51
|
className: "sea-chart-color-option",
|
|
52
52
|
onClick: () => this.onSelectColor(colorOption.color),
|
|
53
53
|
style: {
|
|
@@ -8,12 +8,12 @@ function CommonAddTool(props) {
|
|
|
8
8
|
addIconClassName
|
|
9
9
|
} = props;
|
|
10
10
|
return /*#__PURE__*/React.createElement("div", {
|
|
11
|
-
className:
|
|
11
|
+
className: "add-item-btn ".concat(className ? className : ''),
|
|
12
12
|
onClick: e => {
|
|
13
13
|
callBack(e);
|
|
14
14
|
}
|
|
15
15
|
}, /*#__PURE__*/React.createElement("span", {
|
|
16
|
-
className:
|
|
16
|
+
className: "dtable-font dtable-icon-add-table ".concat(addIconClassName || '')
|
|
17
17
|
}), /*#__PURE__*/React.createElement("span", {
|
|
18
18
|
className: "add-new-option text-truncate",
|
|
19
19
|
title: footerName
|
|
@@ -60,7 +60,7 @@ class HideColumnSetter extends React.Component {
|
|
|
60
60
|
let settingClass = wrapperClass || '';
|
|
61
61
|
settingClass = settingClass && hiddenColumnsLength > 0 ? settingClass + ' active' : settingClass;
|
|
62
62
|
return /*#__PURE__*/React.createElement("div", {
|
|
63
|
-
className:
|
|
63
|
+
className: "setting-item ".concat(settingClass ? '' : 'mb-1')
|
|
64
64
|
}, /*#__PURE__*/React.createElement("div", {
|
|
65
65
|
className: "mr-2 filters-setting-btn",
|
|
66
66
|
onClick: this.onHideColumnToggle
|
|
@@ -45,9 +45,9 @@ class SortSetter extends Component {
|
|
|
45
45
|
let labelClass = wrapperClass || '';
|
|
46
46
|
labelClass = labelClass && sortsLength > 0 ? labelClass + ' active' : labelClass;
|
|
47
47
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
48
|
-
className:
|
|
48
|
+
className: "setting-item ".concat(labelClass ? '' : 'mb-1')
|
|
49
49
|
}, /*#__PURE__*/React.createElement("div", {
|
|
50
|
-
className:
|
|
50
|
+
className: "mr-2 setting-item-btn filters-setting-btn ".concat(labelClass),
|
|
51
51
|
onClick: this.onSortToggle,
|
|
52
52
|
role: "button",
|
|
53
53
|
onKeyDown: this.onKeyDown,
|
|
@@ -73,13 +73,13 @@ export default function DrillDownFieldsPopover(_ref) {
|
|
|
73
73
|
className: styles['text-truncate']
|
|
74
74
|
}, ''), /*#__PURE__*/React.createElement("th", {
|
|
75
75
|
width: "20%",
|
|
76
|
-
className:
|
|
76
|
+
className: "".concat(styles['column-checkbox'], " pr-3")
|
|
77
77
|
}, intl.get('Visible')))), /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", {
|
|
78
78
|
className: styles['drill-down-fields-row']
|
|
79
79
|
}, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", {
|
|
80
80
|
className: styles['drill-down-fields-select-all']
|
|
81
81
|
}, intl.get('Select_all'))), /*#__PURE__*/React.createElement("td", {
|
|
82
|
-
className:
|
|
82
|
+
className: "".concat(styles['column-checkbox'], " pr-3")
|
|
83
83
|
}, /*#__PURE__*/React.createElement("input", {
|
|
84
84
|
type: "checkbox",
|
|
85
85
|
checked: isAllColumnsVisible,
|
|
@@ -94,9 +94,9 @@ export default function DrillDownFieldsPopover(_ref) {
|
|
|
94
94
|
className: "pl-5 text-truncate",
|
|
95
95
|
title: column.name
|
|
96
96
|
}, /*#__PURE__*/React.createElement("i", {
|
|
97
|
-
className:
|
|
97
|
+
className: "".concat(COLUMNS_ICON_CONFIG[column.type], " mr-2 ").concat(styles['drill-down-fields-icon'])
|
|
98
98
|
}), /*#__PURE__*/React.createElement("span", null, column.name)), /*#__PURE__*/React.createElement("td", {
|
|
99
|
-
className:
|
|
99
|
+
className: "".concat(styles['column-checkbox'], " pr-3")
|
|
100
100
|
}, /*#__PURE__*/React.createElement("input", {
|
|
101
101
|
disabled: checkedByDefault,
|
|
102
102
|
type: "checkbox",
|
|
@@ -14,11 +14,11 @@ const Icon = props => {
|
|
|
14
14
|
className,
|
|
15
15
|
symbol
|
|
16
16
|
} = props;
|
|
17
|
-
const iconClass =
|
|
17
|
+
const iconClass = "sea-chart-icon sea-chart-icon-".concat(symbol, " ").concat(className || '');
|
|
18
18
|
return /*#__PURE__*/React.createElement("svg", {
|
|
19
19
|
className: iconClass
|
|
20
20
|
}, /*#__PURE__*/React.createElement("use", {
|
|
21
|
-
xlinkHref:
|
|
21
|
+
xlinkHref: "#".concat(symbol)
|
|
22
22
|
}));
|
|
23
23
|
};
|
|
24
24
|
export default Icon;
|
package/dist/components/popover/hide-column-popover/hide-column-popover-widgets/hide-column-item.js
CHANGED
|
@@ -41,7 +41,7 @@ class HideColumnItem extends React.PureComponent {
|
|
|
41
41
|
readonly
|
|
42
42
|
} = this.props;
|
|
43
43
|
const placeholder = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("i", {
|
|
44
|
-
className:
|
|
44
|
+
className: "dtable-font ".concat(setting.columnIcon)
|
|
45
45
|
}), /*#__PURE__*/React.createElement("span", {
|
|
46
46
|
className: "text-truncate"
|
|
47
47
|
}, setting.columnName));
|
|
@@ -166,7 +166,7 @@ class HideColumnPopover extends React.Component {
|
|
|
166
166
|
ref: ref => this.popoverRef = ref,
|
|
167
167
|
onClick: this.onPopoverInsideClick
|
|
168
168
|
}, /*#__PURE__*/React.createElement("div", {
|
|
169
|
-
className:
|
|
169
|
+
className: "field-settings ".concat(isEmpty ? 'empty' : '')
|
|
170
170
|
}, /*#__PURE__*/React.createElement("div", {
|
|
171
171
|
className: "search-column"
|
|
172
172
|
}, /*#__PURE__*/React.createElement("input", {
|
|
@@ -264,7 +264,7 @@ class SortPopover extends Component {
|
|
|
264
264
|
ref: ref => this.sortPopoverRef = ref,
|
|
265
265
|
onClick: this.onPopoverInsideClick
|
|
266
266
|
}, /*#__PURE__*/React.createElement("div", {
|
|
267
|
-
className:
|
|
267
|
+
className: "sorts-list ".concat(isEmpty ? 'empty-sorts-container' : '')
|
|
268
268
|
}, isEmpty ? /*#__PURE__*/React.createElement("div", {
|
|
269
269
|
className: "empty-sorts-list"
|
|
270
270
|
}, intl.get('No_sorts')) : this.renderSortsList()), !readonly && /*#__PURE__*/React.createElement(CommonAddTool, {
|
|
@@ -20,7 +20,7 @@ class RowCardHeaderCell extends React.Component {
|
|
|
20
20
|
let headerCellWidth = width;
|
|
21
21
|
if (rowCardType === 'link') {
|
|
22
22
|
const tableId = table._id;
|
|
23
|
-
const draggedCellId =
|
|
23
|
+
const draggedCellId = "".concat(tableId, "-").concat(key);
|
|
24
24
|
const existedWidth = JSON.parse(localStorage.getItem(draggedCellId));
|
|
25
25
|
if (existedWidth) {
|
|
26
26
|
headerCellWidth = existedWidth;
|
|
@@ -48,7 +48,7 @@ class RowCardHeaderCell extends React.Component {
|
|
|
48
48
|
const {
|
|
49
49
|
_id: tableId
|
|
50
50
|
} = table;
|
|
51
|
-
const draggedCellId =
|
|
51
|
+
const draggedCellId = "".concat(tableId, "-").concat(columnKey);
|
|
52
52
|
let width = this.getWidthFromMouseEvent(e);
|
|
53
53
|
this.setState({
|
|
54
54
|
resizing: false
|
|
@@ -69,7 +69,7 @@ class RowCardHeader extends React.Component {
|
|
|
69
69
|
} = this.props;
|
|
70
70
|
for (let i = 0; i < renderedColumns.length; i++) {
|
|
71
71
|
const renderedColumn = renderedColumns[i];
|
|
72
|
-
cardHeaderCells.push(/*#__PURE__*/React.createElement(RowCardHeaderCell, {
|
|
72
|
+
cardHeaderCells.push( /*#__PURE__*/React.createElement(RowCardHeaderCell, {
|
|
73
73
|
key: renderedColumn.key,
|
|
74
74
|
column: renderedColumn,
|
|
75
75
|
rowCardType: rowCardType,
|
|
@@ -109,7 +109,7 @@ class RowCardHeader extends React.Component {
|
|
|
109
109
|
} = this.state;
|
|
110
110
|
const cardHeaderCells = this.getCardHeaderCells();
|
|
111
111
|
return /*#__PURE__*/React.createElement("div", {
|
|
112
|
-
className:
|
|
112
|
+
className: "row-card-header ".concat(cardHeaderClassName ? cardHeaderClassName : '')
|
|
113
113
|
}, /*#__PURE__*/React.createElement("div", {
|
|
114
114
|
className: "row-card-column-names records-column-names",
|
|
115
115
|
ref: ref => this.recordItemRef = ref
|
|
@@ -78,7 +78,7 @@ class RowCardItem extends PureComponent {
|
|
|
78
78
|
data,
|
|
79
79
|
width
|
|
80
80
|
} = column;
|
|
81
|
-
const draggedCellId =
|
|
81
|
+
const draggedCellId = "".concat(tableId, "-").concat(key);
|
|
82
82
|
const existedWidth = JSON.parse(localStorage.getItem(draggedCellId));
|
|
83
83
|
let columnWidth = existedWidth && rowCardType === 'link' ? existedWidth : width;
|
|
84
84
|
if (draggedCell.id === draggedCellId) {
|
|
@@ -107,7 +107,7 @@ class RowCardItem extends PureComponent {
|
|
|
107
107
|
}, /*#__PURE__*/React.createElement("div", {
|
|
108
108
|
className: "formatter-show"
|
|
109
109
|
}, /*#__PURE__*/React.createElement(LinkContent, {
|
|
110
|
-
key:
|
|
110
|
+
key: "link-formatter-".concat(row._id, "-").concat(key),
|
|
111
111
|
linkedColumn: linkedColumn,
|
|
112
112
|
computedValue: formulaRow[key],
|
|
113
113
|
Empty: EMPTY_LINK
|
|
@@ -186,7 +186,7 @@ class RowCard extends Component {
|
|
|
186
186
|
displayRows,
|
|
187
187
|
scrollLeft
|
|
188
188
|
} = this.state;
|
|
189
|
-
const rowCardListClass =
|
|
189
|
+
const rowCardListClass = "row-card-list ".concat(cardListClassName ? cardListClassName : '');
|
|
190
190
|
return /*#__PURE__*/React.createElement("div", {
|
|
191
191
|
className: "row-card-container"
|
|
192
192
|
}, isShowRowCardHeader && /*#__PURE__*/React.createElement(RowCardHeader, {
|
|
@@ -225,7 +225,7 @@ class RowCard extends Component {
|
|
|
225
225
|
columns: renderedColumns
|
|
226
226
|
};
|
|
227
227
|
return /*#__PURE__*/React.createElement(RowCardItem, {
|
|
228
|
-
key:
|
|
228
|
+
key: "row-card-".concat(rowIdx),
|
|
229
229
|
setItemScrollLeft: this.setItemScrollLeft,
|
|
230
230
|
onRef: this.onRef,
|
|
231
231
|
rowCardType: rowCardType,
|
|
@@ -297,7 +297,7 @@ class StatisticRecordDialog extends React.Component {
|
|
|
297
297
|
if (searchedRows.length === 0) return /*#__PURE__*/React.createElement("div", {
|
|
298
298
|
className: "w-100 h-100"
|
|
299
299
|
}, /*#__PURE__*/React.createElement(_DTableEmptyTip, {
|
|
300
|
-
src:
|
|
300
|
+
src: "".concat(context.getSetting('mediaUrl'), "img/no-items-tip.png"),
|
|
301
301
|
text: intl.get('No_record')
|
|
302
302
|
}));
|
|
303
303
|
const props = {
|
|
@@ -37,7 +37,7 @@ const TypesDialog = _ref => {
|
|
|
37
37
|
const currentCatIndex = selectStatisticIndex < 0 ? 0 : selectStatisticIndex;
|
|
38
38
|
if (currentCatIndex === 0) return;
|
|
39
39
|
if (!seaChartTypeContainerRef.current) return;
|
|
40
|
-
seaChartTypeContainerRef.current.scrollTop = document.getElementById(
|
|
40
|
+
seaChartTypeContainerRef.current.scrollTop = document.getElementById("chart-type-".concat(currentCatIndex + 1)).offsetTop - 60;
|
|
41
41
|
}, [type]);
|
|
42
42
|
const onToggle = useCallback(() => {
|
|
43
43
|
propsOnToggle();
|
|
@@ -46,7 +46,7 @@ const TypesDialog = _ref => {
|
|
|
46
46
|
eventStopPropagation(event);
|
|
47
47
|
setCurrentCatIndex(index);
|
|
48
48
|
if (!seaChartTypeContainerRef.current) return;
|
|
49
|
-
seaChartTypeContainerRef.current.scrollTop = document.getElementById(
|
|
49
|
+
seaChartTypeContainerRef.current.scrollTop = document.getElementById("chart-type-".concat(index + 1)).offsetTop - 60;
|
|
50
50
|
}, [seaChartTypeContainerRef]);
|
|
51
51
|
const onTypeChange = useCallback((event, type, index) => {
|
|
52
52
|
eventStopPropagation(event);
|
|
@@ -76,7 +76,7 @@ const TypesDialog = _ref => {
|
|
|
76
76
|
key: index,
|
|
77
77
|
className: "px-4 py-2 sea-chart-chart-cat-nav-item"
|
|
78
78
|
}, /*#__PURE__*/React.createElement("div", {
|
|
79
|
-
id:
|
|
79
|
+
id: "sea-chart-icon-".concat(item.icon, "-container"),
|
|
80
80
|
className: classnames('sea-chart-chart-cat-nav-item-container', {
|
|
81
81
|
'sea-chart-icon-highlight': currentCatIndex === index
|
|
82
82
|
}),
|
|
@@ -86,7 +86,7 @@ const TypesDialog = _ref => {
|
|
|
86
86
|
className: "chart-icon w-100 h-100"
|
|
87
87
|
})), /*#__PURE__*/React.createElement(UncontrolledTooltip, {
|
|
88
88
|
placement: "bottom",
|
|
89
|
-
target:
|
|
89
|
+
target: "sea-chart-icon-".concat(item.icon, "-container"),
|
|
90
90
|
delay: 0,
|
|
91
91
|
fade: false
|
|
92
92
|
}, intl.get(item.name)));
|
|
@@ -95,11 +95,11 @@ const TypesDialog = _ref => {
|
|
|
95
95
|
ref: seaChartTypeContainerRef
|
|
96
96
|
}, CHART_TYPES.map((item, index) => {
|
|
97
97
|
return /*#__PURE__*/React.createElement("div", {
|
|
98
|
-
key:
|
|
98
|
+
key: "sea-chart-type-".concat(index),
|
|
99
99
|
className: "mb-7"
|
|
100
100
|
}, /*#__PURE__*/React.createElement("h3", {
|
|
101
101
|
className: "sea-chart-type-title m-0",
|
|
102
|
-
id:
|
|
102
|
+
id: "chart-type-".concat(index + 1)
|
|
103
103
|
}, intl.get(item.name)), /*#__PURE__*/React.createElement("div", {
|
|
104
104
|
className: "d-flex flex-wrap"
|
|
105
105
|
}, item.children.map(chartType => {
|
|
@@ -109,7 +109,7 @@ const TypesDialog = _ref => {
|
|
|
109
109
|
return /*#__PURE__*/React.createElement("div", {
|
|
110
110
|
key: chartType,
|
|
111
111
|
onClick: event => onTypeChange(event, chartType, index),
|
|
112
|
-
className:
|
|
112
|
+
className: "sea-chart-type-item ".concat(selectedType === chartType ? 'selected' : '')
|
|
113
113
|
}, /*#__PURE__*/React.createElement("p", {
|
|
114
114
|
className: "sea-chart-type-description"
|
|
115
115
|
}, intl.get(CHART_TYPE_SHOW[chartType])), /*#__PURE__*/React.createElement("div", {
|
package/dist/context.js
CHANGED
|
@@ -114,9 +114,9 @@ class Context {
|
|
|
114
114
|
server,
|
|
115
115
|
mediaUrl
|
|
116
116
|
} = this.settings;
|
|
117
|
-
return
|
|
117
|
+
return "".concat(server).concat(mediaUrl, "dtable-statistic/img/").concat(name, "?v=0.0.1");
|
|
118
118
|
}
|
|
119
|
-
return
|
|
119
|
+
return "".concat(DEFAULT_MEDIAURL, "dtable-statistic/img/").concat(name, "?v=0.0.1");
|
|
120
120
|
};
|
|
121
121
|
this.api = null;
|
|
122
122
|
this.settings = {};
|
|
@@ -45,7 +45,7 @@ function getMapJsonQueryUrl(mapLevel, mapLocation) {
|
|
|
45
45
|
if (!provinceNameEn) {
|
|
46
46
|
return null;
|
|
47
47
|
}
|
|
48
|
-
return
|
|
48
|
+
return "region-mapjson/".concat(provinceNameEn, "/").concat(provinceNameEn);
|
|
49
49
|
}
|
|
50
50
|
case MAP_LEVEL.CITY:
|
|
51
51
|
{
|
|
@@ -58,9 +58,9 @@ function getMapJsonQueryUrl(mapLevel, mapLocation) {
|
|
|
58
58
|
|
|
59
59
|
// e.g. 北京市/北京市
|
|
60
60
|
if (provinceNameEn === cityNameEn) {
|
|
61
|
-
return
|
|
61
|
+
return "region-mapjson/".concat(provinceNameEn, "/").concat(provinceNameEn);
|
|
62
62
|
}
|
|
63
|
-
return
|
|
63
|
+
return "region-mapjson/".concat(provinceNameEn, "/").concat(provinceNameEn, "_").concat(cityNameEn);
|
|
64
64
|
}
|
|
65
65
|
default:
|
|
66
66
|
{
|
|
@@ -88,7 +88,7 @@ export default async function fetchMapJson(mapLevel, mapLocation, mediaUrl) {
|
|
|
88
88
|
}
|
|
89
89
|
let mapJson;
|
|
90
90
|
try {
|
|
91
|
-
const res = await fetch(
|
|
91
|
+
const res = await fetch("".concat(mediaUrl, "dtable-statistic/geolocation/").concat(url, ".json"));
|
|
92
92
|
mapJson = await res.json();
|
|
93
93
|
} catch (error) {
|
|
94
94
|
console.error('on fetchMapJson: fetch error', error);
|
|
@@ -66,7 +66,7 @@ export default function MapStyleSetting(_ref) {
|
|
|
66
66
|
className: "ml-0 row gutters-xs"
|
|
67
67
|
}, LABEL_COLORS.map((item, index) => {
|
|
68
68
|
return /*#__PURE__*/React.createElement("div", {
|
|
69
|
-
key:
|
|
69
|
+
key: "map-bubble-color-".concat(index),
|
|
70
70
|
className: "col-auto pl-0"
|
|
71
71
|
}, /*#__PURE__*/React.createElement("label", {
|
|
72
72
|
className: "colorinput"
|
|
@@ -226,7 +226,7 @@ class StacksSettings extends Component {
|
|
|
226
226
|
chart: chart,
|
|
227
227
|
stack: yAxis,
|
|
228
228
|
yAxisesIndex: index,
|
|
229
|
-
label:
|
|
229
|
+
label: "".concat(intl.get('Stack')).concat(index + 1),
|
|
230
230
|
numericColumnsOptions: this.props.numericColumnsOptions,
|
|
231
231
|
summaryMethodsOptions: this.summaryMethodsOptions,
|
|
232
232
|
deleteStack: () => this.deleteStack(index),
|
|
@@ -62,7 +62,7 @@ const StyleSettings = _ref => {
|
|
|
62
62
|
type
|
|
63
63
|
} = config;
|
|
64
64
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StatisticTitleSetting, {
|
|
65
|
-
key:
|
|
65
|
+
key: "title-setting-".concat(chart.id),
|
|
66
66
|
title: style_config && style_config.title,
|
|
67
67
|
modifyTitle: modifyTitle,
|
|
68
68
|
type: type
|
|
@@ -415,7 +415,7 @@ const DataSettings = _ref => {
|
|
|
415
415
|
return summary_columns.map((item, index) => {
|
|
416
416
|
const currentUsedSummaryColumnKeys = usedSummaryColumnKeys.filter(columnKey => item.column_key !== columnKey);
|
|
417
417
|
return /*#__PURE__*/React.createElement(NumericSummaryItem, {
|
|
418
|
-
key:
|
|
418
|
+
key: "number-column-".concat(index),
|
|
419
419
|
chart: chart,
|
|
420
420
|
numericColumnOptions: numericColumnOptions.filter(item => !currentUsedSummaryColumnKeys.includes(item.value.key)),
|
|
421
421
|
index: index + 1,
|
|
@@ -51,13 +51,13 @@ export default function StyleSettings(_ref) {
|
|
|
51
51
|
font_weight: 400
|
|
52
52
|
};
|
|
53
53
|
const handleNumChange = (key, value) => {
|
|
54
|
-
key =
|
|
54
|
+
key = "num_".concat(key);
|
|
55
55
|
onChange({
|
|
56
56
|
[key]: value
|
|
57
57
|
});
|
|
58
58
|
};
|
|
59
59
|
const handleLabelChange = (key, value) => {
|
|
60
|
-
key =
|
|
60
|
+
key = "label_".concat(key);
|
|
61
61
|
if (key === 'label_font_size') {
|
|
62
62
|
key = 'card_label_font_size';
|
|
63
63
|
}
|
|
@@ -84,14 +84,14 @@ class DateSummaryItem extends Component {
|
|
|
84
84
|
className: "title-item title-left"
|
|
85
85
|
}, /*#__PURE__*/React.createElement("i", {
|
|
86
86
|
onClick: this.onToggleExpand,
|
|
87
|
-
className:
|
|
87
|
+
className: "icon dtable-font ".concat(isExpand ? 'dtable-icon-drop-down' : 'dtable-icon-right-slide')
|
|
88
88
|
}), /*#__PURE__*/React.createElement("label", null, intl.get('Summary_field') + (1 + index))), /*#__PURE__*/React.createElement("span", {
|
|
89
89
|
className: "title-item title-right"
|
|
90
90
|
}, index !== 0 && /*#__PURE__*/React.createElement("i", {
|
|
91
91
|
className: "dtable-font dtable-icon-fork-number close-icon",
|
|
92
92
|
onClick: () => this.props.onDelete(index)
|
|
93
93
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
94
|
-
className:
|
|
94
|
+
className: "".concat(isExpand ? 'expanded-numeric-summary-content' : 'collapsed-numeric-summary-content')
|
|
95
95
|
}, /*#__PURE__*/React.createElement(FormGroup, {
|
|
96
96
|
className: "sea-chart-parameter-item numeric-column"
|
|
97
97
|
}, /*#__PURE__*/React.createElement(_DTableSelect, {
|
|
@@ -118,14 +118,14 @@ class NumericSummaryItem extends Component {
|
|
|
118
118
|
className: "numeric-summary-item d-flex align-items-center justify-content-between w-100"
|
|
119
119
|
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("i", {
|
|
120
120
|
onClick: this.onToggleExpand,
|
|
121
|
-
className:
|
|
121
|
+
className: "numeric-summary-item-icon dtable-font mr-2 ".concat(isExpand ? 'dtable-icon-drop-down' : 'dtable-icon-right-slide')
|
|
122
122
|
}), /*#__PURE__*/React.createElement("span", null, intl.get('Summary_field') + ' ' + (1 + index))), !isFirst && /*#__PURE__*/React.createElement("div", {
|
|
123
123
|
className: "delete-numeric-summary-item-content close d-flex align-items-center justify-content-center",
|
|
124
124
|
onClick: this.handleNumericSummaryItemDelete
|
|
125
125
|
}, /*#__PURE__*/React.createElement("i", {
|
|
126
126
|
className: "dtable-font dtable-icon-fork-number delete-icon"
|
|
127
127
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
128
|
-
className:
|
|
128
|
+
className: "pl-4 ".concat(isExpand ? 'expanded-numeric-summary-content' : 'collapsed-numeric-summary-content d-none')
|
|
129
129
|
}, /*#__PURE__*/React.createElement(FormGroup, {
|
|
130
130
|
className: "sea-chart-parameter-item numeric-column"
|
|
131
131
|
}, /*#__PURE__*/React.createElement(_DTableSelect, {
|
|
@@ -227,7 +227,7 @@ class SummarySettings extends Component {
|
|
|
227
227
|
}
|
|
228
228
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(NumericSummaryItem, {
|
|
229
229
|
chart: chart,
|
|
230
|
-
key:
|
|
230
|
+
key: "number-column-".concat(0),
|
|
231
231
|
numericColumnOptions: this.numericColumnsOptions,
|
|
232
232
|
onColumnOptionChange: this.onChangeNumericSummaryColumn,
|
|
233
233
|
onSummaryMethodChange: this.onChangeNumericSummaryMethod,
|
|
@@ -369,7 +369,7 @@ class SummarySettings extends Component {
|
|
|
369
369
|
return y_axis_left_group_by_numeric_columns.map((item, index) => {
|
|
370
370
|
return /*#__PURE__*/React.createElement(NumericSummaryItem, {
|
|
371
371
|
chart: chart,
|
|
372
|
-
key:
|
|
372
|
+
key: "number-column-".concat(index),
|
|
373
373
|
numericColumnOptions: this.numericColumnsOptions,
|
|
374
374
|
onColumnOptionChange: this.onChangeNumericSummaryColumn,
|
|
375
375
|
onSummaryMethodChange: this.onChangeNumericSummaryMethod,
|
|
@@ -13,7 +13,7 @@ const Switch = _ref => {
|
|
|
13
13
|
return /*#__PURE__*/React.createElement("div", {
|
|
14
14
|
className: classnames('sea-chart-parameter-container', className)
|
|
15
15
|
}, /*#__PURE__*/React.createElement(_DTableSwitch, {
|
|
16
|
-
key:
|
|
16
|
+
key: "custom-switch-checkbox-".concat(checked),
|
|
17
17
|
checked: checked,
|
|
18
18
|
disabled: disabled,
|
|
19
19
|
switchClassName: "sea-chart-toggle-parameter",
|