@adaptabletools/adaptable-cjs 18.0.0-canary.12 → 18.0.0-canary.13

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 (106) hide show
  1. package/base.css +1 -1
  2. package/base.css.map +1 -1
  3. package/index.css +1 -1
  4. package/index.css.map +1 -1
  5. package/package.json +1 -1
  6. package/src/AdaptableOptions/MenuOptions.d.ts +1 -53
  7. package/src/AdaptableOptions/MenuOptions.js +3 -3
  8. package/src/Api/AdaptableApi.d.ts +2 -2
  9. package/src/Api/ConfigApi.d.ts +2 -3
  10. package/src/Api/GridApi.d.ts +2 -1
  11. package/src/Api/Implementation/ActionColumnApiImpl.js +3 -6
  12. package/src/Api/Implementation/ConfigApiImpl.js +7 -7
  13. package/src/Api/Implementation/GridApiImpl.d.ts +2 -1
  14. package/src/Api/Implementation/GridApiImpl.js +8 -1
  15. package/src/Api/Implementation/NoteApiImpl.d.ts +2 -2
  16. package/src/Api/Implementation/NoteApiImpl.js +9 -9
  17. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -3
  18. package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -8
  19. package/src/Api/Internal/ActionRowInternalApi.js +1 -1
  20. package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -2
  21. package/src/Api/Internal/AdaptableInternalApi.js +11 -11
  22. package/src/Api/Internal/CalculatedColumnInternalApi.js +3 -2
  23. package/src/Api/Internal/Fdc3InternalApi.js +2 -2
  24. package/src/Api/Internal/FreeTextColumnInternalApi.js +3 -2
  25. package/src/Api/Internal/GridInternalApi.d.ts +2 -0
  26. package/src/Api/Internal/GridInternalApi.js +15 -0
  27. package/src/Api/NoteApi.d.ts +5 -5
  28. package/src/Api/OptionsApi.d.ts +2 -2
  29. package/src/Api/UserInterfaceApi.d.ts +0 -11
  30. package/src/PredefinedConfig/AdaptableState.d.ts +1 -1
  31. package/src/PredefinedConfig/CommentState.d.ts +16 -12
  32. package/src/PredefinedConfig/Common/TransposeConfig.d.ts +6 -0
  33. package/src/PredefinedConfig/Common/TransposeConfig.js +2 -0
  34. package/src/PredefinedConfig/Common/Types.d.ts +4 -4
  35. package/src/PredefinedConfig/Common/Types.js +4 -1
  36. package/src/PredefinedConfig/NoteState.d.ts +1 -1
  37. package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -1
  38. package/src/Redux/ActionsReducers/NoteRedux.d.ts +38 -0
  39. package/src/Redux/ActionsReducers/{NotesRedux.js → NoteRedux.js} +26 -26
  40. package/src/Redux/ActionsReducers/SystemRedux.d.ts +1 -1
  41. package/src/Redux/Store/AdaptableStore.js +7 -7
  42. package/src/Strategy/{CommentsModule.d.ts → CommentModule.d.ts} +1 -5
  43. package/src/Strategy/{CommentsModule.js → CommentModule.js} +7 -8
  44. package/src/Strategy/LayoutModule.d.ts +1 -0
  45. package/src/Strategy/LayoutModule.js +17 -1
  46. package/src/Strategy/{NotesModule.d.ts → NoteModule.d.ts} +2 -1
  47. package/src/Strategy/{NotesModule.js → NoteModule.js} +9 -5
  48. package/src/Strategy/Utilities/getScopeViewItems.js +3 -0
  49. package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
  50. package/src/Utilities/Constants/ModuleConstants.js +7 -7
  51. package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
  52. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +10 -0
  53. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -3
  54. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
  55. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +15 -0
  56. package/src/Utilities/ObjectFactory.d.ts +3 -3
  57. package/src/Utilities/ObjectFactory.js +4 -24
  58. package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +1 -0
  59. package/src/Utilities/Services/AggregatedScalarLiveValue.js +12 -10
  60. package/src/Utilities/Services/CellPopupService.js +2 -2
  61. package/src/Utilities/Services/ModuleService.js +4 -0
  62. package/src/Utilities/Services/QueryLanguageService.js +2 -2
  63. package/src/Utilities/Services/SummaryService.d.ts +1 -1
  64. package/src/Utilities/adaptableQlUtils.d.ts +2 -0
  65. package/src/Utilities/adaptableQlUtils.js +18 -0
  66. package/src/View/AdaptableViewFactory.js +2 -2
  67. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +1 -1
  68. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +1 -1
  69. package/src/View/Comments/CommentsEditor.js +1 -1
  70. package/src/View/Comments/CommentsPopup.js +8 -4
  71. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +5 -5
  72. package/src/View/Components/ValueSelector/index.d.ts +1 -0
  73. package/src/View/Components/ValueSelector/index.js +1 -1
  74. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +0 -1
  75. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -1
  76. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +3 -1
  77. package/src/View/Layout/TransposedPopup.js +19 -18
  78. package/src/View/Layout/Wizard/LayoutWizard.js +8 -0
  79. package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +8 -0
  80. package/src/View/Layout/Wizard/sections/RowSummarySection.js +146 -0
  81. package/src/View/Note/NotePopup.d.ts +2 -0
  82. package/src/View/{Notes/NotesPopup.js → Note/NotePopup.js} +5 -5
  83. package/src/agGrid/AdaptableAgGrid.js +4 -4
  84. package/src/agGrid/AgGridAdapter.d.ts +1 -0
  85. package/src/agGrid/AgGridAdapter.js +5 -0
  86. package/src/agGrid/AgGridColumnAdapter.js +3 -3
  87. package/src/agGrid/defaultAdaptableOptions.js +0 -7
  88. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +2 -1
  89. package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +0 -1
  90. package/src/components/ExpressionEditor/QueryBuilder/utils.js +3 -17
  91. package/src/components/icons/note.js +2 -2
  92. package/src/env.js +2 -2
  93. package/src/metamodel/adaptable.metamodel.d.ts +36 -11
  94. package/src/metamodel/adaptable.metamodel.js +1 -1
  95. package/src/parser/src/parser.js +117 -1257
  96. package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
  97. package/src/parser/src/predicate/mapQlPredicateToExpression.js +2 -1
  98. package/src/parser/src/types.d.ts +2 -2
  99. package/src/types.d.ts +1 -0
  100. package/tsconfig.cjs.tsbuildinfo +1 -1
  101. package/src/Redux/ActionsReducers/NotesRedux.d.ts +0 -38
  102. package/src/View/Notes/NotesPopup.d.ts +0 -2
  103. /package/src/Api/Internal/{NotesInternalApi.d.ts → NoteInternalApi.d.ts} +0 -0
  104. /package/src/Api/Internal/{NotesInternalApi.js → NoteInternalApi.js} +0 -0
  105. /package/src/View/{Notes → Note}/NoteEditor.d.ts +0 -0
  106. /package/src/View/{Notes → Note}/NoteEditor.js +0 -0
@@ -11,21 +11,21 @@ const ColumnSelector_1 = require("../Components/Selectors/ColumnSelector");
11
11
  const AdaptableAgGrid_1 = require("../../agGrid/AdaptableAgGrid");
12
12
  const TransposedPopup = (props) => {
13
13
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
14
+ const { transposedColumnId, hideTransposedColumn, visibleColumns, visibleRows } = props.popupProps;
14
15
  const rowNodes = React.useMemo(() => {
15
- return adaptable.api.gridApi.getAllRowNodes();
16
+ return props.popupProps.visibleRows
17
+ ? adaptable.api.gridApi.getVisibleRowNodes()
18
+ : adaptable.api.gridApi.getAllRowNodes();
16
19
  }, [
17
- // can be later triggered by ticking data
20
+ // can be later triggered by tickng data
18
21
  ]);
19
- const { transposedColumnId, hideTransposedColumn = true } = props.popupProps;
20
22
  const primaryKey = adaptable.api.optionsApi.getPrimaryKey();
21
- // Thist must be qunique
22
- const transposeByColumnId = primaryKey;
23
- // Only used to show nice values a the top of the grid, istead on the value
24
- // of the primarykey
25
- const [synteticTransposedByColumnId, setSynteticTransposedByColumnId] = React.useState(transposedColumnId !== null && transposedColumnId !== void 0 ? transposedColumnId : primaryKey);
23
+ const [syntheticTransposedByColumnId, setSyntheticTransposedByColumnId] = React.useState(transposedColumnId);
26
24
  const columns = React.useMemo(() => {
27
25
  // customisable
28
- return adaptable.api.columnApi.getColumns();
26
+ return visibleColumns
27
+ ? adaptable.api.columnApi.getVisibleColumns()
28
+ : adaptable.api.columnApi.getColumns();
29
29
  }, []);
30
30
  const adaptableContainerId = 'transposed-adaptable-container';
31
31
  const agGridContainerId = 'transposed-adaptable-ag-grid-container';
@@ -44,9 +44,10 @@ const TransposedPopup = (props) => {
44
44
  for (const row of rowNodes) {
45
45
  // we force the col-ids to be strings, easer to work with
46
46
  //row[transposeByColumnId] + '';
47
- const colId = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, transposeByColumnId) + '';
47
+ const colId = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, primaryKey) + '';
48
48
  //row[synteticTransposedByColumnId] + '';
49
- const header = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, synteticTransposedByColumnId) + '';
49
+ const header = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, syntheticTransposedByColumnId) +
50
+ '';
50
51
  transposedColumns.push({
51
52
  colId,
52
53
  header,
@@ -56,7 +57,7 @@ const TransposedPopup = (props) => {
56
57
  /**
57
58
  * We can hide the transposed column, if we want
58
59
  */
59
- if (hideTransposedColumn && column.columnId === synteticTransposedByColumnId) {
60
+ if (hideTransposedColumn && column.columnId === syntheticTransposedByColumnId) {
60
61
  continue;
61
62
  }
62
63
  const transposedRow = {
@@ -67,7 +68,7 @@ const TransposedPopup = (props) => {
67
68
  };
68
69
  for (let row of rowNodes) {
69
70
  // [transposed-by-column-value[n]]: [other column value[n]]
70
- const key = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, transposeByColumnId);
71
+ const key = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, primaryKey);
71
72
  // row[column.field]
72
73
  let value = adaptable.api.gridApi.getDisplayValueFromRowNode(row, column.columnId);
73
74
  if (value instanceof Date) {
@@ -81,7 +82,7 @@ const TransposedPopup = (props) => {
81
82
  transposedColumns,
82
83
  transposedRows,
83
84
  };
84
- }, [rowNodes, primaryKey, synteticTransposedByColumnId]);
85
+ }, [rowNodes, primaryKey, syntheticTransposedByColumnId]);
85
86
  React.useEffect(() => {
86
87
  // Mounting in an effect, so the nodes are rendered/available
87
88
  const hostAdaptableOptions = adaptable.adaptableOptions;
@@ -125,7 +126,7 @@ const TransposedPopup = (props) => {
125
126
  };
126
127
  const firstColumn = {
127
128
  field: transposedFirstColumnHeader,
128
- headerName: adaptable.api.columnApi.getFriendlyNameForColumnId(synteticTransposedByColumnId),
129
+ headerName: adaptable.api.columnApi.getFriendlyNameForColumnId(syntheticTransposedByColumnId),
129
130
  };
130
131
  const agGridOptions = {
131
132
  suppressLoadingOverlay: true,
@@ -177,7 +178,7 @@ const TransposedPopup = (props) => {
177
178
  transposedAdaptableApi.destroy();
178
179
  }
179
180
  };
180
- }, [synteticTransposedByColumnId]);
181
+ }, [syntheticTransposedByColumnId]);
181
182
  /**
182
183
  * Need to get all data, manualy pivot the grid using the primary key.
183
184
  *
@@ -189,8 +190,8 @@ const TransposedPopup = (props) => {
189
190
  React.createElement(Panel_1.default, null,
190
191
  React.createElement(FormLayout_1.default, null,
191
192
  React.createElement(FormLayout_1.FormRow, { label: "Elevated Column" },
192
- React.createElement(ColumnSelector_1.ColumnSelector, { value: synteticTransposedByColumnId, onChange: (colId) => {
193
- setSynteticTransposedByColumnId(colId);
193
+ React.createElement(ColumnSelector_1.ColumnSelector, { value: syntheticTransposedByColumnId, onChange: (colId) => {
194
+ setSyntheticTransposedByColumnId(colId);
194
195
  } })))),
195
196
  React.createElement(rebass_1.Flex, { height: "100%" },
196
197
  React.createElement(rebass_1.Box, { id: "transposed-adaptable-container" }),
@@ -18,6 +18,7 @@ const AggregationsSection_1 = require("./sections/AggregationsSection");
18
18
  const SortSection_1 = require("./sections/SortSection");
19
19
  const FilterSection_1 = require("./sections/FilterSection");
20
20
  const GridFilterSection_1 = require("./sections/GridFilterSection");
21
+ const RowSummarySection_1 = require("./sections/RowSummarySection");
21
22
  const LayoutWizard = (props) => {
22
23
  var _a, _b;
23
24
  const dispatch = (0, react_redux_1.useDispatch)();
@@ -111,6 +112,13 @@ const LayoutWizard = (props) => {
111
112
  render: () => (React.createElement(rebass_1.Box, { p: 2, style: { height: '100%' } },
112
113
  React.createElement(RowGroupingSection_1.RowGroupingSection, { onChange: setLayout }))),
113
114
  },
115
+ {
116
+ title: 'Row Summaries',
117
+ details: 'Configure Row Summaries',
118
+ renderSummary: () => React.createElement(RowGroupingSection_1.RowGroupingSectionSummary, null),
119
+ render: () => (React.createElement(rebass_1.Box, { p: 2, style: { height: '100%' } },
120
+ React.createElement(RowSummarySection_1.RowSummarySection, { onChange: setLayout }))),
121
+ },
114
122
  {
115
123
  title: 'Aggregations',
116
124
  isVisible: () => layoutSupportedFeatures.AggregationColumns,
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { Layout } from '../../../../../types';
3
+ export declare const RowGroupingSectionSummary: React.FunctionComponent;
4
+ interface RowSummarySectionProps {
5
+ onChange: (data: Layout) => void;
6
+ }
7
+ export declare const RowSummarySection: React.FunctionComponent<RowSummarySectionProps>;
8
+ export {};
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RowSummarySection = exports.RowGroupingSectionSummary = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const rebass_1 = require("rebass");
7
+ const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
8
+ const Panel_1 = tslib_1.__importDefault(require("../../../../components/Panel"));
9
+ const Select_1 = require("../../../../components/Select");
10
+ const SimpleButton_1 = tslib_1.__importDefault(require("../../../../components/SimpleButton"));
11
+ const Tabs_1 = require("../../../../components/Tabs");
12
+ const Tag_1 = require("../../../../components/Tag");
13
+ const adaptableQlUtils_1 = require("../../../../Utilities/adaptableQlUtils");
14
+ const ModuleConstants_1 = require("../../../../Utilities/Constants/ModuleConstants");
15
+ const SummaryService_1 = require("../../../../Utilities/Services/SummaryService");
16
+ const sortWithOrder_1 = require("../../../../Utilities/sortWithOrder");
17
+ const AdaptableContext_1 = require("../../../AdaptableContext");
18
+ const ValueSelector_1 = require("../../../Components/ValueSelector");
19
+ const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
20
+ const Utilities_1 = require("./Utilities");
21
+ const getAvailableExpressionsForColumnType = (columnType, availableScalarExpressions) => {
22
+ const inputType = (0, adaptableQlUtils_1.mapColumnDataTypeToExpressionFunctionType)(columnType);
23
+ return Object.entries(availableScalarExpressions !== null && availableScalarExpressions !== void 0 ? availableScalarExpressions : {})
24
+ .map(([expression, expressionDef]) => {
25
+ var _a, _b;
26
+ let firstArg = null;
27
+ if (!SummaryService_1.summarySupportedExpressions.includes(expression)) {
28
+ return null;
29
+ }
30
+ if (Array.isArray((_a = expressionDef === null || expressionDef === void 0 ? void 0 : expressionDef.inputs) === null || _a === void 0 ? void 0 : _a[0])) {
31
+ // @ts-ignore
32
+ firstArg = (_b = expressionDef.inputs.find((input) => input.includes(inputType))) === null || _b === void 0 ? void 0 : _b[0];
33
+ }
34
+ else {
35
+ firstArg = expressionDef.inputs[0];
36
+ }
37
+ if (inputType === firstArg) {
38
+ return expression;
39
+ }
40
+ else {
41
+ return null;
42
+ }
43
+ })
44
+ .filter(Boolean);
45
+ };
46
+ const RowGroupingSectionSummary = () => {
47
+ var _a;
48
+ const adaptable = (0, AdaptableContext_1.useAdaptable)();
49
+ const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
50
+ return (React.createElement(rebass_1.Box, null, ((_a = layout.RowGroupedColumns) === null || _a === void 0 ? void 0 : _a.length) ? (layout.RowGroupedColumns.map((columnId) => (React.createElement(Tag_1.Tag, { mr: 1, key: columnId }, adaptable.api.columnApi.getFriendlyNameForColumnId(columnId))))) : (React.createElement(Tag_1.Tag, null, "No Row Grouping"))));
51
+ };
52
+ exports.RowGroupingSectionSummary = RowGroupingSectionSummary;
53
+ const RowSummaryEditor = ({ rowSummary, onChange, availableScalarExpressions, onDelete, }) => {
54
+ const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
55
+ const adaptable = (0, AdaptableContext_1.useAdaptable)();
56
+ const columns = React.useMemo(() => {
57
+ const colIds = adaptable.api.columnApi
58
+ .getColumns()
59
+ .filter((column) => {
60
+ var _a, _b;
61
+ if (!['Number', 'String'].includes(column.dataType))
62
+ return false;
63
+ return (_b = (_a = layout.Columns) === null || _a === void 0 ? void 0 : _a.includes) === null || _b === void 0 ? void 0 : _b.call(_a, column.columnId);
64
+ })
65
+ .map((c) => c.columnId);
66
+ return (0, sortWithOrder_1.sortWithOrderArray)(colIds, Object.keys(rowSummary.ColumnsMap), {
67
+ sortUnorderedItems: false,
68
+ }).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
69
+ }, [rowSummary.ColumnsMap]);
70
+ return (React.createElement(Panel_1.default, { header: React.createElement(rebass_1.Flex, { style: { width: '100%' } },
71
+ React.createElement(rebass_1.Flex, { flex: 1, alignItems: "center" }, "Row Summary"),
72
+ React.createElement(SimpleButton_1.default, { icon: "delete", onClick: () => {
73
+ onDelete();
74
+ } })), p: 2 },
75
+ React.createElement(FormLayout_1.default, null,
76
+ React.createElement(FormLayout_1.FormRow, { label: "Position" },
77
+ React.createElement(Select_1.Select, { options: [
78
+ {
79
+ label: 'Top',
80
+ value: 'Top',
81
+ },
82
+ {
83
+ label: 'Bottom',
84
+ value: 'Bottom',
85
+ },
86
+ ], value: rowSummary.Position, onChange: (position) => {
87
+ onChange(Object.assign(Object.assign({}, rowSummary), { Position: position }));
88
+ } }))),
89
+ React.createElement(rebass_1.Flex, { flexDirection: 'column', mt: 2, mb: 1 },
90
+ React.createElement(rebass_1.Flex, { alignItems: "center", flex: 1, mb: 2 }, "Column Aggregations"),
91
+ React.createElement(Panel_1.default, { bodyProps: { maxHeight: '100%' }, style: { height: 360 } },
92
+ React.createElement(ValueSelector_1.ValueSelector, { style: { maxHeight: '100%' }, showFilterInput: true, filter: Utilities_1.columnFilter, toIdentifier: (column) => column.columnId, toLabel: (option) => { var _a; return (_a = option.friendlyName) !== null && _a !== void 0 ? _a : option.columnId; }, options: columns, xSelectedLabel: () => {
93
+ return 'Active Aggregations:';
94
+ }, toListLabel: (column) => {
95
+ var _a, _b;
96
+ const label = (_a = column.friendlyName) !== null && _a !== void 0 ? _a : column.columnId;
97
+ if (!(column.columnId in ((_b = rowSummary.ColumnsMap) !== null && _b !== void 0 ? _b : {}))) {
98
+ return label;
99
+ }
100
+ const expressionOptions = getAvailableExpressionsForColumnType(column.dataType, availableScalarExpressions).map((expression) => ({
101
+ label: expression,
102
+ value: expression,
103
+ }));
104
+ const expression = rowSummary.ColumnsMap[column.columnId];
105
+ return (React.createElement(rebass_1.Flex, null,
106
+ React.createElement(rebass_1.Flex, { mr: 2, alignItems: 'center' }, label),
107
+ React.createElement(Select_1.Select, { value: expression, options: expressionOptions, onChange: (expression) => {
108
+ onChange(Object.assign(Object.assign({}, rowSummary), { ColumnsMap: Object.assign(Object.assign({}, rowSummary.ColumnsMap), { [column.columnId]: expression }) }));
109
+ } })));
110
+ }, value: Object.keys(rowSummary.ColumnsMap), onChange: (colIds) => {
111
+ const newColumnsMap = {};
112
+ colIds.forEach((colId) => {
113
+ var _a;
114
+ newColumnsMap[colId] = (_a = rowSummary.ColumnsMap[colId]) !== null && _a !== void 0 ? _a : null;
115
+ });
116
+ onChange(Object.assign(Object.assign({}, rowSummary), { ColumnsMap: newColumnsMap }));
117
+ } })))));
118
+ };
119
+ const RowSummarySection = (props) => {
120
+ const adaptable = (0, AdaptableContext_1.useAdaptable)();
121
+ const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
122
+ const availableScalarExpressions = React.useMemo(() => {
123
+ return adaptable.api.internalApi
124
+ .getQueryLanguageService()
125
+ .getModuleExpressionFunctionsMap(ModuleConstants_1.LayoutModuleId).aggregatedScalarFunctions;
126
+ }, []);
127
+ return (React.createElement(Tabs_1.Tabs, { style: { height: '100%' } },
128
+ React.createElement(Tabs_1.Tabs.Tab, null, "Row Summaries"),
129
+ React.createElement(Tabs_1.Tabs.Content, null,
130
+ React.createElement("div", null,
131
+ React.createElement(rebass_1.Flex, { mb: 1 },
132
+ React.createElement(rebass_1.Flex, { flex: 1 }),
133
+ React.createElement(SimpleButton_1.default, { icon: "plus" }, "Add Row Summary")),
134
+ layout.RowSummaries.map((rowSummary, index) => {
135
+ return (React.createElement(RowSummaryEditor, { key: index, onDelete: () => {
136
+ const newSummaries = [...layout.RowSummaries];
137
+ newSummaries.splice(index, 1);
138
+ props.onChange(Object.assign(Object.assign({}, layout), { RowSummaries: newSummaries }));
139
+ }, availableScalarExpressions: availableScalarExpressions, rowSummary: rowSummary, onChange: (rowSummary) => {
140
+ const newSummaries = [...layout.RowSummaries];
141
+ newSummaries[index] = rowSummary;
142
+ props.onChange(Object.assign(Object.assign({}, layout), { RowSummaries: newSummaries }));
143
+ } }));
144
+ })))));
145
+ };
146
+ exports.RowSummarySection = RowSummarySection;
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export declare const NotePopup: React.FunctionComponent;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotesPopup = void 0;
3
+ exports.NotePopup = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const react_redux_1 = require("react-redux");
7
7
  const InfiniteTable_1 = require("../../components/InfiniteTable");
8
- const NotesRedux_1 = require("../../Redux/ActionsReducers/NotesRedux");
8
+ const NoteRedux_1 = require("../../Redux/ActionsReducers/NoteRedux");
9
9
  const AdaptableContext_1 = require("../AdaptableContext");
10
10
  const AdaptableButton_1 = require("../Components/AdaptableButton");
11
11
  const PopupPanel_1 = require("../Components/Popups/AdaptablePopup/PopupPanel");
@@ -16,10 +16,10 @@ const tableDOMProps = {
16
16
  // minHeight: 600,
17
17
  },
18
18
  };
19
- const NotesPopup = (props) => {
19
+ const NotePopup = (props) => {
20
20
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
21
21
  const primaryKeyHeader = adaptable.api.columnApi.getFriendlyNameForColumnId(adaptable.api.columnApi.getPrimaryKeyColumn().columnId);
22
- const allNotes = (0, react_redux_1.useSelector)((state) => (0, NotesRedux_1.GetAllNotesSelector)(state.Notes));
22
+ const allNotes = (0, react_redux_1.useSelector)((state) => (0, NoteRedux_1.GetAllNotesSelector)(state.Note));
23
23
  const columnsMap = React.useMemo(() => {
24
24
  const columns = {
25
25
  primaryKey: {
@@ -83,4 +83,4 @@ const NotesPopup = (props) => {
83
83
  alwaysReserveSpaceForSortIcon: false,
84
84
  }, rowHeight: 40, columnHeaderHeight: 65, domProps: tableDOMProps, columns: columnsMap }))));
85
85
  };
86
- exports.NotesPopup = NotesPopup;
86
+ exports.NotePopup = NotePopup;
@@ -63,12 +63,12 @@ const ColumnInfoModule_1 = require("../Strategy/ColumnInfoModule");
63
63
  const SettingsPanelModule_1 = require("../Strategy/SettingsPanelModule");
64
64
  const StatusBarModule_1 = require("../Strategy/StatusBarModule");
65
65
  const ChartingModule_1 = require("../Strategy/ChartingModule");
66
- const NotesModule_1 = require("../Strategy/NotesModule");
66
+ const NoteModule_1 = require("../Strategy/NoteModule");
67
67
  const StyledColumnModule_1 = require("../Strategy/StyledColumnModule");
68
68
  const Fdc3Module_1 = require("../Strategy/Fdc3Module");
69
69
  const GridFilterModule_1 = require("../Strategy/GridFilterModule");
70
70
  const NamedQueryModule_1 = require("../Strategy/NamedQueryModule");
71
- const CommentsModule_1 = require("../Strategy/CommentsModule");
71
+ const CommentModule_1 = require("../Strategy/CommentModule");
72
72
  const AdaptableNumberEditor_1 = require("./editors/AdaptableNumberEditor");
73
73
  const AdaptableDateEditor_1 = require("./editors/AdaptableDateEditor");
74
74
  const Helper_1 = require("../Utilities/Helpers/Helper");
@@ -1585,7 +1585,7 @@ class AdaptableAgGrid {
1585
1585
  modules.set(ModuleConstants.ChartingModuleId, new ChartingModule_1.ChartingModule(this.api));
1586
1586
  modules.set(ModuleConstants.ColumnFilterModuleId, new ColumnFilterModule_1.ColumnFilterModule(this.api));
1587
1587
  modules.set(ModuleConstants.ColumnInfoModuleId, new ColumnInfoModule_1.ColumnInfoModule(this.api));
1588
- modules.set(ModuleConstants.CommentsModuleId, new CommentsModule_1.CommentsModule(this.api));
1588
+ modules.set(ModuleConstants.CommentModuleId, new CommentModule_1.CommentModule(this.api));
1589
1589
  modules.set(ModuleConstants.CustomSortModuleId, new CustomSortModule_1.CustomSortModule(this.api));
1590
1590
  modules.set(ModuleConstants.DashboardModuleId, new DashboardModule_1.DashboardModule(this.api));
1591
1591
  modules.set(ModuleConstants.DataChangeHistoryModuleId, new DataChangeHistoryModule_1.DataChangeHistoryModule(this.api));
@@ -1600,7 +1600,7 @@ class AdaptableAgGrid {
1600
1600
  modules.set(ModuleConstants.GridInfoModuleId, new GridInfoModule_1.GridInfoModule(this.api));
1601
1601
  modules.set(ModuleConstants.LayoutModuleId, new LayoutModule_1.LayoutModule(this.api));
1602
1602
  modules.set(ModuleConstants.NamedQueryModuleId, new NamedQueryModule_1.NamedQueryModule(this.api));
1603
- modules.set(ModuleConstants.NotesModuleId, new NotesModule_1.NotesModule(this.api));
1603
+ modules.set(ModuleConstants.NoteModuleId, new NoteModule_1.NoteModule(this.api));
1604
1604
  modules.set(ModuleConstants.PlusMinusModuleId, new PlusMinusModule_1.PlusMinusModule(this.api));
1605
1605
  modules.set(ModuleConstants.QuickSearchModuleId, new QuickSearchModule_1.QuickSearchModule(this.api));
1606
1606
  modules.set(ModuleConstants.ScheduleModuleId, new ScheduleModule_1.ScheduleModule(this.api));
@@ -60,4 +60,5 @@ export declare class AgGridAdapter {
60
60
  * Mutates the colDefs to ensure that each column has a colId
61
61
  */
62
62
  assignColumnIdsToColDefs(colDefs?: (ColDef | ColGroupDef)[]): void;
63
+ getDefaultColumnDefinition(): GridOptions['defaultColDef'];
63
64
  }
@@ -581,5 +581,10 @@ class AgGridAdapter {
581
581
  };
582
582
  colDefs.forEach((colDef) => assignColId(colDef));
583
583
  }
584
+ getDefaultColumnDefinition() {
585
+ var _a, _b;
586
+ // for early init phase, gridApi might not be ready yet
587
+ return (_b = (_a = this.getAgGridApi(true)) === null || _a === void 0 ? void 0 : _a.getGridOption('defaultColDef')) !== null && _b !== void 0 ? _b : {};
588
+ }
584
589
  }
585
590
  exports.AgGridAdapter = AgGridAdapter;
@@ -607,7 +607,7 @@ class AgGridColumnAdapter {
607
607
  : undefined;
608
608
  }
609
609
  getNoteCellClassName(gridCell, params) {
610
- if (!this.adaptableApi.internalApi.getModuleService().isModuleAvailable('Notes')) {
610
+ if (!this.adaptableApi.internalApi.getModuleService().isModuleAvailable('Note')) {
611
611
  return;
612
612
  }
613
613
  if (!this.adaptableApi.noteApi.internalApi.areNotesAvailable()) {
@@ -617,14 +617,14 @@ class AgGridColumnAdapter {
617
617
  PrimaryKeyValue: gridCell.primaryKeyValue,
618
618
  ColumnId: gridCell.column.columnId,
619
619
  };
620
- const cellNotes = this.adaptableApi.noteApi.getCellNotes(cellPosition);
620
+ const cellNotes = this.adaptableApi.noteApi.getNotesForCell(cellPosition);
621
621
  if (!(cellNotes === null || cellNotes === void 0 ? void 0 : cellNotes.length)) {
622
622
  return undefined;
623
623
  }
624
624
  return 'ab-Cell-Note';
625
625
  }
626
626
  getCommentCellClassName(gridCell, params) {
627
- if (!this.adaptableApi.internalApi.getModuleService().isModuleAvailable('Comments')) {
627
+ if (!this.adaptableApi.internalApi.getModuleService().isModuleAvailable('Comment')) {
628
628
  return;
629
629
  }
630
630
  if (!this.adaptableApi.commentApi.internalApi.areCommentsAvailable()) {
@@ -174,13 +174,6 @@ const DefaultAdaptableOptions = {
174
174
  menuOptions: {
175
175
  customColumnMenu: undefined,
176
176
  customContextMenu: undefined,
177
- showAdaptableContextMenu: true,
178
- showAdaptableColumnMenu: true,
179
- showUngroupColumnMenuItem: true,
180
- columnMenuOrder: ['aggrid', 'adaptable', 'user'],
181
- contextMenuOrder: ['aggrid', 'adaptable', 'user'],
182
- columnMenuItems: undefined,
183
- contextMenuItems: undefined,
184
177
  },
185
178
  columnFilterOptions: {
186
179
  quickFilterOptions: {
@@ -6,6 +6,7 @@ const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const react_beautiful_dnd_1 = require("react-beautiful-dnd");
7
7
  const rebass_1 = require("rebass");
8
8
  const predicate_1 = require("../../../parser/src/predicate");
9
+ const adaptableQlUtils_1 = require("../../../Utilities/adaptableQlUtils");
9
10
  const booleanExpressionFunctions_1 = require("../../../Utilities/ExpressionFunctions/booleanExpressionFunctions");
10
11
  const AdaptableContext_1 = require("../../../View/AdaptableContext");
11
12
  const DropdownButton_1 = tslib_1.__importDefault(require("../../DropdownButton"));
@@ -114,7 +115,7 @@ const PrimitiveFunctionEditor = (props) => {
114
115
  }
115
116
  columnId = col.replace(/[\[\]]/g, '');
116
117
  columnDataType = adaptable.api.columnApi.getColumnDataTypeForColumnId(columnId);
117
- columnInputDataType = (0, utils_1.mapColumnDataTypeToExpressionFunctionType)(columnDataType);
118
+ columnInputDataType = (0, adaptableQlUtils_1.mapColumnDataTypeToExpressionFunctionType)(columnDataType);
118
119
  functionInputInputDataTypes = (_a = booleanExpressionFunctions_1.booleanExpressionFunctions[props.predicate.operator]) === null || _a === void 0 ? void 0 : _a.inputs;
119
120
  restOfFunctionInputDataTypes = functionInputInputDataTypes
120
121
  ? (0, utils_1.getOperatorMatchingInputs)(columnInputDataType, functionInputInputDataTypes)
@@ -2,7 +2,6 @@ import { QlPredicate, QlPredicateError } from '../../../parser/src/predicate';
2
2
  import { ExpressionFunctionInputType } from '../../../parser/src/types';
3
3
  import { AdaptableColumnDataType, BooleanFunctionName } from '../../../types';
4
4
  export declare const reorder: (predicate: QlPredicate, from: string, to: string) => any;
5
- export declare const mapColumnDataTypeToExpressionFunctionType: (dataType: AdaptableColumnDataType) => ExpressionFunctionInputType;
6
5
  export declare const mapExpressionFunctionTypeToColumnDataType: (type: ExpressionFunctionInputType) => AdaptableColumnDataType;
7
6
  export declare const getOperatorMatchingInputs: (columnType: ExpressionFunctionInputType, inputs: ExpressionFunctionInputType[] | Array<ExpressionFunctionInputType>[]) => ExpressionFunctionInputType[];
8
7
  export declare const getFunctionsForColumnType: (dataType: AdaptableColumnDataType, availableBooleanFunctions: BooleanFunctionName[]) => BooleanFunctionName[];
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getUnsuportedExpressionFromQlPredicate = exports.getFunctionsForColumnType = exports.getOperatorMatchingInputs = exports.mapExpressionFunctionTypeToColumnDataType = exports.mapColumnDataTypeToExpressionFunctionType = exports.reorder = void 0;
3
+ exports.getUnsuportedExpressionFromQlPredicate = exports.getFunctionsForColumnType = exports.getOperatorMatchingInputs = exports.mapExpressionFunctionTypeToColumnDataType = exports.reorder = void 0;
4
+ const adaptableQlUtils_1 = require("../../../Utilities/adaptableQlUtils");
4
5
  const predicate_1 = require("../../../parser/src/predicate");
5
6
  const booleanExpressionFunctions_1 = require("../../../Utilities/ExpressionFunctions/booleanExpressionFunctions");
6
7
  const ObjectExtensions_1 = require("../../../Utilities/Extensions/ObjectExtensions");
@@ -30,21 +31,6 @@ const reorder = (predicate, from, to) => {
30
31
  return predicateCopy;
31
32
  };
32
33
  exports.reorder = reorder;
33
- const mapColumnDataTypeToExpressionFunctionType = (dataType) => {
34
- if (dataType === 'Number') {
35
- return 'number';
36
- }
37
- if (dataType === 'Boolean') {
38
- return 'boolean';
39
- }
40
- if (dataType === 'String') {
41
- return 'text';
42
- }
43
- if (dataType === 'Date') {
44
- return 'date';
45
- }
46
- };
47
- exports.mapColumnDataTypeToExpressionFunctionType = mapColumnDataTypeToExpressionFunctionType;
48
34
  const mapExpressionFunctionTypeToColumnDataType = (type) => {
49
35
  if (type === 'number') {
50
36
  return 'Number';
@@ -72,7 +58,7 @@ const getOperatorMatchingInputs = (columnType, inputs) => {
72
58
  };
73
59
  exports.getOperatorMatchingInputs = getOperatorMatchingInputs;
74
60
  const getFunctionsForColumnType = (dataType, availableBooleanFunctions) => {
75
- const columnType = (0, exports.mapColumnDataTypeToExpressionFunctionType)(dataType);
61
+ const columnType = (0, adaptableQlUtils_1.mapColumnDataTypeToExpressionFunctionType)(dataType);
76
62
  return booleanExpressions_1.booleanExpressionsAvailableInQueryBuilder.filter((boolFnName) => {
77
63
  if (!availableBooleanFunctions.includes(boolFnName)) {
78
64
  return false;
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const React = tslib_1.__importStar(require("react"));
5
5
  const DefaultIcon_1 = tslib_1.__importDefault(require("./DefaultIcon"));
6
- exports.default = (props) => (React.createElement(DefaultIcon_1.default, Object.assign({}, props, { viewBox: "0 -960 960 960" }),
7
- React.createElement("path", { d: "M440-240h80v-120h120v-80H520v-120h-80v120H320v80h120v120ZM240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm280-520v-200H240v640h480v-440H520ZM240-800v200-200 640-640Z" })));
6
+ exports.default = (props) => (React.createElement(DefaultIcon_1.default, Object.assign({}, props),
7
+ React.createElement("path", { d: "M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 14H6v-2h2v2zm0-3H6V9h2v2zm0-3H6V6h2v2zm7 6h-5v-2h5v2zm3-3h-8V9h8v2zm0-3h-8V6h8v2z" })));
package/src/env.js CHANGED
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
4
  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" || '',
5
- PUBLISH_TIMESTAMP: 1711034351652 || Date.now(),
6
- VERSION: "18.0.0-canary.12" || '--current-version--',
5
+ PUBLISH_TIMESTAMP: 1711118652410 || Date.now(),
6
+ VERSION: "18.0.0-canary.13" || '--current-version--',
7
7
  };
@@ -382,11 +382,19 @@ export declare const ADAPTABLE_METAMODEL: {
382
382
  kind: string;
383
383
  desc: string;
384
384
  isOpt: boolean;
385
+ ref?: undefined;
385
386
  } | {
386
387
  name: string;
387
388
  kind: string;
388
389
  desc: string;
389
390
  isOpt?: undefined;
391
+ ref?: undefined;
392
+ } | {
393
+ name: string;
394
+ kind: string;
395
+ desc: string;
396
+ isOpt: boolean;
397
+ ref: string;
390
398
  })[];
391
399
  };
392
400
  AdaptableComparerFunction: {
@@ -1973,6 +1981,24 @@ export declare const ADAPTABLE_METAMODEL: {
1973
1981
  isOpt: boolean;
1974
1982
  }[];
1975
1983
  };
1984
+ CommentThread: {
1985
+ name: string;
1986
+ kind: string;
1987
+ desc: string;
1988
+ props: ({
1989
+ name: string;
1990
+ kind: string;
1991
+ desc: string;
1992
+ isOpt?: undefined;
1993
+ ref?: undefined;
1994
+ } | {
1995
+ name: string;
1996
+ kind: string;
1997
+ desc: string;
1998
+ isOpt: boolean;
1999
+ ref: string;
2000
+ })[];
2001
+ };
1976
2002
  CompatibleContext: {
1977
2003
  name: string;
1978
2004
  kind: string;
@@ -2894,10 +2920,18 @@ export declare const ADAPTABLE_METAMODEL: {
2894
2920
  kind: string;
2895
2921
  desc: string;
2896
2922
  isOpt: boolean;
2923
+ ref?: undefined;
2924
+ } | {
2925
+ name: string;
2926
+ kind: string;
2927
+ desc: string;
2928
+ isOpt?: undefined;
2929
+ ref?: undefined;
2897
2930
  } | {
2898
2931
  name: string;
2899
2932
  kind: string;
2900
2933
  desc: string;
2934
+ ref: string;
2901
2935
  isOpt?: undefined;
2902
2936
  })[];
2903
2937
  };
@@ -3915,21 +3949,12 @@ export declare const ADAPTABLE_METAMODEL: {
3915
3949
  name: string;
3916
3950
  kind: string;
3917
3951
  desc: string;
3918
- props: ({
3919
- name: string;
3920
- kind: string;
3921
- desc: string;
3922
- isOpt: boolean;
3923
- gridInfo?: undefined;
3924
- defVal?: undefined;
3925
- } | {
3952
+ props: {
3926
3953
  name: string;
3927
3954
  kind: string;
3928
3955
  desc: string;
3929
3956
  isOpt: boolean;
3930
- gridInfo: string;
3931
- defVal: string;
3932
- })[];
3957
+ }[];
3933
3958
  };
3934
3959
  MenuOrderContext: {
3935
3960
  name: string;