@deephaven/iris-grid 0.38.1-beta.0 → 0.38.1-beta.11
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/README.md +4 -2
- package/dist/AdvancedFilterCreator.d.ts +4 -2
- package/dist/AdvancedFilterCreator.d.ts.map +1 -1
- package/dist/AdvancedFilterCreator.js +9 -4
- package/dist/AdvancedFilterCreator.js.map +1 -1
- package/dist/AdvancedFilterCreatorFilterItem.d.ts +4 -3
- package/dist/AdvancedFilterCreatorFilterItem.d.ts.map +1 -1
- package/dist/AdvancedFilterCreatorFilterItem.js +5 -4
- package/dist/AdvancedFilterCreatorFilterItem.js.map +1 -1
- package/dist/AdvancedFilterCreatorSelectValue.d.ts +4 -2
- package/dist/AdvancedFilterCreatorSelectValue.d.ts.map +1 -1
- package/dist/AdvancedFilterCreatorSelectValue.js +11 -3
- package/dist/AdvancedFilterCreatorSelectValue.js.map +1 -1
- package/dist/AdvancedFilterCreatorSelectValueList.d.ts +3 -1
- package/dist/AdvancedFilterCreatorSelectValueList.d.ts.map +1 -1
- package/dist/AdvancedFilterCreatorSelectValueList.js +7 -5
- package/dist/AdvancedFilterCreatorSelectValueList.js.map +1 -1
- package/dist/ColumnStatistics.css +1 -2
- package/dist/ColumnStatistics.css.map +1 -1
- package/dist/ColumnStatistics.d.ts +1 -1
- package/dist/ColumnStatistics.d.ts.map +1 -1
- package/dist/ColumnStatistics.js.map +1 -1
- package/dist/CommonTypes.d.ts +1 -1
- package/dist/CommonTypes.d.ts.map +1 -1
- package/dist/CommonTypes.js.map +1 -1
- package/dist/CrossColumnSearch.d.ts +2 -2
- package/dist/CrossColumnSearch.d.ts.map +1 -1
- package/dist/CrossColumnSearch.js +1 -2
- package/dist/CrossColumnSearch.js.map +1 -1
- package/dist/GotoRow.d.ts +3 -1
- package/dist/GotoRow.d.ts.map +1 -1
- package/dist/GotoRow.js +1 -0
- package/dist/GotoRow.js.map +1 -1
- package/dist/IrisGrid.css +3 -0
- package/dist/IrisGrid.css.map +1 -1
- package/dist/IrisGrid.d.ts +8 -6
- package/dist/IrisGrid.d.ts.map +1 -1
- package/dist/IrisGrid.js +74 -37
- package/dist/IrisGrid.js.map +1 -1
- package/dist/IrisGridCellRendererUtils.d.ts +7 -0
- package/dist/IrisGridCellRendererUtils.d.ts.map +1 -0
- package/dist/IrisGridCellRendererUtils.js +20 -0
- package/dist/IrisGridCellRendererUtils.js.map +1 -0
- package/dist/IrisGridCopyHandler.js.map +1 -1
- package/dist/IrisGridDataBarCellRenderer.d.ts +7 -0
- package/dist/IrisGridDataBarCellRenderer.d.ts.map +1 -0
- package/dist/IrisGridDataBarCellRenderer.js +10 -0
- package/dist/IrisGridDataBarCellRenderer.js.map +1 -0
- package/dist/IrisGridIcons.d.ts +4 -0
- package/dist/IrisGridIcons.d.ts.map +1 -0
- package/dist/IrisGridIcons.js +25 -0
- package/dist/IrisGridIcons.js.map +1 -0
- package/dist/IrisGridMetricCalculator.d.ts +1 -1
- package/dist/IrisGridMetricCalculator.d.ts.map +1 -1
- package/dist/IrisGridMetricCalculator.js.map +1 -1
- package/dist/IrisGridModel.d.ts +1 -1
- package/dist/IrisGridModel.d.ts.map +1 -1
- package/dist/IrisGridModel.js.map +1 -1
- package/dist/IrisGridModelFactory.d.ts +2 -2
- package/dist/IrisGridModelFactory.d.ts.map +1 -1
- package/dist/IrisGridModelFactory.js +3 -3
- package/dist/IrisGridModelFactory.js.map +1 -1
- package/dist/IrisGridModelUpdater.d.ts +3 -2
- package/dist/IrisGridModelUpdater.d.ts.map +1 -1
- package/dist/IrisGridModelUpdater.js +2 -2
- package/dist/IrisGridModelUpdater.js.map +1 -1
- package/dist/IrisGridPartitionSelector.d.ts +2 -1
- package/dist/IrisGridPartitionSelector.d.ts.map +1 -1
- package/dist/IrisGridPartitionSelector.js +2 -0
- package/dist/IrisGridPartitionSelector.js.map +1 -1
- package/dist/IrisGridProxyModel.d.ts +3 -2
- package/dist/IrisGridProxyModel.d.ts.map +1 -1
- package/dist/IrisGridProxyModel.js +11 -9
- package/dist/IrisGridProxyModel.js.map +1 -1
- package/dist/IrisGridRenderer.d.ts +19 -27
- package/dist/IrisGridRenderer.d.ts.map +1 -1
- package/dist/IrisGridRenderer.js +64 -205
- package/dist/IrisGridRenderer.js.map +1 -1
- package/dist/IrisGridTableModel.d.ts +2 -2
- package/dist/IrisGridTableModel.d.ts.map +1 -1
- package/dist/IrisGridTableModel.js +6 -6
- package/dist/IrisGridTableModel.js.map +1 -1
- package/dist/IrisGridTableModelTemplate.d.ts +8 -3
- package/dist/IrisGridTableModelTemplate.d.ts.map +1 -1
- package/dist/IrisGridTableModelTemplate.js +42 -15
- package/dist/IrisGridTableModelTemplate.js.map +1 -1
- package/dist/IrisGridTestUtils.d.ts +14 -13
- package/dist/IrisGridTestUtils.d.ts.map +1 -1
- package/dist/IrisGridTestUtils.js +33 -27
- package/dist/IrisGridTestUtils.js.map +1 -1
- package/dist/IrisGridTextCellRenderer.d.ts +20 -0
- package/dist/IrisGridTextCellRenderer.d.ts.map +1 -0
- package/dist/IrisGridTextCellRenderer.js +139 -0
- package/dist/IrisGridTextCellRenderer.js.map +1 -0
- package/dist/IrisGridTheme.d.ts.map +1 -1
- package/dist/IrisGridTheme.js +4 -1
- package/dist/IrisGridTheme.js.map +1 -1
- package/dist/IrisGridTheme.module.css +3 -0
- package/dist/IrisGridTheme.module.css.map +1 -1
- package/dist/IrisGridTreeTableModel.d.ts +1 -1
- package/dist/IrisGridTreeTableModel.d.ts.map +1 -1
- package/dist/IrisGridTreeTableModel.js.map +1 -1
- package/dist/IrisGridUtils.d.ts +88 -85
- package/dist/IrisGridUtils.d.ts.map +1 -1
- package/dist/IrisGridUtils.js +567 -556
- package/dist/IrisGridUtils.js.map +1 -1
- package/dist/PartitionSelectorSearch.d.ts +2 -1
- package/dist/PartitionSelectorSearch.d.ts.map +1 -1
- package/dist/PartitionSelectorSearch.js +3 -1
- package/dist/PartitionSelectorSearch.js.map +1 -1
- package/dist/TableViewportUpdater.d.ts +1 -1
- package/dist/TableViewportUpdater.d.ts.map +1 -1
- package/dist/TableViewportUpdater.js.map +1 -1
- package/dist/TreeTableViewportUpdater.d.ts +2 -1
- package/dist/TreeTableViewportUpdater.d.ts.map +1 -1
- package/dist/TreeTableViewportUpdater.js +1 -1
- package/dist/TreeTableViewportUpdater.js.map +1 -1
- package/dist/format-context-menus/DecimalFormatContextMenu.d.ts +3 -1
- package/dist/format-context-menus/DecimalFormatContextMenu.d.ts.map +1 -1
- package/dist/format-context-menus/DecimalFormatContextMenu.js +3 -2
- package/dist/format-context-menus/DecimalFormatContextMenu.js.map +1 -1
- package/dist/format-context-menus/IntegerFormatContextMenu.d.ts +3 -1
- package/dist/format-context-menus/IntegerFormatContextMenu.d.ts.map +1 -1
- package/dist/format-context-menus/IntegerFormatContextMenu.js +3 -2
- package/dist/format-context-menus/IntegerFormatContextMenu.js.map +1 -1
- package/dist/mousehandlers/IrisGridColumnSelectMouseHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts +10 -9
- package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts.map +1 -1
- package/dist/mousehandlers/IrisGridContextMenuHandler.js +49 -32
- package/dist/mousehandlers/IrisGridContextMenuHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridTokenMouseHandler.d.ts.map +1 -1
- package/dist/mousehandlers/IrisGridTokenMouseHandler.js +18 -3
- package/dist/mousehandlers/IrisGridTokenMouseHandler.js.map +1 -1
- package/dist/sidebar/ChartBuilder.d.ts +12 -11
- package/dist/sidebar/ChartBuilder.d.ts.map +1 -1
- package/dist/sidebar/ChartBuilder.js +98 -81
- package/dist/sidebar/ChartBuilder.js.map +1 -1
- package/dist/sidebar/RollupRows.d.ts +1 -1
- package/dist/sidebar/RollupRows.d.ts.map +1 -1
- package/dist/sidebar/RollupRows.js.map +1 -1
- package/dist/sidebar/SelectDistinctBuilder.d.ts +1 -1
- package/dist/sidebar/SelectDistinctBuilder.d.ts.map +1 -1
- package/dist/sidebar/SelectDistinctBuilder.js.map +1 -1
- package/dist/sidebar/TableCsvExporter.d.ts +3 -2
- package/dist/sidebar/TableCsvExporter.d.ts.map +1 -1
- package/dist/sidebar/TableCsvExporter.js +3 -3
- package/dist/sidebar/TableCsvExporter.js.map +1 -1
- package/dist/sidebar/TableSaver.d.ts +2 -1
- package/dist/sidebar/TableSaver.d.ts.map +1 -1
- package/dist/sidebar/TableSaver.js +4 -1
- package/dist/sidebar/TableSaver.js.map +1 -1
- package/dist/sidebar/aggregations/AggregationEdit.d.ts +1 -1
- package/dist/sidebar/aggregations/AggregationEdit.d.ts.map +1 -1
- package/dist/sidebar/aggregations/AggregationEdit.js.map +1 -1
- package/dist/sidebar/aggregations/AggregationUtils.d.ts +1 -1
- package/dist/sidebar/aggregations/AggregationUtils.d.ts.map +1 -1
- package/dist/sidebar/aggregations/AggregationUtils.js.map +1 -1
- package/dist/sidebar/conditional-formatting/ColumnFormatEditor.d.ts +2 -0
- package/dist/sidebar/conditional-formatting/ColumnFormatEditor.d.ts.map +1 -1
- package/dist/sidebar/conditional-formatting/ColumnFormatEditor.js +2 -0
- package/dist/sidebar/conditional-formatting/ColumnFormatEditor.js.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionEditor.d.ts +2 -0
- package/dist/sidebar/conditional-formatting/ConditionEditor.d.ts.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionEditor.js +3 -2
- package/dist/sidebar/conditional-formatting/ConditionEditor.js.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.d.ts +2 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.d.ts.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.js +3 -0
- package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.js.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.d.ts +2 -2
- package/dist/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.d.ts.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.js +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.js.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.d.ts +3 -3
- package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.d.ts.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.js +3 -3
- package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.js.map +1 -1
- package/dist/sidebar/conditional-formatting/RowFormatEditor.d.ts +2 -0
- package/dist/sidebar/conditional-formatting/RowFormatEditor.d.ts.map +1 -1
- package/dist/sidebar/conditional-formatting/RowFormatEditor.js +2 -0
- package/dist/sidebar/conditional-formatting/RowFormatEditor.js.map +1 -1
- package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.d.ts +1 -1
- package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.d.ts.map +1 -1
- package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.js.map +1 -1
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/utilities.d.ts +1 -1
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/utilities.d.ts.map +1 -1
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/utilities.js.map +1 -1
- package/package.json +16 -15
package/dist/IrisGrid.js
CHANGED
|
@@ -16,7 +16,6 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
|
16
16
|
import { ContextActions, Stack, Menu, Page, Popper, ThemeExport, Tooltip, Button, ContextActionUtils } from '@deephaven/components';
|
|
17
17
|
import { Grid, GridRange, GridUtils, isEditableGridModel, isExpandableGridModel } from '@deephaven/grid';
|
|
18
18
|
import { dhEye, dhFilterFilled, dhGraphLineUp, dhTriangleDownSquare, vsClose, vsCloudDownload, vsEdit, vsFilter, vsMenu, vsReply, vsRuby, vsSearch, vsSplitHorizontal, vsSymbolOperator, vsTools } from '@deephaven/icons';
|
|
19
|
-
import dh from '@deephaven/jsapi-shim';
|
|
20
19
|
import { DateUtils, Formatter, FormatterUtils, TableUtils } from '@deephaven/jsapi-utils';
|
|
21
20
|
import { assertNotNull, copyToClipboard, EMPTY_ARRAY, EMPTY_MAP, Pending, PromiseUtils, ValidationError, getOrThrow } from '@deephaven/utils';
|
|
22
21
|
import { Type as FilterType } from '@deephaven/filters';
|
|
@@ -75,14 +74,6 @@ function isEmptyConfig(_ref) {
|
|
|
75
74
|
return advancedFilters.size === 0 && aggregationSettings.aggregations.length === 0 && customColumns.length === 0 && quickFilters.size === 0 && reverseType === TableUtils.REVERSE_TYPE.NONE && rollupConfig == null && searchFilter == null && selectDistinctColumns.length === 0 && sorts.length === 0;
|
|
76
75
|
}
|
|
77
76
|
export class IrisGrid extends Component {
|
|
78
|
-
static makeQuickFilter(column, text, timeZone) {
|
|
79
|
-
try {
|
|
80
|
-
return TableUtils.makeQuickFilter(column, text, timeZone);
|
|
81
|
-
} catch (err) {
|
|
82
|
-
log.error('Error creating quick filter', err);
|
|
83
|
-
}
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
77
|
constructor(props) {
|
|
87
78
|
var _model$layoutHints, _model$layoutHints$hi, _model$columns$0$name, _model$columns$;
|
|
88
79
|
super(props);
|
|
@@ -112,19 +103,27 @@ export class IrisGrid extends Component {
|
|
|
112
103
|
_defineProperty(this, "discardAction", void 0);
|
|
113
104
|
_defineProperty(this, "commitAction", void 0);
|
|
114
105
|
_defineProperty(this, "contextActions", void 0);
|
|
106
|
+
_defineProperty(this, "tableUtils", void 0);
|
|
115
107
|
_defineProperty(this, "getAdvancedMenuOpenedHandler", memoize(column => this.handleAdvancedMenuOpened.bind(this, column), {
|
|
116
108
|
max: 100
|
|
117
109
|
}));
|
|
118
|
-
_defineProperty(this, "getCachedAdvancedFilterMenuActions", memoize((model, column, advancedFilterOptions, sortDirection, formatter) =>
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
110
|
+
_defineProperty(this, "getCachedAdvancedFilterMenuActions", memoize((model, column, advancedFilterOptions, sortDirection, formatter) => {
|
|
111
|
+
var {
|
|
112
|
+
dh
|
|
113
|
+
} = this.props;
|
|
114
|
+
return /*#__PURE__*/React.createElement(AdvancedFilterCreator, {
|
|
115
|
+
dh: dh,
|
|
116
|
+
model: model,
|
|
117
|
+
column: column,
|
|
118
|
+
onFilterChange: this.handleAdvancedFilterChange,
|
|
119
|
+
onSortChange: this.handleAdvancedFilterSortChange,
|
|
120
|
+
onDone: this.handleAdvancedFilterDone,
|
|
121
|
+
options: advancedFilterOptions,
|
|
122
|
+
sortDirection: sortDirection,
|
|
123
|
+
formatter: formatter,
|
|
124
|
+
tableUtils: this.tableUtils
|
|
125
|
+
});
|
|
126
|
+
}, {
|
|
128
127
|
max: 50
|
|
129
128
|
}));
|
|
130
129
|
_defineProperty(this, "getCachedOptionItems", memoize((isChartBuilderAvailable, isCustomColumnsAvailable, isFormatColumnsAvailable, isRollupAvailable, isTotalsAvailable, isSelectDistinctAvailable, isExportAvailable, toggleFilterBarAction, toggleSearchBarAction, toggleGotoRowAction, isFilterBarShown, showSearchBar, canDownloadCsv, canToggleSearch, showGotoRow, hasAdvancedSettings) => {
|
|
@@ -252,15 +251,15 @@ export class IrisGrid extends Component {
|
|
|
252
251
|
return operationMap;
|
|
253
252
|
}));
|
|
254
253
|
_defineProperty(this, "getOperationOrder", memoize(aggregations => aggregations.map(a => a.operation).filter(o => !AggregationUtils.isRollupOperation(o))));
|
|
255
|
-
_defineProperty(this, "getCachedFormatColumns", memoize((columns, rules) => getFormatColumns(columns, rules)));
|
|
256
|
-
_defineProperty(this, "getCachedPreviewFormatColumns", memoize((columns, rulesParam, preview, editIndex) => {
|
|
254
|
+
_defineProperty(this, "getCachedFormatColumns", memoize((dh, columns, rules) => getFormatColumns(dh, columns, rules)));
|
|
255
|
+
_defineProperty(this, "getCachedPreviewFormatColumns", memoize((dh, columns, rulesParam, preview, editIndex) => {
|
|
257
256
|
log.debug('getCachedPreviewFormatColumns', rulesParam, preview, editIndex);
|
|
258
257
|
if (preview !== undefined && editIndex !== undefined) {
|
|
259
258
|
var rules = [...rulesParam];
|
|
260
259
|
rules[editIndex] = preview;
|
|
261
|
-
return this.getCachedFormatColumns(columns, rules);
|
|
260
|
+
return this.getCachedFormatColumns(dh, columns, rules);
|
|
262
261
|
}
|
|
263
|
-
return this.getCachedFormatColumns(columns, rulesParam);
|
|
262
|
+
return this.getCachedFormatColumns(dh, columns, rulesParam);
|
|
264
263
|
}));
|
|
265
264
|
_defineProperty(this, "getModelRollupConfig", memoize((originalColumns, config, aggregationSettings) => IrisGridUtils.getModelRollupConfig(originalColumns, config, aggregationSettings)));
|
|
266
265
|
_defineProperty(this, "getModelTotalsConfig", memoize((columns, config, aggregationSettings) => {
|
|
@@ -322,7 +321,10 @@ export class IrisGrid extends Component {
|
|
|
322
321
|
return Object.freeze([...columnSet]);
|
|
323
322
|
}));
|
|
324
323
|
_defineProperty(this, "updateSearchFilter", debounce((searchValue, selectedSearchColumns, columns, invertSearchColumns) => {
|
|
325
|
-
var
|
|
324
|
+
var {
|
|
325
|
+
dh
|
|
326
|
+
} = this.props;
|
|
327
|
+
var searchFilter = CrossColumnSearch.createSearchFilter(dh, searchValue, selectedSearchColumns, columns, invertSearchColumns);
|
|
326
328
|
this.setState({
|
|
327
329
|
searchFilter
|
|
328
330
|
});
|
|
@@ -544,6 +546,7 @@ export class IrisGrid extends Component {
|
|
|
544
546
|
};
|
|
545
547
|
this.contextActions = [this.toggleFilterBarAction, this.toggleSearchBarAction, this.toggleGotoRowAction, this.discardAction, this.commitAction];
|
|
546
548
|
var {
|
|
549
|
+
dh: _dh,
|
|
547
550
|
aggregationSettings: _aggregationSettings,
|
|
548
551
|
conditionalFormats,
|
|
549
552
|
customColumnFormatMap,
|
|
@@ -573,7 +576,7 @@ export class IrisGrid extends Component {
|
|
|
573
576
|
if (canCopy) {
|
|
574
577
|
keyHandlers.push(new CopyKeyHandler(this));
|
|
575
578
|
}
|
|
576
|
-
var mouseHandlers = [new IrisGridCellOverflowMouseHandler(this), new IrisGridRowTreeMouseHandler(this), new IrisGridTokenMouseHandler(this), new IrisGridColumnSelectMouseHandler(this), new IrisGridColumnTooltipMouseHandler(this), new IrisGridSortMouseHandler(this), new IrisGridFilterMouseHandler(this), new IrisGridContextMenuHandler(this), new IrisGridDataSelectMouseHandler(this), new PendingMouseHandler(this)];
|
|
579
|
+
var mouseHandlers = [new IrisGridCellOverflowMouseHandler(this), new IrisGridRowTreeMouseHandler(this), new IrisGridTokenMouseHandler(this), new IrisGridColumnSelectMouseHandler(this), new IrisGridColumnTooltipMouseHandler(this), new IrisGridSortMouseHandler(this), new IrisGridFilterMouseHandler(this), new IrisGridContextMenuHandler(this, _dh), new IrisGridDataSelectMouseHandler(this), new PendingMouseHandler(this)];
|
|
577
580
|
var _movedColumns = movedColumnsProp.length > 0 ? movedColumnsProp : _model.initialMovedColumns;
|
|
578
581
|
var movedRows = movedRowsProp.length > 0 ? movedRowsProp : _model.initialMovedRows;
|
|
579
582
|
var _metricCalculator = new IrisGridMetricCalculator({
|
|
@@ -583,7 +586,8 @@ export class IrisGrid extends Component {
|
|
|
583
586
|
initialColumnWidths: new Map(_model === null || _model === void 0 ? void 0 : (_model$layoutHints = _model.layoutHints) === null || _model$layoutHints === void 0 ? void 0 : (_model$layoutHints$hi = _model$layoutHints.hiddenColumns) === null || _model$layoutHints$hi === void 0 ? void 0 : _model$layoutHints$hi.map(name => [_model.getColumnIndexByName(name), 0]))
|
|
584
587
|
});
|
|
585
588
|
var searchColumns = _selectedSearchColumns !== null && _selectedSearchColumns !== void 0 ? _selectedSearchColumns : [];
|
|
586
|
-
var _searchFilter = CrossColumnSearch.createSearchFilter(_searchValue, searchColumns, _model.columns, _invertSearchColumns);
|
|
589
|
+
var _searchFilter = CrossColumnSearch.createSearchFilter(_dh, _searchValue, searchColumns, _model.columns, _invertSearchColumns);
|
|
590
|
+
this.tableUtils = new TableUtils(_dh);
|
|
587
591
|
this.state = {
|
|
588
592
|
isFilterBarShown: _isFilterBarShown,
|
|
589
593
|
isSelectingPartition,
|
|
@@ -617,7 +621,7 @@ export class IrisGrid extends Component {
|
|
|
617
621
|
movedColumns: _movedColumns,
|
|
618
622
|
movedRows,
|
|
619
623
|
shownColumnTooltip: null,
|
|
620
|
-
formatter: new Formatter(),
|
|
624
|
+
formatter: new Formatter(_dh),
|
|
621
625
|
isMenuShown: false,
|
|
622
626
|
customColumnFormatMap: new Map(customColumnFormatMap),
|
|
623
627
|
conditionalFormats,
|
|
@@ -761,6 +765,7 @@ export class IrisGrid extends Component {
|
|
|
761
765
|
getValueForCell(columnIndex, rowIndex) {
|
|
762
766
|
var rawValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
763
767
|
var {
|
|
768
|
+
dh,
|
|
764
769
|
model
|
|
765
770
|
} = this.props;
|
|
766
771
|
var modelColumn = this.getModelColumn(columnIndex);
|
|
@@ -824,6 +829,14 @@ export class IrisGrid extends Component {
|
|
|
824
829
|
} = this.state;
|
|
825
830
|
return GridUtils.getVisibleIndex(modelIndex, movedColumns);
|
|
826
831
|
}
|
|
832
|
+
makeQuickFilter(column, text, timeZone) {
|
|
833
|
+
try {
|
|
834
|
+
return this.tableUtils.makeQuickFilter(column, text, timeZone);
|
|
835
|
+
} catch (err) {
|
|
836
|
+
log.error('Error creating quick filter', err);
|
|
837
|
+
}
|
|
838
|
+
return null;
|
|
839
|
+
}
|
|
827
840
|
|
|
828
841
|
/**
|
|
829
842
|
* Applies the provided input filters as quick filters,
|
|
@@ -899,7 +912,7 @@ export class IrisGrid extends Component {
|
|
|
899
912
|
}
|
|
900
913
|
quickFilters.set(modelIndex, {
|
|
901
914
|
text: value,
|
|
902
|
-
filter:
|
|
915
|
+
filter: this.makeQuickFilter(column, value, formatter.timeZone)
|
|
903
916
|
});
|
|
904
917
|
return true;
|
|
905
918
|
}
|
|
@@ -991,7 +1004,7 @@ export class IrisGrid extends Component {
|
|
|
991
1004
|
var {
|
|
992
1005
|
formatter
|
|
993
1006
|
} = model;
|
|
994
|
-
this.setQuickFilter(columnIndex,
|
|
1007
|
+
this.setQuickFilter(columnIndex, this.makeQuickFilter(column, combinedText, formatter.timeZone), "".concat(combinedText));
|
|
995
1008
|
}
|
|
996
1009
|
});
|
|
997
1010
|
}
|
|
@@ -1082,7 +1095,7 @@ export class IrisGrid extends Component {
|
|
|
1082
1095
|
options
|
|
1083
1096
|
} = value;
|
|
1084
1097
|
var column = columns[key];
|
|
1085
|
-
var filter =
|
|
1098
|
+
var filter = this.tableUtils.makeAdvancedFilter(column, options, formatter.timeZone);
|
|
1086
1099
|
newAdvancedFilters.set(key, {
|
|
1087
1100
|
options,
|
|
1088
1101
|
filter
|
|
@@ -1095,7 +1108,7 @@ export class IrisGrid extends Component {
|
|
|
1095
1108
|
var column = columns[key];
|
|
1096
1109
|
newQuickFilters.set(key, {
|
|
1097
1110
|
text,
|
|
1098
|
-
filter:
|
|
1111
|
+
filter: this.makeQuickFilter(column, text, formatter.timeZone)
|
|
1099
1112
|
});
|
|
1100
1113
|
});
|
|
1101
1114
|
this.startLoading('Rebuilding filters...', true);
|
|
@@ -1145,11 +1158,14 @@ export class IrisGrid extends Component {
|
|
|
1145
1158
|
var {
|
|
1146
1159
|
customColumnFormatMap
|
|
1147
1160
|
} = this.state;
|
|
1161
|
+
var {
|
|
1162
|
+
dh
|
|
1163
|
+
} = this.props;
|
|
1148
1164
|
var update = _objectSpread({
|
|
1149
1165
|
customColumnFormatMap
|
|
1150
1166
|
}, updatedFormats);
|
|
1151
1167
|
var mergedColumnFormats = [...((_this$globalColumnFor = this.globalColumnFormats) !== null && _this$globalColumnFor !== void 0 ? _this$globalColumnFor : []), ...update.customColumnFormatMap.values()];
|
|
1152
|
-
var formatter = new Formatter(mergedColumnFormats, this.dateTimeFormatterOptions, this.decimalFormatOptions, this.integerFormatOptions, this.truncateNumbersWithPound);
|
|
1168
|
+
var formatter = new Formatter(dh, mergedColumnFormats, this.dateTimeFormatterOptions, this.decimalFormatOptions, this.integerFormatOptions, this.truncateNumbersWithPound);
|
|
1153
1169
|
log.debug('updateFormatter', this.globalColumnFormats, mergedColumnFormats);
|
|
1154
1170
|
this.setState(_objectSpread(_objectSpread({}, update), {}, {
|
|
1155
1171
|
formatter
|
|
@@ -1168,6 +1184,7 @@ export class IrisGrid extends Component {
|
|
|
1168
1184
|
initState() {
|
|
1169
1185
|
var {
|
|
1170
1186
|
applyInputFiltersOnInit,
|
|
1187
|
+
dh,
|
|
1171
1188
|
inputFilters,
|
|
1172
1189
|
sorts,
|
|
1173
1190
|
model,
|
|
@@ -1178,7 +1195,7 @@ export class IrisGrid extends Component {
|
|
|
1178
1195
|
invertSearchColumns
|
|
1179
1196
|
} = this.props;
|
|
1180
1197
|
var searchColumns = selectedSearchColumns !== null && selectedSearchColumns !== void 0 ? selectedSearchColumns : [];
|
|
1181
|
-
var searchFilter = CrossColumnSearch.createSearchFilter(searchValue, searchColumns, model.columns, invertSearchColumns);
|
|
1198
|
+
var searchFilter = CrossColumnSearch.createSearchFilter(dh, searchValue, searchColumns, model.columns, invertSearchColumns);
|
|
1182
1199
|
if (applyInputFiltersOnInit) {
|
|
1183
1200
|
// There may be more than one input filter on the same column with value === '' applied last
|
|
1184
1201
|
// We don't want to skip it here, so only excluding the ones that were never applied (null)
|
|
@@ -1236,6 +1253,9 @@ export class IrisGrid extends Component {
|
|
|
1236
1253
|
})();
|
|
1237
1254
|
}
|
|
1238
1255
|
updatePartition(partition, partitionColumn) {
|
|
1256
|
+
var {
|
|
1257
|
+
dh
|
|
1258
|
+
} = this.props;
|
|
1239
1259
|
var partitionFilter = partitionColumn.filter().eq(dh.FilterValue.ofString(partition));
|
|
1240
1260
|
var partitionFilters = [partitionFilter];
|
|
1241
1261
|
this.setState({
|
|
@@ -1724,6 +1744,7 @@ export class IrisGrid extends Component {
|
|
|
1724
1744
|
isTableSearchAvailable() {
|
|
1725
1745
|
var _model$layoutHints3, _dh$SearchDisplayMode, _dh$SearchDisplayMode2;
|
|
1726
1746
|
var {
|
|
1747
|
+
dh,
|
|
1727
1748
|
model,
|
|
1728
1749
|
canToggleSearch
|
|
1729
1750
|
} = this.props;
|
|
@@ -2526,6 +2547,7 @@ export class IrisGrid extends Component {
|
|
|
2526
2547
|
gotoValueSelectedFilter
|
|
2527
2548
|
} = _this5.state;
|
|
2528
2549
|
var {
|
|
2550
|
+
dh,
|
|
2529
2551
|
model
|
|
2530
2552
|
} = _this5.props;
|
|
2531
2553
|
if (!model.isSeekRowAvailable) {
|
|
@@ -2560,7 +2582,7 @@ export class IrisGrid extends Component {
|
|
|
2560
2582
|
}
|
|
2561
2583
|
case TableUtils.dataType.DATETIME:
|
|
2562
2584
|
{
|
|
2563
|
-
var [startDate] = DateUtils.parseDateRange(inputString, formatter.timeZone);
|
|
2585
|
+
var [startDate] = DateUtils.parseDateRange(dh, inputString, formatter.timeZone);
|
|
2564
2586
|
rowIndex = yield model.seekRow(searchFromRow, selectedColumn, dh.ValueType.DATETIME, startDate, undefined, undefined, isBackwards !== null && isBackwards !== void 0 ? isBackwards : false);
|
|
2565
2587
|
break;
|
|
2566
2588
|
}
|
|
@@ -2582,7 +2604,7 @@ export class IrisGrid extends Component {
|
|
|
2582
2604
|
}
|
|
2583
2605
|
default:
|
|
2584
2606
|
{
|
|
2585
|
-
rowIndex = yield model.seekRow(searchFromRow, selectedColumn, dh.ValueType.STRING,
|
|
2607
|
+
rowIndex = yield model.seekRow(searchFromRow, selectedColumn, dh.ValueType.STRING, _this5.tableUtils.makeValue(selectedColumn.type, inputString, formatter.timeZone), undefined, undefined, isBackwards !== null && isBackwards !== void 0 ? isBackwards : false);
|
|
2586
2608
|
}
|
|
2587
2609
|
}
|
|
2588
2610
|
(_this5$grid2 = _this5.grid) === null || _this5$grid2 === void 0 ? void 0 : _this5$grid2.setFocusRow(rowIndex);
|
|
@@ -2912,6 +2934,7 @@ export class IrisGrid extends Component {
|
|
|
2912
2934
|
_this$grid29$state$dr,
|
|
2913
2935
|
_openOptions;
|
|
2914
2936
|
var {
|
|
2937
|
+
dh,
|
|
2915
2938
|
children,
|
|
2916
2939
|
customFilters,
|
|
2917
2940
|
getDownloadWorker,
|
|
@@ -3215,6 +3238,12 @@ export class IrisGrid extends Component {
|
|
|
3215
3238
|
var _modelColumn = _this6.getModelColumn(columnIndex);
|
|
3216
3239
|
if (_modelColumn != null) {
|
|
3217
3240
|
var _column4 = model.columns[_modelColumn];
|
|
3241
|
+
if (_column4 == null) {
|
|
3242
|
+
// Grid metrics is likely out of sync with model
|
|
3243
|
+
log.warn("Column does not exist at index ".concat(_modelColumn, " for column array of length ").concat(model.columns.length));
|
|
3244
|
+
// eslint-disable-next-line no-continue
|
|
3245
|
+
return "continue";
|
|
3246
|
+
}
|
|
3218
3247
|
var _advancedFilter2 = advancedFilters.get(_modelColumn);
|
|
3219
3248
|
var {
|
|
3220
3249
|
options: advancedFilterOptions
|
|
@@ -3243,7 +3272,8 @@ export class IrisGrid extends Component {
|
|
|
3243
3272
|
}
|
|
3244
3273
|
};
|
|
3245
3274
|
for (var _i3 = 0; _i3 < _visibleColumns.length; _i3 += 1) {
|
|
3246
|
-
_loop3();
|
|
3275
|
+
var _ret = _loop3();
|
|
3276
|
+
if (_ret === "continue") continue;
|
|
3247
3277
|
}
|
|
3248
3278
|
}
|
|
3249
3279
|
var optionItems = this.getCachedOptionItems(onCreateChart !== undefined && model.isChartBuilderAvailable, model.isCustomColumnsAvailable, model.isFormatColumnsAvailable, model.isRollupAvailable, model.isTotalsAvailable || isRollup, model.isSelectDistinctAvailable, model.isExportAvailable, this.toggleFilterBarAction, this.toggleSearchBarAction, this.toggleGotoRowAction, isFilterBarShown, showSearchBar, canDownloadCsv, this.isTableSearchAvailable(), isGotoShown, advancedSettings.size > 0);
|
|
@@ -3253,6 +3283,7 @@ export class IrisGrid extends Component {
|
|
|
3253
3283
|
case OptionType.CHART_BUILDER:
|
|
3254
3284
|
return /*#__PURE__*/React.createElement(ChartBuilder, {
|
|
3255
3285
|
model: model,
|
|
3286
|
+
dh: dh,
|
|
3256
3287
|
onChange: this.handleChartChange,
|
|
3257
3288
|
onSubmit: this.handleChartCreate,
|
|
3258
3289
|
key: OptionType.CHART_BUILDER
|
|
@@ -3280,6 +3311,7 @@ export class IrisGrid extends Component {
|
|
|
3280
3311
|
assertNotNull(model.columns);
|
|
3281
3312
|
assertNotNull(this.handleConditionalFormatEditorUpdate);
|
|
3282
3313
|
return /*#__PURE__*/React.createElement(ConditionalFormatEditor, {
|
|
3314
|
+
dh: dh,
|
|
3283
3315
|
columns: model.columns,
|
|
3284
3316
|
rule: conditionalFormatPreview,
|
|
3285
3317
|
onUpdate: this.handleConditionalFormatEditorUpdate,
|
|
@@ -3316,6 +3348,7 @@ export class IrisGrid extends Component {
|
|
|
3316
3348
|
});
|
|
3317
3349
|
case OptionType.TABLE_EXPORTER:
|
|
3318
3350
|
return /*#__PURE__*/React.createElement(TableCsvExporter, {
|
|
3351
|
+
dh: dh,
|
|
3319
3352
|
model: model,
|
|
3320
3353
|
name: name,
|
|
3321
3354
|
userColumnWidths: userColumnWidths,
|
|
@@ -3365,6 +3398,7 @@ export class IrisGrid extends Component {
|
|
|
3365
3398
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3366
3399
|
className: "iris-grid-partition-selector-wrapper iris-grid-bar iris-grid-bar-primary"
|
|
3367
3400
|
}, partitionTable && partitionColumn && partition != null && /*#__PURE__*/React.createElement(IrisGridPartitionSelector, {
|
|
3401
|
+
dh: dh,
|
|
3368
3402
|
table: partitionTable,
|
|
3369
3403
|
getFormattedString: (value, type, stringName) => model.displayString(value, type, stringName),
|
|
3370
3404
|
columnName: partitionColumn.name,
|
|
@@ -3422,6 +3456,7 @@ export class IrisGrid extends Component {
|
|
|
3422
3456
|
text: overflowText,
|
|
3423
3457
|
onClose: this.handleOverflowClose
|
|
3424
3458
|
}), isVisible && /*#__PURE__*/React.createElement(IrisGridModelUpdater, {
|
|
3459
|
+
dh: dh,
|
|
3425
3460
|
model: model,
|
|
3426
3461
|
modelColumns: model.columns,
|
|
3427
3462
|
top: top,
|
|
@@ -3436,7 +3471,7 @@ export class IrisGrid extends Component {
|
|
|
3436
3471
|
customColumns: customColumns,
|
|
3437
3472
|
hiddenColumns: hiddenColumns,
|
|
3438
3473
|
alwaysFetchColumns: this.getAlwaysFetchColumns(alwaysFetchColumns, model.columns, movedColumns, model.floatingLeftColumnCount, model.floatingRightColumnCount, (_this$grid29 = this.grid) === null || _this$grid29 === void 0 ? void 0 : (_this$grid29$state$dr = _this$grid29.state.draggingColumn) === null || _this$grid29$state$dr === void 0 ? void 0 : _this$grid29$state$dr.range),
|
|
3439
|
-
formatColumns: this.getCachedPreviewFormatColumns(model.columns, conditionalFormats, conditionalFormatPreview,
|
|
3474
|
+
formatColumns: this.getCachedPreviewFormatColumns(dh, model.columns, conditionalFormats, conditionalFormatPreview,
|
|
3440
3475
|
// Disable the preview format when we press Back on the format edit page
|
|
3441
3476
|
((_openOptions = openOptions[openOptions.length - 1]) === null || _openOptions === void 0 ? void 0 : _openOptions.type) === OptionType.CONDITIONAL_FORMATTING_EDIT ? conditionalFormatEditIndex !== null && conditionalFormatEditIndex !== void 0 ? conditionalFormatEditIndex : undefined : undefined),
|
|
3442
3477
|
rollupConfig: this.getModelRollupConfig(model.originalColumns, rollupConfig, aggregationSettings),
|
|
@@ -3458,6 +3493,7 @@ export class IrisGrid extends Component {
|
|
|
3458
3493
|
}),
|
|
3459
3494
|
tooltip: "Table Options"
|
|
3460
3495
|
})), focusField, loadingElement, filterBar, columnTooltip, advancedFilterMenus, overflowButtonTooltipProps && this.getOverflowButtonTooltip(overflowButtonTooltipProps), expandCellTooltipProps && this.getExpandCellTooltip(expandCellTooltipProps), linkHoverTooltipProps && this.getLinkHoverTooltip(linkHoverTooltipProps)), /*#__PURE__*/React.createElement(GotoRow, {
|
|
3496
|
+
dh: dh,
|
|
3461
3497
|
model: model,
|
|
3462
3498
|
isShown: isGotoShown,
|
|
3463
3499
|
gotoRow: gotoRow,
|
|
@@ -3501,6 +3537,7 @@ export class IrisGrid extends Component {
|
|
|
3501
3537
|
onExiting: this.handleAnimationStart,
|
|
3502
3538
|
onExited: this.handleAnimationEnd
|
|
3503
3539
|
}), /*#__PURE__*/React.createElement(TableSaver, {
|
|
3540
|
+
dh: dh,
|
|
3504
3541
|
ref: tableSaver => {
|
|
3505
3542
|
this.tableSaver = tableSaver;
|
|
3506
3543
|
},
|