@adaptabletools/adaptable 11.2.3 → 11.3.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.
Files changed (89) hide show
  1. package/bundle.cjs.js +106 -106
  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 -0
  6. package/src/AdaptableOptions/AdaptableOptions.d.ts +7 -0
  7. package/src/AdaptableOptions/EditOptions.d.ts +92 -4
  8. package/src/AdaptableOptions/FinancePluginOptions.d.ts +33 -3
  9. package/src/AdaptableOptions/FormatColumnOptions.d.ts +10 -0
  10. package/src/AdaptableOptions/{SmartEdit.js → FormatColumnOptions.js} +0 -0
  11. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +17 -3
  12. package/src/Api/ColumnApi.d.ts +4 -1
  13. package/src/Api/EventApi.d.ts +4 -1
  14. package/src/Api/Events/RowFormSubmitted.d.ts +19 -0
  15. package/src/Api/Events/RowFormSubmitted.js +2 -0
  16. package/src/Api/FinanceApi.d.ts +3 -2
  17. package/src/Api/FormatColumnApi.d.ts +28 -1
  18. package/src/Api/GridApi.d.ts +14 -0
  19. package/src/Api/Implementation/ColumnApiImpl.js +4 -1
  20. package/src/Api/Implementation/FilterApiImpl.js +2 -7
  21. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -0
  22. package/src/Api/Implementation/FormatColumnApiImpl.js +34 -0
  23. package/src/Api/Implementation/GridApiImpl.d.ts +3 -0
  24. package/src/Api/Implementation/GridApiImpl.js +40 -0
  25. package/src/Api/Implementation/InternalApiImpl.d.ts +4 -0
  26. package/src/Api/Implementation/InternalApiImpl.js +37 -7
  27. package/src/Api/Implementation/SmartEditApiImpl.d.ts +2 -1
  28. package/src/Api/Implementation/SmartEditApiImpl.js +3 -0
  29. package/src/Api/Implementation/UserInterfaceApiImpl.js +3 -21
  30. package/src/Api/InternalApi.d.ts +4 -1
  31. package/src/Api/SmartEditApi.d.ts +6 -1
  32. package/src/PredefinedConfig/CalculatedColumnState.d.ts +5 -0
  33. package/src/PredefinedConfig/Common/AdaptableForm.d.ts +3 -2
  34. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +6 -3
  35. package/src/PredefinedConfig/Common/AdaptableObject.d.ts +2 -11
  36. package/src/PredefinedConfig/Common/AdaptablePredicate.js +17 -1
  37. package/src/PredefinedConfig/Common/BaseContext.d.ts +1 -1
  38. package/src/PredefinedConfig/Common/FDC3Context.d.ts +5 -1
  39. package/src/PredefinedConfig/SystemState.d.ts +1 -2
  40. package/src/Redux/ActionsReducers/SystemRedux.d.ts +1 -1
  41. package/src/Strategy/DashboardModule.js +3 -0
  42. package/src/Strategy/FormatColumnModule.js +1 -1
  43. package/src/Strategy/LayoutModule.js +4 -4
  44. package/src/Strategy/SmartEditModule.d.ts +1 -1
  45. package/src/Strategy/SmartEditModule.js +5 -6
  46. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +9 -0
  47. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +2 -4
  48. package/src/Utilities/Helpers/AdaptableHelper.js +1 -0
  49. package/src/Utilities/Services/Interface/IRowEditService.d.ts +8 -0
  50. package/src/Utilities/Services/Interface/IRowEditService.js +2 -0
  51. package/src/Utilities/Services/RowEditService.d.ts +25 -0
  52. package/src/Utilities/Services/RowEditService.js +165 -0
  53. package/src/View/AdaptableView.js +8 -2
  54. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
  55. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -2
  56. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +1 -1
  57. package/src/View/Components/FilterForm/FilterForm.d.ts +4 -1
  58. package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +4 -1
  59. package/src/View/Components/FilterForm/ListBoxFilterForm.js +7 -7
  60. package/src/View/Components/FilterForm/QuickFilterForm.js +15 -2
  61. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +2 -0
  62. package/src/View/Components/Popups/AdaptableToaster.js +1 -0
  63. package/src/View/Components/Popups/FormPopups/FormPopups.js +2 -2
  64. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +3 -2
  65. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +51 -22
  66. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +1 -1
  67. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -1
  68. package/src/View/SmartEdit/SmartEditPopup.d.ts +1 -1
  69. package/src/View/SmartEdit/SmartEditPopup.js +1 -2
  70. package/src/View/SmartEdit/SmartEditViewPanel.d.ts +1 -1
  71. package/src/View/SmartEdit/SmartEditViewPanel.js +1 -2
  72. package/src/agGrid/ActionColumnRenderer.d.ts +6 -1
  73. package/src/agGrid/ActionColumnRenderer.js +6 -4
  74. package/src/agGrid/Adaptable.d.ts +3 -0
  75. package/src/agGrid/Adaptable.js +142 -39
  76. package/src/agGrid/rowEditIcons.d.ts +4 -0
  77. package/src/agGrid/rowEditIcons.js +9 -0
  78. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +6 -16
  79. package/src/components/Datepicker/index.js +19 -18
  80. package/src/components/WindowModal/WindowModal.d.ts +2 -0
  81. package/src/components/WindowModal/WindowModal.js +1 -1
  82. package/src/metamodel/adaptable.metamodel.d.ts +89 -2
  83. package/src/metamodel/adaptable.metamodel.js +208 -11
  84. package/src/types.d.ts +6 -5
  85. package/version.d.ts +1 -1
  86. package/version.js +1 -1
  87. package/src/AdaptableOptions/SmartEdit.d.ts +0 -34
  88. package/src/View/Components/Forms/AdaptableForm.d.ts +0 -6
  89. package/src/View/Components/Forms/AdaptableForm.js +0 -21
@@ -35,6 +35,8 @@ import { AdaptableFrameworkComponent } from '../../AdaptableOptions/AdaptableFra
35
35
  import { IMetamodelService } from '../../Utilities/Services/Interface/IMetamodelService';
36
36
  import { IModuleCollection } from '../../Strategy/Interface/IModule';
37
37
  import { AdaptableObjectTag } from '../../PredefinedConfig/Common/AdaptableObject';
38
+ import { EditLookUpPermittedValues } from '../../../types';
39
+ import { IRowEditService } from '../../Utilities/Services/Interface/IRowEditService';
38
40
  export declare class InternalApiImpl extends ApiBase implements InternalApi {
39
41
  getSystemState(): SystemState;
40
42
  getAdaptableFormFromAlertForm(alertForm: string | AlertButtonForm, context: any, defaultMessageType?: AdaptableMessageType): (Omit<AdaptableForm<AlertButtonContext>, 'buttons'> & {
@@ -97,6 +99,7 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
97
99
  getAlertService(): IAlertService;
98
100
  getTeamSharingService(): ITeamSharingService;
99
101
  getMetamodelService(): IMetamodelService;
102
+ getRowEditService(): IRowEditService;
100
103
  getModules(): IModuleCollection;
101
104
  getModuleFriendlyName(adaptableModule: AdaptableModule): string;
102
105
  runModuleInAdaptableQL(adaptableQLModule: AdaptableQLModule): boolean;
@@ -133,4 +136,5 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
133
136
  showSettingsPanel(module: AdaptableModule, moduleParams?: ModuleParams): void;
134
137
  getLabelForTag(adaptableObjectTag: AdaptableObjectTag): string;
135
138
  getValueForTag(adaptableObjectTag: AdaptableObjectTag): string | number;
139
+ getEditLookUpValuesForColumn(editLookUpItem: EditLookUpPermittedValues, column: AdaptableColumn, gridCell?: GridCell): any[] | undefined;
136
140
  }
@@ -288,6 +288,9 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
288
288
  getMetamodelService() {
289
289
  return this.adaptable.MetamodelService;
290
290
  }
291
+ getRowEditService() {
292
+ return this.adaptable.RowEditService;
293
+ }
291
294
  getModules() {
292
295
  return this.adaptable.adaptableModules;
293
296
  }
@@ -519,10 +522,11 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
519
522
  }
520
523
  if (typeof this.adaptable.adaptableOptions.userInterfaceOptions.objectTags === 'function') {
521
524
  // sanitize the provided tags, just to be sure that the user does NOT break the UI
522
- return (this.adaptable.adaptableOptions.userInterfaceOptions
523
- .objectTags(this.adaptable.api)
524
- // jw - not sure how to check here only for when its a object and then do check
525
- .filter((tag) => typeof tag == 'string' ? tag : tag.value != undefined && (tag === null || tag === void 0 ? void 0 : tag.label) != undefined));
525
+ return this.adaptable.adaptableOptions.userInterfaceOptions
526
+ .objectTags({
527
+ adaptableApi: this.adaptable.api,
528
+ })
529
+ .filter((tag) => typeof tag === 'string');
526
530
  }
527
531
  }
528
532
  getLayoutTags() {
@@ -545,7 +549,7 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
545
549
  };
546
550
  const customGeneratedTags = this.adaptable.adaptableOptions.layoutOptions.layoutTagOptions.autoGenerateTagsForLayouts(autoGenerateTagsForLayoutsContext);
547
551
  // sanitize the provided tags, just to be sure that the user does NOT break the UI
548
- return customGeneratedTags.filter((tag) => typeof tag == 'string' ? tag : tag.value != undefined && (tag === null || tag === void 0 ? void 0 : tag.label) != undefined);
552
+ return customGeneratedTags.filter((tag) => typeof tag === 'string');
549
553
  }
550
554
  }
551
555
  // General way to get to store from inside Adaptable...
@@ -557,10 +561,36 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
557
561
  this.showModulePopup(module, moduleParams);
558
562
  }
559
563
  getLabelForTag(adaptableObjectTag) {
560
- return typeof adaptableObjectTag == 'string' ? adaptableObjectTag : adaptableObjectTag.label;
564
+ // not very interesting right now, but useful later when tag is not only a plain string
565
+ return adaptableObjectTag;
561
566
  }
562
567
  getValueForTag(adaptableObjectTag) {
563
- return typeof adaptableObjectTag == 'string' ? adaptableObjectTag : adaptableObjectTag.value;
568
+ // not very interesting right now, but useful later when tag is not only a plain string
569
+ return adaptableObjectTag;
570
+ }
571
+ getEditLookUpValuesForColumn(editLookUpItem, column, gridCell) {
572
+ if (!editLookUpItem || !column) {
573
+ return undefined;
574
+ }
575
+ let editLookUpValues = editLookUpItem.values;
576
+ // first do the function then get hardcoded items
577
+ if (editLookUpValues != null && typeof editLookUpValues === 'function') {
578
+ const editLookUpContext = {
579
+ adaptableApi: this.adaptable.api,
580
+ column: column,
581
+ gridCell,
582
+ };
583
+ return editLookUpValues(editLookUpContext);
584
+ }
585
+ else {
586
+ let arr = editLookUpValues;
587
+ if (arr && ArrayExtensions_1.default.IsNotNullOrEmpty(arr)) {
588
+ return arr;
589
+ }
590
+ }
591
+ // if no hard-coded values or function provided then just get the distinct values for the column
592
+ // this will use the columnApi method that first looks for permitted values and then distinct values
593
+ return this.adaptable.api.columnApi.getDistinctDisplayValuesForColumn(column.columnId);
564
594
  }
565
595
  }
566
596
  exports.InternalApiImpl = InternalApiImpl;
@@ -1,7 +1,7 @@
1
1
  import { ApiBase } from './ApiBase';
2
2
  import { SmartEditApi } from '../SmartEditApi';
3
3
  import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
4
- import { SmartEditOperation } from '../../AdaptableOptions/SmartEdit';
4
+ import { SmartEditCustomOperation, SmartEditOperation } from '../../AdaptableOptions/EditOptions';
5
5
  export declare class SmartEditApiImpl extends ApiBase implements SmartEditApi {
6
6
  setSmartEditOperation(mathOperation: SmartEditOperation): void;
7
7
  getSmartEditOperation(): SmartEditOperation;
@@ -9,4 +9,5 @@ export declare class SmartEditApiImpl extends ApiBase implements SmartEditApi {
9
9
  getSmartEditValue(): number;
10
10
  showSmartEditPopup(): void;
11
11
  applySmartEdit(gridCells: GridCell[]): void;
12
+ getSmartEditCustomOperations(): SmartEditCustomOperation[] | undefined;
12
13
  }
@@ -25,5 +25,8 @@ class SmartEditApiImpl extends ApiBase_1.ApiBase {
25
25
  applySmartEdit(gridCells) {
26
26
  this.dispatchAction(SmartEditRedux.SmartEditApply(gridCells));
27
27
  }
28
+ getSmartEditCustomOperations() {
29
+ return this.getEditOptions().smartEditCustomOperations;
30
+ }
28
31
  }
29
32
  exports.SmartEditApiImpl = SmartEditApiImpl;
@@ -134,25 +134,7 @@ class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
134
134
  if (!editLookUpItem || !gridCell || !gridCell.column) {
135
135
  return undefined;
136
136
  }
137
- let editLookUpValues = editLookUpItem.values;
138
- // first do the function then get hardcoded items
139
- if (editLookUpValues != null && typeof editLookUpValues === 'function') {
140
- const editLookUpContext = {
141
- adaptableApi: this.adaptable.api,
142
- column: gridCell.column,
143
- gridCell: gridCell,
144
- };
145
- return editLookUpValues(editLookUpContext);
146
- }
147
- else {
148
- let arr = editLookUpValues;
149
- if (arr && ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(arr)) {
150
- return arr;
151
- }
152
- }
153
- // if no hard-coded values or function provided then just get the distinct values for the column
154
- // this will use the columnapi method that first looks for permitted values and then distinct values
155
- return this.adaptable.api.columnApi.getDistinctDisplayValuesForColumn(gridCell.column.columnId);
137
+ return this.adaptable.api.internalApi.getEditLookUpValuesForColumn(editLookUpItem, gridCell.column, gridCell);
156
138
  }
157
139
  addColumnMenuItem(userMenuItem) {
158
140
  var _a;
@@ -173,9 +155,9 @@ class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
173
155
  return (_a = this.getUserInterfaceOptions().actionColumns) !== null && _a !== void 0 ? _a : [];
174
156
  }
175
157
  getAdaptableObjectTags() {
176
- let objectTags = this.getUserInterfaceOptions().objectTags;
158
+ const objectTags = this.getUserInterfaceOptions().objectTags;
177
159
  if (objectTags != null && typeof objectTags === 'function') {
178
- return objectTags(this.getAdaptableApi());
160
+ return objectTags({ adaptableApi: this.adaptable.api });
179
161
  }
180
162
  else {
181
163
  let arr = objectTags;
@@ -17,7 +17,7 @@ import { AdaptableOptions } from '../AdaptableOptions/AdaptableOptions';
17
17
  import { Layout } from '../PredefinedConfig/LayoutState';
18
18
  import { AdaptableAlert, AdaptableCellChangedAlert, AdaptableRowChangedAlert } from '../PredefinedConfig/Common/AdaptableAlert';
19
19
  import { IDataService } from '../Utilities/Services/Interface/IDataService';
20
- import { AdaptableMessageType, AlertDefinition, BaseContext, CellDataChangedInfo, LayoutAssociatedObject, SystemStatusMessageInfo } from '../types';
20
+ import { AdaptableMessageType, AlertDefinition, BaseContext, CellDataChangedInfo, EditLookUpPermittedValues, LayoutAssociatedObject, SystemStatusMessageInfo } from '../types';
21
21
  import { IEntitlementService } from '../Utilities/Services/Interface/IEntitlementService';
22
22
  import { AdaptableFlashingCell } from '../PredefinedConfig/Common/AdaptableFlashingCell';
23
23
  import { IQueryLanguageService } from '../Utilities/Services/Interface/IQueryLanguageService';
@@ -34,6 +34,7 @@ import { IMetamodelService } from '../Utilities/Services/Interface/IMetamodelSer
34
34
  import { RowNode } from '@ag-grid-community/all-modules';
35
35
  import { IModuleCollection } from '../Strategy/Interface/IModule';
36
36
  import { AdaptableObjectTag } from '../PredefinedConfig/Common/AdaptableObject';
37
+ import { IRowEditService } from '../Utilities/Services/Interface/IRowEditService';
37
38
  /**
38
39
  * This set of api methods is designed for **internal use of Adaptable** only.
39
40
  *
@@ -101,6 +102,7 @@ export interface InternalApi {
101
102
  getAlertService(): IAlertService;
102
103
  getTeamSharingService(): ITeamSharingService;
103
104
  getMetamodelService(): IMetamodelService;
105
+ getRowEditService(): IRowEditService;
104
106
  getModules(): IModuleCollection;
105
107
  getModuleFriendlyName(adaptableModule: AdaptableModule): string;
106
108
  runModuleInAdaptableQL(adaptableQLModule: AdaptableQLModule): boolean;
@@ -133,4 +135,5 @@ export interface InternalApi {
133
135
  showSettingsPanel(module: AdaptableModule, moduleParams?: ModuleParams): void;
134
136
  getLabelForTag(adaptableObjectTag: AdaptableObjectTag): string;
135
137
  getValueForTag(adaptableObjectTag: AdaptableObjectTag): string | number;
138
+ getEditLookUpValuesForColumn(editLookUpItem: EditLookUpPermittedValues, column: AdaptableColumn, gridCell?: GridCell): any[] | undefined;
136
139
  }
@@ -1,5 +1,6 @@
1
- import { SmartEditOperation } from '../AdaptableOptions/SmartEdit';
1
+ import { SmartEditOperation } from '../AdaptableOptions/EditOptions';
2
2
  import { GridCell } from '../PredefinedConfig/Selection/GridCell';
3
+ import { SmartEditCustomOperation } from '../types';
3
4
  /**
4
5
  * Provides run-time access to the Smart Edit Module
5
6
  **/
@@ -31,4 +32,8 @@ export interface SmartEditApi {
31
32
  * @param gridCells Cells to apply the Smart Edit
32
33
  */
33
34
  applySmartEdit(gridCells: GridCell[]): void;
35
+ /**
36
+ * Retrieves an Smart Edit Custom Operations (provided in Edit Options)
37
+ */
38
+ getSmartEditCustomOperations(): SmartEditCustomOperation[] | undefined;
34
39
  }
@@ -46,6 +46,11 @@ export interface CalculatedColumnSettings extends SpecialColumnSettings {
46
46
  * @defaultValue false
47
47
  */
48
48
  ShowToolTip?: boolean;
49
+ /**
50
+ * If true, the Calculated Column Expression will NOT be evaluated and the value is loaded from the row data property with the same name as the ColumnId
51
+ * @defaultValue false
52
+ */
53
+ ExternallyEvaluatedExpression?: boolean;
49
54
  }
50
55
  /**
51
56
  * Calculated Column Query which may be a Scalar or an AggregatedScalar Expression
@@ -36,13 +36,13 @@ export interface AdaptableFormField {
36
36
  */
37
37
  name: string;
38
38
  /**
39
- * Label to display in in the Field
39
+ * Label to display in the Field
40
40
  */
41
41
  label: string;
42
42
  /**
43
43
  * Field Type: text, date, number, checkbox, select, textOutput
44
44
  */
45
- fieldType: 'text' | 'select' | 'date' | 'number' | 'checkbox' | 'textOutput';
45
+ fieldType: AdaptableFormFieldType;
46
46
  /**
47
47
  * Field Default Value - can be of type string, boolean, number
48
48
  */
@@ -55,4 +55,5 @@ export interface AdaptableFormField {
55
55
  label: string;
56
56
  }[];
57
57
  }
58
+ export declare type AdaptableFormFieldType = 'text' | 'select' | 'date' | 'number' | 'checkbox' | 'textOutput';
58
59
  export declare function getDefaultAdaptableFormData<T extends BaseContext = BaseContext>(formDef?: AdaptableForm<T>): Record<string, any>;
@@ -11,10 +11,13 @@ export declare type AdaptableFormat = {
11
11
  Formatter: 'StringFormatter';
12
12
  Options: StringFormatterOptions;
13
13
  };
14
+ export interface BaseFormatterOptions {
15
+ CustomDisplayFormats?: string[];
16
+ }
14
17
  /**
15
18
  * Formatter Options for Numeric Columns
16
19
  */
17
- export interface NumberFormatterOptions {
20
+ export interface NumberFormatterOptions extends BaseFormatterOptions {
18
21
  /**
19
22
  * Number of digits to show in fractions
20
23
  */
@@ -55,7 +58,7 @@ export interface NumberFormatterOptions {
55
58
  /**
56
59
  * Formatter Options for Date Columns - contains a single `Pattern` property
57
60
  */
58
- export interface DateFormatterOptions {
61
+ export interface DateFormatterOptions extends BaseFormatterOptions {
59
62
  /**
60
63
  * Pattern to use for Date Format
61
64
  */
@@ -64,7 +67,7 @@ export interface DateFormatterOptions {
64
67
  /**
65
68
  * Formatter Options for String Columns
66
69
  */
67
- export interface StringFormatterOptions {
70
+ export interface StringFormatterOptions extends BaseFormatterOptions {
68
71
  /**
69
72
  * Sets text to Upper or Lower case
70
73
  */
@@ -21,15 +21,6 @@ export interface AdaptableObject {
21
21
  Tags?: AdaptableObjectTag[];
22
22
  }
23
23
  /**
24
- * Object Tag - defined as a label and a value
24
+ * AdaptableObjectTag Object Tague - currently supporting only plain string values, but open for future extensions, if ever needed.
25
25
  */
26
- export declare type AdaptableObjectTag = string | {
27
- /**
28
- * Label for the Tag
29
- */
30
- label: string;
31
- /**
32
- * Value for the Tag - string or number
33
- */
34
- value: string | number;
35
- };
26
+ export declare type AdaptableObjectTag = string;
@@ -27,7 +27,23 @@ exports.SystemPredicateDefs = [
27
27
  icon: { text: 'IN' },
28
28
  columnScope: { DataTypes: ['String', 'Number', 'Date'] },
29
29
  moduleScope: ['filter'],
30
- handler: ({ displayValue, inputs }) => inputs.length === 0 || inputs.includes(displayValue),
30
+ handler: ({ inputs, column, value }) => {
31
+ if (inputs.length === 0) {
32
+ return true;
33
+ }
34
+ if (column.dataType === 'Date') {
35
+ return inputs.some((input) => {
36
+ return isSameDay_1.default(input, value);
37
+ });
38
+ }
39
+ if (column.dataType === 'Number') {
40
+ return inputs.includes(value);
41
+ }
42
+ if (column.dataType === 'String') {
43
+ return inputs.includes(value);
44
+ }
45
+ return true;
46
+ },
31
47
  toString: ({ inputs }) => `IN (${inputs.join(', ')})`,
32
48
  shortcuts: ['#', '['],
33
49
  },
@@ -1,6 +1,6 @@
1
1
  import { AdaptableApi } from '../../types';
2
2
  /**
3
- * Base Context object used in many functions provided by AdapTable
3
+ * Base Context used in many functions provided by developers and invoked as needed by AdapTable
4
4
  */
5
5
  export interface BaseContext {
6
6
  /**
@@ -1,3 +1,4 @@
1
+ import { CustomFDC3Intent } from '../../AdaptableOptions/FinancePluginOptions';
1
2
  import { BaseEventInfo } from '../../Api/Events/BaseEventInfo';
2
3
  import { FDC3Intent } from '../../types';
3
4
  /**
@@ -221,10 +222,13 @@ export interface AdaptableFDC3EventInfo extends BaseEventInfo {
221
222
  /**
222
223
  * The FDC3 Intent which caused Event to fire (if type is `RaiseIntent`)
223
224
  */
224
- intent?: FDC3Intent;
225
+ intent?: FDC3Intent | CustomFDC3Intent;
225
226
  /**
226
227
  * Full FDC3 Context for the object related to the event
227
228
  */
228
229
  context: FDC3Context;
229
230
  }
230
231
  export declare type ContextType = 'fdc3.instrument' | 'fdc3.instrumentList' | 'fdc3.position' | 'fdc3.portfolio' | 'fdc3.contact' | 'fdc3.contactList' | 'fdc3.organization' | 'fdc3.country';
232
+ export interface CustomFDC3Context extends FDC3Context {
233
+ type: any;
234
+ }
@@ -1,7 +1,7 @@
1
1
  import { PreviewInfo } from '../Utilities/Interface/Preview';
2
2
  import { InternalState } from './InternalState';
3
3
  import { BulkUpdateValidationResult } from '../Strategy/Interface/IBulkUpdateModule';
4
- import { CellDataChangedInfo, GridCell } from '../types';
4
+ import { CellDataChangedInfo, GridCell, SmartEditOperation } from '../types';
5
5
  import type { IPushPullState, IPushPullReport, IPushPullDomain } from './IPushPullState';
6
6
  import { Glue42State, Glue42Report } from './Glue42State';
7
7
  import { OpenFinState, OpenFinReport } from './OpenFinState';
@@ -13,7 +13,6 @@ import { CachedQuery } from './QueryState';
13
13
  import { AdaptableFlashingCell } from './Common/AdaptableFlashingCell';
14
14
  import { TypeUuid } from './Uuid';
15
15
  import { SummaryOperation } from './Common/Enums';
16
- import { SmartEditOperation } from '../AdaptableOptions/SmartEdit';
17
16
  export type { IPushPullReport, IPushPullDomain };
18
17
  export type { Glue42Report };
19
18
  export type { OpenFinReport };
@@ -13,7 +13,7 @@ import { AdaptableFlashingCell } from '../../PredefinedConfig/Common/AdaptableFl
13
13
  import { SummaryOperation } from '../../PredefinedConfig/Common/Enums';
14
14
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
15
15
  import { RowsHighlightInfo } from '../../PredefinedConfig/Common/RowsHighlightInfo';
16
- import { SmartEditOperation } from '../../AdaptableOptions/SmartEdit';
16
+ import { SmartEditOperation } from '../../AdaptableOptions/EditOptions';
17
17
  export declare const FLASHING_CELL_ROW_KEY = "__ROW";
18
18
  export declare const SYSTEM_ALERT_ADD = "SYSTEM_ALERT_ADD";
19
19
  export declare const SYSTEM_ALERT_DELETE = "SYSTEM_ALERT_DELETE";
@@ -23,6 +23,9 @@ class DashboardModule extends AdaptableModuleBase_1.AdaptableModuleBase {
23
23
  // but so do all the other possible handlers of the 'DashboardChanged' event
24
24
  // therefore, we give them a head start to subscribe to 'DashboardChanged' before emitting it
25
25
  setTimeout(() => {
26
+ if (this.api.isDestroyed()) {
27
+ return;
28
+ }
26
29
  this.api.dashboardApi.fireDashboardChangedEvent('ADAPTABLE_READY', null, this.api.dashboardApi.getDashboardState());
27
30
  }, 20);
28
31
  }
@@ -247,7 +247,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
247
247
  },
248
248
  {
249
249
  name: 'Display Format',
250
- values: [FormatColumnFormatWizardSection_1.getFormatColumnFormatSummaryValue(formatColumn)],
250
+ values: [FormatColumnFormatWizardSection_1.getFormatColumnFormatSummaryValue(formatColumn, this.api.formatColumnApi)],
251
251
  },
252
252
  getFormatColumnSettingsViewItems_1.getFormatColumnSettingsViewItems(formatColumn),
253
253
  getObjectTagsViewItems_1.getObjectTagsViewItems(formatColumn, this.api),
@@ -152,12 +152,12 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
152
152
  if (columns.length >
153
153
  maxColumnsToDisplay + 1 /* +1 is to show tag only beginning with 2, 'other 2' */) {
154
154
  const extraColumns = columns.length - maxColumnsToDisplay;
155
- const firstNColumns = columns
156
- .slice(0, maxColumnsToDisplay)
157
- .map((colId) => columnIdToFriendlyName(colId));
155
+ const firstNColumns = columns.slice(0, maxColumnsToDisplay);
158
156
  columns = [...firstNColumns, `and other ${extraColumns}`];
159
157
  }
160
- columns = columns.map((column) => this.api.columnApi.getFriendlyNameFromColumnId(column));
158
+ else {
159
+ columns = columns.map((column) => this.api.columnApi.getFriendlyNameFromColumnId(column));
160
+ }
161
161
  return {
162
162
  items: [
163
163
  {
@@ -6,7 +6,7 @@ import { GridCell } from '../PredefinedConfig/Selection/GridCell';
6
6
  import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
7
7
  import { AdaptableApi } from '../Api/AdaptableApi';
8
8
  import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
9
- import { SmartEditOperation } from '../AdaptableOptions/SmartEdit';
9
+ import { SmartEditOperation } from '../AdaptableOptions/EditOptions';
10
10
  export declare class SmartEditModule extends AdaptableModuleBase implements ISmartEditModule {
11
11
  constructor(api: AdaptableApi);
12
12
  getViewAccessLevel(): AccessLevel;
@@ -123,13 +123,12 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
123
123
  selectedCellInfo.gridCells.forEach((selectedCell) => {
124
124
  let newValue;
125
125
  if (typeof smartEditOperation === 'object') {
126
- newValue = smartEditOperation.Operation({
127
- smartEditValue,
128
- column,
129
- adaptableApi: this.api,
126
+ const context = {
127
+ smartEditValue: smartEditValue,
130
128
  currentCell: selectedCell,
131
- value: selectedCell.rawValue,
132
- });
129
+ adaptableApi: this.api,
130
+ };
131
+ newValue = smartEditOperation.Operation(context);
133
132
  }
134
133
  else {
135
134
  switch (smartEditOperation) {
@@ -89,6 +89,13 @@ exports.DefaultAdaptableOptions = {
89
89
  validateOnServer: undefined,
90
90
  displayServerValidationMessages: true,
91
91
  isCellEditable: undefined,
92
+ rowFormOptions: {
93
+ formTitle: undefined,
94
+ formDescription: undefined,
95
+ formFieldLabel: undefined,
96
+ formButtons: undefined,
97
+ onFormSubmit: undefined,
98
+ },
92
99
  },
93
100
  entitlementOptions: {
94
101
  defaultAccessLevel: 'Full',
@@ -221,6 +228,8 @@ exports.DefaultAdaptableOptions = {
221
228
  showDocumentationLinks: true,
222
229
  gridInfoSections: ['GridSummary', 'AdaptableOptions', 'ColumnInfo'],
223
230
  showAdapTableVersion: true,
231
+ rowActionButtons: undefined,
232
+ rowActionButtonsPosition: 'pinnedLeft',
224
233
  },
225
234
  toolPanelOptions: {
226
235
  showAdaptableToolPanel: true,
@@ -226,10 +226,8 @@ exports.booleanExpressionFunctions = {
226
226
  var _a;
227
227
  const searchTerm = expressionFunctionUtils_1.getStringValue(context, String(args[0]));
228
228
  return (_a = context.api) === null || _a === void 0 ? void 0 : _a.columnApi.getColumns().some((column) => {
229
- var _a, _b;
230
- const value = column.dataType === 'Date'
231
- ? // for Date columns use the display value, as we do a textual comparison
232
- (_a = context.api) === null || _a === void 0 ? void 0 : _a.gridApi.getDisplayValueFromRowNode(context.node, column.columnId) : (_b = context.api) === null || _b === void 0 ? void 0 : _b.gridApi.getNormalisedValueFromRowNode(context.node, column.columnId);
229
+ var _a;
230
+ const value = (_a = context.api) === null || _a === void 0 ? void 0 : _a.gridApi.getDisplayValueFromRowNode(context.node, column.columnId);
233
231
  const columnValue = expressionFunctionUtils_1.getStringValue(context, String(value));
234
232
  return columnValue.indexOf(searchTerm) !== -1;
235
233
  });
@@ -20,6 +20,7 @@ function assignAdaptableOptions(adaptableOptions) {
20
20
  returnedAdaptableOptions.entitlementOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.entitlementOptions, adaptableOptions.entitlementOptions);
21
21
  returnedAdaptableOptions.dashboardOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.dashboardOptions, adaptableOptions.dashboardOptions);
22
22
  returnedAdaptableOptions.editOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.editOptions, adaptableOptions.editOptions);
23
+ returnedAdaptableOptions.editOptions.rowFormOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.editOptions.rowFormOptions, returnedAdaptableOptions.editOptions.rowFormOptions);
23
24
  returnedAdaptableOptions.containerOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.containerOptions, adaptableOptions.containerOptions);
24
25
  returnedAdaptableOptions.generalOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.generalOptions, adaptableOptions.generalOptions);
25
26
  returnedAdaptableOptions.searchOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.searchOptions, adaptableOptions.searchOptions);
@@ -0,0 +1,8 @@
1
+ import { RowNode } from '@ag-grid-community/all-modules';
2
+ import { IAdaptableService } from './IAdaptableService';
3
+ import { AdaptableForm } from '../../../PredefinedConfig/Common/AdaptableForm';
4
+ import { CreateRowFormContext, EditRowFormContext } from '../../../AdaptableOptions/EditOptions';
5
+ export interface IRowEditService extends IAdaptableService {
6
+ buildRowEditForm(rowNode: RowNode): AdaptableForm<EditRowFormContext>;
7
+ buildRowCreateForm(clonedRowNode?: RowNode): AdaptableForm<CreateRowFormContext>;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,25 @@
1
+ import { IRowEditService } from './Interface/IRowEditService';
2
+ import { RowNode } from '@ag-grid-community/all-modules';
3
+ import { AdaptableApi } from '../../Api/AdaptableApi';
4
+ import { AdaptableForm } from '../../PredefinedConfig/Common/AdaptableForm';
5
+ import { CreateRowFormContext, EditRowFormContext } from '../../AdaptableOptions/EditOptions';
6
+ export declare class RowEditService implements IRowEditService {
7
+ private adaptableApi;
8
+ private adaptableInstance;
9
+ private rowEditFormOptions;
10
+ constructor(adaptableApi: AdaptableApi);
11
+ buildRowEditForm(rowNode: RowNode): AdaptableForm<EditRowFormContext>;
12
+ buildRowCreateForm(clonedRowNode?: RowNode): AdaptableForm<CreateRowFormContext>;
13
+ private buildRowForm;
14
+ private getFormTitle;
15
+ private getFormDescription;
16
+ private buildFormParamContext;
17
+ private buildRowFormFields;
18
+ private buildRowFormButtons;
19
+ private isColumnEditable;
20
+ private buildFormField;
21
+ private getFormFieldLabel;
22
+ private buildFormFieldLabelContext;
23
+ private getFieldTypeFromColumnType;
24
+ private getFieldValueOptions;
25
+ }