@adaptabletools/adaptable-cjs 22.0.0-canary.0 → 22.0.0-canary.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -6
- package/index.css +3 -14
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +9 -0
- package/src/AdaptableOptions/AdaptablePlugin.js +6 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +1 -2
- package/src/AdaptableOptions/FilterOptions.d.ts +3 -0
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +6 -0
- package/src/AdaptableState/Common/RowDataChangedInfo.d.ts +3 -0
- package/src/AdaptableState/InitialState.d.ts +1 -1
- package/src/AdaptableState/Selection/GridCell.d.ts +9 -0
- package/src/Api/GridApi.d.ts +14 -0
- package/src/Api/Implementation/ActionColumnApiImpl.js +1 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +52 -0
- package/src/Api/Implementation/AlertApiImpl.js +1 -0
- package/src/Api/Implementation/ApiBase.js +1 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +1 -0
- package/src/Api/Implementation/ChartingApiImpl.js +4 -0
- package/src/Api/Implementation/ColumnApiImpl.js +1 -0
- package/src/Api/Implementation/ColumnFilterApiImpl.js +1 -0
- package/src/Api/Implementation/CommentsApiImpl.js +1 -0
- package/src/Api/Implementation/CustomSortApiImpl.js +1 -0
- package/src/Api/Implementation/DashboardApiImpl.js +1 -0
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +12 -15
- package/src/Api/Implementation/DataImportApiImpl.js +1 -0
- package/src/Api/Implementation/DataSetApiImpl.js +1 -0
- package/src/Api/Implementation/EntitlementApiImpl.js +1 -0
- package/src/Api/Implementation/EventApiImpl.js +16 -14
- package/src/Api/Implementation/ExportApiImpl.js +1 -0
- package/src/Api/Implementation/ExpressionApiImpl.js +1 -0
- package/src/Api/Implementation/Fdc3ApiImpl.js +1 -0
- package/src/Api/Implementation/FilterApiImpl.js +3 -0
- package/src/Api/Implementation/FlashingCellApiImpl.js +1 -0
- package/src/Api/Implementation/FormatColumnApiImpl.js +1 -0
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -0
- package/src/Api/Implementation/GridApiImpl.d.ts +9 -0
- package/src/Api/Implementation/GridApiImpl.js +17 -0
- package/src/Api/Implementation/GridFilterApiImpl.js +1 -0
- package/src/Api/Implementation/LayoutApiImpl.js +1 -0
- package/src/Api/Implementation/NamedQueryApiImpl.js +1 -0
- package/src/Api/Implementation/NoteApiImpl.js +1 -0
- package/src/Api/Implementation/PredicateApiImpl.js +1 -0
- package/src/Api/Implementation/RowFormApiImpl.js +1 -0
- package/src/Api/Implementation/StyledColumnApiImpl.js +1 -0
- package/src/Api/Implementation/SystemStatusApiImpl.js +2 -0
- package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +1 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +2 -1
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -0
- package/src/Redux/Store/AdaptableStore.js +57 -50
- package/src/Strategy/AdaptableModuleBase.js +4 -0
- package/src/Strategy/AlertModule.js +1 -0
- package/src/Strategy/CalculatedColumnModule.js +1 -0
- package/src/Strategy/CellSummaryModule.js +1 -1
- package/src/Strategy/DataChangeHistoryModule.js +1 -0
- package/src/Strategy/FlashingCellModule.js +1 -0
- package/src/Strategy/FreeTextColumnModule.js +1 -0
- package/src/Strategy/LayoutModule.js +2 -1
- package/src/Strategy/PlusMinusModule.js +2 -0
- package/src/Strategy/ScheduleModule.js +1 -0
- package/src/Strategy/ShortcutModule.js +2 -0
- package/src/Strategy/TeamSharingModule.js +10 -10
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +18 -17
- package/src/Utilities/Constants/DocumentationLinkConstants.js +19 -18
- package/src/Utilities/ExpressionFunctions/deepMap.js +31 -31
- package/src/Utilities/MenuItem.js +18 -0
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +8 -0
- package/src/Utilities/Services/AlertService.js +6 -4
- package/src/Utilities/Services/AnnotationsService.js +3 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +2 -1
- package/src/Utilities/Services/ChartingService.js +1 -0
- package/src/Utilities/Services/DataService.js +10 -2
- package/src/Utilities/Services/Fdc3Service.js +5 -3
- package/src/Utilities/Services/FlashingCellService.js +5 -0
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/Utilities/Services/MetamodelService.js +2 -2
- package/src/Utilities/Services/ModuleService.js +38 -38
- package/src/Utilities/Services/QueryLanguageService.js +6 -5
- package/src/Utilities/Services/RowFormService.js +1 -0
- package/src/Utilities/Services/RowSummaryService.js +10 -7
- package/src/Utilities/Services/TeamSharingService.js +3 -1
- package/src/Utilities/Services/ThemeService.js +11 -9
- package/src/Utilities/Services/ValidationService.js +1 -0
- package/src/Utilities/createAgStatusPanelComponent.js +3 -0
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -0
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +8 -8
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -0
- package/src/View/Components/Buttons/ButtonBase/index.js +9 -9
- package/src/View/Components/Buttons/EntityListActionButtons.js +18 -18
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +1 -1
- package/src/View/Components/ExpressionWizard.js +5 -5
- package/src/View/Components/Panels/PanelDashboard/index.js +8 -8
- package/src/View/Components/Panels/PanelToolPanel/index.js +7 -7
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +2 -0
- package/src/View/CustomSort/CustomSortSummary.js +13 -13
- package/src/View/FormatColumn/FormatColumnSummary.js +13 -13
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +13 -13
- package/src/View/SmartEdit/SmartEditViewPanel.js +1 -0
- package/src/View/Theme/ThemePopup.js +13 -16
- package/src/agGrid/Adaptable.js +4 -0
- package/src/agGrid/AdaptableAgGrid.d.ts +9 -0
- package/src/agGrid/AdaptableAgGrid.js +160 -37
- package/src/agGrid/AdaptableFilterHandler.js +4 -0
- package/src/agGrid/AdaptableLogger.d.ts +3 -0
- package/src/agGrid/AdaptableLogger.js +10 -0
- package/src/agGrid/AgGridAdapter.js +11 -1
- package/src/agGrid/AgGridColumnAdapter.js +2 -0
- package/src/agGrid/AgGridExportAdapter.js +10 -9
- package/src/agGrid/AgGridFilterAdapter.js +4 -0
- package/src/agGrid/AgGridFloatingFilterAdapter.js +3 -0
- package/src/agGrid/AgGridMenuAdapter.js +1 -0
- package/src/agGrid/AgGridModulesAdapter.js +2 -1
- package/src/agGrid/AgGridOptionsService.js +3 -0
- package/src/agGrid/AgGridThemeAdapter.js +2 -0
- package/src/agGrid/cellRenderers/ActionColumnRenderer.js +5 -0
- package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -0
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +1 -0
- package/src/agGrid/editors/AdaptableDateEditor/index.js +6 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +16 -12
- package/src/agGrid/editors/AdaptablePercentageEditor/index.js +17 -13
- package/src/agGrid/index.d.ts +6 -0
- package/src/agGrid/index.js +6 -0
- package/src/components/Datepicker/index.js +1 -1
- package/src/components/overlayBaseZIndex.js +1 -1
- package/src/components/utils/useContainerScrollObserver/index.js +17 -14
- package/src/devTools/index.js +54 -53
- package/src/env.js +2 -2
- package/src/layout-manager/src/LMEmitter.js +11 -11
- package/src/layout-manager/src/LMLogger.js +7 -0
- package/src/layout-manager/src/index.js +56 -51
- package/src/metamodel/adaptable.metamodel.d.ts +57 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/AdaptableUpgradeHelper.js +3 -0
- package/src/migration/VersionUpgrade.js +1 -0
- package/src/migration/VersionUpgrade17.js +1 -2
- package/src/parser/src/ExpressionEvaluationError.js +1 -0
- package/tsconfig.cjs.tsbuildinfo +1 -1
|
@@ -52,6 +52,58 @@ const ContextMenuApiImpl_1 = require("./ContextMenuApiImpl");
|
|
|
52
52
|
const FilterApiImpl_1 = require("./FilterApiImpl");
|
|
53
53
|
const RowFormApiImpl_1 = require("./RowFormApiImpl");
|
|
54
54
|
class AdaptableApiImpl {
|
|
55
|
+
adaptable;
|
|
56
|
+
internalApi;
|
|
57
|
+
optionsApi;
|
|
58
|
+
actionColumnApi;
|
|
59
|
+
applicationApi;
|
|
60
|
+
alertApi;
|
|
61
|
+
flashingCellApi;
|
|
62
|
+
predicateApi;
|
|
63
|
+
bulkUpdateApi;
|
|
64
|
+
calendarApi;
|
|
65
|
+
calculatedColumnApi;
|
|
66
|
+
cellSummaryApi;
|
|
67
|
+
columnApi;
|
|
68
|
+
stateApi;
|
|
69
|
+
customSortApi;
|
|
70
|
+
dashboardApi;
|
|
71
|
+
dataSetApi;
|
|
72
|
+
entitlementApi;
|
|
73
|
+
eventApi;
|
|
74
|
+
exportApi;
|
|
75
|
+
formatColumnApi;
|
|
76
|
+
freeTextColumnApi;
|
|
77
|
+
gridApi;
|
|
78
|
+
layoutApi;
|
|
79
|
+
plusMinusApi;
|
|
80
|
+
quickSearchApi;
|
|
81
|
+
rowFormApi;
|
|
82
|
+
scheduleApi;
|
|
83
|
+
shortcutApi;
|
|
84
|
+
smartEditApi;
|
|
85
|
+
filterApi;
|
|
86
|
+
systemStatusApi;
|
|
87
|
+
pluginsApi;
|
|
88
|
+
themeApi;
|
|
89
|
+
userInterfaceApi;
|
|
90
|
+
expressionApi;
|
|
91
|
+
settingsPanelApi;
|
|
92
|
+
styledColumnApi;
|
|
93
|
+
toolPanelApi;
|
|
94
|
+
teamSharingApi;
|
|
95
|
+
columnScopeApi;
|
|
96
|
+
dataChangeHistoryApi;
|
|
97
|
+
chartingApi;
|
|
98
|
+
statusBarApi;
|
|
99
|
+
noteApi;
|
|
100
|
+
columnMenuApi;
|
|
101
|
+
contextMenuApi;
|
|
102
|
+
fdc3Api;
|
|
103
|
+
dataImportApi;
|
|
104
|
+
namedQueryApi;
|
|
105
|
+
commentApi;
|
|
106
|
+
destroyed;
|
|
55
107
|
constructor(adaptable) {
|
|
56
108
|
this.adaptable = adaptable;
|
|
57
109
|
this.destroyed = false;
|
|
@@ -12,6 +12,7 @@ const AdaptableAlert_1 = require("../../AdaptableState/Common/AdaptableAlert");
|
|
|
12
12
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
13
13
|
const AlertInternalApi_1 = require("../Internal/AlertInternalApi");
|
|
14
14
|
class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
15
|
+
internalApi;
|
|
15
16
|
constructor(_adaptable) {
|
|
16
17
|
super(_adaptable);
|
|
17
18
|
this.internalApi = new AlertInternalApi_1.AlertInternalApi(_adaptable);
|
|
@@ -6,6 +6,7 @@ const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper
|
|
|
6
6
|
const Uuid_1 = require("../../AdaptableState/Uuid");
|
|
7
7
|
// Base class for the Api - provides checking dispatching methods
|
|
8
8
|
class ApiBase {
|
|
9
|
+
_adaptable;
|
|
9
10
|
/**
|
|
10
11
|
* Constructor for all the api classes which simply takes and assigns an instance of Adaptable
|
|
11
12
|
* @param _adaptable the core IAdaptable object
|
|
@@ -8,6 +8,7 @@ const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/
|
|
|
8
8
|
const CalculatedColumnInternalApi_1 = require("../Internal/CalculatedColumnInternalApi");
|
|
9
9
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
10
10
|
class CalculatedColumnApiImpl extends ApiBase_1.ApiBase {
|
|
11
|
+
internalApi;
|
|
11
12
|
constructor(_adaptable) {
|
|
12
13
|
super(_adaptable);
|
|
13
14
|
this.internalApi = new CalculatedColumnInternalApi_1.CalculatedColumnInternalApi(_adaptable);
|
|
@@ -9,6 +9,10 @@ const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Exte
|
|
|
9
9
|
const ChartingInternalApi_1 = require("../Internal/ChartingInternalApi");
|
|
10
10
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
|
|
11
11
|
class ChartingApiImpl extends ApiBase_1.ApiBase {
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
internalApi;
|
|
12
16
|
constructor(_adaptable) {
|
|
13
17
|
super(_adaptable);
|
|
14
18
|
this.internalApi = new ChartingInternalApi_1.ChartingInternalApi(_adaptable);
|
|
@@ -122,6 +122,7 @@ function isPivotGrandTotal(columnId) {
|
|
|
122
122
|
return columnId?.startsWith(GeneralConstants.AG_GRID_PIVOT_GRAND_TOTAL_COLUMN);
|
|
123
123
|
}
|
|
124
124
|
class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
125
|
+
internalApi;
|
|
125
126
|
constructor(_adaptable) {
|
|
126
127
|
super(_adaptable);
|
|
127
128
|
this.internalApi = new ColumnInternalApi_1.ColumnInternalApi(_adaptable);
|
|
@@ -9,6 +9,7 @@ const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Exten
|
|
|
9
9
|
const ColumnFilterInternalApi_1 = require("../Internal/ColumnFilterInternalApi");
|
|
10
10
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
11
11
|
class ColumnFilterApiImpl extends ApiBase_1.ApiBase {
|
|
12
|
+
internalApi;
|
|
12
13
|
constructor(_adaptable) {
|
|
13
14
|
super(_adaptable);
|
|
14
15
|
this.internalApi = new ColumnFilterInternalApi_1.ColumnFilterInternalApi(_adaptable);
|
|
@@ -8,6 +8,7 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectF
|
|
|
8
8
|
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
|
|
9
9
|
const CommentsInternalApi_1 = require("../Internal/CommentsInternalApi");
|
|
10
10
|
class CommentsApiImpl extends ApiBase_1.ApiBase {
|
|
11
|
+
internalApi;
|
|
11
12
|
constructor(_adaptable) {
|
|
12
13
|
super(_adaptable);
|
|
13
14
|
this.internalApi = new CommentsInternalApi_1.CommentsInternalApi(_adaptable);
|
|
@@ -7,6 +7,7 @@ const CustomSortRedux = tslib_1.__importStar(require("../../Redux/ActionsReducer
|
|
|
7
7
|
const ApiBase_1 = require("./ApiBase");
|
|
8
8
|
const CustomSortInternalApi_1 = require("../Internal/CustomSortInternalApi");
|
|
9
9
|
class CustomSortApiImpl extends ApiBase_1.ApiBase {
|
|
10
|
+
internalApi;
|
|
10
11
|
constructor(_adaptable) {
|
|
11
12
|
super(_adaptable);
|
|
12
13
|
this.internalApi = new CustomSortInternalApi_1.CustomSortInternalApi(_adaptable);
|
|
@@ -9,6 +9,7 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
9
9
|
const InternalRedux_1 = require("../../Redux/ActionsReducers/InternalRedux");
|
|
10
10
|
const DashboardInternalApi_1 = require("../Internal/DashboardInternalApi");
|
|
11
11
|
class DashboardApiImpl extends ApiBase_1.ApiBase {
|
|
12
|
+
internalApi;
|
|
12
13
|
constructor(_adaptable) {
|
|
13
14
|
super(_adaptable);
|
|
14
15
|
this.internalApi = new DashboardInternalApi_1.DashboardInternalApi(_adaptable);
|
|
@@ -6,21 +6,6 @@ const ApiBase_1 = require("./ApiBase");
|
|
|
6
6
|
const InternalRedux_1 = require("../../Redux/ActionsReducers/InternalRedux");
|
|
7
7
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
8
8
|
class DataChangeHistoryApiImpl extends ApiBase_1.ApiBase {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.getDataChangeHistoryKey = (dataChangeInfo) => {
|
|
12
|
-
const columnId = dataChangeInfo.column.columnId;
|
|
13
|
-
const primaryKeyValue = dataChangeInfo.primaryKeyValue;
|
|
14
|
-
const changedAt = dataChangeInfo.changedAt;
|
|
15
|
-
const showLastDataChangeOnly = this.getDataChangeHistoryOptions().showLastDataChangeOnly;
|
|
16
|
-
if (showLastDataChangeOnly) {
|
|
17
|
-
return JSON.stringify({ columnId, primaryKeyValue });
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
return JSON.stringify({ columnId, primaryKeyValue, changedAt });
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
9
|
getDataChangeHistoryMode() {
|
|
25
10
|
return this.getAdaptableState().Internal.DataChangeHistory.currentMode;
|
|
26
11
|
}
|
|
@@ -71,5 +56,17 @@ class DataChangeHistoryApiImpl extends ApiBase_1.ApiBase {
|
|
|
71
56
|
openDataChangeHistorySettingsPanel() {
|
|
72
57
|
this.showModulePopup(ModuleConstants.DataChangeHistoryModuleId);
|
|
73
58
|
}
|
|
59
|
+
getDataChangeHistoryKey = (dataChangeInfo) => {
|
|
60
|
+
const columnId = dataChangeInfo.column.columnId;
|
|
61
|
+
const primaryKeyValue = dataChangeInfo.primaryKeyValue;
|
|
62
|
+
const changedAt = dataChangeInfo.changedAt;
|
|
63
|
+
const showLastDataChangeOnly = this.getDataChangeHistoryOptions().showLastDataChangeOnly;
|
|
64
|
+
if (showLastDataChangeOnly) {
|
|
65
|
+
return JSON.stringify({ columnId, primaryKeyValue });
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
return JSON.stringify({ columnId, primaryKeyValue, changedAt });
|
|
69
|
+
}
|
|
70
|
+
};
|
|
74
71
|
}
|
|
75
72
|
exports.DataChangeHistoryApiImpl = DataChangeHistoryApiImpl;
|
|
@@ -4,6 +4,7 @@ exports.DataImportApiImpl = void 0;
|
|
|
4
4
|
const DataImportInternalApi_1 = require("../Internal/DataImportInternalApi");
|
|
5
5
|
const ApiBase_1 = require("./ApiBase");
|
|
6
6
|
class DataImportApiImpl extends ApiBase_1.ApiBase {
|
|
7
|
+
internalApi;
|
|
7
8
|
constructor(_adaptable) {
|
|
8
9
|
super(_adaptable);
|
|
9
10
|
this.internalApi = new DataImportInternalApi_1.DataImportInternalApi(_adaptable);
|
|
@@ -7,6 +7,7 @@ const InternalRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/
|
|
|
7
7
|
const ApiBase_1 = require("./ApiBase");
|
|
8
8
|
const DataSetInternalApi_1 = require("../Internal/DataSetInternalApi");
|
|
9
9
|
class DataSetApiImpl extends ApiBase_1.ApiBase {
|
|
10
|
+
internalApi;
|
|
10
11
|
constructor(_adaptable) {
|
|
11
12
|
super(_adaptable);
|
|
12
13
|
this.internalApi = new DataSetInternalApi_1.DataSetInternalApi(_adaptable);
|
|
@@ -4,6 +4,7 @@ exports.EntitlementApiImpl = void 0;
|
|
|
4
4
|
const ApiBase_1 = require("./ApiBase");
|
|
5
5
|
const EntitlementInternalApi_1 = require("../Internal/EntitlementInternalApi");
|
|
6
6
|
class EntitlementApiImpl extends ApiBase_1.ApiBase {
|
|
7
|
+
internalApi;
|
|
7
8
|
constructor(_adaptable) {
|
|
8
9
|
super(_adaptable);
|
|
9
10
|
this.internalApi = new EntitlementInternalApi_1.EntitlementInternalApi(_adaptable);
|
|
@@ -6,22 +6,10 @@ const ApiBase_1 = require("./ApiBase");
|
|
|
6
6
|
const Emitter_1 = tslib_1.__importDefault(require("../../Utilities/Emitter"));
|
|
7
7
|
const EventInternalApi_1 = require("../Internal/EventInternalApi");
|
|
8
8
|
class EventApiImpl extends ApiBase_1.ApiBase {
|
|
9
|
+
emitter;
|
|
10
|
+
internalApi;
|
|
9
11
|
constructor(_adaptable) {
|
|
10
12
|
super(_adaptable);
|
|
11
|
-
this.on = (eventName, callback) => {
|
|
12
|
-
let result;
|
|
13
|
-
if (eventName === 'AdaptableReady') {
|
|
14
|
-
this.emitter.onIncludeFiredOnce(eventName).then(callback);
|
|
15
|
-
return () => { };
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
result = this.emitter.on(eventName, callback);
|
|
19
|
-
}
|
|
20
|
-
return result;
|
|
21
|
-
};
|
|
22
|
-
this.off = (eventName, callback) => this.emitter.off(eventName, callback);
|
|
23
|
-
this.emit = (eventName, data) => this.emitter.emit(eventName, data);
|
|
24
|
-
this.emitSync = (eventName, data) => this.emitter.emitSync(eventName, data);
|
|
25
13
|
this.emitter = new Emitter_1.default();
|
|
26
14
|
this.internalApi = new EventInternalApi_1.EventInternalApi(_adaptable);
|
|
27
15
|
}
|
|
@@ -30,5 +18,19 @@ class EventApiImpl extends ApiBase_1.ApiBase {
|
|
|
30
18
|
this.emitSync('AdaptableDestroy');
|
|
31
19
|
this.emitter.destroy();
|
|
32
20
|
}
|
|
21
|
+
on = (eventName, callback) => {
|
|
22
|
+
let result;
|
|
23
|
+
if (eventName === 'AdaptableReady') {
|
|
24
|
+
this.emitter.onIncludeFiredOnce(eventName).then(callback);
|
|
25
|
+
return () => { };
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
result = this.emitter.on(eventName, callback);
|
|
29
|
+
}
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
off = (eventName, callback) => this.emitter.off(eventName, callback);
|
|
33
|
+
emit = (eventName, data) => this.emitter.emit(eventName, data);
|
|
34
|
+
emitSync = (eventName, data) => this.emitter.emitSync(eventName, data);
|
|
33
35
|
}
|
|
34
36
|
exports.EventApiImpl = EventApiImpl;
|
|
@@ -8,6 +8,7 @@ const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/
|
|
|
8
8
|
const ExportInternalApi_1 = require("../Internal/ExportInternalApi");
|
|
9
9
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
10
10
|
class ExportApiImpl extends ApiBase_1.ApiBase {
|
|
11
|
+
internalApi;
|
|
11
12
|
constructor(_adaptable) {
|
|
12
13
|
super(_adaptable);
|
|
13
14
|
this.internalApi = new ExportInternalApi_1.ExportInternalApi(_adaptable);
|
|
@@ -6,6 +6,7 @@ const ApiBase_1 = require("./ApiBase");
|
|
|
6
6
|
const parser = tslib_1.__importStar(require("../../parser/src"));
|
|
7
7
|
const ExpressionInternalApi_1 = require("../Internal/ExpressionInternalApi");
|
|
8
8
|
class ExpressionApiImpl extends ApiBase_1.ApiBase {
|
|
9
|
+
internalApi;
|
|
9
10
|
constructor(_adaptable) {
|
|
10
11
|
super(_adaptable);
|
|
11
12
|
this.internalApi = new ExpressionInternalApi_1.ExpressionInternalApi(_adaptable);
|
|
@@ -5,6 +5,7 @@ const ApiBase_1 = require("./ApiBase");
|
|
|
5
5
|
const Fdc3InternalApi_1 = require("../Internal/Fdc3InternalApi");
|
|
6
6
|
const Fdc3Context_1 = require("../../AdaptableState/Common/Fdc3Context");
|
|
7
7
|
class Fdc3ApiImpl extends ApiBase_1.ApiBase {
|
|
8
|
+
internalApi;
|
|
8
9
|
constructor(_adaptable) {
|
|
9
10
|
super(_adaptable);
|
|
10
11
|
this.internalApi = new Fdc3InternalApi_1.Fdc3InternalApi(_adaptable);
|
|
@@ -6,6 +6,9 @@ const FilterInternalApi_1 = require("../Internal/FilterInternalApi");
|
|
|
6
6
|
const ColumnFilterApiImpl_1 = require("./ColumnFilterApiImpl");
|
|
7
7
|
const GridFilterApiImpl_1 = require("./GridFilterApiImpl");
|
|
8
8
|
class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
9
|
+
internalApi;
|
|
10
|
+
columnFilterApi;
|
|
11
|
+
gridFilterApi;
|
|
9
12
|
constructor(_adaptable) {
|
|
10
13
|
super(_adaptable);
|
|
11
14
|
this.internalApi = new FilterInternalApi_1.FilterInternalApi(_adaptable);
|
|
@@ -6,6 +6,7 @@ const FlashingCellRedux = tslib_1.__importStar(require("../../Redux/ActionsReduc
|
|
|
6
6
|
const ApiBase_1 = require("./ApiBase");
|
|
7
7
|
const FlashingCellInternalApi_1 = require("../Internal/FlashingCellInternalApi");
|
|
8
8
|
class FlashingCellApiImpl extends ApiBase_1.ApiBase {
|
|
9
|
+
internalApi;
|
|
9
10
|
constructor(_adaptable) {
|
|
10
11
|
super(_adaptable);
|
|
11
12
|
this.internalApi = new FlashingCellInternalApi_1.FlashingCellInternalApi(_adaptable);
|
|
@@ -8,6 +8,7 @@ const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/
|
|
|
8
8
|
const FormatColumnInternalApi_1 = require("../Internal/FormatColumnInternalApi");
|
|
9
9
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
10
10
|
class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
11
|
+
internalApi;
|
|
11
12
|
constructor(_adaptable) {
|
|
12
13
|
super(_adaptable);
|
|
13
14
|
this.internalApi = new FormatColumnInternalApi_1.FormatColumnInternalApi(_adaptable);
|
|
@@ -8,6 +8,7 @@ const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/
|
|
|
8
8
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
9
9
|
const FreeTextColumnInternalApi_1 = require("../Internal/FreeTextColumnInternalApi");
|
|
10
10
|
class FreeTextColumnApiImpl extends ApiBase_1.ApiBase {
|
|
11
|
+
internalApi;
|
|
11
12
|
constructor(_adaptable) {
|
|
12
13
|
super(_adaptable);
|
|
13
14
|
this.internalApi = new FreeTextColumnInternalApi_1.FreeTextColumnInternalApi(_adaptable);
|
|
@@ -151,4 +151,13 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
151
151
|
updateAgGridColumnDefinitions(columnDefinitionsToBeUpdated: ColDefWithId[]): void;
|
|
152
152
|
removeAgGridColumnDefinition(columnId: string): void;
|
|
153
153
|
addAgGridColumnDefinition(newColumnDefinition: ColDefWithId): void;
|
|
154
|
+
applyGridDataTransaction(dataTransaction: {
|
|
155
|
+
add?: any[];
|
|
156
|
+
update?: any[];
|
|
157
|
+
remove?: any[];
|
|
158
|
+
}, config?: DataUpdateConfig): Promise<{
|
|
159
|
+
addedRows: IRowNode[];
|
|
160
|
+
updatedRows: IRowNode[];
|
|
161
|
+
removedRows: IRowNode[];
|
|
162
|
+
}>;
|
|
154
163
|
}
|
|
@@ -11,6 +11,7 @@ const windowFactory_1 = require("../../View/Components/Popups/WindowPopups/windo
|
|
|
11
11
|
const RowSummary_1 = require("../../AdaptableState/Common/RowSummary");
|
|
12
12
|
const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
|
|
13
13
|
class GridApiImpl extends ApiBase_1.ApiBase {
|
|
14
|
+
internalApi;
|
|
14
15
|
constructor(_adaptable) {
|
|
15
16
|
super(_adaptable);
|
|
16
17
|
this.internalApi = new GridInternalApi_1.GridInternalApi(_adaptable);
|
|
@@ -687,5 +688,21 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
687
688
|
.filter(Boolean);
|
|
688
689
|
this.setAgGridColumnDefinitions([...sanitizedColDefs, newColumnDefinition]);
|
|
689
690
|
}
|
|
691
|
+
async applyGridDataTransaction(dataTransaction, config) {
|
|
692
|
+
const transactionResult = await this._adaptable.applyGridDataTransaction(dataTransaction, config);
|
|
693
|
+
if (Array.isArray(transactionResult.removedRows) && transactionResult.removedRows.length) {
|
|
694
|
+
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataTransaction.remove, transactionResult.removedRows, 'Delete');
|
|
695
|
+
this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
|
|
696
|
+
}
|
|
697
|
+
if (Array.isArray(transactionResult.updatedRows) && transactionResult.updatedRows.length) {
|
|
698
|
+
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataTransaction.update, transactionResult.updatedRows, 'Update');
|
|
699
|
+
this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
|
|
700
|
+
}
|
|
701
|
+
if (Array.isArray(transactionResult.addedRows) && transactionResult.addedRows.length) {
|
|
702
|
+
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataTransaction.add, transactionResult.addedRows, 'Add');
|
|
703
|
+
this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
|
|
704
|
+
}
|
|
705
|
+
return transactionResult;
|
|
706
|
+
}
|
|
690
707
|
}
|
|
691
708
|
exports.GridApiImpl = GridApiImpl;
|
|
@@ -8,6 +8,7 @@ const GridFilterInternalApi_1 = require("../Internal/GridFilterInternalApi");
|
|
|
8
8
|
const ApiBase_1 = require("./ApiBase");
|
|
9
9
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
10
10
|
class GridFilterApiImpl extends ApiBase_1.ApiBase {
|
|
11
|
+
internalApi;
|
|
11
12
|
constructor(_adaptable) {
|
|
12
13
|
super(_adaptable);
|
|
13
14
|
this.internalApi = new GridFilterInternalApi_1.GridFilterInternalApi(_adaptable);
|
|
@@ -12,6 +12,7 @@ const LayoutInternalApi_1 = require("../Internal/LayoutInternalApi");
|
|
|
12
12
|
const LayoutHelpers_1 = require("./LayoutHelpers");
|
|
13
13
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
14
14
|
class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
15
|
+
internalApi;
|
|
15
16
|
constructor(_adaptable) {
|
|
16
17
|
super(_adaptable);
|
|
17
18
|
this.internalApi = new LayoutInternalApi_1.LayoutInternalApi(_adaptable);
|
|
@@ -8,6 +8,7 @@ const NamedQueryInternalApi_1 = require("../Internal/NamedQueryInternalApi");
|
|
|
8
8
|
const ApiBase_1 = require("./ApiBase");
|
|
9
9
|
const NamedQueryRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/NamedQueryRedux"));
|
|
10
10
|
class NamedQueryApiImpl extends ApiBase_1.ApiBase {
|
|
11
|
+
internalApi;
|
|
11
12
|
constructor(_adaptable) {
|
|
12
13
|
super(_adaptable);
|
|
13
14
|
this.internalApi = new NamedQueryInternalApi_1.NamedQueryInternalApi(_adaptable);
|
|
@@ -6,6 +6,7 @@ const ApiBase_1 = require("./ApiBase");
|
|
|
6
6
|
const NoteRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/NoteRedux"));
|
|
7
7
|
const NoteInternalApi_1 = require("../Internal/NoteInternalApi");
|
|
8
8
|
class NoteApiImpl extends ApiBase_1.ApiBase {
|
|
9
|
+
internalApi;
|
|
9
10
|
constructor(_adaptable) {
|
|
10
11
|
super(_adaptable);
|
|
11
12
|
this.internalApi = new NoteInternalApi_1.NoteInternalApi(_adaptable);
|
|
@@ -32,6 +32,7 @@ const getTreeSelectionStateForPredicateInputs = (inputs, cache = treeSelectionSt
|
|
|
32
32
|
};
|
|
33
33
|
exports.getTreeSelectionStateForPredicateInputs = getTreeSelectionStateForPredicateInputs;
|
|
34
34
|
class PredicateApiImpl extends ApiBase_1.ApiBase {
|
|
35
|
+
internalApi;
|
|
35
36
|
constructor(_adaptable) {
|
|
36
37
|
super(_adaptable);
|
|
37
38
|
this.internalApi = new PredicateInternalApi_1.PredicateInternalApi(_adaptable);
|
|
@@ -5,6 +5,7 @@ const ApiBase_1 = require("./ApiBase");
|
|
|
5
5
|
const RowFormInternalApi_1 = require("../Internal/RowFormInternalApi");
|
|
6
6
|
const PopupRedux_1 = require("../../Redux/ActionsReducers/PopupRedux");
|
|
7
7
|
class RowFormApiImpl extends ApiBase_1.ApiBase {
|
|
8
|
+
internalApi;
|
|
8
9
|
constructor(_adaptable) {
|
|
9
10
|
super(_adaptable);
|
|
10
11
|
this.internalApi = new RowFormInternalApi_1.RowFormInternalApi(_adaptable);
|
|
@@ -7,6 +7,7 @@ const StyledColumnRedux = tslib_1.__importStar(require("../../Redux/ActionsReduc
|
|
|
7
7
|
const StyledColumnInternalApi_1 = require("../Internal/StyledColumnInternalApi");
|
|
8
8
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
9
9
|
class StyledColumnApiImpl extends ApiBase_1.ApiBase {
|
|
10
|
+
internalApi;
|
|
10
11
|
constructor(_adaptable) {
|
|
11
12
|
super(_adaptable);
|
|
12
13
|
this.internalApi = new StyledColumnInternalApi_1.StyledColumnInternalApi(_adaptable);
|
|
@@ -12,6 +12,8 @@ const UIHelper_1 = tslib_1.__importDefault(require("../../View/UIHelper"));
|
|
|
12
12
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
13
13
|
const SystemStatusInternalApi_1 = require("../Internal/SystemStatusInternalApi");
|
|
14
14
|
class SystemStatusApiImpl extends ApiBase_1.ApiBase {
|
|
15
|
+
systemStatusDiv;
|
|
16
|
+
internalApi;
|
|
15
17
|
constructor(_adaptable) {
|
|
16
18
|
super(_adaptable);
|
|
17
19
|
this.internalApi = new SystemStatusInternalApi_1.SystemStatusInternalApi(_adaptable);
|
|
@@ -9,6 +9,7 @@ const TeamSharingRedux_1 = require("../../Redux/ActionsReducers/TeamSharingRedux
|
|
|
9
9
|
const TeamSharingInternalApi_1 = require("../Internal/TeamSharingInternalApi");
|
|
10
10
|
const TeamSharingState_1 = require("../../AdaptableState/TeamSharingState");
|
|
11
11
|
class TeamSharingApiImpl extends ApiBase_1.ApiBase {
|
|
12
|
+
internalApi;
|
|
12
13
|
constructor(_adaptable) {
|
|
13
14
|
super(_adaptable);
|
|
14
15
|
this.internalApi = new TeamSharingInternalApi_1.TeamSharingInternalApi(_adaptable);
|
|
@@ -10,6 +10,7 @@ const ThemeInternalApi_1 = require("../Internal/ThemeInternalApi");
|
|
|
10
10
|
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
|
|
11
11
|
const logDeprecation_1 = require("../../Utilities/logDeprecation");
|
|
12
12
|
class ThemeApiImpl extends ApiBase_1.ApiBase {
|
|
13
|
+
internalApi;
|
|
13
14
|
constructor(_adaptable) {
|
|
14
15
|
super(_adaptable);
|
|
15
16
|
this.internalApi = new ThemeInternalApi_1.ThemeInternalApi(_adaptable);
|
|
@@ -9,9 +9,10 @@ const UserInterfaceInternalApi_1 = require("../Internal/UserInterfaceInternalApi
|
|
|
9
9
|
const ApiBase_1 = require("./ApiBase");
|
|
10
10
|
const PopupRedux_1 = require("../../Redux/ActionsReducers/PopupRedux");
|
|
11
11
|
class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
|
|
12
|
+
internalApi;
|
|
13
|
+
showProgressIndicatorTimeout = null;
|
|
12
14
|
constructor(_adaptable) {
|
|
13
15
|
super(_adaptable);
|
|
14
|
-
this.showProgressIndicatorTimeout = null;
|
|
15
16
|
this.internalApi = new UserInterfaceInternalApi_1.UserInterfaceInternalApi(_adaptable);
|
|
16
17
|
}
|
|
17
18
|
getColorPalette() {
|
|
@@ -30,6 +30,12 @@ const loadState = ({ adaptableId, adaptableStateKey }) => {
|
|
|
30
30
|
return Promise.resolve(parsedJsonState);
|
|
31
31
|
};
|
|
32
32
|
class AdaptableReduxLocalStorageEngine {
|
|
33
|
+
adaptableId;
|
|
34
|
+
adaptableStateKey;
|
|
35
|
+
userName;
|
|
36
|
+
initialState;
|
|
37
|
+
loadState;
|
|
38
|
+
persistState;
|
|
33
39
|
constructor(config) {
|
|
34
40
|
this.adaptableId = config.adaptableId;
|
|
35
41
|
this.adaptableStateKey = config.adaptableStateKey;
|
|
@@ -72,6 +72,23 @@ const LoadState = (State) => ({
|
|
|
72
72
|
});
|
|
73
73
|
exports.LoadState = LoadState;
|
|
74
74
|
class AdaptableStore {
|
|
75
|
+
TheStore;
|
|
76
|
+
Load;
|
|
77
|
+
emitter;
|
|
78
|
+
storageEngine;
|
|
79
|
+
currentStorageState;
|
|
80
|
+
previousStorageState;
|
|
81
|
+
loadStorageInProgress = false;
|
|
82
|
+
loadStateOnStartup = true; // set to false if you want no state
|
|
83
|
+
on = (eventName, callback) => {
|
|
84
|
+
return this.emitter.on(eventName, callback);
|
|
85
|
+
};
|
|
86
|
+
onAny = (callback) => {
|
|
87
|
+
return this.emitter.onAny(callback);
|
|
88
|
+
};
|
|
89
|
+
emit = (eventName, data) => {
|
|
90
|
+
return this.emitter.emit(eventName, data);
|
|
91
|
+
};
|
|
75
92
|
/**
|
|
76
93
|
*
|
|
77
94
|
* @param adaptable The Adaptable instance
|
|
@@ -81,49 +98,6 @@ class AdaptableStore {
|
|
|
81
98
|
/*
|
|
82
99
|
This is the main store for Adaptable State
|
|
83
100
|
*/
|
|
84
|
-
this.loadStorageInProgress = false;
|
|
85
|
-
this.loadStateOnStartup = true; // set to false if you want no state
|
|
86
|
-
this.on = (eventName, callback) => {
|
|
87
|
-
return this.emitter.on(eventName, callback);
|
|
88
|
-
};
|
|
89
|
-
this.onAny = (callback) => {
|
|
90
|
-
return this.emitter.onAny(callback);
|
|
91
|
-
};
|
|
92
|
-
this.emit = (eventName, data) => {
|
|
93
|
-
return this.emitter.emit(eventName, data);
|
|
94
|
-
};
|
|
95
|
-
this.loadStore = (config) => {
|
|
96
|
-
const { adaptable, adaptableStateKey, initialState, postLoadHook } = config;
|
|
97
|
-
const postProcessState = postLoadHook ?? ((state) => state);
|
|
98
|
-
this.storageEngine.setStateKey(adaptableStateKey);
|
|
99
|
-
// START STATE LOAD
|
|
100
|
-
this.loadStorageInProgress = true;
|
|
101
|
-
return (this.Load = this.storageEngine
|
|
102
|
-
.load(adaptable, initialState)
|
|
103
|
-
.then((storedState) => {
|
|
104
|
-
if (storedState && this.loadStateOnStartup) {
|
|
105
|
-
this.TheStore.dispatch((0, exports.LoadState)(postProcessState(adaptable.adaptableOptions.stateOptions.applyState(storedState, (0, buildAdaptableStateFunctionConfig_1.buildAdaptableStateFunctionConfig)(adaptable)))));
|
|
106
|
-
}
|
|
107
|
-
})
|
|
108
|
-
.then(() => {
|
|
109
|
-
this.TheStore.dispatch((0, exports.InitState)());
|
|
110
|
-
// END STATE LOAD
|
|
111
|
-
this.loadStorageInProgress = false;
|
|
112
|
-
}, (e) => {
|
|
113
|
-
adaptable.api.consoleError('Failed to load previous Adaptable State : ', e);
|
|
114
|
-
//for now i'm still initializing Adaptable even if loading state has failed....
|
|
115
|
-
//we may revisit that later
|
|
116
|
-
this.TheStore.dispatch((0, exports.InitState)());
|
|
117
|
-
// END STATE LOAD
|
|
118
|
-
this.loadStorageInProgress = false;
|
|
119
|
-
this.TheStore.dispatch(PopupRedux.PopupShowAlert({
|
|
120
|
-
alertType: 'generic',
|
|
121
|
-
header: 'Configuration',
|
|
122
|
-
message: 'Error loading your configuration:' + e,
|
|
123
|
-
alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
|
|
124
|
-
}));
|
|
125
|
-
}));
|
|
126
|
-
};
|
|
127
101
|
let rootReducerObject = {
|
|
128
102
|
// Reducers for Non-Persisted State
|
|
129
103
|
Popup: PopupRedux.PopupReducer,
|
|
@@ -268,6 +242,38 @@ class AdaptableStore {
|
|
|
268
242
|
}
|
|
269
243
|
return Promise.resolve(true);
|
|
270
244
|
}
|
|
245
|
+
loadStore = (config) => {
|
|
246
|
+
const { adaptable, adaptableStateKey, initialState, postLoadHook } = config;
|
|
247
|
+
const postProcessState = postLoadHook ?? ((state) => state);
|
|
248
|
+
this.storageEngine.setStateKey(adaptableStateKey);
|
|
249
|
+
// START STATE LOAD
|
|
250
|
+
this.loadStorageInProgress = true;
|
|
251
|
+
return (this.Load = this.storageEngine
|
|
252
|
+
.load(adaptable, initialState)
|
|
253
|
+
.then((storedState) => {
|
|
254
|
+
if (storedState && this.loadStateOnStartup) {
|
|
255
|
+
this.TheStore.dispatch((0, exports.LoadState)(postProcessState(adaptable.adaptableOptions.stateOptions.applyState(storedState, (0, buildAdaptableStateFunctionConfig_1.buildAdaptableStateFunctionConfig)(adaptable)))));
|
|
256
|
+
}
|
|
257
|
+
})
|
|
258
|
+
.then(() => {
|
|
259
|
+
this.TheStore.dispatch((0, exports.InitState)());
|
|
260
|
+
// END STATE LOAD
|
|
261
|
+
this.loadStorageInProgress = false;
|
|
262
|
+
}, (e) => {
|
|
263
|
+
adaptable.api.consoleError('Failed to load previous Adaptable State : ', e);
|
|
264
|
+
//for now i'm still initializing Adaptable even if loading state has failed....
|
|
265
|
+
//we may revisit that later
|
|
266
|
+
this.TheStore.dispatch((0, exports.InitState)());
|
|
267
|
+
// END STATE LOAD
|
|
268
|
+
this.loadStorageInProgress = false;
|
|
269
|
+
this.TheStore.dispatch(PopupRedux.PopupShowAlert({
|
|
270
|
+
alertType: 'generic',
|
|
271
|
+
header: 'Configuration',
|
|
272
|
+
message: 'Error loading your configuration:' + e,
|
|
273
|
+
alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
|
|
274
|
+
}));
|
|
275
|
+
}));
|
|
276
|
+
};
|
|
271
277
|
}
|
|
272
278
|
exports.AdaptableStore = AdaptableStore;
|
|
273
279
|
function createDevToolsActionMarkerMiddleware(adaptable) {
|
|
@@ -1007,6 +1013,14 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
1007
1013
|
const newLayout = (newLayoutState.Layouts || []).find((l) => l.Name == newLayoutState.CurrentLayout) ||
|
|
1008
1014
|
newLayoutState.Layouts[0] ||
|
|
1009
1015
|
GeneralConstants_1.ERROR_LAYOUT;
|
|
1016
|
+
if (returnAction.type == LayoutRedux.LAYOUT_SELECT ||
|
|
1017
|
+
returnAction.type == LayoutRedux.LAYOUT_DELETE) {
|
|
1018
|
+
// tell AdapTable the Layout has been selected
|
|
1019
|
+
if (newLayout) {
|
|
1020
|
+
adaptable.updateLayoutInManagerAfterStoreHasChanged(newLayout);
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
// !!! filter refresh has to be AFTER the layout has been set in the store
|
|
1010
1024
|
let refreshColumnFilters = false;
|
|
1011
1025
|
if (adaptable.api.filterApi.columnFilterApi.internalApi.areColumnFiltersDifferent(oldLayout.ColumnFilters, newLayout.ColumnFilters)) {
|
|
1012
1026
|
refreshColumnFilters = true;
|
|
@@ -1018,13 +1032,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
1018
1032
|
if (refreshColumnFilters || refreshGridFilter) {
|
|
1019
1033
|
adaptable.applyFiltering({ updateColumnFilterModel: refreshColumnFilters });
|
|
1020
1034
|
}
|
|
1021
|
-
if (returnAction.type == LayoutRedux.LAYOUT_SELECT ||
|
|
1022
|
-
returnAction.type == LayoutRedux.LAYOUT_DELETE) {
|
|
1023
|
-
// tell AdapTable the Layout has been selected
|
|
1024
|
-
if (newLayout) {
|
|
1025
|
-
adaptable.updateLayoutInManagerAfterStoreHasChanged(newLayout);
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
1035
|
// when changing current layout via the api, the layout should update
|
|
1029
1036
|
if (returnAction.type == LayoutRedux.LAYOUT_SAVE) {
|
|
1030
1037
|
const savingLayout = returnAction.layout;
|
|
@@ -8,6 +8,10 @@ const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensio
|
|
|
8
8
|
* Base class for all strategies and does most of the work of creating menus
|
|
9
9
|
*/
|
|
10
10
|
class AdaptableModuleBase {
|
|
11
|
+
api;
|
|
12
|
+
moduleInfo;
|
|
13
|
+
AccessLevel;
|
|
14
|
+
agGridModuleDepsInfo;
|
|
11
15
|
constructor(module, friendlyName, glyph, popup, description, api) {
|
|
12
16
|
this.api = api;
|
|
13
17
|
this.moduleInfo = {
|