@adaptabletools/adaptable 11.2.4 → 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 (67) hide show
  1. package/bundle.cjs.js +98 -98
  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/EditOptions.d.ts +92 -4
  7. package/src/AdaptableOptions/FormatColumnOptions.d.ts +2 -1
  8. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +17 -3
  9. package/src/Api/EventApi.d.ts +4 -1
  10. package/src/Api/Events/RowFormSubmitted.d.ts +19 -0
  11. package/src/{AdaptableOptions/SmartEdit.js → Api/Events/RowFormSubmitted.js} +0 -0
  12. package/src/Api/FormatColumnApi.d.ts +6 -0
  13. package/src/Api/GridApi.d.ts +14 -0
  14. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +1 -0
  15. package/src/Api/Implementation/FormatColumnApiImpl.js +6 -1
  16. package/src/Api/Implementation/GridApiImpl.d.ts +3 -0
  17. package/src/Api/Implementation/GridApiImpl.js +40 -0
  18. package/src/Api/Implementation/InternalApiImpl.d.ts +4 -0
  19. package/src/Api/Implementation/InternalApiImpl.js +37 -7
  20. package/src/Api/Implementation/SmartEditApiImpl.d.ts +2 -1
  21. package/src/Api/Implementation/SmartEditApiImpl.js +3 -0
  22. package/src/Api/Implementation/UserInterfaceApiImpl.js +3 -21
  23. package/src/Api/InternalApi.d.ts +4 -1
  24. package/src/Api/SmartEditApi.d.ts +6 -1
  25. package/src/PredefinedConfig/CalculatedColumnState.d.ts +5 -0
  26. package/src/PredefinedConfig/Common/AdaptableForm.d.ts +3 -2
  27. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +1 -3
  28. package/src/PredefinedConfig/Common/AdaptableObject.d.ts +2 -11
  29. package/src/PredefinedConfig/Common/BaseContext.d.ts +1 -1
  30. package/src/PredefinedConfig/SystemState.d.ts +1 -2
  31. package/src/Redux/ActionsReducers/SystemRedux.d.ts +1 -1
  32. package/src/Strategy/SmartEditModule.d.ts +1 -1
  33. package/src/Strategy/SmartEditModule.js +5 -6
  34. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +9 -0
  35. package/src/Utilities/Helpers/AdaptableHelper.js +1 -0
  36. package/src/Utilities/Services/Interface/IRowEditService.d.ts +8 -0
  37. package/src/Utilities/Services/Interface/IRowEditService.js +2 -0
  38. package/src/Utilities/Services/RowEditService.d.ts +25 -0
  39. package/src/Utilities/Services/RowEditService.js +165 -0
  40. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -2
  41. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +1 -1
  42. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +2 -0
  43. package/src/View/Components/Popups/FormPopups/FormPopups.js +2 -2
  44. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +4 -6
  45. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -1
  46. package/src/View/SmartEdit/SmartEditPopup.d.ts +1 -1
  47. package/src/View/SmartEdit/SmartEditPopup.js +1 -2
  48. package/src/View/SmartEdit/SmartEditViewPanel.d.ts +1 -1
  49. package/src/View/SmartEdit/SmartEditViewPanel.js +1 -2
  50. package/src/agGrid/ActionColumnRenderer.d.ts +6 -1
  51. package/src/agGrid/ActionColumnRenderer.js +6 -4
  52. package/src/agGrid/Adaptable.d.ts +3 -0
  53. package/src/agGrid/Adaptable.js +121 -18
  54. package/src/agGrid/rowEditIcons.d.ts +4 -0
  55. package/src/agGrid/rowEditIcons.js +9 -0
  56. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +6 -16
  57. package/src/components/Datepicker/index.js +19 -18
  58. package/src/components/WindowModal/WindowModal.d.ts +2 -0
  59. package/src/components/WindowModal/WindowModal.js +1 -1
  60. package/src/metamodel/adaptable.metamodel.d.ts +72 -0
  61. package/src/metamodel/adaptable.metamodel.js +146 -5
  62. package/src/types.d.ts +4 -3
  63. package/version.d.ts +1 -1
  64. package/version.js +1 -1
  65. package/src/AdaptableOptions/SmartEdit.d.ts +0 -34
  66. package/src/View/Components/Forms/AdaptableForm.d.ts +0 -6
  67. package/src/View/Components/Forms/AdaptableForm.js +0 -21
@@ -848,14 +848,15 @@ exports.ADAPTABLE_METAMODEL = {
848
848
  },
849
849
  {
850
850
  "name": "fieldType",
851
- "kind": "unknown",
851
+ "kind": "REFERENCE",
852
852
  "description": "Field Type: text, date, number, checkbox, select, textOutput",
853
- "uiLabel": "Field Type"
853
+ "uiLabel": "Field Type",
854
+ "reference": "unknown"
854
855
  },
855
856
  {
856
857
  "name": "label",
857
858
  "kind": "string",
858
- "description": "Label to display in in the Field",
859
+ "description": "Label to display in the Field",
859
860
  "uiLabel": "Label"
860
861
  },
861
862
  {
@@ -1009,7 +1010,7 @@ exports.ADAPTABLE_METAMODEL = {
1009
1010
  "AdaptableObjectTag": {
1010
1011
  "name": "AdaptableObjectTag",
1011
1012
  "kind": "TypeAlias",
1012
- "description": "Object Tag - defined as a label and a value"
1013
+ "description": "AdaptableObjectTag Object Tague - currently supporting only plain string values, but open for future extensions, if ever needed."
1013
1014
  },
1014
1015
  "AdaptableOptions": {
1015
1016
  "name": "AdaptableOptions",
@@ -2287,7 +2288,7 @@ exports.ADAPTABLE_METAMODEL = {
2287
2288
  "BaseContext": {
2288
2289
  "name": "BaseContext",
2289
2290
  "kind": "Interface",
2290
- "description": "Base Context object used in many functions provided by AdapTable",
2291
+ "description": "Base Context used in many functions provided by developers and invoked as needed by AdapTable",
2291
2292
  "properties": [
2292
2293
  {
2293
2294
  "name": "adaptableApi",
@@ -2497,6 +2498,14 @@ exports.ADAPTABLE_METAMODEL = {
2497
2498
  "uiLabel": "Data Type",
2498
2499
  "isOptional": true
2499
2500
  },
2501
+ {
2502
+ "name": "ExternallyEvaluatedExpression",
2503
+ "kind": "boolean",
2504
+ "description": "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",
2505
+ "uiLabel": "Externally Evaluated Expression",
2506
+ "isOptional": true,
2507
+ "defaultValue": "false"
2508
+ },
2500
2509
  {
2501
2510
  "name": "ShowToolTip",
2502
2511
  "kind": "boolean",
@@ -5076,6 +5085,21 @@ exports.ADAPTABLE_METAMODEL = {
5076
5085
  "uiLabel": "Is Cell Editable",
5077
5086
  "isOptional": true
5078
5087
  },
5088
+ {
5089
+ "name": "rowFormOptions",
5090
+ "kind": "REFERENCE",
5091
+ "description": "Options for editing (create/update/delete) row entries in the grid.",
5092
+ "uiLabel": "Row Form Options",
5093
+ "isOptional": true,
5094
+ "reference": "RowFormOptions"
5095
+ },
5096
+ {
5097
+ "name": "smartEditCustomOperations",
5098
+ "kind": "unknown",
5099
+ "description": "Custom Operations to use in Smart Edit",
5100
+ "uiLabel": "Smart Edit Custom Operations",
5101
+ "isOptional": true
5102
+ },
5079
5103
  {
5080
5104
  "name": "validateOnServer",
5081
5105
  "kind": "unknown",
@@ -6779,6 +6803,12 @@ exports.ADAPTABLE_METAMODEL = {
6779
6803
  "description": "Publishes the CheckboxColumnClickedEvent - when the checkbox in an Checkbox Column is clicked",
6780
6804
  "uiLabel": "Fire Checkbox Column Clicked Event"
6781
6805
  },
6806
+ {
6807
+ "name": "getActiveFormatColumnForColumn",
6808
+ "kind": "function",
6809
+ "description": "Gets an active Format Column, if any, for given Column",
6810
+ "uiLabel": "Get Active Format Column For Column"
6811
+ },
6782
6812
  {
6783
6813
  "name": "getAllActiveFormatColumn",
6784
6814
  "kind": "function",
@@ -7874,6 +7904,24 @@ exports.ADAPTABLE_METAMODEL = {
7874
7904
  "description": "Loads grid with given data",
7875
7905
  "uiLabel": "Load Grid Data"
7876
7906
  },
7907
+ {
7908
+ "name": "openCloneRowForm",
7909
+ "kind": "function",
7910
+ "description": "Open create dialog for cloning an existing row",
7911
+ "uiLabel": "Open Clone Row Form"
7912
+ },
7913
+ {
7914
+ "name": "openCreateRowForm",
7915
+ "kind": "function",
7916
+ "description": "Open create dialog for a new row",
7917
+ "uiLabel": "Open Create Row Form"
7918
+ },
7919
+ {
7920
+ "name": "openEditRowForm",
7921
+ "kind": "function",
7922
+ "description": "Open edit dialog for row with the given primary key value",
7923
+ "uiLabel": "Open Edit Row Form"
7924
+ },
7877
7925
  {
7878
7926
  "name": "redrawGrid",
7879
7927
  "kind": "function",
@@ -10619,6 +10667,52 @@ exports.ADAPTABLE_METAMODEL = {
10619
10667
  }
10620
10668
  ]
10621
10669
  },
10670
+ "RowFormOptions": {
10671
+ "name": "RowFormOptions",
10672
+ "kind": "Interface",
10673
+ "description": "Options for editing (create/update/delete) row entries in the grid",
10674
+ "properties": [
10675
+ {
10676
+ "name": "formButtons",
10677
+ "kind": "unknown",
10678
+ "description": "Custom form buttons provider. If provided, the custom implementation is responsible for firing the 'RowFormSubmitted' and/or invoking the 'onFormSubmit' callback (if necessary).",
10679
+ "uiLabel": "Form Buttons",
10680
+ "isOptional": true
10681
+ },
10682
+ {
10683
+ "name": "formDescription",
10684
+ "kind": "unknown",
10685
+ "description": "Custom form description provider",
10686
+ "uiLabel": "Form Description",
10687
+ "isOptional": true,
10688
+ "defaultValue": "undefined"
10689
+ },
10690
+ {
10691
+ "name": "formFieldLabel",
10692
+ "kind": "unknown",
10693
+ "description": "Custom form field label provider",
10694
+ "uiLabel": "Form Field Label",
10695
+ "isOptional": true,
10696
+ "defaultValue": "undefined"
10697
+ },
10698
+ {
10699
+ "name": "formTitle",
10700
+ "kind": "unknown",
10701
+ "description": "Custom form title provider",
10702
+ "uiLabel": "Form Title",
10703
+ "isOptional": true,
10704
+ "defaultValue": "'Create New Row'/'Edit Row'"
10705
+ },
10706
+ {
10707
+ "name": "onFormSubmit",
10708
+ "kind": "unknown",
10709
+ "description": "Function which is invoked when a row form is submitted via a standard button (provided by AdapTable). This is not invoked when custom form buttons are provided!",
10710
+ "uiLabel": "On Form Submit",
10711
+ "isOptional": true,
10712
+ "defaultValue": "undefined"
10713
+ }
10714
+ ]
10715
+ },
10622
10716
  "RowInfo": {
10623
10717
  "name": "RowInfo",
10624
10718
  "kind": "Interface",
@@ -11511,6 +11605,12 @@ exports.ADAPTABLE_METAMODEL = {
11511
11605
  "description": "Applies a Smart Edit to given Cells",
11512
11606
  "uiLabel": "Apply Smart Edit"
11513
11607
  },
11608
+ {
11609
+ "name": "getSmartEditCustomOperations",
11610
+ "kind": "function",
11611
+ "description": "Retrieves an Smart Edit Custom Operations (provided in Edit Options)",
11612
+ "uiLabel": "Get Smart Edit Custom Operations"
11613
+ },
11514
11614
  {
11515
11615
  "name": "getSmartEditOperation",
11516
11616
  "kind": "function",
@@ -11543,6 +11643,31 @@ exports.ADAPTABLE_METAMODEL = {
11543
11643
  }
11544
11644
  ]
11545
11645
  },
11646
+ "SmartEditCustomOperation": {
11647
+ "name": "SmartEditCustomOperation",
11648
+ "kind": "TypeAlias",
11649
+ "description": "Custom Operation used in Smart Edit Module"
11650
+ },
11651
+ "SmartEditOperationContext": {
11652
+ "name": "SmartEditOperationContext",
11653
+ "kind": "Interface",
11654
+ "description": "Context used in Custom Smart Edit Operations",
11655
+ "properties": [
11656
+ {
11657
+ "name": "currentCell",
11658
+ "kind": "REFERENCE",
11659
+ "description": "Current selected grid cell - contains column, row and cell value information",
11660
+ "uiLabel": "Current Cell",
11661
+ "reference": "GridCell"
11662
+ },
11663
+ {
11664
+ "name": "smartEditValue",
11665
+ "kind": "number",
11666
+ "description": "Smart Edit value",
11667
+ "uiLabel": "Smart Edit Value"
11668
+ }
11669
+ ]
11670
+ },
11546
11671
  "SpecialColumnSettings": {
11547
11672
  "name": "SpecialColumnSettings",
11548
11673
  "kind": "Interface",
@@ -12525,6 +12650,22 @@ exports.ADAPTABLE_METAMODEL = {
12525
12650
  "isOptional": true,
12526
12651
  "reference": "AdaptableStyle"
12527
12652
  },
12653
+ {
12654
+ "name": "rowActionButtons",
12655
+ "kind": "unknown",
12656
+ "description": "Action buttons to display for each row.",
12657
+ "uiLabel": "Row Action Buttons",
12658
+ "isOptional": true,
12659
+ "defaultValue": "undefined"
12660
+ },
12661
+ {
12662
+ "name": "rowActionButtonsPosition",
12663
+ "kind": "unknown",
12664
+ "description": "Position of the action buttons",
12665
+ "uiLabel": "Row Action Buttons Position",
12666
+ "isOptional": true,
12667
+ "defaultValue": "'pinnedLeft'"
12668
+ },
12528
12669
  {
12529
12670
  "name": "showAdapTableVersion",
12530
12671
  "kind": "boolean",
package/src/types.d.ts CHANGED
@@ -12,7 +12,7 @@ export type { FlashingCellOptions } from './AdaptableOptions/FlashingCellOptions
12
12
  export type { TOAST_POSITIONS, NotificationsOptions, } from './AdaptableOptions/NotificationsOptions';
13
13
  export type { AlertOptions, ActionHandler, AlertForm, AlertButtonContext, } from './AdaptableOptions/AlertOptions';
14
14
  export type { DashboardOptions, CustomToolbar, DashboardButtonContext, CustomToolbarButtonContext, } from './AdaptableOptions/DashboardOptions';
15
- export type { EditOptions, ValidationResult } from './AdaptableOptions/EditOptions';
15
+ export type { EditOptions, RowFormOptions, FormParamContext, FormFieldLabelContext, RowFormContext, CreateRowFormContext, EditRowFormContext, ValidationResult, SmartEditCustomOperation, SmartEditOperation, SmartEditOperationContext, } from './AdaptableOptions/EditOptions';
16
16
  export type { ExportOptions, SystemExportDestination, SystemExportDestinations, CustomDestination, CustomReport, DataFormatType, ExportButtonContext, } from './AdaptableOptions/ExportOptions';
17
17
  export type { GeneralOptions, ColumnValuesComparer } from './AdaptableOptions/GeneralOptions';
18
18
  export type { Glue42PluginOptions } from './AdaptableOptions/Glue42PluginOptions';
@@ -29,7 +29,7 @@ export type { FilterActionOnDataChange } from './PredefinedConfig/Common/FilterA
29
29
  export type { ConfigState } from './PredefinedConfig/ConfigState';
30
30
  export type { TeamSharingOptions } from './AdaptableOptions/TeamSharingOptions';
31
31
  export type { ToolPanelOptions, CustomToolPanel, ToolPanelButtonContext, CustomToolPanelButtonContext, } from './AdaptableOptions/ToolPanelOptions';
32
- export type { UserInterfaceOptions, CellValuesList, ActionColumnButtonContext, ActionColumn, ActionColumnSettings, BasePermittedValues, PermittedValues, EditLookUpPermittedValues, FilterPermittedValues, CustomSortPermittedValues, BulkUpdatePermittedValues, EditLookUpContext, PermittedValuesContext, FilterPermittedValuesContext, BulkUpdatePermittedValuesContext, GridInfoSections, GridInfoSection, } from './AdaptableOptions/UserInterfaceOptions';
32
+ export type { UserInterfaceOptions, CellValuesList, ActionColumnButtonContext, ActionColumn, ActionColumnSettings, BasePermittedValues, PermittedValues, EditLookUpPermittedValues, FilterPermittedValues, CustomSortPermittedValues, BulkUpdatePermittedValues, EditLookUpContext, PermittedValuesContext, FilterPermittedValuesContext, BulkUpdatePermittedValuesContext, GridInfoSections, GridInfoSection, ObjectTagsContext, } from './AdaptableOptions/UserInterfaceOptions';
33
33
  export type { MenuOptions } from './AdaptableOptions/MenuOptions';
34
34
  export type { CustomSettingsPanel, SettingsPanelOptions, } from './AdaptableOptions/SettingsPanelOptions';
35
35
  export type { EntitlementOptions } from './AdaptableOptions/EntitlementOptions';
@@ -88,6 +88,7 @@ export type { LayoutChangedInfo } from './Api/Events/LayoutChanged';
88
88
  export type { CheckboxColumnClickedInfo } from './Api/Events/ChexboxColumnClicked';
89
89
  export type { CustomToolbarConfiguredInfo } from './Api/Events/CustomToolbarConfigured';
90
90
  export type { LiveDataChangedInfo, LiveReport } from './Api/Events/LiveDataChanged';
91
+ export type { RowFormSubmittedInfo, RowFormType } from './Api/Events/RowFormSubmitted';
91
92
  export type { AdaptableSearchState, AdaptableSortState, SearchChangedInfo, } from './Api/Events/SearchChanged';
92
93
  export type { SelectionChangedInfo } from './Api/Events/SelectionChanged';
93
94
  export type { ThemeChangedInfo } from './Api/Events/ThemeChanged';
@@ -123,7 +124,7 @@ export type { ColumnSort } from './PredefinedConfig/Common/ColumnSort';
123
124
  export type { CellDataChangedInfo } from './PredefinedConfig/Common/CellDataChangedInfo';
124
125
  export type { DataChangedScope } from './PredefinedConfig/Common/DataChangedScope';
125
126
  export type { DataUpdateConfig } from './PredefinedConfig/Common/DataUpdateConfig';
126
- export type { AdaptableFormData, AdaptableForm, AdaptableFormField, } from './PredefinedConfig/Common/AdaptableForm';
127
+ export type { AdaptableFormData, AdaptableForm, AdaptableFormField, AdaptableFormFieldType, } from './PredefinedConfig/Common/AdaptableForm';
127
128
  export type { AdaptableButton } from './PredefinedConfig/Common/AdaptableButton';
128
129
  export type { AdaptableMenuItem, UserMenuItem, ColumnMenuContext, ContextMenuContext, } from './PredefinedConfig/Common/Menu';
129
130
  export type { BaseContext } from './PredefinedConfig/Common/BaseContext';
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "11.2.4";
1
+ declare const _default: "11.3.0";
2
2
  export default _default;
package/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = '11.2.4'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
3
+ exports.default = '11.3.0'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
@@ -1,34 +0,0 @@
1
- import { MathOperation } from '../PredefinedConfig/Common/Enums';
2
- import { AdaptableApi, AdaptableColumn, GridCell } from '../types';
3
- export declare type SmartEditCustomOperation = {
4
- /**
5
- * Name of the operation, appears in the UI
6
- */
7
- Name: string;
8
- /**
9
- * Custom operation function
10
- */
11
- Operation: (context: {
12
- /**
13
- * Selected Cell Value
14
- */
15
- value: number;
16
- /**
17
- * Smart edit cell value
18
- */
19
- smartEditValue: number;
20
- /**
21
- * Selected column
22
- */
23
- column: AdaptableColumn;
24
- /**
25
- * Adaptable Api
26
- */
27
- adaptableApi: AdaptableApi;
28
- /**
29
- * Current selected grid cell
30
- */
31
- currentCell: GridCell;
32
- }) => number;
33
- };
34
- export declare type SmartEditOperation = SmartEditCustomOperation | MathOperation;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- export declare type AdaptableFormProps = any;
3
- export declare class AdaptableForm extends React.Component<AdaptableFormProps, {}> {
4
- render(): JSX.Element;
5
- CancelOnFormSubmit: (e: React.FormEvent<any>) => void;
6
- }
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AdaptableForm = void 0;
4
- const tslib_1 = require("tslib");
5
- const React = tslib_1.__importStar(require("react"));
6
- class AdaptableForm extends React.Component {
7
- constructor() {
8
- super(...arguments);
9
- this.CancelOnFormSubmit = (e) => {
10
- e.preventDefault();
11
- if (this.props.onSubmit) {
12
- this.props.onSubmit(null);
13
- }
14
- };
15
- }
16
- render() {
17
- const _a = this.props, { children } = _a, attrs = tslib_1.__rest(_a, ["children"]);
18
- return (React.createElement("form", Object.assign({}, attrs, { onSubmit: this.CancelOnFormSubmit }), children));
19
- }
20
- }
21
- exports.AdaptableForm = AdaptableForm;