@adaptabletools/adaptable 13.0.4 → 13.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/bundle.cjs.js +145 -145
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +6 -6
- package/src/AdaptableOptions/GeneralOptions.d.ts +33 -5
- package/src/AdaptableOptions/LayoutOptions.d.ts +17 -0
- package/src/Api/AdaptableApi.d.ts +5 -0
- package/src/Api/CalendarApi.d.ts +29 -0
- package/src/Api/CalendarApi.js +2 -0
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
- package/src/Api/Implementation/CalendarApiImpl.d.ts +9 -0
- package/src/Api/Implementation/CalendarApiImpl.js +59 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +7 -0
- package/src/Api/Implementation/InternalApiImpl.d.ts +1 -0
- package/src/Api/Implementation/InternalApiImpl.js +8 -0
- package/src/Api/Implementation/LayoutApiImpl.d.ts +7 -0
- package/src/Api/Implementation/LayoutApiImpl.js +15 -0
- package/src/Api/Implementation/QueryApiImpl.js +3 -8
- package/src/Api/InternalApi.d.ts +1 -0
- package/src/Api/LayoutApi.d.ts +11 -0
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +55 -41
- package/src/PredefinedConfig/StyledColumnState.d.ts +16 -24
- package/src/Redux/ActionsReducers/PopupRedux.js +10 -2
- package/src/Strategy/FilterModule.js +2 -2
- package/src/Strategy/LayoutModule.d.ts +3 -0
- package/src/Strategy/LayoutModule.js +115 -4
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +0 -1
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -1
- package/src/View/Layout/PivotDetailsPopoup.d.ts +3 -0
- package/src/View/Layout/PivotDetailsPopoup.js +65 -0
- package/src/View/Layout/Wizard/LayoutWizard.js +6 -1
- package/src/View/Layout/Wizard/sections/SortSection.js +1 -4
- package/src/agGrid/Adaptable.d.ts +1 -0
- package/src/agGrid/Adaptable.js +3 -6
- package/src/components/Modal/index.js +0 -2
- package/src/metamodel/adaptable.metamodel.d.ts +81 -23
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +4 -3
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/Utilities/Helpers/CalendarHelper.d.ts +0 -25
- package/src/Utilities/Helpers/CalendarHelper.js +0 -342
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.6",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 datagrid add-on that sits on top of an underlying grid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1667290792339;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -221,6 +221,7 @@ export interface IAdaptable {
|
|
|
221
221
|
canHaveSparklines(): boolean;
|
|
222
222
|
showCharts(charts: ChartModel[]): ChartRef[];
|
|
223
223
|
getChartModels(): ChartModel[];
|
|
224
|
+
getRowModel(): GridOptions['rowModelType'];
|
|
224
225
|
getCurrentIPPStyle(): IPPStyle;
|
|
225
226
|
getDefaultIPPStyle(): IPPStyle;
|
|
226
227
|
getRowCount(): number;
|
|
@@ -127,11 +127,11 @@ export interface InstrumentColumn extends FDC3Column {
|
|
|
127
127
|
*/
|
|
128
128
|
permidColumnId?: string;
|
|
129
129
|
/**
|
|
130
|
-
* Column which holds a FIGI value as instrument data
|
|
130
|
+
* Column which holds a [FIGI](https://www.openfigi.com/about/figi) value as instrument data
|
|
131
131
|
*/
|
|
132
132
|
figiColumnId?: string;
|
|
133
133
|
/**
|
|
134
|
-
* FDC3 Intents
|
|
134
|
+
* Instrument-related FDC3 Intents; can be: `ViewChart` `ViewQuote` `ViewNews` `ViewAnalysis` `ViewInstrument`
|
|
135
135
|
*/
|
|
136
136
|
intents?: InstrumentIntents;
|
|
137
137
|
}
|
|
@@ -152,7 +152,7 @@ export interface PositionColumn extends FDC3Column {
|
|
|
152
152
|
*/
|
|
153
153
|
instrumentColumnId: string;
|
|
154
154
|
/**
|
|
155
|
-
* FDC3 Intents
|
|
155
|
+
* Position-related FDC3 Intents; can be: `ViewChart` `ViewNews` `ViewAnalysis`
|
|
156
156
|
*/
|
|
157
157
|
intents?: PositionIntents;
|
|
158
158
|
}
|
|
@@ -178,7 +178,7 @@ export interface ContactColumn extends FDC3Column {
|
|
|
178
178
|
*/
|
|
179
179
|
fds_idColumnId?: string;
|
|
180
180
|
/**
|
|
181
|
-
* FDC3 Intents
|
|
181
|
+
* Contact-related FDC3 Intents; can be: `StartCall` `StartChat` `ViewContact`
|
|
182
182
|
*/
|
|
183
183
|
intents?: ContactIntents;
|
|
184
184
|
}
|
|
@@ -207,7 +207,7 @@ export interface OrganizationColumn extends FDC3Column {
|
|
|
207
207
|
*/
|
|
208
208
|
fds_idColumnId?: string;
|
|
209
209
|
/**
|
|
210
|
-
* FDC3 Intents
|
|
210
|
+
* Organization-related FDC3 Intents; can be: `ViewNews` `ViewAnalysis`
|
|
211
211
|
*/
|
|
212
212
|
intents?: OrganizationIntents;
|
|
213
213
|
}
|
|
@@ -229,7 +229,7 @@ export interface CountryColumn extends FDC3Column {
|
|
|
229
229
|
*/
|
|
230
230
|
isoalpha3ColumnId?: string;
|
|
231
231
|
/**
|
|
232
|
-
* FDC3 Intents
|
|
232
|
+
* Country-related FDC3 Intents; can only be: `ViewChart`
|
|
233
233
|
*/
|
|
234
234
|
intents?: CountryIntents;
|
|
235
235
|
}
|
|
@@ -38,12 +38,10 @@ export interface GeneralOptions {
|
|
|
38
38
|
*/
|
|
39
39
|
alternativeModuleNames?: AlternativeModuleName[];
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* @defaultValue 'United Kingdom'
|
|
44
|
-
* @gridInfoItem
|
|
41
|
+
* Holidays - used to determine Working Days
|
|
42
|
+
* @defaultValue null
|
|
45
43
|
*/
|
|
46
|
-
|
|
44
|
+
holidays?: Holidays;
|
|
47
45
|
/**
|
|
48
46
|
* English variant to use in UI labels
|
|
49
47
|
*
|
|
@@ -120,3 +118,33 @@ export interface UnbalancedGroupsKeyContext extends BaseContext {
|
|
|
120
118
|
*/
|
|
121
119
|
params: KeyCreatorParams;
|
|
122
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Holidays - can be list or function (latter takes preference)
|
|
123
|
+
*/
|
|
124
|
+
export interface Holidays {
|
|
125
|
+
/**
|
|
126
|
+
* Holidays provided as valid ISO date strings
|
|
127
|
+
*/
|
|
128
|
+
list?: string[];
|
|
129
|
+
/**
|
|
130
|
+
* Function which returns true if given date is a holiday
|
|
131
|
+
*/
|
|
132
|
+
isHoliday?: (holidayContext: HolidayContext) => boolean;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Context used for isHoliday function
|
|
136
|
+
*/
|
|
137
|
+
export interface HolidayContext extends BaseContext {
|
|
138
|
+
/**
|
|
139
|
+
* Date being checked
|
|
140
|
+
*/
|
|
141
|
+
dateToCheck: Date;
|
|
142
|
+
/**
|
|
143
|
+
* Name of Current User
|
|
144
|
+
*/
|
|
145
|
+
userName: string;
|
|
146
|
+
/**
|
|
147
|
+
* Id of current AdapTable instance
|
|
148
|
+
*/
|
|
149
|
+
adaptableId: string;
|
|
150
|
+
}
|
|
@@ -66,6 +66,10 @@ export interface LayoutOptions {
|
|
|
66
66
|
* Options for leveraging Object Tags to extend Layouts
|
|
67
67
|
*/
|
|
68
68
|
layoutTagOptions?: LayoutTagOptions;
|
|
69
|
+
/**
|
|
70
|
+
* Columns displayed in Table that opens when viewing contents of Pivot Cells
|
|
71
|
+
*/
|
|
72
|
+
pivotPreviewColumns?: string[] | ((context: PivotPreviewColumnsContext) => string[]);
|
|
69
73
|
}
|
|
70
74
|
export interface LayoutTagOptions {
|
|
71
75
|
/**
|
|
@@ -132,3 +136,16 @@ export interface AutoGenerateTagsForLayoutsContext extends BaseContext {
|
|
|
132
136
|
*/
|
|
133
137
|
objectTags: AdaptableObjectTag[];
|
|
134
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* Context uses for pivotPreviewColumns function in Layout Options
|
|
141
|
+
*/
|
|
142
|
+
export interface PivotPreviewColumnsContext extends BaseContext {
|
|
143
|
+
/**
|
|
144
|
+
* Current Layout
|
|
145
|
+
*/
|
|
146
|
+
layout: Layout;
|
|
147
|
+
/**
|
|
148
|
+
* Column being opened
|
|
149
|
+
*/
|
|
150
|
+
columnId: string;
|
|
151
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AlertApi } from './AlertApi';
|
|
2
2
|
import { PluginsApi } from './PluginsApi';
|
|
3
3
|
import { BulkUpdateApi } from './BulkUpdateApi';
|
|
4
|
+
import { CalendarApi } from './CalendarApi';
|
|
4
5
|
import { CalculatedColumnApi } from './CalculatedColumnApi';
|
|
5
6
|
import { CellSummaryApi } from './CellSummaryApi';
|
|
6
7
|
import { ConfigApi } from './ConfigApi';
|
|
@@ -61,6 +62,10 @@ export interface AdaptableApi {
|
|
|
61
62
|
* Provides access to the Bulk Update Module
|
|
62
63
|
*/
|
|
63
64
|
bulkUpdateApi: BulkUpdateApi;
|
|
65
|
+
/**
|
|
66
|
+
* Functions for managing Holidays
|
|
67
|
+
*/
|
|
68
|
+
calendarApi: CalendarApi;
|
|
64
69
|
/**
|
|
65
70
|
* Provides access to the Calculated Column Module
|
|
66
71
|
*/
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calendar, Holiday and Working Day related functions, using supplied Calendars in General Options
|
|
3
|
+
**/
|
|
4
|
+
export interface CalendarApi {
|
|
5
|
+
/**
|
|
6
|
+
* Returns the next Working Day
|
|
7
|
+
*/
|
|
8
|
+
getNextWorkingDay(): Date;
|
|
9
|
+
/**
|
|
10
|
+
* Returns the previous Working Day
|
|
11
|
+
*/
|
|
12
|
+
getPreviousWorkingDay(): Date;
|
|
13
|
+
/**
|
|
14
|
+
* Checks if given date is a Working Day
|
|
15
|
+
* @param dateToCheck Date To Check
|
|
16
|
+
*/
|
|
17
|
+
isWorkingDay(dateToCheck: Date): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Checks if given data is a Holiday
|
|
20
|
+
* @param dateToCheck Date to Check
|
|
21
|
+
*/
|
|
22
|
+
isHoliday(dateToCheck: Date): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Returns true if both Dates are the same, ignoring the time portions
|
|
25
|
+
* @param date1 1st Date
|
|
26
|
+
* @param date2 2nd Date
|
|
27
|
+
*/
|
|
28
|
+
isSameDay(date1: Date, date2: Date): boolean;
|
|
29
|
+
}
|
|
@@ -2,6 +2,7 @@ import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
|
2
2
|
import { AdaptableApi, SettingsPanelApi } from '../../types';
|
|
3
3
|
import { AlertApi } from '../AlertApi';
|
|
4
4
|
import { BulkUpdateApi } from '../BulkUpdateApi';
|
|
5
|
+
import { CalendarApi } from '../CalendarApi';
|
|
5
6
|
import { CalculatedColumnApi } from '../CalculatedColumnApi';
|
|
6
7
|
import { CellSummaryApi } from '../CellSummaryApi';
|
|
7
8
|
import { ConfigApi } from '../ConfigApi';
|
|
@@ -47,6 +48,7 @@ export declare class AdaptableApiImpl implements AdaptableApi {
|
|
|
47
48
|
flashingCellApi: FlashingCellApi;
|
|
48
49
|
predicateApi: PredicateApi;
|
|
49
50
|
bulkUpdateApi: BulkUpdateApi;
|
|
51
|
+
calendarApi: CalendarApi;
|
|
50
52
|
calculatedColumnApi: CalculatedColumnApi;
|
|
51
53
|
cellSummaryApi: CellSummaryApi;
|
|
52
54
|
columnApi: ColumnApi;
|
|
@@ -41,6 +41,7 @@ const ChartingApiImpl_1 = require("./ChartingApiImpl");
|
|
|
41
41
|
const SettingsPanelApiImpl_1 = require("./SettingsPanelApiImpl");
|
|
42
42
|
const ActionApiImpl_1 = require("./ActionApiImpl");
|
|
43
43
|
const StyledColumnApiImpl_1 = require("./StyledColumnApiImpl");
|
|
44
|
+
const CalendarApiImpl_1 = require("./CalendarApiImpl");
|
|
44
45
|
class AdaptableApiImpl {
|
|
45
46
|
constructor(adaptable) {
|
|
46
47
|
this.adaptable = adaptable;
|
|
@@ -53,6 +54,7 @@ class AdaptableApiImpl {
|
|
|
53
54
|
this.predicateApi = new PredicateApiImpl_1.PredicateApiImpl(adaptable);
|
|
54
55
|
this.pluginsApi = new PluginsApiImpl_1.PluginsApiImpl(adaptable);
|
|
55
56
|
this.bulkUpdateApi = new BulkUpdateApiImpl_1.BulkUpdateApiImpl(adaptable);
|
|
57
|
+
this.calendarApi = new CalendarApiImpl_1.CalendarApiImpl(adaptable);
|
|
56
58
|
this.calculatedColumnApi = new CalculatedColumnApiImpl_1.CalculatedColumnApiImpl(adaptable);
|
|
57
59
|
this.cellSummaryApi = new CellSummaryApiImpl_1.CellSummaryApiImpl(adaptable);
|
|
58
60
|
this.columnApi = new ColumnApiImpl_1.ColumnApiImpl(adaptable);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ApiBase } from './ApiBase';
|
|
2
|
+
import { CalendarApi } from '../CalendarApi';
|
|
3
|
+
export declare class CalendarApiImpl extends ApiBase implements CalendarApi {
|
|
4
|
+
getNextWorkingDay(): Date;
|
|
5
|
+
getPreviousWorkingDay(): Date;
|
|
6
|
+
isWorkingDay(dateToCheck: Date): boolean;
|
|
7
|
+
isHoliday(dateToCheck: Date): boolean;
|
|
8
|
+
isSameDay(firstDateToCheck: Date, secondDateToCheck: Date): boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CalendarApiImpl = void 0;
|
|
4
|
+
const ApiBase_1 = require("./ApiBase");
|
|
5
|
+
class CalendarApiImpl extends ApiBase_1.ApiBase {
|
|
6
|
+
getNextWorkingDay() {
|
|
7
|
+
let counterDate = new Date();
|
|
8
|
+
let isWorkingDay = false;
|
|
9
|
+
while (!isWorkingDay) {
|
|
10
|
+
counterDate.setDate(counterDate.getDate() + 1);
|
|
11
|
+
isWorkingDay = this.isWorkingDay(counterDate);
|
|
12
|
+
}
|
|
13
|
+
return counterDate;
|
|
14
|
+
}
|
|
15
|
+
getPreviousWorkingDay() {
|
|
16
|
+
let counterDate = new Date();
|
|
17
|
+
let isWorkingDay = false;
|
|
18
|
+
while (!isWorkingDay) {
|
|
19
|
+
counterDate.setDate(counterDate.getDate() - 1);
|
|
20
|
+
isWorkingDay = this.isWorkingDay(counterDate);
|
|
21
|
+
}
|
|
22
|
+
return counterDate;
|
|
23
|
+
}
|
|
24
|
+
isWorkingDay(dateToCheck) {
|
|
25
|
+
const holidays = this.getGeneralOptions().holidays;
|
|
26
|
+
if (!holidays) {
|
|
27
|
+
return dateToCheck.getDay() != 0 && dateToCheck.getDay() != 6;
|
|
28
|
+
}
|
|
29
|
+
if (holidays.isHoliday) {
|
|
30
|
+
const context = {
|
|
31
|
+
dateToCheck: dateToCheck,
|
|
32
|
+
userName: this.getOptions().userName,
|
|
33
|
+
adaptableId: this.getOptions().adaptableId,
|
|
34
|
+
adaptableApi: this.getAdaptableApi(),
|
|
35
|
+
};
|
|
36
|
+
if (holidays.isHoliday(context)) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (Array.isArray(holidays.list)) {
|
|
41
|
+
for (let holiday of holidays.list) {
|
|
42
|
+
let holidayDate = new Date(holiday);
|
|
43
|
+
if (holidayDate.setHours(0, 0, 0, 0) == dateToCheck.setHours(0, 0, 0, 0)) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return dateToCheck.getDay() != 0 && dateToCheck.getDay() != 6;
|
|
49
|
+
}
|
|
50
|
+
isHoliday(dateToCheck) {
|
|
51
|
+
return !this.isWorkingDay(dateToCheck);
|
|
52
|
+
}
|
|
53
|
+
isSameDay(firstDateToCheck, secondDateToCheck) {
|
|
54
|
+
return (firstDateToCheck.getFullYear() === secondDateToCheck.getFullYear() &&
|
|
55
|
+
firstDateToCheck.getMonth() === secondDateToCheck.getMonth() &&
|
|
56
|
+
firstDateToCheck.getDate() === secondDateToCheck.getDate());
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.CalendarApiImpl = CalendarApiImpl;
|
|
@@ -28,7 +28,7 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
|
|
|
28
28
|
isDateColumn(column: AdaptableColumn): boolean;
|
|
29
29
|
getColumnDataTypeFromColumnId(columnId: string): AdaptableColumnDataType | undefined;
|
|
30
30
|
getFriendlyNameFromColumn(columnId: string, column: AdaptableColumn): string;
|
|
31
|
-
getFriendlyNameFromColumnId(columnId: string): string;
|
|
31
|
+
getFriendlyNameFromColumnId(columnId: string): string | undefined;
|
|
32
32
|
getFriendlyNamesFromColumnIds(columnIds: string[]): string[];
|
|
33
33
|
getColumnIdFromFriendlyName(friendlyName: string): string;
|
|
34
34
|
getColumnIdsFromFriendlyNames(friendlyNames: string[]): string[];
|
|
@@ -115,6 +115,9 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
115
115
|
return columnId + GeneralConstants.MISSING_COLUMN;
|
|
116
116
|
}
|
|
117
117
|
getFriendlyNameFromColumnId(columnId) {
|
|
118
|
+
if (this.isAutoPivotColumn(columnId)) {
|
|
119
|
+
return GeneralConstants.EMPTY_STRING;
|
|
120
|
+
}
|
|
118
121
|
const foundColumn = this.getColumns().find((c) => c.columnId == columnId);
|
|
119
122
|
if (foundColumn) {
|
|
120
123
|
return this.getFriendlyNameFromColumn(columnId, foundColumn);
|
|
@@ -180,6 +183,9 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
180
183
|
if (ArrayExtensions_1.default.IsNullOrEmpty(this.getColumns())) {
|
|
181
184
|
return;
|
|
182
185
|
}
|
|
186
|
+
if (this.isAutoPivotColumn(columnId)) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
183
189
|
const foundColumn = this.getColumns().find((c) => c.columnId == columnId);
|
|
184
190
|
if (foundColumn) {
|
|
185
191
|
return foundColumn;
|
|
@@ -269,6 +275,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
269
275
|
return this.getColumns().filter((c) => c.queryable);
|
|
270
276
|
}
|
|
271
277
|
LogMissingColumnWarning(columnId) {
|
|
278
|
+
console.log('MISSING', columnId);
|
|
272
279
|
if (this.adaptable.adaptableOptions.columnOptions.showMissingColumnsWarning &&
|
|
273
280
|
this.adaptable.adaptableOptions.columnOptions.showMissingColumnsWarning === true) {
|
|
274
281
|
if (!this.isAutoRowGroupColumn(columnId) &&
|
|
@@ -60,6 +60,7 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
|
|
|
60
60
|
showPopupScreen(module: AdaptableModule, componentName: string, popupParams?: ModuleParams, popupProps?: {
|
|
61
61
|
[key: string]: any;
|
|
62
62
|
}): void;
|
|
63
|
+
showPopupWindow(id: string, title: string, icon: string, popupProps: any): void;
|
|
63
64
|
hidePopupScreen(): void;
|
|
64
65
|
setColumns(columns: AdaptableColumn[]): void;
|
|
65
66
|
setSettingPanelModuleMenuItems(menuItems: AdaptableMenuItem[]): void;
|
|
@@ -146,6 +146,14 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
146
146
|
showPopupScreen(module, componentName, popupParams, popupProps) {
|
|
147
147
|
this.dispatchAction(PopupRedux.PopupShowScreen(module, componentName, popupParams, popupProps));
|
|
148
148
|
}
|
|
149
|
+
showPopupWindow(id, title, icon, popupProps) {
|
|
150
|
+
this.dispatchAction(PopupRedux.PopupShowWindow({
|
|
151
|
+
Id: id,
|
|
152
|
+
Title: title,
|
|
153
|
+
Icon: icon,
|
|
154
|
+
PopupProps: popupProps,
|
|
155
|
+
}));
|
|
156
|
+
}
|
|
149
157
|
hidePopupScreen() {
|
|
150
158
|
this.dispatchAction(PopupRedux.PopupHideScreen());
|
|
151
159
|
}
|
|
@@ -45,4 +45,11 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
45
45
|
removeColumnFromCurrentLayout(columnId: string): void;
|
|
46
46
|
removeColumnFromAllLayouts(columnId: string): void;
|
|
47
47
|
removeColumnFromLayout(columnId: string, layoutName: string): void;
|
|
48
|
+
getLayoutSupportedFeatures(): {
|
|
49
|
+
RowGroupedColumns: boolean;
|
|
50
|
+
AggregationColumns: boolean;
|
|
51
|
+
PivotColumns: boolean;
|
|
52
|
+
ColumnFilters: boolean;
|
|
53
|
+
ColumnSorts: boolean;
|
|
54
|
+
};
|
|
48
55
|
}
|
|
@@ -334,5 +334,20 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
+
getLayoutSupportedFeatures() {
|
|
338
|
+
const layoutSupportedFeatures = {
|
|
339
|
+
RowGroupedColumns: true,
|
|
340
|
+
AggregationColumns: true,
|
|
341
|
+
PivotColumns: true,
|
|
342
|
+
ColumnFilters: true,
|
|
343
|
+
ColumnSorts: true,
|
|
344
|
+
};
|
|
345
|
+
if (this.adaptable.getRowModel() === 'viewport') {
|
|
346
|
+
layoutSupportedFeatures.RowGroupedColumns = false;
|
|
347
|
+
layoutSupportedFeatures.AggregationColumns = false;
|
|
348
|
+
layoutSupportedFeatures.PivotColumns = false;
|
|
349
|
+
}
|
|
350
|
+
return layoutSupportedFeatures;
|
|
351
|
+
}
|
|
337
352
|
}
|
|
338
353
|
exports.LayoutApiImpl = LayoutApiImpl;
|
|
@@ -79,14 +79,9 @@ class QueryApiImpl extends ApiBase_1.ApiBase {
|
|
|
79
79
|
}
|
|
80
80
|
expandCurrentQuery(query) {
|
|
81
81
|
const preparedQuery = query !== null && query !== void 0 ? query : this.getCurrentQuery();
|
|
82
|
-
this.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
Icon: 'query',
|
|
86
|
-
PopupProps: {
|
|
87
|
-
value: preparedQuery,
|
|
88
|
-
},
|
|
89
|
-
}));
|
|
82
|
+
this.getAdaptableApi().internalApi.showPopupWindow(windowFactory_1.WINDOW_QUERY_EDITOR, 'Current Query', 'query', {
|
|
83
|
+
value: preparedQuery,
|
|
84
|
+
});
|
|
90
85
|
}
|
|
91
86
|
fireQueryRunEvent() {
|
|
92
87
|
if (this.adaptable.isLive) {
|
package/src/Api/InternalApi.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ export interface InternalApi {
|
|
|
63
63
|
showPopupScreen(module: AdaptableModule, componentName: string, popupParams?: ModuleParams, popupProps?: {
|
|
64
64
|
[key: string]: any;
|
|
65
65
|
}): void;
|
|
66
|
+
showPopupWindow(Id: string, Title: string, Icon: string, PopupProps: any): void;
|
|
66
67
|
isDocumentationLinksDisplayed(): boolean;
|
|
67
68
|
hidePopupScreen(): void;
|
|
68
69
|
setColumns(columns: AdaptableColumn[]): void;
|
package/src/Api/LayoutApi.d.ts
CHANGED
|
@@ -203,4 +203,15 @@ export interface LayoutApi {
|
|
|
203
203
|
* Useful when `autoSaveLayouts=true`
|
|
204
204
|
*/
|
|
205
205
|
areDraftAndCurrentLayoutEqual(): boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Returns whant the layout supports.
|
|
208
|
+
* This takes into account the data-source.
|
|
209
|
+
*/
|
|
210
|
+
getLayoutSupportedFeatures(): {
|
|
211
|
+
RowGroupedColumns: boolean;
|
|
212
|
+
AggregationColumns: boolean;
|
|
213
|
+
PivotColumns: boolean;
|
|
214
|
+
ColumnFilters: boolean;
|
|
215
|
+
ColumnSorts: boolean;
|
|
216
|
+
};
|
|
206
217
|
}
|
|
@@ -103,7 +103,7 @@ export interface PredicateDefHandlerParams {
|
|
|
103
103
|
export interface PredicateDefToStringParams {
|
|
104
104
|
inputs: any[];
|
|
105
105
|
}
|
|
106
|
-
export declare type ModuleScope = 'filter' | 'alert' | '
|
|
106
|
+
export declare type ModuleScope = 'filter' | 'alert' | 'flashingcell' | 'formatColumn';
|
|
107
107
|
/**
|
|
108
108
|
* Array of Predicate Defs which are shipped by AdapTable
|
|
109
109
|
*/
|