@adaptabletools/adaptable 16.0.0-canary.0 → 16.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/bundle.cjs.js +71 -71
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +15 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +7 -7
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +51 -0
- package/src/AdaptableOptions/{SearchOptions.d.ts → QuickSearchOptions.d.ts} +2 -2
- package/src/AdaptableOptions/QuickSearchOptions.js +2 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +0 -43
- package/src/Api/Implementation/ApiBase.d.ts +3 -2
- package/src/Api/Implementation/ApiBase.js +5 -2
- package/src/Api/Implementation/CellSummaryApiImpl.js +2 -0
- package/src/Api/Implementation/OptionsApiImpl.d.ts +3 -2
- package/src/Api/Implementation/OptionsApiImpl.js +5 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +1 -1
- package/src/Api/OptionsApi.d.ts +6 -2
- package/src/PredefinedConfig/Common/CellSummary.d.ts +1 -0
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
- package/src/PredefinedConfig/Common/Enums.js +1 -0
- package/src/Redux/Store/AdaptableStore.js +1 -1
- package/src/Strategy/CellSummaryModule.js +1 -0
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +5 -3
- package/src/Utilities/Helpers/AdaptableHelper.js +1 -1
- package/src/Utilities/ObjectFactory.js +1 -0
- package/src/Utilities/Services/MetamodelService.js +4 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.d.ts +6 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.js +2 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.d.ts +6 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +32 -23
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +5 -5
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +11 -11
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +11 -21
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +5 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +4 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +3 -4
- package/src/View/AdaptableWizardView/Wizard.d.ts +4 -1
- package/src/View/AdaptableWizardView/Wizard.js +11 -10
- package/src/View/Dashboard/Dashboard.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +6 -2
- package/src/View/Export/ExportViewPanel.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
- package/src/View/QuickSearch/QuickSearchPopup.js +3 -3
- package/src/View/QuickSearch/QuickSearchStatusBarContent.js +1 -1
- package/src/View/QuickSearch/QuickSearchViewPanel.js +1 -1
- package/src/agGrid/Adaptable.d.ts +7 -7
- package/src/agGrid/Adaptable.js +38 -36
- package/src/agGrid/agGridHelper.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +57 -30
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +5 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- /package/src/AdaptableOptions/{SearchOptions.js → FormatColumnOptions.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "16.0.0-canary.
|
|
3
|
+
"version": "16.0.0-canary.2",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1689857991354;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartModel, ChartRef, Column, GridOptions, IRowNode, ModuleNames, RowModelType, StatusPanelDef } from '@ag-grid-community/core';
|
|
1
|
+
import { ChartModel, ChartRef, Column, GridOptions, IRowNode, Module, ModuleNames, RowModelType, StatusPanelDef } from '@ag-grid-community/core';
|
|
2
2
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
3
3
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
4
|
import { ColumnSort } from '../PredefinedConfig/Common/ColumnSort';
|
|
@@ -28,6 +28,19 @@ import { ColumnValuesComparer } from '../AdaptableOptions/CustomSortOptions';
|
|
|
28
28
|
import { IRowEditService } from '../Utilities/Services/Interface/IRowEditService';
|
|
29
29
|
import { RenderReactRootFn } from '../renderReactRoot';
|
|
30
30
|
import { AdaptableLogger } from '../agGrid/AdaptableLogger';
|
|
31
|
+
/**
|
|
32
|
+
* Contains AG Grid Options and Modules - used when instantiating AdapTable vanilla
|
|
33
|
+
*/
|
|
34
|
+
export interface AgGridConfig {
|
|
35
|
+
/**
|
|
36
|
+
* AG Grid GridOptions object
|
|
37
|
+
*/
|
|
38
|
+
gridOptions: GridOptions;
|
|
39
|
+
/**
|
|
40
|
+
* AG Grid Modules
|
|
41
|
+
*/
|
|
42
|
+
modules: Module[];
|
|
43
|
+
}
|
|
31
44
|
export declare type AdaptableVariant = 'vanilla' | 'react' | 'angular';
|
|
32
45
|
/**
|
|
33
46
|
* The only interface for Adaptable
|
|
@@ -281,4 +294,5 @@ export interface IAdaptable {
|
|
|
281
294
|
getAgGridColumnForColumnId(columnId: string): Column;
|
|
282
295
|
isAgGridModulePresent(moduleName: ModuleNames): boolean;
|
|
283
296
|
getMinMaxCachedValueForColumn(column: AdaptableColumn, minMax: 'min' | 'max'): number | undefined;
|
|
297
|
+
getAgGridRegisteredModules(): Module[];
|
|
284
298
|
}
|
|
@@ -5,7 +5,6 @@ import { EditOptions } from './EditOptions';
|
|
|
5
5
|
import { StateOptions } from './StateOptions';
|
|
6
6
|
import { UserInterfaceOptions } from './UserInterfaceOptions';
|
|
7
7
|
import { AdaptablePlugin } from './AdaptablePlugin';
|
|
8
|
-
import { SearchOptions } from './SearchOptions';
|
|
9
8
|
import { ExportOptions } from './ExportOptions';
|
|
10
9
|
import { TeamSharingOptions } from './TeamSharingOptions';
|
|
11
10
|
import { MenuOptions } from './MenuOptions';
|
|
@@ -16,7 +15,6 @@ import { ToolPanelOptions } from './ToolPanelOptions';
|
|
|
16
15
|
import { FilterOptions } from './FilterOptions';
|
|
17
16
|
import { DataChangeHistoryOptions } from './DataChangeHistoryOptions';
|
|
18
17
|
import { SettingsPanelOptions } from './SettingsPanelOptions';
|
|
19
|
-
import { GridOptions } from '@ag-grid-community/core';
|
|
20
18
|
import { FlashingCellOptions } from './FlashingCellOptions';
|
|
21
19
|
import { AlertOptions } from './AlertOptions';
|
|
22
20
|
import { AdaptableQLOptions } from './AdaptableQLOptions';
|
|
@@ -29,6 +27,8 @@ import { CustomSortOptions } from './CustomSortOptions';
|
|
|
29
27
|
import { DataSetOptions } from './DataSetOptions';
|
|
30
28
|
import { CellSummaryOptions } from './CellSummaryOptions';
|
|
31
29
|
import { CalendarOptions } from './CalendarOptions';
|
|
30
|
+
import { QuickSearchOptions } from './QuickSearchOptions';
|
|
31
|
+
import { FormatColumnOptions } from './FormatColumnOptions';
|
|
32
32
|
/**
|
|
33
33
|
* Large group of options enabling developers to set up AdapTable at design time to fit precise requirements
|
|
34
34
|
*/
|
|
@@ -55,10 +55,6 @@ export interface AdaptableOptions<TData = any> {
|
|
|
55
55
|
* @gridInfoItem
|
|
56
56
|
*/
|
|
57
57
|
autogeneratePrimaryKey?: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* The AG Grid object which AdapTable interacts with. Note: if using AdapTable React or AdapTable Angular, no need to populate this property as AdapTable wires it up differently
|
|
60
|
-
*/
|
|
61
|
-
gridOptions?: GridOptions<TData>;
|
|
62
58
|
/**
|
|
63
59
|
* Commercial license key. If the license is not provided or is expired, various visual information notes will be displayed and some functionality may be limited.
|
|
64
60
|
*/
|
|
@@ -179,6 +175,10 @@ export interface AdaptableOptions<TData = any> {
|
|
|
179
175
|
* @gridInfoContainer
|
|
180
176
|
*/
|
|
181
177
|
flashingCellOptions?: FlashingCellOptions;
|
|
178
|
+
/**
|
|
179
|
+
* Options for providing Custom Display Formats
|
|
180
|
+
*/
|
|
181
|
+
formatColumnOptions?: FormatColumnOptions;
|
|
182
182
|
/**
|
|
183
183
|
* Options related to Row Grouping
|
|
184
184
|
*
|
|
@@ -212,7 +212,7 @@ export interface AdaptableOptions<TData = any> {
|
|
|
212
212
|
* @gridInfoContainer
|
|
213
213
|
* @noCodeContainer
|
|
214
214
|
*/
|
|
215
|
-
|
|
215
|
+
quickSearchOptions?: QuickSearchOptions<TData>;
|
|
216
216
|
/**
|
|
217
217
|
* Setting panel options
|
|
218
218
|
*
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { AdaptableScope } from '../PredefinedConfig/Common/AdaptableScope';
|
|
2
|
+
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
3
|
+
import { BaseContext } from '../../types';
|
|
4
|
+
import { IRowNode } from '@ag-grid-community/core';
|
|
5
|
+
/**
|
|
6
|
+
* Options for managing the Format Column Module
|
|
7
|
+
*/
|
|
8
|
+
export interface FormatColumnOptions {
|
|
9
|
+
/**
|
|
10
|
+
* Custom Formatters to use in the Format Column Module
|
|
11
|
+
*/
|
|
12
|
+
customDisplayFormatters?: CustomDisplayFormatter[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Provides Custom Display Formats
|
|
16
|
+
*/
|
|
17
|
+
export interface CustomDisplayFormatter {
|
|
18
|
+
/**
|
|
19
|
+
* Id of the Formatted
|
|
20
|
+
*/
|
|
21
|
+
id: string;
|
|
22
|
+
/**
|
|
23
|
+
* Description
|
|
24
|
+
*/
|
|
25
|
+
label?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Function used to perform the Custom Display Format
|
|
28
|
+
*/
|
|
29
|
+
handler: (customDisplayFormatterContext: CustomDisplayFormatterContext) => any;
|
|
30
|
+
/**
|
|
31
|
+
* Where the Custom Display Format can be applied
|
|
32
|
+
*/
|
|
33
|
+
scope: AdaptableScope;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Context used in handler of CustomDisplayFormatter
|
|
37
|
+
*/
|
|
38
|
+
export interface CustomDisplayFormatterContext extends BaseContext {
|
|
39
|
+
/**
|
|
40
|
+
* Column where Custom Display Format will apply
|
|
41
|
+
*/
|
|
42
|
+
adaptableColumn: AdaptableColumn;
|
|
43
|
+
/**
|
|
44
|
+
* Non-formatted Cell Value
|
|
45
|
+
*/
|
|
46
|
+
cellValue: any;
|
|
47
|
+
/**
|
|
48
|
+
* Node where Custom Display Format will apply
|
|
49
|
+
*/
|
|
50
|
+
rowNode: IRowNode;
|
|
51
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Options for configuring Quick Search
|
|
4
4
|
*/
|
|
5
|
-
export interface
|
|
5
|
+
export interface QuickSearchOptions<TData = any> {
|
|
6
6
|
/**
|
|
7
7
|
* Function enabling specific Columns to be excluded from Quick Search
|
|
8
8
|
*
|
|
@@ -5,7 +5,6 @@ import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
|
5
5
|
import { AdaptableObjectTag } from '../PredefinedConfig/Common/AdaptableObject';
|
|
6
6
|
import { AdaptableStyle } from '../PredefinedConfig/Common/AdaptableStyle';
|
|
7
7
|
import { AlternativeModuleName, BaseContext, GridCell } from '../../types';
|
|
8
|
-
import { IRowNode } from '@ag-grid-community/core';
|
|
9
8
|
/**
|
|
10
9
|
* Options for managing the User Interface of AdapTable
|
|
11
10
|
*/
|
|
@@ -95,10 +94,6 @@ export interface UserInterfaceOptions<TData = any> {
|
|
|
95
94
|
* @gridInfoItem
|
|
96
95
|
*/
|
|
97
96
|
showAdapTableVersion?: boolean;
|
|
98
|
-
/**
|
|
99
|
-
* Custom Formatters to use in the Format Column Module
|
|
100
|
-
*/
|
|
101
|
-
customDisplayFormatters?: CustomDisplayFormatter[];
|
|
102
97
|
/**
|
|
103
98
|
* English variant to use in UI labels
|
|
104
99
|
*
|
|
@@ -227,41 +222,3 @@ export declare type GridInfoSection = 'GridSummary' | 'AdaptableOptions' | 'Colu
|
|
|
227
222
|
*/
|
|
228
223
|
export interface ObjectTagsContext extends BaseContext {
|
|
229
224
|
}
|
|
230
|
-
/**
|
|
231
|
-
* Provides Custom Display Formats
|
|
232
|
-
*/
|
|
233
|
-
export interface CustomDisplayFormatter {
|
|
234
|
-
/**
|
|
235
|
-
* Id of the Formatted
|
|
236
|
-
*/
|
|
237
|
-
id: string;
|
|
238
|
-
/**
|
|
239
|
-
* Description
|
|
240
|
-
*/
|
|
241
|
-
label?: string;
|
|
242
|
-
/**
|
|
243
|
-
* Function used to perform the Custom Display Format
|
|
244
|
-
*/
|
|
245
|
-
handler: (customDisplayFormatterContext: CustomDisplayFormatterContext) => any;
|
|
246
|
-
/**
|
|
247
|
-
* Where the Custom Display Format can be applied
|
|
248
|
-
*/
|
|
249
|
-
scope: AdaptableScope;
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Context used in handler of CustomDisplayFormatter
|
|
253
|
-
*/
|
|
254
|
-
export interface CustomDisplayFormatterContext extends BaseContext {
|
|
255
|
-
/**
|
|
256
|
-
* Column where Custom Display Format will apply
|
|
257
|
-
*/
|
|
258
|
-
adaptableColumn: AdaptableColumn;
|
|
259
|
-
/**
|
|
260
|
-
* Non-formatted Cell Value
|
|
261
|
-
*/
|
|
262
|
-
cellValue: any;
|
|
263
|
-
/**
|
|
264
|
-
* Node where Custom Display Format will apply
|
|
265
|
-
*/
|
|
266
|
-
rowNode: IRowNode;
|
|
267
|
-
}
|
|
@@ -7,7 +7,7 @@ import { ModuleInfo } from '../../Strategy/Interface/IModule';
|
|
|
7
7
|
import { AdaptableOptions } from '../../AdaptableOptions/AdaptableOptions';
|
|
8
8
|
import { AdaptableApi } from '../AdaptableApi';
|
|
9
9
|
import { ExportOptions } from '../../AdaptableOptions/ExportOptions';
|
|
10
|
-
import { ActionColumnApi, ActionColumnOptions, ActionRowApi, ActionRowOptions, AlertApi, ApplicationApi, BulkUpdateApi, CalculatedColumnApi, CalendarApi, CellSummaryApi, CellSummaryOptions, ChartingApi, ChartingOptions, ColumnApi, ConfigApi, ContainerOptions, CustomSortApi, DashboardApi, DashboardOptions, DataChangeHistoryApi, DataChangeHistoryOptions, DataSetApi, DataSetOptions, EditOptions, EntitlementApi, EntitlementOptions, EventApi, ExportApi, FilterApi, FilterOptions, FlashingCellApi, FlashingCellOptions, FormatColumnApi, FreeTextColumnApi, GridApi, LayoutApi, LayoutAssociatedObject, LayoutOptions, MenuOptions, PluginsApi, PlusMinusApi, PredicateApi, QueryApi, QuickSearchApi, ScheduleApi, ScopeApi,
|
|
10
|
+
import { ActionColumnApi, ActionColumnOptions, ActionRowApi, ActionRowOptions, AlertApi, ApplicationApi, BulkUpdateApi, CalculatedColumnApi, CalendarApi, CellSummaryApi, CellSummaryOptions, ChartingApi, ChartingOptions, ColumnApi, ConfigApi, ContainerOptions, CustomSortApi, DashboardApi, DashboardOptions, DataChangeHistoryApi, DataChangeHistoryOptions, DataSetApi, DataSetOptions, EditOptions, EntitlementApi, EntitlementOptions, EventApi, ExportApi, FilterApi, FilterOptions, FlashingCellApi, FlashingCellOptions, FormatColumnApi, FormatColumnOptions, FreeTextColumnApi, GridApi, LayoutApi, LayoutAssociatedObject, LayoutOptions, MenuOptions, PluginsApi, PlusMinusApi, PredicateApi, QueryApi, QuickSearchApi, QuickSearchOptions, ScheduleApi, ScopeApi, SettingsPanelApi, SettingsPanelOptions, ShortcutApi, SmartEditApi, StateOptions, StatusBarApi, StyledColumnApi, SystemStatusApi, TeamSharingApi, TeamSharingOptions, ThemeApi, ToolPanelApi, UserInterfaceApi, UserInterfaceOptions } from '../../types';
|
|
11
11
|
import { NotificationsOptions } from '../../AdaptableOptions/NotificationsOptions';
|
|
12
12
|
import { ToolPanelOptions } from '../../AdaptableOptions/ToolPanelOptions';
|
|
13
13
|
import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
|
|
@@ -77,7 +77,8 @@ export declare abstract class ApiBase {
|
|
|
77
77
|
protected getMenuOptions(): MenuOptions;
|
|
78
78
|
protected getFilterOptions(): FilterOptions;
|
|
79
79
|
protected getAdaptableQLOptions(): AdaptableQLOptions;
|
|
80
|
-
protected
|
|
80
|
+
protected getQuickSearchOptions(): QuickSearchOptions;
|
|
81
|
+
protected getFormatColumnOptions(): FormatColumnOptions;
|
|
81
82
|
protected getStateOptions(): StateOptions;
|
|
82
83
|
protected getTeamSharingOptions(): TeamSharingOptions;
|
|
83
84
|
protected getUserInterfaceOptions(): UserInterfaceOptions;
|
|
@@ -147,8 +147,11 @@ class ApiBase {
|
|
|
147
147
|
getAdaptableQLOptions() {
|
|
148
148
|
return this.getOptions().adaptableQLOptions;
|
|
149
149
|
}
|
|
150
|
-
|
|
151
|
-
return this.getOptions().
|
|
150
|
+
getQuickSearchOptions() {
|
|
151
|
+
return this.getOptions().quickSearchOptions;
|
|
152
|
+
}
|
|
153
|
+
getFormatColumnOptions() {
|
|
154
|
+
return this.getOptions().formatColumnOptions;
|
|
152
155
|
}
|
|
153
156
|
getStateOptions() {
|
|
154
157
|
return this.getOptions().stateOptions;
|
|
@@ -50,6 +50,8 @@ class CellSummaryApiImpl extends ApiBase_1.ApiBase {
|
|
|
50
50
|
return cellSummary.Distinct;
|
|
51
51
|
case Enums_1.SummaryOperation.Count:
|
|
52
52
|
return cellSummary.Count;
|
|
53
|
+
case Enums_1.SummaryOperation.Only:
|
|
54
|
+
return cellSummary.Only;
|
|
53
55
|
default:
|
|
54
56
|
return cellSummary[operation];
|
|
55
57
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
|
-
import { ActionColumnOptions, ActionRowOptions, AdaptableOptions, AdaptableQLOptions, AlertOptions, CalendarOptions, CellSummaryOptions, ChartingOptions, ColumnOptions, ContainerOptions, DashboardOptions, DataChangeHistoryOptions, DataSetOptions, EditOptions, EntitlementOptions, ExportOptions, FilterOptions, FlashingCellOptions, LayoutOptions, MenuOptions, NotificationsOptions, OptionsApi,
|
|
2
|
+
import { ActionColumnOptions, ActionRowOptions, AdaptableOptions, AdaptableQLOptions, AlertOptions, CalendarOptions, CellSummaryOptions, ChartingOptions, ColumnOptions, ContainerOptions, DashboardOptions, DataChangeHistoryOptions, DataSetOptions, EditOptions, EntitlementOptions, ExportOptions, FilterOptions, FlashingCellOptions, FormatColumnOptions, LayoutOptions, MenuOptions, NotificationsOptions, OptionsApi, QuickSearchOptions, SettingsPanelOptions, StateOptions, TeamSharingOptions, ToolPanelOptions, UserInterfaceOptions } from '../../types';
|
|
3
3
|
import { GroupingOptions } from '../../AdaptableOptions/GroupingOptions';
|
|
4
4
|
import { CustomSortOptions } from '../../AdaptableOptions/CustomSortOptions';
|
|
5
5
|
export declare class OptionsApiImpl extends ApiBase implements OptionsApi {
|
|
@@ -28,7 +28,8 @@ export declare class OptionsApiImpl extends ApiBase implements OptionsApi {
|
|
|
28
28
|
getMenuOptions(): MenuOptions;
|
|
29
29
|
getFilterOptions(): FilterOptions;
|
|
30
30
|
getAdaptableQLOptions(): AdaptableQLOptions;
|
|
31
|
-
|
|
31
|
+
getQuickSearchOptions(): QuickSearchOptions;
|
|
32
|
+
getFormatColumnOptions(): FormatColumnOptions;
|
|
32
33
|
getStateOptions(): StateOptions;
|
|
33
34
|
getTeamSharingOptions(): TeamSharingOptions;
|
|
34
35
|
getUserInterfaceOptions(): UserInterfaceOptions;
|
|
@@ -78,8 +78,11 @@ class OptionsApiImpl extends ApiBase_1.ApiBase {
|
|
|
78
78
|
getAdaptableQLOptions() {
|
|
79
79
|
return this.getOptions().adaptableQLOptions;
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
return this.getOptions().
|
|
81
|
+
getQuickSearchOptions() {
|
|
82
|
+
return this.getOptions().quickSearchOptions;
|
|
83
|
+
}
|
|
84
|
+
getFormatColumnOptions() {
|
|
85
|
+
return this.getOptions().formatColumnOptions;
|
|
83
86
|
}
|
|
84
87
|
getStateOptions() {
|
|
85
88
|
return this.getOptions().stateOptions;
|
|
@@ -129,7 +129,7 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
129
129
|
return value;
|
|
130
130
|
}
|
|
131
131
|
const adaptableOptions = this.adaptable.adaptableOptions;
|
|
132
|
-
const customFormattersFromOptions = (_c = (_b = adaptableOptions === null || adaptableOptions === void 0 ? void 0 : adaptableOptions.
|
|
132
|
+
const customFormattersFromOptions = (_c = (_b = adaptableOptions === null || adaptableOptions === void 0 ? void 0 : adaptableOptions.formatColumnOptions) === null || _b === void 0 ? void 0 : _b.customDisplayFormatters) !== null && _c !== void 0 ? _c : [];
|
|
133
133
|
// formatters are applied in the order they are defined in the options
|
|
134
134
|
const customFormatters = customFormattersFromOptions.filter((customFormatterOption) => columnCustomFormatters.includes(customFormatterOption.id));
|
|
135
135
|
const customDisplayFormatterContext = ObjectFactory_1.default.CreateCustomDisplayFormatterContext(value, node, abColumn, this.getAdaptableApi());
|
package/src/Api/OptionsApi.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CustomSortOptions } from '../AdaptableOptions/CustomSortOptions';
|
|
2
2
|
import { DataSetOptions } from '../AdaptableOptions/DataSetOptions';
|
|
3
3
|
import { GroupingOptions } from '../AdaptableOptions/GroupingOptions';
|
|
4
|
-
import { ActionColumnOptions, ActionRowOptions, AdaptableOptions, AdaptableQLOptions, AlertOptions, CalendarOptions, CellSummaryOptions, ChartingOptions, ColumnOptions, ContainerOptions, DashboardOptions, DataChangeHistoryOptions, EditOptions, EntitlementOptions, ExportOptions, FilterOptions, FlashingCellOptions, LayoutOptions, MenuOptions, NotificationsOptions,
|
|
4
|
+
import { ActionColumnOptions, ActionRowOptions, AdaptableOptions, AdaptableQLOptions, AlertOptions, CalendarOptions, CellSummaryOptions, ChartingOptions, ColumnOptions, ContainerOptions, DashboardOptions, DataChangeHistoryOptions, EditOptions, EntitlementOptions, ExportOptions, FilterOptions, FlashingCellOptions, FormatColumnOptions, LayoutOptions, MenuOptions, NotificationsOptions, QuickSearchOptions, SettingsPanelOptions, StateOptions, TeamSharingOptions, ToolPanelOptions, UserInterfaceOptions } from '../types';
|
|
5
5
|
/**
|
|
6
6
|
* Range of functions to access Adaptable Options
|
|
7
7
|
*/
|
|
@@ -125,7 +125,11 @@ export interface OptionsApi {
|
|
|
125
125
|
/**
|
|
126
126
|
* Returns `AdaptableOptions.searchOptions`
|
|
127
127
|
*/
|
|
128
|
-
|
|
128
|
+
getQuickSearchOptions(): Readonly<QuickSearchOptions>;
|
|
129
|
+
/**
|
|
130
|
+
* Returns `AdaptableOptions.formatColumnOptions`
|
|
131
|
+
*/
|
|
132
|
+
getFormatColumnOptions(): Readonly<FormatColumnOptions>;
|
|
129
133
|
/**
|
|
130
134
|
* Returns `AdaptableOptions.settingsPanelOptions`
|
|
131
135
|
*/
|
|
@@ -77,6 +77,7 @@ var SummaryOperation;
|
|
|
77
77
|
SummaryOperation["Max"] = "Max";
|
|
78
78
|
SummaryOperation["Min"] = "Min";
|
|
79
79
|
SummaryOperation["Count"] = "Count";
|
|
80
|
+
SummaryOperation["Only"] = "Only";
|
|
80
81
|
})(SummaryOperation = exports.SummaryOperation || (exports.SummaryOperation = {}));
|
|
81
82
|
var FilterOnDataChangeOptions;
|
|
82
83
|
(function (FilterOnDataChangeOptions) {
|
|
@@ -708,7 +708,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
708
708
|
let returnAction = next(action);
|
|
709
709
|
adaptable.redrawBody();
|
|
710
710
|
// if set then return a query on the text
|
|
711
|
-
if (adaptable.adaptableOptions.
|
|
711
|
+
if (adaptable.adaptableOptions.quickSearchOptions.filterResultsAfterQuickSearch) {
|
|
712
712
|
const actionTyped = action;
|
|
713
713
|
const searchText = actionTyped.quickSearchText;
|
|
714
714
|
if (StringExtensions_1.StringExtensions.IsNotNullOrEmpty(searchText)) {
|
|
@@ -92,6 +92,7 @@ class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
92
92
|
Max: hasNumericColumns ? Helper_1.Helper.RoundNumberTo4dp(Math.max(...numericValues)) : undefined,
|
|
93
93
|
Min: hasNumericColumns ? Helper_1.Helper.RoundNumberTo4dp(Math.min(...numericValues)) : undefined,
|
|
94
94
|
Count: allValues.length,
|
|
95
|
+
Only: distinctCount == 1 ? JSON.stringify(allValues[0]) : ''
|
|
95
96
|
};
|
|
96
97
|
numericValues = [...newNumericValues];
|
|
97
98
|
const operationDefinitions = this.api.cellSummaryApi.getCellSummaryOperationDefinitions();
|
|
@@ -12,7 +12,7 @@ const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/
|
|
|
12
12
|
exports.DefaultAdaptableOptions = {
|
|
13
13
|
adaptableId: GeneralConstants.ADAPTABLE_ID,
|
|
14
14
|
adaptableStateKey: undefined,
|
|
15
|
-
|
|
15
|
+
_gridOptions: null,
|
|
16
16
|
primaryKey: '',
|
|
17
17
|
autogeneratePrimaryKey: false,
|
|
18
18
|
userName: GeneralConstants.USER_NAME,
|
|
@@ -158,6 +158,9 @@ exports.DefaultAdaptableOptions = {
|
|
|
158
158
|
unbalancedGroupsKey: undefined,
|
|
159
159
|
restoreUngroupedColumns: false,
|
|
160
160
|
},
|
|
161
|
+
formatColumnOptions: {
|
|
162
|
+
customDisplayFormatters: undefined
|
|
163
|
+
},
|
|
161
164
|
layoutOptions: {
|
|
162
165
|
displayRowGroups: 'closed',
|
|
163
166
|
autoSaveLayouts: true,
|
|
@@ -218,7 +221,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
218
221
|
showValuesCount: undefined,
|
|
219
222
|
quickFilterValuesWidth: 180,
|
|
220
223
|
},
|
|
221
|
-
|
|
224
|
+
quickSearchOptions: {
|
|
222
225
|
excludeColumnFromQuickSearch: undefined,
|
|
223
226
|
runQuickSearchOnRowGroups: false,
|
|
224
227
|
clearSearchesOnStartUp: false,
|
|
@@ -263,7 +266,6 @@ exports.DefaultAdaptableOptions = {
|
|
|
263
266
|
styleClassNames: GeneralConstants_1.EMPTY_ARRAY,
|
|
264
267
|
permittedValues: undefined,
|
|
265
268
|
editLookUpItems: undefined,
|
|
266
|
-
customDisplayFormatters: undefined,
|
|
267
269
|
showDocumentationLinks: true,
|
|
268
270
|
gridInfoSections: ['GridSummary', 'AdaptableOptions', 'ColumnInfo', 'AdaptableObjects'],
|
|
269
271
|
showAdapTableVersion: true,
|
|
@@ -34,7 +34,7 @@ function assignAdaptableOptions(adaptableOptions) {
|
|
|
34
34
|
Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.actionRowOptions.actionRowFormOptions, returnedAdaptableOptions.actionRowOptions.actionRowFormOptions);
|
|
35
35
|
returnedAdaptableOptions.containerOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.containerOptions, adaptableOptions.containerOptions);
|
|
36
36
|
returnedAdaptableOptions.groupingOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.groupingOptions, adaptableOptions.groupingOptions);
|
|
37
|
-
returnedAdaptableOptions.
|
|
37
|
+
returnedAdaptableOptions.quickSearchOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.quickSearchOptions, adaptableOptions.quickSearchOptions);
|
|
38
38
|
returnedAdaptableOptions.filterOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.filterOptions, adaptableOptions.filterOptions);
|
|
39
39
|
returnedAdaptableOptions.userInterfaceOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.userInterfaceOptions, adaptableOptions.userInterfaceOptions);
|
|
40
40
|
returnedAdaptableOptions.userInterfaceOptions.dateInputOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.userInterfaceOptions.dateInputOptions, returnedAdaptableOptions.userInterfaceOptions.dateInputOptions);
|
|
@@ -49,6 +49,10 @@ class MetamodelService {
|
|
|
49
49
|
validateOptionsObject(validationErrors, optionsObjectName, optionsObject, optionsObjectMetamodel, optionsObjectDefaultValues) {
|
|
50
50
|
Object.entries(optionsObject).forEach(([optionKey, optionValue]) => {
|
|
51
51
|
var _a;
|
|
52
|
+
if (optionKey === 'gridOptions') {
|
|
53
|
+
// gridOptions is aspecial case as it's NOT a public property, but we set and use it internally
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
52
56
|
const optionMetamodel = (_a = optionsObjectMetamodel === null || optionsObjectMetamodel === void 0 ? void 0 : optionsObjectMetamodel.props) === null || _a === void 0 ? void 0 : _a.find((metamodelProperty) => metamodelProperty.name === optionKey);
|
|
53
57
|
if (!optionMetamodel) {
|
|
54
58
|
validationErrors.push(`${optionsObjectName}.${optionKey} (value=${optionValue}) :: unknown/unsupported property, will be ignored`);
|
|
@@ -2,5 +2,5 @@ import * as React from 'react';
|
|
|
2
2
|
import { AdaptableOptions } from '../../../types';
|
|
3
3
|
export declare const AdaptableOptionsForm: React.FunctionComponent<{
|
|
4
4
|
adaptableOptions: AdaptableOptions;
|
|
5
|
-
|
|
5
|
+
onChangedAdaptableOptions: (adaptableOptions: AdaptableOptions) => void;
|
|
6
6
|
}>;
|
|
@@ -103,7 +103,7 @@ const AdaptableOptionsForm = (props) => {
|
|
|
103
103
|
// @ts-ignore
|
|
104
104
|
adaptableOptions[sectionName] = Object.assign(Object.assign({}, adaptableOptions[sectionName]), { [option.name]: option.value });
|
|
105
105
|
}
|
|
106
|
-
props.
|
|
106
|
+
props.onChangedAdaptableOptions(adaptableOptions);
|
|
107
107
|
};
|
|
108
108
|
return (React.createElement(rebass_1.Box, { p: 2 }, nocodeOptions.map(([sectionName, { containerLabel, items }]) => {
|
|
109
109
|
return (React.createElement(OptionsSection, { onChange: handleOptionChange(sectionName), key: sectionName, id: sectionName, name: containerLabel, options: items }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { AdaptableOptions } from '../../../types';
|
|
3
2
|
import { OnePageWizardSection } from '../../Wizard/OnePageWizards';
|
|
4
3
|
import { AdaptableFrameworkComponent } from '../../../../types';
|
|
4
|
+
import { AdaptableConfig } from './AdaptableConfig';
|
|
5
5
|
export interface CustomSection<T> {
|
|
6
6
|
title: OnePageWizardSection<T>['title'];
|
|
7
7
|
details?: AdaptableFrameworkComponent;
|
|
@@ -11,20 +11,20 @@ export interface CustomSection<T> {
|
|
|
11
11
|
/**
|
|
12
12
|
* Internal state of adaptableOptions.
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
adaptableConfig: AdaptableConfig,
|
|
15
15
|
/**
|
|
16
16
|
* With this callback adaptableOptions can be changed.
|
|
17
17
|
*/
|
|
18
|
-
onChange: (
|
|
18
|
+
onChange: (newAdaptableConfig: AdaptableConfig) => void,
|
|
19
19
|
/**
|
|
20
20
|
* Set the selected columns.
|
|
21
21
|
*/
|
|
22
22
|
setSelectedColumns: (selectedColumn: Record<string, boolean>) => void) => React.ReactNode;
|
|
23
23
|
}
|
|
24
24
|
export interface ConfigurationWizardProps {
|
|
25
|
-
|
|
26
|
-
onFinish: (
|
|
25
|
+
adaptableConfig: AdaptableConfig;
|
|
26
|
+
onFinish: (adaptableConfig: AdaptableConfig) => void;
|
|
27
27
|
onCancel: () => void;
|
|
28
|
-
startSections?: CustomSection<
|
|
28
|
+
startSections?: CustomSection<AdaptableConfig>[];
|
|
29
29
|
}
|
|
30
30
|
export declare const ConfigurationWizard: React.FunctionComponent<ConfigurationWizardProps>;
|