@adaptabletools/adaptable-cjs 18.0.0-canary.3 → 18.0.0-canary.4
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.
- package/base.css +3 -0
- package/base.css.map +1 -1
- package/index.css +5 -0
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +5 -5
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +4 -4
- package/src/AdaptableOptions/{CommentsOptions.d.ts → CommentOptions.d.ts} +5 -5
- package/src/AdaptableOptions/MenuOptions.d.ts +1 -1
- package/src/AdaptableOptions/MenuOptions.js +2 -6
- package/src/AdaptableOptions/{NotesOptions.d.ts → NoteOptions.d.ts} +1 -1
- package/src/Api/BulkUpdateApi.d.ts +0 -5
- package/src/Api/ColumnFilterApi.d.ts +5 -0
- package/src/Api/Implementation/ApiBase.js +1 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
- package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnFilterApiImpl.js +10 -0
- package/src/Api/Implementation/LayoutApiImpl.d.ts +4 -0
- package/src/Api/Implementation/LayoutApiImpl.js +14 -0
- package/src/Api/Implementation/NotesApiImpl.d.ts +2 -4
- package/src/Api/Implementation/NotesApiImpl.js +4 -8
- package/src/Api/Implementation/OptionsApiImpl.d.ts +1 -1
- package/src/Api/Implementation/OptionsApiImpl.js +2 -2
- package/src/Api/InteropioPluginApi.d.ts +2 -2
- package/src/Api/LayoutApi.d.ts +8 -0
- package/src/Api/OptionsApi.d.ts +1 -1
- package/src/PredefinedConfig/NotesState.d.ts +10 -20
- package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -1
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +3 -4
- package/src/Redux/ActionsReducers/NotesRedux.js +10 -8
- package/src/Strategy/ChartingModule.js +2 -1
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -1
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +5 -4
- package/src/Utilities/Helpers/Helper.d.ts +2 -0
- package/src/Utilities/Helpers/Helper.js +6 -1
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +3 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
- package/src/View/Comments/CommentsPopup.js +12 -8
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +1 -1
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
- package/src/View/Layout/TransposedPopup.d.ts +3 -0
- package/src/View/Layout/TransposedPopup.js +198 -0
- package/src/View/Notes/NotesPopup.js +8 -10
- package/src/View/Theme/ThemeSelector.js +2 -2
- package/src/agGrid/Adaptable.js +2 -2
- package/src/agGrid/agGridMenuHelper.js +3 -3
- package/src/components/Select/Select.d.ts +2 -0
- package/src/components/Select/Select.js +2 -2
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +30 -2
- package/src/metamodel/adaptable.metamodel.js +66 -32
- package/src/types.d.ts +5 -2
- package/tsconfig.cjs.tsbuildinfo +1 -1
- /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
- /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
|
@@ -33,8 +33,8 @@ const CellComments = (props) => {
|
|
|
33
33
|
return (0, dateUtils_1.formatDate)(params.data.Timestamp, 'MM.DD.YYYY HH:mm');
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
|
-
|
|
37
|
-
header: '
|
|
36
|
+
text: {
|
|
37
|
+
header: 'Text',
|
|
38
38
|
field: 'Value',
|
|
39
39
|
defaultFlex: 3,
|
|
40
40
|
},
|
|
@@ -42,15 +42,19 @@ const CellComments = (props) => {
|
|
|
42
42
|
return columns;
|
|
43
43
|
}, []);
|
|
44
44
|
const cellValue = adaptable.api.gridApi.getCellDisplayValue(props.commentThread.PrimaryKeyValue, props.commentThread.ColumnId);
|
|
45
|
+
const primaryKeyHeader = React.useMemo(() => {
|
|
46
|
+
const primaryKey = adaptable.api.optionsApi.getPrimaryKey();
|
|
47
|
+
return adaptable.api.columnApi.getFriendlyNameForColumnId(primaryKey);
|
|
48
|
+
}, []);
|
|
45
49
|
const columnFriendlyName = adaptable.api.columnApi.getFriendlyNameForColumnId(props.commentThread.ColumnId);
|
|
46
50
|
return (React.createElement(Panel_1.default, { mb: 2, header: React.createElement(rebass_1.Flex, { width: "100%", alignItems: "center" },
|
|
47
51
|
React.createElement(rebass_1.Box, { mr: 2 },
|
|
48
52
|
"Cell Value: ",
|
|
49
53
|
cellValue),
|
|
50
54
|
React.createElement(rebass_1.Box, { mr: 2 },
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
primaryKeyHeader,
|
|
56
|
+
": ",
|
|
57
|
+
props.commentThread.PrimaryKeyValue),
|
|
54
58
|
React.createElement(rebass_1.Box, null,
|
|
55
59
|
"Column: ",
|
|
56
60
|
columnFriendlyName),
|
|
@@ -76,12 +80,12 @@ const CellComments = (props) => {
|
|
|
76
80
|
}, rowHeight: 30, columnHeaderHeight: 30, domProps: tableDOMProps, columns: columnsMap }))));
|
|
77
81
|
};
|
|
78
82
|
const CommentsPopup = (props) => {
|
|
79
|
-
const
|
|
83
|
+
const commentThreads = (0, react_redux_1.useSelector)((state) => {
|
|
80
84
|
return state.Comment.CommentThreads;
|
|
81
85
|
});
|
|
82
|
-
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: 'Comments', glyphicon: 'comments', infoLink: props.moduleInfo.HelpPage }, (
|
|
86
|
+
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: 'Comments', glyphicon: 'comments', infoLink: props.moduleInfo.HelpPage }, (commentThreads !== null && commentThreads !== void 0 ? commentThreads : []).map((commentThread, index) => {
|
|
83
87
|
var _a;
|
|
84
|
-
return React.createElement(CellComments, { key: (_a =
|
|
88
|
+
return React.createElement(CellComments, { key: (_a = commentThread === null || commentThread === void 0 ? void 0 : commentThread.Uuid) !== null && _a !== void 0 ? _a : index, commentThread: commentThread });
|
|
85
89
|
})));
|
|
86
90
|
};
|
|
87
91
|
exports.CommentsPopup = CommentsPopup;
|
|
@@ -27,7 +27,7 @@ const ConnectedNoteEditor = ({ enableEditMode }) => {
|
|
|
27
27
|
api.notesApi.updateNoteText(value, note);
|
|
28
28
|
}, [note]);
|
|
29
29
|
return (React.createElement(rebass_1.Flex, { onClick: () => enableEditMode(), flexDirection: "column", className: "ab-NotesPopup" },
|
|
30
|
-
React.createElement(NoteEditor_1.NoteEditor, { isReadonly: isReadonly, editMode: editMode, key: note === null || note === void 0 ? void 0 : note.Uuid, onClose: () => cellPopupService.hidePopup(), note: note === null || note === void 0 ? void 0 : note.
|
|
30
|
+
React.createElement(NoteEditor_1.NoteEditor, { isReadonly: isReadonly, editMode: editMode, key: note === null || note === void 0 ? void 0 : note.Uuid, onClose: () => cellPopupService.hidePopup(), note: note === null || note === void 0 ? void 0 : note.Text, onNoteChange: (value) => handleNoteChange(value) })));
|
|
31
31
|
};
|
|
32
32
|
const GridCellPopup = (props) => {
|
|
33
33
|
const { api } = (0, AdaptableContext_1.useAdaptable)();
|
|
@@ -4,4 +4,5 @@ export declare const WINDOW_GRID_FILTER_EDITOR = "WINDOW_GRID_FILTER_EDITOR";
|
|
|
4
4
|
export declare const SHOW_PIVOT_COLUMN_DETAILS = "SHOW_PIVOT_COLUMN_DETAILS";
|
|
5
5
|
export declare const SHOW_EXPORT_TABLE = "SHOW_EXPORT_TABLE";
|
|
6
6
|
export declare const SHOW_THEME_EDITOR = "SHOW_THEME_EDITOR";
|
|
7
|
+
export declare const WINDOW_SHOW_TRANSPOSED_VIEW = "WINDOW_SHOW_TRANSPOSED_VIEW";
|
|
7
8
|
export declare const windowFactory: Record<string, React.FunctionComponent<WindowPopupChildProps>>;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.windowFactory = exports.SHOW_THEME_EDITOR = exports.SHOW_EXPORT_TABLE = exports.SHOW_PIVOT_COLUMN_DETAILS = exports.WINDOW_GRID_FILTER_EDITOR = void 0;
|
|
3
|
+
exports.windowFactory = exports.WINDOW_SHOW_TRANSPOSED_VIEW = exports.SHOW_THEME_EDITOR = exports.SHOW_EXPORT_TABLE = exports.SHOW_PIVOT_COLUMN_DETAILS = exports.WINDOW_GRID_FILTER_EDITOR = void 0;
|
|
4
4
|
const GridFilterWindowPopup_1 = require("../../../GridFilter/GridFilterWindowPopup");
|
|
5
5
|
const PivotDetailsPopoup_1 = require("../../../Layout/PivotDetailsPopoup");
|
|
6
6
|
const ExportTablePopup_1 = require("../../../Export/ExportTablePopup");
|
|
7
7
|
const ThemeEditorWindow_1 = require("../../../Theme/ThemeEditorWindow");
|
|
8
|
+
const TransposedPopup_1 = require("../../../Layout/TransposedPopup");
|
|
8
9
|
exports.WINDOW_GRID_FILTER_EDITOR = 'WINDOW_GRID_FILTER_EDITOR';
|
|
9
10
|
exports.SHOW_PIVOT_COLUMN_DETAILS = 'SHOW_PIVOT_COLUMN_DETAILS';
|
|
10
11
|
exports.SHOW_EXPORT_TABLE = 'SHOW_EXPORT_TABLE';
|
|
11
12
|
exports.SHOW_THEME_EDITOR = 'SHOW_THEME_EDITOR';
|
|
13
|
+
exports.WINDOW_SHOW_TRANSPOSED_VIEW = 'WINDOW_SHOW_TRANSPOSED_VIEW';
|
|
12
14
|
exports.windowFactory = {
|
|
13
15
|
[exports.WINDOW_GRID_FILTER_EDITOR]: GridFilterWindowPopup_1.GridFilterWindowPopup,
|
|
14
16
|
[exports.SHOW_PIVOT_COLUMN_DETAILS]: PivotDetailsPopoup_1.PivotDetailsPopoup,
|
|
15
17
|
[exports.SHOW_EXPORT_TABLE]: ExportTablePopup_1.ExportTablePopup,
|
|
16
18
|
[exports.SHOW_THEME_EDITOR]: ThemeEditorWindow_1.ThemeEditorWindow,
|
|
19
|
+
[exports.WINDOW_SHOW_TRANSPOSED_VIEW]: TransposedPopup_1.TransposedPopup,
|
|
17
20
|
};
|
|
@@ -13,7 +13,7 @@ const PermittedValuesSelector = function (props) {
|
|
|
13
13
|
const [filter, setFilter] = React.useState('');
|
|
14
14
|
const columnType = React.useMemo(() => {
|
|
15
15
|
return adaptable.api.columnApi.getColumnDataTypeForColumnId(props.columnId);
|
|
16
|
-
}, []);
|
|
16
|
+
}, [props.columnId]);
|
|
17
17
|
React.useEffect(() => {
|
|
18
18
|
if (!props.columnId) {
|
|
19
19
|
setIsLoading(false);
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransposedPopup = 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 AdaptableContext_1 = require("../AdaptableContext");
|
|
10
|
+
const ColumnSelector_1 = require("../Components/Selectors/ColumnSelector");
|
|
11
|
+
const TransposedPopup = (props) => {
|
|
12
|
+
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
13
|
+
const rowNodes = React.useMemo(() => {
|
|
14
|
+
return adaptable.api.gridApi.getAllRowNodes();
|
|
15
|
+
}, [
|
|
16
|
+
// can be later triggered by ticking data
|
|
17
|
+
]);
|
|
18
|
+
const { transposedColumnId, hideTransposedColumn = true } = props.popupProps;
|
|
19
|
+
const primaryKey = adaptable.api.optionsApi.getPrimaryKey();
|
|
20
|
+
// Thist must be qunique
|
|
21
|
+
const transposeByColumnId = primaryKey;
|
|
22
|
+
// Only used to show nice values a the top of the grid, istead on the value
|
|
23
|
+
// of the primarykey
|
|
24
|
+
const [synteticTransposedByColumnId, setSynteticTransposedByColumnId] = React.useState(transposedColumnId !== null && transposedColumnId !== void 0 ? transposedColumnId : primaryKey);
|
|
25
|
+
const columns = React.useMemo(() => {
|
|
26
|
+
// customisable
|
|
27
|
+
return adaptable.api.columnApi.getColumns();
|
|
28
|
+
}, []);
|
|
29
|
+
const adaptableContainerId = 'transposed-adaptable-container';
|
|
30
|
+
const agGridContainerId = 'transposed-adaptable-ag-grid-container';
|
|
31
|
+
/**
|
|
32
|
+
* This is used as first field
|
|
33
|
+
*/
|
|
34
|
+
const transposedFirstColumnField = '_transposed_column_value';
|
|
35
|
+
const transposedFirstColumnHeader = '_transposed_column_header';
|
|
36
|
+
const transposedRowsAndColumns = React.useMemo(() => {
|
|
37
|
+
/**
|
|
38
|
+
* transposed column values become primaryKey of the new tarnsposed rows
|
|
39
|
+
* we build row by row, might be easer
|
|
40
|
+
*/
|
|
41
|
+
const transposedColumns = [];
|
|
42
|
+
const transposedRows = [];
|
|
43
|
+
for (const row of rowNodes) {
|
|
44
|
+
// we force the col-ids to be strings, easer to work with
|
|
45
|
+
//row[transposeByColumnId] + '';
|
|
46
|
+
const colId = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, transposeByColumnId) + '';
|
|
47
|
+
//row[synteticTransposedByColumnId] + '';
|
|
48
|
+
const header = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, synteticTransposedByColumnId) + '';
|
|
49
|
+
transposedColumns.push({
|
|
50
|
+
colId,
|
|
51
|
+
header,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
for (const column of columns) {
|
|
55
|
+
/**
|
|
56
|
+
* We can hide the transposed column, if we want
|
|
57
|
+
*/
|
|
58
|
+
if (hideTransposedColumn && column.columnId === synteticTransposedByColumnId) {
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
const transposedRow = {
|
|
62
|
+
// [transposed-by-column-id]: [other column id],
|
|
63
|
+
// the value can be set to friendlyname
|
|
64
|
+
[transposedFirstColumnField]: column.columnId,
|
|
65
|
+
[transposedFirstColumnHeader]: column.friendlyName,
|
|
66
|
+
};
|
|
67
|
+
for (let row of rowNodes) {
|
|
68
|
+
// [transposed-by-column-value[n]]: [other column value[n]]
|
|
69
|
+
const key = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, transposeByColumnId);
|
|
70
|
+
// row[column.field]
|
|
71
|
+
let value = adaptable.api.gridApi.getDisplayValueFromRowNode(row, column.columnId);
|
|
72
|
+
if (value instanceof Date) {
|
|
73
|
+
value = value.toLocaleString();
|
|
74
|
+
}
|
|
75
|
+
transposedRow[key] = value;
|
|
76
|
+
}
|
|
77
|
+
transposedRows.push(transposedRow);
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
transposedColumns,
|
|
81
|
+
transposedRows,
|
|
82
|
+
};
|
|
83
|
+
}, [rowNodes, primaryKey, synteticTransposedByColumnId]);
|
|
84
|
+
React.useEffect(() => {
|
|
85
|
+
// Mounting in an effect, so the nodes are rendered/available
|
|
86
|
+
const hostAdaptableOptions = adaptable.adaptableOptions;
|
|
87
|
+
const adaptableOptions = {
|
|
88
|
+
primaryKey: transposedFirstColumnField,
|
|
89
|
+
licenseKey: hostAdaptableOptions.licenseKey,
|
|
90
|
+
userName: `${hostAdaptableOptions.userName}`,
|
|
91
|
+
adaptableId: `${hostAdaptableOptions.adaptableId}::TransposedView`,
|
|
92
|
+
containerOptions: {
|
|
93
|
+
adaptableContainer: adaptableContainerId,
|
|
94
|
+
agGridContainer: agGridContainerId,
|
|
95
|
+
},
|
|
96
|
+
entitlementOptions: {
|
|
97
|
+
defaultAccessLevel: 'Hidden',
|
|
98
|
+
},
|
|
99
|
+
layoutOptions: {
|
|
100
|
+
createDefaultLayout: false,
|
|
101
|
+
autoSizeColumnsInLayout: false,
|
|
102
|
+
},
|
|
103
|
+
predefinedConfig: {
|
|
104
|
+
Layout: {
|
|
105
|
+
Revision: Date.now(),
|
|
106
|
+
CurrentLayout: 'TransposedView',
|
|
107
|
+
Layouts: [
|
|
108
|
+
{
|
|
109
|
+
Name: 'TransposedView',
|
|
110
|
+
Columns: [
|
|
111
|
+
transposedFirstColumnHeader,
|
|
112
|
+
...transposedRowsAndColumns.transposedColumns.map((c) => c.colId),
|
|
113
|
+
],
|
|
114
|
+
PinnedColumnsMap: {
|
|
115
|
+
[transposedFirstColumnHeader]: 'left',
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
},
|
|
120
|
+
Theme: {
|
|
121
|
+
CurrentTheme: adaptable.api.themeApi.getCurrentTheme(),
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
const firstColumn = {
|
|
126
|
+
field: transposedFirstColumnHeader,
|
|
127
|
+
headerName: adaptable.api.columnApi.getFriendlyNameForColumnId(synteticTransposedByColumnId),
|
|
128
|
+
};
|
|
129
|
+
const agGridOptions = {
|
|
130
|
+
suppressLoadingOverlay: true,
|
|
131
|
+
defaultColDef: {
|
|
132
|
+
floatingFilter: false,
|
|
133
|
+
filter: false,
|
|
134
|
+
sortable: true,
|
|
135
|
+
resizable: true,
|
|
136
|
+
enableRowGroup: false,
|
|
137
|
+
editable: false,
|
|
138
|
+
enablePivot: false,
|
|
139
|
+
enableValue: false,
|
|
140
|
+
lockPinned: true,
|
|
141
|
+
menuTabs: [],
|
|
142
|
+
width: 120,
|
|
143
|
+
},
|
|
144
|
+
columnDefs: [
|
|
145
|
+
{
|
|
146
|
+
field: transposedFirstColumnField,
|
|
147
|
+
hide: true,
|
|
148
|
+
},
|
|
149
|
+
firstColumn,
|
|
150
|
+
...transposedRowsAndColumns.transposedColumns.map((col) => {
|
|
151
|
+
return {
|
|
152
|
+
field: col.colId,
|
|
153
|
+
type: null,
|
|
154
|
+
headerName: col.header,
|
|
155
|
+
};
|
|
156
|
+
}),
|
|
157
|
+
],
|
|
158
|
+
rowData: transposedRowsAndColumns.transposedRows,
|
|
159
|
+
sideBar: false,
|
|
160
|
+
};
|
|
161
|
+
const modules = adaptable.getAgGridRegisteredModules();
|
|
162
|
+
const adaptableInitFn = Object.getPrototypeOf(adaptable).constructor.init;
|
|
163
|
+
const agGridConfig = {
|
|
164
|
+
gridOptions: agGridOptions,
|
|
165
|
+
modules: modules,
|
|
166
|
+
};
|
|
167
|
+
let transposedAdaptableApi;
|
|
168
|
+
(async () => {
|
|
169
|
+
transposedAdaptableApi = await adaptableInitFn(adaptableOptions, agGridConfig);
|
|
170
|
+
adaptable.api.eventApi.on('ThemeChanged', (event) => {
|
|
171
|
+
transposedAdaptableApi.themeApi.loadTheme(typeof event.theme === 'object' ? event.theme.Name : event.theme);
|
|
172
|
+
});
|
|
173
|
+
})();
|
|
174
|
+
return () => {
|
|
175
|
+
if (transposedAdaptableApi) {
|
|
176
|
+
transposedAdaptableApi.destroy();
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
}, [synteticTransposedByColumnId]);
|
|
180
|
+
/**
|
|
181
|
+
* Need to get all data, manualy pivot the grid using the primary key.
|
|
182
|
+
*
|
|
183
|
+
* 1. get the data, and pivot using the primary key
|
|
184
|
+
* 2. create the col definitios, a col definition for each row
|
|
185
|
+
* 3. create the grid
|
|
186
|
+
*/
|
|
187
|
+
return (React.createElement(rebass_1.Flex, { flexDirection: "column", width: "100%", height: "100%" },
|
|
188
|
+
React.createElement(Panel_1.default, null,
|
|
189
|
+
React.createElement(FormLayout_1.default, null,
|
|
190
|
+
React.createElement(FormLayout_1.FormRow, { label: "Elevated Column" },
|
|
191
|
+
React.createElement(ColumnSelector_1.ColumnSelector, { value: synteticTransposedByColumnId, onChange: (colId) => {
|
|
192
|
+
setSynteticTransposedByColumnId(colId);
|
|
193
|
+
} })))),
|
|
194
|
+
React.createElement(rebass_1.Flex, { height: "100%" },
|
|
195
|
+
React.createElement(rebass_1.Box, { id: "transposed-adaptable-container" }),
|
|
196
|
+
React.createElement(rebass_1.Box, { height: "100%", width: "100%", id: "transposed-adaptable-ag-grid-container" }))));
|
|
197
|
+
};
|
|
198
|
+
exports.TransposedPopup = TransposedPopup;
|
|
@@ -19,7 +19,7 @@ const tableDOMProps = {
|
|
|
19
19
|
const NotesPopup = (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.
|
|
22
|
+
const allNotes = (0, react_redux_1.useSelector)((state) => (0, NotesRedux_1.GetAllNotesSelector)(state.Notes));
|
|
23
23
|
const columnsMap = React.useMemo(() => {
|
|
24
24
|
const columns = {
|
|
25
25
|
primaryKey: {
|
|
@@ -28,13 +28,14 @@ const NotesPopup = (props) => {
|
|
|
28
28
|
},
|
|
29
29
|
column: {
|
|
30
30
|
field: 'ColumnId',
|
|
31
|
+
header: 'Column',
|
|
31
32
|
valueGetter: (params) => {
|
|
32
33
|
return adaptable.api.columnApi.getFriendlyNameForColumnId(params.data.ColumnId);
|
|
33
34
|
},
|
|
34
35
|
},
|
|
35
|
-
|
|
36
|
-
field: '
|
|
37
|
-
header: '
|
|
36
|
+
text: {
|
|
37
|
+
field: 'Text',
|
|
38
|
+
header: 'Text',
|
|
38
39
|
defaultEditable: true,
|
|
39
40
|
defaultFlex: 3,
|
|
40
41
|
},
|
|
@@ -44,10 +45,6 @@ const NotesPopup = (props) => {
|
|
|
44
45
|
return new Date(params.data.Timestamp).toDateString();
|
|
45
46
|
},
|
|
46
47
|
},
|
|
47
|
-
author: {
|
|
48
|
-
header: 'Author',
|
|
49
|
-
valueGetter: (params) => params.data.Author.UserName,
|
|
50
|
-
},
|
|
51
48
|
delete: {
|
|
52
49
|
defaultWidth: 50,
|
|
53
50
|
render: (params) => {
|
|
@@ -68,8 +65,8 @@ const NotesPopup = (props) => {
|
|
|
68
65
|
if (change.type === 'update') {
|
|
69
66
|
const data = change.data;
|
|
70
67
|
const prevNote = allNotes.find((x) => x.Uuid === uuid);
|
|
71
|
-
if (prevNote.
|
|
72
|
-
adaptable.api.notesApi.updateNoteText(data.
|
|
68
|
+
if (prevNote.Text !== data.Text) {
|
|
69
|
+
adaptable.api.notesApi.updateNoteText(data.Text, prevNote);
|
|
73
70
|
}
|
|
74
71
|
}
|
|
75
72
|
}
|
|
@@ -80,6 +77,7 @@ const NotesPopup = (props) => {
|
|
|
80
77
|
align: 'start',
|
|
81
78
|
defaultFlex: 1,
|
|
82
79
|
defaultSortable: false,
|
|
80
|
+
style: { fontSize: 'var(--ab-font-size-3)' },
|
|
83
81
|
},
|
|
84
82
|
}, headerOptions: {
|
|
85
83
|
alwaysReserveSpaceForSortIcon: false,
|
|
@@ -12,6 +12,7 @@ const ThemeSelector = (props) => {
|
|
|
12
12
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
13
13
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
14
14
|
const availableThemes = adaptable.api.themeApi.getThemes();
|
|
15
|
+
const currentTheme = (0, react_redux_1.useSelector)((state) => state.Theme.CurrentTheme);
|
|
15
16
|
const disabled = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule(ModuleConstants_1.ThemeModuleId) === 'ReadOnly';
|
|
16
17
|
const optionThemes = availableThemes.map((theme) => {
|
|
17
18
|
if (typeof theme === 'string') {
|
|
@@ -26,8 +27,7 @@ const ThemeSelector = (props) => {
|
|
|
26
27
|
label: theme.Description,
|
|
27
28
|
};
|
|
28
29
|
});
|
|
29
|
-
|
|
30
|
-
return (React.createElement(Select_1.Select, { "data-name": "select-theme-dropdown", options: optionThemes, value: theme.Name, disabled: disabled, size: props.size, onChange: (themeName) => {
|
|
30
|
+
return (React.createElement(Select_1.Select, { "data-name": "select-theme-dropdown", searchable: false, options: optionThemes, value: currentTheme, disabled: disabled, size: props.size, onChange: (themeName) => {
|
|
31
31
|
dispatch(ThemeRedux.ThemeSelect(themeName));
|
|
32
32
|
} }));
|
|
33
33
|
};
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -1927,7 +1927,7 @@ class Adaptable {
|
|
|
1927
1927
|
if (column.dataType == 'String' && this.api.predicateApi.useCaseSensitivity()) {
|
|
1928
1928
|
uniqueVals = (0, uniqBy_1.default)(uniqueVals, (d) => d.displayValue.toLowerCase());
|
|
1929
1929
|
}
|
|
1930
|
-
return uniqueVals.slice(0, this.
|
|
1930
|
+
return uniqueVals.slice(0, this.api.columnFilterApi.getMaxFilterValue(column));
|
|
1931
1931
|
}
|
|
1932
1932
|
getGridCellsForPermittedValues(column, distinctValuesParams) {
|
|
1933
1933
|
var _a;
|
|
@@ -2065,7 +2065,7 @@ class Adaptable {
|
|
|
2065
2065
|
eachFn(rowNode, columnId);
|
|
2066
2066
|
});
|
|
2067
2067
|
}
|
|
2068
|
-
return returnArray.slice(0, this.
|
|
2068
|
+
return returnArray.slice(0, this.api.columnFilterApi.getMaxFilterValue(abColumn));
|
|
2069
2069
|
}
|
|
2070
2070
|
addDistinctColumnValue(rowNode, columnId) {
|
|
2071
2071
|
// we do not return the values of the aggregates when in grouping mode
|
|
@@ -69,7 +69,7 @@ class agGridMenuHelper {
|
|
|
69
69
|
const menuContext = this.createColumnMenuContextObject(adaptableColumn, params.column);
|
|
70
70
|
const adaptableMenuItems = this.createAdaptableColumnMenuItems(menuContext);
|
|
71
71
|
// sort Adaptable menu items by default order
|
|
72
|
-
const structuredAdaptableMenuItems = this.buildGroupedModuleItems(MenuOptions_1.
|
|
72
|
+
const structuredAdaptableMenuItems = this.buildGroupedModuleItems(MenuOptions_1.DEFAULT_ADAPTABLE_COLUMN_MENU_STRUCTURE, adaptableMenuItems);
|
|
73
73
|
// 1. first check if there is a custom column menu defined
|
|
74
74
|
if (typeof menuOptions.customColumnMenu === 'function') {
|
|
75
75
|
const defaultAgGridMenuItems = agGridMenuItems.map((itemName) => ({
|
|
@@ -338,8 +338,8 @@ class agGridMenuHelper {
|
|
|
338
338
|
const adaptableMenuItems = this.getAdaptableMenuItemsColumnHeader(adaptableColumn, menuContext);
|
|
339
339
|
// sort Adaptable menu items by default order
|
|
340
340
|
adaptableMenuItems.sort((first, second) => {
|
|
341
|
-
const firstPriority = MenuOptions_1.
|
|
342
|
-
const secondPriority = MenuOptions_1.
|
|
341
|
+
const firstPriority = MenuOptions_1.DEFAULT_ADAPTABLE_COLUMN_MENU_STRUCTURE.indexOf(first.module);
|
|
342
|
+
const secondPriority = MenuOptions_1.DEFAULT_ADAPTABLE_COLUMN_MENU_STRUCTURE.indexOf(second.module);
|
|
343
343
|
return firstPriority - secondPriority;
|
|
344
344
|
});
|
|
345
345
|
// And then convert them into Menu Item Defs
|
|
@@ -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;
|
|
@@ -16,7 +16,7 @@ const commonStyles = ({ isFocused, isDisabled, }) => {
|
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
const Select = function (props) {
|
|
19
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
19
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
20
20
|
const doesOptionMatchValue = function (option) {
|
|
21
21
|
if (typeof option.value === 'object' && option.value instanceof Date) {
|
|
22
22
|
return (0, date_fns_1.isSameDay)(option.value, props.value);
|
|
@@ -84,7 +84,7 @@ const Select = function (props) {
|
|
|
84
84
|
React.createElement(icons_1.Icon, { name: "triangle-down", style: { height: 20, width: 20 } })));
|
|
85
85
|
};
|
|
86
86
|
}, []);
|
|
87
|
-
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: (
|
|
87
|
+
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',
|
|
88
88
|
// This needed so the menu is not clipped by overflow: hidden
|
|
89
89
|
menuPortalTarget: document.body, isClearable: props.isClearable, onChange: (option) => {
|
|
90
90
|
if (props.isMulti) {
|
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:
|
|
6
|
-
VERSION: "18.0.0-canary.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1710512556255 || Date.now(),
|
|
6
|
+
VERSION: "18.0.0-canary.4" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -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
|
-
|
|
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
|
-
|
|
4543
|
+
Report: {
|
|
4516
4544
|
name: string;
|
|
4517
4545
|
kind: string;
|
|
4518
4546
|
desc: string;
|