sea-chart 2.0.39 → 2.0.42
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 +8 -15
- package/dist/assets/css/react-data-grid-header.css +0 -213
- package/dist/components/cell-factory/FormatterConfig.js +55 -62
- package/dist/components/cell-factory/SimpleCellFormatter.js +5 -12
- 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 +30 -38
- 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 +12 -19
- package/dist/components/color-popover/color-rules/color-rule.js +26 -34
- package/dist/components/color-popover/color-rules/index.js +7 -15
- 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 +9 -17
- package/dist/components/color-popover/color-rules-popover.js +30 -38
- package/dist/components/color-popover/color-selector-popover.js +12 -20
- package/dist/components/color-setting/color-group-selector.js +13 -21
- package/dist/components/common-add-tool/index.js +8 -15
- package/dist/components/data-process-setter/data-setting-header.js +7 -14
- package/dist/components/data-process-setter/hide-column-setter.js +13 -20
- package/dist/components/data-process-setter/index.js +4 -27
- package/dist/components/data-process-setter/sort-setter.js +18 -26
- package/dist/components/draggable/Draggable.js +7 -13
- package/dist/components/drill-down-settings/drill-down-fields-popover/index.js +40 -48
- 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 +5 -12
- 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 +9 -16
- package/dist/components/popover/hide-column-popover/hide-column-popover.css +6 -2
- package/dist/components/popover/hide-column-popover/hide-column-popover.js +26 -34
- package/dist/components/popover/sort-popover/sort-popover-widgets/sort-utils.js +9 -18
- package/dist/components/popover/sort-popover/sort-popover.js +55 -65
- package/dist/components/resize-handle/ResizeHandle.js +6 -13
- package/dist/components/row-card/row-card-header-cell.js +17 -24
- package/dist/components/row-card/row-card-header.js +15 -22
- package/dist/components/row-card/row-card-item.js +35 -43
- package/dist/components/row-card/row-card.js +17 -25
- package/dist/components/statistic-record-dialog/index.js +56 -64
- package/dist/components/tooltip/index.js +14 -21
- package/dist/components/types-dialog/index.js +63 -72
- 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 +142 -271
- 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 +13 -20
- 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 +4 -11
- package/dist/model/basic-number-card.js +13 -20
- package/dist/model/chart.js +7 -13
- package/dist/model/combination.js +15 -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 +11 -18
- package/dist/model/horizontal-group-bar.js +10 -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 +11 -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 +11 -17
- 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 +63 -71
- 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 +49 -57
- 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 +19 -27
- 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 +65 -73
- 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 +27 -35
- 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 +65 -73
- 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.css +0 -4
- package/dist/settings/table-element-settings/index.js +2 -13
- package/dist/settings/table-settings/data-settings.js +112 -120
- 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 +42 -50
- 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 +19 -27
- 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.css +1 -17
- 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 +26 -34
- 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 +25 -33
- 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 +74 -82
- package/dist/settings/widgets/switch/index.js +9 -16
- 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 +64 -72
- package/dist/utils/cell-format-utils.js +17 -27
- package/dist/utils/cell-value-utils.js +4 -11
- package/dist/utils/chart-utils/base-utils.js +325 -333
- package/dist/utils/chart-utils/index.js +28 -41
- package/dist/utils/chart-utils/original-data-utils/basic-chart-calculator.js +77 -84
- 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 +21 -28
- package/dist/utils/chart-utils/original-data-utils/completeness-calculator.js +33 -40
- 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 +19 -26
- package/dist/utils/chart-utils/original-data-utils/pivot-table-calculator.js +90 -96
- 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 +229 -237
- package/dist/utils/chart.js +9 -17
- package/dist/utils/collaborator-manager.js +3 -9
- package/dist/utils/collaborator-utils.js +19 -31
- package/dist/utils/collaborator.js +6 -15
- package/dist/utils/color-utils.js +18 -29
- package/dist/utils/column-utils.js +77 -104
- package/dist/utils/common-utils.js +28 -53
- package/dist/utils/concurrency-manager.js +1 -7
- package/dist/utils/contexts.js +5 -12
- package/dist/utils/date-translate.js +12 -20
- 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 +2 -8
- package/dist/utils/options-utils.js +10 -18
- package/dist/utils/row-record-utils.js +166 -178
- package/dist/utils/row-utils.js +27 -38
- package/dist/utils/search.js +24 -32
- package/dist/utils/sql/chart-data-sql.js +106 -112
- package/dist/utils/sql/column-2-sql-column.js +158 -168
- package/dist/utils/sql/index.js +3 -27
- package/dist/utils/trend-utils.js +39 -47
- package/dist/view/index.js +90 -96
- package/dist/view/title/index.js +16 -24
- package/dist/view/wrapper/area-group.js +45 -53
- package/dist/view/wrapper/area.js +45 -52
- package/dist/view/wrapper/bar-compare.js +38 -46
- package/dist/view/wrapper/bar-custom-stack.js +39 -47
- package/dist/view/wrapper/bar-group.js +49 -53
- package/dist/view/wrapper/bar-stack.js +48 -56
- package/dist/view/wrapper/bar.js +40 -48
- package/dist/view/wrapper/basic-number-card.js +26 -34
- package/dist/view/wrapper/chart-component.js +126 -133
- package/dist/view/wrapper/combination.js +55 -63
- package/dist/view/wrapper/completeness-group.js +40 -48
- package/dist/view/wrapper/completeness.js +36 -44
- package/dist/view/wrapper/dashboard.js +39 -44
- package/dist/view/wrapper/funnel.js +40 -43
- package/dist/view/wrapper/heat-map.js +62 -70
- package/dist/view/wrapper/horizontal-bar-group.js +54 -60
- package/dist/view/wrapper/horizontal-bar-stack.js +47 -55
- package/dist/view/wrapper/horizontal-bar.js +41 -49
- package/dist/view/wrapper/index.js +107 -115
- package/dist/view/wrapper/line-group.js +51 -53
- package/dist/view/wrapper/line.js +42 -50
- package/dist/view/wrapper/map-bubble.js +40 -48
- package/dist/view/wrapper/map-world-bubble.js +39 -47
- package/dist/view/wrapper/map-world.js +41 -49
- package/dist/view/wrapper/map.js +42 -50
- package/dist/view/wrapper/mirror.js +41 -49
- package/dist/view/wrapper/pie.js +44 -52
- package/dist/view/wrapper/ring.js +49 -57
- package/dist/view/wrapper/scatter.js +42 -50
- package/dist/view/wrapper/table/index.js +14 -22
- 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 +53 -61
- package/dist/view/wrapper/table/pivot-table-display-name.js +82 -90
- package/dist/view/wrapper/table/two-dimension-table.js +85 -93
- package/dist/view/wrapper/table-element/components/dataset-utils.js +23 -36
- package/dist/view/wrapper/table-element/components/formatter.js +102 -99
- package/dist/view/wrapper/table-element/components/formatters/FileFormatter/index.js +23 -32
- package/dist/view/wrapper/table-element/components/formatters/formula-formatter.js +9 -16
- package/dist/view/wrapper/table-element/components/formatters/link-formatter.js +90 -97
- package/dist/view/wrapper/table-element/components/formula-formatter.js +9 -16
- package/dist/view/wrapper/table-element/components/link-formatter.js +90 -97
- package/dist/view/wrapper/table-element/components/record.js +13 -20
- package/dist/view/wrapper/table-element/components/records-body.js +9 -17
- 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 +25 -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 +6 -16
- 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/css/index.css +79 -0
- package/dist/view/wrapper/table-element/index.js +18 -26
- package/dist/view/wrapper/treemap.js +38 -46
- package/dist/view/wrapper/trend.js +58 -66
- package/package.json +3 -3
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
require("./index.css");
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.css';
|
|
10
3
|
const components = {};
|
|
11
4
|
const requireContext = require.context('../../assets/icons', false, /\.svg$/);
|
|
12
5
|
requireContext.keys().forEach(path => {
|
|
@@ -18,10 +11,10 @@ const Icon = props => {
|
|
|
18
11
|
className,
|
|
19
12
|
symbol
|
|
20
13
|
} = props;
|
|
21
|
-
const iconClass =
|
|
14
|
+
const iconClass = `sea-chart-icon sea-chart-icon-${symbol} ${className || ''}`;
|
|
22
15
|
const IconComponent = components[symbol];
|
|
23
|
-
return /*#__PURE__*/
|
|
16
|
+
return /*#__PURE__*/React.createElement(IconComponent, {
|
|
24
17
|
className: iconClass
|
|
25
18
|
});
|
|
26
19
|
};
|
|
27
|
-
|
|
20
|
+
export default Icon;
|
package/dist/components/index.js
CHANGED
|
@@ -1,48 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () {
|
|
10
|
-
return _collaborator.default;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "Icon", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () {
|
|
16
|
-
return _icon.default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, "Loading", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () {
|
|
22
|
-
return _loading.default;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
Object.defineProperty(exports, "NumberInput", {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function () {
|
|
28
|
-
return _numberInput.default;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
Object.defineProperty(exports, "PixelEditor", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function () {
|
|
34
|
-
return _pixelEditor.default;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
Object.defineProperty(exports, "TypesDialog", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
get: function () {
|
|
40
|
-
return _typesDialog.default;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
var _collaborator = _interopRequireDefault(require("./collaborator"));
|
|
44
|
-
var _loading = _interopRequireDefault(require("./loading"));
|
|
45
|
-
var _icon = _interopRequireDefault(require("./icon"));
|
|
46
|
-
var _numberInput = _interopRequireDefault(require("./number-input"));
|
|
47
|
-
var _typesDialog = _interopRequireDefault(require("./types-dialog"));
|
|
48
|
-
var _pixelEditor = _interopRequireDefault(require("./pixel-editor"));
|
|
1
|
+
import Collaborator from './collaborator';
|
|
2
|
+
import Loading from './loading';
|
|
3
|
+
import Icon from './icon';
|
|
4
|
+
import NumberInput from './number-input';
|
|
5
|
+
import TypesDialog from './types-dialog';
|
|
6
|
+
import PixelEditor from './pixel-editor';
|
|
7
|
+
export { Collaborator, Loading, Icon, NumberInput, TypesDialog, PixelEditor };
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
-
require("./index.css");
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import './index.css';
|
|
11
4
|
const Loading = _ref => {
|
|
12
5
|
let {
|
|
13
6
|
className
|
|
14
7
|
} = _ref;
|
|
15
|
-
return /*#__PURE__*/
|
|
16
|
-
className: (
|
|
8
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
9
|
+
className: classnames('loading-icon loading-tip', className)
|
|
17
10
|
});
|
|
18
11
|
};
|
|
19
|
-
|
|
12
|
+
export default Loading;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _reactstrap = require("reactstrap");
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Input } from 'reactstrap';
|
|
10
3
|
function NumberInput(_ref) {
|
|
11
4
|
let {
|
|
12
5
|
value,
|
|
@@ -21,7 +14,7 @@ function NumberInput(_ref) {
|
|
|
21
14
|
} = _ref;
|
|
22
15
|
// useempty is used to control whether to use empty string or '0'
|
|
23
16
|
const number = value ? value : useEmpty ? '' : '0';
|
|
24
|
-
return /*#__PURE__*/
|
|
17
|
+
return /*#__PURE__*/React.createElement(Input, Object.assign({
|
|
25
18
|
type: "number",
|
|
26
19
|
className: className,
|
|
27
20
|
value: number,
|
|
@@ -32,4 +25,4 @@ function NumberInput(_ref) {
|
|
|
32
25
|
onChange: onChange
|
|
33
26
|
}, otherProps));
|
|
34
27
|
}
|
|
35
|
-
|
|
28
|
+
export default NumberInput;
|
|
@@ -1,27 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _dtableUtils = require("dtable-utils");
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _utils = require("../../utils");
|
|
12
|
-
var _numberInput = _interopRequireDefault(require("../number-input"));
|
|
13
|
-
require("./index.css");
|
|
1
|
+
import { isNumber } from 'dtable-utils';
|
|
2
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { isBoolean } from '../../utils';
|
|
4
|
+
import NumberInput from '../number-input';
|
|
5
|
+
import './index.css';
|
|
14
6
|
const PixelEditor = props => {
|
|
15
7
|
const {
|
|
16
8
|
pixel
|
|
17
9
|
} = props;
|
|
18
|
-
const [currPixel, setCurrPixel] =
|
|
19
|
-
const mountRef =
|
|
20
|
-
|
|
10
|
+
const [currPixel, setCurrPixel] = useState(isNumber(pixel) ? pixel : null);
|
|
11
|
+
const mountRef = useRef(false);
|
|
12
|
+
useEffect(() => {
|
|
21
13
|
if (!mountRef.current) {
|
|
22
14
|
mountRef.current = true;
|
|
23
15
|
} else {
|
|
24
|
-
setCurrPixel(
|
|
16
|
+
setCurrPixel(isNumber(props.pixel) ? props.pixel : null);
|
|
25
17
|
}
|
|
26
18
|
}, [props.pixel]);
|
|
27
19
|
const onSavePixel = () => {
|
|
@@ -33,17 +25,17 @@ const PixelEditor = props => {
|
|
|
33
25
|
event.target.blur();
|
|
34
26
|
}
|
|
35
27
|
};
|
|
36
|
-
const showPx =
|
|
37
|
-
return /*#__PURE__*/
|
|
28
|
+
const showPx = isBoolean(props.showPx) ? props.showPx : true;
|
|
29
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
38
30
|
className: "sea-chart-pixel-editor-wrapper"
|
|
39
|
-
}, /*#__PURE__*/
|
|
31
|
+
}, /*#__PURE__*/React.createElement(NumberInput, {
|
|
40
32
|
value: currPixel,
|
|
41
33
|
useEmpty: props.useEmpty,
|
|
42
34
|
onChange: event => setCurrPixel(event.target.value),
|
|
43
35
|
onBlur: onSavePixel,
|
|
44
36
|
onKeyDown: onKeyDown
|
|
45
|
-
}), showPx && /*#__PURE__*/
|
|
37
|
+
}), showPx && /*#__PURE__*/React.createElement("div", {
|
|
46
38
|
className: "pixel-unit"
|
|
47
|
-
}, /*#__PURE__*/
|
|
39
|
+
}, /*#__PURE__*/React.createElement("span", null, "px")));
|
|
48
40
|
};
|
|
49
|
-
|
|
41
|
+
export default PixelEditor;
|
package/dist/components/popover/hide-column-popover/hide-column-popover-widgets/hide-column-item.js
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _DTableSwitch2 = _interopRequireDefault(require("dtable-ui-component/lib/DTableSwitch"));
|
|
9
|
-
var _DTableColumnIcon2 = _interopRequireDefault(require("dtable-ui-component/lib/DTableColumnIcon"));
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
class HideColumnItem extends _react.default.PureComponent {
|
|
1
|
+
import _DTableSwitch from "dtable-ui-component/lib/DTableSwitch";
|
|
2
|
+
import _DTableColumnIcon from "dtable-ui-component/lib/DTableColumnIcon";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
class HideColumnItem extends React.PureComponent {
|
|
12
5
|
constructor(props) {
|
|
13
6
|
super(props);
|
|
14
7
|
this.onUpdateFieldSetting = event => {
|
|
@@ -51,21 +44,21 @@ class HideColumnItem extends _react.default.PureComponent {
|
|
|
51
44
|
const {
|
|
52
45
|
column
|
|
53
46
|
} = setting;
|
|
54
|
-
const placeholder = /*#__PURE__*/
|
|
47
|
+
const placeholder = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_DTableColumnIcon, {
|
|
55
48
|
column: column
|
|
56
|
-
}), /*#__PURE__*/
|
|
49
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
57
50
|
className: "text-truncate"
|
|
58
51
|
}, column.name));
|
|
59
|
-
return /*#__PURE__*/
|
|
52
|
+
return /*#__PURE__*/React.createElement(_DTableSwitch, {
|
|
60
53
|
checked: setting.isChecked,
|
|
61
54
|
disabled: readonly,
|
|
62
55
|
placeholder: placeholder,
|
|
63
56
|
onChange: this.onUpdateFieldSetting,
|
|
64
|
-
switchClassName: "
|
|
57
|
+
switchClassName: "column-item"
|
|
65
58
|
});
|
|
66
59
|
}
|
|
67
60
|
}
|
|
68
61
|
HideColumnItem.defaultProps = {
|
|
69
62
|
readonly: false
|
|
70
63
|
};
|
|
71
|
-
|
|
64
|
+
export default HideColumnItem;
|
|
@@ -6,8 +6,12 @@
|
|
|
6
6
|
margin: 0;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.hidden-column-popover .field-settings-body .dtable-switch.
|
|
10
|
-
padding: 0
|
|
9
|
+
.hidden-column-popover .field-settings-body .dtable-switch.column-item {
|
|
10
|
+
padding: 0 20px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.hidden-column-popover .field-settings-body .dtable-switch.column-item .custom-switch-indicator {
|
|
14
|
+
margin-right: 0;
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
.hidden-column-popover .custom-switch .dtable-font {
|
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _reactstrap = require("reactstrap");
|
|
10
|
-
var _isHotkey = _interopRequireDefault(require("is-hotkey"));
|
|
11
|
-
var _intl = _interopRequireDefault(require("../../../intl"));
|
|
12
|
-
var _utils = require("../../../utils");
|
|
13
|
-
var _hideColumnItem = _interopRequireDefault(require("./hide-column-popover-widgets/hide-column-item"));
|
|
14
|
-
require("./hide-column-popover.css");
|
|
1
|
+
import React from 'react';
|
|
15
2
|
// import intl from 'react-intl-universal';
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
import { UncontrolledPopover } from 'reactstrap';
|
|
4
|
+
import isHotkey from 'is-hotkey';
|
|
5
|
+
import intl from '../../../intl';
|
|
6
|
+
import { getEventClassName } from '../../../utils';
|
|
7
|
+
import HideColumnItem from './hide-column-popover-widgets/hide-column-item';
|
|
8
|
+
import './hide-column-popover.css';
|
|
9
|
+
class HideColumnPopover extends React.Component {
|
|
18
10
|
constructor(props) {
|
|
19
11
|
super(props);
|
|
20
12
|
this.hidePopover = e => {
|
|
21
|
-
if (this.popoverRef && !
|
|
13
|
+
if (this.popoverRef && !getEventClassName(e).includes('popover') && !this.popoverRef.contains(e.target)) {
|
|
22
14
|
this.props.onPopoverToggle(e);
|
|
23
15
|
e.preventDefault();
|
|
24
16
|
e.stopPropagation();
|
|
@@ -26,7 +18,7 @@ class HideColumnPopover extends _react.default.Component {
|
|
|
26
18
|
}
|
|
27
19
|
};
|
|
28
20
|
this.onHotKey = e => {
|
|
29
|
-
if ((
|
|
21
|
+
if (isHotkey('esc', e)) {
|
|
30
22
|
e.preventDefault();
|
|
31
23
|
this.props.onPopoverToggle();
|
|
32
24
|
}
|
|
@@ -160,7 +152,7 @@ class HideColumnPopover extends _react.default.Component {
|
|
|
160
152
|
} = this.props;
|
|
161
153
|
const fieldSettings = this.getFilteredColumns();
|
|
162
154
|
const isEmpty = fieldSettings.length === 0 ? true : false;
|
|
163
|
-
return /*#__PURE__*/
|
|
155
|
+
return /*#__PURE__*/React.createElement(UncontrolledPopover, {
|
|
164
156
|
placement: "auto-start",
|
|
165
157
|
isOpen: true,
|
|
166
158
|
target: target,
|
|
@@ -168,47 +160,47 @@ class HideColumnPopover extends _react.default.Component {
|
|
|
168
160
|
hideArrow: true,
|
|
169
161
|
className: "hidden-column-popover",
|
|
170
162
|
boundariesElement: document.body
|
|
171
|
-
}, /*#__PURE__*/
|
|
163
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
172
164
|
ref: ref => this.popoverRef = ref,
|
|
173
165
|
onClick: this.onPopoverInsideClick
|
|
174
|
-
}, /*#__PURE__*/
|
|
175
|
-
className:
|
|
176
|
-
}, /*#__PURE__*/
|
|
166
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
167
|
+
className: `field-settings ${isEmpty ? 'empty' : ''}`
|
|
168
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
177
169
|
className: "search-column"
|
|
178
|
-
}, /*#__PURE__*/
|
|
170
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
179
171
|
className: "form-control",
|
|
180
172
|
type: "text",
|
|
181
|
-
placeholder:
|
|
173
|
+
placeholder: intl.get('Search_column'),
|
|
182
174
|
value: this.state.searchVal,
|
|
183
175
|
onChange: this.onChangeSearch
|
|
184
|
-
})), isEmpty && /*#__PURE__*/
|
|
176
|
+
})), isEmpty && /*#__PURE__*/React.createElement("div", {
|
|
185
177
|
className: "empty-hidden-columns-container"
|
|
186
|
-
}, /*#__PURE__*/
|
|
178
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
187
179
|
className: "empty-hidden-columns-list"
|
|
188
|
-
},
|
|
180
|
+
}, intl.get('No_columns_available_to_be_hidden'))), !isEmpty && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
189
181
|
className: "field-settings-body",
|
|
190
182
|
style: {
|
|
191
183
|
maxHeight: window.innerHeight - 200 + 'px'
|
|
192
184
|
}
|
|
193
185
|
}, fieldSettings.map(setting => {
|
|
194
|
-
return /*#__PURE__*/
|
|
186
|
+
return /*#__PURE__*/React.createElement(HideColumnItem, {
|
|
195
187
|
key: setting.key,
|
|
196
188
|
setting: setting,
|
|
197
189
|
onUpdateFieldSetting: this.onUpdateFieldSetting,
|
|
198
190
|
readonly: readonly
|
|
199
191
|
});
|
|
200
|
-
})), !this.state.searchVal && !readonly && /*#__PURE__*/
|
|
192
|
+
})), !this.state.searchVal && !readonly && /*#__PURE__*/React.createElement("div", {
|
|
201
193
|
className: "field-settings-header"
|
|
202
|
-
}, /*#__PURE__*/
|
|
194
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
203
195
|
className: "hide-all px-2",
|
|
204
196
|
onClick: this.onHideAllColumns
|
|
205
|
-
},
|
|
197
|
+
}, intl.get('Hide_all')), /*#__PURE__*/React.createElement("div", {
|
|
206
198
|
className: "show-all px-2",
|
|
207
199
|
onClick: this.onChooseAllColumns
|
|
208
|
-
},
|
|
200
|
+
}, intl.get('Show_all')))))));
|
|
209
201
|
}
|
|
210
202
|
}
|
|
211
203
|
HideColumnPopover.defaultProps = {
|
|
212
204
|
readonly: false
|
|
213
205
|
};
|
|
214
|
-
|
|
206
|
+
export default HideColumnPopover;
|
|
@@ -1,28 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isSortsEmpty = exports.getDisplaySorts = exports.execSortsOperation = exports.SORT_OPERATION = void 0;
|
|
7
|
-
var _dtableUtils = require("dtable-utils");
|
|
8
|
-
const SORT_OPERATION = exports.SORT_OPERATION = {
|
|
1
|
+
import { SORT_TYPE, isValidSort } from 'dtable-utils';
|
|
2
|
+
export const SORT_OPERATION = {
|
|
9
3
|
ADD_SORT: 'add_sort',
|
|
10
4
|
DELETE_SORT: 'delete_sort',
|
|
11
5
|
MODIFY_SORT_COLUMN: 'modify_sort_column',
|
|
12
6
|
MODIFY_SORT_TYPE: 'modify_sort_type'
|
|
13
7
|
};
|
|
14
|
-
const getDisplaySorts = (sorts, columns) => {
|
|
8
|
+
export const getDisplaySorts = (sorts, columns) => {
|
|
15
9
|
if (!Array.isArray(sorts) || !Array.isArray(columns)) {
|
|
16
10
|
return [];
|
|
17
11
|
}
|
|
18
|
-
return sorts.filter(sort => !sort.column_key ||
|
|
12
|
+
return sorts.filter(sort => !sort.column_key || isValidSort(sort, columns));
|
|
19
13
|
};
|
|
20
|
-
|
|
21
|
-
const isSortsEmpty = sorts => {
|
|
14
|
+
export const isSortsEmpty = sorts => {
|
|
22
15
|
return !sorts || sorts.length === 0;
|
|
23
16
|
};
|
|
24
|
-
|
|
25
|
-
const execSortsOperation = (action, payload) => {
|
|
17
|
+
export const execSortsOperation = (action, payload) => {
|
|
26
18
|
const {
|
|
27
19
|
sorts: updatedSorts
|
|
28
20
|
} = payload;
|
|
@@ -31,7 +23,7 @@ const execSortsOperation = (action, payload) => {
|
|
|
31
23
|
{
|
|
32
24
|
const newSort = {
|
|
33
25
|
column_key: null,
|
|
34
|
-
sort_type:
|
|
26
|
+
sort_type: SORT_TYPE.UP
|
|
35
27
|
};
|
|
36
28
|
updatedSorts.push(newSort);
|
|
37
29
|
return updatedSorts;
|
|
@@ -52,7 +44,7 @@ const execSortsOperation = (action, payload) => {
|
|
|
52
44
|
} = payload;
|
|
53
45
|
const newSort = {
|
|
54
46
|
column_key: column_key,
|
|
55
|
-
sort_type:
|
|
47
|
+
sort_type: SORT_TYPE.UP
|
|
56
48
|
};
|
|
57
49
|
updatedSorts[index] = newSort;
|
|
58
50
|
return updatedSorts;
|
|
@@ -76,5 +68,4 @@ const execSortsOperation = (action, payload) => {
|
|
|
76
68
|
return updatedSorts;
|
|
77
69
|
}
|
|
78
70
|
}
|
|
79
|
-
};
|
|
80
|
-
exports.execSortsOperation = execSortsOperation;
|
|
71
|
+
};
|