@adaptabletools/adaptable 12.0.1 → 12.0.4
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 +96 -96
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -2
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +1 -1
- package/src/AdaptableOptions/EditOptions.d.ts +6 -9
- package/src/AdaptableOptions/ExportOptions.d.ts +15 -0
- package/src/AdaptableOptions/Glue42PluginOptions.d.ts +1 -1
- package/src/AdaptableOptions/IPushPullPluginOptions.d.ts +1 -3
- package/src/AdaptableOptions/StateOptions.d.ts +9 -23
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +34 -1
- package/src/Api/ChartingApi.d.ts +19 -2
- package/src/Api/Events/SearchChanged.d.ts +1 -1
- package/src/Api/FinanceApi.d.ts +8 -8
- package/src/Api/FormatColumnApi.d.ts +11 -6
- package/src/Api/GridApi.d.ts +1 -1
- package/src/Api/Implementation/ChartingApiImpl.d.ts +6 -0
- package/src/Api/Implementation/ChartingApiImpl.js +17 -0
- package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ConfigApiImpl.js +11 -0
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +4 -3
- package/src/Api/Implementation/FormatColumnApiImpl.js +36 -12
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridApiImpl.js +2 -2
- package/src/Api/Implementation/InternalApiImpl.js +1 -2
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/LayoutApiImpl.js +7 -1
- package/src/Api/LayoutApi.d.ts +5 -0
- package/src/Api/StatusBarApi.d.ts +3 -0
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -0
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +0 -5
- package/src/PredefinedConfig/ChartingState.d.ts +20 -0
- package/src/PredefinedConfig/ChartingState.js +2 -0
- package/src/PredefinedConfig/Common/CellSummary.d.ts +3 -0
- package/src/PredefinedConfig/Common/ColumnFilter.d.ts +9 -0
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +12 -3
- package/src/PredefinedConfig/Common/FilterActionOnDataChange.d.ts +1 -2
- package/src/PredefinedConfig/Common/FilterActionOnDataChange.js +1 -2
- package/src/PredefinedConfig/Common/Types.d.ts +1 -1
- package/src/PredefinedConfig/ExportState.d.ts +6 -0
- package/src/PredefinedConfig/FormatColumnState.d.ts +4 -1
- package/src/PredefinedConfig/IPushPullState.d.ts +16 -5
- package/src/PredefinedConfig/LayoutState.d.ts +1 -1
- package/src/PredefinedConfig/PredefinedConfig.d.ts +5 -0
- package/src/PredefinedConfig/ScheduleState.d.ts +1 -1
- package/src/PredefinedConfig/ShortcutState.d.ts +1 -1
- package/src/PredefinedConfig/TeamSharingState.d.ts +6 -0
- package/src/Redux/ActionsReducers/ChartingRedux.d.ts +23 -0
- package/src/Redux/ActionsReducers/ChartingRedux.js +38 -0
- package/src/Redux/ActionsReducers/GridRedux.d.ts +30 -1
- package/src/Redux/ActionsReducers/GridRedux.js +105 -2
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +10 -11
- package/src/Redux/ActionsReducers/LayoutRedux.js +10 -10
- package/src/Redux/Store/AdaptableStore.js +45 -8
- package/src/Strategy/AlertModule.js +3 -3
- package/src/Strategy/ChartingModule.js +1 -1
- package/src/Strategy/FlashingCellModule.js +3 -3
- package/src/Strategy/FormatColumnModule.js +1 -1
- package/src/Strategy/LayoutModule.js +2 -1
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +3 -2
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +3 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +3 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +23 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +3 -0
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +3 -0
- package/src/Utilities/Helpers/FormatHelper.d.ts +1 -1
- package/src/Utilities/Helpers/FormatHelper.js +9 -4
- package/src/Utilities/Helpers/Helper.js +1 -1
- package/src/Utilities/ObjectFactory.d.ts +5 -1
- package/src/Utilities/ObjectFactory.js +12 -2
- package/src/Utilities/Services/Interface/IReportService.d.ts +1 -1
- package/src/Utilities/Services/ReportService.d.ts +1 -1
- package/src/Utilities/Services/ReportService.js +5 -5
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +2 -9
- package/src/View/Filter/FilterSummary.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +1 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +38 -31
- package/src/View/Layout/LayoutViewPanel.d.ts +2 -2
- package/src/View/Layout/LayoutViewPanel.js +5 -5
- package/src/View/Layout/SaveLayoutButton.d.ts +2 -0
- package/src/View/Layout/SaveLayoutButton.js +30 -0
- package/src/agGrid/Adaptable.d.ts +4 -2
- package/src/agGrid/Adaptable.js +36 -20
- package/src/metamodel/adaptable.metamodel.d.ts +219 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +4 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LayoutReducer = exports.getColumnFilterSelector = exports.LayoutReady = exports.
|
|
3
|
+
exports.LayoutReducer = exports.getColumnFilterSelector = exports.LayoutReady = exports.LayoutSelect = exports.LayoutRemoveColumn = exports.LayoutSetColumnCaption = exports.LayoutSave = exports.LayoutDelete = exports.LayoutAdd = exports.LAYOUT_READY = exports.LAYOUT_SET_COLUMN_CAPTION = exports.LayoutColumnFilterClear = exports.LayoutColumnFilterClearAll = exports.LayoutColumnFilterSet = exports.LayoutColumnFilterEdit = exports.LayoutColumnFilterAdd = exports.LAYOUT_COLUMN_FILTER_CLEAR = exports.LAYOUT_COLUMN_FILTER_CLEAR_ALL = exports.LAYOUT_COLUMN_FILTER_SET = exports.LAYOUT_COLUMN_FILTER_EDIT = exports.LAYOUT_COLUMN_FILTER_ADD = exports.LAYOUT_REMOVE_COLUMN = exports.LAYOUT_SAVE = exports.LAYOUT_SELECT = exports.LAYOUT_DELETE = exports.LAYOUT_EDIT = exports.LAYOUT_ADD = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
6
6
|
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
|
|
@@ -24,6 +24,9 @@ exports.LAYOUT_SELECT = 'LAYOUT_SELECT';
|
|
|
24
24
|
* @ReduxAction A Layout has been (auto)saved
|
|
25
25
|
*/
|
|
26
26
|
exports.LAYOUT_SAVE = 'LAYOUT_SAVE';
|
|
27
|
+
/**
|
|
28
|
+
* @ReduxAction A Column has been removed
|
|
29
|
+
*/
|
|
27
30
|
exports.LAYOUT_REMOVE_COLUMN = 'LAYOUT_REMOVE_COLUMN';
|
|
28
31
|
/**
|
|
29
32
|
* @ReduxAction A Column Filter has been added
|
|
@@ -74,7 +77,6 @@ exports.LayoutColumnFilterClear = LayoutColumnFilterClear;
|
|
|
74
77
|
* @ReduxAction A new caption / header has been set for a Column in the Layout
|
|
75
78
|
*/
|
|
76
79
|
exports.LAYOUT_SET_COLUMN_CAPTION = 'LAYOUT_SET_COLUMN_CAPTION';
|
|
77
|
-
exports.LAYOUT_UPDATE_CURRENT_DRAFT = 'LAYOUT_UPDATE_CURRENT_DRAFT';
|
|
78
80
|
/**
|
|
79
81
|
* @ReduxAction Layout Module is ready
|
|
80
82
|
*/
|
|
@@ -101,22 +103,17 @@ const LayoutSetColumnCaption = (layoutName, columnId, caption) => ({
|
|
|
101
103
|
caption,
|
|
102
104
|
});
|
|
103
105
|
exports.LayoutSetColumnCaption = LayoutSetColumnCaption;
|
|
104
|
-
const
|
|
106
|
+
const LayoutRemoveColumn = (layoutName, columnId) => ({
|
|
105
107
|
type: exports.LAYOUT_REMOVE_COLUMN,
|
|
106
108
|
layoutName,
|
|
107
109
|
columnId,
|
|
108
110
|
});
|
|
109
|
-
exports.
|
|
111
|
+
exports.LayoutRemoveColumn = LayoutRemoveColumn;
|
|
110
112
|
const LayoutSelect = (layoutName) => ({
|
|
111
113
|
type: exports.LAYOUT_SELECT,
|
|
112
114
|
layoutName,
|
|
113
115
|
});
|
|
114
116
|
exports.LayoutSelect = LayoutSelect;
|
|
115
|
-
const LayoutUpdateCurrentDraft = (layout) => ({
|
|
116
|
-
type: exports.LAYOUT_UPDATE_CURRENT_DRAFT,
|
|
117
|
-
layout,
|
|
118
|
-
});
|
|
119
|
-
exports.LayoutUpdateCurrentDraft = LayoutUpdateCurrentDraft;
|
|
120
117
|
const LayoutReady = (layoutState) => ({
|
|
121
118
|
type: exports.LAYOUT_READY,
|
|
122
119
|
layoutState,
|
|
@@ -124,7 +121,10 @@ const LayoutReady = (layoutState) => ({
|
|
|
124
121
|
exports.LayoutReady = LayoutReady;
|
|
125
122
|
const getColumnFilterSelector = (state) => {
|
|
126
123
|
var _a, _b, _c, _d;
|
|
127
|
-
|
|
124
|
+
// in case of non-saving Layouts, we load the current Layout(possibly draft) from GridState
|
|
125
|
+
const currentLayout = state.Grid.CurrentLayout
|
|
126
|
+
? state.Grid.CurrentLayout
|
|
127
|
+
: (_c = (_b = (_a = state.Layout) === null || _a === void 0 ? void 0 : _a.Layouts) === null || _b === void 0 ? void 0 : _b.find) === null || _c === void 0 ? void 0 : _c.call(_b, (layout) => layout.Name === state.Layout.CurrentLayout);
|
|
128
128
|
return (_d = currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.ColumnFilters) !== null && _d !== void 0 ? _d : [];
|
|
129
129
|
};
|
|
130
130
|
exports.getColumnFilterSelector = getColumnFilterSelector;
|
|
@@ -33,6 +33,7 @@ const ScheduleRedux = tslib_1.__importStar(require("../ActionsReducers/ScheduleR
|
|
|
33
33
|
const TeamSharingRedux = tslib_1.__importStar(require("../ActionsReducers/TeamSharingRedux"));
|
|
34
34
|
const QueryRedux = tslib_1.__importStar(require("../ActionsReducers/QueryRedux"));
|
|
35
35
|
const StatusBarRedux = tslib_1.__importStar(require("../ActionsReducers/StatusBarRedux"));
|
|
36
|
+
const ChartingRedux = tslib_1.__importStar(require("../ActionsReducers/ChartingRedux"));
|
|
36
37
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
37
38
|
const ConfigConstants = tslib_1.__importStar(require("../../Utilities/Constants/ConfigConstants"));
|
|
38
39
|
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
@@ -146,6 +147,7 @@ class AdaptableStore {
|
|
|
146
147
|
Theme: ThemeRedux.ThemeReducer,
|
|
147
148
|
ToolPanel: ToolPanelRedux.ToolPanelReducer,
|
|
148
149
|
Query: QueryRedux.QueryReducer,
|
|
150
|
+
Charting: ChartingRedux.ChartingReducer,
|
|
149
151
|
// dead reducers
|
|
150
152
|
PercentBar: DeadRedux.PercentBarReducer,
|
|
151
153
|
UpdatedRow: DeadRedux.UpdatedRowReducer,
|
|
@@ -279,7 +281,7 @@ exports.AdaptableStore = AdaptableStore;
|
|
|
279
281
|
const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
280
282
|
return function (next) {
|
|
281
283
|
return function (action) {
|
|
282
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
284
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
283
285
|
switch (action.type) {
|
|
284
286
|
/*******************
|
|
285
287
|
* NAMED QUERY ACTIONS
|
|
@@ -680,12 +682,18 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
680
682
|
if (adaptable.adaptableOptions.searchOptions.filterResultsAfterQuickSearch) {
|
|
681
683
|
const actionTyped = action;
|
|
682
684
|
const searchText = actionTyped.quickSearchText;
|
|
685
|
+
// const gridOptions = adaptable.api.gridApi.getAgGridInstance();
|
|
683
686
|
if (StringExtensions_1.StringExtensions.IsNotNullOrEmpty(searchText)) {
|
|
687
|
+
// Currently using this but any searchable would allow us to limit the cols checked
|
|
684
688
|
const queryText = 'ANY_CONTAINS("' + searchText + '") ';
|
|
689
|
+
// const queryText = 'ANY_SEARCHABLE_CONTAINS("' + searchText + '") ';
|
|
685
690
|
adaptable.api.queryApi.setCurrentQuery(queryText);
|
|
691
|
+
// Better still would be to use ag grid if that is possible?
|
|
692
|
+
// gridOptions.api.setQuickFilter(searchText);
|
|
686
693
|
}
|
|
687
694
|
else {
|
|
688
695
|
adaptable.api.queryApi.clearCurrentQuery();
|
|
696
|
+
// gridOptions.api.setQuickFilter('');
|
|
689
697
|
}
|
|
690
698
|
}
|
|
691
699
|
return returnAction;
|
|
@@ -712,9 +720,38 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
712
720
|
case LayoutRedux.LAYOUT_COLUMN_FILTER_ADD:
|
|
713
721
|
case LayoutRedux.LAYOUT_COLUMN_FILTER_EDIT:
|
|
714
722
|
case LayoutRedux.LAYOUT_COLUMN_FILTER_SET:
|
|
715
|
-
case LayoutRedux.
|
|
716
|
-
case LayoutRedux.
|
|
717
|
-
let returnAction
|
|
723
|
+
case LayoutRedux.LAYOUT_COLUMN_FILTER_CLEAR:
|
|
724
|
+
case LayoutRedux.LAYOUT_COLUMN_FILTER_CLEAR_ALL: {
|
|
725
|
+
let returnAction;
|
|
726
|
+
if ((_g = adaptable.adaptableOptions.layoutOptions) === null || _g === void 0 ? void 0 : _g.autoSaveLayouts) {
|
|
727
|
+
returnAction = next(action);
|
|
728
|
+
}
|
|
729
|
+
else {
|
|
730
|
+
if (!middlewareAPI.getState().Grid.CurrentLayout) {
|
|
731
|
+
const currentLayout = adaptable.api.layoutApi.getCurrentLayout();
|
|
732
|
+
middlewareAPI.dispatch(GridRedux.LayoutUpdateCurrentDraft(currentLayout));
|
|
733
|
+
}
|
|
734
|
+
// we have a layout draft, we have to update that state
|
|
735
|
+
let draftLayoutAction;
|
|
736
|
+
switch (action.type) {
|
|
737
|
+
case LayoutRedux.LAYOUT_COLUMN_FILTER_ADD:
|
|
738
|
+
draftLayoutAction = GridRedux.LayoutDraftColumnFilterAdd(action.columnFilter);
|
|
739
|
+
break;
|
|
740
|
+
case LayoutRedux.LAYOUT_COLUMN_FILTER_EDIT:
|
|
741
|
+
draftLayoutAction = GridRedux.LayoutDraftColumnFilterEdit(action.columnFilter);
|
|
742
|
+
break;
|
|
743
|
+
case LayoutRedux.LAYOUT_COLUMN_FILTER_SET:
|
|
744
|
+
draftLayoutAction = GridRedux.LayoutDraftColumnFilterSet(action.columnFilter);
|
|
745
|
+
break;
|
|
746
|
+
case LayoutRedux.LAYOUT_COLUMN_FILTER_CLEAR:
|
|
747
|
+
draftLayoutAction = GridRedux.LayoutDraftColumnFilterClear(action.columnFilter);
|
|
748
|
+
break;
|
|
749
|
+
case LayoutRedux.LAYOUT_COLUMN_FILTER_CLEAR_ALL:
|
|
750
|
+
draftLayoutAction = GridRedux.LayoutDraftColumnFilterClearAll();
|
|
751
|
+
break;
|
|
752
|
+
}
|
|
753
|
+
returnAction = next(draftLayoutAction);
|
|
754
|
+
}
|
|
718
755
|
setTimeout(() => adaptable.applyGridFiltering(), 5);
|
|
719
756
|
adaptable.api.gridApi.fireSearchChangedEvent('Filter');
|
|
720
757
|
return returnAction;
|
|
@@ -838,18 +875,18 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
838
875
|
// tell grid the layout has been selected
|
|
839
876
|
adaptable.setLayout(currentLayout);
|
|
840
877
|
}
|
|
841
|
-
if (!((
|
|
842
|
-
middlewareAPI.dispatch(
|
|
878
|
+
if (!((_h = adaptable.adaptableOptions.layoutOptions) === null || _h === void 0 ? void 0 : _h.autoSaveLayouts)) {
|
|
879
|
+
middlewareAPI.dispatch(GridRedux.LayoutUpdateCurrentDraft(currentLayout));
|
|
843
880
|
}
|
|
844
881
|
}
|
|
845
882
|
if (returnAction.type == LayoutRedux.LAYOUT_ADD ||
|
|
846
883
|
returnAction.type == LayoutRedux.LAYOUT_SAVE) {
|
|
847
884
|
const actionTyped = action;
|
|
848
885
|
// if autosave is false
|
|
849
|
-
if (!((
|
|
886
|
+
if (!((_j = adaptable.adaptableOptions.layoutOptions) === null || _j === void 0 ? void 0 : _j.autoSaveLayouts)) {
|
|
850
887
|
// and the current layout is saved, make sure we also update the draft
|
|
851
888
|
if (actionTyped.layout.Name === newLayoutState.CurrentLayout) {
|
|
852
|
-
middlewareAPI.dispatch(
|
|
889
|
+
middlewareAPI.dispatch(GridRedux.LayoutUpdateCurrentDraft(actionTyped.layout));
|
|
853
890
|
}
|
|
854
891
|
}
|
|
855
892
|
}
|
|
@@ -30,10 +30,10 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
30
30
|
}
|
|
31
31
|
if (this.api.internalApi.getAdaptableOptions().alertOptions.dataChangeDetectionPolicy ===
|
|
32
32
|
'formattedValue') {
|
|
33
|
-
const { oldValue, newValue } = cellDataChangedInfo;
|
|
33
|
+
const { oldValue, newValue, rowNode } = cellDataChangedInfo;
|
|
34
34
|
const columnId = cellDataChangedInfo.column.columnId;
|
|
35
|
-
const oldFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, oldValue);
|
|
36
|
-
const newFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, newValue);
|
|
35
|
+
const oldFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(rowNode, columnId, oldValue);
|
|
36
|
+
const newFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(rowNode, columnId, newValue);
|
|
37
37
|
if (oldFormattedValue === newFormattedValue) {
|
|
38
38
|
// if the formattedValues are identical, then no alert is fired
|
|
39
39
|
return;
|
|
@@ -6,7 +6,7 @@ const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
7
7
|
class ChartingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
8
8
|
constructor(api) {
|
|
9
|
-
super(ModuleConstants.ChartingModuleId, 'Charts', 'chart', 'ChartPopup', 'Create Charts in order to see Adaptable Data visually', api);
|
|
9
|
+
super(ModuleConstants.ChartingModuleId, 'Charts', 'chart', 'ChartPopup', 'Create AG Grid Charts in order to see Adaptable Data visually', api);
|
|
10
10
|
}
|
|
11
11
|
isModuleAvailable() {
|
|
12
12
|
return this.api.chartingApi.isChartingEnabled() && super.isModuleAvailable();
|
|
@@ -29,10 +29,10 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
29
29
|
// - flash for the underlying small data changes, but the visual does not
|
|
30
30
|
if (this.api.internalApi.getAdaptableOptions().alertOptions.dataChangeDetectionPolicy ===
|
|
31
31
|
'formattedValue') {
|
|
32
|
-
const { oldValue, newValue } = cellDataChangedInfo;
|
|
32
|
+
const { oldValue, newValue, rowNode } = cellDataChangedInfo;
|
|
33
33
|
const columnId = cellDataChangedInfo.column.columnId;
|
|
34
|
-
const oldFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, oldValue);
|
|
35
|
-
const newFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, newValue);
|
|
34
|
+
const oldFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(rowNode, columnId, oldValue);
|
|
35
|
+
const newFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(rowNode, columnId, newValue);
|
|
36
36
|
if (oldFormattedValue === newFormattedValue) {
|
|
37
37
|
// if the formattedValues are identical, then no alert is fired
|
|
38
38
|
return;
|
|
@@ -247,7 +247,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
247
247
|
},
|
|
248
248
|
{
|
|
249
249
|
name: 'Display Format',
|
|
250
|
-
values: [FormatColumnFormatWizardSection_1.getFormatColumnFormatSummaryValue(formatColumn, this.api
|
|
250
|
+
values: [FormatColumnFormatWizardSection_1.getFormatColumnFormatSummaryValue(formatColumn, this.api)],
|
|
251
251
|
},
|
|
252
252
|
getFormatColumnSettingsViewItems_1.getFormatColumnSettingsViewItems(formatColumn),
|
|
253
253
|
getObjectTagsViewItems_1.getObjectTagsViewItems(formatColumn, this.api),
|
|
@@ -10,6 +10,7 @@ const LayoutRadioSelector_1 = require("../View/Layout/LayoutRadioSelector");
|
|
|
10
10
|
const LayoutStatusBarSubPanelPopover_1 = require("../View/Layout/LayoutStatusBarSubPanelPopover");
|
|
11
11
|
const EditCurrentLayoutButton_1 = require("../View/Layout/EditCurrentLayoutButton");
|
|
12
12
|
const LayoutCloneButton_1 = require("../View/Layout/LayoutCloneButton");
|
|
13
|
+
const SaveLayoutButton_1 = require("../View/Layout/SaveLayoutButton");
|
|
13
14
|
class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
14
15
|
constructor(api) {
|
|
15
16
|
super(ModuleConstants.LayoutModuleId, 'Layout', 'layout', 'LayoutPopup', 'Named sets of column visibility, order, groupings, aggregation, pivots etc.', api);
|
|
@@ -293,7 +294,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
293
294
|
content: text,
|
|
294
295
|
popover: popover,
|
|
295
296
|
popoverMinWidth: 150,
|
|
296
|
-
extraActions: [EditCurrentLayoutButton_1.EditCurrentLayoutButton],
|
|
297
|
+
extraActions: [EditCurrentLayoutButton_1.EditCurrentLayoutButton, SaveLayoutButton_1.SaveLayoutButton],
|
|
297
298
|
};
|
|
298
299
|
},
|
|
299
300
|
};
|
|
@@ -28,6 +28,7 @@ export declare const AG_GRID_GROUPED_COLUMN: string;
|
|
|
28
28
|
export declare const AG_GRID_PIVOT_COLUMN: string;
|
|
29
29
|
export declare const ADAPTABLE_ROW_ACTION_BUTTONS = "adaptableRowActionButtons";
|
|
30
30
|
export declare const ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME = "(ActionRowButtons)";
|
|
31
|
+
export declare const DEFAULT_DATE_FORMAT_PATTERN = "dd-MM-yyyy";
|
|
31
32
|
export declare const SYSTEM_STATUS_DEFAULT_MAX_MESSAGES_IN_STORE: number;
|
|
32
33
|
export declare const QUICK_SEARCH_DEFAULT_BACK_COLOR: string;
|
|
33
34
|
export declare const QUICK_SEARCH_DEFAULT_FORE_COLOR: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.THEME_STYLE = exports.SELECTED_ROWS_REPORT = exports.SELECTED_CELLS_REPORT = exports.CURRENT_DATA_REPORT = exports.ALL_DATA_REPORT = void 0;
|
|
3
|
+
exports.SYSTEM_THEMES = exports.SMART_EDIT_MATH_OPERATION_STATE_PROPERTY = exports.SMART_EDIT_VALUE_STATE_PROPERTY = exports.QUICK_SEARCH_STYLE_STATE_PROPERTY = exports.QUICK_SEARCH_TEXT_STATE_PROPERTY = exports.CURRENT_THEME_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DURATION_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DOWN_COLOR_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_UP_COLOR_STATE_PROPERTY = exports.CURRENT_REPORT_STATE_PROPERTY = exports.CURRENT_LAYOUT_STATE_PROPERTY = exports.SUMMARY_OPERATION_STATE_PROPERTY = exports.ALERT_DEFAULT_SHOW_POPUP = exports.ALERT_DEFAULT_MESSAGE_TYPE = exports.PLUS_MINUS_DEFAULT_NUDGE_VALUE = exports.DEFAULT_LIVE_REPORT_THROTTLE_TIME = exports.THEME_DEFAULT_CURRENT_THEME = exports.SYSTEM_DEFAULT_SYSTEM_STATUS_TYPE = exports.CELL_SUMMARY_DEFAULT_OPERATION = exports.QUICK_SEARCH_DEBOUNCE_TIME = exports.QUICK_SEARCH_DEFAULT_FORE_COLOR = exports.QUICK_SEARCH_DEFAULT_BACK_COLOR = exports.SYSTEM_STATUS_DEFAULT_MAX_MESSAGES_IN_STORE = exports.DEFAULT_DATE_FORMAT_PATTERN = exports.ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME = exports.ADAPTABLE_ROW_ACTION_BUTTONS = exports.AG_GRID_PIVOT_COLUMN = exports.AG_GRID_GROUPED_COLUMN = exports.HALF_SECOND = exports.AB_SPECIAL_COLUMN = exports.EMPTY_ARRAY = exports.EMPTY_STRING = exports.FILTER_THROTTLE = exports.FILTER_NEVER = exports.FILTER_ALWAYS = exports.ALL_COLUMN_VALUES = exports.READ_ONLY_STYLE = exports.MENU_PREFIX = exports.AGGRID_TOOLPANEL_COLUMNS = exports.AGGRID_TOOLPANEL_FILTERS = exports.ADAPTABLE_TOOLPANEL_COMPONENT = exports.ADAPTABLE_TOOLPANEL_ID = exports.ADAPTABLE = exports.ADAPTABLE_ID = exports.USER_NAME = exports.DARK_THEME = exports.LIGHT_THEME = exports.DEFAULT_LAYOUT = exports.MISSING_COLUMN = exports.AUTOGENERATED_PK_COLUMN = void 0;
|
|
4
|
+
exports.THEME_STYLE = exports.SELECTED_ROWS_REPORT = exports.SELECTED_CELLS_REPORT = exports.CURRENT_DATA_REPORT = exports.ALL_DATA_REPORT = exports.VISUAL_DATA_REPORT = void 0;
|
|
5
5
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
6
6
|
const UIHelper_1 = require("../../View/UIHelper");
|
|
7
7
|
exports.AUTOGENERATED_PK_COLUMN = '__ADAPTABLE_PK__';
|
|
@@ -31,6 +31,7 @@ exports.AG_GRID_GROUPED_COLUMN = 'ag-Grid-AutoColumn';
|
|
|
31
31
|
exports.AG_GRID_PIVOT_COLUMN = 'pivot_';
|
|
32
32
|
exports.ADAPTABLE_ROW_ACTION_BUTTONS = 'adaptableRowActionButtons';
|
|
33
33
|
exports.ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME = '(ActionRowButtons)';
|
|
34
|
+
exports.DEFAULT_DATE_FORMAT_PATTERN = 'dd-MM-yyyy';
|
|
34
35
|
/*
|
|
35
36
|
Redux / State Defaults
|
|
36
37
|
Try to put all our Redux / State defaults here and ONLY reference from here - avoid magic numbers / strings.
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { ExpressionFunction } from '../../parser/src/types';
|
|
2
|
+
/**
|
|
3
|
+
* List of all the Aggregation Functions available in AdaptableQL
|
|
4
|
+
*/
|
|
2
5
|
export declare type AggregationFunctionName = 'WHERE' | 'COL' | AggregationFunction | ComparisonFunction;
|
|
3
6
|
declare type AggregationFunction = 'SUM';
|
|
4
7
|
declare type ComparisonFunction = 'EQ' | 'NEQ' | 'LT' | 'GT' | 'LTE' | 'GTE';
|
|
@@ -2,6 +2,9 @@ import { ExpressionFunction } from '../../parser/src/types';
|
|
|
2
2
|
import { BaseParameter } from './expressionFunctionUtils';
|
|
3
3
|
import { RowNode } from '@ag-grid-community/all-modules';
|
|
4
4
|
import { AggregateParams } from './scalarAggregationHelper';
|
|
5
|
+
/**
|
|
6
|
+
* List of all the AggregatedScalar Functions available in AdaptableQL
|
|
7
|
+
*/
|
|
5
8
|
export declare type AggregatedScalarFunctionName = AggregationFunction | OperandFunction;
|
|
6
9
|
declare type AggregationFunction = 'SUM' | 'PERCENTAGE' | 'AVG' | 'MIN' | 'MAX' | 'CUMUL';
|
|
7
10
|
declare type OperandFunction = 'COL' | 'OVER' | 'GROUP_BY';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { ExpressionFunction } from '../../parser/src/types';
|
|
2
|
+
/**
|
|
3
|
+
* List of all the Boolean Functions available in AdaptableQL
|
|
4
|
+
*/
|
|
2
5
|
export declare type BooleanFunctionName = 'EQ' | 'NEQ' | 'GT' | 'LT' | 'GTE' | 'LTE' | 'AND' | 'OR' | 'NOT' | 'BETWEEN' | 'IN' | 'IS_BLANK' | 'CONTAINS' | 'STARTS_WITH' | 'ENDS_WITH' | 'ANY_CONTAINS' | 'QUERY';
|
|
3
6
|
export declare const booleanExpressionFunctions: Record<BooleanFunctionName, ExpressionFunction>;
|
|
@@ -233,10 +233,32 @@ exports.booleanExpressionFunctions = {
|
|
|
233
233
|
});
|
|
234
234
|
},
|
|
235
235
|
isPredicate: true,
|
|
236
|
-
description: 'Returns true if any
|
|
236
|
+
description: 'Returns true if any Column contains input',
|
|
237
237
|
signatures: ['ANY_CONTAINS(value)'],
|
|
238
238
|
examples: ['ANY_CONTAINS("abc")'],
|
|
239
239
|
},
|
|
240
|
+
/*
|
|
241
|
+
ANY_SEARCHABLE_CONTAINS: {
|
|
242
|
+
handler(args, context) {
|
|
243
|
+
const searchTerm = getStringValue(context, String(args[0]));
|
|
244
|
+
return context.api?.columnApi
|
|
245
|
+
.getVisibleColumns()
|
|
246
|
+
.filter((c) => !c.isExcludedFromQuickSearch)
|
|
247
|
+
.some((column) => {
|
|
248
|
+
const value = context.api?.gridApi.getDisplayValueFromRowNode(
|
|
249
|
+
context.node,
|
|
250
|
+
column.columnId
|
|
251
|
+
);
|
|
252
|
+
const columnValue = getStringValue(context, String(value));
|
|
253
|
+
return columnValue.indexOf(searchTerm) !== -1;
|
|
254
|
+
});
|
|
255
|
+
},
|
|
256
|
+
isPredicate: true,
|
|
257
|
+
description: 'Returns true if any Searchable Column contains input',
|
|
258
|
+
signatures: ['ANY_SEARCHABLE_CONTAINS(value)'],
|
|
259
|
+
examples: ['ANY_SEARCHABLE_CONTAINS("abc")'],
|
|
260
|
+
},
|
|
261
|
+
*/
|
|
240
262
|
QUERY: {
|
|
241
263
|
handler(args, context) {
|
|
242
264
|
var _a, _b;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { ExpressionFunction } from '../../parser/src/types';
|
|
2
|
+
/**
|
|
3
|
+
* List of all the Observable Functions available in AdaptableQL
|
|
4
|
+
*/
|
|
2
5
|
export declare type ObservableFunctionName = 'WHERE' | 'COL' | 'TIMEFRAME' | ObservableFunction | ChangeFunction;
|
|
3
6
|
declare type ObservableFunction = 'ROW_CHANGE' | 'GRID_CHANGE';
|
|
4
7
|
declare type ChangeFunction = 'MAX' | 'MIN' | 'NONE' | 'COUNT';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { ExpressionFunction } from '../../parser/src/types';
|
|
2
|
+
/**
|
|
3
|
+
* List of all the Scalar Functions available in AdaptableQL
|
|
4
|
+
*/
|
|
2
5
|
export declare type ScalarFunctionName = 'ADD' | 'SUB' | 'MUL' | 'DIV' | 'MOD' | 'POW' | 'MIN' | 'MAX' | 'AVG' | 'DATE' | 'NOW' | 'TODAY' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR' | 'ADD_DAYS' | 'ADD_WEEKS' | 'ADD_MONTHS' | 'ADD_YEARS' | 'DIFF_DAYS' | 'DIFF_WEEKS' | 'DIFF_MONTHS' | 'DIFF_YEARS' | 'SUB_STRING' | 'REPLACE' | 'COALESCE' | 'LEN' | 'UPPER' | 'LOWER' | 'CONCAT' | 'IF' | 'COL';
|
|
3
6
|
export declare const scalarExpressionFunctions: Record<ScalarFunctionName, ExpressionFunction>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NumberFormatterOptions, DateFormatterOptions, AdaptableFormat, StringFormatterOptions } from '../../PredefinedConfig/Common/AdaptableFormat';
|
|
2
2
|
export declare function Format(input: any, format: AdaptableFormat): string;
|
|
3
|
-
export declare function NumberFormatter(input: number, options?: NumberFormatterOptions): string;
|
|
3
|
+
export declare function NumberFormatter(input: number | string, options?: NumberFormatterOptions): string;
|
|
4
4
|
export declare function DateFormatter(input: number | Date | string, options: DateFormatterOptions): string | undefined;
|
|
5
5
|
export declare function StringFormatter(input: string, options?: StringFormatterOptions): string;
|
|
6
6
|
declare const _default: {
|
|
@@ -6,6 +6,7 @@ const tslib_1 = require("tslib");
|
|
|
6
6
|
// import dateFnsFormat from 'date-fns/format';
|
|
7
7
|
const format_1 = tslib_1.__importDefault(require("date-fns/format"));
|
|
8
8
|
const sentence_case_1 = require("sentence-case");
|
|
9
|
+
const GeneralConstants_1 = require("../Constants/GeneralConstants");
|
|
9
10
|
function Format(input, format) {
|
|
10
11
|
if (format.Formatter === 'NumberFormatter') {
|
|
11
12
|
return NumberFormatter(input, format.Options);
|
|
@@ -20,9 +21,12 @@ function NumberFormatter(input, options = {}) {
|
|
|
20
21
|
if (input == null || input == undefined) {
|
|
21
22
|
return undefined;
|
|
22
23
|
}
|
|
24
|
+
if (typeof input === 'string') {
|
|
25
|
+
return input;
|
|
26
|
+
}
|
|
23
27
|
let n = Number(input);
|
|
24
28
|
if (isNaN(n)) {
|
|
25
|
-
return
|
|
29
|
+
return input.toString();
|
|
26
30
|
}
|
|
27
31
|
const fractionsSepatator = options.FractionSeparator ? options.FractionSeparator : '.';
|
|
28
32
|
let multiplier = options.Multiplier ? options.Multiplier : 1;
|
|
@@ -68,17 +72,18 @@ function NumberFormatter(input, options = {}) {
|
|
|
68
72
|
}
|
|
69
73
|
exports.NumberFormatter = NumberFormatter;
|
|
70
74
|
function DateFormatter(input, options) {
|
|
71
|
-
if (input == null || input == undefined) {
|
|
75
|
+
if (input == null || input == undefined || input == 'Invalid Date') {
|
|
72
76
|
return undefined;
|
|
73
77
|
}
|
|
74
78
|
try {
|
|
79
|
+
// not sure if this is right if using a custom formatter...
|
|
75
80
|
if (typeof input === 'string') {
|
|
76
81
|
input = new Date(input);
|
|
77
82
|
}
|
|
78
|
-
return format_1.default(input, options.Pattern ||
|
|
83
|
+
return format_1.default(input, (options === null || options === void 0 ? void 0 : options.Pattern) || GeneralConstants_1.DEFAULT_DATE_FORMAT_PATTERN);
|
|
79
84
|
}
|
|
80
85
|
catch (error) {
|
|
81
|
-
return
|
|
86
|
+
return input;
|
|
82
87
|
}
|
|
83
88
|
}
|
|
84
89
|
exports.DateFormatter = DateFormatter;
|
|
@@ -128,7 +128,7 @@ function ReturnItemCount(items, itemName) {
|
|
|
128
128
|
}
|
|
129
129
|
exports.ReturnItemCount = ReturnItemCount;
|
|
130
130
|
function IsInputNullOrEmpty(itemToCheck) {
|
|
131
|
-
if (itemToCheck == 'Invalid Date') {
|
|
131
|
+
if (itemToCheck == 'Invalid Date ') {
|
|
132
132
|
return true;
|
|
133
133
|
}
|
|
134
134
|
if (typeof itemToCheck === 'string') {
|
|
@@ -24,8 +24,10 @@ import { AdaptableMessageType } from '../PredefinedConfig/Common/AdaptableMessag
|
|
|
24
24
|
import { SystemStatusMessageInfo } from '../PredefinedConfig/Common/SystemStatusMessageInfo';
|
|
25
25
|
import { NotificationsOptions } from '../AdaptableOptions/NotificationsOptions';
|
|
26
26
|
import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
|
|
27
|
-
import { ColumnFilter, FlashingCellDefinition, GridDataChangedInfo, SystemFilterPredicateId } from '../types';
|
|
27
|
+
import { ColumnFilter, CustomDisplayFormatterContext, FlashingCellDefinition, GridDataChangedInfo, SystemFilterPredicateId } from '../types';
|
|
28
28
|
import { ToastOptions } from 'react-toastify';
|
|
29
|
+
import { RowNode } from '@ag-grid-community/all-modules';
|
|
30
|
+
import { AdaptableApi } from '../../types';
|
|
29
31
|
export declare function CreateEmptyCustomSort(): CustomSort;
|
|
30
32
|
export declare function CreateEmptyCalculatedColumn(isFilterable: boolean): CalculatedColumn;
|
|
31
33
|
export declare function CreateEmptyNamedQuery(expression?: string): NamedQuery;
|
|
@@ -61,6 +63,7 @@ export declare function CreateEmptyStyle(): AdaptableStyle;
|
|
|
61
63
|
export declare function CreateSystemStatusMessageInfo(message: string, type: AdaptableMessageType, furtherInfo?: string): SystemStatusMessageInfo;
|
|
62
64
|
export declare function CreateEmptyCellSummmary(): CellSummmary;
|
|
63
65
|
export declare function CreateColumnFilter(ColumnId: string, PredicateId: SystemFilterPredicateId, Inputs: any[]): ColumnFilter;
|
|
66
|
+
export declare function CreateCustomDisplayFormatterContext(value: any, node: RowNode, abColumn: AdaptableColumn, api: AdaptableApi): CustomDisplayFormatterContext;
|
|
64
67
|
export declare function CreateToastOptions(notificationsOptions: NotificationsOptions, { onClose, containerId }: {
|
|
65
68
|
onClose?: VoidFunction;
|
|
66
69
|
containerId: string;
|
|
@@ -100,5 +103,6 @@ export declare const ObjectFactory: {
|
|
|
100
103
|
CreateEmptyGlue42Report: typeof CreateEmptyGlue42Report;
|
|
101
104
|
CreateSystemStatusMessageInfo: typeof CreateSystemStatusMessageInfo;
|
|
102
105
|
CreateToastOptions: typeof CreateToastOptions;
|
|
106
|
+
CreateCustomDisplayFormatterContext: typeof CreateCustomDisplayFormatterContext;
|
|
103
107
|
};
|
|
104
108
|
export default ObjectFactory;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObjectFactory = exports.CreateToastOptions = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyConditionalStyle = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.CreateGlue42Schedule = exports.CreateIPushPullSchedule = exports.CreateEmptyOpenFinSchedule = exports.CreateEmptyGlue42Schedule = exports.CreateEmptyIPushPullSchedule = exports.CreateEmptyOpenFinReport = exports.CreateEmptyGlue42Report = exports.CreateEmptyIPushPullReport = exports.CreateEmptyReportSchedule = exports.CreateEmptyReminderSchedule = exports.CreateEmptyBaseSchedule = exports.CreateEmptyReport = exports.CreateInternalAlertDefinitionForMessages = exports.CreateEmptyFlashingCellDefinition = exports.CreateEmptyAlertDefinition = exports.CreateRowChangedAlert = exports.CreateCellChangedAlert = exports.CreateGenericAlert = exports.CreateEmptyPlusMinusNudge = exports.CreateEmptyNamedQuery = exports.CreateEmptyCalculatedColumn = exports.CreateEmptyCustomSort = void 0;
|
|
3
|
+
exports.ObjectFactory = exports.CreateToastOptions = exports.CreateCustomDisplayFormatterContext = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyConditionalStyle = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.CreateGlue42Schedule = exports.CreateIPushPullSchedule = exports.CreateEmptyOpenFinSchedule = exports.CreateEmptyGlue42Schedule = exports.CreateEmptyIPushPullSchedule = exports.CreateEmptyOpenFinReport = exports.CreateEmptyGlue42Report = exports.CreateEmptyIPushPullReport = exports.CreateEmptyReportSchedule = exports.CreateEmptyReminderSchedule = exports.CreateEmptyBaseSchedule = exports.CreateEmptyReport = exports.CreateInternalAlertDefinitionForMessages = exports.CreateEmptyFlashingCellDefinition = exports.CreateEmptyAlertDefinition = exports.CreateRowChangedAlert = exports.CreateCellChangedAlert = exports.CreateGenericAlert = exports.CreateEmptyPlusMinusNudge = exports.CreateEmptyNamedQuery = exports.CreateEmptyCalculatedColumn = exports.CreateEmptyCustomSort = void 0;
|
|
4
4
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
5
5
|
const GeneralConstants_1 = require("./Constants/GeneralConstants");
|
|
6
6
|
const Uuid_1 = require("../PredefinedConfig/Uuid");
|
|
@@ -304,7 +304,7 @@ function CreateEmptyFreeTextColumn(isFilterable) {
|
|
|
304
304
|
}
|
|
305
305
|
exports.CreateEmptyFreeTextColumn = CreateEmptyFreeTextColumn;
|
|
306
306
|
function CreateEmptyLayout(layout, adaptableColumns) {
|
|
307
|
-
return Object.assign(Object.assign({}, layout), { Uuid: Uuid_1.createUuid(), Columns: layout.Columns || [], ColumnSorts: layout.ColumnSorts || [],
|
|
307
|
+
return Object.assign(Object.assign({}, layout), { Uuid: Uuid_1.createUuid(), Columns: layout.Columns || [], ColumnSorts: layout.ColumnSorts || [], ColumnFilters: layout.ColumnFilters || [],
|
|
308
308
|
// ColumnFlexMap: layout.ColumnFlexMap || {},
|
|
309
309
|
ColumnWidthMap: layout.ColumnWidthMap || {}, RowGroupedColumns: layout.RowGroupedColumns ||
|
|
310
310
|
(adaptableColumns ? adaptableColumns.filter((c) => c.isGrouped).map((c) => c.columnId) : []) });
|
|
@@ -355,6 +355,15 @@ function CreateColumnFilter(ColumnId, PredicateId, Inputs) {
|
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
357
|
exports.CreateColumnFilter = CreateColumnFilter;
|
|
358
|
+
function CreateCustomDisplayFormatterContext(value, node, abColumn, api) {
|
|
359
|
+
return {
|
|
360
|
+
adaptableColumn: abColumn,
|
|
361
|
+
cellValue: value,
|
|
362
|
+
rowNode: node,
|
|
363
|
+
adaptableApi: api,
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
exports.CreateCustomDisplayFormatterContext = CreateCustomDisplayFormatterContext;
|
|
358
367
|
function CreateToastOptions(notificationsOptions, { onClose, containerId }) {
|
|
359
368
|
const adaptableToastPosition = notificationsOptions.position;
|
|
360
369
|
const position = getToastPosition(adaptableToastPosition);
|
|
@@ -443,5 +452,6 @@ exports.ObjectFactory = {
|
|
|
443
452
|
CreateEmptyGlue42Report,
|
|
444
453
|
CreateSystemStatusMessageInfo,
|
|
445
454
|
CreateToastOptions,
|
|
455
|
+
CreateCustomDisplayFormatterContext,
|
|
446
456
|
};
|
|
447
457
|
exports.default = exports.ObjectFactory;
|
|
@@ -17,6 +17,6 @@ export interface IReportService extends IAdaptableService {
|
|
|
17
17
|
getReportDataAsArray(report: Report, includePrimaryKey?: boolean): any[][];
|
|
18
18
|
convertReportDataToArray(reportData: ReportData): any[][];
|
|
19
19
|
getCellExportValueFromRowNode(rowNode: RowNode, columnId: string): any;
|
|
20
|
-
getCellExportValueFromRawValue(rawValue: any, columnId: string): any;
|
|
20
|
+
getCellExportValueFromRawValue(rowNode: RowNode, rawValue: any, columnId: string): any;
|
|
21
21
|
getReportFileName(reportName: string): string;
|
|
22
22
|
}
|
|
@@ -21,7 +21,7 @@ export declare class ReportService implements IReportService {
|
|
|
21
21
|
getRowObjectForColumnIds(rowNode: RowNode, columnIds: string[]): Record<string, any>;
|
|
22
22
|
PublishLiveLiveDataChangedEvent(reportDestination: 'ipushpull' | 'Glue42', liveDataTrigger: 'Connected' | 'Disconnected' | 'LiveDataStarted' | 'LiveDataStopped' | 'LiveDataUpdated', liveReport?: any): void;
|
|
23
23
|
getCellExportValueFromRowNode(rowNode: RowNode, columnId: string): any;
|
|
24
|
-
getCellExportValueFromRawValue(cellRawValue: any, columnId: string): any;
|
|
24
|
+
getCellExportValueFromRawValue(rowNode: RowNode, cellRawValue: any, columnId: string): any;
|
|
25
25
|
getReportFileName(reportName: string): string;
|
|
26
26
|
destroy(): void;
|
|
27
27
|
private getCustomExportDateFormat;
|
|
@@ -300,9 +300,9 @@ class ReportService {
|
|
|
300
300
|
this.adaptableApi.eventApi.emit('LiveDataChanged', liveDataChangedInfo);
|
|
301
301
|
}
|
|
302
302
|
getCellExportValueFromRowNode(rowNode, columnId) {
|
|
303
|
-
return this.getCellExportValueFromRawValue(this.adaptableApi.gridApi.getRawValueFromRowNode(rowNode, columnId), columnId);
|
|
303
|
+
return this.getCellExportValueFromRawValue(rowNode, this.adaptableApi.gridApi.getRawValueFromRowNode(rowNode, columnId), columnId);
|
|
304
304
|
}
|
|
305
|
-
getCellExportValueFromRawValue(cellRawValue, columnId) {
|
|
305
|
+
getCellExportValueFromRawValue(rowNode, cellRawValue, columnId) {
|
|
306
306
|
if (StringExtensions_1.default.IsNullOrEmpty(cellRawValue)) {
|
|
307
307
|
return cellRawValue;
|
|
308
308
|
}
|
|
@@ -316,7 +316,7 @@ class ReportService {
|
|
|
316
316
|
}
|
|
317
317
|
// otherwise check the general export format types
|
|
318
318
|
let cellExportFormat = this.computeCellExportValueFormat(columnType);
|
|
319
|
-
return this.getCellExportValueFromRawValueByType(cellRawValue, columnId, cellExportFormat);
|
|
319
|
+
return this.getCellExportValueFromRawValueByType(rowNode, cellRawValue, columnId, cellExportFormat);
|
|
320
320
|
}
|
|
321
321
|
getReportFileName(reportName) {
|
|
322
322
|
let fileName = StringExtensions_1.default.ReplaceEmptySpacesWithUnderscore(reportName);
|
|
@@ -333,13 +333,13 @@ class ReportService {
|
|
|
333
333
|
getCustomExportDateFormat() {
|
|
334
334
|
return this.adaptableApi.internalApi.getAdaptableOptions().exportOptions.exportDateFormat;
|
|
335
335
|
}
|
|
336
|
-
getCellExportValueFromRawValueByType(cellRawValue, columnId,
|
|
336
|
+
getCellExportValueFromRawValueByType(rowNode, cellRawValue, columnId,
|
|
337
337
|
// default to rawValue if, for some reason, the configs provide invalid values
|
|
338
338
|
type = 'rawValue') {
|
|
339
339
|
return type === 'rawValue'
|
|
340
340
|
? cellRawValue
|
|
341
341
|
: // type === formattedValue
|
|
342
|
-
this.adaptableApi.gridApi.getFormattedValueFromRawValue(columnId, cellRawValue);
|
|
342
|
+
this.adaptableApi.gridApi.getFormattedValueFromRawValue(rowNode, columnId, cellRawValue);
|
|
343
343
|
}
|
|
344
344
|
computeCellExportValueFormat(columnDataType) {
|
|
345
345
|
const exportOptions = this.adaptableApi.internalApi.getAdaptableOptions().exportOptions;
|
|
@@ -74,7 +74,7 @@ const CalculatedColumnSettingsWizardSection = (props) => {
|
|
|
74
74
|
const ColumnName = data.FriendlyName;
|
|
75
75
|
const ColumnId = data.ColumnId;
|
|
76
76
|
let { DataType: dataType } = (_a = data.CalculatedColumnSettings) !== null && _a !== void 0 ? _a : {};
|
|
77
|
-
const { Width, ShowToolTip, HeaderToolTip
|
|
77
|
+
const { Width, ShowToolTip, HeaderToolTip } = (_b = data.CalculatedColumnSettings) !== null && _b !== void 0 ? _b : {};
|
|
78
78
|
const handleSpecialColumnSettingsChange = (settings) => {
|
|
79
79
|
props.onChange(Object.assign(Object.assign({}, data), { CalculatedColumnSettings: Object.assign(Object.assign({}, data.CalculatedColumnSettings), settings) }));
|
|
80
80
|
};
|
|
@@ -119,14 +119,7 @@ const CalculatedColumnSettingsWizardSection = (props) => {
|
|
|
119
119
|
}) })),
|
|
120
120
|
' ',
|
|
121
121
|
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
122
|
-
React.createElement(CheckBox_1.CheckBox, { "data-name": "column-show-tooltip", onChange: (checked) => handleSpecialColumnSettingsChange({ ShowToolTip: checked }), checked: ShowToolTip }, "Show Expression as Cell Tooltip")),
|
|
123
|
-
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
124
|
-
React.createElement(CheckBox_1.CheckBox, { "data-name": "column-external-expression-evaluation", onChange: (checked) => handleSpecialColumnSettingsChange({ ExternallyEvaluatedExpression: checked }), checked: ExternallyEvaluatedExpression }, "Suppress Expression Evaluation"),
|
|
125
|
-
ExternallyEvaluatedExpression && (React.createElement(rebass_1.Box, { "data-name": "note-external-expression-evaluation", p: 2, style: {
|
|
126
|
-
background: 'var(--ab-color-primary)',
|
|
127
|
-
borderRadius: 'var(--ab__border-radius)',
|
|
128
|
-
whiteSpace: 'pre-wrap',
|
|
129
|
-
} }, "The column value is loaded from the row data property with the same name as the ColumnId"))))))),
|
|
122
|
+
React.createElement(CheckBox_1.CheckBox, { "data-name": "column-show-tooltip", onChange: (checked) => handleSpecialColumnSettingsChange({ ShowToolTip: checked }), checked: ShowToolTip }, "Show Expression as Cell Tooltip")))))),
|
|
130
123
|
ErrorMessage ? React.createElement(ErrorBox_1.default, { marginTop: 2 }, ErrorMessage) : null,
|
|
131
124
|
React.createElement(SpecialColumnSettingsWizardStep_1.SpecialColumnSettingsWizardStep, { isEditable: false, settings: data.CalculatedColumnSettings, onChange: handleSpecialColumnSettingsChange })));
|
|
132
125
|
};
|
|
@@ -5,7 +5,7 @@ import * as LayoutRedux from '../../Redux/ActionsReducers/LayoutRedux';
|
|
|
5
5
|
import { ColumnFilter } from '../../types';
|
|
6
6
|
export interface FilterSummaryProps extends Omit<ModuleSummaryProps<FilterSummaryComponent>, 'onClosePopup' | 'modalContainer'> {
|
|
7
7
|
ColumnFilters: ColumnFilter[];
|
|
8
|
-
onClearFilter: (columnFilter: ColumnFilter) => LayoutRedux.
|
|
8
|
+
onClearFilter: (columnFilter: ColumnFilter) => LayoutRedux.LayoutColumnFilterClearAction;
|
|
9
9
|
}
|
|
10
10
|
export declare class FilterSummaryComponent extends React.Component<FilterSummaryProps, EditableConfigEntityState> {
|
|
11
11
|
constructor(props: FilterSummaryProps);
|
|
@@ -3,7 +3,6 @@ import { FormatColumn } from '../../../PredefinedConfig/FormatColumnState';
|
|
|
3
3
|
import { AdaptableFormat } from '../../../PredefinedConfig/Common/AdaptableFormat';
|
|
4
4
|
import { AdaptableScope } from '../../../PredefinedConfig/Common/AdaptableScope';
|
|
5
5
|
import { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
6
|
-
import { FormatColumnApi } from '../../../types';
|
|
7
6
|
export declare type FormatColumnFormatWizardSectionProps = {
|
|
8
7
|
onChange: (data: FormatColumn) => void;
|
|
9
8
|
};
|
|
@@ -11,7 +10,7 @@ export interface FormatColumnFormatWizardState {
|
|
|
11
10
|
DisplayFormat: AdaptableFormat;
|
|
12
11
|
NumericFormat?: 'Percent' | 'Thousand' | 'Million' | 'Dollar' | 'Sterling' | undefined;
|
|
13
12
|
}
|
|
14
|
-
export declare const getFormatColumnFormatSummaryValue: (data: FormatColumn,
|
|
13
|
+
export declare const getFormatColumnFormatSummaryValue: (data: FormatColumn, api: AdaptableApi) => string;
|
|
15
14
|
export declare const renderFormatColumnFormatSummary: (data: FormatColumn, api: AdaptableApi) => JSX.Element;
|
|
16
15
|
export declare const getFormatDisplayTypeForScope: (scope: AdaptableScope, api: AdaptableApi) => 'Number' | 'Date' | 'String' | undefined;
|
|
17
16
|
export declare const FormatColumnFormatWizardSection: (props: FormatColumnFormatWizardSectionProps) => JSX.Element;
|