@adaptabletools/adaptable 15.4.2 → 15.4.3

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": "15.4.2",
3
+ "version": "15.4.3",
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: 1687108346180;
1
+ declare const _default: 1688649437408;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1687108346180;
3
+ exports.default = 1688649437408;
@@ -7,6 +7,9 @@ export declare type AdaptableNoCodeWizardInitFn = ({ gridOptions, adaptableOptio
7
7
  adaptableOptions: AdaptableOptions;
8
8
  agGridModules: Module[];
9
9
  }) => Promise<AdaptableApi>;
10
+ /**
11
+ * AdapTable Options used by the No Code Wizard
12
+ */
10
13
  export interface AdaptableNoCodeWizardOptions {
11
14
  onInit?: AdaptableNoCodeWizardInitFn;
12
15
  fileAccept?: string;
@@ -200,6 +200,9 @@ export interface FilterOptions<TData = any> {
200
200
  */
201
201
  quickFilterValuesWidth?: 'auto' | number;
202
202
  }
203
+ /**
204
+ * Context provided when Filtering
205
+ */
203
206
  export interface FilterContext<TData = any> extends BaseContext {
204
207
  /**
205
208
  * Column being filtered
@@ -214,6 +214,9 @@ export interface OrganizationColumn extends FDC3Column {
214
214
  */
215
215
  intents?: OrganizationIntents;
216
216
  }
217
+ /**
218
+ *
219
+ */
217
220
  export declare type OrganizationIntents = OrganizationIntent[];
218
221
  /**
219
222
  * FDC3 Intents available to an Organization Column
@@ -274,12 +277,33 @@ export interface RaiseFDC3IntentContext extends ContextMenuContext {
274
277
  */
275
278
  intent: FDC3Intent | CustomFDC3Intent;
276
279
  }
280
+ /**
281
+ * Function that handles FDC3 Context
282
+ */
277
283
  export declare type FDC3ContextHandler = (context: FDC3Context) => void;
284
+ /**
285
+ * Defines a Desktop Agent which supports FDC3
286
+ */
278
287
  export interface FDC3DesktopAgent {
288
+ /**
289
+ * Raises an Intent
290
+ */
279
291
  raiseIntent: (intent: FDC3Intent, context: FDC3Context) => void;
292
+ /**
293
+ * Broadcasts an FDC3 Message
294
+ */
280
295
  broadcast: (context: FDC3Context) => void;
296
+ /**
297
+ * Raises an FDC3 Intent for a given Context
298
+ */
281
299
  raiseIntentForContext: (context: FDC3Context) => void;
300
+ /**
301
+ * Adds an FDC3 Intent Listener
302
+ */
282
303
  addIntentListener: (intent: FDC3Intent | CustomFDC3Intent, listener: (context: FDC3Context) => void) => void;
304
+ /**
305
+ * Adds an FDC3 Context Listener
306
+ */
283
307
  addContextListener: (contextType: string | null, handler: FDC3ContextHandler) => {
284
308
  unsubscribe: () => void;
285
309
  };
@@ -65,6 +65,9 @@ export interface LayoutOptions {
65
65
  */
66
66
  pivotPreviewColumns?: string[] | ((context: PivotPreviewColumnsContext) => string[]);
67
67
  }
68
+ /**
69
+ * Options for managing Tags in Layouts (used to enhance Layouts)
70
+ */
68
71
  export interface LayoutTagOptions {
69
72
  /**
70
73
  * Automatically generate an AdaptableObjectTag for each Layout
@@ -58,6 +58,9 @@ export interface ToolPanelButtonContext extends BaseContext {
58
58
  */
59
59
  toolPanelState: ToolPanelState;
60
60
  }
61
+ /**
62
+ * Context used for Custom Tool Panels containing Buttons
63
+ */
61
64
  export interface CustomToolPanelButtonContext extends ToolPanelButtonContext {
62
65
  /**
63
66
  *The Custom ToolPanel which contains the button
@@ -185,11 +185,17 @@ export interface BulkUpdatePermittedValuesContext<TData = any> extends Permitted
185
185
  */
186
186
  gridCells: GridCell<TData>[];
187
187
  }
188
+ /**
189
+ * Sets of Tabs avilable in Grid Info Settings Panel
190
+ */
188
191
  export declare type GridInfoSections = GridInfoSection[];
189
192
  /**
190
193
  * Tabs available in the Grid Info Settings Panel
191
194
  */
192
195
  export declare type GridInfoSection = 'GridSummary' | 'AdaptableOptions' | 'ColumnInfo' | 'AdaptableObjects';
196
+ /**
197
+ * Context used when evaluating Object Tags
198
+ */
193
199
  export interface ObjectTagsContext extends BaseContext {
194
200
  }
195
201
  /**
@@ -98,7 +98,7 @@ export interface ExportApi {
98
98
  */
99
99
  exportDataToExcel(reportData: ReportData, fileName: string): void;
100
100
  /**
101
- * Opens Settings Panel with Export section selected and visible
101
+ * Open Settings Panel with Export section selected
102
102
  */
103
103
  openExportSettingsPanel(): void;
104
104
  /**
@@ -129,11 +129,11 @@ export interface ExportApi {
129
129
  */
130
130
  getExportDestinationForm(destinationName: string): AdaptableForm<ExportFormContext> | undefined;
131
131
  /**
132
- * Exports data currently in grid to Excel as What-You-See-Is-What-You-Get
132
+ * Exports data currently in grid to Excel as WYSIWYG
133
133
  */
134
134
  exportVisualDataToExcel(): void;
135
135
  /**
136
- * Whether the given Report is a user-generated (server) one
136
+ * Is given Report user-generated
137
137
  * @param report Report to Check
138
138
  */
139
139
  isServerReport(report: Report): boolean;
@@ -286,9 +286,29 @@ export interface GridApi {
286
286
  * @param columnId ColumnId to lookup
287
287
  */
288
288
  getRawValueFromRowNode(rowNode: IRowNode, columnId: string): any | undefined;
289
+ /**
290
+ * Returns all the Grid Cells in a Column that have the given Raw Value
291
+ * @param columnId ColumnId to lookup
292
+ * @param rawValue Raw Value to use
293
+ */
289
294
  getGridCellsForRawValue(columnId: string, rawValue: any): GridCell[] | undefined;
295
+ /**
296
+ * Gets the count of the cells in a Column that have the given Raw Value
297
+ * @param columnId ColumnId to lookup
298
+ * @param rawValue Raw Value to use
299
+ */
290
300
  getCellRawValueCount(columnId: string, rawValue: any): number;
301
+ /**
302
+ * Returns all the Grid Cells in a Column that have the given Display Value
303
+ * @param columnId ColumnId to lookup
304
+ * @param displayValue Display Value to use
305
+ */
291
306
  getGridCellsForDisplayValue(columnId: string, displayValue: any): GridCell[] | undefined;
307
+ /**
308
+ * Gets the count of the cells in a Column that have the given Display Value
309
+ * @param columnId ColumnId to lookup
310
+ * @param displayValue Display Value to use
311
+ */
292
312
  getCellDisplayValueCount(columnId: string, displayValue: any): number;
293
313
  /**
294
314
  * Retrieves Formatted Value for a given Raw Value in given Column
@@ -399,13 +399,13 @@ class GridApiImpl extends ApiBase_1.ApiBase {
399
399
  if (!gridCells) {
400
400
  return undefined;
401
401
  }
402
- const returnValues = [];
402
+ const returnGridCells = [];
403
403
  gridCells.forEach((gc) => {
404
404
  if (gc.displayValue === displayValue) {
405
- returnValues.push(gc);
405
+ returnGridCells.push(gc);
406
406
  }
407
407
  });
408
- return returnValues;
408
+ return returnGridCells;
409
409
  }
410
410
  getCellDisplayValueCount(columnId, displayValue) {
411
411
  const gridCells = this.getGridCellsForDisplayValue(columnId, displayValue);
@@ -37,11 +37,11 @@ export interface AlertDefinition extends SuspendableObject {
37
37
  */
38
38
  MessageType: AdaptableMessageType;
39
39
  /**
40
- * The Alert Title Message to display
40
+ * Title of dipslayed Alert Message
41
41
  */
42
42
  MessageHeader?: string;
43
43
  /**
44
- * Alert Message; if not provided AdapTable creates dynamically using Rule & Scope (Note: can be provided as a function in AlertOptions)
44
+ * Title of dipslayed Alert Message; if null, AdapTable creates dynamically using Rule & Scope
45
45
  */
46
46
  MessageText?: string;
47
47
  /**
@@ -53,6 +53,9 @@ export interface AlertDefinition extends SuspendableObject {
53
53
  */
54
54
  AlertForm?: string | AlertButtonForm;
55
55
  }
56
+ /**
57
+ * Form triggered by an Alert which contains only Buttons
58
+ */
56
59
  export declare type AlertButtonForm = Omit<AdaptableForm<AlertFormContext>, 'title' | 'buttons' | 'description'> & {
57
60
  Buttons?: AlertButton<AlertFormContext>[];
58
61
  };
@@ -104,15 +107,15 @@ export interface AlertProperties {
104
107
  */
105
108
  DisplayNotification?: boolean;
106
109
  /**
107
- * Notifiction duration, it defaults to NotificationOptions.duration
110
+ * Notifiction duration(defaults to `NotificationOptions.duration`)
108
111
  */
109
112
  NotificationDuration?: NotificationsOptions['duration'];
110
113
  /**
111
- * Colours updated cell using `MessageType` property of triggering Alert Definition
114
+ * Colours updated Row using `MessageType` of triggering Alert Definition
112
115
  */
113
116
  HighlightCell?: boolean | AdaptableStyle;
114
117
  /**
115
- * Colours updated cell using `MessageType` property of triggering Alert Definition
118
+ * Colours updated Row using `MessageType` of triggering Alert Definition
116
119
  */
117
120
  HighlightRow?: boolean | AdaptableStyle;
118
121
  /**
@@ -15,9 +15,12 @@ export interface AdaptablePredicate {
15
15
  */
16
16
  Inputs?: any[];
17
17
  }
18
+ /**
19
+ * Restricts a Predicate to a given Column
20
+ */
18
21
  export interface AdaptableColumnPredicate extends AdaptablePredicate {
19
22
  /**
20
- * If specified, ColumnId restricts the predicate evaluation to the given column
23
+ * Id of Column which will be evaluated by the Predicate
21
24
  */
22
25
  ColumnId?: string;
23
26
  }
@@ -68,6 +71,9 @@ export interface AdaptablePredicateDef {
68
71
  */
69
72
  onlyQuickFilter?: boolean;
70
73
  }
74
+ /**
75
+ * Defines an Input to a Predicate
76
+ */
71
77
  export interface PredicateDefInput {
72
78
  type: 'number' | 'text' | 'date' | 'boolean';
73
79
  label?: string;
@@ -106,9 +112,15 @@ export interface PredicateDefHandlerParams {
106
112
  */
107
113
  api: AdaptableApi;
108
114
  }
115
+ /**
116
+ * Inputs required for a Predicate
117
+ */
109
118
  export interface PredicateDefToStringParams {
110
119
  inputs: any[];
111
120
  }
121
+ /**
122
+ * Defines which in Modules the Predicate is available
123
+ */
112
124
  export declare type PredicateModuleScope = 'filter' | 'alert' | 'flashingcell' | 'formatColumn' | 'badgeStyle';
113
125
  /**
114
126
  * Array of Predicate Defs which are shipped by AdapTable
@@ -1,4 +1,7 @@
1
1
  import { AdaptableModule } from './Types';
2
+ /**
3
+ * Defines a Permission in AdapTable - Module and Access Level
4
+ */
2
5
  export interface Entitlement {
3
6
  /**
4
7
  * Name of Adaptable Module that has the Entitlement applied
@@ -69,6 +69,9 @@ export interface PercentBarStyle extends NumericStyledColumn {
69
69
  */
70
70
  BackColor?: string;
71
71
  }
72
+ /**
73
+ * Base type for Numeric Styled Columns (i.e. Gradient and Percent Bar)
74
+ */
72
75
  export interface NumericStyledColumn {
73
76
  /**
74
77
  * Ranges (e.g. to create traffic light effect)
@@ -21,6 +21,13 @@ const QuickFilterValues = (props) => {
21
21
  counter: 0,
22
22
  });
23
23
  const [transientColumnFilter, setTransientColumnFilter] = React.useState(null);
24
+ const clearColumnFilter = () => {
25
+ var _a;
26
+ props.clearColumnFilter();
27
+ if (!((_a = props.api.optionsApi.getFilterOptions()) === null || _a === void 0 ? void 0 : _a.autoApplyFilter)) {
28
+ props.api.gridApi.applyGridFiltering();
29
+ }
30
+ };
24
31
  const onColumnValueSelectedChange = (columnValues) => {
25
32
  var _a;
26
33
  const { columnFilter } = props;
@@ -151,7 +158,7 @@ const QuickFilterValues = (props) => {
151
158
  width: getPopoverWidth(targetWidth),
152
159
  } },
153
160
  React.createElement(rebass_1.Flex, { m: 2 },
154
- React.createElement(SimpleButton_1.default, { onClick: () => props.clearColumnFilter() }, "Clear Filter"),
161
+ React.createElement(SimpleButton_1.default, { onClick: () => clearColumnFilter() }, "Clear Filter"),
155
162
  ((_a = api.optionsApi.getFilterOptions()) === null || _a === void 0 ? void 0 : _a.autoApplyFilter) == false && (React.createElement(SimpleButton_1.default, { ml: 2, onClick: () => {
156
163
  if (transientColumnFilter) {
157
164
  props.updateColumnFilter(transientColumnFilter);
@@ -67,6 +67,7 @@ const ChartingService_1 = require("../Utilities/Services/ChartingService");
67
67
  const ThemeService_1 = require("../Utilities/Services/ThemeService");
68
68
  const AdaptableLogger_1 = require("./AdaptableLogger");
69
69
  const attachAddaptableColumnTypes_1 = require("./attachAddaptableColumnTypes");
70
+ const FormatHelper_1 = require("../Utilities/Helpers/FormatHelper");
70
71
  const tinycolor = require('tinycolor2');
71
72
  const GROUP_PATH_SEPARATOR = '/';
72
73
  // IMPORTANT - we need colId to be set in order for safeSetColDefs to work correctly
@@ -4651,11 +4652,10 @@ class Adaptable {
4651
4652
  }
4652
4653
  const excelDataType = this.api.exportApi.internalApi.getExcelDataType(colDef === null || colDef === void 0 ? void 0 : colDef.type);
4653
4654
  const rawValue = this.getRawValueFromRowNode(node, column.getId());
4654
- // don't add the cell style if it has no adaptable custom styles or user defined styles
4655
- if (rawValue == undefined ||
4656
- (!excelStyles.length &&
4657
- // if this is a formatted Date value, we still need to add the AG GRID specific type & numberFormat below
4658
- !(excelDataType === 'DateTime' && isDateCellExportedAsFormattedValue))) {
4655
+ // don't add the cell style if it has no adaptable custom styles
4656
+ if (!excelStyles.length &&
4657
+ // if this is a formatted Date value, we still need to add the AG GRID specific type & numberFormat below
4658
+ !(excelDataType === 'DateTime' && isDateCellExportedAsFormattedValue)) {
4659
4659
  return;
4660
4660
  }
4661
4661
  const cellClassId = this.getExcelClassNameForCell(column.getId(), this.getPrimaryKeyValueFromRowNode(node), userDefinedCellClass);
@@ -4674,9 +4674,10 @@ class Adaptable {
4674
4674
  if (normalisedValue) {
4675
4675
  // we have to pass the date in the ISO format to Excel
4676
4676
  // see https://www.ag-grid.com/javascript-data-grid/excel-export-data-types/#dates
4677
- // we also need to remove the timezone info from the date
4678
- const dateWithoutTimezoneCorrection = new Date(Date.UTC(normalisedValue.getFullYear(), normalisedValue.getMonth(), normalisedValue.getDate()));
4679
- const isoFormattedValue = dateWithoutTimezoneCorrection.toISOString();
4677
+ // we can NOT use Date.toISOString() because we don't want the timezone corrections to kick in
4678
+ const isoFormattedValue = (0, FormatHelper_1.DateFormatter)(normalisedValue, {
4679
+ Pattern: `yyyy-MM-dd'T'HH:mm:ss.SSS`,
4680
+ });
4680
4681
  if (isoFormattedValue) {
4681
4682
  finalCellExcelStyle.dataType = 'DateTime';
4682
4683
  finalCellExcelStyle.numberFormat = { format: dateFormatPattern };
@@ -284,6 +284,17 @@ export declare const ADAPTABLE_METAMODEL: {
284
284
  kind: string;
285
285
  desc: string;
286
286
  };
287
+ AdaptableColumnPredicate: {
288
+ name: string;
289
+ kind: string;
290
+ desc: string;
291
+ props: {
292
+ name: string;
293
+ kind: string;
294
+ desc: string;
295
+ isOpt: boolean;
296
+ }[];
297
+ };
287
298
  AdaptableColumnType: {
288
299
  name: string;
289
300
  kind: string;
@@ -514,6 +525,11 @@ export declare const ADAPTABLE_METAMODEL: {
514
525
  kind: string;
515
526
  desc: string;
516
527
  };
528
+ AdaptableNoCodeWizardOptions: {
529
+ name: string;
530
+ kind: string;
531
+ desc: string;
532
+ };
517
533
  AdaptableObject: {
518
534
  name: string;
519
535
  kind: string;
@@ -975,6 +991,11 @@ export declare const ADAPTABLE_METAMODEL: {
975
991
  ref?: undefined;
976
992
  })[];
977
993
  };
994
+ AlertButtonForm: {
995
+ name: string;
996
+ kind: string;
997
+ desc: string;
998
+ };
978
999
  AlertDefinition: {
979
1000
  name: string;
980
1001
  kind: string;
@@ -2008,6 +2029,17 @@ export declare const ADAPTABLE_METAMODEL: {
2008
2029
  ref?: undefined;
2009
2030
  })[];
2010
2031
  };
2032
+ CustomToolPanelButtonContext: {
2033
+ name: string;
2034
+ kind: string;
2035
+ desc: string;
2036
+ props: {
2037
+ name: string;
2038
+ kind: string;
2039
+ desc: string;
2040
+ ref: string;
2041
+ }[];
2042
+ };
2011
2043
  DashboardButtonContext: {
2012
2044
  name: string;
2013
2045
  kind: string;
@@ -2271,6 +2303,17 @@ export declare const ADAPTABLE_METAMODEL: {
2271
2303
  defVal?: undefined;
2272
2304
  })[];
2273
2305
  };
2306
+ Entitlement: {
2307
+ name: string;
2308
+ kind: string;
2309
+ desc: string;
2310
+ props: {
2311
+ name: string;
2312
+ kind: string;
2313
+ desc: string;
2314
+ ref: string;
2315
+ }[];
2316
+ };
2274
2317
  EntitlementContext: {
2275
2318
  name: string;
2276
2319
  kind: string;
@@ -2402,6 +2445,11 @@ export declare const ADAPTABLE_METAMODEL: {
2402
2445
  isOpt: boolean;
2403
2446
  }[];
2404
2447
  };
2448
+ ExpressionCategory: {
2449
+ name: string;
2450
+ kind: string;
2451
+ desc: string;
2452
+ };
2405
2453
  ExpressionContext: {
2406
2454
  name: string;
2407
2455
  kind: string;
@@ -2522,6 +2570,16 @@ export declare const ADAPTABLE_METAMODEL: {
2522
2570
  kind: string;
2523
2571
  desc: string;
2524
2572
  };
2573
+ FDC3DesktopAgent: {
2574
+ name: string;
2575
+ kind: string;
2576
+ desc: string;
2577
+ props: {
2578
+ name: string;
2579
+ kind: string;
2580
+ desc: string;
2581
+ }[];
2582
+ };
2525
2583
  FDC3Intent: {
2526
2584
  name: string;
2527
2585
  kind: string;
@@ -2543,6 +2601,16 @@ export declare const ADAPTABLE_METAMODEL: {
2543
2601
  isOpt: boolean;
2544
2602
  })[];
2545
2603
  };
2604
+ FilterContext: {
2605
+ name: string;
2606
+ kind: string;
2607
+ desc: string;
2608
+ props: {
2609
+ name: string;
2610
+ kind: string;
2611
+ desc: string;
2612
+ }[];
2613
+ };
2546
2614
  FilterOptions: {
2547
2615
  name: string;
2548
2616
  kind: string;
@@ -3055,6 +3123,11 @@ export declare const ADAPTABLE_METAMODEL: {
3055
3123
  kind: string;
3056
3124
  desc: string;
3057
3125
  };
3126
+ GridInfoSections: {
3127
+ name: string;
3128
+ kind: string;
3129
+ desc: string;
3130
+ };
3058
3131
  GridRow: {
3059
3132
  name: string;
3060
3133
  kind: string;
@@ -3317,6 +3390,18 @@ export declare const ADAPTABLE_METAMODEL: {
3317
3390
  isOpt: boolean;
3318
3391
  }[];
3319
3392
  };
3393
+ LayoutTagOptions: {
3394
+ name: string;
3395
+ kind: string;
3396
+ desc: string;
3397
+ props: {
3398
+ name: string;
3399
+ kind: string;
3400
+ desc: string;
3401
+ isOpt: boolean;
3402
+ defVal: string;
3403
+ }[];
3404
+ };
3320
3405
  LayoutViewOptions: {
3321
3406
  name: string;
3322
3407
  kind: string;
@@ -3452,6 +3537,38 @@ export declare const ADAPTABLE_METAMODEL: {
3452
3537
  isOpt: boolean;
3453
3538
  }[];
3454
3539
  };
3540
+ NumericStyledColumn: {
3541
+ name: string;
3542
+ kind: string;
3543
+ desc: string;
3544
+ props: ({
3545
+ name: string;
3546
+ kind: string;
3547
+ desc: string;
3548
+ isOpt: boolean;
3549
+ ref?: undefined;
3550
+ defVal?: undefined;
3551
+ } | {
3552
+ name: string;
3553
+ kind: string;
3554
+ desc: string;
3555
+ isOpt: boolean;
3556
+ ref: string;
3557
+ defVal?: undefined;
3558
+ } | {
3559
+ name: string;
3560
+ kind: string;
3561
+ desc: string;
3562
+ isOpt: boolean;
3563
+ defVal: string;
3564
+ ref: string;
3565
+ })[];
3566
+ };
3567
+ ObjectTagsContext: {
3568
+ name: string;
3569
+ kind: string;
3570
+ desc: string;
3571
+ };
3455
3572
  OpenFinPluginOptions: {
3456
3573
  name: string;
3457
3574
  kind: string;
@@ -3728,6 +3845,21 @@ export declare const ADAPTABLE_METAMODEL: {
3728
3845
  ref?: undefined;
3729
3846
  })[];
3730
3847
  };
3848
+ PredicateDefInput: {
3849
+ name: string;
3850
+ kind: string;
3851
+ desc: string;
3852
+ };
3853
+ PredicateDefToStringParams: {
3854
+ name: string;
3855
+ kind: string;
3856
+ desc: string;
3857
+ };
3858
+ PredicateModuleScope: {
3859
+ name: string;
3860
+ kind: string;
3861
+ desc: string;
3862
+ };
3731
3863
  PredicateOptions: {
3732
3864
  name: string;
3733
3865
  kind: string;