@adaptabletools/adaptable 18.1.14 → 19.0.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -5
- package/src/AdaptableOptions/AlertOptions.d.ts +2 -1
- package/src/AdaptableOptions/ChartingOptions.d.ts +5 -1
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +5 -1
- package/src/AdaptableOptions/DashboardOptions.d.ts +5 -1
- package/src/AdaptableOptions/FlashingCellOptions.d.ts +5 -1
- package/src/AdaptableOptions/LayoutOptions.d.ts +5 -1
- package/src/AdaptableOptions/NotificationsOptions.d.ts +6 -2
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +5 -1
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
- package/src/Api/ChartingApi.d.ts +2 -2
- package/src/Api/ColumnApi.d.ts +6 -0
- package/src/Api/ConfigApi.d.ts +22 -2
- package/src/Api/Events/LiveDataChanged.d.ts +1 -1
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ChartingApiImpl.js +2 -2
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnApiImpl.js +3 -0
- package/src/Api/Implementation/ConfigApiImpl.d.ts +4 -1
- package/src/Api/Implementation/ConfigApiImpl.js +16 -1
- package/src/Api/Implementation/EntitlementApiImpl.d.ts +4 -1
- package/src/Api/Implementation/EntitlementApiImpl.js +31 -6
- package/src/Api/Implementation/ExportApiImpl.js +5 -7
- package/src/Api/Implementation/GridApiImpl.js +1 -1
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +61 -0
- package/src/Api/Implementation/TeamSharingApiImpl.js +2 -6
- package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -6
- package/src/Api/Internal/AdaptableInternalApi.js +5 -11
- package/src/Api/Internal/EntitlementInternalApi.d.ts +4 -0
- package/src/Api/Internal/EntitlementInternalApi.js +11 -0
- package/src/Api/Internal/ExportInternalApi.d.ts +33 -8
- package/src/Api/Internal/ExportInternalApi.js +576 -5
- package/src/Api/Internal/NamedQueryInternalApi.d.ts +0 -1
- package/src/Api/Internal/NamedQueryInternalApi.js +0 -4
- package/src/Api/LayoutApi.d.ts +7 -0
- package/src/PredefinedConfig/AdaptableState.d.ts +0 -5
- package/src/PredefinedConfig/Common/ExtendedLayoutInfo.d.ts +12 -0
- package/src/PredefinedConfig/Common/FilterActionOnDataChange.d.ts +2 -1
- package/src/PredefinedConfig/StyledColumnState.d.ts +1 -1
- package/src/Redux/ActionsReducers/GridRedux.d.ts +6 -6
- package/src/Redux/ActionsReducers/GridRedux.js +8 -8
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +3 -3
- package/src/Redux/ActionsReducers/LayoutRedux.js +9 -9
- package/src/Redux/ActionsReducers/NamedQueryRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/NamedQueryRedux.js +1 -1
- package/src/Redux/ActionsReducers/PluginsRedux.d.ts +2 -2
- package/src/Redux/ActionsReducers/PluginsRedux.js +2 -2
- package/src/Redux/Store/AdaptableReduxMerger.js +3 -3
- package/src/Redux/Store/AdaptableStore.js +2 -4
- package/src/Strategy/AdaptableModuleBase.js +1 -2
- package/src/Strategy/ColumnFilterModule.js +1 -2
- package/src/Strategy/ExportModule.js +17 -44
- package/src/Strategy/FlashingCellModule.js +2 -10
- package/src/Strategy/ScheduleModule.js +4 -6
- package/src/Strategy/SmartEditModule.js +1 -7
- package/src/Strategy/TeamSharingModule.js +2 -2
- package/src/Strategy/Utilities/Export/getExportColumnsViewItems.js +1 -1
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +1 -3
- package/src/Utilities/Constants/FilterConstants.d.ts +10 -0
- package/src/Utilities/Constants/FilterConstants.js +8 -0
- package/src/Utilities/Constants/GeneralConstants.d.ts +41 -4
- package/src/Utilities/Constants/GeneralConstants.js +42 -3
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +0 -2
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +0 -5
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +14 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +65 -0
- package/src/Utilities/Extensions/EnumExtensions.d.ts +0 -4
- package/src/Utilities/Extensions/EnumExtensions.js +2 -12
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +4 -10
- package/src/Utilities/Helpers/AdaptableHelper.js +7 -59
- package/src/Utilities/Helpers/FormatHelper.d.ts +9 -0
- package/src/Utilities/Helpers/FormatHelper.js +26 -14
- package/src/Utilities/Helpers/Helper.d.ts +0 -10
- package/src/Utilities/Helpers/Helper.js +0 -70
- package/src/Utilities/Services/ChartingService.d.ts +2 -2
- package/src/Utilities/Services/ChartingService.js +5 -11
- package/src/Utilities/Services/ModuleService.js +35 -31
- package/src/Utilities/Services/RowEditService.js +1 -6
- package/src/Utilities/Services/RowSummaryService.js +2 -2
- package/src/Utilities/Services/ValidationService.js +2 -16
- package/src/View/Alert/AlertEmptyView.js +1 -2
- package/src/View/Charting/ChartingStatusBarPopover.js +1 -2
- package/src/View/Charting/useChartingElements.js +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +2 -6
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +2 -4
- package/src/View/Components/FilterForm/QuickFilterForm.js +2 -12
- package/src/View/Components/ModuleValueSelector/index.js +2 -2
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -5
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -3
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +2 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -7
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +6 -12
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +3 -23
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +4 -5
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -3
- package/src/View/Components/ValueSelector/index.js +2 -2
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +2 -2
- package/src/View/Dashboard/CustomDashboardButton.js +1 -6
- package/src/View/Dashboard/CustomToolbar.js +2 -9
- package/src/View/Dashboard/Dashboard.js +2 -4
- package/src/View/Dashboard/DashboardPopup.js +1 -3
- package/src/View/Dashboard/DashboardToolbarFactory.js +1 -2
- package/src/View/Dashboard/PinnedToolbarsSelector.js +1 -2
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -3
- package/src/View/Export/ExportViewPanel.js +2 -4
- package/src/View/Export/Wizard/ReportSummaryWizard.js +2 -6
- package/src/View/GridFilter/GridFilterExpressionEditor.js +2 -2
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +2 -6
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/PivotDetailsPopoup.js +1 -7
- package/src/View/Layout/SaveLayoutButton.js +1 -3
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +2 -2
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +2 -2
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +2 -2
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +2 -2
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +2 -2
- package/src/View/Layout/Wizard/sections/SortSection.js +2 -2
- package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +3 -3
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
- package/src/View/SystemStatus/SystemStatusPopup.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +2 -2
- package/src/agGrid/ActionColumnRenderer.js +8 -22
- package/src/agGrid/AdaptableAgGrid.d.ts +6 -7
- package/src/agGrid/AdaptableAgGrid.js +165 -146
- package/src/agGrid/AgGridAdapter.d.ts +0 -1
- package/src/agGrid/AgGridAdapter.js +8 -11
- package/src/agGrid/AgGridColumnAdapter.d.ts +3 -1
- package/src/agGrid/AgGridColumnAdapter.js +40 -14
- package/src/agGrid/BadgeRenderer.js +4 -22
- package/src/agGrid/FloatingFilterWrapper.js +21 -0
- package/src/agGrid/buildSortedColumnStateForLayout.d.ts +1 -1
- package/src/agGrid/buildSortedColumnStateForLayout.js +2 -2
- package/src/agGrid/defaultAdaptableOptions.js +35 -30
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -15
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +89 -8
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +10 -9
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/Redux/ActionsReducers/QueryRedux.d.ts +0 -10
- package/src/Redux/ActionsReducers/QueryRedux.js +0 -20
- package/src/Utilities/Helpers/FormatContentHelper.d.ts +0 -22
- package/src/Utilities/Helpers/FormatContentHelper.js +0 -34
- package/src/Utilities/Services/EntitlementService.d.ts +0 -14
- package/src/Utilities/Services/EntitlementService.js +0 -63
- package/src/Utilities/Services/Interface/IEntitlementService.d.ts +0 -10
- package/src/Utilities/Services/Interface/IReportService.d.ts +0 -27
- package/src/Utilities/Services/Interface/IReportService.js +0 -1
- package/src/Utilities/Services/ReportService.d.ts +0 -41
- package/src/Utilities/Services/ReportService.js +0 -603
- package/src/Utilities/isAdaptableObject.d.ts +0 -2
- package/src/Utilities/isAdaptableObject.js +0 -4
- package/src/Utilities/reorder.d.ts +0 -1
- package/src/Utilities/reorder.js +0 -13
- package/src/Utilities/sortWithOrder.d.ts +0 -11
- package/src/Utilities/sortWithOrder.js +0 -50
- /package/src/{Utilities/Services/Interface/IEntitlementService.js → PredefinedConfig/Common/ExtendedLayoutInfo.js} +0 -0
|
@@ -99,15 +99,8 @@ export const CustomToolbarWrapper = (props) => {
|
|
|
99
99
|
const { api } = useAdaptable();
|
|
100
100
|
return (React.createElement(PanelDashboard, { headerText: props.customToolbar.title ? props.customToolbar.title : '', showConfigureButton: props.customToolbar.showConfigureButton != null &&
|
|
101
101
|
props.customToolbar.showConfigureButton == true, showCloseButton: props.customToolbar.showCloseButton != null && props.customToolbar.showCloseButton == true, onConfigure: () => {
|
|
102
|
-
const customToolbarConfiguredInfo = {
|
|
103
|
-
adaptableApi: api,
|
|
104
|
-
customToolbar: props.customToolbar,
|
|
105
|
-
userName: api.optionsApi.getUserName(),
|
|
106
|
-
adaptableId: api.optionsApi.getAdaptableId(),
|
|
107
|
-
};
|
|
102
|
+
const customToolbarConfiguredInfo = Object.assign(Object.assign({}, api.internalApi.buildBaseContext()), { customToolbar: props.customToolbar });
|
|
108
103
|
api.eventApi.emit('CustomToolbarConfigured', customToolbarConfiguredInfo);
|
|
109
|
-
}, accessLevel: api.
|
|
110
|
-
.getEntitlementService()
|
|
111
|
-
.getEntitlementAccessLevelForModule('Dashboard') },
|
|
104
|
+
}, accessLevel: api.entitlementApi.getEntitlementAccessLevelForModule('Dashboard') },
|
|
112
105
|
React.createElement(CustomToolbarCmp, Object.assign({}, props))));
|
|
113
106
|
};
|
|
@@ -21,9 +21,7 @@ import { PinnedDashboard } from './PinnedDashboard';
|
|
|
21
21
|
import { ModuleToolbarWrapper } from './ModuleToolbarWrapper';
|
|
22
22
|
const DashboardComponent = (props) => {
|
|
23
23
|
const [searchText, search] = useQuickSearchDebounced(props);
|
|
24
|
-
const dashboardAccessLevel = props.api.
|
|
25
|
-
.getEntitlementService()
|
|
26
|
-
.getEntitlementAccessLevelForModule('Dashboard');
|
|
24
|
+
const dashboardAccessLevel = props.api.entitlementApi.getEntitlementAccessLevelForModule('Dashboard');
|
|
27
25
|
const renderTab = (tab) => {
|
|
28
26
|
const visibleToolbarNames = tab.Toolbars.filter((vt) => vt);
|
|
29
27
|
const customToolbars = props.api.dashboardApi.getCustomToolbars();
|
|
@@ -60,7 +58,7 @@ const DashboardComponent = (props) => {
|
|
|
60
58
|
let shortcuts = null;
|
|
61
59
|
const alwaysShowInDashboard = props.api.optionsApi.getSettingsPanelOptions().alwaysShowInDashboard;
|
|
62
60
|
const shouldAddSettingsPanel = alwaysShowInDashboard &&
|
|
63
|
-
!props.api.
|
|
61
|
+
!props.api.entitlementApi.isModuleHiddenEntitlement('SettingsPanel');
|
|
64
62
|
if (shouldAddSettingsPanel && !shortcutsArray.includes('SettingsPanel')) {
|
|
65
63
|
shortcutsArray.push('SettingsPanel');
|
|
66
64
|
}
|
|
@@ -53,9 +53,7 @@ class DashboardPopupComponent extends React.Component {
|
|
|
53
53
|
});
|
|
54
54
|
const allModuleButtons = this.props.GridState.SettingPanelModuleMenuItems.map((x) => x.module);
|
|
55
55
|
const baseClassName = 'ab-Dashboard-Popup';
|
|
56
|
-
const dashboardAccessLevel = this.props.api.
|
|
57
|
-
.getEntitlementService()
|
|
58
|
-
.getEntitlementAccessLevelForModule('Dashboard');
|
|
56
|
+
const dashboardAccessLevel = this.props.api.entitlementApi.getEntitlementAccessLevelForModule('Dashboard');
|
|
59
57
|
const areDashboardSettingsVisible = dashboardAccessLevel == 'Full' || dashboardAccessLevel == 'ReadOnly';
|
|
60
58
|
const isDashboardDisabled = dashboardAccessLevel === 'ReadOnly';
|
|
61
59
|
const isModuleCheckboxDisabled = (module) => {
|
|
@@ -9,8 +9,7 @@ const SystemDashboardToolbarFactory = (props) => {
|
|
|
9
9
|
const moduleInfo = adaptable.api.internalApi
|
|
10
10
|
.getModuleService()
|
|
11
11
|
.getModuleInfoByModule(props.toolbarName);
|
|
12
|
-
const accessLevel = adaptable.api.
|
|
13
|
-
.getEntitlementService()
|
|
12
|
+
const accessLevel = adaptable.api.entitlementApi
|
|
14
13
|
.getEntitlementAccessLevelForModule(props.toolbarName);
|
|
15
14
|
const moduleToolbarView = AdaptableViewPanelFactory.get(props.toolbarName);
|
|
16
15
|
if (!moduleToolbarView) {
|
|
@@ -5,8 +5,7 @@ import { DashboardSetPinnedToolbars } from '../../Redux/ActionsReducers/Dashboar
|
|
|
5
5
|
import { useAdaptable } from '../AdaptableContext';
|
|
6
6
|
export const PinnedToolbarsSelector = (props) => {
|
|
7
7
|
const { api } = useAdaptable();
|
|
8
|
-
const dashboardAccessLevel = api.
|
|
9
|
-
.getEntitlementService()
|
|
8
|
+
const dashboardAccessLevel = api.entitlementApi
|
|
10
9
|
.getEntitlementAccessLevelForModule('Dashboard');
|
|
11
10
|
const isDashboardDisabled = dashboardAccessLevel === 'ReadOnly';
|
|
12
11
|
const dashboardState = useSelector((state) => state.Dashboard);
|
|
@@ -11,9 +11,7 @@ export const DataChangeHistoryGrid = (props) => {
|
|
|
11
11
|
const [_adaptableApi, setAdaptableApi] = useState(null);
|
|
12
12
|
const adaptableApiRef = useRef(null);
|
|
13
13
|
adaptableApiRef.current = _adaptableApi;
|
|
14
|
-
const undoChangeEnabled = mainAdaptableInstance.api.
|
|
15
|
-
.getEntitlementService()
|
|
16
|
-
.isModuleFullEntitlement(DataChangeHistoryModuleId);
|
|
14
|
+
const undoChangeEnabled = mainAdaptableInstance.api.entitlementApi.isModuleFullEntitlement(DataChangeHistoryModuleId);
|
|
17
15
|
const previousChangeHistoryLog = usePrevious(changeHistoryLog, changeHistoryLog);
|
|
18
16
|
// initialize Adaptable grid
|
|
19
17
|
useEffect(() => {
|
|
@@ -63,7 +63,7 @@ class ExportViewPanelComponent extends React.Component {
|
|
|
63
63
|
currentDestination = undefined;
|
|
64
64
|
currentDestinationId = undefined;
|
|
65
65
|
}
|
|
66
|
-
let accessLevel = AdaptableHelper.
|
|
66
|
+
let accessLevel = AdaptableHelper.getAccessLevelForObject(currentReport, this.props.accessLevel);
|
|
67
67
|
let deleteMessage = "Are you sure you want to delete '";
|
|
68
68
|
if (currentReport != null) {
|
|
69
69
|
deleteMessage = deleteMessage + currentReport.Name + "'?";
|
|
@@ -82,9 +82,7 @@ class ExportViewPanelComponent extends React.Component {
|
|
|
82
82
|
React.createElement(ButtonEdit, { onClick: () => this.props.onEditReport(this.props.moduleInfo.Popup), tooltip: "Edit Report", className: `ab-${elementType}__Export__edit`, disabled: currentReport == null || this.props.api.exportApi.isExternalReport(currentReport), accessLevel: accessLevel }),
|
|
83
83
|
React.createElement(ButtonNew, { variant: "text", className: `ab-${elementType}__Export__new`, tone: "neutral", children: null, onClick: () => this.props.onNewReport(this.props.moduleInfo.Popup), tooltip: "Create New Report", accessLevel: accessLevel }),
|
|
84
84
|
React.createElement(ButtonDelete, { tooltip: "Delete Report", className: `ab-${elementType}__Export__delete`, disabled: currentReport == null, ConfirmAction: ExportRedux.ReportDelete(currentReport), ConfirmationMsg: deleteMessage, ConfirmationTitle: 'Delete Report', accessLevel: accessLevel }),
|
|
85
|
-
this.props.api.
|
|
86
|
-
.getEntitlementService()
|
|
87
|
-
.isModuleFullEntitlement('Schedule') && (React.createElement(ButtonSchedule, { marginLeft: 1, className: `ab-${elementType}__Export__schedule`, onClick: () => this.onNewReportSchedule(), tooltip: "Schedule", disabled: currentReport == null, accessLevel: this.props.accessLevel })))));
|
|
85
|
+
this.props.api.entitlementApi.isModuleFullEntitlement('Schedule') && (React.createElement(ButtonSchedule, { marginLeft: 1, className: `ab-${elementType}__Export__schedule`, onClick: () => this.onNewReportSchedule(), tooltip: "Schedule", disabled: currentReport == null, accessLevel: this.props.accessLevel })))));
|
|
88
86
|
}
|
|
89
87
|
onSelectedReportChanged(reportName) {
|
|
90
88
|
this.props.onSelectReport(reportName);
|
|
@@ -9,15 +9,11 @@ export class ReportSummaryWizard extends React.Component {
|
|
|
9
9
|
{ Key: 'Name', Value: this.props.data.Name },
|
|
10
10
|
{
|
|
11
11
|
Key: 'Column Scope',
|
|
12
|
-
Value: this.props.api.internalApi
|
|
13
|
-
.getReportService()
|
|
14
|
-
.GetReportColumnScopeLongDescription(this.props.data),
|
|
12
|
+
Value: this.props.api.exportApi.internalApi.getReportColumnScopeLongDescription(this.props.data),
|
|
15
13
|
},
|
|
16
14
|
{
|
|
17
15
|
Key: 'Row Scope',
|
|
18
|
-
Value: this.props.api.internalApi
|
|
19
|
-
.getReportService()
|
|
20
|
-
.GetReportExpressionDescription(this.props.data, this.props.api.columnApi.getColumns()),
|
|
16
|
+
Value: this.props.api.exportApi.internalApi.getReportExpressionDescription(this.props.data, this.props.api.columnApi.getColumns()),
|
|
21
17
|
},
|
|
22
18
|
];
|
|
23
19
|
return (React.createElement(WizardSummaryPage, { KeyValuePairs: keyValuePairs, header: this.props.moduleInfo.FriendlyName }));
|
|
@@ -4,7 +4,7 @@ import { Box, Flex } from 'rebass';
|
|
|
4
4
|
import { ExpressionEditor } from '../../components/ExpressionEditor';
|
|
5
5
|
import { NamedQueryContext, } from '../../components/ExpressionEditor/NamedQueryContext';
|
|
6
6
|
import SimpleButton from '../../components/SimpleButton';
|
|
7
|
-
import * as
|
|
7
|
+
import * as NamedQueryRedux from '../../Redux/ActionsReducers/NamedQueryRedux';
|
|
8
8
|
import { PopupShowForm } from '../../Redux/ActionsReducers/PopupRedux';
|
|
9
9
|
import { GridFilterModuleId } from '../../Utilities/Constants/ModuleConstants';
|
|
10
10
|
import { IsNotNullOrEmpty, IsNullOrEmpty } from '../../Utilities/Extensions/StringExtensions';
|
|
@@ -28,7 +28,7 @@ export const GridFilterExpressionEditor = (props) => {
|
|
|
28
28
|
const onRunQuery = (expression) => {
|
|
29
29
|
api.gridFilterApi.setGridFilterExpression(expression);
|
|
30
30
|
};
|
|
31
|
-
const onAddNamedQuery = (namedQuery) => dispatch(
|
|
31
|
+
const onAddNamedQuery = (namedQuery) => dispatch(NamedQueryRedux.NamedQueryAdd(namedQuery));
|
|
32
32
|
const handleSaveQuery = () => {
|
|
33
33
|
dispatch(PopupShowForm({
|
|
34
34
|
Id: 'save_query_form',
|
|
@@ -80,13 +80,9 @@ export const useGridFilterExpressionEditor = () => {
|
|
|
80
80
|
adaptable.api.gridFilterApi.setGridFilterExpression(newExpression);
|
|
81
81
|
};
|
|
82
82
|
const gridFilterAccessLevel = React.useMemo(() => {
|
|
83
|
-
return adaptable.api.
|
|
84
|
-
.getEntitlementService()
|
|
85
|
-
.getEntitlementAccessLevelForModule(GridFilterModuleId);
|
|
83
|
+
return adaptable.api.entitlementApi.getEntitlementAccessLevelForModule(GridFilterModuleId);
|
|
86
84
|
}, []);
|
|
87
|
-
const namedQueryModuleAccessLevel = adaptable.api.
|
|
88
|
-
.getEntitlementService()
|
|
89
|
-
.getEntitlementAccessLevelForModule(NamedQueryModuleId);
|
|
85
|
+
const namedQueryModuleAccessLevel = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule(NamedQueryModuleId);
|
|
90
86
|
const onShowNamedQueries = (value, popup) => dispatch(PopupRedux.PopupShowScreen(NamedQueryModuleId, popup, {
|
|
91
87
|
action: 'New',
|
|
92
88
|
source: 'Other',
|
|
@@ -19,7 +19,7 @@ class LayoutViewPanelComponent extends React.Component {
|
|
|
19
19
|
// the global access level (Layout Entitlement)
|
|
20
20
|
const cloneAccessLevel = this.props.accessLevel;
|
|
21
21
|
const newAccessLevel = this.props.accessLevel;
|
|
22
|
-
const accessLevel = AdaptableHelper.
|
|
22
|
+
const accessLevel = AdaptableHelper.getAccessLevelForObject(layoutEntity, this.props.accessLevel);
|
|
23
23
|
const isManualSaveLayout = !this.props.api.layoutApi.shouldAutoSaveLayouts();
|
|
24
24
|
const availableLayoutOptions = this.props.Layouts.map((layout, index) => {
|
|
25
25
|
return Object.assign(Object.assign({}, layout), { label: layout.Name, value: layout.Name, onClick: () => this.props.onSelectLayout(layout.Name) });
|
|
@@ -20,13 +20,7 @@ export const PivotDetailsPopoup = (props) => {
|
|
|
20
20
|
const pivotPreviewOptionColumn = (_a = adaptableApi.optionsApi.getLayoutOptions()) === null || _a === void 0 ? void 0 : _a.pivotPreviewColumns;
|
|
21
21
|
let pivotPreviewExtraColumns = [];
|
|
22
22
|
if (typeof pivotPreviewOptionColumn === 'function') {
|
|
23
|
-
const pivotPreviewColumnsContext = {
|
|
24
|
-
layout: layout,
|
|
25
|
-
columnId: columnId,
|
|
26
|
-
adaptableApi: adaptableApi,
|
|
27
|
-
userName: adaptableApi.optionsApi.getUserName(),
|
|
28
|
-
adaptableId: adaptableApi.optionsApi.getAdaptableId(),
|
|
29
|
-
};
|
|
23
|
+
const pivotPreviewColumnsContext = Object.assign({ layout: layout, columnId: columnId }, adaptableApi.internalApi.buildBaseContext());
|
|
30
24
|
pivotPreviewExtraColumns = pivotPreviewOptionColumn(pivotPreviewColumnsContext);
|
|
31
25
|
}
|
|
32
26
|
else if (Array.isArray(pivotPreviewOptionColumn)) {
|
|
@@ -7,9 +7,7 @@ import * as LayoutRedux from '../../Redux/ActionsReducers/LayoutRedux';
|
|
|
7
7
|
import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
|
|
8
8
|
export const SaveLayoutButton = () => {
|
|
9
9
|
const adaptable = useAdaptable();
|
|
10
|
-
const accessLevel = adaptable.api.
|
|
11
|
-
.getEntitlementService()
|
|
12
|
-
.getEntitlementAccessLevelForModule(ModuleConstants.LayoutModuleId);
|
|
10
|
+
const accessLevel = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule(ModuleConstants.LayoutModuleId);
|
|
13
11
|
const dispatch = useDispatch();
|
|
14
12
|
const currentDraftLayout = useSelector((state) => state.Grid.CurrentLayout);
|
|
15
13
|
const isManualSaveLayout = !adaptable.api.layoutApi.shouldAutoSaveLayouts();
|
|
@@ -5,11 +5,11 @@ import DropdownButton from '../../../../components/DropdownButton';
|
|
|
5
5
|
import FormLayout, { FormRow } from '../../../../components/FormLayout';
|
|
6
6
|
import { Tabs } from '../../../../components/Tabs';
|
|
7
7
|
import { Tag } from '../../../../components/Tag';
|
|
8
|
-
import { sortWithOrderArray } from '../../../../Utilities/sortWithOrder';
|
|
9
8
|
import { useAdaptable } from '../../../AdaptableContext';
|
|
10
9
|
import { ValueSelector } from '../../../Components/ValueSelector';
|
|
11
10
|
import { useOnePageAdaptableWizardContext } from '../../../Wizard/OnePageAdaptableWizard';
|
|
12
11
|
import { columnFilter } from './Utilities';
|
|
12
|
+
import ArrayExtensions from '../../../../Utilities/Extensions/ArrayExtensions';
|
|
13
13
|
const WEIGHTED_AVERAGE_AGG_FN_NAME = 'weightedAvg';
|
|
14
14
|
export const isAggregationsSectionValid = (data) => {
|
|
15
15
|
const weightedAvg = data.AggregationColumns
|
|
@@ -106,7 +106,7 @@ export const AggregationsSection = (props) => {
|
|
|
106
106
|
const numberColumns = adaptable.api.columnApi.getNumericColumns();
|
|
107
107
|
const sortedAggregableColumns = React.useMemo(() => {
|
|
108
108
|
var _a, _b;
|
|
109
|
-
return
|
|
109
|
+
return ArrayExtensions.sortArrayWithOrder(allAggregableColumns.map((col) => col.columnId), (_b = Object.keys((_a = layout.AggregationColumns) !== null && _a !== void 0 ? _a : {})) !== null && _b !== void 0 ? _b : [], { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
110
110
|
}, [layout, allAggregableColumns]);
|
|
111
111
|
const handleColumnsSelectionChange = React.useCallback((columnIds) => {
|
|
112
112
|
props.onChange(Object.assign(Object.assign({}, layout), { AggregationColumns: columnIds.reduce((acc, colId) => {
|
|
@@ -8,7 +8,6 @@ import SimpleButton from '../../../../components/SimpleButton';
|
|
|
8
8
|
import { Tabs } from '../../../../components/Tabs';
|
|
9
9
|
import { Tag } from '../../../../components/Tag';
|
|
10
10
|
import { isValidOrderForColumnGroups, } from '../../../../PredefinedConfig/Common/AdaptableColumn';
|
|
11
|
-
import { sortWithOrderArray } from '../../../../Utilities/sortWithOrder';
|
|
12
11
|
import { useAdaptable } from '../../../AdaptableContext';
|
|
13
12
|
import { ValueSelector } from '../../../Components/ValueSelector';
|
|
14
13
|
import { useOnePageAdaptableWizardContext } from '../../../Wizard/OnePageAdaptableWizard';
|
|
@@ -17,6 +16,7 @@ import { Icon } from '../../../../components/icons';
|
|
|
17
16
|
import { CheckBox } from '../../../../components/CheckBox';
|
|
18
17
|
import { clamp } from '../../../../Utilities/Helpers/Helper';
|
|
19
18
|
import { ColumnLabels } from '../Components/ColumnLabels';
|
|
19
|
+
import ArrayExtensions from '../../../../Utilities/Extensions/ArrayExtensions';
|
|
20
20
|
const PropertyOrderText = (props) => (React.createElement(Text, { fontWeight: 600, fontSize: 2 }, props.children));
|
|
21
21
|
export const ColumnsSectionSummary = () => {
|
|
22
22
|
const adaptable = useAdaptable();
|
|
@@ -187,7 +187,7 @@ export const ColumnsSection = (props) => {
|
|
|
187
187
|
const { data: layout } = useOnePageAdaptableWizardContext();
|
|
188
188
|
const allColumns = adaptable.api.columnApi.getColumns();
|
|
189
189
|
const sortedColumns = React.useMemo(() => {
|
|
190
|
-
return
|
|
190
|
+
return ArrayExtensions.sortArrayWithOrder(allColumns.map((col) => col.columnId), layout.Columns, { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
191
191
|
}, [layout, allColumns]);
|
|
192
192
|
const handlePinChange = (columnId, pinning) => {
|
|
193
193
|
props.onChange(Object.assign(Object.assign({}, layout), { PinnedColumnsMap: Object.assign(Object.assign({}, layout.PinnedColumnsMap), { [columnId]: pinning }) }));
|
|
@@ -2,11 +2,11 @@ import * as React from 'react';
|
|
|
2
2
|
import { Box } from 'rebass';
|
|
3
3
|
import { Tabs } from '../../../../components/Tabs';
|
|
4
4
|
import { Tag } from '../../../../components/Tag';
|
|
5
|
-
import { sortWithOrderArray } from '../../../../Utilities/sortWithOrder';
|
|
6
5
|
import { useAdaptable } from '../../../AdaptableContext';
|
|
7
6
|
import { ValueSelector } from '../../../Components/ValueSelector';
|
|
8
7
|
import { useOnePageAdaptableWizardContext } from '../../../Wizard/OnePageAdaptableWizard';
|
|
9
8
|
import { columnFilter } from './Utilities';
|
|
9
|
+
import ArrayExtensions from '../../../../Utilities/Extensions/ArrayExtensions';
|
|
10
10
|
export const PivotColumnsSectionSummary = () => {
|
|
11
11
|
var _a;
|
|
12
12
|
const adaptable = useAdaptable();
|
|
@@ -20,7 +20,7 @@ export const PivotColumnsSection = (props) => {
|
|
|
20
20
|
const allPivotColumns = adaptable.api.columnApi.getPivotableColumns();
|
|
21
21
|
const sortedPivotColumns = React.useMemo(() => {
|
|
22
22
|
var _a;
|
|
23
|
-
return
|
|
23
|
+
return ArrayExtensions.sortArrayWithOrder(allPivotColumns.map((col) => col.columnId), (_a = layout.PivotColumns) !== null && _a !== void 0 ? _a : [], { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
24
24
|
}, [layout, allPivotColumns]);
|
|
25
25
|
const handleColumnsChange = (columnIds) => {
|
|
26
26
|
props.onChange(Object.assign(Object.assign({}, layout), { PivotColumns: columnIds }));
|
|
@@ -4,10 +4,10 @@ import FormLayout, { FormRow } from '../../../../components/FormLayout';
|
|
|
4
4
|
import { columnFilter } from './Utilities';
|
|
5
5
|
import { Tabs } from '../../../../components/Tabs';
|
|
6
6
|
import { Tag } from '../../../../components/Tag';
|
|
7
|
-
import { sortWithOrderArray } from '../../../../Utilities/sortWithOrder';
|
|
8
7
|
import { useAdaptable } from '../../../AdaptableContext';
|
|
9
8
|
import { ValueSelector } from '../../../Components/ValueSelector';
|
|
10
9
|
import { useOnePageAdaptableWizardContext } from '../../../Wizard/OnePageAdaptableWizard';
|
|
10
|
+
import ArrayExtensions from '../../../../Utilities/Extensions/ArrayExtensions';
|
|
11
11
|
export const RowGroupingSectionSummary = () => {
|
|
12
12
|
var _a;
|
|
13
13
|
const adaptable = useAdaptable();
|
|
@@ -37,7 +37,7 @@ export const RowGroupingSection = (props) => {
|
|
|
37
37
|
const allGroupableColumns = adaptable.api.columnApi.getGroupableColumns();
|
|
38
38
|
const sortedGroupableColumns = React.useMemo(() => {
|
|
39
39
|
var _a;
|
|
40
|
-
return
|
|
40
|
+
return ArrayExtensions.sortArrayWithOrder(allGroupableColumns.map((col) => col.columnId), (_a = layout.RowGroupedColumns) !== null && _a !== void 0 ? _a : [], { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
41
41
|
}, [layout, allGroupableColumns]);
|
|
42
42
|
const handleColumnsChange = (columnIds) => {
|
|
43
43
|
props.onChange(Object.assign(Object.assign({}, layout), { RowGroupedColumns: columnIds }));
|
|
@@ -11,12 +11,12 @@ import { summarySupportedExpressions, WEIGHTED_AVERAGE_AGGREATED_FUNCTION, } fro
|
|
|
11
11
|
import { mapColumnDataTypeToExpressionFunctionType } from '../../../../Utilities/adaptableQlUtils';
|
|
12
12
|
import { LayoutModuleId } from '../../../../Utilities/Constants/ModuleConstants';
|
|
13
13
|
import { aggregatedExpressionFunctions } from '../../../../Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions';
|
|
14
|
-
import { sortWithOrderArray } from '../../../../Utilities/sortWithOrder';
|
|
15
14
|
import { useAdaptable } from '../../../AdaptableContext';
|
|
16
15
|
import { SuspendToggleButton } from '../../../Components/Buttons/SuspendToggleButton';
|
|
17
16
|
import { ValueSelector } from '../../../Components/ValueSelector';
|
|
18
17
|
import { useOnePageAdaptableWizardContext } from '../../../Wizard/OnePageAdaptableWizard';
|
|
19
18
|
import { columnFilter } from './Utilities';
|
|
19
|
+
import ArrayExtensions from '../../../../Utilities/Extensions/ArrayExtensions';
|
|
20
20
|
export const areSummaryRowsValid = (layout) => {
|
|
21
21
|
var _a;
|
|
22
22
|
if (!layout.RowSummaries)
|
|
@@ -94,7 +94,7 @@ const RowSummaryEditor = React.memo(({ rowSummary, onChange, availableScalarExpr
|
|
|
94
94
|
return (_b = (_a = layout.Columns) === null || _a === void 0 ? void 0 : _a.includes) === null || _b === void 0 ? void 0 : _b.call(_a, column.columnId);
|
|
95
95
|
})
|
|
96
96
|
.map((c) => c.columnId);
|
|
97
|
-
return
|
|
97
|
+
return ArrayExtensions.sortArrayWithOrder(colIds, Object.keys(rowSummary.ColumnsMap), {
|
|
98
98
|
sortUnorderedItems: false,
|
|
99
99
|
}).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
100
100
|
}, [rowSummary.ColumnsMap]);
|
|
@@ -4,11 +4,11 @@ import SimpleButton from '../../../../components/SimpleButton';
|
|
|
4
4
|
import { Tabs } from '../../../../components/Tabs';
|
|
5
5
|
import { Tag } from '../../../../components/Tag';
|
|
6
6
|
import { getLayoutSortViewItems } from '../../../../Strategy/Utilities/Layout/getLayoutSortViewItems';
|
|
7
|
-
import { sortWithOrderArray } from '../../../../Utilities/sortWithOrder';
|
|
8
7
|
import { useAdaptable } from '../../../AdaptableContext';
|
|
9
8
|
import { ValueSelector } from '../../../Components/ValueSelector';
|
|
10
9
|
import { useOnePageAdaptableWizardContext } from '../../../Wizard/OnePageAdaptableWizard';
|
|
11
10
|
import { columnFilter } from './Utilities';
|
|
11
|
+
import ArrayExtensions from '../../../../Utilities/Extensions/ArrayExtensions';
|
|
12
12
|
export const SortSectionSummary = () => {
|
|
13
13
|
const { data: layout } = useOnePageAdaptableWizardContext();
|
|
14
14
|
const adaptable = useAdaptable();
|
|
@@ -30,7 +30,7 @@ export const SortSection = (props) => {
|
|
|
30
30
|
const allSortableColumns = adaptable.api.columnApi.getSortableColumns();
|
|
31
31
|
const sortedSortColumns = React.useMemo(() => {
|
|
32
32
|
var _a;
|
|
33
|
-
return
|
|
33
|
+
return ArrayExtensions.sortArrayWithOrder(allSortableColumns.map((col) => col.columnId), ((_a = layout.ColumnSorts) !== null && _a !== void 0 ? _a : []).map((sort) => sort.ColumnId), { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
34
34
|
}, [layout, allSortableColumns]);
|
|
35
35
|
const handleColumnsSelectionChange = React.useCallback((columnIds) => {
|
|
36
36
|
props.onChange(Object.assign(Object.assign({}, layout), { ColumnSorts: (columnIds || []).map((columnId) => {
|
|
@@ -7,7 +7,7 @@ import { cloneObject } from '../../../Utilities/Helpers/Helper';
|
|
|
7
7
|
import { isValidNamedQueryExpression, NamedQueryExpressionWizardSection, renderNamedQueryExpressionSummary, } from './NamedQueryExpressionWizardSection';
|
|
8
8
|
import ObjectFactory from '../../../Utilities/ObjectFactory';
|
|
9
9
|
import { useDispatch } from 'react-redux';
|
|
10
|
-
import * as
|
|
10
|
+
import * as NamedQueryRedux from '../../../Redux/ActionsReducers/NamedQueryRedux';
|
|
11
11
|
import { ObjectTagsWizardSection, renderObjectTagsSummary, } from '../../Wizard/ObjectTagsWizardSection';
|
|
12
12
|
export function NamedQueryWizard(props) {
|
|
13
13
|
const [namedQuery, setNamedQuery] = useState(() => {
|
|
@@ -20,10 +20,10 @@ export function NamedQueryWizard(props) {
|
|
|
20
20
|
const dispatch = useDispatch();
|
|
21
21
|
const handleFinish = () => {
|
|
22
22
|
if (props.data) {
|
|
23
|
-
dispatch(
|
|
23
|
+
dispatch(NamedQueryRedux.NamedQueryEdit(namedQuery));
|
|
24
24
|
}
|
|
25
25
|
else {
|
|
26
|
-
dispatch(
|
|
26
|
+
dispatch(NamedQueryRedux.NamedQueryAdd(namedQuery));
|
|
27
27
|
}
|
|
28
28
|
props.onFinishWizard(namedQuery);
|
|
29
29
|
};
|
|
@@ -37,7 +37,7 @@ export const SpecialColumnSettingsWizardStep = (props) => {
|
|
|
37
37
|
React.createElement(FormRow, null,
|
|
38
38
|
React.createElement(CheckBox, { "data-name": "filterable", checked: Filterable, onChange: (Filterable) => onSettingsChange({ Filterable }), disabled: !adaptable.api.optionsApi.getColumnFilterOptions()
|
|
39
39
|
.enableFilterOnSpecialColumns ||
|
|
40
|
-
adaptable.
|
|
40
|
+
adaptable.api.entitlementApi.getEntitlementAccessLevelForModule(ColumnFilterModuleId) == 'Hidden' }, "Filterable"),
|
|
41
41
|
React.createElement(CheckBox, { "data-name": "resizable", checked: Resizable, onChange: (Resizable) => onSettingsChange({ Resizable }) }, "Resizable"),
|
|
42
42
|
React.createElement(CheckBox, { "data-name": "groupable", checked: Groupable, onChange: (Groupable) => onSettingsChange({ Groupable }) }, "Groupable")),
|
|
43
43
|
React.createElement(FormRow, null,
|
|
@@ -24,7 +24,7 @@ class SystemStatusPopupComponent extends React.Component {
|
|
|
24
24
|
render() {
|
|
25
25
|
let clearAllButton = (React.createElement(SimpleButton, { onClick: () => this.onSystemStatusMessageInfoDeleteAll(), tooltip: "Clear All", tone: "neutral", variant: "raised", accessLevel: this.props.accessLevel, disabled: ArrayExtensions.IsNullOrEmpty(this.props.SystemStatusMessages) }, "Delete All Messages"));
|
|
26
26
|
const messages = ArrayExtensions.sortArrayWithProperty(SortOrder.Desc, this.props.SystemStatusMessages, 'Timestamp').map((smi, index) => {
|
|
27
|
-
const accessLevel = AdaptableHelper.
|
|
27
|
+
const accessLevel = AdaptableHelper.getAccessLevelForObject(smi, this.props.accessLevel);
|
|
28
28
|
return (React.createElement(SystemStatusEntityRow, { adaptableObject: smi, key: 'smi' + index, onEdit: null, moduleInfo: this.props.moduleInfo, colItems: colItems, api: this.props.api, accessLevel: accessLevel, teamSharingActivated: this.props.teamSharingActivated, onDeleteConfirm: null, onShare: null }));
|
|
29
29
|
});
|
|
30
30
|
return (React.createElement(PopupPanel, { button: clearAllButton, headerText: this.props.moduleInfo.FriendlyName, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed() }, ArrayExtensions.IsNotNullOrEmpty(this.props.SystemStatusMessages) && (React.createElement(Box, { className: "ab-SystemStatus-Popup-List", padding: 2 },
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { useDispatch } from 'react-redux';
|
|
4
4
|
import { Box, Text } from 'rebass';
|
|
5
|
-
import * as
|
|
5
|
+
import * as NamedQueryRedux from '../../Redux/ActionsReducers/NamedQueryRedux';
|
|
6
6
|
import SimpleButton from '../../components/SimpleButton';
|
|
7
7
|
import { useAdaptable } from '../AdaptableContext';
|
|
8
8
|
import { Tabs } from '../../components/Tabs';
|
|
@@ -25,7 +25,7 @@ export function useOnePageAdaptableWizardContext() {
|
|
|
25
25
|
export const OnePageAdaptableWizard = (props) => {
|
|
26
26
|
const { api } = useAdaptable();
|
|
27
27
|
const dispatch = useDispatch();
|
|
28
|
-
const saveNamedQuery = React.useCallback((namedQuery) => dispatch(
|
|
28
|
+
const saveNamedQuery = React.useCallback((namedQuery) => dispatch(NamedQueryRedux.NamedQueryAdd(namedQuery)), []);
|
|
29
29
|
const [namedQuery, setNamedQuery] = useState(false);
|
|
30
30
|
const name = props.moduleInfo.FriendlyName
|
|
31
31
|
? `${kebabCase(props.moduleInfo.FriendlyName)}-wizard`
|
|
@@ -46,13 +46,14 @@ export const ReactActionColumnRenderer = (props) => {
|
|
|
46
46
|
const isGroupedRow = adaptable.api.gridApi.isGroupRowNode(props.node);
|
|
47
47
|
const isSummaryRow = adaptable.api.gridApi.isSummaryNode(props.node);
|
|
48
48
|
let shouldRender = true;
|
|
49
|
+
const isActionRowColumn = adaptable.api.columnApi.internalApi.isActionRowButtonColumn(props.colDef.colId);
|
|
49
50
|
if (isGroupedRow) {
|
|
50
|
-
if ((_a = actionColumn.rowScope) === null || _a === void 0 ? void 0 : _a.ExcludeGroupRows) {
|
|
51
|
+
if (isActionRowColumn || ((_a = actionColumn.rowScope) === null || _a === void 0 ? void 0 : _a.ExcludeGroupRows)) {
|
|
51
52
|
shouldRender = false;
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
else if (isSummaryRow) {
|
|
55
|
-
if ((_b = actionColumn.rowScope) === null || _b === void 0 ? void 0 : _b.ExcludeSummaryRows) {
|
|
56
|
+
if (isActionRowColumn || ((_b = actionColumn.rowScope) === null || _b === void 0 ? void 0 : _b.ExcludeSummaryRows)) {
|
|
56
57
|
shouldRender = false;
|
|
57
58
|
}
|
|
58
59
|
}
|
|
@@ -65,15 +66,7 @@ export const ReactActionColumnRenderer = (props) => {
|
|
|
65
66
|
return null;
|
|
66
67
|
}
|
|
67
68
|
const pkValue = adaptable.getPrimaryKeyValueFromRowNode(props.node, props.api);
|
|
68
|
-
const buttonContext = {
|
|
69
|
-
actionColumn,
|
|
70
|
-
primaryKeyValue: pkValue,
|
|
71
|
-
rowNode: props.node,
|
|
72
|
-
adaptableApi: adaptable.api,
|
|
73
|
-
userName: adaptable.adaptableOptions.userName,
|
|
74
|
-
adaptableId: adaptable.adaptableOptions.adaptableId,
|
|
75
|
-
data: props.data,
|
|
76
|
-
};
|
|
69
|
+
const buttonContext = Object.assign(Object.assign({ actionColumn, primaryKeyValue: pkValue, rowNode: props.node }, adaptable.api.internalApi.buildBaseContext()), { data: props.data });
|
|
77
70
|
return (React.createElement("div", { className: "ab-ActionColumn" },
|
|
78
71
|
React.createElement(ActionButtons, { buttons: actionButtons, adaptableApi: adaptable.api, context: buttonContext, rerender: rerender })));
|
|
79
72
|
};
|
|
@@ -96,13 +89,14 @@ export class ActionColumnRenderer {
|
|
|
96
89
|
const isGroupedRow = adaptable.api.gridApi.isGroupRowNode(params.node);
|
|
97
90
|
const isSummaryRow = adaptable.api.gridApi.isSummaryNode(params.node);
|
|
98
91
|
let shouldRender = true;
|
|
92
|
+
const isActionRowColumn = adaptable.api.columnApi.internalApi.isActionRowButtonColumn(params.colDef.colId);
|
|
99
93
|
if (isGroupedRow) {
|
|
100
|
-
if ((_a = actionColumn.rowScope) === null || _a === void 0 ? void 0 : _a.ExcludeGroupRows) {
|
|
94
|
+
if (isActionRowColumn || ((_a = actionColumn.rowScope) === null || _a === void 0 ? void 0 : _a.ExcludeGroupRows)) {
|
|
101
95
|
shouldRender = false;
|
|
102
96
|
}
|
|
103
97
|
}
|
|
104
98
|
else if (isSummaryRow) {
|
|
105
|
-
if ((_b = actionColumn.rowScope) === null || _b === void 0 ? void 0 : _b.ExcludeSummaryRows) {
|
|
99
|
+
if (isActionRowColumn || ((_b = actionColumn.rowScope) === null || _b === void 0 ? void 0 : _b.ExcludeSummaryRows)) {
|
|
106
100
|
shouldRender = false;
|
|
107
101
|
}
|
|
108
102
|
}
|
|
@@ -116,15 +110,7 @@ export class ActionColumnRenderer {
|
|
|
116
110
|
return;
|
|
117
111
|
}
|
|
118
112
|
const pkValue = adaptable.getPrimaryKeyValueFromRowNode(params.node, params.api);
|
|
119
|
-
const buttonContext = {
|
|
120
|
-
actionColumn,
|
|
121
|
-
primaryKeyValue: pkValue,
|
|
122
|
-
rowNode: params.node,
|
|
123
|
-
adaptableApi: adaptable.api,
|
|
124
|
-
userName: adaptable.adaptableOptions.userName,
|
|
125
|
-
adaptableId: adaptable.adaptableOptions.adaptableId,
|
|
126
|
-
data: params.data,
|
|
127
|
-
};
|
|
113
|
+
const buttonContext = Object.assign(Object.assign({ actionColumn, primaryKeyValue: pkValue, rowNode: params.node }, adaptable.api.internalApi.buildBaseContext()), { data: params.data });
|
|
128
114
|
const eGui = this.eGui;
|
|
129
115
|
const doRender = () => {
|
|
130
116
|
this.unmountReactRoot = adaptable.renderReactRoot(renderWithAdaptableContext(ActionButtons({
|
|
@@ -3,7 +3,7 @@ import { AdaptableOptions } from '../AdaptableOptions/AdaptableOptions';
|
|
|
3
3
|
import { ChartRef, Column, GridApi, GridOptions, IRowNode, Module, RowModelType } from '@ag-grid-community/core';
|
|
4
4
|
import { AdaptableLogger } from './AdaptableLogger';
|
|
5
5
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
6
|
-
import { AdaptableVariant, DistinctColumnValuesParams, IAdaptable } from '../AdaptableInterfaces/IAdaptable';
|
|
6
|
+
import { AdaptableVariant, DistinctColumnValuesParams, IAdaptable, NormalizeAdaptableStateOptions } from '../AdaptableInterfaces/IAdaptable';
|
|
7
7
|
import { EmitterCallback } from '../Utilities/Emitter';
|
|
8
8
|
import { AdaptablePlugin } from '../AdaptableOptions/AdaptablePlugin';
|
|
9
9
|
import { AgGridAdapter } from './AgGridAdapter';
|
|
@@ -11,8 +11,6 @@ import { IDataService } from '../Utilities/Services/Interface/IDataService';
|
|
|
11
11
|
import { AdaptableState } from '../PredefinedConfig/AdaptableState';
|
|
12
12
|
import { IAdaptableStore } from '../Redux/Store/Interface/IAdaptableStore';
|
|
13
13
|
import { ICalculatedColumnExpressionService } from '../Utilities/Services/Interface/ICalculatedColumnExpressionService';
|
|
14
|
-
import { IEntitlementService } from '../Utilities/Services/Interface/IEntitlementService';
|
|
15
|
-
import { IReportService } from '../Utilities/Services/Interface/IReportService';
|
|
16
14
|
import { IModuleService } from '../Utilities/Services/Interface/IModuleService';
|
|
17
15
|
import { IValidationService } from '../Utilities/Services/Interface/IValidationService';
|
|
18
16
|
import { IQueryLanguageService } from '../Utilities/Services/Interface/IQueryLanguageService';
|
|
@@ -28,7 +26,7 @@ import { RenderReactRootFn } from '../renderReactRoot';
|
|
|
28
26
|
import { AgGridOptionsService } from './AgGridOptionsService';
|
|
29
27
|
import { AgGridColumnAdapter } from './AgGridColumnAdapter';
|
|
30
28
|
import { RowEditService } from '../Utilities/Services/RowEditService';
|
|
31
|
-
export type AdaptableLifecycleState = 'initial' | 'preprocessOptions' | 'initAdaptableState' | 'setupAgGrid' | 'initAgGrid' | 'available' | 'ready' | 'preDestroyed';
|
|
29
|
+
export type AdaptableLifecycleState = 'initial' | 'preprocessOptions' | 'initAdaptableState' | 'setupAgGrid' | 'initAgGrid' | 'agGridReady' | 'available' | 'ready' | 'preDestroyed';
|
|
32
30
|
type RenderAgGridFrameworkComponentResult = false | GridApi;
|
|
33
31
|
interface AdaptableInitInternalConfig<TData = any> {
|
|
34
32
|
variant: AdaptableVariant;
|
|
@@ -44,6 +42,7 @@ interface AdaptableInitInternalConfig<TData = any> {
|
|
|
44
42
|
export declare class AdaptableAgGrid implements IAdaptable {
|
|
45
43
|
logger: AdaptableLogger;
|
|
46
44
|
private _id;
|
|
45
|
+
private _agGridId;
|
|
47
46
|
lifecycleState: AdaptableLifecycleState;
|
|
48
47
|
variant: AdaptableVariant;
|
|
49
48
|
private emitter;
|
|
@@ -73,8 +72,6 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
73
72
|
adaptableModules: IModuleCollection;
|
|
74
73
|
DataService: IDataService;
|
|
75
74
|
CalculatedColumnExpressionService: ICalculatedColumnExpressionService;
|
|
76
|
-
EntitlementService: IEntitlementService;
|
|
77
|
-
ReportService: IReportService;
|
|
78
75
|
ModuleService: IModuleService;
|
|
79
76
|
ValidationService: IValidationService;
|
|
80
77
|
QueryLanguageService: IQueryLanguageService;
|
|
@@ -128,6 +125,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
128
125
|
static forEachAdaptable(fn: (adaptable: AdaptableAgGrid) => void): void;
|
|
129
126
|
private static collectInstance;
|
|
130
127
|
private static dismissInstance;
|
|
128
|
+
get isAgGridInitialising(): boolean;
|
|
131
129
|
get isReady(): boolean;
|
|
132
130
|
get isAvailable(): boolean;
|
|
133
131
|
get isDestroyed(): boolean;
|
|
@@ -141,7 +139,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
141
139
|
*/
|
|
142
140
|
static _initInternal(config: AdaptableInitInternalConfig): Promise<AdaptableApi>;
|
|
143
141
|
private _initAdaptableAgGrid;
|
|
144
|
-
normalizeAdaptableState(state: AdaptableState,
|
|
142
|
+
normalizeAdaptableState(state: AdaptableState, agGridOptions: NormalizeAdaptableStateOptions): AdaptableState;
|
|
145
143
|
private normaliseLayoutState;
|
|
146
144
|
private normaliseToolPanelState;
|
|
147
145
|
refreshQuickFilter(): void;
|
|
@@ -351,5 +349,6 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
351
349
|
private onSortChanged;
|
|
352
350
|
private getColumnSorts;
|
|
353
351
|
private monkeyPatchingGridOptionsUpdates;
|
|
352
|
+
private DANGER_getPrivateAgGridBeans;
|
|
354
353
|
}
|
|
355
354
|
export {};
|