@adaptabletools/adaptable-cjs 18.1.13 → 18.1.15-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/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 +15 -0
- package/src/Api/Internal/ExportInternalApi.d.ts +33 -8
- package/src/Api/Internal/ExportInternalApi.js +577 -5
- package/src/Api/Internal/NamedQueryInternalApi.d.ts +0 -1
- package/src/Api/Internal/NamedQueryInternalApi.js +0 -5
- package/src/PredefinedConfig/AdaptableState.d.ts +0 -5
- 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 +11 -11
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +3 -3
- package/src/Redux/ActionsReducers/LayoutRedux.js +10 -10
- 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 +3 -3
- 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 +11 -0
- package/src/Utilities/Constants/GeneralConstants.d.ts +41 -4
- package/src/Utilities/Constants/GeneralConstants.js +44 -5
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +0 -2
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -6
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +14 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +68 -1
- package/src/Utilities/Extensions/EnumExtensions.d.ts +0 -4
- package/src/Utilities/Extensions/EnumExtensions.js +3 -15
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +4 -10
- package/src/Utilities/Helpers/AdaptableHelper.js +10 -64
- 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 +1 -76
- 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 +5 -7
- package/src/agGrid/AdaptableAgGrid.js +158 -147
- package/src/agGrid/AgGridAdapter.d.ts +0 -1
- package/src/agGrid/AgGridAdapter.js +7 -10
- package/src/agGrid/AgGridColumnAdapter.d.ts +3 -1
- package/src/agGrid/AgGridColumnAdapter.js +39 -13
- 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 +84 -8
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +9 -9
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/Redux/ActionsReducers/QueryRedux.d.ts +0 -10
- package/src/Redux/ActionsReducers/QueryRedux.js +0 -25
- package/src/Utilities/Helpers/FormatContentHelper.d.ts +0 -22
- package/src/Utilities/Helpers/FormatContentHelper.js +0 -39
- package/src/Utilities/Services/EntitlementService.d.ts +0 -14
- package/src/Utilities/Services/EntitlementService.js +0 -67
- package/src/Utilities/Services/Interface/IEntitlementService.d.ts +0 -10
- package/src/Utilities/Services/Interface/IEntitlementService.js +0 -2
- package/src/Utilities/Services/Interface/IReportService.d.ts +0 -27
- package/src/Utilities/Services/Interface/IReportService.js +0 -2
- package/src/Utilities/Services/ReportService.d.ts +0 -41
- package/src/Utilities/Services/ReportService.js +0 -608
- package/src/Utilities/isAdaptableObject.d.ts +0 -2
- package/src/Utilities/isAdaptableObject.js +0 -8
- package/src/Utilities/reorder.d.ts +0 -1
- package/src/Utilities/reorder.js +0 -17
- package/src/Utilities/sortWithOrder.d.ts +0 -11
- package/src/Utilities/sortWithOrder.js +0 -54
|
@@ -19,14 +19,7 @@ const CustomToolPanelContent = (props) => {
|
|
|
19
19
|
(0, react_1.useLayoutEffect)(() => {
|
|
20
20
|
const element = contentsDivDomRef.current;
|
|
21
21
|
if (hasCustomRenderFn(customToolPanel)) {
|
|
22
|
-
const customRenderContext = {
|
|
23
|
-
visible: true,
|
|
24
|
-
phase: 'onMount',
|
|
25
|
-
element,
|
|
26
|
-
adaptableApi: api,
|
|
27
|
-
userName: api.optionsApi.getUserName(),
|
|
28
|
-
adaptableId: api.optionsApi.getAdaptableId(),
|
|
29
|
-
};
|
|
22
|
+
const customRenderContext = Object.assign({ visible: true, phase: 'onMount', element }, api.internalApi.buildBaseContext());
|
|
30
23
|
const html = customToolPanel.render(customRenderContext);
|
|
31
24
|
setContentsHTML(html);
|
|
32
25
|
}
|
|
@@ -35,14 +28,7 @@ const CustomToolPanelContent = (props) => {
|
|
|
35
28
|
}
|
|
36
29
|
return () => {
|
|
37
30
|
if (hasCustomRenderFn(customToolPanel)) {
|
|
38
|
-
customToolPanel.render({
|
|
39
|
-
visible: false,
|
|
40
|
-
phase: 'onDestroy',
|
|
41
|
-
element,
|
|
42
|
-
adaptableApi: api,
|
|
43
|
-
userName: api.optionsApi.getUserName(),
|
|
44
|
-
adaptableId: api.optionsApi.getAdaptableId(),
|
|
45
|
-
});
|
|
31
|
+
customToolPanel.render(Object.assign({ visible: false, phase: 'onDestroy', element }, api.internalApi.buildBaseContext()));
|
|
46
32
|
}
|
|
47
33
|
else if (hasCustomFrameworkComponent(customToolPanel) && !api.isDestroyed()) {
|
|
48
34
|
api.internalApi.destroyFrameworkComponent(element, customToolPanel.frameworkComponent, 'toolPanel');
|
|
@@ -54,13 +40,7 @@ const CustomToolPanelContent = (props) => {
|
|
|
54
40
|
((_a = customToolPanel.buttons) === null || _a === void 0 ? void 0 : _a.length) && (React.createElement("div", { id: buttonsDivId, className: `ab-ToolPanel__custom-content__buttons ${buttonsDivId}` }, customToolPanel.buttons.map((button) => {
|
|
55
41
|
// TODO: variants of this mapping are present in several places (just search for api.internalApi.getStyleForButton() usages)
|
|
56
42
|
// with the next opportunity we should abstract it
|
|
57
|
-
const toolPanelContext = {
|
|
58
|
-
adaptableApi: api,
|
|
59
|
-
userName: api.optionsApi.getUserName(),
|
|
60
|
-
adaptableId: api.optionsApi.getAdaptableId(),
|
|
61
|
-
toolPanelState: api.toolPanelApi.getToolPanelState(),
|
|
62
|
-
customToolPanel: customToolPanel,
|
|
63
|
-
};
|
|
43
|
+
const toolPanelContext = Object.assign(Object.assign({}, api.internalApi.buildBaseContext()), { toolPanelState: api.toolPanelApi.getToolPanelState(), customToolPanel: customToolPanel });
|
|
64
44
|
const buttonIcon = api.internalApi.getIconForButton(button, toolPanelContext);
|
|
65
45
|
let buttonStyle = api.internalApi.getStyleForButton(button, toolPanelContext);
|
|
66
46
|
let buttonLabel = api.internalApi.getLabelForButton(button, toolPanelContext);
|
|
@@ -26,7 +26,6 @@ class ToolPanelPopupComponent extends React.Component {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
|
-
const entitlementService = this.props.api.internalApi.getEntitlementService();
|
|
30
29
|
// 1. process module buttons
|
|
31
30
|
const selectedModuleButtons = [];
|
|
32
31
|
if (ArrayExtensions_1.default.IsNotNullOrEmpty(this.props.ToolPanelState.ModuleButtons)) {
|
|
@@ -41,15 +40,15 @@ class ToolPanelPopupComponent extends React.Component {
|
|
|
41
40
|
// 2. process tool panels
|
|
42
41
|
const availableModules = this.props.GridState.SettingPanelModuleMenuItems.filter((menuItem) => menuItem.isVisible).map((menuItem) => menuItem.module);
|
|
43
42
|
// 'Dashboard' is a special case because it's not available in the dashboard menu items, s we have to add it manually
|
|
44
|
-
if (!
|
|
43
|
+
if (!this.props.api.entitlementApi.isModuleHiddenEntitlement('Dashboard')) {
|
|
45
44
|
availableModules.push('Dashboard');
|
|
46
45
|
}
|
|
47
46
|
if (this.props.api.pluginsApi.getipushpullPluginApi() &&
|
|
48
|
-
!
|
|
47
|
+
!this.props.api.entitlementApi.isModuleHiddenEntitlement('IPushPull')) {
|
|
49
48
|
availableModules.push('IPushPull');
|
|
50
49
|
}
|
|
51
50
|
if (this.props.api.pluginsApi.getOpenFinPluginApi() &&
|
|
52
|
-
!
|
|
51
|
+
!this.props.api.entitlementApi.isModuleHiddenEntitlement('OpenFin')) {
|
|
53
52
|
availableModules.push('OpenFin');
|
|
54
53
|
}
|
|
55
54
|
const availableModuleToolPanels = Types_1.ALL_TOOL_PANELS.filter((moduleToolPanel) => ArrayExtensions_1.default.ContainsItem(availableModules, moduleToolPanel));
|
|
@@ -63,7 +62,7 @@ class ToolPanelPopupComponent extends React.Component {
|
|
|
63
62
|
const selectedToolPanels = this.props.ToolPanelState.ToolPanels.map((toolPanelDefinition) => toolPanelDefinition.Name)
|
|
64
63
|
// ensure that the visible state has only valid tool panels
|
|
65
64
|
.filter((visibleToolPanel) => availableToolPanels.includes(visibleToolPanel));
|
|
66
|
-
const isToolPanelReadOnly =
|
|
65
|
+
const isToolPanelReadOnly = this.props.api.entitlementApi.isModuleReadOnlyEntitlement('ToolPanel');
|
|
67
66
|
const isModuleCheckboxDisabled = (module) => {
|
|
68
67
|
if (module === 'SettingsPanel') {
|
|
69
68
|
return this.props.api.optionsApi.getSettingsPanelOptions().alwaysShowInDashboard;
|
|
@@ -17,9 +17,7 @@ const ToolPanelWrapper = (props) => {
|
|
|
17
17
|
const getToolPanelConfiguration = () => {
|
|
18
18
|
var _a;
|
|
19
19
|
if (adaptableToolPanel) {
|
|
20
|
-
const accessLevel = api.
|
|
21
|
-
.getEntitlementService()
|
|
22
|
-
.getEntitlementAccessLevelForModule(adaptableToolPanel);
|
|
20
|
+
const accessLevel = api.entitlementApi.getEntitlementAccessLevelForModule(adaptableToolPanel);
|
|
23
21
|
const moduleInfo = api.internalApi
|
|
24
22
|
.getModuleService()
|
|
25
23
|
.getModuleInfoByModule(adaptableToolPanel);
|
|
@@ -11,9 +11,9 @@ const icons_1 = require("../../../components/icons");
|
|
|
11
11
|
const EllipsisContainer_1 = require("../../../components/EllipsisContainer");
|
|
12
12
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
13
13
|
const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
|
|
14
|
-
const reorder_1 = require("../../../Utilities/reorder");
|
|
15
14
|
const Tag_1 = require("../../../components/Tag");
|
|
16
15
|
const AdaptableFormControlTextClear_1 = require("../Forms/AdaptableFormControlTextClear");
|
|
16
|
+
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/ArrayExtensions"));
|
|
17
17
|
function useValuesMap({ options, value, toIdentifier, selectedMap, }) {
|
|
18
18
|
const optionsMap = (0, react_1.useMemo)(() => {
|
|
19
19
|
if (selectedMap) {
|
|
@@ -134,7 +134,7 @@ function ValueSelector(props) {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
const clone = new Map(selectedMap);
|
|
137
|
-
const newSelection =
|
|
137
|
+
const newSelection = ArrayExtensions_1.default.reorderArray(selection, source.index, destination.index);
|
|
138
138
|
// and then pushed back in the new order, at the end
|
|
139
139
|
newSelection.push(...extraKeys);
|
|
140
140
|
selectedMap.clear();
|
|
@@ -9,9 +9,9 @@ const Loader_1 = require("../../../components/Loader");
|
|
|
9
9
|
const Tabs_1 = require("../../../components/Tabs");
|
|
10
10
|
const join_1 = tslib_1.__importDefault(require("../../../components/utils/join"));
|
|
11
11
|
const runIfNotResolvedIn_1 = require("../../../Utilities/runIfNotResolvedIn");
|
|
12
|
-
const sortWithOrder_1 = require("../../../Utilities/sortWithOrder");
|
|
13
12
|
const ValueSelector_1 = require("../../Components/ValueSelector");
|
|
14
13
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
14
|
+
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../.././Utilities/Extensions/ArrayExtensions"));
|
|
15
15
|
const isValidCustomSortOrder = (data) => {
|
|
16
16
|
if (!data.SortedValues || !data.SortedValues.length) {
|
|
17
17
|
return 'You have to specify at least one value for Custom Sort order';
|
|
@@ -57,7 +57,7 @@ const CustomSortValuesWizardSection = (props) => {
|
|
|
57
57
|
return sortedValuesMap.has(option);
|
|
58
58
|
}, [sortedValuesMap]);
|
|
59
59
|
const options = (0, react_1.useMemo)(() => {
|
|
60
|
-
return
|
|
60
|
+
return ArrayExtensions_1.default.sortArrayWithOrder(distinctValues, data.SortedValues, {
|
|
61
61
|
sortUnorderedItems: false,
|
|
62
62
|
});
|
|
63
63
|
}, [allowReorder, distinctValues, data.SortedValues]);
|
|
@@ -11,12 +11,7 @@ const CustomDashboardButton = (props) => {
|
|
|
11
11
|
const [componentRevision, setComponentRevision] = (0, react_1.useState)(1);
|
|
12
12
|
// TODO: variants of this mapping are present in several places (just search for api.internalApi.getStyleForButton() usages)
|
|
13
13
|
// with the next opportunity we should abstract it
|
|
14
|
-
const dashboardContext = {
|
|
15
|
-
adaptableApi: props.api,
|
|
16
|
-
userName: props.api.optionsApi.getUserName(),
|
|
17
|
-
adaptableId: props.api.optionsApi.getAdaptableId(),
|
|
18
|
-
dashboardState: props.api.dashboardApi.getDashboardState(),
|
|
19
|
-
};
|
|
14
|
+
const dashboardContext = Object.assign(Object.assign({}, props.api.internalApi.buildBaseContext()), { dashboardState: props.api.dashboardApi.getDashboardState() });
|
|
20
15
|
const buttonIcon = props.api.internalApi.getIconForButton(button, dashboardContext);
|
|
21
16
|
let buttonStyle = props.api.internalApi.getStyleForButton(button, dashboardContext);
|
|
22
17
|
let buttonLabel = props.api.internalApi.getLabelForButton(button, dashboardContext);
|
|
@@ -104,16 +104,9 @@ const CustomToolbarWrapper = (props) => {
|
|
|
104
104
|
const { api } = (0, AdaptableContext_1.useAdaptable)();
|
|
105
105
|
return (React.createElement(PanelDashboard_1.PanelDashboard, { headerText: props.customToolbar.title ? props.customToolbar.title : '', showConfigureButton: props.customToolbar.showConfigureButton != null &&
|
|
106
106
|
props.customToolbar.showConfigureButton == true, showCloseButton: props.customToolbar.showCloseButton != null && props.customToolbar.showCloseButton == true, onConfigure: () => {
|
|
107
|
-
const customToolbarConfiguredInfo = {
|
|
108
|
-
adaptableApi: api,
|
|
109
|
-
customToolbar: props.customToolbar,
|
|
110
|
-
userName: api.optionsApi.getUserName(),
|
|
111
|
-
adaptableId: api.optionsApi.getAdaptableId(),
|
|
112
|
-
};
|
|
107
|
+
const customToolbarConfiguredInfo = Object.assign(Object.assign({}, api.internalApi.buildBaseContext()), { customToolbar: props.customToolbar });
|
|
113
108
|
api.eventApi.emit('CustomToolbarConfigured', customToolbarConfiguredInfo);
|
|
114
|
-
}, accessLevel: api.
|
|
115
|
-
.getEntitlementService()
|
|
116
|
-
.getEntitlementAccessLevelForModule('Dashboard') },
|
|
109
|
+
}, accessLevel: api.entitlementApi.getEntitlementAccessLevelForModule('Dashboard') },
|
|
117
110
|
React.createElement(exports.CustomToolbarCmp, Object.assign({}, props))));
|
|
118
111
|
};
|
|
119
112
|
exports.CustomToolbarWrapper = CustomToolbarWrapper;
|
|
@@ -25,9 +25,7 @@ const PinnedDashboard_1 = require("./PinnedDashboard");
|
|
|
25
25
|
const ModuleToolbarWrapper_1 = require("./ModuleToolbarWrapper");
|
|
26
26
|
const DashboardComponent = (props) => {
|
|
27
27
|
const [searchText, search] = (0, useQuickSearchDebounced_1.useQuickSearchDebounced)(props);
|
|
28
|
-
const dashboardAccessLevel = props.api.
|
|
29
|
-
.getEntitlementService()
|
|
30
|
-
.getEntitlementAccessLevelForModule('Dashboard');
|
|
28
|
+
const dashboardAccessLevel = props.api.entitlementApi.getEntitlementAccessLevelForModule('Dashboard');
|
|
31
29
|
const renderTab = (tab) => {
|
|
32
30
|
const visibleToolbarNames = tab.Toolbars.filter((vt) => vt);
|
|
33
31
|
const customToolbars = props.api.dashboardApi.getCustomToolbars();
|
|
@@ -64,7 +62,7 @@ const DashboardComponent = (props) => {
|
|
|
64
62
|
let shortcuts = null;
|
|
65
63
|
const alwaysShowInDashboard = props.api.optionsApi.getSettingsPanelOptions().alwaysShowInDashboard;
|
|
66
64
|
const shouldAddSettingsPanel = alwaysShowInDashboard &&
|
|
67
|
-
!props.api.
|
|
65
|
+
!props.api.entitlementApi.isModuleHiddenEntitlement('SettingsPanel');
|
|
68
66
|
if (shouldAddSettingsPanel && !shortcutsArray.includes('SettingsPanel')) {
|
|
69
67
|
shortcutsArray.push('SettingsPanel');
|
|
70
68
|
}
|
|
@@ -57,9 +57,7 @@ class DashboardPopupComponent extends React.Component {
|
|
|
57
57
|
});
|
|
58
58
|
const allModuleButtons = this.props.GridState.SettingPanelModuleMenuItems.map((x) => x.module);
|
|
59
59
|
const baseClassName = 'ab-Dashboard-Popup';
|
|
60
|
-
const dashboardAccessLevel = this.props.api.
|
|
61
|
-
.getEntitlementService()
|
|
62
|
-
.getEntitlementAccessLevelForModule('Dashboard');
|
|
60
|
+
const dashboardAccessLevel = this.props.api.entitlementApi.getEntitlementAccessLevelForModule('Dashboard');
|
|
63
61
|
const areDashboardSettingsVisible = dashboardAccessLevel == 'Full' || dashboardAccessLevel == 'ReadOnly';
|
|
64
62
|
const isDashboardDisabled = dashboardAccessLevel === 'ReadOnly';
|
|
65
63
|
const isModuleCheckboxDisabled = (module) => {
|
|
@@ -13,8 +13,7 @@ const SystemDashboardToolbarFactory = (props) => {
|
|
|
13
13
|
const moduleInfo = adaptable.api.internalApi
|
|
14
14
|
.getModuleService()
|
|
15
15
|
.getModuleInfoByModule(props.toolbarName);
|
|
16
|
-
const accessLevel = adaptable.api.
|
|
17
|
-
.getEntitlementService()
|
|
16
|
+
const accessLevel = adaptable.api.entitlementApi
|
|
18
17
|
.getEntitlementAccessLevelForModule(props.toolbarName);
|
|
19
18
|
const moduleToolbarView = AdaptableViewFactory_1.AdaptableViewPanelFactory.get(props.toolbarName);
|
|
20
19
|
if (!moduleToolbarView) {
|
|
@@ -9,8 +9,7 @@ const DashboardRedux_1 = require("../../Redux/ActionsReducers/DashboardRedux");
|
|
|
9
9
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
10
10
|
const PinnedToolbarsSelector = (props) => {
|
|
11
11
|
const { api } = (0, AdaptableContext_1.useAdaptable)();
|
|
12
|
-
const dashboardAccessLevel = api.
|
|
13
|
-
.getEntitlementService()
|
|
12
|
+
const dashboardAccessLevel = api.entitlementApi
|
|
14
13
|
.getEntitlementAccessLevelForModule('Dashboard');
|
|
15
14
|
const isDashboardDisabled = dashboardAccessLevel === 'ReadOnly';
|
|
16
15
|
const dashboardState = (0, react_redux_1.useSelector)((state) => state.Dashboard);
|
|
@@ -15,9 +15,7 @@ const DataChangeHistoryGrid = (props) => {
|
|
|
15
15
|
const [_adaptableApi, setAdaptableApi] = (0, react_1.useState)(null);
|
|
16
16
|
const adaptableApiRef = (0, react_1.useRef)(null);
|
|
17
17
|
adaptableApiRef.current = _adaptableApi;
|
|
18
|
-
const undoChangeEnabled = mainAdaptableInstance.api.
|
|
19
|
-
.getEntitlementService()
|
|
20
|
-
.isModuleFullEntitlement(ModuleConstants_1.DataChangeHistoryModuleId);
|
|
18
|
+
const undoChangeEnabled = mainAdaptableInstance.api.entitlementApi.isModuleFullEntitlement(ModuleConstants_1.DataChangeHistoryModuleId);
|
|
21
19
|
const previousChangeHistoryLog = (0, usePrevious_1.default)(changeHistoryLog, changeHistoryLog);
|
|
22
20
|
// initialize Adaptable grid
|
|
23
21
|
(0, react_1.useEffect)(() => {
|
|
@@ -67,7 +67,7 @@ class ExportViewPanelComponent extends React.Component {
|
|
|
67
67
|
currentDestination = undefined;
|
|
68
68
|
currentDestinationId = undefined;
|
|
69
69
|
}
|
|
70
|
-
let accessLevel = AdaptableHelper_1.default.
|
|
70
|
+
let accessLevel = AdaptableHelper_1.default.getAccessLevelForObject(currentReport, this.props.accessLevel);
|
|
71
71
|
let deleteMessage = "Are you sure you want to delete '";
|
|
72
72
|
if (currentReport != null) {
|
|
73
73
|
deleteMessage = deleteMessage + currentReport.Name + "'?";
|
|
@@ -86,9 +86,7 @@ class ExportViewPanelComponent extends React.Component {
|
|
|
86
86
|
React.createElement(ButtonEdit_1.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 }),
|
|
87
87
|
React.createElement(ButtonNew_1.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 }),
|
|
88
88
|
React.createElement(ButtonDelete_1.ButtonDelete, { tooltip: "Delete Report", className: `ab-${elementType}__Export__delete`, disabled: currentReport == null, ConfirmAction: ExportRedux.ReportDelete(currentReport), ConfirmationMsg: deleteMessage, ConfirmationTitle: 'Delete Report', accessLevel: accessLevel }),
|
|
89
|
-
this.props.api.
|
|
90
|
-
.getEntitlementService()
|
|
91
|
-
.isModuleFullEntitlement('Schedule') && (React.createElement(ButtonSchedule_1.ButtonSchedule, { marginLeft: 1, className: `ab-${elementType}__Export__schedule`, onClick: () => this.onNewReportSchedule(), tooltip: "Schedule", disabled: currentReport == null, accessLevel: this.props.accessLevel })))));
|
|
89
|
+
this.props.api.entitlementApi.isModuleFullEntitlement('Schedule') && (React.createElement(ButtonSchedule_1.ButtonSchedule, { marginLeft: 1, className: `ab-${elementType}__Export__schedule`, onClick: () => this.onNewReportSchedule(), tooltip: "Schedule", disabled: currentReport == null, accessLevel: this.props.accessLevel })))));
|
|
92
90
|
}
|
|
93
91
|
onSelectedReportChanged(reportName) {
|
|
94
92
|
this.props.onSelectReport(reportName);
|
|
@@ -13,15 +13,11 @@ class ReportSummaryWizard extends React.Component {
|
|
|
13
13
|
{ Key: 'Name', Value: this.props.data.Name },
|
|
14
14
|
{
|
|
15
15
|
Key: 'Column Scope',
|
|
16
|
-
Value: this.props.api.internalApi
|
|
17
|
-
.getReportService()
|
|
18
|
-
.GetReportColumnScopeLongDescription(this.props.data),
|
|
16
|
+
Value: this.props.api.exportApi.internalApi.getReportColumnScopeLongDescription(this.props.data),
|
|
19
17
|
},
|
|
20
18
|
{
|
|
21
19
|
Key: 'Row Scope',
|
|
22
|
-
Value: this.props.api.internalApi
|
|
23
|
-
.getReportService()
|
|
24
|
-
.GetReportExpressionDescription(this.props.data, this.props.api.columnApi.getColumns()),
|
|
20
|
+
Value: this.props.api.exportApi.internalApi.getReportExpressionDescription(this.props.data, this.props.api.columnApi.getColumns()),
|
|
25
21
|
},
|
|
26
22
|
];
|
|
27
23
|
return (React.createElement(WizardSummaryPage_1.WizardSummaryPage, { KeyValuePairs: keyValuePairs, header: this.props.moduleInfo.FriendlyName }));
|
|
@@ -8,7 +8,7 @@ const rebass_1 = require("rebass");
|
|
|
8
8
|
const ExpressionEditor_1 = require("../../components/ExpressionEditor");
|
|
9
9
|
const NamedQueryContext_1 = require("../../components/ExpressionEditor/NamedQueryContext");
|
|
10
10
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
11
|
-
const
|
|
11
|
+
const NamedQueryRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/NamedQueryRedux"));
|
|
12
12
|
const PopupRedux_1 = require("../../Redux/ActionsReducers/PopupRedux");
|
|
13
13
|
const ModuleConstants_1 = require("../../Utilities/Constants/ModuleConstants");
|
|
14
14
|
const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
|
|
@@ -32,7 +32,7 @@ const GridFilterExpressionEditor = (props) => {
|
|
|
32
32
|
const onRunQuery = (expression) => {
|
|
33
33
|
api.gridFilterApi.setGridFilterExpression(expression);
|
|
34
34
|
};
|
|
35
|
-
const onAddNamedQuery = (namedQuery) => dispatch(
|
|
35
|
+
const onAddNamedQuery = (namedQuery) => dispatch(NamedQueryRedux.NamedQueryAdd(namedQuery));
|
|
36
36
|
const handleSaveQuery = () => {
|
|
37
37
|
dispatch((0, PopupRedux_1.PopupShowForm)({
|
|
38
38
|
Id: 'save_query_form',
|
|
@@ -84,13 +84,9 @@ const useGridFilterExpressionEditor = () => {
|
|
|
84
84
|
adaptable.api.gridFilterApi.setGridFilterExpression(newExpression);
|
|
85
85
|
};
|
|
86
86
|
const gridFilterAccessLevel = React.useMemo(() => {
|
|
87
|
-
return adaptable.api.
|
|
88
|
-
.getEntitlementService()
|
|
89
|
-
.getEntitlementAccessLevelForModule(ModuleConstants_1.GridFilterModuleId);
|
|
87
|
+
return adaptable.api.entitlementApi.getEntitlementAccessLevelForModule(ModuleConstants_1.GridFilterModuleId);
|
|
90
88
|
}, []);
|
|
91
|
-
const namedQueryModuleAccessLevel = adaptable.api.
|
|
92
|
-
.getEntitlementService()
|
|
93
|
-
.getEntitlementAccessLevelForModule(ModuleConstants_1.NamedQueryModuleId);
|
|
89
|
+
const namedQueryModuleAccessLevel = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule(ModuleConstants_1.NamedQueryModuleId);
|
|
94
90
|
const onShowNamedQueries = (value, popup) => dispatch(PopupRedux.PopupShowScreen(ModuleConstants_1.NamedQueryModuleId, popup, {
|
|
95
91
|
action: 'New',
|
|
96
92
|
source: 'Other',
|
|
@@ -23,7 +23,7 @@ class LayoutViewPanelComponent extends React.Component {
|
|
|
23
23
|
// the global access level (Layout Entitlement)
|
|
24
24
|
const cloneAccessLevel = this.props.accessLevel;
|
|
25
25
|
const newAccessLevel = this.props.accessLevel;
|
|
26
|
-
const accessLevel = AdaptableHelper_1.default.
|
|
26
|
+
const accessLevel = AdaptableHelper_1.default.getAccessLevelForObject(layoutEntity, this.props.accessLevel);
|
|
27
27
|
const isManualSaveLayout = !this.props.api.layoutApi.shouldAutoSaveLayouts();
|
|
28
28
|
const availableLayoutOptions = this.props.Layouts.map((layout, index) => {
|
|
29
29
|
return Object.assign(Object.assign({}, layout), { label: layout.Name, value: layout.Name, onClick: () => this.props.onSelectLayout(layout.Name) });
|
|
@@ -24,13 +24,7 @@ const PivotDetailsPopoup = (props) => {
|
|
|
24
24
|
const pivotPreviewOptionColumn = (_a = adaptableApi.optionsApi.getLayoutOptions()) === null || _a === void 0 ? void 0 : _a.pivotPreviewColumns;
|
|
25
25
|
let pivotPreviewExtraColumns = [];
|
|
26
26
|
if (typeof pivotPreviewOptionColumn === 'function') {
|
|
27
|
-
const pivotPreviewColumnsContext = {
|
|
28
|
-
layout: layout,
|
|
29
|
-
columnId: columnId,
|
|
30
|
-
adaptableApi: adaptableApi,
|
|
31
|
-
userName: adaptableApi.optionsApi.getUserName(),
|
|
32
|
-
adaptableId: adaptableApi.optionsApi.getAdaptableId(),
|
|
33
|
-
};
|
|
27
|
+
const pivotPreviewColumnsContext = Object.assign({ layout: layout, columnId: columnId }, adaptableApi.internalApi.buildBaseContext());
|
|
34
28
|
pivotPreviewExtraColumns = pivotPreviewOptionColumn(pivotPreviewColumnsContext);
|
|
35
29
|
}
|
|
36
30
|
else if (Array.isArray(pivotPreviewOptionColumn)) {
|
|
@@ -11,9 +11,7 @@ const LayoutRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/La
|
|
|
11
11
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
12
12
|
const SaveLayoutButton = () => {
|
|
13
13
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
14
|
-
const accessLevel = adaptable.api.
|
|
15
|
-
.getEntitlementService()
|
|
16
|
-
.getEntitlementAccessLevelForModule(ModuleConstants.LayoutModuleId);
|
|
14
|
+
const accessLevel = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule(ModuleConstants.LayoutModuleId);
|
|
17
15
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
18
16
|
const currentDraftLayout = (0, react_redux_1.useSelector)((state) => state.Grid.CurrentLayout);
|
|
19
17
|
const isManualSaveLayout = !adaptable.api.layoutApi.shouldAutoSaveLayouts();
|
|
@@ -9,11 +9,11 @@ const DropdownButton_1 = tslib_1.__importDefault(require("../../../../components
|
|
|
9
9
|
const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
|
|
10
10
|
const Tabs_1 = require("../../../../components/Tabs");
|
|
11
11
|
const Tag_1 = require("../../../../components/Tag");
|
|
12
|
-
const sortWithOrder_1 = require("../../../../Utilities/sortWithOrder");
|
|
13
12
|
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
14
13
|
const ValueSelector_1 = require("../../../Components/ValueSelector");
|
|
15
14
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
16
15
|
const Utilities_1 = require("./Utilities");
|
|
16
|
+
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/ArrayExtensions"));
|
|
17
17
|
const WEIGHTED_AVERAGE_AGG_FN_NAME = 'weightedAvg';
|
|
18
18
|
const isAggregationsSectionValid = (data) => {
|
|
19
19
|
const weightedAvg = data.AggregationColumns
|
|
@@ -112,7 +112,7 @@ const AggregationsSection = (props) => {
|
|
|
112
112
|
const numberColumns = adaptable.api.columnApi.getNumericColumns();
|
|
113
113
|
const sortedAggregableColumns = React.useMemo(() => {
|
|
114
114
|
var _a, _b;
|
|
115
|
-
return
|
|
115
|
+
return ArrayExtensions_1.default.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));
|
|
116
116
|
}, [layout, allAggregableColumns]);
|
|
117
117
|
const handleColumnsSelectionChange = React.useCallback((columnIds) => {
|
|
118
118
|
props.onChange(Object.assign(Object.assign({}, layout), { AggregationColumns: columnIds.reduce((acc, colId) => {
|
|
@@ -12,7 +12,6 @@ const SimpleButton_1 = tslib_1.__importDefault(require("../../../../components/S
|
|
|
12
12
|
const Tabs_1 = require("../../../../components/Tabs");
|
|
13
13
|
const Tag_1 = require("../../../../components/Tag");
|
|
14
14
|
const AdaptableColumn_1 = require("../../../../PredefinedConfig/Common/AdaptableColumn");
|
|
15
|
-
const sortWithOrder_1 = require("../../../../Utilities/sortWithOrder");
|
|
16
15
|
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
17
16
|
const ValueSelector_1 = require("../../../Components/ValueSelector");
|
|
18
17
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
@@ -21,6 +20,7 @@ const icons_1 = require("../../../../components/icons");
|
|
|
21
20
|
const CheckBox_1 = require("../../../../components/CheckBox");
|
|
22
21
|
const Helper_1 = require("../../../../Utilities/Helpers/Helper");
|
|
23
22
|
const ColumnLabels_1 = require("../Components/ColumnLabels");
|
|
23
|
+
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/ArrayExtensions"));
|
|
24
24
|
const PropertyOrderText = (props) => (React.createElement(rebass_1.Text, { fontWeight: 600, fontSize: 2 }, props.children));
|
|
25
25
|
const ColumnsSectionSummary = () => {
|
|
26
26
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
@@ -192,7 +192,7 @@ const ColumnsSection = (props) => {
|
|
|
192
192
|
const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
193
193
|
const allColumns = adaptable.api.columnApi.getColumns();
|
|
194
194
|
const sortedColumns = React.useMemo(() => {
|
|
195
|
-
return
|
|
195
|
+
return ArrayExtensions_1.default.sortArrayWithOrder(allColumns.map((col) => col.columnId), layout.Columns, { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
196
196
|
}, [layout, allColumns]);
|
|
197
197
|
const handlePinChange = (columnId, pinning) => {
|
|
198
198
|
props.onChange(Object.assign(Object.assign({}, layout), { PinnedColumnsMap: Object.assign(Object.assign({}, layout.PinnedColumnsMap), { [columnId]: pinning }) }));
|
|
@@ -6,11 +6,11 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const rebass_1 = require("rebass");
|
|
7
7
|
const Tabs_1 = require("../../../../components/Tabs");
|
|
8
8
|
const Tag_1 = require("../../../../components/Tag");
|
|
9
|
-
const sortWithOrder_1 = require("../../../../Utilities/sortWithOrder");
|
|
10
9
|
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
11
10
|
const ValueSelector_1 = require("../../../Components/ValueSelector");
|
|
12
11
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
13
12
|
const Utilities_1 = require("./Utilities");
|
|
13
|
+
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/ArrayExtensions"));
|
|
14
14
|
const PivotColumnsSectionSummary = () => {
|
|
15
15
|
var _a;
|
|
16
16
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
@@ -25,7 +25,7 @@ const PivotColumnsSection = (props) => {
|
|
|
25
25
|
const allPivotColumns = adaptable.api.columnApi.getPivotableColumns();
|
|
26
26
|
const sortedPivotColumns = React.useMemo(() => {
|
|
27
27
|
var _a;
|
|
28
|
-
return
|
|
28
|
+
return ArrayExtensions_1.default.sortArrayWithOrder(allPivotColumns.map((col) => col.columnId), (_a = layout.PivotColumns) !== null && _a !== void 0 ? _a : [], { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
29
29
|
}, [layout, allPivotColumns]);
|
|
30
30
|
const handleColumnsChange = (columnIds) => {
|
|
31
31
|
props.onChange(Object.assign(Object.assign({}, layout), { PivotColumns: columnIds }));
|
|
@@ -8,10 +8,10 @@ const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLa
|
|
|
8
8
|
const Utilities_1 = require("./Utilities");
|
|
9
9
|
const Tabs_1 = require("../../../../components/Tabs");
|
|
10
10
|
const Tag_1 = require("../../../../components/Tag");
|
|
11
|
-
const sortWithOrder_1 = require("../../../../Utilities/sortWithOrder");
|
|
12
11
|
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
13
12
|
const ValueSelector_1 = require("../../../Components/ValueSelector");
|
|
14
13
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
14
|
+
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/ArrayExtensions"));
|
|
15
15
|
const RowGroupingSectionSummary = () => {
|
|
16
16
|
var _a;
|
|
17
17
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
@@ -42,7 +42,7 @@ const RowGroupingSection = (props) => {
|
|
|
42
42
|
const allGroupableColumns = adaptable.api.columnApi.getGroupableColumns();
|
|
43
43
|
const sortedGroupableColumns = React.useMemo(() => {
|
|
44
44
|
var _a;
|
|
45
|
-
return
|
|
45
|
+
return ArrayExtensions_1.default.sortArrayWithOrder(allGroupableColumns.map((col) => col.columnId), (_a = layout.RowGroupedColumns) !== null && _a !== void 0 ? _a : [], { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
46
46
|
}, [layout, allGroupableColumns]);
|
|
47
47
|
const handleColumnsChange = (columnIds) => {
|
|
48
48
|
props.onChange(Object.assign(Object.assign({}, layout), { RowGroupedColumns: columnIds }));
|
|
@@ -15,12 +15,12 @@ const RowSummary_1 = require("../../../../PredefinedConfig/Common/RowSummary");
|
|
|
15
15
|
const adaptableQlUtils_1 = require("../../../../Utilities/adaptableQlUtils");
|
|
16
16
|
const ModuleConstants_1 = require("../../../../Utilities/Constants/ModuleConstants");
|
|
17
17
|
const aggregatedScalarExpressionFunctions_1 = require("../../../../Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions");
|
|
18
|
-
const sortWithOrder_1 = require("../../../../Utilities/sortWithOrder");
|
|
19
18
|
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
20
19
|
const SuspendToggleButton_1 = require("../../../Components/Buttons/SuspendToggleButton");
|
|
21
20
|
const ValueSelector_1 = require("../../../Components/ValueSelector");
|
|
22
21
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
23
22
|
const Utilities_1 = require("./Utilities");
|
|
23
|
+
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/ArrayExtensions"));
|
|
24
24
|
const areSummaryRowsValid = (layout) => {
|
|
25
25
|
var _a;
|
|
26
26
|
if (!layout.RowSummaries)
|
|
@@ -100,7 +100,7 @@ const RowSummaryEditor = React.memo(({ rowSummary, onChange, availableScalarExpr
|
|
|
100
100
|
return (_b = (_a = layout.Columns) === null || _a === void 0 ? void 0 : _a.includes) === null || _b === void 0 ? void 0 : _b.call(_a, column.columnId);
|
|
101
101
|
})
|
|
102
102
|
.map((c) => c.columnId);
|
|
103
|
-
return
|
|
103
|
+
return ArrayExtensions_1.default.sortArrayWithOrder(colIds, Object.keys(rowSummary.ColumnsMap), {
|
|
104
104
|
sortUnorderedItems: false,
|
|
105
105
|
}).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
106
106
|
}, [rowSummary.ColumnsMap]);
|
|
@@ -8,11 +8,11 @@ const SimpleButton_1 = tslib_1.__importDefault(require("../../../../components/S
|
|
|
8
8
|
const Tabs_1 = require("../../../../components/Tabs");
|
|
9
9
|
const Tag_1 = require("../../../../components/Tag");
|
|
10
10
|
const getLayoutSortViewItems_1 = require("../../../../Strategy/Utilities/Layout/getLayoutSortViewItems");
|
|
11
|
-
const sortWithOrder_1 = require("../../../../Utilities/sortWithOrder");
|
|
12
11
|
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
13
12
|
const ValueSelector_1 = require("../../../Components/ValueSelector");
|
|
14
13
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
15
14
|
const Utilities_1 = require("./Utilities");
|
|
15
|
+
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/ArrayExtensions"));
|
|
16
16
|
const SortSectionSummary = () => {
|
|
17
17
|
const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
18
18
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
@@ -35,7 +35,7 @@ const SortSection = (props) => {
|
|
|
35
35
|
const allSortableColumns = adaptable.api.columnApi.getSortableColumns();
|
|
36
36
|
const sortedSortColumns = React.useMemo(() => {
|
|
37
37
|
var _a;
|
|
38
|
-
return
|
|
38
|
+
return ArrayExtensions_1.default.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));
|
|
39
39
|
}, [layout, allSortableColumns]);
|
|
40
40
|
const handleColumnsSelectionChange = React.useCallback((columnIds) => {
|
|
41
41
|
props.onChange(Object.assign(Object.assign({}, layout), { ColumnSorts: (columnIds || []).map((columnId) => {
|
|
@@ -11,7 +11,7 @@ const Helper_1 = require("../../../Utilities/Helpers/Helper");
|
|
|
11
11
|
const NamedQueryExpressionWizardSection_1 = require("./NamedQueryExpressionWizardSection");
|
|
12
12
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
13
13
|
const react_redux_1 = require("react-redux");
|
|
14
|
-
const
|
|
14
|
+
const NamedQueryRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/NamedQueryRedux"));
|
|
15
15
|
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
16
16
|
function NamedQueryWizard(props) {
|
|
17
17
|
const [namedQuery, setNamedQuery] = (0, react_1.useState)(() => {
|
|
@@ -24,10 +24,10 @@ function NamedQueryWizard(props) {
|
|
|
24
24
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
25
25
|
const handleFinish = () => {
|
|
26
26
|
if (props.data) {
|
|
27
|
-
dispatch(
|
|
27
|
+
dispatch(NamedQueryRedux.NamedQueryEdit(namedQuery));
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
|
-
dispatch(
|
|
30
|
+
dispatch(NamedQueryRedux.NamedQueryAdd(namedQuery));
|
|
31
31
|
}
|
|
32
32
|
props.onFinishWizard(namedQuery);
|
|
33
33
|
};
|
|
@@ -41,7 +41,7 @@ const SpecialColumnSettingsWizardStep = (props) => {
|
|
|
41
41
|
React.createElement(FormLayout_1.FormRow, null,
|
|
42
42
|
React.createElement(CheckBox_1.CheckBox, { "data-name": "filterable", checked: Filterable, onChange: (Filterable) => onSettingsChange({ Filterable }), disabled: !adaptable.api.optionsApi.getColumnFilterOptions()
|
|
43
43
|
.enableFilterOnSpecialColumns ||
|
|
44
|
-
adaptable.
|
|
44
|
+
adaptable.api.entitlementApi.getEntitlementAccessLevelForModule(ModuleConstants_1.ColumnFilterModuleId) == 'Hidden' }, "Filterable"),
|
|
45
45
|
React.createElement(CheckBox_1.CheckBox, { "data-name": "resizable", checked: Resizable, onChange: (Resizable) => onSettingsChange({ Resizable }) }, "Resizable"),
|
|
46
46
|
React.createElement(CheckBox_1.CheckBox, { "data-name": "groupable", checked: Groupable, onChange: (Groupable) => onSettingsChange({ Groupable }) }, "Groupable")),
|
|
47
47
|
React.createElement(FormLayout_1.FormRow, null,
|
|
@@ -28,7 +28,7 @@ class SystemStatusPopupComponent extends React.Component {
|
|
|
28
28
|
render() {
|
|
29
29
|
let clearAllButton = (React.createElement(SimpleButton_1.default, { onClick: () => this.onSystemStatusMessageInfoDeleteAll(), tooltip: "Clear All", tone: "neutral", variant: "raised", accessLevel: this.props.accessLevel, disabled: ArrayExtensions_1.default.IsNullOrEmpty(this.props.SystemStatusMessages) }, "Delete All Messages"));
|
|
30
30
|
const messages = ArrayExtensions_1.default.sortArrayWithProperty(Enums_1.SortOrder.Desc, this.props.SystemStatusMessages, 'Timestamp').map((smi, index) => {
|
|
31
|
-
const accessLevel = AdaptableHelper_1.default.
|
|
31
|
+
const accessLevel = AdaptableHelper_1.default.getAccessLevelForObject(smi, this.props.accessLevel);
|
|
32
32
|
return (React.createElement(SystemStatusEntityRow_1.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 }));
|
|
33
33
|
});
|
|
34
34
|
return (React.createElement(PopupPanel_1.PopupPanel, { button: clearAllButton, headerText: this.props.moduleInfo.FriendlyName, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed() }, ArrayExtensions_1.default.IsNotNullOrEmpty(this.props.SystemStatusMessages) && (React.createElement(rebass_1.Box, { className: "ab-SystemStatus-Popup-List", padding: 2 },
|
|
@@ -6,7 +6,7 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const react_redux_1 = require("react-redux");
|
|
8
8
|
const rebass_1 = require("rebass");
|
|
9
|
-
const
|
|
9
|
+
const NamedQueryRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/NamedQueryRedux"));
|
|
10
10
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
11
11
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
12
12
|
const Tabs_1 = require("../../components/Tabs");
|
|
@@ -33,7 +33,7 @@ exports.useOnePageAdaptableWizardContext = useOnePageAdaptableWizardContext;
|
|
|
33
33
|
const OnePageAdaptableWizard = (props) => {
|
|
34
34
|
const { api } = (0, AdaptableContext_1.useAdaptable)();
|
|
35
35
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
36
|
-
const saveNamedQuery = React.useCallback((namedQuery) => dispatch(
|
|
36
|
+
const saveNamedQuery = React.useCallback((namedQuery) => dispatch(NamedQueryRedux.NamedQueryAdd(namedQuery)), []);
|
|
37
37
|
const [namedQuery, setNamedQuery] = (0, react_1.useState)(false);
|
|
38
38
|
const name = props.moduleInfo.FriendlyName
|
|
39
39
|
? `${(0, kebabCase_1.default)(props.moduleInfo.FriendlyName)}-wizard`
|