@adaptabletools/adaptable 16.0.1-canary.0 → 16.0.1

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.
Files changed (62) hide show
  1. package/bundle.cjs.js +162 -164
  2. package/package.json +1 -1
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -1
  6. package/src/AdaptableOptions/AdaptableOptions.d.ts +6 -1
  7. package/src/AdaptableOptions/AdaptablePlugin.js +2 -0
  8. package/src/AdaptableOptions/CalendarOptions.d.ts +3 -3
  9. package/src/AdaptableOptions/CommentsOptions.d.ts +23 -0
  10. package/src/AdaptableOptions/Fdc3Options.d.ts +69 -53
  11. package/src/AdaptableOptions/FilterOptions.d.ts +7 -2
  12. package/src/AdaptableOptions/FinancePluginOptions.d.ts +2 -306
  13. package/src/AdaptableOptions/OpenFinPluginOptions.d.ts +0 -6
  14. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +0 -17
  15. package/src/Api/CommentsApi.d.ts +6 -6
  16. package/src/Api/EventApi.d.ts +2 -14
  17. package/src/Api/GridApi.d.ts +13 -13
  18. package/src/Api/Implementation/ApiBase.d.ts +2 -0
  19. package/src/Api/Implementation/ApiBase.js +3 -0
  20. package/src/Api/Implementation/CalendarApiImpl.js +1 -2
  21. package/src/Api/Implementation/CommentsApiImpl.d.ts +3 -3
  22. package/src/Api/Implementation/CommentsApiImpl.js +3 -3
  23. package/src/Api/Implementation/GridApiImpl.js +2 -2
  24. package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -1
  25. package/src/Api/Implementation/OptionsApiImpl.js +3 -0
  26. package/src/Api/Implementation/PluginsApiImpl.d.ts +0 -2
  27. package/src/Api/Implementation/PluginsApiImpl.js +0 -6
  28. package/src/Api/Internal/AdaptableInternalApi.js +1 -1
  29. package/src/Api/Internal/Fdc3InternalApi.js +2 -2
  30. package/src/Api/OptionsApi.d.ts +5 -1
  31. package/src/Api/PluginsApi.d.ts +0 -5
  32. package/src/PredefinedConfig/CommentsState.d.ts +33 -3
  33. package/src/PredefinedConfig/Common/Entitlement.d.ts +1 -1
  34. package/src/PredefinedConfig/Common/Fdc3Context.d.ts +6 -0
  35. package/src/PredefinedConfig/SystemState.d.ts +2 -2
  36. package/src/Redux/ActionsReducers/SystemRedux.d.ts +4 -4
  37. package/src/Strategy/CommentsModule.d.ts +2 -2
  38. package/src/Strategy/CommentsModule.js +11 -11
  39. package/src/Strategy/Fdc3Module.d.ts +0 -1
  40. package/src/Strategy/Fdc3Module.js +0 -3
  41. package/src/Utilities/Constants/GeneralConstants.d.ts +0 -1
  42. package/src/Utilities/Constants/GeneralConstants.js +2 -3
  43. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -1
  44. package/src/Utilities/Services/ModuleService.js +1 -1
  45. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +10 -7
  46. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +1 -7
  47. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +621 -268
  48. package/src/View/Comments/CommentPopup.js +5 -5
  49. package/src/agGrid/Adaptable.d.ts +3 -2
  50. package/src/agGrid/Adaptable.js +8 -2
  51. package/src/agGrid/attachAddaptableColumnTypes.js +1 -0
  52. package/src/metamodel/adaptable.metamodel.d.ts +55 -394
  53. package/src/metamodel/adaptable.metamodel.js +1 -1
  54. package/src/types.d.ts +4 -6
  55. package/version.d.ts +1 -1
  56. package/version.js +1 -1
  57. package/src/Api/FinanceApi.d.ts +0 -125
  58. package/src/PredefinedConfig/Common/FDC3Context_DEPR.d.ts +0 -246
  59. package/src/PredefinedConfig/Common/FDC3Context_DEPR.js +0 -2
  60. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/index.d.ts +0 -1
  61. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/index.js +0 -5
  62. /package/src/{Api/FinanceApi.js → AdaptableOptions/CommentsOptions.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "16.0.1-canary.0",
3
+ "version": "16.0.1",
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: 1691780853920;
1
+ declare const _default: 1692249290030;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1691780853920;
3
+ exports.default = 1692249290030;
@@ -156,7 +156,8 @@ export interface IAdaptable {
156
156
  jumpToColumn(columnId: string): void;
157
157
  jumpToCell(columnId: string, rowNode: IRowNode): void;
158
158
  getAgGridContainerElement(): HTMLElement | null;
159
- setDataSource(dataSource: any): void;
159
+ setInitialGridData(dataSource: any): void;
160
+ setGridData(dataSource: any): void;
160
161
  getGridData(): any[];
161
162
  getFilteredData(): any[];
162
163
  updateRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
@@ -30,6 +30,7 @@ import { CalendarOptions } from './CalendarOptions';
30
30
  import { QuickSearchOptions } from './QuickSearchOptions';
31
31
  import { FormatColumnOptions } from './FormatColumnOptions';
32
32
  import { Fdc3Options } from './Fdc3Options';
33
+ import { CommentOptions } from './CommentsOptions';
33
34
  /**
34
35
  * Large group of options enabling developers to set up AdapTable at design time to fit precise requirements
35
36
  */
@@ -103,7 +104,7 @@ export interface AdaptableOptions<TData = any> {
103
104
  /**
104
105
  * Options for managing Holidays and Working Days
105
106
  */
106
- calendarOptions?: CalendarOptions<TData>;
107
+ calendarOptions?: CalendarOptions;
107
108
  /**
108
109
  * Options for adding custom Cell Summaries
109
110
  */
@@ -122,6 +123,10 @@ export interface AdaptableOptions<TData = any> {
122
123
  * Options for setting the 'Div' elements in which AdapTable, AG Grid, popups are placed
123
124
  */
124
125
  containerOptions?: ContainerOptions;
126
+ /**
127
+ * Options for managing AdapTable Comments
128
+ */
129
+ commentOptions?: CommentOptions;
125
130
  /**
126
131
  * Options for using Custom Sort
127
132
  */
@@ -25,6 +25,8 @@ class AdaptablePlugin {
25
25
  return !!this.values[name];
26
26
  }
27
27
  // plugin lifecycle methods, executed in this exact order
28
+ // wondering if this is better?
29
+ // beforeInit(adaptableOptions: AdaptableOptions, gridOptions: GridOptions): void {}
28
30
  beforeInit(adaptableOptions) { }
29
31
  afterInitOptions(adaptable, adaptableOptions) { }
30
32
  afterInitApi(adaptable, api) { }
@@ -2,10 +2,10 @@ import { BaseContext } from '../../types';
2
2
  /**
3
3
  * Options for managing Holidays and Working Days in AdapTable
4
4
  */
5
- export interface CalendarOptions<TData = any> {
5
+ export interface CalendarOptions {
6
6
  /**
7
- * Holidays - used to determine Working Days
7
+ * Holidays for current User
8
8
  * @defaultValue null
9
9
  */
10
- holidays?: string[] | ((baseContext: BaseContext) => string[] | undefined);
10
+ holidays?: Date[] | ((baseContext: BaseContext) => Date[] | undefined);
11
11
  }
@@ -0,0 +1,23 @@
1
+ import { BaseContext } from '../../types';
2
+ /**
3
+ * Options for managing AdapTable Comments
4
+ */
5
+ export interface CommentOptions<TData = any> {
6
+ /**
7
+ * Whether a cell can be commented on
8
+ */
9
+ isCellCommentable?: (context: CommmentableCellContext) => boolean;
10
+ }
11
+ /**
12
+ * Context used when determining if a Comment can be added to a Cell
13
+ */
14
+ export interface CommmentableCellContext extends BaseContext {
15
+ /**
16
+ * Value in Primary Key Column
17
+ */
18
+ primaryKeyValue: string;
19
+ /**
20
+ * Column where Comment will be displayed
21
+ */
22
+ columnId: string;
23
+ }
@@ -10,80 +10,74 @@ import { ButtonStyle } from '../PredefinedConfig/Common/ButtonStyle';
10
10
  */
11
11
  export interface Fdc3Options {
12
12
  /**
13
- * Enable FDC3 in AdapTable
14
- *
15
- * @defaultValue false
16
- */
17
- enableFdc3?: boolean;
18
- /**
19
- * Enable logging of message exchanges in the Console
13
+ * Enable logging message exchanges to Console
20
14
  *
21
15
  * @defaultValue false
22
16
  */
23
17
  enableLogging?: boolean;
24
18
  /**
25
- * Maps the Context Type to the AdapTable Grid Data
19
+ * Maps Context Type to AdapTable Grid Data
26
20
  */
27
21
  gridDataContextMapping?: GridDataContextMapping;
28
22
  /**
29
- * Builds the Context Data (useful for postprocessing the Context Data mapped from the grid data)
23
+ * Builds Context Data (useful for postprocessing Context Data mapped from Grid data)
30
24
  */
31
25
  resolveContextData?: (context: ResolveContextDataContext) => Fdc3Context;
32
26
  /**
33
- * Configures the FDC3 standard Intents that AdaptTable will listen for and raise
27
+ * Configures FDC3 standard Intents that AdapTable will listen for and raise
34
28
  */
35
29
  intents?: {
36
30
  /**
37
- * Subscribe to the given standard Intent(s)
31
+ * Subscribe to given standard Intent(s)
38
32
  */
39
33
  listensFor?: Fdc3IntentType[];
40
34
  /**
41
- * Raises the given standard Intent(s) on various Grid Actions
35
+ * Raises given standard Intent(s) on various Grid Actions
42
36
  */
43
37
  raises?: {
44
38
  [K in Fdc3IntentType]?: RaiseIntentConfig<K>[];
45
39
  };
46
40
  };
47
41
  /**
48
- * Configures the FDC3 custom Intents that AdaptTable will listen for and raise
42
+ * Configures FDC3 custom Intents that AdapTable will listen for and raise
49
43
  */
50
44
  customIntents?: {
51
45
  /**
52
- * Subscribe to the given custom Intent(s)
46
+ * Subscribe to given custom Intent(s)
53
47
  */
54
48
  listensFor?: Fdc3CustomIntentType[];
55
49
  /**
56
- * Raises the given custom Intent(s) on various Grid Actions
50
+ * Raises given custom Intent(s) on various Grid Actions
57
51
  */
58
52
  raises?: {
59
53
  [K in Fdc3CustomIntentType]: RaiseIntentConfig[];
60
54
  };
61
55
  };
62
56
  /**
63
- * Configures the FDC3 standard Contexts that AdaptTable will listen for and broadcast
57
+ * Configures FDC3 standard Contexts that AdapTable will listen for and broadcast
64
58
  */
65
59
  contexts?: {
66
60
  /**
67
- * Subscribe to the given standard Context(s)
61
+ * Subscribe to given standard Context(s)
68
62
  */
69
63
  listensFor?: Fdc3ContextType[];
70
64
  /**
71
- * Broadcasts the given standard Context(s) on various Grid Actions
65
+ * Broadcasts given standard Context(s) on various Grid Actions
72
66
  */
73
67
  broadcasts?: {
74
68
  [K in Fdc3ContextType]?: BroadcastConfig;
75
69
  };
76
70
  };
77
71
  /**
78
- * Configures the FDC3 custom Contexts that AdaptTable will listen for and broadcast
72
+ * Configures FDC3 custom Contexts that AdapTable will listen for and broadcast
79
73
  */
80
74
  customContexts?: {
81
75
  /**
82
- * Subscribe to the given custom Context(s)
76
+ * Subscribe to given custom Context(s)
83
77
  */
84
78
  listensFor?: Fdc3CustomContextType[];
85
79
  /**
86
- * Broadcasts the given custom Context(s) on various Grid Actions
80
+ * Broadcasts given custom Context(s) on various Grid Actions
87
81
  */
88
82
  broadcasts?: {
89
83
  [K in Fdc3CustomContextType]?: BroadcastConfig;
@@ -98,49 +92,62 @@ export interface Fdc3Options {
98
92
  */
99
93
  handleContext?: (context: HandleFdc3Context) => void;
100
94
  /**
101
- * Customises the FDC3 Actions column
95
+ * Customises FDC3 Actions column
102
96
  */
103
- actionColumnDefaultConfiguration?: {
104
- /**
105
- * @defaultValue 'FDC3 Actions'
106
- */
107
- headerName?: string;
108
- /**
109
- * @defaultValue '200' (pixels)
110
- */
111
- width?: number;
112
- /**
113
- * @defaultValue true
114
- */
115
- resizable?: boolean;
116
- /**
117
- * @defaultValue true
118
- */
119
- movable?: boolean;
120
- };
97
+ actionColumnDefaultConfiguration?: ActionColumnDefaultConfiguration;
121
98
  }
122
99
  /**
123
- * Context used when resolving FDC3 Context Data
100
+ * Default configuration to use for an FDC3 ACtion Column
101
+ */
102
+ export interface ActionColumnDefaultConfiguration {
103
+ /**
104
+ * Column Id
105
+ * @defaultValue 'fdc3ActionColumn'
106
+ */
107
+ columnId?: string;
108
+ /**
109
+ * Column Header
110
+ * @defaultValue 'FDC3 Actions'
111
+ */
112
+ headerName?: string;
113
+ /**
114
+ * Column Width in pixels
115
+ * @defaultValue 200
116
+ */
117
+ width?: number;
118
+ /**
119
+ * If Column is resizable
120
+ * @defaultValue true
121
+ */
122
+ resizable?: boolean;
123
+ /**
124
+ * If Column is moveable
125
+ * @defaultValue true
126
+ */
127
+ movable?: boolean;
128
+ }
129
+ /**
130
+ * Used to build Context Data
124
131
  */
125
132
  export interface ResolveContextDataContext extends BaseContext {
126
133
  /**
127
- * The FDC3 Context Type
134
+ * FDC3 Context Type
128
135
  */
129
136
  contextType: Fdc3ContextType | Fdc3CustomContextType;
130
137
  /**
131
- * The FDC3 Context Data which has been mapped from the grid data based on the given configuration in `gridDataContextMapping`
138
+ * FDC3 Context Data which has been mapped from the grid data based on the given configuration in `gridDataContextMapping`
132
139
  */
133
140
  contextMappedFromGridData?: Fdc3Context;
134
141
  /**
135
- * The row node which is the source of the context data
142
+ * Row Node which is source of the context data
136
143
  */
137
144
  rowNode: IRowNode;
138
145
  /**
139
- * The row data which is the source of the context data
146
+ * Row data which is the source of the context data
140
147
  */
141
148
  rowData: any;
142
149
  /**
143
- * Primary key value of row
150
+ * Primary Key value of row
144
151
  */
145
152
  primaryKeyValue: any;
146
153
  }
@@ -158,7 +165,7 @@ export interface HandleFdc3Context extends BaseContext {
158
165
  metadata?: ContextMetadata;
159
166
  }
160
167
  /**
161
- * Context used when handling incoming FDC3 messages
168
+ * Context used when handling incoming FDC3 Intents
162
169
  */
163
170
  export interface HandleFdc3IntentContext extends HandleFdc3Context {
164
171
  /**
@@ -189,6 +196,9 @@ export declare const ColumnRefTypePrefix = "_colId.";
189
196
  export declare const FieldRefTypePrefix = "_field.";
190
197
  export declare type GridDataRef = `_colId.${string}` | `_field.${string}`;
191
198
  export declare type Fdc3ContentMapping<T> = PropertiesToGridRefs<Omit<T, 'type'>>;
199
+ /**
200
+ * Config used when raising an FDC3 Intent
201
+ */
192
202
  export interface RaiseIntentConfig<K extends Fdc3IntentType = any> {
193
203
  contextType: CompatibleContext<K>;
194
204
  contextMenu?: {
@@ -203,6 +213,9 @@ export interface RaiseIntentConfig<K extends Fdc3IntentType = any> {
203
213
  };
204
214
  handleIntentResolution?: (context: HandleFdc3IntentResolutionContext) => Promise<IntentResult>;
205
215
  }
216
+ /**
217
+ * Config used when broadcasting FDC3 Context
218
+ */
206
219
  export interface BroadcastConfig {
207
220
  contextMenu?: {
208
221
  columnIds: string[];
@@ -249,33 +262,36 @@ export interface Fdc3ButtonContext extends BaseContext {
249
262
  */
250
263
  primaryKeyValue: any;
251
264
  }
265
+ /**
266
+ * Button used in FDC3 Action Columns
267
+ */
252
268
  export interface Fdc3AdaptableButton {
253
269
  /**
254
270
  * Unique id for the button
255
271
  */
256
272
  id: string;
257
273
  /**
258
- * Icon for Button - can be object or function that provides a `AdaptableIcon` object
274
+ * Button's Icon; can be object or function that provides `AdaptableIcon` object
259
275
  */
260
276
  icon?: '_defaultFdc3' | AdaptableIcon | ((button: Fdc3AdaptableButton, context: Fdc3ButtonContext) => AdaptableIcon);
261
277
  /**
262
- * Label for Button - can be string or function that provides string
278
+ * Button' Label; can be string or function that provides string
263
279
  */
264
280
  label?: '_defaultFdc3' | string | ((button: Fdc3AdaptableButton, context: Fdc3ButtonContext) => string);
265
281
  /**
266
- * Tooltip for Button - can be string or function that provides string
282
+ * Button's Tooltip; can be string or function that provides string
267
283
  */
268
284
  tooltip?: '_defaultFdc3' | string | ((button: Fdc3AdaptableButton, context: Fdc3ButtonContext) => string);
269
285
  /**
270
- * Style for Button - can be object or function that provides a `ButtonStyle` object
286
+ * Button's Style; can be object or function that provides `ButtonStyle` object
271
287
  */
272
288
  buttonStyle?: ButtonStyle | ((button: Fdc3AdaptableButton, context: Fdc3ButtonContext) => ButtonStyle);
273
289
  /**
274
- * Function that disables / enables the button based on its evaluation result
290
+ * Function to disable / enable button based on evaluation result
275
291
  */
276
292
  disabled?: (button: Fdc3AdaptableButton, context: Fdc3ButtonContext) => boolean;
277
293
  /**
278
- * Function which sets whether Button is hidden
294
+ * Function to hide the Button
279
295
  */
280
296
  hidden?: (button: Fdc3AdaptableButton, context: Fdc3ButtonContext) => boolean;
281
297
  }
@@ -7,13 +7,13 @@ import { StrictExtract } from '../Utilities/Extensions/TypeExtensions';
7
7
  */
8
8
  export interface FilterOptions<TData = any> {
9
9
  /**
10
- * Hides the Dropdown in Quick Filter Bar for a given Column
10
+ * Hides Dropdown in Quick Filter Bar for a given Column
11
11
  *
12
12
  * @defaultValue undefined
13
13
  */
14
14
  hideQuickFilterDropdown?: (filterContext: FilterContext<TData>) => boolean;
15
15
  /**
16
- * Hides the Input in Quick Filter Bar for a given Column
16
+ * Hides Input in Quick Filter Bar for a given Column
17
17
  *
18
18
  * @defaultValue undefined
19
19
  */
@@ -155,6 +155,11 @@ export interface FilterOptions<TData = any> {
155
155
  * @noCodeItem
156
156
  */
157
157
  showQuickFilter?: boolean;
158
+ /**
159
+ * If Values filter should filter on datetime rather than date
160
+ * @defaultValue true
161
+ * @noCodeItem
162
+ */
158
163
  filterUsingTime?: boolean;
159
164
  /**
160
165
  * Display only currently filtered distinct values in Filter controls