@adaptabletools/adaptable 18.0.0-canary.3 → 18.0.0-canary.5

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 (206) hide show
  1. package/agGrid.d.ts +4 -21
  2. package/agGrid.js +9 -26
  3. package/base.css +4 -1
  4. package/base.css.map +1 -1
  5. package/index.css +79 -68
  6. package/index.css.map +1 -1
  7. package/package.json +3 -4
  8. package/src/AdaptableInterfaces/IAdaptable.d.ts +55 -109
  9. package/src/AdaptableOptions/AdaptableOptions.d.ts +11 -5
  10. package/src/AdaptableOptions/ColumnFilterOptions.d.ts +4 -4
  11. package/src/AdaptableOptions/{CommentsOptions.d.ts → CommentOptions.d.ts} +5 -5
  12. package/src/AdaptableOptions/MenuOptions.d.ts +1 -1
  13. package/src/AdaptableOptions/MenuOptions.js +1 -5
  14. package/src/AdaptableOptions/{NotesOptions.d.ts → NoteOptions.d.ts} +1 -1
  15. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +17 -0
  16. package/src/Api/AdaptableApi.d.ts +5 -0
  17. package/src/Api/BulkUpdateApi.d.ts +0 -5
  18. package/src/Api/Events/AdaptableReady.d.ts +3 -3
  19. package/src/Api/Events/GridDataChanged.d.ts +4 -4
  20. package/src/Api/GridApi.d.ts +14 -13
  21. package/src/Api/Implementation/ActionColumnApiImpl.d.ts +2 -0
  22. package/src/Api/Implementation/ActionColumnApiImpl.js +33 -0
  23. package/src/Api/Implementation/AdaptableApiImpl.d.ts +1 -0
  24. package/src/Api/Implementation/AdaptableApiImpl.js +3 -0
  25. package/src/Api/Implementation/ApiBase.d.ts +2 -1
  26. package/src/Api/Implementation/ApiBase.js +4 -1
  27. package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
  28. package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
  29. package/src/Api/Implementation/CommentsApiImpl.js +2 -1
  30. package/src/Api/Implementation/ConfigApiImpl.js +8 -3
  31. package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
  32. package/src/Api/Implementation/GridApiImpl.js +20 -14
  33. package/src/Api/Implementation/LayoutApiImpl.d.ts +4 -0
  34. package/src/Api/Implementation/LayoutApiImpl.js +14 -0
  35. package/src/Api/Implementation/NotesApiImpl.d.ts +2 -4
  36. package/src/Api/Implementation/NotesApiImpl.js +4 -8
  37. package/src/Api/Implementation/OptionsApiImpl.d.ts +1 -1
  38. package/src/Api/Implementation/OptionsApiImpl.js +2 -2
  39. package/src/Api/Implementation/StatusBarApiImpl.d.ts +0 -1
  40. package/src/Api/Implementation/StatusBarApiImpl.js +0 -3
  41. package/src/Api/Implementation/ToolPanelApiImpl.js +6 -6
  42. package/src/Api/Internal/ActionRowInternalApi.d.ts +5 -1
  43. package/src/Api/Internal/ActionRowInternalApi.js +106 -0
  44. package/src/Api/Internal/AdaptableInternalApi.d.ts +3 -4
  45. package/src/Api/Internal/AdaptableInternalApi.js +10 -8
  46. package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
  47. package/src/Api/Internal/CalculatedColumnInternalApi.js +70 -0
  48. package/src/Api/Internal/ColumnFilterInternalApi.d.ts +1 -0
  49. package/src/Api/Internal/ColumnFilterInternalApi.js +11 -1
  50. package/src/Api/Internal/ColumnInternalApi.d.ts +4 -1
  51. package/src/Api/Internal/ColumnInternalApi.js +12 -0
  52. package/src/Api/Internal/CustomSortInternalApi.d.ts +3 -2
  53. package/src/Api/Internal/CustomSortInternalApi.js +32 -1
  54. package/src/Api/Internal/DataSetInternalApi.js +1 -1
  55. package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -0
  56. package/src/Api/Internal/FreeTextColumnInternalApi.js +59 -0
  57. package/src/Api/Internal/GridFilterInternalApi.js +1 -1
  58. package/src/Api/Internal/GridInternalApi.d.ts +21 -3
  59. package/src/Api/Internal/GridInternalApi.js +126 -7
  60. package/src/Api/Internal/TeamSharingInternalApi.js +1 -1
  61. package/src/Api/InteropioPluginApi.d.ts +2 -2
  62. package/src/Api/LayoutApi.d.ts +8 -0
  63. package/src/Api/OptionsApi.d.ts +1 -1
  64. package/src/EnvVars.d.ts +3 -0
  65. package/src/EnvVars.js +4 -0
  66. package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -0
  67. package/src/PredefinedConfig/Common/AggregationColumns.js +3 -0
  68. package/src/PredefinedConfig/NotesState.d.ts +10 -20
  69. package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -1
  70. package/src/Redux/ActionsReducers/NotesRedux.d.ts +3 -4
  71. package/src/Redux/ActionsReducers/NotesRedux.js +8 -7
  72. package/src/Redux/Store/AdaptableStore.d.ts +4 -6
  73. package/src/Redux/Store/AdaptableStore.js +22 -50
  74. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +7 -1
  75. package/src/Strategy/AdaptableModuleBase.d.ts +2 -3
  76. package/src/Strategy/AdaptableModuleBase.js +4 -7
  77. package/src/Strategy/AlertModule.d.ts +1 -2
  78. package/src/Strategy/AlertModule.js +2 -55
  79. package/src/Strategy/CalculatedColumnModule.d.ts +2 -3
  80. package/src/Strategy/CalculatedColumnModule.js +5 -25
  81. package/src/Strategy/ChartingModule.d.ts +0 -1
  82. package/src/Strategy/ChartingModule.js +2 -22
  83. package/src/Strategy/ColumnFilterModule.d.ts +1 -2
  84. package/src/Strategy/ColumnFilterModule.js +1 -64
  85. package/src/Strategy/CommentsModule.d.ts +1 -0
  86. package/src/Strategy/CommentsModule.js +2 -1
  87. package/src/Strategy/CustomSortModule.js +1 -1
  88. package/src/Strategy/DashboardModule.d.ts +1 -2
  89. package/src/Strategy/DashboardModule.js +1 -8
  90. package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
  91. package/src/Strategy/DataChangeHistoryModule.js +3 -1
  92. package/src/Strategy/DataSetModule.d.ts +1 -1
  93. package/src/Strategy/DataSetModule.js +1 -1
  94. package/src/Strategy/FlashingCellModule.d.ts +1 -2
  95. package/src/Strategy/FlashingCellModule.js +2 -15
  96. package/src/Strategy/FormatColumnModule.d.ts +0 -2
  97. package/src/Strategy/FormatColumnModule.js +0 -47
  98. package/src/Strategy/FreeTextColumnModule.d.ts +0 -1
  99. package/src/Strategy/FreeTextColumnModule.js +0 -30
  100. package/src/Strategy/GridFilterModule.d.ts +0 -1
  101. package/src/Strategy/GridFilterModule.js +0 -37
  102. package/src/Strategy/Interface/IModule.d.ts +0 -1
  103. package/src/Strategy/LayoutModule.d.ts +1 -3
  104. package/src/Strategy/LayoutModule.js +6 -50
  105. package/src/Strategy/NamedQueryModule.d.ts +0 -1
  106. package/src/Strategy/NamedQueryModule.js +0 -19
  107. package/src/Strategy/PlusMinusModule.d.ts +1 -1
  108. package/src/Strategy/PlusMinusModule.js +1 -1
  109. package/src/Strategy/ScheduleModule.d.ts +1 -1
  110. package/src/Strategy/ScheduleModule.js +1 -1
  111. package/src/Strategy/ShortcutModule.d.ts +1 -1
  112. package/src/Strategy/ShortcutModule.js +1 -1
  113. package/src/Strategy/StyledColumnModule.d.ts +0 -1
  114. package/src/Strategy/StyledColumnModule.js +0 -21
  115. package/src/Strategy/TeamSharingModule.d.ts +1 -0
  116. package/src/Strategy/TeamSharingModule.js +5 -5
  117. package/src/Strategy/ToolPanelModule.d.ts +0 -1
  118. package/src/Strategy/ToolPanelModule.js +0 -23
  119. package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
  120. package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
  121. package/src/Utilities/Constants/GeneralConstants.js +1 -0
  122. package/src/Utilities/Defaults/DefaultSettingsPanel.js +5 -4
  123. package/src/Utilities/Helpers/AdaptableHelper.d.ts +0 -3
  124. package/src/Utilities/Helpers/AdaptableHelper.js +0 -58
  125. package/src/Utilities/Helpers/Helper.d.ts +2 -0
  126. package/src/Utilities/Helpers/Helper.js +4 -0
  127. package/src/Utilities/Services/AggregatedScalarLiveValue.js +3 -1
  128. package/src/Utilities/Services/CellPopupService.js +0 -1
  129. package/src/Utilities/Services/LicenseService/index.d.ts +3 -0
  130. package/src/Utilities/Services/LicenseService/index.js +10 -3
  131. package/src/Utilities/Services/MetamodelService.d.ts +1 -1
  132. package/src/Utilities/Services/MetamodelService.js +6 -3
  133. package/src/Utilities/Services/RowEditService.d.ts +3 -2
  134. package/src/Utilities/Services/RowEditService.js +3 -1
  135. package/src/View/AdaptableView.js +0 -2
  136. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
  137. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  138. package/src/View/CalculatedColumn/utils.d.ts +1 -1
  139. package/src/View/CellSummary/CellSummaryPopup.js +1 -1
  140. package/src/View/Comments/CommentsPopup.js +12 -8
  141. package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
  142. package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
  143. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +1 -1
  144. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
  145. package/src/View/Components/Popups/WindowPopups/windowFactory.js +3 -0
  146. package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
  147. package/src/View/CustomSort/CustomSortSummary.js +1 -1
  148. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
  149. package/src/View/GridFilter/GridFilterViewPanel.js +6 -2
  150. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
  151. package/src/View/Layout/TransposedPopup.d.ts +3 -0
  152. package/src/View/Layout/TransposedPopup.js +193 -0
  153. package/src/View/Layout/Wizard/LayoutWizard.js +1 -1
  154. package/src/View/Notes/NotesPopup.js +9 -11
  155. package/src/View/Theme/ThemeSelector.js +3 -3
  156. package/src/agGrid/ActionColumnRenderer.js +4 -4
  157. package/src/agGrid/Adaptable.d.ts +3 -455
  158. package/src/agGrid/Adaptable.js +8 -5292
  159. package/src/agGrid/AdaptableAgGrid.d.ts +336 -0
  160. package/src/agGrid/AdaptableAgGrid.js +3780 -0
  161. package/src/agGrid/AdaptableLogger.js +77 -11
  162. package/src/agGrid/AgGridAdapter.d.ts +54 -0
  163. package/src/agGrid/AgGridAdapter.js +549 -0
  164. package/src/agGrid/AgGridColumnAdapter.d.ts +56 -0
  165. package/src/agGrid/AgGridColumnAdapter.js +813 -0
  166. package/src/agGrid/AgGridMenuAdapter.d.ts +28 -0
  167. package/src/agGrid/AgGridMenuAdapter.js +271 -0
  168. package/src/agGrid/AgGridOptionsService.d.ts +11 -0
  169. package/src/agGrid/AgGridOptionsService.js +50 -0
  170. package/src/agGrid/BadgeRenderer.js +1 -1
  171. package/src/agGrid/CheckboxRenderer.js +1 -1
  172. package/src/agGrid/FilterWrapper.d.ts +2 -2
  173. package/src/agGrid/FilterWrapper.js +1 -1
  174. package/src/agGrid/attachAddaptableColumnTypes.d.ts +12 -12
  175. package/src/agGrid/defaultAdaptableOptions.d.ts +3 -0
  176. package/src/{Utilities/Defaults/DefaultAdaptableOptions.js → agGrid/defaultAdaptableOptions.js} +70 -9
  177. package/src/agGrid/editors/AdaptableDateEditor/index.js +2 -2
  178. package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
  179. package/src/components/Datepicker/index.d.ts +1 -1
  180. package/src/components/InfiniteTable/index.js +2 -2
  181. package/src/components/Modal/index.d.ts +1 -0
  182. package/src/components/Modal/index.js +4 -3
  183. package/src/components/Select/Select.d.ts +2 -0
  184. package/src/components/Select/Select.js +2 -2
  185. package/src/env.js +2 -2
  186. package/src/metamodel/adaptable.metamodel.d.ts +39 -11
  187. package/src/metamodel/adaptable.metamodel.js +73 -32
  188. package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
  189. package/src/migration/AdaptableUpgradeHelper.js +48 -0
  190. package/src/migration/VersionUpgrade.d.ts +8 -0
  191. package/src/migration/VersionUpgrade.js +11 -0
  192. package/src/migration/VersionUpgrade17.d.ts +18 -0
  193. package/src/migration/VersionUpgrade17.js +342 -0
  194. package/src/migration/VersionUpgrade18.d.ts +5 -0
  195. package/src/migration/VersionUpgrade18.js +6 -0
  196. package/src/types.d.ts +7 -3
  197. package/tsconfig.esm.tsbuildinfo +1 -1
  198. package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +0 -2
  199. package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -3
  200. package/src/Utilities/Services/Interface/IRowEditService.js +0 -1
  201. package/src/agGrid/agGridHelper.d.ts +0 -57
  202. package/src/agGrid/agGridHelper.js +0 -686
  203. package/src/agGrid/agGridMenuHelper.d.ts +0 -46
  204. package/src/agGrid/agGridMenuHelper.js +0 -668
  205. /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
  206. /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
@@ -1,8 +1,8 @@
1
1
  import { InfiniteTable } from '@infinite-table/infinite-react';
2
2
  export * from '@infinite-table/infinite-react';
3
- import env from '../../env';
3
+ import { INFINITE_TABLE_LICENSE_KEY } from '../../EnvVars';
4
4
  const defaultProps = InfiniteTable.defaultProps;
5
- defaultProps.licenseKey = env.INFINITE_TABLE_LICENSE_KEY;
5
+ defaultProps.licenseKey = INFINITE_TABLE_LICENSE_KEY;
6
6
  defaultProps.sortable = false;
7
7
  defaultProps.rowHeight = '--ab-grid-row-height';
8
8
  defaultProps.draggableColumns = false;
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { FlexProps } from 'rebass';
3
+ export declare const ensurePortalElement: () => HTMLElement;
3
4
  export interface ModalProps extends FlexProps {
4
5
  isOpen?: boolean;
5
6
  baseZIndex?: number;
@@ -9,15 +9,16 @@ import { baseClassName, default as Backdrop } from './Backdrop';
9
9
  import { createUuid } from '../utils/uuid';
10
10
  import { isBrowserDocumentAvailable } from '../../View/UIHelper';
11
11
  let portalElement;
12
- const ensurePortalElement = () => {
12
+ export const ensurePortalElement = () => {
13
13
  if (!isBrowserDocumentAvailable()) {
14
- return;
14
+ return null;
15
15
  }
16
16
  if (portalElement) {
17
- return;
17
+ return portalElement;
18
18
  }
19
19
  portalElement = document.createElement('div');
20
20
  document.body.appendChild(portalElement);
21
+ return portalElement;
21
22
  };
22
23
  let globalCounter = 0;
23
24
  export const Modal = (props) => {
@@ -10,6 +10,8 @@ export type SelectProps<SelectValue extends unknown, IsMulti extends boolean = f
10
10
  options: readonly SelectOption<SelectValue>[] | SelectOption<SelectValue>[];
11
11
  disabled?: boolean;
12
12
  menuPosition?: 'fixed' | 'absolute';
13
+ menuPlacement?: 'auto' | 'bottom' | 'top';
14
+ searchable?: boolean;
13
15
  isClearable?: boolean;
14
16
  isMulti?: IsMulti;
15
17
  onChange: (value: IsMulti extends true ? SelectValue[] : SelectValue) => void;
@@ -12,7 +12,7 @@ const commonStyles = ({ isFocused, isDisabled, }) => {
12
12
  };
13
13
  };
14
14
  export const Select = function (props) {
15
- var _a, _b, _c, _d, _e, _f, _g;
15
+ var _a, _b, _c, _d, _e, _f, _g, _h;
16
16
  const doesOptionMatchValue = function (option) {
17
17
  if (typeof option.value === 'object' && option.value instanceof Date) {
18
18
  return isSameDay(option.value, props.value);
@@ -80,7 +80,7 @@ export const Select = function (props) {
80
80
  React.createElement(Icon, { name: "triangle-down", style: { height: 20, width: 20 } })));
81
81
  };
82
82
  }, []);
83
- return (React.createElement(SelectComponent, { onInputChange: props.onInputChange, onFocus: props.onFocus, isLoading: props.isLoding, options: props.options, className: props.className, isDisabled: disabled, isMulti: props.isMulti, value: selectedOption, menuPosition: (_g = props.menuPosition) !== null && _g !== void 0 ? _g : 'absolute',
83
+ return (React.createElement(SelectComponent, { onInputChange: props.onInputChange, onFocus: props.onFocus, isLoading: props.isLoding, options: props.options, className: props.className, isDisabled: disabled, menuPlacement: (_g = props.menuPlacement) !== null && _g !== void 0 ? _g : 'auto', isSearchable: props.searchable, isMulti: props.isMulti, value: selectedOption, menuPosition: (_h = props.menuPosition) !== null && _h !== void 0 ? _h : 'absolute',
84
84
  // This needed so the menu is not clipped by overflow: hidden
85
85
  menuPortalTarget: document.body, isClearable: props.isClearable, onChange: (option) => {
86
86
  if (props.isMulti) {
package/src/env.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export default {
2
2
  INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
3
- PUBLISH_TIMESTAMP: 1707926744158 || Date.now(),
4
- VERSION: "18.0.0-canary.3" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1710513512221 || Date.now(),
4
+ VERSION: "18.0.0-canary.5" || '--current-version--',
5
5
  };
@@ -681,6 +681,15 @@ export declare const ADAPTABLE_METAMODEL: {
681
681
  noCode: string;
682
682
  defVal?: undefined;
683
683
  ref?: undefined;
684
+ } | {
685
+ name: string;
686
+ kind: string;
687
+ desc: string;
688
+ isOpt: boolean;
689
+ defVal: string;
690
+ gridInfo?: undefined;
691
+ noCode?: undefined;
692
+ ref?: undefined;
684
693
  } | {
685
694
  name: string;
686
695
  kind: string;
@@ -735,15 +744,6 @@ export declare const ADAPTABLE_METAMODEL: {
735
744
  gridInfo?: undefined;
736
745
  defVal?: undefined;
737
746
  ref?: undefined;
738
- } | {
739
- name: string;
740
- kind: string;
741
- desc: string;
742
- isOpt: boolean;
743
- defVal: string;
744
- gridInfo?: undefined;
745
- noCode?: undefined;
746
- ref?: undefined;
747
747
  } | {
748
748
  name: string;
749
749
  kind: string;
@@ -1927,6 +1927,22 @@ export declare const ADAPTABLE_METAMODEL: {
1927
1927
  ref: string;
1928
1928
  })[];
1929
1929
  };
1930
+ CommentableCellContext: {
1931
+ name: string;
1932
+ kind: string;
1933
+ desc: string;
1934
+ };
1935
+ CommentsOptions: {
1936
+ name: string;
1937
+ kind: string;
1938
+ desc: string;
1939
+ props: {
1940
+ name: string;
1941
+ kind: string;
1942
+ desc: string;
1943
+ isOpt: boolean;
1944
+ }[];
1945
+ };
1930
1946
  CompatibleContext: {
1931
1947
  name: string;
1932
1948
  kind: string;
@@ -3659,6 +3675,18 @@ export declare const ADAPTABLE_METAMODEL: {
3659
3675
  kind: string;
3660
3676
  desc: string;
3661
3677
  };
3678
+ InteropioPluginOptions: {
3679
+ name: string;
3680
+ kind: string;
3681
+ desc: string;
3682
+ props: {
3683
+ name: string;
3684
+ kind: string;
3685
+ desc: string;
3686
+ isOpt: boolean;
3687
+ defVal: string;
3688
+ }[];
3689
+ };
3662
3690
  IPushPullDomain: {
3663
3691
  name: string;
3664
3692
  kind: string;
@@ -3955,7 +3983,7 @@ export declare const ADAPTABLE_METAMODEL: {
3955
3983
  isOpt: boolean;
3956
3984
  }[];
3957
3985
  };
3958
- NoteState: {
3986
+ NotesState: {
3959
3987
  name: string;
3960
3988
  kind: string;
3961
3989
  desc: string;
@@ -4512,7 +4540,7 @@ export declare const ADAPTABLE_METAMODEL: {
4512
4540
  isOpt?: undefined;
4513
4541
  })[];
4514
4542
  };
4515
- Report_2: {
4543
+ Report: {
4516
4544
  name: string;
4517
4545
  kind: string;
4518
4546
  desc: string;
@@ -1035,16 +1035,6 @@ export const ADAPTABLE_METAMODEL = {
1035
1035
  "kind": "I",
1036
1036
  "desc": "Note that can be applied to a Cell in AdapTable",
1037
1037
  "props": [
1038
- {
1039
- "name": "AdaptableId",
1040
- "kind": "s",
1041
- "desc": "Id of this AdapTable instance"
1042
- },
1043
- {
1044
- "name": "Author",
1045
- "kind": "u",
1046
- "desc": "Author of the Note"
1047
- },
1048
1038
  {
1049
1039
  "name": "ColumnId",
1050
1040
  "kind": "s",
@@ -1055,15 +1045,15 @@ export const ADAPTABLE_METAMODEL = {
1055
1045
  "kind": "u",
1056
1046
  "desc": "Value in Grid&#39;s Primary Key Column"
1057
1047
  },
1048
+ {
1049
+ "name": "Text",
1050
+ "kind": "s",
1051
+ "desc": "Value of the Note"
1052
+ },
1058
1053
  {
1059
1054
  "name": "Timestamp",
1060
1055
  "kind": "n",
1061
1056
  "desc": "When Note was made"
1062
- },
1063
- {
1064
- "name": "Value",
1065
- "kind": "s",
1066
- "desc": "Value of the Note"
1067
1057
  }
1068
1058
  ]
1069
1059
  },
@@ -1198,6 +1188,13 @@ export const ADAPTABLE_METAMODEL = {
1198
1188
  "gridInfo": "item",
1199
1189
  "defVal": "false"
1200
1190
  },
1191
+ {
1192
+ "name": "autoMigrateState",
1193
+ "kind": "b",
1194
+ "desc": "Automatically migrate the state from the previous version of Adaptable to the current version.",
1195
+ "isOpt": true,
1196
+ "defVal": "true"
1197
+ },
1201
1198
  {
1202
1199
  "name": "calendarOptions",
1203
1200
  "kind": "R",
@@ -1236,7 +1233,7 @@ export const ADAPTABLE_METAMODEL = {
1236
1233
  "ref": "ColumnOptions"
1237
1234
  },
1238
1235
  {
1239
- "name": "commentsOptions",
1236
+ "name": "commentOptions",
1240
1237
  "kind": "u",
1241
1238
  "desc": "Options for managing AdapTable Comments",
1242
1239
  "isOpt": true
@@ -1376,11 +1373,11 @@ export const ADAPTABLE_METAMODEL = {
1376
1373
  "gridInfo": "container"
1377
1374
  },
1378
1375
  {
1379
- "name": "notesOptions",
1376
+ "name": "noteOptions",
1380
1377
  "kind": "R",
1381
- "desc": "Options for managing AdapTable Comments",
1378
+ "desc": "Options for managing Notes",
1382
1379
  "isOpt": true,
1383
- "ref": "NotesOptions"
1380
+ "ref": "unknown"
1384
1381
  },
1385
1382
  {
1386
1383
  "name": "notificationsOptions",
@@ -3295,6 +3292,36 @@ export const ADAPTABLE_METAMODEL = {
3295
3292
  }
3296
3293
  ]
3297
3294
  },
3295
+ "CommentableCellContext": {
3296
+ "name": "CommentableCellContext",
3297
+ "kind": "I",
3298
+ "desc": "Context used when determining if a Comment can be added to a Cell"
3299
+ },
3300
+ "CommentsOptions": {
3301
+ "name": "CommentsOptions",
3302
+ "kind": "I",
3303
+ "desc": "Options for managing Comments and Comment Threads in AdapTable",
3304
+ "props": [
3305
+ {
3306
+ "name": "isCellCommentable",
3307
+ "kind": "f",
3308
+ "desc": "Whether a cell can be noted on TODO: check if it works",
3309
+ "isOpt": true
3310
+ },
3311
+ {
3312
+ "name": "loadCommentThreads",
3313
+ "kind": "f",
3314
+ "desc": "Called to load initial comments",
3315
+ "isOpt": true
3316
+ },
3317
+ {
3318
+ "name": "persistCommentThreads",
3319
+ "kind": "f",
3320
+ "desc": "Called when comments change",
3321
+ "isOpt": true
3322
+ }
3323
+ ]
3324
+ },
3298
3325
  "CompatibleContext": {
3299
3326
  "name": "CompatibleContext",
3300
3327
  "kind": "A",
@@ -4692,7 +4719,7 @@ export const ADAPTABLE_METAMODEL = {
4692
4719
  "name": "report",
4693
4720
  "kind": "R",
4694
4721
  "desc": "The exported report",
4695
- "ref": "unknown"
4722
+ "ref": "Report"
4696
4723
  },
4697
4724
  {
4698
4725
  "name": "reportData",
@@ -6091,6 +6118,20 @@ export const ADAPTABLE_METAMODEL = {
6091
6118
  "kind": "A",
6092
6119
  "desc": "Type for FDC3 Instrument List Context"
6093
6120
  },
6121
+ "InteropioPluginOptions": {
6122
+ "name": "InteropioPluginOptions",
6123
+ "kind": "I",
6124
+ "desc": "Options for using the Interop plugin",
6125
+ "props": [
6126
+ {
6127
+ "name": "showAdaptableAlertsAsNotifications",
6128
+ "kind": "b",
6129
+ "desc": "Converts AdapTable Alerts configured to display in popup as Interop Notifications",
6130
+ "isOpt": true,
6131
+ "defVal": "true"
6132
+ }
6133
+ ]
6134
+ },
6094
6135
  "IPushPullDomain": {
6095
6136
  "name": "IPushPullDomain",
6096
6137
  "kind": "I",
@@ -6708,8 +6749,8 @@ export const ADAPTABLE_METAMODEL = {
6708
6749
  }
6709
6750
  ]
6710
6751
  },
6711
- "NoteState": {
6712
- "name": "NoteState",
6752
+ "NotesState": {
6753
+ "name": "NotesState",
6713
6754
  "kind": "I",
6714
6755
  "desc": "Predefined Configuration for Notes Module",
6715
6756
  "props": [
@@ -7277,9 +7318,9 @@ export const ADAPTABLE_METAMODEL = {
7277
7318
  {
7278
7319
  "name": "Notes",
7279
7320
  "kind": "R",
7280
- "desc": "Collection of notes that can be edited on cell level",
7321
+ "desc": "Collection of personal Notes that are edited at Cell level",
7281
7322
  "isOpt": true,
7282
- "ref": "unknown"
7323
+ "ref": "NotesState"
7283
7324
  },
7284
7325
  {
7285
7326
  "name": "PlusMinus",
@@ -7465,7 +7506,7 @@ export const ADAPTABLE_METAMODEL = {
7465
7506
  "name": "report",
7466
7507
  "kind": "R",
7467
7508
  "desc": "Report being exported",
7468
- "ref": "unknown"
7509
+ "ref": "Report"
7469
7510
  }
7470
7511
  ]
7471
7512
  },
@@ -7757,8 +7798,8 @@ export const ADAPTABLE_METAMODEL = {
7757
7798
  }
7758
7799
  ]
7759
7800
  },
7760
- "Report_2": {
7761
- "name": "Report_2",
7801
+ "Report": {
7802
+ "name": "Report",
7762
7803
  "kind": "I",
7763
7804
  "desc": "A Report which can export data from AdapTable",
7764
7805
  "props": [
@@ -7809,7 +7850,7 @@ export const ADAPTABLE_METAMODEL = {
7809
7850
  "name": "report",
7810
7851
  "kind": "R",
7811
7852
  "desc": "Definition of Report being Run",
7812
- "ref": "unknown"
7853
+ "ref": "Report"
7813
7854
  },
7814
7855
  {
7815
7856
  "name": "reportData",
@@ -9228,7 +9269,7 @@ export const ADAPTABLE_METAMODEL = {
9228
9269
  "ValuesFilterOptions": {
9229
9270
  "name": "ValuesFilterOptions",
9230
9271
  "kind": "I",
9231
- "desc": "Options for managing the Values (IN) Column Filter",
9272
+ "desc": "Options for managing the Values (IN) Filter in Filter Bar and Filter Form",
9232
9273
  "props": [
9233
9274
  {
9234
9275
  "name": "filterValuesUsingTime",
@@ -9249,12 +9290,12 @@ export const ADAPTABLE_METAMODEL = {
9249
9290
  },
9250
9291
  {
9251
9292
  "name": "maxFilterValuesToDisplay",
9252
- "kind": "n",
9253
- "desc": "Distinct column items to display in Filter Form; useful with large datasource (though AdapTable offers virtualisation)",
9293
+ "kind": "u",
9294
+ "desc": "Distinct column items to display in Values Filter; useful with large datasource (though AdapTable offers virtualisation)",
9254
9295
  "isOpt": true,
9255
9296
  "gridInfo": "item",
9256
9297
  "noCode": "item",
9257
- "defVal": "2,000"
9298
+ "defVal": "undefined"
9258
9299
  },
9259
9300
  {
9260
9301
  "name": "showDistinctFilteredValuesOnly",
@@ -0,0 +1,38 @@
1
+ import { VersionUpgrade } from './VersionUpgrade';
2
+ import { AdaptableState } from '../PredefinedConfig/AdaptableState';
3
+ /**
4
+ * The upgrade config object
5
+ */
6
+ export interface UpgradeConfig {
7
+ /**
8
+ * The version to upgrade from
9
+ */
10
+ fromVersion: number;
11
+ /**
12
+ * The version to upgrade to
13
+ *
14
+ * @defaultValue The current version
15
+ */
16
+ toVersion?: number;
17
+ /**
18
+ * The logger object
19
+ *
20
+ * @defaultValue The console object
21
+ */
22
+ logger?: MigrationLogger;
23
+ }
24
+ export interface MigrationLogger {
25
+ success: (message: string, ...optionalParams: any[]) => void;
26
+ info: (message: string, ...optionalParams: any[]) => void;
27
+ warn: (message: string, ...optionalParams: any[]) => void;
28
+ error: (message: string, ...optionalParams: any[]) => void;
29
+ }
30
+ export declare class AdaptableUpgradeHelper {
31
+ protected currentMajorVersion: number;
32
+ protected versionUpgrades: Map<number, VersionUpgrade>;
33
+ protected logger: MigrationLogger;
34
+ private constructor();
35
+ static migrateAdaptableState(state: AdaptableState, config: UpgradeConfig): AdaptableState;
36
+ private getCurrentMajorVersion;
37
+ private getConsoleLogger;
38
+ }
@@ -0,0 +1,48 @@
1
+ import { VersionUpgrade17 } from './VersionUpgrade17';
2
+ import { VersionUpgrade18 } from './VersionUpgrade18';
3
+ import { ADAPTABLE_VERSION } from '../EnvVars';
4
+ export class AdaptableUpgradeHelper {
5
+ constructor(logger) {
6
+ this.currentMajorVersion = this.getCurrentMajorVersion(ADAPTABLE_VERSION);
7
+ this.logger = logger || this.getConsoleLogger();
8
+ this.versionUpgrades = new Map();
9
+ this.versionUpgrades.set(17, new VersionUpgrade17(this.logger));
10
+ this.versionUpgrades.set(18, new VersionUpgrade18(this.logger));
11
+ }
12
+ static migrateAdaptableState(state, config) {
13
+ const upgradeHelper = new AdaptableUpgradeHelper(config.logger);
14
+ let fromVersion = (config === null || config === void 0 ? void 0 : config.fromVersion) || 16;
15
+ const toVersion = (config === null || config === void 0 ? void 0 : config.toVersion) || upgradeHelper.currentMajorVersion;
16
+ if (fromVersion >= toVersion) {
17
+ console.warn(`The fromVersion (${fromVersion}) should be less than toVersion (${toVersion})!`);
18
+ return state;
19
+ }
20
+ if (fromVersion < 16) {
21
+ // until version 16 we didn't have versioning
22
+ fromVersion = 16;
23
+ }
24
+ const versionUpgrades = Array.from(upgradeHelper.versionUpgrades.keys());
25
+ let updatedState = structuredClone(state);
26
+ for (const version of versionUpgrades) {
27
+ if (version > fromVersion && version <= toVersion) {
28
+ upgradeHelper.logger.info(`Migration to ${version} started...`);
29
+ updatedState = upgradeHelper.versionUpgrades.get(version).migrateState(updatedState);
30
+ upgradeHelper.logger.info(`Migration to ${version} finished!`);
31
+ }
32
+ }
33
+ return updatedState;
34
+ }
35
+ getCurrentMajorVersion(version) {
36
+ // is good enough for now, we just need to make sure we don't forget to update it
37
+ // TODO AFL is there a better way to do this for local development?
38
+ return parseInt(version.split('.')[0]) || 18;
39
+ }
40
+ getConsoleLogger() {
41
+ return {
42
+ success: console.log,
43
+ info: console.info,
44
+ warn: console.warn,
45
+ error: console.error,
46
+ };
47
+ }
48
+ }
@@ -0,0 +1,8 @@
1
+ import { AdaptableState } from '../PredefinedConfig/AdaptableState';
2
+ import { MigrationLogger } from './AdaptableUpgradeHelper';
3
+ export declare abstract class VersionUpgrade {
4
+ protected logger: MigrationLogger;
5
+ constructor(logger: MigrationLogger);
6
+ abstract migrateState(state: AdaptableState): AdaptableState;
7
+ protected migrateStateWithMethods(state: AdaptableState, methods: ((state: AdaptableState) => AdaptableState)[]): AdaptableState;
8
+ }
@@ -0,0 +1,11 @@
1
+ export class VersionUpgrade {
2
+ constructor(logger) {
3
+ this.logger = logger;
4
+ }
5
+ migrateStateWithMethods(state, methods) {
6
+ for (let method of methods) {
7
+ state = method.call(this, state);
8
+ }
9
+ return state;
10
+ }
11
+ }
@@ -0,0 +1,18 @@
1
+ import { VersionUpgrade } from './VersionUpgrade';
2
+ import { AdaptableState } from '../PredefinedConfig/AdaptableState';
3
+ export declare class VersionUpgrade17 extends VersionUpgrade {
4
+ migrateState(state: AdaptableState): AdaptableState;
5
+ private migrateChartingState;
6
+ private migrateColumnFilterState;
7
+ private migrateDashboardState;
8
+ private migrateFlashinCellState;
9
+ private migrateFormatColumnState;
10
+ private migrateFreeTextColumnState;
11
+ private migrateGridFilterState;
12
+ private migrateNamedQueryState;
13
+ private migrateStyledColumnState;
14
+ private migrateToolPanelState;
15
+ private migrateAlertState;
16
+ private migrateCalculatedColumnState;
17
+ private migrateUserState;
18
+ }