@adaptabletools/adaptable-cjs 18.0.0-canary.3 → 18.0.0-canary.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agGrid.d.ts +4 -21
- package/agGrid.js +5 -21
- package/base.css +4 -1
- package/base.css.map +1 -1
- package/index.css +79 -68
- package/index.css.map +1 -1
- package/package.json +3 -4
- package/src/AdaptableInterfaces/IAdaptable.d.ts +55 -109
- package/src/AdaptableOptions/AdaptableOptions.d.ts +11 -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/AdaptableOptions/UserInterfaceOptions.d.ts +17 -0
- package/src/Api/AdaptableApi.d.ts +5 -0
- package/src/Api/BulkUpdateApi.d.ts +0 -5
- package/src/Api/Events/AdaptableReady.d.ts +3 -3
- package/src/Api/Events/GridDataChanged.d.ts +4 -4
- package/src/Api/GridApi.d.ts +14 -13
- package/src/Api/Implementation/ActionColumnApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ActionColumnApiImpl.js +33 -0
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +1 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +3 -0
- package/src/Api/Implementation/ApiBase.d.ts +2 -1
- package/src/Api/Implementation/ApiBase.js +4 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
- package/src/Api/Implementation/CommentsApiImpl.js +2 -1
- package/src/Api/Implementation/ConfigApiImpl.js +8 -3
- package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
- package/src/Api/Implementation/GridApiImpl.js +20 -14
- 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/Implementation/StatusBarApiImpl.d.ts +0 -1
- package/src/Api/Implementation/StatusBarApiImpl.js +0 -3
- package/src/Api/Implementation/ToolPanelApiImpl.js +6 -6
- package/src/Api/Internal/ActionRowInternalApi.d.ts +5 -1
- package/src/Api/Internal/ActionRowInternalApi.js +107 -0
- package/src/Api/Internal/AdaptableInternalApi.d.ts +3 -4
- package/src/Api/Internal/AdaptableInternalApi.js +10 -8
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +71 -0
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +1 -0
- package/src/Api/Internal/ColumnFilterInternalApi.js +11 -1
- package/src/Api/Internal/ColumnInternalApi.d.ts +4 -1
- package/src/Api/Internal/ColumnInternalApi.js +12 -0
- package/src/Api/Internal/CustomSortInternalApi.d.ts +3 -2
- package/src/Api/Internal/CustomSortInternalApi.js +32 -1
- package/src/Api/Internal/DataSetInternalApi.js +1 -1
- package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/FreeTextColumnInternalApi.js +60 -0
- package/src/Api/Internal/GridFilterInternalApi.js +1 -1
- package/src/Api/Internal/GridInternalApi.d.ts +21 -3
- package/src/Api/Internal/GridInternalApi.js +126 -7
- package/src/Api/Internal/TeamSharingInternalApi.js +1 -1
- 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/EnvVars.d.ts +3 -0
- package/src/EnvVars.js +8 -0
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -0
- package/src/PredefinedConfig/Common/AggregationColumns.js +5 -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/Redux/Store/AdaptableStore.d.ts +4 -6
- package/src/Redux/Store/AdaptableStore.js +22 -50
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +7 -1
- package/src/Strategy/AdaptableModuleBase.d.ts +2 -3
- package/src/Strategy/AdaptableModuleBase.js +4 -7
- package/src/Strategy/AlertModule.d.ts +1 -2
- package/src/Strategy/AlertModule.js +2 -55
- package/src/Strategy/CalculatedColumnModule.d.ts +2 -3
- package/src/Strategy/CalculatedColumnModule.js +5 -25
- package/src/Strategy/ChartingModule.d.ts +0 -1
- package/src/Strategy/ChartingModule.js +2 -22
- package/src/Strategy/ColumnFilterModule.d.ts +1 -2
- package/src/Strategy/ColumnFilterModule.js +1 -64
- package/src/Strategy/CommentsModule.d.ts +1 -0
- package/src/Strategy/CommentsModule.js +2 -1
- package/src/Strategy/CustomSortModule.js +1 -1
- package/src/Strategy/DashboardModule.d.ts +1 -2
- package/src/Strategy/DashboardModule.js +1 -8
- package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
- package/src/Strategy/DataChangeHistoryModule.js +3 -1
- package/src/Strategy/DataSetModule.d.ts +1 -1
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/FlashingCellModule.d.ts +1 -2
- package/src/Strategy/FlashingCellModule.js +2 -15
- package/src/Strategy/FormatColumnModule.d.ts +0 -2
- package/src/Strategy/FormatColumnModule.js +0 -47
- package/src/Strategy/FreeTextColumnModule.d.ts +0 -1
- package/src/Strategy/FreeTextColumnModule.js +0 -30
- package/src/Strategy/GridFilterModule.d.ts +0 -1
- package/src/Strategy/GridFilterModule.js +0 -37
- package/src/Strategy/Interface/IModule.d.ts +0 -1
- package/src/Strategy/LayoutModule.d.ts +1 -3
- package/src/Strategy/LayoutModule.js +6 -50
- package/src/Strategy/NamedQueryModule.d.ts +0 -1
- package/src/Strategy/NamedQueryModule.js +0 -19
- package/src/Strategy/PlusMinusModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/ScheduleModule.d.ts +1 -1
- package/src/Strategy/ScheduleModule.js +1 -1
- package/src/Strategy/ShortcutModule.d.ts +1 -1
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/StyledColumnModule.d.ts +0 -1
- package/src/Strategy/StyledColumnModule.js +0 -21
- package/src/Strategy/TeamSharingModule.d.ts +1 -0
- package/src/Strategy/TeamSharingModule.js +5 -5
- package/src/Strategy/ToolPanelModule.d.ts +0 -1
- package/src/Strategy/ToolPanelModule.js +0 -23
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +3 -2
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +5 -4
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +0 -3
- package/src/Utilities/Helpers/AdaptableHelper.js +1 -60
- 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/Utilities/Services/CellPopupService.js +0 -1
- package/src/Utilities/Services/LicenseService/index.d.ts +3 -0
- package/src/Utilities/Services/LicenseService/index.js +10 -3
- package/src/Utilities/Services/MetamodelService.d.ts +1 -1
- package/src/Utilities/Services/MetamodelService.js +6 -3
- package/src/Utilities/Services/RowEditService.d.ts +3 -2
- package/src/Utilities/Services/RowEditService.js +3 -1
- package/src/View/AdaptableView.js +0 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
- package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
- package/src/View/CalculatedColumn/utils.d.ts +1 -1
- package/src/View/CellSummary/CellSummaryPopup.js +1 -1
- package/src/View/Comments/CommentsPopup.js +12 -8
- package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
- package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
- 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/CustomSort/CustomSortSummary.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
- package/src/View/GridFilter/GridFilterViewPanel.js +6 -2
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
- package/src/View/Layout/TransposedPopup.d.ts +3 -0
- package/src/View/Layout/TransposedPopup.js +198 -0
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -1
- package/src/View/Notes/NotesPopup.js +8 -10
- package/src/View/Theme/ThemeSelector.js +2 -2
- package/src/agGrid/ActionColumnRenderer.js +4 -4
- package/src/agGrid/Adaptable.d.ts +3 -455
- package/src/agGrid/Adaptable.js +7 -5291
- package/src/agGrid/AdaptableAgGrid.d.ts +336 -0
- package/src/agGrid/AdaptableAgGrid.js +3785 -0
- package/src/agGrid/AdaptableLogger.js +78 -13
- package/src/agGrid/AgGridAdapter.d.ts +54 -0
- package/src/agGrid/AgGridAdapter.js +554 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +56 -0
- package/src/agGrid/AgGridColumnAdapter.js +818 -0
- package/src/agGrid/AgGridMenuAdapter.d.ts +28 -0
- package/src/agGrid/AgGridMenuAdapter.js +276 -0
- package/src/agGrid/AgGridOptionsService.d.ts +11 -0
- package/src/agGrid/AgGridOptionsService.js +54 -0
- package/src/agGrid/BadgeRenderer.js +1 -1
- package/src/agGrid/CheckboxRenderer.js +1 -1
- package/src/agGrid/FilterWrapper.d.ts +2 -2
- package/src/agGrid/FilterWrapper.js +1 -1
- package/src/agGrid/attachAddaptableColumnTypes.d.ts +12 -12
- package/src/agGrid/defaultAdaptableOptions.d.ts +3 -0
- package/src/{Utilities/Defaults/DefaultAdaptableOptions.js → agGrid/defaultAdaptableOptions.js} +73 -10
- package/src/agGrid/editors/AdaptableDateEditor/index.js +2 -2
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/InfiniteTable/index.js +2 -2
- package/src/components/Modal/index.d.ts +1 -0
- package/src/components/Modal/index.js +6 -4
- 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 +39 -11
- package/src/metamodel/adaptable.metamodel.js +73 -32
- package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
- package/src/migration/AdaptableUpgradeHelper.js +52 -0
- package/src/migration/VersionUpgrade.d.ts +8 -0
- package/src/migration/VersionUpgrade.js +15 -0
- package/src/migration/VersionUpgrade17.d.ts +18 -0
- package/src/migration/VersionUpgrade17.js +347 -0
- package/src/migration/VersionUpgrade18.d.ts +5 -0
- package/src/migration/VersionUpgrade18.js +10 -0
- package/src/types.d.ts +7 -3
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +0 -2
- package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -3
- package/src/Utilities/Services/Interface/IRowEditService.js +0 -2
- package/src/agGrid/agGridHelper.d.ts +0 -57
- package/src/agGrid/agGridHelper.js +0 -691
- package/src/agGrid/agGridMenuHelper.d.ts +0 -46
- package/src/agGrid/agGridMenuHelper.js +0 -673
- /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
- /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
|
@@ -5,14 +5,24 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const Dialog_1 = tslib_1.__importDefault(require("../../../components/Dialog"));
|
|
7
7
|
const rebass_1 = require("rebass");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
function AdaptableLoadingScreen(props) {
|
|
9
|
+
const { showLoadingScreen, loadingScreenDelay, loadingScreenTitle, loadingScreenText } = props;
|
|
10
|
+
const [delayElapsed, setDelayElapsed] = React.useState(typeof loadingScreenDelay === 'number' ? false : showLoadingScreen);
|
|
11
|
+
React.useEffect(() => {
|
|
12
|
+
if (typeof loadingScreenDelay === 'number') {
|
|
13
|
+
const timeoutId = setTimeout(() => {
|
|
14
|
+
setDelayElapsed(true);
|
|
15
|
+
}, loadingScreenDelay);
|
|
16
|
+
return () => {
|
|
17
|
+
clearTimeout(timeoutId);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}, [loadingScreenDelay]);
|
|
21
|
+
return (React.createElement(Dialog_1.default, { modal: true, isOpen: delayElapsed ? showLoadingScreen : false, onDismiss: props.onClose, showCloseButton: false, className: "ab-LoadingScreen", style: {
|
|
22
|
+
minHeight: 'auto',
|
|
23
|
+
} },
|
|
24
|
+
React.createElement(rebass_1.Box, { padding: 3 },
|
|
25
|
+
React.createElement("h4", null, loadingScreenTitle !== null && loadingScreenTitle !== void 0 ? loadingScreenTitle : 'Initialising Grid'),
|
|
26
|
+
React.createElement("p", null, loadingScreenText !== null && loadingScreenText !== void 0 ? loadingScreenText : 'Retrieving your settings and setting up the grid...'))));
|
|
17
27
|
}
|
|
18
28
|
exports.AdaptableLoadingScreen = AdaptableLoadingScreen;
|
|
@@ -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);
|
|
@@ -37,7 +37,7 @@ class CustomSortSummaryComponent extends React.Component {
|
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
39
|
const customSort = this.props.CustomSorts.find((c) => c.ColumnId == this.props.summarisedColumn.columnId);
|
|
40
|
-
const columnSortComparer = this.props.api.customSortApi.internalApi.getCustomSortComparer(this.props.summarisedColumn);
|
|
40
|
+
const columnSortComparer = this.props.api.customSortApi.internalApi.getCustomSortComparer(this.props.summarisedColumn.columnId);
|
|
41
41
|
let noCustomSort = customSort == null && columnSortComparer == null;
|
|
42
42
|
let customSortRow;
|
|
43
43
|
if (!this.props.summarisedColumn.sortable) {
|
|
@@ -69,7 +69,7 @@ const DataChangeHistoryGrid = (props) => {
|
|
|
69
69
|
// 2. this UI will be reimplemented with Infinite Table anyway
|
|
70
70
|
const addedRows = mapChangeHistoryRowData(addedChangeHistoryLogs, mainAdaptableInstance);
|
|
71
71
|
const removedRows = mapChangeHistoryRowData(removedChangeHistoryLogs, mainAdaptableInstance);
|
|
72
|
-
adaptableApi.
|
|
72
|
+
adaptableApi.agGridApi.applyTransactionAsync({
|
|
73
73
|
add: addedRows,
|
|
74
74
|
remove: removedRows,
|
|
75
75
|
});
|
|
@@ -27,6 +27,7 @@ const QueryViewPanelComponent = (props) => {
|
|
|
27
27
|
const disabled = isReadOnly || isSuspended || gridFilterAccessLevel === 'ReadOnly';
|
|
28
28
|
const handleEnter = (e) => {
|
|
29
29
|
if (e.key === 'Enter') {
|
|
30
|
+
e.preventDefault();
|
|
30
31
|
runQuery();
|
|
31
32
|
}
|
|
32
33
|
};
|
|
@@ -48,8 +49,9 @@ const QueryViewPanelComponent = (props) => {
|
|
|
48
49
|
fontFamily: 'monospace',
|
|
49
50
|
fontSize: 12,
|
|
50
51
|
maxHeight: 52,
|
|
51
|
-
height:
|
|
52
|
-
paddingTop:
|
|
52
|
+
height: '100%',
|
|
53
|
+
paddingTop: 6,
|
|
54
|
+
overflow: 'hidden',
|
|
53
55
|
zIndex: 100,
|
|
54
56
|
}, placehoder: "Grid Filter", onChange: (x) => setExpression(x.target.value), value: expression })),
|
|
55
57
|
isExpressionValid && (React.createElement(ButtonPlay_1.ButtonPlay, { onClick: () => runQuery(), tooltip: '', accessLevel: gridFilterAccessLevel, variant: "text", tone: "neutral", disabled: disabled || expression == '' || expression == (gridFilter === null || gridFilter === void 0 ? void 0 : gridFilter.Expression), marginRight: 1 })),
|
|
@@ -75,6 +77,8 @@ const QueryViewPanelComponent = (props) => {
|
|
|
75
77
|
maxHeight: 60,
|
|
76
78
|
paddingTop: 7,
|
|
77
79
|
zIndex: 100,
|
|
80
|
+
height: '100%',
|
|
81
|
+
overflow: 'hidden',
|
|
78
82
|
}, placehoder: "Grid Filter", onChange: (x) => setExpression(x.target.value), value: expression }))));
|
|
79
83
|
};
|
|
80
84
|
const saveButton = (React.createElement(ButtonSave_1.ButtonSave, { onClick: () => saveQuery(), tooltip: "Save as Named Query", accessLevel: namedQueryModuleAccessLevel, disabled: disabled || !isExpressionValid || isExpressionNamedQuery || expression == '', variant: "text", tone: "neutral", marginRight: 1 }));
|
|
@@ -13,8 +13,8 @@ const AdaptableObjectCollection_1 = require("../../Components/AdaptableObjectCol
|
|
|
13
13
|
const AdaptableObjectRow_1 = require("../../Components/AdaptableObjectRow");
|
|
14
14
|
const PopupPanel_1 = require("../../Components/Popups/AdaptablePopup/PopupPanel");
|
|
15
15
|
const AdaptableObjectsSummary_1 = require("./AdaptableObjectsSummary");
|
|
16
|
-
const
|
|
17
|
-
const version =
|
|
16
|
+
const EnvVars_1 = require("../../../EnvVars");
|
|
17
|
+
const version = EnvVars_1.ADAPTABLE_VERSION;
|
|
18
18
|
const GridInfoPopup = (props) => {
|
|
19
19
|
const CreateGridSummaries = (colItems) => {
|
|
20
20
|
var _a;
|
|
@@ -43,7 +43,6 @@ const GridInfoPopup = (props) => {
|
|
|
43
43
|
returnRows.push(createReadOnlyColItem(colItems, 'Column Filters', columnFilterDescription));
|
|
44
44
|
returnRows.push(createReadOnlyColItem(colItems, 'Grid Filter', gridFilterExpression));
|
|
45
45
|
returnRows.push(createReadOnlyColItem(colItems, 'All Rows', props.api.gridApi.getRowCount()));
|
|
46
|
-
returnRows.push(createReadOnlyColItem(colItems, 'Visible Rows', props.api.gridApi.getVisibleRowCount()));
|
|
47
46
|
returnRows.push(createReadOnlyColItem(colItems, 'Selected Rows', selectedRowInfo === null || selectedRowInfo === void 0 ? void 0 : selectedRowInfo.gridRows.length));
|
|
48
47
|
returnRows.push(createReadOnlyColItem(colItems, 'Visible Selected Rows', selectedRowInfo === null || selectedRowInfo === void 0 ? void 0 : selectedRowInfo.gridRows.filter((gr) => { var _a; return ((_a = gr.rowNode) === null || _a === void 0 ? void 0 : _a.displayed) == true; }).length));
|
|
49
48
|
returnRows.push(createReadOnlyColItem(colItems, 'All Columns', props.api.gridApi.getColumnCount()));
|
|
@@ -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;
|
|
@@ -38,7 +38,7 @@ const LayoutWizard = (props) => {
|
|
|
38
38
|
}
|
|
39
39
|
if (preparedLayout.SuppressAggFuncInHeader === undefined) {
|
|
40
40
|
preparedLayout.SuppressAggFuncInHeader =
|
|
41
|
-
!!adaptable.
|
|
41
|
+
!!adaptable.agGridAdapter.initialGridOptions.suppressAggFuncInHeader;
|
|
42
42
|
}
|
|
43
43
|
return preparedLayout;
|
|
44
44
|
});
|
|
@@ -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
|
};
|
|
@@ -36,7 +36,7 @@ const ActionButtons = (props) => {
|
|
|
36
36
|
};
|
|
37
37
|
const ReactActionColumnRenderer = (props) => {
|
|
38
38
|
const rerender = (0, useRerender_1.useRerender)();
|
|
39
|
-
const adaptable = props.
|
|
39
|
+
const adaptable = props.context.__adaptable;
|
|
40
40
|
const { actionButtons, actionColumn } = adaptable.api.internalApi.getActionButtonsAndActionColumn(props.colDef);
|
|
41
41
|
if (!actionColumn || !actionButtons.length) {
|
|
42
42
|
return null;
|
|
@@ -45,7 +45,7 @@ const ReactActionColumnRenderer = (props) => {
|
|
|
45
45
|
if (adaptable.api.gridApi.isGroupRowNode(props.node) && !actionColumn.includeGroupedRows) {
|
|
46
46
|
return null;
|
|
47
47
|
}
|
|
48
|
-
const pkValue = adaptable.getPrimaryKeyValueFromRowNode(props.node);
|
|
48
|
+
const pkValue = adaptable.getPrimaryKeyValueFromRowNode(props.node, props.api);
|
|
49
49
|
const buttonContext = {
|
|
50
50
|
actionColumn,
|
|
51
51
|
primaryKeyValue: pkValue,
|
|
@@ -62,7 +62,7 @@ exports.ReactActionColumnRenderer = ReactActionColumnRenderer;
|
|
|
62
62
|
class ActionColumnRenderer {
|
|
63
63
|
// gets called once before the renderer is used
|
|
64
64
|
init(params) {
|
|
65
|
-
const adaptable = params.
|
|
65
|
+
const adaptable = params.context.__adaptable;
|
|
66
66
|
const { actionButtons, actionColumn } = adaptable.api.internalApi.getActionButtonsAndActionColumn(params.colDef);
|
|
67
67
|
if (!actionColumn || !actionButtons.length) {
|
|
68
68
|
return;
|
|
@@ -75,7 +75,7 @@ class ActionColumnRenderer {
|
|
|
75
75
|
this.eGui.innerHTML = '';
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
const pkValue = adaptable.getPrimaryKeyValueFromRowNode(params.node);
|
|
78
|
+
const pkValue = adaptable.getPrimaryKeyValueFromRowNode(params.node, params.api);
|
|
79
79
|
const buttonContext = {
|
|
80
80
|
actionColumn,
|
|
81
81
|
primaryKeyValue: pkValue,
|