@adaptabletools/adaptable 18.0.0-canary.1 → 18.0.0-canary.11
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 +9 -26
- package/base.css +11 -3
- package/base.css.map +1 -1
- package/index.css +88 -70
- package/index.css.map +1 -1
- package/package.json +4 -5
- package/src/AdaptableInterfaces/IAdaptable.d.ts +61 -108
- package/src/AdaptableOptions/AdaptableOptions.d.ts +12 -6
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +4 -4
- package/src/AdaptableOptions/ColumnOptions.d.ts +4 -2
- package/src/AdaptableOptions/{CommentsOptions.d.ts → CommentOptions.d.ts} +5 -5
- package/src/AdaptableOptions/MenuOptions.d.ts +1 -1
- package/src/AdaptableOptions/MenuOptions.js +1 -5
- 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/ConfigApi.d.ts +1 -1
- package/src/Api/Events/AdaptableReady.d.ts +3 -3
- package/src/Api/Events/GridDataChanged.d.ts +4 -4
- package/src/Api/GridApi.d.ts +18 -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.d.ts +4 -0
- package/src/Api/Implementation/CommentsApiImpl.js +7 -1
- package/src/Api/Implementation/ConfigApiImpl.js +13 -5
- package/src/Api/Implementation/GridApiImpl.d.ts +4 -3
- package/src/Api/Implementation/GridApiImpl.js +33 -14
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +15 -0
- package/src/Api/Implementation/NotesApiImpl.d.ts +6 -4
- package/src/Api/Implementation/NotesApiImpl.js +9 -8
- package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -1
- package/src/Api/Implementation/OptionsApiImpl.js +12 -2
- package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ScopeApiImpl.js +20 -7
- 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 +106 -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 +70 -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/CommentsInternalApi.d.ts +4 -0
- package/src/Api/Internal/CommentsInternalApi.js +14 -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/FormatColumnInternalApi.js +3 -2
- package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/FreeTextColumnInternalApi.js +59 -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/NotesInternalApi.d.ts +4 -0
- package/src/Api/Internal/NotesInternalApi.js +14 -0
- package/src/Api/Internal/TeamSharingInternalApi.js +1 -1
- package/src/Api/InteropioPluginApi.d.ts +2 -2
- package/src/Api/LayoutApi.d.ts +11 -0
- package/src/Api/OptionsApi.d.ts +5 -1
- package/src/Api/ScopeApi.d.ts +10 -0
- package/src/EnvVars.d.ts +3 -0
- package/src/EnvVars.js +4 -0
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableScope.d.ts +4 -1
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -0
- package/src/PredefinedConfig/Common/AggregationColumns.js +3 -0
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +8 -0
- package/src/PredefinedConfig/Common/RowSummary.d.ts +7 -0
- package/src/PredefinedConfig/Common/RowSummary.js +1 -0
- package/src/PredefinedConfig/LayoutState.d.ts +5 -0
- package/src/PredefinedConfig/NotesState.d.ts +10 -20
- package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -1
- package/src/PredefinedConfig/SystemState.d.ts +7 -0
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +20 -0
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +3 -4
- package/src/Redux/ActionsReducers/NotesRedux.js +8 -7
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +13 -1
- package/src/Redux/Store/AdaptableStore.d.ts +4 -6
- package/src/Redux/Store/AdaptableStore.js +33 -50
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +8 -2
- 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/CellSummaryModule.d.ts +1 -0
- package/src/Strategy/CellSummaryModule.js +50 -21
- 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 +5 -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 +8 -3
- package/src/Strategy/LayoutModule.js +108 -53
- package/src/Strategy/NamedQueryModule.d.ts +0 -1
- package/src/Strategy/NamedQueryModule.js +0 -19
- package/src/Strategy/NotesModule.js +3 -4
- 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 +1 -0
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +5 -4
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +294 -0
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +1 -1
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +4 -0
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -4
- package/src/Utilities/Helpers/AdaptableHelper.js +18 -58
- package/src/Utilities/Helpers/Helper.d.ts +2 -0
- package/src/Utilities/Helpers/Helper.js +4 -0
- package/src/Utilities/ObjectFactory.js +6 -6
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +3 -2
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +14 -9
- package/src/Utilities/Services/CellPopupService.js +0 -1
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/LicenseService/index.d.ts +3 -0
- package/src/Utilities/Services/LicenseService/index.js +1 -181
- package/src/Utilities/Services/MetamodelService.d.ts +1 -1
- package/src/Utilities/Services/MetamodelService.js +6 -3
- package/src/Utilities/Services/QueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/QueryLanguageService.js +2 -1
- package/src/Utilities/Services/RowEditService.d.ts +3 -2
- package/src/Utilities/Services/RowEditService.js +3 -1
- package/src/Utilities/Services/SummaryService.d.ts +19 -0
- package/src/Utilities/Services/SummaryService.js +29 -0
- package/src/Utilities/license/decode.js +1 -65
- package/src/Utilities/license/hashing.js +1 -43
- package/src/View/AdaptableView.js +1 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
- package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +2 -2
- 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/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/NewScopeComponent.js +34 -1
- package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
- package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
- package/src/View/Components/Popups/AdaptableToaster.js +1 -1
- 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 +3 -0
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
- package/src/View/CustomSort/CustomSortSummary.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +8 -8
- package/src/View/GridFilter/GridFilterViewPanel.js +7 -3
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
- package/src/View/Layout/TransposedPopup.d.ts +3 -0
- package/src/View/Layout/TransposedPopup.js +194 -0
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -1
- package/src/View/License/LicenseWatermark.js +1 -61
- package/src/View/Notes/NotesPopup.js +9 -11
- package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
- package/src/View/Theme/ThemeSelector.js +3 -3
- package/src/agGrid/ActionColumnRenderer.js +7 -6
- package/src/agGrid/Adaptable.d.ts +3 -455
- package/src/agGrid/Adaptable.js +8 -5292
- package/src/agGrid/AdaptableAgGrid.d.ts +351 -0
- package/src/agGrid/AdaptableAgGrid.js +3936 -0
- package/src/agGrid/AdaptableLogger.js +77 -11
- package/src/agGrid/AgGridAdapter.d.ts +62 -0
- package/src/agGrid/AgGridAdapter.js +577 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +56 -0
- package/src/agGrid/AgGridColumnAdapter.js +824 -0
- package/src/agGrid/AgGridMenuAdapter.d.ts +28 -0
- package/src/agGrid/AgGridMenuAdapter.js +271 -0
- package/src/agGrid/AgGridOptionsService.d.ts +12 -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} +70 -9
- package/src/agGrid/editors/AdaptableDateEditor/index.js +2 -2
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
- package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/InfiniteTable/index.js +2 -2
- package/src/components/Input/index.d.ts +1 -1
- package/src/components/List/ListGroupItem/index.d.ts +1 -1
- package/src/components/Modal/index.d.ts +1 -0
- package/src/components/Modal/index.js +4 -3
- package/src/components/Select/Select.d.ts +2 -0
- package/src/components/Select/Select.js +2 -2
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/rows.d.ts +3 -0
- package/src/components/icons/rows.js +4 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +74 -11
- package/src/metamodel/adaptable.metamodel.js +1 -9313
- package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
- package/src/migration/AdaptableUpgradeHelper.js +48 -0
- package/src/migration/VersionUpgrade.d.ts +8 -0
- package/src/migration/VersionUpgrade.js +11 -0
- package/src/migration/VersionUpgrade17.d.ts +18 -0
- package/src/migration/VersionUpgrade17.js +342 -0
- package/src/migration/VersionUpgrade18.d.ts +5 -0
- package/src/migration/VersionUpgrade18.js +6 -0
- package/src/parser/src/types.d.ts +5 -0
- package/src/types.d.ts +7 -3
- package/tsconfig.esm.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 -1
- package/src/View/Components/ScopeComponent.d.ts +0 -24
- package/src/View/Components/ScopeComponent.js +0 -133
- package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
- package/src/View/Export/Wizard/ReportScopeWizard.js +0 -47
- package/src/agGrid/agGridHelper.d.ts +0 -57
- package/src/agGrid/agGridHelper.js +0 -686
- package/src/agGrid/agGridMenuHelper.d.ts +0 -46
- package/src/agGrid/agGridMenuHelper.js +0 -668
- /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
- /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AdaptableApi, CalculatedColumn } from '../../types';
|
|
2
|
-
export declare const getExpressionType: (calculatedColumn: CalculatedColumn, api: AdaptableApi) => "
|
|
2
|
+
export declare const getExpressionType: (calculatedColumn: CalculatedColumn, api: AdaptableApi) => "AggregatedScalarExpression" | "ScalarExpression" | "CumulativeAggregatedExpression" | "QuantileAggregatedExpression";
|
|
@@ -11,7 +11,7 @@ class CellSummaryPopupComponent extends React.Component {
|
|
|
11
11
|
// afterwards, we will go on with the cell summary logic, as that will evaluate the current(column) cell selection
|
|
12
12
|
this.props.api.columnApi.selectColumn((_c = this.props.popupParams) === null || _c === void 0 ? void 0 : _c.column.columnId);
|
|
13
13
|
// we also need to update the internal state of the selected cells
|
|
14
|
-
this.props.api.internalApi.getAdaptableInstance().
|
|
14
|
+
this.props.api.internalApi.getAdaptableInstance().refreshSelectedCellsState();
|
|
15
15
|
}
|
|
16
16
|
this.props.onCreateCellSummary();
|
|
17
17
|
}
|
|
@@ -29,8 +29,8 @@ const CellComments = (props) => {
|
|
|
29
29
|
return formatDate(params.data.Timestamp, 'MM.DD.YYYY HH:mm');
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
|
-
|
|
33
|
-
header: '
|
|
32
|
+
text: {
|
|
33
|
+
header: 'Text',
|
|
34
34
|
field: 'Value',
|
|
35
35
|
defaultFlex: 3,
|
|
36
36
|
},
|
|
@@ -38,15 +38,19 @@ const CellComments = (props) => {
|
|
|
38
38
|
return columns;
|
|
39
39
|
}, []);
|
|
40
40
|
const cellValue = adaptable.api.gridApi.getCellDisplayValue(props.commentThread.PrimaryKeyValue, props.commentThread.ColumnId);
|
|
41
|
+
const primaryKeyHeader = React.useMemo(() => {
|
|
42
|
+
const primaryKey = adaptable.api.optionsApi.getPrimaryKey();
|
|
43
|
+
return adaptable.api.columnApi.getFriendlyNameForColumnId(primaryKey);
|
|
44
|
+
}, []);
|
|
41
45
|
const columnFriendlyName = adaptable.api.columnApi.getFriendlyNameForColumnId(props.commentThread.ColumnId);
|
|
42
46
|
return (React.createElement(Panel, { mb: 2, header: React.createElement(Flex, { width: "100%", alignItems: "center" },
|
|
43
47
|
React.createElement(Box, { mr: 2 },
|
|
44
48
|
"Cell Value: ",
|
|
45
49
|
cellValue),
|
|
46
50
|
React.createElement(Box, { mr: 2 },
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
primaryKeyHeader,
|
|
52
|
+
": ",
|
|
53
|
+
props.commentThread.PrimaryKeyValue),
|
|
50
54
|
React.createElement(Box, null,
|
|
51
55
|
"Column: ",
|
|
52
56
|
columnFriendlyName),
|
|
@@ -72,11 +76,11 @@ const CellComments = (props) => {
|
|
|
72
76
|
}, rowHeight: 30, columnHeaderHeight: 30, domProps: tableDOMProps, columns: columnsMap }))));
|
|
73
77
|
};
|
|
74
78
|
export const CommentsPopup = (props) => {
|
|
75
|
-
const
|
|
79
|
+
const commentThreads = useSelector((state) => {
|
|
76
80
|
return state.Comment.CommentThreads;
|
|
77
81
|
});
|
|
78
|
-
return (React.createElement(PopupPanel, { headerText: 'Comments', glyphicon: 'comments', infoLink: props.moduleInfo.HelpPage }, (
|
|
82
|
+
return (React.createElement(PopupPanel, { headerText: 'Comments', glyphicon: 'comments', infoLink: props.moduleInfo.HelpPage }, (commentThreads !== null && commentThreads !== void 0 ? commentThreads : []).map((commentThread, index) => {
|
|
79
83
|
var _a;
|
|
80
|
-
return React.createElement(CellComments, { key: (_a =
|
|
84
|
+
return React.createElement(CellComments, { key: (_a = commentThread === null || commentThread === void 0 ? void 0 : commentThread.Uuid) !== null && _a !== void 0 ? _a : index, commentThread: commentThread });
|
|
81
85
|
})));
|
|
82
86
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AdaptableInputProps } from '../AdaptableInput';
|
|
3
3
|
export type AdaptableDateInputProps = AdaptableInputProps;
|
|
4
|
-
declare const AdaptableDateInput: React.ForwardRefExoticComponent<Pick<import("../../../components/Input").InputProps, "children" | "size" | "name" | "tabIndex" | "color" | "style" | "cite" | "data" | "form" | "label" | "p" | "slot" | "span" | "summary" | "title" | "pattern" | "start" | "hidden" | "content" | "default" | "flex" | "wrap" | "open" | "padding" | "multiple" | "disabled" | "checked" | "download" | "list" | "order" | "target" | "src" | "className" | "onTransitionEnd" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEndCapture" | "opacity" | "value" | "key" | "sizes" | "variant" | "tx" | "as" | "css" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "display" | "verticalAlign" | "overflow" | "overflowX" | "overflowY" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontStyle" | "textAlign" | "bg" | "backgroundColor" | "alignItems" | "alignContent" | "justifyItems" | "justifyContent" | "flexWrap" | "flexDirection" | "flexGrow" | "flexShrink" | "flexBasis" | "justifySelf" | "alignSelf" | "sx" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "
|
|
4
|
+
declare const AdaptableDateInput: React.ForwardRefExoticComponent<Pick<import("../../../components/Input").InputProps, "children" | "size" | "name" | "tabIndex" | "color" | "style" | "cite" | "data" | "form" | "label" | "p" | "slot" | "span" | "summary" | "title" | "pattern" | "start" | "hidden" | "content" | "default" | "flex" | "wrap" | "open" | "padding" | "multiple" | "disabled" | "checked" | "download" | "list" | "order" | "target" | "rows" | "src" | "className" | "onTransitionEnd" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEndCapture" | "opacity" | "value" | "key" | "sizes" | "variant" | "tx" | "as" | "css" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "display" | "verticalAlign" | "overflow" | "overflowX" | "overflowY" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontStyle" | "textAlign" | "bg" | "backgroundColor" | "alignItems" | "alignContent" | "justifyItems" | "justifyContent" | "flexWrap" | "flexDirection" | "flexGrow" | "flexShrink" | "flexBasis" | "justifySelf" | "alignSelf" | "sx" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "srcDoc" | "srcLang" | "srcSet" | "step" | "type" | "useMap" | "wmode" | "placehoder"> & React.RefAttributes<HTMLInputElement>>;
|
|
5
5
|
export default AdaptableDateInput;
|
|
@@ -56,6 +56,7 @@ export const renderScopeSummary = (scope, labels) => {
|
|
|
56
56
|
};
|
|
57
57
|
const DATA_TYPES_OPTIONS = Object.values(DATA_TYPES_MAP);
|
|
58
58
|
export const NewScopeComponent = (props) => {
|
|
59
|
+
var _a, _b;
|
|
59
60
|
const { api } = useAdaptable();
|
|
60
61
|
const { scopeApi, columnApi } = api;
|
|
61
62
|
const [columnsSearchText, setColumnsSearchText] = useState('');
|
|
@@ -79,6 +80,9 @@ export const NewScopeComponent = (props) => {
|
|
|
79
80
|
if (scopeApi.scopeHasDataType(props.scope)) {
|
|
80
81
|
return 'DataType';
|
|
81
82
|
}
|
|
83
|
+
if (scopeApi.scopeHasColumnType(props.scope)) {
|
|
84
|
+
return 'ColumnType';
|
|
85
|
+
}
|
|
82
86
|
return undefined;
|
|
83
87
|
};
|
|
84
88
|
const onScopeSelectChanged = (value) => {
|
|
@@ -93,6 +97,11 @@ export const NewScopeComponent = (props) => {
|
|
|
93
97
|
DataTypes: [],
|
|
94
98
|
};
|
|
95
99
|
}
|
|
100
|
+
else if (value == 'ColumnType') {
|
|
101
|
+
newScope = {
|
|
102
|
+
ColumnTypes: [],
|
|
103
|
+
};
|
|
104
|
+
}
|
|
96
105
|
else {
|
|
97
106
|
newScope = {
|
|
98
107
|
All: true,
|
|
@@ -128,6 +137,10 @@ export const NewScopeComponent = (props) => {
|
|
|
128
137
|
if (Array.isArray(props.availableDataTypes)) {
|
|
129
138
|
dataTypeOptions = props.availableDataTypes.map((dataType) => DATA_TYPES_MAP[dataType]);
|
|
130
139
|
}
|
|
140
|
+
const hasColumnTypes = React.useMemo(() => {
|
|
141
|
+
var _a;
|
|
142
|
+
return ((_a = api.optionsApi.getColumnTypes()) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
143
|
+
}, []);
|
|
131
144
|
return (React.createElement(Tabs, { "data-name": 'scope-component', className: "ab-ScopeComponent", value: scopeChoice, style: Object.assign({ height: '100%' }, props.style), onValueChange: onScopeSelectChanged },
|
|
132
145
|
props.hideWholeRow ? null : (React.createElement(Tabs.Tab, { value: "Row" },
|
|
133
146
|
React.createElement(Radio, { margin: 0, checked: scopeChoice == 'All', tabIndex: -1 }, "All Columns"))),
|
|
@@ -135,6 +148,8 @@ export const NewScopeComponent = (props) => {
|
|
|
135
148
|
React.createElement(Radio, { margin: 0, value: "Column", checked: scopeChoice == 'Column', tabIndex: -1 }, "Selected Columns"))),
|
|
136
149
|
!props.disableDataTypes && (React.createElement(Tabs.Tab, { value: "DataType" },
|
|
137
150
|
React.createElement(Radio, { margin: 0, value: "DataType", checked: scopeChoice == 'DataType', tabIndex: -1 }, "Data Types"))),
|
|
151
|
+
hasColumnTypes && (React.createElement(Tabs.Tab, { value: "ColumnType" },
|
|
152
|
+
React.createElement(Radio, { margin: 0, value: "ColumnType", checked: scopeChoice == 'ColumnType', tabIndex: -1 }, "Column Types"))),
|
|
138
153
|
props.hideWholeRow ? null : (React.createElement(Tabs.Content, { value: "Row", style: { flex: 'none' }, "data-name": "row-scope" },
|
|
139
154
|
React.createElement(Text, { padding: 2, pl: 0, fontSize: 2 }, props.descriptions.rowScope))),
|
|
140
155
|
!props.disableColumns && (React.createElement(Tabs.Content, { value: "Column", style: { flex: 1, overflow: 'auto' }, "data-name": "column-scope", padding: 0 },
|
|
@@ -147,5 +162,23 @@ export const NewScopeComponent = (props) => {
|
|
|
147
162
|
!props.disableDataTypes && (React.createElement(Tabs.Content, { value: "DataType", style: { flex: 'none' }, "data-name": "datatype-scope" },
|
|
148
163
|
React.createElement(Box, null,
|
|
149
164
|
props.descriptions.dataTypeScope && (React.createElement(Text, { p: 2, pl: 0, mb: 2, fontSize: 2 }, props.descriptions.dataTypeScope)),
|
|
150
|
-
React.createElement(Flex, { flexDirection: "column" }, dataTypeOptions.map((dataTypeOption) => (React.createElement(CheckBox, { "data-name": "scope", "data-value": dataTypeOption.value, key: dataTypeOption.value, checked: dataTypesInScope && dataTypesInScope.includes(dataTypeOption.value), onChange: (checked) => onCheckBoxDataTypeChecked(checked, dataTypeOption.value) }, dataTypeOption.label)))))))
|
|
165
|
+
React.createElement(Flex, { flexDirection: "column" }, dataTypeOptions.map((dataTypeOption) => (React.createElement(CheckBox, { "data-name": "scope", "data-value": dataTypeOption.value, key: dataTypeOption.value, checked: dataTypesInScope && dataTypesInScope.includes(dataTypeOption.value), onChange: (checked) => onCheckBoxDataTypeChecked(checked, dataTypeOption.value) }, dataTypeOption.label))))))),
|
|
166
|
+
hasColumnTypes && (React.createElement(Tabs.Content, { value: "ColumnType", style: { flex: 'none' }, "data-name": "column-type-scope" },
|
|
167
|
+
React.createElement(Box, null,
|
|
168
|
+
React.createElement(Flex, { flexDirection: "column" }, (_b = (_a = api.optionsApi.getColumnTypes()) === null || _a === void 0 ? void 0 : _a.map) === null || _b === void 0 ? void 0 : _b.call(_a, (columnType) => {
|
|
169
|
+
var _a;
|
|
170
|
+
return (React.createElement(CheckBox, { "data-name": "scope", "data-value": columnType, key: columnType, checked: 'ColumnTypes' in props.scope && ((_a = props.scope.ColumnTypes) === null || _a === void 0 ? void 0 : _a.includes(columnType)), onChange: (checked) => {
|
|
171
|
+
let columnTypes = [].concat(props.scope.ColumnTypes);
|
|
172
|
+
if (checked) {
|
|
173
|
+
columnTypes.push(columnType);
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
columnTypes = columnTypes.filter((ct) => ct !== columnType);
|
|
177
|
+
}
|
|
178
|
+
let newScope = {
|
|
179
|
+
ColumnTypes: columnTypes,
|
|
180
|
+
};
|
|
181
|
+
props.updateScope(newScope);
|
|
182
|
+
} }, columnType));
|
|
183
|
+
})))))));
|
|
151
184
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
export interface IAdaptableLoadingScreenProps
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface IAdaptableLoadingScreenProps {
|
|
3
3
|
showLoadingScreen: boolean;
|
|
4
|
+
loadingScreenDelay?: number;
|
|
5
|
+
loadingScreenTitle?: string;
|
|
6
|
+
loadingScreenText?: string;
|
|
4
7
|
onClose?: () => {};
|
|
5
8
|
}
|
|
6
|
-
export declare
|
|
7
|
-
render(): JSX.Element;
|
|
8
|
-
}
|
|
9
|
+
export declare function AdaptableLoadingScreen(props: IAdaptableLoadingScreenProps): JSX.Element;
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import Dialog from '../../../components/Dialog';
|
|
3
3
|
import { Box } from 'rebass';
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
export function AdaptableLoadingScreen(props) {
|
|
5
|
+
const { showLoadingScreen, loadingScreenDelay, loadingScreenTitle, loadingScreenText } = props;
|
|
6
|
+
const [delayElapsed, setDelayElapsed] = React.useState(typeof loadingScreenDelay === 'number' ? false : showLoadingScreen);
|
|
7
|
+
React.useEffect(() => {
|
|
8
|
+
if (typeof loadingScreenDelay === 'number') {
|
|
9
|
+
const timeoutId = setTimeout(() => {
|
|
10
|
+
setDelayElapsed(true);
|
|
11
|
+
}, loadingScreenDelay);
|
|
12
|
+
return () => {
|
|
13
|
+
clearTimeout(timeoutId);
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}, [loadingScreenDelay]);
|
|
17
|
+
return (React.createElement(Dialog, { modal: true, isOpen: delayElapsed ? showLoadingScreen : false, onDismiss: props.onClose, showCloseButton: false, className: "ab-LoadingScreen", style: {
|
|
18
|
+
minHeight: 'auto',
|
|
19
|
+
} },
|
|
20
|
+
React.createElement(Box, { padding: 3 },
|
|
21
|
+
React.createElement("h4", null, loadingScreenTitle !== null && loadingScreenTitle !== void 0 ? loadingScreenTitle : 'Initialising Grid'),
|
|
22
|
+
React.createElement("p", null, loadingScreenText !== null && loadingScreenText !== void 0 ? loadingScreenText : 'Retrieving your settings and setting up the grid...'))));
|
|
13
23
|
}
|
|
@@ -12,7 +12,7 @@ export const showToast = (props) => {
|
|
|
12
12
|
});
|
|
13
13
|
const adaptableOptions = props.api.optionsApi.getAdaptableOptions();
|
|
14
14
|
const toastProps = ObjectFactory.CreateToastOptions(adaptableOptions.notificationsOptions, {
|
|
15
|
-
containerId: adaptableOptions.adaptableId
|
|
15
|
+
containerId: `Toastify-${adaptableOptions.adaptableId}`,
|
|
16
16
|
onClose: () => {
|
|
17
17
|
off();
|
|
18
18
|
},
|
|
@@ -23,7 +23,7 @@ const ConnectedNoteEditor = ({ enableEditMode }) => {
|
|
|
23
23
|
api.notesApi.updateNoteText(value, note);
|
|
24
24
|
}, [note]);
|
|
25
25
|
return (React.createElement(Flex, { onClick: () => enableEditMode(), flexDirection: "column", className: "ab-NotesPopup" },
|
|
26
|
-
React.createElement(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.
|
|
26
|
+
React.createElement(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) })));
|
|
27
27
|
};
|
|
28
28
|
export const GridCellPopup = (props) => {
|
|
29
29
|
const { api } = 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>>;
|
|
@@ -2,13 +2,16 @@ import { GridFilterWindowPopup } from '../../../GridFilter/GridFilterWindowPopup
|
|
|
2
2
|
import { PivotDetailsPopoup } from '../../../Layout/PivotDetailsPopoup';
|
|
3
3
|
import { ExportTablePopup } from '../../../Export/ExportTablePopup';
|
|
4
4
|
import { ThemeEditorWindow } from '../../../Theme/ThemeEditorWindow';
|
|
5
|
+
import { TransposedPopup } from '../../../Layout/TransposedPopup';
|
|
5
6
|
export const WINDOW_GRID_FILTER_EDITOR = 'WINDOW_GRID_FILTER_EDITOR';
|
|
6
7
|
export const SHOW_PIVOT_COLUMN_DETAILS = 'SHOW_PIVOT_COLUMN_DETAILS';
|
|
7
8
|
export const SHOW_EXPORT_TABLE = 'SHOW_EXPORT_TABLE';
|
|
8
9
|
export const SHOW_THEME_EDITOR = 'SHOW_THEME_EDITOR';
|
|
10
|
+
export const WINDOW_SHOW_TRANSPOSED_VIEW = 'WINDOW_SHOW_TRANSPOSED_VIEW';
|
|
9
11
|
export const windowFactory = {
|
|
10
12
|
[WINDOW_GRID_FILTER_EDITOR]: GridFilterWindowPopup,
|
|
11
13
|
[SHOW_PIVOT_COLUMN_DETAILS]: PivotDetailsPopoup,
|
|
12
14
|
[SHOW_EXPORT_TABLE]: ExportTablePopup,
|
|
13
15
|
[SHOW_THEME_EDITOR]: ThemeEditorWindow,
|
|
16
|
+
[WINDOW_SHOW_TRANSPOSED_VIEW]: TransposedPopup,
|
|
14
17
|
};
|
|
@@ -9,7 +9,7 @@ export const PermittedValuesSelector = function (props) {
|
|
|
9
9
|
const [filter, setFilter] = React.useState('');
|
|
10
10
|
const columnType = React.useMemo(() => {
|
|
11
11
|
return adaptable.api.columnApi.getColumnDataTypeForColumnId(props.columnId);
|
|
12
|
-
}, []);
|
|
12
|
+
}, [props.columnId]);
|
|
13
13
|
React.useEffect(() => {
|
|
14
14
|
if (!props.columnId) {
|
|
15
15
|
setIsLoading(false);
|
|
@@ -33,7 +33,7 @@ export class CustomSortSummaryComponent extends React.Component {
|
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
35
|
const customSort = this.props.CustomSorts.find((c) => c.ColumnId == this.props.summarisedColumn.columnId);
|
|
36
|
-
const columnSortComparer = this.props.api.customSortApi.internalApi.getCustomSortComparer(this.props.summarisedColumn);
|
|
36
|
+
const columnSortComparer = this.props.api.customSortApi.internalApi.getCustomSortComparer(this.props.summarisedColumn.columnId);
|
|
37
37
|
let noCustomSort = customSort == null && columnSortComparer == null;
|
|
38
38
|
let customSortRow;
|
|
39
39
|
if (!this.props.summarisedColumn.sortable) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useAdaptable } from '../AdaptableContext';
|
|
3
2
|
import { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { useAdaptable } from '../AdaptableContext';
|
|
4
4
|
import usePrevious from '../../components/utils/usePrevious';
|
|
5
5
|
import { DataChangeHistoryModuleId } from '../../Utilities/Constants/ModuleConstants';
|
|
6
6
|
import { buildActionColumnButton } from './buildActionColumnButton';
|
|
7
|
+
import { AdaptableAgGrid } from '../../agGrid/AdaptableAgGrid';
|
|
7
8
|
export const DataChangeHistoryGrid = (props) => {
|
|
8
9
|
const { changeHistoryLog, adaptableContainerId, agGridContainerId, onUndoChange, onClearRow } = props;
|
|
9
10
|
const mainAdaptableInstance = useAdaptable();
|
|
@@ -20,13 +21,12 @@ export const DataChangeHistoryGrid = (props) => {
|
|
|
20
21
|
const gridOptions = buildGridOptions(mainAdaptableInstance, changeHistoryLog);
|
|
21
22
|
const adaptableOptions = buildAdaptableOptions(mainAdaptableInstance, gridOptions, adaptableContainerId, agGridContainerId, undoChangeEnabled, onUndoChange, onClearRow);
|
|
22
23
|
const modules = mainAdaptableInstance.getAgGridRegisteredModules();
|
|
23
|
-
const
|
|
24
|
+
const dataChangeHistoryAdaptableApi = await AdaptableAgGrid._initInternal({
|
|
25
|
+
variant: 'vanilla',
|
|
26
|
+
adaptableOptions,
|
|
24
27
|
gridOptions,
|
|
25
|
-
modules
|
|
26
|
-
};
|
|
27
|
-
// to avoid direct dependency to Adaptable.ts and thus creating a circular dependency;
|
|
28
|
-
const adaptableInitFn = Object.getPrototypeOf(mainAdaptableInstance).constructor.init;
|
|
29
|
-
const dataChangeHistoryAdaptableApi = await adaptableInitFn(adaptableOptions, agGridConfig);
|
|
28
|
+
modules,
|
|
29
|
+
});
|
|
30
30
|
setAdaptableApi(dataChangeHistoryAdaptableApi);
|
|
31
31
|
};
|
|
32
32
|
initializeAdaptableGrid();
|
|
@@ -65,7 +65,7 @@ export const DataChangeHistoryGrid = (props) => {
|
|
|
65
65
|
// 2. this UI will be reimplemented with Infinite Table anyway
|
|
66
66
|
const addedRows = mapChangeHistoryRowData(addedChangeHistoryLogs, mainAdaptableInstance);
|
|
67
67
|
const removedRows = mapChangeHistoryRowData(removedChangeHistoryLogs, mainAdaptableInstance);
|
|
68
|
-
adaptableApi.
|
|
68
|
+
adaptableApi.agGridApi.applyTransactionAsync({
|
|
69
69
|
add: addedRows,
|
|
70
70
|
remove: removedRows,
|
|
71
71
|
});
|
|
@@ -23,6 +23,7 @@ const QueryViewPanelComponent = (props) => {
|
|
|
23
23
|
const disabled = isReadOnly || isSuspended || gridFilterAccessLevel === 'ReadOnly';
|
|
24
24
|
const handleEnter = (e) => {
|
|
25
25
|
if (e.key === 'Enter') {
|
|
26
|
+
e.preventDefault();
|
|
26
27
|
runQuery();
|
|
27
28
|
}
|
|
28
29
|
};
|
|
@@ -44,8 +45,9 @@ const QueryViewPanelComponent = (props) => {
|
|
|
44
45
|
fontFamily: 'monospace',
|
|
45
46
|
fontSize: 12,
|
|
46
47
|
maxHeight: 52,
|
|
47
|
-
height:
|
|
48
|
-
paddingTop:
|
|
48
|
+
height: '100%',
|
|
49
|
+
paddingTop: 6,
|
|
50
|
+
overflow: 'hidden',
|
|
49
51
|
zIndex: 100,
|
|
50
52
|
}, placehoder: "Grid Filter", onChange: (x) => setExpression(x.target.value), value: expression })),
|
|
51
53
|
isExpressionValid && (React.createElement(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 })),
|
|
@@ -71,11 +73,13 @@ const QueryViewPanelComponent = (props) => {
|
|
|
71
73
|
maxHeight: 60,
|
|
72
74
|
paddingTop: 7,
|
|
73
75
|
zIndex: 100,
|
|
76
|
+
height: '100%',
|
|
77
|
+
overflow: 'hidden',
|
|
74
78
|
}, placehoder: "Grid Filter", onChange: (x) => setExpression(x.target.value), value: expression }))));
|
|
75
79
|
};
|
|
76
80
|
const saveButton = (React.createElement(ButtonSave, { onClick: () => saveQuery(), tooltip: "Save as Named Query", accessLevel: namedQueryModuleAccessLevel, disabled: disabled || !isExpressionValid || isExpressionNamedQuery || expression == '', variant: "text", tone: "neutral", marginRight: 1 }));
|
|
77
81
|
const suspendButton = (React.createElement(ButtonPause, { onClick: () => suspendGridFilter(), tooltip: "Suspend Grid Filter", accessLevel: gridFilterAccessLevel, disabled: disabled || !isExpressionValid, variant: "text", tone: "neutral", marginRight: 1 }));
|
|
78
|
-
const unSuspendButton = (React.createElement(ButtonUnsuspend, { onClick: () => unSuspendGridFilter(), tooltip: "Unsuspend Grid Filter", accessLevel: gridFilterAccessLevel, disabled:
|
|
82
|
+
const unSuspendButton = (React.createElement(ButtonUnsuspend, { onClick: () => unSuspendGridFilter(), tooltip: "Unsuspend Grid Filter", accessLevel: gridFilterAccessLevel, disabled: !isExpressionValid, variant: "text", tone: "neutral", marginRight: 1 }));
|
|
79
83
|
const namedQuerySelector = (React.createElement(NamedQuerySelector, { namedQueries: namedQueries, cachedQueries: cachedQueries, currentQuery: gridFilter === null || gridFilter === void 0 ? void 0 : gridFilter.Expression, onSelect: (query) => runQuery(query), setGridFilterExpression: (query) => setGridFilterExpression(query) }));
|
|
80
84
|
const columnsDropdown = (React.createElement(DropdownButton, { disabled: disabled, accessLevel: gridFilterAccessLevel, variant: "text", items: availableColumns, marginRight: 1, tooltip: "Pick Columns" },
|
|
81
85
|
React.createElement(Icon, { name: 'list' })));
|
|
@@ -9,8 +9,8 @@ import { AdaptableObjectCollection } from '../../Components/AdaptableObjectColle
|
|
|
9
9
|
import { AdaptableObjectRow } from '../../Components/AdaptableObjectRow';
|
|
10
10
|
import { PopupPanel } from '../../Components/Popups/AdaptablePopup/PopupPanel';
|
|
11
11
|
import { AdaptableObjectsSummary } from './AdaptableObjectsSummary';
|
|
12
|
-
import
|
|
13
|
-
const version =
|
|
12
|
+
import { ADAPTABLE_VERSION } from '../../../EnvVars';
|
|
13
|
+
const version = ADAPTABLE_VERSION;
|
|
14
14
|
export const GridInfoPopup = (props) => {
|
|
15
15
|
const CreateGridSummaries = (colItems) => {
|
|
16
16
|
var _a;
|
|
@@ -39,7 +39,6 @@ export const GridInfoPopup = (props) => {
|
|
|
39
39
|
returnRows.push(createReadOnlyColItem(colItems, 'Column Filters', columnFilterDescription));
|
|
40
40
|
returnRows.push(createReadOnlyColItem(colItems, 'Grid Filter', gridFilterExpression));
|
|
41
41
|
returnRows.push(createReadOnlyColItem(colItems, 'All Rows', props.api.gridApi.getRowCount()));
|
|
42
|
-
returnRows.push(createReadOnlyColItem(colItems, 'Visible Rows', props.api.gridApi.getVisibleRowCount()));
|
|
43
42
|
returnRows.push(createReadOnlyColItem(colItems, 'Selected Rows', selectedRowInfo === null || selectedRowInfo === void 0 ? void 0 : selectedRowInfo.gridRows.length));
|
|
44
43
|
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));
|
|
45
44
|
returnRows.push(createReadOnlyColItem(colItems, 'All Columns', props.api.gridApi.getColumnCount()));
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Box, Flex } from 'rebass';
|
|
3
|
+
import FormLayout, { FormRow } from '../../components/FormLayout';
|
|
4
|
+
import Panel from '../../components/Panel';
|
|
5
|
+
import { useAdaptable } from '../AdaptableContext';
|
|
6
|
+
import { ColumnSelector } from '../Components/Selectors/ColumnSelector';
|
|
7
|
+
import { AdaptableAgGrid } from '../../agGrid/AdaptableAgGrid';
|
|
8
|
+
export const TransposedPopup = (props) => {
|
|
9
|
+
const adaptable = useAdaptable();
|
|
10
|
+
const rowNodes = React.useMemo(() => {
|
|
11
|
+
return adaptable.api.gridApi.getAllRowNodes();
|
|
12
|
+
}, [
|
|
13
|
+
// can be later triggered by ticking data
|
|
14
|
+
]);
|
|
15
|
+
const { transposedColumnId, hideTransposedColumn = true } = props.popupProps;
|
|
16
|
+
const primaryKey = adaptable.api.optionsApi.getPrimaryKey();
|
|
17
|
+
// Thist must be qunique
|
|
18
|
+
const transposeByColumnId = primaryKey;
|
|
19
|
+
// Only used to show nice values a the top of the grid, istead on the value
|
|
20
|
+
// of the primarykey
|
|
21
|
+
const [synteticTransposedByColumnId, setSynteticTransposedByColumnId] = React.useState(transposedColumnId !== null && transposedColumnId !== void 0 ? transposedColumnId : primaryKey);
|
|
22
|
+
const columns = React.useMemo(() => {
|
|
23
|
+
// customisable
|
|
24
|
+
return adaptable.api.columnApi.getColumns();
|
|
25
|
+
}, []);
|
|
26
|
+
const adaptableContainerId = 'transposed-adaptable-container';
|
|
27
|
+
const agGridContainerId = 'transposed-adaptable-ag-grid-container';
|
|
28
|
+
/**
|
|
29
|
+
* This is used as first field
|
|
30
|
+
*/
|
|
31
|
+
const transposedFirstColumnField = '_transposed_column_value';
|
|
32
|
+
const transposedFirstColumnHeader = '_transposed_column_header';
|
|
33
|
+
const transposedRowsAndColumns = React.useMemo(() => {
|
|
34
|
+
/**
|
|
35
|
+
* transposed column values become primaryKey of the new tarnsposed rows
|
|
36
|
+
* we build row by row, might be easer
|
|
37
|
+
*/
|
|
38
|
+
const transposedColumns = [];
|
|
39
|
+
const transposedRows = [];
|
|
40
|
+
for (const row of rowNodes) {
|
|
41
|
+
// we force the col-ids to be strings, easer to work with
|
|
42
|
+
//row[transposeByColumnId] + '';
|
|
43
|
+
const colId = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, transposeByColumnId) + '';
|
|
44
|
+
//row[synteticTransposedByColumnId] + '';
|
|
45
|
+
const header = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, synteticTransposedByColumnId) + '';
|
|
46
|
+
transposedColumns.push({
|
|
47
|
+
colId,
|
|
48
|
+
header,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
for (const column of columns) {
|
|
52
|
+
/**
|
|
53
|
+
* We can hide the transposed column, if we want
|
|
54
|
+
*/
|
|
55
|
+
if (hideTransposedColumn && column.columnId === synteticTransposedByColumnId) {
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
const transposedRow = {
|
|
59
|
+
// [transposed-by-column-id]: [other column id],
|
|
60
|
+
// the value can be set to friendlyname
|
|
61
|
+
[transposedFirstColumnField]: column.columnId,
|
|
62
|
+
[transposedFirstColumnHeader]: column.friendlyName,
|
|
63
|
+
};
|
|
64
|
+
for (let row of rowNodes) {
|
|
65
|
+
// [transposed-by-column-value[n]]: [other column value[n]]
|
|
66
|
+
const key = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, transposeByColumnId);
|
|
67
|
+
// row[column.field]
|
|
68
|
+
let value = adaptable.api.gridApi.getDisplayValueFromRowNode(row, column.columnId);
|
|
69
|
+
if (value instanceof Date) {
|
|
70
|
+
value = value.toLocaleString();
|
|
71
|
+
}
|
|
72
|
+
transposedRow[key] = value;
|
|
73
|
+
}
|
|
74
|
+
transposedRows.push(transposedRow);
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
transposedColumns,
|
|
78
|
+
transposedRows,
|
|
79
|
+
};
|
|
80
|
+
}, [rowNodes, primaryKey, synteticTransposedByColumnId]);
|
|
81
|
+
React.useEffect(() => {
|
|
82
|
+
// Mounting in an effect, so the nodes are rendered/available
|
|
83
|
+
const hostAdaptableOptions = adaptable.adaptableOptions;
|
|
84
|
+
const adaptableOptions = {
|
|
85
|
+
primaryKey: transposedFirstColumnField,
|
|
86
|
+
licenseKey: hostAdaptableOptions.licenseKey,
|
|
87
|
+
userName: `${hostAdaptableOptions.userName}`,
|
|
88
|
+
adaptableId: `${hostAdaptableOptions.adaptableId}::TransposedView`,
|
|
89
|
+
containerOptions: {
|
|
90
|
+
adaptableContainer: adaptableContainerId,
|
|
91
|
+
agGridContainer: agGridContainerId,
|
|
92
|
+
},
|
|
93
|
+
entitlementOptions: {
|
|
94
|
+
defaultAccessLevel: 'Hidden',
|
|
95
|
+
},
|
|
96
|
+
layoutOptions: {
|
|
97
|
+
createDefaultLayout: false,
|
|
98
|
+
autoSizeColumnsInLayout: true,
|
|
99
|
+
},
|
|
100
|
+
predefinedConfig: {
|
|
101
|
+
Layout: {
|
|
102
|
+
Revision: Date.now(),
|
|
103
|
+
CurrentLayout: 'TransposedView',
|
|
104
|
+
Layouts: [
|
|
105
|
+
{
|
|
106
|
+
Name: 'TransposedView',
|
|
107
|
+
Columns: [
|
|
108
|
+
transposedFirstColumnHeader,
|
|
109
|
+
...transposedRowsAndColumns.transposedColumns.map((c) => c.colId),
|
|
110
|
+
],
|
|
111
|
+
PinnedColumnsMap: {
|
|
112
|
+
[transposedFirstColumnHeader]: 'left',
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
Theme: {
|
|
118
|
+
CurrentTheme: adaptable.api.themeApi.getCurrentTheme(),
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
const firstColumn = {
|
|
123
|
+
field: transposedFirstColumnHeader,
|
|
124
|
+
headerName: adaptable.api.columnApi.getFriendlyNameForColumnId(synteticTransposedByColumnId),
|
|
125
|
+
};
|
|
126
|
+
const agGridOptions = {
|
|
127
|
+
suppressLoadingOverlay: true,
|
|
128
|
+
defaultColDef: {
|
|
129
|
+
floatingFilter: false,
|
|
130
|
+
filter: false,
|
|
131
|
+
sortable: true,
|
|
132
|
+
resizable: true,
|
|
133
|
+
enableRowGroup: false,
|
|
134
|
+
editable: false,
|
|
135
|
+
enablePivot: false,
|
|
136
|
+
enableValue: false,
|
|
137
|
+
lockPinned: true,
|
|
138
|
+
menuTabs: [],
|
|
139
|
+
width: 120,
|
|
140
|
+
},
|
|
141
|
+
columnDefs: [
|
|
142
|
+
{
|
|
143
|
+
field: transposedFirstColumnField,
|
|
144
|
+
hide: true,
|
|
145
|
+
},
|
|
146
|
+
firstColumn,
|
|
147
|
+
...transposedRowsAndColumns.transposedColumns.map((col) => {
|
|
148
|
+
return {
|
|
149
|
+
field: col.colId,
|
|
150
|
+
type: null,
|
|
151
|
+
headerName: col.header,
|
|
152
|
+
};
|
|
153
|
+
}),
|
|
154
|
+
],
|
|
155
|
+
rowData: transposedRowsAndColumns.transposedRows,
|
|
156
|
+
sideBar: false,
|
|
157
|
+
};
|
|
158
|
+
const modules = adaptable.getAgGridRegisteredModules();
|
|
159
|
+
let transposedAdaptableApi;
|
|
160
|
+
(async () => {
|
|
161
|
+
transposedAdaptableApi = await AdaptableAgGrid._initInternal({
|
|
162
|
+
variant: 'vanilla',
|
|
163
|
+
adaptableOptions,
|
|
164
|
+
gridOptions: agGridOptions,
|
|
165
|
+
modules,
|
|
166
|
+
});
|
|
167
|
+
adaptable.api.eventApi.on('ThemeChanged', (event) => {
|
|
168
|
+
transposedAdaptableApi.themeApi.loadTheme(typeof event.theme === 'object' ? event.theme.Name : event.theme);
|
|
169
|
+
});
|
|
170
|
+
})();
|
|
171
|
+
return () => {
|
|
172
|
+
if (transposedAdaptableApi) {
|
|
173
|
+
transposedAdaptableApi.destroy();
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
}, [synteticTransposedByColumnId]);
|
|
177
|
+
/**
|
|
178
|
+
* Need to get all data, manualy pivot the grid using the primary key.
|
|
179
|
+
*
|
|
180
|
+
* 1. get the data, and pivot using the primary key
|
|
181
|
+
* 2. create the col definitios, a col definition for each row
|
|
182
|
+
* 3. create the grid
|
|
183
|
+
*/
|
|
184
|
+
return (React.createElement(Flex, { flexDirection: "column", width: "100%", height: "100%" },
|
|
185
|
+
React.createElement(Panel, null,
|
|
186
|
+
React.createElement(FormLayout, null,
|
|
187
|
+
React.createElement(FormRow, { label: "Elevated Column" },
|
|
188
|
+
React.createElement(ColumnSelector, { value: synteticTransposedByColumnId, onChange: (colId) => {
|
|
189
|
+
setSynteticTransposedByColumnId(colId);
|
|
190
|
+
} })))),
|
|
191
|
+
React.createElement(Flex, { height: "100%" },
|
|
192
|
+
React.createElement(Box, { id: "transposed-adaptable-container" }),
|
|
193
|
+
React.createElement(Box, { height: "100%", width: "100%", id: "transposed-adaptable-ag-grid-container" }))));
|
|
194
|
+
};
|
|
@@ -34,7 +34,7 @@ export const LayoutWizard = (props) => {
|
|
|
34
34
|
}
|
|
35
35
|
if (preparedLayout.SuppressAggFuncInHeader === undefined) {
|
|
36
36
|
preparedLayout.SuppressAggFuncInHeader =
|
|
37
|
-
!!adaptable.
|
|
37
|
+
!!adaptable.agGridAdapter.initialGridOptions.suppressAggFuncInHeader;
|
|
38
38
|
}
|
|
39
39
|
return preparedLayout;
|
|
40
40
|
});
|