@adaptabletools/adaptable 16.0.5-canary.0 → 16.0.5
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 +21 -21
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +8 -3
- package/src/AdaptableOptions/ExpressionOptions.d.ts +52 -16
- package/src/AdaptableOptions/PredicateOptions.d.ts +10 -2
- package/src/AdaptableOptions/QuickSearchOptions.d.ts +8 -0
- package/src/Api/ExpressionApi.d.ts +4 -0
- package/src/Api/Implementation/ApiBase.d.ts +3 -4
- package/src/Api/Implementation/ApiBase.js +5 -5
- package/src/Api/Implementation/ExpressionApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ExpressionApiImpl.js +4 -0
- package/src/Api/Implementation/OptionsApiImpl.d.ts +3 -2
- package/src/Api/Implementation/OptionsApiImpl.js +2 -2
- package/src/Api/Implementation/PredicateApiImpl.d.ts +1 -0
- package/src/Api/Implementation/PredicateApiImpl.js +4 -2
- package/src/Api/Internal/AdaptableInternalApi.d.ts +0 -1
- package/src/Api/Internal/AdaptableInternalApi.js +2 -5
- package/src/Api/Internal/ExpressionnternalApi.js +2 -2
- package/src/Api/Internal/PredicateInternalApi.js +5 -5
- package/src/Api/OptionsApi.d.ts +4 -3
- package/src/Api/PredicateApi.d.ts +4 -0
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +8 -8
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +21 -21
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +2 -3
- package/src/Utilities/Services/QueryLanguageService.js +4 -4
- package/src/agGrid/Adaptable.js +2 -2
- package/src/components/ExpressionEditor/BaseEditorInput.js +4 -4
- package/src/metamodel/adaptable.metamodel.d.ts +39 -45
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +0 -58
- package/src/AdaptableOptions/AdaptableQLOptions.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "16.0.5
|
|
3
|
+
"version": "16.0.5",
|
|
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: 1693243382800;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -17,7 +17,7 @@ import { DataChangeHistoryOptions } from './DataChangeHistoryOptions';
|
|
|
17
17
|
import { SettingsPanelOptions } from './SettingsPanelOptions';
|
|
18
18
|
import { FlashingCellOptions } from './FlashingCellOptions';
|
|
19
19
|
import { AlertOptions } from './AlertOptions';
|
|
20
|
-
import {
|
|
20
|
+
import { ExpressionOptions } from './ExpressionOptions';
|
|
21
21
|
import { ColumnOptions } from './ColumnOptions';
|
|
22
22
|
import { ActionRowOptions } from './ActionRowOptions';
|
|
23
23
|
import { ChartingOptions } from './ChartingOptions';
|
|
@@ -31,6 +31,7 @@ import { QuickSearchOptions } from './QuickSearchOptions';
|
|
|
31
31
|
import { FormatColumnOptions } from './FormatColumnOptions';
|
|
32
32
|
import { Fdc3Options } from './Fdc3Options';
|
|
33
33
|
import { CommentOptions } from './CommentsOptions';
|
|
34
|
+
import { PredicateOptions } from './PredicateOptions';
|
|
34
35
|
/**
|
|
35
36
|
* Large group of options enabling developers to set up AdapTable at design time to fit precise requirements
|
|
36
37
|
*/
|
|
@@ -90,10 +91,10 @@ export interface AdaptableOptions<TData = any> {
|
|
|
90
91
|
*/
|
|
91
92
|
actionRowOptions?: ActionRowOptions<TData>;
|
|
92
93
|
/**
|
|
93
|
-
* Options for managing AdapTableQL
|
|
94
|
+
* Options for managing AdapTableQL Expressions
|
|
94
95
|
* @noCodeContainer
|
|
95
96
|
*/
|
|
96
|
-
|
|
97
|
+
expressionOptions?: ExpressionOptions<TData>;
|
|
97
98
|
/**
|
|
98
99
|
* Options for managing Alerts in AdapTable
|
|
99
100
|
*
|
|
@@ -216,6 +217,10 @@ export interface AdaptableOptions<TData = any> {
|
|
|
216
217
|
* @noCodeContainer
|
|
217
218
|
*/
|
|
218
219
|
notificationsOptions?: NotificationsOptions;
|
|
220
|
+
/**
|
|
221
|
+
* Options for managing Predicates in AdapTableQL
|
|
222
|
+
*/
|
|
223
|
+
predicateOptions?: PredicateOptions;
|
|
219
224
|
/**
|
|
220
225
|
* Options for managing Search related functions in AdapTable
|
|
221
226
|
*
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { AggregatedBooleanFunctionName } from '../
|
|
6
|
-
import { AggregatedScalarFunctionName } from '../Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions';
|
|
7
|
-
import { AdaptableColumnBase, AdaptableModule, BaseContext } from '../types';
|
|
1
|
+
import { AdaptablePredicate } from '../PredefinedConfig/Common/AdaptablePredicate';
|
|
2
|
+
import { AdaptableModule, AdaptableQLModule } from '../PredefinedConfig/Common/Types';
|
|
3
|
+
import { BaseContext } from '../PredefinedConfig/Common/BaseContext';
|
|
4
|
+
import { AdaptableColumn, AdaptableColumnBase } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
5
|
+
import { AdaptableObject, AggregatedBooleanFunctionName, AggregatedScalarFunctionName, BooleanFunctionName, ExpressionFunction, ObservableFunctionName, ScalarFunctionName } from '../types';
|
|
8
6
|
/**
|
|
9
|
-
* Options for managing Expressions
|
|
7
|
+
* Options for managing Expressions in AdapTable's Query Language
|
|
10
8
|
*/
|
|
11
|
-
export interface ExpressionOptions {
|
|
9
|
+
export interface ExpressionOptions<TData = any> {
|
|
10
|
+
/**
|
|
11
|
+
* Whether a Module (or specific expression) should be evaluated by AdapTableQL
|
|
12
|
+
* @defaultValue All Modules are evaluated by AdapTable
|
|
13
|
+
*/
|
|
14
|
+
evaluateAdaptableQLExternally?: (context: EvaluateExpressionExternallyContext<TData>) => boolean;
|
|
12
15
|
/**
|
|
13
16
|
* System Boolean Expression Functions available in AdapTableQL
|
|
14
17
|
*
|
|
@@ -88,12 +91,45 @@ export interface ExpressionOptions {
|
|
|
88
91
|
*/
|
|
89
92
|
customQueryVariables?: Record<string, string | number | boolean | Date | ((context: CustomQueryVariableContext) => string | number | boolean | Date)>;
|
|
90
93
|
/**
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
* Reference a Column's Header (i.e. FriendlyName) in all Expression overviews (instead of ColumnId)
|
|
95
|
+
*
|
|
96
|
+
* @defaultValue true
|
|
97
|
+
* @noCodeItem
|
|
98
|
+
*/
|
|
96
99
|
displayColumnFriendlyNamesForExpressions?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Perform case-sensitive text comparisons when evaluating Expressions
|
|
102
|
+
*
|
|
103
|
+
* @defaultValue false
|
|
104
|
+
* @gridInfoItem
|
|
105
|
+
* @noCodeItem
|
|
106
|
+
*/
|
|
107
|
+
caseSensitiveExpressions?: boolean;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Context passed when evaluating `expressionOptions.evaluateExpressionExternally()`
|
|
111
|
+
*/
|
|
112
|
+
export interface EvaluateExpressionExternallyContext<TData = any> extends BaseContext {
|
|
113
|
+
/**
|
|
114
|
+
* Module where Expression is being evaluated
|
|
115
|
+
*/
|
|
116
|
+
module: AdaptableQLModule;
|
|
117
|
+
/**
|
|
118
|
+
* AdapTable Object which contains the Expression or Predicates
|
|
119
|
+
*/
|
|
120
|
+
object?: AdaptableObject;
|
|
121
|
+
/**
|
|
122
|
+
* Expression to evaluate
|
|
123
|
+
*/
|
|
124
|
+
expression?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Any Predicates to evaluate
|
|
127
|
+
*/
|
|
128
|
+
predicates?: AdaptablePredicate[];
|
|
129
|
+
/**
|
|
130
|
+
* Columns contained in Expression
|
|
131
|
+
*/
|
|
132
|
+
referencedColumns?: AdaptableColumn<TData>[];
|
|
97
133
|
}
|
|
98
134
|
/**
|
|
99
135
|
* Module specific Expression Functions
|
|
@@ -163,7 +199,7 @@ export interface GlobalExpressionFunctionsContext<T> extends BaseContext {
|
|
|
163
199
|
availableExpressionFunctionNames: T[];
|
|
164
200
|
}
|
|
165
201
|
/**
|
|
166
|
-
* Context provided to
|
|
202
|
+
* Context provided to moduleExpressionFunctions property callback
|
|
167
203
|
*/
|
|
168
204
|
export interface ModuleExpressionFunctionsContext extends BaseContext {
|
|
169
205
|
/**
|
|
@@ -192,7 +228,7 @@ export interface ModuleExpressionFunctionsContext extends BaseContext {
|
|
|
192
228
|
availableAggregatedScalarFunctionNames: AggregatedScalarFunctionName[];
|
|
193
229
|
}
|
|
194
230
|
/**
|
|
195
|
-
* Context passed when evaluating
|
|
231
|
+
* Context passed when evaluating customQueryVariables
|
|
196
232
|
*/
|
|
197
233
|
export interface CustomQueryVariableContext extends BaseContext {
|
|
198
234
|
/**
|
|
@@ -12,8 +12,8 @@ export interface PredicateOptions {
|
|
|
12
12
|
*/
|
|
13
13
|
systemFilterPredicates?: SystemFilterPredicateIds | ((context: SystemPredicatesContext) => SystemFilterPredicateIds);
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
* Which System Badge Style Predicates are available
|
|
16
|
+
*/
|
|
17
17
|
systemBadgeStylePredicates?: SystemBadgeStylePredicateIds | ((context: SystemPredicatesContext) => SystemBadgeStylePredicateIds);
|
|
18
18
|
/**
|
|
19
19
|
* Which System Alert Predicates are available
|
|
@@ -27,6 +27,14 @@ export interface PredicateOptions {
|
|
|
27
27
|
* Which System Flashing Cell Predicates are available
|
|
28
28
|
*/
|
|
29
29
|
systemFlashingCellPredicates?: SystemFlashingCellPredicateIds | ((context: SystemPredicatesContext) => SystemFlashingCellPredicateIds);
|
|
30
|
+
/**
|
|
31
|
+
* Perform case-sensitive text comparisons when evaluating Predicates
|
|
32
|
+
*
|
|
33
|
+
* @defaultValue false
|
|
34
|
+
* @gridInfoItem
|
|
35
|
+
* @noCodeItem
|
|
36
|
+
*/
|
|
37
|
+
caseSensitivePredicates?: boolean;
|
|
30
38
|
}
|
|
31
39
|
/**
|
|
32
40
|
* Context used for setting which System Predicates are available
|
|
@@ -39,4 +39,12 @@ export interface QuickSearchOptions<TData = any> {
|
|
|
39
39
|
* @noCodeItem
|
|
40
40
|
*/
|
|
41
41
|
runQuickSearchOnRowGroups?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Perform case-sensitive text comparisons when Quick Search
|
|
44
|
+
*
|
|
45
|
+
* @defaultValue false
|
|
46
|
+
* @gridInfoItem
|
|
47
|
+
* @noCodeItem
|
|
48
|
+
*/
|
|
49
|
+
runQuickSearchWithCaseSensitivity?: boolean;
|
|
42
50
|
}
|
|
@@ -57,4 +57,8 @@ export interface ExpressionApi {
|
|
|
57
57
|
* @param query - the AdaptableQuery
|
|
58
58
|
*/
|
|
59
59
|
getAdaptableQueryExpressionWithColumnFriendlyNames(query: Partial<AdaptableQuery>): string | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Whether Expressions are evaluated using Case Sensitivity
|
|
62
|
+
*/
|
|
63
|
+
useCaseSensitivity(): boolean;
|
|
60
64
|
}
|
|
@@ -7,11 +7,10 @@ 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, 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';
|
|
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, PredicateOptions, 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';
|
|
14
|
-
import { AdaptableQLOptions } from '../../AdaptableOptions/AdaptableQLOptions';
|
|
15
14
|
import { ExpressionOptions } from '../../AdaptableOptions/ExpressionOptions';
|
|
16
15
|
import { AlertOptions } from '../../AdaptableOptions/AlertOptions';
|
|
17
16
|
import { ColumnOptions } from '../../AdaptableOptions/ColumnOptions';
|
|
@@ -80,14 +79,14 @@ export declare abstract class ApiBase {
|
|
|
80
79
|
protected getLayoutOptions(): LayoutOptions;
|
|
81
80
|
protected getMenuOptions(): MenuOptions;
|
|
82
81
|
protected getFilterOptions(): FilterOptions;
|
|
83
|
-
protected
|
|
82
|
+
protected getExpressionOptions(): ExpressionOptions;
|
|
83
|
+
protected getPredicateOptions(): PredicateOptions;
|
|
84
84
|
protected getQuickSearchOptions(): QuickSearchOptions;
|
|
85
85
|
protected getFormatColumnOptions(): FormatColumnOptions;
|
|
86
86
|
protected getStateOptions(): StateOptions;
|
|
87
87
|
protected getTeamSharingOptions(): TeamSharingOptions;
|
|
88
88
|
protected getUserInterfaceOptions(): UserInterfaceOptions;
|
|
89
89
|
protected getToolPanelOptions(): ToolPanelOptions;
|
|
90
|
-
protected getExpressionOptions(): ExpressionOptions;
|
|
91
90
|
protected getChartingOptions(): ChartingOptions;
|
|
92
91
|
protected getDataChangeHistoryOptions(): DataChangeHistoryOptions;
|
|
93
92
|
protected getEntitlementOptions(): EntitlementOptions;
|
|
@@ -147,8 +147,11 @@ class ApiBase {
|
|
|
147
147
|
getFilterOptions() {
|
|
148
148
|
return this.getOptions().filterOptions;
|
|
149
149
|
}
|
|
150
|
-
|
|
151
|
-
return this.getOptions().
|
|
150
|
+
getExpressionOptions() {
|
|
151
|
+
return this.getOptions().expressionOptions;
|
|
152
|
+
}
|
|
153
|
+
getPredicateOptions() {
|
|
154
|
+
return this.getOptions().predicateOptions;
|
|
152
155
|
}
|
|
153
156
|
getQuickSearchOptions() {
|
|
154
157
|
return this.getOptions().quickSearchOptions;
|
|
@@ -168,9 +171,6 @@ class ApiBase {
|
|
|
168
171
|
getToolPanelOptions() {
|
|
169
172
|
return this.getOptions().toolPanelOptions;
|
|
170
173
|
}
|
|
171
|
-
getExpressionOptions() {
|
|
172
|
-
return this.getAdaptableQLOptions().expressionOptions;
|
|
173
|
-
}
|
|
174
174
|
getChartingOptions() {
|
|
175
175
|
return this.adaptable.adaptableOptions.chartingOptions;
|
|
176
176
|
}
|
|
@@ -17,4 +17,5 @@ export declare class ExpressionApiImpl extends ApiBase implements ExpressionApi
|
|
|
17
17
|
isColumnQueryable(adaptableColumnBase: AdaptableColumnBase): boolean;
|
|
18
18
|
getAdaptableQueryExpression(query: Partial<AdaptableQuery>): string | undefined;
|
|
19
19
|
getAdaptableQueryExpressionWithColumnFriendlyNames(query: Partial<AdaptableQuery>): string | undefined;
|
|
20
|
+
useCaseSensitivity(): boolean;
|
|
20
21
|
}
|
|
@@ -92,5 +92,9 @@ class ExpressionApiImpl extends ApiBase_1.ApiBase {
|
|
|
92
92
|
.getQueryLanguageService()
|
|
93
93
|
.getExpressionWithColumnFriendlyNames(this.getAdaptableQueryExpression(query));
|
|
94
94
|
}
|
|
95
|
+
useCaseSensitivity() {
|
|
96
|
+
return this.adaptable.adaptableOptions.expressionOptions
|
|
97
|
+
.caseSensitiveExpressions;
|
|
98
|
+
}
|
|
95
99
|
}
|
|
96
100
|
exports.ExpressionApiImpl = ExpressionApiImpl;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
|
-
import { ActionColumnOptions, ActionRowOptions, AdaptableOptions,
|
|
2
|
+
import { ActionColumnOptions, ActionRowOptions, AdaptableOptions, AlertOptions, CalendarOptions, CellSummaryOptions, ChartingOptions, ColumnOptions, CommentOptions, 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
|
import { Fdc3Options } from '../../AdaptableOptions/Fdc3Options';
|
|
6
|
+
import { ExpressionOptions } from '../../AdaptableOptions/ExpressionOptions';
|
|
6
7
|
export declare class OptionsApiImpl extends ApiBase implements OptionsApi {
|
|
7
8
|
getAdaptableId(): string;
|
|
8
9
|
getAdaptableStateKey(): string;
|
|
@@ -29,7 +30,7 @@ export declare class OptionsApiImpl extends ApiBase implements OptionsApi {
|
|
|
29
30
|
getLayoutOptions(): LayoutOptions;
|
|
30
31
|
getMenuOptions(): MenuOptions;
|
|
31
32
|
getFilterOptions(): FilterOptions;
|
|
32
|
-
|
|
33
|
+
getExpressionOptions(): ExpressionOptions;
|
|
33
34
|
getQuickSearchOptions(): QuickSearchOptions;
|
|
34
35
|
getFormatColumnOptions(): FormatColumnOptions;
|
|
35
36
|
getStateOptions(): StateOptions;
|
|
@@ -78,8 +78,8 @@ class OptionsApiImpl extends ApiBase_1.ApiBase {
|
|
|
78
78
|
getFilterOptions() {
|
|
79
79
|
return this.getOptions().filterOptions;
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
return this.getOptions().
|
|
81
|
+
getExpressionOptions() {
|
|
82
|
+
return this.getOptions().expressionOptions;
|
|
83
83
|
}
|
|
84
84
|
getQuickSearchOptions() {
|
|
85
85
|
return this.getOptions().quickSearchOptions;
|
|
@@ -21,4 +21,5 @@ export declare class PredicateApiImpl extends ApiBase implements PredicateApi {
|
|
|
21
21
|
handleColumnPredicates(predicates: AdaptableColumnPredicate[], context: Omit<PredicateDefHandlerContext, 'adaptableApi' | 'inputs'>, defaultReturn: boolean): boolean;
|
|
22
22
|
handlePredicate(predicate: AdaptablePredicate | undefined, context: Omit<PredicateDefHandlerContext, 'adaptableApi' | 'inputs'>, defaultReturn: boolean): boolean;
|
|
23
23
|
handlePredicates(predicates: AdaptablePredicate[], params: Omit<PredicateDefHandlerContext, 'adaptableApi' | 'inputs'>, defaultReturn: boolean): boolean;
|
|
24
|
+
useCaseSensitivity(): boolean;
|
|
24
25
|
}
|
|
@@ -19,8 +19,7 @@ class PredicateApiImpl extends ApiBase_1.ApiBase {
|
|
|
19
19
|
return AdaptablePredicate_1.SystemPredicateDefs;
|
|
20
20
|
}
|
|
21
21
|
getCustomPredicateDefs() {
|
|
22
|
-
|
|
23
|
-
return (_a = this.getAdaptableQLOptions().predicateOptions) === null || _a === void 0 ? void 0 : _a.customPredicateDefs;
|
|
22
|
+
return this.getPredicateOptions().customPredicateDefs;
|
|
24
23
|
}
|
|
25
24
|
getPredicateDefsByModuleScope(moduleScope) {
|
|
26
25
|
return this.getPredicateDefs().filter((p) => p.moduleScope.includes(moduleScope));
|
|
@@ -111,5 +110,8 @@ class PredicateApiImpl extends ApiBase_1.ApiBase {
|
|
|
111
110
|
}
|
|
112
111
|
return predicates === null || predicates === void 0 ? void 0 : predicates.every((p) => this.handlePredicate(p, params, defaultReturn));
|
|
113
112
|
}
|
|
113
|
+
useCaseSensitivity() {
|
|
114
|
+
return this.adaptable.adaptableOptions.predicateOptions.caseSensitivePredicates;
|
|
115
|
+
}
|
|
114
116
|
}
|
|
115
117
|
exports.PredicateApiImpl = PredicateApiImpl;
|
|
@@ -90,7 +90,6 @@ export declare class AdaptableInternalApi extends ApiBase {
|
|
|
90
90
|
createFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar'): void;
|
|
91
91
|
destroyFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar'): void;
|
|
92
92
|
initializeDataChangeHistory(): void;
|
|
93
|
-
isTextComparisonCaseSensitive(): boolean;
|
|
94
93
|
executeWithProgressIndicator(label: string, executeFn: () => void, errorHandlingFn?: () => void): void;
|
|
95
94
|
hideProgressIndicator(): void;
|
|
96
95
|
getCorrectEnglishVariant(wordToSpell: string): string;
|
|
@@ -253,9 +253,6 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
253
253
|
this.dispatchAction(SystemRedux.SystemDataChangeHistoryDisable());
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
isTextComparisonCaseSensitive() {
|
|
257
|
-
return this.adaptable.adaptableOptions.adaptableQLOptions.caseSensitiveTextComparisons;
|
|
258
|
-
}
|
|
259
256
|
executeWithProgressIndicator(label, executeFn, errorHandlingFn) {
|
|
260
257
|
this.dispatchReduxAction((0, SystemRedux_1.SystemProgressIndicatorShow)(label));
|
|
261
258
|
// setTimeout required to give the ProgressIndicator rendering a head-start (see RAF in ProgressIndicator implementation)
|
|
@@ -352,11 +349,11 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
352
349
|
return adaptableObjectTag;
|
|
353
350
|
}
|
|
354
351
|
getAdaptableQueryExpressionText(query) {
|
|
355
|
-
var _a
|
|
352
|
+
var _a;
|
|
356
353
|
if (!query) {
|
|
357
354
|
return '';
|
|
358
355
|
}
|
|
359
|
-
const displayColumnFriendlyNames = (
|
|
356
|
+
const displayColumnFriendlyNames = (_a = this.adaptable.adaptableOptions.expressionOptions) === null || _a === void 0 ? void 0 : _a.displayColumnFriendlyNamesForExpressions;
|
|
360
357
|
return displayColumnFriendlyNames
|
|
361
358
|
? this.adaptable.api.expressionApi.getAdaptableQueryExpressionWithColumnFriendlyNames(query)
|
|
362
359
|
: this.adaptable.api.expressionApi.getAdaptableQueryExpression(query);
|
|
@@ -14,7 +14,7 @@ class ExpressionInternalApi extends ApiBase_1.ApiBase {
|
|
|
14
14
|
}
|
|
15
15
|
evaluateExpressionInAdaptableQL(module, object, expression) {
|
|
16
16
|
var _a;
|
|
17
|
-
const evaluateExpressionExternallyFn = (_a = this.
|
|
17
|
+
const evaluateExpressionExternallyFn = (_a = this.getExpressionOptions()) === null || _a === void 0 ? void 0 : _a.evaluateAdaptableQLExternally;
|
|
18
18
|
if (typeof evaluateExpressionExternallyFn !== 'function') {
|
|
19
19
|
return true;
|
|
20
20
|
}
|
|
@@ -37,7 +37,7 @@ class ExpressionInternalApi extends ApiBase_1.ApiBase {
|
|
|
37
37
|
}
|
|
38
38
|
evaluatePredicatesInAdaptableQL(module, object, predicates) {
|
|
39
39
|
var _a;
|
|
40
|
-
const evaluateExpressionExternallyFn = (_a = this.
|
|
40
|
+
const evaluateExpressionExternallyFn = (_a = this.getExpressionOptions()) === null || _a === void 0 ? void 0 : _a.evaluateAdaptableQLExternally;
|
|
41
41
|
if (typeof evaluateExpressionExternallyFn !== 'function') {
|
|
42
42
|
return true;
|
|
43
43
|
}
|
|
@@ -22,7 +22,7 @@ class PredicateInternalApi extends ApiBase_1.ApiBase {
|
|
|
22
22
|
].filter((predicateDef) => predicateDef.moduleScope.includes('filter'));
|
|
23
23
|
}
|
|
24
24
|
getSystemFilterPredicateIds(scope) {
|
|
25
|
-
const systemFilterPredicates = this.
|
|
25
|
+
const systemFilterPredicates = this.getPredicateOptions().systemFilterPredicates;
|
|
26
26
|
if (typeof systemFilterPredicates === 'function') {
|
|
27
27
|
const systemPredicateContext = {
|
|
28
28
|
adaptableApi: this.adaptable.api,
|
|
@@ -49,7 +49,7 @@ class PredicateInternalApi extends ApiBase_1.ApiBase {
|
|
|
49
49
|
].filter((predicateDef) => predicateDef.moduleScope.includes('alert'));
|
|
50
50
|
}
|
|
51
51
|
getSystemAlertPredicateIds(scope) {
|
|
52
|
-
const systemAlertPredicates = this.
|
|
52
|
+
const systemAlertPredicates = this.getPredicateOptions().systemAlertPredicates;
|
|
53
53
|
if (typeof systemAlertPredicates === 'function') {
|
|
54
54
|
const systemPredicateContext = {
|
|
55
55
|
adaptableApi: this.adaptable.api,
|
|
@@ -66,7 +66,7 @@ class PredicateInternalApi extends ApiBase_1.ApiBase {
|
|
|
66
66
|
return systemAlertPredicates;
|
|
67
67
|
}
|
|
68
68
|
getSystemBadgeStylePredicateIds(scope) {
|
|
69
|
-
const systemBadgeStylePredicates = this.
|
|
69
|
+
const systemBadgeStylePredicates = this.getPredicateOptions().systemBadgeStylePredicates;
|
|
70
70
|
if (typeof systemBadgeStylePredicates === 'function') {
|
|
71
71
|
const systemPredicateContext = {
|
|
72
72
|
adaptableApi: this.adaptable.api,
|
|
@@ -93,7 +93,7 @@ class PredicateInternalApi extends ApiBase_1.ApiBase {
|
|
|
93
93
|
].filter((predicateDef) => predicateDef.moduleScope.includes('formatColumn'));
|
|
94
94
|
}
|
|
95
95
|
getSystemFormatColumnPredicateIds(scope) {
|
|
96
|
-
const systemFormatColumnPredicates = this.
|
|
96
|
+
const systemFormatColumnPredicates = this.getPredicateOptions().systemFormatColumnPredicates;
|
|
97
97
|
if (typeof systemFormatColumnPredicates === 'function') {
|
|
98
98
|
const systemPredicateContext = {
|
|
99
99
|
adaptableApi: this.adaptable.api,
|
|
@@ -120,7 +120,7 @@ class PredicateInternalApi extends ApiBase_1.ApiBase {
|
|
|
120
120
|
].filter((predicateDef) => predicateDef.moduleScope.includes('flashingcell'));
|
|
121
121
|
}
|
|
122
122
|
getSystemFlashingCellPredicateIds(scope) {
|
|
123
|
-
const systemFlashingCellPredicates = this.
|
|
123
|
+
const systemFlashingCellPredicates = this.getPredicateOptions().systemFlashingCellPredicates;
|
|
124
124
|
if (typeof systemFlashingCellPredicates === 'function') {
|
|
125
125
|
const systemPredicateContext = {
|
|
126
126
|
adaptableApi: this.adaptable.api,
|
package/src/Api/OptionsApi.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
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,
|
|
4
|
+
import { ActionColumnOptions, ActionRowOptions, AdaptableOptions, AlertOptions, CalendarOptions, CellSummaryOptions, ChartingOptions, ColumnOptions, CommentOptions, ContainerOptions, DashboardOptions, DataChangeHistoryOptions, EditOptions, EntitlementOptions, ExportOptions, FilterOptions, FlashingCellOptions, FormatColumnOptions, LayoutOptions, MenuOptions, NotificationsOptions, QuickSearchOptions, SettingsPanelOptions, StateOptions, TeamSharingOptions, ToolPanelOptions, UserInterfaceOptions } from '../types';
|
|
5
5
|
import { Fdc3Options } from '../AdaptableOptions/Fdc3Options';
|
|
6
|
+
import { ExpressionOptions } from '../AdaptableOptions/ExpressionOptions';
|
|
6
7
|
/**
|
|
7
8
|
* Range of functions to access Adaptable Options
|
|
8
9
|
*/
|
|
@@ -48,9 +49,9 @@ export interface OptionsApi {
|
|
|
48
49
|
*/
|
|
49
50
|
getAlertOptions(): Readonly<AlertOptions>;
|
|
50
51
|
/**
|
|
51
|
-
* Returns `AdaptableOptions.
|
|
52
|
+
* Returns `AdaptableOptions.expressionOptions`
|
|
52
53
|
*/
|
|
53
|
-
|
|
54
|
+
getExpressionOptions(): Readonly<ExpressionOptions>;
|
|
54
55
|
/**
|
|
55
56
|
* Returns `AdaptableOptions.calendarOptions`
|
|
56
57
|
*/
|
|
@@ -81,4 +81,8 @@ export interface PredicateApi {
|
|
|
81
81
|
* @param defaultReturn Whether to return the default
|
|
82
82
|
*/
|
|
83
83
|
handlePredicates(predicates: AdaptablePredicate[], params: Omit<PredicateDefHandlerContext, 'adaptableApi' | 'inputs'>, defaultReturn: boolean): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Whether Predicates are evaluated using Case Sensitivity
|
|
86
|
+
*/
|
|
87
|
+
useCaseSensitivity(): boolean;
|
|
84
88
|
}
|
|
@@ -50,7 +50,7 @@ exports.SystemPredicateDefs = [
|
|
|
50
50
|
return inputs.includes(value);
|
|
51
51
|
}
|
|
52
52
|
if (column.dataType === 'String') {
|
|
53
|
-
return adaptableApi.
|
|
53
|
+
return adaptableApi.predicateApi.useCaseSensitivity()
|
|
54
54
|
? inputs
|
|
55
55
|
.map((i) => {
|
|
56
56
|
return i === null || i === void 0 ? void 0 : i.toLocaleLowerCase();
|
|
@@ -93,7 +93,7 @@ exports.SystemPredicateDefs = [
|
|
|
93
93
|
return !inputs.includes(value);
|
|
94
94
|
}
|
|
95
95
|
if (column.dataType === 'String') {
|
|
96
|
-
return adaptableApi.
|
|
96
|
+
return adaptableApi.predicateApi.useCaseSensitivity()
|
|
97
97
|
? !inputs
|
|
98
98
|
.map((i) => {
|
|
99
99
|
return i === null || i === void 0 ? void 0 : i.toLocaleLowerCase();
|
|
@@ -262,7 +262,7 @@ exports.SystemPredicateDefs = [
|
|
|
262
262
|
if (!value) {
|
|
263
263
|
return false;
|
|
264
264
|
}
|
|
265
|
-
const ignoreCase = !adaptableApi.
|
|
265
|
+
const ignoreCase = !adaptableApi.predicateApi.useCaseSensitivity();
|
|
266
266
|
const v = ignoreCase ? String(value).toLocaleLowerCase() : String(value);
|
|
267
267
|
const i = ignoreCase ? String(inputs[0]).toLocaleLowerCase() : String(inputs[0]);
|
|
268
268
|
return v == i;
|
|
@@ -281,7 +281,7 @@ exports.SystemPredicateDefs = [
|
|
|
281
281
|
if (!value) {
|
|
282
282
|
return true;
|
|
283
283
|
}
|
|
284
|
-
const ignoreCase = !adaptableApi.
|
|
284
|
+
const ignoreCase = !adaptableApi.predicateApi.useCaseSensitivity();
|
|
285
285
|
const v = ignoreCase ? String(value).toLocaleLowerCase() : String(value);
|
|
286
286
|
const i = ignoreCase ? String(inputs[0]).toLocaleLowerCase() : String(inputs[0]);
|
|
287
287
|
return v != i;
|
|
@@ -300,7 +300,7 @@ exports.SystemPredicateDefs = [
|
|
|
300
300
|
if (!value) {
|
|
301
301
|
return false;
|
|
302
302
|
}
|
|
303
|
-
const ignoreCase = !adaptableApi.
|
|
303
|
+
const ignoreCase = !adaptableApi.predicateApi.useCaseSensitivity();
|
|
304
304
|
const v = ignoreCase ? String(value).toLocaleLowerCase() : String(value);
|
|
305
305
|
const i = ignoreCase ? String(inputs[0]).toLocaleLowerCase() : String(inputs[0]);
|
|
306
306
|
return v.indexOf(i) !== -1;
|
|
@@ -318,7 +318,7 @@ exports.SystemPredicateDefs = [
|
|
|
318
318
|
if (!value) {
|
|
319
319
|
return true;
|
|
320
320
|
}
|
|
321
|
-
const ignoreCase = !adaptableApi.
|
|
321
|
+
const ignoreCase = !adaptableApi.predicateApi.useCaseSensitivity();
|
|
322
322
|
const v = ignoreCase ? String(value).toLocaleLowerCase() : String(value);
|
|
323
323
|
const i = ignoreCase ? String(inputs[0]).toLocaleLowerCase() : String(inputs[0]);
|
|
324
324
|
return v.indexOf(i) === -1;
|
|
@@ -336,7 +336,7 @@ exports.SystemPredicateDefs = [
|
|
|
336
336
|
if (!value) {
|
|
337
337
|
return false;
|
|
338
338
|
}
|
|
339
|
-
const ignoreCase = !adaptableApi.
|
|
339
|
+
const ignoreCase = !adaptableApi.predicateApi.useCaseSensitivity();
|
|
340
340
|
const v = ignoreCase ? String(value).toLocaleLowerCase() : String(value);
|
|
341
341
|
const i = ignoreCase ? String(inputs[0]).toLocaleLowerCase() : String(inputs[0]);
|
|
342
342
|
return v.startsWith(i);
|
|
@@ -354,7 +354,7 @@ exports.SystemPredicateDefs = [
|
|
|
354
354
|
if (!value) {
|
|
355
355
|
return false;
|
|
356
356
|
}
|
|
357
|
-
const ignoreCase = !adaptableApi.
|
|
357
|
+
const ignoreCase = !adaptableApi.predicateApi.useCaseSensitivity();
|
|
358
358
|
const v = ignoreCase ? String(value).toLocaleLowerCase() : String(value);
|
|
359
359
|
const i = ignoreCase ? String(inputs[0]).toLocaleLowerCase() : String(inputs[0]);
|
|
360
360
|
return v.endsWith(i);
|
|
@@ -10,7 +10,7 @@ exports.ObservableQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-e
|
|
|
10
10
|
exports.AggregatedBooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-aggregation-boolean`;
|
|
11
11
|
exports.AggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-aggregation-scalar`;
|
|
12
12
|
exports.CumulativeAggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-cumulative`;
|
|
13
|
-
exports.PredicateDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-
|
|
13
|
+
exports.PredicateDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-predicate`;
|
|
14
14
|
exports.PrimaryKeyDocsLink = `${exports.HOST_URL_DOCS}/guide/getting-started-primary-key`;
|
|
15
15
|
exports.LicenseDocsLink = `${exports.HOST_URL_DOCS}/guide/licensing`;
|
|
16
16
|
exports.AdaptableOptionsDocsLink = `${exports.HOST_URL_DOCS}/guide/reference-options-overview`;
|
|
@@ -54,28 +54,18 @@ exports.DefaultAdaptableOptions = {
|
|
|
54
54
|
BackColor: (0, UIHelper_1.getHexForName)(UIHelper_1.GRAY),
|
|
55
55
|
},
|
|
56
56
|
},
|
|
57
|
-
|
|
58
|
-
caseSensitiveTextComparisons: false,
|
|
57
|
+
expressionOptions: {
|
|
59
58
|
evaluateAdaptableQLExternally: undefined,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
},
|
|
71
|
-
predicateOptions: {
|
|
72
|
-
customPredicateDefs: [],
|
|
73
|
-
systemFilterPredicates: AdaptablePredicate_1.SystemFilterPredicateIds,
|
|
74
|
-
systemAlertPredicates: AdaptablePredicate_1.SystemAlertPredicateIds,
|
|
75
|
-
systemFormatColumnPredicates: AdaptablePredicate_1.SystemFormatColumnPredicateIds,
|
|
76
|
-
systemFlashingCellPredicates: AdaptablePredicate_1.SystemFlashingCellPredicateIds,
|
|
77
|
-
systemBadgeStylePredicates: AdaptablePredicate_1.SystemBadgeStylePredicateIds,
|
|
78
|
-
},
|
|
59
|
+
displayColumnFriendlyNamesForExpressions: true,
|
|
60
|
+
systemBooleanFunctions: undefined,
|
|
61
|
+
systemScalarFunctions: undefined,
|
|
62
|
+
systemObservableFunctions: undefined,
|
|
63
|
+
systemAggregatedBooleanFunctions: undefined,
|
|
64
|
+
systemAggregatedScalarFunctions: undefined,
|
|
65
|
+
moduleExpressionFunctions: undefined,
|
|
66
|
+
performExpressionValidation: true,
|
|
67
|
+
maxTimeframeSize: 28800000,
|
|
68
|
+
caseSensitiveExpressions: false,
|
|
79
69
|
},
|
|
80
70
|
calendarOptions: { holidays: undefined },
|
|
81
71
|
cellSummaryOptions: { cellSummaryOperations: undefined },
|
|
@@ -223,12 +213,22 @@ exports.DefaultAdaptableOptions = {
|
|
|
223
213
|
quickFilterValuesWidth: 180,
|
|
224
214
|
includeBlankFilterValues: false,
|
|
225
215
|
},
|
|
216
|
+
predicateOptions: {
|
|
217
|
+
customPredicateDefs: [],
|
|
218
|
+
systemFilterPredicates: AdaptablePredicate_1.SystemFilterPredicateIds,
|
|
219
|
+
systemAlertPredicates: AdaptablePredicate_1.SystemAlertPredicateIds,
|
|
220
|
+
systemFormatColumnPredicates: AdaptablePredicate_1.SystemFormatColumnPredicateIds,
|
|
221
|
+
systemFlashingCellPredicates: AdaptablePredicate_1.SystemFlashingCellPredicateIds,
|
|
222
|
+
systemBadgeStylePredicates: AdaptablePredicate_1.SystemBadgeStylePredicateIds,
|
|
223
|
+
caseSensitivePredicates: false,
|
|
224
|
+
},
|
|
226
225
|
quickSearchOptions: {
|
|
227
226
|
excludeColumnFromQuickSearch: undefined,
|
|
228
227
|
runQuickSearchOnRowGroups: false,
|
|
229
228
|
clearSearchesOnStartUp: false,
|
|
230
229
|
quickSearchPlaceholder: 'Search',
|
|
231
230
|
filterResultsAfterQuickSearch: false,
|
|
231
|
+
runQuickSearchWithCaseSensitivity: false,
|
|
232
232
|
},
|
|
233
233
|
stateOptions: {
|
|
234
234
|
debounceStateDelay: 400,
|
|
@@ -19,7 +19,7 @@ const getStringValue = (context, stringArgument) => {
|
|
|
19
19
|
return (0, exports.isTextSearchCaseInsensitive)(context) ? stringArgument.toLowerCase() : stringArgument;
|
|
20
20
|
};
|
|
21
21
|
exports.getStringValue = getStringValue;
|
|
22
|
-
const isTextSearchCaseInsensitive = (context) => !context.adaptableApi.
|
|
22
|
+
const isTextSearchCaseInsensitive = (context) => !context.adaptableApi.expressionApi.useCaseSensitivity();
|
|
23
23
|
exports.isTextSearchCaseInsensitive = isTextSearchCaseInsensitive;
|
|
24
24
|
// returns an observable which filters the source$ emissions and emits only if the CellDataChangedInfo relates to the given column
|
|
25
25
|
// optionally, if a filter function (where clause) is provided, it is also evaluated
|