@adaptabletools/adaptable 10.0.3 → 10.0.4-canary.3
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/LICENSE.md +1 -1
- package/README.md +1 -1
- package/base.css +16 -6
- package/bundle.cjs.js +350 -0
- package/index.css +20 -6
- package/package.json +1 -5
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +14 -12
- package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -3
- package/src/AdaptableOptions/ContainerOptions.d.ts +4 -5
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
- package/src/AdaptableOptions/DateInputOptions.d.ts +5 -1
- package/src/AdaptableOptions/EditOptions.d.ts +2 -3
- package/src/AdaptableOptions/FilterOptions.d.ts +8 -8
- package/src/AdaptableOptions/GeneralOptions.d.ts +3 -2
- package/src/AdaptableOptions/MenuOptions.d.ts +11 -11
- package/src/AdaptableOptions/NotificationsOptions.d.ts +11 -1
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +29 -12
- package/src/Api/AdaptableApi.d.ts +12 -12
- package/src/Api/CalculatedColumnApi.d.ts +15 -0
- package/src/Api/ColumnApi.d.ts +16 -5
- package/src/Api/EventApi.d.ts +1 -1
- package/src/Api/Events/AdaptableReady.d.ts +5 -8
- package/src/Api/Events/AdaptableStateChanged.d.ts +2 -1
- package/src/Api/Events/AlertFired.d.ts +2 -1
- package/src/Api/Events/BaseEventInfo.d.ts +10 -0
- package/src/Api/Events/BaseEventInfo.js +2 -0
- package/src/Api/Events/CellChanged.d.ts +2 -1
- package/src/Api/Events/ChexboxColumnClicked.d.ts +2 -1
- package/src/Api/Events/CustomToolbarConfigured.d.ts +2 -1
- package/src/Api/Events/DashboardChanged.d.ts +2 -1
- package/src/Api/Events/FlashingAlertFired.d.ts +2 -1
- package/src/Api/Events/GridDataChanged.d.ts +2 -1
- package/src/Api/Events/LayoutChanged.d.ts +2 -1
- package/src/Api/Events/LiveDataChanged.d.ts +2 -1
- package/src/Api/Events/SearchChanged.d.ts +2 -1
- package/src/Api/Events/SelectionChanged.d.ts +2 -1
- package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +2 -1
- package/src/Api/Events/TeamSharingEntityChanged.d.ts +2 -1
- package/src/Api/Events/ThemeChanged.d.ts +2 -1
- package/src/Api/GridApi.d.ts +10 -10
- package/src/Api/Implementation/AlertApiImpl.js +17 -17
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +3 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +23 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +5 -3
- package/src/Api/Implementation/ColumnApiImpl.js +43 -44
- package/src/Api/Implementation/ConfigApiImpl.js +0 -24
- package/src/Api/Implementation/DashboardApiImpl.js +2 -1
- package/src/Api/Implementation/ExportApiImpl.js +4 -4
- package/src/Api/Implementation/FormatColumnApiImpl.js +2 -1
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +7 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +2 -2
- package/src/Api/Implementation/GridApiImpl.js +14 -13
- package/src/Api/Implementation/InternalApiImpl.d.ts +2 -2
- package/src/Api/Implementation/InternalApiImpl.js +5 -5
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +19 -3
- package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -2
- package/src/Api/Implementation/PluginsApiImpl.js +1 -1
- package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
- package/src/Api/Implementation/ScopeApiImpl.js +11 -11
- package/src/Api/Implementation/SystemStatusApiImpl.js +1 -0
- package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +1 -0
- package/src/Api/Implementation/ToolPanelApiImpl.js +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -4
- package/src/Api/Implementation/UserInterfaceApiImpl.js +18 -13
- package/src/Api/InternalApi.d.ts +2 -2
- package/src/Api/LayoutApi.d.ts +7 -0
- package/src/Api/PluginsApi.d.ts +1 -7
- package/src/Api/TeamSharingApi.d.ts +1 -1
- package/src/Api/ThemeApi.d.ts +2 -2
- package/src/Api/UserInterfaceApi.d.ts +6 -5
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -10
- package/src/PredefinedConfig/AlertState.d.ts +2 -3
- package/src/PredefinedConfig/ApplicationState.d.ts +1 -1
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableButton.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +36 -36
- package/src/PredefinedConfig/Common/AdaptableColumn.js +5 -5
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +4 -4
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +3 -3
- package/src/PredefinedConfig/Common/AdaptableStyle.d.ts +7 -7
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +4 -3
- package/src/PredefinedConfig/Common/Menu.d.ts +40 -17
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +1 -1
- package/src/PredefinedConfig/Common/Types.d.ts +5 -5
- package/src/PredefinedConfig/Common/Types.js +9 -7
- package/src/PredefinedConfig/ConditionalStyleState.d.ts +1 -1
- package/src/PredefinedConfig/CustomSortState.d.ts +1 -1
- package/src/PredefinedConfig/DataSourceState.d.ts +1 -1
- package/src/PredefinedConfig/ExportState.d.ts +3 -3
- package/src/PredefinedConfig/FilterState.d.ts +2 -2
- package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -1
- package/src/PredefinedConfig/LayoutState.d.ts +1 -1
- package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -40
- package/src/PredefinedConfig/QuickSearchState.d.ts +3 -3
- package/src/PredefinedConfig/ScheduleState.d.ts +1 -1
- package/src/PredefinedConfig/Selection/GridCell.d.ts +2 -1
- package/src/PredefinedConfig/ThemeState.d.ts +5 -1
- package/src/Redux/ActionsReducers/DashboardRedux.js +2 -1
- package/src/Redux/ActionsReducers/GridRedux.d.ts +3 -2
- package/src/Redux/ActionsReducers/GridRedux.js +2 -2
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +12 -2
- package/src/Redux/ActionsReducers/LayoutRedux.js +24 -1
- package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
- package/src/Redux/DeadRedux.d.ts +4 -8
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -1
- package/src/Redux/Store/AdaptableStore.d.ts +3 -3
- package/src/Redux/Store/AdaptableStore.js +21 -16
- package/src/Strategy/AdaptableModuleBase.d.ts +2 -2
- package/src/Strategy/AdaptableModuleBase.js +8 -8
- package/src/Strategy/AlertModule.d.ts +2 -2
- package/src/Strategy/AlertModule.js +13 -105
- package/src/Strategy/BulkUpdateModule.d.ts +2 -2
- package/src/Strategy/BulkUpdateModule.js +7 -7
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/CellSummaryModule.d.ts +2 -2
- package/src/Strategy/CellSummaryModule.js +3 -3
- package/src/Strategy/ConditionalStyleModule.js +3 -3
- package/src/Strategy/CustomSortModule.js +2 -2
- package/src/Strategy/DashboardModule.d.ts +2 -2
- package/src/Strategy/DataChangeHistoryModule.js +2 -2
- package/src/Strategy/ExportModule.d.ts +2 -2
- package/src/Strategy/ExportModule.js +1 -1
- package/src/Strategy/FilterModule.d.ts +2 -2
- package/src/Strategy/FilterModule.js +4 -4
- package/src/Strategy/FormatColumnModule.js +6 -6
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.d.ts +2 -2
- package/src/Strategy/Interface/IModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.js +22 -9
- package/src/Strategy/PlusMinusModule.js +8 -9
- package/src/Strategy/SmartEditModule.d.ts +2 -2
- package/src/Strategy/SmartEditModule.js +8 -9
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +2 -1
- package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
- package/src/Utilities/Constants/ModuleConstants.js +7 -7
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +8 -7
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
- package/src/Utilities/Helpers/PreviewHelper.js +2 -2
- package/src/Utilities/Interface/Preview.d.ts +2 -1
- package/src/Utilities/ObjectFactory.js +1 -1
- package/src/Utilities/Services/DataService.js +5 -5
- package/src/Utilities/Services/LicenseService.js +16 -2
- package/src/Utilities/Services/MetamodelService.js +0 -1
- package/src/Utilities/Services/ReportService.js +12 -11
- package/src/Utilities/Services/ValidationService.js +4 -5
- package/src/View/AdaptableViewFactory.d.ts +2 -1
- package/src/View/AdaptableViewFactory.js +2 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +7 -7
- package/src/View/Alert/AlertPopup.js +1 -1
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +3 -3
- package/src/View/CalculatedColumn/CalculatedColumnPopup.js +1 -1
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
- package/src/View/CellSummary/CellSummaryViewPanel.js +2 -2
- package/src/View/Components/ColumnSelector/index.js +2 -2
- package/src/View/Components/FilterForm/FilterForm.js +18 -20
- package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +1 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +7 -7
- package/src/View/Components/FilterForm/QuickFilterForm.js +15 -17
- package/src/View/Components/NewScopeComponent.js +1 -1
- package/src/View/Components/Panels/FilterFormPanel.d.ts +1 -1
- package/src/View/Components/Panels/PanelWithImage.d.ts +423 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.js +23 -10
- package/src/View/Components/PreviewResultsPanel.js +1 -1
- package/src/View/Components/RangesComponent.js +2 -2
- package/src/View/Components/Selectors/ColumnSelector.js +5 -5
- package/src/View/Components/Selectors/ColumnValueSelector.js +4 -4
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +10 -11
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +2 -3
- package/src/View/ConditionalStyle/ConditionalStylePopup.js +1 -1
- package/src/View/ConditionalStyle/ConditionalStyleSummary.js +1 -1
- package/src/View/CustomSort/CustomSortEntityRow.d.ts +3 -1
- package/src/View/CustomSort/CustomSortEntityRow.js +3 -3
- package/src/View/CustomSort/CustomSortPopup.js +2 -2
- package/src/View/CustomSort/CustomSortSummary.js +3 -3
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +4 -4
- package/src/View/Dashboard/CustomToolbarWrapper.js +2 -1
- package/src/View/Dashboard/Dashboard.js +2 -3
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +11 -10
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +6 -6
- package/src/View/Export/ExportCustomDestinationDialog.js +1 -1
- package/src/View/Export/ExportViewPanel.js +6 -6
- package/src/View/Filter/FilterSummary.js +2 -2
- package/src/View/FormatColumn/FormatColumnPopup.js +1 -1
- package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
- package/src/View/FreeTextColumn/FreeTextColumnPopup.js +1 -1
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +2 -2
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
- package/src/View/GridInfo/ColumnInfoComponent.js +16 -16
- package/src/View/GridInfo/GridOptionsComponent.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +2 -2
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +6 -6
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +2 -2
- package/src/View/Layout/Wizard/LayoutEditor/index.js +41 -41
- package/src/View/PlusMinus/PlusMinusPopup.js +1 -1
- package/src/View/PlusMinus/PlusMinusSummary.js +1 -1
- package/src/View/Query/QueryViewPanel.js +3 -3
- package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -3
- package/src/View/Schedule/SchedulePopup.js +3 -3
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +1 -1
- package/src/View/SmartEdit/SmartEditPopup.js +1 -1
- package/src/View/StateManagement/StateManagementPopup.d.ts +2 -12
- package/src/View/StateManagement/StateManagementPopup.js +21 -114
- package/src/View/StateManagement/StateManagementViewPanel.d.ts +5 -0
- package/src/View/StateManagement/StateManagementViewPanel.js +22 -0
- package/src/View/StateManagement/components/ClearButton.d.ts +6 -0
- package/src/View/StateManagement/components/ClearButton.js +9 -0
- package/src/View/StateManagement/components/ExportDropdown.d.ts +8 -0
- package/src/View/StateManagement/components/ExportDropdown.js +43 -0
- package/src/View/StateManagement/components/LoadButton.d.ts +7 -0
- package/src/View/StateManagement/components/LoadButton.js +38 -0
- package/src/View/StateManagement/handleExportState.d.ts +1 -0
- package/src/View/StateManagement/handleExportState.js +22 -0
- package/src/View/Theme/ThemeViewPanel.js +1 -1
- package/src/agGrid/ActionColumnRenderer.js +1 -1
- package/src/agGrid/Adaptable.d.ts +9 -8
- package/src/agGrid/Adaptable.js +174 -132
- package/src/agGrid/agGridHelper.d.ts +4 -4
- package/src/agGrid/agGridHelper.js +46 -46
- package/src/agGrid/agGridMenuHelper.d.ts +15 -13
- package/src/agGrid/agGridMenuHelper.js +55 -47
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +11 -6
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +3 -2
- package/src/agGrid/editors/AdaptableDateEditor/index.js +16 -6
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +1 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +7 -2
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -3
- package/src/components/Datepicker/DatepickerContext.d.ts +2 -2
- package/src/components/Datepicker/index.js +9 -5
- package/src/components/ExpressionEditor/index.js +7 -7
- package/src/components/Modal/index.d.ts +1 -1
- package/src/components/OverlayTrigger/index.js +3 -3
- package/src/components/OverlayTrigger/useAgGridClassName.d.ts +2 -0
- package/src/components/OverlayTrigger/{useVendorClassName.js → useAgGridClassName.js} +3 -3
- package/src/components/ProgressIndicator/ProgressIndicator.js +1 -1
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/upload.d.ts +3 -0
- package/src/components/icons/upload.js +8 -0
- package/src/metamodel/adaptable.metamodel.d.ts +104 -50
- package/src/metamodel/adaptable.metamodel.js +358 -300
- package/src/types.d.ts +2 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/PredefinedConfig/DeprecatedState.d.ts +0 -82
- package/src/PredefinedConfig/DeprecatedState.js +0 -5
- package/src/components/OverlayTrigger/useVendorClassName.d.ts +0 -2
|
@@ -18,7 +18,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
18
18
|
acc[colId] = true;
|
|
19
19
|
return acc;
|
|
20
20
|
}, {});
|
|
21
|
-
return this.getColumns().filter((c) => visibleCols[c.
|
|
21
|
+
return this.getColumns().filter((c) => visibleCols[c.columnId]);
|
|
22
22
|
}
|
|
23
23
|
selectColumn(columnId) {
|
|
24
24
|
this.adaptable.selectColumn(columnId);
|
|
@@ -44,8 +44,8 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
44
44
|
showColumn(columnId) {
|
|
45
45
|
this.adaptable.showColumn(columnId);
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
return this.adaptable.
|
|
47
|
+
getAgGridColumnType(columnId) {
|
|
48
|
+
return this.adaptable.getAgGridColumnType(columnId);
|
|
49
49
|
}
|
|
50
50
|
isRowGroupColumn(columnId) {
|
|
51
51
|
// put this here as there might be other indicators we are not aware of
|
|
@@ -78,33 +78,33 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
78
78
|
return false;
|
|
79
79
|
}
|
|
80
80
|
isNumericColumn(column) {
|
|
81
|
-
return column.
|
|
81
|
+
return column.dataType == Enums_1.DataType.Number;
|
|
82
82
|
}
|
|
83
83
|
isBooleanColumn(column) {
|
|
84
|
-
return column.
|
|
84
|
+
return column.dataType == Enums_1.DataType.Boolean;
|
|
85
85
|
}
|
|
86
86
|
isDateColumn(column) {
|
|
87
|
-
return column.
|
|
87
|
+
return column.dataType == Enums_1.DataType.Date;
|
|
88
88
|
}
|
|
89
89
|
getColumnDataTypeFromColumnId(columnId) {
|
|
90
90
|
const column = this.getColumnFromId(columnId); // this.getColumns().find(c => c.ColumnId == columnId);
|
|
91
91
|
if (!column) {
|
|
92
92
|
return undefined;
|
|
93
93
|
}
|
|
94
|
-
return column.
|
|
94
|
+
return column.dataType;
|
|
95
95
|
}
|
|
96
96
|
getFriendlyNameFromColumn(columnId, column) {
|
|
97
97
|
if (columnId.includes(GeneralConstants.MISSING_COLUMN)) {
|
|
98
98
|
return columnId;
|
|
99
99
|
}
|
|
100
100
|
if (column) {
|
|
101
|
-
return column.
|
|
101
|
+
return column.friendlyName;
|
|
102
102
|
}
|
|
103
103
|
this.LogMissingColumnWarning(columnId);
|
|
104
104
|
return columnId + GeneralConstants.MISSING_COLUMN;
|
|
105
105
|
}
|
|
106
106
|
getFriendlyNameFromColumnId(columnId) {
|
|
107
|
-
const foundColumn = this.getColumns().find((c) => c.
|
|
107
|
+
const foundColumn = this.getColumns().find((c) => c.columnId == columnId);
|
|
108
108
|
if (foundColumn) {
|
|
109
109
|
return this.getFriendlyNameFromColumn(columnId, foundColumn);
|
|
110
110
|
}
|
|
@@ -130,9 +130,9 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
130
130
|
if (friendlyName.includes(GeneralConstants.MISSING_COLUMN)) {
|
|
131
131
|
return friendlyName.replace(GeneralConstants.MISSING_COLUMN, ''); // Ids should stay "pure"
|
|
132
132
|
}
|
|
133
|
-
const foundColumn = this.getColumns().find((c) => c.
|
|
133
|
+
const foundColumn = this.getColumns().find((c) => c.friendlyName == friendlyName);
|
|
134
134
|
if (foundColumn) {
|
|
135
|
-
return foundColumn.
|
|
135
|
+
return foundColumn.columnId;
|
|
136
136
|
}
|
|
137
137
|
this.LogMissingColumnWarning(friendlyName);
|
|
138
138
|
return friendlyName + GeneralConstants.MISSING_COLUMN;
|
|
@@ -149,7 +149,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
149
149
|
}
|
|
150
150
|
getColumnsFromFriendlyNames(friendlyNames) {
|
|
151
151
|
// not sure if this is right as might ignore bad cols
|
|
152
|
-
return friendlyNames.map((friendlyName) => this.getColumns().find((x) => x.
|
|
152
|
+
return friendlyNames.map((friendlyName) => this.getColumns().find((x) => x.friendlyName == friendlyName));
|
|
153
153
|
}
|
|
154
154
|
getColumnsFromIds(columnIds, logWarning = true) {
|
|
155
155
|
let returnCols = [];
|
|
@@ -166,7 +166,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
166
166
|
if (ArrayExtensions_1.default.IsNullOrEmpty(this.getColumns())) {
|
|
167
167
|
return null;
|
|
168
168
|
}
|
|
169
|
-
const foundColumn = this.getColumns().find((c) => c.
|
|
169
|
+
const foundColumn = this.getColumns().find((c) => c.columnId == columnId);
|
|
170
170
|
if (foundColumn) {
|
|
171
171
|
return foundColumn;
|
|
172
172
|
}
|
|
@@ -176,33 +176,30 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
176
176
|
return undefined;
|
|
177
177
|
}
|
|
178
178
|
getColumnIdsFromId(columnId, logWarning = false) {
|
|
179
|
-
var _a;
|
|
180
179
|
const col = this.getColumnFromId(columnId, logWarning);
|
|
181
180
|
if (col) {
|
|
182
|
-
if (this.isCalculatedColumn(col.
|
|
183
|
-
|
|
184
|
-
.getAllCalculatedColumn()
|
|
185
|
-
.find((cc) => cc.ColumnId == col.ColumnId);
|
|
186
|
-
if (calculatedColumn) {
|
|
187
|
-
const columnIds = this.adaptable.api.queryLanguageApi.getColumnsFromExpression((_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression);
|
|
188
|
-
return columnIds;
|
|
189
|
-
}
|
|
181
|
+
if (this.isCalculatedColumn(col.columnId)) {
|
|
182
|
+
return this.adaptable.api.calculatedColumnApi.getReferencedColumnIdsForCalculatedColumnId(col.columnId);
|
|
190
183
|
}
|
|
191
184
|
else {
|
|
192
|
-
return [col.
|
|
185
|
+
return [col.columnId];
|
|
193
186
|
}
|
|
194
187
|
}
|
|
195
188
|
return undefined;
|
|
196
189
|
}
|
|
197
|
-
|
|
198
|
-
|
|
190
|
+
getAgGridColumnFieldForAdaptableColumn(colId) {
|
|
191
|
+
const agGridColumn = this.getAgGridColumnForAdaptableColumn(colId);
|
|
192
|
+
return agGridColumn.getColDef().field || '';
|
|
193
|
+
}
|
|
194
|
+
getAgGridColumnForAdaptableColumn(columnId) {
|
|
195
|
+
return this.adaptable.getAgGridColumnForAdaptableColumn(this.getColumnFromId(columnId));
|
|
199
196
|
}
|
|
200
197
|
getColumnFromFriendlyName(columnName, logWarning = true) {
|
|
201
198
|
// just return null if no columns rather than logging a warning - otherwise get lots at startup
|
|
202
199
|
if (ArrayExtensions_1.default.IsNullOrEmpty(this.getColumns())) {
|
|
203
200
|
return null;
|
|
204
201
|
}
|
|
205
|
-
const foundColumn = this.getColumns().find((c) => c.
|
|
202
|
+
const foundColumn = this.getColumns().find((c) => c.friendlyName == columnName);
|
|
206
203
|
if (foundColumn) {
|
|
207
204
|
return foundColumn;
|
|
208
205
|
}
|
|
@@ -230,36 +227,36 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
230
227
|
}
|
|
231
228
|
}
|
|
232
229
|
getNumericColumns() {
|
|
233
|
-
return this.getColumns().filter((c) => c.
|
|
230
|
+
return this.getColumns().filter((c) => c.dataType == Enums_1.DataType.Number);
|
|
234
231
|
}
|
|
235
232
|
getNumericArrayColumns() {
|
|
236
|
-
return this.getColumns().filter((c) => c.
|
|
233
|
+
return this.getColumns().filter((c) => c.dataType == Enums_1.DataType.NumberArray);
|
|
237
234
|
}
|
|
238
235
|
getStringColumns() {
|
|
239
|
-
return this.getColumns().filter((c) => c.
|
|
236
|
+
return this.getColumns().filter((c) => c.dataType == Enums_1.DataType.String);
|
|
240
237
|
}
|
|
241
238
|
getDateColumns() {
|
|
242
|
-
return this.getColumns().filter((c) => c.
|
|
239
|
+
return this.getColumns().filter((c) => c.dataType == Enums_1.DataType.Date);
|
|
243
240
|
}
|
|
244
241
|
getBooleanColumns() {
|
|
245
|
-
return this.getColumns().filter((c) => c.
|
|
242
|
+
return this.getColumns().filter((c) => c.dataType == Enums_1.DataType.Boolean);
|
|
246
243
|
}
|
|
247
244
|
getSortableColumns() {
|
|
248
|
-
return this.getColumns().filter((c) => c.
|
|
245
|
+
return this.getColumns().filter((c) => c.sortable);
|
|
249
246
|
}
|
|
250
247
|
getGroupableColumns() {
|
|
251
|
-
return this.getColumns().filter((c) => c.
|
|
248
|
+
return this.getColumns().filter((c) => c.groupable);
|
|
252
249
|
}
|
|
253
250
|
getPivotableColumns() {
|
|
254
|
-
return this.getColumns().filter((c) => c.
|
|
251
|
+
return this.getColumns().filter((c) => c.pivotable);
|
|
255
252
|
}
|
|
256
253
|
getAggregetableColumns() {
|
|
257
254
|
return this.getColumns()
|
|
258
|
-
.filter((c) => c.
|
|
259
|
-
.filter((c) => c.
|
|
255
|
+
.filter((c) => c.aggregatable)
|
|
256
|
+
.filter((c) => c.dataType == Enums_1.DataType.Number);
|
|
260
257
|
}
|
|
261
258
|
getQueryableColumns() {
|
|
262
|
-
return this.getColumns().filter((c) => c.
|
|
259
|
+
return this.getColumns().filter((c) => c.queryable);
|
|
263
260
|
}
|
|
264
261
|
LogMissingColumnWarning(columnId) {
|
|
265
262
|
if (this.adaptable.adaptableOptions.generalOptions.showMissingColumnsWarning &&
|
|
@@ -290,7 +287,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
290
287
|
suppressClientSideFilter: false,
|
|
291
288
|
};
|
|
292
289
|
}
|
|
293
|
-
const { gridCells, suppressClientSideFilter
|
|
290
|
+
const { gridCells, suppressClientSideFilter } = await this.adaptable.getDistinctFilterValuesForColumn(abColumn, false, filter);
|
|
294
291
|
return {
|
|
295
292
|
values: this.sortDistinctValues(gridCells, abColumn).map((cv) => {
|
|
296
293
|
return cv.displayValue;
|
|
@@ -352,7 +349,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
352
349
|
// this does NOT into account Custom Sort - far too hard for now...
|
|
353
350
|
let sortOrder = Enums_1.SortOrder.Asc;
|
|
354
351
|
if (this.getFilterOptions().sortColumnValuesInFilter) {
|
|
355
|
-
let columnSort = this.adaptable.api.gridApi.getColumnSortForColumn(column.
|
|
352
|
+
let columnSort = this.adaptable.api.gridApi.getColumnSortForColumn(column.columnId);
|
|
356
353
|
if (columnSort && columnSort.SortOrder == 'Desc') {
|
|
357
354
|
sortOrder = Enums_1.SortOrder.Desc;
|
|
358
355
|
}
|
|
@@ -373,12 +370,11 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
373
370
|
}
|
|
374
371
|
getAllColumnFriendlyNames() {
|
|
375
372
|
return this.getColumns().map((c) => {
|
|
376
|
-
return c.
|
|
373
|
+
return c.friendlyName;
|
|
377
374
|
});
|
|
378
375
|
}
|
|
379
376
|
usesAdaptableFilterForm(columnId) {
|
|
380
|
-
const useAdaptableFilterForm = this.getFilterOptions()
|
|
381
|
-
.useAdaptableFilterForm;
|
|
377
|
+
const useAdaptableFilterForm = this.getFilterOptions().useAdaptableFilterForm;
|
|
382
378
|
if (useAdaptableFilterForm == null || useAdaptableFilterForm == false) {
|
|
383
379
|
return false;
|
|
384
380
|
}
|
|
@@ -388,8 +384,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
388
384
|
return true;
|
|
389
385
|
}
|
|
390
386
|
usesAdaptableQuickFilter(columnId) {
|
|
391
|
-
const useAdaptableQuickFilter = this.getFilterOptions()
|
|
392
|
-
.useAdaptableQuickFilter;
|
|
387
|
+
const useAdaptableQuickFilter = this.getFilterOptions().useAdaptableQuickFilter;
|
|
393
388
|
if (useAdaptableQuickFilter == null || useAdaptableQuickFilter == false) {
|
|
394
389
|
return false;
|
|
395
390
|
}
|
|
@@ -398,5 +393,9 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
398
393
|
}
|
|
399
394
|
return true;
|
|
400
395
|
}
|
|
396
|
+
isColumnReferencedInExpression(columnId, expression) {
|
|
397
|
+
const colIds = this.adaptable.api.queryLanguageApi.getColumnsFromExpression(expression);
|
|
398
|
+
return colIds.some((c) => c === columnId);
|
|
399
|
+
}
|
|
401
400
|
}
|
|
402
401
|
exports.ColumnApiImpl = ColumnApiImpl;
|
|
@@ -179,18 +179,10 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
179
179
|
return returnJson
|
|
180
180
|
? JSON.stringify(this.getAdaptableState().Application)
|
|
181
181
|
: this.getAdaptableState().Application;
|
|
182
|
-
case 'BulkUpdate':
|
|
183
|
-
return returnJson
|
|
184
|
-
? JSON.stringify(this.getAdaptableState().BulkUpdate)
|
|
185
|
-
: this.getAdaptableState().BulkUpdate;
|
|
186
182
|
case 'CalculatedColumn':
|
|
187
183
|
return returnJson
|
|
188
184
|
? JSON.stringify(this.getAdaptableState().CalculatedColumn)
|
|
189
185
|
: this.getAdaptableState().CalculatedColumn;
|
|
190
|
-
case 'CellSummary':
|
|
191
|
-
return returnJson
|
|
192
|
-
? JSON.stringify(this.getAdaptableState().SelectedCells)
|
|
193
|
-
: this.getAdaptableState().CellSummary;
|
|
194
186
|
case 'Chart':
|
|
195
187
|
return returnJson
|
|
196
188
|
? JSON.stringify(this.getAdaptableState().Chart)
|
|
@@ -211,10 +203,6 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
211
203
|
return returnJson
|
|
212
204
|
? JSON.stringify(this.getAdaptableState().DataSource)
|
|
213
205
|
: this.getAdaptableState().DataSource;
|
|
214
|
-
case 'Entitlement':
|
|
215
|
-
return returnJson
|
|
216
|
-
? JSON.stringify(this.getAdaptableState().Entitlements)
|
|
217
|
-
: this.getAdaptableState().Entitlements;
|
|
218
206
|
case 'Export':
|
|
219
207
|
return returnJson
|
|
220
208
|
? JSON.stringify(this.getAdaptableState().Export)
|
|
@@ -255,18 +243,10 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
255
243
|
return returnJson
|
|
256
244
|
? JSON.stringify(this.getAdaptableState().Shortcut)
|
|
257
245
|
: this.getAdaptableState().Shortcut;
|
|
258
|
-
case 'SmartEdit':
|
|
259
|
-
return returnJson
|
|
260
|
-
? JSON.stringify(this.getAdaptableState().SmartEdit)
|
|
261
|
-
: this.getAdaptableState().SmartEdit;
|
|
262
246
|
case 'SparklineColumn':
|
|
263
247
|
return returnJson
|
|
264
248
|
? JSON.stringify(this.getAdaptableState().SparklineColumn)
|
|
265
249
|
: this.getAdaptableState().SparklineColumn;
|
|
266
|
-
case 'SystemStatus':
|
|
267
|
-
return returnJson
|
|
268
|
-
? JSON.stringify(this.getAdaptableState().SystemStatus)
|
|
269
|
-
: this.getAdaptableState().SystemStatus;
|
|
270
250
|
case 'Theme':
|
|
271
251
|
return returnJson
|
|
272
252
|
? JSON.stringify(this.getAdaptableState().Theme)
|
|
@@ -275,10 +255,6 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
275
255
|
return returnJson
|
|
276
256
|
? JSON.stringify(this.getAdaptableState().ToolPanel)
|
|
277
257
|
: this.getAdaptableState().ToolPanel;
|
|
278
|
-
case 'UserInterface':
|
|
279
|
-
return returnJson
|
|
280
|
-
? JSON.stringify(this.getAdaptableState().UserInterface)
|
|
281
|
-
: this.getAdaptableState().UserInterface;
|
|
282
258
|
}
|
|
283
259
|
}
|
|
284
260
|
incrementUerStateRevision(stateKey) {
|
|
@@ -18,6 +18,7 @@ class DashboardApiImpl extends ApiBase_1.ApiBase {
|
|
|
18
18
|
// so we debounced to only get tha latest call
|
|
19
19
|
this.fireDashboardChangedEvent = (trigger, oldDashboardState, newDashboardState) => {
|
|
20
20
|
const dashboardChangedInfo = {
|
|
21
|
+
adaptableApi: this.adaptable.api,
|
|
21
22
|
actionName: trigger,
|
|
22
23
|
oldDashboardState: oldDashboardState,
|
|
23
24
|
newDashboardState: newDashboardState,
|
|
@@ -39,7 +40,7 @@ class DashboardApiImpl extends ApiBase_1.ApiBase {
|
|
|
39
40
|
getCustomDashboardButtonByLabel(buttonLabel) {
|
|
40
41
|
const api = this.getAdaptableApi();
|
|
41
42
|
const dashboardContext = {
|
|
42
|
-
api,
|
|
43
|
+
adaptableApi: api,
|
|
43
44
|
dashboardState: api.dashboardApi.getDashboardState(),
|
|
44
45
|
};
|
|
45
46
|
return this.getDashboardOptions().customDashboardButtons.find((cb) => {
|
|
@@ -103,7 +103,6 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
|
|
|
103
103
|
if (report.ReportRowScope == 'CustomRows' || report.ReportColumnScope == 'CustomColumns') {
|
|
104
104
|
return false;
|
|
105
105
|
}
|
|
106
|
-
let abColumn = this.adaptable.api.columnApi.getColumnFromId(dataChangedInfo.columnId);
|
|
107
106
|
// Start with the DataChanged Column and go through all possibilities
|
|
108
107
|
switch (report.ReportColumnScope) {
|
|
109
108
|
case 'AllColumns':
|
|
@@ -111,21 +110,22 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
|
|
|
111
110
|
break;
|
|
112
111
|
case 'ScopeColumns':
|
|
113
112
|
// use the Scope object which will tell us if the Column is relevant
|
|
114
|
-
if (!this.adaptable.api.scopeApi.isColumnInScopeColumns(
|
|
113
|
+
if (!this.adaptable.api.scopeApi.isColumnInScopeColumns(dataChangedInfo.column, report.Scope)) {
|
|
115
114
|
return false;
|
|
116
115
|
}
|
|
117
116
|
break;
|
|
118
117
|
case 'SelectedColumns':
|
|
119
118
|
let selectedCellInfo = this.adaptable.api.gridApi.getSelectedCellInfo();
|
|
120
119
|
if (selectedCellInfo) {
|
|
121
|
-
if (selectedCellInfo.columns.find((c) => c.
|
|
120
|
+
if (selectedCellInfo.columns.find((c) => c.columnId == dataChangedInfo.column.columnId) ==
|
|
121
|
+
null) {
|
|
122
122
|
return false;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
break;
|
|
126
126
|
case 'VisibleColumns':
|
|
127
127
|
// hope that visibile column property is updated whenever the layout changes... (need to check!)
|
|
128
|
-
if (!
|
|
128
|
+
if (!dataChangedInfo.column.visible) {
|
|
129
129
|
return false;
|
|
130
130
|
}
|
|
131
131
|
break;
|
|
@@ -243,7 +243,7 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
243
243
|
}
|
|
244
244
|
getCheckBoxStyleFormatColumn(column) {
|
|
245
245
|
var _a;
|
|
246
|
-
if (column.
|
|
246
|
+
if (column.dataType != 'Boolean') {
|
|
247
247
|
return undefined;
|
|
248
248
|
}
|
|
249
249
|
const checkBoxFormatColumns = (_a = this.getFormatColumnState().FormatColumns) === null || _a === void 0 ? void 0 : _a.filter((fc) => { var _a; return (_a = fc.ColumnStyle) === null || _a === void 0 ? void 0 : _a.CheckBoxStyle; });
|
|
@@ -256,6 +256,7 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
256
256
|
}
|
|
257
257
|
fireCheckboxColumnClickedEvent(columnId, rowData, primaryKeyValue, isChecked) {
|
|
258
258
|
let checkboxColumnClickedInfo = {
|
|
259
|
+
adaptableApi: this.adaptable.api,
|
|
259
260
|
column: this.adaptable.api.columnApi.getColumnFromId(columnId),
|
|
260
261
|
rowData: rowData,
|
|
261
262
|
primaryKeyValue: primaryKeyValue,
|
|
@@ -104,14 +104,19 @@ class FreeTextColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
checkFreeTextColumnForDataChange(dataChangedInfo) {
|
|
107
|
-
let freeTextColumn = this.getAllFreeTextColumn().find((fc) => fc.ColumnId == dataChangedInfo.columnId);
|
|
107
|
+
let freeTextColumn = this.getAllFreeTextColumn().find((fc) => fc.ColumnId == dataChangedInfo.column.columnId);
|
|
108
108
|
if (freeTextColumn) {
|
|
109
109
|
let freeTextStoredValue = {
|
|
110
110
|
PrimaryKey: dataChangedInfo.primaryKeyValue,
|
|
111
111
|
FreeText: dataChangedInfo.newValue,
|
|
112
112
|
};
|
|
113
113
|
this.addEditFreeTextColumnStoredValue(freeTextColumn, freeTextStoredValue);
|
|
114
|
-
|
|
114
|
+
var colsToRefresh = [dataChangedInfo.column.columnId];
|
|
115
|
+
const refencedCalcColumns = this.adaptable.api.calculatedColumnApi.getCalculatedColumnsReferencingColumnId(dataChangedInfo.column.columnId);
|
|
116
|
+
refencedCalcColumns.forEach((calculatedColumn) => {
|
|
117
|
+
colsToRefresh.push(calculatedColumn.ColumnId);
|
|
118
|
+
});
|
|
119
|
+
this.adaptable.refreshCells([dataChangedInfo.rowNode], colsToRefresh, false);
|
|
115
120
|
}
|
|
116
121
|
}
|
|
117
122
|
getFreeTextColumnModuleReferences(freeTextColumn) {
|
|
@@ -8,7 +8,7 @@ import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
|
|
|
8
8
|
import { DataUpdateConfig } from '../../PredefinedConfig/Common/DataUpdateConfig';
|
|
9
9
|
import { DataChangedInfo, AccessLevel, AdaptableModule } from '../../types';
|
|
10
10
|
import { CellHighlightInfo } from '../../PredefinedConfig/Common/CellHighlightInfo';
|
|
11
|
-
import { RowNode } from '@ag-grid-community/all-modules';
|
|
11
|
+
import { GridOptions, RowNode } from '@ag-grid-community/all-modules';
|
|
12
12
|
import { GridCellRange } from '../../PredefinedConfig/Selection/GridCellRange';
|
|
13
13
|
export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
14
14
|
getGridState(): GridState;
|
|
@@ -34,7 +34,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
34
34
|
hideFilterForm(): void;
|
|
35
35
|
applyGridFiltering(): void;
|
|
36
36
|
clearGridFiltering(): void;
|
|
37
|
-
|
|
37
|
+
getAgGridInstance(): GridOptions;
|
|
38
38
|
getColumnSorts(): ColumnSort[];
|
|
39
39
|
getColumnSortForColumn(columnId: string): ColumnSort | undefined;
|
|
40
40
|
setAdaptableSorting(columnSorts: ColumnSort[]): void;
|
|
@@ -32,7 +32,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
32
32
|
undoCellEdit(dataChangedInfo) {
|
|
33
33
|
// for the reason of this hacky solution see the comments in DataService
|
|
34
34
|
this.adaptable.api.internalApi.getDataService().logUndoChange(dataChangedInfo);
|
|
35
|
-
this.setCellValue(dataChangedInfo.columnId, dataChangedInfo.oldValue, dataChangedInfo.primaryKeyValue);
|
|
35
|
+
this.setCellValue(dataChangedInfo.column.columnId, dataChangedInfo.oldValue, dataChangedInfo.primaryKeyValue);
|
|
36
36
|
return true;
|
|
37
37
|
}
|
|
38
38
|
deleteGridData(dataRows, dataUpdateConfig) {
|
|
@@ -42,18 +42,18 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
setCellValue(columnId, newValue, primaryKeyValue) {
|
|
45
|
-
|
|
45
|
+
const abColumn = this.adaptable.api.columnApi.getColumnFromId(columnId);
|
|
46
|
+
if (!abColumn || abColumn.readOnly) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const gridCell = {
|
|
46
50
|
primaryKeyValue: primaryKeyValue,
|
|
47
|
-
columnId: columnId,
|
|
48
51
|
rawValue: newValue,
|
|
49
52
|
displayValue: newValue,
|
|
50
53
|
normalisedValue: newValue,
|
|
51
54
|
rowNode: this.getRowNodeForPrimaryKey(primaryKeyValue),
|
|
55
|
+
column: abColumn,
|
|
52
56
|
};
|
|
53
|
-
const abColumn = this.adaptable.api.columnApi.getColumnFromId(columnId);
|
|
54
|
-
if (!abColumn || abColumn.ReadOnly) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
57
|
this.adaptable.api.internalApi.setGridCell(gridCell);
|
|
58
58
|
}
|
|
59
59
|
setCellsValue(gridCells) {
|
|
@@ -87,7 +87,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
87
87
|
// slightly round the houses but we have to call FilterAPI as it does it properly
|
|
88
88
|
this.adaptable.api.filterApi.clearAllColumnFilter();
|
|
89
89
|
}
|
|
90
|
-
|
|
90
|
+
getAgGridInstance() {
|
|
91
91
|
return this.adaptable.adaptableOptions.vendorGrid;
|
|
92
92
|
}
|
|
93
93
|
getColumnSorts() {
|
|
@@ -230,6 +230,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
230
230
|
const adaptableSearchState = this.adaptable.api.configApi.getAdaptableSearchState();
|
|
231
231
|
const adaptableSortState = this.adaptable.api.configApi.getAdaptableSortState();
|
|
232
232
|
const searchChangedInfo = {
|
|
233
|
+
adaptableApi: this.adaptable.api,
|
|
233
234
|
searchChangedTrigger,
|
|
234
235
|
adaptableSearchState: adaptableSearchState,
|
|
235
236
|
adaptableSortState: adaptableSortState,
|
|
@@ -240,6 +241,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
240
241
|
fireCellChangedEvent(dataChangedInfo) {
|
|
241
242
|
if (this.adaptable.isInitialised) {
|
|
242
243
|
const cellChangedInfo = {
|
|
244
|
+
adaptableApi: this.adaptable.api,
|
|
243
245
|
cellChange: dataChangedInfo,
|
|
244
246
|
};
|
|
245
247
|
this.adaptable.api.eventApi.emit('CellChanged', cellChangedInfo);
|
|
@@ -248,6 +250,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
248
250
|
fireGridDataChangedEvent(dataRows, rowTigger) {
|
|
249
251
|
if (this.adaptable.isInitialised) {
|
|
250
252
|
const gridDataChangedInfo = {
|
|
253
|
+
adaptableApi: this.adaptable.api,
|
|
251
254
|
rowTigger: rowTigger,
|
|
252
255
|
dataRows: dataRows,
|
|
253
256
|
};
|
|
@@ -290,15 +293,13 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
290
293
|
let returnValue = true;
|
|
291
294
|
gridCells.forEach((gridCell) => {
|
|
292
295
|
if (returnValue) {
|
|
293
|
-
|
|
294
|
-
if (abColumn.ReadOnly) {
|
|
296
|
+
if (gridCell.column.readOnly) {
|
|
295
297
|
returnValue = false;
|
|
296
298
|
return;
|
|
297
299
|
}
|
|
298
300
|
let cellEditableFn = this.adaptable.adaptableOptions.editOptions.isCellEditable;
|
|
299
301
|
if (cellEditableFn) {
|
|
300
|
-
let
|
|
301
|
-
let functionReturnValue = cellEditableFn(gridCell, rowNode);
|
|
302
|
+
let functionReturnValue = cellEditableFn(gridCell);
|
|
302
303
|
if (!functionReturnValue) {
|
|
303
304
|
returnValue = false;
|
|
304
305
|
}
|
|
@@ -332,7 +333,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
332
333
|
this.adaptable.destroy();
|
|
333
334
|
}
|
|
334
335
|
getGridContainerElement() {
|
|
335
|
-
return this.adaptable.
|
|
336
|
+
return this.adaptable.getAgGridContainerElement();
|
|
336
337
|
}
|
|
337
338
|
}
|
|
338
339
|
exports.GridApiImpl = GridApiImpl;
|
|
@@ -73,14 +73,14 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
|
|
|
73
73
|
setGridCells(gridCells: GridCell[]): void;
|
|
74
74
|
setToolbarTitle(): string;
|
|
75
75
|
setGridCell(gridCell: GridCell): void;
|
|
76
|
-
buildDataChangedInfo(config: Pick<DataChangedInfo, 'newValue' | 'oldValue' | '
|
|
76
|
+
buildDataChangedInfo(config: Pick<DataChangedInfo, 'newValue' | 'oldValue' | 'column' | 'primaryKeyValue' | 'rowNode' | 'trigger'>): DataChangedInfo;
|
|
77
77
|
private createDataChangedInfoFromGridCell;
|
|
78
78
|
setLastAppliedShortCut(gridCell: GridCell | undefined): void;
|
|
79
79
|
updateCurrentDraftLayout(layout: Layout): void;
|
|
80
80
|
setDefaultDashboardTab(): void;
|
|
81
81
|
getPrimaryKey(): any;
|
|
82
82
|
getAdaptableInstance(): IAdaptable;
|
|
83
|
-
|
|
83
|
+
getAgGridInstance(): any;
|
|
84
84
|
getPredefinedConfig(): any;
|
|
85
85
|
getState(): AdaptableState;
|
|
86
86
|
getAdaptableOptions(): AdaptableOptions;
|
|
@@ -144,7 +144,7 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
144
144
|
this.dispatchAction(GridRedux.GridAddColumns(AdaptableColumns));
|
|
145
145
|
}
|
|
146
146
|
removeAdaptableColumn(colId) {
|
|
147
|
-
const col = this.getAdaptableState().Grid.Columns.find((c) => c.
|
|
147
|
+
const col = this.getAdaptableState().Grid.Columns.find((c) => c.columnId === colId);
|
|
148
148
|
if (col) {
|
|
149
149
|
this.dispatchAction(GridRedux.GridRemoveColumn(col));
|
|
150
150
|
}
|
|
@@ -175,12 +175,12 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
175
175
|
return Object.assign(Object.assign({}, config), { rowData: (_a = config.rowNode) === null || _a === void 0 ? void 0 : _a.data, changedAt: Date.now() });
|
|
176
176
|
}
|
|
177
177
|
createDataChangedInfoFromGridCell(gridCell) {
|
|
178
|
-
let currentValue = this.adaptable.getDisplayValue(gridCell.primaryKeyValue, gridCell.columnId);
|
|
178
|
+
let currentValue = this.adaptable.getDisplayValue(gridCell.primaryKeyValue, gridCell.column.columnId);
|
|
179
179
|
const currentRowNode = this.adaptable.getRowNodeForPrimaryKey(gridCell.primaryKeyValue);
|
|
180
180
|
const dataChangedInfo = this.buildDataChangedInfo({
|
|
181
181
|
oldValue: currentValue,
|
|
182
182
|
newValue: gridCell.rawValue,
|
|
183
|
-
|
|
183
|
+
column: gridCell.column,
|
|
184
184
|
primaryKeyValue: gridCell.primaryKeyValue,
|
|
185
185
|
rowNode: currentRowNode,
|
|
186
186
|
});
|
|
@@ -205,7 +205,7 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
205
205
|
getAdaptableInstance() {
|
|
206
206
|
return this.adaptable;
|
|
207
207
|
}
|
|
208
|
-
|
|
208
|
+
getAgGridInstance() {
|
|
209
209
|
return this.adaptable.adaptableOptions.vendorGrid;
|
|
210
210
|
}
|
|
211
211
|
getPredefinedConfig() {
|
|
@@ -272,7 +272,7 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
272
272
|
}
|
|
273
273
|
getCustomSortComparer(column) {
|
|
274
274
|
var _a;
|
|
275
|
-
return (_a = this.getGeneralOptions().customSortComparers) === null || _a === void 0 ? void 0 : _a.find((csc) =>
|
|
275
|
+
return (_a = this.getGeneralOptions().customSortComparers) === null || _a === void 0 ? void 0 : _a.find((csc) => this.adaptable.api.scopeApi.isColumnInScope(column, csc.scope));
|
|
276
276
|
}
|
|
277
277
|
getLabelForButton(button, context) {
|
|
278
278
|
if (!button.label) {
|
|
@@ -21,10 +21,12 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
21
21
|
createLayout(layoutToCreate: Layout): Layout | undefined;
|
|
22
22
|
cloneAndSetLayout(layoutToClone: Layout, layoutName: string): Layout;
|
|
23
23
|
cloneLayout(layoutToClone: Layout, layoutName: string): Layout;
|
|
24
|
+
setColumnCaption(columnId: string, caption: string): void;
|
|
24
25
|
saveLayout(layoutToSave: Layout): void;
|
|
25
26
|
areLayoutsEqual(layout1: Layout, layout2: Layout): boolean;
|
|
26
27
|
getLayoutDescription(layout: Layout): string;
|
|
27
28
|
private getColumnSort;
|
|
28
29
|
createDefaultLayoutIfNeeded(): Layout | null;
|
|
29
30
|
showLayoutPopup(): void;
|
|
31
|
+
isCurrentLayoutReadOnly(): boolean;
|
|
30
32
|
}
|
|
@@ -50,6 +50,7 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
50
50
|
}
|
|
51
51
|
fireLayoutChangedEvent(trigger, oldSate, newState) {
|
|
52
52
|
const layoutChangedInfo = {
|
|
53
|
+
adaptableApi: this.adaptable.api,
|
|
53
54
|
actionName: trigger,
|
|
54
55
|
oldLayoutState: oldSate,
|
|
55
56
|
newLayoutState: newState,
|
|
@@ -138,6 +139,14 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
138
139
|
this.dispatchAction(LayoutRedux.LayoutAdd(newLayout));
|
|
139
140
|
return this.getLayoutById(newLayout.Uuid);
|
|
140
141
|
}
|
|
142
|
+
setColumnCaption(columnId, caption) {
|
|
143
|
+
if (StringExtensions_1.default.IsNotNullOrEmpty(columnId) && StringExtensions_1.default.IsNotNullOrEmpty(caption)) {
|
|
144
|
+
const currentLayoutName = this.getCurrentLayoutName();
|
|
145
|
+
if (StringExtensions_1.default.IsNotNullOrEmpty(currentLayoutName)) {
|
|
146
|
+
this.dispatchAction(LayoutRedux.LayoutSetColumnCaption(currentLayoutName, columnId, caption));
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
141
150
|
saveLayout(layoutToSave) {
|
|
142
151
|
if (!this.doesLayoutExist(layoutToSave)) {
|
|
143
152
|
this.addUidToAdaptableObject(layoutToSave);
|
|
@@ -188,9 +197,9 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
188
197
|
let gridState = this.getAdaptableApi().gridApi.getGridState();
|
|
189
198
|
let layoutState = this.getLayoutState();
|
|
190
199
|
const isLayoutDefined = (layoutName) => !!layoutState.Layouts.filter((layout) => layout.Name === layoutName)[0];
|
|
191
|
-
let defaultLayoutColumns = gridState.Columns.filter((column) => column.
|
|
200
|
+
let defaultLayoutColumns = gridState.Columns.filter((column) => column.visible);
|
|
192
201
|
const columnsMap = gridState.Columns.reduce((acc, col) => {
|
|
193
|
-
acc[col.
|
|
202
|
+
acc[col.columnId] = col;
|
|
194
203
|
return acc;
|
|
195
204
|
}, {});
|
|
196
205
|
let shouldCreateDefaultLayout = this.getLayoutOptions().createDefaultLayout;
|
|
@@ -201,7 +210,7 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
201
210
|
if (!layoutState.Layouts || !isLayoutDefined(GeneralConstants_1.DEFAULT_LAYOUT)) {
|
|
202
211
|
let defaultLayout = ObjectFactory_1.default.CreateEmptyLayout({
|
|
203
212
|
Name: GeneralConstants_1.DEFAULT_LAYOUT,
|
|
204
|
-
Columns: defaultLayoutColumns.map((c) => c.
|
|
213
|
+
Columns: defaultLayoutColumns.map((c) => c.columnId),
|
|
205
214
|
}, gridState.Columns);
|
|
206
215
|
this.saveLayout(defaultLayout);
|
|
207
216
|
return defaultLayout;
|
|
@@ -211,5 +220,12 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
211
220
|
showLayoutPopup() {
|
|
212
221
|
this.showModulePopup(ModuleConstants.LayoutModuleId);
|
|
213
222
|
}
|
|
223
|
+
isCurrentLayoutReadOnly() {
|
|
224
|
+
const currentLayout = this.getCurrentLayout();
|
|
225
|
+
if (currentLayout) {
|
|
226
|
+
return currentLayout.IsReadOnly;
|
|
227
|
+
}
|
|
228
|
+
return true;
|
|
229
|
+
}
|
|
214
230
|
}
|
|
215
231
|
exports.LayoutApiImpl = LayoutApiImpl;
|
|
@@ -11,8 +11,8 @@ export declare class PluginsApiImpl extends ApiBase implements PluginsApi {
|
|
|
11
11
|
getPluginState(pluginId: string): any;
|
|
12
12
|
registerPlugin(pluginId: string, initialPluginState: any): void;
|
|
13
13
|
setPluginState(pluginId: string, newPluginState: any): void;
|
|
14
|
-
getPluginApi
|
|
15
|
-
|
|
14
|
+
private getPluginApi;
|
|
15
|
+
getipushpullPluginApi(): IPushPullApi;
|
|
16
16
|
getGlue42PluginApi(): Glue42Api;
|
|
17
17
|
getOpenFinPluginApi(): OpenFinApi;
|
|
18
18
|
getChartsPluginApi(): ChartApi;
|