@adaptabletools/adaptable 17.0.3 → 17.0.5
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/bundle.cjs.js +172 -172
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/Api/EventApi.d.ts +16 -4
- package/src/Api/Events/CalculatedColumnChanged.d.ts +12 -0
- package/src/Api/Events/CalculatedColumnChanged.js +2 -0
- package/src/Api/Implementation/ExpressionApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExpressionApiImpl.js +3 -4
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +1 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +11 -0
- package/src/Api/Internal/DataImportInternalApi.js +2 -0
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +6 -1
- package/src/Redux/ActionsReducers/SystemRedux.js +9 -2
- package/src/Redux/Store/AdaptableStore.js +2 -0
- package/src/Strategy/LayoutModule.js +8 -8
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +11 -11
- package/src/View/Charting/useChartingElements.js +8 -3
- package/src/agGrid/Adaptable.js +13 -7
- package/src/types.d.ts +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- /package/src/Api/Internal/{ExpressionnternalApi.d.ts → ExpressionInternalApi.d.ts} +0 -0
- /package/src/Api/Internal/{ExpressionnternalApi.js → ExpressionInternalApi.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.5",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1707035112774;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
package/src/Api/EventApi.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CellSelectionChangedInfo, RowSelectionChangedInfo, LiveDataChangedInfo, DashboardChangedInfo, ThemeChangedInfo, AlertFiredInfo, LayoutChangedInfo, AdaptableReadyInfo, CustomToolbarConfiguredInfo, CellChangedInfo, SystemStatusMessageDisplayedInfo, AdaptableStateChangedInfo, FlashingCellDisplayedInfo, GridDataChangedInfo, TeamSharingEntityChangedInfo, ActionRowSubmittedInfo, DataSetSelectedInfo, AdaptableStateReloadedInfo, GridSortedInfo, ScheduleTriggeredInfo, ChartChangedInfo, ThemeEditedInfo, Fdc3MessageInfo, DataImportedInfo, ColumnFilterAppliedInfo, GridFilterAppliedInfo } from '../types';
|
|
2
|
+
import { CalculatedColumnChangedInfo } from './Events/CalculatedColumnChanged';
|
|
2
3
|
/**
|
|
3
4
|
* Responsible for publishing the many Events that AdapTable fires
|
|
4
5
|
*/
|
|
@@ -182,14 +183,25 @@ export interface EventApi {
|
|
|
182
183
|
* @param callback LayoutChanged which includes just the name of the currently selected Layout.
|
|
183
184
|
* @returns the unsubscribe function
|
|
184
185
|
*/
|
|
185
|
-
on(eventName: 'LayoutChanged', callback: (
|
|
186
|
+
on(eventName: 'LayoutChanged', callback: (layoutChangedInfo: LayoutChangedInfo) => void): VoidFunction;
|
|
186
187
|
/**
|
|
187
188
|
* Unsubscribe from LayoutChanged
|
|
188
189
|
*/
|
|
189
|
-
off(eventName: 'LayoutChanged', callback: (
|
|
190
|
+
off(eventName: 'LayoutChanged', callback: (layoutChangedInfo: LayoutChangedInfo) => void): void;
|
|
191
|
+
/**
|
|
192
|
+
* Event fired whenever a Calculated Columns is created / updated / deleted in AdapTable
|
|
193
|
+
* @param eventName CalculatedColumnChanged
|
|
194
|
+
* @param callback CalculatedColumnChanged which includes the action and details of the Calculated Column
|
|
195
|
+
* @returns the unsubscribe function
|
|
196
|
+
*/
|
|
197
|
+
on(eventName: 'CalculatedColumnChanged', callback: (calculatedColumnChangedInfo: CalculatedColumnChangedInfo) => void): VoidFunction;
|
|
198
|
+
/**
|
|
199
|
+
* Unsubscribe from CalculatedColumnChanged
|
|
200
|
+
*/
|
|
201
|
+
off(eventName: 'CalculatedColumnChanged', callback: (calculatedColumnChangedInfo: CalculatedColumnChangedInfo) => void): void;
|
|
190
202
|
/**
|
|
191
203
|
* Event fired whenever **Configure Button is clicked in a Custom Toolbar**
|
|
192
|
-
* @param eventName
|
|
204
|
+
* @param eventName CustomToolbarConfigured
|
|
193
205
|
* @param callback CustomToolbarConfiguredInfo which contains the Custom Toolbar
|
|
194
206
|
* @returns the unsubscribe function
|
|
195
207
|
*/
|
|
@@ -327,6 +339,6 @@ export interface EventApi {
|
|
|
327
339
|
emitSync(eventName: 'DashboardChanged', data?: any): any[];
|
|
328
340
|
emitSync(eventName: 'FlashingCellDisplayed', data?: any): any[];
|
|
329
341
|
emitSync(eventName: 'AdaptableDestroy'): any[];
|
|
330
|
-
emit(eventName: 'ActionRowSubmitted' | 'AdaptableReady' | 'AlertFired' | 'AdaptableStateChanged' | 'AdaptableStateReloaded' | 'CellChanged' | 'ChartChanged' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'DashboardChanged' | 'DataImported' | 'DataSetSelected' | 'ColumnFilterApplied' | 'Fdc3Message' | 'GridDataChanged' | 'GridSorted' | 'LayoutChanged' | 'LiveDataChanged' | 'ScheduleTriggered' | 'SearchChanged' | 'CellSelectionChanged' | 'RowSelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged' | 'ThemeEdited' | 'GridFilterApplied', data?: any): Promise<any>;
|
|
342
|
+
emit(eventName: 'ActionRowSubmitted' | 'AdaptableReady' | 'AlertFired' | 'AdaptableStateChanged' | 'AdaptableStateReloaded' | 'CellChanged' | 'ChartChanged' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'DashboardChanged' | 'DataImported' | 'DataSetSelected' | 'ColumnFilterApplied' | 'Fdc3Message' | 'GridDataChanged' | 'GridSorted' | 'LayoutChanged' | 'CalculatedColumnChanged' | 'LiveDataChanged' | 'ScheduleTriggered' | 'SearchChanged' | 'CellSelectionChanged' | 'RowSelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged' | 'ThemeEdited' | 'GridFilterApplied', data?: any): Promise<any>;
|
|
331
343
|
destroy(): void;
|
|
332
344
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CalculatedColumn } from '../../PredefinedConfig/CalculatedColumnState';
|
|
2
|
+
import { BaseEventInfo } from './BaseEventInfo';
|
|
3
|
+
/**
|
|
4
|
+
* EventInfo returned by CalculatedColumnChanged event
|
|
5
|
+
*/
|
|
6
|
+
export interface CalculatedColumnChangedInfo extends BaseEventInfo {
|
|
7
|
+
/**
|
|
8
|
+
* What caused CalculatedColumn State to change
|
|
9
|
+
*/
|
|
10
|
+
actionName: string;
|
|
11
|
+
calculatedColumn: CalculatedColumn;
|
|
12
|
+
}
|
|
@@ -4,7 +4,7 @@ import { ExpressionApi } from '../ExpressionApi';
|
|
|
4
4
|
import { AdaptableQuery } from '../../PredefinedConfig/Common/AdaptableQuery';
|
|
5
5
|
import { AdaptableColumnBase } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
6
6
|
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
7
|
-
import { ExpressionInternalApi } from '../Internal/
|
|
7
|
+
import { ExpressionInternalApi } from '../Internal/ExpressionInternalApi';
|
|
8
8
|
export declare class ExpressionApiImpl extends ApiBase implements ExpressionApi {
|
|
9
9
|
internalApi: ExpressionInternalApi;
|
|
10
10
|
constructor(adaptable: IAdaptable);
|
|
@@ -4,11 +4,11 @@ exports.ExpressionApiImpl = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ApiBase_1 = require("./ApiBase");
|
|
6
6
|
const parser = tslib_1.__importStar(require("../../parser/src"));
|
|
7
|
-
const
|
|
7
|
+
const ExpressionInternalApi_1 = require("../Internal/ExpressionInternalApi");
|
|
8
8
|
class ExpressionApiImpl extends ApiBase_1.ApiBase {
|
|
9
9
|
constructor(adaptable) {
|
|
10
10
|
super(adaptable);
|
|
11
|
-
this.internalApi = new
|
|
11
|
+
this.internalApi = new ExpressionInternalApi_1.ExpressionInternalApi(adaptable);
|
|
12
12
|
}
|
|
13
13
|
isValidBooleanExpression(query, module, validationErrorMessage) {
|
|
14
14
|
const { isValid, errorMessage } = this.adaptable.api.internalApi
|
|
@@ -93,8 +93,7 @@ class ExpressionApiImpl extends ApiBase_1.ApiBase {
|
|
|
93
93
|
.getExpressionWithColumnFriendlyNames(this.getAdaptableQueryExpression(query));
|
|
94
94
|
}
|
|
95
95
|
useCaseSensitivity() {
|
|
96
|
-
return this.adaptable.adaptableOptions.expressionOptions
|
|
97
|
-
.caseSensitiveExpressions;
|
|
96
|
+
return this.adaptable.adaptableOptions.expressionOptions.caseSensitiveExpressions;
|
|
98
97
|
}
|
|
99
98
|
}
|
|
100
99
|
exports.ExpressionApiImpl = ExpressionApiImpl;
|
|
@@ -25,4 +25,5 @@ export declare class CalculatedColumnInternalApi extends ApiBase {
|
|
|
25
25
|
getCalculatedColumnsDependentOnColumn(column: AdaptableColumn): string[];
|
|
26
26
|
isCumulativeAggregatedExpression(input: string): boolean;
|
|
27
27
|
isQuantileAggregatedExpression(input: string): boolean;
|
|
28
|
+
fireCalculatedColumnChangedEvent(trigger: string, calculatedColumn: CalculatedColumn): void;
|
|
28
29
|
}
|
|
@@ -74,5 +74,16 @@ class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
74
74
|
.internalApi.getQueryLanguageService()
|
|
75
75
|
.getNodesFromExpression(input, 'QUANT')) === null || _a === void 0 ? void 0 : _a.length);
|
|
76
76
|
}
|
|
77
|
+
fireCalculatedColumnChangedEvent(trigger, calculatedColumn) {
|
|
78
|
+
const adaptableApi = this.getAdaptableApi();
|
|
79
|
+
const calculatedColumnChangedInfo = {
|
|
80
|
+
adaptableApi: adaptableApi,
|
|
81
|
+
actionName: trigger,
|
|
82
|
+
calculatedColumn: calculatedColumn,
|
|
83
|
+
userName: adaptableApi.optionsApi.getUserName(),
|
|
84
|
+
adaptableId: adaptableApi.optionsApi.getAdaptableId(),
|
|
85
|
+
};
|
|
86
|
+
this.adaptable.api.eventApi.emit('CalculatedColumnChanged', calculatedColumnChangedInfo);
|
|
87
|
+
}
|
|
77
88
|
}
|
|
78
89
|
exports.CalculatedColumnInternalApi = CalculatedColumnInternalApi;
|
|
@@ -4,6 +4,7 @@ exports.DataImportInternalApi = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ObjectFactory_1 = tslib_1.__importStar(require("../../Utilities/ObjectFactory"));
|
|
6
6
|
const ApiBase_1 = require("../Implementation/ApiBase");
|
|
7
|
+
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
7
8
|
class DataImportInternalApi extends ApiBase_1.ApiBase {
|
|
8
9
|
async importData(partialRows) {
|
|
9
10
|
const dataImportOptions = this.getOptions().dataImportOptions;
|
|
@@ -64,6 +65,7 @@ class DataImportInternalApi extends ApiBase_1.ApiBase {
|
|
|
64
65
|
userName: adaptableApi.optionsApi.getUserName(),
|
|
65
66
|
adaptableId: adaptableApi.optionsApi.getAdaptableId(),
|
|
66
67
|
};
|
|
68
|
+
this.adaptable.api.internalApi.dispatchReduxAction(SystemRedux.DataImportCompleted(dataImportedInfo));
|
|
67
69
|
this.getEventApi().emit('DataImported', dataImportedInfo);
|
|
68
70
|
}
|
|
69
71
|
}
|
|
@@ -13,7 +13,7 @@ import { SummaryOperation } from '../../PredefinedConfig/Common/Enums';
|
|
|
13
13
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
14
14
|
import { RowsHighlightInfo } from '../../PredefinedConfig/Common/RowsHighlightInfo';
|
|
15
15
|
import { SmartEditOperation } from '../../AdaptableOptions/EditOptions';
|
|
16
|
-
import { DataSet, NoteGridCell } from '../../types';
|
|
16
|
+
import { DataImportedInfo, DataSet, NoteGridCell } from '../../types';
|
|
17
17
|
import { ChartModel } from '@ag-grid-community/core';
|
|
18
18
|
import { CachedQuery } from '../../PredefinedConfig/NamedQueryState';
|
|
19
19
|
export declare const FLASHING_CELL_ROW_KEY = "__ROW";
|
|
@@ -76,6 +76,10 @@ export declare const SYSTEM_VISUAL_EXPORT_BEGIN = "SYSTEM_VISUAL_EXPORT_BEGIN";
|
|
|
76
76
|
export declare const SYSTEM_VISUAL_EXPORT_END = "SYSTEM_VISUAL_EXPORT_END";
|
|
77
77
|
export declare const SYSTEM_NOTESS_SHOW = "SYSTEM_NOTES_SHOW";
|
|
78
78
|
export declare const SYSTEM_NOTS_HIDE = "SYSTEM_NOTES_HIDE";
|
|
79
|
+
export declare const DATA_IMPORT_COMPLETED = "DATA_IMPORT_COMPLETED";
|
|
80
|
+
export interface DataImportCompletedAction extends Redux.Action {
|
|
81
|
+
dataImportedInfo: DataImportedInfo;
|
|
82
|
+
}
|
|
79
83
|
export interface SystemHighlightCellAddAction extends Redux.Action {
|
|
80
84
|
cellHighlightInfo: CellHighlightInfo;
|
|
81
85
|
}
|
|
@@ -325,4 +329,5 @@ export declare const SystemPreviousGroupedColumnsSelector: (state: SystemState)
|
|
|
325
329
|
export declare const SystemQuickSearchFloatingVisibilitySelector: (state: SystemState) => boolean;
|
|
326
330
|
export declare const SystemNotesSelector: (state: SystemState) => NoteGridCell;
|
|
327
331
|
export declare const SystemNotesEditModeSelector: (state: SystemState) => boolean;
|
|
332
|
+
export declare const DataImportCompleted: (dataImportedInfo: DataImportedInfo) => DataImportCompletedAction;
|
|
328
333
|
export declare const SystemReducer: Redux.Reducer<SystemState>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SYSTEM_DISABLE_DELETE_CONFIRMATION = exports.SYSTEM_FILTER_FORM_HIDE = exports.SYSTEM_QUICK_FILTER_BAR_HIDE = exports.SYSTEM_QUICK_FILTER_BAR_SHOW = exports.SYSTEM_SETTINGS_PANEL_SET = exports.SYSTEM_DATA_CHANGE_HISTORY_RESUME = exports.SYSTEM_DATA_CHANGE_HISTORY_SUSPEND = exports.SYSTEM_DATA_CHANGE_HISTORY_DISABLE = exports.SYSTEM_DATA_CHANGE_HISTORY_ENABLE = exports.SYSTEM_DATA_CHANGE_HISTORY_CLEAR_ROW = exports.SYSTEM_DATA_CHANGE_HISTORY_UNDO = exports.SYSTEM_DATA_CHANGE_HISTORY_ADD = exports.SYSTEM_LICENSE_DISABLE_PERSISTENCE = exports.SYSTEM_LICENSE_SHOW_WATERMARK = exports.SYSTEM_PROGRESS_INDICATOR_HIDE = exports.SYSTEM_PROGRESS_INDICATOR_SHOW = exports.SYSTEM_CELL_SUMMARY_CHANGE_OPERATION = exports.SYSTEM_CACHED_QUERY_ADD = exports.SYSTEM_SET_LAST_APPLIED_SHORTCUT = exports.SYSTEM_SET_NEW_COLUMN_LIST_ORDER = exports.SYSTEM_HIGHLIGHT_ROW_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_ROWS_DELETE = exports.SYSTEM_HIGHLIGHT_ROW_DELETE = exports.SYSTEM_HIGHLIGHT_ROWS_ADD = exports.SYSTEM_HIGHLIGHT_ROW_ADD = exports.SYSTEM_HIGHLIGHT_CELL_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_CELL_DELETE = exports.SYSTEM_HIGHLIGHT_CELL_ADD = exports.SYSTEM_BULK_UPDATE_CHANGE_VALUE = exports.SYSTEM_BULK_UPDATE_SET_PREVIEW = exports.SYSTEM_BULK_UPDATE_SET_VALID_SELECTION = exports.SYSTEM_BULK_UPDATE_CHECK_CELL_SELECTION = exports.SYSTEM_SMART_EDIT_CHANGE_OPERATION = exports.SYSTEM_SMART_EDIT_CHANGE_VALUE = exports.SYSTEM_SMARTEDIT_SET_PREVIEW = exports.SYSTEM_SMARTEDIT_SET_VALID_SELECTION = exports.SYSTEM_SMARTEDIT_FETCH_PREVIEW = exports.SYSTEM_SMARTEDIT_CHECK_CELL_SELECTION = exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE_ALL = exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE = exports.SYSTEM_STATUS_MESSAGE_INFO_ADD = exports.SYSTEM_FLASHING_CELL_DELETE_ALL = exports.SYSTEM_FLASHING_CELL_DELETE = exports.SYSTEM_FLASHING_CELL_ADD = exports.SYSTEM_ALERT_REMOVE_ROW_HIGHLIGHT = exports.SYSTEM_ALERT_REMOVE_CELL_HIGHLIGHT = exports.SYSTEM_ALERT_DELETE_ALL = exports.SYSTEM_ALERT_DELETE = exports.SYSTEM_ALERT_ADD = exports.FLASHING_CELL_ROW_KEY = void 0;
|
|
4
|
-
exports.
|
|
5
|
-
exports.SystemReducer = exports.SystemNotesEditModeSelector = exports.SystemNotesSelector = exports.SystemQuickSearchFloatingVisibilitySelector = exports.SystemPreviousGroupedColumnsSelector = exports.SystemDisableDeleteConfirmationSelector = exports.SystemNoteHide = exports.SystemNotesShow = exports.SystemQuickSearchFloatingVisibility = exports.SystemVisualExportEnd = exports.SystemVisualExportBegin = exports.SystemDisableDeleteConfirmation = exports.SystemSetPreviousGroupedColumnsIndex = exports.SystemChartingCurrentChartModelsSelector = exports.SystemChartingSetCurrentChartModels = exports.SystemDataSetSelect = exports.SystemDashboardRefresh = exports.SystemLayoutShowNotAssociatedObjects = exports.SystemFilterFormHide = exports.SystemQuickFilterBarHide = exports.SystemQuickFilterBarShow = exports.SystemSettingsPanelSet = exports.SystemDataChangeHistoryResume = exports.SystemDataChangeHistorySuspend = exports.SystemDataChangeHistoryDisable = void 0;
|
|
4
|
+
exports.SystemDataChangeHistoryClearRow = exports.SystemDataChangeHistoryUndo = exports.SystemDataChangeHistoryAdd = exports.SystemLicenseDisablePersistence = exports.SystemLicenseShowWatermark = exports.SystemProgressIndicatorHide = exports.SystemProgressIndicatorShow = exports.SystemCellSummaryChangeOperation = exports.SystemCachedQueryAdd = exports.SetLastAppliedShortcut = exports.SetNewColumnListOrder = exports.BulkUpdateChangeValue = exports.BulkUpdateSetPreview = exports.BulkUpdateSetValidSelection = exports.BulkUpdateCheckCellSelection = exports.SmartEditSetPreview = exports.SmartEditSetValidSelection = exports.SmartEditCheckCellSelection = exports.SmartEditChangeOperation = exports.SmartEditChangeValue = exports.SystemStatusMessageInfoDeleteAll = exports.SystemStatusMessageInfoDelete = exports.SystemStatusMessageInfoAdd = exports.SystemFlashingCellDeleteAll = exports.SystemFlashingCellDelete = exports.SystemFlashingCellAdd = exports.SystemAlertRemoveRowHighlight = exports.SystemAlertRemoveCellHighlight = exports.SystemAlertDeleteAll = exports.SystemAlertDelete = exports.SystemAlertAdd = exports.SystemHighlightRowDeleteAll = exports.SystemHighlightRowsDelete = exports.SystemHighlightRowDelete = exports.SystemHighlightRowsAdd = exports.SystemHighlightRowAdd = exports.SystemHighlightCellDeleteAll = exports.SystemHighlightCellDelete = exports.SystemHighlightCellAdd = exports.DATA_IMPORT_COMPLETED = exports.SYSTEM_NOTS_HIDE = exports.SYSTEM_NOTESS_SHOW = exports.SYSTEM_VISUAL_EXPORT_END = exports.SYSTEM_VISUAL_EXPORT_BEGIN = exports.SYSTEM_SET_QUICK_SEARCH_FLOATING_VISIBILITY = exports.SYSTEM_SET_PREVIOUS_GROUPED_COLUMN_INDEX = exports.SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS = exports.SYSTEM_DATA_SET_SELECT = exports.DASHBOARD_REFRESH = exports.SYSTEM_LAYOUT_SHOW_NOT_ASSOCIATED_OBJECTS = void 0;
|
|
5
|
+
exports.SystemReducer = exports.DataImportCompleted = exports.SystemNotesEditModeSelector = exports.SystemNotesSelector = exports.SystemQuickSearchFloatingVisibilitySelector = exports.SystemPreviousGroupedColumnsSelector = exports.SystemDisableDeleteConfirmationSelector = exports.SystemNoteHide = exports.SystemNotesShow = exports.SystemQuickSearchFloatingVisibility = exports.SystemVisualExportEnd = exports.SystemVisualExportBegin = exports.SystemDisableDeleteConfirmation = exports.SystemSetPreviousGroupedColumnsIndex = exports.SystemChartingCurrentChartModelsSelector = exports.SystemChartingSetCurrentChartModels = exports.SystemDataSetSelect = exports.SystemDashboardRefresh = exports.SystemLayoutShowNotAssociatedObjects = exports.SystemFilterFormHide = exports.SystemQuickFilterBarHide = exports.SystemQuickFilterBarShow = exports.SystemSettingsPanelSet = exports.SystemDataChangeHistoryResume = exports.SystemDataChangeHistorySuspend = exports.SystemDataChangeHistoryDisable = exports.SystemDataChangeHistoryEnable = void 0;
|
|
6
6
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
7
7
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
8
8
|
const Helper_1 = require("../../Utilities/Helpers/Helper");
|
|
@@ -94,6 +94,8 @@ exports.SYSTEM_VISUAL_EXPORT_END = 'SYSTEM_VISUAL_EXPORT_END';
|
|
|
94
94
|
// Notes
|
|
95
95
|
exports.SYSTEM_NOTESS_SHOW = 'SYSTEM_NOTES_SHOW';
|
|
96
96
|
exports.SYSTEM_NOTS_HIDE = 'SYSTEM_NOTES_HIDE';
|
|
97
|
+
// Data Import
|
|
98
|
+
exports.DATA_IMPORT_COMPLETED = 'DATA_IMPORT_COMPLETED';
|
|
97
99
|
const SystemHighlightCellAdd = (cellHighlightInfo) => ({
|
|
98
100
|
type: exports.SYSTEM_HIGHLIGHT_CELL_ADD,
|
|
99
101
|
cellHighlightInfo: cellHighlightInfo,
|
|
@@ -398,6 +400,11 @@ const SystemNotesEditModeSelector = (state) => {
|
|
|
398
400
|
return (_a = state === null || state === void 0 ? void 0 : state.Notes) === null || _a === void 0 ? void 0 : _a.editMode;
|
|
399
401
|
};
|
|
400
402
|
exports.SystemNotesEditModeSelector = SystemNotesEditModeSelector;
|
|
403
|
+
const DataImportCompleted = (dataImportedInfo) => ({
|
|
404
|
+
type: exports.DATA_IMPORT_COMPLETED,
|
|
405
|
+
dataImportedInfo: dataImportedInfo,
|
|
406
|
+
});
|
|
407
|
+
exports.DataImportCompleted = DataImportCompleted;
|
|
401
408
|
const initialState = {
|
|
402
409
|
AdaptableAlerts: GeneralConstants_1.EMPTY_ARRAY,
|
|
403
410
|
AdaptableFlashingCells: {},
|
|
@@ -598,6 +598,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
598
598
|
adaptable.api.internalApi
|
|
599
599
|
.getCalculatedColumnExpressionService()
|
|
600
600
|
.createAggregatedScalarLiveValue(returnAction.calculatedColumn);
|
|
601
|
+
adaptable.api.calculatedColumnApi.internalApi.fireCalculatedColumnChangedEvent(action.type, actionTyped.calculatedColumn);
|
|
601
602
|
}
|
|
602
603
|
adaptable.updateColDefsForSpecialColumns();
|
|
603
604
|
return returnAction;
|
|
@@ -623,6 +624,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
623
624
|
adaptable.api.internalApi
|
|
624
625
|
.getCalculatedColumnExpressionService()
|
|
625
626
|
.destroyAggregatedScalarLiveValue(returnAction.calculatedColumn);
|
|
627
|
+
adaptable.api.calculatedColumnApi.internalApi.fireCalculatedColumnChangedEvent(action.type, actionTyped.calculatedColumn);
|
|
626
628
|
adaptable.updateColDefsForSpecialColumns();
|
|
627
629
|
return returnAction;
|
|
628
630
|
}
|
|
@@ -243,11 +243,13 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
243
243
|
return returnColumnMenuItems;
|
|
244
244
|
}
|
|
245
245
|
createViewPivotItemsMenuItem(menuContext) {
|
|
246
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
247
246
|
// current group => menuContext.rowNode.field;
|
|
248
|
-
|
|
247
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
248
|
+
const selectedCellInfo = (_a = menuContext.selectedCellInfo) !== null && _a !== void 0 ? _a : this.api.gridApi.getSelectedCellInfo();
|
|
249
|
+
if (((_b = selectedCellInfo === null || selectedCellInfo === void 0 ? void 0 : selectedCellInfo.gridCells) === null || _b === void 0 ? void 0 : _b.length) !== 1) {
|
|
249
250
|
return;
|
|
250
251
|
}
|
|
252
|
+
const gridCell = (_c = menuContext.gridCell) !== null && _c !== void 0 ? _c : selectedCellInfo.gridCells[0];
|
|
251
253
|
const currentLayout = this.api.layoutApi.getCurrentLayout();
|
|
252
254
|
if (!currentLayout.EnablePivot) {
|
|
253
255
|
return;
|
|
@@ -266,11 +268,11 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
266
268
|
*/
|
|
267
269
|
// pivot_status_Booked_price
|
|
268
270
|
// price
|
|
269
|
-
const aggColumn = (
|
|
271
|
+
const aggColumn = (_g = (_f = (_e = (_d = agGridColumn === null || agGridColumn === void 0 ? void 0 : agGridColumn.getColDef) === null || _d === void 0 ? void 0 : _d.call(agGridColumn).pivotValueColumn) === null || _e === void 0 ? void 0 : _e.getColDef) === null || _f === void 0 ? void 0 : _f.call(_e)) === null || _g === void 0 ? void 0 : _g.field;
|
|
270
272
|
// Booked
|
|
271
|
-
const pivotValue = (
|
|
273
|
+
const pivotValue = (_k = (_j = (_h = agGridColumn === null || agGridColumn === void 0 ? void 0 : agGridColumn.getColDef) === null || _h === void 0 ? void 0 : _h.call(agGridColumn)) === null || _j === void 0 ? void 0 : _j.pivotKeys) === null || _k === void 0 ? void 0 : _k[0];
|
|
272
274
|
// status - the preview works only with one column
|
|
273
|
-
const pivotColumnId = (
|
|
275
|
+
const pivotColumnId = (_l = currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.PivotColumns) === null || _l === void 0 ? void 0 : _l[0];
|
|
274
276
|
function getData(rows) {
|
|
275
277
|
return [
|
|
276
278
|
...rows.map((row) => {
|
|
@@ -283,9 +285,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
283
285
|
}
|
|
284
286
|
const data = (0, flattenDeep_1.default)(getData(menuContext.rowNode.childrenAfterFilter));
|
|
285
287
|
const rowGroups = currentLayout.RowGroupedColumns;
|
|
286
|
-
const cellValue = isPivotColumn
|
|
287
|
-
? menuContext.rowNode.aggData[columnId]
|
|
288
|
-
: menuContext.gridCell.displayValue;
|
|
288
|
+
const cellValue = isPivotColumn ? menuContext.rowNode.aggData[columnId] : gridCell.displayValue;
|
|
289
289
|
const popupProps = {
|
|
290
290
|
hasPivotValue: isPivotColumn,
|
|
291
291
|
columnId,
|
|
@@ -2,6 +2,6 @@ import { ExpressionFunction } from '../../parser/src/types';
|
|
|
2
2
|
/**
|
|
3
3
|
* List of all the Scalar Functions available in AdaptableQL
|
|
4
4
|
*/
|
|
5
|
-
export type ScalarFunctionName = 'ADD' | 'SUB' | 'MUL' | 'DIV' | 'MOD' | 'POW' | 'ABS' | 'CEILING' | 'FLOOR' | 'ROUND' | 'MIN' | 'MAX' | 'AVG' | 'DATE' | 'NOW' | '
|
|
5
|
+
export type ScalarFunctionName = 'ADD' | 'SUB' | 'MUL' | 'DIV' | 'MOD' | 'POW' | 'ABS' | 'CEILING' | 'FLOOR' | 'ROUND' | 'MIN' | 'MAX' | 'AVG' | 'DATE' | 'NOW' | 'CURRENT_DAY' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR' | 'ADD_DAYS' | 'ADD_WEEKS' | 'ADD_MONTHS' | 'ADD_YEARS' | 'DIFF_DAYS' | 'DIFF_WEEKS' | 'DIFF_MONTHS' | 'DIFF_YEARS' | 'SUB_STRING' | 'REPLACE' | 'COALESCE' | 'NULL' | 'LEN' | 'UPPER' | 'LOWER' | 'CONCAT' | 'IF' | 'CASE' | 'COL' | 'VAR' | 'TO_ARRAY' | 'QUERY' | 'IS_BLANK' | 'IS_NOT_BLANK';
|
|
6
6
|
export declare const scalarExpressionFunctions: Record<ScalarFunctionName, ExpressionFunction>;
|
|
7
7
|
export declare const scalarExpressionFunctionNames: ScalarFunctionName[];
|
|
@@ -387,13 +387,13 @@ exports.scalarExpressionFunctions = {
|
|
|
387
387
|
category: 'dates',
|
|
388
388
|
returnType: 'date',
|
|
389
389
|
},
|
|
390
|
-
|
|
390
|
+
CURRENT_DAY: {
|
|
391
391
|
handler() {
|
|
392
392
|
return (0, startOfDay_1.default)(new Date());
|
|
393
393
|
},
|
|
394
394
|
description: 'Returns the current day',
|
|
395
|
-
signatures: ['
|
|
396
|
-
examples: ['[col1] >
|
|
395
|
+
signatures: ['CURRENT_DAY()'],
|
|
396
|
+
examples: ['[col1] > CURRENT_DAY()'],
|
|
397
397
|
category: 'dates',
|
|
398
398
|
returnType: 'date',
|
|
399
399
|
},
|
|
@@ -443,7 +443,7 @@ exports.scalarExpressionFunctions = {
|
|
|
443
443
|
},
|
|
444
444
|
description: 'Returns a date based on input data and days to add',
|
|
445
445
|
signatures: ['ADD_DAYS(input: date, days: number)'],
|
|
446
|
-
examples: ['ADD_DAYS(
|
|
446
|
+
examples: ['ADD_DAYS(CURRENT_DAY(), 5)', 'ADD_DAYS([col1], 5)'],
|
|
447
447
|
category: 'dates',
|
|
448
448
|
returnType: 'date',
|
|
449
449
|
},
|
|
@@ -453,7 +453,7 @@ exports.scalarExpressionFunctions = {
|
|
|
453
453
|
},
|
|
454
454
|
description: 'Returns a date based on input data and weeks to add',
|
|
455
455
|
signatures: ['ADD_WEEKS(input: date, weeks: number)'],
|
|
456
|
-
examples: ['ADD_WEEKS(
|
|
456
|
+
examples: ['ADD_WEEKS(CURRENT_DAY(), 5)', 'ADD_WEEKS([col1], 5)'],
|
|
457
457
|
category: 'dates',
|
|
458
458
|
returnType: 'date',
|
|
459
459
|
},
|
|
@@ -463,7 +463,7 @@ exports.scalarExpressionFunctions = {
|
|
|
463
463
|
},
|
|
464
464
|
description: 'Returns a date based on input data and months to add',
|
|
465
465
|
signatures: ['ADD_MONTHS(input: date, months: number)'],
|
|
466
|
-
examples: ['ADD_MONTHS(
|
|
466
|
+
examples: ['ADD_MONTHS(CURRENT_DAY(), 5)', 'ADD_MONTHS([col1], 5)'],
|
|
467
467
|
category: 'dates',
|
|
468
468
|
returnType: 'date',
|
|
469
469
|
},
|
|
@@ -473,7 +473,7 @@ exports.scalarExpressionFunctions = {
|
|
|
473
473
|
},
|
|
474
474
|
description: 'Returns a date based on input data and years to add',
|
|
475
475
|
signatures: ['ADD_YEARS(input: date, years: number)'],
|
|
476
|
-
examples: ['ADD_YEARS(
|
|
476
|
+
examples: ['ADD_YEARS(CURRENT_DAY(), 5)', 'ADD_YEARS([col1], 5)'],
|
|
477
477
|
category: 'dates',
|
|
478
478
|
returnType: 'date',
|
|
479
479
|
},
|
|
@@ -485,7 +485,7 @@ exports.scalarExpressionFunctions = {
|
|
|
485
485
|
},
|
|
486
486
|
description: 'Returns the difference in days between 2 dates',
|
|
487
487
|
signatures: ['DIFF_DAYS(a: date, b: date)'],
|
|
488
|
-
examples: ['DIFF_DAYS([col1],
|
|
488
|
+
examples: ['DIFF_DAYS([col1], CURRENT_DAY())'],
|
|
489
489
|
category: 'dates',
|
|
490
490
|
returnType: 'number',
|
|
491
491
|
},
|
|
@@ -497,7 +497,7 @@ exports.scalarExpressionFunctions = {
|
|
|
497
497
|
},
|
|
498
498
|
description: 'Returns the difference in weeks between 2 dates',
|
|
499
499
|
signatures: ['DIFF_WEEKS(a: date, b: date)'],
|
|
500
|
-
examples: ['DIFF_WEEKS([col1],
|
|
500
|
+
examples: ['DIFF_WEEKS([col1], CURRENT_DAY())'],
|
|
501
501
|
category: 'dates',
|
|
502
502
|
returnType: 'number',
|
|
503
503
|
},
|
|
@@ -509,7 +509,7 @@ exports.scalarExpressionFunctions = {
|
|
|
509
509
|
},
|
|
510
510
|
description: 'Returns the difference in months between 2 dates',
|
|
511
511
|
signatures: ['DIFF_MONTHS(a: date, b: date)'],
|
|
512
|
-
examples: ['DIFF_MONTHS([col1],
|
|
512
|
+
examples: ['DIFF_MONTHS([col1], CURRENT_DAY())'],
|
|
513
513
|
category: 'dates',
|
|
514
514
|
returnType: 'number',
|
|
515
515
|
},
|
|
@@ -521,7 +521,7 @@ exports.scalarExpressionFunctions = {
|
|
|
521
521
|
},
|
|
522
522
|
description: 'Returns the difference in years between 2 dates',
|
|
523
523
|
signatures: ['DIFF_YEARS(a: date, b: date)'],
|
|
524
|
-
examples: ['DIFF_YEARS([col1],
|
|
524
|
+
examples: ['DIFF_YEARS([col1], CURRENT_DAY())'],
|
|
525
525
|
category: 'dates',
|
|
526
526
|
returnType: 'number',
|
|
527
527
|
},
|
|
@@ -71,7 +71,7 @@ const useChartingElements = ({ elementType, accessLevel, size = 'normal', }) =>
|
|
|
71
71
|
if ((0, ChartingState_1.isAgChartDefinition)(selectedChart)) {
|
|
72
72
|
containerOptions.unshift({
|
|
73
73
|
label: chartingOptions.agGridContainerName,
|
|
74
|
-
value:
|
|
74
|
+
value: chartingOptions.agGridContainerName,
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
const style = {};
|
|
@@ -82,8 +82,13 @@ const useChartingElements = ({ elementType, accessLevel, size = 'normal', }) =>
|
|
|
82
82
|
iconSize = 15;
|
|
83
83
|
}
|
|
84
84
|
const chartSelector = (React.createElement(Select_1.Select, { className: `ab-${elementType}__Chart__select`, size: size, value: selectedChartId, options: options, placeholder: 'Select Chart', disabled: !hasCharts, onChange: (chartUuid) => setSelectedChartId(chartUuid) }));
|
|
85
|
-
const containerSelector = Boolean(chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.length) && (React.createElement(Select_1.Select, { value: selectedContainer === null || selectedContainer === void 0 ? void 0 : selectedContainer.name, size: size, onChange: (containerName) => {
|
|
86
|
-
|
|
85
|
+
const containerSelector = Boolean(chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.length) && (React.createElement(Select_1.Select, { value: selectedContainer === null ? chartingOptions.agGridContainerName : selectedContainer === null || selectedContainer === void 0 ? void 0 : selectedContainer.name, size: size, onChange: (containerName) => {
|
|
86
|
+
if (containerName === chartingOptions.agGridContainerName) {
|
|
87
|
+
setSelectedContainer(null);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
setSelectedContainer(chartContainers.find((containerOption) => containerOption.name === containerName));
|
|
91
|
+
}
|
|
87
92
|
}, options: containerOptions, placeholder: "Select Container" }));
|
|
88
93
|
const chartButton = (React.createElement(SimpleButton_1.default, { style: style, mr: 1, onClick: () => (isOpen ? hideChart() : showChart(selectedContainer)), disabled: !Boolean(selectedChart), variant: 'text', tone: 'neutral', icon: isOpen ? 'visibility-off' : 'visibility-on', tooltip: isOpen ? 'Hide Chart' : 'Show Chart' }));
|
|
89
94
|
const deleteButton = (React.createElement(DeleteChartButton_1.DeleteChartButton, { iconSize: iconSize, chart: selectedChart, accessLevel: chartAccessLevel }));
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -2660,6 +2660,18 @@ class Adaptable {
|
|
|
2660
2660
|
columnTypes.push(...calculatedColumnSettings.ColumnTypes);
|
|
2661
2661
|
}
|
|
2662
2662
|
const isExternalEvaluation = !this.api.expressionApi.internalApi.evaluateExpressionInAdaptableQL('CalculatedColumn', calculatedColumn, this.api.expressionApi.getAdaptableQueryExpression(calculatedColumn.Query));
|
|
2663
|
+
const valueGetter = (params) => {
|
|
2664
|
+
var _a, _b;
|
|
2665
|
+
if (isExternalEvaluation) {
|
|
2666
|
+
return (_a = params.data) === null || _a === void 0 ? void 0 : _a[calculatedColumn.ColumnId];
|
|
2667
|
+
}
|
|
2668
|
+
// if the grid data is NOT client side, we can aggregate only simple scalar expression (which depend on row data, not on other rows)
|
|
2669
|
+
if (this.api.gridApi.getAgGridRowModelType() !== 'clientSide' &&
|
|
2670
|
+
StringExtensions_1.StringExtensions.IsNotNullOrEmpty(calculatedColumn.Query.AggregatedScalarExpression)) {
|
|
2671
|
+
return (_b = params.data) === null || _b === void 0 ? void 0 : _b[calculatedColumn.ColumnId];
|
|
2672
|
+
}
|
|
2673
|
+
return this.CalculatedColumnExpressionService.evaluateCalculatedColumnQuery(calculatedColumn, params.node);
|
|
2674
|
+
};
|
|
2663
2675
|
const newColDef = {
|
|
2664
2676
|
headerName: calculatedColumn.FriendlyName
|
|
2665
2677
|
? calculatedColumn.FriendlyName
|
|
@@ -2678,13 +2690,7 @@ class Adaptable {
|
|
|
2678
2690
|
suppressMenu: calculatedColumnSettings.SuppressMenu,
|
|
2679
2691
|
suppressMovable: calculatedColumnSettings.SuppressMovable,
|
|
2680
2692
|
type: columnTypes,
|
|
2681
|
-
valueGetter
|
|
2682
|
-
var _a;
|
|
2683
|
-
if (isExternalEvaluation) {
|
|
2684
|
-
return (_a = params.data) === null || _a === void 0 ? void 0 : _a[calculatedColumn.ColumnId];
|
|
2685
|
-
}
|
|
2686
|
-
return this.CalculatedColumnExpressionService.evaluateCalculatedColumnQuery(calculatedColumn, params.node);
|
|
2687
|
-
},
|
|
2693
|
+
valueGetter,
|
|
2688
2694
|
};
|
|
2689
2695
|
if (calculatedColumnSettings.ShowToolTip != null &&
|
|
2690
2696
|
calculatedColumnSettings.ShowToolTip == true) {
|
package/src/types.d.ts
CHANGED
|
@@ -118,6 +118,7 @@ export type { CellChangedInfo } from './Api/Events/CellChanged';
|
|
|
118
118
|
export type { TeamSharingEntityChangedInfo } from './Api/Events/TeamSharingEntityChanged';
|
|
119
119
|
export type { GridDataChangedInfo } from './Api/Events/GridDataChanged';
|
|
120
120
|
export type { LayoutChangedInfo } from './Api/Events/LayoutChanged';
|
|
121
|
+
export type { CalculatedColumnChangedInfo } from './Api/Events/CalculatedColumnChanged';
|
|
121
122
|
export type { CustomToolbarConfiguredInfo } from './Api/Events/CustomToolbarConfigured';
|
|
122
123
|
export type { LiveDataChangedInfo, LiveReport } from './Api/Events/LiveDataChanged';
|
|
123
124
|
export type { ChartChangedInfo, ChartingOpenState, ChartDisplayedInfo, } from './Api/Events/ChartChanged';
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "17.0.
|
|
1
|
+
declare const _default: "17.0.5";
|
|
2
2
|
export default _default;
|
package/version.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = '17.0.
|
|
3
|
+
exports.default = '17.0.5'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
|
|
File without changes
|
|
File without changes
|