@adaptabletools/adaptable 13.1.0 → 13.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +561 -1971
- package/base.css.map +1 -1
- package/bundle.cjs.js +222 -222
- package/index.css +196 -847
- package/index.css.map +1 -1
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/ActionOptions.d.ts +4 -1
- package/src/AdaptableOptions/AlertOptions.d.ts +4 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +9 -0
- package/src/AdaptableOptions/GeneralOptions.d.ts +6 -0
- package/src/Api/AlertApi.d.ts +5 -0
- package/src/Api/ColumnApi.d.ts +14 -0
- package/src/Api/FinanceApi.d.ts +5 -0
- package/src/Api/GridApi.d.ts +1 -0
- package/src/Api/IPushPullApi.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -0
- package/src/Api/Implementation/AlertApiImpl.js +14 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +3 -0
- package/src/Api/Implementation/ColumnApiImpl.js +11 -0
- package/src/Api/Implementation/FormatColumnApiImpl.js +3 -3
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
- package/src/Api/Implementation/GridApiImpl.js +3 -0
- package/src/Api/Implementation/InternalApiImpl.d.ts +6 -0
- package/src/Api/Implementation/InternalApiImpl.js +66 -0
- package/src/Api/InternalApi.d.ts +6 -0
- package/src/PredefinedConfig/AlertState.d.ts +4 -0
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +1 -1
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +2 -2
- package/src/PredefinedConfig/Common/Types.d.ts +1 -1
- package/src/PredefinedConfig/StyledColumnState.d.ts +5 -0
- package/src/PredefinedConfig/SystemState.d.ts +7 -0
- package/src/Redux/ActionsReducers/QuickSearchRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +1 -1
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +8 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +32 -2
- package/src/Strategy/AlertModule.js +1 -1
- package/src/Strategy/FlashingCellModule.js +1 -1
- package/src/Strategy/StyledColumnModule.js +5 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +0 -4
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +8 -10
- package/src/Utilities/Extensions/ObjectExtensions.d.ts +10 -0
- package/src/Utilities/Extensions/ObjectExtensions.js +20 -0
- package/src/Utilities/Helpers/FormatHelper.d.ts +1 -1
- package/src/Utilities/Helpers/FormatHelper.js +7 -1
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +16 -8
- package/src/View/Components/Charting/ChartingViewPanel.js +9 -7
- package/src/View/Components/Charting/ShowChartButton.js +6 -6
- package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +2 -2
- package/src/View/Components/FilterForm/QuickFilterForm.js +2 -2
- package/src/View/Components/RangesComponent.js +1 -1
- package/src/View/Dashboard/Dashboard.js +3 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +6 -0
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +285 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +28 -17
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +7 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +16 -7
- package/src/agGrid/Adaptable.d.ts +10 -1
- package/src/agGrid/Adaptable.js +89 -7
- package/src/agGrid/agGridHelper.js +12 -0
- package/src/components/ColorPicker/ColorPicker.js +1 -1
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/Datepicker/index.js +1 -1
- package/src/components/DropdownButton/index.js +2 -2
- package/src/components/ExpressionEditor/index.js +3 -41
- package/src/components/OverlayTrigger/Overlay.d.ts +1 -4
- package/src/components/OverlayTrigger/Overlay.js +3 -40
- package/src/components/OverlayTrigger/index.d.ts +4 -4
- package/src/components/OverlayTrigger/index.js +71 -50
- package/src/components/SimpleButton/index.d.ts +0 -2
- package/src/components/SimpleButton/index.js +2 -2
- package/src/components/Tooltip/index.d.ts +1 -3
- package/src/components/Tooltip/index.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +7 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/components/OverlayTrigger/getOverlayStyle.d.ts +0 -13
- package/src/components/OverlayTrigger/getOverlayStyle.js +0 -56
|
@@ -2,7 +2,7 @@ import { AdaptableObject } from './AdaptableObject';
|
|
|
2
2
|
/**
|
|
3
3
|
* Type of data stored in an Adaptable Column
|
|
4
4
|
*/
|
|
5
|
-
export declare type AdaptableColumnDataType = 'String' | 'Number' | 'Boolean' | 'Date' | 'Object' | 'Unknown';
|
|
5
|
+
export declare type AdaptableColumnDataType = 'String' | 'Number' | 'Boolean' | 'Date' | 'Object' | 'NumberArray' | 'TupleNumberArray' | 'ObjectNumberArray' | 'Unknown';
|
|
6
6
|
/**
|
|
7
7
|
* Base class for Adaptable Column containing most important properties
|
|
8
8
|
*/
|
|
@@ -219,9 +219,9 @@ export interface CountryContext extends FDC3Context {
|
|
|
219
219
|
*/
|
|
220
220
|
export interface AdaptableFDC3EventInfo extends BaseEventInfo {
|
|
221
221
|
/**
|
|
222
|
-
* Type of Event: `RaiseIntent` or `BroadcastMessage`
|
|
222
|
+
* Type of Event: `RaiseIntent`, `RaiseIntentForContext` or `BroadcastMessage`
|
|
223
223
|
*/
|
|
224
|
-
eventType: 'RaiseIntent' | 'BroadcastMessage';
|
|
224
|
+
eventType: 'RaiseIntent' | 'RaiseIntentForContext' | 'BroadcastMessage';
|
|
225
225
|
/**
|
|
226
226
|
* The FDC3 Intent which caused Event to fire (if type is `RaiseIntent`)
|
|
227
227
|
*/
|
|
@@ -36,4 +36,4 @@ export declare type TypeHint<Base, Literals> = (Base & {
|
|
|
36
36
|
}) | Literals;
|
|
37
37
|
export declare type AdaptableQLModules = AdaptableQLModule[];
|
|
38
38
|
export declare type AdaptableQLModule = 'CalculatedColumn' | 'Filter' | 'Query';
|
|
39
|
-
export declare type AdaptableColumnType = 'abColDefBoolean' | 'abColDefDate' | 'abColDefNumber' | 'abColDefString' | 'abColDefObject' | 'abColDefCustom' | 'abSpecialColumn';
|
|
39
|
+
export declare type AdaptableColumnType = 'abColDefBoolean' | 'abColDefDate' | 'abColDefNumber' | 'abColDefString' | 'abColDefObject' | 'abColDefNumberArray' | 'abColDefTupleNumberArray' | 'abColDefObjectNumberArray' | 'abColDefCustom' | 'abSpecialColumn';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ConfigState } from './ConfigState';
|
|
2
2
|
import { SuspendableObject } from './Common/SuspendableObject';
|
|
3
|
+
import { SparklineOptions } from '@ag-grid-community/core';
|
|
3
4
|
/**
|
|
4
5
|
* Predefined Configuration for Styled Column Module
|
|
5
6
|
*/
|
|
@@ -29,6 +30,7 @@ export interface StyledColumn extends SuspendableObject {
|
|
|
29
30
|
* Renders a Checkbox in a boolean column
|
|
30
31
|
*/
|
|
31
32
|
CheckBoxStyle?: boolean;
|
|
33
|
+
SparkLineStyle?: SparkLineStyle;
|
|
32
34
|
/**
|
|
33
35
|
* Includes the Styled Column in Grouped Rows
|
|
34
36
|
* @defaultValue false
|
|
@@ -123,3 +125,6 @@ export declare type CellTextOption = 'CellValue' | 'PercentageValue';
|
|
|
123
125
|
* Whether the Range is Number or Percent based
|
|
124
126
|
*/
|
|
125
127
|
export declare type RangeValueType = 'Number' | 'Percentage';
|
|
128
|
+
export declare type SparkLineStyle = {
|
|
129
|
+
options?: SparklineOptions;
|
|
130
|
+
};
|
|
@@ -80,6 +80,13 @@ export interface SystemState extends InternalState, IPushPullState, Glue42State,
|
|
|
80
80
|
Charting: {
|
|
81
81
|
currentChartModels: ChartModel[];
|
|
82
82
|
};
|
|
83
|
+
/**
|
|
84
|
+
* Keeps session relevant information
|
|
85
|
+
* currently it holds the previous location of a grouped column.
|
|
86
|
+
*/
|
|
87
|
+
Layout: {
|
|
88
|
+
previousGroupedColumns: Record<string, Record<string, number>>;
|
|
89
|
+
};
|
|
83
90
|
}
|
|
84
91
|
export interface ProgressIndicator {
|
|
85
92
|
active: boolean;
|
|
@@ -4,7 +4,7 @@ import { AdaptableStyle } from '../../PredefinedConfig/Common/AdaptableStyle';
|
|
|
4
4
|
/**
|
|
5
5
|
* @ReduxAction Runs Quick Search
|
|
6
6
|
*/
|
|
7
|
-
export declare const QUICK_SEARCH_RUN = "
|
|
7
|
+
export declare const QUICK_SEARCH_RUN = "QUICK_SEARCH_RUN";
|
|
8
8
|
/**
|
|
9
9
|
* @ReduxAction Sets Quick Search style
|
|
10
10
|
*/
|
|
@@ -5,7 +5,7 @@ const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants")
|
|
|
5
5
|
/**
|
|
6
6
|
* @ReduxAction Runs Quick Search
|
|
7
7
|
*/
|
|
8
|
-
exports.QUICK_SEARCH_RUN = '
|
|
8
|
+
exports.QUICK_SEARCH_RUN = 'QUICK_SEARCH_RUN';
|
|
9
9
|
/**
|
|
10
10
|
* @ReduxAction Sets Quick Search style
|
|
11
11
|
*/
|
|
@@ -68,6 +68,7 @@ export declare const SYSTEM_LAYOUT_SHOW_NOT_ASSOCIATED_OBJECTS = "SYSTEM_LAYOUT_
|
|
|
68
68
|
export declare const DASHBOARD_REFRESH = "DASHBOARD_REFRESH";
|
|
69
69
|
export declare const SYSTEM_DATA_SET_SELECT = "SYSTEM_DATA_SET_SELECT";
|
|
70
70
|
export declare const SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS = "SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS";
|
|
71
|
+
export declare const SYSTEM_SET_PREVIOUS_GROUPED_COLUMN_INDEX = "SYSTEM_SET_PREVIOUS_GROUPED_COLUMN_INDEX";
|
|
71
72
|
export interface SystemHighlightCellAddAction extends Redux.Action {
|
|
72
73
|
cellHighlightInfo: CellHighlightInfo;
|
|
73
74
|
}
|
|
@@ -230,6 +231,11 @@ export interface SystemDataSetSelectAction extends Redux.Action {
|
|
|
230
231
|
export interface SystemChartingSetCurrentChartModelsAction extends Redux.Action {
|
|
231
232
|
chartModels: ChartModel[];
|
|
232
233
|
}
|
|
234
|
+
export interface SystemSetPreviousGroupedColumnIndexAction extends Redux.Action {
|
|
235
|
+
layoutId: string;
|
|
236
|
+
columnId: string;
|
|
237
|
+
columnIndex: number;
|
|
238
|
+
}
|
|
233
239
|
export declare const SystemHighlightCellAdd: (cellHighlightInfo: CellHighlightInfo) => SystemHighlightCellAddAction;
|
|
234
240
|
export declare const SystemHighlightCellDelete: (primaryKeyValue: CellHighlightInfo['primaryKeyValue'], columnId: CellHighlightInfo['columnId']) => SystemHighlightCellDeleteAction;
|
|
235
241
|
export declare const SystemHighlightCellDeleteAll: () => SystemHighlightCellDeleteAllAction;
|
|
@@ -281,4 +287,6 @@ export declare const SystemDashboardRefresh: () => SystemDashboardRefreshAction;
|
|
|
281
287
|
export declare const SystemDataSetSelect: (dataSet: DataSet) => SystemDataSetSelectAction;
|
|
282
288
|
export declare const SystemChartingSetCurrentChartModels: (chartModels: ChartModel[]) => SystemChartingSetCurrentChartModelsAction;
|
|
283
289
|
export declare const SystemChartingCurrentChartModelsSelector: (state: SystemState) => ChartModel[];
|
|
290
|
+
export declare const SystemSetPreviousGroupedColumnsIndex: (layoutId: string, columnId: string, columnIndex: number) => SystemSetPreviousGroupedColumnIndexAction;
|
|
291
|
+
export declare const SystemPreviousGroupedColumnsSelector: (state: SystemState) => Record<string, Record<string, number>>;
|
|
284
292
|
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.DASHBOARD_REFRESH = exports.SYSTEM_LAYOUT_SHOW_NOT_ASSOCIATED_OBJECTS = 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_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.SystemChartingCurrentChartModelsSelector = exports.SystemChartingSetCurrentChartModels = exports.SystemDataSetSelect = void 0;
|
|
4
|
+
exports.SystemLayoutShowNotAssociatedObjects = exports.SystemFilterFormHide = exports.SystemQuickFilterBarHide = exports.SystemQuickFilterBarShow = exports.SystemSettingsPanelSet = exports.SystemDataChangeHistoryResume = exports.SystemDataChangeHistorySuspend = exports.SystemDataChangeHistoryDisable = exports.SystemDataChangeHistoryEnable = 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.SYSTEM_SET_PREVIOUS_GROUPED_COLUMN_INDEX = exports.SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS = exports.SYSTEM_DATA_SET_SELECT = void 0;
|
|
5
|
+
exports.SystemReducer = exports.SystemPreviousGroupedColumnsSelector = exports.SystemSetPreviousGroupedColumnsIndex = exports.SystemChartingCurrentChartModelsSelector = exports.SystemChartingSetCurrentChartModels = exports.SystemDataSetSelect = exports.SystemDashboardRefresh = 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");
|
|
@@ -81,6 +81,8 @@ exports.DASHBOARD_REFRESH = 'DASHBOARD_REFRESH';
|
|
|
81
81
|
exports.SYSTEM_DATA_SET_SELECT = 'SYSTEM_DATA_SET_SELECT';
|
|
82
82
|
// Charting
|
|
83
83
|
exports.SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS = 'SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS';
|
|
84
|
+
// Layout
|
|
85
|
+
exports.SYSTEM_SET_PREVIOUS_GROUPED_COLUMN_INDEX = 'SYSTEM_SET_PREVIOUS_GROUPED_COLUMN_INDEX';
|
|
84
86
|
const SystemHighlightCellAdd = (cellHighlightInfo) => ({
|
|
85
87
|
type: exports.SYSTEM_HIGHLIGHT_CELL_ADD,
|
|
86
88
|
cellHighlightInfo: cellHighlightInfo,
|
|
@@ -323,6 +325,17 @@ const SystemChartingCurrentChartModelsSelector = (state) => {
|
|
|
323
325
|
return state.Charting.currentChartModels;
|
|
324
326
|
};
|
|
325
327
|
exports.SystemChartingCurrentChartModelsSelector = SystemChartingCurrentChartModelsSelector;
|
|
328
|
+
const SystemSetPreviousGroupedColumnsIndex = (layoutId, columnId, columnIndex) => ({
|
|
329
|
+
type: exports.SYSTEM_SET_PREVIOUS_GROUPED_COLUMN_INDEX,
|
|
330
|
+
layoutId,
|
|
331
|
+
columnId,
|
|
332
|
+
columnIndex,
|
|
333
|
+
});
|
|
334
|
+
exports.SystemSetPreviousGroupedColumnsIndex = SystemSetPreviousGroupedColumnsIndex;
|
|
335
|
+
const SystemPreviousGroupedColumnsSelector = (state) => {
|
|
336
|
+
return state.Layout.previousGroupedColumns;
|
|
337
|
+
};
|
|
338
|
+
exports.SystemPreviousGroupedColumnsSelector = SystemPreviousGroupedColumnsSelector;
|
|
326
339
|
const initialState = {
|
|
327
340
|
AdaptableAlerts: GeneralConstants_1.EMPTY_ARRAY,
|
|
328
341
|
AdaptableFlashingCells: {},
|
|
@@ -361,6 +374,9 @@ const initialState = {
|
|
|
361
374
|
Charting: {
|
|
362
375
|
currentChartModels: [],
|
|
363
376
|
},
|
|
377
|
+
Layout: {
|
|
378
|
+
previousGroupedColumns: {},
|
|
379
|
+
},
|
|
364
380
|
};
|
|
365
381
|
const SystemReducer = (state = initialState, action) => {
|
|
366
382
|
let alerts;
|
|
@@ -664,6 +680,20 @@ const SystemReducer = (state = initialState, action) => {
|
|
|
664
680
|
const typedAction = action;
|
|
665
681
|
return Object.assign(Object.assign({}, state), { Charting: Object.assign(Object.assign({}, state.Charting), { currentChartModels: typedAction.chartModels }) });
|
|
666
682
|
}
|
|
683
|
+
case exports.SYSTEM_SET_PREVIOUS_GROUPED_COLUMN_INDEX: {
|
|
684
|
+
const typedAction = action;
|
|
685
|
+
const newLayoutMap = Object.assign({}, state.Layout.previousGroupedColumns[typedAction.layoutId]);
|
|
686
|
+
if (typedAction.columnIndex !== null) {
|
|
687
|
+
newLayoutMap[typedAction.columnId] = typedAction.columnIndex;
|
|
688
|
+
}
|
|
689
|
+
else if (newLayoutMap[typedAction.columnId] !== undefined) {
|
|
690
|
+
newLayoutMap === null || newLayoutMap === void 0 ? true : delete newLayoutMap[typedAction.columnId];
|
|
691
|
+
}
|
|
692
|
+
const previousGroupedColumns = {
|
|
693
|
+
[typedAction.layoutId]: newLayoutMap,
|
|
694
|
+
};
|
|
695
|
+
return Object.assign(Object.assign({}, state), { Layout: Object.assign(Object.assign({}, state.Layout), { previousGroupedColumns }) });
|
|
696
|
+
}
|
|
667
697
|
default:
|
|
668
698
|
return state;
|
|
669
699
|
}
|
|
@@ -172,7 +172,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
172
172
|
}
|
|
173
173
|
showAlertForDefinitions(cellDataChangedInfo, alertDefinitions = []) {
|
|
174
174
|
alertDefinitions.forEach((alertDefinition) => {
|
|
175
|
-
const alert = ObjectFactory_1.default.CreateCellChangedAlert(
|
|
175
|
+
const alert = ObjectFactory_1.default.CreateCellChangedAlert(this.api.alertApi.getAlertMessageTitle(alertDefinition, cellDataChangedInfo), this.api.alertApi.getAlertDescription(alertDefinition, cellDataChangedInfo), alertDefinition, cellDataChangedInfo);
|
|
176
176
|
this.api.alertApi.displayAlert(alert);
|
|
177
177
|
});
|
|
178
178
|
}
|
|
@@ -96,7 +96,7 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
96
96
|
const flashingCellForCell = this.api.internalApi.getAdaptableFlashingCellFor(menuContext.primaryKeyValue, menuContext.adaptableColumn.columnId);
|
|
97
97
|
if (flashingCellForRow) {
|
|
98
98
|
if (flashingCellForRow.flashTarget === 'row' ||
|
|
99
|
-
(Array.isArray(flashingCellForRow.flashTarget) &&
|
|
99
|
+
(Array.isArray(flashingCellForRow === null || flashingCellForRow === void 0 ? void 0 : flashingCellForRow.flashTarget) &&
|
|
100
100
|
flashingCellForRow.flashTarget.includes('row'))) {
|
|
101
101
|
items.push(this.createColumnMenuItemReduxAction('Clear Flashing Row', this.moduleInfo.Glyph, SystemRedux.SystemFlashingCellDelete(flashingCellForRow)));
|
|
102
102
|
}
|
|
@@ -125,9 +125,12 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
125
125
|
else if (styledColumn.PercentBarStyle) {
|
|
126
126
|
type = 'Percent Bar';
|
|
127
127
|
}
|
|
128
|
-
else {
|
|
128
|
+
else if (styledColumn.CheckBoxStyle) {
|
|
129
129
|
type = 'Check Box';
|
|
130
130
|
}
|
|
131
|
+
else if (styledColumn.SparkLineStyle) {
|
|
132
|
+
type = 'Spark Line';
|
|
133
|
+
}
|
|
131
134
|
return {
|
|
132
135
|
abObject: styledColumn,
|
|
133
136
|
items: [
|
|
@@ -139,7 +142,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
139
142
|
name: 'Column',
|
|
140
143
|
values: [this.api.columnApi.getFriendlyNameFromColumnId(styledColumn.ColumnId)],
|
|
141
144
|
},
|
|
142
|
-
{
|
|
145
|
+
!styledColumn.SparkLineStyle && {
|
|
143
146
|
name: 'Style',
|
|
144
147
|
view: () => {
|
|
145
148
|
return (0, StyledColumnWizardStyleSection_1.renderStyledColumnStyleSummary)(styledColumn, this.api);
|
|
@@ -23,10 +23,6 @@ export interface WeightParameter extends BaseParameter<'operand', 'WEIGHT'> {
|
|
|
23
23
|
export interface AggregatedScalarExpressionEvaluation {
|
|
24
24
|
aggregationParams: AggregateParams<any, string | number>;
|
|
25
25
|
rowValueGetter?: (rowNode: RowNode, aggregatedValue: any) => string | number | Date | boolean;
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated remove this
|
|
28
|
-
*/
|
|
29
|
-
columnDependencies: string[];
|
|
30
26
|
context?: {
|
|
31
27
|
weightParam?: WeightParameter;
|
|
32
28
|
};
|
|
@@ -32,6 +32,14 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
32
32
|
handler(args, context) {
|
|
33
33
|
const aggregationParameter = (0, expressionFunctionUtils_1.extractParameter)('CUMUL', 'aggregationScalar', ['SUM', 'PERCENTAGE', 'AVG', 'MIN', 'MAX'], args);
|
|
34
34
|
const overColumnParameter = (0, expressionFunctionUtils_1.extractParameter)('CUMUL', 'operand', ['OVER'], args);
|
|
35
|
+
const groupByParameter = (0, expressionFunctionUtils_1.extractParameter)('MAX', 'operand', ['GROUP_BY'], args, {
|
|
36
|
+
isOptional: true,
|
|
37
|
+
});
|
|
38
|
+
if (!!groupByParameter) {
|
|
39
|
+
// ensure the GROUP_BY is NOT on the CUMUL function
|
|
40
|
+
// it should be on the AGGREGATION function
|
|
41
|
+
throw new ExpressionEvaluationError_1.ExpressionEvaluationError('GROUP_BY', `should be passed as an argument to the '${aggregationParameter.name}' aggregation function!`);
|
|
42
|
+
}
|
|
35
43
|
const cumulationExpressionEvaluation = mapAggregationToCumulation(aggregationParameter, overColumnParameter, context);
|
|
36
44
|
const result = {
|
|
37
45
|
name: 'CUMUL',
|
|
@@ -73,7 +81,6 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
73
81
|
},
|
|
74
82
|
},
|
|
75
83
|
rowFilterFn: context.filterFn,
|
|
76
|
-
columnDependencies: [sumColumnName],
|
|
77
84
|
};
|
|
78
85
|
addGroupByParams(groupByParameter === null || groupByParameter === void 0 ? void 0 : groupByParameter.value, aggregationExpressionEvaluation);
|
|
79
86
|
const result = {
|
|
@@ -135,7 +142,6 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
135
142
|
100);
|
|
136
143
|
},
|
|
137
144
|
rowFilterFn: context.filterFn,
|
|
138
|
-
columnDependencies: [...new Set([percentageColumnName, sumAggregationColumnName])],
|
|
139
145
|
};
|
|
140
146
|
addGroupByParams(groupByColumnNames, aggregationExpressionEvaluation);
|
|
141
147
|
const result = {
|
|
@@ -209,7 +215,6 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
209
215
|
},
|
|
210
216
|
},
|
|
211
217
|
rowFilterFn: context.filterFn,
|
|
212
|
-
columnDependencies: [avgColumnName],
|
|
213
218
|
};
|
|
214
219
|
addGroupByParams(groupByParameter === null || groupByParameter === void 0 ? void 0 : groupByParameter.value, aggregationExpressionEvaluation);
|
|
215
220
|
if (weightParameter) {
|
|
@@ -264,7 +269,6 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
264
269
|
},
|
|
265
270
|
},
|
|
266
271
|
rowFilterFn: context.filterFn,
|
|
267
|
-
columnDependencies: [minColumnName],
|
|
268
272
|
};
|
|
269
273
|
addGroupByParams(groupByParameter === null || groupByParameter === void 0 ? void 0 : groupByParameter.value, aggregationExpressionEvaluation);
|
|
270
274
|
const result = {
|
|
@@ -314,7 +318,6 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
314
318
|
},
|
|
315
319
|
},
|
|
316
320
|
rowFilterFn: context.filterFn,
|
|
317
|
-
columnDependencies: [maxColumnName],
|
|
318
321
|
};
|
|
319
322
|
addGroupByParams(groupByParameter === null || groupByParameter === void 0 ? void 0 : groupByParameter.value, aggregationExpressionEvaluation);
|
|
320
323
|
const result = {
|
|
@@ -443,7 +446,6 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
443
446
|
}
|
|
444
447
|
return rowBucketMap[rowValue];
|
|
445
448
|
},
|
|
446
|
-
columnDependencies: [quantileColumnName],
|
|
447
449
|
};
|
|
448
450
|
addGroupByParams(groupByOperand === null || groupByOperand === void 0 ? void 0 : groupByOperand.value, aggregationExpressionEvaluation);
|
|
449
451
|
const result = {
|
|
@@ -643,9 +645,6 @@ const mapAggregationToCumulation = (aggregationParameter, overColumnParameter, c
|
|
|
643
645
|
groupBy: aggregationEvaluation.aggregationParams.groupBy,
|
|
644
646
|
},
|
|
645
647
|
rowValueGetter,
|
|
646
|
-
columnDependencies: [
|
|
647
|
-
...new Set([...aggregationEvaluation.columnDependencies, overColumnParameter.value]),
|
|
648
|
-
],
|
|
649
648
|
rowFilterFn: aggregationEvaluation.rowFilterFn,
|
|
650
649
|
};
|
|
651
650
|
return cumulationExpressionEvaluation;
|
|
@@ -657,7 +656,6 @@ const addGroupByParams = (groupByColumnNames, expressionEvaluation) => {
|
|
|
657
656
|
expressionEvaluation.aggregationParams.groupBy = groupByColumnNames.map((columnName) => ({
|
|
658
657
|
field: columnName,
|
|
659
658
|
}));
|
|
660
|
-
expressionEvaluation.columnDependencies.push(...groupByColumnNames);
|
|
661
659
|
}
|
|
662
660
|
};
|
|
663
661
|
const isUndefinedValue = (input) => {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a new object with the property updated.
|
|
3
|
+
* The property is identified by the path.
|
|
4
|
+
*
|
|
5
|
+
* @param obj Object
|
|
6
|
+
* @param path path to the property
|
|
7
|
+
* @param value new property value
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare function setInPath<T>(obj: any, path: string[], value: any): T;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setInPath = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Returns a new object with the property updated.
|
|
6
|
+
* The property is identified by the path.
|
|
7
|
+
*
|
|
8
|
+
* @param obj Object
|
|
9
|
+
* @param path path to the property
|
|
10
|
+
* @param value new property value
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
function setInPath(obj, path, value) {
|
|
14
|
+
var _a;
|
|
15
|
+
if (path.length === 1) {
|
|
16
|
+
return Object.assign(Object.assign({}, obj), { [path[0]]: value });
|
|
17
|
+
}
|
|
18
|
+
return Object.assign(Object.assign({}, obj), { [path[0]]: setInPath((_a = obj === null || obj === void 0 ? void 0 : obj[path[0]]) !== null && _a !== void 0 ? _a : {}, path.slice(1), value) });
|
|
19
|
+
}
|
|
20
|
+
exports.setInPath = setInPath;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NumberFormatterOptions, DateFormatterOptions, AdaptableFormat, StringFormatterOptions } from '../../PredefinedConfig/Common/AdaptableFormat';
|
|
2
2
|
export declare function Format(input: any, format: AdaptableFormat): string;
|
|
3
3
|
export declare function NumberFormatter(input: number | string, options?: NumberFormatterOptions): string;
|
|
4
|
-
export declare function DateFormatter(input: number | Date | string, options: DateFormatterOptions): string | undefined;
|
|
4
|
+
export declare function DateFormatter(input: number | Date | string, options: DateFormatterOptions, strictFormatting?: boolean): string | undefined;
|
|
5
5
|
export declare function StringFormatter(input: string, options?: StringFormatterOptions): string;
|
|
6
6
|
declare const _default: {
|
|
7
7
|
NumberFormatter: typeof NumberFormatter;
|
|
@@ -71,7 +71,7 @@ function NumberFormatter(input, options = {}) {
|
|
|
71
71
|
return s;
|
|
72
72
|
}
|
|
73
73
|
exports.NumberFormatter = NumberFormatter;
|
|
74
|
-
function DateFormatter(input, options) {
|
|
74
|
+
function DateFormatter(input, options, strictFormatting = false) {
|
|
75
75
|
if (input == null || input == undefined || input == 'Invalid Date') {
|
|
76
76
|
return undefined;
|
|
77
77
|
}
|
|
@@ -83,6 +83,12 @@ function DateFormatter(input, options) {
|
|
|
83
83
|
return (0, format_1.default)(input, (options === null || options === void 0 ? void 0 : options.Pattern) || GeneralConstants_1.DEFAULT_DATE_FORMAT_PATTERN);
|
|
84
84
|
}
|
|
85
85
|
catch (error) {
|
|
86
|
+
if (strictFormatting) {
|
|
87
|
+
return `Invalid date formatting pattern`;
|
|
88
|
+
}
|
|
89
|
+
if (typeof input !== 'string') {
|
|
90
|
+
return String(input);
|
|
91
|
+
}
|
|
86
92
|
return input;
|
|
87
93
|
}
|
|
88
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/SystemRedux"),s=require("../../../Redux/ActionsReducers/PopupRedux"),t=e.__importDefault(require("../../ObjectFactory")),o=require("../../Helpers/LoggingHelper"),i=e.__importDefault(require("lodash/clamp")),n=require("../../Constants/DocumentationLinkConstants"),r=require("../../license/decode"),c=require("./shouldLogThankYouMessage"),l="sales@adaptabletools.com",d=10,p=864e5;var E;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(E=exports.LicenseValidityType||(exports.LicenseValidityType={}));const _=/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g,I=/(https):\/\/\S+(\.csb\.app)/g,O=/(https):\/\/\S+(\.adaptabletools\.com)/g,u="undefined"!=typeof window?window.location.origin:"",h=()=>{const[e,a,s]=Array.from(_.exec(u)||[]);return"https"===a&&"sandpack.codesandbox.io"===s},A=()=>{const[e,a,s]=Array.from(I.exec(u)||[]);return"https"===a&&".csb.app"===s},N=()=>{const[e,a,s]=Array.from(O.exec(u)||[]);return"https"===a&&".adaptabletools.com"===s};class L{constructor(e,a,s){this.adaptable=e,this.adaptable=e;let t=null;if(a)try{t=(0,r.decode)(a)}catch(e){t=e}h()||A()||N()||this.handleLicenseValidation(t,this.getValidityType(t,s))}getValidityType(e,a){if(!e)return E.NO_LICENSE;if(e instanceof Error)return E.INVALID_LICENSE;const s=new Date(a.publishedAt),t=new Date(e.end),o=t<new Date,i=e.trial;let n=null;return n=o?t>s?i?E.NON_PRODUCTION_EXPIRED_IN_SCOPE:E.COMMERCIAL_EXPIRED_IN_SCOPE:i?E.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:E.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:i?E.NON_PRODUCTION_VALID:E.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){var s;const t=new Date;t.setHours(0,0,0,0);let
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/SystemRedux"),s=require("../../../Redux/ActionsReducers/PopupRedux"),t=e.__importDefault(require("../../ObjectFactory")),o=require("../../Helpers/LoggingHelper"),i=e.__importDefault(require("lodash/clamp")),n=require("../../Constants/DocumentationLinkConstants"),r=require("../../license/decode"),c=require("./shouldLogThankYouMessage"),l="sales@adaptabletools.com",d=10,p=864e5;var E;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(E=exports.LicenseValidityType||(exports.LicenseValidityType={}));const _=/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g,I=/(https):\/\/\S+(\.csb\.app)/g,O=/(https):\/\/\S+(\.adaptabletools\.com)/g,u="undefined"!=typeof window?window.location.origin:"",h=()=>{const[e,a,s]=Array.from(_.exec(u)||[]);return"https"===a&&"sandpack.codesandbox.io"===s},A=()=>{const[e,a,s]=Array.from(I.exec(u)||[]);return"https"===a&&".csb.app"===s},N=()=>{const[e,a,s]=Array.from(O.exec(u)||[]);return"https"===a&&".adaptabletools.com"===s};class L{constructor(e,a,s){this.adaptable=e,this.adaptable=e;let t=null;if(a)try{t=(0,r.decode)(a)}catch(e){t=e}h()||A()||N()||this.handleLicenseValidation(t,this.getValidityType(t,s))}getValidityType(e,a){if(!e)return E.NO_LICENSE;if(e instanceof Error)return E.INVALID_LICENSE;const s=new Date(a.publishedAt),t=new Date(e.end),o=t<new Date,i=e.trial;let n=null;return n=o?t>s?i?E.NON_PRODUCTION_EXPIRED_IN_SCOPE:E.COMMERCIAL_EXPIRED_IN_SCOPE:i?E.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:E.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:i?E.NON_PRODUCTION_VALID:E.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){var s;const t=new Date;t.setHours(0,0,0,0);let E=0;e instanceof Error||!(null==e?void 0:e.end)||(E=Math.floor(((null===(s=null==e?void 0:e.end)||void 0===s?void 0:s.getTime())-t.getTime())/p),E=(0,i.default)(E,0,1/0));let _="",I="";!e||e instanceof Error||!e.appName||e.appName==r.GENERIC_APP_NAME||(_=e.appName,I=" for application [APP_NAME]");const O=(e,a=n.LicenseDocsLink,s=l,t=E,o=_)=>e.replace("[LINK]",a).replace("[EMAIL]",s).replace("[APP_NAME]",o).replace("[DAYS]",`${t}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":(0,o.ConsoleLogByMessageType)(O("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":(0,o.ConsoleLogByMessageType)(O("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":(0,o.ConsoleLogByMessageType)(O("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":(0,o.ConsoleLogByMessageType)(O("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(E<=d)(0,o.ConsoleLogByMessageType)(O(`This AdapTable license${I} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{(0,c.shouldLogThankYouMessage)()&&(0,o.ConsoleLogByMessageType)(O(`Thank you for using a valid AdapTable license${I}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":(0,o.ConsoleLogByMessageType)(O(`This AdapTable license${I} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":(0,o.ConsoleLogByMessageType)(O(`This AdapTable license${I} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction((0,s.PopupShowAlert)({alertType:"generic",header:"License Error",message:e,alertDefinition:t.default.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction((0,a.SystemLicenseShowWatermark)(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction((0,a.SystemLicenseDisablePersistence)())}destroy(){}}exports.LicenseService=L;
|
|
@@ -13,6 +13,7 @@ const AlertButtonsEditor_1 = require("./AlertButtonsEditor");
|
|
|
13
13
|
const CodeBlock_1 = require("../../../components/CodeBlock");
|
|
14
14
|
const AdaptableInput_1 = tslib_1.__importDefault(require("../../Components/AdaptableInput"));
|
|
15
15
|
const join_1 = tslib_1.__importDefault(require("../../../components/utils/join"));
|
|
16
|
+
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
16
17
|
const DEFAULT_BUTTONS = [
|
|
17
18
|
{
|
|
18
19
|
Label: 'OK',
|
|
@@ -48,7 +49,7 @@ const AlertPreview = (_a) => {
|
|
|
48
49
|
const Buttons = (((_a = alertForm === null || alertForm === void 0 ? void 0 : alertForm.Buttons) === null || _a === void 0 ? void 0 : _a.length) ? alertForm.Buttons : DEFAULT_BUTTONS).map(mapButtons);
|
|
49
50
|
const result = {
|
|
50
51
|
alertType: 'generic',
|
|
51
|
-
header: alertDefinition
|
|
52
|
+
header: api.alertApi.getAlertMessageTitle(alertDefinition),
|
|
52
53
|
message: api.alertApi.getAlertDescription(alertDefinition),
|
|
53
54
|
alertDefinition: Object.assign(Object.assign({}, alertDefinition), { AlertForm: Object.assign(Object.assign({}, alertForm), { Buttons }) }),
|
|
54
55
|
};
|
|
@@ -59,10 +60,11 @@ const AlertPreview = (_a) => {
|
|
|
59
60
|
};
|
|
60
61
|
exports.AlertPreview = AlertPreview;
|
|
61
62
|
const AlertDisplayWizardSection = (props) => {
|
|
62
|
-
var _a, _b, _c, _d;
|
|
63
|
+
var _a, _b, _c, _d, _e;
|
|
63
64
|
const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
64
65
|
const messageType = data.MessageType;
|
|
65
66
|
const messageText = api.alertApi.getAlertDescription(data);
|
|
67
|
+
const messageHeader = (_a = data.MessageHeader) !== null && _a !== void 0 ? _a : '';
|
|
66
68
|
const adaptableAlert = {
|
|
67
69
|
alertType: 'generic',
|
|
68
70
|
header: data.MessageType,
|
|
@@ -73,6 +75,10 @@ const AlertDisplayWizardSection = (props) => {
|
|
|
73
75
|
const { value } = e.target;
|
|
74
76
|
props.onChange(Object.assign(Object.assign({}, data), { MessageText: value }));
|
|
75
77
|
};
|
|
78
|
+
const onMessageHeaderChange = (e) => {
|
|
79
|
+
const { value } = e.target;
|
|
80
|
+
props.onChange(Object.assign(Object.assign({}, data), { MessageHeader: value }));
|
|
81
|
+
};
|
|
76
82
|
return (React.createElement(React.Fragment, null,
|
|
77
83
|
React.createElement(Tabs_1.Tabs, { "data-name": "message-type" },
|
|
78
84
|
React.createElement(Tabs_1.Tabs.Tab, null, "Message Type"),
|
|
@@ -89,23 +95,25 @@ const AlertDisplayWizardSection = (props) => {
|
|
|
89
95
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
90
96
|
React.createElement(rebass_1.Text, { fontSize: 2, mt: 3, mb: 2 }, "The text to display as the Alert Message (leave blank to show automated Message based on Trigger and Condition)"),
|
|
91
97
|
' ',
|
|
92
|
-
React.createElement(
|
|
93
|
-
|
|
94
|
-
|
|
98
|
+
React.createElement(FormLayout_1.default, null,
|
|
99
|
+
React.createElement(FormLayout_1.FormRow, { label: "Header" },
|
|
100
|
+
React.createElement(AdaptableInput_1.default, { marginTop: 2, type: 'text', autoFocus: false, value: messageHeader, onChange: (e) => onMessageHeaderChange(e) })),
|
|
101
|
+
React.createElement(FormLayout_1.FormRow, { label: "Message" },
|
|
102
|
+
React.createElement(AdaptableInput_1.default, { marginTop: 2, type: 'text', autoFocus: false, value: messageText, onChange: (e) => onMessageTextChange(e) }))))),
|
|
95
103
|
React.createElement(Tabs_1.Tabs, { "data-name": "display-options", mt: 2, mb: 3, autoFocus: false },
|
|
96
104
|
React.createElement(Tabs_1.Tabs.Tab, null, "Display options"),
|
|
97
105
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
98
|
-
React.createElement(CheckBox_1.CheckBox, { checked: (
|
|
106
|
+
React.createElement(CheckBox_1.CheckBox, { checked: (_b = data.AlertProperties) === null || _b === void 0 ? void 0 : _b.DisplayNotification, onChange: (DisplayNotification) => {
|
|
99
107
|
const newAlertDefinition = Object.assign(Object.assign({}, data), { AlertProperties: Object.assign(Object.assign({}, data.AlertProperties), { DisplayNotification }) });
|
|
100
108
|
if (!DisplayNotification && typeof newAlertDefinition.AlertForm === 'object') {
|
|
101
109
|
delete newAlertDefinition.AlertForm.Buttons;
|
|
102
110
|
}
|
|
103
111
|
props.onChange(newAlertDefinition);
|
|
104
112
|
} }, "Show a Notification when Alert is triggered (with action buttons)"),
|
|
105
|
-
((
|
|
113
|
+
((_c = data.AlertProperties) === null || _c === void 0 ? void 0 : _c.DisplayNotification) ? (typeof data.AlertForm === 'string' ? (React.createElement(rebass_1.Text, { fontSize: 2 }, "Alert buttons cannot be customized because form is dynamically driven")) : (React.createElement(AlertButtonsEditor_1.AlertButtonsEditor, { AlertButtons: ((_d = data.AlertForm) === null || _d === void 0 ? void 0 : _d.Buttons) || DEFAULT_BUTTONS, api: api, adaptableAlert: adaptableAlert, onChange: (buttons) => {
|
|
106
114
|
props.onChange(Object.assign(Object.assign({}, data), { AlertForm: Object.assign(Object.assign({}, data.AlertForm), { Buttons: buttons }) }));
|
|
107
115
|
} }))) : null)),
|
|
108
|
-
((
|
|
116
|
+
((_e = data.AlertProperties) === null || _e === void 0 ? void 0 : _e.DisplayNotification) ? (React.createElement(Tabs_1.Tabs, { "data-name": "alert-preview", autoFocus: false },
|
|
109
117
|
React.createElement(Tabs_1.Tabs.Tab, null, "Alert preview"),
|
|
110
118
|
React.createElement(Tabs_1.Tabs.Content, null, typeof data.AlertForm === 'string' ? (React.createElement(rebass_1.Text, { fontSize: 2 }, "Preview not available because form is dynamically driven")) : (React.createElement(exports.AlertPreview, { alertDefinition: data, api: api }))))) : null));
|
|
111
119
|
};
|
|
@@ -55,15 +55,17 @@ const ChartingViewPanel = (props) => {
|
|
|
55
55
|
setSelectedContainer(null);
|
|
56
56
|
},
|
|
57
57
|
},
|
|
58
|
-
...chartContainers
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
...(chartContainers
|
|
59
|
+
? chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.map((contianerDef) => ({
|
|
60
|
+
label: contianerDef.name,
|
|
61
|
+
onClick: () => {
|
|
62
|
+
setSelectedContainer(contianerDef);
|
|
63
|
+
},
|
|
64
|
+
}))
|
|
65
|
+
: []),
|
|
64
66
|
];
|
|
65
67
|
const chartSelector = (React.createElement(DropdownButton_1.default, { width: "100%", columns: ['label'], className: `ab-${elementType}__Chart__select`, items: options, disabled: !hasCharts }, content));
|
|
66
|
-
const containerSelector = Boolean(chartContainers.length) && (React.createElement(DropdownButton_1.default, { width: "100%", columns: ['label'], items: containerOptions, disabled: !isSelectedChart }, (selectedContainer === null || selectedContainer === void 0 ? void 0 : selectedContainer.name) || 'Ag Grid Window'));
|
|
68
|
+
const containerSelector = Boolean(chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.length) && (React.createElement(DropdownButton_1.default, { width: "100%", columns: ['label'], items: containerOptions, disabled: !isSelectedChart }, (selectedContainer === null || selectedContainer === void 0 ? void 0 : selectedContainer.name) || 'Ag Grid Window'));
|
|
67
69
|
const chartButton = (React.createElement(SimpleButton_1.default, { onClick: () => (isOpen ? closeChart() : showChart(selectedContainer)), disabled: !Boolean(selectedChart), variant: 'outlined', tone: 'neutral' }, isOpen ? 'Close' : 'Open'));
|
|
68
70
|
if (elementType === 'DashboardToolbar') {
|
|
69
71
|
return (React.createElement(rebass_1.Flex, { width: "100%", alignItems: "center" },
|
|
@@ -25,12 +25,12 @@ const ShowChartButton = (props) => {
|
|
|
25
25
|
showChart(null);
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
|
-
...chartContainers
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
showChart(contianerDef)
|
|
32
|
-
}
|
|
33
|
-
|
|
28
|
+
...(chartContainers
|
|
29
|
+
? chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.map((contianerDef) => ({
|
|
30
|
+
label: contianerDef.name,
|
|
31
|
+
onClick: () => showChart(contianerDef),
|
|
32
|
+
}))
|
|
33
|
+
: []),
|
|
34
34
|
];
|
|
35
35
|
return (React.createElement(DropdownButton_1.default, { "data-name": "show-chart-dropdown", variant: "text", columns: ['label'], items: containerOptions },
|
|
36
36
|
React.createElement(SimpleButton_1.default, { variant: "raised", tone: "success" }, "Open")));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { AdaptableColumn } from '../../../PredefinedConfig/Common/AdaptableColumn';
|
|
2
|
+
import { AdaptableColumn, AdaptableColumnDataType } from '../../../PredefinedConfig/Common/AdaptableColumn';
|
|
3
3
|
import { ListGroupProps } from '../../../components/List/ListGroup';
|
|
4
4
|
export interface ListBoxFilterFormProps extends ListGroupProps {
|
|
5
5
|
currentColumn: AdaptableColumn;
|
|
@@ -11,7 +11,7 @@ export interface ListBoxFilterFormProps extends ListGroupProps {
|
|
|
11
11
|
}[];
|
|
12
12
|
uiSelectedColumnValues: Array<string>;
|
|
13
13
|
onColumnValueSelectedChange: (SelectedValues: Array<any>) => void;
|
|
14
|
-
dataType:
|
|
14
|
+
dataType: AdaptableColumnDataType;
|
|
15
15
|
isLoading?: boolean;
|
|
16
16
|
suppressClientSideFilter?: boolean;
|
|
17
17
|
onFilterChange?: (filter: string) => void;
|
|
@@ -142,7 +142,7 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
142
142
|
showQuickFilterInput = !hideQuickFilterInputFunction(this.props.currentColumn);
|
|
143
143
|
}
|
|
144
144
|
return (React.createElement(React.Fragment, null,
|
|
145
|
-
showQuickFilterDropdown && (React.createElement(OverlayTrigger_1.default, { className: "ab-QuickFilter", showEvent: showEvent, hideEvent: hideEvent, preventPortalEventPropagation: showEvent === 'click',
|
|
145
|
+
showQuickFilterDropdown && (React.createElement(OverlayTrigger_1.default, { className: "ab-QuickFilter", showEvent: showEvent, hideEvent: hideEvent, preventPortalEventPropagation: showEvent === 'click', targetOffset: 10, hideDelay: 300, "data-name": "quick-filter-overlay", render: () => (React.createElement(rebass_1.Flex, { flexDirection: "column", "data-name": "quick-filter" },
|
|
146
146
|
(filter === null || filter === void 0 ? void 0 : filter.Predicate.PredicateId) && (React.createElement(SimpleButton_1.default, { p: 2, variant: "text", onClick: () => this.clearFilter() },
|
|
147
147
|
React.createElement("span", { style: { width: 20, marginRight: 10 } },
|
|
148
148
|
React.createElement(icons_1.Icon, { name: "delete" })),
|
|
@@ -247,7 +247,7 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
247
247
|
return label !== null && label !== void 0 ? label : input;
|
|
248
248
|
}).join(', ');
|
|
249
249
|
}
|
|
250
|
-
return (React.createElement(OverlayTrigger_1.default, {
|
|
250
|
+
return (React.createElement(OverlayTrigger_1.default, { showEvent: showEvent,
|
|
251
251
|
// cannot hide on blur, because the form input receives the input when this is opened
|
|
252
252
|
hideEvent: "mouseleave", hideDelay: 300, ref: (api) => {
|
|
253
253
|
this.valuesDropdown = api;
|
|
@@ -80,7 +80,7 @@ class RangesComponent extends React.Component {
|
|
|
80
80
|
React.createElement(ColorPicker_1.ColorPicker, { api: this.props.api, value: range.Color, onChange: (color) => {
|
|
81
81
|
this.changeRangeColor(index, color);
|
|
82
82
|
}, mr: 2, height: 33 })),
|
|
83
|
-
this.props.showRangeDirection && (React.createElement(CheckBox_1.CheckBox, { disabled: this.props.disabled, checked: range.ReverseGradient && range.ReverseGradient == true, onChange: (checked) => this.changeRangeDirectionUp(index, checked) }, "Reverse Gradient")),
|
|
83
|
+
this.props.showRangeDirection && (React.createElement(CheckBox_1.CheckBox, { disabled: this.props.disabled, checked: range.ReverseGradient && range.ReverseGradient == true, onChange: (checked) => this.changeRangeDirectionUp(index, checked), ml: 2 }, "Reverse Gradient")),
|
|
84
84
|
React.createElement(SimpleButton_1.default, { ml: 2, mb: 1, icon: "delete", disabled: this.props.disabled || (this.props.ranges && this.props.ranges.length == 1), onClick: () => this.removeRange(index) })))),
|
|
85
85
|
React.createElement("div", null,
|
|
86
86
|
React.createElement(SimpleButton_1.default, { disabled: this.props.disabled, variant: "raised", "data-name": "add", onClick: () => this.addRange() }, "Add New Range"))))),
|