@adaptabletools/adaptable 16.0.2-canary.0 → 16.0.3-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "16.0.2-canary.0",
3
+ "version": "16.0.3-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",
@@ -1,2 +1,2 @@
1
- declare const _default: 1692348380677;
1
+ declare const _default: 1692685693240;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1692348380677;
3
+ exports.default = 1692685693240;
@@ -156,7 +156,6 @@ export interface IAdaptable {
156
156
  jumpToColumn(columnId: string): void;
157
157
  jumpToCell(columnId: string, rowNode: IRowNode): void;
158
158
  getAgGridContainerElement(): HTMLElement | null;
159
- setInitialGridData(dataSource: any): void;
160
159
  setGridData(dataSource: any): void;
161
160
  getGridData(): any[];
162
161
  getFilteredData(): any[];
@@ -84,11 +84,11 @@ export interface Fdc3Options {
84
84
  };
85
85
  };
86
86
  /**
87
- * Handles incoming Intents (both standard and custom)
87
+ * Handles incoming Intents (standard and custom)
88
88
  */
89
89
  handleIntent?: (context: HandleFdc3IntentContext) => Promise<IntentResult> | void;
90
90
  /**
91
- * Handles incoming Contexts (both standard and custom)
91
+ * Handles incoming Contexts (standard and custom)
92
92
  */
93
93
  handleContext?: (context: HandleFdc3Context) => void;
94
94
  /**
@@ -121,7 +121,7 @@ export interface ActionColumnDefaultConfiguration {
121
121
  */
122
122
  resizable?: boolean;
123
123
  /**
124
- * If Column is moveable
124
+ * If Column is movable
125
125
  * @defaultValue true
126
126
  */
127
127
  movable?: boolean;
@@ -191,6 +191,9 @@ export interface GridDataContextMapping {
191
191
  'fdc3.position'?: Fdc3ContentMapping<PositionContext>;
192
192
  'fdc3.timerange'?: Fdc3ContentMapping<TimeRangeContext>;
193
193
  'fdc3.valuation'?: Fdc3ContentMapping<ValuationContext>;
194
+ custom?: {
195
+ [key: string]: Fdc3ContentMapping<Context>;
196
+ };
194
197
  }
195
198
  export declare const ColumnRefTypePrefix = "_colId.";
196
199
  export declare const FieldRefTypePrefix = "_field.";
@@ -200,27 +203,51 @@ export declare type Fdc3ContentMapping<T> = PropertiesToGridRefs<Omit<T, 'type'>
200
203
  * Config used when raising an FDC3 Intent
201
204
  */
202
205
  export interface RaiseIntentConfig<K extends Fdc3IntentType = any> {
206
+ /**
207
+ * Key of Context being Raised
208
+ */
203
209
  contextType: CompatibleContext<K>;
210
+ /**
211
+ * Columns to display a 'Raise Intent' Context Menu item
212
+ */
204
213
  contextMenu?: {
205
214
  columnIds: string[];
206
215
  };
216
+ /**
217
+ * Definition of Action Button (to be put in default FDC3 Action Column)
218
+ */
207
219
  actionButton?: Fdc3AdaptableButton;
220
+ /**
221
+ * Custom FDC3 Action Column definition for the Intent
222
+ */
208
223
  actionColumn?: {
209
224
  columnId: string;
210
225
  friendlyName?: string;
211
226
  button: Fdc3AdaptableButton;
212
227
  width?: number;
213
228
  };
229
+ /**
230
+ * Handles Intent Resolution returning an ayschronous Intent Result
231
+ */
214
232
  handleIntentResolution?: (context: HandleFdc3IntentResolutionContext) => Promise<IntentResult>;
215
233
  }
216
234
  /**
217
235
  * Config used when broadcasting FDC3 Context
218
236
  */
219
237
  export interface BroadcastConfig {
238
+ /**
239
+ * Columns to display a 'Broadcast' Context Menu item
240
+ */
220
241
  contextMenu?: {
221
242
  columnIds: string[];
222
243
  };
244
+ /**
245
+ * Definition of Action Button (to be put in default FDC3 Action Column)
246
+ */
223
247
  actionButton?: Fdc3AdaptableButton;
248
+ /**
249
+ * Custom FDC3 Action Column definition to broadcast the Context
250
+ */
224
251
  actionColumn?: {
225
252
  columnId: string;
226
253
  friendlyName?: string;
@@ -27,10 +27,10 @@ export interface GridApi {
27
27
  */
28
28
  getFilteredData(): any[];
29
29
  /**
30
- * Repopulates EXISTING grid with given data; fires GridDataChanged' Event
30
+ * Repopulates Grid with given data; fires `GridDataChanged` Event
31
31
  * @param data any data suitable as AG Grid data source
32
32
  */
33
- setGridData(data: any[]): void;
33
+ resetGridData(data: any[]): void;
34
34
  /**
35
35
  * Sets grid with given data for FIRST use; doesn't fire 'GridDataChanged' Event
36
36
  * @param dataany data suitable as AG Grid data source
@@ -43,10 +43,10 @@ export interface GridApi {
43
43
  */
44
44
  updateGridData(dataRows: any[], config?: DataUpdateConfig): Promise<IRowNode[]>;
45
45
  /**
46
- * Adds or Updates AdapTable (and AG Grid) with new and changed rows
47
- * @param dataRows rows to add or update
48
- * @param config batch option and callback function to run post change
49
- */
46
+ * Adds or Updates AdapTable (and AG Grid) with new and changed rows
47
+ * @param dataRows rows to add or update
48
+ * @param config batch option and callback function to run post change
49
+ */
50
50
  addOrUpdateGridData(dataRows: any[], config?: DataUpdateConfig): Promise<IRowNode[]>;
51
51
  /**
52
52
  * Adds rows to AdapTable (and AG Grid)
@@ -293,16 +293,16 @@ export interface GridApi {
293
293
  */
294
294
  getCellRawValueCount(columnId: string, rawValue: any): number;
295
295
  /**
296
- * Returns all the Grid Cells in a Column that have the given Display Value
297
- * @param columnId ColumnId to lookup
298
- * @param displayValue Display Value to use
299
- */
296
+ * Returns all the Grid Cells in a Column that have the given Display Value
297
+ * @param columnId ColumnId to lookup
298
+ * @param displayValue Display Value to use
299
+ */
300
300
  getGridCellsForDisplayValue(columnId: string, displayValue: any): GridCell[] | undefined;
301
301
  /**
302
- * Gets the count of the cells in a Column that have the given Display Value
303
- * @param columnId ColumnId to lookup
304
- * @param displayValue Display Value to use
305
- */
302
+ * Gets the count of the cells in a Column that have the given Display Value
303
+ * @param columnId ColumnId to lookup
304
+ * @param displayValue Display Value to use
305
+ */
306
306
  getCellDisplayValueCount(columnId: string, displayValue: any): number;
307
307
  /**
308
308
  * Retrieves Formatted Value for a given Raw Value in given Column
@@ -18,7 +18,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
18
18
  internalApi: GridInternalApi;
19
19
  constructor(adaptable: IAdaptable);
20
20
  getGridState(): GridState;
21
- setGridData(dataSource: any[]): void;
21
+ resetGridData(dataSource: any[]): void;
22
22
  setInitialGridData(data: any): void;
23
23
  getGridData(): any[];
24
24
  getFilteredData(): any[];
@@ -16,13 +16,13 @@ class GridApiImpl extends ApiBase_1.ApiBase {
16
16
  getGridState() {
17
17
  return this.getAdaptableState().Grid;
18
18
  }
19
- setGridData(dataSource) {
19
+ resetGridData(dataSource) {
20
20
  this.adaptable.setGridData(dataSource);
21
21
  const allRowNodes = this.getAllRowNodes();
22
22
  this.internalApi.fireGridDataChangedEvent(dataSource, allRowNodes, 'Add');
23
23
  }
24
24
  setInitialGridData(data) {
25
- this.adaptable.setInitialGridData(data);
25
+ this.adaptable.setGridData(data);
26
26
  }
27
27
  getGridData() {
28
28
  return this.adaptable.getGridData();
@@ -26,11 +26,15 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
26
26
  * Computes the context based on the given `Fdc3Options.gridDataContextMapping` and the given `IRowNode`.
27
27
  */
28
28
  getMappedContextData(contextType, rowNode) {
29
- var _a;
29
+ var _a, _b, _c;
30
30
  if (contextType === fdc3_1.ContextTypes.Nothing) {
31
31
  return { type: fdc3_1.ContextTypes.Nothing };
32
32
  }
33
- const contextMapping = (_a = this.getFdc3Options().gridDataContextMapping) === null || _a === void 0 ? void 0 : _a[contextType];
33
+ let contextMapping = (_a = this.getFdc3Options().gridDataContextMapping) === null || _a === void 0 ? void 0 : _a[contextType];
34
+ if (!contextMapping) {
35
+ // check if it's a custom context type
36
+ contextMapping = (_c = (_b = this.getFdc3Options().gridDataContextMapping) === null || _b === void 0 ? void 0 : _b.custom) === null || _c === void 0 ? void 0 : _c[contextType];
37
+ }
34
38
  if (!contextMapping) {
35
39
  return { type: contextType };
36
40
  }
@@ -9,7 +9,7 @@ exports.ScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expre
9
9
  exports.ObservableQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-observable`;
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
- exports.CumulativeAggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-aggregation-scalar#cumulative-aggregation`;
12
+ exports.CumulativeAggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-cumulative`;
13
13
  exports.PredicateDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-predicate`;
14
14
  exports.PrimaryKeyDocsLink = `${exports.HOST_URL_DOCS}/guide/getting-started-primary-key`;
15
15
  exports.LicenseDocsLink = `${exports.HOST_URL_DOCS}/guide/licensing`;
@@ -63,6 +63,7 @@ class Fdc3Service {
63
63
  var _a;
64
64
  this.logFdc3Event('OUT', `raise ${intent}`, JSON.stringify(context));
65
65
  const intentResolution = await ((_a = this.getDesktopAgent()) === null || _a === void 0 ? void 0 : _a.raiseIntent(intent, context, app));
66
+ this.logFdc3Event('IN', `IntentResolution`, intentResolution.intent);
66
67
  this.getFdc3Api().internalApi.handleIntentResolution(intentResolution, context, intent, app);
67
68
  return intentResolution;
68
69
  }
@@ -70,8 +71,8 @@ class Fdc3Service {
70
71
  var _a;
71
72
  this.logFdc3Event('OUT', `raise for context`, JSON.stringify(context));
72
73
  const intentResolution = await ((_a = this.getDesktopAgent()) === null || _a === void 0 ? void 0 : _a.raiseIntentForContext(context, app));
73
- // TODO AFL
74
- // this.getFdc3Api().internalApi.handleIntentResolution(intentResolution, context, null, app);
74
+ this.logFdc3Event('IN', `IntentResolution`, intentResolution.intent);
75
+ this.getFdc3Api().internalApi.handleIntentResolution(intentResolution, context, null, app);
75
76
  return intentResolution;
76
77
  }
77
78
  broadcast(context) {
@@ -12,7 +12,7 @@ const QuickSearchInput = (props) => {
12
12
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
13
13
  const QuickSearchText = (0, react_redux_1.useSelector)((state) => state.QuickSearch.QuickSearchText);
14
14
  const dispatch = (0, react_redux_1.useDispatch)();
15
- const onRunQuickSearch = (newQuickSearchText) => dispatch(QuickSearchRedux.QuickSearchRun(newQuickSearchText));
15
+ const onRunQuickSearch = react_1.default.useCallback((newQuickSearchText) => dispatch(QuickSearchRedux.QuickSearchRun(newQuickSearchText)), []);
16
16
  const [searchText, search] = (0, useQuickSearchDebounced_1.useQuickSearchDebounced)({
17
17
  QuickSearchText,
18
18
  onRunQuickSearch,
@@ -378,7 +378,6 @@ export declare class Adaptable implements IAdaptable {
378
378
  setColumnSort(columnSorts: ColumnSort[]): void;
379
379
  clearColumnSort(): void;
380
380
  setGridData(dataSource: any[]): void;
381
- setInitialGridData(dataSource: any[]): void;
382
381
  getGridData(): any[];
383
382
  getFilteredData(): any[];
384
383
  updateRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
@@ -4277,9 +4277,6 @@ class Adaptable {
4277
4277
  this.gridOptions.api.setRowData(dataSource);
4278
4278
  this.updateColumnDataTypeIfRowDataIsEmpty();
4279
4279
  this.updateRowGroupsExpandedState();
4280
- }
4281
- setInitialGridData(dataSource) {
4282
- this.setGridData(dataSource);
4283
4280
  this.setupColumns();
4284
4281
  }
4285
4282
  getGridData() {
@@ -1287,6 +1287,19 @@ export declare const ADAPTABLE_METAMODEL: {
1287
1287
  name: string;
1288
1288
  kind: string;
1289
1289
  desc: string;
1290
+ props: ({
1291
+ name: string;
1292
+ kind: string;
1293
+ desc: string;
1294
+ isOpt: boolean;
1295
+ ref: string;
1296
+ } | {
1297
+ name: string;
1298
+ kind: string;
1299
+ desc: string;
1300
+ isOpt: boolean;
1301
+ ref?: undefined;
1302
+ })[];
1290
1303
  };
1291
1304
  BulkUpdatePermittedValues: {
1292
1305
  name: string;
@@ -3911,6 +3924,25 @@ export declare const ADAPTABLE_METAMODEL: {
3911
3924
  name: string;
3912
3925
  kind: string;
3913
3926
  desc: string;
3927
+ props: ({
3928
+ name: string;
3929
+ kind: string;
3930
+ desc: string;
3931
+ isOpt: boolean;
3932
+ ref: string;
3933
+ } | {
3934
+ name: string;
3935
+ kind: string;
3936
+ desc: string;
3937
+ isOpt: boolean;
3938
+ ref?: undefined;
3939
+ } | {
3940
+ name: string;
3941
+ kind: string;
3942
+ desc: string;
3943
+ isOpt?: undefined;
3944
+ ref?: undefined;
3945
+ })[];
3914
3946
  };
3915
3947
  RangeValueType: {
3916
3948
  name: string;