@adaptabletools/adaptable 16.0.9 → 16.1.0-canary.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 (260) hide show
  1. package/agGrid.d.ts +4 -0
  2. package/agGrid.js +4 -0
  3. package/base.css +16 -14
  4. package/base.css.map +1 -1
  5. package/bundle.cjs.js +171 -170
  6. package/index.css +18 -14
  7. package/index.css.map +1 -1
  8. package/package.json +1 -1
  9. package/publishTimestamp.d.ts +1 -1
  10. package/publishTimestamp.js +1 -1
  11. package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +12 -1
  12. package/src/AdaptableOptions/AdaptableOptions.d.ts +7 -2
  13. package/src/AdaptableOptions/ChartingOptions.d.ts +48 -3
  14. package/src/AdaptableOptions/ColumnOptions.d.ts +17 -0
  15. package/src/AdaptableOptions/DataImportOptions.d.ts +57 -0
  16. package/src/AdaptableOptions/MenuOptions.d.ts +147 -8
  17. package/src/AdaptableOptions/MenuOptions.js +75 -0
  18. package/src/AdaptableOptions/NotesOptions.d.ts +23 -0
  19. package/src/AdaptableOptions/QuickSearchOptions.d.ts +8 -0
  20. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -0
  21. package/src/Api/AdaptableApi.d.ts +8 -3
  22. package/src/Api/ChartingApi.d.ts +30 -0
  23. package/src/Api/ColumnApi.d.ts +5 -0
  24. package/src/Api/ConfigApi.d.ts +4 -3
  25. package/src/Api/DataImportApi.d.ts +9 -0
  26. package/src/Api/Implementation/AdaptableApiImpl.d.ts +4 -2
  27. package/src/Api/Implementation/AdaptableApiImpl.js +4 -2
  28. package/src/Api/Implementation/ApiBase.d.ts +2 -2
  29. package/src/Api/Implementation/ApiBase.js +2 -2
  30. package/src/Api/Implementation/ChartingApiImpl.d.ts +8 -2
  31. package/src/Api/Implementation/ChartingApiImpl.js +64 -0
  32. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
  33. package/src/Api/Implementation/ColumnApiImpl.js +4 -0
  34. package/src/Api/Implementation/ConfigApiImpl.d.ts +3 -2
  35. package/src/Api/Implementation/ConfigApiImpl.js +9 -9
  36. package/src/Api/Implementation/DataImportApiImpl.d.ts +10 -0
  37. package/src/Api/Implementation/DataImportApiImpl.js +14 -0
  38. package/src/Api/Implementation/ExpressionApiImpl.js +1 -1
  39. package/src/Api/Implementation/NotesApiImpl.d.ts +20 -0
  40. package/src/Api/Implementation/NotesApiImpl.js +58 -0
  41. package/src/Api/Implementation/OptionsApiImpl.d.ts +3 -2
  42. package/src/Api/Implementation/OptionsApiImpl.js +5 -2
  43. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +7 -1
  44. package/src/Api/Implementation/UserInterfaceApiImpl.js +30 -0
  45. package/src/Api/Internal/AdaptableInternalApi.d.ts +0 -2
  46. package/src/Api/Internal/AdaptableInternalApi.js +0 -6
  47. package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
  48. package/src/Api/Internal/CalculatedColumnInternalApi.js +12 -0
  49. package/src/Api/Internal/ChartingInternalApi.d.ts +7 -0
  50. package/src/Api/Internal/ChartingInternalApi.js +45 -0
  51. package/src/Api/Internal/ColumnInternalApi.d.ts +3 -0
  52. package/src/Api/Internal/ColumnInternalApi.js +3 -0
  53. package/src/Api/Internal/DataImportInternalApi.d.ts +4 -0
  54. package/src/Api/Internal/DataImportInternalApi.js +49 -0
  55. package/src/Api/NotesAPi.d.ts +50 -0
  56. package/src/Api/NotesAPi.js +2 -0
  57. package/src/Api/OptionsApi.d.ts +8 -3
  58. package/src/Api/UserInterfaceApi.d.ts +22 -0
  59. package/src/PredefinedConfig/AdaptableState.d.ts +2 -2
  60. package/src/PredefinedConfig/ChartingState.d.ts +22 -0
  61. package/src/PredefinedConfig/ChartingState.js +9 -0
  62. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +12 -0
  63. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  64. package/src/PredefinedConfig/Common/Menu.d.ts +2 -7
  65. package/src/PredefinedConfig/Common/Types.d.ts +4 -4
  66. package/src/PredefinedConfig/Common/Types.js +3 -1
  67. package/src/PredefinedConfig/NotesState.d.ts +59 -0
  68. package/src/PredefinedConfig/NotesState.js +2 -0
  69. package/src/PredefinedConfig/PredefinedConfig.d.ts +2 -2
  70. package/src/PredefinedConfig/SystemState.d.ts +5 -3
  71. package/src/Redux/ActionsReducers/ChartingRedux.d.ts +28 -3
  72. package/src/Redux/ActionsReducers/ChartingRedux.js +52 -5
  73. package/src/Redux/ActionsReducers/NotesRedux.d.ts +39 -0
  74. package/src/Redux/ActionsReducers/NotesRedux.js +88 -0
  75. package/src/Redux/ActionsReducers/SystemRedux.d.ts +10 -10
  76. package/src/Redux/ActionsReducers/SystemRedux.js +23 -22
  77. package/src/Redux/Store/AdaptableStore.js +19 -11
  78. package/src/Strategy/ChartingModule.d.ts +5 -2
  79. package/src/Strategy/ChartingModule.js +28 -7
  80. package/src/Strategy/ColumnInfoModule.d.ts +11 -0
  81. package/src/Strategy/ColumnInfoModule.js +47 -0
  82. package/src/Strategy/DataImportModule.d.ts +11 -0
  83. package/src/Strategy/DataImportModule.js +36 -0
  84. package/src/Strategy/DataSetModule.js +1 -0
  85. package/src/Strategy/Fdc3Module.js +3 -2
  86. package/src/Strategy/FilterModule.js +5 -0
  87. package/src/Strategy/GridInfoModule.js +13 -82
  88. package/src/Strategy/Interface/IModule.d.ts +2 -0
  89. package/src/Strategy/LayoutModule.js +1 -0
  90. package/src/Strategy/{CommentsModule.d.ts → NotesModule.d.ts} +6 -6
  91. package/src/Strategy/{CommentsModule.js → NotesModule.js} +41 -41
  92. package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.d.ts +2 -0
  93. package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +20 -18
  94. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
  95. package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -1
  96. package/src/Utilities/Constants/ModuleConstants.d.ts +9 -3
  97. package/src/Utilities/Constants/ModuleConstants.js +11 -5
  98. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +5 -1
  99. package/src/Utilities/Defaults/DefaultSettingsPanel.js +3 -1
  100. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -2
  101. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +36 -10
  102. package/src/Utilities/Extensions/ObjectExtensions.d.ts +1 -0
  103. package/src/Utilities/Extensions/ObjectExtensions.js +5 -1
  104. package/src/Utilities/Helpers/AdaptableHelper.js +2 -0
  105. package/src/Utilities/Interface/MessagePopups.d.ts +2 -2
  106. package/src/Utilities/ObjectFactory.d.ts +2 -1
  107. package/src/Utilities/ObjectFactory.js +10 -2
  108. package/src/Utilities/Services/Interface/IEntitlementService.d.ts +4 -0
  109. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
  110. package/src/Utilities/Services/ModuleService.js +2 -0
  111. package/src/Utilities/Services/QueryLanguageService.d.ts +1 -2
  112. package/src/Utilities/Services/QueryLanguageService.js +1 -6
  113. package/src/Utilities/Services/ValidationService.js +15 -5
  114. package/src/View/AdaptableView.js +2 -2
  115. package/src/View/AdaptableViewFactory.js +7 -3
  116. package/src/View/Alert/Wizard/AlertButtonsEditor.js +20 -4
  117. package/src/View/Alert/Wizard/AlertWizard.js +14 -7
  118. package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +1 -1
  119. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.d.ts +2 -0
  120. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +25 -46
  121. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.d.ts +8 -0
  122. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +19 -0
  123. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +2 -0
  124. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +44 -3
  125. package/src/View/CalculatedColumn/utils.d.ts +2 -0
  126. package/src/View/CalculatedColumn/utils.js +14 -0
  127. package/src/View/Charting/ChartingWizard/AgChargingWizard/AgChargingWizard.d.ts +6 -0
  128. package/src/View/Charting/ChartingWizard/AgChargingWizard/AgChargingWizard.js +47 -0
  129. package/src/View/Charting/ChartingWizard/{PreviewChartSection.d.ts → AgChargingWizard/PreviewChartSection.d.ts} +1 -1
  130. package/src/View/Charting/ChartingWizard/{PreviewChartSection.js → AgChargingWizard/PreviewChartSection.js} +2 -2
  131. package/src/View/Charting/ChartingWizard/{SettingsSection.d.ts → AgChargingWizard/SettingsSection.d.ts} +1 -1
  132. package/src/View/Charting/ChartingWizard/{SettingsSection.js → AgChargingWizard/SettingsSection.js} +4 -4
  133. package/src/View/Charting/ChartingWizard/AgChargingWizard/index.d.ts +1 -0
  134. package/src/View/Charting/ChartingWizard/AgChargingWizard/index.js +4 -0
  135. package/src/View/Charting/ChartingWizard/ChartingWizard.d.ts +4 -3
  136. package/src/View/Charting/ChartingWizard/ChartingWizard.js +12 -39
  137. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/ExternalChartingWizard.d.ts +6 -0
  138. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/ExternalChartingWizard.js +59 -0
  139. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.d.ts +9 -0
  140. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +25 -0
  141. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/index.d.ts +1 -0
  142. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/index.js +4 -0
  143. package/src/View/Charting/ChartingWizard/index.d.ts +1 -0
  144. package/src/View/Charting/ChartingWizard/index.js +4 -0
  145. package/src/View/Charting/DeleteChartButton.d.ts +2 -1
  146. package/src/View/Charting/DeleteChartButton.js +4 -2
  147. package/src/View/Charting/EditChartButton.d.ts +2 -1
  148. package/src/View/Charting/ShowChartButton.js +47 -16
  149. package/src/View/Charting/{useChartState.d.ts → useAgChartState.d.ts} +1 -1
  150. package/src/View/Charting/{useChartState.js → useAgChartState.js} +7 -7
  151. package/src/View/Charting/useChartingElements.d.ts +2 -1
  152. package/src/View/Charting/useChartingElements.js +36 -26
  153. package/src/View/Charting/useExternalChartState.d.ts +7 -0
  154. package/src/View/Charting/useExternalChartState.js +56 -0
  155. package/src/View/ColumnInfo/ColumnInfo.d.ts +5 -0
  156. package/src/View/ColumnInfo/ColumnInfo.js +185 -0
  157. package/src/View/ColumnInfo/ColumnInfoPopup.d.ts +3 -0
  158. package/src/View/ColumnInfo/ColumnInfoPopup.js +15 -0
  159. package/src/View/Components/AdaptableIconSelector/index.d.ts +1 -1
  160. package/src/View/Components/ExternalRenderer.d.ts +1 -0
  161. package/src/View/Components/ExternalRenderer.js +2 -1
  162. package/src/View/Components/Panels/PanelWithImage.js +3 -3
  163. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +1 -1
  164. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +4 -1
  165. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +3 -0
  166. package/src/View/Components/Popups/WindowPopups/WindowPopups.d.ts +1 -0
  167. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +12 -2
  168. package/src/View/Components/Selectors/ColumnSelector.js +1 -1
  169. package/src/View/DataImport/DataImportPopup.d.ts +6 -0
  170. package/src/View/DataImport/DataImportPopup.js +32 -0
  171. package/src/View/DataImport/DataImportWizard/DataImportWizard.d.ts +8 -0
  172. package/src/View/DataImport/DataImportWizard/DataImportWizard.js +176 -0
  173. package/src/View/DataImport/DataImportWizard/index.d.ts +1 -0
  174. package/src/View/DataImport/DataImportWizard/index.js +4 -0
  175. package/src/View/DataImport/DataImportWizard/sections/DataPreview.d.ts +10 -0
  176. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +154 -0
  177. package/src/View/DataImport/DataImportWizard/sections/ImportSection.d.ts +9 -0
  178. package/src/View/DataImport/DataImportWizard/sections/ImportSection.js +24 -0
  179. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadFileSection.d.ts +8 -0
  180. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadFileSection.js +11 -0
  181. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.d.ts +13 -0
  182. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.js +23 -0
  183. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.d.ts +8 -0
  184. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.js +13 -0
  185. package/src/View/DataImport/DataImportWizard/sections/UploadSection/index.d.ts +1 -0
  186. package/src/View/DataImport/DataImportWizard/sections/UploadSection/index.js +4 -0
  187. package/src/View/DataImport/DataImportWizard/sections/ValidationSection.d.ts +11 -0
  188. package/src/View/DataImport/DataImportWizard/sections/ValidationSection.js +35 -0
  189. package/src/View/DataImport/systemFileHandlers.d.ts +3 -0
  190. package/src/View/DataImport/systemFileHandlers.js +44 -0
  191. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +6 -1
  192. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +9 -0
  193. package/src/View/GridInfo/{AdaptableObjectsSummary.js → GridInfoPopup/AdaptableObjectsSummary.js} +2 -2
  194. package/src/View/GridInfo/{AdaptableOptionsComponent.d.ts → GridInfoPopup/AdaptableOptionsComponent.d.ts} +1 -1
  195. package/src/View/GridInfo/{AdaptableOptionsComponent.js → GridInfoPopup/AdaptableOptionsComponent.js} +6 -6
  196. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.d.ts +6 -0
  197. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +82 -0
  198. package/src/View/GridInfo/GridInfoPopup/index.d.ts +1 -0
  199. package/src/View/GridInfo/GridInfoPopup/index.js +4 -0
  200. package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
  201. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  202. package/src/View/Notes/NotesListing.d.ts +2 -0
  203. package/src/View/{Comments/CommentListing.js → Notes/NotesListing.js} +13 -14
  204. package/src/View/Notes/NotesPopup.d.ts +2 -0
  205. package/src/View/{Comments/CommentPopup.js → Notes/NotesPopup.js} +21 -21
  206. package/src/View/Shortcut/Wizard/ShortcutWizard.js +6 -1
  207. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +14 -0
  208. package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -0
  209. package/src/View/Wizard/OnePageWizards.d.ts +1 -0
  210. package/src/View/Wizard/OnePageWizards.js +2 -2
  211. package/src/agGrid/Adaptable.d.ts +1 -1
  212. package/src/agGrid/Adaptable.js +28 -16
  213. package/src/agGrid/agGridHelper.d.ts +3 -3
  214. package/src/agGrid/agGridHelper.js +58 -30
  215. package/src/agGrid/agGridMenuHelper.d.ts +20 -9
  216. package/src/agGrid/agGridMenuHelper.js +292 -135
  217. package/src/components/ExpressionEditor/EditorInput.d.ts +1 -1
  218. package/src/components/ExpressionEditor/EditorInput.js +15 -6
  219. package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +5 -10
  220. package/src/components/ExpressionEditor/editorButtonsCumulativeAggregatedScalar.js +5 -5
  221. package/src/components/ExpressionEditor/editorButtonsQuantileAggregatedScalar.d.ts +2 -0
  222. package/src/components/ExpressionEditor/editorButtonsQuantileAggregatedScalar.js +25 -0
  223. package/src/components/ExpressionEditor/index.d.ts +1 -1
  224. package/src/components/ExpressionEditor/index.js +2 -1
  225. package/src/components/FileDroppable/index.d.ts +2 -1
  226. package/src/components/FileDroppable/index.js +8 -7
  227. package/src/components/icons/import.d.ts +3 -0
  228. package/src/components/icons/import.js +7 -0
  229. package/src/components/icons/index.js +4 -0
  230. package/src/components/icons/note.d.ts +3 -0
  231. package/src/components/icons/note.js +7 -0
  232. package/src/metamodel/adaptable.metamodel.d.ts +243 -61
  233. package/src/metamodel/adaptable.metamodel.js +1 -1
  234. package/src/parser/src/index.d.ts +2 -2
  235. package/src/parser/src/index.js +4 -4
  236. package/src/parser/src/tokenizer.d.ts +1 -1
  237. package/src/parser/src/tokenizer.js +14 -6
  238. package/src/parser/src/types.d.ts +2 -2
  239. package/src/types.d.ts +9 -8
  240. package/version.d.ts +1 -1
  241. package/version.js +1 -1
  242. package/src/AdaptableOptions/CommentsOptions.d.ts +0 -23
  243. package/src/Api/CommentsApi.d.ts +0 -50
  244. package/src/Api/Implementation/CommentsApiImpl.d.ts +0 -20
  245. package/src/Api/Implementation/CommentsApiImpl.js +0 -58
  246. package/src/PredefinedConfig/CommentsState.d.ts +0 -59
  247. package/src/Redux/ActionsReducers/CommentsRedux.d.ts +0 -39
  248. package/src/Redux/ActionsReducers/CommentsRedux.js +0 -92
  249. package/src/View/Comments/CommentListing.d.ts +0 -2
  250. package/src/View/Comments/CommentPopup.d.ts +0 -2
  251. package/src/View/GridInfo/ColumnInfoComponent.d.ts +0 -20
  252. package/src/View/GridInfo/ColumnInfoComponent.js +0 -176
  253. package/src/View/GridInfo/GridInfoPopup.d.ts +0 -16
  254. package/src/View/GridInfo/GridInfoPopup.js +0 -117
  255. package/src/View/GridInfo/GridOptionsComponent.d.ts +0 -16
  256. package/src/View/GridInfo/GridOptionsComponent.js +0 -36
  257. /package/src/AdaptableOptions/{CommentsOptions.js → DataImportOptions.js} +0 -0
  258. /package/src/{Api/CommentsApi.js → AdaptableOptions/NotesOptions.js} +0 -0
  259. /package/src/{PredefinedConfig/CommentsState.js → Api/DataImportApi.js} +0 -0
  260. /package/src/View/GridInfo/{AdaptableObjectsSummary.d.ts → GridInfoPopup/AdaptableObjectsSummary.d.ts} +0 -0
@@ -1,8 +1,8 @@
1
- import { ExpressionContext } from './types';
1
+ import { AST, ExpressionContext } from './types';
2
2
  export { findPathTo } from './utils';
3
3
  export declare function parse(input: string): {
4
4
  ast: any;
5
5
  evaluate: (context: ExpressionContext) => any;
6
6
  };
7
7
  export declare function evaluate(input: string, context: ExpressionContext): any;
8
- export declare function getAST(input: string): any;
8
+ export declare function getAbstractSyntaxTree(expression: string): AST;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAST = exports.evaluate = exports.parse = exports.findPathTo = void 0;
3
+ exports.getAbstractSyntaxTree = exports.evaluate = exports.parse = exports.findPathTo = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const evaluator_1 = require("./evaluator");
6
6
  // @ts-ignore
@@ -23,8 +23,8 @@ function evaluate(input, context) {
23
23
  return cache[input].evaluate(context);
24
24
  }
25
25
  exports.evaluate = evaluate;
26
- function getAST(input) {
27
- const { ast } = parse(input);
26
+ function getAbstractSyntaxTree(expression) {
27
+ const { ast } = parse(expression);
28
28
  return ast;
29
29
  }
30
- exports.getAST = getAST;
30
+ exports.getAbstractSyntaxTree = getAbstractSyntaxTree;
@@ -1,2 +1,2 @@
1
1
  import { Token } from './types';
2
- export declare function tokenize(parser: any, input: string): Token[];
2
+ export declare function getTokens(expression: string): Token[];
@@ -1,21 +1,29 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tokenize = void 0;
4
- function tokenize(parser, input) {
3
+ exports.getTokens = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // @ts-ignore
6
+ const parser_1 = tslib_1.__importDefault(require("./parser"));
7
+ const cache = {};
8
+ function getTokens(expression) {
9
+ if (cache[expression]) {
10
+ return cache[expression];
11
+ }
5
12
  const tokens = [];
6
- const lexer = parser.lexer;
7
- lexer.setInput(input);
13
+ const lexer = parser_1.default.lexer;
14
+ lexer.setInput(expression);
8
15
  while (!lexer.done) {
9
16
  const id = lexer.lex();
10
17
  const location = lexer.matched.length;
11
18
  tokens.push({
12
- type: parser.terminals_[id],
19
+ type: parser_1.default.terminals_[id],
13
20
  value: lexer.yytext,
14
21
  range: [location - lexer.yytext.length, location],
15
22
  });
16
23
  }
17
24
  // remove eof
18
25
  tokens.pop();
26
+ cache[expression] = tokens;
19
27
  return tokens;
20
28
  }
21
- exports.tokenize = tokenize;
29
+ exports.getTokens = getTokens;
@@ -1,6 +1,6 @@
1
1
  import { BaseContext } from '../../../types';
2
2
  export declare type AST = AST_Expression[];
3
- export declare type AST_Expression = AST_Expression[] | AST_Function | boolean | number | string;
3
+ export declare type AST_Expression = AST_Function | boolean | number | string;
4
4
  export declare type AST_Function = {
5
5
  type: string;
6
6
  args: AST_Expression[];
@@ -38,7 +38,7 @@ export interface ExpressionContext extends BaseContext {
38
38
  /**
39
39
  * Evaluate custom variables
40
40
  */
41
- evaluateCustomQueryVariable: (functionName: string, args?: any[]) => any;
41
+ evaluateCustomQueryVariable?: (functionName: string, args?: any[]) => any;
42
42
  }
43
43
  /**
44
44
  * Key-Value map of Expression Names and their implementation
package/src/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type { ExpressionFunction, ExpressionFunctionDocBlock, ExpressionFunctionHandler, ExpressionContext, ExpressionFunctionMap, ExpressionCategory, } from './../src/parser/src/types';
1
+ export type { ExpressionFunction, ExpressionFunctionDocBlock, ExpressionFunctionHandler, ExpressionContext, ExpressionFunctionMap, ExpressionCategory, AST, AST_Function, AST_Expression, Token, } from './../src/parser/src/types';
2
2
  export type { AgGridConfig } from './AdaptableInterfaces/IAdaptable';
3
3
  export type { AdaptableConfig } from './View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig';
4
4
  export type { AdaptableNoCodeWizardOptions, IAdaptableNoCodeWizard, } from './AdaptableInterfaces/AdaptableNoCodeWizard';
@@ -18,16 +18,17 @@ export type { EditOptions, ValidationResult, SmartEditCustomOperation, SmartEdit
18
18
  export type { ActionRowOptions, ActionRowButtonOptions, ActionRowFormOptions, ActionRowParamContext, ActionRowParamFieldContext, CreateActionRowFormContext, EditActionRowFormContext, ActionRowFormContext, ActionRowButtonType, ActionRowButtonConfigurationContext, ActionRowButtonsContext, SetPrimaryKeyValueContext, } from './AdaptableOptions/ActionRowOptions';
19
19
  export type { ActionColumnContext, ActionColumn, ActionColumnSettings, ActionColumnOptions, } from './AdaptableOptions/ActionColumnOptions';
20
20
  export type { ExportOptions, SystemExportDestination, SystemExportDestinations, CustomDestination, ExternalReport, PreProcessExportContext, AdaptableReportColumn, DataFormatType, ExportFormContext, ReportContext, ExportableColumnContext, } from './AdaptableOptions/ExportOptions';
21
+ export type { DataImportValidationError, DataImportOptions, DataImportFileHandler, DataImportApplyImportContext, DataImportValidateContext, } from './AdaptableOptions/DataImportOptions';
21
22
  export type { DataSetOptions, DataSet, DataSetFormContext, } from './AdaptableOptions/DataSetOptions';
22
23
  export type { CellSummaryOptions } from './AdaptableOptions/CellSummaryOptions';
23
24
  export type { CustomSortOptions, ColumnValuesComparer } from './AdaptableOptions/CustomSortOptions';
24
- export type { CommentOptions, CommmentableCellContext } from './AdaptableOptions/CommentsOptions';
25
+ export type { NotesOptions, NotableCellContext } from './AdaptableOptions/NotesOptions';
25
26
  export type { GroupingOptions, UnbalancedGroupsKeyContext, } from './AdaptableOptions/GroupingOptions';
26
27
  export type { Glue42PluginOptions } from './AdaptableOptions/Glue42PluginOptions';
27
28
  export type { Glue42WebPluginOptions } from './AdaptableOptions/Glue42WebPluginOptions';
28
29
  export type { IPushPullPluginOptions } from './AdaptableOptions/IPushPullPluginOptions';
29
30
  export type { LayoutOptions, LayoutViewOptions, LayoutTagOptions, LayoutAvailableContext, AutoGenerateTagsForLayoutsContext, LayoutAssociatedObject, PivotPreviewColumnsContext, } from './AdaptableOptions/LayoutOptions';
30
- export type { ChartingOptions, ChartContainer } from './AdaptableOptions/ChartingOptions';
31
+ export type { ChartingOptions, ChartContainer, ExternalChartingContext, ExternalChartingOptions, } from './AdaptableOptions/ChartingOptions';
31
32
  export type { OpenFinPluginOptions } from './AdaptableOptions/OpenFinPluginOptions';
32
33
  export type { MasterDetailPluginOptions, DetailInitContext, } from './AdaptableOptions/MasterDetailPluginOptions';
33
34
  export type { FinsemblePluginOptions, FinsemblePluginStateOptions, } from './AdaptableOptions/FinsemblePluginOptions';
@@ -41,11 +42,11 @@ export type { AggregationColumns, WeightedAverageAggregation, } from './Predefin
41
42
  export type { AccessLevel, Entitlement } from './PredefinedConfig/Common/Entitlement';
42
43
  export type { FilterActionOnDataChange } from './PredefinedConfig/Common/FilterActionOnDataChange';
43
44
  export type { ConfigState } from './PredefinedConfig/ConfigState';
44
- export type { AdaptableComment, CommentsState, AdaptableComments, CommentGridCell, } from './PredefinedConfig/CommentsState';
45
+ export type { AdaptableNote, NotesState as NoteState, AdaptableNotes, NoteGridCell, } from './PredefinedConfig/NotesState';
45
46
  export type { TeamSharingOptions, SharedEntitiesContext, } from './AdaptableOptions/TeamSharingOptions';
46
47
  export type { ToolPanelOptions, CustomToolPanel, ToolPanelButtonContext, CustomToolPanelButtonContext, } from './AdaptableOptions/ToolPanelOptions';
47
48
  export type { UserInterfaceOptions, BasePermittedValues, PermittedValues, EditLookUpPermittedValues, FilterPermittedValues, CustomSortPermittedValues, BulkUpdatePermittedValues, EditLookUpContext, PermittedValuesContext, FilterPermittedValuesContext, BulkUpdatePermittedValuesContext, GridInfoSections, GridInfoSection, ObjectTagsContext, CustomIcon, } from './AdaptableOptions/UserInterfaceOptions';
48
- export type { MenuOptions, MenuOrderContext } from './AdaptableOptions/MenuOptions';
49
+ export type { MenuOptions, MenuOrderContext, CustomContextMenuContext, CustomContextMenuItem, UserContextMenuItem, CustomColumnMenuContext, CustomColumnMenuItem, UserColumnMenuItem, AdaptableSystemMenuItem, AgGridMenuItem, AgGridContextMenuItemType, AgGridColumnMenuItemType, } from './AdaptableOptions/MenuOptions';
49
50
  export type { CustomSettingsPanel, SettingsPanelOptions, } from './AdaptableOptions/SettingsPanelOptions';
50
51
  export type { EntitlementOptions, EntitlementContext, DefaultAccessLevelContext, } from './AdaptableOptions/EntitlementOptions';
51
52
  export type { EvaluateExpressionExternallyContext, ExpressionOptions, ModuleExpressionFunctions, ModuleExpressionFunctionsMap, GlobalExpressionFunctionsContext, ModuleExpressionFunctionsContext, CustomQueryVariableContext, QueryableColumnContext, } from './AdaptableOptions/ExpressionOptions';
@@ -64,7 +65,7 @@ export type { ColumnApi } from './Api/ColumnApi';
64
65
  export type { ActionColumnApi } from './Api/ActionColumnApi';
65
66
  export type { ActionRowApi } from './Api/ActionRowApi';
66
67
  export type { ChartingApi } from './Api/ChartingApi';
67
- export type { CommentsApi } from './Api/CommentsApi';
68
+ export type { NotesApi } from './Api/NotesAPi';
68
69
  export type { ConfigApi } from './Api/ConfigApi';
69
70
  export type { CustomSortApi } from './Api/CustomSortApi';
70
71
  export type { DashboardApi } from './Api/DashboardApi';
@@ -140,7 +141,7 @@ export type { CellSummmary, CellSummaryOperation, CellSummaryOperationContext, }
140
141
  export type { FlashingCellDefinition, FlashingCellState, SystemFlashingCellPredicateId, SystemFlashingCellPredicateIds, } from './PredefinedConfig/FlashingCellState';
141
142
  export type { AdaptableAlert, AdaptableAlertType, AdaptableGenericAlert, AdaptableCellChangedAlert, AdaptableRowChangedAlert, AdaptableAlertBase, } from './PredefinedConfig/Common/AdaptableAlert';
142
143
  export type { AdaptableFlashingCell } from './PredefinedConfig/Common/AdaptableFlashingCell';
143
- export type { AdaptableColumn, AdaptableColumnBase, AdaptableColumnDataType, } from './PredefinedConfig/Common/AdaptableColumn';
144
+ export type { AdaptableColumn, AdaptableColumnBase, AdaptableColumnDataType, AdaptableColumnGroup, } from './PredefinedConfig/Common/AdaptableColumn';
144
145
  export type { AdaptableComparerFunction } from './PredefinedConfig/Common/AdaptableComparerFunction';
145
146
  export type { SystemStatusMessageInfo } from './PredefinedConfig/Common/SystemStatusMessageInfo';
146
147
  export type { AlternativeModuleName } from './PredefinedConfig/Common/AlternativeModuleName';
@@ -195,7 +196,7 @@ export type { Shortcut, ShortcutState, ShortcutScopeDataType, } from './Predefin
195
196
  export type { SharedEntity, AdaptableSharedEntity, CustomSharedEntity, TeamSharingState, SharedEntityType, AdaptableSharedEntityConfig, CustomSharedEntityConfig, } from './PredefinedConfig/TeamSharingState';
196
197
  export type { AdaptableTheme, ThemeState } from './PredefinedConfig/ThemeState';
197
198
  export type { ToolPanelState, AdaptableToolPanelDefinition, ToolPanelVisibilityMode, } from './PredefinedConfig/ToolPanelState';
198
- export type { AdaptableFrameworkComponent, AngularFrameworkComponent, ReactFrameworkComponent, CustomRenderContext, } from './AdaptableOptions/AdaptableFrameworkComponent';
199
+ export type { AdaptableFrameworkComponent, AngularFrameworkComponent, ReactFrameworkComponent, CustomRenderContext, CustomWindowConfig, } from './AdaptableOptions/AdaptableFrameworkComponent';
199
200
  export type { Fdc3StandardContextType, Fdc3CustomContextType, InstrumentContext, InstrumentListContext, PositionContext, PortfolioContext, ContactContext, ContactListContext, CountryContext, OrganizationContext, Fdc3ContextType, Fdc3Context, ChartContextType, ChartContext, ChatInitSettingsContext, ChatInitSettingsContextType, ContactContextType, ContactListContextType, CurrencyContext, EmailContext, CountryContextType, CurrencyContextType, EmailContextType, InstrumentContextType, InstrumentListContextType, NothingContextType, OrganizationContextType, PortfolioContextType, PositionContextType, NothingContext, Fdc3CustomContext, ValuationContext, ValuationContextType, TimeRangeContextType, TimeRangeContext, } from './PredefinedConfig/Common/Fdc3Context';
200
201
  export type { Fdc3IntentType, Fdc3StandardIntentType, Fdc3CustomIntentType, CompatibleContext, } from './PredefinedConfig/Common/Fdc3Intent';
201
202
  export type { Fdc3Options, GridDataContextMapping, ActionColumnDefaultConfiguration, ResolveContextDataContext, RaiseIntentConfig, BroadcastConfig, HandleFdc3IntentContext, HandleFdc3Context, Fdc3ButtonContext, Fdc3AdaptableButton, HandleFdc3IntentResolutionContext, UIControlConfig, Fdc3IntentOptions, Fdc3ContextOptions, RaiseIntentConfiguration, BroadcastConfiguration, FDC3ActionColumn, } from './AdaptableOptions/Fdc3Options';
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "16.0.9";
1
+ declare const _default: "16.1.0-canary.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 = '16.0.9'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
3
+ exports.default = '16.1.0-canary.0'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
@@ -1,23 +0,0 @@
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
- }
@@ -1,50 +0,0 @@
1
- import { AdaptableComment, AdaptableComments, CommentGridCell, CommentsState } from '../PredefinedConfig/CommentsState';
2
- /**
3
- * Provides run-time access to Comments Module and related State
4
- */
5
- export interface CommentsApi {
6
- /**
7
- *
8
- * @param comment
9
- * @param primaryKeyValue
10
- * @param columnId
11
- */
12
- addComment(comment: string, primaryKeyValue: any, columnId: string): void;
13
- editComment(adaptableComment: AdaptableComment): void;
14
- updateCommentText(comment: string, adaptableComment: AdaptableComment): void;
15
- /**
16
- *
17
- * @param comment
18
- */
19
- deleteComment(adptableComment: AdaptableComment): void;
20
- getCommentsState(): CommentsState;
21
- getAllComments(): AdaptableComments;
22
- /**
23
- * Gets all comments for a cell
24
- * @param commentGridCell comment position
25
- */
26
- getCellComments(commentGridCell: CommentGridCell): AdaptableComment[];
27
- /**
28
- * Returns a comment by uuid
29
- * @param uuid comment uuid
30
- */
31
- getCommentByUuid(uuid: string): AdaptableComment | undefined;
32
- /**
33
- * Gets all comments for a cell
34
- * @param commentGridCell comment position
35
- * @param editMode whether to show the comment in edit mode
36
- */
37
- showComment(commentGridCell: CommentGridCell, editMode?: boolean): void;
38
- /**
39
- * Hides the comment popup
40
- */
41
- hideComment(): void;
42
- /**
43
- * Gets the comment position of the currently open comment popup
44
- */
45
- getOpenCommentGridCell(): CommentGridCell | null;
46
- /**
47
- * Gets the comment edit mode
48
- */
49
- getCommentPopupEditMode(): boolean;
50
- }
@@ -1,20 +0,0 @@
1
- import { ApiBase } from './ApiBase';
2
- import { CommentsApi } from '../CommentsApi';
3
- import { AdaptableComment, AdaptableComments, CommentGridCell, CommentsState } from '../../PredefinedConfig/CommentsState';
4
- export declare class CommentsApiImpl extends ApiBase implements CommentsApi {
5
- addComment(comment: string, primaryKeyValue: any, columnId: string): void;
6
- editComment(adaptableComment: AdaptableComment): void;
7
- updateCommentText(comment: string, adaptableComment: AdaptableComment): void;
8
- deleteComment(comment: AdaptableComment): void;
9
- getCommentsState(): CommentsState;
10
- getAllComments(): AdaptableComments;
11
- getCellComments(config: {
12
- PrimaryKeyValue: string | number;
13
- ColumnId: string;
14
- }): AdaptableComments;
15
- getCommentByUuid(uuid: string): AdaptableComment | undefined;
16
- showComment(commentGridCell: CommentGridCell, editMode?: boolean): void;
17
- hideComment(): void;
18
- getOpenCommentGridCell(): CommentGridCell | undefined;
19
- getCommentPopupEditMode(): boolean;
20
- }
@@ -1,58 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CommentsApiImpl = void 0;
4
- const tslib_1 = require("tslib");
5
- const ApiBase_1 = require("./ApiBase");
6
- const CommentsRedux = tslib_1.__importStar(require("./../../Redux/ActionsReducers/CommentsRedux"));
7
- const SystemRedux = tslib_1.__importStar(require("./../../Redux/ActionsReducers/SystemRedux"));
8
- class CommentsApiImpl extends ApiBase_1.ApiBase {
9
- addComment(comment, primaryKeyValue, columnId) {
10
- const adaptableComment = {
11
- Value: comment,
12
- PrimaryKeyValue: primaryKeyValue,
13
- ColumnId: columnId,
14
- AdaptableId: this.adaptable.api.optionsApi.getAdaptableId(),
15
- Author: {
16
- UserName: this.adaptable.api.optionsApi.getUserName(),
17
- },
18
- Timestamp: Date.now(),
19
- };
20
- this.dispatchAction(CommentsRedux.CommentsAdd(adaptableComment));
21
- }
22
- editComment(adaptableComment) {
23
- adaptableComment.Timestamp = Date.now();
24
- this.dispatchAction(CommentsRedux.CommentsEdit(adaptableComment));
25
- }
26
- updateCommentText(comment, adaptableComment) {
27
- adaptableComment.Value = comment;
28
- this.editComment(adaptableComment);
29
- }
30
- deleteComment(comment) {
31
- this.dispatchAction(CommentsRedux.CommentsDelete(comment));
32
- }
33
- getCommentsState() {
34
- return this.getAdaptableState().Comments;
35
- }
36
- getAllComments() {
37
- return this.getCommentsState().Comments;
38
- }
39
- getCellComments(config) {
40
- return CommentsRedux.GetCommentsSelector(this.getAdaptableState().Comments, config);
41
- }
42
- getCommentByUuid(uuid) {
43
- return this.getAllComments().find((comment) => comment.Uuid === uuid);
44
- }
45
- showComment(commentGridCell, editMode) {
46
- this.dispatchAction(SystemRedux.SystemCommentsShow(commentGridCell, editMode));
47
- }
48
- hideComment() {
49
- this.dispatchAction(SystemRedux.SystemCommentsHide());
50
- }
51
- getOpenCommentGridCell() {
52
- return SystemRedux.SystemCommentsSelector(this.getAdaptableState().System);
53
- }
54
- getCommentPopupEditMode() {
55
- return SystemRedux.SystemCommentsEditModeSelector(this.getAdaptableState().System);
56
- }
57
- }
58
- exports.CommentsApiImpl = CommentsApiImpl;
@@ -1,59 +0,0 @@
1
- import { AdaptableObject } from '../types';
2
- import { ConfigState } from './ConfigState';
3
- /**
4
- * Comment that can be applied to a Cell in AdapTable
5
- */
6
- export interface AdaptableComment extends AdaptableObject {
7
- /**
8
- * When Comment was made
9
- */
10
- Timestamp: number;
11
- /**
12
- * Value of the Comment
13
- */
14
- Value: string;
15
- /**
16
- * Author of the Comment
17
- */
18
- Author: {
19
- UserName: string;
20
- };
21
- /**
22
- * Value in Grid's Primary Key Column
23
- */
24
- PrimaryKeyValue: any;
25
- /**
26
- * Id of Column containing the Comment
27
- */
28
- ColumnId: string;
29
- /**
30
- * Id of this AdapTable instance
31
- */
32
- AdaptableId: string;
33
- }
34
- /**
35
- * Collection of Cell Comments
36
- */
37
- export declare type AdaptableComments = AdaptableComment[];
38
- /**
39
- * Predefined Configuration for Comments Module
40
- */
41
- export interface CommentsState extends ConfigState {
42
- /**
43
- * Collection of AdapTable Comments
44
- */
45
- Comments?: AdaptableComments;
46
- }
47
- /**
48
- * Cell that contains a Comment
49
- */
50
- export declare type CommentGridCell = {
51
- /**
52
- * Value in Primary Key Column
53
- */
54
- PrimaryKeyValue: string | number;
55
- /**
56
- * Id of Column containing the Comment
57
- */
58
- ColumnId: string;
59
- };
@@ -1,39 +0,0 @@
1
- import { AdaptableComment, CommentsState } from '../../PredefinedConfig/CommentsState';
2
- import * as Redux from 'redux';
3
- /**
4
- * @ReduxAction A Comment has been added
5
- */
6
- export declare const COMMENTS_ADD = "COMMENTS_ADD";
7
- /**
8
- * @ReduxAction A Comment has been edited
9
- */
10
- export declare const COMMENTS_EDIT = "COMMENTS_EDIT";
11
- /**
12
- * @ReduxAction A Comment has been deleted
13
- */
14
- export declare const COMMENTS_DELETE = "COMMENTS_DELETE";
15
- /**
16
- * @ReduxAction Comments Module is ready
17
- */
18
- export declare const COMMENTS_READY = "COMMENTS_READY";
19
- export interface AdaptableCommentAction extends Redux.Action {
20
- adaptableComment: AdaptableComment;
21
- }
22
- export interface AdaptableCommentAddAction extends AdaptableCommentAction {
23
- }
24
- export interface AdaptableCommentEditAction extends AdaptableCommentAction {
25
- }
26
- export interface AdaptableCommentDeleteAction extends AdaptableCommentAction {
27
- }
28
- export interface CommentsReadyAction extends Redux.Action {
29
- commentsState: CommentsState;
30
- }
31
- export declare const CommentsAdd: (adaptableComment: AdaptableComment) => AdaptableCommentAddAction;
32
- export declare const CommentsEdit: (adaptableComment: AdaptableComment) => AdaptableCommentEditAction;
33
- export declare const CommentsDelete: (adaptableComment: AdaptableComment) => AdaptableCommentDeleteAction;
34
- export declare const CommentsReady: (commentsState: CommentsState) => CommentsReadyAction;
35
- export declare const GetCommentsSelector: (state: CommentsState, config?: {
36
- PrimaryKeyValue: string | number;
37
- ColumnId: string;
38
- }) => import("../../PredefinedConfig/CommentsState").AdaptableComments;
39
- export declare const CommentsReducer: Redux.Reducer<CommentsState>;
@@ -1,92 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CommentsReducer = exports.GetCommentsSelector = exports.CommentsReady = exports.CommentsDelete = exports.CommentsEdit = exports.CommentsAdd = exports.COMMENTS_READY = exports.COMMENTS_DELETE = exports.COMMENTS_EDIT = exports.COMMENTS_ADD = void 0;
4
- const tslib_1 = require("tslib");
5
- const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
6
- const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
7
- /**
8
- * @ReduxAction A Comment has been added
9
- */
10
- exports.COMMENTS_ADD = 'COMMENTS_ADD';
11
- /**
12
- * @ReduxAction A Comment has been edited
13
- */
14
- exports.COMMENTS_EDIT = 'COMMENTS_EDIT';
15
- /**
16
- * @ReduxAction A Comment has been deleted
17
- */
18
- exports.COMMENTS_DELETE = 'COMMENTS_DELETE';
19
- /**
20
- * @ReduxAction Comments Module is ready
21
- */
22
- exports.COMMENTS_READY = 'COMMENTS_READY';
23
- const CommentsAdd = (adaptableComment) => ({
24
- type: exports.COMMENTS_ADD,
25
- adaptableComment,
26
- });
27
- exports.CommentsAdd = CommentsAdd;
28
- const CommentsEdit = (adaptableComment) => ({
29
- type: exports.COMMENTS_EDIT,
30
- adaptableComment,
31
- });
32
- exports.CommentsEdit = CommentsEdit;
33
- const CommentsDelete = (adaptableComment) => ({
34
- type: exports.COMMENTS_DELETE,
35
- adaptableComment,
36
- });
37
- exports.CommentsDelete = CommentsDelete;
38
- const CommentsReady = (commentsState) => ({
39
- type: exports.COMMENTS_READY,
40
- commentsState,
41
- });
42
- exports.CommentsReady = CommentsReady;
43
- const GetCommentsSelector = (state, config) => {
44
- var _a, _b;
45
- if (!config) {
46
- return (_a = state === null || state === void 0 ? void 0 : state.Comments) !== null && _a !== void 0 ? _a : [];
47
- }
48
- return ((_b = state === null || state === void 0 ? void 0 : state.Comments) !== null && _b !== void 0 ? _b : []).filter((comment) => {
49
- if (comment.PrimaryKeyValue === config.PrimaryKeyValue &&
50
- comment.ColumnId === config.ColumnId) {
51
- // happy check
52
- return true;
53
- }
54
- // Primary keys retreived from the grid dom are always strings, so we must also consider them strings
55
- if ((typeof config.PrimaryKeyValue === 'number' && typeof comment.PrimaryKeyValue === 'string') ||
56
- (typeof config.PrimaryKeyValue === 'string' && typeof comment.PrimaryKeyValue === 'number')) {
57
- return (comment.PrimaryKeyValue.toString() === config.PrimaryKeyValue.toString() &&
58
- comment.ColumnId === config.ColumnId);
59
- }
60
- return false;
61
- });
62
- };
63
- exports.GetCommentsSelector = GetCommentsSelector;
64
- const initialState = {
65
- Comments: GeneralConstants_1.EMPTY_ARRAY,
66
- };
67
- const CommentsReducer = (state = initialState, action) => {
68
- let adaptableComments;
69
- switch (action.type) {
70
- case exports.COMMENTS_ADD: {
71
- const actionAdaptableComment = action
72
- .adaptableComment;
73
- AdaptableHelper_1.default.addUuidAndSource(actionAdaptableComment);
74
- adaptableComments = [].concat(state.Comments);
75
- adaptableComments.push(actionAdaptableComment);
76
- return Object.assign(Object.assign({}, state), { Comments: adaptableComments });
77
- }
78
- case exports.COMMENTS_EDIT: {
79
- const actionAdaptableComment = action
80
- .adaptableComment;
81
- return Object.assign(Object.assign({}, state), { Comments: state.Comments.map((abObject) => abObject.Uuid === actionAdaptableComment.Uuid ? actionAdaptableComment : abObject) });
82
- }
83
- case exports.COMMENTS_DELETE: {
84
- const actionAdaptableComment = action
85
- .adaptableComment;
86
- return Object.assign(Object.assign({}, state), { Comments: state.Comments.filter((abObject) => abObject.Uuid !== actionAdaptableComment.Uuid) });
87
- }
88
- default:
89
- return state;
90
- }
91
- };
92
- exports.CommentsReducer = CommentsReducer;
@@ -1,2 +0,0 @@
1
- import * as React from 'react';
2
- export declare const CommentsListing: React.FunctionComponent;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const CommentPopup: () => JSX.Element;
@@ -1,20 +0,0 @@
1
- import * as React from 'react';
2
- import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
3
- import { AdaptableApi } from '../../Api/AdaptableApi';
4
- interface ColumnInfoProps extends React.ClassAttributes<ColumnInfoComponent> {
5
- api: AdaptableApi;
6
- teamSharingActivated: boolean;
7
- column: AdaptableColumn | undefined;
8
- }
9
- export interface ColumnInfoState {
10
- SelectedColumn: AdaptableColumn | undefined;
11
- }
12
- export declare class ColumnInfoComponent extends React.Component<ColumnInfoProps, ColumnInfoState> {
13
- constructor(props: ColumnInfoProps);
14
- render(): JSX.Element;
15
- private onColumnSelectedChanged;
16
- private isModuleAvailable;
17
- private isModuleReadOnly;
18
- private getAccessLevel;
19
- }
20
- export {};