@adaptabletools/adaptable 16.0.1-canary.1 → 16.0.2-canary.0
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 +63 -63
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/AdaptablePlugin.d.ts +2 -2
- package/src/AdaptableOptions/AdaptablePlugin.js +2 -1
- package/src/AdaptableOptions/Fdc3Options.d.ts +16 -7
- package/src/Api/Implementation/CommentsApiImpl.js +0 -1
- package/src/Api/QuickSearchApi.d.ts +1 -1
- package/src/PredefinedConfig/CommentsState.d.ts +3 -0
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +2 -2
- package/src/Utilities/Services/ModuleService.js +1 -1
- package/src/agGrid/Adaptable.d.ts +3 -3
- package/src/agGrid/Adaptable.js +6 -10
- package/src/metamodel/adaptable.metamodel.d.ts +31 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.2-canary.0",
|
|
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: 1692348380677;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -7,7 +7,7 @@ import { AdaptableState } from '../PredefinedConfig/AdaptableState';
|
|
|
7
7
|
import { AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
8
8
|
import { IModule } from '../Strategy/Interface/IModule';
|
|
9
9
|
import { ColumnSetupInfo } from '../agGrid/ColumnSetupInfo';
|
|
10
|
-
import { ColDef } from '@ag-grid-community/core';
|
|
10
|
+
import { ColDef, GridOptions } from '@ag-grid-community/core';
|
|
11
11
|
import { Layout } from '../PredefinedConfig/LayoutState';
|
|
12
12
|
declare type AdaptableReducerObject = {
|
|
13
13
|
[key: string]: (...args: any[]) => any;
|
|
@@ -25,7 +25,7 @@ export declare abstract class AdaptablePlugin {
|
|
|
25
25
|
rootReducer?: (rootReducer: AdaptableReducerObject) => AdaptableReducerObject;
|
|
26
26
|
reduxMiddleware?: (adaptable: IAdaptable) => Redux.Middleware;
|
|
27
27
|
hasProperty(name: string): boolean;
|
|
28
|
-
beforeInit(adaptableOptions: AdaptableOptions): void;
|
|
28
|
+
beforeInit(adaptableOptions: AdaptableOptions, gridOptions: GridOptions): void;
|
|
29
29
|
afterInitOptions(adaptable: IAdaptable, adaptableOptions: AdaptableOptions): void;
|
|
30
30
|
afterInitApi(adaptable: IAdaptable, api: AdaptableApi): void;
|
|
31
31
|
afterInitServices(adaptable: IAdaptable): void;
|
|
@@ -25,7 +25,8 @@ class AdaptablePlugin {
|
|
|
25
25
|
return !!this.values[name];
|
|
26
26
|
}
|
|
27
27
|
// plugin lifecycle methods, executed in this exact order
|
|
28
|
-
|
|
28
|
+
// wondering if this is better?
|
|
29
|
+
beforeInit(adaptableOptions, gridOptions) { }
|
|
29
30
|
afterInitOptions(adaptable, adaptableOptions) { }
|
|
30
31
|
afterInitApi(adaptable, api) { }
|
|
31
32
|
afterInitServices(adaptable) { }
|
|
@@ -10,7 +10,7 @@ import { ButtonStyle } from '../PredefinedConfig/Common/ButtonStyle';
|
|
|
10
10
|
*/
|
|
11
11
|
export interface Fdc3Options {
|
|
12
12
|
/**
|
|
13
|
-
* Enable logging
|
|
13
|
+
* Enable logging message exchanges to Console
|
|
14
14
|
*
|
|
15
15
|
* @defaultValue false
|
|
16
16
|
*/
|
|
@@ -196,6 +196,9 @@ export declare const ColumnRefTypePrefix = "_colId.";
|
|
|
196
196
|
export declare const FieldRefTypePrefix = "_field.";
|
|
197
197
|
export declare type GridDataRef = `_colId.${string}` | `_field.${string}`;
|
|
198
198
|
export declare type Fdc3ContentMapping<T> = PropertiesToGridRefs<Omit<T, 'type'>>;
|
|
199
|
+
/**
|
|
200
|
+
* Config used when raising an FDC3 Intent
|
|
201
|
+
*/
|
|
199
202
|
export interface RaiseIntentConfig<K extends Fdc3IntentType = any> {
|
|
200
203
|
contextType: CompatibleContext<K>;
|
|
201
204
|
contextMenu?: {
|
|
@@ -210,6 +213,9 @@ export interface RaiseIntentConfig<K extends Fdc3IntentType = any> {
|
|
|
210
213
|
};
|
|
211
214
|
handleIntentResolution?: (context: HandleFdc3IntentResolutionContext) => Promise<IntentResult>;
|
|
212
215
|
}
|
|
216
|
+
/**
|
|
217
|
+
* Config used when broadcasting FDC3 Context
|
|
218
|
+
*/
|
|
213
219
|
export interface BroadcastConfig {
|
|
214
220
|
contextMenu?: {
|
|
215
221
|
columnIds: string[];
|
|
@@ -256,33 +262,36 @@ export interface Fdc3ButtonContext extends BaseContext {
|
|
|
256
262
|
*/
|
|
257
263
|
primaryKeyValue: any;
|
|
258
264
|
}
|
|
265
|
+
/**
|
|
266
|
+
* Button used in FDC3 Action Columns
|
|
267
|
+
*/
|
|
259
268
|
export interface Fdc3AdaptableButton {
|
|
260
269
|
/**
|
|
261
270
|
* Unique id for the button
|
|
262
271
|
*/
|
|
263
272
|
id: string;
|
|
264
273
|
/**
|
|
265
|
-
*
|
|
274
|
+
* Button's Icon; can be object or function that provides `AdaptableIcon` object
|
|
266
275
|
*/
|
|
267
276
|
icon?: '_defaultFdc3' | AdaptableIcon | ((button: Fdc3AdaptableButton, context: Fdc3ButtonContext) => AdaptableIcon);
|
|
268
277
|
/**
|
|
269
|
-
*
|
|
278
|
+
* Button' Label; can be string or function that provides string
|
|
270
279
|
*/
|
|
271
280
|
label?: '_defaultFdc3' | string | ((button: Fdc3AdaptableButton, context: Fdc3ButtonContext) => string);
|
|
272
281
|
/**
|
|
273
|
-
*
|
|
282
|
+
* Button's Tooltip; can be string or function that provides string
|
|
274
283
|
*/
|
|
275
284
|
tooltip?: '_defaultFdc3' | string | ((button: Fdc3AdaptableButton, context: Fdc3ButtonContext) => string);
|
|
276
285
|
/**
|
|
277
|
-
*
|
|
286
|
+
* Button's Style; can be object or function that provides `ButtonStyle` object
|
|
278
287
|
*/
|
|
279
288
|
buttonStyle?: ButtonStyle | ((button: Fdc3AdaptableButton, context: Fdc3ButtonContext) => ButtonStyle);
|
|
280
289
|
/**
|
|
281
|
-
* Function
|
|
290
|
+
* Function to disable / enable button based on evaluation result
|
|
282
291
|
*/
|
|
283
292
|
disabled?: (button: Fdc3AdaptableButton, context: Fdc3ButtonContext) => boolean;
|
|
284
293
|
/**
|
|
285
|
-
* Function
|
|
294
|
+
* Function to hide the Button
|
|
286
295
|
*/
|
|
287
296
|
hidden?: (button: Fdc3AdaptableButton, context: Fdc3ButtonContext) => boolean;
|
|
288
297
|
}
|
|
@@ -31,6 +31,9 @@ export interface AdaptableComment extends AdaptableObject {
|
|
|
31
31
|
*/
|
|
32
32
|
AdaptableId: string;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Collection of Cell Comments
|
|
36
|
+
*/
|
|
34
37
|
export declare type AdaptableComments = AdaptableComment[];
|
|
35
38
|
/**
|
|
36
39
|
* Predefined Configuration for Comments Module
|
|
@@ -38,7 +38,7 @@ exports.SystemPredicateDefs = [
|
|
|
38
38
|
return (0, isEqual_1.default)(input, value);
|
|
39
39
|
}
|
|
40
40
|
else {
|
|
41
|
-
return (0, isSameDay_1.default)(input, value);
|
|
41
|
+
return (0, isSameDay_1.default)((0, DateHelper_1.parseDateValue)(input), (0, DateHelper_1.parseDateValue)(value));
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
}
|
|
@@ -78,7 +78,7 @@ exports.SystemPredicateDefs = [
|
|
|
78
78
|
}
|
|
79
79
|
else {
|
|
80
80
|
return inputs.every((input) => {
|
|
81
|
-
return !(0, isSameDay_1.default)(input, value);
|
|
81
|
+
return !(0, isSameDay_1.default)((0, DateHelper_1.parseDateValue)(input), (0, DateHelper_1.parseDateValue)(value));
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
}
|
|
@@ -100,7 +100,7 @@ class ModuleService {
|
|
|
100
100
|
case 'Filter':
|
|
101
101
|
return learnUrl + 'handbook-filtering';
|
|
102
102
|
case 'FlashingCell':
|
|
103
|
-
return learnUrl + 'handbook-cell
|
|
103
|
+
return learnUrl + 'handbook-flashing-cell';
|
|
104
104
|
case 'FormatColumn':
|
|
105
105
|
return learnUrl + 'handbook-column-formatting';
|
|
106
106
|
case 'FreeTextColumn':
|
|
@@ -40,12 +40,12 @@ import { RenderReactRootFn } from '../renderReactRoot';
|
|
|
40
40
|
import { AdaptableLogger } from './AdaptableLogger';
|
|
41
41
|
import { Fdc3Service } from '../Utilities/Services/Fdc3Service';
|
|
42
42
|
declare type RuntimeConfig = {
|
|
43
|
-
gridOptions: GridOptions;
|
|
44
43
|
waitForAgGrid?: boolean;
|
|
45
44
|
supressReact18RenderWarning?: boolean;
|
|
46
45
|
renderReactRoot?: RenderReactRootFn;
|
|
47
46
|
variant?: AdaptableVariant;
|
|
48
|
-
|
|
47
|
+
gridOptions: AgGridConfig['gridOptions'];
|
|
48
|
+
modules?: AgGridConfig['modules'];
|
|
49
49
|
};
|
|
50
50
|
export declare class Adaptable implements IAdaptable {
|
|
51
51
|
api: AdaptableApi;
|
|
@@ -120,7 +120,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
120
120
|
* Initializer for Adaptable
|
|
121
121
|
*
|
|
122
122
|
* @param adaptableOptions the AdaptableOptions
|
|
123
|
-
* @param
|
|
123
|
+
* @param agGridConfig AG Grid
|
|
124
124
|
* @returns a Promise containing the AdaptableAPI object in order to enable run-time access to Adaptable's properties and functions
|
|
125
125
|
*/
|
|
126
126
|
static init(adaptableOptions: AdaptableOptions, agGridConfig: AgGridConfig): Promise<AdaptableApi>;
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -280,7 +280,7 @@ class Adaptable {
|
|
|
280
280
|
* Initializer for Adaptable
|
|
281
281
|
*
|
|
282
282
|
* @param adaptableOptions the AdaptableOptions
|
|
283
|
-
* @param
|
|
283
|
+
* @param agGridConfig AG Grid
|
|
284
284
|
* @returns a Promise containing the AdaptableAPI object in order to enable run-time access to Adaptable's properties and functions
|
|
285
285
|
*/
|
|
286
286
|
static init(adaptableOptions, agGridConfig) {
|
|
@@ -288,11 +288,7 @@ class Adaptable {
|
|
|
288
288
|
if (!((_a = agGridConfig === null || agGridConfig === void 0 ? void 0 : agGridConfig.modules) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
289
289
|
AdaptableLogger_1.AdaptableLogger.consoleErrorBase(`No AG Grid modules were provided, thus limiting AdapTables features significantly!\n\nRead further info here:${DocumentationLinkConstants_1.AgGridModulesDocsLink}`);
|
|
290
290
|
}
|
|
291
|
-
return Adaptable.initInternal(adaptableOptions, {
|
|
292
|
-
gridOptions: agGridConfig.gridOptions,
|
|
293
|
-
supressReact18RenderWarning: true,
|
|
294
|
-
agGridModules: agGridConfig.modules,
|
|
295
|
-
});
|
|
291
|
+
return Adaptable.initInternal(adaptableOptions, Object.assign(Object.assign({}, agGridConfig), { supressReact18RenderWarning: true }));
|
|
296
292
|
}
|
|
297
293
|
/**
|
|
298
294
|
* Lazy static constructor for Adaptable
|
|
@@ -308,9 +304,9 @@ class Adaptable {
|
|
|
308
304
|
promise =
|
|
309
305
|
promise && promise.then
|
|
310
306
|
? promise.then(() => {
|
|
311
|
-
return plugin.beforeInit(adaptableOptions);
|
|
307
|
+
return plugin.beforeInit(adaptableOptions, runtimeConfig.gridOptions);
|
|
312
308
|
})
|
|
313
|
-
: plugin.beforeInit(adaptableOptions);
|
|
309
|
+
: plugin.beforeInit(adaptableOptions, runtimeConfig.gridOptions);
|
|
314
310
|
}
|
|
315
311
|
// instead of
|
|
316
312
|
// if (Array.isArray(adaptableOptions.plugins)) {
|
|
@@ -701,8 +697,8 @@ class Adaptable {
|
|
|
701
697
|
const agGridContainer = this.getAgGridContainerElement();
|
|
702
698
|
const perfAgGridInstance = this.logger.beginPerf('new AgGrid()');
|
|
703
699
|
let gridParams;
|
|
704
|
-
if ((_a = this.runtimeConfig.
|
|
705
|
-
gridParams = { modules: this.runtimeConfig.
|
|
700
|
+
if ((_a = this.runtimeConfig.modules) === null || _a === void 0 ? void 0 : _a.length) {
|
|
701
|
+
gridParams = { modules: this.runtimeConfig.modules };
|
|
706
702
|
}
|
|
707
703
|
grid = new core_1.Grid(agGridContainer, this.gridOptions, gridParams);
|
|
708
704
|
perfAgGridInstance.end();
|
|
@@ -334,6 +334,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
334
334
|
desc: string;
|
|
335
335
|
}[];
|
|
336
336
|
};
|
|
337
|
+
AdaptableComments: {
|
|
338
|
+
name: string;
|
|
339
|
+
kind: string;
|
|
340
|
+
desc: string;
|
|
341
|
+
};
|
|
337
342
|
AdaptableComparerFunction: {
|
|
338
343
|
name: string;
|
|
339
344
|
kind: string;
|
|
@@ -1278,6 +1283,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1278
1283
|
ref: string;
|
|
1279
1284
|
}[];
|
|
1280
1285
|
};
|
|
1286
|
+
BroadcastConfig: {
|
|
1287
|
+
name: string;
|
|
1288
|
+
kind: string;
|
|
1289
|
+
desc: string;
|
|
1290
|
+
};
|
|
1281
1291
|
BulkUpdatePermittedValues: {
|
|
1282
1292
|
name: string;
|
|
1283
1293
|
kind: string;
|
|
@@ -2609,6 +2619,22 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2609
2619
|
desc: string;
|
|
2610
2620
|
}[];
|
|
2611
2621
|
};
|
|
2622
|
+
Fdc3AdaptableButton: {
|
|
2623
|
+
name: string;
|
|
2624
|
+
kind: string;
|
|
2625
|
+
desc: string;
|
|
2626
|
+
props: ({
|
|
2627
|
+
name: string;
|
|
2628
|
+
kind: string;
|
|
2629
|
+
desc: string;
|
|
2630
|
+
isOpt: boolean;
|
|
2631
|
+
} | {
|
|
2632
|
+
name: string;
|
|
2633
|
+
kind: string;
|
|
2634
|
+
desc: string;
|
|
2635
|
+
isOpt?: undefined;
|
|
2636
|
+
})[];
|
|
2637
|
+
};
|
|
2612
2638
|
Fdc3ButtonContext: {
|
|
2613
2639
|
name: string;
|
|
2614
2640
|
kind: string;
|
|
@@ -3881,6 +3907,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3881
3907
|
ref: string;
|
|
3882
3908
|
})[];
|
|
3883
3909
|
};
|
|
3910
|
+
RaiseIntentConfig: {
|
|
3911
|
+
name: string;
|
|
3912
|
+
kind: string;
|
|
3913
|
+
desc: string;
|
|
3914
|
+
};
|
|
3884
3915
|
RangeValueType: {
|
|
3885
3916
|
name: string;
|
|
3886
3917
|
kind: string;
|